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,534 @@
1
+ const fs = require('node:fs');
2
+ const path = require('node:path');
3
+
4
+ const { listAgentProfiles } = require('../agent-profiles');
5
+ const { collectLayoutReport } = require('../doctor');
6
+ const { buildGraph, computeLevels, detectFileConflicts, readAllSlices, SliceGraphError } = require('../slice-graph');
7
+ const { listAiRuns, nextCommandForPhase } = require('./run-state');
8
+
9
+ const EXPORT_SCHEMA_VERSION = 1;
10
+
11
+ function toPosix(relativePath) {
12
+ return String(relativePath || '').split(path.sep).join('/');
13
+ }
14
+
15
+ function relativePath(projectRoot, filePath) {
16
+ return toPosix(path.relative(projectRoot, filePath));
17
+ }
18
+
19
+ function readJsonIfExists(filePath) {
20
+ if (!fs.existsSync(filePath)) {
21
+ return null;
22
+ }
23
+
24
+ return JSON.parse(fs.readFileSync(filePath, 'utf8'));
25
+ }
26
+
27
+ function readPackageSummary(projectRoot) {
28
+ const packageJson = readJsonIfExists(path.join(projectRoot, 'package.json'));
29
+
30
+ return {
31
+ name: packageJson?.name || path.basename(projectRoot) || 'project',
32
+ package_manager: fs.existsSync(path.join(projectRoot, 'pnpm-lock.yaml'))
33
+ ? 'pnpm'
34
+ : fs.existsSync(path.join(projectRoot, 'yarn.lock'))
35
+ ? 'yarn'
36
+ : 'npm',
37
+ };
38
+ }
39
+
40
+ function isCompletedStatus(status) {
41
+ return ['closed', 'completed', 'done'].includes(String(status || '').toLowerCase());
42
+ }
43
+
44
+ function isBlockedStatus(slice) {
45
+ return String(slice?.status || '').toLowerCase() === 'blocked' || Boolean(slice?.json?.blocked_reason);
46
+ }
47
+
48
+ function progressForSlice(slice) {
49
+ const explicit = Number(slice?.json?.progress);
50
+ if (Number.isFinite(explicit)) {
51
+ return Math.max(0, Math.min(100, explicit));
52
+ }
53
+
54
+ const status = String(slice?.status || '').toLowerCase();
55
+ if (isCompletedStatus(status)) {
56
+ return 100;
57
+ }
58
+ if (status === 'in-progress' || status === 'active' || status === 'review') {
59
+ return 50;
60
+ }
61
+ return 0;
62
+ }
63
+
64
+ function summarizeProgress(items) {
65
+ const total = items.length;
66
+ const completed = items.filter((item) => isCompletedStatus(item.status)).length;
67
+ const blocked = items.filter((item) => isBlockedStatus(item)).length;
68
+ const open = Math.max(0, total - completed);
69
+ const percent = total === 0 ? 0 : Math.round((completed / total) * 100);
70
+
71
+ return {
72
+ total,
73
+ completed,
74
+ open,
75
+ blocked,
76
+ percent,
77
+ };
78
+ }
79
+
80
+ function statusForSpec(specSlices) {
81
+ if (specSlices.length === 0) {
82
+ return 'empty';
83
+ }
84
+ if (specSlices.some((slice) => isBlockedStatus(slice))) {
85
+ return 'blocked';
86
+ }
87
+ if (specSlices.every((slice) => isCompletedStatus(slice.status))) {
88
+ return 'done';
89
+ }
90
+ if (specSlices.some((slice) => progressForSlice(slice) > 0)) {
91
+ return 'in-progress';
92
+ }
93
+ return 'planned';
94
+ }
95
+
96
+ function groupSlicesBySpec(slices) {
97
+ const groups = new Map();
98
+
99
+ for (const slice of slices) {
100
+ const key = `${slice.specFamily}/${slice.specSlug}`;
101
+ if (!groups.has(key)) {
102
+ groups.set(key, []);
103
+ }
104
+ groups.get(key).push(slice);
105
+ }
106
+
107
+ return Array.from(groups.entries())
108
+ .map(([key, specSlices]) => {
109
+ const [specFamily, specSlug] = key.split('/');
110
+ return { specFamily, specSlug, slices: specSlices };
111
+ })
112
+ .sort((left, right) => left.specSlug.localeCompare(right.specSlug));
113
+ }
114
+
115
+ function buildGraphSummary(slices) {
116
+ try {
117
+ const graph = buildGraph(slices);
118
+ const levels = computeLevels(graph).map((level, index) => ({
119
+ level: index,
120
+ slices: level.map((slice) => slice.ref),
121
+ }));
122
+
123
+ return {
124
+ ok: true,
125
+ edges: graph.edges.map((edge) => ({ from: edge.from, to: edge.to })),
126
+ levels,
127
+ conflicts: detectFileConflicts(graph.nodes).map((conflict) => ({
128
+ files: conflict.files,
129
+ slices: conflict.slices,
130
+ })),
131
+ error: null,
132
+ nodes: graph.nodes,
133
+ };
134
+ } catch (error) {
135
+ if (error instanceof SliceGraphError) {
136
+ return {
137
+ ok: false,
138
+ edges: [],
139
+ levels: [],
140
+ conflicts: [],
141
+ error: {
142
+ code: error.code,
143
+ message: error.message,
144
+ },
145
+ nodes: slices,
146
+ };
147
+ }
148
+ throw error;
149
+ }
150
+ }
151
+
152
+ function filterGraphSummary(graph, selectedRefs) {
153
+ if (!graph.ok) {
154
+ return graph;
155
+ }
156
+
157
+ const levels = graph.levels
158
+ .map((level) => ({
159
+ original_level: level.level,
160
+ slices: level.slices.filter((ref) => selectedRefs.has(ref)),
161
+ }))
162
+ .filter((level) => level.slices.length > 0)
163
+ .map((level, index) => ({
164
+ level: index,
165
+ original_level: level.original_level,
166
+ slices: level.slices,
167
+ }));
168
+
169
+ return {
170
+ ...graph,
171
+ edges: graph.edges.filter((edge) => selectedRefs.has(edge.to)),
172
+ levels,
173
+ conflicts: graph.conflicts
174
+ .map((conflict) => ({
175
+ files: conflict.files,
176
+ slices: conflict.slices.filter((ref) => selectedRefs.has(ref)),
177
+ }))
178
+ .filter((conflict) => conflict.slices.length > 1),
179
+ };
180
+ }
181
+
182
+ function normalizeSlice(projectRoot, slice, dependencyMap) {
183
+ const dependencies = dependencyMap.get(slice.ref) || slice.depends_on || slice.dependencies || [];
184
+
185
+ return {
186
+ ref: slice.ref,
187
+ id: slice.sliceId,
188
+ title: slice.title,
189
+ status: slice.status,
190
+ progress: progressForSlice(slice),
191
+ spec_slug: slice.specSlug,
192
+ spec_family: slice.specFamily,
193
+ path: relativePath(projectRoot, slice.sliceDir),
194
+ slice_json: toPosix(path.join(slice.specFamily, slice.specSlug, 'slices', path.basename(slice.sliceDir), 'slice.json')),
195
+ dependencies,
196
+ parallel_safe: slice.parallel_safe,
197
+ parallel_safe_reason: slice.parallel_safe_reason,
198
+ allowed_write_paths: slice.allowed_write_paths,
199
+ expected_read_paths: slice.expected_read_paths,
200
+ validation_hints: slice.validation_hints,
201
+ files: slice.files,
202
+ evidence: Array.isArray(slice.json?.evidence) ? slice.json.evidence : [],
203
+ tests: Array.isArray(slice.json?.tests) ? slice.json.tests : [],
204
+ blocked_reason: slice.json?.blocked_reason || null,
205
+ };
206
+ }
207
+
208
+ function normalizeRuns(projectRoot) {
209
+ return listAiRuns(projectRoot).map((run) => ({
210
+ run_id: run.run_id,
211
+ status: run.status,
212
+ phase: run.phase,
213
+ spec_slug: run.spec_slug || null,
214
+ requirement_path: run.requirement?.path || null,
215
+ approvals_path: run.approvals_path || null,
216
+ state_path: toPosix(path.join('.quiver', 'runs', run.run_id, 'state.json')),
217
+ next_command: nextCommandForPhase(run.phase),
218
+ updated_at: run.updated_at || run.created_at || null,
219
+ }));
220
+ }
221
+
222
+ function normalizeAgents(projectRoot) {
223
+ return listAgentProfiles(projectRoot).map((item) => ({
224
+ role: item.role,
225
+ configured: item.configured,
226
+ provider: item.profile?.provider || null,
227
+ model: item.profile?.model || null,
228
+ label: item.profile?.label || null,
229
+ context: item.profile?.context || null,
230
+ updated_at: item.profile?.updated_at || null,
231
+ }));
232
+ }
233
+
234
+ function collectLifecycleExport(projectRoot, options = {}) {
235
+ const allSlices = readAllSlices(projectRoot);
236
+ const slices = options.includeCompleted ? allSlices : allSlices.filter((slice) => !isCompletedStatus(slice.status));
237
+ const fullGraph = buildGraphSummary(allSlices);
238
+ const selectedRefs = new Set(slices.map((slice) => slice.ref));
239
+ const graph = filterGraphSummary(fullGraph, selectedRefs);
240
+ if (graph.ok) {
241
+ graph.conflicts = detectFileConflicts(slices).map((conflict) => ({
242
+ files: conflict.files,
243
+ slices: conflict.slices,
244
+ }));
245
+ }
246
+ const dependencyMap = new Map(fullGraph.nodes.map((node) => [node.ref, node.depends_on || node.dependencies || []]));
247
+ const normalizedSlices = slices.map((slice) => normalizeSlice(projectRoot, slice, dependencyMap));
248
+ const specs = groupSlicesBySpec(slices).map((spec) => {
249
+ const progress = summarizeProgress(spec.slices);
250
+ const specPath = path.join(spec.specFamily, spec.specSlug);
251
+ return {
252
+ slug: spec.specSlug,
253
+ family: spec.specFamily,
254
+ path: specPath,
255
+ spec_path: fs.existsSync(path.join(projectRoot, specPath, 'SPEC.md')) ? toPosix(path.join(specPath, 'SPEC.md')) : null,
256
+ status_path: fs.existsSync(path.join(projectRoot, specPath, 'STATUS.md')) ? toPosix(path.join(specPath, 'STATUS.md')) : null,
257
+ pr_path: fs.existsSync(path.join(projectRoot, specPath, 'pr.md')) ? toPosix(path.join(specPath, 'pr.md')) : null,
258
+ status: statusForSpec(spec.slices),
259
+ progress,
260
+ slices: spec.slices.map((slice) => slice.ref),
261
+ blockers: spec.slices.filter((slice) => isBlockedStatus(slice)).map((slice) => ({
262
+ ref: slice.ref,
263
+ reason: slice.json?.blocked_reason || 'blocked',
264
+ })),
265
+ };
266
+ });
267
+ const layout = collectLayoutReport(projectRoot);
268
+ const runs = normalizeRuns(projectRoot);
269
+ const agents = normalizeAgents(projectRoot);
270
+ const progress = summarizeProgress(slices);
271
+ const blockers = normalizedSlices
272
+ .filter((slice) => slice.blocked_reason || String(slice.status).toLowerCase() === 'blocked')
273
+ .map((slice) => ({ ref: slice.ref, reason: slice.blocked_reason || 'blocked' }));
274
+
275
+ if (!graph.ok) {
276
+ blockers.push({ ref: 'slice-graph', reason: graph.error.message });
277
+ }
278
+ if (layout.layout === 'legacy' || layout.layout === 'hybrid' || layout.layout === 'incomplete') {
279
+ blockers.push({ ref: 'migration', reason: layout.recommendations.join(' ') });
280
+ }
281
+
282
+ return {
283
+ schema_version: EXPORT_SCHEMA_VERSION,
284
+ generated_at: new Date().toISOString(),
285
+ project: readPackageSummary(projectRoot),
286
+ summary: {
287
+ specs: specs.length,
288
+ slices: progress.total,
289
+ completed_slices: progress.completed,
290
+ open_slices: progress.open,
291
+ blocked_slices: progress.blocked,
292
+ progress_percent: progress.percent,
293
+ runs: runs.length,
294
+ configured_agents: agents.filter((agent) => agent.configured).length,
295
+ },
296
+ agents,
297
+ runs,
298
+ specs,
299
+ slices: normalizedSlices,
300
+ graph: {
301
+ ok: graph.ok,
302
+ edges: graph.edges,
303
+ levels: graph.levels,
304
+ conflicts: graph.conflicts,
305
+ error: graph.error,
306
+ },
307
+ migration: {
308
+ layout: layout.layout,
309
+ has_new_layout: layout.hasNewLayout,
310
+ has_legacy_layout: layout.hasLegacyLayout,
311
+ legacy_signals: layout.legacySignals,
312
+ missing_new_layout_files: layout.missingNewLayoutFiles,
313
+ recommendations: layout.recommendations,
314
+ dry_run_command: 'npx create-quiver migrate --dry-run',
315
+ },
316
+ dashboard: {
317
+ progress,
318
+ blockers,
319
+ agents: agents.map((agent) => ({
320
+ id: agent.role,
321
+ role: agent.role,
322
+ configured: agent.configured,
323
+ provider: agent.provider,
324
+ })),
325
+ specs: specs.map((spec) => ({
326
+ id: spec.slug,
327
+ status: spec.status,
328
+ progress: spec.progress.percent,
329
+ slice_count: spec.progress.total,
330
+ blockers: spec.blockers,
331
+ })),
332
+ slices: normalizedSlices.map((slice) => ({
333
+ id: slice.ref,
334
+ status: slice.status,
335
+ progress: slice.progress,
336
+ dependencies: slice.dependencies,
337
+ blocker: slice.blocked_reason,
338
+ })),
339
+ dependencies: graph.edges,
340
+ },
341
+ };
342
+ }
343
+
344
+ function formatLifecycleInspect(data) {
345
+ const lines = [
346
+ 'Quiver lifecycle inspect',
347
+ `Project: ${data.project.name}`,
348
+ `Specs: ${data.summary.specs}`,
349
+ `Slices: ${data.summary.slices} total, ${data.summary.open_slices} open, ${data.summary.blocked_slices} blocked, ${data.summary.progress_percent}% done`,
350
+ `Runs: ${data.summary.runs}`,
351
+ `Agents configured: ${data.summary.configured_agents}/${data.agents.length}`,
352
+ `Layout: ${data.migration.layout}`,
353
+ '',
354
+ 'Next safe commands',
355
+ ];
356
+
357
+ const activeRun = [...data.runs].reverse().find((run) => run.status !== 'closed');
358
+ lines.push(`- ${activeRun ? activeRun.next_command : 'npx create-quiver ai run create --input <requirements.md>'}`);
359
+
360
+ if (data.summary.slices > 0) {
361
+ lines.push('- npx create-quiver ai slices list');
362
+ lines.push('- npx create-quiver ai export --format json');
363
+ } else {
364
+ lines.push('- npx create-quiver ai plan --phase acceptance --input <requirements.md> --dry-run');
365
+ }
366
+
367
+ if (data.migration.layout === 'legacy' || data.migration.layout === 'hybrid' || data.migration.layout === 'incomplete') {
368
+ lines.push('- npx create-quiver migrate --dry-run');
369
+ }
370
+
371
+ if (data.dashboard.blockers.length > 0) {
372
+ lines.push('', 'Blockers');
373
+ for (const blocker of data.dashboard.blockers) {
374
+ lines.push(`- ${blocker.ref}: ${blocker.reason}`);
375
+ }
376
+ }
377
+
378
+ lines.push('');
379
+ return `${lines.join('\n')}\n`;
380
+ }
381
+
382
+ function formatSpecsList(data) {
383
+ const lines = ['Quiver specs list'];
384
+
385
+ if (data.specs.length === 0) {
386
+ lines.push('- No specs found. Next: npx create-quiver spec create --dry-run');
387
+ lines.push('');
388
+ return `${lines.join('\n')}\n`;
389
+ }
390
+
391
+ for (const spec of data.specs) {
392
+ lines.push(`- ${spec.slug}: ${spec.status}, ${spec.progress.percent}% done, ${spec.progress.total} slices (${spec.path})`);
393
+ }
394
+
395
+ lines.push('');
396
+ return `${lines.join('\n')}\n`;
397
+ }
398
+
399
+ function formatSlicesList(data) {
400
+ const lines = ['Quiver slices list'];
401
+
402
+ if (data.slices.length === 0) {
403
+ lines.push('- No slices found. Next: npx create-quiver spec create --dry-run');
404
+ lines.push('');
405
+ return `${lines.join('\n')}\n`;
406
+ }
407
+
408
+ for (const slice of data.slices) {
409
+ const deps = slice.dependencies.length > 0 ? ` deps=${slice.dependencies.join(',')}` : '';
410
+ const blocked = slice.blocked_reason ? ` blocked=${slice.blocked_reason}` : '';
411
+ lines.push(`- ${slice.ref}: ${slice.status}, ${slice.progress}% done${deps}${blocked}`);
412
+ }
413
+
414
+ lines.push('');
415
+ return `${lines.join('\n')}\n`;
416
+ }
417
+
418
+ function formatTraceReport(data) {
419
+ const lines = [
420
+ 'Quiver trace report',
421
+ `Project: ${data.project.name}`,
422
+ `Schema: ${data.schema_version}`,
423
+ '',
424
+ 'Runs',
425
+ ];
426
+
427
+ if (data.runs.length === 0) {
428
+ lines.push('- none');
429
+ } else {
430
+ for (const run of data.runs) {
431
+ lines.push(`- ${run.run_id}: ${run.phase} (${run.status}) -> ${run.next_command}`);
432
+ }
433
+ }
434
+
435
+ lines.push('', 'Execution waves');
436
+ if (!data.graph.ok) {
437
+ lines.push(`- graph error: ${data.graph.error.message}`);
438
+ } else if (data.graph.levels.length === 0) {
439
+ lines.push('- none');
440
+ } else {
441
+ for (const level of data.graph.levels) {
442
+ lines.push(`- wave ${level.level}: ${level.slices.join(', ')}`);
443
+ }
444
+ }
445
+
446
+ lines.push('', 'Migration');
447
+ lines.push(`- layout: ${data.migration.layout}`);
448
+ for (const recommendation of data.migration.recommendations) {
449
+ lines.push(`- ${recommendation}`);
450
+ }
451
+
452
+ lines.push('');
453
+ return `${lines.join('\n')}\n`;
454
+ }
455
+
456
+ function formatLifecycleExportMarkdown(data) {
457
+ const lines = [
458
+ '# Quiver Lifecycle Export',
459
+ '',
460
+ `- Project: ${data.project.name}`,
461
+ `- Generated: ${data.generated_at}`,
462
+ `- Schema version: ${data.schema_version}`,
463
+ `- Specs: ${data.summary.specs}`,
464
+ `- Slices: ${data.summary.slices} total, ${data.summary.completed_slices} completed, ${data.summary.open_slices} open`,
465
+ `- Progress: ${data.summary.progress_percent}%`,
466
+ `- Layout: ${data.migration.layout}`,
467
+ '',
468
+ '## Specs',
469
+ '',
470
+ ];
471
+
472
+ if (data.specs.length === 0) {
473
+ lines.push('No specs found.');
474
+ } else {
475
+ lines.push('| Spec | Status | Progress | Slices | Path |');
476
+ lines.push('|---|---|---:|---:|---|');
477
+ for (const spec of data.specs) {
478
+ lines.push(`| ${spec.slug} | ${spec.status} | ${spec.progress.percent}% | ${spec.progress.total} | ${spec.path} |`);
479
+ }
480
+ }
481
+
482
+ lines.push('', '## Slices', '');
483
+ if (data.slices.length === 0) {
484
+ lines.push('No slices found.');
485
+ } else {
486
+ lines.push('| Slice | Status | Progress | Dependencies | Write Scope |');
487
+ lines.push('|---|---|---:|---|---|');
488
+ for (const slice of data.slices) {
489
+ lines.push(`| ${slice.ref} | ${slice.status} | ${slice.progress}% | ${slice.dependencies.join(', ') || '-'} | ${slice.allowed_write_paths.join(', ') || slice.files.join(', ') || '-'} |`);
490
+ }
491
+ }
492
+
493
+ lines.push('', '## Agents', '');
494
+ if (data.agents.length === 0) {
495
+ lines.push('No agent roles available.');
496
+ } else {
497
+ lines.push('| Role | Configured | Provider | Model |');
498
+ lines.push('|---|---|---|---|');
499
+ for (const agent of data.agents) {
500
+ lines.push(`| ${agent.role} | ${agent.configured ? 'yes' : 'no'} | ${agent.provider || '-'} | ${agent.model || '-'} |`);
501
+ }
502
+ }
503
+
504
+ lines.push('', '## Runs', '');
505
+ if (data.runs.length === 0) {
506
+ lines.push('No AI runs found.');
507
+ } else {
508
+ lines.push('| Run | Phase | Status | Next Command |');
509
+ lines.push('|---|---|---|---|');
510
+ for (const run of data.runs) {
511
+ lines.push(`| ${run.run_id} | ${run.phase} | ${run.status} | \`${run.next_command}\` |`);
512
+ }
513
+ }
514
+
515
+ lines.push('', '## Migration', '');
516
+ lines.push(`- Layout: ${data.migration.layout}`);
517
+ for (const recommendation of data.migration.recommendations) {
518
+ lines.push(`- ${recommendation}`);
519
+ }
520
+ lines.push(`- Dry-run: \`${data.migration.dry_run_command}\``);
521
+ lines.push('');
522
+
523
+ return `${lines.join('\n')}\n`;
524
+ }
525
+
526
+ module.exports = {
527
+ EXPORT_SCHEMA_VERSION,
528
+ collectLifecycleExport,
529
+ formatLifecycleExportMarkdown,
530
+ formatLifecycleInspect,
531
+ formatSlicesList,
532
+ formatSpecsList,
533
+ formatTraceReport,
534
+ };