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
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ AI-DLC is an intelligent software development workflow that adapts to your needs
- [Key Features](#key-features)
- [Extensions](#extensions)
- [Supporting Tools](#supporting-tools)
- [Build Output](#build-output)
- [Tenets](#tenets)
- [Prerequisites](#prerequisites)
- [Troubleshooting](#troubleshooting)
Expand Down Expand Up @@ -741,6 +742,19 @@ The installer automatically detects your workspace root and installs the hook to

---

## Build Output

The `build/` directory contains generated artifacts derived from the source AI-DLC rules. These are alternative formats of the core workflow, produced for consumption by specific platforms or standards.

| Directory | Description |
| --------------- | ------------------------------------------------------------------------------------------------------------ |
| `build/skills/` | AI-DLC rules converted to [AgentSkills](https://agentskills.io/home) format for use with compatible agents |

> [!NOTE]
> The `build/` directory is generated output. Do not edit files in `build/` directly — modify the source rules in `aidlc-rules/` instead.

---

## Tenets

These are our core principles to guide our decision making.
Expand Down
462 changes: 462 additions & 0 deletions build/skills/aidlc/SKILL.md

Large diffs are not rendered by default.

116 changes: 116 additions & 0 deletions build/skills/aidlc/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

Check failure on line 9 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Headings should be surrounded by blank lines

build/skills/aidlc/common/ascii-diagram-standards.md:9 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### ❌ FORBIDDEN: Unicode box-drawing characters"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md022.md
- NO: `┌` `─` `│` `└` `┐` `┘` `├` `┤` `┬` `┴` `┼` `▼` `▲` `►` `◄`

Check failure on line 10 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Lists should be surrounded by blank lines

build/skills/aidlc/common/ascii-diagram-standards.md:10 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- NO: `┌` `─` `│` `└` `┐` `┘` ..."] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md032.md
- Reason: Inconsistent rendering across fonts/platforms

## Standard ASCII Diagram Patterns

### CRITICAL: Character Width Rule

Check failure on line 15 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Headings should be surrounded by blank lines

build/skills/aidlc/common/ascii-diagram-standards.md:15 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### CRITICAL: Character Width Rule"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md022.md
**Every line in a box MUST have EXACTLY the same character count (including spaces)**

✅ CORRECT (all lines = 67 chars):
```

Check failure on line 19 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Fenced code blocks should have a language specified

build/skills/aidlc/common/ascii-diagram-standards.md:19 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md040.md

Check failure on line 19 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Fenced code blocks should be surrounded by blank lines

build/skills/aidlc/common/ascii-diagram-standards.md:19 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md031.md
+---------------------------------------------------------------+
| Component Name |
| Description text here |
+---------------------------------------------------------------+
```

❌ WRONG (inconsistent widths):
```

Check failure on line 27 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Fenced code blocks should have a language specified

build/skills/aidlc/common/ascii-diagram-standards.md:27 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md040.md

Check failure on line 27 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Fenced code blocks should be surrounded by blank lines

build/skills/aidlc/common/ascii-diagram-standards.md:27 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md031.md
+---------------------------------------------------------------+
| Component Name |
| Description text here |
+---------------------------------------------------------------+
```

### Box Pattern

Check failure on line 34 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Headings should be surrounded by blank lines

build/skills/aidlc/common/ascii-diagram-standards.md:34 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### Box Pattern"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md022.md
```

Check failure on line 35 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Fenced code blocks should have a language specified

build/skills/aidlc/common/ascii-diagram-standards.md:35 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md040.md

Check failure on line 35 in build/skills/aidlc/common/ascii-diagram-standards.md

View workflow job for this annotation

GitHub Actions / Markdown Lint

Fenced code blocks should be surrounded by blank lines

build/skills/aidlc/common/ascii-diagram-standards.md:35 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md031.md
+-----------------------------------------------------+
| |
| 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 build/skills/aidlc/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
73 changes: 73 additions & 0 deletions build/skills/aidlc/common/depth-levels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Adaptive Depth

**Purpose**: Explain how AI-DLC adapts detail level to problem complexity

## Core Principle

**When a stage executes, ALL its defined artifacts are created. The "depth" refers to the level of detail and rigor within those artifacts, which adapts to the problem's complexity.**

## Stage Selection vs Detail Level

### Stage Selection (Binary)
- **Workflow Planning** decides: EXECUTE or SKIP for each stage
- **If EXECUTE**: Stage runs and creates ALL its defined artifacts
- **If SKIP**: Stage doesn't run at all

### Detail Level (Adaptive)
- **Simple problems**: Concise artifacts with essential detail
- **Complex problems**: Comprehensive artifacts with extensive detail
- **Model decides**: Based on problem characteristics, not prescriptive rules

## Factors Influencing Detail Level

The model considers these factors when determining appropriate detail:

1. **Request Clarity**: How clear and complete is the user's request?
2. **Problem Complexity**: How intricate is the solution space?
3. **Scope**: Single file, component, multiple components, or system-wide?
4. **Risk Level**: What's the impact of errors or omissions?
5. **Available Context**: Greenfield vs brownfield, existing documentation
6. **User Preferences**: Has user expressed preference for brevity or detail?

## Example: Requirements Analysis Artifacts

**All scenarios create the same artifacts**:
- `requirement-verification-questions.md` (if needed)
- `requirements.md`

**Note**: User's initial request is captured in `audit.md` (no separate user-intent.md needed)

**Detail level varies by complexity**:

### Simple Scenario (Bug Fix)
- **requirement-verification-questions.md**: necessary clarifying questions
- **requirements.md**: Concise functional requirement, minimal sections

### Complex Scenario (System Migration)
- **requirement-verification-questions.md**: Multiple rounds, 10+ questions
- **requirements.md**: Comprehensive functional + non-functional requirements, traceability, acceptance criteria

## Example: Application Design Artifacts

**All scenarios create the same artifacts**:
- `application-design.md`
- `component-diagram.md`

**Detail level varies by complexity**:

### Simple Scenario (Single Component)
- **application-design.md**: Basic component description, key methods
- **component-diagram.md**: Simple diagram with essential relationships

### Complex Scenario (Multi-Component System)
- **application-design.md**: Detailed component responsibilities, all methods with signatures, design patterns, alternatives considered
- **component-diagram.md**: Comprehensive diagram with all relationships, data flows, integration points

## Guiding Principle for Model

**"Create exactly the detail needed for the problem at hand - no more, no less."**

- Don't artificially inflate simple problems with unnecessary detail
- Don't shortchange complex problems by omitting critical detail
- Let problem characteristics drive detail level naturally
- All required artifacts are always created when stage executes
Loading
Loading