create-quiver 0.12.0 → 0.12.1

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 (109) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +49 -17
  3. package/README_FOR_AI.md +31 -29
  4. package/ROADMAP.md +15 -3
  5. package/docs/AI_ONBOARDING_PROMPT.md.template +7 -1
  6. package/docs/COMMANDS.md.template +44 -18
  7. package/docs/STATUS.md.template +5 -1
  8. package/docs/WORKFLOW.md.template +13 -11
  9. package/package.json +9 -3
  10. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/EVIDENCE_REPORT.md +293 -0
  11. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/EXECUTION_PLAN.md +58 -0
  12. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/SPEC.md +242 -0
  13. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/STATUS.md +35 -0
  14. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/pr.md +77 -0
  15. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +34 -0
  16. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +52 -0
  17. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-00-spec-foundation/slice.json +52 -0
  18. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-01-cli-contract-compatibility/CLOSURE_BRIEF.md +36 -0
  19. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-01-cli-contract-compatibility/EXECUTION_BRIEF.md +52 -0
  20. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-01-cli-contract-compatibility/slice.json +56 -0
  21. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-02-run-state-phase-locks/CLOSURE_BRIEF.md +43 -0
  22. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-02-run-state-phase-locks/EXECUTION_BRIEF.md +54 -0
  23. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-02-run-state-phase-locks/slice.json +52 -0
  24. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/CLOSURE_BRIEF.md +35 -0
  25. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/EXECUTION_BRIEF.md +53 -0
  26. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/slice.json +54 -0
  27. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-04-agent-profiles-adapters/CLOSURE_BRIEF.md +34 -0
  28. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-04-agent-profiles-adapters/EXECUTION_BRIEF.md +54 -0
  29. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-04-agent-profiles-adapters/slice.json +52 -0
  30. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-05-approval-gates/CLOSURE_BRIEF.md +34 -0
  31. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-05-approval-gates/EXECUTION_BRIEF.md +54 -0
  32. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-05-approval-gates/slice.json +53 -0
  33. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-06-spec-slice-generator/CLOSURE_BRIEF.md +33 -0
  34. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-06-spec-slice-generator/EXECUTION_BRIEF.md +56 -0
  35. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-06-spec-slice-generator/slice.json +55 -0
  36. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-07-slice-execution-planner/CLOSURE_BRIEF.md +33 -0
  37. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-07-slice-execution-planner/EXECUTION_BRIEF.md +54 -0
  38. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-07-slice-execution-planner/slice.json +52 -0
  39. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-08-controlled-slice-execution/CLOSURE_BRIEF.md +39 -0
  40. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-08-controlled-slice-execution/EXECUTION_BRIEF.md +56 -0
  41. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-08-controlled-slice-execution/slice.json +53 -0
  42. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-09-git-worktree-pr-lifecycle/CLOSURE_BRIEF.md +38 -0
  43. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-09-git-worktree-pr-lifecycle/EXECUTION_BRIEF.md +57 -0
  44. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-09-git-worktree-pr-lifecycle/slice.json +52 -0
  45. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-10-validation-errors-fixtures/CLOSURE_BRIEF.md +39 -0
  46. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-10-validation-errors-fixtures/EXECUTION_BRIEF.md +55 -0
  47. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-10-validation-errors-fixtures/slice.json +56 -0
  48. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/CLOSURE_BRIEF.md +36 -0
  49. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/EXECUTION_BRIEF.md +54 -0
  50. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/slice.json +53 -0
  51. package/specs/quiver-v26-0121-smoke-hardening/EVIDENCE_REPORT.md +208 -0
  52. package/specs/quiver-v26-0121-smoke-hardening/EXECUTION_PLAN.md +57 -0
  53. package/specs/quiver-v26-0121-smoke-hardening/SPEC.md +137 -0
  54. package/specs/quiver-v26-0121-smoke-hardening/STATUS.md +32 -0
  55. package/specs/quiver-v26-0121-smoke-hardening/pr.md +96 -0
  56. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-00-docs-foundation/CLOSURE_BRIEF.md +35 -0
  57. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-00-docs-foundation/EXECUTION_BRIEF.md +55 -0
  58. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-00-docs-foundation/slice.json +73 -0
  59. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-01-cli-help-version-contract/CLOSURE_BRIEF.md +38 -0
  60. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-01-cli-help-version-contract/EXECUTION_BRIEF.md +51 -0
  61. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-01-cli-help-version-contract/slice.json +76 -0
  62. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-02-init-doc-links-and-flow-guidance/CLOSURE_BRIEF.md +37 -0
  63. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-02-init-doc-links-and-flow-guidance/EXECUTION_BRIEF.md +52 -0
  64. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-02-init-doc-links-and-flow-guidance/slice.json +75 -0
  65. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-03-ai-approval-review-consistency/CLOSURE_BRIEF.md +37 -0
  66. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-03-ai-approval-review-consistency/EXECUTION_BRIEF.md +53 -0
  67. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-03-ai-approval-review-consistency/slice.json +77 -0
  68. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-04-local-validation-brief-contracts/CLOSURE_BRIEF.md +35 -0
  69. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-04-local-validation-brief-contracts/EXECUTION_BRIEF.md +52 -0
  70. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-04-local-validation-brief-contracts/slice.json +77 -0
  71. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-05-demo-scaffold-readiness/CLOSURE_BRIEF.md +34 -0
  72. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-05-demo-scaffold-readiness/EXECUTION_BRIEF.md +54 -0
  73. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-05-demo-scaffold-readiness/slice.json +84 -0
  74. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-06-plan-graph-scope-performance/CLOSURE_BRIEF.md +35 -0
  75. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-06-plan-graph-scope-performance/EXECUTION_BRIEF.md +53 -0
  76. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-06-plan-graph-scope-performance/slice.json +82 -0
  77. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-07-smoke-release-readiness/CLOSURE_BRIEF.md +35 -0
  78. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-07-smoke-release-readiness/EXECUTION_BRIEF.md +55 -0
  79. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-07-smoke-release-readiness/slice.json +92 -0
  80. package/src/create-quiver/commands/ai.js +577 -27
  81. package/src/create-quiver/commands/flow.js +6 -5
  82. package/src/create-quiver/commands/graph.js +6 -4
  83. package/src/create-quiver/commands/plan.js +3 -3
  84. package/src/create-quiver/index.js +328 -12
  85. package/src/create-quiver/lib/actionable-error.js +27 -0
  86. package/src/create-quiver/lib/agent-profiles.js +1 -1
  87. package/src/create-quiver/lib/ai/context-packs.js +4 -0
  88. package/src/create-quiver/lib/ai/execution-plan.js +7 -1
  89. package/src/create-quiver/lib/ai/executor.js +270 -20
  90. package/src/create-quiver/lib/ai/export-state.js +534 -0
  91. package/src/create-quiver/lib/ai/github.js +83 -0
  92. package/src/create-quiver/lib/ai/onboarding-template.js +215 -2
  93. package/src/create-quiver/lib/ai/plan-review.js +5 -2
  94. package/src/create-quiver/lib/ai/providers.js +4 -3
  95. package/src/create-quiver/lib/ai/run-state.js +414 -0
  96. package/src/create-quiver/lib/ai/spec-generator.js +12 -0
  97. package/src/create-quiver/lib/ai/spec-templates.js +78 -9
  98. package/src/create-quiver/lib/approvals.js +22 -3
  99. package/src/create-quiver/lib/demo.js +189 -14
  100. package/src/create-quiver/lib/doctor.js +75 -0
  101. package/src/create-quiver/lib/handoff.js +81 -12
  102. package/src/create-quiver/lib/init-docs.js +24 -6
  103. package/src/create-quiver/lib/init-layout.js +8 -0
  104. package/src/create-quiver/lib/json.js +53 -3
  105. package/src/create-quiver/lib/readiness.js +18 -3
  106. package/src/create-quiver/lib/scope.js +50 -7
  107. package/src/create-quiver/lib/slice-graph.js +138 -38
  108. package/src/create-quiver/lib/slice.js +6 -1
  109. package/src/create-quiver/lib/spec-worktrees.js +16 -2
