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
package/README.md CHANGED
@@ -1,226 +1,414 @@
1
1
  # Quiver
2
2
 
3
- Quiver is a CLI-first documentation workflow for projects that use specs, slices, and AI-assisted implementation.
3
+ Quiver es un framework para trabajar con **WDD + SDD asistido por IA** en proyectos de software.
4
+ Ayuda a transformar un repositorio en un entorno donde humanos y agentes pueden entender el contexto, planificar por specs, ejecutar slices y revisar cambios con evidencia.
5
+ Está pensado para equipos que quieren usar IA de forma ordenada: primero workflow, después specs, después implementación.
4
6
 
5
- It gives a project a repeatable structure for planning work, starting focused implementation slices, validating readiness, and keeping human and AI contributors aligned.
7
+ ## 🚀 Inicio rápido
6
8
 
7
- ## Developer Onboarding Flow
9
+ ### Usar Quiver con IA en un proyecto
8
10
 
9
- Use this flow when adopting Quiver in an existing project or starting a new one.
10
-
11
- ### 1. Install Quiver
12
-
13
- Run Quiver from the project where the workflow will live:
11
+ Ejecutá Quiver desde la raíz del proyecto donde querés instalar el workflow:
14
12
 
15
13
  ```bash
16
- cd /path/to/your-project
17
- npx create-quiver --name "Project Name"
14
+ npx create-quiver init --name "Mi Proyecto"
15
+ npx create-quiver analyze
16
+ npx create-quiver doctor
17
+ npx create-quiver ai onboard --dry-run
18
18
  ```
19
19
 
20
- Do not install Quiver globally. Running it with `npx` from the project root keeps the generated docs, specs, and scripts in the right repository.
20
+ Después de eso, revisá:
21
21
 
22
- If your team wants to pin the Quiver version in the project, install it as a devDependency:
22
+ - `AGENTS.md`
23
+ - `docs/PROJECT_MAP.md`
24
+ - `docs/AI_CONTEXT.md`
25
+ - `docs/AI_ONBOARDING_PROMPT.md`
26
+
27
+ La maquinaria interna queda en `.quiver/`. Las specs reales no se crean durante el init: aparecen cuando el planner genera y aprueba una spec con `ai plan --phase spec`.
28
+
29
+ El flujo normal con IA continúa así:
23
30
 
24
31
  ```bash
25
- npm install --save-dev create-quiver
26
- npx create-quiver --name "Project Name"
32
+ npx create-quiver ai plan --phase acceptance --input requirements.md --dry-run
33
+ npx create-quiver ai plan --phase technical-plan --input acceptance-approved.md --dry-run
34
+ npx create-quiver ai plan --phase spec --input technical-plan-approved.md --dry-run
35
+ npx create-quiver next
36
+ npx create-quiver ai execute-slice --slice specs/<project-slug>/slices/slice-01/slice.json --dry-run
27
37
  ```
28
38
 
29
- To initialize a different directory from outside the project, pass `--dir` explicitly. Quote paths that contain spaces:
39
+ Usá `--dry-run` para validar provider, rol, contexto y paths sin ejecutar el modelo. Cuando el output esté revisado y aprobado, quitá `--dry-run`.
40
+
41
+ ### Desarrollar este repositorio
30
42
 
31
43
  ```bash
32
- npx create-quiver --name "Project Name" --dir "/Users/me/My Project"
44
+ git clone <repo-url>
45
+ cd quiver
46
+ npm install
47
+ node bin/create-quiver.js --help
48
+ node --test tests/**/*.test.js
33
49
  ```
34
50
 
35
- ### 2. Analyze And Validate
51
+ > El remote local detectado usa un alias SSH (`git@github-personal:FabriJuncal/quiver.git`). Si no tenés ese alias configurado, cloná con la URL que use tu equipo.
36
52
 
