create-quiver 0.10.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 (242) hide show
  1. package/BACKLOG.md +16 -17
  2. package/CHANGELOG.md +78 -0
  3. package/README.md +208 -41
  4. package/README_FOR_AI.md +50 -24
  5. package/ROADMAP.md +34 -11
  6. package/docs/AI_CONTEXT.md.template +2 -0
  7. package/docs/AI_ONBOARDING_PROMPT.md.template +31 -18
  8. package/docs/COMMANDS.md.template +90 -16
  9. package/docs/CONTEXTO.md.template +2 -0
  10. package/docs/DECISIONS.md.template +1 -0
  11. package/docs/INDEX.md.template +20 -18
  12. package/docs/STATUS.md.template +6 -1
  13. package/docs/SUPPORT_MATRIX.md.template +2 -2
  14. package/docs/TROUBLESHOOTING.md.template +50 -0
  15. package/docs/WORKFLOW.md.template +27 -17
  16. package/package.json +27 -4
  17. package/package.template.json +13 -1
  18. package/scripts/init-docs.sh +11 -4
  19. package/scripts/package-quiver.sh +18 -2
  20. package/specs/quiver-v22-guided-ai-workflow/EVIDENCE_REPORT.md +58 -0
  21. package/specs/quiver-v22-guided-ai-workflow/EXECUTION_PLAN.md +88 -0
  22. package/specs/quiver-v22-guided-ai-workflow/SPEC.md +228 -0
  23. package/specs/quiver-v22-guided-ai-workflow/STATUS.md +42 -0
  24. package/specs/quiver-v22-guided-ai-workflow/pr.md +104 -0
  25. package/specs/quiver-v22-guided-ai-workflow/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +35 -0
  26. package/specs/quiver-v22-guided-ai-workflow/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +61 -0
  27. package/specs/quiver-v22-guided-ai-workflow/slices/slice-00-spec-foundation/slice.json +51 -0
  28. package/specs/quiver-v22-guided-ai-workflow/slices/slice-01-docs-source-of-truth-sync/CLOSURE_BRIEF.md +31 -0
  29. package/specs/quiver-v22-guided-ai-workflow/slices/slice-01-docs-source-of-truth-sync/EXECUTION_BRIEF.md +58 -0
  30. package/specs/quiver-v22-guided-ai-workflow/slices/slice-01-docs-source-of-truth-sync/slice.json +55 -0
  31. package/specs/quiver-v22-guided-ai-workflow/slices/slice-02-prepare-command-diagnostics/CLOSURE_BRIEF.md +30 -0
  32. package/specs/quiver-v22-guided-ai-workflow/slices/slice-02-prepare-command-diagnostics/EXECUTION_BRIEF.md +57 -0
  33. package/specs/quiver-v22-guided-ai-workflow/slices/slice-02-prepare-command-diagnostics/slice.json +57 -0
  34. package/specs/quiver-v22-guided-ai-workflow/slices/slice-03-context-doc-refresh/CLOSURE_BRIEF.md +32 -0
  35. package/specs/quiver-v22-guided-ai-workflow/slices/slice-03-context-doc-refresh/EXECUTION_BRIEF.md +56 -0
  36. package/specs/quiver-v22-guided-ai-workflow/slices/slice-03-context-doc-refresh/slice.json +56 -0
  37. package/specs/quiver-v22-guided-ai-workflow/slices/slice-04-planner-approval-state/CLOSURE_BRIEF.md +33 -0
  38. package/specs/quiver-v22-guided-ai-workflow/slices/slice-04-planner-approval-state/EXECUTION_BRIEF.md +56 -0
  39. package/specs/quiver-v22-guided-ai-workflow/slices/slice-04-planner-approval-state/slice.json +58 -0
  40. package/specs/quiver-v22-guided-ai-workflow/slices/slice-05-spec-worktree-lifecycle/CLOSURE_BRIEF.md +32 -0
  41. package/specs/quiver-v22-guided-ai-workflow/slices/slice-05-spec-worktree-lifecycle/EXECUTION_BRIEF.md +56 -0
  42. package/specs/quiver-v22-guided-ai-workflow/slices/slice-05-spec-worktree-lifecycle/slice.json +54 -0
  43. package/specs/quiver-v22-guided-ai-workflow/slices/slice-06-executor-commit-recovery/CLOSURE_BRIEF.md +32 -0
  44. package/specs/quiver-v22-guided-ai-workflow/slices/slice-06-executor-commit-recovery/EXECUTION_BRIEF.md +58 -0
  45. package/specs/quiver-v22-guided-ai-workflow/slices/slice-06-executor-commit-recovery/slice.json +57 -0
  46. package/specs/quiver-v22-guided-ai-workflow/slices/slice-07-execution-waves-delegation/CLOSURE_BRIEF.md +32 -0
  47. package/specs/quiver-v22-guided-ai-workflow/slices/slice-07-execution-waves-delegation/EXECUTION_BRIEF.md +58 -0
  48. package/specs/quiver-v22-guided-ai-workflow/slices/slice-07-execution-waves-delegation/slice.json +55 -0
  49. package/specs/quiver-v22-guided-ai-workflow/slices/slice-08-pr-create-gh-ssh/CLOSURE_BRIEF.md +32 -0
  50. package/specs/quiver-v22-guided-ai-workflow/slices/slice-08-pr-create-gh-ssh/EXECUTION_BRIEF.md +58 -0
  51. package/specs/quiver-v22-guided-ai-workflow/slices/slice-08-pr-create-gh-ssh/slice.json +53 -0
  52. package/specs/quiver-v22-guided-ai-workflow/slices/slice-09-post-merge-cleanup-release-safety/CLOSURE_BRIEF.md +33 -0
  53. package/specs/quiver-v22-guided-ai-workflow/slices/slice-09-post-merge-cleanup-release-safety/EXECUTION_BRIEF.md +59 -0
  54. package/specs/quiver-v22-guided-ai-workflow/slices/slice-09-post-merge-cleanup-release-safety/slice.json +59 -0
  55. package/specs/quiver-v22-guided-ai-workflow/slices/slice-10-docs-smokes-release-readiness/CLOSURE_BRIEF.md +34 -0
  56. package/specs/quiver-v22-guided-ai-workflow/slices/slice-10-docs-smokes-release-readiness/EXECUTION_BRIEF.md +58 -0
  57. package/specs/quiver-v22-guided-ai-workflow/slices/slice-10-docs-smokes-release-readiness/slice.json +60 -0
  58. package/specs/quiver-v23-guided-flow-productization/EVIDENCE_REPORT.md +80 -0
  59. package/specs/quiver-v23-guided-flow-productization/EXECUTION_PLAN.md +80 -0
  60. package/specs/quiver-v23-guided-flow-productization/SPEC.md +203 -0
  61. package/specs/quiver-v23-guided-flow-productization/STATUS.md +39 -0
  62. package/specs/quiver-v23-guided-flow-productization/pr.md +119 -0
  63. package/specs/quiver-v23-guided-flow-productization/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +30 -0
  64. package/specs/quiver-v23-guided-flow-productization/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +61 -0
  65. package/specs/quiver-v23-guided-flow-productization/slices/slice-00-spec-foundation/slice.json +51 -0
  66. package/specs/quiver-v23-guided-flow-productization/slices/slice-01-short-command-and-flow-entrypoint/CLOSURE_BRIEF.md +33 -0
  67. package/specs/quiver-v23-guided-flow-productization/slices/slice-01-short-command-and-flow-entrypoint/EXECUTION_BRIEF.md +35 -0
  68. package/specs/quiver-v23-guided-flow-productization/slices/slice-01-short-command-and-flow-entrypoint/slice.json +56 -0
  69. package/specs/quiver-v23-guided-flow-productization/slices/slice-02-flow-status-wizard/CLOSURE_BRIEF.md +31 -0
  70. package/specs/quiver-v23-guided-flow-productization/slices/slice-02-flow-status-wizard/EXECUTION_BRIEF.md +29 -0
  71. package/specs/quiver-v23-guided-flow-productization/slices/slice-02-flow-status-wizard/slice.json +55 -0
  72. package/specs/quiver-v23-guided-flow-productization/slices/slice-03-agent-profiles/CLOSURE_BRIEF.md +33 -0
  73. package/specs/quiver-v23-guided-flow-productization/slices/slice-03-agent-profiles/EXECUTION_BRIEF.md +29 -0
  74. package/specs/quiver-v23-guided-flow-productization/slices/slice-03-agent-profiles/slice.json +54 -0
  75. package/specs/quiver-v23-guided-flow-productization/slices/slice-04-context-preparation-onboarding/CLOSURE_BRIEF.md +32 -0
  76. package/specs/quiver-v23-guided-flow-productization/slices/slice-04-context-preparation-onboarding/EXECUTION_BRIEF.md +30 -0
  77. package/specs/quiver-v23-guided-flow-productization/slices/slice-04-context-preparation-onboarding/slice.json +59 -0
  78. package/specs/quiver-v23-guided-flow-productization/slices/slice-05-planner-iteration-history/CLOSURE_BRIEF.md +31 -0
  79. package/specs/quiver-v23-guided-flow-productization/slices/slice-05-planner-iteration-history/EXECUTION_BRIEF.md +29 -0
  80. package/specs/quiver-v23-guided-flow-productization/slices/slice-05-planner-iteration-history/slice.json +53 -0
  81. package/specs/quiver-v23-guided-flow-productization/slices/slice-06-production-plan-review/CLOSURE_BRIEF.md +33 -0
  82. package/specs/quiver-v23-guided-flow-productization/slices/slice-06-production-plan-review/EXECUTION_BRIEF.md +30 -0
  83. package/specs/quiver-v23-guided-flow-productization/slices/slice-06-production-plan-review/slice.json +54 -0
  84. package/specs/quiver-v23-guided-flow-productization/slices/slice-07-spec-create-experience/CLOSURE_BRIEF.md +33 -0
  85. package/specs/quiver-v23-guided-flow-productization/slices/slice-07-spec-create-experience/EXECUTION_BRIEF.md +30 -0
  86. package/specs/quiver-v23-guided-flow-productization/slices/slice-07-spec-create-experience/slice.json +55 -0
  87. package/specs/quiver-v23-guided-flow-productization/slices/slice-08-executor-prompt-generation/CLOSURE_BRIEF.md +32 -0
  88. package/specs/quiver-v23-guided-flow-productization/slices/slice-08-executor-prompt-generation/EXECUTION_BRIEF.md +30 -0
  89. package/specs/quiver-v23-guided-flow-productization/slices/slice-08-executor-prompt-generation/slice.json +55 -0
  90. package/specs/quiver-v23-guided-flow-productization/slices/slice-09-delegated-slice-execution/CLOSURE_BRIEF.md +33 -0
  91. package/specs/quiver-v23-guided-flow-productization/slices/slice-09-delegated-slice-execution/EXECUTION_BRIEF.md +34 -0
  92. package/specs/quiver-v23-guided-flow-productization/slices/slice-09-delegated-slice-execution/slice.json +57 -0
  93. package/specs/quiver-v23-guided-flow-productization/slices/slice-10-docs-smokes-release-readiness/CLOSURE_BRIEF.md +33 -0
  94. package/specs/quiver-v23-guided-flow-productization/slices/slice-10-docs-smokes-release-readiness/EXECUTION_BRIEF.md +32 -0
  95. package/specs/quiver-v23-guided-flow-productization/slices/slice-10-docs-smokes-release-readiness/slice.json +63 -0
  96. package/specs/quiver-v24-dx-onboarding-hardening/EVIDENCE_REPORT.md +55 -0
  97. package/specs/quiver-v24-dx-onboarding-hardening/EXECUTION_PLAN.md +43 -0
  98. package/specs/quiver-v24-dx-onboarding-hardening/SPEC.md +149 -0
  99. package/specs/quiver-v24-dx-onboarding-hardening/STATUS.md +31 -0
  100. package/specs/quiver-v24-dx-onboarding-hardening/pr.md +76 -0
  101. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +31 -0
  102. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +52 -0
  103. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-00-spec-foundation/slice.json +51 -0
  104. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-01-init-template-hygiene/CLOSURE_BRIEF.md +38 -0
  105. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-01-init-template-hygiene/EXECUTION_BRIEF.md +53 -0
  106. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-01-init-template-hygiene/slice.json +55 -0
  107. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-02-cli-command-routing-version-errors/CLOSURE_BRIEF.md +33 -0
  108. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-02-cli-command-routing-version-errors/EXECUTION_BRIEF.md +50 -0
  109. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-02-cli-command-routing-version-errors/slice.json +52 -0
  110. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-03-doctor-fix-doc-link-checks/CLOSURE_BRIEF.md +33 -0
  111. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-03-doctor-fix-doc-link-checks/EXECUTION_BRIEF.md +50 -0
  112. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-03-doctor-fix-doc-link-checks/slice.json +53 -0
  113. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-04-prepare-output-ai-context-drafts/CLOSURE_BRIEF.md +33 -0
  114. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-04-prepare-output-ai-context-drafts/EXECUTION_BRIEF.md +50 -0
  115. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-04-prepare-output-ai-context-drafts/slice.json +70 -0
  116. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-05-local-slice-validation-base-guidance/CLOSURE_BRIEF.md +36 -0
  117. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-05-local-slice-validation-base-guidance/EXECUTION_BRIEF.md +49 -0
  118. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-05-local-slice-validation-base-guidance/slice.json +52 -0
  119. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-06-plan-graph-next-history-views/CLOSURE_BRIEF.md +43 -0
  120. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-06-plan-graph-next-history-views/EXECUTION_BRIEF.md +53 -0
  121. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-06-plan-graph-next-history-views/slice.json +60 -0
  122. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-07-analyzer-command-map-hardening/CLOSURE_BRIEF.md +32 -0
  123. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-07-analyzer-command-map-hardening/EXECUTION_BRIEF.md +50 -0
  124. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-07-analyzer-command-map-hardening/slice.json +51 -0
  125. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-08-evidence-run-command/CLOSURE_BRIEF.md +34 -0
  126. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-08-evidence-run-command/EXECUTION_BRIEF.md +52 -0
  127. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-08-evidence-run-command/slice.json +54 -0
  128. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-09-spec-viewer-demo-scaffolding/CLOSURE_BRIEF.md +34 -0
  129. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-09-spec-viewer-demo-scaffolding/EXECUTION_BRIEF.md +51 -0
  130. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-09-spec-viewer-demo-scaffolding/slice.json +59 -0
  131. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-10-docs-smokes-release-readiness/CLOSURE_BRIEF.md +33 -0
  132. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-10-docs-smokes-release-readiness/EXECUTION_BRIEF.md +54 -0
  133. package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-10-docs-smokes-release-readiness/slice.json +76 -0
  134. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/EVIDENCE_REPORT.md +293 -0
  135. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/EXECUTION_PLAN.md +58 -0
  136. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/SPEC.md +242 -0
  137. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/STATUS.md +35 -0
  138. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/pr.md +77 -0
  139. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +34 -0
  140. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +52 -0
  141. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-00-spec-foundation/slice.json +52 -0
  142. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-01-cli-contract-compatibility/CLOSURE_BRIEF.md +36 -0
  143. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-01-cli-contract-compatibility/EXECUTION_BRIEF.md +52 -0
  144. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-01-cli-contract-compatibility/slice.json +56 -0
  145. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-02-run-state-phase-locks/CLOSURE_BRIEF.md +43 -0
  146. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-02-run-state-phase-locks/EXECUTION_BRIEF.md +54 -0
  147. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-02-run-state-phase-locks/slice.json +52 -0
  148. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/CLOSURE_BRIEF.md +35 -0
  149. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/EXECUTION_BRIEF.md +53 -0
  150. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-03-safe-ai-onboarding-docs/slice.json +54 -0
  151. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-04-agent-profiles-adapters/CLOSURE_BRIEF.md +34 -0
  152. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-04-agent-profiles-adapters/EXECUTION_BRIEF.md +54 -0
  153. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-04-agent-profiles-adapters/slice.json +52 -0
  154. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-05-approval-gates/CLOSURE_BRIEF.md +34 -0
  155. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-05-approval-gates/EXECUTION_BRIEF.md +54 -0
  156. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-05-approval-gates/slice.json +53 -0
  157. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-06-spec-slice-generator/CLOSURE_BRIEF.md +33 -0
  158. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-06-spec-slice-generator/EXECUTION_BRIEF.md +56 -0
  159. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-06-spec-slice-generator/slice.json +55 -0
  160. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-07-slice-execution-planner/CLOSURE_BRIEF.md +33 -0
  161. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-07-slice-execution-planner/EXECUTION_BRIEF.md +54 -0
  162. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-07-slice-execution-planner/slice.json +52 -0
  163. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-08-controlled-slice-execution/CLOSURE_BRIEF.md +39 -0
  164. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-08-controlled-slice-execution/EXECUTION_BRIEF.md +56 -0
  165. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-08-controlled-slice-execution/slice.json +53 -0
  166. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-09-git-worktree-pr-lifecycle/CLOSURE_BRIEF.md +38 -0
  167. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-09-git-worktree-pr-lifecycle/EXECUTION_BRIEF.md +57 -0
  168. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-09-git-worktree-pr-lifecycle/slice.json +52 -0
  169. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-10-validation-errors-fixtures/CLOSURE_BRIEF.md +39 -0
  170. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-10-validation-errors-fixtures/EXECUTION_BRIEF.md +55 -0
  171. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-10-validation-errors-fixtures/slice.json +56 -0
  172. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/CLOSURE_BRIEF.md +36 -0
  173. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/EXECUTION_BRIEF.md +54 -0
  174. package/specs/quiver-v25-ai-first-lifecycle-orchestrator/slices/slice-11-export-dashboard-migration/slice.json +53 -0
  175. package/specs/quiver-v26-0121-smoke-hardening/EVIDENCE_REPORT.md +208 -0
  176. package/specs/quiver-v26-0121-smoke-hardening/EXECUTION_PLAN.md +57 -0
  177. package/specs/quiver-v26-0121-smoke-hardening/SPEC.md +137 -0
  178. package/specs/quiver-v26-0121-smoke-hardening/STATUS.md +32 -0
  179. package/specs/quiver-v26-0121-smoke-hardening/pr.md +96 -0
  180. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-00-docs-foundation/CLOSURE_BRIEF.md +35 -0
  181. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-00-docs-foundation/EXECUTION_BRIEF.md +55 -0
  182. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-00-docs-foundation/slice.json +73 -0
  183. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-01-cli-help-version-contract/CLOSURE_BRIEF.md +38 -0
  184. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-01-cli-help-version-contract/EXECUTION_BRIEF.md +51 -0
  185. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-01-cli-help-version-contract/slice.json +76 -0
  186. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-02-init-doc-links-and-flow-guidance/CLOSURE_BRIEF.md +37 -0
  187. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-02-init-doc-links-and-flow-guidance/EXECUTION_BRIEF.md +52 -0
  188. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-02-init-doc-links-and-flow-guidance/slice.json +75 -0
  189. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-03-ai-approval-review-consistency/CLOSURE_BRIEF.md +37 -0
  190. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-03-ai-approval-review-consistency/EXECUTION_BRIEF.md +53 -0
  191. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-03-ai-approval-review-consistency/slice.json +77 -0
  192. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-04-local-validation-brief-contracts/CLOSURE_BRIEF.md +35 -0
  193. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-04-local-validation-brief-contracts/EXECUTION_BRIEF.md +52 -0
  194. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-04-local-validation-brief-contracts/slice.json +77 -0
  195. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-05-demo-scaffold-readiness/CLOSURE_BRIEF.md +34 -0
  196. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-05-demo-scaffold-readiness/EXECUTION_BRIEF.md +54 -0
  197. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-05-demo-scaffold-readiness/slice.json +84 -0
  198. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-06-plan-graph-scope-performance/CLOSURE_BRIEF.md +35 -0
  199. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-06-plan-graph-scope-performance/EXECUTION_BRIEF.md +53 -0
  200. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-06-plan-graph-scope-performance/slice.json +82 -0
  201. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-07-smoke-release-readiness/CLOSURE_BRIEF.md +35 -0
  202. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-07-smoke-release-readiness/EXECUTION_BRIEF.md +55 -0
  203. package/specs/quiver-v26-0121-smoke-hardening/slices/slice-07-smoke-release-readiness/slice.json +92 -0
  204. package/src/create-quiver/commands/ai.js +1060 -37
  205. package/src/create-quiver/commands/demo.js +22 -0
  206. package/src/create-quiver/commands/evidence.js +37 -0
  207. package/src/create-quiver/commands/flow.js +562 -0
  208. package/src/create-quiver/commands/graph.js +19 -4
  209. package/src/create-quiver/commands/next.js +28 -0
  210. package/src/create-quiver/commands/plan.js +9 -6
  211. package/src/create-quiver/commands/prepare.js +236 -0
  212. package/src/create-quiver/commands/spec.js +133 -0
  213. package/src/create-quiver/index.js +1010 -31
  214. package/src/create-quiver/lib/actionable-error.js +27 -0
  215. package/src/create-quiver/lib/agent-profiles.js +148 -0
  216. package/src/create-quiver/lib/ai/context-packs.js +16 -0
  217. package/src/create-quiver/lib/ai/execution-plan.js +377 -11
  218. package/src/create-quiver/lib/ai/executor.js +633 -24
  219. package/src/create-quiver/lib/ai/export-state.js +534 -0
  220. package/src/create-quiver/lib/ai/github.js +279 -0
  221. package/src/create-quiver/lib/ai/onboarding-template.js +578 -0
  222. package/src/create-quiver/lib/ai/plan-review.js +286 -0
  223. package/src/create-quiver/lib/ai/providers.js +5 -3
  224. package/src/create-quiver/lib/ai/run-state.js +414 -0
  225. package/src/create-quiver/lib/ai/safety.js +5 -0
  226. package/src/create-quiver/lib/ai/spec-generator.js +12 -0
  227. package/src/create-quiver/lib/ai/spec-templates.js +80 -11
  228. package/src/create-quiver/lib/approvals.js +369 -0
  229. package/src/create-quiver/lib/demo.js +832 -0
  230. package/src/create-quiver/lib/doctor.js +309 -0
  231. package/src/create-quiver/lib/evidence.js +115 -0
  232. package/src/create-quiver/lib/handoff.js +81 -12
  233. package/src/create-quiver/lib/init-docs.js +302 -17
  234. package/src/create-quiver/lib/init-layout.js +34 -1
  235. package/src/create-quiver/lib/json.js +53 -3
  236. package/src/create-quiver/lib/lifecycle.js +6 -0
  237. package/src/create-quiver/lib/package-safety.js +117 -0
  238. package/src/create-quiver/lib/readiness.js +103 -21
  239. package/src/create-quiver/lib/scope.js +50 -7
  240. package/src/create-quiver/lib/slice-graph.js +138 -37
  241. package/src/create-quiver/lib/slice.js +14 -9
  242. package/src/create-quiver/lib/spec-worktrees.js +363 -0
