create-quiver 0.9.1 → 0.10.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.
Files changed (106) hide show
  1. package/README.md +289 -335
  2. package/README_FOR_AI.md +57 -44
  3. package/docs/AI_ONBOARDING_PROMPT.md.template +13 -3
  4. package/docs/COMMANDS.md.template +24 -0
  5. package/docs/GITFLOW_PR_GUIDE.md.template +11 -0
  6. package/docs/STANDARD.md.template +1 -1
  7. package/docs/SUPPORT_MATRIX.md.template +4 -0
  8. package/docs/TROUBLESHOOTING.md.template +29 -1
  9. package/docs/WORKFLOW.md.template +1 -1
  10. package/package.json +6 -1
  11. package/package.template.json +11 -6
  12. package/scripts/check-pr-readiness.sh +1 -1
  13. package/scripts/check-scope.sh +0 -1
  14. package/scripts/check-slice-readiness.sh +3 -4
  15. package/scripts/init-docs.sh +46 -6
  16. package/specs/quiver-v20-ai-cli-orchestration/EVIDENCE_REPORT.md +23 -0
  17. package/specs/quiver-v20-ai-cli-orchestration/EXECUTION_PLAN.md +57 -0
  18. package/specs/quiver-v20-ai-cli-orchestration/SPEC.md +202 -0
  19. package/specs/quiver-v20-ai-cli-orchestration/STATUS.md +35 -0
  20. package/specs/quiver-v20-ai-cli-orchestration/pr.md +100 -0
  21. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +30 -0
  22. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +61 -0
  23. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-00-spec-foundation/slice.json +54 -0
  24. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-01-ai-provider-runner/CLOSURE_BRIEF.md +39 -0
  25. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-01-ai-provider-runner/EXECUTION_BRIEF.md +63 -0
  26. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-01-ai-provider-runner/slice.json +55 -0
  27. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-02-context-packs-token-budget/CLOSURE_BRIEF.md +40 -0
  28. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-02-context-packs-token-budget/EXECUTION_BRIEF.md +60 -0
  29. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-02-context-packs-token-budget/slice.json +54 -0
  30. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-03-ai-phase-gated-planner/CLOSURE_BRIEF.md +43 -0
  31. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-03-ai-phase-gated-planner/EXECUTION_BRIEF.md +62 -0
  32. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-03-ai-phase-gated-planner/slice.json +62 -0
  33. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-04-spec-slice-handoff-pr-generation/CLOSURE_BRIEF.md +36 -0
  34. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-04-spec-slice-handoff-pr-generation/EXECUTION_BRIEF.md +63 -0
  35. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-04-spec-slice-handoff-pr-generation/slice.json +59 -0
  36. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-05-execution-plan-parallel-worktrees/CLOSURE_BRIEF.md +32 -0
  37. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-05-execution-plan-parallel-worktrees/EXECUTION_BRIEF.md +61 -0
  38. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-05-execution-plan-parallel-worktrees/slice.json +59 -0
  39. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-06-ai-execute-slice-scope-enforcement/CLOSURE_BRIEF.md +36 -0
  40. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-06-ai-execute-slice-scope-enforcement/EXECUTION_BRIEF.md +64 -0
  41. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-06-ai-execute-slice-scope-enforcement/slice.json +65 -0
  42. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-07-github-pr-preflight/CLOSURE_BRIEF.md +36 -0
  43. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-07-github-pr-preflight/EXECUTION_BRIEF.md +66 -0
  44. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-07-github-pr-preflight/slice.json +63 -0
  45. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-08-docs-smokes-release-readiness/CLOSURE_BRIEF.md +35 -0
  46. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-08-docs-smokes-release-readiness/EXECUTION_BRIEF.md +64 -0
  47. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-08-docs-smokes-release-readiness/slice.json +77 -0
  48. package/specs/quiver-v21-ai-first-layout/EVIDENCE_REPORT.md +31 -0
  49. package/specs/quiver-v21-ai-first-layout/EXECUTION_PLAN.md +185 -0
  50. package/specs/quiver-v21-ai-first-layout/SPEC.md +212 -0
  51. package/specs/quiver-v21-ai-first-layout/STATUS.md +37 -0
  52. package/specs/quiver-v21-ai-first-layout/pr.md +110 -0
  53. package/specs/quiver-v21-ai-first-layout/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +30 -0
  54. package/specs/quiver-v21-ai-first-layout/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +63 -0
  55. package/specs/quiver-v21-ai-first-layout/slices/slice-00-spec-foundation/slice.json +45 -0
  56. package/specs/quiver-v21-ai-first-layout/slices/slice-01-init-profiles-dry-run/CLOSURE_BRIEF.md +31 -0
  57. package/specs/quiver-v21-ai-first-layout/slices/slice-01-init-profiles-dry-run/EXECUTION_BRIEF.md +59 -0
  58. package/specs/quiver-v21-ai-first-layout/slices/slice-01-init-profiles-dry-run/slice.json +57 -0
  59. package/specs/quiver-v21-ai-first-layout/slices/slice-02-internal-layout-template-resolver/CLOSURE_BRIEF.md +32 -0
  60. package/specs/quiver-v21-ai-first-layout/slices/slice-02-internal-layout-template-resolver/EXECUTION_BRIEF.md +60 -0
  61. package/specs/quiver-v21-ai-first-layout/slices/slice-02-internal-layout-template-resolver/slice.json +58 -0
  62. package/specs/quiver-v21-ai-first-layout/slices/slice-03-generation-profiles-visible-contract/CLOSURE_BRIEF.md +34 -0
  63. package/specs/quiver-v21-ai-first-layout/slices/slice-03-generation-profiles-visible-contract/EXECUTION_BRIEF.md +61 -0
  64. package/specs/quiver-v21-ai-first-layout/slices/slice-03-generation-profiles-visible-contract/slice.json +64 -0
  65. package/specs/quiver-v21-ai-first-layout/slices/slice-04-analyze-scan-relocation/CLOSURE_BRIEF.md +32 -0
  66. package/specs/quiver-v21-ai-first-layout/slices/slice-04-analyze-scan-relocation/EXECUTION_BRIEF.md +58 -0
  67. package/specs/quiver-v21-ai-first-layout/slices/slice-04-analyze-scan-relocation/slice.json +64 -0
  68. package/specs/quiver-v21-ai-first-layout/slices/slice-05-empty-specs-layout-doctor/CLOSURE_BRIEF.md +32 -0
  69. package/specs/quiver-v21-ai-first-layout/slices/slice-05-empty-specs-layout-doctor/EXECUTION_BRIEF.md +60 -0
  70. package/specs/quiver-v21-ai-first-layout/slices/slice-05-empty-specs-layout-doctor/slice.json +65 -0
  71. package/specs/quiver-v21-ai-first-layout/slices/slice-06-legacy-migration-optional-assets/CLOSURE_BRIEF.md +31 -0
  72. package/specs/quiver-v21-ai-first-layout/slices/slice-06-legacy-migration-optional-assets/EXECUTION_BRIEF.md +62 -0
  73. package/specs/quiver-v21-ai-first-layout/slices/slice-06-legacy-migration-optional-assets/slice.json +66 -0
  74. package/specs/quiver-v21-ai-first-layout/slices/slice-07-docs-guidance-alignment/CLOSURE_BRIEF.md +33 -0
  75. package/specs/quiver-v21-ai-first-layout/slices/slice-07-docs-guidance-alignment/EXECUTION_BRIEF.md +61 -0
  76. package/specs/quiver-v21-ai-first-layout/slices/slice-07-docs-guidance-alignment/slice.json +67 -0
  77. package/specs/quiver-v21-ai-first-layout/slices/slice-08-smokes-release-readiness/CLOSURE_BRIEF.md +35 -0
  78. package/specs/quiver-v21-ai-first-layout/slices/slice-08-smokes-release-readiness/EXECUTION_BRIEF.md +66 -0
  79. package/specs/quiver-v21-ai-first-layout/slices/slice-08-smokes-release-readiness/slice.json +62 -0
  80. package/src/create-quiver/commands/ai.js +442 -0
  81. package/src/create-quiver/index.js +418 -81
  82. package/src/create-quiver/lib/ai/context-packs.js +158 -0
  83. package/src/create-quiver/lib/ai/execution-plan.js +254 -0
  84. package/src/create-quiver/lib/ai/executor.js +323 -0
  85. package/src/create-quiver/lib/ai/github.js +329 -0
  86. package/src/create-quiver/lib/ai/phase-gates.js +72 -0
  87. package/src/create-quiver/lib/ai/preflight.js +58 -0
  88. package/src/create-quiver/lib/ai/prompt-transport.js +81 -0
  89. package/src/create-quiver/lib/ai/prompts.js +39 -0
  90. package/src/create-quiver/lib/ai/providers.js +314 -0
  91. package/src/create-quiver/lib/ai/safety.js +151 -0
  92. package/src/create-quiver/lib/ai/spec-generator.js +314 -0
  93. package/src/create-quiver/lib/ai/spec-templates.js +715 -0
  94. package/src/create-quiver/lib/doctor.js +114 -0
  95. package/src/create-quiver/lib/git.js +21 -0
  96. package/src/create-quiver/lib/init-docs.js +277 -22
  97. package/src/create-quiver/lib/init-layout.js +426 -0
  98. package/src/create-quiver/lib/lifecycle.js +2 -2
  99. package/src/create-quiver/lib/paths.js +63 -2
  100. package/src/create-quiver/lib/project-scan.js +66 -0
  101. package/src/create-quiver/lib/readiness.js +4 -2
  102. package/src/create-quiver/lib/scope.js +125 -0
  103. package/src/create-quiver/lib/slice-graph.js +6 -0
  104. package/src/create-quiver/lib/slice.js +51 -8
  105. package/src/create-quiver/lib/state.js +18 -1
  106. package/src/create-quiver/lib/template-resolver.js +74 -0