@@ -48,21 +48,23 @@ Use maps, metadata, diffs, and summaries first. Open full files only when the sm
48
48
 
49
49
  ## Execution
50
50
 
51
- 1. Create or reuse the spec worktree with `npx create-quiver spec start specs/<spec-slug>` or `npm run quiver:spec:start -- specs/<spec-slug>`.
52
- 2. Inspect manual prompts with `npx create-quiver ai execute-plan --dry-run --commit --mode manual` or delegated waves with `npm run quiver:ai:execute-plan -- --dry-run --commit --mode delegated`.
53
- 3. Print a minimal manual executor prompt with `npx create-quiver ai prompt-slice --slice <slice.json> --dry-run` when assigning the slice to another agent.
54
- 4. Bootstrap a single slice with `npx create-quiver start-slice <slice.json>` or `npm run quiver:start-slice -- <slice.json>` when manual execution is preferred.
51
+ 1. Create or reuse the spec worktree with `npx create-quiver spec start specs/<spec-slug>` or `npm run quiver:spec:start -- specs/<spec-slug>`. Use `--dry-run` first when you want to inspect the planned branch/path without changing Git state.
52
+ 2. Inspect lifecycle state with `npx create-quiver ai inspect`, or export it with `npx create-quiver ai export --format json` for dashboards/agents and `--format markdown` for PRs/docs.
53
+ 3. Inspect manual prompts with `npx create-quiver ai execute-plan --dry-run --commit --mode manual` or delegated waves with `npm run quiver:ai:execute-plan -- --dry-run --commit --mode delegated`.
54
+ 4. Print a minimal manual executor prompt with `npx create-quiver ai prompt-slice --slice <slice.json> --dry-run` when assigning the slice to another agent.
55
+ 5. Bootstrap a single slice with `npx create-quiver start-slice <slice.json>` or `npm run quiver:start-slice -- <slice.json>` when manual execution is preferred.
55
56
  - The bootstrap step should work with canonical paths and a local base branch when `origin` is absent.
