create-quiver 0.9.0 → 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 (111) hide show
  1. package/README.md +312 -124
  2. package/README_FOR_AI.md +59 -45
  3. package/ROADMAP.md +12 -11
  4. package/docs/AI_ONBOARDING_PROMPT.md.template +120 -52
  5. package/docs/COMMANDS.md.template +41 -6
  6. package/docs/GITFLOW_PR_GUIDE.md.template +11 -0
  7. package/docs/STANDARD.md.template +1 -1
  8. package/docs/SUPPORT_MATRIX.md.template +4 -0
  9. package/docs/TROUBLESHOOTING.md.template +29 -1
  10. package/docs/WORKFLOW.md.template +1 -1
  11. package/package.json +6 -1
  12. package/package.template.json +11 -6
  13. package/scripts/check-pr-readiness.sh +1 -1
  14. package/scripts/check-scope.sh +0 -1
  15. package/scripts/check-slice-readiness.sh +3 -4
  16. package/scripts/init-docs.sh +55 -9
  17. package/specs/quiver-v19-self-install-dev-dep/EVIDENCE_REPORT.md +2 -2
  18. package/specs/quiver-v19-self-install-dev-dep/STATUS.md +4 -4
  19. package/specs/quiver-v19-self-install-dev-dep/slices/slice-01-auto-install-dev-dep/slice.json +4 -4
  20. package/specs/quiver-v20-ai-cli-orchestration/EVIDENCE_REPORT.md +23 -0
  21. package/specs/quiver-v20-ai-cli-orchestration/EXECUTION_PLAN.md +57 -0
  22. package/specs/quiver-v20-ai-cli-orchestration/SPEC.md +202 -0
  23. package/specs/quiver-v20-ai-cli-orchestration/STATUS.md +35 -0
  24. package/specs/quiver-v20-ai-cli-orchestration/pr.md +100 -0
  25. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +30 -0
  26. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +61 -0
  27. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-00-spec-foundation/slice.json +54 -0
  28. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-01-ai-provider-runner/CLOSURE_BRIEF.md +39 -0
  29. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-01-ai-provider-runner/EXECUTION_BRIEF.md +63 -0
  30. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-01-ai-provider-runner/slice.json +55 -0
  31. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-02-context-packs-token-budget/CLOSURE_BRIEF.md +40 -0
  32. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-02-context-packs-token-budget/EXECUTION_BRIEF.md +60 -0
  33. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-02-context-packs-token-budget/slice.json +54 -0
  34. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-03-ai-phase-gated-planner/CLOSURE_BRIEF.md +43 -0
  35. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-03-ai-phase-gated-planner/EXECUTION_BRIEF.md +62 -0
  36. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-03-ai-phase-gated-planner/slice.json +62 -0
  37. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-04-spec-slice-handoff-pr-generation/CLOSURE_BRIEF.md +36 -0
  38. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-04-spec-slice-handoff-pr-generation/EXECUTION_BRIEF.md +63 -0
  39. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-04-spec-slice-handoff-pr-generation/slice.json +59 -0
  40. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-05-execution-plan-parallel-worktrees/CLOSURE_BRIEF.md +32 -0
  41. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-05-execution-plan-parallel-worktrees/EXECUTION_BRIEF.md +61 -0
  42. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-05-execution-plan-parallel-worktrees/slice.json +59 -0
  43. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-06-ai-execute-slice-scope-enforcement/CLOSURE_BRIEF.md +36 -0
  44. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-06-ai-execute-slice-scope-enforcement/EXECUTION_BRIEF.md +64 -0
  45. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-06-ai-execute-slice-scope-enforcement/slice.json +65 -0
  46. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-07-github-pr-preflight/CLOSURE_BRIEF.md +36 -0
  47. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-07-github-pr-preflight/EXECUTION_BRIEF.md +66 -0
  48. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-07-github-pr-preflight/slice.json +63 -0
  49. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-08-docs-smokes-release-readiness/CLOSURE_BRIEF.md +35 -0
  50. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-08-docs-smokes-release-readiness/EXECUTION_BRIEF.md +64 -0
  51. package/specs/quiver-v20-ai-cli-orchestration/slices/slice-08-docs-smokes-release-readiness/slice.json +77 -0
  52. package/specs/quiver-v21-ai-first-layout/EVIDENCE_REPORT.md +31 -0
  53. package/specs/quiver-v21-ai-first-layout/EXECUTION_PLAN.md +185 -0
  54. package/specs/quiver-v21-ai-first-layout/SPEC.md +212 -0
  55. package/specs/quiver-v21-ai-first-layout/STATUS.md +37 -0
  56. package/specs/quiver-v21-ai-first-layout/pr.md +110 -0
  57. package/specs/quiver-v21-ai-first-layout/slices/slice-00-spec-foundation/CLOSURE_BRIEF.md +30 -0
  58. package/specs/quiver-v21-ai-first-layout/slices/slice-00-spec-foundation/EXECUTION_BRIEF.md +63 -0
  59. package/specs/quiver-v21-ai-first-layout/slices/slice-00-spec-foundation/slice.json +45 -0
  60. package/specs/quiver-v21-ai-first-layout/slices/slice-01-init-profiles-dry-run/CLOSURE_BRIEF.md +31 -0
  61. package/specs/quiver-v21-ai-first-layout/slices/slice-01-init-profiles-dry-run/EXECUTION_BRIEF.md +59 -0
  62. package/specs/quiver-v21-ai-first-layout/slices/slice-01-init-profiles-dry-run/slice.json +57 -0
  63. package/specs/quiver-v21-ai-first-layout/slices/slice-02-internal-layout-template-resolver/CLOSURE_BRIEF.md +32 -0
  64. package/specs/quiver-v21-ai-first-layout/slices/slice-02-internal-layout-template-resolver/EXECUTION_BRIEF.md +60 -0
  65. package/specs/quiver-v21-ai-first-layout/slices/slice-02-internal-layout-template-resolver/slice.json +58 -0
  66. package/specs/quiver-v21-ai-first-layout/slices/slice-03-generation-profiles-visible-contract/CLOSURE_BRIEF.md +34 -0
  67. package/specs/quiver-v21-ai-first-layout/slices/slice-03-generation-profiles-visible-contract/EXECUTION_BRIEF.md +61 -0
  68. package/specs/quiver-v21-ai-first-layout/slices/slice-03-generation-profiles-visible-contract/slice.json +64 -0
  69. package/specs/quiver-v21-ai-first-layout/slices/slice-04-analyze-scan-relocation/CLOSURE_BRIEF.md +32 -0
  70. package/specs/quiver-v21-ai-first-layout/slices/slice-04-analyze-scan-relocation/EXECUTION_BRIEF.md +58 -0
  71. package/specs/quiver-v21-ai-first-layout/slices/slice-04-analyze-scan-relocation/slice.json +64 -0
  72. package/specs/quiver-v21-ai-first-layout/slices/slice-05-empty-specs-layout-doctor/CLOSURE_BRIEF.md +32 -0
  73. package/specs/quiver-v21-ai-first-layout/slices/slice-05-empty-specs-layout-doctor/EXECUTION_BRIEF.md +60 -0
  74. package/specs/quiver-v21-ai-first-layout/slices/slice-05-empty-specs-layout-doctor/slice.json +65 -0
  75. package/specs/quiver-v21-ai-first-layout/slices/slice-06-legacy-migration-optional-assets/CLOSURE_BRIEF.md +31 -0
  76. package/specs/quiver-v21-ai-first-layout/slices/slice-06-legacy-migration-optional-assets/EXECUTION_BRIEF.md +62 -0
  77. package/specs/quiver-v21-ai-first-layout/slices/slice-06-legacy-migration-optional-assets/slice.json +66 -0
  78. package/specs/quiver-v21-ai-first-layout/slices/slice-07-docs-guidance-alignment/CLOSURE_BRIEF.md +33 -0
  79. package/specs/quiver-v21-ai-first-layout/slices/slice-07-docs-guidance-alignment/EXECUTION_BRIEF.md +61 -0
  80. package/specs/quiver-v21-ai-first-layout/slices/slice-07-docs-guidance-alignment/slice.json +67 -0
  81. package/specs/quiver-v21-ai-first-layout/slices/slice-08-smokes-release-readiness/CLOSURE_BRIEF.md +35 -0
  82. package/specs/quiver-v21-ai-first-layout/slices/slice-08-smokes-release-readiness/EXECUTION_BRIEF.md +66 -0
  83. package/specs/quiver-v21-ai-first-layout/slices/slice-08-smokes-release-readiness/slice.json +62 -0
  84. package/src/create-quiver/commands/ai.js +442 -0
  85. package/src/create-quiver/index.js +421 -84
  86. package/src/create-quiver/lib/ai/context-packs.js +158 -0
  87. package/src/create-quiver/lib/ai/execution-plan.js +254 -0
  88. package/src/create-quiver/lib/ai/executor.js +323 -0
  89. package/src/create-quiver/lib/ai/github.js +329 -0
  90. package/src/create-quiver/lib/ai/phase-gates.js +72 -0
  91. package/src/create-quiver/lib/ai/preflight.js +58 -0
  92. package/src/create-quiver/lib/ai/prompt-transport.js +81 -0
  93. package/src/create-quiver/lib/ai/prompts.js +39 -0
  94. package/src/create-quiver/lib/ai/providers.js +314 -0
  95. package/src/create-quiver/lib/ai/safety.js +151 -0
  96. package/src/create-quiver/lib/ai/spec-generator.js +314 -0
  97. package/src/create-quiver/lib/ai/spec-templates.js +715 -0
  98. package/src/create-quiver/lib/doctor.js +114 -0
  99. package/src/create-quiver/lib/git.js +21 -0
  100. package/src/create-quiver/lib/init-docs.js +286 -25
  101. package/src/create-quiver/lib/init-layout.js +426 -0
  102. package/src/create-quiver/lib/lifecycle.js +2 -2
  103. package/src/create-quiver/lib/paths.js +63 -2
  104. package/src/create-quiver/lib/project-scan.js +66 -0
  105. package/src/create-quiver/lib/readiness.js +4 -2
  106. package/src/create-quiver/lib/scope.js +125 -0
  107. package/src/create-quiver/lib/slice-graph.js +6 -0
  108. package/src/create-quiver/lib/slice.js +51 -8
  109. package/src/create-quiver/lib/state.js +18 -1
  110. package/src/create-quiver/lib/template-resolver.js +74 -0
  111. package/.claude/settings.local.json +0 -52
