@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
package/AUTOMATION.md ADDED
@@ -0,0 +1,148 @@
1
+ # Automating AIDLC pipelines
2
+
3
+ The `aidlc` CLI is built to run unattended — in CI, a cron job, a git hook, or a
4
+ shell script. This guide covers the headless surface: exit codes, machine-readable
5
+ output, event streams, and a copy-paste GitHub Action.
6
+
7
+ > Everything here runs without VS Code. It needs the `claude` CLI on `PATH` and an
8
+ > auth method (`claude login`, `ANTHROPIC_API_KEY`, Bedrock, or Vertex). Run
9
+ > `aidlc doctor` first — it checks all of that and now exits non-zero if anything
10
+ > (including a broken skill or runner path) fails.
11
+
12
+ ## Exit codes
13
+
14
+ `aidlc run exec` distinguishes *finished* from *blocked* so a CI job can branch on it:
15
+
16
+ | Exit | Meaning |
17
+ |------|---------|
18
+ | `0` | Run reached `completed` (or stopped at `--until`, or a `--dry-run` preview) |
19
+ | `2` | Paused on a gate — awaiting human review, a rejected step, or a budget pause |
20
+ | `1` | Error — claude failed, artifacts missing, budget `on_exceed: fail`, etc. |
21
+
22
+ Add `--require-complete` to collapse every non-`completed` outcome to `1`. Use it
23
+ when a job must fail unless the whole pipeline ran to the end:
24
+
25
+ ```bash
26
+ aidlc run exec my-pipeline --auto-approve --require-complete
27
+ ```
28
+
29
+ Other commands follow the usual convention: `0` on success, `1` on failure.
30
+ `aidlc validate --strict`, `aidlc run verify`, and `aidlc doctor` all exit `1`
31
+ when something is wrong — drop them into a CI job as gates.
32
+
33
+ ## Machine-readable output (`--json`)
34
+
35
+ | Command | `--json` payload |
36
+ |---------|------------------|
37
+ | `aidlc doctor --json` | `{ ok, failures, sections: [{ title, checks: [{ label, pass, info }] }] }` |
38
+ | `aidlc validate --json` | `{ ok, configPath, counts, refIssues }` (or `{ ok:false, error }`) |
39
+ | `aidlc run verify --json` | `{ runId, ok, checked, drift: [...] }` |
40
+ | `aidlc run exec --json` | final `{ runId, outcome, exitCode, runStatus, totalCostUsd, steps }` |
41
+ | `aidlc status [runId] --json` | run list / one run's full state |
42
+ | `aidlc list --json`, `aidlc epic list --json`, … | workspace + epic inspection |
43
+
44
+ In `run exec --json`, claude's streamed output goes to **stderr** so stdout stays a
45
+ clean JSON document:
46
+
47
+ ```bash
48
+ aidlc run exec my-pipeline --auto-approve --json 2>/dev/null | jq '.totalCostUsd'
49
+ ```
50
+
51
+ ## Event stream (`tail --json`)
52
+
53
+ `aidlc tail --json` emits one NDJSON object per state transition — pipe it into a
54
+ notifier or a downstream trigger:
55
+
56
+ ```bash
57
+ aidlc tail --json | while read -r ev; do
58
+ case "$(jq -r .event <<<"$ev")" in
59
+ step_status) echo "step moved: $ev" ;;
60
+ run_status) curl -s -X POST "$SLACK_WEBHOOK" -d "{\"text\":\"$ev\"}" ;;
61
+ esac
62
+ done
63
+ ```
64
+
65
+ Event kinds: `seed`, `run_new`, `run_status`, `pointer`, `step_status`,
66
+ `step_revision`, `run_gone`. Every line carries `ts` and `runId`.
67
+
68
+ ## Passing context
69
+
70
+ `run start` and `agent run` accept context three ways, merged in order
71
+ (file → flags, last wins):
72
+
73
+ ```bash
74
+ aidlc run start my-pipeline \
75
+ --context-file ci-context.json \ # JSON object or key=value lines
76
+ --context epic=ABC-123 \ # repeatable
77
+ --context "env=staging,region=eu" # comma-separated also works
78
+ ```
79
+
80
+ ## Quiet mode
81
+
82
+ `-q, --quiet` suppresses decorative progress output (today: `run exec`'s
83
+ step-by-step chatter). Errors and `--json` payloads still print. Colour is handled
84
+ by chalk — it auto-disables when stdout is not a TTY and honours `NO_COLOR`.
85
+
86
+ ## GitHub Action recipe
87
+
88
+ A workflow that runs an AIDLC pipeline end-to-end on every push and fails the build
89
+ if it didn't complete:
90
+
91
+ ```yaml
92
+ # .github/workflows/aidlc.yml
93
+ name: AIDLC pipeline
94
+ on: [push]
95
+
96
+ jobs:
97
+ run-pipeline:
98
+ runs-on: ubuntu-latest
99
+ steps:
100
+ - uses: actions/checkout@v4
101
+
102
+ - uses: actions/setup-node@v4
103
+ with:
104
+ node-version: 20
105
+
106
+ - name: Install aidlc + claude
107
+ run: |
108
+ npm install -g @delete101020/aidlc
109
+ npm install -g @anthropic-ai/claude-code
110
+
111
+ - name: Preflight
112
+ run: aidlc doctor --json
113
+ env:
114
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
115
+
116
+ - name: Validate workspace
117
+ run: aidlc validate --strict
118
+
119
+ - name: Run the pipeline to completion
120
+ env:
121
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
122
+ run: |
123
+ RUN_ID="ci-${{ github.run_id }}"
124
+ aidlc run start my-pipeline --id "$RUN_ID" \
125
+ --context "sha=${{ github.sha }},branch=${{ github.ref_name }}"
126
+ aidlc run exec "$RUN_ID" --auto-approve --require-complete --json \
127
+ > run-summary.json 2>run.log
128
+ cat run.log
129
+
130
+ - name: Verify artifacts (drift check)
131
+ run: aidlc run verify "ci-${{ github.run_id }}" --json
132
+
133
+ - uses: actions/upload-artifact@v4
134
+ if: always()
135
+ with:
136
+ name: aidlc-run
137
+ path: |
138
+ run-summary.json
139
+ run.log
140
+ .aidlc/runs/
141
+ ```
142
+
143
+ Notes:
144
+ - `--auto-approve` clears `human_review` gates so the run doesn't block on a person.
145
+ Drop it if you *want* the job to stop (exit `2`) at a review gate.
146
+ - Steps with `auto_review: true` run their `auto_review_runner` validator
147
+ automatically — a `reject` stops the run with a non-zero exit.
148
+ - A pipeline `budget` with `on_exceed: fail` caps spend and fails the job if exceeded.