create-quiver 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +16 -8
  3. package/README_FOR_AI.md +11 -6
  4. package/ROADMAP.md +9 -2
  5. package/docs/COMMANDS.md.template +9 -2
  6. package/package.json +2 -1
  7. package/specs/quiver-v26-0121-smoke-hardening/SPEC.md +2 -2
  8. package/specs/quiver-v26-0121-smoke-hardening/STATUS.md +5 -5
  9. package/specs/quiver-v27-reliability-ai-workflow-hardening/AUDIT_V24_V25_V26.md +67 -0
  10. package/specs/quiver-v27-reliability-ai-workflow-hardening/COMMAND_CONTRACTS.md +125 -0
  11. package/specs/quiver-v27-reliability-ai-workflow-hardening/COVERAGE_MATRIX.md +74 -0
  12. package/specs/quiver-v27-reliability-ai-workflow-hardening/EVIDENCE_REPORT.md +179 -0
  13. package/specs/quiver-v27-reliability-ai-workflow-hardening/EXECUTION_PLAN.md +71 -0
  14. package/specs/quiver-v27-reliability-ai-workflow-hardening/SPEC.md +176 -0
  15. package/specs/quiver-v27-reliability-ai-workflow-hardening/STATUS.md +37 -0
  16. package/specs/quiver-v27-reliability-ai-workflow-hardening/pr.md +132 -0
  17. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-00-docs-audit-coverage-and-contracts/CLOSURE_BRIEF.md +36 -0
  18. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-00-docs-audit-coverage-and-contracts/EXECUTION_BRIEF.md +56 -0
  19. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-00-docs-audit-coverage-and-contracts/slice.json +75 -0
  20. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-01-core-state-resolver-and-canonical-statuses/CLOSURE_BRIEF.md +37 -0
  21. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-01-core-state-resolver-and-canonical-statuses/EXECUTION_BRIEF.md +54 -0
  22. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-01-core-state-resolver-and-canonical-statuses/slice.json +79 -0
  23. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-02-json-export-contract-and-machine-output/CLOSURE_BRIEF.md +34 -0
  24. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-02-json-export-contract-and-machine-output/EXECUTION_BRIEF.md +54 -0
  25. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-02-json-export-contract-and-machine-output/slice.json +75 -0
  26. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-03-approved-plan-to-spec-create/CLOSURE_BRIEF.md +36 -0
  27. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-03-approved-plan-to-spec-create/EXECUTION_BRIEF.md +55 -0
  28. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-03-approved-plan-to-spec-create/slice.json +78 -0
  29. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-04-ai-artifact-storage-redaction-and-token-compaction/CLOSURE_BRIEF.md +31 -0
  30. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-04-ai-artifact-storage-redaction-and-token-compaction/EXECUTION_BRIEF.md +55 -0
  31. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-04-ai-artifact-storage-redaction-and-token-compaction/slice.json +77 -0
  32. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-05-worktree-lifecycle-locks-and-recovery/CLOSURE_BRIEF.md +31 -0
  33. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-05-worktree-lifecycle-locks-and-recovery/EXECUTION_BRIEF.md +55 -0
  34. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-05-worktree-lifecycle-locks-and-recovery/slice.json +84 -0
  35. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-06-validation-gates-and-scope-safety/CLOSURE_BRIEF.md +32 -0
  36. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-06-validation-gates-and-scope-safety/EXECUTION_BRIEF.md +57 -0
  37. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-06-validation-gates-and-scope-safety/slice.json +99 -0
  38. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-07-context-analysis-and-doctor-flow/CLOSURE_BRIEF.md +31 -0
  39. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-07-context-analysis-and-doctor-flow/EXECUTION_BRIEF.md +57 -0
  40. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-07-context-analysis-and-doctor-flow/slice.json +88 -0
  41. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-08-cross-platform-help-auth-and-dx/CLOSURE_BRIEF.md +31 -0
  42. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-08-cross-platform-help-auth-and-dx/EXECUTION_BRIEF.md +56 -0
  43. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-08-cross-platform-help-auth-and-dx/slice.json +85 -0
  44. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-09-fixtures-smoke-docs-and-release-readiness/CLOSURE_BRIEF.md +32 -0
  45. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-09-fixtures-smoke-docs-and-release-readiness/EXECUTION_BRIEF.md +56 -0
  46. package/specs/quiver-v27-reliability-ai-workflow-hardening/slices/slice-09-fixtures-smoke-docs-and-release-readiness/slice.json +91 -0
  47. package/src/create-quiver/commands/ai.js +84 -9
  48. package/src/create-quiver/commands/flow.js +52 -4
  49. package/src/create-quiver/commands/graph.js +7 -7
  50. package/src/create-quiver/commands/plan.js +6 -15
  51. package/src/create-quiver/commands/spec.js +282 -0
  52. package/src/create-quiver/index.js +83 -21
  53. package/src/create-quiver/lib/agent-profiles.js +15 -3
  54. package/src/create-quiver/lib/ai/artifacts.js +318 -0
  55. package/src/create-quiver/lib/ai/execution-plan.js +9 -0
  56. package/src/create-quiver/lib/ai/executor.js +3 -2
  57. package/src/create-quiver/lib/ai/export-state.js +242 -97
  58. package/src/create-quiver/lib/ai/github.js +80 -3
  59. package/src/create-quiver/lib/ai/plan-review.js +2 -0
  60. package/src/create-quiver/lib/ai/spec-generator.js +72 -13
  61. package/src/create-quiver/lib/ai/spec-templates.js +72 -12
  62. package/src/create-quiver/lib/analyze.js +2 -2
  63. package/src/create-quiver/lib/approvals.js +14 -2
  64. package/src/create-quiver/lib/doctor.js +79 -0
  65. package/src/create-quiver/lib/git.js +40 -1
  66. package/src/create-quiver/lib/handoff.js +43 -1
  67. package/src/create-quiver/lib/init-docs.js +11 -7
  68. package/src/create-quiver/lib/init-layout.js +1 -0
  69. package/src/create-quiver/lib/lifecycle.js +52 -3
  70. package/src/create-quiver/lib/locks.js +134 -0
  71. package/src/create-quiver/lib/package-safety.js +7 -0
  72. package/src/create-quiver/lib/paths.js +74 -0
  73. package/src/create-quiver/lib/project-scan.js +74 -0
  74. package/src/create-quiver/lib/project-state-resolver.js +236 -0
  75. package/src/create-quiver/lib/readiness.js +48 -7
  76. package/src/create-quiver/lib/scope.js +2 -1
  77. package/src/create-quiver/lib/slice.js +8 -4
  78. package/src/create-quiver/lib/spec-worktrees.js +121 -38
  79. package/src/create-quiver/lib/statuses.js +115 -0
