@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.
Files changed (93) hide show
  1. package/AUTOMATION.md +148 -0
  2. package/README.md +684 -0
  3. package/dist/assets/annotate-artifact.skill.md +121 -0
  4. package/dist/assets/epic-context.skill.md +55 -0
  5. package/dist/bundle.js +49470 -0
  6. package/dist/templates/ainative/agents/native-engineer.md +66 -0
  7. package/dist/templates/ainative/agents/native-operator.md +71 -0
  8. package/dist/templates/ainative/agents/native-originator.md +56 -0
  9. package/dist/templates/ainative/agents/native-product-owner.md +68 -0
  10. package/dist/templates/ainative/agents/native-reviewer.md +65 -0
  11. package/dist/templates/ainative/agents/native-verifier.md +58 -0
  12. package/dist/templates/ainative/artifacts/build-plan.md +56 -0
  13. package/dist/templates/ainative/artifacts/implement.md +55 -0
  14. package/dist/templates/ainative/artifacts/intent.md +50 -0
  15. package/dist/templates/ainative/artifacts/maintain.md +85 -0
  16. package/dist/templates/ainative/artifacts/review.md +68 -0
  17. package/dist/templates/ainative/artifacts/spec.md +69 -0
  18. package/dist/templates/ainative/artifacts/verify.md +55 -0
  19. package/dist/templates/ainative/skills/native-build-plan.md +74 -0
  20. package/dist/templates/ainative/skills/native-implement.md +62 -0
  21. package/dist/templates/ainative/skills/native-intent.md +50 -0
  22. package/dist/templates/ainative/skills/native-maintain.md +94 -0
  23. package/dist/templates/ainative/skills/native-review.md +82 -0
  24. package/dist/templates/ainative/skills/native-spec.md +83 -0
  25. package/dist/templates/ainative/skills/native-verify.md +60 -0
  26. package/dist/templates/sdlc/agents/designer.md +87 -0
  27. package/dist/templates/sdlc/agents/developer.md +178 -0
  28. package/dist/templates/sdlc/agents/example-with-skills.md +59 -0
  29. package/dist/templates/sdlc/agents/orchestrator.md +186 -0
  30. package/dist/templates/sdlc/agents/po.md +115 -0
  31. package/dist/templates/sdlc/agents/qa.md +141 -0
  32. package/dist/templates/sdlc/agents/tech-lead.md +124 -0
  33. package/dist/templates/sdlc/artifacts/design.md +130 -0
  34. package/dist/templates/sdlc/artifacts/execute-test.md +64 -0
  35. package/dist/templates/sdlc/artifacts/implement.backend.md +96 -0
  36. package/dist/templates/sdlc/artifacts/implement.md +70 -0
  37. package/dist/templates/sdlc/artifacts/implement.web-react.md +109 -0
  38. package/dist/templates/sdlc/artifacts/implement.web.md +99 -0
  39. package/dist/templates/sdlc/artifacts/plan.md +97 -0
  40. package/dist/templates/sdlc/artifacts/prototype.md +141 -0
  41. package/dist/templates/sdlc/artifacts/test-cases.md +47 -0
  42. package/dist/templates/sdlc/artifacts/test-plan.md +100 -0
  43. package/dist/templates/sdlc/artifacts/unit-test.md +32 -0
  44. package/dist/templates/sdlc/profiles/agile-lite.yaml +29 -0
  45. package/dist/templates/sdlc/profiles/hybrid.yaml +43 -0
  46. package/dist/templates/sdlc/profiles/iso-ieee.yaml +67 -0
  47. package/dist/templates/sdlc/profiles/none.yaml +21 -0
  48. package/dist/templates/sdlc/skills/advance-epic.md +77 -0
  49. package/dist/templates/sdlc/skills/analyze-requirements.md +279 -0
  50. package/dist/templates/sdlc/skills/discovery-gate.md +118 -0
  51. package/dist/templates/sdlc/skills/execute-test.md +74 -0
  52. package/dist/templates/sdlc/skills/generate-test-cases.md +77 -0
  53. package/dist/templates/sdlc/skills/implement.md +74 -0
  54. package/dist/templates/sdlc/skills/prd.md +114 -0
  55. package/dist/templates/sdlc/skills/prototype.md +128 -0
  56. package/dist/templates/sdlc/skills/tech-design.md +134 -0
  57. package/dist/templates/sdlc/skills/test-plan.md +115 -0
  58. package/dist/templates/sdlc/skills/test-report.md +38 -0
  59. package/dist/templates/sdlc/skills/unit-test.md +43 -0
  60. package/dist/templates/sdlc/validators/ci.mjs +49 -0
  61. package/dist/templates/sdlc/validators/traceability.mjs +244 -0
  62. package/dist/templates/speckit/agents/analyst.md +42 -0
  63. package/dist/templates/speckit/agents/speckit-developer.md +36 -0
  64. package/dist/templates/speckit/agents/speckit-qa.md +38 -0
  65. package/dist/templates/speckit/agents/speckit-tech-lead.md +40 -0
  66. package/dist/templates/speckit/artifacts/analyze.md +48 -0
  67. package/dist/templates/speckit/artifacts/clarify.md +64 -0
  68. package/dist/templates/speckit/artifacts/plan.md +57 -0
  69. package/dist/templates/speckit/artifacts/specify.md +64 -0
  70. package/dist/templates/speckit/artifacts/tasks.md +33 -0
  71. package/dist/templates/speckit/skills/analyze.md +50 -0
  72. package/dist/templates/speckit/skills/clarify.md +31 -0
  73. package/dist/templates/speckit/skills/plan.md +56 -0
  74. package/dist/templates/speckit/skills/specify.md +52 -0
  75. package/dist/templates/speckit/skills/speckit-implement.md +33 -0
  76. package/dist/templates/speckit/skills/tasks.md +38 -0
  77. package/dist/tools/epic-memory-hook.mjs +78 -0
  78. package/dist/tools/epic-memory.mjs +130 -0
  79. package/dist/tools/md-to-html.mjs +478 -0
  80. package/dist/tools/vendor/marked.esm.mjs +2432 -0
  81. package/dist/vendor/annotron/LICENSE +21 -0
  82. package/dist/vendor/annotron/README.md +213 -0
  83. package/dist/vendor/annotron/bin/annotron +467 -0
  84. package/dist/vendor/annotron/commands/annotron.md +11 -0
  85. package/dist/vendor/annotron/hooks/annotron-hook.sh +38 -0
  86. package/dist/vendor/annotron/hooks/hooks.json +50 -0
  87. package/dist/vendor/annotron/package.json +72 -0
  88. package/dist/vendor/annotron/skills/annotron-review/SKILL.md +86 -0
  89. package/dist/vendor/annotron/src/chrome.html +2029 -0
  90. package/dist/vendor/annotron/src/mdRender.js +208 -0
  91. package/dist/vendor/annotron/src/sdk.js +1042 -0
  92. package/dist/vendor/annotron/src/server.js +780 -0
  93. package/package.json +60 -0
