@delete101020/aidlc 4.0.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.
- package/AUTOMATION.md +148 -0
- package/README.md +684 -0
- package/dist/assets/annotate-artifact.skill.md +121 -0
- package/dist/assets/epic-context.skill.md +55 -0
- package/dist/bundle.js +49470 -0
- package/dist/templates/ainative/agents/native-engineer.md +66 -0
- package/dist/templates/ainative/agents/native-operator.md +71 -0
- package/dist/templates/ainative/agents/native-originator.md +56 -0
- package/dist/templates/ainative/agents/native-product-owner.md +68 -0
- package/dist/templates/ainative/agents/native-reviewer.md +65 -0
- package/dist/templates/ainative/agents/native-verifier.md +58 -0
- package/dist/templates/ainative/artifacts/build-plan.md +56 -0
- package/dist/templates/ainative/artifacts/implement.md +55 -0
- package/dist/templates/ainative/artifacts/intent.md +50 -0
- package/dist/templates/ainative/artifacts/maintain.md +85 -0
- package/dist/templates/ainative/artifacts/review.md +68 -0
- package/dist/templates/ainative/artifacts/spec.md +69 -0
- package/dist/templates/ainative/artifacts/verify.md +55 -0
- package/dist/templates/ainative/skills/native-build-plan.md +74 -0
- package/dist/templates/ainative/skills/native-implement.md +62 -0
- package/dist/templates/ainative/skills/native-intent.md +50 -0
- package/dist/templates/ainative/skills/native-maintain.md +94 -0
- package/dist/templates/ainative/skills/native-review.md +82 -0
- package/dist/templates/ainative/skills/native-spec.md +83 -0
- package/dist/templates/ainative/skills/native-verify.md +60 -0
- package/dist/templates/sdlc/agents/designer.md +87 -0
- package/dist/templates/sdlc/agents/developer.md +178 -0
- package/dist/templates/sdlc/agents/example-with-skills.md +59 -0
- package/dist/templates/sdlc/agents/orchestrator.md +186 -0
- package/dist/templates/sdlc/agents/po.md +115 -0
- package/dist/templates/sdlc/agents/qa.md +141 -0
- package/dist/templates/sdlc/agents/tech-lead.md +124 -0
- package/dist/templates/sdlc/artifacts/design.md +130 -0
- package/dist/templates/sdlc/artifacts/execute-test.md +64 -0
- package/dist/templates/sdlc/artifacts/implement.backend.md +96 -0
- package/dist/templates/sdlc/artifacts/implement.md +70 -0
- package/dist/templates/sdlc/artifacts/implement.web-react.md +109 -0
- package/dist/templates/sdlc/artifacts/implement.web.md +99 -0
- package/dist/templates/sdlc/artifacts/plan.md +97 -0
- package/dist/templates/sdlc/artifacts/prototype.md +141 -0
- package/dist/templates/sdlc/artifacts/test-cases.md +47 -0
- package/dist/templates/sdlc/artifacts/test-plan.md +100 -0
- package/dist/templates/sdlc/artifacts/unit-test.md +32 -0
- package/dist/templates/sdlc/profiles/agile-lite.yaml +29 -0
- package/dist/templates/sdlc/profiles/hybrid.yaml +43 -0
- package/dist/templates/sdlc/profiles/iso-ieee.yaml +67 -0
- package/dist/templates/sdlc/profiles/none.yaml +21 -0
- package/dist/templates/sdlc/skills/advance-epic.md +77 -0
- package/dist/templates/sdlc/skills/analyze-requirements.md +279 -0
- package/dist/templates/sdlc/skills/discovery-gate.md +118 -0
- package/dist/templates/sdlc/skills/execute-test.md +74 -0
- package/dist/templates/sdlc/skills/generate-test-cases.md +77 -0
- package/dist/templates/sdlc/skills/implement.md +74 -0
- package/dist/templates/sdlc/skills/prd.md +114 -0
- package/dist/templates/sdlc/skills/prototype.md +128 -0
- package/dist/templates/sdlc/skills/tech-design.md +134 -0
- package/dist/templates/sdlc/skills/test-plan.md +115 -0
- package/dist/templates/sdlc/skills/test-report.md +38 -0
- package/dist/templates/sdlc/skills/unit-test.md +43 -0
- package/dist/templates/sdlc/validators/ci.mjs +49 -0
- package/dist/templates/sdlc/validators/traceability.mjs +244 -0
- package/dist/templates/speckit/agents/analyst.md +42 -0
- package/dist/templates/speckit/agents/speckit-developer.md +36 -0
- package/dist/templates/speckit/agents/speckit-qa.md +38 -0
- package/dist/templates/speckit/agents/speckit-tech-lead.md +40 -0
- package/dist/templates/speckit/artifacts/analyze.md +48 -0
- package/dist/templates/speckit/artifacts/clarify.md +64 -0
- package/dist/templates/speckit/artifacts/plan.md +57 -0
- package/dist/templates/speckit/artifacts/specify.md +64 -0
- package/dist/templates/speckit/artifacts/tasks.md +33 -0
- package/dist/templates/speckit/skills/analyze.md +50 -0
- package/dist/templates/speckit/skills/clarify.md +31 -0
- package/dist/templates/speckit/skills/plan.md +56 -0
- package/dist/templates/speckit/skills/specify.md +52 -0
- package/dist/templates/speckit/skills/speckit-implement.md +33 -0
- package/dist/templates/speckit/skills/tasks.md +38 -0
- package/dist/tools/epic-memory-hook.mjs +78 -0
- package/dist/tools/epic-memory.mjs +130 -0
- package/dist/tools/md-to-html.mjs +478 -0
- package/dist/tools/vendor/marked.esm.mjs +2432 -0
- package/dist/vendor/annotron/LICENSE +21 -0
- package/dist/vendor/annotron/README.md +213 -0
- package/dist/vendor/annotron/bin/annotron +467 -0
- package/dist/vendor/annotron/commands/annotron.md +11 -0
- package/dist/vendor/annotron/hooks/annotron-hook.sh +38 -0
- package/dist/vendor/annotron/hooks/hooks.json +50 -0
- package/dist/vendor/annotron/package.json +72 -0
- package/dist/vendor/annotron/skills/annotron-review/SKILL.md +86 -0
- package/dist/vendor/annotron/src/chrome.html +2029 -0
- package/dist/vendor/annotron/src/mdRender.js +208 -0
- package/dist/vendor/annotron/src/sdk.js +1042 -0
- package/dist/vendor/annotron/src/server.js +780 -0
- package/package.json +60 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Analysis — [Feature Title]
|
|
2
|
+
|
|
3
|
+
**Epic ID:** `$EPIC_ID`
|
|
4
|
+
**Author:** QA
|
|
5
|
+
**Status:** Draft
|
|
6
|
+
**Created:** `$DATE`
|
|
7
|
+
**Cross-checks:** `SPEC.md` ↔ `PLAN.md` ↔ `TASKS.md`
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Coverage Matrix
|
|
12
|
+
|
|
13
|
+
| Requirement | PLAN section | TASKS task id(s) | Covered? |
|
|
14
|
+
|-------------|--------------|------------------|----------|
|
|
15
|
+
| `$EPIC_ID-FR01` | | | ✅ / ❌ |
|
|
16
|
+
| `$EPIC_ID-NFR01` | | | |
|
|
17
|
+
|
|
18
|
+
## 2. Gaps
|
|
19
|
+
|
|
20
|
+
> Requirements with no plan coverage or no task; acceptance criteria no task satisfies.
|
|
21
|
+
|
|
22
|
+
- …
|
|
23
|
+
|
|
24
|
+
## 3. Orphans (scope creep)
|
|
25
|
+
|
|
26
|
+
> Plan decisions or tasks with no upstream requirement.
|
|
27
|
+
|
|
28
|
+
- …
|
|
29
|
+
|
|
30
|
+
## 4. Contradictions
|
|
31
|
+
|
|
32
|
+
> Where any two of spec / plan / tasks disagree.
|
|
33
|
+
|
|
34
|
+
- …
|
|
35
|
+
|
|
36
|
+
## 5. Constitution Check
|
|
37
|
+
|
|
38
|
+
- …
|
|
39
|
+
|
|
40
|
+
## 6. Verdict
|
|
41
|
+
|
|
42
|
+
**GO** / **NO-GO**
|
|
43
|
+
|
|
44
|
+
> If NO-GO, list each blocking issue and which artifact owns the fix.
|
|
45
|
+
|
|
46
|
+
| Blocking issue | Owner artifact |
|
|
47
|
+
|----------------|----------------|
|
|
48
|
+
| | |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Spec — [Feature Title]
|
|
2
|
+
|
|
3
|
+
**Epic ID:** `$EPIC_ID`
|
|
4
|
+
**Author:** Analyst
|
|
5
|
+
**Status:** Draft
|
|
6
|
+
**Created:** `$DATE`
|
|
7
|
+
|
|
8
|
+
> Describe **what** and **why**, never **how**. No libraries, schemas, or
|
|
9
|
+
> frameworks in this document — those belong in PLAN.md.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Overview
|
|
14
|
+
|
|
15
|
+
> One paragraph: what this feature is and the user problem it solves.
|
|
16
|
+
|
|
17
|
+
## 2. User Scenarios
|
|
18
|
+
|
|
19
|
+
### Primary flow
|
|
20
|
+
- **Given** …
|
|
21
|
+
- **When** …
|
|
22
|
+
- **Then** …
|
|
23
|
+
|
|
24
|
+
### Edge & error paths
|
|
25
|
+
| Situation | Expected behavior |
|
|
26
|
+
|-----------|-------------------|
|
|
27
|
+
| Dependency unavailable | |
|
|
28
|
+
| Permission / access denied | |
|
|
29
|
+
| Session expired mid-flow | |
|
|
30
|
+
| Empty state | |
|
|
31
|
+
| Boundary input | |
|
|
32
|
+
| Interruption / recovery | |
|
|
33
|
+
|
|
34
|
+
## 3. Functional Requirements
|
|
35
|
+
|
|
36
|
+
| ID | Requirement | Priority (MoSCoW) |
|
|
37
|
+
|----|-------------|-------------------|
|
|
38
|
+
| `$EPIC_ID-FR01` | | Must |
|
|
39
|
+
| `$EPIC_ID-FR02` | | Should |
|
|
40
|
+
|
|
41
|
+
## 4. Non-Functional Requirements
|
|
42
|
+
|
|
43
|
+
| ID | Category | Requirement (quantified) |
|
|
44
|
+
|----|----------|--------------------------|
|
|
45
|
+
| `$EPIC_ID-NFR01` | Performance | p95 < … ms |
|
|
46
|
+
| `$EPIC_ID-NFR02` | Security / privacy | |
|
|
47
|
+
| `$EPIC_ID-NFR03` | Accessibility | WCAG 2.1 AA |
|
|
48
|
+
|
|
49
|
+
## 5. Acceptance Criteria
|
|
50
|
+
|
|
51
|
+
| ID | Given / When / Then |
|
|
52
|
+
|----|---------------------|
|
|
53
|
+
| `$EPIC_ID-AC01` | Given … When … Then … |
|
|
54
|
+
| `$EPIC_ID-AC02` | |
|
|
55
|
+
|
|
56
|
+
## 6. Out of Scope
|
|
57
|
+
|
|
58
|
+
- …
|
|
59
|
+
|
|
60
|
+
## 7. Clarifications
|
|
61
|
+
|
|
62
|
+
> Populated by the Clarify phase. Each entry: question → resolved answer → decided by.
|
|
63
|
+
|
|
64
|
+
_None yet — open items are marked `[NEEDS CLARIFICATION: …]` inline above._
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Plan — [Feature Title]
|
|
2
|
+
|
|
3
|
+
**Epic ID:** `$EPIC_ID`
|
|
4
|
+
**Author:** Tech Lead
|
|
5
|
+
**Status:** Draft
|
|
6
|
+
**Created:** `$DATE`
|
|
7
|
+
**Derived from:** `SPEC.md`
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Approach
|
|
12
|
+
|
|
13
|
+
> The overall technical strategy in a paragraph. Why this shape over the alternatives.
|
|
14
|
+
|
|
15
|
+
## 2. Architecture & Components
|
|
16
|
+
|
|
17
|
+
| Component | New / Modified | Responsibility | Interacts with |
|
|
18
|
+
|-----------|----------------|----------------|----------------|
|
|
19
|
+
| | | | |
|
|
20
|
+
|
|
21
|
+
## 3. Data Model
|
|
22
|
+
|
|
23
|
+
> Entities, fields, relationships, migrations. Omit if not applicable.
|
|
24
|
+
|
|
25
|
+
## 4. Contracts
|
|
26
|
+
|
|
27
|
+
> APIs / interfaces / events — signature, inputs, outputs, error behavior.
|
|
28
|
+
|
|
29
|
+
| Contract | Input | Output | Errors |
|
|
30
|
+
|----------|-------|--------|--------|
|
|
31
|
+
| | | | |
|
|
32
|
+
|
|
33
|
+
## 5. Constitution Check
|
|
34
|
+
|
|
35
|
+
> Every workspace-standard principle: satisfied / N/A / tension (+ mitigation).
|
|
36
|
+
|
|
37
|
+
| Principle | Status | Note |
|
|
38
|
+
|-----------|--------|------|
|
|
39
|
+
| | | |
|
|
40
|
+
|
|
41
|
+
## 6. File Impact
|
|
42
|
+
|
|
43
|
+
| Path | New / Modified / Removed | Note |
|
|
44
|
+
|------|--------------------------|------|
|
|
45
|
+
| | | |
|
|
46
|
+
|
|
47
|
+
## 7. Requirement Traceability
|
|
48
|
+
|
|
49
|
+
| Requirement | Plan section that implements it |
|
|
50
|
+
|-------------|--------------------------------|
|
|
51
|
+
| `$EPIC_ID-FR01` | |
|
|
52
|
+
| `$EPIC_ID-NFR01` | |
|
|
53
|
+
|
|
54
|
+
## 8. Risks & Open Decisions
|
|
55
|
+
|
|
56
|
+
- **Risk:** … — mitigation …
|
|
57
|
+
- **Decision deferred to implementation:** …
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Spec — [Feature Title]
|
|
2
|
+
|
|
3
|
+
**Epic ID:** `$EPIC_ID`
|
|
4
|
+
**Author:** Analyst
|
|
5
|
+
**Status:** Draft
|
|
6
|
+
**Created:** `$DATE`
|
|
7
|
+
|
|
8
|
+
> Describe **what** and **why**, never **how**. No libraries, schemas, or
|
|
9
|
+
> frameworks in this document — those belong in PLAN.md.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Overview
|
|
14
|
+
|
|
15
|
+
> One paragraph: what this feature is and the user problem it solves.
|
|
16
|
+
|
|
17
|
+
## 2. User Scenarios
|
|
18
|
+
|
|
19
|
+
### Primary flow
|
|
20
|
+
- **Given** …
|
|
21
|
+
- **When** …
|
|
22
|
+
- **Then** …
|
|
23
|
+
|
|
24
|
+
### Edge & error paths
|
|
25
|
+
| Situation | Expected behavior |
|
|
26
|
+
|-----------|-------------------|
|
|
27
|
+
| Dependency unavailable | |
|
|
28
|
+
| Permission / access denied | |
|
|
29
|
+
| Session expired mid-flow | |
|
|
30
|
+
| Empty state | |
|
|
31
|
+
| Boundary input | |
|
|
32
|
+
| Interruption / recovery | |
|
|
33
|
+
|
|
34
|
+
## 3. Functional Requirements
|
|
35
|
+
|
|
36
|
+
| ID | Requirement | Priority (MoSCoW) |
|
|
37
|
+
|----|-------------|-------------------|
|
|
38
|
+
| `$EPIC_ID-FR01` | | Must |
|
|
39
|
+
| `$EPIC_ID-FR02` | | Should |
|
|
40
|
+
|
|
41
|
+
## 4. Non-Functional Requirements
|
|
42
|
+
|
|
43
|
+
| ID | Category | Requirement (quantified) |
|
|
44
|
+
|----|----------|--------------------------|
|
|
45
|
+
| `$EPIC_ID-NFR01` | Performance | p95 < … ms |
|
|
46
|
+
| `$EPIC_ID-NFR02` | Security / privacy | |
|
|
47
|
+
| `$EPIC_ID-NFR03` | Accessibility | WCAG 2.1 AA |
|
|
48
|
+
|
|
49
|
+
## 5. Acceptance Criteria
|
|
50
|
+
|
|
51
|
+
| ID | Given / When / Then |
|
|
52
|
+
|----|---------------------|
|
|
53
|
+
| `$EPIC_ID-AC01` | Given … When … Then … |
|
|
54
|
+
| `$EPIC_ID-AC02` | |
|
|
55
|
+
|
|
56
|
+
## 6. Out of Scope
|
|
57
|
+
|
|
58
|
+
- …
|
|
59
|
+
|
|
60
|
+
## 7. Clarifications
|
|
61
|
+
|
|
62
|
+
> Populated by the Clarify phase. Each entry: question → resolved answer → decided by.
|
|
63
|
+
|
|
64
|
+
_None yet — open items are marked `[NEEDS CLARIFICATION: …]` inline above._
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Tasks — [Feature Title]
|
|
2
|
+
|
|
3
|
+
**Epic ID:** `$EPIC_ID`
|
|
4
|
+
**Author:** Tech Lead
|
|
5
|
+
**Status:** Draft
|
|
6
|
+
**Created:** `$DATE`
|
|
7
|
+
**Derived from:** `PLAN.md`
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Task List
|
|
12
|
+
|
|
13
|
+
> Ordered by dependency. Check each off during Implement.
|
|
14
|
+
|
|
15
|
+
### `$EPIC_ID-T01` — [task name]
|
|
16
|
+
- [ ] **What:** …
|
|
17
|
+
- **Depends on:** _(none)_
|
|
18
|
+
- **Parallel-safe:** yes / no
|
|
19
|
+
- **Implements:** `$EPIC_ID-FR01` / PLAN §…
|
|
20
|
+
- **Done when:** … (incl. the test to write)
|
|
21
|
+
|
|
22
|
+
### `$EPIC_ID-T02` — [task name]
|
|
23
|
+
- [ ] **What:** …
|
|
24
|
+
- **Depends on:** `$EPIC_ID-T01`
|
|
25
|
+
- **Parallel-safe:** no
|
|
26
|
+
- **Implements:** `$EPIC_ID-FR02`
|
|
27
|
+
- **Done when:** …
|
|
28
|
+
|
|
29
|
+
## Coverage self-check
|
|
30
|
+
|
|
31
|
+
- [ ] Every plan component has ≥1 task
|
|
32
|
+
- [ ] Every task references a requirement or plan section
|
|
33
|
+
- [ ] Dependencies form a valid order (no cycles)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analyze
|
|
3
|
+
description: Cross-check spec ↔ plan ↔ tasks for coverage, gaps, and contradictions before implementation, and issue a go/no-go verdict (ANALYSIS.md).
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Analyze for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **QA** agent.
|
|
10
|
+
Load your full persona from `.claude/agents/aidlc-speckit-qa.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `analyze`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
1. Read `docs/epics/$0/artifacts/SPEC.md`, `PLAN.md`, and `TASKS.md`.
|
|
18
|
+
2. Build a coverage matrix: requirement id → plan section → task id(s).
|
|
19
|
+
3. Identify gaps, orphans, and contradictions.
|
|
20
|
+
4. Fill `docs/epics/$0/artifacts/ANALYSIS.md` and issue a verdict.
|
|
21
|
+
|
|
22
|
+
## ANALYSIS Contents
|
|
23
|
+
|
|
24
|
+
### Coverage Matrix
|
|
25
|
+
- Table: `$0-FR/NFR id` → PLAN.md section → TASKS.md task id(s). One row per requirement.
|
|
26
|
+
|
|
27
|
+
### Gaps
|
|
28
|
+
- Requirements with no plan coverage or no task.
|
|
29
|
+
- Acceptance criteria not satisfiable by any task.
|
|
30
|
+
|
|
31
|
+
### Orphans (scope creep)
|
|
32
|
+
- Plan decisions or tasks with no upstream requirement.
|
|
33
|
+
|
|
34
|
+
### Contradictions
|
|
35
|
+
- Where any two of spec / plan / tasks disagree.
|
|
36
|
+
|
|
37
|
+
### Constitution Check
|
|
38
|
+
- Any element that violates a workspace-standard principle.
|
|
39
|
+
|
|
40
|
+
### Verdict
|
|
41
|
+
- **GO** or **NO-GO**. If NO-GO, list blocking issues and which artifact owns each fix.
|
|
42
|
+
|
|
43
|
+
## Rules
|
|
44
|
+
|
|
45
|
+
- 100% of requirements must trace to both plan and tasks for a GO.
|
|
46
|
+
- Do not wave through a NO-GO — route it back to Analyst (spec) or Tech Lead (plan/tasks).
|
|
47
|
+
|
|
48
|
+
## Output
|
|
49
|
+
|
|
50
|
+
Write the analysis to `docs/epics/$0/artifacts/ANALYSIS.md`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clarify
|
|
3
|
+
description: Surface and resolve the underspecified areas of a spec through structured questions, then fold the answers back into SPEC.md as a Clarifications section.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Clarify for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **Analyst** agent.
|
|
10
|
+
Load your full persona from `.claude/agents/aidlc-analyst.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `clarify`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
1. Read `docs/epics/$0/artifacts/SPEC.md`.
|
|
18
|
+
2. Collect every `[NEEDS CLARIFICATION: …]` marker plus any requirement that admits more than one reasonable reading.
|
|
19
|
+
3. For each, pose a **closed** question with 2–4 concrete candidate answers (not open-ended). Prefer options the user can pick.
|
|
20
|
+
4. Present the questions to the user and capture their answers. If running non-interactively, choose the most defensible option and mark it as an assumption.
|
|
21
|
+
5. Fold the resolutions back into SPEC.md: update the affected requirements AND append a `## Clarifications` section recording each Q → chosen A (and who decided).
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- Never leave a `[NEEDS CLARIFICATION]` marker unresolved after this phase — either answered or explicitly deferred with rationale.
|
|
26
|
+
- A clarification that changes scope must update the requirement and its acceptance criteria, not just the log.
|
|
27
|
+
- Keep questions closed and decision-ready; avoid "what do you want here?".
|
|
28
|
+
|
|
29
|
+
## Output
|
|
30
|
+
|
|
31
|
+
Update `docs/epics/$0/artifacts/SPEC.md` in place (requirements + a `## Clarifications` section).
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan
|
|
3
|
+
description: Derive the technical implementation plan (PLAN.md) from a clarified spec — architecture, data model, contracts, tech choices — honoring the project constitution and the existing codebase.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Plan for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **Tech Lead** agent.
|
|
10
|
+
Load your full persona from `.claude/agents/aidlc-speckit-tech-lead.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `plan`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
1. Read `docs/epics/$0/artifacts/SPEC.md` (must be clarified — no open `[NEEDS CLARIFICATION]` markers). If any remain, STOP and send back to Clarify.
|
|
18
|
+
2. Read the active workspace SDLC standard (the constitution) and treat its principles as constraints.
|
|
19
|
+
3. Read the existing codebase around the affected areas (use ast-graph MCP tools for structure/blast-radius when available).
|
|
20
|
+
4. Fill the plan template at `docs/epics/$0/artifacts/PLAN.md`.
|
|
21
|
+
|
|
22
|
+
## PLAN Contents
|
|
23
|
+
|
|
24
|
+
### Approach
|
|
25
|
+
- The overall technical strategy, in a paragraph. Why this shape.
|
|
26
|
+
|
|
27
|
+
### Architecture & Components
|
|
28
|
+
- Modules/components introduced or changed. How they interact.
|
|
29
|
+
|
|
30
|
+
### Data Model
|
|
31
|
+
- Entities, fields, relationships, migrations (as applicable).
|
|
32
|
+
|
|
33
|
+
### Contracts
|
|
34
|
+
- APIs / interfaces / events — signatures, inputs, outputs, error behavior.
|
|
35
|
+
|
|
36
|
+
### Constitution Check
|
|
37
|
+
- For each constitutional principle: satisfied / N/A / tension (with mitigation).
|
|
38
|
+
|
|
39
|
+
### File Impact
|
|
40
|
+
- Table: path → new / modified / removed → note.
|
|
41
|
+
|
|
42
|
+
### Requirement Traceability
|
|
43
|
+
- Table: `$0-FR/NFR id` → plan section that implements it. Every requirement must appear.
|
|
44
|
+
|
|
45
|
+
### Risks & Open Decisions
|
|
46
|
+
- Technical risks, alternatives considered, decisions deferred to implementation.
|
|
47
|
+
|
|
48
|
+
## Rules
|
|
49
|
+
|
|
50
|
+
- Every design decision traces to a requirement; every requirement is covered.
|
|
51
|
+
- Reuse existing patterns unless a requirement forces a new one.
|
|
52
|
+
- Do not re-open the "what" — if the spec is wrong or vague, bounce it back, don't paper over it.
|
|
53
|
+
|
|
54
|
+
## Output
|
|
55
|
+
|
|
56
|
+
Write the completed plan to `docs/epics/$0/artifacts/PLAN.md`.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specify
|
|
3
|
+
description: Turn a feature description into a structured, testable specification (SPEC.md) — user scenarios, functional and non-functional requirements, measurable acceptance criteria. No implementation detail.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX> [feature description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Specify for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **Analyst** agent — a spec-driven-development practitioner.
|
|
10
|
+
Load your full persona from `.claude/agents/aidlc-analyst.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `specify`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
1. Read the epic doc at `docs/epics/$0/$0.md` for intent, scope, and any linked ticket/design.
|
|
18
|
+
2. Read the active workspace SDLC standard (the constitution) so the spec never contradicts a project principle.
|
|
19
|
+
3. Read relevant existing product/domain docs so the spec is consistent with what already ships.
|
|
20
|
+
4. Fill the spec template at `docs/epics/$0/artifacts/SPEC.md`.
|
|
21
|
+
|
|
22
|
+
## SPEC Contents
|
|
23
|
+
|
|
24
|
+
### Overview
|
|
25
|
+
- One-paragraph summary of what this feature is and the user problem it solves.
|
|
26
|
+
|
|
27
|
+
### User Scenarios
|
|
28
|
+
- **Primary flow** — given/when/then from the user's perspective.
|
|
29
|
+
- **Edge & error paths** — dependency down, permission denied, session expired, empty state, boundary inputs, interruption/recovery.
|
|
30
|
+
|
|
31
|
+
### Functional Requirements
|
|
32
|
+
- Ids `$0-FR01`, `$0-FR02`, … — one testable behavior each. Mark MoSCoW priority.
|
|
33
|
+
|
|
34
|
+
### Non-Functional Requirements
|
|
35
|
+
- Ids `$0-NFR01`, … covering performance, reliability, security/privacy, accessibility, compatibility, observability as applicable. Quantify.
|
|
36
|
+
|
|
37
|
+
### Acceptance Criteria
|
|
38
|
+
- Given/When/Then, ids `$0-AC01`, … — measurable, one behavior each, error states included.
|
|
39
|
+
|
|
40
|
+
### Out of Scope
|
|
41
|
+
- What this feature explicitly does NOT do.
|
|
42
|
+
|
|
43
|
+
## Rules
|
|
44
|
+
|
|
45
|
+
- **No implementation detail** — no libraries, schemas, frameworks. Describe *what*, never *how*.
|
|
46
|
+
- Every requirement is testable and carries a stable id.
|
|
47
|
+
- Where you cannot resolve an ambiguity, write `[NEEDS CLARIFICATION: <question>]` rather than guessing — the Clarify phase will resolve it.
|
|
48
|
+
- Quantify success ("> 95%", "< 200ms"), never "should work well".
|
|
49
|
+
|
|
50
|
+
## Output
|
|
51
|
+
|
|
52
|
+
Write the completed spec to `docs/epics/$0/artifacts/SPEC.md`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speckit-implement
|
|
3
|
+
description: Execute the approved task list on a feature branch, keeping every change traceable to a task, and open a PR when the list is complete.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implement for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **Developer** agent.
|
|
10
|
+
Load your full persona from `.claude/agents/aidlc-speckit-developer.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `implement`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
1. Read `docs/epics/$0/artifacts/SPEC.md`, `PLAN.md`, `TASKS.md`, and `ANALYSIS.md` (must be GO — if NO-GO, STOP).
|
|
18
|
+
2. Create a feature branch `feature/$0-<short-slug>` from the default branch.
|
|
19
|
+
3. Work the tasks in dependency order. Check each off in TASKS.md as you complete it.
|
|
20
|
+
4. Write the tests each task's "Done when" calls for, alongside the change.
|
|
21
|
+
5. Run the project's lint + typecheck + test commands locally.
|
|
22
|
+
6. Open a PR whose body references epic `$0` and links the spec.
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- Implement only what the tasks call for. If code seems needed that no task covers, STOP and surface the gap — don't freelance scope.
|
|
27
|
+
- Match existing code conventions; keep diffs small and reviewable.
|
|
28
|
+
- No behavior change outside the spec's scope.
|
|
29
|
+
- Every task ends done or explicitly deferred with a reason.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
Code + tests on `feature/$0-<slug>`, PR opened. Write a short `docs/epics/$0/artifacts/IMPLEMENT-SUMMARY.md` listing completed tasks and the PR link so the AIDLC validator has a file to check.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tasks
|
|
3
|
+
description: Break a technical plan into an ordered, dependency-aware task list (TASKS.md), each task small, independently verifiable, and traceable to a requirement.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Tasks for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **Tech Lead** agent.
|
|
10
|
+
Load your full persona from `.claude/agents/aidlc-speckit-tech-lead.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `tasks`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
1. Read `docs/epics/$0/artifacts/PLAN.md` and `docs/epics/$0/artifacts/SPEC.md`.
|
|
18
|
+
2. Decompose the plan into concrete, ordered tasks. Fill `docs/epics/$0/artifacts/TASKS.md`.
|
|
19
|
+
|
|
20
|
+
## TASKS Contents
|
|
21
|
+
|
|
22
|
+
- A numbered task list. For each task (`$0-T01`, …):
|
|
23
|
+
- **What**: the concrete unit of work.
|
|
24
|
+
- **Depends on**: task ids that must complete first (empty = can start immediately).
|
|
25
|
+
- **Parallel-safe**: yes/no — can run concurrently with its non-dependents.
|
|
26
|
+
- **Implements**: requirement id(s) / plan section it satisfies.
|
|
27
|
+
- **Done when**: the verifiable completion condition (incl. the test to write).
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
- Right-size tasks — each independently verifiable, ideally one PR-sized change.
|
|
32
|
+
- Order by dependency; mark what can proceed in parallel.
|
|
33
|
+
- Every task references at least one requirement or plan section. No orphan tasks.
|
|
34
|
+
- Every plan component must be covered by at least one task. No gaps.
|
|
35
|
+
|
|
36
|
+
## Output
|
|
37
|
+
|
|
38
|
+
Write the completed task list to `docs/epics/$0/artifacts/TASKS.md`.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Claude Code UserPromptSubmit hook: when a prompt refers to an epic that has a
|
|
4
|
+
* memory digest, inject that digest into the context — so working on an epic
|
|
5
|
+
* automatically loads its prior decisions/constraints/reflections without you
|
|
6
|
+
* running /epic-context first.
|
|
7
|
+
*
|
|
8
|
+
* Opt-in: only active while enabled (aidlc / the extension writes the hook entry
|
|
9
|
+
* into ~/.claude/settings.json; disabling removes it). Zero-dep, and always
|
|
10
|
+
* exits 0 so it can never block a prompt.
|
|
11
|
+
*
|
|
12
|
+
* Contract: reads the hook payload JSON on stdin ({ prompt, cwd, ... }); on
|
|
13
|
+
* exit 0 whatever it prints to stdout is added to Claude's context.
|
|
14
|
+
*/
|
|
15
|
+
import fs from 'fs';
|
|
16
|
+
import path from 'path';
|
|
17
|
+
|
|
18
|
+
let raw = '';
|
|
19
|
+
process.stdin.on('data', (c) => { raw += c; });
|
|
20
|
+
process.stdin.on('end', () => {
|
|
21
|
+
try { run(raw); } catch { /* never break the prompt */ }
|
|
22
|
+
process.exit(0);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
function run(raw) {
|
|
26
|
+
let input = {};
|
|
27
|
+
try { input = JSON.parse(raw) || {}; } catch { /* ignore */ }
|
|
28
|
+
const prompt = String(input.prompt || '');
|
|
29
|
+
const cwd = String(input.cwd || process.cwd());
|
|
30
|
+
if (!prompt.trim()) { return; }
|
|
31
|
+
|
|
32
|
+
const epicsDir = path.join(cwd, 'docs', 'epics');
|
|
33
|
+
let ids;
|
|
34
|
+
try {
|
|
35
|
+
ids = fs.readdirSync(epicsDir, { withFileTypes: true })
|
|
36
|
+
.filter((d) => d.isDirectory())
|
|
37
|
+
.map((d) => d.name);
|
|
38
|
+
} catch { return; } // no epics here
|
|
39
|
+
if (!ids.length) { return; }
|
|
40
|
+
|
|
41
|
+
const lower = prompt.toLowerCase();
|
|
42
|
+
const matched = ids.filter((id) => {
|
|
43
|
+
if (lower.includes(id.toLowerCase())) { return true; }
|
|
44
|
+
// Also match the leading code (DEMO-002 for DEMO-002-AUTO-REVIEW, EPIC-001 …).
|
|
45
|
+
const code = (id.match(/^[A-Za-z]+-\d+/) || [])[0];
|
|
46
|
+
return code ? lower.includes(code.toLowerCase()) : false;
|
|
47
|
+
});
|
|
48
|
+
if (!matched.length) { return; }
|
|
49
|
+
|
|
50
|
+
const blocks = [];
|
|
51
|
+
for (const id of matched) {
|
|
52
|
+
const p = path.join(epicsDir, id, 'epic-memory.json');
|
|
53
|
+
let mem;
|
|
54
|
+
try { mem = JSON.parse(fs.readFileSync(p, 'utf8')); } catch { continue; }
|
|
55
|
+
const digest = format(mem, id);
|
|
56
|
+
if (digest) { blocks.push(digest); }
|
|
57
|
+
}
|
|
58
|
+
if (!blocks.length) { return; }
|
|
59
|
+
|
|
60
|
+
console.log('# AIDLC epic memory (auto-loaded — prior context for this epic; prefer it over re-reading artifacts)\n');
|
|
61
|
+
console.log(blocks.join('\n\n'));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function format(m, id) {
|
|
65
|
+
const lines = [`## ${m.epic || id}`];
|
|
66
|
+
if (m.summary) { lines.push(`Summary: ${m.summary}`); }
|
|
67
|
+
const entries = Array.isArray(m.entries) ? m.entries : [];
|
|
68
|
+
const reflections = Array.isArray(m.reflections) ? m.reflections : [];
|
|
69
|
+
if (entries.length) {
|
|
70
|
+
lines.push('Decisions/constraints/context:');
|
|
71
|
+
for (const e of entries) { lines.push(`- [${e.kind || 'note'}] ${e.text}`); }
|
|
72
|
+
}
|
|
73
|
+
if (reflections.length) {
|
|
74
|
+
lines.push('Reflections (prompt/work better):');
|
|
75
|
+
for (const r of reflections) { lines.push(`- ${r.text}`); }
|
|
76
|
+
}
|
|
77
|
+
return lines.length > 1 ? lines.join('\n') : '';
|
|
78
|
+
}
|