package/README_FOR_AI.md CHANGED
@@ -1,6 +1,6 @@
1
- # AI Guide for Quiver Docs Template
1
+ # AI Guide for Quiver
2
2
 
3
- Use this guide when initializing a new project from the template or when explaining the workflow to another agent.
3
+ Use this guide when initializing a new project with Quiver or when explaining the workflow to another agent.
4
4
 
5
5
  The first AI job in a generated project is context preparation, not product implementation.
6
6
 
@@ -9,11 +9,12 @@ The canonical installer entrypoint is `npx create-quiver` run from the target pr
9
9
  Do not recommend global installation; use `npx` or a project-local devDependency when the team needs a pinned version.
10
10
  The post-init contract is validated with `npx create-quiver doctor` from the project root.
11
11
  If the project already exists from an older Quiver version and was previously initialized by Quiver, run `npx create-quiver migrate` before `analyze` from the project root.
12
- If the project was never initialized by Quiver, do not use `migrate` as bootstrap; run `npx create-quiver --name "Project Name"` first.
13
- Generated projects also get `quiver:*` npm scripts that call the Node CLI directly; prefer those for repeatable project workflows, including `quiver:plan` for sequential planning, `quiver:graph` for parallel-level inspection, and `quiver:next` for the next ready slice. Use `quiver:graph --format mermaid` for PR-ready Markdown or `quiver:graph --format dot` for Graphviz source.
12
+ If the project was never initialized by Quiver, do not use `migrate` as bootstrap; run `npx create-quiver init --name "Project Name"` first.
13
+ Generated projects also get `quiver:*` npm scripts that call the Node CLI directly; prefer those for repeatable project workflows, including `quiver:plan` for sequential planning, `quiver:graph` for parallel-level inspection, `quiver:next` for the next ready slice, and the AI family `quiver:ai:onboard`, `quiver:ai:plan`, `quiver:ai:execute-slice`, `quiver:ai:pr`, and `quiver:ai:doctor`. Use `quiver:graph --format mermaid` for PR-ready Markdown or `quiver:graph --format dot` for Graphviz source.
14
14
  Maintain release notes and package publishing with `scripts/release-quiver.sh`.
15
15
  The primary generated project context for agents is `docs/AI_CONTEXT.md`.
16
16
  The project map is the single source of truth for stack, package manager, commands, and file hints: `docs/PROJECT_MAP.md`.
17
+ The raw analyzer output is internal machinery at `.quiver/scans/PROJECT_SCAN.json`; read it only when the visible map is not enough.
17
18
  The universal router for generated projects is `AGENTS.md`; read it before `docs/AI_CONTEXT.md` and `docs/AI_ONBOARDING_PROMPT.md`.
18
19
  Generated projects also get `docs/DECISIONS.md`; use it for durable choices that should not be re-litigated.
19
20
  If a generated project has been analyzed, the exact agent handoff prompt is `docs/AI_ONBOARDING_PROMPT.md`.
@@ -26,7 +27,7 @@ During onboarding, after reading `ROADMAP.md`, also read `BACKLOG.md` in the rep
26
27
 
27
28
  Use the smallest context that still answers the current task.
28
29
 
29
- - **Onboarding:** start from `README.md`, `AGENTS.md` when present, `docs/PROJECT_MAP.md`, `docs/PROJECT_SCAN.json`, `docs/AI_CONTEXT.md`, and `docs/AI_ONBOARDING_PROMPT.md` before opening source files.
30
+ - **Onboarding:** start from `README.md`, `AGENTS.md` when present, `docs/PROJECT_MAP.md`, `.quiver/scans/PROJECT_SCAN.json` when it exists, `docs/AI_CONTEXT.md`, and `docs/AI_ONBOARDING_PROMPT.md` before opening source files.
30
31
  - **Onboarding router:** start from `README.md` and `AGENTS.md` first, then the onboarding files above.
31
32
  - **Implementation:** start from `docs/ai/ACTIVE_SLICE.md` when it exists; otherwise start from `specs/<project-slug>/slices/<slice-id>/slice.json`, then read only the declared files, nearby tests, and directly related source.
32
33
  - **Handoff:** start from `specs/<project-slug>/HANDOFF.md` when the work was explicitly transferred through a handoff artifact.
@@ -38,12 +39,12 @@ Prefer maps, metadata, diffs, and summaries over full file reads when they are e
38
39
 
39
40
  ## Core Rules
40
41
 