37
- Run the local analyzer and then validate the generated contract from the project root:
53
+ ## 🧠 Workflow principal: WDD + SDD con IA
54
+
55
+ Quiver asume que la mayoría de los equipos lo van a usar para coordinar trabajo con agentes de IA. Por eso el flujo principal no empieza por código: empieza por contexto, workflow y planificación.
56
+
57
+ | Etapa | Qué significa | Artefactos principales |
58
+ |---|---|---|
59
+ | WDD | Workflow-Driven Development: dejar claro cómo se trabaja antes de implementar. | `AGENTS.md`, `docs/WORKFLOW.md`, `docs/AI_CONTEXT.md`, `docs/PROJECT_MAP.md` |
60
+ | SDD | Spec-Driven Development: definir el trabajo en specs y slices antes de tocar código. | `specs/<project-slug>/SPEC.md`, `slice.json`, `EXECUTION_BRIEF.md`, `pr.md` |
61
+ | IA planner | Agente que lee contexto amplio y propone criterios, plan técnico, spec y slices. | `ai onboard`, `ai plan` |
62
+ | IA executor | Agente que recibe un slice aprobado y trabaja con contexto mínimo. | `ai execute-slice`, `check-scope`, `check-slice` |
63
+
64
+ Flujo recomendado:
38
65
 
39
66
  ```bash
40
67
  npx create-quiver analyze
41
- npx create-quiver graph
42
68
  npx create-quiver doctor
69
+ npx create-quiver ai onboard --dry-run
70
+ npx create-quiver ai plan --phase acceptance --input requirements.md --dry-run
71
+ npx create-quiver ai plan --phase technical-plan --input acceptance-approved.md --dry-run
72
+ npx create-quiver ai plan --phase spec --input technical-plan-approved.md --dry-run
73
+ npx create-quiver graph
43
74
  npx create-quiver next
75
+ npx create-quiver ai execute-slice --slice specs/<project-slug>/slices/slice-01/slice.json --dry-run
44
76
  ```
45
77
 
46
- Use `npx create-quiver graph --format mermaid` for PR-ready Markdown or `npx create-quiver graph --format dot` for Graphviz source.
47
-
48
- If you need to target another directory from outside the project, pass `--dir` explicitly. For the current project root, omit it.
49
-
50
- The analyzer creates `docs/PROJECT_SCAN.json` and `docs/PROJECT_MAP.md`. These files give the AI agent a deterministic project map before it edits context docs.
78
+ Regla práctica: el planner no modifica código de producto; el executor solo trabaja sobre un slice aprobado y dentro de los archivos declarados en `slice.json`.
51
79
 
52
- The doctor checks the generated project contract and prints the next workflow steps. If the scan artifacts are missing, it recommends `npx create-quiver analyze` first.
53
- `npx create-quiver next` prints the next ready slice and can auto-start it behind a confirmation prompt.
80
+ ## 🛠️ Empezar a usar Quiver según tu caso
54
81
 
55
- ### Project NPM Scripts
82
+ ### 1. Proyecto nuevo desde cero
56
83
 
57
- Generated projects include `quiver:*` npm scripts that call the Node CLI and are the preferred repeatable workflow:
84
+ Usá este camino cuando todavía no existe el proyecto o estás arrancando una carpeta nueva y querés que Quiver acompañe el workflow desde el primer commit.
58
85
 
59
86
  ```bash
60
- npm run quiver:analyze
61
- npm run quiver:plan
62
- npm run quiver:graph
63
- npm run quiver:next
64
- npm run quiver:doctor
65
- npm run quiver:migrate
66
- npm run quiver:start-slice -- specs/<project-slug>/slices/slice-01/slice.json
67
- npm run quiver:check-slice -- specs/<project-slug>/slices/slice-01/slice.json
68
- npm run quiver:check-pr -- specs/<project-slug>/slices/slice-01/slice.json
69
- npm run quiver:cleanup-slice -- specs/<project-slug>/slices/slice-01/slice.json
70
- npm run quiver:check-scope -- specs/<project-slug>/slices/slice-01/slice.json
71
- npm run quiver:refresh-active-slices
87
+ mkdir mi-proyecto
88
+ cd mi-proyecto
89
+ npx create-quiver init --name "Mi Proyecto"
90
+ npx create-quiver analyze
91
+ npx create-quiver doctor
92
+ npx create-quiver ai onboard --dry-run
72
93
  ```
73
94
 
