create-quiver 0.9.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BACKLOG.md +16 -17
- package/CHANGELOG.md +34 -0
- package/README.md +419 -330
- package/README_FOR_AI.md +93 -56
- package/ROADMAP.md +22 -11
- package/docs/AI_CONTEXT.md.template +2 -0
- package/docs/AI_ONBOARDING_PROMPT.md.template +36 -19
- package/docs/COMMANDS.md.template +73 -1
- package/docs/CONTEXTO.md.template +2 -0
- package/docs/DECISIONS.md.template +1 -0
- package/docs/GITFLOW_PR_GUIDE.md.template +11 -0
- package/docs/INDEX.md.template +20 -18
- package/docs/STANDARD.md.template +1 -1
- package/docs/STATUS.md.template +1 -0
- package/docs/SUPPORT_MATRIX.md.template +6 -2
- package/docs/TROUBLESHOOTING.md.template +79 -1
- package/docs/WORKFLOW.md.template +26 -18
- package/package.json +24 -2
- package/package.template.json +24 -7
- package/scripts/check-pr-readiness.sh +1 -1
- package/scripts/check-scope.sh +0 -1
- package/scripts/check-slice-readiness.sh +3 -4
- package/scripts/init-docs.sh +53 -6
- package/scripts/package-quiver.sh +18 -2
- package/specs/quiver-v20-ai-cli-orchestration/EVIDENCE_REPORT.md +23 -0
- package/specs/quiver-v20-ai-cli-orchestration/EXECUTION_PLAN.md +57 -0
- package/specs/quiver-v20-ai-cli-orchestration/SPEC.md +202 -0
- package/specs/quiver-v20-ai-cli-orchestration/STATUS.md +35 -0
- package/specs/quiver-v20-ai-cli-orchestration/pr.md +100 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +30 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +61 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-00-spec-foundation/slice.json +54 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-01-ai-provider-runner/CLOSURE_BRIEF.md +39 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-01-ai-provider-runner/EXECUTION_BRIEF.md +63 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-01-ai-provider-runner/slice.json +55 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-02-context-packs-token-budget/CLOSURE_BRIEF.md +40 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-02-context-packs-token-budget/EXECUTION_BRIEF.md +60 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-02-context-packs-token-budget/slice.json +54 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-03-ai-phase-gated-planner/CLOSURE_BRIEF.md +43 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-03-ai-phase-gated-planner/EXECUTION_BRIEF.md +62 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-03-ai-phase-gated-planner/slice.json +62 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-04-spec-slice-handoff-pr-generation/CLOSURE_BRIEF.md +36 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-04-spec-slice-handoff-pr-generation/EXECUTION_BRIEF.md +63 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-04-spec-slice-handoff-pr-generation/slice.json +59 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-05-execution-plan-parallel-worktrees/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-05-execution-plan-parallel-worktrees/EXECUTION_BRIEF.md +61 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-05-execution-plan-parallel-worktrees/slice.json +59 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-06-ai-execute-slice-scope-enforcement/CLOSURE_BRIEF.md +36 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-06-ai-execute-slice-scope-enforcement/EXECUTION_BRIEF.md +64 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-06-ai-execute-slice-scope-enforcement/slice.json +65 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-07-github-pr-preflight/CLOSURE_BRIEF.md +36 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-07-github-pr-preflight/EXECUTION_BRIEF.md +66 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-07-github-pr-preflight/slice.json +63 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-08-docs-smokes-release-readiness/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-08-docs-smokes-release-readiness/EXECUTION_BRIEF.md +64 -0
- package/specs/quiver-v20-ai-cli-orchestration/slices/slice-08-docs-smokes-release-readiness/slice.json +77 -0
- package/specs/quiver-v21-ai-first-layout/EVIDENCE_REPORT.md +31 -0
- package/specs/quiver-v21-ai-first-layout/EXECUTION_PLAN.md +185 -0
- package/specs/quiver-v21-ai-first-layout/SPEC.md +212 -0
- package/specs/quiver-v21-ai-first-layout/STATUS.md +37 -0
- package/specs/quiver-v21-ai-first-layout/pr.md +110 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +30 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +63 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-00-spec-foundation/slice.json +45 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-01-init-profiles-dry-run/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-01-init-profiles-dry-run/EXECUTION_BRIEF.md +59 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-01-init-profiles-dry-run/slice.json +57 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-02-internal-layout-template-resolver/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-02-internal-layout-template-resolver/EXECUTION_BRIEF.md +60 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-02-internal-layout-template-resolver/slice.json +58 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-03-generation-profiles-visible-contract/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-03-generation-profiles-visible-contract/EXECUTION_BRIEF.md +61 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-03-generation-profiles-visible-contract/slice.json +64 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-04-analyze-scan-relocation/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-04-analyze-scan-relocation/EXECUTION_BRIEF.md +58 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-04-analyze-scan-relocation/slice.json +64 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-05-empty-specs-layout-doctor/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-05-empty-specs-layout-doctor/EXECUTION_BRIEF.md +60 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-05-empty-specs-layout-doctor/slice.json +65 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-06-legacy-migration-optional-assets/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-06-legacy-migration-optional-assets/EXECUTION_BRIEF.md +62 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-06-legacy-migration-optional-assets/slice.json +66 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-07-docs-guidance-alignment/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-07-docs-guidance-alignment/EXECUTION_BRIEF.md +61 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-07-docs-guidance-alignment/slice.json +67 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-08-smokes-release-readiness/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-08-smokes-release-readiness/EXECUTION_BRIEF.md +66 -0
- package/specs/quiver-v21-ai-first-layout/slices/slice-08-smokes-release-readiness/slice.json +62 -0
- package/specs/quiver-v22-guided-ai-workflow/EVIDENCE_REPORT.md +58 -0
- package/specs/quiver-v22-guided-ai-workflow/EXECUTION_PLAN.md +88 -0
- package/specs/quiver-v22-guided-ai-workflow/SPEC.md +228 -0
- package/specs/quiver-v22-guided-ai-workflow/STATUS.md +42 -0
- package/specs/quiver-v22-guided-ai-workflow/pr.md +104 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +35 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +61 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-00-spec-foundation/slice.json +51 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-01-docs-source-of-truth-sync/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-01-docs-source-of-truth-sync/EXECUTION_BRIEF.md +58 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-01-docs-source-of-truth-sync/slice.json +55 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-02-prepare-command-diagnostics/CLOSURE_BRIEF.md +30 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-02-prepare-command-diagnostics/EXECUTION_BRIEF.md +57 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-02-prepare-command-diagnostics/slice.json +57 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-03-context-doc-refresh/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-03-context-doc-refresh/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-03-context-doc-refresh/slice.json +56 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-04-planner-approval-state/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-04-planner-approval-state/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-04-planner-approval-state/slice.json +58 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-05-spec-worktree-lifecycle/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-05-spec-worktree-lifecycle/EXECUTION_BRIEF.md +56 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-05-spec-worktree-lifecycle/slice.json +54 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-06-executor-commit-recovery/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-06-executor-commit-recovery/EXECUTION_BRIEF.md +58 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-06-executor-commit-recovery/slice.json +57 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-07-execution-waves-delegation/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-07-execution-waves-delegation/EXECUTION_BRIEF.md +58 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-07-execution-waves-delegation/slice.json +55 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-08-pr-create-gh-ssh/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-08-pr-create-gh-ssh/EXECUTION_BRIEF.md +58 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-08-pr-create-gh-ssh/slice.json +53 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-09-post-merge-cleanup-release-safety/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-09-post-merge-cleanup-release-safety/EXECUTION_BRIEF.md +59 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-09-post-merge-cleanup-release-safety/slice.json +59 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-10-docs-smokes-release-readiness/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-10-docs-smokes-release-readiness/EXECUTION_BRIEF.md +58 -0
- package/specs/quiver-v22-guided-ai-workflow/slices/slice-10-docs-smokes-release-readiness/slice.json +60 -0
- package/specs/quiver-v23-guided-flow-productization/EVIDENCE_REPORT.md +80 -0
- package/specs/quiver-v23-guided-flow-productization/EXECUTION_PLAN.md +80 -0
- package/specs/quiver-v23-guided-flow-productization/SPEC.md +203 -0
- package/specs/quiver-v23-guided-flow-productization/STATUS.md +39 -0
- package/specs/quiver-v23-guided-flow-productization/pr.md +119 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +30 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +61 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-00-spec-foundation/slice.json +51 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-01-short-command-and-flow-entrypoint/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-01-short-command-and-flow-entrypoint/EXECUTION_BRIEF.md +35 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-01-short-command-and-flow-entrypoint/slice.json +56 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-02-flow-status-wizard/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-02-flow-status-wizard/EXECUTION_BRIEF.md +29 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-02-flow-status-wizard/slice.json +55 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-03-agent-profiles/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-03-agent-profiles/EXECUTION_BRIEF.md +29 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-03-agent-profiles/slice.json +54 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-04-context-preparation-onboarding/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-04-context-preparation-onboarding/EXECUTION_BRIEF.md +30 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-04-context-preparation-onboarding/slice.json +59 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-05-planner-iteration-history/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-05-planner-iteration-history/EXECUTION_BRIEF.md +29 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-05-planner-iteration-history/slice.json +53 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-06-production-plan-review/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-06-production-plan-review/EXECUTION_BRIEF.md +30 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-06-production-plan-review/slice.json +54 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-07-spec-create-experience/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-07-spec-create-experience/EXECUTION_BRIEF.md +30 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-07-spec-create-experience/slice.json +55 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-08-executor-prompt-generation/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-08-executor-prompt-generation/EXECUTION_BRIEF.md +30 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-08-executor-prompt-generation/slice.json +55 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-09-delegated-slice-execution/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-09-delegated-slice-execution/EXECUTION_BRIEF.md +34 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-09-delegated-slice-execution/slice.json +57 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-10-docs-smokes-release-readiness/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-10-docs-smokes-release-readiness/EXECUTION_BRIEF.md +32 -0
- package/specs/quiver-v23-guided-flow-productization/slices/slice-10-docs-smokes-release-readiness/slice.json +63 -0
- package/specs/quiver-v24-dx-onboarding-hardening/EVIDENCE_REPORT.md +55 -0
- package/specs/quiver-v24-dx-onboarding-hardening/EXECUTION_PLAN.md +43 -0
- package/specs/quiver-v24-dx-onboarding-hardening/SPEC.md +149 -0
- package/specs/quiver-v24-dx-onboarding-hardening/STATUS.md +31 -0
- package/specs/quiver-v24-dx-onboarding-hardening/pr.md +76 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +31 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +52 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-00-spec-foundation/slice.json +51 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-01-init-template-hygiene/CLOSURE_BRIEF.md +38 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-01-init-template-hygiene/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-01-init-template-hygiene/slice.json +55 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-02-cli-command-routing-version-errors/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-02-cli-command-routing-version-errors/EXECUTION_BRIEF.md +50 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-02-cli-command-routing-version-errors/slice.json +52 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-03-doctor-fix-doc-link-checks/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-03-doctor-fix-doc-link-checks/EXECUTION_BRIEF.md +50 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-03-doctor-fix-doc-link-checks/slice.json +53 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-04-prepare-output-ai-context-drafts/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-04-prepare-output-ai-context-drafts/EXECUTION_BRIEF.md +50 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-04-prepare-output-ai-context-drafts/slice.json +70 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-05-local-slice-validation-base-guidance/CLOSURE_BRIEF.md +36 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-05-local-slice-validation-base-guidance/EXECUTION_BRIEF.md +49 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-05-local-slice-validation-base-guidance/slice.json +52 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-06-plan-graph-next-history-views/CLOSURE_BRIEF.md +43 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-06-plan-graph-next-history-views/EXECUTION_BRIEF.md +53 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-06-plan-graph-next-history-views/slice.json +60 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-07-analyzer-command-map-hardening/CLOSURE_BRIEF.md +32 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-07-analyzer-command-map-hardening/EXECUTION_BRIEF.md +50 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-07-analyzer-command-map-hardening/slice.json +51 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-08-evidence-run-command/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-08-evidence-run-command/EXECUTION_BRIEF.md +52 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-08-evidence-run-command/slice.json +54 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-09-spec-viewer-demo-scaffolding/CLOSURE_BRIEF.md +34 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-09-spec-viewer-demo-scaffolding/EXECUTION_BRIEF.md +51 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-09-spec-viewer-demo-scaffolding/slice.json +59 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-10-docs-smokes-release-readiness/CLOSURE_BRIEF.md +33 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-10-docs-smokes-release-readiness/EXECUTION_BRIEF.md +54 -0
- package/specs/quiver-v24-dx-onboarding-hardening/slices/slice-10-docs-smokes-release-readiness/slice.json +76 -0
- package/src/create-quiver/commands/ai.js +915 -0
- package/src/create-quiver/commands/demo.js +22 -0
- package/src/create-quiver/commands/evidence.js +37 -0
- package/src/create-quiver/commands/flow.js +561 -0
- package/src/create-quiver/commands/graph.js +14 -1
- package/src/create-quiver/commands/next.js +28 -0
- package/src/create-quiver/commands/plan.js +6 -3
- package/src/create-quiver/commands/prepare.js +236 -0
- package/src/create-quiver/commands/spec.js +133 -0
- package/src/create-quiver/index.js +1096 -96
- package/src/create-quiver/lib/agent-profiles.js +148 -0
- package/src/create-quiver/lib/ai/context-packs.js +170 -0
- package/src/create-quiver/lib/ai/execution-plan.js +614 -0
- package/src/create-quiver/lib/ai/executor.js +682 -0
- package/src/create-quiver/lib/ai/github.js +525 -0
- package/src/create-quiver/lib/ai/onboarding-template.js +365 -0
- package/src/create-quiver/lib/ai/phase-gates.js +72 -0
- package/src/create-quiver/lib/ai/plan-review.js +283 -0
- package/src/create-quiver/lib/ai/preflight.js +58 -0
- package/src/create-quiver/lib/ai/prompt-transport.js +81 -0
- package/src/create-quiver/lib/ai/prompts.js +39 -0
- package/src/create-quiver/lib/ai/providers.js +315 -0
- package/src/create-quiver/lib/ai/safety.js +156 -0
- package/src/create-quiver/lib/ai/spec-generator.js +314 -0
- package/src/create-quiver/lib/ai/spec-templates.js +715 -0
- package/src/create-quiver/lib/approvals.js +350 -0
- package/src/create-quiver/lib/demo.js +657 -0
- package/src/create-quiver/lib/doctor.js +348 -0
- package/src/create-quiver/lib/evidence.js +115 -0
- package/src/create-quiver/lib/git.js +21 -0
- package/src/create-quiver/lib/init-docs.js +545 -23
- package/src/create-quiver/lib/init-layout.js +451 -0
- package/src/create-quiver/lib/lifecycle.js +8 -2
- package/src/create-quiver/lib/package-safety.js +117 -0
- package/src/create-quiver/lib/paths.js +63 -2
- package/src/create-quiver/lib/project-scan.js +66 -0
- package/src/create-quiver/lib/readiness.js +87 -18
- package/src/create-quiver/lib/scope.js +125 -0
- package/src/create-quiver/lib/slice-graph.js +7 -0
- package/src/create-quiver/lib/slice.js +59 -16
- package/src/create-quiver/lib/spec-worktrees.js +349 -0
- package/src/create-quiver/lib/state.js +18 -1
- package/src/create-quiver/lib/template-resolver.js +74 -0
|
@@ -12,12 +12,23 @@ function collectNext(repoRoot, options = {}) {
|
|
|
12
12
|
onlyReady: true,
|
|
13
13
|
specSlug: options.specSlug,
|
|
14
14
|
});
|
|
15
|
+
const historyReport = options.includeCompleted
|
|
16
|
+
? collectPlan(repoRoot, {
|
|
17
|
+
includeCompleted: true,
|
|
18
|
+
specSlug: options.specSlug,
|
|
19
|
+
})
|
|
20
|
+
: null;
|
|
15
21
|
|
|
16
22
|
const allReady = report.plan.filter((item) => String(item.status || '').toLowerCase() !== 'blocked');
|
|
17
23
|
const next = allReady.length > 0 ? allReady[0] : null;
|
|
24
|
+
const history = historyReport
|
|
25
|
+
? historyReport.plan.filter((item) => String(item.status || '').toLowerCase() === 'completed')
|
|
26
|
+
: [];
|
|
18
27
|
|
|
19
28
|
return {
|
|
20
29
|
all_ready: allReady,
|
|
30
|
+
history,
|
|
31
|
+
include_completed: options.includeCompleted === true,
|
|
21
32
|
next,
|
|
22
33
|
};
|
|
23
34
|
}
|
|
@@ -27,6 +38,13 @@ function formatHumanNext(report, options = {}) {
|
|
|
27
38
|
|
|
28
39
|
if (!report.next) {
|
|
29
40
|
lines.push('No ready slices found.');
|
|
41
|
+
if (report.include_completed && report.history.length > 0) {
|
|
42
|
+
lines.push('');
|
|
43
|
+
lines.push('Historical slices included by --include-completed:');
|
|
44
|
+
for (const item of report.history) {
|
|
45
|
+
lines.push(`- ${item.ref} (${item.status})`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
30
48
|
return `${lines.join('\n')}\n`;
|
|
31
49
|
}
|
|
32
50
|
|
|
@@ -51,6 +69,14 @@ function formatHumanNext(report, options = {}) {
|
|
|
51
69
|
}
|
|
52
70
|
}
|
|
53
71
|
|
|
72
|
+
if (report.include_completed && report.history.length > 0) {
|
|
73
|
+
lines.push('');
|
|
74
|
+
lines.push('Historical slices included by --include-completed:');
|
|
75
|
+
for (const item of report.history) {
|
|
76
|
+
lines.push(`- ${item.ref} (${item.status})`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
54
80
|
return `${lines.join('\n')}\n`;
|
|
55
81
|
}
|
|
56
82
|
|
|
@@ -110,6 +136,8 @@ async function runNext(repoRoot, options = {}) {
|
|
|
110
136
|
...item,
|
|
111
137
|
start_slice_command: toStartSliceCommand(item.slice_path),
|
|
112
138
|
})),
|
|
139
|
+
history: report.history,
|
|
140
|
+
include_completed: report.include_completed,
|
|
113
141
|
next: report.next
|
|
114
142
|
? {
|
|
115
143
|
...report.next,
|
|
@@ -4,6 +4,7 @@ const { relativePosixPath } = require('../lib/paths');
|
|
|
4
4
|
const { buildGraph, readAllSlices, topoSort } = require('../lib/slice-graph');
|
|
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 toHourCount(value) {
|
|
9
10
|
const parsed = Number(value);
|
|
@@ -118,7 +119,8 @@ function collectPlan(repoRoot, options = {}) {
|
|
|
118
119
|
const allSlices = readAllSlices(repoRoot);
|
|
119
120
|
const graph = buildGraph(allSlices);
|
|
120
121
|
const topo = topoSort(graph);
|
|
121
|
-
const
|
|
122
|
+
const includeCompleted = options.includeCompleted === true;
|
|
123
|
+
const excluded = includeCompleted ? HISTORY_EXCLUDED_STATUSES : EXCLUDED_STATUSES;
|
|
122
124
|
const specSlug = options.specSlug ? String(options.specSlug).trim() : '';
|
|
123
125
|
|
|
124
126
|
const pendingRefs = new Set(
|
|
@@ -147,6 +149,7 @@ function collectPlan(repoRoot, options = {}) {
|
|
|
147
149
|
|
|
148
150
|
return {
|
|
149
151
|
critical_path: criticalPath,
|
|
152
|
+
include_completed: includeCompleted,
|
|
150
153
|
plan,
|
|
151
154
|
total_hours: totalHours,
|
|
152
155
|
};
|
|
@@ -154,12 +157,12 @@ function collectPlan(repoRoot, options = {}) {
|
|
|
154
157
|
|
|
155
158
|
function formatHumanPlan(report, options = {}) {
|
|
156
159
|
const unicode = Boolean(options.unicode) || /UTF-8/i.test(process.env.LANG || '');
|
|
157
|
-
const title = options.onlyReady ? 'Ready slices' : 'Quiver plan';
|
|
160
|
+
const title = options.onlyReady ? 'Ready slices' : (report.include_completed ? 'Quiver plan (including completed)' : 'Quiver plan');
|
|
158
161
|
const pathSeparator = unicode ? ' → ' : ' -> ';
|
|
159
162
|
const lines = [title, `Total hours: ${report.total_hours}`, `Critical path: ${report.critical_path.length > 0 ? report.critical_path.join(pathSeparator) : '-'}`, ''];
|
|
160
163
|
|
|
161
164
|
if (report.plan.length === 0) {
|
|
162
|
-
lines.push('No pending slices found.');
|
|
165
|
+
lines.push(report.include_completed ? 'No slices found for the selected filters.' : 'No pending slices found.');
|
|
163
166
|
return `${lines.join('\n')}\n`;
|
|
164
167
|
}
|
|
165
168
|
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
const fs = require('node:fs');
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
|
|
4
|
+
const { collectDoctorReport } = require('../lib/doctor');
|
|
5
|
+
const { ensureGhAuthenticated, ensureGhInstalled, ensureIdentityFile } = require('../lib/ai/github');
|
|
6
|
+
const { collectOnboardingContextPlan } = require('../lib/ai/onboarding-template');
|
|
7
|
+
const { preflightProvider } = require('../lib/ai/preflight');
|
|
8
|
+
|
|
9
|
+
function formatError(message) {
|
|
10
|
+
return `create-quiver: ${message}`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function summarizeError(error) {
|
|
14
|
+
return {
|
|
15
|
+
code: error && error.code ? error.code : 'UNKNOWN_ERROR',
|
|
16
|
+
message: error && error.message ? error.message : String(error),
|
|
17
|
+
details: error && error.details ? error.details : undefined,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function collectCheckStatus(label, runner, sink) {
|
|
22
|
+
try {
|
|
23
|
+
const value = runner();
|
|
24
|
+
sink.status = 'ok';
|
|
25
|
+
sink.value = value;
|
|
26
|
+
return value;
|
|
27
|
+
} catch (error) {
|
|
28
|
+
sink.status = 'missing';
|
|
29
|
+
sink.error = summarizeError(error);
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function buildNextSteps(report) {
|
|
35
|
+
const nextSteps = [];
|
|
36
|
+
|
|
37
|
+
if (report.gh.status !== 'ok') {
|
|
38
|
+
nextSteps.push('Install GitHub CLI, then rerun `npx create-quiver prepare`.');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (report.ssh.identityFileStatus === 'missing') {
|
|
42
|
+
nextSteps.push('Fix the SSH identity file path, then rerun `npx create-quiver prepare`.');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (report.ssh.authStatus === 'missing') {
|
|
46
|
+
nextSteps.push('Run `gh auth login`, then rerun `npx create-quiver prepare`.');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (report.provider.status === 'missing') {
|
|
50
|
+
nextSteps.push('Install the ' + report.provider.name + ' CLI, then rerun `npx create-quiver prepare --provider ' + report.provider.name + '`.');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (nextSteps.length === 0) {
|
|
54
|
+
nextSteps.push('Run `npx create-quiver doctor` for the layout contract, then `npx create-quiver ai prepare-context --dry-run` to preview the context drafts.');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return nextSteps;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function formatListLine(label, value) {
|
|
61
|
+
if (Array.isArray(value)) {
|
|
62
|
+
return `${label}: ${value.length > 0 ? value.join(', ') : 'none'}`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return `${label}: ${value}`;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function formatPrepareReport(report) {
|
|
69
|
+
const lines = [
|
|
70
|
+
'Quiver prepare report',
|
|
71
|
+
`Mode: ${report.dryRun ? 'dry-run' : 'live'}`,
|
|
72
|
+
`Project: ${report.projectRoot}`,
|
|
73
|
+
'Framework guidance: packaged README_FOR_AI.md template',
|
|
74
|
+
`Project docs copy: ${report.workflowSource.exists ? 'present' : 'absent (not counted as debt)'}`,
|
|
75
|
+
`Layout: ${report.doctor.layout}`,
|
|
76
|
+
formatListLine('Specs', report.doctor.specSlugs),
|
|
77
|
+
];
|
|
78
|
+
|
|
79
|
+
if (report.doctor.warnings.length > 0) {
|
|
80
|
+
lines.push(`Doctor warnings: ${report.doctor.warnings.join(' | ')}`);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
lines.push('Checks: project docs, GitHub CLI, GitHub auth when SSH inputs are provided, SSH identity file when passed, provider CLI when passed');
|
|
84
|
+
|
|
85
|
+
lines.push('Onboarding context:');
|
|
86
|
+
lines.push(`- prompt source: ${report.onboarding.promptSource}`);
|
|
87
|
+
lines.push(`- selected docs: ${report.onboarding.selectedDocs.length > 0 ? report.onboarding.selectedDocs.map((item) => item.path).join(', ') : 'none'}`);
|
|
88
|
+
lines.push(`- documentation debt: ${report.onboarding.missingDocs.length > 0 ? report.onboarding.missingDocs.map((item) => item.path).join(', ') : 'none'}`);
|
|
89
|
+
lines.push(`- omitted by default: ${report.onboarding.omittedByDefault.join(' | ')}`);
|
|
90
|
+
|
|
91
|
+
if (report.onboarding.risks.length > 0) {
|
|
92
|
+
lines.push(`- onboarding risks: ${report.onboarding.risks.join(' | ')}`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
lines.push('GitHub CLI:');
|
|
96
|
+
if (report.gh.status === 'ok') {
|
|
97
|
+
lines.push(`- available (${report.gh.value.command})`);
|
|
98
|
+
} else {
|
|
99
|
+
lines.push(`- missing`);
|
|
100
|
+
lines.push(`- ${report.gh.error.message}`);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
lines.push('SSH:');
|
|
104
|
+
lines.push(`- host alias: ${report.ssh.hostAlias || 'not provided'}`);
|
|
105
|
+
if (report.ssh.identityFile) {
|
|
106
|
+
lines.push(`- identity file: ${report.ssh.identityFile}`);
|
|
107
|
+
} else if (report.ssh.identityFileStatus === 'skipped') {
|
|
108
|
+
lines.push('- identity file: not requested');
|
|
109
|
+
} else if (report.ssh.identityFileStatus === 'missing') {
|
|
110
|
+
lines.push(`- identity file: missing (${report.ssh.identityError.message})`);
|
|
111
|
+
}
|
|
112
|
+
if (report.ssh.authStatus === 'ok') {
|
|
113
|
+
lines.push('- auth: ok');
|
|
114
|
+
} else if (report.ssh.authStatus === 'missing') {
|
|
115
|
+
lines.push(`- auth: missing (${report.ssh.authError.message})`);
|
|
116
|
+
} else {
|
|
117
|
+
lines.push('- auth: not requested');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (report.provider.name) {
|
|
121
|
+
lines.push(`Provider CLI (${report.provider.name}):`);
|
|
122
|
+
if (report.provider.status === 'ok') {
|
|
123
|
+
lines.push(`- available (${report.provider.value.command})`);
|
|
124
|
+
} else {
|
|
125
|
+
lines.push(`- missing (${report.provider.error.message})`);
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
lines.push('Provider CLI: not requested');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
lines.push('Next safe commands:');
|
|
132
|
+
for (const step of report.nextSteps) {
|
|
133
|
+
lines.push(`- ${step}`);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (report.dryRun) {
|
|
137
|
+
lines.push('Dry-run note: this command does not write files.');
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return `${lines.join('\n')}\n`;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function runPrepare(repoRoot, options = {}) {
|
|
144
|
+
const doctorReport = collectDoctorReport(repoRoot);
|
|
145
|
+
const workflowSourcePath = path.join(repoRoot, 'README_FOR_AI.md');
|
|
146
|
+
const onboarding = collectOnboardingContextPlan(repoRoot);
|
|
147
|
+
const report = {
|
|
148
|
+
dryRun: options.dryRun === true,
|
|
149
|
+
doctor: doctorReport,
|
|
150
|
+
gh: { status: 'skipped', value: null, error: null },
|
|
151
|
+
nextSteps: [],
|
|
152
|
+
onboarding,
|
|
153
|
+
projectRoot: repoRoot,
|
|
154
|
+
provider: { name: '', status: 'skipped', value: null, error: null },
|
|
155
|
+
ssh: {
|
|
156
|
+
authError: null,
|
|
157
|
+
authStatus: 'skipped',
|
|
158
|
+
hostAlias: String(options.sshHostAlias || '').trim(),
|
|
159
|
+
identityError: null,
|
|
160
|
+
identityFile: '',
|
|
161
|
+
identityFileStatus: 'skipped',
|
|
162
|
+
status: 'skipped',
|
|
163
|
+
},
|
|
164
|
+
workflowSource: {
|
|
165
|
+
exists: fs.existsSync(workflowSourcePath),
|
|
166
|
+
path: workflowSourcePath,
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
collectCheckStatus(
|
|
171
|
+
'gh',
|
|
172
|
+
() => ensureGhInstalled({
|
|
173
|
+
cwd: repoRoot,
|
|
174
|
+
ghCommand: options.ghCommand,
|
|
175
|
+
ghProbe: options.ghProbe,
|
|
176
|
+
ghProbeArgs: options.ghProbeArgs,
|
|
177
|
+
}),
|
|
178
|
+
report.gh,
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
if (report.ssh.hostAlias || options.identityFile) {
|
|
182
|
+
report.ssh.status = 'requested';
|
|
183
|
+
|
|
184
|
+
if (options.identityFile) {
|
|
185
|
+
try {
|
|
186
|
+
report.ssh.identityFile = ensureIdentityFile(repoRoot, options.identityFile);
|
|
187
|
+
report.ssh.identityFileStatus = 'ok';
|
|
188
|
+
} catch (error) {
|
|
189
|
+
report.ssh.identityFileStatus = 'missing';
|
|
190
|
+
report.ssh.identityError = summarizeError(error);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (report.gh.status === 'ok') {
|
|
195
|
+
try {
|
|
196
|
+
const auth = ensureGhAuthenticated({
|
|
197
|
+
cwd: repoRoot,
|
|
198
|
+
ghAuthArgs: options.ghAuthArgs,
|
|
199
|
+
ghAuthProbe: options.ghAuthProbe,
|
|
200
|
+
ghCommand: options.ghCommand,
|
|
201
|
+
ghProbe: options.ghProbe,
|
|
202
|
+
});
|
|
203
|
+
report.ssh.authStatus = 'ok';
|
|
204
|
+
report.ssh.auth = auth;
|
|
205
|
+
} catch (error) {
|
|
206
|
+
report.ssh.authStatus = 'missing';
|
|
207
|
+
report.ssh.authError = summarizeError(error);
|
|
208
|
+
}
|
|
209
|
+
} else {
|
|
210
|
+
report.ssh.authStatus = 'skipped';
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (options.provider) {
|
|
215
|
+
report.provider.name = String(options.provider).trim().toLowerCase();
|
|
216
|
+
collectCheckStatus(
|
|
217
|
+
'provider',
|
|
218
|
+
() => preflightProvider(report.provider.name, {
|
|
219
|
+
cwd: repoRoot,
|
|
220
|
+
probe: options.providerProbe,
|
|
221
|
+
probeArgs: options.providerProbeArgs,
|
|
222
|
+
}),
|
|
223
|
+
report.provider,
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
report.nextSteps = buildNextSteps(report);
|
|
228
|
+
|
|
229
|
+
process.stdout.write(formatPrepareReport(report));
|
|
230
|
+
return report;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
module.exports = {
|
|
234
|
+
formatPrepareReport,
|
|
235
|
+
runPrepare,
|
|
236
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
const fs = require('node:fs');
|
|
2
|
+
const path = require('node:path');
|
|
3
|
+
|
|
4
|
+
const { resolveReviewedTechnicalPlanInput } = require('../lib/ai/plan-review');
|
|
5
|
+
const {
|
|
6
|
+
buildSpecGenerationManifest,
|
|
7
|
+
describeSpecGeneration,
|
|
8
|
+
generateSpecArtifacts,
|
|
9
|
+
} = require('../lib/ai/spec-generator');
|
|
10
|
+
|
|
11
|
+
function formatError(message) {
|
|
12
|
+
return `create-quiver: ${message}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function toRelativePosix(root, filePath) {
|
|
16
|
+
return path.relative(root, filePath).split(path.sep).join('/');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function readInputText(repoRoot, inputPath) {
|
|
20
|
+
const resolved = path.resolve(repoRoot, inputPath || '');
|
|
21
|
+
if (!inputPath || !fs.existsSync(resolved)) {
|
|
22
|
+
throw new Error(formatError(`missing reviewed and approved plan input: ${inputPath || '<default>'}`));
|
|
23
|
+
}
|
|
24
|
+
return fs.readFileSync(resolved, 'utf8');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function buildSpecCreatePreview(repoRoot, options = {}) {
|
|
28
|
+
const resolved = resolveReviewedTechnicalPlanInput(repoRoot, options.input || undefined);
|
|
29
|
+
const inputPath = resolved.inputPath;
|
|
30
|
+
const inputText = readInputText(repoRoot, inputPath);
|
|
31
|
+
const manifest = buildSpecGenerationManifest({
|
|
32
|
+
inputPath,
|
|
33
|
+
inputText,
|
|
34
|
+
repoRoot,
|
|
35
|
+
specSlug: options.specSlug,
|
|
36
|
+
});
|
|
37
|
+
const preview = describeSpecGeneration(manifest, repoRoot);
|
|
38
|
+
const relativeSpecDir = toRelativePosix(repoRoot, preview.specDir);
|
|
39
|
+
|
|
40
|
+
if (fs.existsSync(preview.specDir)) {
|
|
41
|
+
throw new Error(formatError(`spec directory already exists: ${relativeSpecDir}`));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
inputPath,
|
|
46
|
+
manifest,
|
|
47
|
+
preview,
|
|
48
|
+
relativeSpecDir,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function formatNextCommands(specDir) {
|
|
53
|
+
return [
|
|
54
|
+
'Next safe commands:',
|
|
55
|
+
`- npx create-quiver spec start ${specDir}`,
|
|
56
|
+
`- npx create-quiver spec status ${specDir}`,
|
|
57
|
+
'- npx create-quiver next',
|
|
58
|
+
'- npx create-quiver ai execute-plan --dry-run --commit',
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function formatSpecCreateDryRun(preview) {
|
|
63
|
+
const lines = [
|
|
64
|
+
'Quiver spec create dry-run',
|
|
65
|
+
`Spec slug: ${preview.manifest.slug}`,
|
|
66
|
+
`Title: ${preview.manifest.title}`,
|
|
67
|
+
`Input file: ${preview.inputPath}`,
|
|
68
|
+
`Target: ${preview.relativeSpecDir}`,
|
|
69
|
+
`Planned files: ${preview.preview.files.length}`,
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
for (const file of preview.preview.files) {
|
|
73
|
+
lines.push(`- ${file}`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
lines.push(...formatNextCommands(preview.relativeSpecDir));
|
|
77
|
+
lines.push('No files will be written in dry-run mode.');
|
|
78
|
+
return `${lines.join('\n')}\n`;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function formatSpecCreateResult(result, repoRoot) {
|
|
82
|
+
const relativeSpecDir = toRelativePosix(repoRoot, result.specDir);
|
|
83
|
+
const lines = [
|
|
84
|
+
'Quiver spec created',
|
|
85
|
+
`Spec slug: ${result.manifest.slug}`,
|
|
86
|
+
`Target: ${relativeSpecDir}`,
|
|
87
|
+
`Files written: ${result.files.length}`,
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
for (const filePath of result.files) {
|
|
91
|
+
lines.push(`- ${toRelativePosix(repoRoot, filePath)}`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
lines.push(...formatNextCommands(relativeSpecDir));
|
|
95
|
+
return `${lines.join('\n')}\n`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function runCreateSpec(repoRoot, options = {}) {
|
|
99
|
+
const preview = buildSpecCreatePreview(repoRoot, options);
|
|
100
|
+
|
|
101
|
+
if (options.dryRun) {
|
|
102
|
+
process.stdout.write(formatSpecCreateDryRun(preview));
|
|
103
|
+
return {
|
|
104
|
+
task: 'spec-create',
|
|
105
|
+
dryRun: true,
|
|
106
|
+
manifest: preview.manifest,
|
|
107
|
+
specDir: preview.relativeSpecDir,
|
|
108
|
+
files: preview.preview.files,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const result = generateSpecArtifacts(repoRoot, {
|
|
113
|
+
input: preview.inputPath,
|
|
114
|
+
specSlug: options.specSlug,
|
|
115
|
+
});
|
|
116
|
+
process.stdout.write(formatSpecCreateResult(result, repoRoot));
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
task: 'spec-create',
|
|
120
|
+
dryRun: false,
|
|
121
|
+
specSlug: result.manifest.slug,
|
|
122
|
+
specDir: toRelativePosix(repoRoot, result.specDir),
|
|
123
|
+
files: result.files.map((filePath) => toRelativePosix(repoRoot, filePath)),
|
|
124
|
+
manifest: result.manifest,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
module.exports = {
|
|
129
|
+
buildSpecCreatePreview,
|
|
130
|
+
formatSpecCreateDryRun,
|
|
131
|
+
formatSpecCreateResult,
|
|
132
|
+
runCreateSpec,
|
|
133
|
+
};
|