41
- - Never customize `docs-template/` for a specific project.
42
- - Always use `init-docs.sh` instead of copying files by hand.
43
- - Treat `docs-template/` as generic and `docs/` as generated project-specific output.
42
+ - Do not treat `docs-template/` as part of the default project contract. It is legacy or exported only when explicitly requested.
43
+ - Use `npx create-quiver init` or `npx create-quiver --name "Project Name"` instead of copying templates by hand.
44
+ - Treat `.quiver/` as Quiver internal machinery and `docs/` as the visible project-specific contract.
44
45
  - Not every project needs every optional file.
45
46
  - The AI context pack lives in `docs/AI_CONTEXT.md`; `docs/CONTEXTO.md` is the broader project overview; `docs/PROJECT_MAP.md` owns stack and command facts.
46
- - The onboarding prompt lives in `docs/AI_ONBOARDING_PROMPT.md` and should reference the analyzer outputs.
47
+ - The onboarding prompt lives in `docs/AI_ONBOARDING_PROMPT.md` and should reference `docs/PROJECT_MAP.md`; raw scan details live in `.quiver/scans/PROJECT_SCAN.json`.
47
48
  - `specs/<project-slug>/HANDOFF.md` is reserved for exceptional context transfers between agents or phases.
48
49
  - Initial onboarding should complete context docs and report assumptions before any feature work starts.
49
50
  - The normal workflow runs from the project root without `--dir`; use `--dir` only when targeting another directory explicitly.
@@ -56,47 +57,58 @@ Prefer maps, metadata, diffs, and summaries over full file reads when they are e
56
57
 
57
58
  ## Initialization Flow
58
59
 
59
- 1. Copy the template folder into the target project as `docs-template/`.
60
- 2. Run:
60
+ 1. From the target project root, run the default AI-first initializer:
61
61
 
62
62
  ```bash
63
- ./docs-template/scripts/init-docs.sh "Project Name"
63
+ npx create-quiver init --name "Project Name"
64
64
  ```
65
65
 
66
- 3. Tell the user to edit:
66
+ The compatibility alias is still valid:
67
+
68
+ ```bash
69
+ npx create-quiver --name "Project Name"
70
+ ```
71
+
72
+ 2. Analyze and validate the project contract:
73
+
74
+ ```bash
75
+ npx create-quiver analyze
76
+ npx create-quiver doctor
77
+ ```
78
+
79
+ 3. Tell the user to review or complete:
67
80
  - `docs/AI_CONTEXT.md`
68
81
  - `docs/AI_ONBOARDING_PROMPT.md`
69
82
  - `docs/CONTEXTO.md`
70
83
  - `docs/STATUS.md`
71
- - `docs/SUPPORT_MATRIX.md`
72
- - `docs/TROUBLESHOOTING.md`
73
- - `specs/{{PROJECT_SLUG}}/SPEC.md`
84
+ - `docs/PROJECT_MAP.md`
85
+
86
+ ## What Init Creates
74
87
 
75
- ## What the Script Creates
88
+ Default init creates the visible AI-first contract and Quiver internal state:
76
89
 
90
+ - `AGENTS.md`
77
91
  - `docs/`
78
92
  - `docs/ai/`
79
93
  - `docs/AI_CONTEXT.md`
80
94
  - `docs/AI_ONBOARDING_PROMPT.md`
81
- - `specs/{{PROJECT_SLUG}}/`
82
- - `tools/scripts/`
83
- - `docs/SEARCH.md`
84
- - a merged or copied `package.json` with the required npm scripts
85
- - the default OSS baseline when those files are missing:
86
- - `LICENSE`
87
- - `CONTRIBUTING.md`
88
- - `CODE_OF_CONDUCT.md`
89
- - `SECURITY.md`
90
- - `CHANGELOG.md`
91
- - `ROADMAP.md`
92
95
  - `docs/SUPPORT_MATRIX.md`
93
96
  - `docs/TROUBLESHOOTING.md`
94
- - `.github/pull_request_template.md`
95
- - `.github/ISSUE_TEMPLATE/bug_report.md`
96
- - `.github/ISSUE_TEMPLATE/feature_request.md`
97
- - `.github/workflows/ci.yml`
97
+ - `.quiver/config.json`
98
+ - `.quiver/state.json`
99
+ - `.quiver/.gitignore`
100
+ - a merged or copied `package.json` with `quiver:*` scripts
101
+
102
+ Default init does not create `docs-template/`, `tools/scripts/`, or a placeholder spec.
103
+
104
+ Optional compatibility profiles:
105
+
106
+ - `--minimal` creates only the essential onboarding contract.
107
+ - `--full` preserves the broad legacy-compatible layout, including placeholder spec assets and OSS/community files.
108
+ - `--legacy-scripts` adds Bash wrappers under `tools/scripts/`.
109
+ - `--include-templates` exports packaged templates under `.quiver/templates/`, not root `docs-template/`.
98
110
 
99
- `init-docs.sh` preserves any existing target files and reports skipped copies instead of overwriting them.
111
+ Init preserves existing target files and reports skipped copies instead of overwriting them.
100
112
 
101
113
  ## Required Follow-Up
102
114
 
@@ -106,20 +118,21 @@ After initialization, the user should:
106
118
  2. Fill in `docs/AI_ONBOARDING_PROMPT.md`
107
119
  3. Fill in `docs/CONTEXTO.md`
108
120
  4. Fill in `docs/STATUS.md`
109
- 5. Run `npx create-quiver analyze` if scan artifacts are missing
121
+ 5. Run `npx create-quiver analyze` if `docs/PROJECT_MAP.md` or `.quiver/scans/PROJECT_SCAN.json` is missing
110
122
  6. If the project already exists from an older Quiver version and was previously initialized by Quiver, run `npx create-quiver migrate`
111
- 7. If the project was never initialized by Quiver, run `npx create-quiver --name "Project Name"` instead of `migrate`
123
+ 7. If the project was never initialized by Quiver, run `npx create-quiver init --name "Project Name"` instead of `migrate`
112
124
  8. Ask the AI agent to execute `docs/AI_ONBOARDING_PROMPT.md`
113
125
  9. Review context docs before creating the first implementation slice
114
126
  10. Open and merge the documentation PR that establishes the workflow files
115
- 11. Create the first slice in `specs/{{PROJECT_SLUG}}/slices/[slice-id]/`
116
- 12. Add `ticket` and `git.*`
117
- 13. Run `npx create-quiver plan` or `npm run quiver:plan`
118
- 14. Run `npx create-quiver next` or `npm run quiver:next`
119
- 14. Run `npx create-quiver start-slice [--allow-draft] <slice.json>` or `npm run quiver:start-slice -- [--allow-draft] <slice.json>`
120
- 15. Make one commit per slice
121
- 16. Open one PR per spec
122
- 17. Validate the slice and the final PR with the workflow gates
127
+ 11. Use `npx create-quiver ai plan --phase acceptance --input requirements.md --dry-run`
128
+ 12. After human approval, use `npx create-quiver ai plan --phase technical-plan --input acceptance-approved.md --dry-run`
129
+ 13. After human approval, use `npx create-quiver ai plan --phase spec --input technical-plan-approved.md --dry-run` to create the real spec, slices, handoffs, execution plan, and PR body
130
+ 14. Run `npx create-quiver plan` or `npm run quiver:plan`
131
+ 15. Run `npx create-quiver next` or `npm run quiver:next`
132
+ 16. Run `npx create-quiver start-slice [--allow-draft] <slice.json>` or `npm run quiver:start-slice -- [--allow-draft] <slice.json>`
133
+ 17. Make one commit per slice
134
+ 18. Open one PR per spec
135
+ 19. Validate the slice and the final PR with the workflow gates
123
136
 