@@ -0,0 +1,414 @@
1
+ const fs = require('node:fs');
2
+ const os = require('node:os');
3
+ const path = require('node:path');
4
+
5
+ const { quiverInternalPaths } = require('../init-layout');
6
+
7
+ const AI_RUN_PHASES = Object.freeze([
8
+ 'created',
9
+ 'onboarding-ready',
10
+ 'acceptance-draft',
11
+ 'acceptance-approved',
12
+ 'technical-plan-draft',
13
+ 'technical-plan-reviewed',
14
+ 'technical-plan-approved',
15
+ 'spec-generated',
16
+ 'execution-plan-generated',
17
+ 'slice-executing',
18
+ 'pr-ready',
19
+ 'closed',
20
+ ]);
21
+
22
+ const PHASE_NEXT_COMMAND = Object.freeze({
23
+ created: 'npx create-quiver ai plan --phase acceptance --input <requirements.md> --dry-run',
24
+ 'onboarding-ready': 'npx create-quiver ai plan --phase acceptance --input <requirements.md> --dry-run',
25
+ 'acceptance-draft': 'npx create-quiver ai approve --phase acceptance --version <n>',
26
+ 'acceptance-approved': 'npx create-quiver ai plan --phase technical-plan --dry-run',
27
+ 'technical-plan-draft': 'npx create-quiver ai review-plan --dry-run',
28
+ 'technical-plan-reviewed': 'npx create-quiver ai approve --phase technical-plan --version <n>',
29
+ 'technical-plan-approved': 'npx create-quiver spec create --dry-run',
30
+ 'spec-generated': 'npx create-quiver spec start specs/<spec-slug>',
31
+ 'execution-plan-generated': 'npx create-quiver ai execute-plan --dry-run --commit --mode manual',
32
+ 'slice-executing': 'npx create-quiver ai execute-plan --dry-run --commit --mode delegated',
33
+ 'pr-ready': 'npx create-quiver ai pr --dry-run --input specs/<spec-slug>/pr.md',
34
+ closed: 'No next command: lifecycle run is closed.',
35
+ });
36
+
37
+ function formatError(message) {
38
+ return `create-quiver: ${message}`;
39
+ }
40
+
41
+ function ensureDir(dirPath) {
42
+ fs.mkdirSync(dirPath, { recursive: true });
43
+ }
44
+
45
+ function toRelativePosix(root, filePath) {
46
+ return path.relative(root, filePath).split(path.sep).join('/');
47
+ }
48
+
49
+ function normalizeRunId(value) {
50
+ const normalized = String(value || '')
51
+ .trim()
52
+ .toLowerCase()
53
+ .replace(/[^a-z0-9._-]+/g, '-')
54
+ .replace(/^-+|-+$/g, '');
55
+
56
+ if (!normalized) {
57
+ throw new Error(formatError('invalid run id'));
58
+ }
59
+
60
+ return normalized;
61
+ }
62
+
63
+ function createRunId(now = new Date()) {
64
+ const stamp = now.toISOString()
65
+ .replace(/\.\d{3}Z$/, 'z')
66
+ .replace(/[^0-9a-z]+/gi, '-')
67
+ .toLowerCase()
68
+ .replace(/^-+|-+$/g, '');
69
+ return `run-${stamp}`;
70
+ }
71
+
72
+ function runsDir(projectRoot) {
73
+ return quiverInternalPaths(projectRoot).runsDir;
74
+ }
75
+
76
+ function locksDir(projectRoot) {
77
+ return quiverInternalPaths(projectRoot).locksDir || path.join(quiverInternalPaths(projectRoot).root, 'locks');
78
+ }
79
+
80
+ function runDir(projectRoot, runId) {
81
+ return path.join(runsDir(projectRoot), normalizeRunId(runId));
82
+ }
83
+
84
+ function runStatePath(projectRoot, runId) {
85
+ return path.join(runDir(projectRoot, runId), 'state.json');
86
+ }
87
+
88
+ function runApprovalsPath(projectRoot, runId) {
89
+ return path.join(runDir(projectRoot, runId), 'approvals.json');
90
+ }
91
+
92
+ function runRequirementPath(projectRoot, runId) {
93
+ return path.join(runDir(projectRoot, runId), 'requirement.md');
94
+ }
95
+
96
+ function assertKnownPhase(phase) {
97
+ if (!AI_RUN_PHASES.includes(phase)) {
98
+ throw new Error(formatError(`unsupported AI run phase '${phase}'`));
99
+ }
100
+ }
101
+
102
+ function phaseRank(phase) {
103
+ assertKnownPhase(phase);
104
+ return AI_RUN_PHASES.indexOf(phase);
105
+ }
106
+
107
+ function nextCommandForPhase(phase) {
108
+ assertKnownPhase(phase);
109
+ return PHASE_NEXT_COMMAND[phase];
110
+ }
111
+
112
+ function readJsonIfExists(filePath) {
113
+ if (!fs.existsSync(filePath)) {
114
+ return null;
115
+ }
116
+ return JSON.parse(fs.readFileSync(filePath, 'utf8'));
117
+ }
118
+
119
+ function writeJson(filePath, value) {
120
+ ensureDir(path.dirname(filePath));
121
+ fs.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`);
122
+ }
123
+
124
+ function listAiRuns(projectRoot) {
125
+ const root = runsDir(projectRoot);
126
+ if (!fs.existsSync(root)) {
127
+ return [];
128
+ }
129
+
130
+ return fs.readdirSync(root, { withFileTypes: true })
131
+ .filter((entry) => entry.isDirectory())
132
+ .map((entry) => readAiRun(projectRoot, entry.name))
133
+ .filter(Boolean)
134
+ .sort((a, b) => String(a.updated_at || a.created_at).localeCompare(String(b.updated_at || b.created_at)));
135
+ }
136
+
137
+ function latestAiRun(projectRoot) {
138
+ const runs = listAiRuns(projectRoot).filter((run) => run.status !== 'closed');
139
+ return runs.length > 0 ? runs[runs.length - 1] : null;
140
+ }
141
+
142
+ function readAiRun(projectRoot, runId) {
143
+ const statePath = runStatePath(projectRoot, runId);
144
+ if (!fs.existsSync(statePath)) {
145
+ return null;
146
+ }
147
+ return JSON.parse(fs.readFileSync(statePath, 'utf8'));
148
+ }
149
+
150
+ function resolveAiRun(projectRoot, runId = '') {
151
+ if (runId) {
152
+ const run = readAiRun(projectRoot, runId);
153
+ if (!run) {
154
+ throw new Error(formatError(`missing AI run: ${runId}`));
155
+ }
156
+ return run;
157
+ }
158
+
159
+ const latest = latestAiRun(projectRoot);
160
+ if (!latest) {
161
+ return null;
162
+ }
163
+ return latest;
164
+ }
165
+
166
+ function createAiRun(projectRoot, options = {}) {
167
+ const sourceInput = options.input ? path.resolve(projectRoot, options.input) : '';
168
+ if (sourceInput && !fs.existsSync(sourceInput)) {
169
+ throw new Error(formatError(`missing run requirement input file: ${options.input}`));
170
+ }
171
+
172
+ const runId = normalizeRunId(options.runId || createRunId(options.now || new Date()));
173
+ const targetDir = runDir(projectRoot, runId);
174
+ const now = (options.now || new Date()).toISOString();
175
+
176
+ if (fs.existsSync(runStatePath(projectRoot, runId))) {
177
+ throw new Error(formatError(`AI run already exists: ${runId}`));
178
+ }
179
+
180
+ ensureDir(targetDir);
181
+
182
+ const requirementTarget = runRequirementPath(projectRoot, runId);
183
+ if (sourceInput) {
184
+ fs.copyFileSync(sourceInput, requirementTarget);
185
+ } else {
186
+ fs.writeFileSync(requirementTarget, '');
187
+ }
188
+
189
+ const approvals = {
190
+ schema_version: 1,
191
+ run_id: runId,
192
+ approvals: [],
193
+ };
194
+
195
+ const state = {
196
+ schema_version: 1,
197
+ run_id: runId,
198
+ status: 'active',
199
+ phase: options.phase || 'created',
200
+ spec_slug: options.specSlug || null,
201
+ created_at: now,
202
+ updated_at: now,
203
+ requirement: {
204
+ source_file: sourceInput ? toRelativePosix(projectRoot, sourceInput) : null,
205
+ path: toRelativePosix(projectRoot, requirementTarget),
206
+ },
207
+ approvals_path: toRelativePosix(projectRoot, runApprovalsPath(projectRoot, runId)),
208
+ decisions_path: toRelativePosix(projectRoot, path.join(targetDir, 'decisions.md')),
209
+ history: [
210
+ {
211
+ phase: options.phase || 'created',
212
+ command: options.command || 'ai run create',
213
+ at: now,
214
+ },
215
+ ],
216
+ };
217
+
218
+ assertKnownPhase(state.phase);
219
+ writeJson(runApprovalsPath(projectRoot, runId), approvals);
220
+ writeJson(runStatePath(projectRoot, runId), state);
221
+ fs.writeFileSync(path.join(targetDir, 'decisions.md'), '# Decisions\n\n');
222
+ return state;
223
+ }
224
+
225
+ function ensureAiRun(projectRoot, options = {}) {
226
+ const existing = resolveAiRun(projectRoot, options.runId || '');
227
+ if (existing) {
228
+ return existing;
229
+ }
230
+ return createAiRun(projectRoot, options);
231
+ }
232
+
233
+ function updateAiRunPhase(projectRoot, runId, phase, options = {}) {
234
+ assertKnownPhase(phase);
235
+ const current = resolveAiRun(projectRoot, runId);
236
+ if (!current) {
237
+ throw new Error(formatError('missing AI run to update'));
238
+ }
239
+
240
+ if (phaseRank(phase) < phaseRank(current.phase)) {
241
+ throw new Error(formatError(`cannot move AI run ${current.run_id} backwards from ${current.phase} to ${phase}`));
242
+ }
243
+
244
+ const now = (options.now || new Date()).toISOString();
245
+ const next = {
246
+ ...current,
247
+ phase,
248
+ status: phase === 'closed' ? 'closed' : 'active',
249
+ spec_slug: options.specSlug || current.spec_slug || null,
250
+ updated_at: now,
251
+ history: (current.history || []).concat({
252
+ phase,
253
+ command: options.command || 'unknown',
254
+ artifact: options.artifact || null,
255
+ at: now,
256
+ }),
257
+ };
258
+
259
+ writeJson(runStatePath(projectRoot, current.run_id), next);
260
+ return next;
261
+ }
262
+
263
+ function recordAiRunApproval(projectRoot, runId, approval) {
264
+ const run = resolveAiRun(projectRoot, runId);
265
+ if (!run) {
266
+ throw new Error(formatError('missing AI run for approval metadata'));
267
+ }
268
+
269
+ const filePath = runApprovalsPath(projectRoot, run.run_id);
270
+ const current = readJsonIfExists(filePath) || { schema_version: 1, run_id: run.run_id, approvals: [] };
271
+ const next = {
272
+ ...current,
273
+ approvals: (current.approvals || []).concat({
274
+ ...approval,
275
+ at: approval.at || new Date().toISOString(),
276
+ }),
277
+ };
278
+ writeJson(filePath, next);
279
+ return next;
280
+ }
281
+
282
+ function assertAiRunPhaseAllows(run, requiredPhase, commandName) {
283
+ if (!run) {
284
+ throw new Error(formatError(`cannot run ${commandName}: no AI run exists. Next: npx create-quiver ai run create --input <requirements.md>`));
285
+ }
286
+ assertKnownPhase(requiredPhase);
287
+
288
+ if (phaseRank(run.phase) < phaseRank(requiredPhase)) {
289
+ throw new Error(formatError(`cannot run ${commandName}: AI run ${run.run_id} is at phase '${run.phase}' and requires '${requiredPhase}'. Next: ${nextCommandForPhase(run.phase)}`));
290
+ }
291
+
292
+ return true;
293
+ }
294
+
295
+ function sanitizeLockPart(value) {
296
+ return String(value || '')
297
+ .trim()
298
+ .replace(/[^a-zA-Z0-9._-]+/g, '-')
299
+ .replace(/^-+|-+$/g, '') || 'run';
300
+ }
301
+
302
+ function lockPath(projectRoot, runId, sliceId = '') {
303
+ const name = sliceId
304
+ ? `${sanitizeLockPart(runId)}--${sanitizeLockPart(sliceId)}.lock`
305
+ : `${sanitizeLockPart(runId)}.lock`;
306
+ return path.join(locksDir(projectRoot), name);
307
+ }
308
+
309
+ function readAiRunLock(projectRoot, runId, sliceId = '') {
310
+ return readJsonIfExists(lockPath(projectRoot, runId, sliceId));
311
+ }
312
+
313
+ function acquireAiRunLock(projectRoot, runId, options = {}) {
314
+ const filePath = lockPath(projectRoot, runId, options.sliceId || '');
315
+ const payload = {
316
+ schema_version: 1,
317
+ run_id: normalizeRunId(runId),
318
+ slice_id: options.sliceId || null,
319
+ pid: process.pid,
320
+ hostname: os.hostname(),
321
+ command: options.command || null,
322
+ created_at: (options.now || new Date()).toISOString(),
323
+ };
324
+ ensureDir(path.dirname(filePath));
325
+
326
+ try {
327
+ fs.writeFileSync(filePath, `${JSON.stringify(payload, null, 2)}\n`, { flag: 'wx' });
328
+ } catch (error) {
329
+ if (error.code === 'EEXIST') {
330
+ const existing = readAiRunLock(projectRoot, runId, options.sliceId || '');
331
+ throw new Error(formatError(`AI run is locked: ${path.relative(projectRoot, filePath).split(path.sep).join('/')}\nLock owner: pid=${existing?.pid || 'unknown'} command=${existing?.command || 'unknown'} created_at=${existing?.created_at || 'unknown'}\nIf this process is gone, inspect the lock and remove it intentionally.`));
332
+ }
333
+ throw error;
334
+ }
335
+
336
+ return {
337
+ filePath,
338
+ lock: payload,
339
+ };
340
+ }
341
+
342
+ function releaseAiRunLock(projectRoot, runId, options = {}) {
343
+ const filePath = lockPath(projectRoot, runId, options.sliceId || '');
344
+ if (fs.existsSync(filePath)) {
345
+ fs.rmSync(filePath);
346
+ }
347
+ return filePath;
348
+ }
349
+
350
+ function formatAiRunStatus(projectRoot, run) {
351
+ if (!run) {
352
+ return [
353
+ 'AI run status',
354
+ 'Status: no active run',
355
+ 'Next safe command: npx create-quiver ai run create --input <requirements.md>',
356
+ '',
357
+ ].join('\n');
358
+ }
359
+
360
+ return [
361
+ 'AI run status',
362
+ `Run: ${run.run_id}`,
363
+ `Status: ${run.status}`,
364
+ `Phase: ${run.phase}`,
365
+ `Spec: ${run.spec_slug || '(not generated)'}`,
366
+ `Requirement: ${run.requirement?.path || '(missing)'}`,
367
+ `State: ${toRelativePosix(projectRoot, runStatePath(projectRoot, run.run_id))}`,
368
+ `Approvals: ${run.approvals_path}`,
369
+ `Next safe command: ${nextCommandForPhase(run.phase)}`,
370
+ '',
371
+ ].join('\n');
372
+ }
373
+
374
+ function formatAiRunResume(projectRoot, run) {
375
+ if (!run) {
376
+ return [
377
+ 'AI run resume',
378
+ 'No active run found.',
379
+ 'Next safe command: npx create-quiver ai run create --input <requirements.md>',
380
+ '',
381
+ ].join('\n');
382
+ }
383
+
384
+ return [
385
+ 'AI run resume',
386
+ `Run: ${run.run_id}`,
387
+ `Current phase: ${run.phase}`,
388
+ `Next safe command: ${nextCommandForPhase(run.phase)}`,
389
+ `State: ${toRelativePosix(projectRoot, runStatePath(projectRoot, run.run_id))}`,
390
+ '',
391
+ ].join('\n');
392
+ }
393
+
394
+ module.exports = {
395
+ AI_RUN_PHASES,
396
+ acquireAiRunLock,
397
+ assertAiRunPhaseAllows,
398
+ createAiRun,
399
+ ensureAiRun,
400
+ formatAiRunResume,
401
+ formatAiRunStatus,
402
+ latestAiRun,
403
+ listAiRuns,
404
+ nextCommandForPhase,
405
+ readAiRun,
406
+ readAiRunLock,
407
+ recordAiRunApproval,
408
+ releaseAiRunLock,
409
+ resolveAiRun,
410
+ runApprovalsPath,
411
+ runDir,
412
+ runStatePath,
413
+ updateAiRunPhase,
414
+ };
@@ -2,6 +2,7 @@ const path = require('node:path');
2
2
 
3
3
  const SENSITIVE_SEGMENTS = [
4
4
  '.ssh',
5
+ '.quiver',
5
6
  'node_modules',
6
7
  'dist',
7
8
  'build',
@@ -95,6 +96,10 @@ function getContextPathExclusionReason(filePath) {
95
96
  return 'empty-path';
96
97
  }
97
98
 
99
+ if (normalized === '.quiver/scans/PROJECT_SCAN.json') {
100
+ return null;
101
+ }
102
+
98
103
  if (segments.some((segment) => SENSITIVE_SEGMENTS.includes(segment))) {
99
104
  const matchedSegment = segments.find((segment) => SENSITIVE_SEGMENTS.includes(segment));
100
105
  return `unsafe-segment:${matchedSegment}`;
@@ -182,10 +182,22 @@ function validateGeneratedSliceJson(filePath, expectedSliceId) {
182
182
  throw new Error(formatError(`slice.json files must be an array at ${filePath}`));
183
183
  }
184
184
 
185
+ if (!Array.isArray(parsed.expected_read_paths)) {
186
+ throw new Error(formatError(`slice.json expected_read_paths must be an array at ${filePath}`));
187
+ }
188
+
189
+ if (!Array.isArray(parsed.allowed_write_paths)) {
190
+ throw new Error(formatError(`slice.json allowed_write_paths must be an array at ${filePath}`));
191
+ }
192
+
185
193
  if (!Array.isArray(parsed.depends_on)) {
186
194
  throw new Error(formatError(`slice.json depends_on must be an array at ${filePath}`));
187
195
  }
188
196
 
197
+ if (!Array.isArray(parsed.validation_hints)) {
198
+ throw new Error(formatError(`slice.json validation_hints must be an array at ${filePath}`));
199
+ }
200
+
189
201
  return parsed;
190
202
  }
191
203
 
@@ -31,6 +31,46 @@ function bullets(items, fallback = '- n/a') {
31
31
  return list.map((item) => `- ${item}`);
32
32
  }
33
33
 
34
+ function normalizeStringArray(items) {
35
+ return Array.isArray(items) ? items.map((item) => String(item).trim()).filter(Boolean) : [];
36
+ }
37
+
38
+ function resolveExpectedReadPaths(manifest, slice) {
39
+ const explicit = normalizeStringArray(slice.expected_read_paths);
40
+ if (explicit.length > 0) {
41
+ return explicit;
42
+ }
43
+
44
+ if (slice.slice_id === SPEC_FOUNDATION_SLICE_ID) {
45
+ return [manifest.sourcePath];
46
+ }
47
+
48
+ return [
49
+ manifest.sourcePath,
50
+ `specs/${manifest.slug}/SPEC.md`,
51
+ `specs/${manifest.slug}/slices/${slice.slice_id}/slice.json`,
52
+ `specs/${manifest.slug}/slices/${slice.slice_id}/EXECUTION_BRIEF.md`,
53
+ ];
54
+ }
55
+
56
+ function resolveAllowedWritePaths(slice) {
57
+ const explicit = normalizeStringArray(slice.allowed_write_paths);
58
+ if (explicit.length > 0) {
59
+ return explicit;
60
+ }
61
+
62
+ return normalizeStringArray(slice.files);
63
+ }
64
+
65
+ function resolveValidationHints(slice) {
66
+ const explicit = normalizeStringArray(slice.validation_hints);
67
+ if (explicit.length > 0) {
68
+ return explicit;
69
+ }
70
+
71
+ return normalizeStringArray(slice.tests);
72
+ }
73
+
34
74
  function displayStatus(status, defaultStatus = 'draft') {
35
75
  const normalized = String(status || defaultStatus).trim().toLowerCase();
36
76
  if (normalized === 'completed') {
@@ -273,7 +313,7 @@ function buildPrMarkdown(manifest) {
273
313
  '',
274
314
  '```bash',
275
315
  `cd <repo-root>`,
276
- `npx create-quiver ai plan --phase spec --input <approved-input> --spec ${manifest.slug}`,
316
+ `npx create-quiver spec create --input <approved-input> --spec ${manifest.slug}`,
277
317
  '```',
278
318
  '',
279
319
  '### Run the Project',
@@ -289,7 +329,7 @@ function buildPrMarkdown(manifest) {
289
329
  '',
290
330
  '**Prerequisite:** approved input is available.',
291
331
  '',
292
- '1. Run the spec phase.',
332
+ '1. Run `spec create`.',
293
333
  '2. Inspect the generated spec directory.',
294
334
  '',
295
335
  '**Expected result:** all generated files exist and every JSON file parses.',
@@ -325,6 +365,9 @@ function buildSliceJson(manifest, slice, index) {
325
365
  const dependsOn = isFoundation ? [] : Array.from(new Set(['slice-00-spec-foundation', ...(slice.depends_on || [])]));
326
366
  const branchSlug = slice.git?.branch_slug || slugify(slice.slice_id);
327
367
  const ticket = slice.ticket || manifest.ticket;
368
+ const expectedReadPaths = resolveExpectedReadPaths(manifest, slice);
369
+ const allowedWritePaths = resolveAllowedWritePaths(slice);
370
+ const validationHints = resolveValidationHints(slice);
328
371
 
329
372
  return {
330
373
  slice_id: slice.slice_id,
@@ -343,12 +386,15 @@ function buildSliceJson(manifest, slice, index) {
343
386
  not_included: Array.isArray(slice.not_included) ? slice.not_included : [],
344
387
  acceptance: Array.isArray(slice.acceptance) ? slice.acceptance : [],
345
388
  files: Array.isArray(slice.files) ? slice.files : [],
389
+ expected_read_paths: expectedReadPaths,
390
+ allowed_write_paths: allowedWritePaths,
346
391
  depends_on: dependsOn,
347
392
  parallel_safe: slice.parallel_safe || (isFoundation ? 'never' : 'after_dependencies'),
348
393
  parallel_safe_reason: slice.parallel_safe_reason || (isFoundation
349
394
  ? 'slice-00 is the mandatory documentation foundation and must land before every implementation slice.'
350
395
  : 'Can run after slice-00 and the approved input has been staged.'),
351
396
  tests: Array.isArray(slice.tests) ? slice.tests : [],
397
+ validation_hints: validationHints,
352
398
  documentation: [
353
399
  `specs/${manifest.slug}/slices/${slice.slice_id}/EXECUTION_BRIEF.md`,
354
400
  `specs/${manifest.slug}/slices/${slice.slice_id}/CLOSURE_BRIEF.md`,
@@ -365,6 +411,9 @@ function buildSliceJson(manifest, slice, index) {
365
411
  }
366
412
 
367
413
  function buildExecutionBrief(manifest, slice) {
414
+ const expectedReadPaths = resolveExpectedReadPaths(manifest, slice);
415
+ const allowedWritePaths = resolveAllowedWritePaths(slice);
416
+ const validationHints = resolveValidationHints(slice);
368
417
  const lines = [
369
418
  `# EXECUTION BRIEF - ${slice.slice_id}`,
370
419
  '',
@@ -392,11 +441,23 @@ function buildExecutionBrief(manifest, slice) {
392
441
  '',
393
442
  `Follow the approved input staged in \`${manifest.sourcePath}\` and keep the slice inside its declared files.`,
394
443
  '',
444
+ '## Expected read paths',
445
+ '',
446
+ ...bullets(expectedReadPaths, '- No explicit read paths declared.'),
447
+ '',
448
+ '## Allowed write paths',
449
+ '',
450
+ ...bullets(allowedWritePaths, '- No explicit write paths declared.'),
451
+ '',
452
+ '## Validation hints',
453
+ '',
454
+ ...bullets(validationHints, '- No explicit validation commands declared.'),
455
+ '',
395
456
  '## Pasos sugeridos de ejecucion',
396
457
  '',
397
- '1. Read the approved input.',
398
- '2. Implement the declared files.',
399
- '3. Run the declared validation commands.',
458
+ '1. Read only the expected paths unless a blocker requires more context.',
459
+ '2. Implement only the declared allowed write paths.',
460
+ '3. Run the declared validation commands or document why they are not available.',
400
461
  '',
401
462
  '## Restricciones',
402
463
  '',
@@ -601,12 +662,17 @@ function normalizeSliceManifest(slice, index, fallbackTicket) {
601
662
  ? 'Document the approved planning input.'
602
663
  : `Implement the approved plan captured in the spec source.`);
603
664
  const dependsOn = Array.isArray(slice.depends_on) ? slice.depends_on.map((dep) => String(dep).trim()).filter(Boolean) : [];
604
- const files = Array.isArray(slice.files) ? slice.files.map((file) => String(file).trim()).filter(Boolean) : [];
605
- const must = Array.isArray(slice.must) ? slice.must.map((item) => String(item).trim()).filter(Boolean) : [];
606
- const notIncluded = Array.isArray(slice.not_included) ? slice.not_included.map((item) => String(item).trim()).filter(Boolean) : [];
607
- const acceptance = Array.isArray(slice.acceptance) ? slice.acceptance.map((item) => String(item).trim()).filter(Boolean) : [];
608
- const tests = Array.isArray(slice.tests) ? slice.tests.map((item) => String(item).trim()).filter(Boolean) : [];
609
- const assumptions = Array.isArray(slice.assumptions) ? slice.assumptions.map((item) => String(item).trim()).filter(Boolean) : [];
665
+ const explicitAllowedWritePaths = normalizeStringArray(slice.allowed_write_paths || slice.allowedWritePaths || slice.write_paths);
666
+ const declaredFiles = normalizeStringArray(slice.files);
667
+ const files = declaredFiles.length > 0 ? declaredFiles : explicitAllowedWritePaths;
668
+ const must = normalizeStringArray(slice.must);
669
+ const notIncluded = normalizeStringArray(slice.not_included);
670
+ const acceptance = normalizeStringArray(slice.acceptance);
671
+ const tests = normalizeStringArray(slice.tests);
672
+ const assumptions = normalizeStringArray(slice.assumptions);
673
+ const expectedReadPaths = normalizeStringArray(slice.expected_read_paths || slice.expectedReadPaths || slice.read_paths || slice.reads);
674
+ const allowedWritePaths = explicitAllowedWritePaths;
675
+ const validationHints = normalizeStringArray(slice.validation_hints || slice.validationHints);
610
676
  const normalizedDependsOn = index === 0
611
677
  ? dependsOn
612
678
  : Array.from(new Set([SPEC_FOUNDATION_SLICE_ID, ...dependsOn]));
@@ -628,10 +694,13 @@ function normalizeSliceManifest(slice, index, fallbackTicket) {
628
694
  not_included: notIncluded,
629
695
  acceptance,
630
696
  files,
697
+ expected_read_paths: expectedReadPaths,
698
+ allowed_write_paths: allowedWritePaths,
631
699
  depends_on: normalizedDependsOn,
632
700
  parallel_safe: slice.parallel_safe,
633
701
  parallel_safe_reason: slice.parallel_safe_reason,
634
702
  tests,
703
+ validation_hints: validationHints,
635
704
  assumptions,
636
705
  estimated_hours: Number.isFinite(Number(slice.estimated_hours)) ? Number(slice.estimated_hours) : 0,
637
706
  status: slice.status || (index === 0 ? 'ready' : 'draft'),