74
- `npm run quiver:graph` prints the tree view by default. Pass `--format mermaid` or `--format dot` when you need an exportable graph artifact.
75
- `npm run quiver:next` points to the next ready slice and can auto-start it behind a confirmation prompt.
76
- `npx create-quiver next --all-ready` shows the full ready level when you want the whole queue instead of one slice.
95
+ Qué esperar:
77
96
 
78
- 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.
79
- `npm run quiver:migrate` is only for projects that were already initialized by Quiver.
97
+ - Quiver crea un contrato visible chico: `AGENTS.md`, `docs/`, scripts `quiver:*` en `package.json` y configuración interna en `.quiver/`.
98
+ - No crea `docs-template/`, `tools/scripts/` ni una spec placeholder en el flujo default.
99
+ - `analyze` crea el scan crudo en `.quiver/scans/PROJECT_SCAN.json` y el mapa legible en `docs/PROJECT_MAP.md`.
100
+ - `doctor` valida que el contrato inicial esté completo.
101
+ - `ai onboard --dry-run` muestra cómo se incorporaría un agente planner sin ejecutar el provider todavía.
80
102
 
81
- ### 3. Upgrade Existing Projects
82
-
83
- If the project already had Quiver from an older version, upgrade it from the project root:
103
+ Después del bootstrap, revisá:
84
104
 
85
105
  ```bash
86
- cd /path/to/your-project
87
- npx create-quiver migrate
88
- npx create-quiver analyze
106
+ npx create-quiver ai plan --phase acceptance --input requirements.md --dry-run
107
+ npx create-quiver ai plan --phase technical-plan --input acceptance-approved.md --dry-run
108
+ npx create-quiver ai plan --phase spec --input technical-plan-approved.md --dry-run
109
+ npx create-quiver plan
89
110
  npx create-quiver graph
90
- npx create-quiver doctor
91
111
  npx create-quiver next
92
112
  ```
93
113
 
94
- Use `npx create-quiver graph --format mermaid` for GitHub-friendly graph embeds or `npx create-quiver graph --format dot` for Graphviz pipelines.
114
+ ### 2. Proyecto ya iniciado sin Quiver
115
+
116
+ Usá este camino cuando el repo ya tiene código, pero nunca fue inicializado con Quiver.
95
117
 
96
- If the project never ran Quiver initialization before, do not use `migrate` as bootstrap. Run:
118
+ Primero revisá el estado actual:
97
119
 
98
120
  ```bash
99
- npx create-quiver --name "Project Name"
121
+ git status --short
100
122
  ```
101
123
 
102
- If your team prefers a pinned local dependency, update the package first and then run the same flow:
124
+ Si hay cambios pendientes, conviene guardarlos, commitearlos o crear una rama dedicada para que el diff de onboarding sea fácil de revisar.
125
+
126
+ Luego inicializá Quiver desde la raíz del proyecto:
103
127
 
104
128
  ```bash
105
- npm install --save-dev create-quiver@latest
106
- npx create-quiver migrate
129
+ npx create-quiver init --name "Nombre del Proyecto"
107
130
  npx create-quiver analyze
108
- npx create-quiver graph
109
131
  npx create-quiver doctor
132
+ npx create-quiver ai onboard --dry-run
133
+ git status --short
110
134
  ```
111
135
 
112
- The tree output remains the default, but Mermaid and DOT are available on demand for exported docs and slide decks.
136
+ Qué esperar:
113
137
 
114
- ### 4. Ask The AI To Prepare Context
138
+ - Quiver agrega documentación, scripts `quiver:*` y archivos internos de soporte en `.quiver/`.
139
+ - No deberías mezclar este paso con cambios de producto.
140
+ - `docs/PROJECT_MAP.md` queda como fuente de verdad para stack, package manager, comandos y rutas importantes.
141
+ - Las specs y slices reales se crean después, con `ai plan --phase spec`, cuando ya existen criterios y plan técnico aprobados.
142
+ - El primer trabajo de IA debería ser preparar contexto y planificación, no implementar.
115
143
 
116
- Open your AI agent in the target project and run this short handoff:
144
+ Importante: no uses `migrate` para un proyecto que nunca tuvo Quiver. `migrate` es solo para proyectos previamente inicializados.
117
145
 