@@ -0,0 +1,179 @@
1
+ # Evidence Report - Quiver v27 Reliability and AI Workflow Hardening
2
+
3
+ ## Initial Evidence
4
+
5
+ - Pixel Quiver final dogfooding produced `QP-001` to `QP-019` and `QIS-001` to `QIS-022`.
6
+ - The approved plan requires a single spec with slices ordered by shared contracts first, command fixes second, and release readiness last.
7
+ - `README_FOR_AI.md` was read before creating this spec.
8
+ - `ROADMAP.md` and `BACKLOG.md` were reviewed before creating this spec.
9
+
10
+ ## Validation Status
11
+
12
+ - v27 source, fixture, smoke, guided workflow, and packaged tarball validation passed on 2026-05-24.
13
+ - npm publication was intentionally not performed by this spec.
14
+
15
+ ## Slice 00 Evidence - 2026-05-24
16
+
17
+ - Created `COVERAGE_MATRIX.md` to map all `QP-001..QP-019` and `QIS-001..QIS-022` to a responsible slice, risk, and validation strategy.
18
+ - Created `COMMAND_CONTRACTS.md` to define shared production contracts for output streams, exit codes, dry-run behavior, write classes, atomicity, idempotency, path safety, root detection, package manager detection, deterministic ordering, status catalogs, JSON versioning, legacy/strict modes, security, and validation.
19
+ - Created `AUDIT_V24_V25_V26.md` to separate existing v24/v25/v26 implementation surfaces from the dogfooding gaps that v27 must still close.
20
+ - Audited existing command and test surfaces with `rg` across `src/create-quiver`, `tests`, and v24/v25/v26 specs for resolver/export/spec-create/check-scope/check-handoff/worktree/analyze/dry-run/doctor/path/redaction surfaces.
21
+ - Confirmed `README_FOR_AI.md`, `ROADMAP.md`, and `CHANGELOG.md` were updated so v26 remains the shipped release and v27 is not described as published.
22
+
23
+ ## Slice 01 Evidence - 2026-05-24
24
+
25
+ - Added `src/create-quiver/lib/statuses.js` with shared canonical status catalogs and alias normalization for specs, slices, runs, approvals, agents, and datasets.
26
+ - Added `src/create-quiver/lib/project-state-resolver.js` as the shared resolver over slice discovery, graph building, deterministic ordering, scoped reads, completed-slice filtering, progress, spec grouping, and graph summaries.
27
+ - Routed classic `plan` and `graph` commands through the shared resolver while preserving existing human output and adding `canonical_status` to machine payloads.
28
+ - Routed AI lifecycle export/list/inspect state through the shared resolver so classic and AI surfaces agree about completed slices when `includeCompleted` is requested.
29
+ - Added `tests/lib/project-state-resolver.test.js` for canonical statuses, scoped read safety, and plan/export agreement on completed slices.
30
+ - Ran targeted command and library tests for resolver, AI export, plan, graph, next, and doctor.
31
+ - Ran `npm run smoke:doctor-fixtures`.
32
+ - Ran full Node test suite: `node --test tests/**/*.test.js` passed with 320 tests.
33
+ - Ran `git diff --check`.
34
+
35
+ ## Slice 02 Evidence - 2026-05-24
36
+
37
+ - Bumped lifecycle export schema to `schema_version: 2`.
38
+ - Extended `ai export` JSON with `source_metadata`, `warnings`, `approvals`, top-level `blockers`, `evidence`, `next_steps`, `lifecycle`, and `aggregates` while preserving existing `summary`, `project`, `agents`, `runs`, `specs`, `slices`, `graph`, `migration`, and `dashboard` fields.
39
+ - Kept source metadata sanitized by exposing the project root name rather than an absolute local path.
40
+ - Added canonical statuses to exported slices, runs, agents, specs, and approvals.
41
+ - Added CLI tests that parse stdout JSON directly, assert stderr is empty on success, assert unsupported formats write to stderr with non-zero exit, and assert `--include-completed` includes completed slices.
42
+ - Ran `node --test tests/lib/ai-export-state.test.js tests/commands/ai-export.test.js`.
43
+ - Ran `node --test tests/commands/cli-contract.test.js tests/lib/project-state-resolver.test.js`.
44
+ - Ran full Node test suite: `node --test tests/**/*.test.js` passed with 321 tests.
45
+ - Ran `git diff --check`.
46
+
47
+ ## Slice 03 Evidence - 2026-05-24
48
+
49
+ - Updated approved-plan parsing to extract structured slice data from full JSON input or fenced JSON blocks inside Markdown.
50
+ - Removed silent generic fallback behavior for plans without structured slices.
51
+ - Added pre-write validation for duplicate slice IDs, missing dependencies, invalid slice IDs, and dependency cycles.
52
+ - Kept `slice-00-spec-foundation` mandatory while preserving every approved implementation slice from the plan.
53
+ - Added atomic failure coverage showing missing structured slices fail before creating a spec directory or temporary build remnant.
54
+ - Added command-level coverage for `spec create --dry-run` failing safely when the reviewed approved plan lacks structured slices.
55
+ - Ran `node --test tests/lib/ai-spec-generator.test.js tests/commands/spec-create.test.js tests/commands/ai-plan-spec-phase.test.js`.
56
+ - Ran full Node test suite: `node --test tests/**/*.test.js` passed with 327 tests.
57
+
58
+ ## Slice 04 Evidence - 2026-05-24
59
+
60
+ - Added `src/create-quiver/lib/ai/artifacts.js` to centralize clean AI output extraction, raw provider artifact persistence, local path redaction, prompt-size checks, and revise-input compaction.
61
+ - Updated `ai plan`, `ai revise`, and `ai review-plan` persistence so saved drafts/reviews use clean provider output while raw stdout/stderr are stored separately under `.quiver/runs/<run-id>/raw/*.json`.
62
+ - Added prompt echo stripping and provider-log edge cleanup so draft artifacts do not include provider logs or prompt echoes when useful stdout is available.
63
+ - Added raw artifact metadata to planner approval and plan-review metadata, including `raw_artifact_path`, `output_source`, and revise `input_compaction`.
64
+ - Preserved explicit approved draft versions while carrying raw artifact metadata from the selected draft into approved metadata.
65
+ - Added revise-input compaction for oversized feedback, preserving decisions, risks, files, acceptance criteria, validation, blockers, dependencies, assumptions, rollback, and evidence lines.
66
+ - Added prompt-size rejection before provider execution with an actionable `AI_PROMPT_TOO_LARGE` error.
67
+ - Added package-safety coverage for raw AI artifacts under `.quiver/runs/*/raw/`.
68
+ - Ran `node --test tests/commands/ai-plan.test.js tests/commands/ai-review-plan.test.js tests/lib/ai-providers.test.js tests/lib/package-safety.test.js`.
69
+ - Ran `node --test tests/lib/ai-*.test.js tests/commands/ai-plan.test.js tests/commands/ai-review-plan.test.js`.
70
+ - Ran full Node test suite: `node --test tests/**/*.test.js` passed with 330 tests.
71
+ - Ran `node bin/create-quiver.js plan --spec quiver-v27-reliability-ai-workflow-hardening --include-completed`.
72
+ - Ran `node bin/create-quiver.js graph --spec quiver-v27-reliability-ai-workflow-hardening`.
73
+ - Ran `git diff --check`.
74
+
75
+ ## Slice 05 Evidence - 2026-05-24
76
+
77
+ - Added `src/create-quiver/lib/locks.js` to centralize `.quiver/locks` lock acquisition, release, stale lock diagnostics, and automatic local exclusion of Quiver runtime state.
78
+ - Hardened `spec start` and `spec close` with spec-level locks, persistent worktree reuse, stale/missing worktree detection, and actionable recovery guidance.
79
+ - Hardened slice worktree startup to reject nested worktree creation when commands run from an existing linked worktree.
80
+ - Hardened git helpers to detect missing paths, linked worktrees, absolute git dirs, and shared git common dirs reliably across realpath differences such as `/var` and `/private/var`.
81
+ - Added delegated execution locks for parallel AI execution runs so duplicate concurrent run IDs fail before provider execution.
82
+ - Added tests for stale spec worktrees, concurrent spec locks, nested slice worktrees, and delegated execution lock collisions.
83
+ - Ran `node --test tests/lib/lifecycle.test.js tests/commands/spec-worktree.test.js tests/commands/spec-close.test.js tests/commands/ai-execute-plan.test.js`.
84
+ - Ran full Node test suite: `node --test tests/**/*.test.js` passed with 334 tests.
85
+
86
+ ## Slice 06 Evidence - 2026-05-24
87
+
88
+ - Hardened `check-slice --local` so it validates execution git metadata, declared write/read paths, dependency contracts, and reports exactly which checks are executed or skipped in local mode.
89
+ - Updated `check-scope` to resolve base branches from `--base`, then `slice.git.base_branch`, then safe fallbacks instead of hardcoding `develop`.
90
+ - Added actionable `check-handoff` failures with accepted heading aliases and a minimal copyable template for legacy handoffs, execution briefs, and closure briefs.
91
+ - Added `spec validate` to validate spec docs, slices, JSON parseability, brief contracts, dependency cycles, safe paths, evidence references, and status references.
92
+ - Added shared path safety helpers and applied them to slice resolution, scope validation, and AI executor prompt/scope construction so absolute, traversal, and external slice paths are rejected.
93
+ - Synced the new `spec validate` command into generated `quiver:spec:validate` scripts, README command references, `README_FOR_AI.md`, and `docs/COMMANDS.md.template`.
94
+ - Ran `node bin/create-quiver.js spec validate specs/quiver-v27-reliability-ai-workflow-hardening`.
95
+ - Ran `node --test tests/lib/check-slice.test.js tests/lib/scope.test.js tests/lib/handoff.test.js tests/lib/paths.test.js tests/commands/spec-validate.test.js tests/commands/cli-contract.test.js`.
96
+ - Ran `node --test tests/commands/spec-create.test.js tests/commands/spec-worktree.test.js tests/commands/spec-close.test.js tests/commands/ai-execute-slice.test.js tests/commands/ai-execute-plan.test.js tests/lib/scope.test.js tests/lib/check-slice.test.js tests/lib/handoff.test.js tests/lib/paths.test.js`.
97
+ - Ran full Node test suite: `node --test tests/**/*.test.js` passed with 343 tests.
98
+
99
+ ## Slice 07 Evidence - 2026-05-24
100
+
101
+ - Added `analyze --dry-run` as a true no-write mode that reports planned scan, project map, and AI context writes without creating `.quiver/` or `docs/`.
102
+ - Fixed React + Vite detection so `vite.config.*` no longer classifies a project as Vue unless Vue evidence exists.
103
+ - Added project scan source/freshness metadata through `readProjectScanStatus`, including current, legacy, partial, stale, invalid, and missing states.
104
+ - Updated `flow` to print the context source summary and include the same metadata in JSON output.
105
+ - Updated `doctor` examples to prefer an active non-completed slice, use the only spec when unambiguous, or fall back to placeholders when multiple specs have no active slice.
106
+ - Added prepare-context coverage showing evidence-backed stack and command facts are preserved while unknown architecture boundaries remain marked for confirmation.
107
+ - Added tests for analyze dry-run, React/Vite classification, scan source summaries, flow context source output, doctor active/generic examples, and prepare-context evidence behavior.
108
+ - Ran `node --test tests/commands/analyze.test.js tests/commands/ai-onboard.test.js tests/commands/flow.test.js tests/commands/doctor.test.js tests/lib/project-scan.test.js tests/lib/doctor.test.js`.
109
+ - Ran `npm run smoke:doctor-fixtures`.
110
+ - Ran `node bin/create-quiver.js spec validate specs/quiver-v27-reliability-ai-workflow-hardening`.
111
+ - Ran `git diff --check`.
112
+ - Ran full Node test suite: `node --test tests/**/*.test.js` passed with 349 tests.
113
+ - Ran `node bin/create-quiver.js plan --spec quiver-v27-reliability-ai-workflow-hardening --include-completed`.
114
+ - Ran `node bin/create-quiver.js graph --spec quiver-v27-reliability-ai-workflow-hardening`.
115
+
116
+ ## Slice 08 Evidence - 2026-05-24
117
+
118
+ - Added real `ai agent set --dry-run` preview behavior that validates the requested profile and reports the planned `.quiver/agents/profiles.json` change without writing files.
119
+ - Updated top-level help and examples so `--help` includes the agent dry-run flow.
120
+ - Hardened GitHub auth failures with actionable account, scope, and SSH alias guidance plus a safe `gh auth status` next command.
121
+ - Added shell-specific path guidance for identity files and PR commands with spaces across macOS/Linux, Windows PowerShell, Git Bash, and WSL.
122
+ - Updated `flow` to report the detected package manager and matching generated `quiver:flow` script command.
123
+ - Updated init/migrate auto-install fallback warnings to respect the detected package manager instead of always printing npm.
124
+ - Synced `README.md`, `README_FOR_AI.md`, and `docs/COMMANDS.md.template` with the new help/auth/dry-run behavior.
125
+ - Ran `node --test tests/commands/cli-contract.test.js tests/commands/ai-agent.test.js tests/lib/ai-github.test.js tests/commands/flow.test.js`.
126
+ - Ran `node --test tests/commands/cli-contract.test.js tests/commands/ai-agent.test.js tests/lib/ai-github.test.js tests/commands/flow.test.js tests/lib/init-docs.test.js`.
127
+ - Ran `node --test tests/commands/cli-contract.test.js tests/commands/ai-agent.test.js tests/lib/ai-github.test.js tests/lib/doctor.test.js tests/commands/flow.test.js tests/lib/init-docs.test.js`.
128
+ - Ran `npm run smoke:doctor-fixtures`.
129
+ - Ran `node bin/create-quiver.js spec validate specs/quiver-v27-reliability-ai-workflow-hardening`.
130
+ - Ran `node --test tests/**/*.test.js` passed with 354 tests.
131
+ - Ran `node bin/create-quiver.js plan --spec quiver-v27-reliability-ai-workflow-hardening --include-completed`.
132
+ - Ran `node bin/create-quiver.js graph --spec quiver-v27-reliability-ai-workflow-hardening`.
133
+ - Ran `git diff --check`.
134
+
135
+ ## Slice 09 Evidence - 2026-05-24
136
+
137
+ - Extended the sanitized doctor fixture matrix to cover Pixel Quiver-style completed specs, multiple-spec fallback behavior, stale generated context, old `.quiver` state, no-Git projects, and paths with spaces.
138
+ - Hardened `scripts/ci/smoke-doctor-fixtures.js` so every declared fixture state must have executable coverage references and those references must exist.
139
+ - Added doctor command coverage for stale generated docs when the scan is newer than `docs/PROJECT_MAP.md`.
140
+ - Added doctor command coverage for old incomplete `.quiver` state so legacy projects recommend `migrate` instead of `init`.
141
+ - Extended `scripts/ci/smoke-create-quiver.sh` to smoke `flow` package-manager guidance, source `ai agent set --dry-run`, packaged CLI `--help`, packaged `flow`, and packaged `ai agent set --dry-run`.
142
+ - Synced `README_FOR_AI.md`, `ROADMAP.md`, `CHANGELOG.md`, `README.md`, v27 `STATUS.md`, `SPEC.md`, `EXECUTION_PLAN.md`, `pr.md`, and this evidence report with the implemented-but-unpublished v27 state.
143
+ - Ran `node --test tests/commands/doctor.test.js`.
144
+ - Ran `npm run smoke:doctor-fixtures`.
145
+ - Ran `npm run smoke:create-quiver`.
146
+ - Ran `npm run smoke:guided-workflow`.
147
+ - Ran `npm run package:quiver`.
148
+ - Ran full Node test suite: `node --test tests/**/*.test.js` passed with 356 tests.
149
+ - Ran `node bin/create-quiver.js spec validate specs/quiver-v27-reliability-ai-workflow-hardening`.
150
+ - Ran `node bin/create-quiver.js plan --spec quiver-v27-reliability-ai-workflow-hardening --include-completed`.
151
+ - Ran `node bin/create-quiver.js graph --spec quiver-v27-reliability-ai-workflow-hardening --include-completed`.
152
+ - Ran `node bin/create-quiver.js next --spec quiver-v27-reliability-ai-workflow-hardening`; no ready slices remain.
153
+ - Ran targeted regression suite: `node --test tests/commands/doctor.test.js tests/lib/project-state-resolver.test.js tests/commands/plan.test.js tests/commands/graph.test.js` passed with 31 tests.
154
+ - Ran `git diff --check`.
155
+
156
+ ## Spec Package Validation - 2026-05-24
157
+
158
+ - Every `slice.json` under `specs/quiver-v27-reliability-ai-workflow-hardening` parsed successfully with Node.
159
+ - Every `EXECUTION_BRIEF.md` passed `node bin/create-quiver.js check-handoff`.
160
+ - Every `CLOSURE_BRIEF.md` passed `node bin/create-quiver.js check-handoff`.
161
+ - `node bin/create-quiver.js plan --spec quiver-v27-reliability-ai-workflow-hardening --include-completed` passed and reported 10 planned slices.
162
+ - `node bin/create-quiver.js graph --spec quiver-v27-reliability-ai-workflow-hardening` passed and produced the expected dependency levels.
163
+ - `node bin/create-quiver.js check-slice --local <slice.json>` passed for all 10 slices.
164
+ - `git diff --check` passed.
165
+
166
+ ## Slice Evidence
167
+
168
+ | Slice | Evidence |
169
+ |---|---|
170
+ | slice-00 | Completed: coverage matrix, command contracts, v24/v25/v26 audit, source-of-truth docs sync, and spec package validation. |
171
+ | slice-01 | Completed: shared resolver, canonical status catalogs, classic/AI resolver adapters, scoped-read tests, completed-slice consistency tests, and targeted validation. |
172
+ | slice-02 | Completed: schema v2 export contract, pure stdout/stderr CLI checks, completed-slice export coverage, source metadata, warnings, approvals, evidence, next steps, lifecycle, and aggregates. |
173
+ | slice-03 | Completed: structured approved-plan extraction, no generic fallback, duplicate/dependency/cycle validation, eight-slice preservation, safe failure cleanup, and command coverage. |
174
+ | slice-04 | Completed: clean drafts/reviews, redacted run-scoped raw provider artifacts, revise compaction, prompt-size guardrails, approval metadata, and raw artifact package-safety coverage. |
175
+ | slice-05 | Completed: spec/slice worktree locks, stale and missing worktree recovery, nested worktree prevention, delegated run lock safety, and lifecycle/git helper coverage. |
176
+ | slice-06 | Completed: stronger local slice gates, base-aware scope validation, actionable handoff templates, spec validate, and repo-bound path safety. |
177
+ | slice-07 | Completed: read-only analyze dry-run, React/Vite stack detection, scan source/freshness reporting, flow context source output, active/generic doctor examples, and prepare-context evidence coverage. |
178
+ | slice-08 | Completed: agent profile dry-run, grouped help sync, cross-platform path guidance, GitHub account/scope/alias diagnostics, package-manager-aware flow guidance, install fallback messages, and focused command/library tests. |
179
+ | slice-09 | Completed: sanitized fixture matrix coverage, fixture coverage validator, stale-doc and old-state doctor regressions, source and packaged CLI smokes, full test suite, package smoke, and docs/release readiness sync. |
@@ -0,0 +1,71 @@
1
+ # Execution Plan - Quiver v27
2
+
3
+ ## Wave 0 - Required Foundation
4
+
5
+ 1. `slice-00-docs-audit-coverage-and-contracts` - completed
6
+ - Must run first.
7
+ - Audits docs/code/tests against Pixel Quiver evidence.
8
+ - Defines the contracts that prevent partial fixes.
9
+
10
+ ## Wave 1 - Shared Model
11
+
12
+ Run sequentially:
13
+
14
+ 1. `slice-01-core-state-resolver-and-canonical-statuses` - completed
15
+
16
+ This slice owns the state model used by later command fixes.
17
+
18
+ ## Wave 2 - Export and Spec Generation
19
+
20
+ Run after Wave 1. Prefer sequential order:
21
+
22
+ 1. `slice-02-json-export-contract-and-machine-output` - completed
23
+ 2. `slice-03-approved-plan-to-spec-create` - completed
24
+
25
+ These touch shared AI/spec data contracts and should not run in parallel unless file scopes are proven independent.
26
+
27
+ ## Wave 3 - AI Artifacts and Worktrees
28
+
29
+ Can run in parallel after Wave 1 if write scopes do not overlap:
30
+
31
+ 1. `slice-04-ai-artifact-storage-redaction-and-token-compaction` - completed
32
+ 2. `slice-05-worktree-lifecycle-locks-and-recovery` - completed
33
+
34
+ Status: Wave 3 is complete.
35
+
36
+ ## Wave 4 - Validation Gates
37
+
38
+ Run after Wave 3:
39
+
40
+ 1. `slice-06-validation-gates-and-scope-safety` - completed
41
+
42
+ Status: Wave 4 is complete.
43
+
44
+ ## Wave 5 - Context and DX
45
+
46
+ Run after Wave 4:
47
+
48
+ 1. `slice-07-context-analysis-and-doctor-flow` - completed
49
+ 2. `slice-08-cross-platform-help-auth-and-dx` - completed
50
+
51
+ `slice-08` depends on `slice-07` because help/auth guidance should reference the hardened diagnostics contract.
52
+
53
+ Status: Wave 5 is complete.
54
+
55
+ ## Wave 6 - Final Readiness
56
+
57
+ Run last:
58
+
59
+ 1. `slice-09-fixtures-smoke-docs-and-release-readiness`
60
+
61
+ This slice validates the whole package from source and tarball.
62
+
63
+ Status: Wave 6 is complete.
64
+
65
+ ## Parallel Safety Notes
66
+
67
+ - Keep one commit per slice.
68
+ - Do not run slices in parallel when `allowed_write_paths` overlap.
69
+ - `slice-00`, `slice-01`, `slice-02`, `slice-03`, `slice-06`, and `slice-09` are sequential checkpoints.
70
+ - `slice-04` and `slice-05` are the main candidates for parallel execution after `slice-01`.
71
+ - Do not publish npm from this spec.
@@ -0,0 +1,176 @@
1
+ # Quiver v27 - Reliability and AI Workflow Hardening
2
+
3
+ **Date:** 2026-05-24
4
+ **Status:** Active
5
+ **Source:** Pixel Quiver dogfooding evidence, final worktree traceability
6
+
7
+ Slice numbering resets here. This spec intentionally starts at `slice-00`.
8
+
9
+ ## Problem
10
+
11
+ Real use of Quiver in Pixel Quiver exposed that several AI-first workflow areas are still fragile even though related capabilities were introduced across v24, v25, and v26.
12
+
13
+ The current risk is not a missing single feature. The risk is systemic: commands can disagree about specs/slices, machine-readable output is not stable enough for dashboards, `spec create` can generate incomplete scaffolds from an approved plan, dry-run behavior is not consistently read-only, and validation/worktree guidance can leave users or agents in ambiguous states.
14
+
15
+ ## Objective
16
+
17
+ Make Quiver reliable for production-grade AI-first WDD + SDD workflows by hardening the core state model, command contracts, spec/slice generation, exports, AI artifacts, worktrees, validations, context preparation, cross-platform DX, and release evidence.
18
+
19
+ ## Evidence Sources
20
+
21
+ Primary requirement inputs are the final Pixel Quiver dogfooding files:
22
+
23
+ - `/Users/fabrijk/Documents/Work/Proyectos Personales/nika/.worktrees/Pixel Quiver/feature-REAL-QUIVER-AI-LIFECYCLE-01-quiver-ai-config-and-context/QUIVER_PROBLEMS.md`
24
+ - `/Users/fabrijk/Documents/Work/Proyectos Personales/nika/.worktrees/Pixel Quiver/feature-REAL-QUIVER-AI-LIFECYCLE-01-quiver-ai-config-and-context/QUIVER_IMPROVEMENT_SUGGESTIONS.md`
25
+ - `/Users/fabrijk/Documents/Work/Proyectos Personales/nika/.worktrees/Pixel Quiver/feature-REAL-QUIVER-AI-LIFECYCLE-01-quiver-ai-config-and-context/COMMAND_LOG.md`
26
+
27
+ The final traceability set contains:
28
+
29
+ - `QP-001` to `QP-019`
30
+ - `QIS-001` to `QIS-022`
31
+
32
+ ## Core Decisions
33
+
34
+ - Audit existing v24/v25/v26 behavior before changing code.
35
+ - Treat `README_FOR_AI.md` as the repository source of truth.
36
+ - Keep `npx create-quiver` as the canonical bootstrap command.
37
+ - Preserve existing command names and compatibility unless a breaking change is explicitly justified.
38
+ - Define shared contracts before fixing individual commands.
39
+ - Make `slice.json` and `.quiver/` operational state the source of truth; visible docs are derived and validated.
40
+ - Keep `--dry-run` strictly read-only.
41
+ - Keep machine-readable output parseable without cleanup.
42
+ - Keep one persistent worktree per spec and one commit per slice; delegated temporary worktrees remain an internal execution mode.
43
+ - Do not publish npm or open PRs from this spec unless explicitly requested after implementation and validation.
44
+
45
+ ## Scope
46
+
47
+ ### Included
48
+
49
+ - Audit and coverage matrix for all `QP-*` and `QIS-*`.
50
+ - Command contracts: exit codes, stdout/stderr, dry-run, write classes, idempotency, atomic writes, path safety, root detection, package manager detection, and deterministic ordering.
51
+ - Unified state resolver for specs, slices, runs, approvals, agents, evidence, worktrees, status, and source metadata.
52
+ - Canonical status catalogs for specs, slices, runs, approvals, agents, and datasets.
53
+ - JSON export contract for dashboards and agents.
54
+ - Alignment between `ai export` and the stable export contract.
55
+ - `spec create` generation from a reviewed and approved technical plan.
56
+ - Structured approved-plan slice block validation.
57
+ - Clean AI drafts, separated raw logs, redaction, and token compaction.
58
+ - Worktree lifecycle hardening, locks, recovery, and no nested worktree guidance.
59
+ - Validation gates for `check-slice`, `check-scope`, `check-handoff`, and `spec validate`.
60
+ - Context and diagnostics hardening for `analyze`, `prepare-context`, `flow`, and `doctor`.
61
+ - Cross-platform DX for macOS, Linux, Windows PowerShell, Git Bash, and WSL.
62
+ - GitHub auth diagnostics and help/error messages.
63
+ - Real/sanitized fixtures and smoke tests, including tarball/package validation.
64
+
65
+ ### Excluded
66
+
67
+ - Building a web dashboard inside Quiver core.
68
+ - Publishing npm.
69
+ - Opening a PR.
70
+ - Replacing the WDD + SDD methodology.
71
+ - Removing existing legacy compatibility without an explicit migration path.
72
+ - Storing provider credentials or API keys.
73
+
74
+ ## Acceptance Criteria
75
+
76
+ 1. Given the v27 spec is created, when `slice-00` completes, then every `QP-*` and `QIS-*` is mapped to a slice, command area, risk, and validation strategy.
77
+ 2. Given a command supports `--dry-run`, when it completes, then no repository file changes, including `.quiver/`, `docs/`, and `specs/`.
78
+ 3. Given a command emits `--format json`, when it succeeds, then `stdout` is valid JSON parseable without removing logs or human text.
79
+ 4. Given a command fails, when it exits, then it writes the error to `stderr`, exits non-zero, and leaves previous valid state intact or reports exact partial state.
80
+ 5. Given Quiver resolves project state, when commands inspect specs/slices, then classic and AI commands use the same resolver and agree on status, dependencies, completed slices, runs, approvals, agents, and evidence.
81
+ 6. Given a project has completed slices, when export runs with `--include-completed`, then completed specs/slices appear in deterministic order.
82
+ 7. Given Quiver exports JSON, when a dashboard consumes it, then the payload includes schema version, dataset source, generated timestamp, source metadata, warnings, specs, slices, agents, runs, approvals, blockers, evidence, next steps, lifecycle, and aggregates.
83
+ 8. Given an approved technical plan includes a structured slice block, when `spec create` runs, then it creates the approved spec, slices, handoffs, execution plan, and PR body without generic fallback.
84
+ 9. Given an approved technical plan lacks a parseable structured slice block, when `spec create` runs, then it fails before writing files and prints the expected format.
85
+ 10. Given an AI provider returns prompt echo, logs, or mixed output, when Quiver persists drafts, then the useful draft is clean and raw logs are stored separately with redaction.
86
+ 11. Given feedback is near provider context limits, when `ai revise` runs, then Quiver compacts safely or requests smaller input before exceeding limits.
87
+ 12. Given a spec worktree exists, when `spec start`, `spec status`, or slice execution commands run, then Quiver reuses the persistent spec worktree and avoids nested or conflicting worktrees.
88
+ 13. Given a worktree or lock is stale, missing, dirty, or manually removed, when Quiver detects it, then it reports recovery steps without corrupting state.
89
+ 14. Given a slice is checked locally, when `check-slice --local` runs, then it validates all local preconditions required by later execution or explicitly lists skipped checks.
90
+ 15. Given `check-scope` receives `--base` or a slice declares `git.base_branch`, when it runs, then it uses that base before falling back.
91
+ 16. Given a handoff/brief is incomplete, when `check-handoff` runs, then it prints the missing heading, a minimal template, and supported aliases where applicable.
92
+ 17. Given a path is outside the project root or attempts traversal, when a write path is resolved, then Quiver rejects it.
93
+ 18. Given Quiver runs in a simple repo, subdirectory, worktree, or basic monorepo, when it resolves the root, then it uses or reports the project root clearly.
94
+ 19. Given a project uses npm, pnpm, yarn, or bun, when Quiver suggests package commands, then it respects the detected package manager.
95
+ 20. Given a project path contains spaces, when Quiver prints commands, then examples are copy-safe for macOS, Linux, Windows PowerShell, Git Bash, and WSL.
96
+ 21. Given GitHub auth is missing or ambiguous, when `ai doctor` or PR preflight runs, then Quiver reports account/scopes/alias expectations and the next safe command.
97
+ 22. Given old `.quiver/` state exists, when `migrate --dry-run` runs, then it reports exactly what would be updated and preserves existing data.
98
+ 23. Given fixtures are added from real projects, when committed, then they are sanitized and do not expose unnecessary personal paths or credentials.
99
+ 24. Given release readiness is validated, when final smoke runs, then it uses the packaged tarball or installed package path, not only local source files.
100
+
101
+ ## Coverage Matrix
102
+
103
+ The full coverage matrix lives in `COVERAGE_MATRIX.md`. Summary:
104
+
105
+ | Evidence | Covered by |
106
+ |---|---|
107
+ | QP-001, QIS-001 | slice-07 |
108
+ | QP-002, QIS-002 | slice-08 |
109
+ | QP-003, QIS-006 | slice-01, slice-02 |
110
+ | QP-004, QIS-009 | slice-08 |
111
+ | QP-005, QIS-007 | slice-07 |
112
+ | QP-006, QIS-008 | slice-07 |
113
+ | QP-007, QIS-010 | slice-07, slice-08 |
114
+ | QP-008, QIS-008 | slice-00, slice-07 |
115
+ | QP-009, QIS-012 | slice-04 |
116
+ | QP-010, QIS-013 | slice-04 |
117
+ | QP-011, QIS-014, QIS-015 | slice-03 |
118
+ | QP-012 | slice-03 |
119
+ | QP-013, QIS-016 | slice-06 |
120
+ | QP-014, QIS-017 | slice-07 |
121
+ | QP-015, QIS-018 | slice-07 |
122
+ | QP-016, QIS-019 | slice-06 |
123
+ | QP-017, QIS-020 | slice-06 |
124
+ | QP-018, QIS-021 | slice-05 |
125
+ | QP-019, QIS-004, QIS-022 | slice-02 |
126
+ | QIS-003 | slice-06 |
127
+ | QIS-005 | slice-06 |
128
+ | QIS-011 | slice-08 |
129
+
130
+ ## Technical Plan
131
+
132
+ 1. Publish a documentation-only foundation that audits current docs, code, tests, and dogfooding evidence.
133
+ 2. Define command contracts and the shared internal state model before command-specific fixes.
134
+ 3. Build or refactor a core resolver that every relevant command can consume.
135
+ 4. Define and test a stable JSON export contract with pure machine output.
136
+ 5. Make `spec create` require a reviewed, approved, structured plan and fail safely otherwise.
137
+ 6. Clean AI artifact persistence, raw logs, redaction, and token compaction.
138
+ 7. Harden worktree, lock, branch, and recovery behavior for the spec/slice lifecycle.
139
+ 8. Harden validation gates and scope/path safety.
140
+ 9. Harden context commands, diagnostics, first-use guidance, and cross-platform help.
141
+ 10. Validate with fixtures, command tests, smokes, tarball/package smoke, docs sync, and release readiness.
142
+
143
+ ## Slice Roadmap
144
+
145
+ | Slice | Title | Status | Dependencies |
146
+ |---|---|---|---|
147
+ | slice-00 | Docs audit, coverage, and contracts | completed | none |
148
+ | slice-01 | Core state resolver and canonical statuses | completed | slice-00 |
149
+ | slice-02 | JSON export contract and machine output | completed | slice-01 |
150
+ | slice-03 | Approved plan to spec create | completed | slice-01, slice-02 |
151
+ | slice-04 | AI artifact storage, redaction, and token compaction | completed | slice-01 |
152
+ | slice-05 | Worktree lifecycle, locks, and recovery | completed | slice-01 |
153
+ | slice-06 | Validation gates and scope safety | completed | slice-01, slice-05 |
154
+ | slice-07 | Context analysis and doctor flow | completed | slice-01, slice-06 |
155
+ | slice-08 | Cross-platform help, auth, and DX | completed | slice-07 |
156
+ | slice-09 | Fixtures, smoke, docs, and release readiness | completed | slice-02, slice-03, slice-04, slice-05, slice-06, slice-07, slice-08 |
157
+
158
+ ## Validation Strategy
159
+
160
+ - `node --test tests/**/*.test.js`
161
+ - `npm run smoke:doctor-fixtures`
162
+ - `npm run smoke:guided-workflow`
163
+ - `npm run smoke:create-quiver`
164
+ - `npm run package:quiver`
165
+ - Tarball smoke from `/private/tmp`
166
+ - `git diff --check`
167
+ - JSON parse validation for every `slice.json`
168
+ - `check-handoff` for every `EXECUTION_BRIEF.md` and `CLOSURE_BRIEF.md`
169
+
170
+ ## Risks
171
+
172
+ - Some v24/v25/v26 docs may claim behavior that is only partially implemented.
173
+ - A shared resolver can create broad regressions if introduced without command-by-command compatibility tests.
174
+ - Export schema stabilization can break ad-hoc consumers unless old behavior is kept or documented.
175
+ - Worktree lifecycle changes can affect existing users with in-flight branches.
176
+ - Real fixtures can expose local paths unless sanitized.
@@ -0,0 +1,37 @@
1
+ # Status - Quiver v27 Reliability and AI Workflow Hardening
2
+
3
+ ## Overall Status
4
+
5
+ - Phase: implemented, pending package release
6
+ - Progress: 100%
7
+ - Current recommended slice: none
8
+ - Source evidence: Pixel Quiver final dogfooding traceability (`QP-001` to `QP-019`, `QIS-001` to `QIS-022`)
9
+
10
+ ## Slices
11
+
12
+ | Slice | Title | Status | Progress | Dependencies |
13
+ |---|---|---|---:|---|
14
+ | slice-00 | Docs audit, coverage, and contracts | completed | 100% | none |
15
+ | slice-01 | Core state resolver and canonical statuses | completed | 100% | slice-00 |
16
+ | slice-02 | JSON export contract and machine output | completed | 100% | slice-01 |
17
+ | slice-03 | Approved plan to spec create | completed | 100% | slice-01, slice-02 |
18
+ | slice-04 | AI artifact storage, redaction, and token compaction | completed | 100% | slice-01 |
19
+ | slice-05 | Worktree lifecycle, locks, and recovery | completed | 100% | slice-01 |
20
+ | slice-06 | Validation gates and scope safety | completed | 100% | slice-01, slice-05 |
21
+ | slice-07 | Context analysis and doctor flow | completed | 100% | slice-01, slice-06 |
22
+ | slice-08 | Cross-platform help, auth, and DX | completed | 100% | slice-07 |
23
+ | slice-09 | Fixtures, smoke, docs, and release readiness | completed | 100% | slice-02, slice-03, slice-04, slice-05, slice-06, slice-07, slice-08 |
24
+
25
+ ## Blockers
26
+
27
+ - No implementation blockers after `slice-09`.
28
+
29
+ ## Known Production Concerns
30
+
31
+ - v27 is implemented and validated from source and packaged tarball, but npm publication is not part of this spec.
32
+ - The final Pixel Quiver source files live outside this repo and must remain evidence only; committed fixtures stay sanitized and synthetic.
33
+ - `README_FOR_AI.md`, `ROADMAP.md`, `CHANGELOG.md`, and `README.md` were synchronized with the implemented-but-unpublished state.
34
+
35
+ ## Next Step
36
+
37
+ Open the PR or release branch for v27. Publish only after human review and the normal release process.
@@ -0,0 +1,132 @@
1
+ # Quiver v27 - Reliability and AI Workflow Hardening
2
+
3
+ ## Title
4
+
5
+ Quiver v27 - Reliability and AI Workflow Hardening
6
+
7
+ ## Summary
8
+
9
+ This PR hardens Quiver after Pixel Quiver dogfooding surfaced workflow reliability issues across specs, slices, AI lifecycle commands, validation, worktrees, context diagnostics, and release readiness.
10
+
11
+ Main changes:
12
+
13
+ - Aligns classic and AI command state discovery through a shared resolver and canonical statuses.
14
+ - Stabilizes lifecycle JSON exports for dashboards and agents.
15
+ - Makes `spec create`, AI artifacts, worktrees, validation gates, context commands, and cross-platform DX safer.
16
+ - Adds final fixture, smoke, full-suite, and packaged CLI validation evidence.
17
+
18
+ ## Scope
19
+
20
+ - `QP-001` to `QP-019`
21
+ - `QIS-001` to `QIS-022`
22
+ - Specs/slices, AI lifecycle, exports, validators, worktrees, docs, tests, fixtures, and release readiness.
23
+ - npm publication is intentionally out of scope.
24
+
25
+ ## Files
26
+
27
+ - `src/create-quiver/**`
28
+ - `bin/create-quiver.js`
29
+ - `docs/**`
30
+ - `docs-template/**`
31
+ - `tests/**`
32
+ - `scripts/**`
33
+ - `package.json`
34
+ - `README.md`
35
+ - `README_FOR_AI.md`
36
+ - `ROADMAP.md`
37
+ - `CHANGELOG.md`
38
+ - `specs/quiver-v27-reliability-ai-workflow-hardening/**`
39
+
40
+ ## How to Test (DETAILED - REQUIRED)
41
+
42
+ ### Required Environment
43
+
44
+ - Node.js compatible with the current repository test setup.
45
+ - npm available.
46
+ - Git available.
47
+ - No npm publishing credentials are required for this PR.
48
+
49
+ ### Worktree Access
50
+
51
+ From the repository root:
52
+
53
+ ```bash
54
+ git status --short --branch
55
+ ```
56
+
57
+ Expected:
58
+
59
+ - Branch contains the v27 commits.
60
+ - No unrelated tracked changes are required.
61
+ - Untracked local files should not be included unless intentionally staged.
62
+
63
+ ### Run the Project
64
+
65
+ This is a CLI framework repository. Validate the CLI directly from source:
66
+
67
+ ```bash
68
+ node bin/create-quiver.js --help
69
+ node bin/create-quiver.js flow
70
+ ```
71
+
72
+ ### Use Cases
73
+
74
+ Validate the completed v27 spec:
75
+
76
+ ```bash
77
+ node bin/create-quiver.js spec validate specs/quiver-v27-reliability-ai-workflow-hardening
78
+ node bin/create-quiver.js plan --spec quiver-v27-reliability-ai-workflow-hardening --include-completed
79
+ node bin/create-quiver.js graph --spec quiver-v27-reliability-ai-workflow-hardening --include-completed
80
+ node bin/create-quiver.js next --spec quiver-v27-reliability-ai-workflow-hardening
81
+ ```
82
+
83
+ Expected:
84
+
85
+ - Spec validation passes.
86
+ - Plan and graph show all 10 v27 slices as completed.
87
+ - `next` reports no ready slices.
88
+
89
+ ### Technical Verification
90
+
91
+ Run:
92
+
93
+ ```bash
94
+ node --test tests/**/*.test.js
95
+ npm run smoke:doctor-fixtures
96
+ npm run smoke:create-quiver
97
+ npm run smoke:guided-workflow
98
+ npm run package:quiver
99
+ git diff --check
100
+ ```
101
+
102
+ Expected:
103
+
104
+ - Full test suite passes.
105
+ - All smoke suites pass.
106
+ - Package smoke validates the generated tarball.
107
+ - No whitespace errors are reported.
108
+
109
+ ## Evidence
110
+
111
+ - `node --test tests/**/*.test.js` passed with 356 tests.
112
+ - `npm run smoke:doctor-fixtures` passed.
113
+ - `npm run smoke:create-quiver` passed.
114
+ - `npm run smoke:guided-workflow` passed.
115
+ - `npm run package:quiver` passed and validated `create-quiver-0.12.1.tgz`.
116
+ - Tarball/package smoke validated installed CLI behavior for help, `flow`, and `ai agent set --dry-run`.
117
+ - `node bin/create-quiver.js spec validate specs/quiver-v27-reliability-ai-workflow-hardening` passed.
118
+ - `node bin/create-quiver.js next --spec quiver-v27-reliability-ai-workflow-hardening` reported no ready slices.
119
+ - `git diff --check` passed.
120
+
121
+ ## Rollback
122
+
123
+ Revert the v27 commits from this PR. Since the changes are organized as one spec with one commit per slice, rollback can be done by reverting the affected slice commits in reverse order.
124
+
125
+ If a release has already been published, publish a follow-up patch release after reverting or fixing the affected behavior.
126
+
127
+ ## Risks / Notes
128
+
129
+ - Shared resolver changes can affect many commands.
130
+ - Export schema changes require backward-compatible handling or migration notes.
131
+ - Worktree lifecycle changes must preserve existing user workflows.
132
+ - v27 is implemented and release-ready from source/package validation, but npm publication is intentionally outside this spec.
@@ -0,0 +1,36 @@
1
+ # CLOSURE BRIEF - slice-00: Docs audit, coverage, and contracts
2
+
3
+ ## Summary
4
+
5
+ Completed the documentation foundation for v27 before any product-code implementation.
6
+
7
+ This slice added the full QP/QIS coverage matrix, shared command contracts, and a v24/v25/v26 audit so later slices have a concrete production contract instead of fixing command behavior in isolation.
8
+
9
+ ## Validation Against Acceptance Criteria
10
+
11
+ - The v27 spec package exists with `SPEC.md`, `STATUS.md`, `EXECUTION_PLAN.md`, `EVIDENCE_REPORT.md`, `pr.md`, and all slice folders.
12
+ - `COVERAGE_MATRIX.md` maps every `QP-001..QP-019` and `QIS-001..QIS-022` to at least one slice with risk and validation strategy.
13
+ - `COMMAND_CONTRACTS.md` documents exit codes, stdout/stderr behavior, dry-run, write class, idempotency, atomic writes, path safety, root detection, package managers, deterministic ordering, and legacy/strict behavior.
14
+ - `AUDIT_V24_V25_V26.md` documents existing implementation surfaces and remaining dogfooding gaps.
15
+ - `README_FOR_AI.md`, `ROADMAP.md`, and `CHANGELOG.md` were kept aligned with the current state: v26 shipped, v27 active but not published.
16
+ - No product code was modified.
17
+
18
+ ## Changes
19
+
20
+ - Added `specs/quiver-v27-reliability-ai-workflow-hardening/COVERAGE_MATRIX.md`.
21
+ - Added `specs/quiver-v27-reliability-ai-workflow-hardening/COMMAND_CONTRACTS.md`.
22
+ - Added `specs/quiver-v27-reliability-ai-workflow-hardening/AUDIT_V24_V25_V26.md`.
23
+ - Updated v27 `SPEC.md`, `STATUS.md`, and `EVIDENCE_REPORT.md` to mark `slice-00` complete and set `slice-01` as the next recommended slice.
24
+ - Updated this closure brief and `slice.json` with completion state.
25
+
26
+ ## Remaining Risks
27
+
28
+ - The audit is documentary evidence only. Implementation slices must still add regression tests for each dogfooding failure.
29
+ - Some existing v24/v25/v26 tests may pass while behavior remains insufficient for the exact Pixel Quiver scenarios.
30
+ - Pixel Quiver source files contain local paths and must be sanitized before becoming fixtures.
31
+
32
+ ## Follow-up Recommendations
33
+
34
+ - Start `slice-01-core-state-resolver-and-canonical-statuses` next because every later command depends on a shared state resolver.
35
+ - Treat `COMMAND_CONTRACTS.md` as the implementation contract for all later slices.
36
+ - Add fixtures from Pixel Quiver only after replacing personal paths and project-specific values.