ai-runtime-kit 0.5.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,462 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+ While the project is on `v0.x`, breaking changes can land at any
8
+ minor release; pin to a specific minor in CI if you depend on the
9
+ kit.
10
+
11
+ ## [Unreleased]
12
+
13
+ ## [0.10.0] - 2026-05-14
14
+
15
+ **First M4 data point.** Kit's first `src/**` feature shipped
16
+ under the v0.6.0+ PRD → Feature → Spec → Plan → Task → TDD →
17
+ Implement → Verify → Review workflow with `TDD-Applies: true`
18
+ tasks. Two TDD pairs (test-commit-before-impl-commit) at 100%
19
+ test-first ordering.
20
+
21
+ ### Added
22
+ - **`validate` command** — checks `.ai/project/` tree
23
+ structural integrity. Walks every artifact (PRD / feature /
24
+ spec / plan / task / review) and verifies:
25
+ - Required `## Parent <Type>` sections per v0.9.0 INDEX §
26
+ Traceability rules.
27
+ - Cited parent paths resolve to real files on disk.
28
+ - `Status` values are in the allowed set per artifact type.
29
+ Reports errors (missing-parent / empty-parent /
30
+ unresolved-parent) and warnings (unexpected-status). Exits
31
+ 0 on clean, 1 on any error.
32
+ - `--json` flag for machine-parseable output.
33
+ - `--cwd <dir>` flag for non-default project root.
34
+ - `src/validate.js` (NEW) — pure validator module.
35
+ - `test/validate.test.js` (NEW) — 6 unit tests (clean tree,
36
+ missing parent, broken path, `(none — ...)` rendering,
37
+ JSON output, live dogfood smoke).
38
+
39
+ ### Changed
40
+ - `bin/cli.js` — dispatcher gains `validate` subcommand;
41
+ HELP lists it alongside `init` and `upgrade`.
42
+ - 7 historical specs (v0.4.0 / v0.5.0 / v0.5.1 / v0.6.0 /
43
+ v0.7.0 / v0.8.0 / v0.8.1) retrofitted with `## Parent
44
+ Feature` sections (pre-v0.6.0 use `(none —
45
+ pre-feature-layer)`; v0.8.1 uses `(none —
46
+ engineering-only)`; the rest cite real feature paths).
47
+ - 7 historical reviews retrofitted with `## Parent Spec`
48
+ sections. v0.9.0's spec/review already had theirs (the
49
+ convention F4 shipped was in use immediately on its own
50
+ review). Retrofit is project-side and not subject to
51
+ preflight.
52
+
53
+ ### Process
54
+ - **Kit's first `src/**` feature** under the new pipeline.
55
+ Branch was `feat/validate-cli` (not `chore/runtime-*`)
56
+ because no `runtime/**` paths in scope.
57
+ - **First non-runtime-scoped feature in the v0.6.0+
58
+ workflow** — preflight hook did not fire (correctly; no
59
+ `runtime/**` paths to gate on). The kit's discipline now
60
+ cleanly distinguishes governance-scoped (preflight gated)
61
+ from kit-code-scoped (regular feature branches).
62
+ - **First M4 data point.** Two TDD pairs:
63
+ - T1 (src/validate.js): test commit 16:07:26 → impl
64
+ 16:08:21 (Δ +55s).
65
+ - T2 (bin/cli.js): test commit 16:09:47 → impl 16:11:53
66
+ (Δ +2m6s).
67
+ Both pairs satisfy "test-commit precedes impl-commit." M4
68
+ score for this feature: 2/2 = 100%.
69
+ - **Validator caught a real concern during dogfood.** The
70
+ first run reported `TASK_STATUS.md` as a missing-parent
71
+ error; this file is a top-level status tracker (output of
72
+ `init`), not a task instance. Fix landed in C4: validator
73
+ now skips `EXCLUDED_FILENAMES`. The tool catching its own
74
+ edge case in its first ship cycle is the dogfood loop
75
+ working as intended.
76
+ - **Spec amended mid-implementation** (third occurrence —
77
+ v0.5.1, v0.7.0, and now v0.10.0). Original spec excluded
78
+ retrofitting historical artifacts; the validator's
79
+ credibility depends on its first dogfood pass being
80
+ clean, so the spec was amended pre-impl to include
81
+ retrofit work. Recorded in spec § Status with a comment.
82
+ - **24/24 tests pass** (18 prior + 6 new).
83
+ - **`validate` against this repo's `.ai/` tree**:
84
+ 3 PRDs / 5 features / 9 specs / 0 plans / 0 tasks /
85
+ 8 reviews / **0 errors / 0 warnings / Result: PASS**.
86
+ VM1 satisfied live on first ship.
87
+
88
+ ## [0.9.0] - 2026-05-14
89
+
90
+ **Closes the v0.6.0 nine-phase-workflow PRD's 4-feature
91
+ delivery.** F4 is the last slice; shipping it completes the
92
+ first fully-delivered multi-feature PRD on this kit and
93
+ validates framework A end-to-end.
94
+
95
+ ### Added
96
+ - **`## Parent <Type>` convention** across all artifact
97
+ templates. Every artifact now carries a structural
98
+ upward-citation link to its direct parent, assembling the
99
+ chain `commit → task → plan → spec → feature → PRD`.
100
+ - Spec templates (regular + bug-fix variant): new
101
+ `## Parent Feature` section after `## Status`.
102
+ - Plan template: `## Related Spec` renamed to
103
+ `## Parent Spec` (single path required).
104
+ - Task template: `## Related Spec` → `## Parent Spec`; new
105
+ `## Parent Plan` section added (both required).
106
+ - Review template: new `## Parent Spec` section after
107
+ `## Summary`.
108
+ - **`(none — <reason>)` rendering** for workflow paths that
109
+ skip an upstream artifact:
110
+ - Engineering-only specs → `(none — engineering-only)`.
111
+ - Bug-fix specs → `(none — bug-fix workflow)`.
112
+ - Hot-fix tasks → `(none — direct task)`.
113
+ - **`runtime/INDEX.md` § Traceability** — new top-level
114
+ section between `## Agents` and `## Skills`. Documents the
115
+ chain, the per-artifact `## Parent <Type>` requirements,
116
+ the `(none — <reason>)` rendering rules, and the rationale
117
+ (powering M3 from the parent PRD).
118
+
119
+ ### Changed
120
+ - `runtime/plans/_template.md` — `## Related Spec` is now
121
+ `## Parent Spec` (rename; semantics unchanged but field is
122
+ now required and single-path instead of bullet list).
123
+ - `runtime/tasks/_template.md` — `## Related Spec` is now
124
+ `## Parent Spec`; format tightened to single path.
125
+
126
+ ### Process
127
+ - **Seventh fire of `pre-executor/runtime-scoped-preflight`
128
+ hook**, seventh clean pass. Six runtime paths enumerated;
129
+ no GATE failures.
130
+ - **First spec to structurally cite its parent feature.**
131
+ F4's own spec uses the new `## Parent Feature` section
132
+ (self-reference noted with HTML comment in the spec body).
133
+ The convention demonstrates itself before the templates
134
+ that codify it ship — same bootstrap pattern as F1's
135
+ feature doc in v0.6.0.
136
+ - **Framework A end-to-end validated.** The v0.6.0
137
+ nine-phase-workflow PRD sliced into 4 features (F1–F4),
138
+ each shipped independently as v0.6.0 / v0.7.0 / v0.8.0 /
139
+ v0.9.0. M2 (PRD slicing without context duplication) has
140
+ its first complete data point — the parent PRD's Problem
141
+ / Target Users / Success Metrics live only in the PRD;
142
+ each feature doc references them by path or by reference
143
+ rather than re-stating.
144
+
145
+ ## [0.8.1] - 2026-05-14
146
+
147
+ Bundled cleanup of three carryover follow-ups from v0.7.0 and
148
+ v0.8.0 reviews. Engineering-only, no PRD/feature parent.
149
+
150
+ ### Changed
151
+ - `runtime/INDEX.md` — two stale `Architect` references (5-phase
152
+ pipeline) updated to the current 8-phase chain. The `## Hooks`
153
+ section's prose and the standalone `## Recommended Agent Flow`
154
+ ASCII block now both match the `## Agents` section.
155
+ - `runtime/agents/spec-writer.md` — adds one `## Must Not`
156
+ bullet promoting the v0.5.1 + v0.7.0 size-ceiling drift
157
+ lesson from review-observation to agent-self-rule.
158
+ - `README.md` — adds **Walkthrough 3 (full feature lifecycle,
159
+ v0.8.0+)** showing the 8-phase PRD → review pipeline with
160
+ concrete agent invocations and file paths. Existing
161
+ Walkthroughs 1 + 2 unchanged.
162
+
163
+ ### Process
164
+ - Sixth real-world fire of `pre-executor/runtime-scoped-preflight`
165
+ hook; clean pass on first attempt (2 runtime paths).
166
+ - First **engineering-only spec** on this kit (no PRD or feature
167
+ parent). Step 0 and Step 0.5 skipped per workflow rules.
168
+ Successfully ran spec → impl → ship in the streamlined
169
+ no-PRD path.
170
+
171
+ ## [0.8.0] - 2026-05-14
172
+
173
+ Third feature shipped under the v0.6.0 PRD → Feature → Spec
174
+ pipeline. F3 of the nine-phase-workflow PRD; F4 (traceability
175
+ conventions) is the last remaining slice.
176
+
177
+ ### Added
178
+ - **Workflow Step 1.5: TDD Phase (per task, when applicable)**
179
+ in `runtime/workflows/feature-development.md`. Wires up
180
+ `tdd-writer.md` (shipped in v0.7.0) into the workflow. For
181
+ any task with `TDD-Applies: true`, a failing-test commit
182
+ must land before the implementation commit. Per-task
183
+ semantics: N TDD-applicable tasks fire Step 1.5 N times,
184
+ interleaved with implementation.
185
+ - **`## TDD-Applies` section** in `runtime/tasks/_template.md`'s
186
+ trailing metadata cluster. Default `false`; allowed values
187
+ `true | false`. Inline guidance documents the
188
+ behavior-changing boundary rule (behavior-changing → true;
189
+ doc / refactor-no-behavior / config-only → false; matches
190
+ parent PRD OOS4).
191
+
192
+ ### Changed
193
+ - Step 2 (Execute with Claude Code) body amended with a note
194
+ acknowledging Step 1.5 as a per-task prerequisite. Step 2's
195
+ scope unchanged otherwise.
196
+
197
+ ### Process
198
+ - Fifth real-world fire of `pre-executor/runtime-scoped-preflight`
199
+ hook; clean pass on first attempt (2 runtime paths in spec §2).
200
+ - **First feature whose own implementation was traced through
201
+ its own rule before impl began.** F3 defines TDD-Applies for
202
+ tasks; F3's own impl is doc-only (workflow text + template
203
+ field) per PRD OOS4, so the rule applied to F3 returns
204
+ `TDD-Applies: false`. Recursion handled cleanly; trace
205
+ recorded in F3 spec §Open Questions Q3.
206
+ - F3 ships with **no new tests** — spec confirmed existing init
207
+ test's template-presence assertion already covers
208
+ `runtime/tasks/_template.md`. Modest tarball-size delta
209
+ (~400 bytes).
210
+ - M4 (test-first commit ordering ≥90%, 60d) becomes
211
+ measurable post-v0.8.0. Before F3, the workflow had no step
212
+ to comply with; from now on, future tasks with
213
+ `TDD-Applies: true` can be audited against the rule.
214
+
215
+ ## [0.7.0] - 2026-05-14
216
+
217
+ Second feature shipped under the v0.6.0 PRD → Feature → Spec
218
+ pipeline. F2 of the nine-phase-workflow PRD; F1 was v0.6.0
219
+ (feature artifact layer). F3 (TDD step) and F4 (traceability)
220
+ follow.
221
+
222
+ ### Added
223
+ - **`runtime/agents/feature-writer.md`** — role for Step 0.5
224
+ (slicing PRD into features).
225
+ - **`runtime/agents/spec-writer.md`** — role for Step 1
226
+ (drafting spec from APPROVED feature).
227
+ - **`runtime/agents/planner.md`** — role for plan + task
228
+ authoring (the "task" phase consumes tasks downstream;
229
+ no separate task-creator file ships).
230
+ - **`runtime/agents/tdd-writer.md`** — role for the
231
+ failing-test phase. Workflow wire-up arrives with F3.
232
+ - **`runtime/agents/reviewer.md`** — role for post-impl
233
+ review authoring.
234
+
235
+ ### Changed
236
+ - `runtime/INDEX.md` § Agents restructured: 8 role files
237
+ enumerated (3 existing + 5 new); "Recommended Agent Flow"
238
+ rewritten as 8-phase chain PRD-Writer → Feature-Writer →
239
+ Spec-Writer → Planner → TDD-Writer → Executor → Verifier →
240
+ Reviewer; "transition-only concepts" prose retired —
241
+ replaced with explicit notes on task (no file) and architect
242
+ (renamed to spec-writer).
243
+ - `runtime/agents/executor.md` — gains `## Reference` section
244
+ with prev/next pointers (tdd-writer → executor → verifier).
245
+ - `runtime/agents/verifier.md` — gains `## Reference` section
246
+ (executor → verifier → reviewer).
247
+ - `runtime/agents/prd-writer.md` — `## Reference` now includes
248
+ a downstream pointer to feature-writer.
249
+
250
+ ### Process
251
+ - Spec amended mid-implementation: agent-file size ceiling
252
+ revised 1500 → 1700 bytes (5 files landed 1509–1681). Same
253
+ drift pattern as v0.5.1's prd-writer.md (1200 → 1500). Spec
254
+ budgets remain hard to estimate pre-content.
255
+ - Fourth real-world fire of `pre-executor/runtime-scoped-preflight`
256
+ hook; clean pass on first attempt (9 runtime paths enumerated).
257
+ - F2's spec author (claude) resolved all 4 feature-level open
258
+ questions during spec drafting — first time on this kit
259
+ that the spec phase converged feature-level decisions
260
+ without escalating to user.
261
+
262
+ ## [0.6.0] - 2026-05-14
263
+
264
+ First feature shipped under the new **PRD → Feature → Spec**
265
+ pipeline (the parent PRD itself slices into F1–F4; this release
266
+ delivers F1, the keystone).
267
+
268
+ ### Added
269
+ - **`runtime/features/_template.md`** — canonical feature
270
+ template, new top-level runtime artifact between PRDs and
271
+ specs. Sections: Status / Parent PRD / Goal / PRD Metrics
272
+ Contributed / Scope / Acceptance / Open Questions /
273
+ Downstream Spec. Lifecycle: DRAFT → APPROVED → REJECTED →
274
+ SUPERSEDED, mirroring PRDs and specs.
275
+ - **Workflow Step 0.5** in
276
+ `runtime/workflows/feature-development.md` — "Slice into
277
+ Features." Mandatory whenever Step 0 (PRD) ran; same skip
278
+ criteria as Step 0. One PRD → ≥1 feature docs. Single-feature
279
+ PRDs still produce one feature doc with full template
280
+ structure (no stub allowance).
281
+ - `init` scaffolds `.ai/project/features/` as part of the
282
+ standard project skeleton.
283
+ - `runtime/INDEX.md` gains a `## Features` section positioned
284
+ between `## PRDs` and `## Specs`.
285
+
286
+ ### Changed
287
+ - **Spec citation rule.** Specs whose work derives from a PRD
288
+ now cite their parent **feature** in §1 Goal (which in turn
289
+ cites the PRD), instead of citing the PRD directly. The chain
290
+ assembles upward: spec → feature → PRD. Existing v0.5.x specs
291
+ are not retrofitted (per PRD OOS1).
292
+
293
+ ### Process
294
+ - First multi-feature PRD authored on this kit
295
+ (`2026-05-14-nine-phase-workflow`). This release delivers
296
+ feature **F1 (feature artifact layer)**; F2 (agent files),
297
+ F3 (TDD phase), and F4 (traceability conventions) follow as
298
+ parallel features.
299
+ - Third real-world fire of `pre-executor/runtime-scoped-preflight`
300
+ hook — all preconditions PASS on first attempt.
301
+ - First time the kit's own dogfood feature doc was migrated to
302
+ match a template it created in the same release (canonical
303
+ bootstrap, BOOTSTRAP NOTE comment retained as the visible
304
+ scar).
305
+
306
+ ## [0.5.1] - 2026-05-14
307
+
308
+ ### Added
309
+ - **`runtime/agents/prd-writer.md`** — new kit-shipped agent role
310
+ for PRD authoring at workflow Step 0. Parallel to `executor.md`
311
+ and `verifier.md`; closes the agent-vocabulary gap where v0.5.0's
312
+ Step 0 demanded an upstream document producer with no canonical
313
+ role file. Sections: Role / Responsibilities / Inputs / Outputs
314
+ / Must Not / Reference. Concept lattice: agent = WHO,
315
+ skill = HOW (the procedural 11-step depth stays in this repo's
316
+ project-side `write-a-prd` skill, referenced from the agent file).
317
+
318
+ ### Changed
319
+ - `runtime/INDEX.md` — adds `prd-writer` to the role-files list
320
+ and clarifies it as a **pre-pipeline role** (Step 0), not part
321
+ of the Architect → Planner → Executor → Verifier → Reviewer
322
+ transition phases.
323
+ - `runtime/workflows/feature-development.md` Step 0 — now points
324
+ agents at `runtime/agents/prd-writer.md` alongside the existing
325
+ template pointer.
326
+ - Package tarball now includes `CHANGELOG.md` (added to the
327
+ `files` allowlist in v0.5.0's [Unreleased]; first release where
328
+ this takes effect is v0.5.1).
329
+
330
+ ### Process
331
+ - First PRD-then-spec end-to-end run on this kit. PRD authored
332
+ conversationally via the project-side `write-a-prd` skill,
333
+ 10 user turns from "start" to file written (M2 budget exact).
334
+ - Second real-world fire of the
335
+ `pre-executor/runtime-scoped-preflight` hook — all three
336
+ preconditions passed on first attempt (branch created
337
+ proactively, scope enumerated, spec home in place).
338
+
339
+ ## [0.5.0] - 2026-05-14
340
+
341
+ First npm release. `npm view ai-runtime-kit` returned 404 prior
342
+ to this version; earlier `v0.x` versions existed only as
343
+ `package.json` bumps and git history.
344
+
345
+ ### Added
346
+ - **PRDs as a first-class workflow artifact.** New
347
+ `runtime/prds/_template.md` template covering Problem, Target
348
+ Users, Success Metrics, User Stories, Out of Scope, Open
349
+ Questions, Stakeholders, and Downstream Spec. PRDs follow the
350
+ same `DRAFT → APPROVED → REJECTED → SUPERSEDED` lifecycle as
351
+ specs.
352
+ - New optional **Step 0** in
353
+ `runtime/workflows/feature-development.md` — when to draft a
354
+ PRD (product-driven features) and when to skip (bug fixes,
355
+ engineering-only changes). Downstream specs must cite their
356
+ PRD path in §1 Goal when one exists.
357
+ - `init` scaffolds `.ai/project/prds/` as part of the standard
358
+ project skeleton.
359
+ - `runtime/INDEX.md` reorganized — new `## PRDs` section
360
+ precedes `## Specs` to reflect workflow chronology (PRD →
361
+ Spec → Plan → Tasks → Review).
362
+
363
+ ### Dogfood
364
+ - Project-side `write-a-prd` skill at
365
+ `.ai/project/skills/product/write-a-prd/SKILL.md` (this repo
366
+ only; kit still ships zero concrete skills per the `v0.x`
367
+ promise). Consumers who want the same trigger can copy the
368
+ file into their own `.ai/project/skills/` tree.
369
+
370
+ ### Process
371
+ - First runtime-scoped change shipped under the kit's own
372
+ governance rules. The `pre-executor/runtime-scoped-preflight`
373
+ hook fired on a real GATE event (initial attempt was on
374
+ `main`), and the remediation flow (create
375
+ `chore/runtime-prd-template`, re-attempt) worked end-to-end.
376
+
377
+ ## [0.4.1] - 2026-05-14
378
+
379
+ ### Added
380
+ - `init` now hints when `.ai/runtime/` is gitignored: clones
381
+ won't silently miss the runtime tree if the path is ignored
382
+ by the consumer's repo.
383
+ - New helper `isPathGitignored` in `src/git.js` (wraps `git
384
+ check-ignore`).
385
+
386
+ ### Notes
387
+ - Hint is silent when `.ai/runtime/` is tracked (normal kit-
388
+ consumer case) and in non-git directories. Only fires when
389
+ the path is definitively ignored.
390
+
391
+ ## [0.4.0] - 2026-05-14
392
+
393
+ ### Added
394
+ - **`init` now scaffolds a project-root `CLAUDE.md`** — agent
395
+ entry point for Claude Code pointing at
396
+ `.ai/runtime/BOOTSTRAP.md`. Without this file the runtime
397
+ tree existed on disk but no agent knew to read it.
398
+ - `CLAUDE.md` is project-owned: `upgrade` never touches it.
399
+ - New flag `--no-agent-entry` to skip the file's generation
400
+ entirely.
401
+ - `init --migrate` tolerates a pre-existing `CLAUDE.md`
402
+ (skip-write).
403
+ - `init` refuses to overwrite an existing `CLAUDE.md` (same
404
+ posture as the existing `.ai/runtime/` / `.ai/project/`
405
+ guards).
406
+
407
+ ### Process
408
+ - First feature surfaced and fixed via dogfood of this repo
409
+ against the kit itself.
410
+
411
+ ## [0.3.0] - 2026-05-14
412
+
413
+ ### Fixed
414
+ - `init --migrate` tolerates an empty-only `.ai/runtime/` left
415
+ by `git rm` — detects "exists but contains zero regular
416
+ files" and treats as absent. Real content under
417
+ `.ai/runtime/` still triggers the refuse-to-overwrite guard.
418
+ - `upgrade --pager <cmd>` pipes the per-file `diff -u` through
419
+ a pager when stdout is a TTY. Also configurable via the
420
+ `AI_RUNTIME_KIT_PAGER` environment variable. CI / scripted
421
+ use keeps the direct-write behavior.
422
+
423
+ ### Process
424
+ - Both quirks surfaced during S3 dogfood by ai-workflow-demo
425
+ (first external consumer).
426
+
427
+ ## [0.2.1] - 2026-05-14
428
+
429
+ ### Changed
430
+ - Comprehensive README — install, `init`, `upgrade`, versioning,
431
+ walkthroughs for new projects and adding project-side rules.
432
+
433
+ ## [0.2.0] - 2026-05-14
434
+
435
+ ### Added
436
+ - **Dual-tree loading.** Agents now load rules / skills / hooks
437
+ from **both** `.ai/runtime/` (kit, framework-shipped) and
438
+ `.ai/project/` (project-shipped). Project-side files take
439
+ precedence on path collision. The kit ships zero concrete
440
+ rules/skills/hooks (apart from the safety-intrinsic
441
+ `pre-executor/runtime-scoped-preflight` hook), so collisions
442
+ are impossible in v0.x.
443
+
444
+ ### Process
445
+ - ai-workflow-demo migrated to consume this kit at v0.2.0 (the
446
+ first dogfood consumer).
447
+
448
+ ---
449
+
450
+ ## Conventions
451
+
452
+ - **Versioning**: `MAJOR.MINOR.PATCH`. Kit MAJOR is locked to
453
+ `runtime/RUNTIME_VERSION.md`; a future runtime v2 would require
454
+ a kit MAJOR bump.
455
+ - **Pre-stable**: `v0.x` allows breaking changes at any minor.
456
+ Pin if you depend on it.
457
+ - **Downgrade**: `upgrade` refuses by default;
458
+ `--allow-downgrade` is explicit-only for intentional rollback.
459
+ - **Tags**: only `v0.3.0` is currently tagged in git. Earlier
460
+ and later versions are reachable via the commit history but
461
+ not labeled. Tagging older versions retroactively is a
462
+ follow-up.
package/README.md CHANGED
@@ -10,6 +10,59 @@ npx ai-runtime-kit upgrade # existing kit consumer
10
10
 
