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,22 @@
1
+ const { buildDemoPlan, formatDemoPlan, writeDemoPlan } = require('../lib/demo');
2
+
3
+ function runDemo(options = {}) {
4
+ if (options.command !== 'create') {
5
+ throw new Error(`create-quiver: unsupported demo subcommand: ${options.command || '(missing)'}. Supported tasks: create`);
6
+ }
7
+
8
+ const plan = buildDemoPlan(options.targetRoot, { demo: options.demo });
9
+
10
+ if (options.dryRun) {
11
+ console.log(formatDemoPlan(plan, { dryRun: true }));
12
+ return plan;
13
+ }
14
+
15
+ writeDemoPlan(plan);
16
+ console.log(formatDemoPlan(plan));
17
+ return plan;
18
+ }
19
+
20
+ module.exports = {
21
+ runDemo,
22
+ };
@@ -0,0 +1,37 @@
1
+ const path = require('path');
2
+ const { runEvidenceCommand } = require('../lib/evidence');
3
+
4
+ function formatOutputPath(repoRoot, outputPath) {
5
+ const relativeOutput = path.relative(repoRoot, outputPath).split(path.sep).join('/');
6
+ if (relativeOutput && !relativeOutput.startsWith('../') && relativeOutput !== '..') {
7
+ return relativeOutput;
8
+ }
9
+
10
+ return outputPath;
11
+ }
12
+
13
+ function runEvidence(repoRoot, options = {}) {
14
+ const command = options.command || '';
15
+ if (options.subcommand !== 'run') {
16
+ throw new Error('create-quiver: missing evidence subcommand. Use: npx create-quiver evidence run -- <command>');
17
+ }
18
+
19
+ const result = runEvidenceCommand(repoRoot, command, {
20
+ maxOutput: options.maxOutput,
21
+ outputPath: options.output,
22
+ spawnSync: options.spawnSync,
23
+ });
24
+ const displayOutput = formatOutputPath(repoRoot, result.outputPath);
25
+
26
+ console.log('Quiver evidence recorded');
27
+ console.log(`- Command: ${result.record.command}`);
28
+ console.log(`- Exit code: ${result.exitCode}`);
29
+ console.log(`- Output: ${displayOutput}`);
30
+
31
+ return result;
32
+ }
33
+
34
+ module.exports = {
35
+ formatOutputPath,
36
+ runEvidence,
37
+ };
@@ -0,0 +1,562 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const { readPhaseApproval } = require('../lib/approvals');
5
+ const { readPlanReview } = require('../lib/ai/plan-review');
6
+ const { listAgentProfiles } = require('../lib/agent-profiles');
7
+ const { buildGraph, naturalNumberFromSliceId, readAllSlices } = require('../lib/slice-graph');
8
+ const { hasQuiverInitializationEvidence, readState } = require('../lib/state');
9
+
10
+ function exists(projectRoot, relativePath) {
11
+ return fs.existsSync(path.join(projectRoot, relativePath));
12
+ }
13
+
14
+ function listSpecSlugs(projectRoot) {
15
+ const specsDir = path.join(projectRoot, 'specs');
16
+ if (!fs.existsSync(specsDir)) {
17
+ return [];
18
+ }
19
+
20
+ return fs.readdirSync(specsDir, { withFileTypes: true })
21
+ .filter((entry) => entry.isDirectory())
22
+ .map((entry) => entry.name)
23
+ .filter((name) => name !== '[project-name]' && !name.startsWith('quiver-'))
24
+ .filter((name) => exists(projectRoot, path.posix.join('specs', name, 'SPEC.md')))
25
+ .sort((left, right) => left.localeCompare(right));
26
+ }
27
+
28
+ function safeReadApproval(projectRoot, phase) {
29
+ try {
30
+ return readPhaseApproval(projectRoot, phase);
31
+ } catch (error) {
32
+ return {
33
+ phase,
34
+ status: 'invalid',
35
+ error: error.message,
36
+ };
37
+ }
38
+ }
39
+
40
+ function safeReadPlanReview(projectRoot) {
41
+ try {
42
+ return readPlanReview(projectRoot);
43
+ } catch (error) {
44
+ return {
45
+ status: 'invalid',
46
+ error: error.message,
47
+ };
48
+ }
49
+ }
50
+
51
+ function summarizeDocs(projectRoot) {
52
+ const docs = {
53
+ hasProjectMap: exists(projectRoot, 'docs/PROJECT_MAP.md'),
54
+ hasAiContext: exists(projectRoot, 'docs/AI_CONTEXT.md'),
55
+ hasOnboardingPrompt: exists(projectRoot, 'docs/AI_ONBOARDING_PROMPT.md'),
56
+ };
57
+ const missing = [
58
+ ['docs/PROJECT_MAP.md', docs.hasProjectMap],
59
+ ['docs/AI_CONTEXT.md', docs.hasAiContext],
60
+ ['docs/AI_ONBOARDING_PROMPT.md', docs.hasOnboardingPrompt],
61
+ ].filter(([, present]) => !present).map(([file]) => file);
62
+
63
+ return {
64
+ ...docs,
65
+ missing,
66
+ ready: missing.length === 0,
67
+ };
68
+ }
69
+
70
+ function summarizeAgentProfiles(projectRoot) {
71
+ const profiles = listAgentProfiles(projectRoot);
72
+ return {
73
+ configured: profiles.filter((item) => item.configured).map((item) => item.role),
74
+ missingCore: profiles
75
+ .filter((item) => ['planner', 'executor'].includes(item.role) && !item.configured)
76
+ .map((item) => item.role),
77
+ };
78
+ }
79
+
80
+ function buildFacts({ initialized, docs, approvals, planReview, agents, specSlugs, state, slices = null }) {
81
+ return {
82
+ initialized,
83
+ hasProjectMap: docs.hasProjectMap,
84
+ hasAiContext: docs.hasAiContext,
85
+ hasOnboardingPrompt: docs.hasOnboardingPrompt,
86
+ approvals: {
87
+ acceptance: approvals.acceptance.status,
88
+ technicalPlan: approvals.technicalPlan.status,
89
+ planReview: planReview.status,
90
+ },
91
+ agents,
92
+ specSlugs,
93
+ slices,
94
+ quiverVersion: state?.quiver_version || null,
95
+ };
96
+ }
97
+
98
+ function firstSpecPath(specSlugs) {
99
+ return `specs/${specSlugs[0]}`;
100
+ }
101
+
102
+ function formatSliceCommand(slice) {
103
+ return `npx create-quiver ai execute-slice --slice ${path.relative(slice.repoRoot, slice.slicePath).split(path.sep).join('/')} --dry-run --commit`;
104
+ }
105
+
106
+ function summarizeSlices(projectRoot, specSlugs) {
107
+ if (specSlugs.length === 0) {
108
+ return {
109
+ allCompleted: false,
110
+ blockers: [],
111
+ completedCount: 0,
112
+ graphError: null,
113
+ pendingCount: 0,
114
+ ready: [],
115
+ slice00: null,
116
+ totalCount: 0,
117
+ };
118
+ }
119
+
120
+ let allSlices = [];
121
+ try {
122
+ allSlices = readAllSlices(projectRoot)
123
+ .filter((slice) => specSlugs.includes(slice.specSlug))
124
+ .map((slice) => ({ ...slice, repoRoot: projectRoot }));
125
+ } catch (error) {
126
+ return {
127
+ allCompleted: false,
128
+ blockers: [`Could not read slices: ${error.message}`],
129
+ completedCount: 0,
130
+ graphError: error.message,
131
+ pendingCount: 0,
132
+ ready: [],
133
+ slice00: null,
134
+ totalCount: 0,
135
+ };
136
+ }
137
+
138
+ if (allSlices.length === 0) {
139
+ return {
140
+ allCompleted: false,
141
+ blockers: ['No slice.json files found for the detected specs.'],
142
+ completedCount: 0,
143
+ graphError: null,
144
+ pendingCount: 0,
145
+ ready: [],
146
+ slice00: null,
147
+ totalCount: 0,
148
+ };
149
+ }
150
+
151
+ let graph;
152
+ try {
153
+ graph = buildGraph(allSlices);
154
+ } catch (error) {
155
+ return {
156
+ allCompleted: false,
157
+ blockers: [`Slice graph is not ready: ${error.message}`],
158
+ completedCount: allSlices.filter((slice) => slice.status === 'completed').length,
159
+ graphError: error.message,
160
+ pendingCount: allSlices.filter((slice) => slice.status !== 'completed').length,
161
+ ready: [],
162
+ slice00: allSlices.find((slice) => naturalNumberFromSliceId(slice.sliceId) === 0) || null,
163
+ totalCount: allSlices.length,
164
+ };
165
+ }
166
+
167
+ const nodes = graph.nodes.map((slice) => ({ ...slice, repoRoot: projectRoot }));
168
+ const completedRefs = new Set(nodes.filter((slice) => slice.status === 'completed').map((slice) => slice.ref));
169
+ const pending = nodes.filter((slice) => slice.status !== 'completed');
170
+ const slice00 = nodes.find((slice) => naturalNumberFromSliceId(slice.sliceId) === 0) || null;
171
+ let ready = pending.filter((slice) => slice.depends_on.every((dep) => completedRefs.has(dep)));
172
+
173
+ if (slice00 && slice00.status !== 'completed') {
174
+ ready = ready.filter((slice) => slice.ref === slice00.ref);
175
+ }
176
+
177
+ return {
178
+ allCompleted: pending.length === 0,
179
+ blockers: [],
180
+ completedCount: completedRefs.size,
181
+ graphError: null,
182
+ pendingCount: pending.length,
183
+ ready,
184
+ slice00,
185
+ totalCount: nodes.length,
186
+ };
187
+ }
188
+
189
+ function baseReport({ stage, label, blockers = [], nextCommand, suggestedCommands, facts }) {
190
+ return {
191
+ stage,
192
+ label,
193
+ blockers,
194
+ nextCommand,
195
+ suggestedCommands,
196
+ facts,
197
+ };
198
+ }
199
+
200
+ function detectFlowState(projectRoot) {
201
+ const initialized = hasQuiverInitializationEvidence(projectRoot);
202
+ const state = readState(projectRoot);
203
+ const docs = summarizeDocs(projectRoot);
204
+ const approvals = {
205
+ acceptance: safeReadApproval(projectRoot, 'acceptance'),
206
+ technicalPlan: safeReadApproval(projectRoot, 'technical-plan'),
207
+ };
208
+ const planReview = safeReadPlanReview(projectRoot);
209
+ const agents = summarizeAgentProfiles(projectRoot);
210
+ const specSlugs = listSpecSlugs(projectRoot);
211
+ const facts = buildFacts({ initialized, docs, approvals, planReview, agents, specSlugs, state });
212
+
213
+ if (!initialized) {
214
+ return baseReport({
215
+ stage: 'not-initialized',
216
+ label: 'not initialized',
217
+ blockers: ['Quiver has not been initialized in this project.'],
218
+ nextCommand: 'npx create-quiver init --name "Project Name"',
219
+ suggestedCommands: [
220
+ 'npx create-quiver init --name "Project Name"',
221
+ 'npx create-quiver analyze',
222
+ 'npx create-quiver doctor',
223
+ ],
224
+ facts,
225
+ });
226
+ }
227
+
228
+ if (!docs.ready) {
229
+ return baseReport({
230
+ stage: 'context-needed',
231
+ label: 'context needs refresh',
232
+ blockers: docs.missing.map((file) => `Missing ${file}.`),
233
+ nextCommand: 'npx create-quiver analyze',
234
+ suggestedCommands: [
235
+ 'npx create-quiver prepare --dry-run',
236
+ 'npx create-quiver analyze',
237
+ 'npx create-quiver doctor',
238
+ ],
239
+ facts,
240
+ });
241
+ }
242
+
243
+ const invalidApprovals = Object.values(approvals).filter((approval) => approval.status === 'invalid');
244
+ if (invalidApprovals.length > 0) {
245
+ return baseReport({
246
+ stage: 'approval-state-invalid',
247
+ label: 'approval state needs repair',
248
+ blockers: invalidApprovals.map((approval) => approval.error),
249
+ nextCommand: 'npx create-quiver ai approvals',
250
+ suggestedCommands: [
251
+ 'npx create-quiver ai approvals',
252
+ 'npx create-quiver doctor',
253
+ ],
254
+ facts,
255
+ });
256
+ }
257
+
258
+ if (planReview.status === 'invalid') {
259
+ return baseReport({
260
+ stage: 'plan-review-state-invalid',
261
+ label: 'plan review state needs repair',
262
+ blockers: [planReview.error],
263
+ nextCommand: 'npx create-quiver ai approvals',
264
+ suggestedCommands: [
265
+ 'npx create-quiver ai approvals',
266
+ 'npx create-quiver doctor',
267
+ ],
268
+ facts,
269
+ });
270
+ }
271
+
272
+ if (approvals.acceptance.status === 'missing' && approvals.technicalPlan.status === 'missing' && specSlugs.length === 0 && agents.missingCore.length > 0) {
273
+ const role = agents.missingCore[0];
274
+ return baseReport({
275
+ stage: 'agent-profiles-needed',
276
+ label: 'agent profiles need setup',
277
+ blockers: [`Missing ${agents.missingCore.join(' and ')} agent profile${agents.missingCore.length > 1 ? 's' : ''}.`],
278
+ nextCommand: `npx create-quiver ai agent set ${role} --provider codex --model "<model-label>"`,
279
+ suggestedCommands: [
280
+ 'npx create-quiver ai agent list',
281
+ `npx create-quiver ai agent set ${role} --provider codex --model "<model-label>"`,
282
+ ],
283
+ facts,
284
+ });
285
+ }
286
+
287
+ if (approvals.acceptance.status === 'draft') {
288
+ return baseReport({
289
+ stage: 'criteria-draft',
290
+ label: 'acceptance criteria need approval',
291
+ blockers: ['Acceptance criteria draft exists but is not approved.'],
292
+ nextCommand: 'npx create-quiver ai approve --phase acceptance --version <n>',
293
+ suggestedCommands: [
294
+ 'npx create-quiver ai approvals',
295
+ 'npx create-quiver ai revise --phase acceptance --input feedback.md --dry-run',
296
+ 'npx create-quiver ai approve --phase acceptance --version <n>',
297
+ ],
298
+ facts,
299
+ });
300
+ }
301
+
302
+ if (approvals.acceptance.status === 'stale') {
303
+ return baseReport({
304
+ stage: 'criteria-stale',
305
+ label: 'acceptance criteria approval is stale',
306
+ blockers: ['Acceptance criteria changed after approval.'],
307
+ nextCommand: 'npx create-quiver ai approve --phase acceptance --version <n>',
308
+ suggestedCommands: [
309
+ 'npx create-quiver ai approvals',
310
+ 'npx create-quiver ai revise --phase acceptance --input feedback.md --dry-run',
311
+ 'npx create-quiver ai approve --phase acceptance --version <n>',
312
+ ],
313
+ facts,
314
+ });
315
+ }
316
+
317
+ if (approvals.acceptance.status !== 'approved') {
318
+ return baseReport({
319
+ stage: 'planning-ready',
320
+ label: 'ready for acceptance criteria',
321
+ blockers: [],
322
+ nextCommand: 'npx create-quiver ai onboard --dry-run',
323
+ suggestedCommands: [
324
+ 'npx create-quiver ai onboard --dry-run',
325
+ 'npx create-quiver ai plan --phase acceptance --input requirements.md --dry-run',
326
+ ],
327
+ facts,
328
+ });
329
+ }
330
+
331
+ if (approvals.technicalPlan.status === 'draft') {
332
+ if (planReview.status !== 'unapproved') {
333
+ return baseReport({
334
+ stage: 'technical-plan-review-needed',
335
+ label: 'technical plan needs production review',
336
+ blockers: ['Technical plan draft exists but has not been reviewed for production readiness.'],
337
+ nextCommand: 'npx create-quiver ai review-plan --dry-run',
338
+ suggestedCommands: [
339
+ 'npx create-quiver ai approvals',
340
+ 'npx create-quiver ai review-plan --dry-run',
341
+ 'npx create-quiver ai review-plan',
342
+ ],
343
+ facts,
344
+ });
345
+ }
346
+
347
+ return baseReport({
348
+ stage: 'technical-plan-draft',
349
+ label: 'technical plan needs approval',
350
+ blockers: ['Technical plan draft was reviewed but is not approved.'],
351
+ nextCommand: 'npx create-quiver ai approve --phase technical-plan --version <n>',
352
+ suggestedCommands: [
353
+ 'npx create-quiver ai approvals',
354
+ 'npx create-quiver ai approve --phase technical-plan --version <n>',
355
+ ],
356
+ facts,
357
+ });
358
+ }
359
+
360
+ if (approvals.technicalPlan.status === 'stale') {
361
+ if (planReview.status !== 'unapproved') {
362
+ return baseReport({
363
+ stage: 'technical-plan-review-needed',
364
+ label: 'technical plan needs production review',
365
+ blockers: ['Technical plan changed after approval and needs a fresh production review.'],
366
+ nextCommand: 'npx create-quiver ai review-plan --dry-run',
367
+ suggestedCommands: [
368
+ 'npx create-quiver ai approvals',
369
+ 'npx create-quiver ai review-plan --dry-run',
370
+ 'npx create-quiver ai review-plan',
371
+ ],
372
+ facts,
373
+ });
374
+ }
375
+
376
+ return baseReport({
377
+ stage: 'technical-plan-stale',
378
+ label: 'technical plan approval is stale',
379
+ blockers: ['Technical plan changed after approval and the latest draft was reviewed.'],
380
+ nextCommand: 'npx create-quiver ai approve --phase technical-plan --version <n>',
381
+ suggestedCommands: [
382
+ 'npx create-quiver ai approvals',
383
+ 'npx create-quiver ai approve --phase technical-plan --version <n>',
384
+ ],
385
+ facts,
386
+ });
387
+ }
388
+
389
+ if (approvals.technicalPlan.status !== 'approved') {
390
+ return baseReport({
391
+ stage: 'technical-plan-ready',
392
+ label: 'ready for technical plan',
393
+ blockers: [],
394
+ nextCommand: 'npx create-quiver ai plan --phase technical-plan --dry-run',
395
+ suggestedCommands: [
396
+ 'npx create-quiver ai plan --phase technical-plan --dry-run',
397
+ 'npx create-quiver ai review-plan --dry-run',
398
+ ],
399
+ facts,
400
+ });
401
+ }
402
+
403
+ if (specSlugs.length === 0 && planReview.status !== 'reviewed') {
404
+ return baseReport({
405
+ stage: 'technical-plan-review-needed',
406
+ label: 'technical plan needs production review',
407
+ blockers: [`Plan review status is ${planReview.status}.`],
408
+ nextCommand: 'npx create-quiver ai review-plan --dry-run',
409
+ suggestedCommands: [
410
+ 'npx create-quiver ai review-plan --dry-run',
411
+ 'npx create-quiver ai review-plan',
412
+ ],
413
+ facts,
414
+ });
415
+ }
416
+
417
+ if (specSlugs.length === 0) {
418
+ return baseReport({
419
+ stage: 'spec-ready',
420
+ label: 'ready for spec generation',
421
+ blockers: [],
422
+ nextCommand: 'npx create-quiver spec create --dry-run',
423
+ suggestedCommands: [
424
+ 'npx create-quiver spec create --dry-run',
425
+ 'npx create-quiver spec create',
426
+ 'npx create-quiver spec start specs/<spec-slug>',
427
+ ],
428
+ facts,
429
+ });
430
+ }
431
+
432
+ const slices = summarizeSlices(projectRoot, specSlugs);
433
+ const sliceFacts = buildFacts({ initialized, docs, approvals, planReview, agents, specSlugs, state, slices: {
434
+ completed: slices.completedCount,
435
+ pending: slices.pendingCount,
436
+ ready: slices.ready.map((slice) => slice.ref),
437
+ total: slices.totalCount,
438
+ } });
439
+
440
+ if (slices.blockers.length > 0) {
441
+ return baseReport({
442
+ stage: 'slice-state-blocked',
443
+ label: 'slice state has blockers',
444
+ blockers: slices.blockers,
445
+ nextCommand: `npx create-quiver spec status ${firstSpecPath(specSlugs)}`,
446
+ suggestedCommands: [
447
+ `npx create-quiver spec status ${firstSpecPath(specSlugs)}`,
448
+ 'npx create-quiver plan',
449
+ ],
450
+ facts: sliceFacts,
451
+ });
452
+ }
453
+
454
+ if (slices.allCompleted) {
455
+ return baseReport({
456
+ stage: 'pr-ready',
457
+ label: 'ready for PR preparation',
458
+ blockers: [],
459
+ nextCommand: `npx create-quiver ai pr --dry-run --input ${firstSpecPath(specSlugs)}/pr.md`,
460
+ suggestedCommands: [
461
+ `npx create-quiver ai pr --dry-run --input ${firstSpecPath(specSlugs)}/pr.md`,
462
+ `npx create-quiver spec status ${firstSpecPath(specSlugs)}`,
463
+ ],
464
+ facts: sliceFacts,
465
+ });
466
+ }
467
+
468
+ const nextSlice = slices.ready[0] || null;
469
+ if (nextSlice && slices.slice00 && slices.slice00.status !== 'completed') {
470
+ return baseReport({
471
+ stage: 'slice-00-ready',
472
+ label: 'slice-00 must be executed first',
473
+ blockers: ['Later slices are blocked until slice-00 is completed and committed.'],
474
+ nextCommand: formatSliceCommand(nextSlice),
475
+ suggestedCommands: [
476
+ `npx create-quiver spec status ${firstSpecPath(specSlugs)}`,
477
+ formatSliceCommand(nextSlice),
478
+ ],
479
+ facts: sliceFacts,
480
+ });
481
+ }
482
+
483
+ if (nextSlice) {
484
+ return baseReport({
485
+ stage: 'slice-execution-ready',
486
+ label: 'ready for slice execution',
487
+ blockers: [],
488
+ nextCommand: formatSliceCommand(nextSlice),
489
+ suggestedCommands: [
490
+ 'npx create-quiver plan',
491
+ 'npx create-quiver next',
492
+ formatSliceCommand(nextSlice),
493
+ ],
494
+ facts: sliceFacts,
495
+ });
496
+ }
497
+
498
+ return baseReport({
499
+ stage: 'slices-ready',
500
+ label: 'slice planning needs review',
501
+ blockers: ['No ready slice was found. Review dependencies and statuses.'],
502
+ nextCommand: 'npx create-quiver plan',
503
+ suggestedCommands: [
504
+ 'npx create-quiver plan',
505
+ 'npx create-quiver graph',
506
+ 'npx create-quiver next',
507
+ ],
508
+ facts: sliceFacts,
509
+ });
510
+ }
511
+
512
+ function formatFlowReport(report) {
513
+ const lines = [
514
+ 'Quiver guided flow',
515
+ '',
516
+ 'Command path:',
517
+ '- Bootstrap and remote use: npx create-quiver <command>',
518
+ '- Short alias after local install: quiver <command>',
519
+ '- Generated npm script: npm run quiver:flow',
520
+ '',
521
+ `Stage: ${report.label}`,
522
+ `Next safe command: ${report.nextCommand}`,
523
+ ];
524
+
525
+ if (report.blockers.length > 0) {
526
+ lines.push('', 'Blockers:');
527
+ for (const blocker of report.blockers) {
528
+ lines.push(`- ${blocker}`);
529
+ }
530
+ }
531
+
532
+ lines.push('', 'Suggested sequence:');
533
+ for (const command of report.suggestedCommands) {
534
+ lines.push(`- ${command}`);
535
+ }
536
+
537
+ if (report.facts.specSlugs.length > 0) {
538
+ lines.push('', `Specs found: ${report.facts.specSlugs.join(', ')}`);
539
+ }
540
+
541
+ lines.push('', 'Safety: this command is read-only and does not call AI providers.');
542
+
543
+ return `${lines.join('\n')}\n`;
544
+ }
545
+
546
+ async function runFlow(repoRoot, options = {}) {
547
+ const report = detectFlowState(repoRoot);
548
+
549
+ if (options.json) {
550
+ process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
551
+ return report;
552
+ }
553
+
554
+ process.stdout.write(formatFlowReport(report));
555
+ return report;
556
+ }
557
+
558
+ module.exports = {
559
+ detectFlowState,
560
+ formatFlowReport,
561
+ runFlow,
562
+ };
@@ -1,9 +1,10 @@
1
- const { buildGraph, computeLevels, detectFileConflicts, readAllSlices } = require('../lib/slice-graph');
1
+ const { buildGraph, computeLevels, detectFileConflicts, readAllSlices, readSlicesForSpec } = require('../lib/slice-graph');
2
2
  const { renderDotGraph } = require('../lib/renderers/dot');