@@ -0,0 +1,100 @@
1
+ ## Title
2
+
3
+ Quiver v20 - AI CLI orchestration
4
+
5
+ ## Summary
6
+
7
+ Adds a spec for a Quiver AI orchestration layer that standardizes local AI CLI usage across planner and executor roles. The work introduces provider runners, token-efficient context packs, phase-gated planning, generated spec/slice/handoff artifacts, execution plans, executor scope enforcement, and GitHub PR preflight with `gh` and SSH validation.
8
+
9
+ ## Scope
10
+
11
+ - `quiver ai ...` command family
12
+ - Provider adapters for Codex, Claude, and Gemini CLIs
13
+ - Planner/executor roles
14
+ - Context packs and token budget rules
15
+ - Phase gates for criteria, plan, and spec generation
16
+ - Mandatory `slice-00`
17
+ - Spec/slice/handoff/PR body generation
18
+ - Execution plan with parallelization rules
19
+ - Executor scope enforcement
20
+ - `gh` and SSH preflight
21
+ - Documentation, generated scripts, and smoke coverage
22
+
23
+ ## Files
24
+
25
+ - `specs/quiver-v20-ai-cli-orchestration/SPEC.md`
26
+ - `specs/quiver-v20-ai-cli-orchestration/STATUS.md`
27
+ - `specs/quiver-v20-ai-cli-orchestration/EVIDENCE_REPORT.md`
28
+ - `specs/quiver-v20-ai-cli-orchestration/EXECUTION_PLAN.md`
29
+ - `specs/quiver-v20-ai-cli-orchestration/pr.md`
30
+ - `specs/quiver-v20-ai-cli-orchestration/slices/**`
31
+
32
+ Future implementation slices are expected to touch CLI source, AI library modules, tests, templates, generated docs, and smoke scripts as declared in each slice.
33
+
34
+ ## How to Test (DETAILED - REQUIRED)
35
+
36
+ ### Required Environment
37
+
38
+ - Node.js supported by Quiver
39
+ - npm
40
+ - Git
41
+ - `gh` for PR preflight slices
42
+ - Optional local provider CLIs for manual checks:
43
+ - `codex`
44
+ - `claude`
45
+ - `gemini`
46
+
47
+ ### Worktree Access
48
+
49
+ Use one worktree for this spec PR. Parallel slices may use temporary slice worktrees, but each slice must land as one commit in this PR branch.
50
+
51
+ ### Run the Project
52
+
53
+ For documentation-only `slice-00`, validate files and JSON:
54
+
55
+ ```bash
56
+ git diff --check
57
+ find specs/quiver-v20-ai-cli-orchestration -name "slice.json" -print -exec node -e "JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8'))" {} \;
58
+ ```
59
+
60
+ For implementation slices, run the validation commands declared in each slice.
61
+
62
+ ### Use Cases
63
+
64
+ - Planner onboarding via provider dry-run
65
+ - Planner criteria phase without file writes
66
+ - Planner technical-plan phase without file writes
67
+ - Spec generation after approval
68
+ - Executor slice execution with minimal context
69
+ - Scope violation detection
70
+ - PR preflight with missing and valid `gh`/SSH config
71
+
72
+ ### Technical Verification
73
+
74
+ - Provider command construction uses argument arrays.
75
+ - Long prompt transport avoids shell string concatenation.
76
+ - Context packs exclude sensitive paths.
77
+ - `slice-00` is mandatory and every later slice declares dependencies.
78
+ - CI uses mocks or dry-run, not real provider auth.
79
+
80
+ ## Evidence
81
+
82
+ - `node --test tests/**/*.test.js`
83
+ - `npm run smoke:create-quiver`
84
+ - `node scripts/ci/smoke-cross-platform.js`
85
+ - `bash scripts/ci/smoke-init-docs.sh`
86
+ - `git diff --check`
87
+ - Provider behavior covered with mocks and dry-runs; no real provider auth required for CI.
88
+ - GitHub PR preflight covered with fake `gh` in smoke coverage; no real PR is opened in tests.
89
+
90
+ ## Rollback
91
+
92
+ Revert the spec PR or the affected slice commit. Since each slice maps to one commit, rollback should target the smallest failing slice commit.
93
+
94
+ ## Risks / Notes
95
+
96
+ - Provider CLI behavior must be validated carefully during implementation.
97
+ - Windows quoting and paths with spaces are a primary regression risk.
98
+ - `gh` auth and SSH identity can point to different accounts; preflight must report that clearly.
99
+ - `docs/GITFLOW_PR_GUIDE.md` is not present in this source repo; this PR followed `docs/GITFLOW_PR_GUIDE.md.template` as the available canonical guide. Generated projects do materialize `docs/GITFLOW_PR_GUIDE.md`.
100
+ - This PR targets `main` because `develop` is behind `main` and would include unrelated historical commits in the diff.
@@ -0,0 +1,30 @@
1
+ # CLOSURE BRIEF - slice-00: Spec foundation
2
+
3
+ ## Resumen de lo realizado
4
+
5
+ Pendiente de completar al cerrar la slice.
6
+
7
+ ## Validacion contra criterios de aceptacion
8
+
9
+ - [ ] Spec directory creado.
10
+ - [ ] `slice-00` creado.
11
+ - [ ] Todos los slices tienen `slice.json`, `EXECUTION_BRIEF.md` y `CLOSURE_BRIEF.md`.
12
+ - [ ] Todos los `slice.json` parsean.
13
+ - [ ] No se modifico codigo de producto.
14
+
15
+ ## Cambios relevantes
16
+
17
+ Pendiente.
18
+
19
+ ## Pendientes
20
+
21
+ Pendiente.
22
+
23
+ ## Riesgos remanentes
24
+
25
+ Pendiente.
26
+
27
+ ## Recomendaciones futuras
28
+
29
+ Ejecutar `slice-01` y `slice-02` despues de commitear esta base documental.
30
+
@@ -0,0 +1,61 @@
1
+ # EXECUTION BRIEF - slice-00: Spec foundation
2
+
3
+ **Spec:** quiver-v20-ai-cli-orchestration
4
+ **Slice:** slice-00-spec-foundation
5
+ **Tipo:** docs
6
+
7
+ ## Contexto
8
+
9
+ Esta slice sube al repo la base documental de la spec. Es obligatoria y debe ejecutarse antes de cualquier slice de implementacion. No modifica codigo de producto.
10
+
11
+ ## Objetivo
12
+
13
+ Crear y validar la estructura completa de spec, slices, handoffs, plan de ejecucion y cuerpo de PR para el trabajo de AI CLI orchestration.
14
+
15
+ ## Alcance
16
+
17
+ - Crear `SPEC.md`.
18
+ - Crear `STATUS.md`.
19
+ - Crear `EVIDENCE_REPORT.md`.
20
+ - Crear `EXECUTION_PLAN.md`.
21
+ - Crear `pr.md`.
22
+ - Crear `slice.json`, `EXECUTION_BRIEF.md` y `CLOSURE_BRIEF.md` para cada slice.
23
+
24
+ ## Criterios de aceptacion
25
+
26
+ - La carpeta `specs/quiver-v20-ai-cli-orchestration/` existe.
27
+ - `slice-00` existe y precede al resto.
28
+ - Cada slice tiene `slice.json`, `EXECUTION_BRIEF.md` y `CLOSURE_BRIEF.md`.
29
+ - Todos los JSON parsean correctamente.
30
+ - No se modifica codigo de producto.
31
+
32
+ ## Plan tecnico resumido
33
+
34
+ Crear artefactos documentales siguiendo el patron real del repo bajo `specs/`. Mantener `slice-00` como base documental y declarar dependencias para todas las slices posteriores.
35
+
36
+ ## Pasos sugeridos de ejecucion
37
+
38
+ 1. Revisar `README_FOR_AI.md`.
39
+ 2. Crear estructura `specs/quiver-v20-ai-cli-orchestration/`.
40
+ 3. Agregar archivos top-level de spec.
41
+ 4. Agregar cada slice y handoff.
42
+ 5. Validar JSON y whitespace.
43
+ 6. Preparar commit unico de slice-00.
44
+
45
+ ## Restricciones
46
+
47
+ - No tocar codigo de producto.
48
+ - No tocar `specs/quiver-v21-cli-output-polish/`.
49
+ - No resolver implementacion en esta slice.
50
+
51
+ ## Riesgos
52
+
53
+ - Generar una spec demasiado amplia sin dependencias claras.
54
+ - Dejar handoffs incompletos para agentes executor.
55
+
56
+ ## Checklist de finalizacion
57
+
58
+ - [ ] `git diff --check` pasa.
59
+ - [ ] Todos los `slice.json` parsean.
60
+ - [ ] No hay cambios fuera de `specs/quiver-v20-ai-cli-orchestration/`.
61
+ - [ ] El commit representa solo slice-00.
@@ -0,0 +1,54 @@
1
+ {
2
+ "slice_id": "slice-00-spec-foundation",
3
+ "ticket": "QUIVER-20-00",
4
+ "type": "docs",
5
+ "title": "Commit AI CLI orchestration spec foundation",
6
+ "objective": "Create and commit the documentation foundation for the AI CLI orchestration spec before any implementation slice starts.",
7
+ "description": "Add the spec, status, execution plan, PR body, slice definitions, execution briefs, and closure briefs for the full Quiver v20 AI CLI orchestration work.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "ai-cli-orchestration",
12
+ "branch_name": "feature/QUIVER-20-ai-cli-orchestration"
13
+ },
14
+ "files": [
15
+ "specs/quiver-v20-ai-cli-orchestration/SPEC.md",
16
+ "specs/quiver-v20-ai-cli-orchestration/STATUS.md",
17
+ "specs/quiver-v20-ai-cli-orchestration/EVIDENCE_REPORT.md",
18
+ "specs/quiver-v20-ai-cli-orchestration/EXECUTION_PLAN.md",
19
+ "specs/quiver-v20-ai-cli-orchestration/pr.md",
20
+ "specs/quiver-v20-ai-cli-orchestration/slices/**"
21
+ ],
22
+ "depends_on": [],
23
+ "parallel_safe": "never",
24
+ "parallel_safe_reason": "slice-00 is the mandatory documentation foundation and must land before every implementation slice.",
25
+ "must": [
26
+ "Create SPEC.md with approved requirements, acceptance criteria, scope, risks, and technical plan.",
27
+ "Create STATUS.md with execution rules and open items.",
28
+ "Create EVIDENCE_REPORT.md for slice-level evidence tracking.",
29
+ "Create EXECUTION_PLAN.md with sequential and parallel slice guidance.",
30
+ "Create pr.md following the repository GitFlow PR structure.",
31
+ "Create slice.json, EXECUTION_BRIEF.md, and CLOSURE_BRIEF.md for every planned slice.",
32
+ "Do not modify product code."
33
+ ],
34
+ "not_included": [
35
+ "Implementing quiver ai commands.",
36
+ "Changing CLI runtime code.",
37
+ "Changing package scripts or generated templates."
38
+ ],
39
+ "acceptance": [
40
+ "The spec directory exists under specs/quiver-v20-ai-cli-orchestration.",
41
+ "slice-00 exists and every later slice depends on it directly or indirectly.",
42
+ "Every slice has slice.json, EXECUTION_BRIEF.md, and CLOSURE_BRIEF.md.",
43
+ "pr.md exists for the spec.",
44
+ "All slice.json files parse as valid JSON.",
45
+ "No product code is modified by slice-00."
46
+ ],
47
+ "tests": [
48
+ "git diff --check",
49
+ "find specs/quiver-v20-ai-cli-orchestration -name 'slice.json' -print -exec node -e \"JSON.parse(require('fs').readFileSync(process.argv[1], 'utf8'))\" {} \\;"
50
+ ],
51
+ "estimated_hours": 1.5,
52
+ "status": "ready",
53
+ "blocked_reason": null
54
+ }
@@ -0,0 +1,39 @@
1
+ # CLOSURE BRIEF - slice-01: AI provider runner
2
+
3
+ ## Resumen de lo realizado
4
+
5
+ Se agrego la base del provider runner para `codex`, `claude` y `gemini`, incluyendo transporte de prompt por stdin/temp-file, dry-run, preflight de CLI, timeout y resultados estructurados.
6
+
7
+ ## Validacion contra criterios de aceptacion
8
+
9
+ - [x] Proveedores `codex`, `claude`, `gemini` soportados.
10
+ - [x] Proveedor invalido falla con mensaje claro.
11
+ - [x] Dry-run no ejecuta procesos.
12
+ - [x] Prompt largo no viaja como shell string unico.
13
+ - [x] Tests no requieren CLIs reales.
14
+
15
+ ## Cambios relevantes
16
+
17
+ - `src/create-quiver/lib/ai/providers.js`
18
+ - `src/create-quiver/lib/ai/prompt-transport.js`
19
+ - `src/create-quiver/lib/ai/preflight.js`
20
+ - `tests/lib/ai-providers.test.js`
21
+ - `tests/lib/ai-prompt-transport.test.js`
22
+
23
+ ## Pendientes
24
+
25
+ - Confirmar manualmente opciones reales de ejecucion para cada CLI antes de documentarlas como estables.
26
+
27
+ ## Riesgos remanentes
28
+
29
+ - `gemini` requiere `--prompt` con valor para entrar en modo headless; se usa un prompt vacio y el contenido real via stdin para evitar argumentos largos.
30
+ - La autenticacion especifica de cada provider queda para una validacion posterior.
31
+
32
+ ## Recomendaciones futuras
33
+
34
+ Validar manualmente cada CLI real fuera de CI antes de publicar la version.
35
+
36
+ ## Validacion ejecutada
37
+
38
+ - `node --test tests/lib/ai-providers.test.js tests/lib/ai-prompt-transport.test.js tests/lib/ai-context-packs.test.js tests/lib/ai-safety.test.js`
39
+ - `git diff --check`
@@ -0,0 +1,63 @@
1
+ # EXECUTION BRIEF - slice-01: AI provider runner
2
+
3
+ **Spec:** quiver-v20-ai-cli-orchestration
4
+ **Slice:** slice-01-ai-provider-runner
5
+ **Tipo:** feature
6
+
7
+ ## Contexto
8
+
9
+ Quiver necesita ejecutar prompts mediante CLIs locales de IA sin depender de comandos shell fragiles. Esta slice crea la base reutilizable para Codex, Claude y Gemini.
10
+
11
+ ## Objetivo
12
+
13
+ Implementar un provider runner mockeable, cross-platform y seguro para prompts largos.
14
+
15
+ ## Alcance
16
+
17
+ - Agregar providers `codex`, `claude`, `gemini`.
18
+ - Validar CLI instalado.
19
+ - Soportar `--dry-run`.
20
+ - Transportar prompts largos por stdin o archivo temporal segun adapter.
21
+ - Devolver resultados estructurados.
22
+
23
+ ## Criterios de aceptacion
24
+
25
+ - Proveedor no soportado falla con lista de proveedores validos.
26
+ - Dry-run no ejecuta procesos.
27
+ - No se concatenan strings shell para ejecutar providers.
28
+ - Los tests no requieren CLIs reales.
29
+ - Paths con espacios estan cubiertos.
30
+
31
+ ## Plan tecnico resumido
32
+
33
+ Crear modulos `providers.js`, `prompt-transport.js` y `preflight.js` bajo `src/create-quiver/lib/ai/`. Usar `spawn`/`execFile` con arrays de argumentos. Permitir inyeccion de runner falso para tests.
34
+
35
+ ## Pasos sugeridos de ejecucion
36
+
37
+ 1. Crear `src/create-quiver/lib/ai/`.
38
+ 2. Implementar registry de providers.
39
+ 3. Implementar transporte seguro de prompt.
40
+ 4. Implementar preflight de CLI.
41
+ 5. Agregar tests unitarios.
42
+ 6. Validar sintaxis y diff.
43
+
44
+ ## Restricciones
45
+
46
+ - No agregar comandos publicos `quiver ai` todavia.
47
+ - No invocar providers reales en tests.
48
+ - No requerir auth real de Codex/Claude/Gemini.
49
+
50
+ ## Riesgos
51
+
52
+ - Diferencias entre CLIs reales.
53
+ - Quoting roto en Windows si se usa shell implicito.
54
+ - Prompts largos que exceden limites de argumentos.
55
+
56
+ ## Checklist de finalizacion
57
+
58
+ - [ ] Tests unitarios pasan.
59
+ - [ ] Dry-run cubierto.
60
+ - [ ] Unsupported provider cubierto.
61
+ - [ ] Missing CLI cubierto.
62
+ - [ ] No hay shell concatenation.
63
+
@@ -0,0 +1,55 @@
1
+ {
2
+ "slice_id": "slice-01-ai-provider-runner",
3
+ "ticket": "QUIVER-20-01",
4
+ "type": "feature",
5
+ "title": "Add AI provider runner and safe prompt transport",
6
+ "objective": "Add a provider abstraction for Codex, Claude, and Gemini CLIs with dry-run, command validation, and safe long-prompt transport.",
7
+ "description": "Implement the core provider runner used by future quiver ai commands. The runner must avoid shell string concatenation, support cross-platform argument arrays, validate missing CLIs, and allow mockable dry-run behavior.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "ai-provider-runner",
12
+ "branch_name": "feature/QUIVER-20-01-ai-provider-runner"
13
+ },
14
+ "files": [
15
+ "src/create-quiver/lib/ai/providers.js",
16
+ "src/create-quiver/lib/ai/prompt-transport.js",
17
+ "src/create-quiver/lib/ai/preflight.js",
18
+ "tests/lib/ai-providers.test.js",
19
+ "tests/lib/ai-prompt-transport.test.js"
20
+ ],
21
+ "depends_on": [
22
+ "slice-00-spec-foundation"
23
+ ],
24
+ "parallel_safe": "after_dependencies",
25
+ "parallel_safe_reason": "Can run after slice-00. It owns provider modules and tests.",
26
+ "must": [
27
+ "Support provider ids: codex, claude, gemini.",
28
+ "Build provider invocations without shell concatenation.",
29
+ "Support dry-run output that includes provider, command, args, prompt transport, and timeout.",
30
+ "Validate missing provider CLIs with actionable errors.",
31
+ "Support prompt transport for long prompts through stdin or temporary files where supported.",
32
+ "Allow provider execution to be mocked in tests.",
33
+ "Return structured results with exit code, stdout, stderr, and error metadata."
34
+ ],
35
+ "not_included": [
36
+ "Adding public quiver ai commands.",
37
+ "Implementing context packs.",
38
+ "Calling real provider CLIs in CI."
39
+ ],
40
+ "acceptance": [
41
+ "Unsupported provider returns a clear error listing codex, claude, and gemini.",
42
+ "Dry-run does not invoke a child process.",
43
+ "Long prompts are not passed as a single shell command string.",
44
+ "Provider command construction handles paths with spaces.",
45
+ "Provider tests pass without Codex, Claude, or Gemini installed."
46
+ ],
47
+ "tests": [
48
+ "node --test tests/lib/ai-providers.test.js tests/lib/ai-prompt-transport.test.js",
49
+ "git diff --check"
50
+ ],
51
+ "estimated_hours": 4,
52
+ "actual_hours": 4,
53
+ "status": "completed",
54
+ "blocked_reason": null
55
+ }
@@ -0,0 +1,40 @@
1
+ # CLOSURE BRIEF - slice-02: Context packs and token budgets
2
+
3
+ ## Resumen de lo realizado
4
+
5
+ Se agregaron roles de IA, context packs, token-budget hints, filtros de seguridad para rutas sensibles y texto base contra prompt injection.
6
+
7
+ ## Validacion contra criterios de aceptacion
8
+
9
+ - [x] Roles `planner` y `executor` definidos.
10
+ - [x] Context packs `full`, `planning`, `slice`, `minimal` definidos.
11
+ - [x] Executor no usa `full` por default.
12
+ - [x] Exclusiones sensibles cubiertas.
13
+ - [x] Prompt-injection boundary presente.
14
+
15
+ ## Cambios relevantes
16
+
17
+ - `src/create-quiver/lib/ai/context-packs.js`
18
+ - `src/create-quiver/lib/ai/prompts.js`
19
+ - `src/create-quiver/lib/ai/safety.js`
20
+ - `tests/lib/ai-context-packs.test.js`
21
+ - `tests/lib/ai-safety.test.js`
22
+
23
+ ## Pendientes
24
+
25
+ - Ajustar context packs concretos cuando `ai onboard`, `ai plan` y `ai execute-slice` empiecen a consumirlos.
26
+
27
+ ## Riesgos remanentes
28
+
29
+ - Las exclusiones son conservadoras y pueden requerir refinamiento por stack.
30
+ - Los presupuestos de tokens son hints, no limites estrictos.
31
+
32
+ ## Recomendaciones futuras
33
+
34
+ Revisar exclusiones contra proyectos reales antes de ampliar el set de archivos leidos.
35
+
36
+ ## Validacion ejecutada
37
+
38
+ - `node --test tests/lib/ai-context-packs.test.js tests/lib/ai-safety.test.js`
39
+ - `node --test tests/lib/ai-providers.test.js tests/lib/ai-prompt-transport.test.js tests/lib/ai-context-packs.test.js tests/lib/ai-safety.test.js`
40
+ - `git diff --check`
@@ -0,0 +1,60 @@
1
+ # EXECUTION BRIEF - slice-02: Context packs and token budgets
2
+
3
+ **Spec:** quiver-v20-ai-cli-orchestration
4
+ **Slice:** slice-02-context-packs-token-budget
5
+ **Tipo:** feature
6
+
7
+ ## Contexto
8
+
9
+ El valor principal del flujo es que el planner use contexto amplio y el executor use contexto minimo. Esta slice define esa separacion.
10
+
11
+ ## Objetivo
12
+
13
+ Implementar roles, context packs, token-budget hints y exclusiones de seguridad para preparar prompts eficientes.
14
+
15
+ ## Alcance
16
+
17
+ - Roles `planner` y `executor`.
18
+ - Context packs `full`, `planning`, `slice`, `minimal`.
19
+ - Exclusiones de secretos y archivos pesados.
20
+ - Texto base contra prompt injection desde archivos del repo.
21
+ - Metadata para dry-run.
22
+
23
+ ## Criterios de aceptacion
24
+
25
+ - Executor no recibe contexto `full`.
26
+ - Secrets y outputs pesados quedan excluidos.
27
+ - Prompt incluye jerarquia de instrucciones.
28
+ - Tests cubren paths POSIX y Windows.
29
+
30
+ ## Plan tecnico resumido
31
+
32
+ Crear `context-packs.js`, `prompts.js` y `safety.js`. Modelar context packs como datos estructurados con entradas sugeridas, exclusiones, rol esperado y presupuesto orientativo.
33
+
34
+ ## Pasos sugeridos de ejecucion
35
+
36
+ 1. Definir constantes de roles y packs.
37
+ 2. Implementar resolucion de archivos candidatos.
38
+ 3. Implementar filtros de exclusion.
39
+ 4. Agregar prompt base de seguridad.
40
+ 5. Agregar tests para inclusion/exclusion.
41
+
42
+ ## Restricciones
43
+
44
+ - No leer archivos sensibles.
45
+ - No ejecutar providers.
46
+ - No generar specs.
47
+
48
+ ## Riesgos
49
+
50
+ - Contexto demasiado chico para executor.
51
+ - Contexto demasiado grande para ahorrar tokens.
52
+ - Exclusion incompleta de archivos sensibles.
53
+
54
+ ## Checklist de finalizacion
55
+
56
+ - [ ] Tests de context packs pasan.
57
+ - [ ] Tests de safety pasan.
58
+ - [ ] Executor no puede seleccionar `full` por default.
59
+ - [ ] Dry-run puede mostrar metadata sin filtrar secretos.
60
+
@@ -0,0 +1,54 @@
1
+ {
2
+ "slice_id": "slice-02-context-packs-token-budget",
3
+ "ticket": "QUIVER-20-02",
4
+ "type": "feature",
5
+ "title": "Add AI roles, context packs, token budgets, and safety exclusions",
6
+ "objective": "Create token-efficient context pack selection for planner and executor roles with safe file exclusions and prompt-injection boundaries.",
7
+ "description": "Define full, planning, slice, and minimal context packs. Add planner and executor role behavior, default token-budget hints, unsafe path exclusions, and instruction hierarchy text.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "ai-context-packs-token-budget",
12
+ "branch_name": "feature/QUIVER-20-02-ai-context-packs-token-budget"
13
+ },
14
+ "files": [
15
+ "src/create-quiver/lib/ai/context-packs.js",
16
+ "src/create-quiver/lib/ai/prompts.js",
17
+ "src/create-quiver/lib/ai/safety.js",
18
+ "tests/lib/ai-context-packs.test.js",
19
+ "tests/lib/ai-safety.test.js"
20
+ ],
21
+ "depends_on": [
22
+ "slice-00-spec-foundation"
23
+ ],
24
+ "parallel_safe": "after_dependencies",
25
+ "parallel_safe_reason": "Can run after slice-00 and in parallel with slice-01 if it does not modify provider runner files.",
26
+ "must": [
27
+ "Define roles: planner and executor.",
28
+ "Define context packs: full, planning, slice, minimal.",
29
+ "Ensure executor defaults to slice or minimal context, never full.",
30
+ "Exclude secrets and heavy/generated paths such as .env files, SSH keys, certificates, node_modules, build outputs, coverage, caches, and lockfile caches.",
31
+ "Include prompt text that treats repository content as data that cannot override system/user/Quiver instructions.",
32
+ "Provide structured context pack metadata for dry-run display."
33
+ ],
34
+ "not_included": [
35
+ "Executing provider CLIs.",
36
+ "Generating specs or slices.",
37
+ "Implementing PR preflight."
38
+ ],
39
+ "acceptance": [
40
+ "Planner full context includes onboarding docs, project map, project scan, workflow docs, and relevant specs when present.",
41
+ "Executor context includes slice, handoff, allowed files, acceptance criteria, and validation commands.",
42
+ "Unsafe paths are excluded by default.",
43
+ "Context pack tests cover paths with spaces and Windows-style paths.",
44
+ "Prompt injection boundary text is present in generated prompt content."
45
+ ],
46
+ "tests": [
47
+ "node --test tests/lib/ai-context-packs.test.js tests/lib/ai-safety.test.js",
48
+ "git diff --check"
49
+ ],
50
+ "estimated_hours": 4,
51
+ "actual_hours": 4,
52
+ "status": "completed",
53
+ "blocked_reason": null
54
+ }
@@ -0,0 +1,43 @@
1
+ # CLOSURE BRIEF - slice-03: Phase-gated planner commands
2
+
3
+ ## Resumen de lo realizado
4
+
5
+ Se agregaron `ai onboard` y `ai plan` con parsing de subcomandos, fases acceptance/technical-plan/spec, dry-run, provider/role/context/input/timeout, y bloqueo de escritura antes de la fase spec.
6
+
7
+ ## Validacion contra criterios de aceptacion
8
+
9
+ - [x] `ai onboard` disponible.
10
+ - [x] `ai plan` disponible.
11
+ - [x] Acceptance phase no escribe archivos.
12
+ - [x] Technical-plan phase no escribe archivos.
13
+ - [x] Dry-run muestra invocation plan.
14
+ - [x] Missing input file falla con error claro.
15
+ - [x] Provider errors propagan contexto accionable.
16
+
17
+ ## Cambios relevantes
18
+
19
+ - `src/create-quiver/commands/ai.js`
20
+ - `src/create-quiver/index.js`
21
+ - `src/create-quiver/lib/ai/phase-gates.js`
22
+ - `tests/commands/ai-plan.test.js`
23
+ - `tests/commands/ai-onboard.test.js`
24
+ - `specs/quiver-v20-ai-cli-orchestration/EVIDENCE_REPORT.md`
25
+ - `specs/quiver-v20-ai-cli-orchestration/STATUS.md`
26
+
27
+ ## Pendientes
28
+
29
+ La fase `spec` sigue bloqueada hasta slice-04.
30
+
31
+ ## Riesgos remanentes
32
+
33
+ - La fase `spec` todavia no genera artefactos y queda para slice-04.
34
+ - Los prompts siguen dependiendo de input files suministrados por el usuario.
35
+
36
+ ## Recomendaciones futuras
37
+
38
+ Mantener las fases separadas aunque se agreguen atajos de UX mas adelante.
39
+
40
+ ## Validacion ejecutada
41
+
42
+ - `node --test tests/commands/ai-plan.test.js tests/commands/ai-onboard.test.js tests/lib/ai-providers.test.js tests/lib/ai-context-packs.test.js`
43
+ - `git diff --check`
@@ -0,0 +1,62 @@
1
+ # EXECUTION BRIEF - slice-03: Phase-gated planner commands
2
+
3
+ **Spec:** quiver-v20-ai-cli-orchestration
4
+ **Slice:** slice-03-ai-phase-gated-planner
5
+ **Tipo:** feature
6
+
7
+ ## Contexto
8
+
9
+ El planner debe operar por fases con aprobacion humana. No puede crear specs ni modificar codigo antes de que los criterios y el plan tecnico esten aprobados.
10
+
11
+ ## Objetivo
12
+
13
+ Agregar `quiver ai onboard` y `quiver ai plan` con fases explicitas.
14
+
15
+ ## Alcance
16
+
17
+ - Parsear `npx create-quiver ai onboard`.
18
+ - Parsear `npx create-quiver ai plan`.
19
+ - Soportar provider, role, context, input, dry-run y timeout.
20
+ - Separar acceptance, technical-plan y spec phase.
21
+ - Impedir escrituras en acceptance y technical-plan.
22
+
23
+ ## Criterios de aceptacion
24
+
25
+ - `ai onboard --dry-run` muestra provider, role, context pack e invocation plan.
26
+ - `ai plan` en fase acceptance no escribe archivos.
27
+ - `ai plan` en fase technical-plan no escribe archivos.
28
+ - Faltante de input falla con error claro.
29
+ - Error del provider se propaga.
30
+
31
+ ## Plan tecnico resumido
32
+
33
+ Crear `commands/ai.js` y conectar desde `index.js`. Usar provider runner y context packs existentes. Implementar `phase-gates.js` para validar transiciones.
34
+
35
+ ## Pasos sugeridos de ejecucion
36
+
37
+ 1. Agregar comando `ai` al parser del CLI.
38
+ 2. Implementar subcomandos `onboard` y `plan`.
39
+ 3. Integrar provider runner.
40
+ 4. Integrar context pack selection.
41
+ 5. Agregar phase gate validation.
42
+ 6. Agregar tests de comandos.
43
+
44
+ ## Restricciones
45
+
46
+ - No crear specs en esta slice.
47
+ - No modificar producto desde planner.
48
+ - Mantener salida en consola.
49
+
50
+ ## Riesgos
51
+
52
+ - Avanzar de fase por error.
53
+ - Mezclar responsabilidades de planner y executor.
54
+ - Cambiar parser global y romper comandos existentes.
55
+
56
+ ## Checklist de finalizacion
57
+
58
+ - [ ] Tests de `ai onboard` pasan.
59
+ - [ ] Tests de `ai plan` pasan.
60
+ - [ ] Comandos existentes siguen funcionando.
61
+ - [ ] Dry-run no ejecuta providers.
62
+