Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ Documentation is available at https://kiro.dev/docs/powers/

## Available powers

### aidlc
**AI-DLC Workflow** - AI-Driven Development Life Cycle - an intelligent software development workflow that adapts to your needs, maintains quality standards, and keeps you in control. Guides you through inception, construction, and operations phases with structured requirements, design, and code generation.

**MCP Servers:** None (Knowledge Base Power)

---

### aws-agentcore
**Build an agent with Amazon Bedrock AgentCore** - Build, test, and deploy AI agents using AWS Bedrock AgentCore with local development workflow. Amazon Bedrock AgentCore is an agentic platform for building, deploying, and operating effective agents.

Expand Down
189 changes: 189 additions & 0 deletions aidlc/POWER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
---
name: "aidlc"
displayName: "AI-DLC Workflow"
description: "AI-Driven Development Life Cycle - an intelligent software development workflow that adapts to your needs, maintains quality standards, and keeps you in control. Guides you through inception, construction, and operations phases with structured requirements, design, and code generation."
keywords: ["aidlc", "ai-dlc", "software-development", "workflow", "requirements", "design", "code-generation", "sdlc"]
author: "AWS Labs"
---

# AI-DLC (AI-Driven Development Life Cycle)

## Overview

AI-DLC is an intelligent software development workflow that adapts to your needs, maintains quality standards, and keeps you in control of the process. It provides a structured yet flexible approach to software development that:

- **Analyzes your requirements** and asks clarifying questions when needed
- **Plans the optimal approach** based on complexity and risk
- **Skips unnecessary steps** for simple changes while providing comprehensive coverage for complex projects
- **Documents everything** so you have a complete record of decisions and rationale
- **Guides you through each phase** with clear checkpoints and approval gates

## Available Steering Files

This power includes comprehensive workflow guides organized by phase:

### Core Workflow
- **core-workflow** - Main workflow orchestration and phase coordination

### Inception Phase (Planning & Architecture)
- **inception/workspace-detection** - Analyze workspace state and project type
- **inception/reverse-engineering** - Analyze existing codebase (brownfield projects)
- **inception/requirements-analysis** - Gather and validate requirements
- **inception/user-stories** - Create user stories and personas
- **inception/workflow-planning** - Create execution plan
- **inception/application-design** - High-level component and service design
- **inception/units-generation** - Decompose into units of work

### Construction Phase (Design, Implementation & Test)
- **construction/functional-design** - Detailed business logic design
- **construction/nfr-requirements** - Non-functional requirements and tech stack
- **construction/nfr-design** - NFR patterns and logical components
- **construction/infrastructure-design** - Infrastructure service mapping
- **construction/code-generation** - Code generation with planning and execution
- **construction/build-and-test** - Build and comprehensive testing

### Common Guidelines
- **common/process-overview** - Complete workflow overview with diagrams
- **common/welcome-message** - User-facing welcome and introduction
- **common/question-format-guide** - Question formatting rules
- **common/depth-levels** - Adaptive depth explanation
- **common/content-validation** - Content validation requirements
- **common/session-continuity** - Session resumption guidance
- **common/terminology** - AI-DLC terminology definitions
- **common/error-handling** - Error handling guidelines
- **common/ascii-diagram-standards** - ASCII diagram standards
- **common/workflow-changes** - Workflow modification guidelines
- **common/overconfidence-prevention** - Overconfidence prevention rules

## The Three-Phase Lifecycle

```
User Request
╔═══════════════════════════════════════╗
║ INCEPTION PHASE ║
║ Planning & Application Design ║
╠═══════════════════════════════════════╣
║ • Workspace Detection (ALWAYS) ║
║ • Reverse Engineering (CONDITIONAL) ║
║ • Requirements Analysis (ALWAYS) ║
║ • User Stories (CONDITIONAL) ║
║ • Workflow Planning (ALWAYS) ║
║ • Application Design (CONDITIONAL) ║
║ • Units Generation (CONDITIONAL) ║
╚═══════════════════════════════════════╝
╔═══════════════════════════════════════╗
║ CONSTRUCTION PHASE ║
║ Design, Implementation & Test ║
╠═══════════════════════════════════════╣
║ • Per-Unit Loop (for each unit): ║
║ - Functional Design (CONDITIONAL) ║
║ - NFR Requirements (CONDITIONAL) ║
║ - NFR Design (CONDITIONAL) ║
║ - Infrastructure Design (COND) ║
║ - Code Generation (ALWAYS) ║
║ • Build and Test (ALWAYS) ║
╚═══════════════════════════════════════╝
╔═══════════════════════════════════════╗
║ OPERATIONS PHASE ║
║ Placeholder for Future ║
╠═══════════════════════════════════════╣
║ • Operations (PLACEHOLDER) ║
╚═══════════════════════════════════════╝
Complete
```