118
- ```text
119
- Read docs/AI_ONBOARDING_PROMPT.md and execute it.
120
- Do not modify product code unless I explicitly authorize it.
121
- Prepare the project context docs and report assumptions, risks, and files changed.
122
- ```
146
+ ### 3. Proyecto iniciado con una versión vieja de Quiver
123
147
 
124
- The AI should use the scan artifacts to prepare `docs/AI_CONTEXT.md`, `docs/CONTEXTO.md`, `docs/STATUS.md`, and the initial project spec. The developer should review those documentation changes before implementation work starts.
148
+ Usá este camino cuando el repo ya tiene señales de Quiver, pero querés actualizarlo al contrato actual.
125
149
 
126
- ### 5. Start The First Slice
150
+ Señales típicas de una instalación previa:
127
151
 
128
- After the context docs are reviewed:
152
+ - `.quiver/state.json`
153
+ - `AGENTS.md`
154
+ - `docs/AI_CONTEXT.md`
155
+ - `docs/PROJECT_MAP.md`
156
+ - `docs-template/` como señal legacy u opcional
157
+ - `tools/scripts/` como señal legacy u opcional
158
+ - scripts `quiver:*` o scripts legacy en `package.json`
129
159
 
130
- 1. Define or refine `specs/<project-slug>/SPEC.md`.
131
- 2. Create the first slice from `specs/<project-slug>/slices/slice-template/slice.json`.
132
- 3. Start work with `npx create-quiver start-slice <slice.json>` or `npm run quiver:start-slice -- <slice.json>`.
133
- 4. Make one commit per slice.
134
- 5. Open one PR per spec.
160
+ Desde la raíz del proyecto:
135
161
 
136
- Slice numbering is local to each spec: every new spec starts at `slice-01`.
137
-
138
- ## Requirements
162
+ ```bash
163
+ npx create-quiver doctor
164
+ npx create-quiver migrate
165
+ npx create-quiver analyze
166
+ npx create-quiver doctor
167
+ npx create-quiver ai onboard --dry-run
168
+ git status --short
169
+ ```
139
170
 
140
- - Node.js and npm for the installer
141
- - Git for slice branches, worktrees, and PR workflow checks
142
- - macOS, Linux, and Windows PowerShell/CMD are the target developer environments for the cross-platform runtime work
171
+ Si estás en CI, offline o no querés que la migración instale dependencias automáticamente:
143
172
 
144
- Windows native support is verified only when the cross-platform CI matrix is green. Bash remains a legacy compatibility path until the runtime slices land.
173
+ ```bash
174
+ npx create-quiver migrate --skip-install
175
+ ```
145
176
 