11
11
  ## Status
12
12
 
13
+ **v0.10.0** — Adds the **`validate` command** — checks
14
+ `.ai/project/` tree structural integrity (every artifact carries
15
+ its required `## Parent <Type>` section; every cited parent path
16
+ resolves on disk; Status values are valid). Reports errors and
17
+ warnings; exits 0 on clean / 1 on errors; `--json` for machine
18
+ output. **First `src/**` feature shipped under the v0.6.0+
19
+ PRD → Feature → Spec → Plan → Task → TDD → Implement → Verify
20
+ → Review pipeline; first M4 data point — 2/2 TDD pairs at
21
+ 100% test-first ordering.**
22
+
23
+ **v0.9.0** — Formalizes the **`## Parent <Type>` traceability
24
+ convention** across all artifact templates. Every kit artifact
25
+ (spec / plan / task / review) now carries a structural
26
+ upward-citation link to its direct parent, assembling the chain
27
+ `commit → task → plan → spec → feature → PRD`. New
28
+ `## Traceability` section in `runtime/INDEX.md` documents the
29
+ convention. F4 of the nine-phase-workflow PRD — **the last
30
+ slice**; shipping v0.9.0 completes the kit's first fully-
31
+ delivered multi-feature PRD and validates framework A end-to-end.
32
+
33
+ **v0.8.0** — Wires TDD into the workflow as **Step 1.5**: for
34
+ each task with `TDD-Applies: true`, a failing-test commit must
35
+ precede the implementation commit. Adds `## TDD-Applies` to
36
+ the task template. F3 of the nine-phase-workflow PRD; F4
37
+ (traceability) is the last remaining slice. Makes M4 (≥90%
38
+ test-first ordering) measurable for the first time.
39
+
40
+ **v0.7.0** — Completes the 8-phase agent roster. Adds 5 new
41
+ role files (`feature-writer`, `spec-writer`, `planner`,
42
+ `tdd-writer`, `reviewer`) under `runtime/agents/`. INDEX.md's
43
+ "Recommended Agent Flow" rewritten as the full chain:
44
+ PRD-Writer → Feature-Writer → Spec-Writer → Planner →
45
+ TDD-Writer → Executor → Verifier → Reviewer. F2 of the
46
+ nine-phase-workflow PRD; F3 (TDD step in workflow) + F4
47
+ (traceability conventions) follow.
48
+
49
+ **v0.6.0** — Adds the **feature artifact** between PRD and spec
50
+ — first slice (F1) of the nine-phase-workflow PRD. New
51
+ `runtime/features/_template.md`, new workflow Step 0.5
52
+ ("Slice into Features," mandatory after Step 0), `init`
53
+ scaffolds `.ai/project/features/`. Specs now cite their parent
54
+ **feature** in §1 Goal (which cites the PRD); the chain
55
+ assembles upward. F2 (agent files), F3 (TDD), F4 (traceability)
56
+ follow as parallel features.
57
+
58
+ **v0.5.1** — Adds the `prd-writer` agent at
59
+ `runtime/agents/prd-writer.md`, closing the v0.5.0 gap where
60
+ Step 0 (define PRD) had no canonical role file. Parallel to
61
+ `executor.md` and `verifier.md`; concept lattice is
62
+ **agent = WHO, skill = HOW** (the elicit-then-write procedure
63
+ remains in a project-side skill). First end-to-end PRD-then-spec
64
+ run on this kit shipped this release.
65
+
13
66
  **v0.5.0** — PRDs become a first-class workflow artifact upstream