## Quick Start

To start using AI-DLC, simply state your intent starting with:

```
Using AI-DLC, [describe what you want to build or change]
```

AI-DLC will automatically:
1. Analyze your workspace to understand if this is a new or existing project
2. Gather requirements and ask clarifying questions if needed
3. Create an execution plan showing which stages will run and why
4. Guide you through each phase with checkpoints for your approval
5. Generate working code with complete documentation and tests

## Key Principles

- **Adaptive Execution**: Only execute stages that add value
- **Transparent Planning**: Always show execution plan before starting
- **User Control**: You can request stage inclusion/exclusion
- **Progress Tracking**: State tracked in `aidlc-docs/aidlc-state.md`
- **Complete Audit Trail**: All decisions logged in `aidlc-docs/audit.md`
- **Quality Focus**: Complex changes get full treatment, simple changes stay efficient

## Directory Structure

```
<WORKSPACE-ROOT>/ # Application code here
├── [project-specific structure] # Varies by project
├── aidlc-docs/ # Documentation only
│ ├── inception/ # INCEPTION PHASE
│ │ ├── plans/
│ │ ├── reverse-engineering/ # Brownfield only
│ │ ├── requirements/
│ │ ├── user-stories/
│ │ └── application-design/
│ ├── construction/ # CONSTRUCTION PHASE
│ │ ├── plans/
│ │ ├── {unit-name}/
│ │ │ ├── functional-design/
│ │ │ ├── nfr-requirements/
│ │ │ ├── nfr-design/
│ │ │ ├── infrastructure-design/
│ │ │ └── code/ # Markdown summaries only
│ │ └── build-and-test/
│ ├── operations/ # OPERATIONS PHASE (placeholder)
│ ├── aidlc-state.md
│ └── audit.md
```

## Best Practices

1. **Start with clear intent** - The clearer your initial request, the more efficient the workflow
2. **Review each phase** - Take time to review and approve each stage before proceeding
3. **Provide feedback** - If something doesn't look right, request changes before approval
4. **Use the audit trail** - Reference `audit.md` to understand decisions made
5. **Leverage adaptivity** - Trust the workflow to skip unnecessary stages for simple changes

## Troubleshooting

### Workflow Not Starting
- Ensure you start your request with "Using AI-DLC, ..."
- Check that steering files are properly loaded

### Missing Stages
- AI-DLC adapts to your needs - some stages are conditional
- You can request specific stages be included in Workflow Planning

### Session Continuity
- AI-DLC tracks state in `aidlc-docs/aidlc-state.md`
- Resume interrupted sessions by referencing this file

## Additional Resources

