@rasensio/aidlc-content 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/capabilities/claude-code.yaml +9 -0
  3. package/capabilities/codex.yaml +8 -0
  4. package/capabilities/cursor.yaml +8 -0
  5. package/capabilities/kiro.yaml +9 -0
  6. package/capabilities/windsurf.yaml +8 -0
  7. package/dist/capabilities.d.ts +4 -0
  8. package/dist/capabilities.d.ts.map +1 -0
  9. package/dist/capabilities.js +23 -0
  10. package/dist/capabilities.js.map +1 -0
  11. package/dist/guidance.d.ts +3 -0
  12. package/dist/guidance.d.ts.map +1 -0
  13. package/dist/guidance.js +21 -0
  14. package/dist/guidance.js.map +1 -0
  15. package/dist/index.d.ts +7 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +6 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/phases.d.ts +4 -0
  20. package/dist/phases.d.ts.map +1 -0
  21. package/dist/phases.js +34 -0
  22. package/dist/phases.js.map +1 -0
  23. package/dist/skills.d.ts +4 -0
  24. package/dist/skills.d.ts.map +1 -0
  25. package/dist/skills.js +40 -0
  26. package/dist/skills.js.map +1 -0
  27. package/dist/templates.d.ts +4 -0
  28. package/dist/templates.d.ts.map +1 -0
  29. package/dist/templates.js +29 -0
  30. package/dist/templates.js.map +1 -0
  31. package/dist/types.d.ts +31 -0
  32. package/dist/types.d.ts.map +1 -0
  33. package/dist/types.js +2 -0
  34. package/dist/types.js.map +1 -0
  35. package/guidance/accessibility.md +67 -0
  36. package/guidance/api-conventions.md +124 -0
  37. package/guidance/index.yaml +7 -0
  38. package/guidance/secure-defaults.md +71 -0
  39. package/package.json +39 -0
  40. package/phases/.gitkeep +0 -0
  41. package/skills/00-overview.md +74 -0
  42. package/skills/01-getting-started.md +131 -0
  43. package/skills/02-first-activation.md +158 -0
  44. package/skills/10-ideation.md +45 -0
  45. package/skills/20-requirements.md +54 -0
  46. package/skills/30-design.md +57 -0
  47. package/skills/40-implementation.md +64 -0
  48. package/skills/50-testing.md +60 -0
  49. package/skills/60-deployment.md +63 -0
  50. package/skills/70-maintenance.md +56 -0
  51. package/skills/80-review.md +85 -0
  52. package/skills/81-continue.md +57 -0
  53. package/skills/82-add-action.md +71 -0
  54. package/templates/.gitkeep +0 -0
  55. package/templates/bugfix.yaml +14 -0
  56. package/templates/full-feature.yaml +44 -0
  57. package/templates/micro-task.yaml +11 -0
  58. package/templates/quick-feature.yaml +20 -0
  59. package/templates/spike.yaml +15 -0
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@rasensio/aidlc-content",
3
+ "version": "0.6.0",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.js",
10
+ "types": "./dist/index.d.ts"
11
+ },
12
+ "./package.json": "./package.json"
13
+ },
14
+ "files": [
15
+ "dist/",
16
+ "skills/",
17
+ "templates/",
18
+ "guidance/",
19
+ "capabilities/",
20
+ "phases/"
21
+ ],
22
+ "engines": {
23
+ "node": ">=18.0.0"
24
+ },
25
+ "license": "MIT",
26
+ "dependencies": {
27
+ "yaml": "^2.9.0"
28
+ },
29
+ "devDependencies": {
30
+ "@types/node": "^20.19.43",
31
+ "fast-check": "^3.23.2",
32
+ "typescript": "^5.8.3",
33
+ "vitest": "^3.1.3"
34
+ },
35
+ "scripts": {
36
+ "build": "tsc",
37
+ "test": "vitest run"
38
+ }
39
+ }
File without changes
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: aidlc-overview
3
+ description: Framework overview and state protocol for the AI Development Lifecycle
4
+ phase: ideation
5
+ priority: 100
6
+ ---
7
+ # AIDLC Framework Overview
8
+
9
+ You are operating within the AI Development Lifecycle (AIDLC) framework. This skill defines how you interact with lifecycle state and follow phase-driven development.
10
+
11
+ ## Lifecycle Phases
12
+
13
+ The AIDLC defines seven ordered phases. Not all apply to every task:
14
+
15
+ 1. **Ideation** — Problem exploration, goals, constraints
16
+ 2. **Requirements** — Acceptance criteria, user stories, scope
17
+ 3. **Design** — Architecture, interfaces, data flow
18
+ 4. **Implementation** — Code production following the design
19
+ 5. **Testing** — Verification against requirements
20
+ 6. **Deployment** — Release preparation and execution
21
+ 7. **Maintenance** — Monitoring, iteration, documentation updates
22
+
23
+ ## Cycle Scopes
24
+
25
+ | Scope | Starting Phase | Applicable Phases |
26
+ |-------|---------------|-------------------|
27
+ | Full | Ideation | All seven phases |
28
+ | Standard | Requirements | Requirements through Deployment |
29
+ | Micro | Implementation | Implementation and Testing only |
30
+
31
+ ## State Protocol
32
+
33
+ All state lives in `.aidlc/state/<instance-name>/`. Read and write state as follows:
34
+
35
+ ### Reading State
36
+
37
+ 1. Read `instance.yaml` to determine: current phase, template, scope, owner, claim
38
+ 2. Read `phase-<name>.yaml` for per-phase status and artifact completion
39
+ 3. Read `transitions.log` (NDJSON) for history — one JSON object per line
40
+
41
+ ### Writing State
42
+
43
+ 1. **Before mutating state**, check for an existing Instance_Claim in `instance.yaml`. If another session holds the claim and it is not stale, warn and request override confirmation.
44
+ 2. Record your session identifier in the claim fields when you begin work.
45
+ 3. Update phase state files as you produce artifacts.
46
+ 4. Append a transition record to `transitions.log` only on successful phase transitions.
47
+
48
+ ### Transition Records
49
+
50
+ Each line in `transitions.log` is a JSON object:
51
+ ```json
52
+ {"timestamp":"<ISO 8601 UTC>","author":"<session-id>","from":"<phase>","to":"<phase>","type":"normal|skip|upgrade","criteria":["..."]}
53
+ ```
54
+
55
+ ## Context and Guidance
56
+
57
+ - Project context lives in `.aidlc/context/` (style-guide.md, architecture.md)
58
+ - Guidance layers live in `.aidlc/guidance/` — load only those listed in `index.yaml`
59
+ - Load context relevant to the current phase; avoid re-reading unchanged files
60
+
61
+ ## Security
62
+
63
+ Before executing any sensitive operation (infrastructure changes, permission modifications, file deletions), you MUST:
64
+ 1. Describe the operation and its impact to the user
65
+ 2. Wait for explicit confirmation
66
+ 3. If cancelled, halt and log the cancellation
67
+
68
+ Never store credentials, tokens, or secrets in state files or artifacts.
69
+
70
+ ## Token Efficiency
71
+
72
+ - Read compact state files, not full artifacts, to determine progress
73
+ - Use Artifact_Summaries (`<artifact>.summary.md`) when available
74
+ - Load only the skill for the current phase, not all skills at once
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: aidlc-getting-started
3
+ description: Helps users get started with AIDLC — responds to onboarding questions, suggests templates, and guides first steps
4
+ phase: ideation
5
+ priority: 95
6
+ trigger: When the user asks how to get started, how to use the framework, or asks about fixing bugs, adding features, or beginning work
7
+ ---
8
+ # Getting Started with AIDLC
9
+
10
+ ## Pre-condition: First Activation
11
+
12
+ Before responding with this skill, check whether `.aidlc/context/` exists and contains at least one `.md` file. If it does NOT, defer to the **aidlc-first-activation** skill instead — it will scan the project, build context docs, and then hand control back to the user's original request. Do not proceed with getting-started guidance until first-activation has completed.
13
+
14
+ ## When to Activate
15
+
16
+ Respond using this skill when the user asks any of the following:
17
+ - "How do I get started?"
18
+ - "How do I fix a bug?"
19
+ - "How do I add a feature?"
20
+ - "What should I do first?"
21
+ - "How does this lifecycle thing work?"
22
+ - "What template should I use?"
23
+ - "Help me start working on X"
24
+
25
+ ## Quick Answers
26
+
27
+ ### "How do I fix a bug?"
28
+
29
+ 1. Start a bugfix lifecycle instance:
30
+ ```
31
+ aidlc start bugfix --name <short-description>
32
+ ```
33
+ 2. This creates a focused workflow: reproduce the bug → fix it → test it → deploy.
34
+ 3. Run `aidlc continue <name>` to see what step to do next.
35
+ 4. The bugfix template skips the design phase and requires a `reproduction.md` artifact first.
36
+
37
+ ### "How do I add a feature?"
38
+
39
+ For a small, well-defined feature:
40
+ ```
41
+ aidlc start quick-feature --name <feature-name>
42
+ ```
43
+
44
+ For a larger feature needing design and review:
45
+ ```
46
+ aidlc start full-feature --name <feature-name>
47
+ ```
48
+
49
+ For something tiny (just code + test):
50
+ ```
51
+ aidlc start micro-task --name <task-name>
52
+ ```
53
+
54
+ ### "How do I explore an idea or do research?"
55
+
56
+ ```
57
+ aidlc start spike --name <research-topic>
58
+ ```
59
+ This gives you Ideation + Requirements phases only — no implementation pressure.
60
+
61
+ ### "What should I do next?"
62
+
63
+ Run:
64
+ ```
65
+ aidlc continue
66
+ ```
67
+ This tells you exactly which artifact to produce or which phase to enter next.
68
+
69
+ ### "How do I check progress?"
70
+
71
+ ```
72
+ aidlc status
73
+ ```
74
+ Shows all active lifecycle instances with completion %, current phase, and stall detection.
75
+
76
+ ### "How does the lifecycle work?"
77
+
78
+ AIDLC guides your work through phases:
79
+
80
+ 1. **Ideation** — What are we building and why?
81
+ 2. **Requirements** — What are the acceptance criteria?
82
+ 3. **Design** — How will we build it?
83
+ 4. **Implementation** — Write the code
84
+ 5. **Testing** — Verify it works
85
+ 6. **Deployment** — Ship it
86
+ 7. **Maintenance** — Keep it running
87
+
88
+ Not every task needs all phases. The templates handle this:
89
+ - **micro-task** → Implementation + Testing only
90
+ - **quick-feature** → Requirements through Deployment
91
+ - **full-feature** → All 7 phases with review gates
92
+ - **bugfix** → Requirements (reproduction) + Implementation + Testing + Deployment
93
+ - **spike** → Ideation + Requirements (research) only
94
+
95
+ ### "How do I set up AIDLC in this project?"
96
+
97
+ If AIDLC is already installed (you can see `.aidlc/skills/` in the project), just start using it:
98
+ ```
99
+ aidlc start <template>
100
+ ```
101
+
102
+ If not installed yet:
103
+ ```
104
+ aidlc setup
105
+ ```
106
+ This runs an interactive wizard that configures the framework for your project.
107
+
108
+ ## Choosing the Right Template
109
+
110
+ | You want to... | Use this template | Scope |
111
+ |---------------|-------------------|-------|
112
+ | Fix a bug | `bugfix` | Standard (no design) |
113
+ | Add a small feature | `quick-feature` | Standard |
114
+ | Build something complex | `full-feature` | Full (with review gates) |
115
+ | Just write code + test | `micro-task` | Micro |
116
+ | Research / explore | `spike` | Ideation + Requirements |
117
+
118
+ ## After Starting
119
+
120
+ Once you've started an instance, the framework tracks your progress. At any point:
121
+ - `aidlc continue` — what to do next
122
+ - `aidlc status` — overall progress
123
+ - `aidlc gate <instance> <phase>` — check if a phase is complete
124
+ - `aidlc transition <instance>` — advance to the next phase
125
+
126
+ ## State Location
127
+
128
+ All lifecycle state lives in `.aidlc/state/<instance-name>/`. It's just YAML files — you can read them directly if needed. The key files are:
129
+ - `instance.yaml` — which template, scope, and current phase
130
+ - `phase-<name>.yaml` — artifact completion for each phase
131
+ - `transitions.log` — history of phase transitions
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: aidlc-first-activation
3
+ description: Auto-discovers a brownfield project on first activation — scans codebase, asks about extra context folders, writes context docs
4
+ phase: ideation
5
+ priority: 98
6
+ trigger: When AIDLC is installed but `.aidlc/context/` does not exist or contains no files
7
+ ---
8
+ # First Activation — Project Discovery
9
+
10
+ ## Purpose
11
+
12
+ When AIDLC is freshly installed in an existing (brownfield) project, this skill runs once to build project context automatically. It replaces the need for the user to run `aidlc discover` from the terminal.
13
+
14
+ ## Activation Condition
15
+
16
+ Activate this skill **before any other AIDLC skill** when ALL of the following are true:
17
+
18
+ 1. AIDLC skills are installed (`.aidlc/skills/` exists)
19
+ 2. The context directory is missing or empty (`.aidlc/context/` does not exist, or contains no `.md` files)
20
+ 3. The user has just sent a message (any message — they may be asking to fix a bug, add a feature, etc.)
21
+
22
+ If `.aidlc/context/` already contains at least one `.md` file, skip this skill entirely and proceed with the user's request using the appropriate skill.
23
+
24
+ ## Behavior
25
+
26
+ ### Step 1: Acknowledge and Scan
27
+
28
+ Tell the user briefly that you're indexing the project for the first time. Keep it short — don't block them with a wall of text.
29
+
30
+ Example: *"First time here — let me scan the project quickly so I have context."*
31
+
32
+ Then perform a lightweight scan:
33
+
34
+ 1. **Read manifest files** at the project root: `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `pom.xml`, `build.gradle`, `Gemfile`, or equivalent.
35
+ 2. **List top-level directories** to understand the project structure.
36
+ 3. **Sample 3-5 source files** from the primary source directory to detect:
37
+ - Indentation style (tabs, 2-space, 4-space)
38
+ - Naming convention (camelCase, snake_case, PascalCase)
39
+ - Import style (grouped vs ungrouped)
40
+ 4. **Identify the tech stack**: language(s), frameworks, test runner, build tool, linter.
41
+
42
+ ### Step 2: Ask About Extra Context Folders
43
+
44
+ After scanning, ask the user:
45
+
46
+ > "I've got the basics — [summarize: language, framework, structure in one line].
47
+ >
48
+ > Beyond the source code, are there any folders I should be aware of for ongoing context? For example: specs, roadmap, architecture decisions, API schemas, design docs, etc."
49
+
50
+ Wait for the user's answer. Common examples:
51
+ - `specs/`, `docs/`, `roadmap/`, `architecture/`, `adr/`, `design/`, `api/`
52
+ - The user might also point to specific files like `ARCHITECTURE.md` or `openapi.yaml`
53
+
54
+ If the user says "no" or "that's it," proceed without extra folders.
55
+
56
+ ### Step 3: Read Extra Context
57
+
58
+ For each folder or file the user mentions:
59
+ 1. List its contents (non-recursive, top level only for folders)
60
+ 2. Read key files (prefer: index files, READMEs, YAML/JSON schemas, markdown docs)
61
+ 3. Summarize what you found — don't copy entire documents verbatim
62
+
63
+ Cap this step: read at most 10 files total from extra context folders. If there's more, note what was skipped and tell the user they can point you at specific files later.
64
+
65
+ ### Step 4: Write Context Documents
66
+
67
+ Create `.aidlc/context/` and write:
68
+
69
+ #### `style-guide.md`
70
+ ```markdown
71
+ ---
72
+ generated_by: aidlc-first-activation
73
+ generated_at: <ISO 8601 UTC>
74
+ ---
75
+ # Style Guide
76
+
77
+ ## Languages
78
+ <table of languages with approximate file counts>
79
+
80
+ ## Conventions
81
+ - Indentation: <detected>
82
+ - Naming: <detected>
83
+ - Import style: <detected>
84
+
85
+ ## Frameworks & Tools
86
+ <list of detected frameworks, test runners, build tools>
87
+ ```
88
+
89
+ #### `architecture.md`
90
+ ```markdown
91
+ ---
92
+ generated_by: aidlc-first-activation
93
+ generated_at: <ISO 8601 UTC>
94
+ ---
95
+ # Architecture Overview
96
+
97
+ ## Tech Stack
98
+ <primary languages and frameworks>
99
+
100
+ ## Directory Structure
101
+ <role mapping of top-level directories>
102
+
103
+ ## Entry Points
104
+ <detected entry points>
105
+
106
+ ## Configuration
107
+ <config approach: env vars, YAML, etc.>
108
+ ```
109
+
110
+ #### `project-knowledge.md` (only if the user provided extra folders)
111
+ ```markdown
112
+ ---
113
+ generated_by: aidlc-first-activation
114
+ generated_at: <ISO 8601 UTC>
115
+ source_paths:
116
+ - <path1>
117
+ - <path2>
118
+ ---
119
+ # Project Knowledge
120
+
121
+ ## Sources
122
+ <list of folders/files the user pointed to>
123
+
124
+ ## Summary
125
+
126
+ ### <Folder/File 1 Name>
127
+ <2-5 sentence summary of what's in there and what's relevant>
128
+
129
+ ### <Folder/File 2 Name>
130
+ <2-5 sentence summary>
131
+
132
+ ## Key References
133
+ <specific files worth reading in full when working on related areas>
134
+ ```
135
+
136
+ ### Step 5: Confirm and Continue
137
+
138
+ After writing the context docs, briefly confirm:
139
+
140
+ > "Done — indexed the project. Context saved to `.aidlc/context/`. Now, back to your request..."
141
+
142
+ Then **immediately proceed** with whatever the user originally asked. Do not make them repeat themselves. Their original message is still the active task — discovery was a transparent preamble.
143
+
144
+ ## Important Notes
145
+
146
+ - **This skill runs exactly once per project.** After context docs are written, it never triggers again.
147
+ - **Don't over-scan.** This is a lightweight pass, not a full AST analysis. 3-5 sampled files is enough for style detection.
148
+ - **Don't block the user.** The scan should feel like a 10-second preamble, not a separate workflow. If the project is huge, just scan what you can quickly and note gaps.
149
+ - **Respect .gitignore patterns.** Don't scan `node_modules/`, `dist/`, `build/`, `.git/`, etc.
150
+ - **Extra context is optional.** If the user says "nah, just the code" — that's fine. Skip `project-knowledge.md`.
151
+ - **The user's original request takes priority.** Discovery enables better answers but must not derail the conversation.
152
+
153
+ ## Exit Criteria
154
+
155
+ - `.aidlc/context/style-guide.md` exists with detected conventions
156
+ - `.aidlc/context/architecture.md` exists with structure overview
157
+ - `.aidlc/context/project-knowledge.md` exists (if extra folders were provided)
158
+ - The user's original request is being addressed (not abandoned)
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: aidlc-ideation
3
+ description: Guides the Ideation phase — exploring the problem space, defining goals and constraints
4
+ phase: ideation
5
+ priority: 50
6
+ ---
7
+ # Ideation Phase
8
+
9
+ ## Purpose
10
+
11
+ Explore the problem space before committing to a solution. Define what we are building, why, and what constraints exist.
12
+
13
+ ## Entry Criteria
14
+
15
+ - A lifecycle instance has been created with a Full scope
16
+ - The instance is claimed by this session
17
+
18
+ ## Required Artifacts
19
+
20
+ - `ideation.md` — Problem statement, goals, constraints, initial ideas, and open questions
21
+
22
+ ## Instructions
23
+
24
+ 1. **Clarify the problem.** Ask the user what they want to build and why. Identify the core need vs. nice-to-haves.
25
+ 2. **Explore constraints.** Document: timeline, technical constraints, platform limitations, team size, budget considerations.
26
+ 3. **Generate options.** Propose 2-3 approaches. For each, note trade-offs (complexity, time, risk).
27
+ 4. **Identify unknowns.** List open questions that need answers before requirements can be written.
28
+ 5. **Summarize.** Write `ideation.md` with sections: Problem Statement, Goals, Constraints, Explored Options, Open Questions.
29
+
30
+ ## Exit Criteria
31
+
32
+ - `ideation.md` exists and contains at minimum a problem statement and one defined goal
33
+ - The user has confirmed the direction (which option to pursue or a synthesis)
34
+
35
+ ## Guidance
36
+
37
+ {{guidance:secure-defaults}}
38
+
39
+ ## Security Confirmation
40
+
41
+ If any ideation option involves sensitive operations (new credentials, infrastructure provisioning, access control changes), flag it explicitly and note that confirmation will be required before execution in later phases.
42
+
43
+ ## Completion
44
+
45
+ When exit criteria are met, update `phase-ideation.yaml` status to `complete` and append a transition record to `transitions.log`.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: aidlc-requirements
3
+ description: Guides the Requirements phase — defining acceptance criteria and user stories
4
+ phase: requirements
5
+ priority: 50
6
+ ---
7
+ # Requirements Phase
8
+
9
+ ## Purpose
10
+
11
+ Translate the ideation output (or the user's direct request) into precise, testable acceptance criteria.
12
+
13
+ ## Entry Criteria
14
+
15
+ - Ideation phase complete (Full scope) OR instance created with Standard scope
16
+ - The instance is claimed by this session
17
+
18
+ ## Required Artifacts
19
+
20
+ - `requirements.md` — User stories, acceptance criteria, scope boundaries, non-functional requirements
21
+
22
+ ## Instructions
23
+
24
+ 1. **Gather requirements.** If a Full scope, read `ideation.md` for context. Otherwise, ask the user to describe desired behavior.
25
+ 2. **Write user stories.** Use the format: "As a [role], I want [capability], so that [benefit]."
26
+ 3. **Define acceptance criteria.** Each criterion must be:
27
+ - Specific and unambiguous
28
+ - Testable (an observable outcome)
29
+ - Independent (not relying on unstated assumptions)
30
+ 4. **Set scope boundaries.** Explicitly state what is NOT included.
31
+ 5. **Non-functional requirements.** Address performance, security, accessibility, and compatibility where relevant.
32
+ 6. **For complex input**: If requirements are extensive, create an Input_File at `.aidlc/inbox/requirements-input.md` with structured sections for the user to fill in, rather than asking many sequential questions.
33
+
34
+ ## Exit Criteria
35
+
36
+ - `requirements.md` exists with at least one user story and corresponding acceptance criteria
37
+ - Each acceptance criterion is testable (has an observable pass/fail condition)
38
+ - The user has confirmed the requirements are complete for the chosen scope
39
+
40
+ ## Guidance
41
+
42
+ {{context:style-guide}}
43
+ {{guidance:secure-defaults}}
44
+
45
+ ## Security Confirmation
46
+
47
+ If requirements reference sensitive data handling, authentication flows, or access control:
48
+ 1. Explicitly document the security requirements as acceptance criteria
49
+ 2. Flag that a security review will be needed before deployment
50
+ 3. Never embed credentials or secrets in requirement examples
51
+
52
+ ## Completion
53
+
54
+ When exit criteria are met, update `phase-requirements.yaml` status to `complete` and append a transition record to `transitions.log`.
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: aidlc-design
3
+ description: Guides the Design phase — architecture decisions, interfaces, and data flow
4
+ phase: design
5
+ priority: 50
6
+ ---
7
+ # Design Phase
8
+
9
+ ## Purpose
10
+
11
+ Produce a technical design that satisfies the requirements. Define architecture, interfaces, data models, and integration points before writing code.
12
+
13
+ ## Entry Criteria
14
+
15
+ - Requirements phase complete
16
+ - The instance is claimed by this session
17
+
18
+ ## Required Artifacts
19
+
20
+ - `design.md` — Architecture overview, component design, interfaces, data flow, and design decisions with rationale
21
+
22
+ ## Instructions
23
+
24
+ 1. **Review requirements.** Read `requirements.md` (or its summary if one exists). Identify the key technical challenges.
25
+ 2. **Define architecture.** Describe the high-level structure: components, their responsibilities, and how they communicate.
26
+ 3. **Specify interfaces.** For each component boundary, define the contract (function signatures, API shapes, data types).
27
+ 4. **Data flow.** Document how data moves through the system — inputs, transformations, storage, outputs.
28
+ 5. **Design decisions.** Record each significant decision with rationale and alternatives considered.
29
+ 6. **Address non-functional concerns.** Map performance, security, and accessibility requirements to design choices.
30
+ 7. **Identify risks.** Note technical risks and mitigation strategies.
31
+
32
+ ## Exit Criteria
33
+
34
+ - `design.md` exists with architecture, interfaces, and at least one design decision with rationale
35
+ - The design addresses all acceptance criteria from `requirements.md`
36
+ - The user has confirmed the design direction
37
+
38
+ ## Guidance
39
+
40
+ {{context:architecture}}
41
+ {{context:style-guide}}
42
+ {{guidance:secure-defaults}}
43
+ {{guidance:accessibility}}
44
+
45
+ ## Security Confirmation
46
+
47
+ If the design involves:
48
+ - New authentication or authorization flows
49
+ - Data storage of sensitive information
50
+ - External service integrations with credentials
51
+ - Infrastructure provisioning
52
+
53
+ You MUST flag these explicitly in the design document and note that implementation will require security confirmation before proceeding.
54
+
55
+ ## Completion
56
+
57
+ When exit criteria are met, update `phase-design.yaml` status to `complete` and append a transition record to `transitions.log`.
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: aidlc-implementation
3
+ description: Guides the Implementation phase — writing code following the design and project conventions
4
+ phase: implementation
5
+ priority: 50
6
+ ---
7
+ # Implementation Phase
8
+
9
+ ## Purpose
10
+
11
+ Produce working code that satisfies the design and requirements. Follow project conventions discovered in context docs.
12
+
13
+ ## Entry Criteria
14
+
15
+ - Design phase complete (Full/Standard scope) OR instance created with Micro scope (task description + criteria exist)
16
+ - The instance is claimed by this session
17
+
18
+ ## Required Artifacts
19
+
20
+ - Source code changes implementing the feature or fix
21
+ - Updated or new tests (handed off to Testing phase for verification)
22
+
23
+ ## Instructions
24
+
25
+ 1. **Load context.** Read `.aidlc/context/style-guide.md` and `.aidlc/context/architecture.md` if they exist. Match the project's established patterns.
26
+ 2. **Load guidance.** Read all active Guidance_Layers from `.aidlc/guidance/index.yaml`. Apply their rules during implementation.
27
+ 3. **Plan the work.** Break the implementation into discrete steps. For Micro scope, reference the task description and acceptance criteria directly.
28
+ 4. **Write code.** Follow the design interfaces. Match existing code style (naming, formatting, error handling patterns).
29
+ 5. **Handle sensitive operations.** Before executing any of the following, describe the action and wait for explicit user confirmation:
30
+ - File deletions or destructive operations
31
+ - Infrastructure changes (provisioning, configuration)
32
+ - Permission or access control modifications
33
+ - Credential or secret handling
34
+ 6. **Commit incrementally.** Produce working code at each step; avoid large uncommittable diffs.
35
+ 7. **Update state.** As implementation artifacts are produced, mark them in `phase-implementation.yaml`.
36
+
37
+ ## Exit Criteria
38
+
39
+ - All acceptance criteria from requirements are addressed in code
40
+ - Code follows project style (naming, formatting, patterns from context docs)
41
+ - No unresolved TODOs or placeholder implementations remain for required functionality
42
+ - Guidance layer rules have been applied (security defaults, accessibility, API conventions)
43
+
44
+ ## Guidance
45
+
46
+ {{context:style-guide}}
47
+ {{context:architecture}}
48
+ {{guidance:secure-defaults}}
49
+ {{guidance:accessibility}}
50
+ {{guidance:api-conventions}}
51
+
52
+ ## Security Confirmation
53
+
54
+ Before proceeding with any sensitive operation during implementation:
55
+ 1. Describe what the operation does and what it affects
56
+ 2. State whether it is reversible
57
+ 3. Wait for explicit user acknowledgment
58
+ 4. If the user cancels, halt execution and log the cancellation with a timestamp in state
59
+
60
+ Never store credentials, API keys, tokens, or passwords in source code or state files. Use placeholder syntax for secrets (e.g., `${SECRET_NAME}`).
61
+
62
+ ## Completion
63
+
64
+ When exit criteria are met, update `phase-implementation.yaml` status to `complete` and append a transition record to `transitions.log`.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: aidlc-testing
3
+ description: Guides the Testing phase — verifying implementation against requirements
4
+ phase: testing
5
+ priority: 50
6
+ ---
7
+ # Testing Phase
8
+
9
+ ## Purpose
10
+
11
+ Verify that the implementation satisfies all acceptance criteria. Produce evidence of correctness through automated tests and manual verification where needed.
12
+
13
+ ## Entry Criteria
14
+
15
+ - Implementation phase complete
16
+ - The instance is claimed by this session
17
+
18
+ ## Required Artifacts
19
+
20
+ - Test files covering acceptance criteria
21
+ - `testing.md` — Test plan, results summary, and coverage notes
22
+
23
+ ## Instructions
24
+
25
+ 1. **Review acceptance criteria.** Read `requirements.md` (or task description for Micro scope). Each criterion needs at least one test.
26
+ 2. **Write automated tests.** Follow the project's existing test patterns:
27
+ - Unit tests for pure logic and edge cases
28
+ - Integration tests for component interactions
29
+ - Property-based tests where inputs have broad domains
30
+ 3. **Run tests.** Execute the project's test suite. All new tests must pass.
31
+ 4. **Document results.** Write `testing.md` with:
32
+ - Test plan (what was tested and why)
33
+ - Results (pass/fail counts, any notable findings)
34
+ - Coverage notes (which criteria are covered, any gaps)
35
+ 5. **Address failures.** If tests reveal bugs, fix the implementation. Do not skip or weaken tests to force a pass.
36
+
37
+ ## Exit Criteria
38
+
39
+ - All acceptance criteria have corresponding test coverage
40
+ - All tests pass
41
+ - `testing.md` exists with results summary
42
+ - No critical bugs remain open
43
+
44
+ ## Guidance
45
+
46
+ {{context:style-guide}}
47
+ {{guidance:secure-defaults}}
48
+
49
+ ## Security Confirmation
50
+
51
+ If testing requires:
52
+ - Access to production-like environments
53
+ - Use of real credentials or sensitive data
54
+ - Execution of destructive operations (even in test environments)
55
+
56
+ You MUST describe the action, confirm it targets a safe environment, and wait for user acknowledgment before proceeding.
57
+
58
+ ## Completion
59
+
60
+ When exit criteria are met, update `phase-testing.yaml` status to `complete` and append a transition record to `transitions.log`.