56
57
  - Draft slices require `--allow-draft`; otherwise `npx create-quiver start-slice` exits before execution.
57
58
  - Legacy Bash wrappers remain available for compatibility, but generated projects should prefer the Node CLI and `quiver:*` npm scripts.
58
59
  - `start-slice` generates `docs/ai/ACTIVE_SLICE.md` and `WORKTREE_CONTEXT.md`; use the active slice brief as the source of truth for execution.
59
- 5. Implement only what the slice declares.
60
- 6. Make one commit for that slice, or let `ai execute-slice --commit` / `ai execute-plan --execute --commit --mode delegated` create it after provider, scope, and validation pass.
61
- 7. Validate with `npx create-quiver check-slice <slice.json>` or `npm run quiver:check-slice -- <slice.json>`.
62
- 8. Write evidence. Prefer `npx create-quiver evidence run -- <command>` when you need a compact local Markdown record of validation output.
63
- 9. Repeat for the next slice until the spec is complete.
64
- 10. Open one PR for the spec. Use `npx create-quiver ai pr --dry-run --input specs/<spec-slug>/pr.md ...` first, then add `--create` only after review.
65
- 11. After the PR is merged and the spec worktree is clean, close it with `npx create-quiver spec close specs/<spec-slug>`.
60
+ 6. Implement only what the slice declares.
61
+ 7. Make one commit for that slice, or let `ai execute-slice --commit` / `ai execute-plan --execute --commit --mode delegated` create it after provider, branch/worktree, scope, and validation pass.
62
+ - `ai execute-slice` updates `CLOSURE_BRIEF.md`, `EVIDENCE_REPORT.md`, `COMMAND_LOG.md`, `STATUS.md`, and `slice.json` only after the provider changes in-scope files and validation passes.
63
+ 8. Validate with `npx create-quiver check-slice <slice.json>` or `npm run quiver:check-slice -- <slice.json>`.
64
+ 9. Write evidence. Prefer `npx create-quiver evidence run -- <command>` when you need a compact local Markdown record of validation output.
65
+ 10. Repeat for the next slice until the spec is complete.
66
+ 11. Open one PR for the spec. Use `npx create-quiver ai pr --dry-run --input specs/<spec-slug>/pr.md --ssh-host-alias <alias> ...` first, then add `--create` only after review. Quiver blocks PR creation while slices in that spec remain open.
67
+ 12. After the PR is merged and the spec worktree is clean, close it with `npx create-quiver spec close specs/<spec-slug>`.
66
68
 
67
69
  ## Support Contract
68
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-quiver",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "private": false,
5
5
  "description": "Quiver CLI for scaffolding projects from the packaged template",
6
6
  "license": "MIT",
@@ -17,12 +17,17 @@
17
17
  "quiver:analyze": "npx create-quiver analyze",
18
18
  "quiver:flow": "npx create-quiver flow",
19
19
  "quiver:prepare": "npx create-quiver prepare",
20
- "quiver:plan": "npx create-quiver plan",
21
- "quiver:graph": "npx create-quiver graph",
20
+ "quiver:plan": "node bin/create-quiver.js plan",
21
+ "quiver:graph": "node bin/create-quiver.js graph",
22
22
  "quiver:next": "npx create-quiver next",
23
23
  "quiver:doctor": "npx create-quiver doctor",
24
24
  "quiver:evidence": "npx create-quiver evidence",
25
25
  "quiver:ai:agent": "npx create-quiver ai agent",
26
+ "quiver:ai:inspect": "npx create-quiver ai inspect",
27
+ "quiver:ai:export": "npx create-quiver ai export",
28
+ "quiver:ai:specs": "npx create-quiver ai specs list",
29
+ "quiver:ai:slices": "npx create-quiver ai slices list",
30
+ "quiver:ai:trace": "npx create-quiver ai trace report",
26
31
  "quiver:ai:onboard": "npx create-quiver ai onboard",
27
32
  "quiver:ai:prepare-context": "npx create-quiver ai prepare-context",
28
33
  "quiver:ai:plan": "npx create-quiver ai plan",
@@ -39,6 +44,7 @@
39
44
  "quiver:spec:close": "npx create-quiver spec close",