- [AI-DLC GitHub Repository](https://github.com/awslabs/aidlc-workflows)
- [AI-DLC Methodology Blog](https://aws.amazon.com/blogs/)

## Attribution

This power is based on the [AI-DLC (AI-Driven Development Life Cycle) workflows](https://github.com/awslabs/aidlc-workflows) by AWS Labs, which is licensed under the MIT No Attribution License (MIT-0).

---

**Workflow:** AI-DLC (AI-Driven Development Life Cycle)
**Source:** AWS Labs
**License:** MIT-0 (MIT No Attribution)
116 changes: 116 additions & 0 deletions aidlc/steering/common/ascii-diagram-standards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# ASCII Diagram Standards

## MANDATORY: Use Basic ASCII Only

**CRITICAL**: ALWAYS use basic ASCII characters for diagrams (maximum compatibility).

### ✅ ALLOWED: `+` `-` `|` `^` `v` `<` `>` and alphanumeric text

### ❌ FORBIDDEN: Unicode box-drawing characters
- NO: `┌` `─` `│` `└` `┐` `┘` `├` `┤` `┬` `┴` `┼` `▼` `▲` `►` `◄`
- Reason: Inconsistent rendering across fonts/platforms

## Standard ASCII Diagram Patterns

### CRITICAL: Character Width Rule
**Every line in a box MUST have EXACTLY the same character count (including spaces)**

✅ CORRECT (all lines = 67 chars):
```
+---------------------------------------------------------------+
| Component Name |
| Description text here |
+---------------------------------------------------------------+
```

❌ WRONG (inconsistent widths):
```
+---------------------------------------------------------------+
| Component Name |
| Description text here |
+---------------------------------------------------------------+
```

### Box Pattern
```
+-----------------------------------------------------+
| |
| Calculator Application |
| |
| Provides basic arithmetic operations for users |
| through a web-based interface |
| |
+-----------------------------------------------------+
```

### Nested Boxes
```
+-------------------------------------------------------+
| Web Server (PHP Runtime) |
| +-------------------------------------------------+ |
| | index.php (Monolithic Application) | |
| | +-------------------------------------------+ | |
| | | HTML Template (View Layer) | | |
| | | - Form rendering | | |
| | | - Result display | | |
| | +-------------------------------------------+ | |
| +-------------------------------------------------+ |
+-------------------------------------------------------+
```

### Arrows and Connections
```
+----------+
| Source |
+----------+
|
| HTTP POST
v
+----------+
| Target |
+----------+
```

### Horizontal Flow
```
+-------+ +-------+ +-------+
| Step1 | --> | Step2 | --> | Step3 |
+-------+ +-------+ +-------+
```

### Vertical Flow with Labels
```
User Action Flow:
|
v
+----------+
| Input |
+----------+
|
| validates
v
+----------+
| Process |
+----------+
|
| returns
v
+----------+
| Output |
+----------+
```

## Validation

Before creating diagrams:
- [ ] Basic ASCII only: `+` `-` `|` `^` `v` `<` `>`
- [ ] No Unicode box-drawing
- [ ] Spaces (not tabs) for alignment
- [ ] Corners use `+`
- [ ] **ALL box lines same character width** (count characters including spaces)
- [ ] Test: Verify corners align vertically in monospace font

## Alternative

For complex diagrams, use Mermaid (see `content-validation.md`)

78 changes: 78 additions & 0 deletions aidlc/steering/common/content-validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Content Validation Rules

## MANDATORY: Content Validation Before File Creation

**CRITICAL**: All generated content MUST be validated before writing to files to prevent parsing errors.

## ASCII Diagram Standards

**CRITICAL**: Before creating ANY file with ASCII diagrams:

1. **LOAD** `common/ascii-diagram-standards.md`
2. **VALIDATE** each diagram:
- Count characters per line (all lines MUST be same width)
- Use ONLY: `+` `-` `|` `^` `v` `<` `>` and spaces
- NO Unicode box-drawing characters
- Spaces only (NO tabs)
3. **TEST** alignment by verifying box corners align vertically

**See `common/ascii-diagram-standards.md` for patterns and validation checklist.**

## Mermaid Diagram Validation

### Required Validation Steps
1. **Syntax Check**: Validate Mermaid syntax before file creation
2. **Character Escaping**: Ensure special characters are properly escaped
3. **Fallback Content**: Provide text alternative if Mermaid fails validation

### Mermaid Validation Rules
```markdown
## BEFORE creating any file with Mermaid diagrams:

1. Check for invalid characters in node IDs (use alphanumeric + underscore only)
2. Escape special characters in labels: " → \" and ' → \'
3. Validate flowchart syntax: node connections must be valid
4. Test diagram parsing with simple validation

## FALLBACK: If Mermaid validation fails, use text-based workflow representation
```

### Implementation Pattern
```markdown
## Workflow Visualization

### Mermaid Diagram (if syntax valid)
```mermaid
[validated diagram content]
```

### Text Alternative (always include)
```
Phase 1: INCEPTION
- Stage 1: Workspace Detection (COMPLETED)
- Stage 2: Requirements Analysis (COMPLETED)
[continue with text representation]
```

## General Content Validation

### Pre-Creation Validation Checklist
- [ ] Validate embedded code blocks (Mermaid, JSON, YAML)
- [ ] Check special character escaping
- [ ] Verify markdown syntax correctness
- [ ] Test content parsing compatibility
- [ ] Include fallback content for complex elements

### Error Prevention Rules
1. **Always validate before using tools/commands to write files**: Never write unvalidated content
2. **Escape special characters**: Particularly in diagrams and code blocks
3. **Provide alternatives**: Include text versions of visual content
4. **Test syntax**: Validate complex content structures

## Validation Failure Handling

### When Validation Fails
1. **Log the error**: Record what failed validation
2. **Use fallback content**: Switch to text-based alternative
3. **Continue workflow**: Don't block on content validation failures
4. **Inform user**: Mention simplified content was used due to parsing constraints
Loading