@@ -0,0 +1,68 @@
1
+ # Review Report — [Title]
2
+
3
+ **Epic ID:** `$EPIC_ID`
4
+ **Reviewer:** Reviewer (policy)
5
+ **Status:** Draft
6
+ **Created:** `$DATE`
7
+ **Reviewed against:** `CLAUDE.md`, loaded skills, workspace SDLC standard
8
+
9
+ ---
10
+
11
+ ## 1. Verdict
12
+
13
+ > *One line. Any `blocker` row below makes the verdict a hold.*
14
+
15
+ **Overall:** ship / hold
16
+
17
+ ## 2. Scope reviewed
18
+
19
+ | | |
20
+ |---|---|
21
+ | Base | `<branch or sha>` |
22
+ | Head | `<branch or sha>` |
23
+ | Files changed | |
24
+ | Read in full | yes / file-by-file |
25
+
26
+ ## 3. Policy checklist
27
+
28
+ > *The rules actually read before the diff, and whether the diff honors each.*
29
+
30
+ | Source | Rule | Honored |
31
+ |---|---|---|
32
+ | `CLAUDE.md` § … | | yes / no / n-a |
33
+
34
+ ## 4. Findings
35
+
36
+ | # | Severity | Location | Finding | Policy |
37
+ |---|---|---|---|---|
38
+ | 1 | blocker / should-fix / note | `file.ts:42` | | `CLAUDE.md` § … / `opinion` |
39
+
40
+ > *Every row cites the policy line it breaks, or is labelled `opinion`.*
41
+
42
+ ## 5. Always-in-scope checks
43
+
44
+ | Check | Result |
45
+ |---|---|
46
+ | Secrets in code / fixtures / logs | clean / finding #… |
47
+ | Data handling (PII, retention, boundaries) | clean / finding #… |
48
+ | Silent failure (swallowed errors, ignored codes) | clean / finding #… |
49
+ | Newly reachable surface (API, route, permission) | clean / finding #… |
50
+
51
+ ## 6. Not re-checked
52
+
53
+ > *Already covered by `verify.md` — cited, not redone.*
54
+
55
+ ## 7. Shortest path to ship
56
+
57
+ > *Only when the verdict is hold: the minimum set of changes that would flip it.*
58
+
59
+ 1.
60
+
61
+ ## 8. Policy amendments
62
+
63
+ > *Rules broken repeatedly, or findings with no written rule to cite. Propose the
64
+ > wording — a rule everyone breaks is a broken rule. Feeds stage 6.*
65
+
66
+ | Proposed rule | Where it belongs | Why |
67
+ |---|---|---|
68
+ | | | |
@@ -0,0 +1,69 @@
1
+ # Spec — [Title]
2
+
3
+ **Epic ID:** `$EPIC_ID`
4
+ **Owner:** Product Owner
5
+ **Status:** Draft
6
+ **Created:** `$DATE`
7
+ **Traces to:** `intent.md`
8
+
9
+ ---
10
+
11
+ ## 1. Overview
12
+
13
+ > *One paragraph: what this is, and which line of `intent.md` it serves.*
14
+
15
+ ## 2. Constraints applied
16
+
17
+ > *The skills, standards and docs loaded before writing this spec. A reviewer must
18
+ > be able to tell what this spec was bound by.*
19
+
20
+ | Source | What it constrains |
21
+ |---|---|
22
+ | `CLAUDE.md` | |
23
+
24
+ ## 3. User scenarios
25
+
26
+ ### 3.1 Primary flow
27
+ > *Given / when / then, from the user's point of view.*
28
+
29
+ ### 3.2 Edge and error paths
30
+ > *Dependency down, permission denied, empty state, boundary inputs, interruption
31
+ > and recovery.*
32
+
33
+ ## 4. Functional requirements
34
+
35
+ | Id | Requirement | Priority | Traces to |
36
+ |---|---|---|---|
37
+ | `$EPIC_ID-FR01` | | Must | |
38
+
39
+ ## 5. Non-functional requirements
40
+
41
+ | Id | Requirement | Target |
42
+ |---|---|---|
43
+ | `$EPIC_ID-NFR01` | | |
44
+
45
+ ## 6. Acceptance criteria
46
+
47
+ | Id | Given / When / Then |
48
+ |---|---|
49
+ | `$EPIC_ID-AC01` | |
50
+
51
+ ## 7. Out of scope
52
+
53
+ > *What this explicitly does not do. Mandatory — an unbounded spec is not a spec.*
54
+
55
+ -
56
+
57
+ ## 8. Concerns
58
+
59
+ > *Every conflict between the intent and a constraint, itself, or something that
60
+ > already ships. Each must be resolved inline or deferred with a named owner
61
+ > before this spec is approved.*
62
+
63
+ | # | Concern | Needs | Resolution |
64
+ |---|---|---|---|
65
+ | 1 | | | |
66
+
67
+ ---
68
+
69
+ *No implementation detail: no libraries, tables, endpoints or file layouts.*
@@ -0,0 +1,55 @@
1
+ # Verification Report — [Title]
2
+
3
+ **Epic ID:** `$EPIC_ID`
4
+ **Verifier:** Verifier (independent)
5
+ **Status:** Draft
6
+ **Created:** `$DATE`
7
+ **Verified against:** `spec.md`, `plan.md`
8
+
9
+ ---
10
+
11
+ ## 1. Verdict
12
+
13
+ > *One line. Any `fail` or `untested` row below makes the overall verdict a fail.*
14
+
15
+ **Overall:** pass / fail
16
+
17
+ ## 2. Acceptance criteria
18
+
19
+ | Id | Criterion | Verdict | Evidence |
20
+ |---|---|---|---|
21
+ | `$EPIC_ID-AC01` | | pass / fail / untested | |
22
+
23
+ > *`pass` requires captured command output. `untested` means nothing checked it —
24
+ > it blocks like a failure, it is simply a different kind of unknown.*
25
+
26
+ ## 3. Promised proofs
27
+
28
+ > *Every proof named in `plan.md` — was it actually executed?*
29
+
30
+ | Proof | Executed | Result |
31
+ |---|---|---|
32
+ | | | |
33
+
34
+ ## 4. Regressions
35
+
36
+ ```
37
+ $ <full test suite command>
38
+ <output>
39
+ ```
40
+
41
+ ## 5. Out-of-scope check
42
+
43
+ > *Did anything from the spec's `Out of scope` section ship anyway?*
44
+
45
+ ## 6. Findings
46
+
47
+ | # | Finding | Severity | Where |
48
+ |---|---|---|---|
49
+ | 1 | | | |
50
+
51
+ ## 7. Shortest path to pass
52
+
53
+ > *Only when the verdict is fail: the minimum set of changes that would flip it.*
54
+
55
+ 1.
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: aidlc-native-build-plan
3
+ description: Plan mode as the default starting point — produce plan.md naming the files, the order, the risks and the proofs before any code is written. Stage 3a of the AI-Native SDLC.
4
+ argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
5
+ ---
6
+
7
+ # Build Plan for Epic $0
8
+
9
+ You are the **Engineer** agent.
10
+ Load your full persona from `.claude/agents/aidlc-native-engineer.md` before starting.
11
+
12
+ **Do not write production code in this phase.** The output is a plan that is cheap
13
+ to argue with. Code comes in `/implement $0`.
14
+
15
+ ## Steps
16
+
17
+ 1. Read `docs/epics/$0/artifacts/spec.md` — every requirement and acceptance
18
+ criterion, with ids. If `spec.md` does not exist (quick recipe), read
19
+ `intent.md` and say so in the plan.
20
+ 2. Read `CLAUDE.md` for conventions, commands and known traps.
21
+ 3. **Learn the code structurally before proposing changes.** Use ast-graph:
22
+ `symbol` for where things are defined and who calls them, `blast-radius` for what
23
+ breaks if you change them, `routes` for existing endpoints. Read function bodies
24
+ only where the graph says it matters.
25
+ 4. **Interview.** Where the spec is silent, ask — never invent a requirement to make
26
+ the plan tidy.
27
+ 5. Write `docs/epics/$0/artifacts/plan.md`, then stop for review.
28
+
29
+ ## Plan Contents
30
+
31
+ ### Approach
32
+ Two or three paragraphs: the shape of the change and why this shape over the
33
+ alternative you rejected. Name the alternative.
34
+
35
+ ### Files
36
+ A table, not prose. Real paths.
37
+
38
+ | Path | Change | Why |
39
+ |---|---|---|
40
+
41
+ ### Order
42
+ Numbered steps in dependency order, each one independently reviewable. Say what is
43
+ true after each step that was not true before it.
44
+
45
+ ### Risks
46
+
47
+ | Risk | Likelihood | What we do about it |
48
+ |---|---|---|
49
+
50
+ Include at minimum: what could break for existing callers (cite `blast-radius`),
51
+ what is hard to reverse, and what we are least sure about.
52
+
53
+ ### Proofs
54
+ How each acceptance criterion will be shown to hold — the command to run, the test
55
+ to write, the screen to look at. Map `$0-ACnn` → proof. A plan without proofs is a
56
+ wish.
57
+
58
+ ### Feedback loop
59
+ State the loop you will use while implementing: unit tests, a running instance,
60
+ a screenshot, a scratch database. If none exists, building it is step 1 of `Order`.
61
+
62
+ ## Rules
63
+
64
+ - **Name real files.** "The auth module" is not a plan; `src/auth/session.ts` is.
65
+ - Every acceptance criterion in the spec appears in `Proofs`, or the plan states
66
+ why it is out of scope for this change.
67
+ - Prefer the smallest change that satisfies the spec. Note what you deliberately
68
+ left alone.
69
+ - If the spec turns out to be wrong or incomplete, stop and say so — do not patch
70
+ around it in the plan.
71
+
72
+ ## Output
73
+
74
+ Write `docs/epics/$0/artifacts/plan.md`.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: aidlc-native-implement
3
+ description: Build the feature against the approved plan.md on a feature branch, closing your own feedback loop as you go. Stage 3b of the AI-Native SDLC.
4
+ argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
5
+ ---
6
+
7
+ # Implement Epic $0
8
+
9
+ You are the **Engineer** agent.
10
+ Load your full persona from `.claude/agents/aidlc-native-engineer.md` before starting.
11
+
12
+ ## Step 0: Git Behaviour
13
+
14
+ Read the step's `git` config from `.aidlc/runs/$RUN_ID.json` → `steps[implement].git`:
15
+
16
+ - `git.branch` — create a feature branch (default: true)
17
+ - `git.push` — push the branch to origin (default: true)
18
+ - `git.open_pr` — open a PR after pushing (default: true)
19
+
20
+ With no run state, default all three to true. Honour these flags throughout.
21
+
22
+ ## Steps
23
+
24
+ 1. Read `docs/epics/$0/artifacts/plan.md` — this is what you agreed to build.
25
+ Read `spec.md` for the acceptance criteria the code must satisfy.
26
+ 2. Read `CLAUDE.md`. Conventions, commands and known traps are binding.
27
+ 3. **Stand up the feedback loop named in the plan before writing code.** You must be
28
+ able to see the effect of your own changes.
29
+ 4. Work through `Order` in the plan, one step at a time. Commit per step, with a
30
+ message naming the step.
31
+ 5. **Close the loop after every step**: run the tests, run the build, run the app,
32
+ read the output. Fix and repeat until it actually passes.
33
+ 6. Execute every proof listed in the plan and capture the real output.
34
+ 7. Write `docs/epics/$0/artifacts/implement.md`.
35
+ 8. Push and open the PR per Step 0, linking the epic and the spec.
36
+
37
+ ## implement.md Contents
38
+
39
+ - **Branch / PR** — branch name, PR link.
40
+ - **What was built** — per plan step: what changed, in which files.
41
+ - **Proofs executed** — the command and its real output, per `$0-ACnn`.
42
+ - **Deviations from the plan** — anything you did differently, and why. If nothing,
43
+ say so explicitly.
44
+ - **Discovered work** — what you found but deliberately did not do, and where it went
45
+ (a plan amendment, a new intent, an issue).
46
+ - **Known gaps** — what a reviewer should look at hardest.
47
+
48
+ ## Rules
49
+
50
+ - **Never claim a test passed without running it.** Paste the command and its output.
51
+ An unverified success claim is worse than a reported failure.
52
+ - **Match the surrounding code** — comment density, naming, idiom. New code should
53
+ read like the code around it.
54
+ - **Stay inside the plan.** Scope found mid-flight becomes a plan amendment or a new
55
+ intent; it never lands silently in the diff.
56
+ - **Small, ordered commits.** The reviewer reads the sequence, not just the endpoint.
57
+ - If a plan step turns out to be wrong, stop and amend `plan.md` before continuing.
58
+
59
+ ## Output
60
+
61
+ Write `docs/epics/$0/artifacts/implement.md`, with the branch pushed and the PR open
62
+ unless Step 0 says otherwise.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: aidlc-native-intent
3
+ description: Capture the originator's raw idea as a committed intent.md — the problem, who it hurts, what "solved" looks like. Stage 1 of the AI-Native SDLC. No solutions, no design.
4
+ argument-hint: "<{{EPIC_PREFIX}}-XXXX> [the idea, in one sentence]"
5
+ ---
6
+
7
+ # Intent for Epic $0
8
+
9
+ You are the **Originator** agent.
10
+ Load your full persona from `.claude/agents/aidlc-native-originator.md` before starting.
11
+
12
+ ## Steps
13
+
14
+ 1. Read the epic doc at `docs/epics/$0/$0.md` for whatever context already exists
15
+ (a ticket link, a Slack thread, a one-line idea).
16
+ 2. **Interview the originator.** Do not skip this even when the idea sounds clear —
17
+ the first statement of a problem is almost never the real one. Ask until you can
18
+ answer every heading below without guessing.
19
+ 3. Draft the intent, show it, and invite corrections. The correction pass is where
20
+ the real intent surfaces; budget for at least one.
21
+ 4. Write the result to `docs/epics/$0/artifacts/intent.md`.
22
+
23
+ ## What to Ask
24
+
25
+ | Heading | The question behind it |
26
+ |---|---|
27
+ | Problem | What is broken today? Describe the moment it goes wrong. |
28
+ | Who hurts | Which specific person or role, doing what task? Not "users". |
29
+ | Cost | What does it cost them — time, money, errors, abandonment? Any number? |
30
+ | Evidence | What makes us believe this is real? Tickets, metrics, a recording, a quote. |
31
+ | Done looks like | What observable thing changes if we solve it? |
32
+ | Not this | Which adjacent problems are we deliberately not solving? |
33
+ | Open questions | What do we still not know? |
34
+
35
+ ## Rules
36
+
37
+ - **No solution language.** No components, endpoints, screens, libraries, schemas.
38
+ If a reader can infer the implementation, the intent is over-specified — cut it.
39
+ - **Never invent evidence.** "No data yet" is a valid and useful answer; a
40
+ plausible-sounding fabricated number is not.
41
+ - **Record who the originator is**, so later phases know who to go back to.
42
+ - **Keep it to one page.** If it grows past that, you have started designing.
43
+ - Unresolved unknowns go under `Open questions` — never smoothed over.
44
+
45
+ ## Output
46
+
47
+ Write `docs/epics/$0/artifacts/intent.md`.
48
+
49
+ Then state, in one line, what the next phase (`/spec $0`) will need that this
50
+ document does not yet supply.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: aidlc-native-maintain
3
+ description: Turn a production signal into a diagnosis, and — when the fix is real work — into the intent.md of a new epic. Stage 6 of the AI-Native SDLC, the return path to stage 1.
4
+ argument-hint: "<{{EPIC_PREFIX}}-XXXX> [path to signal.json]"
5
+ ---
6
+
7
+ # Maintain Epic $0
8
+
9
+ You are the **Operator** agent.
10
+ Load your full persona from `.claude/agents/aidlc-native-operator.md` before starting.
11
+
12
+ This phase runs **unattended**. A production signal does not wait for office
13
+ hours, so nothing below may block on asking a human. Where you would ask, write
14
+ the question into the artifact and hand it forward.
15
+
16
+ ## The Signal
17
+
18
+ The signal is a JSON object — from a file, an alert forwarder, or pasted by a
19
+ human. Five fields, and every one of them matters downstream:
20
+
21
+ | Field | Meaning |
22
+ |---|---|
23
+ | `source` | Where it came from (`manual`, `sentry`, `otel`, `pager`) |
24
+ | `observedAt` | When it was seen, ISO-8601 |
25
+ | `symptom` | What is wrong, in one line, **as observed** — not as diagnosed |
26
+ | `scope` | Who / what is affected, and how much |
27
+ | `evidence` | Stack trace, log excerpt, metric window, request id |
28
+
29
+ Read it from `$1` when a path was given, otherwise from
30
+ `docs/epics/$0/signal.json`. If neither exists, write an `incident.md` that says
31
+ so and stop — do not invent a signal.
32
+
33
+ ## Steps
34
+
35
+ 1. **Record the symptom before you explain it.** Quote the signal's own words.
36
+ Whatever you later conclude, this line must still describe what was observed.
37
+ 2. **Locate it.** ast-graph `symbol` / `blast-radius` for the code the evidence
38
+ names, `git log` for when it last changed, and the epic's `spec.md` /
39
+ `verify.md` / `review.md` for what was specified and checked.
40
+ 3. **Separate cause from symptom.** Label the cause `confirmed` (you can point at
41
+ the line) or `hypothesis` (you cannot). Never promote one to the other.
42
+ 4. **Decide: open or close.**
43
+ - **Open an epic** — the fix is real work, or the same signal will return.
44
+ - **Close here** — a one-off, an external outage, or already fixed. Record it
45
+ and say why it is closed. Not every signal deserves five stages.
46
+ 5. **Answer: what would have caught this?** A missing acceptance criterion, an
47
+ untested path, a policy rule nobody wrote. This is the most valuable line in
48
+ the report — a regression is feedback about the process, not just about code.
49
+ 6. Write `docs/epics/$0/artifacts/incident.md`.
50
+ 7. **When you opened an epic, close the loop.** Run:
51
+
52
+ ```
53
+ aidlc maintain follow-up $0 \
54
+ --problem "<the problem in the user's terms>" \
55
+ --who-hurts "<the specific role doing the specific task>" \
56
+ --done "<the observable condition that says this cannot recur>" \
57
+ --question "<anything you would have asked a human>"
58
+ ```
59
+
60
+ It scaffolds the new epic with that `intent.md` already written, reading the
61
+ signal back from `signal.json` so you do not repeat it. Put the id it prints
62
+ in your decision line. The epic re-enters at stage 1 and is reviewed by a
63
+ human there, like any other intent. When the diagnosis is better written than
64
+ flags allow, write the markdown yourself and pass `--intent <file>`.
65
+
66
+ ## The Intent You Emit
67
+
68
+ It is a stage-1 document and obeys stage-1 rules:
69
+
70
+ - **Problem** — the moment it goes wrong, in the user's terms, not the stack's.
71
+ - **Who hurts** — the specific role doing the specific task.
72
+ - **Cost** — how often, how many, how bad. From the signal's `scope`.
73
+ - **Evidence** — the signal itself, quoted, plus what you confirmed.
74
+ - **Done looks like** — the observable condition that says this cannot recur.
75
+ - **Open questions** — everything you would have asked a human.
76
+
77
+ **No solution language.** No components, endpoints, schemas or libraries — even
78
+ when you are fairly sure which line is at fault. Put that in `incident.md`, where
79
+ it belongs; the spec phase will decide what to do about it.
80
+
81
+ ## Rules
82
+
83
+ - **Never invent evidence.** "No data yet" is a valid answer.
84
+ - **Never repair.** Diagnose and hand forward. A fix that skips the pipeline is
85
+ the failure mode this whole lifecycle exists to prevent.
86
+ - **Do not average severity.** One user losing data outranks a hundred seeing a
87
+ slow page; say so plainly rather than scoring it.
88
+ - **Keep the five signal fields intact** in the report. Later sources — Sentry,
89
+ OTel, a pager — fill the same shape, and the report has to stay comparable.
90
+
91
+ ## Output
92
+
93
+ `docs/epics/$0/artifacts/incident.md`, ending with an explicit decision line:
94
+ **open `<new-epic-id>`** or **closed — <reason>**.
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: aidlc-native-review
3
+ description: Review the diff against written policy — CLAUDE.md, the loaded skills, the workspace standard — and return a ship / hold verdict with every finding traced to the rule it breaks. Stage 5 of the AI-Native SDLC.
4
+ argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
5
+ ---
6
+
7
+ # Review Epic $0
8
+
9
+ You are the **Reviewer** agent.
10
+ Load your full persona from `.claude/agents/aidlc-native-reviewer.md` before starting.
11
+
12
+ The Verifier already answered "does it do what the spec said?". You answer a
13
+ different question: **is this how we build things here, and is it safe to ship?**
14
+
15
+ This phase runs entirely locally. It reads the diff from the working tree and
16
+ needs no GitHub remote, no CI, and no credentials.
17
+
18
+ ## Steps
19
+
20
+ 1. **Read the policy before the diff.** `CLAUDE.md`, the skills loaded for this
21
+ epic, and the active SDLC standard. Write down the checklist they imply — you
22
+ cannot cite a rule you have not read.
23
+ 2. Read `docs/epics/$0/artifacts/spec.md` for scope and `verify.md` for what was
24
+ already checked. Do not re-run verification; it is a different phase.
25
+ 3. Get the diff: `git diff <base>...HEAD` (base = the branch this epic forked
26
+ from). Read all of it. If the diff is too large to read in one pass, review it
27
+ file by file and say so in the report.
28
+ 4. For any change with reach beyond its file, use ast-graph `blast-radius` rather
29
+ than assuming who calls it.
30
+ 5. Classify every finding and write `docs/epics/$0/artifacts/review.md`.
31
+
32
+ ## Findings Table
33
+
34
+ | # | Severity | Location | Finding | Policy |
35
+ |---|---|---|---|---|
36
+ | 1 | blocker / should-fix / note | `file.ts:42` | … | `CLAUDE.md` § … / `opinion` |
37
+
38
+ - **blocker** — must not ship. Correctness, security, data loss, a broken
39
+ contract, or an explicit policy violation.
40
+ - **should-fix** — ships only with a stated reason. Real, but survivable.
41
+ - **note** — worth knowing, blocks nothing.
42
+
43
+ Every row cites the policy line it breaks. When you have no written rule to point
44
+ at, put `opinion` in the Policy column and keep the finding — but a wall of
45
+ opinions means the policy needs writing, not that the diff is bad.
46
+
47
+ ## Always In Scope
48
+
49
+ Whether or not the project wrote a rule about it:
50
+
51
+ - **Secrets** — credentials, tokens, keys in code, fixtures, or logs.
52
+ - **Data handling** — PII in logs, unbounded retention, data crossing a boundary
53
+ it should not.
54
+ - **Silent failure** — swallowed errors, empty catch blocks, ignored return codes.
55
+ - **Newly reachable surface** — a public API, route, or permission the change widens.
56
+
57
+ ## Out Of Scope
58
+
59
+ - Pre-existing problems in code the diff did not touch.
60
+ - Refactors the change did not necessitate.
61
+ - Anything already checked by `verify.md` — cite it, do not redo it.
62
+
63
+ ## Policy Feedback
64
+
65
+ If the same rule was violated repeatedly, or a finding could not be traced to any
66
+ written rule that clearly *should* exist, end the report with a short
67
+ **Policy amendments** section proposing the wording. A rule everyone breaks is a
68
+ broken rule, and stage 6 is where it gets fixed.
69
+
70
+ ## Rules
71
+
72
+ - **Never repair.** Report the finding; the fix goes back through the engineer so
73
+ it is planned and reviewed like any other change.
74
+ - **Cite or label.** No uncited findings pretending to be policy.
75
+ - **Report faithfully.** One blocker makes the verdict `hold`. Do not average.
76
+ - An empty findings table with a clear `ship` verdict is a good review.
77
+
78
+ ## Output
79
+
80
+ Write `docs/epics/$0/artifacts/review.md`, ending with a one-line verdict —
81
+ **ship** or **hold** — and, when it is a hold, the shortest list of changes that
82
+ would turn it into a ship.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: aidlc-native-spec
3
+ description: Collapse requirements and design into a single spec.md — testable requirements, acceptance criteria, and explicitly flagged concerns. Stage 2 of the AI-Native SDLC.
4
+ argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
5
+ ---
6
+
7
+ # Spec for Epic $0
8
+
9
+ You are the **Product Owner** agent.
10
+ Load your full persona from `.claude/agents/aidlc-native-product-owner.md` before starting.
11
+
12
+ ## Step 0: Load the Constraints
13
+
14
+ Before writing a single requirement, read and keep in context:
15
+
16
+ 1. `CLAUDE.md` — conventions, commands, architecture, known traps.
17
+ 2. Every project skill that bounds this work — security standards, API design
18
+ rules, brand and writing rules.
19
+ 3. The active workspace SDLC standard / profile — which sections are mandatory.
20
+ 4. Existing product docs covering the area, so the spec does not contradict what
21
+ already ships.
22
+
23
+ List what you loaded in the spec's `Constraints applied` section. A reviewer must be
24
+ able to tell what you were bound by.
25
+
26
+ ## Steps
27
+
28
+ 1. Read `docs/epics/$0/artifacts/intent.md`. It is the contract for *why*; the spec
29
+ is the contract for *what*.
30
+ 2. Use the structural tools (ast-graph `symbol`, `routes`, `blast-radius`) to learn
31
+ what already exists in the affected area before specifying new behavior.
32
+ 3. Write the spec at `docs/epics/$0/artifacts/spec.md`.
33
+ 4. Drive every `[CONCERN]` to resolution or explicit deferral before you call it done.
34
+
35
+ ## Spec Contents
36
+
37
+ ### Overview
38
+ One paragraph: what this is, and which line of intent.md it serves.
39
+
40
+ ### Constraints applied
41
+ The skills, standards and docs you loaded in Step 0.
42
+
43
+ ### User scenarios
44
+ Primary flow as given/when/then, plus edge and error paths — dependency down,
45
+ permission denied, empty state, boundary inputs, interruption and recovery.
46
+
47
+ ### Functional requirements
48
+ Ids `$0-FR01`, `$0-FR02`, … One testable behavior each. Each names the intent line
49
+ it traces to.
50
+
51
+ ### Non-functional requirements
52
+ Ids `$0-NFR01`, … Performance, reliability, security and privacy, accessibility,
53
+ compatibility, observability. Quantified.
54
+
55
+ ### Acceptance criteria
56
+ Ids `$0-AC01`, … Given/when/then, one behavior each, error states included.
57
+
58
+ ### Out of scope
59
+ What this explicitly does not do.
60
+
61
+ ## Flagging Concerns
62
+
63
+ Where the intent conflicts with a constraint, with itself, or with something that
64
+ already ships, write:
65
+
66
+ ```
67
+ > **[CONCERN]** <what conflicts, and with what> — *needs: <who or what decides>*
68
+ ```
69
+
70
+ Do not guess and move on. Do not silently narrow scope. Resolve each one inline with
71
+ the recorded decision, or defer it explicitly with a named owner.
72
+
73
+ ## Rules
74
+
75
+ - **No implementation detail** — no libraries, tables, endpoints, file layouts.
76
+ - Every requirement is testable and carries a stable id.
77
+ - Every requirement traces up to a line in intent.md.
78
+ - Quantify: "< 200 ms p95", never "fast".
79
+ - `Out of scope` is mandatory. An unbounded spec is not a spec.
80
+
81
+ ## Output
82
+
83
+ Write `docs/epics/$0/artifacts/spec.md` with no unresolved `[CONCERN]` blocks.