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
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
function formatError(message) {
|
|
5
|
+
return `create-quiver: ${message}`;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function toProjectSlug(projectName) {
|
|
9
|
+
return projectName
|
|
10
|
+
.normalize('NFKD')
|
|
11
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
12
|
+
.toLowerCase()
|
|
13
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
14
|
+
.replace(/^-+|-+$/g, '') || 'quiver-project';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function toRelativePath(relativePath) {
|
|
18
|
+
return relativePath.split(path.sep).join('/');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const CORE_VISIBLE_DIRECTORIES = ['docs', 'docs/ai', '.quiver', '.quiver/scans'];
|
|
22
|
+
const MINIMAL_VISIBLE_FILES = [
|
|
23
|
+
'README.md',
|
|
24
|
+
'AGENTS.md',
|
|
25
|
+
'.gitignore',
|
|
26
|
+
'docs/AI_CONTEXT.md',
|
|
27
|
+
'docs/AI_ONBOARDING_PROMPT.md',
|
|
28
|
+
'docs/COMMANDS.md',
|
|
29
|
+
'docs/WORKFLOW.md',
|
|
30
|
+
'docs/ai/PRINCIPLES.md',
|
|
31
|
+
'docs/ai/RULES.yaml',
|
|
32
|
+
'package.json',
|
|
33
|
+
'.quiver/state.json',
|
|
34
|
+
'.quiver/config.json',
|
|
35
|
+
'.quiver/.gitignore',
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
const DEFAULT_VISIBLE_EXTRAS = [
|
|
39
|
+
'docs/CONTEXTO.md',
|
|
40
|
+
'docs/DECISIONS.md',
|
|
41
|
+
'docs/INDEX.md',
|
|
42
|
+
'docs/STATUS.md',
|
|
43
|
+
'docs/SUPPORT_MATRIX.md',
|
|
44
|
+
'docs/TROUBLESHOOTING.md',
|
|
45
|
+
'docs/TESTING_GUIDE_FOR_AI.md',
|
|
46
|
+
'docs/GITFLOW_PR_GUIDE.md',
|
|
47
|
+
'docs/ai/LESSONS.md',
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const FULL_VISIBLE_EXTRAS = [
|
|
51
|
+
'docs/SEARCH.md',
|
|
52
|
+
'docs/MULTI_AGENT_WORKFLOW.md',
|
|
53
|
+
'docs/MOCK_DATA_GUIDE.md',
|
|
54
|
+
'docs/UI_STANDARDS.md',
|
|
55
|
+
'docs/DOCUMENTATION_GUIDE.md',
|
|
56
|
+
'docs/examples/plan.md',
|
|
57
|
+
'docs/examples/graph.md',
|
|
58
|
+
'docs/examples/next.md',
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
const LEGACY_SCRIPT_FILES = [
|
|
62
|
+
'tools/scripts/start-slice.sh',
|
|
63
|
+
'tools/scripts/refresh-active-slices.sh',
|
|
64
|
+
'tools/scripts/check-slice-readiness.sh',
|
|
65
|
+
'tools/scripts/check-pr-readiness.sh',
|
|
66
|
+
'tools/scripts/cleanup-slice.sh',
|
|
67
|
+
'tools/scripts/check-scope.sh',
|
|
68
|
+
'tools/scripts/migrate-project.sh',
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
const FULL_DIRECTORIES = [
|
|
72
|
+
'docs-template',
|
|
73
|
+
'docs/examples',
|
|
74
|
+
'tools/scripts',
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
function quiverInternalPaths(projectRoot) {
|
|
78
|
+
const root = path.join(projectRoot, '.quiver');
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
root,
|
|
82
|
+
cacheDir: path.join(root, 'cache'),
|
|
83
|
+
configPath: path.join(root, 'config.json'),
|
|
84
|
+
gitignorePath: path.join(root, '.gitignore'),
|
|
85
|
+
runsDir: path.join(root, 'runs'),
|
|
86
|
+
scansDir: path.join(root, 'scans'),
|
|
87
|
+
statePath: path.join(root, 'state.json'),
|
|
88
|
+
templatesDir: path.join(root, 'templates'),
|
|
89
|
+
worktreesDir: path.join(root, 'worktrees'),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function buildQuiverInternalGitignore() {
|
|
94
|
+
return [
|
|
95
|
+
'cache/',
|
|
96
|
+
'evidence/',
|
|
97
|
+
'runs/',
|
|
98
|
+
'worktrees/',
|
|
99
|
+
'',
|
|
100
|
+
].join('\n');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function buildQuiverConfig(options = {}) {
|
|
104
|
+
return {
|
|
105
|
+
layout_version: options.layoutVersion || 1,
|
|
106
|
+
internal_root: '.quiver',
|
|
107
|
+
scan_path: '.quiver/scans/PROJECT_SCAN.json',
|
|
108
|
+
project_map_path: 'docs/PROJECT_MAP.md',
|
|
109
|
+
templates_path: '.quiver/templates',
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function normalizeInitLayoutOptions(options = {}) {
|
|
114
|
+
const minimal = options.minimal === true;
|
|
115
|
+
const full = options.full === true;
|
|
116
|
+
|
|
117
|
+
if (minimal && full) {
|
|
118
|
+
throw new Error(formatError('init: --minimal and --full are mutually exclusive'));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
compatibilityAlias: options.compatibilityAlias === true,
|
|
123
|
+
dryRun: options.dryRun === true,
|
|
124
|
+
full,
|
|
125
|
+
includeTemplates: options.includeTemplates === true,
|
|
126
|
+
legacyScripts: options.legacyScripts === true,
|
|
127
|
+
minimal,
|
|
128
|
+
skipInstall: options.skipInstall === true,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function resolveInitProfile(normalizedOptions) {
|
|
133
|
+
if (normalizedOptions.full) {
|
|
134
|
+
return 'full';
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (normalizedOptions.minimal) {
|
|
138
|
+
return 'minimal';
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return 'default';
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function resolveInitVisibleFiles(profile, projectSlug) {
|
|
145
|
+
if (profile === 'minimal') {
|
|
146
|
+
return [...MINIMAL_VISIBLE_FILES];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (profile === 'full') {
|
|
150
|
+
return [
|
|
151
|
+
...MINIMAL_VISIBLE_FILES,
|
|
152
|
+
...DEFAULT_VISIBLE_EXTRAS,
|
|
153
|
+
...FULL_VISIBLE_EXTRAS,
|
|
154
|
+
`specs/${projectSlug}/SPEC.md`,
|
|
155
|
+
`specs/${projectSlug}/HANDOFF.md`,
|
|
156
|
+
`specs/${projectSlug}/STATUS.md`,
|
|
157
|
+
`specs/${projectSlug}/EVIDENCE_REPORT.md`,
|
|
158
|
+
`specs/${projectSlug}/slices/slice-template/slice.json`,
|
|
159
|
+
`specs/${projectSlug}/slices/slice-template/pr.md.template`,
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return [...MINIMAL_VISIBLE_FILES, ...DEFAULT_VISIBLE_EXTRAS];
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function resolveInitVisibleDirectories(profile, projectSlug) {
|
|
167
|
+
const directories = [...CORE_VISIBLE_DIRECTORIES];
|
|
168
|
+
|
|
169
|
+
if (profile === 'full') {
|
|
170
|
+
directories.push(...FULL_DIRECTORIES);
|
|
171
|
+
directories.push(`specs/${projectSlug}`);
|
|
172
|
+
directories.push(`specs/${projectSlug}/slices`);
|
|
173
|
+
directories.push(`specs/${projectSlug}/slices/slice-template`);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return directories;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function resolveInitPackageScripts(profile, options = {}) {
|
|
180
|
+
const baseScripts = {
|
|
181
|
+
'quiver:migrate': 'npx create-quiver migrate',
|
|
182
|
+
'quiver:analyze': 'npx create-quiver analyze',
|
|
183
|
+
'quiver:flow': 'npx create-quiver flow',
|
|
184
|
+
'quiver:prepare': 'npx create-quiver prepare',
|
|
185
|
+
'quiver:plan': 'npx create-quiver plan',
|
|
186
|
+
'quiver:graph': 'npx create-quiver graph',
|
|
187
|
+
'quiver:next': 'npx create-quiver next',
|
|
188
|
+
'quiver:doctor': 'npx create-quiver doctor',
|
|
189
|
+
'quiver:evidence': 'npx create-quiver evidence',
|
|
190
|
+
'quiver:ai:agent': 'npx create-quiver ai agent',
|
|
191
|
+
'quiver:ai:onboard': 'npx create-quiver ai onboard',
|
|
192
|
+
'quiver:ai:prepare-context': 'npx create-quiver ai prepare-context',
|
|
193
|
+
'quiver:ai:plan': 'npx create-quiver ai plan',
|
|
194
|
+
'quiver:ai:review-plan': 'npx create-quiver ai review-plan',
|
|
195
|
+
'quiver:ai:approve': 'npx create-quiver ai approve',
|
|
196
|
+
'quiver:ai:prompt-slice': 'npx create-quiver ai prompt-slice',
|
|
197
|
+
'quiver:ai:execute-slice': 'npx create-quiver ai execute-slice',
|
|
198
|
+
'quiver:ai:execute-plan': 'npx create-quiver ai execute-plan',
|
|
199
|
+
'quiver:ai:pr': 'npx create-quiver ai pr',
|
|
200
|
+
'quiver:ai:doctor': 'npx create-quiver ai doctor',
|
|
201
|
+
'quiver:spec:create': 'npx create-quiver spec create',
|
|
202
|
+
'quiver:spec:start': 'npx create-quiver spec start',
|
|
203
|
+
'quiver:spec:status': 'npx create-quiver spec status',
|
|
204
|
+
'quiver:spec:close': 'npx create-quiver spec close',
|
|
205
|
+
'quiver:start-slice': 'npx create-quiver start-slice',
|
|
206
|
+
'quiver:check-slice': 'npx create-quiver check-slice',
|
|
207
|
+
'quiver:check-pr': 'npx create-quiver check-pr',
|
|
208
|
+
'quiver:check-handoff': 'npx create-quiver check-handoff',
|
|
209
|
+
'check-handoff': 'npx create-quiver check-handoff',
|
|
210
|
+
'quiver:cleanup-slice': 'npx create-quiver cleanup-slice',
|
|
211
|
+
'quiver:check-scope': 'npx create-quiver check-scope',
|
|
212
|
+
'quiver:refresh-active-slices': 'npx create-quiver refresh-active-slices',
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
if (profile === 'full' || options.legacyScripts === true) {
|
|
216
|
+
return {
|
|
217
|
+
...baseScripts,
|
|
218
|
+
'check:slice': 'bash tools/scripts/check-slice-readiness.sh',
|
|
219
|
+
'check:pr': 'bash tools/scripts/check-pr-readiness.sh',
|
|
220
|
+
'start:slice': 'bash tools/scripts/start-slice.sh',
|
|
221
|
+
'cleanup:slice': 'bash tools/scripts/cleanup-slice.sh',
|
|
222
|
+
'check:scope': 'bash tools/scripts/check-scope.sh',
|
|
223
|
+
'refresh:active-slices': 'bash tools/scripts/refresh-active-slices.sh',
|
|
224
|
+
migrate: 'bash tools/scripts/migrate-project.sh',
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return baseScripts;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function pushPlannedOperation(operations, targetRoot, relativePath, kind, action, reason, profile, category) {
|
|
232
|
+
const absolutePath = path.join(targetRoot, relativePath);
|
|
233
|
+
const exists = fs.existsSync(absolutePath);
|
|
234
|
+
const effectiveAction = exists
|
|
235
|
+
? (action === 'update' ? 'update' : 'preserve')
|
|
236
|
+
: 'create';
|
|
237
|
+
|
|
238
|
+
operations.push({
|
|
239
|
+
action: effectiveAction,
|
|
240
|
+
category,
|
|
241
|
+
kind,
|
|
242
|
+
path: toRelativePath(relativePath),
|
|
243
|
+
reason,
|
|
244
|
+
exists,
|
|
245
|
+
profile,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function pushStaticOperation(operations, relativePath, kind, action, reason, profile, category) {
|
|
250
|
+
operations.push({
|
|
251
|
+
action,
|
|
252
|
+
category,
|
|
253
|
+
kind,
|
|
254
|
+
path: toRelativePath(relativePath),
|
|
255
|
+
reason,
|
|
256
|
+
exists: false,
|
|
257
|
+
profile,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function buildInitLayout(projectRoot, options = {}) {
|
|
262
|
+
const normalized = normalizeInitLayoutOptions(options);
|
|
263
|
+
const profile = resolveInitProfile(normalized);
|
|
264
|
+
const projectName = options.projectName || path.basename(projectRoot) || 'Quiver Project';
|
|
265
|
+
const projectSlug = toProjectSlug(projectName);
|
|
266
|
+
const operations = [];
|
|
267
|
+
const risks = [];
|
|
268
|
+
|
|
269
|
+
const visibleDirectories = resolveInitVisibleDirectories(profile, projectSlug);
|
|
270
|
+
const visibleFiles = resolveInitVisibleFiles(profile, projectSlug);
|
|
271
|
+
|
|
272
|
+
for (const directory of visibleDirectories) {
|
|
273
|
+
pushPlannedOperation(operations, projectRoot, directory, 'directory', 'create', 'core visible contract directory', profile, 'visible');
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
for (const file of visibleFiles) {
|
|
277
|
+
const updateMode = file === 'package.json' || file === '.gitignore';
|
|
278
|
+
pushPlannedOperation(
|
|
279
|
+
operations,
|
|
280
|
+
projectRoot,
|
|
281
|
+
file,
|
|
282
|
+
'file',
|
|
283
|
+
updateMode ? 'update' : 'create',
|
|
284
|
+
updateMode ? 'prepare project metadata or ignored paths' : 'core visible contract file',
|
|
285
|
+
profile,
|
|
286
|
+
'visible',
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (profile === 'full') {
|
|
291
|
+
for (const file of LEGACY_SCRIPT_FILES) {
|
|
292
|
+
pushStaticOperation(operations, file, 'file', 'create', 'legacy Bash wrapper', profile, 'compatibility');
|
|
293
|
+
}
|
|
294
|
+
} else if (normalized.legacyScripts) {
|
|
295
|
+
for (const file of LEGACY_SCRIPT_FILES) {
|
|
296
|
+
pushStaticOperation(operations, file, 'file', 'create', 'legacy Bash wrapper', profile, 'compatibility');
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (normalized.includeTemplates) {
|
|
301
|
+
pushStaticOperation(operations, '.quiver/templates/', 'directory', 'create', 'export packaged templates into .quiver/templates', profile, 'internal');
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const ignoredPaths = [];
|
|
305
|
+
if (profile !== 'full') {
|
|
306
|
+
ignoredPaths.push('docs-template/');
|
|
307
|
+
if (!normalized.legacyScripts) {
|
|
308
|
+
ignoredPaths.push('tools/scripts/');
|
|
309
|
+
}
|
|
310
|
+
ignoredPaths.push(`specs/${projectSlug}/`);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if (!normalized.includeTemplates) {
|
|
314
|
+
ignoredPaths.push('.quiver/templates/');
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
if (profile !== 'full') {
|
|
318
|
+
const visibleSet = new Set(visibleFiles);
|
|
319
|
+
for (const file of resolveInitVisibleFiles('full', projectSlug)) {
|
|
320
|
+
if (!visibleSet.has(file)) {
|
|
321
|
+
ignoredPaths.push(file);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (normalized.compatibilityAlias) {
|
|
327
|
+
risks.push('compatibility alias path used: npx create-quiver --name');
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (normalized.dryRun) {
|
|
331
|
+
risks.push('dry-run prints the planned layout only; the write path remains unchanged in this slice');
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const counts = operations.reduce((acc, operation) => {
|
|
335
|
+
acc[operation.action] = (acc[operation.action] || 0) + 1;
|
|
336
|
+
return acc;
|
|
337
|
+
}, {});
|
|
338
|
+
|
|
339
|
+
return {
|
|
340
|
+
profile,
|
|
341
|
+
projectName,
|
|
342
|
+
projectSlug,
|
|
343
|
+
targetRoot: path.resolve(projectRoot),
|
|
344
|
+
flags: normalized,
|
|
345
|
+
operations,
|
|
346
|
+
ignoredPaths: [...new Set(ignoredPaths)],
|
|
347
|
+
risks,
|
|
348
|
+
summary: {
|
|
349
|
+
create: counts.create || 0,
|
|
350
|
+
preserve: counts.preserve || 0,
|
|
351
|
+
update: counts.update || 0,
|
|
352
|
+
ignore: [...new Set(ignoredPaths)].length,
|
|
353
|
+
},
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
function formatInitLayoutPlan(plan) {
|
|
358
|
+
const lines = [];
|
|
359
|
+
const entryPoint = plan.flags.compatibilityAlias ? 'compatibility alias (--name)' : 'explicit init command';
|
|
360
|
+
|
|
361
|
+
lines.push('Init dry-run plan');
|
|
362
|
+
lines.push(`- Project: ${plan.projectName}`);
|
|
363
|
+
lines.push(`- Slug: ${plan.projectSlug}`);
|
|
364
|
+
lines.push(`- Target: ${plan.targetRoot}`);
|
|
365
|
+
lines.push(`- Profile: ${plan.profile}`);
|
|
366
|
+
lines.push(`- Entry point: ${entryPoint}`);
|
|
367
|
+
lines.push(`- Planned create: ${plan.summary.create}`);
|
|
368
|
+
lines.push(`- Planned update: ${plan.summary.update}`);
|
|
369
|
+
lines.push(`- Planned preserve: ${plan.summary.preserve}`);
|
|
370
|
+
lines.push(`- Planned ignore: ${plan.summary.ignore}`);
|
|
371
|
+
lines.push('');
|
|
372
|
+
|
|
373
|
+
const grouped = new Map([
|
|
374
|
+
['create', []],
|
|
375
|
+
['update', []],
|
|
376
|
+
['preserve', []],
|
|
377
|
+
['ignore', plan.ignoredPaths.map((relativePath) => ({ path: relativePath }))],
|
|
378
|
+
]);
|
|
379
|
+
|
|
380
|
+
for (const operation of plan.operations) {
|
|
381
|
+
if (operation.action === 'create' || operation.action === 'update' || operation.action === 'preserve') {
|
|
382
|
+
grouped.get(operation.action).push(operation);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
lines.push('Files and directories to create');
|
|
387
|
+
if (grouped.get('create').length > 0) {
|
|
388
|
+
for (const operation of grouped.get('create')) {
|
|
389
|
+
lines.push(`- ${operation.path}`);
|
|
390
|
+
}
|
|
391
|
+
} else {
|
|
392
|
+
lines.push('- none');
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
lines.push('');
|
|
396
|
+
lines.push('Files to update');
|
|
397
|
+
if (grouped.get('update').length > 0) {
|
|
398
|
+
for (const operation of grouped.get('update')) {
|
|
399
|
+
lines.push(`- ${operation.path}`);
|
|
400
|
+
}
|
|
401
|
+
} else {
|
|
402
|
+
lines.push('- none');
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
lines.push('');
|
|
406
|
+
lines.push('Files to preserve');
|
|
407
|
+
if (grouped.get('preserve').length > 0) {
|
|
408
|
+
for (const operation of grouped.get('preserve')) {
|
|
409
|
+
lines.push(`- ${operation.path}`);
|
|
410
|
+
}
|
|
411
|
+
} else {
|
|
412
|
+
lines.push('- none');
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
lines.push('');
|
|
416
|
+
lines.push('Paths intentionally ignored by this profile');
|
|
417
|
+
if (grouped.get('ignore').length > 0) {
|
|
418
|
+
for (const operation of grouped.get('ignore')) {
|
|
419
|
+
lines.push(`- ${operation.path}`);
|
|
420
|
+
}
|
|
421
|
+
} else {
|
|
422
|
+
lines.push('- none');
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
lines.push('');
|
|
426
|
+
lines.push('Risks');
|
|
427
|
+
if (plan.risks.length > 0) {
|
|
428
|
+
for (const risk of plan.risks) {
|
|
429
|
+
lines.push(`- ${risk}`);
|
|
430
|
+
}
|
|
431
|
+
} else {
|
|
432
|
+
lines.push('- none');
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
lines.push('');
|
|
436
|
+
return lines.join('\n');
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
module.exports = {
|
|
440
|
+
buildQuiverConfig,
|
|
441
|
+
buildQuiverInternalGitignore,
|
|
442
|
+
buildInitLayout,
|
|
443
|
+
formatInitLayoutPlan,
|
|
444
|
+
normalizeInitLayoutOptions,
|
|
445
|
+
resolveInitPackageScripts,
|
|
446
|
+
resolveInitVisibleDirectories,
|
|
447
|
+
resolveInitVisibleFiles,
|
|
448
|
+
quiverInternalPaths,
|
|
449
|
+
resolveInitProfile,
|
|
450
|
+
toProjectSlug,
|
|
451
|
+
};
|
|
@@ -3,7 +3,8 @@ const path = require('path');
|
|
|
3
3
|
const { branchDelete, catFileExists, currentBranch, fetchBranch, fetchRemote, hasLocalBranch, hasRemoteBranch, lsRemoteHeads, mergeBaseIsAncestor, revListCount, runGit, statusPorcelain, worktreeAdd, worktreeList, worktreePrune, worktreeRemove } = require('./git');
|
|
4
4
|
const { parseJsonWithComments } = require('./json');
|
|
5
5
|
const { writeFrontMatter } = require('./init-docs');
|
|
6
|
-
const { resolveTargetRoot } = require('./paths');
|
|
6
|
+
const { relativePosixPath, resolveTargetRoot } = require('./paths');
|
|
7
|
+
const { ensureSpecSliceZeroComplete } = require('./spec-worktrees');
|
|
7
8
|
const { activeSlicePath, renderActiveSlice, resolveSliceContext, safeBranchName, toAlias, validateSliceMetaForStart, worktreesRootForRepo } = require('./slice');
|
|
8
9
|
|
|
9
10
|
function ensureDir(dirPath) {
|
|
@@ -73,7 +74,7 @@ function writeWorktreeContext(targetWorktree, slice, branchName) {
|
|
|
73
74
|
'',
|
|
74
75
|
'## Active Slice Brief',
|
|
75
76
|
'',
|
|
76
|
-
`- ${activeSlicePath(slice.repoRoot)}`,
|
|
77
|
+
`- ${relativePosixPath(slice.repoRoot, activeSlicePath(slice.repoRoot))}`,
|
|
77
78
|
'',
|
|
78
79
|
'## Constraints',
|
|
79
80
|
'',
|
|
@@ -299,6 +300,11 @@ function startSlice(sliceInput, options = {}) {
|
|
|
299
300
|
const repoRoot = runGit(['rev-parse', '--show-toplevel'], process.cwd());
|
|
300
301
|
const slice = resolveSliceContext(repoRoot, sliceInput);
|
|
301
302
|
slice.repoRoot = repoRoot;
|
|
303
|
+
|
|
304
|
+
if (!slice.isBaseline) {
|
|
305
|
+
ensureSpecSliceZeroComplete(repoRoot, slice.specDirAbs);
|
|
306
|
+
}
|
|
307
|
+
|
|
302
308
|
validateSliceMetaForStart(slice);
|
|
303
309
|
|
|
304
310
|
if (slice.status === 'blocked') {
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const PACKAGE_PREFIX = 'package/';
|
|
2
|
+
|
|
3
|
+
const SAFETY_RULES = [
|
|
4
|
+
{
|
|
5
|
+
code: 'env-file',
|
|
6
|
+
match(relativePath) {
|
|
7
|
+
return /(^|\/)\.env($|[./])/.test(relativePath);
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
code: 'npm-credentials',
|
|
12
|
+
match(relativePath) {
|
|
13
|
+
return /(^|\/)\.npmrc$/.test(relativePath) || /(^|\/)\.npm(\/|$)/.test(relativePath);
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
code: 'ai-tool-state',
|
|
18
|
+
match(relativePath) {
|
|
19
|
+
return /(^|\/)\.(claude|codex|quiver)(\/|$)/.test(relativePath);
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
code: 'worktree-state',
|
|
24
|
+
match(relativePath) {
|
|
25
|
+
return /(^|\/)\.worktrees(\/|$)/.test(relativePath);
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
code: 'worktree-context',
|
|
30
|
+
match(relativePath) {
|
|
31
|
+
return /(^|\/)WORKTREE_CONTEXT\.md$/.test(relativePath);
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
code: 'demo-output',
|
|
36
|
+
match(relativePath) {
|
|
37
|
+
return relativePath === 'quiver-spec-viewer' || relativePath.startsWith('quiver-spec-viewer/');
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
function normalizeTarballPath(inputPath) {
|
|
43
|
+
return String(inputPath || '')
|
|
44
|
+
.trim()
|
|
45
|
+
.replace(/\\/g, '/')
|
|
46
|
+
.replace(/^\.\//, '')
|
|
47
|
+
.replace(/\/{2,}/g, '/');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function stripPackagePrefix(inputPath) {
|
|
51
|
+
const normalizedPath = normalizeTarballPath(inputPath);
|
|
52
|
+
|
|
53
|
+
if (normalizedPath.startsWith(PACKAGE_PREFIX)) {
|
|
54
|
+
return normalizedPath.slice(PACKAGE_PREFIX.length);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return normalizedPath;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function collectPackageSafetyViolations(paths) {
|
|
61
|
+
const violations = [];
|
|
62
|
+
const seen = new Set();
|
|
63
|
+
|
|
64
|
+
for (const rawPath of paths || []) {
|
|
65
|
+
const normalizedPath = normalizeTarballPath(rawPath);
|
|
66
|
+
const relativePath = stripPackagePrefix(normalizedPath);
|
|
67
|
+
|
|
68
|
+
for (const rule of SAFETY_RULES) {
|
|
69
|
+
if (!rule.match(relativePath)) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const key = `${rule.code}:${normalizedPath}`;
|
|
74
|
+
if (seen.has(key)) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
seen.add(key);
|
|
79
|
+
violations.push({
|
|
80
|
+
code: rule.code,
|
|
81
|
+
path: normalizedPath,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return violations;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function formatPackageSafetyViolations(violations) {
|
|
90
|
+
return violations
|
|
91
|
+
.map((violation) => `${violation.path} [${violation.code}]`)
|
|
92
|
+
.join(', ');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function assertPackageSafety(paths) {
|
|
96
|
+
const violations = collectPackageSafetyViolations(paths);
|
|
97
|
+
|
|
98
|
+
if (violations.length === 0) {
|
|
99
|
+
return {
|
|
100
|
+
ok: true,
|
|
101
|
+
violations,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const error = new Error(`PACKAGE_SAFETY_FAILED: unsafe tarball contents detected: ${formatPackageSafetyViolations(violations)}`);
|
|
106
|
+
error.code = 'PACKAGE_SAFETY_FAILED';
|
|
107
|
+
error.violations = violations;
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
module.exports = {
|
|
112
|
+
assertPackageSafety,
|
|
113
|
+
collectPackageSafetyViolations,
|
|
114
|
+
formatPackageSafetyViolations,
|
|
115
|
+
normalizeTarballPath,
|
|
116
|
+
stripPackagePrefix,
|
|
117
|
+
};
|
|
@@ -4,16 +4,77 @@ function resolveTargetRoot(cwd, targetDir, pathLib = path) {
|
|
|
4
4
|
return pathLib.resolve(cwd, targetDir);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
function normalizeGitBashDrivePath(filePath, pathLib = path) {
|
|
8
|
+
const value = String(filePath || '');
|
|
9
|
+
const normalized = value.replace(/\\/g, '/');
|
|
10
|
+
const withoutNamespace = normalized.replace(/^\/\/\?\/([A-Za-z]:\/)/, '$1');
|
|
11
|
+
const match = withoutNamespace.match(/^\/([A-Za-z])\/(.*)$/);
|
|
12
|
+
if (!match) {
|
|
13
|
+
if (withoutNamespace !== normalized && (pathLib === path.win32 || process.platform === 'win32')) {
|
|
14
|
+
return withoutNamespace;
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (pathLib !== path.win32 && process.platform !== 'win32') {
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return `${match[1]}:/${match[2]}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
7
26
|
function toPosixPath(filePath, pathLib = path) {
|
|
8
|
-
return filePath.split(pathLib.sep).join('/');
|
|
27
|
+
return String(filePath).split(pathLib.sep).join('/').replace(/\\/g, '/');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function stripTrailingSlashes(filePath) {
|
|
31
|
+
const value = String(filePath);
|
|
32
|
+
if (value === '/') {
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
if (/^[A-Za-z]:\/+$/.test(value)) {
|
|
36
|
+
return value.slice(0, 3);
|
|
37
|
+
}
|
|
38
|
+
return value.replace(/\/+$/, '');
|
|
9
39
|
}
|
|
10
40
|
|
|
11
41
|
function relativePosixPath(root, absolutePath, pathLib = path) {
|
|
12
|
-
|
|
42
|
+
const normalizedRoot = stripTrailingSlashes(toPosixPath(normalizeGitBashDrivePath(root, pathLib), pathLib));
|
|
43
|
+
const normalizedAbsolute = stripTrailingSlashes(toPosixPath(normalizeGitBashDrivePath(absolutePath, pathLib), pathLib));
|
|
44
|
+
const windowsPath = pathLib === path.win32 || process.platform === 'win32';
|
|
45
|
+
const comparableRoot = windowsPath ? normalizedRoot.toLowerCase() : normalizedRoot;
|
|
46
|
+
const comparableAbsolute = windowsPath ? normalizedAbsolute.toLowerCase() : normalizedAbsolute;
|
|
47
|
+
|
|
48
|
+
if (comparableAbsolute === comparableRoot) {
|
|
49
|
+
return '';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (comparableAbsolute.startsWith(`${comparableRoot}/`)) {
|
|
53
|
+
return normalizedAbsolute.slice(normalizedRoot.length + 1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return toPosixPath(pathLib.relative(
|
|
57
|
+
normalizeGitBashDrivePath(root, pathLib),
|
|
58
|
+
normalizeGitBashDrivePath(absolutePath, pathLib),
|
|
59
|
+
), pathLib);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function specRelativePathFromPath(filePath, pathLib = path) {
|
|
63
|
+
const normalized = toPosixPath(normalizeGitBashDrivePath(filePath, pathLib), pathLib);
|
|
64
|
+
const parts = normalized.split('/').filter(Boolean);
|
|
65
|
+
const specIndex = parts.findIndex((part) => part === 'specs' || part === 'specs-fix');
|
|
66
|
+
|
|
67
|
+
if (specIndex === -1 || !parts[specIndex + 1]) {
|
|
68
|
+
return '';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return parts.slice(specIndex).join('/');
|
|
13
72
|
}
|
|
14
73
|
|
|
15
74
|
module.exports = {
|
|
75
|
+
normalizeGitBashDrivePath,
|
|
16
76
|
relativePosixPath,
|
|
17
77
|
resolveTargetRoot,
|
|
78
|
+
specRelativePathFromPath,
|
|
18
79
|
toPosixPath,
|
|
19
80
|
};
|