@rasensio/aidlc 1.27.0 โ†’ 1.27.2

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 (49) hide show
  1. package/README.md +334 -54
  2. package/dist/commands/discover.d.ts.map +1 -1
  3. package/dist/commands/discover.js +32 -4
  4. package/dist/commands/discover.js.map +1 -1
  5. package/dist/commands/doctor.js +5 -1
  6. package/dist/commands/doctor.js.map +1 -1
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/update.d.ts +35 -0
  9. package/dist/commands/update.d.ts.map +1 -1
  10. package/dist/commands/update.js +162 -35
  11. package/dist/commands/update.js.map +1 -1
  12. package/dist/compile/install-plan.d.ts +45 -0
  13. package/dist/compile/install-plan.d.ts.map +1 -1
  14. package/dist/compile/install-plan.js +49 -6
  15. package/dist/compile/install-plan.js.map +1 -1
  16. package/dist/compile/loaders.d.ts.map +1 -1
  17. package/dist/compile/loaders.js +10 -1
  18. package/dist/compile/loaders.js.map +1 -1
  19. package/dist/compile/skill-format.d.ts +64 -0
  20. package/dist/compile/skill-format.d.ts.map +1 -1
  21. package/dist/compile/skill-format.js +133 -0
  22. package/dist/compile/skill-format.js.map +1 -1
  23. package/dist/discover/scanner.d.ts +20 -1
  24. package/dist/discover/scanner.d.ts.map +1 -1
  25. package/dist/discover/scanner.js +21 -3
  26. package/dist/discover/scanner.js.map +1 -1
  27. package/dist/doctor/git.d.ts +15 -0
  28. package/dist/doctor/git.d.ts.map +1 -1
  29. package/dist/doctor/git.js +28 -0
  30. package/dist/doctor/git.js.map +1 -1
  31. package/dist/doctor/migrations/artifact-source-drift.d.ts +41 -0
  32. package/dist/doctor/migrations/artifact-source-drift.d.ts.map +1 -0
  33. package/dist/doctor/migrations/artifact-source-drift.js +153 -0
  34. package/dist/doctor/migrations/artifact-source-drift.js.map +1 -0
  35. package/dist/doctor/migrations/context-doc-stale.d.ts +34 -0
  36. package/dist/doctor/migrations/context-doc-stale.d.ts.map +1 -0
  37. package/dist/doctor/migrations/context-doc-stale.js +130 -0
  38. package/dist/doctor/migrations/context-doc-stale.js.map +1 -0
  39. package/dist/doctor/migrations/index.d.ts.map +1 -1
  40. package/dist/doctor/migrations/index.js +14 -0
  41. package/dist/doctor/migrations/index.js.map +1 -1
  42. package/dist/operational/discover.d.ts.map +1 -1
  43. package/dist/operational/discover.js +3 -1
  44. package/dist/operational/discover.js.map +1 -1
  45. package/dist/operational/emit.d.ts +11 -0
  46. package/dist/operational/emit.d.ts.map +1 -1
  47. package/dist/operational/emit.js +33 -11
  48. package/dist/operational/emit.js.map +1 -1
  49. package/package.json +9 -2
package/README.md CHANGED
@@ -1,25 +1,55 @@
1
- # @rasensio/aidlc
1
+ <!-- Generated from the repo-root README.md by packages/cli/scripts/sync-readme.mjs.
2
+ Edit that file, not this one. npm renders this copy; GitHub renders the root. -->
2
3
 
3
- Structured lifecycle guidance for AI coding agents across platforms. One set of skills, every major AI coding tool.
4
+ <div align="center">
4
5
 