146
- See the generated `docs/SUPPORT_MATRIX.md` for the detailed support contract.
177
+ Qué esperar:
178
+
179
+ - La migración restaura o agrega archivos faltantes de forma aditiva.
180
+ - No debería sobrescribir archivos existentes de proyecto sin necesidad.
181
+ - Después de migrar, `analyze` actualiza el mapa técnico y `doctor` confirma los próximos pasos.
182
+ - `ai onboard --dry-run` ayuda a validar que el contexto viejo quedó entendible para un agente planner.
183
+
184
+ Si `doctor` falla indicando que el proyecto no fue inicializado por Quiver, usá el flujo del caso 2.
185
+
186
+ ## ✨ Qué hace
187
+
188
+ Quiver instala una estructura de trabajo para que un proyecto pueda usar IA sin improvisar contexto en cada tarea:
189
+
190
+ - documentación base para humanos y agentes;
191
+ - contexto AI-first con roles de planner y executor;
192
+ - specs y slices para dividir trabajo en partes revisables;
193
+ - comandos para planificar, ejecutar y validar trabajo asistido por IA;
194
+ - checks de readiness, PR, handoff y scope;
195
+ - plantillas de contribución, soporte, seguridad, changelog y GitHub Actions.
196
+
197
+ La idea práctica: primero contexto, después plan, después código.
198
+
199
+ ## 🧱 Stack tecnológico
200
+
201
+ | Área | Tecnología detectada |
202
+ |---|---|
203
+ | Runtime | Node.js CLI |
204
+ | Lenguaje | JavaScript CommonJS |
205
+ | Package manager | npm (`package-lock.json`) |
206
+ | Binario npm | `create-quiver` -> `bin/create-quiver.js` |
207
+ | Tests | Node built-in test runner (`node:test`) |
208
+ | CI/CD | GitHub Actions |
209
+ | Distribución | Paquete npm público `create-quiver` |
210
+ | Base de datos | No detectada |
211
+ | Docker / Compose | No detectado |
212
+ | Prisma / Supabase / migrations / seeders | No detectados |
213
+
214
+ ## 📦 Requisitos
215
+
216
+ - Node.js 22.x recomendado. La CI usa Node 22, aunque `package.json` todavía no declara `engines`.
217
+ - npm.
218
+ - Git, especialmente para ramas y worktrees.
219
+ - `shellcheck` si querés replicar localmente el job de CI que valida scripts Bash.
220
+ - Opcional: `gh` para preflight de PR con GitHub.
221
+ - CLI local de `codex`, `claude` o `gemini` si vas a ejecutar comandos de IA sin `--dry-run`.
222
+
223
+ No se detectaron archivos `.env`; Quiver no requiere variables de entorno para el flujo básico.
224
+
225
+ ## 📁 Estructura del proyecto
226
+
227
+ | Ruta | Propósito |
228
+ |---|---|
229
+ | `bin/create-quiver.js` | Entry point ejecutable del CLI. |
230
+ | `src/create-quiver/` | Código fuente del CLI y comandos principales. |
231
+ | `src/create-quiver/commands/` | Comandos `ai`, `graph`, `next` y `plan`. |
232
+ | `src/create-quiver/lib/` | Lógica de análisis, doctor, slices, lifecycle, IA, Git y renderers. |
233
+ | `docs/` | Plantillas que Quiver copia a proyectos destino. |
234
+ | `specs/` | Specs internas del desarrollo de Quiver y templates usados cuando `ai plan --phase spec` crea una spec real. |
235
+ | `scripts/` | Scripts de packaging, release, CI smoke y wrappers legacy. |
236
+ | `tests/` | Tests unitarios y fixtures. |
237
+ | `examples/` | Ejemplo mínimo de spec/slice. |
238
+ | `i18n/es/` | Documentación y plantillas en español. |
239
+ | `.github/` | Workflows, templates de issues y PR. |
240
+
241
+ ## ⚙️ Configuración
242
+
243
+ ### Variables opcionales
244
+
245
+ | Variable | Uso |
246
+ |---|---|
247
+ | `SLICE_WORKTREES_DIR` | Cambia la carpeta donde `start-slice` crea worktrees. |
248
+ | `ALLOW_DRAFT_SLICE=1` | Permite iniciar slices en estado `draft`. Equivale a usar `--allow-draft`. |
249
+ | `QUIVER_VERSION` | Usada por scripts legacy de inicialización. |
250
+ | `QUIVER_MIGRATE` | Activa modo migración en scripts legacy. |
251
+ | `QUIVER_PROJECT_NAME` | Define nombre de proyecto en scripts legacy. |
252
+
253
+ Para IA sin `--dry-run`, la autenticación depende del proveedor local que uses (`codex`, `claude` o `gemini`). Para PR preflight, Quiver espera que `gh` y tu configuración SSH ya existan; no instala ni modifica credenciales.
254
+
255
+ ## 🧭 Comandos principales
256
+
257
+ Los comandos reales del CLI se ejecutan con `npx create-quiver ...` o, durante desarrollo local, con `node bin/create-quiver.js ...`.
258
+
259
+ | Comando | Para qué sirve |
260
+ |---|---|
261
+ | `npx create-quiver init --name "Proyecto"` | Inicializa Quiver en un proyecto nuevo o nunca inicializado. |
262
+ | `npx create-quiver --name "Proyecto"` | Alias compatible del flujo de init recomendado. |
263
+ | `npx create-quiver init --minimal` | Crea solo el contrato esencial de onboarding. |
264
+ | `npx create-quiver init --full` | Crea el layout amplio de compatibilidad. |
265
+ | `npx create-quiver init --legacy-scripts` | Agrega wrappers Bash legacy bajo `tools/scripts/`. |
266
+ | `npx create-quiver init --include-templates` | Exporta templates empaquetados bajo `.quiver/templates/`. |
267
+ | `npx create-quiver analyze` | Genera `.quiver/scans/PROJECT_SCAN.json` y `docs/PROJECT_MAP.md`. |
268
+ | `npx create-quiver doctor` | Valida que el contrato de Quiver esté completo. |
269
+ | `npx create-quiver migrate` | Actualiza proyectos que ya fueron inicializados con Quiver. |
270
+ | `npx create-quiver plan` | Lista slices pendientes en orden y calcula camino crítico. |
271
+ | `npx create-quiver graph` | Muestra el grafo de dependencias (`tree`, `mermaid` o `dot`). |
272
+ | `npx create-quiver next` | Sugiere el próximo slice listo para trabajar. |
273
+ | `npx create-quiver start-slice <slice.json>` | Prepara worktree y contexto para ejecutar un slice. |
274
+ | `npx create-quiver check-slice <slice.json>` | Valida readiness del slice. |
275
+ | `npx create-quiver check-pr <slice.json>` | Valida estructura esperada para PR. |
276
+ | `npx create-quiver check-scope <slice.json>` | Verifica que los archivos modificados estén dentro del alcance declarado. |
277
+ | `npx create-quiver cleanup-slice <slice.json>` | Limpia worktree/branch local asociado a un slice. |
278
+ | `npx create-quiver refresh-active-slices` | Regenera el tablero local `ACTIVE_SLICES.md`. |
279
+ | `npx create-quiver check-handoff <handoff.md>` | Valida un handoff. |
280
+ | `npx create-quiver new-handoff <spec-slug>` | Crea un handoff para una transferencia excepcional. |
281
+
282
+ ### Comandos de IA para WDD + SDD
147
283
 