14
67
  of specs. New `runtime/prds/_template.md` (Problem / Target Users
15
68
  / Success Metrics / User Stories / Out of Scope / Open Questions
@@ -250,6 +303,67 @@ kit's `skills/README.md` and `hooks/README.md` for the formats.
250
303
 
251
304
  ---
252
305
 
306
+ ## Walkthrough 3 — full feature lifecycle (v0.8.0+)
307
+
308
+ For product-driven features, the kit runs an 8-phase pipeline.
309
+ Each phase produces a kit-shipped artifact; each artifact cites
310
+ its upstream parent. The chain assembles upward:
311
+
312
+ ```txt
313
+ commit → task → plan → spec → feature → PRD
314
+ ```
315
+
316
+ Quick lifecycle, with the agent roles invoked at each step:
317
+
318
+ ```bash
319
+ # Step 0 — author a PRD (prd-writer)
320
+ # .ai/project/prds/YYYY-MM-DD-<slug>/prd.md
321
+ # Problem / Target Users / Success Metrics / User Stories /
322
+ # Out of Scope / Open Questions / Stakeholders
323
+
324
+ # Step 0.5 — slice the PRD into ≥1 features (feature-writer)
325
+ # .ai/project/features/YYYY-MM-DD-<feature-slug>/feature.md
326
+ # Each cites the parent PRD; maps to PRD success metrics.
327
+ # Mandatory whenever Step 0 ran.
328
+
329
+ # Step 1 — draft an engineering spec per feature (spec-writer)
330
+ # .ai/project/specs/YYYY-MM-DD-<feature-slug>/spec.md
331
+ # §1 Goal cites the parent feature path.
332
+ # §2 Scope enumerates every touched runtime/** path (preflight).
333
+
334
+ # Step 1.5 — TDD phase (tdd-writer, per applicable task)
335
+ # For tasks with TDD-Applies: true, commit a failing test
336
+ # before the implementation commit.
337
+
338
+ # Step 2 — plan, tasks, implementation (planner + executor)
339
+ # .ai/project/plans/...
340
+ # .ai/project/tasks/... (each task carries TDD-Applies)
341
+ # Implementation lands on a chore/runtime-<slug> branch if
342
+ # the spec touches runtime/**; otherwise a feature branch.
343
+
344
+ # Step 3 — verify (verifier)
345
+ # Run npm test + manual verification commands from the spec.
346
+
347
+ # Step 4 — review (reviewer)
348
+ # .ai/project/reviews/YYYY-MM-DD-<slug>.md
349
+ # Maps PRD success metrics to delivered artifacts.
350
+
351
+ # Then: merge, push, tag, optionally npm publish.
352
+ ```
353
+
354
+ For each step, the corresponding kit-shipped agent role file
355
+ lives under `.ai/runtime/agents/<role>.md` (PRD-writer,
356
+ feature-writer, spec-writer, planner, tdd-writer, executor,
357
+ verifier, reviewer). The canonical lifecycle source is
358
+ `.ai/runtime/workflows/feature-development.md`.
359
+
360
+ Engineering-only changes (bug fixes, refactors, doc tidy)
361
+ skip Steps 0 and 0.5 and start directly at the spec — see
362
+ `.ai/runtime/workflows/bug-fix.md` for the corrective-work
363
+ variant.
364
+
365
+ ---
366
+
253
367
  ## Local development
254
368
 
255
369
  ```bash
package/bin/cli.js CHANGED
@@ -10,6 +10,7 @@ Usage: ai-runtime-kit <command> [options]
10
10
  Commands:
11
11
  init Initialize .ai/ runtime in the current directory.
12
12
  upgrade Upgrade .ai/runtime/ to the kit's current version.
13
+ validate Check .ai/project/ tree structural integrity.
13
14
  --help, -h Show this help.
14
15
  --version Show kit version.
15
16
 
@@ -38,6 +39,9 @@ async function main() {
38
39
  case 'upgrade':
39
40
  await require('../src/upgrade').run(rest);
40
41
  return;
42
+ case 'validate':
43
+ require('../src/validate').run(rest);
44
+ return;
41
45
  default:
42
46
  console.error(`ai-runtime-kit: unknown command '${cmd}'`);
43
47
  console.error('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-runtime-kit",
3
- "version": "0.5.0",
3
+ "version": "0.10.0",
4
4
  "description": "Reusable AI engineering runtime: BOOTSTRAP, workflows, safety, hooks, and templates for software projects driven by AI agents.",
5
5
  "bin": {
6
6
  "ai-runtime-kit": "./bin/cli.js"
@@ -13,6 +13,7 @@
13
13
  "src",
14
14
  "runtime",
15
15
  "README.md",
16
+ "CHANGELOG.md",
16
17
  "LICENSE"
17
18
  ],
18
19
  "engines": {