@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,121 @@
1
+ ---
2
+ name: annotate-artifact
3
+ description: Run a human-in-the-loop review of an epic artifact — open its Markdown in annotron, which renders it (Mermaid diagrams included) for point-and-click annotation, receive the feedback, and apply it BACK TO THE .md source, logging each round to the step's history. Invoke via /annotate-artifact <epic> [FILE.md]. Use when the user wants to review/refine an artifact interactively.
4
+ ---
5
+
6
+ # /annotate-artifact — MD-canonical review loop with annotron
7
+
8
+ Human-in-the-loop review of an epic artifact. Annotron renders the **Markdown source itself**
9
+ (markdown-it + merslim) so **Mermaid diagrams show as SVG** and the preview live-reloads on
10
+ every edit. The user annotates the rendered preview (point-and-click on elements / selected
11
+ text); you receive that feedback as JSON, apply it to the `.md`, and iterate until they
12
+ finalize.
13
+
14
+ Both tools ship with the AIDLC extension and are installed under `~/.claude/tools/` — no
15
+ `python`, no `pip`, no global `annotron` needed, just `node`:
16
+ - Renderer: `node "$HOME/.claude/tools/md-to-html.mjs"`
17
+ - annotron: `node "$HOME/.claude/tools/annotron/bin/annotron"`
18
+
19
+ **The one rule that makes this different from annotron's stock `/annotron` plugin:**
20
+ Markdown is the canonical source. Annotron renders the `.md` on the fly (never edit its
21
+ render). Annotation feedback arrives as selectors/text on the **rendered preview**, but you
22
+ **always apply edits to the `.md`**, then it live-reloads. `produces:` in `workspace.yaml`
23
+ points at `.md`, so the pipeline never sees HTML. Do NOT use annotron's bundled `/annotron`
24
+ command — its step 3 edits the render directly, the wrong layer here.
25
+
26
+ ## Arguments
27
+
28
+ `/annotate-artifact <epic> [FILE.md]`
29
+ - `<epic>` — epic id, e.g. `EPIC-001`.
30
+ - `[FILE.md]` — artifact to review, e.g. `PRD.md`. If omitted, list the `*.md` in the epic's
31
+ artifacts folder and ask which one (default to `PRD.md` if it exists).
32
+
33
+ Paths (relative to the open project): `ARTIFACTS = docs/epics/<epic>/artifacts`,
34
+ `MD = $ARTIFACTS/<FILE>.md`, `HTML = $ARTIFACTS/<FILE without .md>.html`.
35
+ Let `R = node "$HOME/.claude/tools/md-to-html.mjs"` and
36
+ `A = node "$HOME/.claude/tools/annotron/bin/annotron"`.
37
+
38
+ ## Loop
39
+
40
+ 1. **Export the HTML (for the read-only "Open HTML" button only).** `$R --all "$ARTIFACTS"`
41
+ (`--all` so cross-links between sibling artifacts resolve `.md`→`.html`). This is NOT what
42
+ the review shows — annotron renders the `.md` itself in step 2 — but keep the `.html`
43
+ export current.
44
+
45
+ 2. **Open.** `$A "$MD"` — open the **Markdown source** (not the `.html`). Annotron renders
46
+ it (markdown-it + merslim) so **Mermaid/diagrams appear as SVG**, and it live-reloads
47
+ whenever you Save the `.md`. Starts the background server (if needed), registers the file,
48
+ opens the review editor in the browser. Print the editor URL. Tell the user: turn on
49
+ **Annotate** (press `A`), click elements / select text, add notes, then **Send feedback**
50
+ — or just type a message. (Send does nothing until there is at least one annotation or a
51
+ message — expected, not a bug.)
52
+
53
+ 3. **Wait for feedback.** `$A poll "$MD"` — blocks until the user sends. (Poll is keyed by
54
+ the file you opened in step 2, so it must be `$MD`.) Output JSON:
55
+ - `items[]` — each `{ kind: element|text, selector, text, note }`
56
+ - `message` — freeform message
57
+ - `finalized: true` — the user clicked **Finalize** → go to step 6.
58
+ If it returns empty / times out with nothing, run it again.
59
+
60
+ **End signal (robust):** if `finalized` is true, OR the `message` is essentially just
61
+ "done" / "xong" / "finalize" / "close" / "stop" (with no `items`), the user is finished →
62
+ go to step 6. Tell the user up front they can end the loop either way — clicking Finalize,
63
+ or typing "done" and Send (the latter always works even if the Finalize button doesn't
64
+ respond).
65
+
66
+ 4. **Apply to the `.md` (never the `.html`, and ONLY this `.md`).** For each item, locate the
67
+ corresponding place in the **Markdown source** — match on the item's `text` (the
68
+ selected/element text) and `note`, not the CSS selector — and edit `MD`. The selector only
69
+ hints *where* in the doc; the change lands in the `.md`.
70
+ **Scope:** edit ONLY `$MD` (the artifact under review). Do **not** create or edit any other
71
+ file — no new `RELEASE.md`, no sibling artifacts, no source files. If a note implies broader
72
+ work, don't do it here; mention it in your reply and let the user drive it in the pipeline.
73
+
74
+ 5. **Log the revision, reply.**
75
+ - Editing `$MD` in step 4 already made annotron live-reload the preview (the server
76
+ watches the `.md`) — no manual re-render needed for the review.
77
+ - `$R --log "$ARTIFACTS" "<FILE>.md" "<the user's note(s)>" "<what you changed>"` — appends
78
+ a revision-history entry (`.annotation-history.json`). **This is what surfaces in the
79
+ pipeline History panel** — do it once per applied round so the step keeps its feedback
80
+ history.
81
+ - `$R --all "$ARTIFACTS"` — refresh the standalone `.html` export (keeps the "Open HTML"
82
+ button current, including the new history entry). Optional for the review itself.
83
+ - `$A poll "$MD" --reply "<short, action-focused summary>"` — posts your reply to the
84
+ browser conversation log and re-arms the poll. Then loop back to step 3.
85
+ - Keep the summary short: "Tightened the goals section, fixed the metric, added a risks table."
86
+
87
+ 6. **Finalize (exit — do NOT re-arm).** When the end signal fires (`finalized: true`, or a
88
+ "done"/"xong" message), the review is over. **Do not call `poll` again** — `poll --reply`
89
+ re-arms and would hang. Instead:
90
+ - Confirm to the user (in your normal reply) that the `.md` reflects every applied change
91
+ (it does — each round edited the `.md`).
92
+ - **Do NOT run `$A stop`.** annotron is a single shared server (port 7321) reused for every
93
+ file. The browser preview is a live iframe → `/artifact`; if you stop the server the open
94
+ tab loses its registration and shows a broken/empty page (the reported "empty after Save →
95
+ Done" bug). Leave it running — it's one lightweight process, reused by the next
96
+ review/preview, and torn down when the panel/extension closes.
97
+ - Stop. The `.html` export is a throwaway render of the `.md`; the next `$R --all`
98
+ overwrites it — harmless.
99
+
100
+ ## Guardrails
101
+
102
+ - **Never edit the rendered view or the `$HTML` export.** Edits go in `$MD`; annotron's
103
+ preview (and the `.html`) are derived from it.
104
+ - **Only touch `$MD`.** Never create or edit other files during the loop (no `RELEASE.md`,
105
+ no other artifacts, no code). This keeps edits inside the pre-authorized artifacts scope so
106
+ the loop doesn't stop to ask permission mid-review.
107
+ - **Never edit while a poll is in flight** — wait for the feedback JSON first.
108
+ - Do not add this loop to any pipeline `produces:` — MD stays the official artifact.
109
+ - One artifact per session. To review another file, re-invoke with that filename.
110
+
111
+ ## Permissions (optional)
112
+
113
+ By default Claude Code will ask before each file write. If you'd rather the loop run without
114
+ stopping to confirm every round, add these to `.claude/settings.json` yourself (project or
115
+ user-global) — the extension does NOT change your settings automatically:
116
+ - `Bash(node:*)` and `Bash(curl:*)` — the renderer / annotron / poll commands.
117
+ - `Edit(docs/epics/**)` and `Write(docs/epics/**)` — applying feedback to the `.md`.
118
+
119
+ Because the loop only ever edits the artifact under review (see Guardrails), scoping writes to
120
+ `docs/epics/**` is safe: the human's real approval is the annotron review itself. Leaving the
121
+ prompts on is perfectly fine too — you just confirm each edit.
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: epic-context
3
+ description: Load and maintain an epic's compact memory so continuing it (with any agent) is cheap on tokens. Reads docs/epics/<epic>/epic-memory.json FIRST as primary context, appends durable decisions/constraints as you work, and records a reflection on how to prompt/work better next time. Invoke /epic-context <epic> when starting or continuing an epic.
4
+ ---
5
+
6
+ # /epic-context — cheap, portable epic memory
7
+
8
+ Every epic can carry a compact memory at `docs/epics/<epic>/epic-memory.json`:
9
+ - `summary` — one paragraph: what the epic is + where it stands
10
+ - `entries[]` — distilled **decisions / constraints / context / notes**
11
+ - `reflections[]` — lessons on how to **prompt/work more effectively next time**
12
+
13
+ The point: a future session (any agent) reads this digest FIRST instead of
14
+ re-reading every artifact + git history — far fewer tokens. So keep it compact
15
+ and high-signal; it is a digest, not a transcript.
16
+
17
+ The tool ships with the AIDLC extension at `~/.claude/tools/epic-memory.mjs` and
18
+ runs with just `node`. Let `M = node "$HOME/.claude/tools/epic-memory.mjs"`.
19
+ Each write is auto-attributed (git identity, hostname fallback) + timestamped.
20
+
21
+ ## Arguments
22
+
23
+ `/epic-context <epic>` — e.g. `/epic-context EPIC-001`. Paths are relative to the
24
+ open project: `EPIC_DIR = docs/epics/<epic>`.
25
+
26
+ ## On start (continuing an epic)
27
+
28
+ 1. **Load memory first**: `$M show "$EPIC_DIR"`.
29
+ - If it prints a digest, treat it as your primary context. Only open the full
30
+ artifacts (`$EPIC_DIR/artifacts/*.md`) for the specific parts the memory
31
+ doesn't already cover — don't re-read everything.
32
+ - If it says "no epic memory yet", fall back to reading the artifacts, and
33
+ seed a summary once you understand the epic: `$M summary "$EPIC_DIR" --text "…"`.
34
+
35
+ ## While working
36
+
37
+ Append durable, reusable facts as you make them (not chit-chat):
38
+ - `$M add "$EPIC_DIR" --kind decision --text "Chose X over Y because …"`
39
+ - `$M add "$EPIC_DIR" --kind constraint --text "Must not touch Z / must keep …"`
40
+ - `$M add "$EPIC_DIR" --kind context --text "Key fact a newcomer would need"`
41
+
42
+ Keep the summary current when the epic's state changes materially:
43
+ `$M summary "$EPIC_DIR" --text "…"`.
44
+
45
+ ## At the end (or when the user gives notable feedback)
46
+
47
+ Record a reflection so the next session prompts/works better:
48
+ `$M reflect "$EPIC_DIR" --text "Next time: state target files + expected result up front to avoid back-and-forth"`.
49
+
50
+ ## Guardrails
51
+
52
+ - Compact and high-signal — this file exists to *save* tokens, so don't dump raw
53
+ prompts or long transcripts into it.
54
+ - It complements, never replaces, the `.md` artifacts (still canonical).
55
+ - Safe to commit: it travels with the epic so any teammate/agent benefits.