148
- ## Cross-Platform Support
284
+ ```bash
285
+ npx create-quiver ai onboard --dry-run
286
+ npx create-quiver ai plan --phase acceptance --input requirements.md --dry-run
287
+ npx create-quiver ai plan --phase technical-plan --input acceptance-approved.md --dry-run
288
+ npx create-quiver ai plan --phase spec --input technical-plan-approved.md --dry-run
289
+ npx create-quiver ai execute-slice --slice specs/<project-slug>/slices/slice-01/slice.json --dry-run
290
+ npx create-quiver ai doctor --dry-run --ssh-host-alias github-work --identity-file ~/.ssh/github-work
291
+ npx create-quiver ai pr --dry-run --ssh-host-alias github-work --identity-file ~/.ssh/github-work
292
+ ```
149
293
 
150
- Quiver is targeting native support on macOS, Linux, and Windows PowerShell/CMD. Bash is a legacy compatibility path until the runtime slices land, so the long-term contract is a Node-first workflow rather than a Bash-first one. The CI matrix must be green before Windows is considered fully verified.
294
+ Providers soportados: `codex`, `claude` y `gemini`, siempre vía CLI local.
295
+ Usá `--dry-run` primero para revisar provider, rol, context pack, prompt y paths sin ejecutar el modelo.
151
296
 
152
- ## What Gets Generated
297
+ Orden recomendado:
153
298
 
154
- Quiver generates a project-local workflow under:
299
+ 1. `ai onboard`: el planner entiende el repo y el workflow.
300
+ 2. `ai plan --phase acceptance`: convierte requerimientos en criterios de aceptación.
301
+ 3. `ai plan --phase technical-plan`: propone el plan técnico.
302
+ 4. `ai plan --phase spec`: genera spec, slices, handoffs y PR body.
303
+ 5. `ai execute-slice`: ejecuta un slice aprobado con rol executor.
304
+ 6. `ai doctor` / `ai pr`: valida preflight de GitHub y PR.
155
305
 