6
+ # `$ aidlc_`
7
+
8
+ ## AI codes fast. AIDLC makes it ship right.
9
+
10
+ A real software lifecycle for AI coding agents: **phases, gates, state, and traceability** โ€” from idea to maintenance, on any agent platform.
11
+
12
+ [![npm](https://img.shields.io/npm/v/%40rasensio%2Faidlc?logo=npm&color=cb3837)](https://www.npmjs.com/package/@rasensio/aidlc)
13
+ [![downloads](https://img.shields.io/npm/dm/%40rasensio%2Faidlc?color=1f9d55)](https://www.npmjs.com/package/@rasensio/aidlc)
14
+ [![node](https://img.shields.io/node/v/%40rasensio%2Faidlc?logo=node.js&logoColor=white)](https://nodejs.org)
5
15
  [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/rasensio/aidlc/blob/main/LICENSE)
16
+ [![website](https://img.shields.io/badge/docs-aidlc.rodrigoasensio.com-6d28d9)](https://aidlc.rodrigoasensio.com)
17
+
18
+ **[๐ŸŒ Homepage](https://aidlc.rodrigoasensio.com)** ยท [๐Ÿ“š Docs](https://aidlc.rodrigoasensio.com/docs/) ยท [๐ŸŽ“ Tutorials](https://aidlc.rodrigoasensio.com/tutorials/) ยท [๐Ÿ“ Blog](https://aidlc.rodrigoasensio.com/blog/) ยท [๐Ÿ“ฆ npm](https://www.npmjs.com/package/@rasensio/aidlc)
19
+
20
+ ```bash
21
+ npx @rasensio/aidlc init
22
+ ```
23
+
24
+ **One command. Any agent.**
6
25
 
7
- ## What is AIDLC?
26
+ </div>
8
27
 
9
- AIDLC brings phase-driven workflows, review gates, and quality checkpoints to AI-assisted software development. Instead of letting your AI assistant jump straight into code, AIDLC guides it through structured phases โ€” ideation, requirements, design, implementation, testing, deployment, and maintenance.
28
+ ---
10
29
 
11
- Works with **Claude Code**, **Cursor**, **Windsurf**, **Kiro**, and **Codex**.
30
+ ## The problem isn't speed
12
31
 
13
- ## Requirements
32
+ Agents outpace the capacity to review what they produce. What's missing isn't throughput โ€” it's the lifecycle around it:
14
33
 
15
- **Node.js >= 22.13.** The knowledge graph uses the built-in `node:sqlite` module โ€” zero native dependencies, but it needs a modern runtime.
34
+ - requirements anyone actually agreed to
35
+ - designs anyone actually challenged
36
+ - tests mapped to the criteria they're supposed to prove
37
+ - a record of why decisions were made
16
38
 
17
- > **Upgrading from an earlier version?** The CLI previously supported Node >= 18. Upgrade your Node runtime (e.g. `nvm install 22`); no other migration steps are required โ€” existing `.aidlc/` state and skills work unchanged.
39
+ AIDLC adds that missing lifecycle **without slowing the agent down**. It works with **Claude Code**, **Kiro**, **Cursor**, **Windsurf**, **Codex**, **GitHub Copilot** โ€” and any platform that reads skills. State lives as plain YAML in your repo: no server, no lock-in.
40
+
41
+ ## The loop
42
+
43
+ An idea arrives mid-task, gets captured in five seconds, and comes back out the far end with a number attached to it.
44
+
45
+ > **[View this diagram on GitHub](https://github.com/rasensio/aidlc/blob/main/README.md#the-loop)** โ€” npm does not render Mermaid.
46
+
47
+ Nothing in that picture lives in a database. Every box is a file in your repository, readable by the next agent, the next session, and you.
18
48
 
19
49
  ## Quick Start
20
50
 
21
51
  ```bash
22
- # Set up AIDLC once โ€” interactive wizard, or pass --platform to skip prompts
52
+ # 1 โ€” Set up once (interactive wizard, or pass --platform to skip prompts)
23
53
  npx @rasensio/aidlc init --platform claude-code
24
54
  ```
25
55
 
@@ -31,71 +61,168 @@ Then work from your AI coding tool. In Claude Code, invoke the entry point:
31
61
 
32
62
  It reads your lifecycle state and offers the next actions โ€” continue an in-progress instance, start something new, check status, or review an artifact. You can also just describe what you want ("help me fix a bug") and the matching skill activates on its own.
33
63
 
34
- ## CLI Commands
64
+ Prefer the terminal? The same state protocol is addressable directly:
65
+
66
+ ```bash
67
+ aidlc start full-feature --name dark-mode
68
+ aidlc status
69
+ ```
35
70
 
36
- The CLI has two core jobs: **bootstrap** (installing and refreshing skills) and **CI enforcement** (`aidlc gate`). Lifecycle work happens inside your AI tool via skills; the runtime commands below remain available as terminal shortcuts for the same state protocol.
71
+ ```text
72
+ Name Template Phase Completion Owner Stalled Cost Coverage Tasks
73
+ ------------------ ------------ -------------- ---------- ---------- ------- ----- -------- -------
74
+ 20260821-dark-mode full-feature implementation 57% session-a1 no $4.18 12/14 9/12 โ–ธ1
75
+ 20260824-login-500 bugfix testing 80% - no $0.92 3/3 4/4
76
+ ```
37
77
 
38
- | Command | Purpose |
39
- |---------|---------|
40
- | `aidlc` (no arguments) | Interactive menu of common commands; each entry shows the command it runs |
41
- | `aidlc menu` | The same menu, addressable by name |
42
- | `aidlc init [--platform <id>]` | Set up AIDLC: interactive wizard, or non-interactive with `--platform` |
43
- | `aidlc update` | Update CLI and refresh project skills |
44
- | `aidlc gate <phase>` | CI gate check (exit 0 = pass, 1 = fail) |
45
- | `aidlc start [template]` | Begin a new lifecycle instance |
46
- | `aidlc continue [instance]` | Resume the active instance |
47
- | `aidlc status [--json]` | Show progress across active instances |
48
- | `aidlc transition <instance>` | Evaluate gates and advance phase |
49
- | `aidlc review <artifact>` | Adversarial review of an artifact |
50
- | `aidlc discover [--no-knowledge]` | Scan codebase, generate context docs, seed the knowledge graph |
51
- | `aidlc docs` | Generate onboarding documentation |
52
- | `aidlc knowledge <subcommand>` | Query and update the local knowledge graph (see below) |
53
- | `aidlc add action <description>` | Create lifecycle automation from a natural language description |
54
- | `aidlc compliance <subcommand>` | Install compliance packs and report evidence per control (`list`, `add`, `remove`, `check`, `report`) |
78
+ Or run `aidlc` with no arguments for an interactive menu of the common commands.
55
79
 
56
- ## Knowledge Graph
80
+ ## The gate is the whole idea
57
81
 
58
- AIDLC keeps a persistent, git-versioned memory of your codebase in `.aidlc/knowledge/` โ€” human-readable YAML as the source of truth, backed by a SQLite FTS5 index for fast queries. Agents consult it before re-exploring code and record what they learn after changing it.
82
+ A phase doesn't end because an agent says it did. It ends when the gate lets it.
59
83
 
60
- ```bash
61
- aidlc discover # seed from static analysis (modules, deps, endpoints, conventions)
62
- aidlc knowledge query "payment" # full-text search
63
- aidlc knowledge get payment-service # one entity + its relationships
64
- aidlc knowledge graph payment-service --depth 2 # subgraph traversal
65
- aidlc knowledge context --max-tokens 2000 # markdown summary for agent prompts
66
- aidlc knowledge add --id my-decision --type decision --name "Use X" --description "โ€ฆ"
67
- aidlc knowledge sync # after git pull: rebuild index, flag suspicious merges
68
- ```
84
+ > **[View this diagram on GitHub](https://github.com/rasensio/aidlc/blob/main/README.md#the-gate-is-the-whole-idea)** โ€” npm does not render Mermaid.
85
+
86
+ The same binary runs in CI. `aidlc gate <instance> <phase>` exits 0 when the phase is complete and 1 when it isn't, so a pull request can be blocked by the identical check the agent just faced โ€” see [`ci/aidlc-gate.yml`](https://github.com/rasensio/aidlc/blob/main/ci/aidlc-gate.yml).
87
+
88
+ | | |
89
+ |---|---|
90
+ | **๐Ÿšฆ Phases with gates** | Each phase exits through a gate that requires artifacts, adversarial review, and a test per criterion. Agents cannot skip ahead. |
91
+ | **๐Ÿ’พ State on disk** | Lifecycle state is YAML under `.aidlc/` โ€” readable across agents, sessions, and git worktrees. Claims stop concurrent sessions from colliding. |
92
+ | **๐Ÿ”— Traceability built in** | Every acceptance criterion gets an ID. Tasks reference criteria; tests reference both. The gate fails on any criterion without a test. |
69
93
 
70
- Multi-user teams can install a git merge driver that auto-resolves concurrent edits to knowledge files (`aidlc knowledge install-merge-driver` โ€” asks for confirmation before touching git config). The SQLite index (`index.db`) is a disposable cache and stays out of git; only the YAML is versioned.
94
+ ## How much process? Pick a template
95
+
96
+ Ceremony that fits a new subsystem will make people route around a typo fix. So the amount of lifecycle is a choice you make per piece of work, and it is the choice worth getting right.
97
+
98
+ > **[View this diagram on GitHub](https://github.com/rasensio/aidlc/blob/main/README.md#how-much-process-pick-a-template)** โ€” npm does not render Mermaid.
99
+
100
+ | Template | Scope | Description |
101
+ |----------|-------|-------------|
102
+ | `full-feature` | full | Full lifecycle from ideation through maintenance with adversarial review gates |
103
+ | `quick-feature` | standard | Standard feature workflow from requirements through deployment |
104
+ | `bugfix` | standard | Bug fix workflow with reproduction steps, no design phase |
105
+ | `spike` | standard | Spike or research workflow for exploration and findings documentation |
106
+ | `micro-task` | micro | Minimal workflow for small tasks requiring only implementation and testing |
107
+
108
+ **Scope** is the second dial, and the one people get wrong: it is not how big or ambitious the work is, it is which phases run. **Full** (all phases), **Standard** (Requirements โ†’ Deployment), **Micro** (Implementation + Testing only). A large change with a settled design is standard; a small change nobody has thought about is full.
109
+
110
+ ## Lifecycle Phases
111
+
112
+ | Phase | Purpose |
113
+ |-------|---------|
114
+ | Ideation | Explore and validate ideas, identify alternatives |
115
+ | Requirements | Define acceptance criteria, scope, and constraints |
116
+ | Design | Produce architecture and technical design documents |
117
+ | Implementation | Write code following established conventions |
118
+ | Testing | Validate correctness and coverage |
119
+ | Deployment | Release to target environment |
120
+ | Maintenance | Monitor, patch, and evolve |
121
+
122
+ When requirements move after their phase closed, `aidlc amend <instance>` retires the old criterion, issues a replacement, and reopens exactly the phases that assumption invalidated โ€” so drift shows up in history instead of hiding behind gates that all still pass.
123
+
124
+ ## Two people, one repo
125
+
126
+ Claims are a lease on an instance, not a lock on the filesystem. They are what keeps two sessions from silently overwriting each other's phase.
127
+
128
+ > **[View this diagram on GitHub](https://github.com/rasensio/aidlc/blob/main/README.md#two-people-one-repo)** โ€” npm does not render Mermaid.
129
+
130
+ For genuinely concurrent work, use a worktree: `aidlc start --worktree` puts the second instance in its own checkout, because two sessions in one checkout collide on git long before they collide on state.
71
131
 
72
132
  ## Supported Platforms
73
133
 
134
+ One canonical skill body is written once and packaged into whatever each tool reads natively.
135
+
136
+ > **[View this diagram on GitHub](https://github.com/rasensio/aidlc/blob/main/README.md#supported-platforms)** โ€” npm does not render Mermaid.
137
+
74
138
  | Platform | Config Location | Strategy |
75
139
  |----------|----------------|----------|
76
140
  | Claude Code | `.claude/skills/aidlc-*/SKILL.md` | Thin activation shims |
77
141
  | Kiro | `.kiro/skills/aidlc-*/SKILL.md` + steering | Shims + steering file |
78
142
  | Cursor | `.cursor/rules/aidlc-*.mdc` | Description-based rules |
79
143
  | Windsurf | `.windsurf/rules/aidlc-*.md` | Size-constrained pointer shims |
80
- | Codex | `.agents/skills/aidlc-*/SKILL.md` + `AGENTS.md` | Full skill bodies + managed block |
81
- | GitHub Copilot | `.github/skills/aidlc-*/SKILL.md` + `.github/copilot-instructions.md` | Full skill bodies + managed block |
144
+ | Codex | `AGENTS.md` | Managed delimiter block |
145
+ | GitHub Copilot | `.github/skills/aidlc-*/SKILL.md` + `.github/copilot-instructions.md` | Full bodies + instructions block |
146
+
147
+ Switching assistants, or having two people on different ones, doesn't fork your process: the rules are in your repository, the packaging is per-tool.
148
+
149
+ ## It Closes the Loop
150
+
151
+ Most tooling stops at "the feature shipped." AIDLC keeps measuring after that, from state you already have:
152
+
153
+ ```bash
154
+ aidlc metrics
155
+ ```
156
+
157
+ ```text
158
+ Feedback-loop metrics (attribution: full-count-per-cause)
159
+ Coverage: 14 instances, 5 with defect linkage, 12 with cost data
160
+
161
+ By template:
162
+ full-feature: 6 completed, change failure rate 33%, avg lead time 2.4d
163
+ phases: ideation 3.1h, requirements 5.8h, design 7.2h, implementation 1.4d
164
+ bugfix: 5 completed, change failure rate 0%, avg lead time 4.6h
165
+
166
+ By instance:
167
+ 20260821-dark-mode (full-feature): complete, lead 2.1d, cost $4.18, caused 1 bugfix(es), true cost $5.10
168
+ ```
169
+
170
+ - **`aidlc metrics`** โ€” DORA-style roll-ups: change failure rate per template, lead time per phase, and true feature cost including the bugfixes it caused
171
+ - **`aidlc cost`** โ€” per-instance cost tracking with metered capture across every session that touched the instance
172
+ - **`caused_by`** โ€” links a bugfix back to the feature that produced it, so quality leaks become measurable instead of anecdotal
173
+
174
+ ## Learn it
175
+
176
+ The tutorials are on the website, where the terminal transcripts are interactive.
177
+
178
+ **[๐ŸŽ“ Getting Started](https://aidlc.rodrigoasensio.com/tutorials/getting-started/)** โ€” five steps: install, pick a template, run one instance end to end, enforce the gate in CI.
179
+
180
+ **[๐Ÿ“– The deep dive](https://aidlc.rodrigoasensio.com/tutorials/deep-dive/)** โ€” eight short chapters covering everything past that first session:
181
+
182
+ 1. [Why the work lives in files](https://aidlc.rodrigoasensio.com/tutorials/deep-dive-why-files/)
183
+ 2. [How much process is enough](https://aidlc.rodrigoasensio.com/tutorials/deep-dive-how-much-process/)
184
+ 3. [The check that says no](https://aidlc.rodrigoasensio.com/tutorials/deep-dive-gates-that-say-no/)
185
+ 4. [Notes about your code, kept once](https://aidlc.rodrigoasensio.com/tutorials/deep-dive-memory/)
186
+ 5. [What it cost, and what it really cost](https://aidlc.rodrigoasensio.com/tutorials/deep-dive-what-it-cost/)
187
+ 6. [Ideas that don't evaporate](https://aidlc.rodrigoasensio.com/tutorials/deep-dive-ideas-you-keep/)
188
+ 7. [Two people, one checkout](https://aidlc.rodrigoasensio.com/tutorials/deep-dive-two-people/)
189
+ 8. [Making it yours](https://aidlc.rodrigoasensio.com/tutorials/deep-dive-making-it-yours/)
82
190
 
83
- GitHub Copilot gets full skill bodies rather than pointer shims, so every phase skill
84
- activates on its own description and `/aidlc` works as a slash command. The instruction
85
- block goes in `.github/copilot-instructions.md` because that is the one customization file
86
- every Copilot surface reads โ€” editor chat, the cloud agent, code review and the CLI. It
87
- writes nothing under `.claude/`, `.agents/` or any other vendor's directory.
191
+ Reference material is generated from the shipped packages, so it cannot drift from what you install: **[CLI reference](https://aidlc.rodrigoasensio.com/docs/cli/)** ยท **[phases](https://aidlc.rodrigoasensio.com/docs/phases/ideation/)** ยท **[skills](https://aidlc.rodrigoasensio.com/docs/skills/overview/)** ยท **[templates](https://aidlc.rodrigoasensio.com/docs/templates/bugfix/)** ยท **[guidance layers](https://aidlc.rodrigoasensio.com/docs/guidance/secure-defaults/)** ยท **[glossary](https://aidlc.rodrigoasensio.com/docs/glossary/)**.
88
192
 
89
- ## How It Works
193
+ And [๐Ÿ“ the blog](https://aidlc.rodrigoasensio.com/blog/) has a post per release, written the moment the work landed โ€” including the ones where it went wrong.
90
194
 
91
- 1. **Install** โ€” `aidlc init` creates a `.aidlc/` directory with skills and configuration, compiled for your platform
92
- 2. **Pick a template** โ€” full features, quick tasks, bug fixes, or spikes
93
- 3. **Your AI follows the lifecycle** โ€” skills activate in each phase, and the agent manages state directly in `.aidlc/state/` (plain YAML)
94
- 4. **Gates enforce quality** โ€” phase transitions require artifacts to be complete; `aidlc gate` gives CI the same check
195
+ ## CLI Commands
95
196
 
96
- ## Non-Interactive Setup
197
+ The CLI has two core jobs: **bootstrap** (installing and refreshing skills โ€” the step that can't be a skill) and **CI enforcement** (`aidlc gate`, which runs where no agent does). Lifecycle work itself happens inside your AI tool via skills; the runtime commands below remain available as terminal shortcuts for the same state protocol.
97
198
 
98
- For CI or AI-agent-driven setup:
199
+ | Command | Purpose |
200
+ |---------|---------|
201
+ | `aidlc` (no arguments) | Interactive menu of common commands; each entry shows the command it runs |
202
+ | `aidlc menu` | The same menu, addressable by name |
203
+ | `aidlc init [--platform <id>]` | Set up AIDLC: interactive wizard, or non-interactive with `--platform` |
204
+ | `aidlc update` | Update CLI and refresh project skills |
205
+ | `aidlc gate <instance> [phase]` | CI gate check (exit 0 = pass, 1 = fail) |
206
+ | `aidlc start [template]` | Begin a new lifecycle instance (`--name`, `--scope`, `--worktree`) |
207
+ | `aidlc continue [instance]` | Resume the active instance |
208
+ | `aidlc status [--json]` | Show progress across active instances (`--all`, `--prune`) |
209
+ | `aidlc transition <instance>` | Evaluate gates and advance phase |
210
+ | `aidlc amend <instance>` | Record a requirements amendment and reopen the phases it invalidated (`--impact` is read-only) |
211
+ | `aidlc review <instance> <artifact>` | Adversarial review of a lifecycle artifact |
212
+ | `aidlc metrics [--json]` | DORA-style metrics: change failure rate, lead times, true cost |
213
+ | `aidlc cost` | Per-instance cost tracking: reports, capture, rates, hooks |
214
+ | `aidlc claim` / `release` | Claim or release an instance for this session |
215
+ | `aidlc knowledge` | Local knowledge graph โ€” persistent codebase memory for agents |
216
+ | `aidlc discover` | Scan codebase, generate context docs |
217
+ | `aidlc docs` | Generate onboarding documentation |
218
+ | `aidlc doctor` | Check and repair repo hygiene |
219
+ | `aidlc constitution` | Import a product vision document and track the repo scope derived from it |
220
+ | `aidlc compliance` | Install compliance packs and report evidence per control (`list`, `add`, `remove`, `check`, `report`) |
221
+ | `aidlc roadmap` | Project the roadmap onto GitHub Issues (`sync`), or seed an item from one (`import`) |
222
+ | `aidlc add` | Add framework components: an `action` on a lifecycle event, or an app-owned `skill` |
223
+
224
+ <details>
225
+ <summary><b>Non-interactive setup (CI or agent-driven)</b></summary>
99
226
 
100
227
  ```bash
101
228
  # Apply defaults (or keep the existing config) without prompts
@@ -105,6 +232,8 @@ npx @rasensio/aidlc init --non-interactive
105
232
  npx @rasensio/aidlc init --platform claude-code
106
233
  ```
107
234
 
235
+ </details>
236
+
108
237
  ## Configuration
109
238
 
110
239
  Project configuration lives in `.aidlc/config.yaml`:
@@ -118,6 +247,157 @@ claim_timeout_minutes: 60
118
247
 
119
248
  Without this file, AIDLC defaults to Micro scope (Implementation + Testing only).
120
249
 
250
+ ## Compliance packs
251
+
252
+ A compliance pack applies a regime's controls while code is written and reports the
253
+ evidence the lifecycle already produces. Packs are opt-in: with none installed,
254
+ nothing changes. Install one with `aidlc compliance add <pack>`, and it applies from
255
+ the next phase โ€” advisory by default, so findings are recorded and reported without
256
+ blocking. Set `compliance.enforce: true` in `.aidlc/config.yaml` to make a critical
257
+ control finding block a phase transition.
258
+
259
+ Packs describe themselves as guidance toward a regime. Nothing a pack emits states or
260
+ implies that a project is compliant, certified, or audit-ready.
261
+
262
+ `aidlc compliance check` assesses a change against the installed controls, for use in
263
+ continuous integration. Its exit codes:
264
+
265
+ | Exit | Meaning |
266
+ |------|---------|
267
+ | 0 | No failing control, or failures present in advisory mode |
268
+ | 1 | A failing critical control, with `--enforce` |
269
+ | 2 | Usage or pack-load error, or a control left unassessed with `--enforce` |
270
+
271
+ `--enforce` raises the exit code for that one invocation and reads no config, so a
272
+ failing pull-request check does not require blocking every local phase transition. An
273
+ unassessed control exits non-zero under `--enforce` rather than passing silently: a
274
+ control nothing looked at is never a pass.
275
+
276
+ ## Architecture
277
+
278
+ Three packages, one direction of dependency.
279
+
280
+ > **[View this diagram on GitHub](https://github.com/rasensio/aidlc/blob/main/README.md#architecture)** โ€” npm does not render Mermaid.
281
+
282
+ - **`@rasensio/aidlc-content`** โ€” Knowledge layer. Skills, templates, guidance documents, capability maps, and phase definitions. The single source of truth for what AIDLC knows about lifecycle phases.
283
+ - **`@rasensio/aidlc`** (CLI) โ€” Engine. Orchestrates lifecycle state, compiles skills into platform-native formats, evaluates transition gates, and manages instance sessions.
284
+ - **`@rasensio/aidlc-website`** โ€” Documentation and marketing site at [aidlc.rodrigoasensio.com](https://aidlc.rodrigoasensio.com).
285
+
286
+ Content is the shared dependency. The CLI reads it at compile time to produce installable artifacts. The website reads it at build time to generate documentation pages โ€” which is why the reference docs cannot describe a command the binary doesn't have.
287
+
288
+ <details>
289
+ <summary><b>Monorepo structure</b></summary>
290
+
291
+ This repository is a pnpm workspace:
292
+
293
+ ```
294
+ aidlc/
295
+ โ”œโ”€โ”€ docs/ # How AIDLC works โ€” nine prose pages on why each subsystem exists
296
+ โ”œโ”€โ”€ packages/
297
+ โ”‚ โ”œโ”€โ”€ content/ # @rasensio/aidlc-content โ€” skills, templates, guidance, capabilities
298
+ โ”‚ โ”œโ”€โ”€ cli/ # @rasensio/aidlc โ€” CLI tool (npm package)
299
+ โ”‚ โ””โ”€โ”€ website/ # @rasensio/aidlc-website โ€” documentation website (Next.js)
300
+ โ”œโ”€โ”€ ci/ # CI pipeline configuration
301
+ โ”œโ”€โ”€ pnpm-workspace.yaml
302
+ โ”œโ”€โ”€ tsconfig.json # Shared compiler options + project references
303
+ โ””โ”€โ”€ package.json # Workspace-level scripts
304
+ ```
305
+
306
+ | Package | Description | Published |
307
+ |---------|-------------|-----------|
308
+ | `@rasensio/aidlc-content` | Shared content (skills, templates, guidance layers, capability maps) | npm |
309
+ | `@rasensio/aidlc` | CLI tool โ€” lifecycle engine, platform adapters, state management | npm |
310
+ | `@rasensio/aidlc-website` | Marketing site + documentation (Next.js, Tailwind, static export) | AWS Amplify โ€” [aidlc.rodrigoasensio.com](https://aidlc.rodrigoasensio.com) |
311
+
312
+ </details>
313
+
314
+ ## How this repo works
315
+
316
+ Reference docs tell you *what* a command does. [**`docs/`**](https://github.com/rasensio/aidlc/blob/main/docs/README.md) tells you *why the subsystem exists and what breaks without it* โ€” nine pages, written for a person trying to understand the system and for an agent about to change it. Read the relevant page before modifying a subsystem: several of these designs look arbitrary until you know which bug bought them.
317
+
318
+ | Page | What it covers |
319
+ |---|---|
320
+ | [lifecycle.md](https://github.com/rasensio/aidlc/blob/main/docs/lifecycle.md) | Instances, templates, scope, phases, gates, amendments |
321
+ | [state-and-concurrency.md](https://github.com/rasensio/aidlc/blob/main/docs/state-and-concurrency.md) | State files, claims, the registry, worktrees |
322
+ | [roadmap.md](https://github.com/rasensio/aidlc/blob/main/docs/roadmap.md) | Capture, triage, promote, and the GitHub Issues projection |
323
+ | [reviews-and-guidance.md](https://github.com/rasensio/aidlc/blob/main/docs/reviews-and-guidance.md) | Adversarial review, guidance layers, context docs, the constitution |
324
+ | [cost-tracking.md](https://github.com/rasensio/aidlc/blob/main/docs/cost-tracking.md) | What a feature cost, and how the number is attributed |
325
+ | [metrics.md](https://github.com/rasensio/aidlc/blob/main/docs/metrics.md) | Change failure rate, lead times, true cost |
326
+ | [knowledge-graph.md](https://github.com/rasensio/aidlc/blob/main/docs/knowledge-graph.md) | Persistent codebase memory for agents |
327
+ | [skills-and-platforms.md](https://github.com/rasensio/aidlc/blob/main/docs/skills-and-platforms.md) | One canonical skill body, six platform packagings |
328
+ | [hygiene-and-compliance.md](https://github.com/rasensio/aidlc/blob/main/docs/hygiene-and-compliance.md) | `aidlc doctor`, compliance packs |
329
+
330
+ ## Development
331
+
332
+ **Prerequisites:** Node.js >= 22.13 (the CLI's knowledge graph uses the built-in `node:sqlite` module, unflagged since 22.13) and pnpm >= 9.
333
+
334
+ ```bash
335
+ pnpm install
336
+ pnpm build # content first, then CLI + website in parallel
337
+ pnpm test # all tests, one package at a time (see note below)
338
+ pnpm lint # type-check all packages
339
+
340
+ pnpm --filter @rasensio/aidlc-website dev # work on the site locally
341
+ ```
342
+
343
+ Tests use **vitest** (unit + integration) and **fast-check** (property-based testing):
344
+
345
+ ```bash
346
+ pnpm --filter @rasensio/aidlc test
347
+ pnpm --filter @rasensio/aidlc-content test
348
+ pnpm --filter @rasensio/aidlc-website test
349
+ ```
350
+
351
+ `pnpm test` is `pnpm -r --workspace-concurrency=1 test` โ€” the packages run one at a
352
+ time, deliberately. vitest already parallelises test files across workers, so a
353
+ second axis of parallelism oversubscribes the CPU and pushes subprocess-spawning
354
+ tests past their timeout. Measured on an idle machine: 263s for `packages/cli` with
355
+ two 30-second timeouts when the packages run concurrently, against 71s and 75s for
356
+ the whole workspace when they do not. Serialising is both faster and greener โ€”
357
+ please don't change it back.
358
+
359
+ Every push to `main` and every pull request runs the same gate as a release โ€”
360
+ `pnpm build`, `pnpm lint`, `pnpm test` โ€” via [`.github/workflows/ci.yml`](https://github.com/rasensio/aidlc/blob/main/.github/workflows/ci.yml).
361
+
362
+ **One caution, learned the hard way:** during development invoke the workspace build,
363
+ `node packages/cli/dist/cli.js`, never `npx aidlc`. `npx` prefers a globally installed
364
+ binary, and it once reported "0 files updated, 35 unchanged" while the edited files sat
365
+ changed on disk.
366
+
367
+ <details>
368
+ <summary><b>Project conventions & migration notes</b></summary>
369
+
370
+ - TypeScript, ES modules, Node >= 22.13
371
+ - Pure-function core (no I/O) with I/O pushed to edges
372
+ - Pinned dependencies
373
+ - Property-based tests for core logic
374
+ - Content package uses `import.meta.url` for path resolution
375
+
376
+ > **Migration note (v1.0):** the CLI previously ran on Node >= 18. The local
377
+ > knowledge graph feature raised the floor to Node 22.13+ to use `node:sqlite`
378
+ > with zero native dependencies. Users on Node 18/20 must upgrade their Node
379
+ > runtime (e.g. `nvm install 22`); no other migration steps are required.
380
+
381
+ </details>
382
+
383
+ ## Contributing
384
+
385
+ Contributions welcome. Please open an issue first for significant changes.
386
+
387
+ ```bash
388
+ pnpm install
389
+ pnpm build
390
+ pnpm test
391
+ ```
392
+
121
393
  ## License
122
394
 
123
395
  [MIT](https://github.com/rasensio/aidlc/blob/main/LICENSE)
396
+
397
+ ---
398
+
399
+ <div align="center">
400
+
401
+ **[aidlc.rodrigoasensio.com](https://aidlc.rodrigoasensio.com)** โ€” docs, tutorials, and the build log
402
+
403
+ </div>
@@ -1 +1 @@
1
- {"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/commands/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8DpC;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqDvD"}
1
+ {"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/commands/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4EpC;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8EvD"}
@@ -19,13 +19,14 @@ import { Command } from 'commander';
19
19
  import { scanCodebase, writeContextDocs } from '../discover/scanner.js';
20
20
  import { seedFromScan } from '../knowledge/seed.js';
21
21
  import { openKnowledge } from '../knowledge/engine.js';
22
+ import { defaultPrompter } from '../core/prompt.js';
22
23
  // ---------------------------------------------------------------------------
23
24
  // Summary renderer
24
25
  // ---------------------------------------------------------------------------
25
26
  /**
26
27
  * Format a human-readable summary from the scan result.
27
28
  */
28
- function formatSummary(result, docPaths, preserved = []) {
29
+ function formatSummary(result, docPaths, preserved = [], declined = []) {
29
30
  const lines = [];
30
31
  // Languages
31
32
  if (result.languages.length > 0) {
@@ -64,6 +65,12 @@ function formatSummary(result, docPaths, preserved = []) {
64
65
  // the same from the outside.
65
66
  lines.push(`Kept hand-written: ${preserved.join(', ')} (use --force to regenerate)`);
66
67
  }
68
+ if (declined.length > 0) {
69
+ // `--force` was asked for and refused. Saying so is the point: a silent
70
+ // preserve here would read as the flag having worked.
71
+ lines.push(`Refused to overwrite: ${declined.join(', ')} โ€” --force was declined, ` +
72
+ 'so these hand-written docs were left as they are');
73
+ }
67
74
  return lines.join('\n') + '\n';
68
75
  }
69
76
  // ---------------------------------------------------------------------------
@@ -79,7 +86,7 @@ export function registerDiscover(program) {
79
86
  .option('--json', 'Output full scan result as JSON')
80
87
  .option('--no-knowledge', 'Skip seeding the knowledge graph')
81
88
  .option('--force', 'Overwrite hand-edited context docs as well as generated ones')
82
- .action((opts) => {
89
+ .action(async (opts) => {
83
90
  // `process.cwd()` deliberately, NOT resolveProjectRoot() โ€” a documented
84
91
  // exemption (cwd-project-root/AC-16), asserted by
85
92
  // test/project-root-call-sites.test.ts.
@@ -92,8 +99,23 @@ export function registerDiscover(program) {
92
99
  // Run the scanner
93
100
  const result = scanCodebase(cwd);
94
101
  // Write Context_Docs
95
- const { written: docPaths, preserved } = writeContextDocs(cwd, result, {
102
+ const { written: docPaths, preserved, declined } = await writeContextDocs(cwd, result, {
96
103
  force: opts.force === true,
104
+ // Only reached when --force would destroy a hand-owned doc. `defaultPrompter`
105
+ // is the single clack seam; its `no-tty` miss and an explicit cancel both
106
+ // mean no, matching doctor/runner.ts. That gives AC-13's non-interactive
107
+ // refusal without a separate TTY check here.
108
+ confirmOverwrite: async (paths) => {
109
+ process.stdout.write(`--force would overwrite ${paths.length} hand-written context doc(s):\n`);
110
+ for (const p of paths)
111
+ process.stdout.write(` ${p}\n`);
112
+ process.stdout.write('Their text exists nowhere but git history โ€” regenerating cannot produce it again.\n');
113
+ const answer = await defaultPrompter.confirm({
114
+ message: 'Overwrite them with generated content?',
115
+ initialValue: false,
116
+ });
117
+ return answer.ok && answer.value;
118
+ },
97
119
  });
98
120
  // Seed the knowledge graph (KG Req 8.1)
99
121
  let knowledgeSummary = '';
@@ -119,9 +141,15 @@ export function registerDiscover(program) {
119
141
  process.stdout.write(JSON.stringify(result, null, 2) + '\n');
120
142
  }
121
143
  else {
122
- const summary = formatSummary(result, docPaths, preserved);
144
+ const summary = formatSummary(result, docPaths, preserved, declined);
123
145
  process.stdout.write(summary + knowledgeSummary);
124
146
  }
147
+ // A declined --force is a request that did not happen. Exiting non-zero is
148
+ // what makes a scripted `aidlc discover --force` fail loudly instead of
149
+ // reporting success over docs it never touched (AC-13).
150
+ if (declined.length > 0) {
151
+ process.exitCode = 1;
152
+ }
125
153
  });
126
154
  }
127
155
  //# sourceMappingURL=discover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/commands/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAAE,YAAY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C;QAED,SAAS;QACT,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;YACrE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,gBAAgB,CAAC,CAAC;QACnD,CAAC;QAED,2EAA2E;QAC3E,wEAAwE;QACxE,wDAAwD;QACxD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -91,7 +91,11 @@ function report(result, dryRun) {
91
91
  process.stdout.write('Doctor: everything healthy โ€” nothing to do.\n');
92
92
  }
93
93
  else if (dryRun) {
94
- process.stdout.write('No changes were made (--dry-run).\n');
94
+ // Scoped to doctor by name. `aidlc update` runs this pass and then prints its
95
+ // own end-of-run line, so the unqualified sentence appeared twice in one
96
+ // invocation and read as a bug rather than as two true statements about two
97
+ // scopes (update-overwrites-authored-context/AC-6).
98
+ process.stdout.write('Doctor: no changes were made (--dry-run).\n');
95
99
  }
96
100
  }
97
101
  function printCommands(o) {
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;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