124
137
  Bootstrap note: `start-slice` should resolve paths canonically, prefer a local `develop` or `main` base branch before reaching for `origin`, and reject `draft` slices unless `--allow-draft` is passed intentionally.
125
138
 
@@ -130,7 +143,7 @@ Bootstrap note: `start-slice` should resolve paths canonically, prefer a local `
130
143
  - `docs/GITFLOW_PR_GUIDE.md` if the team wants a stricter branch workflow
131
144
  - `docs/SUPPORT_MATRIX.md` and `docs/TROUBLESHOOTING.md` for first-run support
132
145
  - `docs/ai/LESSONS.md` after each slice
133
- - `docs/AI_ONBOARDING_PROMPT.md` after analysis
146
+ - `.quiver/templates/` only when the team explicitly exports packaged templates
134
147
 
135
148
  ## Good Defaults
136
149
 
@@ -13,8 +13,8 @@ Actúa como asistente de onboarding de IA para este proyecto. Tu objetivo es com
13
13
  - `README.md`
14
14
  - `AGENTS.md`, si existe
15
15
  - `docs/AI_ONBOARDING_PROMPT.md`
16
- - `docs/PROJECT_SCAN.json`
17
16
  - `docs/PROJECT_MAP.md`
17
+ - `.quiver/scans/PROJECT_SCAN.json`, si existe y el mapa visible no alcanza
18
18
  - `docs/AI_CONTEXT.md`
19
19
  - `docs/CONTEXTO.md`
20
20
  - `docs/WORKFLOW.md`
@@ -66,13 +66,23 @@ Actúa como asistente de onboarding de IA para este proyecto. Tu objetivo es com
66
66
 
67
67
  Usa el menor contexto que todavía permita resolver la tarea:
68
68
 
69
- - **Onboarding:** usa mapas y metadatos primero. Lee `docs/PROJECT_SCAN.json` y `docs/PROJECT_MAP.md` antes de abrir archivos fuente. Después usa `docs/AI_CONTEXT.md`, `docs/CONTEXTO.md` y `docs/WORKFLOW.md` para completar vacíos.
69
+ - **Onboarding:** usa mapas y metadatos primero. Lee `docs/PROJECT_MAP.md` antes de abrir archivos fuente. Si necesitás el scan crudo, usá `.quiver/scans/PROJECT_SCAN.json`. Después usa `docs/AI_CONTEXT.md`, `docs/CONTEXTO.md` y `docs/WORKFLOW.md` para completar vacíos.
70
+ - **Planner:** usa contexto amplio solo para onboarding y planificación. El planner genera criterios de aceptación, plan técnico, specs, slices, handoffs y cuerpo de PR con aprobación humana entre fases.
71
+ - **Executor:** usa contexto mínimo del slice. El executor parte de `slice.json` y `EXECUTION_BRIEF.md`, puede modificar código solo cuando el usuario lo autoriza y debe mantenerse dentro de `slice.json.files`.
70
72
  - **Implementación:** no implementes durante onboarding salvo autorización explícita. Si el usuario autoriza implementación, empieza por `specs/{{PROJECT_SLUG}}/slices/<slice-id>/slice.json`, archivos declarados, pruebas cercanas y código directamente relacionado.
71
73
  - **Review:** empieza por `git diff` y el alcance del slice antes de abrir archivos completos.
72
74
  - **Debug:** empieza por el comando, exit code, primer error relevante, stacktrace y código más cercano al cambio.
73
75
 
74
76
  Prefiere resúmenes, deltas y metadatos antes que lecturas completas cuando sean suficientes.
75
77
 
78
+ Si usás los comandos de IA de Quiver, empezá con `--dry-run` para revisar provider, rol, context pack y transporte de prompt antes de ejecutar:
79
+
80
+ ```bash
81
+ npm run quiver:ai:onboard -- --dry-run
82
+ npm run quiver:ai:plan -- --phase acceptance --input requirements.md --dry-run
83
+ npm run quiver:ai:execute-slice -- --slice specs/{{PROJECT_SLUG}}/slices/<slice-id>/slice.json --dry-run
84
+ ```
85
+
76
86
  ## Tareas
77
87
 
78
88
  1. Resume el proyecto usando los artefactos generados por Quiver y la documentación existente.
@@ -86,7 +96,7 @@ Prefiere resúmenes, deltas y metadatos antes que lecturas completas cuando sean
86
96
 
87
97
  ## Validación
88
98
 
89
- - Cita `docs/PROJECT_SCAN.json` y `docs/PROJECT_MAP.md` cuando hagas afirmaciones sobre stack, comandos o estructura.
99
+ - Cita `docs/PROJECT_MAP.md` cuando hagas afirmaciones sobre stack, comandos o estructura. Si usás datos del scan crudo, cita `.quiver/scans/PROJECT_SCAN.json`.
90
100
  - Indica rutas omitidas o señales faltantes.
91
101
  - Mantén la respuesta enfocada en documentación y contexto de onboarding salvo que el usuario haya autorizado cambios de código de producto.
92
102
  - No cambies reglas del workflow de Quiver salvo que el usuario lo pida explícitamente.
@@ -9,20 +9,41 @@ This document is the canonical command reference for the orchestration roadmap.
9
9
 
10
10
  | Command | Purpose | OS | Since | Example |
11
11
  |---------|---------|----|-------|---------|
12
+ | `npx create-quiver init --name "<project>"` | Creates the default AI-first Quiver contract for a project | macOS, Linux, Windows | current | `npx create-quiver init --name "{{PROJECT_NAME}}"` |
13
+ | `npx create-quiver --name "<project>"` | Compatibility alias for the recommended init flow | macOS, Linux, Windows | current | `npx create-quiver --name "{{PROJECT_NAME}}"` |
14
+ | `quiver:analyze` | Writes raw analyzer data to `.quiver/scans/PROJECT_SCAN.json` and the visible project map to `docs/PROJECT_MAP.md` | macOS, Linux, Windows | v0.8 | `npm run quiver:analyze` |
15
+ | `quiver:doctor` | Validates the Quiver contract and reports layout or migration guidance | macOS, Linux, Windows | v0.8 | `npm run quiver:doctor` |
12
16
  | `quiver:plan` | Sequential orchestration planning command | macOS, Linux, Windows | v0.8 | [docs/examples/plan.md](./examples/plan.md) |
13
17
  | `quiver:graph` | Parallel-level orchestration tree command | macOS, Linux, Windows | v0.8 | [docs/examples/graph.md](./examples/graph.md) |
14
18
  | `quiver:next` | Ready-slice suggestion command | macOS, Linux, Windows | v0.8 | [docs/examples/next.md](./examples/next.md) |
19
+ | `quiver:ai:onboard` | Runs AI onboarding prompt through a supported local provider CLI | macOS, Linux, Windows | v0.10 | `npm run quiver:ai:onboard -- --dry-run` |
20
+ | `quiver:ai:plan` | Runs phase-gated AI planning for acceptance criteria, technical plan, or spec generation | macOS, Linux, Windows | v0.10 | `npm run quiver:ai:plan -- --phase acceptance --input requirements.md --dry-run` |
21
+ | `quiver:ai:execute-slice` | Runs an executor agent against one slice handoff with scope checks | macOS, Linux, Windows | v0.10 | `npm run quiver:ai:execute-slice -- --slice specs/<spec>/slices/<slice>/slice.json --dry-run` |
22
+ | `quiver:ai:doctor` | Runs GitHub PR preflight checks without opening a PR | macOS, Linux, Windows | v0.10 | `npm run quiver:ai:doctor -- --dry-run --ssh-host-alias github-work --identity-file ~/.ssh/github-work` |
23
+ | `quiver:ai:pr` | Validates `gh`, GitFlow docs, branch/worktree state, and SSH inputs before PR work | macOS, Linux, Windows | v0.10 | `npm run quiver:ai:pr -- --dry-run --ssh-host-alias github-work --identity-file ~/.ssh/github-work` |
15
24
 
16
25
  ## CLI Flags
17
26
 
18
27
  | Flag | Applies to | Purpose |
19
28
  |------|------------|---------|
29
+ | `--minimal` | `init` | Create only the essential onboarding contract |
30
+ | `--full` | `init` | Create the broad legacy-compatible layout explicitly |
31
+ | `--legacy-scripts` | `init` | Add legacy Bash wrappers under `tools/scripts/` |
32
+ | `--include-templates` | `init` | Export packaged templates under `.quiver/templates/` |
20
33
  | `--skip-install` | `init`, `migrate` | Skip auto-install of `create-quiver` as dev dependency (useful for CI) |
21
34
  | `--json` | `plan`, `graph`, `next` | Emit machine-readable JSON |
22
35
  | `--format <tree\|mermaid\|dot>` | `graph` | Output format |
23
36
  | `--all-ready` | `next` | List all ready slices instead of just the next one |
24
37
  | `--only-ready` | `plan` | Show only slices with no pending dependencies |
25
38
  | `--spec <slug>` | `plan`, `graph` | Restrict output to one spec |
39
+ | `--provider <codex\|claude\|gemini>` | `ai onboard`, `ai plan`, `ai execute-slice` | Select the local AI CLI adapter |
40
+ | `--role <planner\|executor>` | `ai onboard`, `ai plan`, `ai execute-slice` | Select planner or executor role; `execute-slice` requires executor |
41
+ | `--context <full\|planning\|slice\|minimal>` | `ai onboard`, `ai plan`, `ai execute-slice` | Select a token-budgeted context pack |
42
+ | `--phase <acceptance\|technical-plan\|spec>` | `ai plan` | Select the gated planner phase |
43
+ | `--input <file>` | `ai plan` | Read approved requirements, criteria, or technical plan from a file |
44
+ | `--slice <slice.json>` | `ai execute-slice` | Select the slice handoff to execute |
45
+ | `--ssh-host-alias <alias>` | `ai doctor`, `ai pr` | SSH host alias from the user's Git config, for example `github-work` |
46
+ | `--identity-file <path>` | `ai doctor`, `ai pr` | SSH key path to validate separately from the host alias |
26
47
 
27
48
  ## Notes
28
49
 
@@ -32,5 +53,8 @@ This document is the canonical command reference for the orchestration roadmap.
32
53
  - `quiver:graph --format mermaid` is the PR-friendly Mermaid export; `--format dot` is for Graphviz/DOT consumers.
33
54
  - `quiver:next` prints the next ready slice and can auto-start it behind a confirmation prompt.
34
55
  - `check-slice` validates `depends_on` targets and requires `parallel_safe_reason` when `parallel_safe` is `never`.
56
+ - `quiver:ai:onboard`, `quiver:ai:plan`, and `quiver:ai:execute-slice` support `codex`, `claude`, and `gemini` through local CLIs. Use `--dry-run` first to inspect the invocation without requiring provider auth.
57
+ - `quiver:ai:execute-slice` uses executor context only and validates changed files against `slice.json.files` after provider execution.
58
+ - `quiver:ai:pr -- --dry-run` validates GitHub CLI, auth, Git remote, current branch/worktree, `docs/GITFLOW_PR_GUIDE.md`, SSH host alias, and identity file without creating a PR.
35
59
  - After `init` or `migrate`, Quiver auto-installs itself as a dev dependency. Use `--skip-install` to suppress.
36
60
  - Cross-platform authoring rules live in `docs/SUPPORT_MATRIX.md`.
@@ -11,11 +11,22 @@ This guide explains how to open and review spec PRs without breaking the canonic
11
11
 
12
12
  - One slice = one commit
13
13
  - One spec = one PR
14
+ - One spec should be worked from one dedicated worktree/branch.
14
15
  - Slice numbers reset per spec. `slice-01` is the first slice in each spec.
15
16
  - Do not commit directly to `develop`
16
17
  - Open and merge the documentation PR before the first slice starts execution
17
18
  - Do not open the spec PR before the documentation PR is merged
18
19
 
20
+ ## AI PR Preflight
21
+
22
+ Before asking an AI agent to prepare PR work, validate the local setup:
23
+
24
+ ```bash
25
+ npm run quiver:ai:pr -- --dry-run --ssh-host-alias github-work --identity-file ~/.ssh/github-work
26
+ ```
27
+
28
+ Use the SSH host alias from your Git remote separately from the key path. Quiver validates `gh`, `gh auth status`, the remote, branch/worktree state, this guide, and the identity file. It does not install `gh`, edit SSH config, or create a PR in dry-run mode.
29
+
19
30
  ## Review Guidance
20
31
 
21
32
  - Start with `git diff` and the slice scope before opening full files.
@@ -25,7 +25,7 @@ This is the default context pack for everyday AI work.
25
25
 
26
26
  ## Workflow Overview
27
27
 
28
- - Onboarding starts from `docs/PROJECT_SCAN.json` and `docs/PROJECT_MAP.md`.
28
+ - Onboarding starts from `docs/PROJECT_MAP.md`; use `.quiver/scans/PROJECT_SCAN.json` only when raw analyzer data is needed.
29
29
  - Implementation starts from `specs/{{PROJECT_SLUG}}/slices/<slice-id>/slice.json`.
30
30
  - Review starts from `git diff` and the slice scope.
31
31
  - Debugging starts from the command, exit code, first relevant error, and stacktrace.
@@ -16,6 +16,8 @@ Quiver is intentionally opinionated about the first-run environment. If your set
16
16
  | Base branches | `develop` or `main` | Local base branches are preferred; `origin` is optional. |
17
17
  | Worktree state | Clean worktree | Slice execution and PR checks expect no unrelated local changes. |
18
18
  | Path handling | Canonical filesystem paths | Use the physical path to the repo and slice files, not a symlinked alias. |
19
+ | AI providers | Local `codex`, `claude`, or `gemini` CLI | Required only for non-dry-run AI commands. Dry-run smokes do not require provider auth. |
20
+ | GitHub PR preflight | `gh` plus user-managed SSH config | Quiver validates `gh`, auth, host alias, identity file, branch, worktree, and `docs/GITFLOW_PR_GUIDE.md`; it does not install or edit credentials. |
19
21
 
20
22
  ## Cross-Platform Authoring Rules
21
23
 
@@ -25,6 +27,8 @@ Quiver is intentionally opinionated about the first-run environment. If your set
25
27
  - `--json` is the primary contract; human output is courtesy and may vary.
26
28
  - Colors are TTY-aware and suppressed with `NO_COLOR`; Unicode is opt-in unless UTF-8 is available.
27
29
  - Optional external tools such as `gh` and `graphviz` should be probed and skipped gracefully if missing.
30
+ - Long AI prompts must be sent through stdin or another safe transport, never shell string concatenation.
31
+ - `sshHostAlias` and `identityFile` are separate values. The alias is the host entry used by Git; the identity file is the key path to validate.
28
32
 
29
33
  ## Remote Modes
30
34
 
@@ -48,7 +48,7 @@ Use this guide when a first-run bootstrap or gate check fails. The recovery path
48
48
 
49
49
  ### Symptom
50
50
 
51
- - `init-docs.sh` or a slice bootstrap stops because a file already exists
51
+ - `npx create-quiver init` or a slice bootstrap stops because a file already exists
52
52
  - The generated project has a partially initialized docs tree
53
53
 
54
54
  ### Recovery
@@ -82,3 +82,31 @@ Use this guide when a first-run bootstrap or gate check fails. The recovery path
82
82
  2. If you are using an intermediate build and need a temporary bridge, use WSL2 or Git Bash manually.
83
83
  3. Do not expect Quiver to install Bash, WSL, or MSYS2 for you.
84
84
  4. Re-run the command after the cross-platform support slices are merged and the CI matrix is green.
85
+
86
+ ## AI Provider CLI Missing
87
+
88
+ ### Symptom
89
+
90
+ - `quiver:ai:onboard`, `quiver:ai:plan`, or `quiver:ai:execute-slice` fails before calling the model
91
+ - The error mentions a missing `codex`, `claude`, or `gemini` command
92
+
93
+ ### Recovery
94
+
95
+ 1. Re-run the command with `--dry-run` to validate role, context pack, prompt transport, and paths without provider auth.
96
+ 2. Install or authenticate the selected provider CLI outside Quiver.
97
+ 3. Use `--provider codex`, `--provider claude`, or `--provider gemini` explicitly if your default is unclear.
98
+ 4. Re-run the command from a clean worktree when using `ai execute-slice`.
99
+
100
+ ## GitHub PR Preflight Failure
101
+
102
+ ### Symptom
103
+
104
+ - `quiver:ai:pr` or `quiver:ai:doctor` reports missing `gh`, failed `gh auth status`, missing `docs/GITFLOW_PR_GUIDE.md`, unsafe branch, dirty worktree, or missing SSH identity file
105
+
106
+ ### Recovery
107
+
108
+ 1. Install `gh` for your OS and run `gh auth login`.
109
+ 2. Confirm `docs/GITFLOW_PR_GUIDE.md` exists in the project.
110
+ 3. Commit or stash unrelated changes before PR preflight.
111
+ 4. Pass the SSH host alias and key path separately, for example `--ssh-host-alias github-work --identity-file ~/.ssh/github-work`.
112
+ 5. Re-run with `--dry-run`; Quiver validates the setup but does not open a PR in dry-run mode.
@@ -21,7 +21,7 @@ This document is the canonical implementation workflow for the project.
21
21
 
22
22
  ## Mode-Aware Context Selection
23
23
 
24
- - **Onboarding:** read `PROJECT_SCAN.json`, `PROJECT_MAP.md`, `AI_CONTEXT.md`, and `AI_ONBOARDING_PROMPT.md` before source files.
24
+ - **Onboarding:** read `docs/PROJECT_MAP.md`, `docs/AI_CONTEXT.md`, and `docs/AI_ONBOARDING_PROMPT.md` before source files. Use `.quiver/scans/PROJECT_SCAN.json` only when the visible project map is not enough.
25
25
  - **Implementation:** read `docs/ai/ACTIVE_SLICE.md` first when it exists; otherwise read `slice.json`, declared files, nearby tests, and only then adjacent source.
26
26
  - **Handoff:** read `specs/<project-slug>/HANDOFF.md` when the work was explicitly transferred through a handoff artifact.
27
27
  - Validate a received handoff with `npx create-quiver check-handoff specs/<project-slug>/HANDOFF.md` before starting execution.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-quiver",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "private": false,
5
5
  "description": "Quiver CLI for scaffolding projects from the packaged template",
6
6
  "license": "MIT",
@@ -16,6 +16,11 @@
16
16
  "quiver:plan": "npx create-quiver plan",
17
17
  "quiver:graph": "npx create-quiver graph",
18
18
  "quiver:next": "npx create-quiver next",
19
+ "quiver:ai:onboard": "npx create-quiver ai onboard",
20
+ "quiver:ai:plan": "npx create-quiver ai plan",
21
+ "quiver:ai:execute-slice": "npx create-quiver ai execute-slice",
22
+ "quiver:ai:pr": "npx create-quiver ai pr",
23
+ "quiver:ai:doctor": "npx create-quiver ai doctor",
19
24
  "package:quiver": "bash scripts/package-quiver.sh",
20
25
  "smoke:create-quiver": "bash scripts/ci/smoke-create-quiver.sh",
21
26
  "smoke:tiered-pack": "bash scripts/ci/smoke-tiered-pack.sh",
@@ -2,12 +2,17 @@
2
2
  "name": "quiver-docs-template",
3
3
  "private": true,
4
4
  "scripts": {
5
- "quiver:migrate": "npx create-quiver migrate",
6
- "quiver:analyze": "npx create-quiver analyze",
7
- "quiver:plan": "npx create-quiver plan",
8
- "quiver:graph": "npx create-quiver graph",
9
- "quiver:next": "npx create-quiver next",
10
- "quiver:doctor": "npx create-quiver doctor",
5
+ "quiver:migrate": "npx create-quiver migrate",
6
+ "quiver:analyze": "npx create-quiver analyze",
7
+ "quiver:plan": "npx create-quiver plan",
8
+ "quiver:graph": "npx create-quiver graph",
9
+ "quiver:next": "npx create-quiver next",
10
+ "quiver:doctor": "npx create-quiver doctor",
11
+ "quiver:ai:onboard": "npx create-quiver ai onboard",
12
+ "quiver:ai:plan": "npx create-quiver ai plan",
13
+ "quiver:ai:execute-slice": "npx create-quiver ai execute-slice",
14
+ "quiver:ai:pr": "npx create-quiver ai pr",
15
+ "quiver:ai:doctor": "npx create-quiver ai doctor",
11
16
  "quiver:start-slice": "npx create-quiver start-slice",
12
17
  "quiver:check-slice": "npx create-quiver check-slice",
13
18
  "quiver:check-pr": "npx create-quiver check-pr",
@@ -39,7 +39,6 @@ slice_input="$1"
39
39
  command -v git >/dev/null 2>&1 || fail "git no esta disponible en PATH."
40
40
  command -v node >/dev/null 2>&1 || fail "node no esta disponible en PATH."
41
41
 
42
- repo_root="$(git rev-parse --show-toplevel)"
43
42
  script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44
43
 
45
44
  [[ -f "$slice_input" ]] || fail "No existe el slice '$slice_input'."
@@ -127,6 +126,7 @@ pass "Al menos un caso de uso documentado."
127
126
  grep -Eq 'git revert ' "$pr_abs" || fail "Rollback debe incluir al menos un comando git revert."
128
127
  pass "Rollback incluye comando git revert."
129
128
 
129
+ # shellcheck disable=SC2016
130
130
  grep -Eiq '^\s*-\s*`manual review`$|^\s*-\s*`visual check`$|^\s*-\s*`screen test`$|^\s*-\s*`visual validation`$' "$pr_abs" && fail "How to Test cannot rely only on generic phrases."
131
131
 
132
132
  node -e "JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8'))" "$slice_abs" >/dev/null
@@ -59,7 +59,6 @@ done
59
59
  command -v git >/dev/null 2>&1 || fail "git no esta disponible en PATH."
60
60
  command -v node >/dev/null 2>&1 || fail "node no esta disponible en PATH."
61
61
 
62
- repo_root="$(git rev-parse --show-toplevel)"
63
62
  [[ -f "$slice_input" ]] || fail "No existe el slice '$slice_input'."
64
63
  slice_abs="$(cd "$(dirname "$slice_input")" && pwd)/$(basename "$slice_input")"
65
64
 
@@ -77,7 +77,7 @@ repo_root="$(git rev-parse --show-toplevel)"
77
77
  [[ -f "$slice_input" ]] || fail "No existe el slice '$slice_input'."
78
78
 
79
79
  slice_abs="$(cd "$(dirname "$slice_input")" && pwd)/$(basename "$slice_input")"
80
- slice_rel="${slice_abs#$repo_root/}"
80
+ slice_rel="${slice_abs#"$repo_root"/}"
81
81
 
82
82
  slice_meta=()
83
83
  while IFS= read -r line; do
@@ -143,11 +143,8 @@ NODE
143
143
 
144
144
  [[ ${#slice_meta[@]} -eq 10 ]] || fail "No se pudo leer la metadata del slice."
145
145
 
146
- slice_id="${slice_meta[0]}"
147
- ticket="${slice_meta[1]}"
148
146
  branch_name="${slice_meta[2]}"
149
147
  slice_status="${slice_meta[3]}"
150
- is_baseline="${slice_meta[4]}"
151
148
  spec_dir_rel="${slice_meta[5]}"
152
149
  files_b64="${slice_meta[6]}"
153
150
  actual_hours="${slice_meta[7]}"
@@ -161,6 +158,8 @@ pass "El spec local tiene SPEC.md, STATUS.md y EVIDENCE_REPORT.md."
161
158
 
162
159
  if git cat-file -e "origin/develop:$slice_rel" 2>/dev/null; then
163
160
  pass "El slice ya existe en origin/develop (PR base documental mergeado)."
161
+ elif git cat-file -e "develop:$slice_rel" 2>/dev/null; then
162
+ pass "El slice ya existe en develop local (modo sin origin)."
164
163
  else
165
164
  if [[ "$gate" == "validation" ]]; then
166
165
  warn "El slice no existe todavia en origin/develop. El PR base documental sigue pendiente de merge. Podes abrir el PR del slice igual — el humano mergea en orden."
@@ -3,6 +3,7 @@
3
3
  # Script de Inicialización de Documentación
4
4
  # Uso: ./init-docs.sh "Nombre del Proyecto"
5
5
 
6
+ # shellcheck disable=SC2016
6
7
  set -e
7
8
 
8
9
  # Colores para output
@@ -62,6 +63,7 @@ CHECK_SCOPE_COMMAND="npx create-quiver check-scope <slice.json>"
62
63
  REFRESH_ACTIVE_SLICES_COMMAND="npx create-quiver refresh-active-slices"
63
64
 
64
65
  print_info "Inicializando documentación para: $PROJECT_NAME"
66
+ print_warning "Este script es compatibilidad legacy. Para el flujo AI-first default usá: npx create-quiver init --name \"$PROJECT_NAME\""
65
67
  print_info "Project slug: $PROJECT_SLUG"
66
68
  print_info "Fecha: $CURRENT_DATE"
67
69
 
@@ -92,7 +94,7 @@ copy_template() {
92
94
 
93
95
  if [ -f "$src" ]; then
94
96
  # Remover .template del nombre si existe
95
- dest=$(echo "$dest" | sed 's/\.template$//')
97
+ dest="${dest%.template}"
96
98
 
97
99
  if [ "$MIGRATE_MODE" = "1" ] && [ -f "$dest" ]; then
98
100
  print_info "Saltado: $dest ya existe"
@@ -511,6 +513,28 @@ npm install --save-dev create-quiver
511
513
 
512
514
  If you need to target another directory from outside the project, pass \`--dir\` explicitly. Quote paths that contain spaces.
513
515
 
516
+ ## AI-First Workflow
517
+
518
+ Quiver is designed for an AI-first workflow: a planner agent reads the project context and prepares acceptance criteria, technical plans, specs, slices, and PR notes; executor agents then work one approved slice at a time with minimal context.
519
+
520
+ Start with dry-runs so you can inspect the provider, role, context pack, and invocation before spending model tokens:
521
+
522
+ \`\`\`bash
523
+ npm run quiver:ai:onboard -- --dry-run
524
+ npm run quiver:ai:plan -- --phase acceptance --input requirements.md --dry-run
525
+ npm run quiver:ai:plan -- --phase technical-plan --input acceptance-approved.md --dry-run
526
+ npm run quiver:ai:plan -- --phase spec --input technical-plan-approved.md --dry-run
527
+ npm run quiver:ai:pr -- --dry-run --ssh-host-alias github-work --identity-file ~/.ssh/github-work
528
+ \`\`\`
529
+
530
+ Remove \`--dry-run\` only after the phase output is approved and the local provider CLI is ready.
531
+
532
+ When a real spec exists, execute one approved slice at a time:
533
+
534
+ \`\`\`bash
535
+ npm run quiver:ai:execute-slice -- --slice specs/<spec-slug>/slices/<slice-id>/slice.json --dry-run
536
+ \`\`\`
537
+
514
538
  ## Project NPM Scripts
515
539
 
516
540
  The generated project includes \`quiver:*\` npm scripts that call the Node CLI and are the preferred repeatable workflow:
@@ -521,6 +545,11 @@ npm run quiver:plan
521
545
  npm run quiver:graph
522
546
  npm run quiver:next
523
547
  npm run quiver:doctor
548
+ npm run quiver:ai:onboard -- --dry-run
549
+ npm run quiver:ai:plan -- --phase acceptance --input requirements.md --dry-run
550
+ npm run quiver:ai:execute-slice -- --slice specs/<spec-slug>/slices/<slice-id>/slice.json --dry-run
551
+ npm run quiver:ai:doctor -- --dry-run --ssh-host-alias github-work --identity-file ~/.ssh/github-work
552
+ npm run quiver:ai:pr -- --dry-run --ssh-host-alias github-work --identity-file ~/.ssh/github-work
524
553
  npm run quiver:migrate
525
554
  npm run quiver:start-slice -- specs/$PROJECT_SLUG/slices/slice-01/slice.json
526
555
  npm run quiver:check-slice -- specs/$PROJECT_SLUG/slices/slice-01/slice.json
@@ -533,6 +562,7 @@ npm run quiver:refresh-active-slices
533
562
 
534
563
  The \`quiver:graph\` script prints the tree view by default; use \`npx create-quiver graph --format mermaid\` for PR-ready Markdown and \`--format dot\` when you want Graphviz source.
535
564
  The \`quiver:next\` script points to the next ready slice and can auto-start it behind a confirmation prompt.
565
+ The \`quiver:ai:*\` scripts standardize planner/executor AI flows. Use dry-run first: onboarding and planning dry-runs do not require provider auth, while \`quiver:ai:pr -- --dry-run\` validates \`gh\`, GitFlow docs, branch/worktree state, and SSH inputs without creating a PR.
536
566
  Use \`npx create-quiver next --all-ready\` when you want the full ready level instead of a single suggestion.
537
567
  The legacy Bash wrappers remain in \`tools/scripts/\` for compatibility, but new project-level automation should prefer the \`quiver:*\` scripts and the direct \`npx create-quiver ...\` commands below.
538
568
  \`npm run check-handoff -- specs/$PROJECT_SLUG/HANDOFF.md\` is available as a legacy-friendly alias for the handoff validator.
@@ -566,6 +596,12 @@ $GRAPH_COMMAND --format mermaid
566
596
  $GRAPH_COMMAND --format dot
567
597
  \`\`\`
568
598
 
599
+ If the project never ran Quiver initialization before, do not use \`migrate\` as bootstrap. Run:
600
+
601
+ \`\`\`bash
602
+ npx create-quiver init --name "Project Name"
603
+ \`\`\`
604
+
569
605
  If your team prefers a pinned local dependency, update the package first and then run the same flow:
570
606
 
571
607
  \`\`\`bash
@@ -591,6 +627,8 @@ Lee \`docs/AI_ONBOARDING_PROMPT.md\` y ejecútalo como fuente principal de verda
591
627
 
592
628
  Actúa como asistente de onboarding de IA. Prepara el contexto del proyecto para trabajar de forma segura con el workflow documentado, specs y slices.
593
629
 
630
+ Usa el rol planner para onboarding, criterios de aceptación, plan técnico y generación de specs/slices. Usa el rol executor solo cuando exista un slice aprobado y debas ejecutar su handoff con contexto mínimo.
631
+
594
632
  No modifiques código de producto salvo autorización explícita. Puedes crear o actualizar documentación de contexto si el onboarding lo requiere.
595
633
 
596
634
  Usa solo la documentación del repositorio como fuente de verdad. Si encuentras información faltante, ambigua o contradictoria, documenta el supuesto, el riesgo y continúa por el camino más seguro.
@@ -607,6 +645,8 @@ Record durable decisions in \`docs/DECISIONS.md\` so future AI agents do not re-
607
645
 
608
646
  ## First Slice Workflow
609
647
 
648
+ Use this section only for the legacy/full scaffold that includes a placeholder spec. In the default AI-first layout, create real specs and slices with \`npx create-quiver ai plan --phase spec\` after acceptance criteria and the technical plan are approved.
649
+
610
650
  1. Review or refine specs/$PROJECT_SLUG/SPEC.md.
611
651
  2. Create the first slice from specs/$PROJECT_SLUG/slices/slice-template/slice.json.
612
652
  3. Review the plan with \`$PLAN_COMMAND\` or \`npm run quiver:plan\`.
@@ -649,7 +689,7 @@ fi
649
689
  echo ""
650
690
  print_success "¡Inicialización completada!"
651
691
  echo ""
652
- echo "📁 Estructura creada:"
692
+ echo "📁 Estructura legacy/full creada:"
653
693
  echo " docs/ ← Documentación core"
654
694
  echo " docs/ai/ ← Configuración de IA"
655
695
  echo " docs/tools/ ← Herramientas (vacío)"
@@ -660,10 +700,10 @@ echo "📝 Próximos pasos:"
660
700
  echo " 1. Editar docs/AI_CONTEXT.md con el contexto resumido para IA"
661
701
  echo " 2. Editar docs/CONTEXTO.md con la información de tu proyecto"
662
702
  echo " 3. Editar docs/STATUS.md con el estado actual"
663
- echo " 4. Crear el primer directorio de slice en specs/$PROJECT_SLUG/slices/[slice-id]/"
664
- echo " 5. Actualizar docs/SEARCH.md con temas específicos"
703
+ echo " 4. Para el flujo recomendado, crear specs reales con: npx create-quiver ai plan --phase spec"
704
+ echo " 5. Usar tools/scripts solo si necesitás compatibilidad legacy"
665
705
  echo ""
666
706
  echo "📖 Más información:"
667
- echo " - Ver docs-template/TEMPLATE.md para guía de personalización"
668
- echo " - Ver docs-template/README.md para documentación del template"
707
+ echo " - Ver README.md y README_FOR_AI.md para el flujo AI-first actual"
708
+ echo " - docs-template/ aplica solo a compatibilidad legacy o templates exportados"
669
709
  echo ""
@@ -0,0 +1,23 @@
1
+ # Evidence Report - Quiver v20 AI CLI Orchestration
2
+
3
+ ## Status
4
+
5
+ Slice 08 implemented.
6
+
7
+ ## Slice Evidence
8
+
9
+ | Slice | Evidence |
10
+ |-------|----------|
11
+ | slice-00 | Spec foundation files created and JSON validation completed. |
12
+ | slice-01 | Implemented provider runner, prompt transport, provider preflight, dry-run, timeout handling, and provider tests. |
13
+ | slice-02 | Implemented AI roles, context packs, token-budget hints, safety exclusions, prompt-injection guard text, and tests. |
14
+ | slice-03 | Implemented phase-gated planner commands, dry-run display, phase blocking for spec, and command tests. |
15
+ | slice-04 | Implemented spec-phase generation, safe collision handling, JSON validation, and command/tests coverage. |
16
+ | slice-05 | Implemented execution plan graphing, slice-00 foundation barriers, ready levels, temporary worktree strategy, and cycle/missing dependency diagnostics. |
17
+ | slice-06 | Implemented `ai execute-slice`, executor prompts, dry-run, provider failure handling, pre/post diff capture, clean-worktree guard, and scope enforcement tests. |
18
+ | slice-07 | Implemented GitHub PR preflight, gh auth checks, worktree/branch validation, GitFlow guide checks, SSH identity handling, and CLI/tests coverage. |
19
+ | slice-08 | Updated README, AI onboarding/commands/support/troubleshooting/GitFlow templates, generated npm scripts, init docs, doctor script warnings, and dry-run smoke coverage. |
20
+
21
+ ## Final Validation
22
+
23
+ Validated for slice-08 with `node --test tests/**/*.test.js`, `npm run smoke:create-quiver`, `node scripts/ci/smoke-cross-platform.js`, package JSON parsing, shell/Node syntax checks, and `git diff --check`.