156
- - `docs/` for project context, workflow, support, troubleshooting, and AI guidance
157
- - `docs/PROJECT_SCAN.json` and `docs/PROJECT_MAP.md` after `create-quiver analyze`
158
- - `docs/AI_ONBOARDING_PROMPT.md` as the generated handoff prompt for the AI agent
159
- - `specs/<project-slug>/HANDOFF.md` as the exceptional transfer artifact between agents or phases
160
- - `npx create-quiver new-handoff <spec-slug>` to scaffold an optional handoff artifact when work needs to move between agents or phases
161
- - `npx create-quiver check-handoff specs/<project-slug>/HANDOFF.md` to validate a transferred handoff before execution
162
- - `docs/COMMANDS.md` as the canonical command reference table for orchestration
163
- - `specs/<project-slug>/` for the project spec, status, evidence, and slice contracts
164
- - `tools/scripts/` for slice lifecycle and readiness gates
165
- - `.github/` for default PR, issue, and CI templates
166
- - `package.json` scripts for the workflow commands
306
+ ## 🧪 Cómo probar que funciona
167
307
 
168
- For the detailed support contract, read `docs/SUPPORT_MATRIX.md` in the generated project. For recovery paths, read `docs/TROUBLESHOOTING.md`.
308
+ Validación rápida del repo:
169
309
 
170
- ## Manual Template Use
310
+ ```bash
311
+ node bin/create-quiver.js --help
312
+ node --test tests/**/*.test.js
313
+ npm run package:quiver
314
+ ```
171
315
 
172
- Use the manual flow only when developing Quiver locally or testing a template checkout. From a target project where this repository was copied as `docs-template/`, run:
316
+ Validaciones adicionales disponibles:
173
317
 
174
318
  ```bash
175
- ./docs-template/scripts/init-docs.sh "Project Name"
319
+ npm run smoke:create-quiver
320
+ npm run smoke:tiered-pack
176
321
  ```
177
322
 
178
- The CLI path is the supported adoption path for users.
179
- For analyzed projects, the agent handoff prompt lives at `docs/AI_ONBOARDING_PROMPT.md` in the generated project. If a bounded transfer between agents or phases is needed, scaffold `specs/<project-slug>/HANDOFF.md` with `npx create-quiver new-handoff <spec-slug>` and validate it with `npx create-quiver check-handoff specs/<project-slug>/HANDOFF.md`.
323
+ Notas reales del estado actual:
324
+
325
+ - No hay script `npm test`; el comando verificado para tests es `node --test tests/**/*.test.js`.
326
+ - `npm run package:quiver` valida el contenido del paquete npm generado.
327
+ - `npm run smoke:tiered-pack` existe, pero revisar la sección "Información pendiente de confirmar" antes de usarlo como gate obligatorio.
328
+
329
+ ## 📜 Scripts npm
330
+
331
+ | Script | Uso |
332
+ |---|---|
333
+ | `npm run quiver:plan` | Ejecuta `npx create-quiver plan`. |
334
+ | `npm run quiver:graph` | Ejecuta `npx create-quiver graph`. |
335
+ | `npm run quiver:next` | Ejecuta `npx create-quiver next`. |
336
+ | `npm run quiver:ai:onboard` | Ejecuta onboarding de IA. |
337
+ | `npm run quiver:ai:plan` | Ejecuta planificación IA por fases. |
338
+ | `npm run quiver:ai:execute-slice` | Ejecuta un slice con rol executor. |
339
+ | `npm run quiver:ai:doctor` | Ejecuta preflight IA/GitHub. |
340
+ | `npm run quiver:ai:pr` | Ejecuta preflight de PR. |
341
+ | `npm run package:quiver` | Empaqueta y valida el tarball npm. |
342
+ | `npm run smoke:create-quiver` | Smoke del instalador `create-quiver`. |
343
+ | `npm run smoke:tiered-pack` | Smoke de context packs y lifecycle. |
344
+ | `npm run release:quiver` | Release dry-run o publish, según flags. |
180
345
 
181
- ## For AI Agents
346
+ `package.json` también contiene scripts legacy como `check:slice`, `check:pr`, `start:slice`, `cleanup:slice` y `migrate` que apuntan a `tools/scripts/*`. En proyectos generados esos wrappers aparecen solo cuando se pide compatibilidad con `--legacy-scripts` o el perfil amplio `--full`; en este repo fuente requieren revisión antes de usarse directamente.
182
347
 
183
- Read `README_FOR_AI.md` before working in this repository or in a generated project. In generated projects, `docs/AI_CONTEXT.md` is the first agent context file to read, followed by `docs/AI_ONBOARDING_PROMPT.md`, `docs/CONTEXTO.md`, and `docs/WORKFLOW.md`.
348
+ ## 🔁 Flujo recomendado
184
349
 