40
45
  "package:quiver": "bash scripts/package-quiver.sh",
41
46
  "smoke:create-quiver": "bash scripts/ci/smoke-create-quiver.sh",
47
+ "smoke:doctor-fixtures": "node scripts/ci/smoke-doctor-fixtures.js",
42
48
  "smoke:tiered-pack": "bash scripts/ci/smoke-tiered-pack.sh",
43
49
  "smoke:guided-workflow": "bash scripts/ci/smoke-guided-workflow.sh",
44
50
  "release:quiver": "bash scripts/release-quiver.sh"
@@ -0,0 +1,293 @@
1
+ # Evidence Report - Quiver v25 AI-First Lifecycle Orchestrator
2
+
3
+ ## Summary
4
+
5
+ This report starts with documentation-only evidence for `slice-00`. Product implementation evidence must be appended by each later slice.
6
+
7
+ ## slice-00 - Spec foundation
8
+
9
+ ### Completed
10
+
11
+ - Created v25 spec folder.
12
+ - Created `SPEC.md`, `STATUS.md`, `EXECUTION_PLAN.md`, `EVIDENCE_REPORT.md`, and `pr.md`.
13
+ - Created every slice folder with `slice.json`, `EXECUTION_BRIEF.md`, and `CLOSURE_BRIEF.md`.
14
+ - Updated source-of-truth planning docs to mention v25 as planned without claiming package publication.
15
+
16
+ ### Validation
17
+
18
+ - `git diff --check` passed.
19
+ - `find specs/quiver-v25-ai-first-lifecycle-orchestrator -name "slice.json" -print -exec node -e "JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8'))" {} \;` passed for 12 slice files.
20
+ - `find specs/quiver-v25-ai-first-lifecycle-orchestrator/slices -maxdepth 2 -type f | wc -l` returned 36 slice files.
21
+ - `npm run quiver:plan -- --spec quiver-v25-ai-first-lifecycle-orchestrator --include-completed` failed with Node out-of-memory after starting `npx create-quiver plan`. This does not invalidate the documentation package, but it is evidence that scoped planning can still have a scaling or command execution issue in the current CLI and should be considered by `slice-10-validation-errors-fixtures`.
22
+ - `npm view create-quiver version` returned `0.12.0`; release documentation should be synchronized before future docs claim the latest package status.
23
+
24
+ ### Risks Observed During Validation
25
+
26
+ - The scoped plan command can consume too much memory on the current repo. Future implementation should include a fixture or regression test that proves `--spec <slug>` does not scan or retain unnecessary data from unrelated specs.
27
+
28
+ ## Later Slices
29
+
30
+ Each implementation slice must append:
31
+
32
+ - commands executed;
33
+ - tests or smokes run;
34
+ - files changed;
35
+ - validation result;
36
+ - risks remaining;
37
+ - evidence location.
38
+
39
+ ## slice-01 - CLI contract and compatibility
40
+
41
+ ### Completed
42
+
43
+ - Added top-level `--version` and `-V` handling before normal argument parsing.
44
+ - Kept `--version <n>` available for `ai approve`.
45
+ - Added focused CLI contract tests.
46
+ - Added command reference docs for version output.
47
+
48
+ ### Validation
49
+
50
+ - `node bin/create-quiver.js --version` passed and printed `0.12.0`.
51
+ - `node bin/create-quiver.js -V` passed and printed `0.12.0`.
52
+ - `node --test tests/commands/cli-contract.test.js tests/commands/init-profiles.test.js tests/commands/flow.test.js tests/lib/init-layout.test.js` passed: 36 tests.
53
+ - `git diff --check` passed.
54
+
55
+ ### Risks
56
+
57
+ - The local `quiver` binary alias is validated through `package.json` and the shared entrypoint, not by installing the package into a fixture.
58
+
59
+ ## slice-02 - Run state, phase gates, and locks
60
+
61
+ ### Completed
62
+
63
+ - Added `.quiver/runs/<run-id>/state.json`, `approvals.json`, copied requirement input, and decision log scaffolding.
64
+ - Added `.quiver/locks/` as runtime-only internal state.
65
+ - Added `ai run create`, `ai status`, and `ai resume`.
66
+ - Added lifecycle phase helpers, next-command guidance, approval metadata recording, and run/slice lock helpers.
67
+ - Connected `ai plan` and `ai approve` to lifecycle run phase updates.
68
+
69
+ ### Validation
70
+
71
+ - `node --test tests/lib/ai-run-state.test.js tests/commands/ai-run-state.test.js tests/commands/ai-plan.test.js tests/lib/approvals.test.js tests/lib/init-layout.test.js` passed: 25 tests.
72
+ - `node /Users/fabrijk/Documents/Work/Proyectos\ Personales/nika/frameworks/quiver/bin/create-quiver.js ai status` from `/private/tmp` passed and reported no active run without creating files.
73
+ - `node --test tests/**/*.test.js` passed: 264 tests.
74
+ - `git diff --check` passed.
75
+
76
+ ### Risks
77
+
78
+ - File locks intentionally require manual inspection/removal when stale; automatic process liveness cleanup is deferred to avoid unsafe cross-platform behavior.
79
+ - Phase guards are available and used by lifecycle status tests, but later slices still need to wire them into spec generation, execution planning, slice execution, and PR creation.
80
+
81
+ ## slice-03 - Safe AI onboarding documentation
82
+
83
+ ### Completed
84
+
85
+ - Expanded `ai prepare-context` to prepare `INDEX`, `PROJECT_MAP`, `AI_CONTEXT`, `AI_ONBOARDING_PROMPT`, `CONTEXTO`, `WORKFLOW`, `ARCHITECTURE`, `STATUS`, and `DECISIONS` where applicable.
86
+ - Added dry-run write plans with proposed actions, diff snippets, assumptions, risks, contradictions, omitted paths, and uncertainty markers.
87
+ - Added write-mode snapshots under `.quiver/runs/<run-id>/snapshots/` before modifying docs.
88
+ - Preserved human-authored content by appending or refreshing a Quiver-managed context block in existing docs.
89
+ - Added contradiction detection for stale `docs/PROJECT_MAP.md` project name/package manager signals.
90
+ - Wired `ai prepare-context` writes into the AI run lifecycle by advancing to `onboarding-ready`.
91
+ - Updated README, README_FOR_AI, and command docs with the new safe docs behavior.
92
+
93
+ ### Validation
94
+
95
+ - `node --test tests/commands/ai-onboard.test.js tests/lib/ai-context-packs.test.js tests/lib/init-docs.test.js tests/commands/analyze.test.js` passed: 25 tests.
96
+ - `node --test tests/**/*.test.js` passed: 272 tests.
97
+ - `node -e "JSON.parse(require('fs').readFileSync('specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/slice.json','utf8')); console.log('slice-03 json ok')"` passed.
98
+ - `git diff --check` passed.
99
+
100
+ ### Risks
101
+
102
+ - Diff snippets are compact previews, not full patch files; users should still inspect `git diff` before committing generated docs.
103
+ - Contradiction detection is intentionally conservative and currently focuses on high-signal project identity and package-manager mismatches.
104
+
105
+ ## slice-04 - Agent profiles and provider adapters
106
+
107
+ ### Completed
108
+
109
+ - Replaced the old `researcher` profile slot with `doctor` to match the v25 agent contract.
110
+ - Added prompt-only output through `--print-prompt` for `ai onboard`, `ai plan`, and `ai review-plan`.
111
+ - Kept prompt-only paths provider-auth-free by rendering prompts without running provider preflight or spawn.
112
+ - Added best-effort redaction of likely secrets in provider stdout, stderr, and serialized error messages.
113
+ - Updated README and command reference docs for doctor profiles and prompt-only mode.
114
+
115
+ ### Validation
116
+
117
+ - `node --test tests/lib/agent-profiles.test.js tests/commands/ai-agent.test.js tests/lib/ai-providers.test.js tests/commands/ai-onboard.test.js tests/commands/ai-plan.test.js tests/commands/ai-review-plan.test.js` passed: 40 tests.
118
+ - `node --test tests/**/*.test.js` passed: 270 tests.
119
+ - `git diff --check` passed.
120
+
121
+ ### Risks
122
+
123
+ - Redaction is intentionally best-effort and may hide some diagnostic text if provider output contains key-like labels such as `token=` or `password=`.
124
+ - The `doctor` profile is configurable now, but `ai doctor` itself remains a GitHub/readiness preflight and does not invoke a provider in this slice.
125
+
126
+ ## slice-05 - Approval gates and planner iterations
127
+
128
+ ### Completed
129
+
130
+ - Added `ai revise` as a phase-safe planner revision command for acceptance and technical-plan drafts.
131
+ - Changed `ai approve` so it requires `--version <n>` and approves only the current saved draft version.
132
+ - Blocked direct approval from arbitrary input files; human feedback must create a new draft through `ai revise`.
133
+ - Required a current production-readiness review before approving a technical-plan draft.
134
+ - Kept spec generation blocked until the reviewed technical-plan draft is approved.
135
+ - Updated README, README_FOR_AI, command docs, onboarding templates, generated init docs, flow guidance, package scripts, and CLI help examples.
136
+ - Added tests for versioned approvals, missing/non-current approval failures, acceptance revise, technical-plan revise, stale review blocking, and spec generation gates.
137
+
138
+ ### Validation
139
+
140
+ - `node --test tests/commands/ai-plan.test.js tests/commands/ai-review-plan.test.js tests/commands/ai-plan-spec-phase.test.js tests/lib/approvals.test.js tests/commands/flow.test.js tests/lib/init-layout.test.js` passed: 48 tests.
141
+ - `node --test tests/**/*.test.js` passed: 276 tests.
142
+ - `git diff --check` passed.
143
+ - `node -e "const fs=require('fs'); for (const f of process.argv.slice(1)) JSON.parse(fs.readFileSync(f,'utf8')); console.log('slice json ok:', process.argv.length-1);" specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/*/slice.json` passed for 12 slice files.
144
+
145
+ ### Risks
146
+
147
+ - `ai revise` now gives the planner the current draft plus feedback; output quality still depends on the selected provider/model.
148
+ - Approval state remains file-based under `.quiver/approvals`; concurrent writes are still governed by later execution/locking hardening.
149
+
150
+ ## slice-06 - Spec, slice, handoff, and PR body generation
151
+
152
+ ### Completed
153
+
154
+ - Completed the generated slice artifact contract with `expected_read_paths`, `allowed_write_paths`, and `validation_hints`.
155
+ - Added generated execution brief sections for read paths, write paths, and validation hints.
156
+ - Preserved compatibility with existing `files` and `tests` fields while exposing clearer agent-facing fields.
157
+ - Added validation that generated `slice.json` files contain required scope arrays.
158
+ - Added fixture coverage for explicit generated scope fields and default derivation from existing `files`/`tests`.
159
+
160
+ ### Validation
161
+
162
+ - `node --test tests/lib/ai-spec-generator.test.js tests/commands/spec-create.test.js tests/commands/ai-plan-spec-phase.test.js` passed: 9 tests.
163
+ - `node --test tests/**/*.test.js` passed: 276 tests.
164
+ - `git diff --check` passed.
165
+ - `node -e "const fs=require('fs'); for (const f of process.argv.slice(1)) JSON.parse(fs.readFileSync(f,'utf8')); console.log('slice json ok:', process.argv.length-1);" specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/*/slice.json` passed for 12 slice files.
166
+
167
+ ### Risks
168
+
169
+ - Generated read/write scopes depend on the approved plan quality; later validation slices should keep hardening error messages when planner output is incomplete.
170
+ - Existing executor code still primarily reads `files` for scope checks; generated `allowed_write_paths` is now aligned with `files` but deeper executor support belongs to later slices.
171
+
172
+ ## slice-07 - Slice execution planning and parallel safety
173
+
174
+ ### Completed
175
+
176
+ - Updated slice graph reads to treat `allowed_write_paths` as the authoritative write scope when present.
177
+ - Preserved compatibility by falling back to existing `files` when `allowed_write_paths` is absent.
178
+ - Added execution plan JSON metadata for `expected_read_paths`, `allowed_write_paths`, and `validation_hints`.
179
+ - Updated human execution plan output to show `Wave <n>` and each slice's `parallel_safe` rationale.
180
+ - Added regression coverage for conflicts detected from `allowed_write_paths` even when `files` is empty.
181
+ - Added CLI JSON coverage for downstream agent/dashboard consumption.
182
+
183
+ ### Validation
184
+
185
+ - `node --test tests/lib/slice-graph.test.js tests/lib/ai-execution-plan.test.js tests/commands/ai-execute-plan.test.js tests/commands/plan.test.js tests/commands/graph.test.js tests/commands/next.test.js` passed: 46 tests.
186
+ - `node --test tests/**/*.test.js` passed: 279 tests.
187
+ - `git diff --check` passed.
188
+ - `node -e "const fs=require('fs'); for (const f of process.argv.slice(1)) JSON.parse(fs.readFileSync(f,'utf8')); console.log('slice json ok:', process.argv.length-1);" specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/*/slice.json` passed for 12 slice files.
189
+
190
+ ### Risks
191
+
192
+ - If planner output omits both `allowed_write_paths` and `files`, Quiver correctly falls back to sequential execution, but the user still needs to fix the slice contract.
193
+ - Parallel execution still requires later execution slices to enforce scope and commit behavior during actual provider runs.
194
+
195
+ ## slice-08 - Controlled slice execution and evidence
196
+
197
+ ### Completed
198
+
199
+ - Updated slice metadata resolution so `allowed_write_paths` becomes the authoritative executor write scope while preserving `files` fallback.
200
+ - Added simple glob-aware scope validation for declared write paths such as `src/**` and `tests/**/*.test.js`.
201
+ - Added branch/worktree validation for direct `ai execute-slice` runs and kept `ai execute-plan` delegated worktrees explicitly exempt through internal orchestration.
202
+ - Expanded executor context with expected read paths and validation hints while keeping prompt-only/manual execution minimal.
203
+ - Added automatic closure artifacts after successful execution: `CLOSURE_BRIEF.md`, `EVIDENCE_REPORT.md`, `COMMAND_LOG.md`, `STATUS.md`, and `slice.json`.
204
+ - Added no-op protection so a provider that changes no in-scope files cannot close a slice.
205
+ - Redacted likely secrets from provider output, validation output, command logs, and saved execution evidence.
206
+ - Updated README and generated command/workflow docs for the controlled execution behavior.
207
+
208
+ ### Validation
209
+
210
+ - `node --test tests/lib/scope.test.js tests/lib/ai-executor.test.js tests/commands/ai-execute-slice.test.js tests/lib/ai-execution-plan.test.js tests/commands/ai-execute-plan.test.js` passed: 39 tests.
211
+ - `node --test tests/**/*.test.js` passed: 285 tests.
212
+
213
+ ### Risks
214
+
215
+ - Scope glob support is intentionally simple and covers the common `*` and `**` cases used by Quiver-generated slices; more advanced glob syntax remains out of scope.
216
+ - Direct `ai execute-slice` now requires the declared slice branch. Orchestrated `ai execute-plan` execution bypasses that specific branch check because it manages temporary worktrees itself.
217
+
218
+ ## slice-09 - Git worktree, commit, PR, and close lifecycle
219
+
220
+ ### Completed
221
+
222
+ - Added `spec start --dry-run` so users can inspect the spec branch and worktree path before mutating Git state.
223
+ - Hardened `ai execute-slice --commit` so commit mode refuses pre-existing dirty files even when `--allow-dirty` is set.
224
+ - Required `--ssh-host-alias` for GitHub PR preflight and added macOS/Linux/Windows SSH alias guidance.
225
+ - Blocked PR creation from `specs/<slug>/pr.md` while slices in that spec are still open.
226
+ - Preserved PR creation through generated `pr.md` and existing `gh pr create` argument-array execution.
227
+ - Kept `spec close` behavior that refuses dirty/unmerged worktrees, supports dry-run, removes the worktree after merge, and pulls the main checkout when a remote base is available.
228
+ - Updated README, README_FOR_AI, command docs, workflow docs, and CLI help examples for the hardened lifecycle.
229
+
230
+ ### Validation
231
+
232
+ - `node --test tests/lib/ai-executor.test.js tests/lib/ai-github.test.js tests/commands/ai-pr.test.js tests/lib/lifecycle.test.js tests/commands/spec-close.test.js tests/commands/ai-execute-plan.test.js` passed: 52 tests.
233
+ - `node --test tests/**/*.test.js` passed: 290 tests.
234
+ - `git diff --check` passed.
235
+
236
+ ### Risks
237
+
238
+ - SSH alias validation checks that the alias was provided, not that the remote host accepts the key; users should still run `ssh -T <alias>` when configuring credentials.
239
+ - Open-slice PR blocking applies to `specs/<slug>/pr.md` paths. Non-standard PR body locations are still allowed for advanced/manual flows.
240
+
241
+ ## slice-10 - Validation, actionable errors, redaction, and fixtures
242
+
243
+ ### Completed
244
+
245
+ - Added a shared actionable error formatter with explicit `Impact`, `Fix`, and `Next command` fields.
246
+ - Applied actionable error formatting to missing agent-profile guidance, missing SSH alias PR preflight, and open-slice PR blocking.
247
+ - Added doctor environment warnings for Node, npm, git, gh, gh auth, shell, write permissions, and paths with spaces.
248
+ - Added `tests/fixtures/validation-errors/matrix.json` as the official fixture matrix for new, existing, old Quiver, monorepo, no git, dirty git, no gh, paths with spaces, docs contradiction, and missing agent profile states.
249
+ - Added `npm run smoke:doctor-fixtures` to enforce the fixture matrix in CI.
250
+ - Updated README, README_FOR_AI, and command docs to mention the new smoke and validation contract.
251
+ - Delegated a bounded fixture-gap scan to a sub-agent and incorporated its high-signal recommendations into the implementation.
252
+
253
+ ### Validation
254
+
255
+ - `node --test tests/lib/doctor.test.js tests/lib/ai-github.test.js tests/commands/ai-agent.test.js tests/commands/doctor.test.js` passed: 30 tests.
256
+ - `npm run smoke:doctor-fixtures` passed: 10 fixture states.
257
+ - `node --test tests/**/*.test.js` passed: 294 tests.
258
+ - `npm run smoke:create-quiver` passed.
259
+ - `npm run smoke:guided-workflow` passed.
260
+ - `git diff --check` passed.
261
+
262
+ ### Risks
263
+
264
+ - Doctor environment checks are warnings, not hard failures, to avoid blocking offline or partially configured projects.
265
+ - The validation fixture matrix is a contract manifest; individual deep fixtures should continue to grow as new bugs are found.
266
+
267
+ ## slice-11 - Export, dashboard-friendly output, and migration
268
+
269
+ ### Completed
270
+
271
+ - Added `ai inspect`, `ai export`, `ai specs list`, `ai slices list`, and `ai trace report` surfaces.
272
+ - Added `src/create-quiver/lib/ai/export-state.js` with a versioned lifecycle export shape for specs, slices, runs, agents, dependencies, blockers, progress, migration findings, and dashboard consumers.
273
+ - Added JSON export as the default `ai export` output and Markdown export for PR/docs usage.
274
+ - Added generated npm scripts for `quiver:ai:inspect`, `quiver:ai:export`, `quiver:ai:specs`, `quiver:ai:slices`, and `quiver:ai:trace`.
275
+ - Added `migrate --dry-run` so older Quiver projects can preview planned migration changes without writing files.
276
+ - Hardened `parseJsonWithComments` so JSON strings containing `//`, `/* ... */`, or glob patterns such as `src/**` are preserved.
277
+ - Updated README, README_FOR_AI, command templates, workflow template, onboarding prompt template, and generated README text.
278
+
279
+ ### Validation
280
+
281
+ - `node --test tests/lib/json.test.js tests/lib/ai-export-state.test.js tests/commands/ai-export.test.js tests/commands/init-profiles.test.js` passed: 20 tests.
282
+ - `node --test tests/lib/init-layout.test.js tests/lib/json.test.js tests/lib/ai-export-state.test.js tests/commands/ai-export.test.js tests/commands/init-profiles.test.js` passed: 28 tests.
283
+ - `node --test tests/**/*.test.js` passed: 301 tests.
284
+ - `npm run smoke:create-quiver` passed.
285
+ - `npm run smoke:guided-workflow` passed: 128 tests plus guided workflow smoke.
286
+ - `npm run smoke:doctor-fixtures` passed: 10 fixture states.
287
+ - `git diff --check` passed.
288
+ - `node -e "JSON.parse(require('fs').readFileSync('package.json','utf8')); JSON.parse(require('fs').readFileSync('specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/slice.json','utf8'));"` passed.
289
+
290
+ ### Risks
291
+
292
+ - The JSON export is intentionally versioned with `schema_version: 1`; dashboards should treat it as a stable-but-young contract and pin expectations.
293
+ - The core package remains UI-free. Any visual dashboard should consume `ai export --format json` externally rather than adding heavy dependencies to core.
@@ -0,0 +1,58 @@
1
+ # Execution Plan - Quiver v25
2
+
3
+ ## Wave 0 - Required Foundation
4
+
5
+ 1. `slice-00-spec-foundation`
6
+ - Must land first.
7
+ - Publishes the spec, slices, handoffs, execution plan, PR body, and source-of-truth planning references.
8
+
9
+ ## Wave 1 - Command and State Foundations
10
+
11
+ Run sequentially:
12
+
13
+ 1. `slice-01-cli-contract-compatibility`
14
+ 2. `slice-02-run-state-phase-locks`
15
+
16
+ These are foundational and should not run in parallel because later work depends on command names, aliases, phase validation, and persistent state.
17
+
18
+ ## Wave 2 - Onboarding and Agent Contracts
19
+
20
+ Can run in parallel after Wave 1 if file scopes do not overlap:
21
+
22
+ 1. `slice-03-safe-ai-onboarding-docs`
23
+ 2. `slice-04-agent-profiles-adapters`
24
+
25
+ ## Wave 3 - Planner Gates and Generation
26
+
27
+ Run sequentially:
28
+
29
+ 1. `slice-05-approval-gates`
30
+ 2. `slice-06-spec-slice-generator`
31
+ 3. `slice-07-slice-execution-planner`
32
+
33
+ These depend on approved phase state and generated artifact contracts.
34
+
35
+ ## Wave 4 - Execution Lifecycle
36
+
37
+ Run sequentially:
38
+
39
+ 1. `slice-08-controlled-slice-execution`
40
+ 2. `slice-09-git-worktree-pr-lifecycle`
41
+
42
+ The Git/PR lifecycle depends on reliable slice closure and evidence.
43
+
44
+ ## Wave 5 - Hardening and Outputs
45
+
46
+ Can run in parallel after Wave 4 if write scopes stay separate:
47
+
48
+ 1. `slice-10-validation-errors-fixtures`
49
+ 2. `slice-11-export-dashboard-migration`
50
+
51
+ ## Parallel Safety Notes
52
+
53
+ - Do not run two slices in parallel if both modify CLI routing or shared command utilities.
54
+ - Do not execute slices in parallel if `allowed_write_paths` overlap.
55
+ - `slice-00` must be committed before implementation slices.
56
+ - Prefer one commit per slice.
57
+ - Run focused tests for touched commands during each slice.
58
+ - Run full smoke/package safety only in final hardening unless package behavior changes earlier.