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,832 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const {
4
+ buildQuiverConfig,
5
+ buildQuiverInternalGitignore,
6
+ resolveInitPackageScripts,
7
+ toProjectSlug,
8
+ } = require('./init-layout');
9
+ const cliPackageJson = require('../../../package.json');
10
+
11
+ const SPEC_VIEWER_DEMO = 'spec-viewer';
12
+ const SPEC_VIEWER_PROJECT_NAME = 'Quiver Spec Viewer';
13
+ const SPEC_VIEWER_SLUG = toProjectSlug(SPEC_VIEWER_PROJECT_NAME);
14
+
15
+ function createJson(data) {
16
+ return `${JSON.stringify(data, null, 2)}\n`;
17
+ }
18
+
19
+ function createSpecViewerFiles() {
20
+ const quiverScripts = {
21
+ ...resolveInitPackageScripts('default'),
22
+ 'quiver:plan': 'npx create-quiver plan --spec quiver-spec-viewer',
23
+ 'quiver:graph': 'npx create-quiver graph --spec quiver-spec-viewer',
24
+ 'quiver:next': 'npx create-quiver next --spec quiver-spec-viewer',
25
+ 'quiver:evidence': 'npx create-quiver evidence',
26
+ };
27
+
28
+ return [
29
+ {
30
+ path: 'package.json',
31
+ content: createJson({
32
+ name: SPEC_VIEWER_SLUG,
33
+ private: true,
34
+ version: '0.1.0',
35
+ description: 'Small static demo app for viewing Quiver specs and slices.',
36
+ scripts: {
37
+ start: 'node server.js',
38
+ validate: 'node scripts/validate-demo.js',
39
+ ...quiverScripts,
40
+ },
41
+ }),
42
+ },
43
+ {
44
+ path: '.quiver/state.json',
45
+ content: createJson({
46
+ quiver_version: cliPackageJson.version || '0.0.0',
47
+ project_name: SPEC_VIEWER_PROJECT_NAME,
48
+ initialized_version: cliPackageJson.version || '0.0.0',
49
+ migrated_version: null,
50
+ last_initialized_at: '2026-05-23T00:00:00.000Z',
51
+ last_migration_at: null,
52
+ last_analysis_at: null,
53
+ demo: SPEC_VIEWER_DEMO,
54
+ }),
55
+ },
56
+ {
57
+ path: '.quiver/config.json',
58
+ content: createJson(buildQuiverConfig()),
59
+ },
60
+ {
61
+ path: '.quiver/.gitignore',
62
+ content: buildQuiverInternalGitignore(),
63
+ },
64
+ {
65
+ path: 'AGENTS.md',
66
+ content: `# Agents
67
+
68
+ Purpose
69
+
70
+ This demo is a small Quiver project used to inspect specs and slices.
71
+
72
+ ## Reading Budget
73
+
74
+ Start with README.md and the demo spec. Do not read generated or dependency folders.
75
+
76
+ ## Reading Order
77
+
78
+ 1. README.md
79
+ 2. docs/AI_ONBOARDING_PROMPT.md
80
+ 3. specs/quiver-spec-viewer/SPEC.md
81
+
82
+ ## Output Policy
83
+
84
+ Keep reports short and cite touched files.
85
+
86
+ ## Slice Execution Rules
87
+
88
+ Execute only the selected slice and keep changes inside its declared files.
89
+
90
+ ## Links
91
+
92
+ - docs/AI_ONBOARDING_PROMPT.md
93
+ - specs/quiver-spec-viewer/SPEC.md
94
+ `,
95
+ },
96
+ {
97
+ path: 'README.md',
98
+ content: `# ${SPEC_VIEWER_PROJECT_NAME}
99
+
100
+ ${SPEC_VIEWER_PROJECT_NAME} is a small static demo app for testing Quiver with a real spec/slice workflow.
101
+
102
+ ## Run
103
+
104
+ \`\`\`bash
105
+ npm run validate
106
+ npm start
107
+ \`\`\`
108
+
109
+ Open the URL printed by the server. It starts at http://127.0.0.1:4173 and automatically tries the next ports if that port is occupied.
110
+
111
+ To request a specific starting port:
112
+
113
+ \`\`\`bash
114
+ PORT=4300 npm start
115
+ \`\`\`
116
+
117
+ On Windows PowerShell:
118
+
119
+ \`\`\`powershell
120
+ $env:PORT = "4300"; npm start
121
+ \`\`\`
122
+
123
+ ## Quiver workflow
124
+
125
+ - The example spec lives in \`specs/quiver-spec-viewer/SPEC.md\`.
126
+ - The mandatory documentary slice is \`slice-00-docs-foundation\`.
127
+ - The first implementation slice is \`slice-01-static-spec-viewer\`.
128
+ - Use \`npm run quiver:plan\`, \`npm run quiver:graph\`, and \`npm run quiver:next\` to inspect execution order.
129
+ - Use \`npm run quiver:evidence -- run -- npm run validate\` to capture validation evidence.
130
+ `,
131
+ },
132
+ {
133
+ path: 'docs/AI_CONTEXT.md',
134
+ content: `# Quiver Spec Viewer AI Context
135
+
136
+ This demo is a small static Quiver project. It exists to exercise Quiver specs, slices, validation, and diagnostics with minimal product code.
137
+
138
+ ## Relevant paths
139
+
140
+ - \`specs/quiver-spec-viewer/SPEC.md\`
141
+ - \`specs/quiver-spec-viewer/slices/\`
142
+ - \`src/\`
143
+ `,
144
+ },
145
+ {
146
+ path: 'docs/AI_ONBOARDING_PROMPT.md',
147
+ content: `# AI Onboarding Prompt
148
+
149
+ Read README.md, AGENTS.md, and specs/quiver-spec-viewer/SPEC.md.
150
+
151
+ Do not modify product files unless a slice explicitly asks for it.
152
+ `,
153
+ },
154
+ {
155
+ path: 'docs/COMMANDS.md',
156
+ content: `# Commands
157
+
158
+ | Command | Purpose |
159
+ |---|---|
160
+ | \`npm run validate\` | Validate required demo files. |
161
+ | \`npm start\` | Start the dependency-free static server. |
162
+ | \`npm run quiver:doctor\` | Run Quiver diagnostics. |
163
+ | \`npm run quiver:plan\` | Show demo slice execution order. |
164
+ | \`npm run quiver:graph\` | Show the demo slice graph. |
165
+ | \`npm run quiver:next\` | Suggest the next demo slice. |
166
+ `,
167
+ },
168
+ {
169
+ path: 'docs/WORKFLOW.md',
170
+ content: `# Workflow
171
+
172
+ 1. Validate the demo with \`npm run validate\`.
173
+ 2. Inspect the Quiver workflow with \`npm run quiver:plan\`, \`npm run quiver:graph\`, and \`npm run quiver:next\`.
174
+ 3. Execute only one slice at a time.
175
+ 4. Keep \`slice-00-docs-foundation\` as the documentary baseline.
176
+ `,
177
+ },
178
+ {
179
+ path: 'server.js',
180
+ content: `const fs = require('node:fs');
181
+ const http = require('node:http');
182
+ const path = require('node:path');
183
+
184
+ const root = path.join(__dirname, 'src');
185
+ const startingPort = Number.parseInt(process.env.PORT || '4173', 10);
186
+ const maxPortAttempts = 10;
187
+ const types = {
188
+ '.css': 'text/css; charset=utf-8',
189
+ '.html': 'text/html; charset=utf-8',
190
+ '.js': 'text/javascript; charset=utf-8',
191
+ };
192
+
193
+ if (!Number.isInteger(startingPort) || startingPort < 1 || startingPort > 65535) {
194
+ console.error('Invalid PORT value. Use a number between 1 and 65535.');
195
+ process.exit(1);
196
+ }
197
+
198
+ function handleRequest(request, response) {
199
+ const requestedPath = request.url === '/' ? '/index.html' : request.url;
200
+ const filePath = path.normalize(path.join(root, requestedPath));
201
+
202
+ if (!filePath.startsWith(root)) {
203
+ response.writeHead(403);
204
+ response.end('Forbidden');
205
+ return;
206
+ }
207
+
208
+ fs.readFile(filePath, (error, content) => {
209
+ if (error) {
210
+ response.writeHead(404);
211
+ response.end('Not found');
212
+ return;
213
+ }
214
+
215
+ response.writeHead(200, { 'Content-Type': types[path.extname(filePath)] || 'text/plain; charset=utf-8' });
216
+ response.end(content);
217
+ });
218
+ }
219
+
220
+ function startServer(port, attempt = 0) {
221
+ const server = http.createServer(handleRequest);
222
+
223
+ server.on('error', (error) => {
224
+ if (error.code === 'EADDRINUSE' && attempt < maxPortAttempts) {
225
+ startServer(port + 1, attempt + 1);
226
+ return;
227
+ }
228
+
229
+ if (error.code === 'EADDRINUSE') {
230
+ console.error(\`Port \${port} is in use. Set PORT to a free port, for example: PORT=4300 npm start\`);
231
+ } else {
232
+ console.error(error.message);
233
+ }
234
+ process.exit(1);
235
+ });
236
+
237
+ server.listen(port, '127.0.0.1', () => {
238
+ console.log(\`Quiver Spec Viewer running at http://127.0.0.1:\${port}\`);
239
+ });
240
+ }
241
+
242
+ startServer(startingPort);
243
+ `,
244
+ },
245
+ {
246
+ path: 'src/index.html',
247
+ content: `<!doctype html>
248
+ <html lang="en">
249
+ <head>
250
+ <meta charset="utf-8">
251
+ <meta name="viewport" content="width=device-width, initial-scale=1">
252
+ <title>${SPEC_VIEWER_PROJECT_NAME}</title>
253
+ <link rel="stylesheet" href="./styles.css">
254
+ </head>
255
+ <body>
256
+ <main class="app-shell">
257
+ <section class="toolbar" aria-label="Viewer controls">
258
+ <div>
259
+ <p class="eyebrow">Quiver demo</p>
260
+ <h1>${SPEC_VIEWER_PROJECT_NAME}</h1>
261
+ </div>
262
+ <div class="actions">
263
+ <button data-state="content">Content</button>
264
+ <button data-state="empty">Empty</button>
265
+ <button data-state="loading">Loading</button>
266
+ <button data-state="error">Error</button>
267
+ </div>
268
+ </section>
269
+ <section id="viewer" class="viewer" aria-live="polite"></section>
270
+ </main>
271
+ <script src="./app.js"></script>
272
+ </body>
273
+ </html>
274
+ `,
275
+ },
276
+ {
277
+ path: 'src/styles.css',
278
+ content: `:root {
279
+ color-scheme: light;
280
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
281
+ background: #f6f7f9;
282
+ color: #1f2933;
283
+ }
284
+
285
+ * {
286
+ box-sizing: border-box;
287
+ }
288
+
289
+ body {
290
+ margin: 0;
291
+ }
292
+
293
+ button {
294
+ border: 1px solid #c8d0d9;
295
+ border-radius: 6px;
296
+ background: #ffffff;
297
+ color: #243447;
298
+ cursor: pointer;
299
+ font: inherit;
300
+ padding: 8px 12px;
301
+ }
302
+
303
+ button:hover,
304
+ button:focus-visible {
305
+ border-color: #5b8def;
306
+ outline: 2px solid #cfe0ff;
307
+ outline-offset: 1px;
308
+ }
309
+
310
+ .app-shell {
311
+ max-width: 1120px;
312
+ margin: 0 auto;
313
+ padding: 32px 20px;
314
+ }
315
+
316
+ .toolbar {
317
+ align-items: center;
318
+ display: flex;
319
+ gap: 20px;
320
+ justify-content: space-between;
321
+ margin-bottom: 20px;
322
+ }
323
+
324
+ .eyebrow {
325
+ color: #5a6b7d;
326
+ font-size: 13px;
327
+ font-weight: 700;
328
+ letter-spacing: 0;
329
+ margin: 0 0 6px;
330
+ text-transform: uppercase;
331
+ }
332
+
333
+ h1 {
334
+ font-size: 34px;
335
+ line-height: 1.1;
336
+ margin: 0;
337
+ }
338
+
339
+ .actions {
340
+ display: flex;
341
+ flex-wrap: wrap;
342
+ gap: 8px;
343
+ justify-content: flex-end;
344
+ }
345
+
346
+ .viewer {
347
+ display: grid;
348
+ gap: 16px;
349
+ }
350
+
351
+ .grid {
352
+ display: grid;
353
+ gap: 16px;
354
+ grid-template-columns: minmax(240px, 320px) 1fr;
355
+ }
356
+
357
+ .panel,
358
+ .state {
359
+ background: #ffffff;
360
+ border: 1px solid #d9e0e7;
361
+ border-radius: 8px;
362
+ padding: 18px;
363
+ }
364
+
365
+ .list {
366
+ display: grid;
367
+ gap: 10px;
368
+ }
369
+
370
+ .item {
371
+ border: 1px solid #d9e0e7;
372
+ border-radius: 6px;
373
+ padding: 12px;
374
+ }
375
+
376
+ .item strong,
377
+ .detail h2 {
378
+ overflow-wrap: anywhere;
379
+ }
380
+
381
+ .meta {
382
+ color: #65758b;
383
+ font-size: 14px;
384
+ margin: 4px 0 0;
385
+ }
386
+
387
+ .badge {
388
+ background: #e9f2ff;
389
+ border-radius: 999px;
390
+ color: #1f5fbf;
391
+ display: inline-block;
392
+ font-size: 12px;
393
+ font-weight: 700;
394
+ padding: 4px 8px;
395
+ }
396
+
397
+ .slice-list {
398
+ display: grid;
399
+ gap: 8px;
400
+ margin-top: 14px;
401
+ }
402
+
403
+ .slice-row {
404
+ align-items: center;
405
+ border-top: 1px solid #e6ebf0;
406
+ display: flex;
407
+ gap: 10px;
408
+ justify-content: space-between;
409
+ padding-top: 10px;
410
+ }
411
+
412
+ .state {
413
+ min-height: 180px;
414
+ }
415
+
416
+ @media (max-width: 760px) {
417
+ .toolbar,
418
+ .grid {
419
+ grid-template-columns: 1fr;
420
+ }
421
+
422
+ .toolbar {
423
+ align-items: stretch;
424
+ flex-direction: column;
425
+ }
426
+
427
+ .actions {
428
+ justify-content: flex-start;
429
+ }
430
+ }
431
+ `,
432
+ },
433
+ {
434
+ path: 'src/app.js',
435
+ content: `const specs = [
436
+ {
437
+ id: 'quiver-spec-viewer',
438
+ title: 'Quiver Spec Viewer',
439
+ status: 'planned',
440
+ objective: 'Show a tiny but useful viewer for Quiver specs and slices.',
441
+ slices: [
442
+ { id: 'slice-00-docs-foundation', title: 'Docs foundation', status: 'completed' },
443
+ { id: 'slice-01-static-spec-viewer', title: 'Static spec viewer', status: 'planned' },
444
+ ],
445
+ },
446
+ ];
447
+
448
+ const viewer = document.querySelector('#viewer');
449
+
450
+ function renderContent() {
451
+ const selected = specs[0];
452
+ viewer.innerHTML = \`
453
+ <div class="grid">
454
+ <section class="panel" aria-label="Specs">
455
+ <span class="badge">\${specs.length} spec</span>
456
+ <div class="list">
457
+ \${specs.map((spec) => \`
458
+ <article class="item">
459
+ <strong>\${spec.title}</strong>
460
+ <p class="meta">\${spec.id} · \${spec.status}</p>
461
+ </article>
462
+ \`).join('')}
463
+ </div>
464
+ </section>
465
+ <section class="panel detail" aria-label="Spec detail">
466
+ <span class="badge">\${selected.status}</span>
467
+ <h2>\${selected.title}</h2>
468
+ <p>\${selected.objective}</p>
469
+ <div class="slice-list">
470
+ \${selected.slices.map((slice) => \`
471
+ <div class="slice-row">
472
+ <span>\${slice.id}</span>
473
+ <strong>\${slice.status}</strong>
474
+ </div>
475
+ \`).join('')}
476
+ </div>
477
+ </section>
478
+ </div>
479
+ \`;
480
+ }
481
+
482
+ function renderState(state) {
483
+ if (state === 'loading') {
484
+ viewer.innerHTML = '<section class="state"><h2>Loading</h2><p>Reading spec metadata...</p></section>';
485
+ return;
486
+ }
487
+
488
+ if (state === 'empty') {
489
+ viewer.innerHTML = '<section class="state"><h2>No specs yet</h2><p>Create a spec with Quiver and it will appear here.</p></section>';
490
+ return;
491
+ }
492
+
493
+ if (state === 'error') {
494
+ viewer.innerHTML = '<section class="state"><h2>Could not load specs</h2><p>Check the generated spec files and validation output.</p></section>';
495
+ return;
496
+ }
497
+
498
+ renderContent();
499
+ }
500
+
501
+ document.querySelectorAll('button[data-state]').forEach((button) => {
502
+ button.addEventListener('click', () => renderState(button.dataset.state));
503
+ });
504
+
505
+ renderContent();
506
+ `,
507
+ },
508
+ {
509
+ path: 'scripts/validate-demo.js',
510
+ content: `const fs = require('node:fs');
511
+ const path = require('node:path');
512
+
513
+ const required = [
514
+ '.quiver/config.json',
515
+ '.quiver/state.json',
516
+ '.quiver/.gitignore',
517
+ 'AGENTS.md',
518
+ 'README.md',
519
+ 'docs/AI_CONTEXT.md',
520
+ 'docs/AI_ONBOARDING_PROMPT.md',
521
+ 'docs/COMMANDS.md',
522
+ 'docs/WORKFLOW.md',
523
+ 'package.json',
524
+ 'server.js',
525
+ 'src/index.html',
526
+ 'src/styles.css',
527
+ 'src/app.js',
528
+ 'specs/quiver-spec-viewer/SPEC.md',
529
+ 'specs/quiver-spec-viewer/slices/slice-00-docs-foundation/slice.json',
530
+ 'specs/quiver-spec-viewer/slices/slice-01-static-spec-viewer/slice.json',
531
+ ];
532
+
533
+ const missing = required.filter((relativePath) => !fs.existsSync(path.join(__dirname, '..', relativePath)));
534
+
535
+ if (missing.length > 0) {
536
+ console.error(\`Missing demo files: \${missing.join(', ')}\`);
537
+ process.exit(1);
538
+ }
539
+
540
+ const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
541
+ for (const scriptName of ['start', 'validate', 'quiver:doctor', 'quiver:plan', 'quiver:graph', 'quiver:next', 'quiver:evidence']) {
542
+ if (typeof packageJson.scripts?.[scriptName] !== 'string') {
543
+ console.error(\`Missing package script: \${scriptName}\`);
544
+ process.exit(1);
545
+ }
546
+ }
547
+
548
+ console.log('Quiver Spec Viewer demo validated');
549
+ `,
550
+ },
551
+ {
552
+ path: 'specs/quiver-spec-viewer/SPEC.md',
553
+ content: `# Quiver Spec Viewer Spec
554
+
555
+ ## Objective
556
+
557
+ Build a small static viewer that demonstrates how Quiver specs and slices can be represented in a simple UI.
558
+
559
+ ## Scope
560
+
561
+ - Static HTML/CSS/JS app.
562
+ - Mock spec and slice data.
563
+ - Basic loading, empty, error, and content states.
564
+ - Demo documentation and validation script.
565
+
566
+ ## Non-Scope
567
+
568
+ - Real browser filesystem parsing.
569
+ - Backend API.
570
+ - Heavy frontend framework.
571
+
572
+ ## Slices
573
+
574
+ | Slice | Title | Status |
575
+ |---|---|---|
576
+ | slice-00-docs-foundation | Docs foundation | completed |
577
+ | slice-01-static-spec-viewer | Static spec viewer | planned |
578
+ `,
579
+ },
580
+ {
581
+ path: 'specs/quiver-spec-viewer/STATUS.md',
582
+ content: `# Quiver Spec Viewer Status
583
+
584
+ | Slice | Status |
585
+ |---|---|
586
+ | slice-00-docs-foundation | completed |
587
+ | slice-01-static-spec-viewer | planned |
588
+ `,
589
+ },
590
+ {
591
+ path: 'specs/quiver-spec-viewer/EVIDENCE_REPORT.md',
592
+ content: `# Evidence Report
593
+
594
+ | Check | Result | Notes |
595
+ |---|---|---|
596
+ | npm run validate | pending | Run after generating the demo. |
597
+ `,
598
+ },
599
+ {
600
+ path: 'specs/quiver-spec-viewer/pr.md',
601
+ content: `## Title
602
+
603
+ Quiver Spec Viewer demo
604
+
605
+ ## Summary
606
+
607
+ - Adds a static Quiver spec/slice viewer demo.
608
+ - Includes mock states and validation script.
609
+ `,
610
+ },
611
+ {
612
+ path: 'specs/quiver-spec-viewer/slices/slice-00-docs-foundation/slice.json',
613
+ content: createJson({
614
+ slice_id: 'slice-00-docs-foundation',
615
+ ticket: 'DEMO-00',
616
+ type: 'docs',
617
+ title: 'Docs foundation',
618
+ objective: 'Publish demo spec, slices, handoffs, and PR body.',
619
+ files: [
620
+ 'specs/quiver-spec-viewer/SPEC.md',
621
+ 'specs/quiver-spec-viewer/STATUS.md',
622
+ 'specs/quiver-spec-viewer/EVIDENCE_REPORT.md',
623
+ 'specs/quiver-spec-viewer/pr.md',
624
+ ],
625
+ depends_on: [],
626
+ parallel_safe: 'yes',
627
+ parallel_safe_reason: 'Documentation-only foundation slice.',
628
+ acceptance: ['Demo documentation artifacts exist.'],
629
+ tests: ['npm run validate'],
630
+ status: 'completed',
631
+ }),
632
+ },
633
+ {
634
+ path: 'specs/quiver-spec-viewer/slices/slice-00-docs-foundation/EXECUTION_BRIEF.md',
635
+ content: `# EXECUTION_BRIEF - slice-00-docs-foundation
636
+
637
+ ## Context
638
+
639
+ This slice publishes the demo planning artifacts.
640
+
641
+ ## Objective
642
+
643
+ Keep the Quiver Spec Viewer spec, status, evidence, and PR body available in the repo.
644
+
645
+ ## Acceptance Criteria
646
+
647
+ - Demo documentation artifacts exist.
648
+
649
+ ## Completion Checklist
650
+
651
+ - [ ] Verify spec docs exist.
652
+ - [ ] Run \`npm run validate\`.
653
+ `,
654
+ },
655
+ {
656
+ path: 'specs/quiver-spec-viewer/slices/slice-00-docs-foundation/CLOSURE_BRIEF.md',
657
+ content: `# CLOSURE_BRIEF - slice-00-docs-foundation
658
+
659
+ ## Summary
660
+
661
+ Pending execution notes.
662
+
663
+ ## Validation
664
+
665
+ - [ ] npm run validate
666
+ `,
667
+ },
668
+ {
669
+ path: 'specs/quiver-spec-viewer/slices/slice-01-static-spec-viewer/slice.json',
670
+ content: createJson({
671
+ slice_id: 'slice-01-static-spec-viewer',
672
+ ticket: 'DEMO-01',
673
+ type: 'feature',
674
+ title: 'Static spec viewer',
675
+ objective: 'Render mocked Quiver spec and slice data in a small static app.',
676
+ files: [
677
+ 'src/index.html',
678
+ 'src/styles.css',
679
+ 'src/app.js',
680
+ 'server.js',
681
+ 'scripts/validate-demo.js',
682
+ ],
683
+ depends_on: ['slice-00-docs-foundation'],
684
+ parallel_safe: 'yes',
685
+ parallel_safe_reason: 'Owns only demo app files after docs foundation exists.',
686
+ acceptance: [
687
+ 'Viewer shows title, spec list, and detail.',
688
+ 'Viewer supports loading, empty, error, and content states.',
689
+ 'Demo validates with npm run validate.',
690
+ ],
691
+ tests: ['npm run validate'],
692
+ status: 'planned',
693
+ }),
694
+ },
695
+ {
696
+ path: 'specs/quiver-spec-viewer/slices/slice-01-static-spec-viewer/EXECUTION_BRIEF.md',
697
+ content: `# EXECUTION_BRIEF - slice-01-static-spec-viewer
698
+
699
+ ## Context
700
+
701
+ The demo is intentionally static and dependency-free.
702
+
703
+ ## Objective
704
+
705
+ Implement a small viewer for mocked Quiver specs and slices.
706
+
707
+ ## Acceptance Criteria
708
+
709
+ - Viewer shows title, spec list, and detail.
710
+ - Viewer supports loading, empty, error, and content states.
711
+ - Demo validates with npm run validate.
712
+
713
+ ## Completion Checklist
714
+
715
+ - [ ] Keep the UI simple and readable.
716
+ - [ ] Do not add heavy dependencies.
717
+ - [ ] Run \`npm run validate\`.
718
+ `,
719
+ },
720
+ {
721
+ path: 'specs/quiver-spec-viewer/slices/slice-01-static-spec-viewer/CLOSURE_BRIEF.md',
722
+ content: `# CLOSURE_BRIEF - slice-01-static-spec-viewer
723
+
724
+ ## Summary
725
+
726
+ Pending execution notes.
727
+
728
+ ## Validation
729
+
730
+ - [ ] npm run validate
731
+ `,
732
+ },
733
+ ];
734
+ }
735
+
736
+ function buildDemoPlan(targetRoot, options = {}) {
737
+ if (options.demo !== SPEC_VIEWER_DEMO) {
738
+ throw new Error(`create-quiver: unsupported demo: ${options.demo || '(missing)'}. Supported demos: ${SPEC_VIEWER_DEMO}`);
739
+ }
740
+
741
+ if (fs.existsSync(targetRoot) && !fs.statSync(targetRoot).isDirectory()) {
742
+ throw new Error(`create-quiver: demo target is not a directory: ${targetRoot}`);
743
+ }
744
+
745
+ const files = createSpecViewerFiles();
746
+ const operations = files.map((file) => {
747
+ const absolutePath = path.join(targetRoot, file.path);
748
+ return {
749
+ action: fs.existsSync(absolutePath) ? 'preserve' : 'create',
750
+ path: file.path,
751
+ absolutePath,
752
+ content: file.content,
753
+ };
754
+ });
755
+
756
+ const createCount = operations.filter((operation) => operation.action === 'create').length;
757
+ const preserveCount = operations.length - createCount;
758
+
759
+ return {
760
+ demo: SPEC_VIEWER_DEMO,
761
+ projectName: SPEC_VIEWER_PROJECT_NAME,
762
+ targetRoot,
763
+ operations,
764
+ summary: {
765
+ create: createCount,
766
+ preserve: preserveCount,
767
+ total: operations.length,
768
+ },
769
+ };
770
+ }
771
+
772
+ function formatDemoPlan(plan, options = {}) {
773
+ const lines = [];
774
+ const title = options.dryRun ? 'Quiver demo dry-run' : 'Quiver demo created';
775
+
776
+ lines.push(title);
777
+ lines.push(`- Demo: ${plan.demo}`);
778
+ lines.push(`- Project: ${plan.projectName}`);
779
+ lines.push(`- Target: ${plan.targetRoot}`);
780
+ lines.push(`- Files to create: ${plan.summary.create}`);
781
+ lines.push(`- Files to preserve: ${plan.summary.preserve}`);
782
+ lines.push('');
783
+ lines.push('Files to create');
784
+ for (const operation of plan.operations.filter((item) => item.action === 'create')) {
785
+ lines.push(`- ${operation.path}`);
786
+ }
787
+ if (plan.summary.create === 0) {
788
+ lines.push('- none');
789
+ }
790
+ lines.push('');
791
+ lines.push('Files to preserve');
792
+ for (const operation of plan.operations.filter((item) => item.action === 'preserve')) {
793
+ lines.push(`- ${operation.path}`);
794
+ }
795
+ if (plan.summary.preserve === 0) {
796
+ lines.push('- none');
797
+ }
798
+
799
+ if (options.dryRun) {
800
+ lines.push('');
801
+ lines.push('No files were written.');
802
+ } else {
803
+ lines.push('');
804
+ lines.push('Next commands');
805
+ lines.push(`- cd ${plan.targetRoot}`);
806
+ lines.push('- npm run validate');
807
+ lines.push('- npm start');
808
+ }
809
+
810
+ lines.push('');
811
+ return lines.join('\n');
812
+ }
813
+
814
+ function writeDemoPlan(plan) {
815
+ fs.mkdirSync(plan.targetRoot, { recursive: true });
816
+
817
+ for (const operation of plan.operations) {
818
+ if (operation.action !== 'create') {
819
+ continue;
820
+ }
821
+
822
+ fs.mkdirSync(path.dirname(operation.absolutePath), { recursive: true });
823
+ fs.writeFileSync(operation.absolutePath, operation.content);
824
+ }
825
+ }
826
+
827
+ module.exports = {
828
+ SPEC_VIEWER_DEMO,
829
+ buildDemoPlan,
830
+ formatDemoPlan,
831
+ writeDemoPlan,
832
+ };