185
- ## For Maintainers
350
+ 1. Inicializá Quiver o migrá si el proyecto ya lo tenía.
351
+ 2. Corré `analyze` para generar el mapa técnico.
352
+ 3. Corré `doctor` para validar el contrato.
353
+ 4. Incorporá al planner con `ai onboard --dry-run`.
354
+ 5. Convertí requerimientos en criterios, plan técnico y spec con `ai plan`.
355
+ 6. Revisá dependencias con `graph` y elegí el próximo trabajo con `next`.
356
+ 7. Ejecutá el slice con `ai execute-slice` o con tu agente usando el handoff generado.
357
+ 8. Validá con `check-slice`, `check-scope` y `check-pr`.
358
+ 9. Cerrá el trabajo con evidencia en el PR.
186
359
 
187
- Release preflight:
360
+ ## 🤝 Contribuir
361
+
362
+ 1. Abrí un issue describiendo el problema o propuesta.
363
+ 2. Acordá el alcance antes de implementar si hace falta.
364
+ 3. Trabajá en un slice pequeño y revisable.
365
+ 4. Incluí evidencia de validación en el PR.
366
+ 5. Mantené una relación clara: un slice, un commit; una spec, un PR.
367
+
368
+ ## 🚢 Release
369
+
370
+ Release dry-run:
188
371
 
189
372
  ```bash
190
- npm whoami
191
- npm view create-quiver version
192
- npm run package:quiver
193
- npm run smoke:create-quiver
194
373
  npm run release:quiver
195
374
  ```
196
375
 
197
- Current-version publish:
376
+ Publicar la versión actual:
198
377
 
199
378
  ```bash
200
379
  bash scripts/release-quiver.sh --publish-current
201
380
  ```
202
381
 
203
- Versioned publish:
382
+ Publicar con bump:
204
383
 
205
384
  ```bash
206
385
  bash scripts/release-quiver.sh patch --publish
207
386
  ```
208
387
 
209
- The release helper stays explicit on purpose: `--publish-current` publishes the current version, and `--publish` follows a normal version bump flow.
388
+ Antes de publicar, verificá autenticación y estado del paquete:
210
389
 
211
- If `npm whoami` or `npm view create-quiver version` fails, fix npm auth or registry reachability before publishing.
212
-
213
- For a first release, prefer `--publish-current` so the published package stays at `0.4.0`.
390
+ ```bash
391
+ npm whoami
392
+ npm view create-quiver version
393
+ ```
214
394
 
215
- ## References
395
+ ## 📚 Documentación útil
216
396
 
217
- - [AI guide](./README_FOR_AI.md)
218
- - [AI context template](./docs/AI_CONTEXT.md.template)
219
- - [Support matrix template](./docs/SUPPORT_MATRIX.md.template)
220
- - [Troubleshooting template](./docs/TROUBLESHOOTING.md.template)
397
+ - [README para agentes de IA](./README_FOR_AI.md)
221
398
  - [Changelog](./CHANGELOG.md)
222
399
  - [Roadmap](./ROADMAP.md)
400
+ - [Backlog](./BACKLOG.md)
401
+ - [Guía de templates](./TEMPLATE.md)
402
+ - [Contribución](./CONTRIBUTING.md)
403
+ - [Seguridad](./SECURITY.md)
404
+
405
+ ## Información pendiente de confirmar
406
+
407
+ - `package.json` no declara `engines`; la versión mínima real de Node queda pendiente. La CI usa Node 22.
408
+ - `package.json` está en `0.9.0`, igual que `CHANGELOG.md`.
409
+ - `docs/COMMANDS.md.template` marca algunos comandos de IA como `v0.10`, aunque `package.json` todavía está en `0.9.0`; la próxima publicación debe alinear versión y changelog.
410
+ - Los scripts legacy de `package.json` que apuntan a `tools/scripts/*` deben confirmarse para este repo fuente o separarse de los scripts pensados para proyectos generados con `--legacy-scripts` o `--full`.
223
411
 
224
- ## License
412
+ ## Licencia
225
413
 
226
414
  MIT