3
3
  const { renderMermaidGraph } = require('../lib/renderers/mermaid');
4
4
  const { renderTreeGraph, isUnicodeEnabled } = require('../lib/renderers/tree');
5
5
 
6
6
  const EXCLUDED_STATUSES = new Set(['completed', 'skipped', 'cancelled']);
7
+ const HISTORY_EXCLUDED_STATUSES = new Set(['skipped', 'cancelled']);
7
8
 
8
9
  function toGraphNode(node) {
9
10
  return {
@@ -27,9 +28,22 @@ function buildConflictPayload(levelIndex, groups) {
27
28
  }
28
29
 
29
30
  function collectGraph(repoRoot, options = {}) {
30
- const graph = buildGraph(readAllSlices(repoRoot));
31
- computeLevels(graph);
32
- const pendingNodes = graph.nodes.filter((node) => !EXCLUDED_STATUSES.has(String(node.status || '').toLowerCase()));
31
+ const specSlug = options.specSlug ? String(options.specSlug).trim() : '';
32
+ const graph = buildGraph(specSlug ? readSlicesForSpec(repoRoot, specSlug) : readAllSlices(repoRoot));
33
+ if (!specSlug) {
34
+ computeLevels(graph);
35
+ }
36
+ const includeCompleted = options.includeCompleted === true;
37
+ const excluded = includeCompleted ? HISTORY_EXCLUDED_STATUSES : EXCLUDED_STATUSES;
38
+ const pendingNodes = graph.nodes.filter((node) => {
39
+ if (excluded.has(String(node.status || '').toLowerCase())) {
40
+ return false;
41
+ }
42
+ if (specSlug && node.specSlug !== specSlug) {
43
+ return false;
44
+ }
45
+ return true;
46
+ });
33
47
  const pendingNodeRefs = new Set(pendingNodes.map((node) => node.ref));
34
48
  const pendingEdges = graph.edges.filter((edge) => pendingNodeRefs.has(edge.from) && pendingNodeRefs.has(edge.to));
35
49
  const levels = pendingNodes.length > 0 ? computeLevels({ nodes: pendingNodes, edges: pendingEdges, cycles: [] }) : [];
@@ -50,6 +64,7 @@ function collectGraph(repoRoot, options = {}) {
50
64
  return {
51
65
  levels: filteredLevels.map((entry) => entry.slices),
52
66
  conflicts: filteredLevels.flatMap((entry) => entry.conflicts),
67
+ include_completed: includeCompleted,
53
68
  };
54
69
  }
55
70