create-quiver 0.4.0 → 0.6.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 (38) hide show
  1. package/README.md +76 -22
  2. package/README_FOR_AI.md +30 -10
  3. package/docs/AI_CONTEXT.md.template +59 -0
  4. package/docs/AI_ONBOARDING_PROMPT.md.template +56 -0
  5. package/docs/CONTEXTO.md.template +1 -1
  6. package/docs/DOCUMENTATION_GUIDE.md.template +9 -7
  7. package/docs/INDEX.md.template +4 -0
  8. package/docs/WORKFLOW.md.template +7 -1
  9. package/package.json +2 -1
  10. package/package.template.json +2 -1
  11. package/scripts/init-docs.sh +209 -35
  12. package/scripts/package-quiver.sh +2 -0
  13. package/specs/quiver-v07-ai-context-pack/EVIDENCE_REPORT.md +24 -0
  14. package/specs/quiver-v07-ai-context-pack/SPEC.md +40 -0
  15. package/specs/quiver-v07-ai-context-pack/STATUS.md +24 -0
  16. package/specs/quiver-v07-ai-context-pack/slices/slice-01-ai-context-pack/slice.json +79 -0
  17. package/specs/quiver-v08-agent-onboarding-analysis/EVIDENCE_REPORT.md +49 -0
  18. package/specs/quiver-v08-agent-onboarding-analysis/SPEC.md +53 -0
  19. package/specs/quiver-v08-agent-onboarding-analysis/STATUS.md +26 -0
  20. package/specs/quiver-v08-agent-onboarding-analysis/slices/slice-01-project-scan-command/slice.json +73 -0
  21. package/specs/quiver-v08-agent-onboarding-analysis/slices/slice-02-ai-onboarding-prompt/slice.json +82 -0
  22. package/specs/quiver-v08-agent-onboarding-analysis/slices/slice-03-doctor-readme-adoption-flow/slice.json +76 -0
  23. package/specs/quiver-v09-onboarding-readme-flow/EVIDENCE_REPORT.md +33 -0
  24. package/specs/quiver-v09-onboarding-readme-flow/SPEC.md +44 -0
  25. package/specs/quiver-v09-onboarding-readme-flow/STATUS.md +25 -0
  26. package/specs/quiver-v09-onboarding-readme-flow/slices/slice-01-developer-readme-onboarding-flow/slice.json +69 -0
  27. package/specs/quiver-v09-onboarding-readme-flow/slices/slice-02-ai-handoff-doctor-guidance/slice.json +71 -0
  28. package/specs/quiver-v10-local-project-installation-guidance/EVIDENCE_REPORT.md +25 -0
  29. package/specs/quiver-v10-local-project-installation-guidance/SPEC.md +42 -0
  30. package/specs/quiver-v10-local-project-installation-guidance/STATUS.md +24 -0
  31. package/specs/quiver-v10-local-project-installation-guidance/slices/slice-01-local-project-installation-guidance/slice.json +75 -0
  32. package/specs/quiver-v11-existing-project-migration/EVIDENCE_REPORT.md +38 -0
  33. package/specs/quiver-v11-existing-project-migration/SPEC.md +59 -0
  34. package/specs/quiver-v11-existing-project-migration/STATUS.md +26 -0
  35. package/specs/quiver-v11-existing-project-migration/slices/slice-01-non-destructive-migrate-command/slice.json +73 -0
  36. package/specs/quiver-v11-existing-project-migration/slices/slice-02-version-metadata-doctor-upgrade-checks/slice.json +71 -0
  37. package/specs/quiver-v11-existing-project-migration/slices/slice-03-upgrade-docs-legacy-project-smokes/slice.json +78 -0
  38. package/src/create-quiver/index.js +757 -9
@@ -40,6 +40,7 @@ fi
40
40
  PROJECT_NAME="$1"
41
41
  PROJECT_SLUG=$(echo "$PROJECT_NAME" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd '[:alnum:]-')
42
42
  CURRENT_DATE=$(date +%Y-%m-%d)
43
+ MIGRATE_MODE="${QUIVER_MIGRATE:-0}"
43
44
  DATE_PLUS_7=$(node -e 'const d = new Date(); d.setDate(d.getDate() + 7); const p = (n) => String(n).padStart(2, "0"); console.log(`${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())}`);')
44
45
  DATE_PLUS_30=$(node -e 'const d = new Date(); d.setDate(d.getDate() + 30); const p = (n) => String(n).padStart(2, "0"); console.log(`${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())}`);')
45
46
  DATE_PLUS_35=$(node -e 'const d = new Date(); d.setDate(d.getDate() + 35); const p = (n) => String(n).padStart(2, "0"); console.log(`${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())}`);')
@@ -76,6 +77,11 @@ copy_template() {
76
77
  if [ -f "$src" ]; then
77
78
  # Remover .template del nombre si existe
78
79
  dest=$(echo "$dest" | sed 's/\.template$//')
80
+
81
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "$dest" ]; then
82
+ print_info "Saltado: $dest ya existe"
83
+ return 0
84
+ fi
79
85
 
80
86
  # Copiar y reemplazar placeholders
81
87
  sed -e "s/{{PROJECT_NAME}}/$PROJECT_NAME/g" \
@@ -101,6 +107,11 @@ copy_template_keep_name() {
101
107
  local dest="$2"
102
108
 
103
109
  if [ -f "$src" ]; then
110
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "$dest" ]; then
111
+ print_info "Saltado: $dest ya existe"
112
+ return 0
113
+ fi
114
+
104
115
  sed -e "s/{{PROJECT_NAME}}/$PROJECT_NAME/g" \
105
116
  -e "s/{{PROJECT_SLUG}}/$PROJECT_SLUG/g" \
106
117
  -e "s/\[project\]/$PROJECT_SLUG/g" \
@@ -141,6 +152,8 @@ copy_file_if_missing() {
141
152
 
142
153
  # Copiar templates de docs/
143
154
  copy_template "docs-template/docs/INDEX.md.template" "docs/INDEX.md"
155
+ copy_template "docs-template/docs/AI_CONTEXT.md.template" "docs/AI_CONTEXT.md"
156
+ copy_template "docs-template/docs/AI_ONBOARDING_PROMPT.md.template" "docs/AI_ONBOARDING_PROMPT.md"
144
157
  copy_template "docs-template/docs/CONTEXTO.md.template" "docs/CONTEXTO.md"
145
158
  copy_template "docs-template/docs/STATUS.md.template" "docs/STATUS.md"
146
159
  copy_template "docs-template/docs/WORKFLOW.md.template" "docs/WORKFLOW.md"
@@ -155,24 +168,40 @@ copy_template "docs-template/docs/TESTING_GUIDE_FOR_AI.md.template" "docs/TESTIN
155
168
 
156
169
  # Copiar archivos que no son templates
157
170
  if [ -f "docs-template/docs/UI_STANDARDS.md" ]; then
158
- cp "docs-template/docs/UI_STANDARDS.md" "docs/UI_STANDARDS.md"
159
- print_success "Creado: docs/UI_STANDARDS.md"
171
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/UI_STANDARDS.md" ]; then
172
+ print_info "Saltado: docs/UI_STANDARDS.md ya existe"
173
+ else
174
+ cp "docs-template/docs/UI_STANDARDS.md" "docs/UI_STANDARDS.md"
175
+ print_success "Creado: docs/UI_STANDARDS.md"
176
+ fi
160
177
  fi
161
178
 
162
179
  if [ -f "docs-template/docs/MOCK_DATA_GUIDE.md" ]; then
163
- cp "docs-template/docs/MOCK_DATA_GUIDE.md" "docs/MOCK_DATA_GUIDE.md"
164
- print_success "Creado: docs/MOCK_DATA_GUIDE.md"
180
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/MOCK_DATA_GUIDE.md" ]; then
181
+ print_info "Saltado: docs/MOCK_DATA_GUIDE.md ya existe"
182
+ else
183
+ cp "docs-template/docs/MOCK_DATA_GUIDE.md" "docs/MOCK_DATA_GUIDE.md"
184
+ print_success "Creado: docs/MOCK_DATA_GUIDE.md"
185
+ fi
165
186
  fi
166
187
 
167
188
  # Copiar configuración de IA
168
189
  if [ -f "docs-template/docs/ai/PRINCIPLES.md" ]; then
169
- cp "docs-template/docs/ai/PRINCIPLES.md" "docs/ai/PRINCIPLES.md"
170
- print_success "Creado: docs/ai/PRINCIPLES.md"
190
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/ai/PRINCIPLES.md" ]; then
191
+ print_info "Saltado: docs/ai/PRINCIPLES.md ya existe"
192
+ else
193
+ cp "docs-template/docs/ai/PRINCIPLES.md" "docs/ai/PRINCIPLES.md"
194
+ print_success "Creado: docs/ai/PRINCIPLES.md"
195
+ fi
171
196
  fi
172
197
 
173
198
  if [ -f "docs-template/docs/ai/RULES.yaml" ]; then
174
- cp "docs-template/docs/ai/RULES.yaml" "docs/ai/RULES.yaml"
175
- print_success "Creado: docs/ai/RULES.yaml"
199
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/ai/RULES.yaml" ]; then
200
+ print_info "Saltado: docs/ai/RULES.yaml ya existe"
201
+ else
202
+ cp "docs-template/docs/ai/RULES.yaml" "docs/ai/RULES.yaml"
203
+ print_success "Creado: docs/ai/RULES.yaml"
204
+ fi
176
205
  fi
177
206
 
178
207
  # Copiar template de LESSONS (vacío)
@@ -238,44 +267,123 @@ NODE
238
267
 
239
268
  sync_package_json
240
269
 
270
+ mkdir -p ".quiver"
271
+ node - <<'NODE'
272
+ const fs = require('fs');
273
+ const path = require('path');
274
+
275
+ const statePath = path.join('.quiver', 'state.json');
276
+ const packageJson = fs.existsSync('package.json') ? JSON.parse(fs.readFileSync('package.json', 'utf8')) : {};
277
+ const currentVersion = process.env.QUIVER_VERSION || packageJson.version || '0.0.0';
278
+ const migrateMode = process.env.QUIVER_MIGRATE === '1';
279
+ const now = new Date().toISOString();
280
+ const projectName = process.env.QUIVER_PROJECT_NAME || packageJson.name || '';
281
+
282
+ let existing = {};
283
+ if (fs.existsSync(statePath)) {
284
+ existing = JSON.parse(fs.readFileSync(statePath, 'utf8'));
285
+ }
286
+
287
+ const nextState = migrateMode
288
+ ? {
289
+ ...existing,
290
+ quiver_version: currentVersion,
291
+ project_name: projectName || existing.project_name || '',
292
+ initialized_version: existing.initialized_version ?? null,
293
+ migrated_version: currentVersion,
294
+ last_initialized_at: existing.last_initialized_at ?? null,
295
+ last_migration_at: now,
296
+ last_analysis_at: existing.last_analysis_at ?? null,
297
+ }
298
+ : {
299
+ ...existing,
300
+ quiver_version: currentVersion,
301
+ project_name: projectName || existing.project_name || '',
302
+ initialized_version: existing.initialized_version || currentVersion,
303
+ migrated_version: existing.migrated_version ?? null,
304
+ last_initialized_at: existing.last_initialized_at || now,
305
+ last_migration_at: existing.last_migration_at ?? null,
306
+ last_analysis_at: existing.last_analysis_at ?? null,
307
+ };
308
+
309
+ fs.writeFileSync(statePath, `${JSON.stringify(nextState, null, 2)}\n`);
310
+ NODE
311
+
241
312
  # Copiar bootstrap de slices a tools/scripts
242
313
  if [ -f "docs-template/scripts/start-slice.sh" ]; then
243
- cp "docs-template/scripts/start-slice.sh" "tools/scripts/start-slice.sh"
244
- chmod +x "tools/scripts/start-slice.sh"
245
- print_success "Creado: tools/scripts/start-slice.sh"
314
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/start-slice.sh" ]; then
315
+ print_info "Saltado: tools/scripts/start-slice.sh ya existe"
316
+ else
317
+ cp "docs-template/scripts/start-slice.sh" "tools/scripts/start-slice.sh"
318
+ chmod +x "tools/scripts/start-slice.sh"
319
+ print_success "Creado: tools/scripts/start-slice.sh"
320
+ fi
246
321
  fi
247
322
 
248
323
  if [ -f "docs-template/scripts/refresh-active-slices.sh" ]; then
249
- cp "docs-template/scripts/refresh-active-slices.sh" "tools/scripts/refresh-active-slices.sh"
250
- chmod +x "tools/scripts/refresh-active-slices.sh"
251
- print_success "Creado: tools/scripts/refresh-active-slices.sh"
324
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/refresh-active-slices.sh" ]; then
325
+ print_info "Saltado: tools/scripts/refresh-active-slices.sh ya existe"
326
+ else
327
+ cp "docs-template/scripts/refresh-active-slices.sh" "tools/scripts/refresh-active-slices.sh"
328
+ chmod +x "tools/scripts/refresh-active-slices.sh"
329
+ print_success "Creado: tools/scripts/refresh-active-slices.sh"
330
+ fi
252
331
  fi
253
332
 
254
333
  if [ -f "docs-template/scripts/check-slice-readiness.sh" ]; then
255
- cp "docs-template/scripts/check-slice-readiness.sh" "tools/scripts/check-slice-readiness.sh"
256
- chmod +x "tools/scripts/check-slice-readiness.sh"
257
- print_success "Creado: tools/scripts/check-slice-readiness.sh"
334
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/check-slice-readiness.sh" ]; then
335
+ print_info "Saltado: tools/scripts/check-slice-readiness.sh ya existe"
336
+ else
337
+ cp "docs-template/scripts/check-slice-readiness.sh" "tools/scripts/check-slice-readiness.sh"
338
+ chmod +x "tools/scripts/check-slice-readiness.sh"
339
+ print_success "Creado: tools/scripts/check-slice-readiness.sh"
340
+ fi
258
341
  fi
259
342
 
260
343
  if [ -f "docs-template/scripts/check-pr-readiness.sh" ]; then
261
- cp "docs-template/scripts/check-pr-readiness.sh" "tools/scripts/check-pr-readiness.sh"
262
- chmod +x "tools/scripts/check-pr-readiness.sh"
263
- print_success "Creado: tools/scripts/check-pr-readiness.sh"
344
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/check-pr-readiness.sh" ]; then
345
+ print_info "Saltado: tools/scripts/check-pr-readiness.sh ya existe"
346
+ else
347
+ cp "docs-template/scripts/check-pr-readiness.sh" "tools/scripts/check-pr-readiness.sh"
348
+ chmod +x "tools/scripts/check-pr-readiness.sh"
349
+ print_success "Creado: tools/scripts/check-pr-readiness.sh"
350
+ fi
264
351
  fi
265
352
 
266
353
  if [ -f "docs-template/scripts/cleanup-slice.sh" ]; then
267
- cp "docs-template/scripts/cleanup-slice.sh" "tools/scripts/cleanup-slice.sh"
268
- chmod +x "tools/scripts/cleanup-slice.sh"
269
- print_success "Creado: tools/scripts/cleanup-slice.sh"
354
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/cleanup-slice.sh" ]; then
355
+ print_info "Saltado: tools/scripts/cleanup-slice.sh ya existe"
356
+ else
357
+ cp "docs-template/scripts/cleanup-slice.sh" "tools/scripts/cleanup-slice.sh"
358
+ chmod +x "tools/scripts/cleanup-slice.sh"
359
+ print_success "Creado: tools/scripts/cleanup-slice.sh"
360
+ fi
270
361
  fi
271
362
 
272
363
  if [ -f "docs-template/scripts/check-scope.sh" ]; then
273
- cp "docs-template/scripts/check-scope.sh" "tools/scripts/check-scope.sh"
274
- chmod +x "tools/scripts/check-scope.sh"
275
- print_success "Creado: tools/scripts/check-scope.sh"
364
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/check-scope.sh" ]; then
365
+ print_info "Saltado: tools/scripts/check-scope.sh ya existe"
366
+ else
367
+ cp "docs-template/scripts/check-scope.sh" "tools/scripts/check-scope.sh"
368
+ chmod +x "tools/scripts/check-scope.sh"
369
+ print_success "Creado: tools/scripts/check-scope.sh"
370
+ fi
371
+ fi
372
+
373
+ if [ -f "docs-template/scripts/migrate-project.sh" ]; then
374
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/migrate-project.sh" ]; then
375
+ print_info "Saltado: tools/scripts/migrate-project.sh ya existe"
376
+ else
377
+ cp "docs-template/scripts/migrate-project.sh" "tools/scripts/migrate-project.sh"
378
+ chmod +x "tools/scripts/migrate-project.sh"
379
+ print_success "Creado: tools/scripts/migrate-project.sh"
380
+ fi
276
381
  fi
277
382
 
278
383
  # Crear archivo SEARCH.md básico
384
+ if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/SEARCH.md" ]; then
385
+ print_info "Saltado: docs/SEARCH.md ya existe"
386
+ else
279
387
  cat > "docs/SEARCH.md" << EOF
280
388
  # Búsqueda por Tema
281
389
 
@@ -283,6 +391,14 @@ cat > "docs/SEARCH.md" << EOF
283
391
 
284
392
  ---
285
393
 
394
+ ## AI Context
395
+
396
+ - **Agent context pack:** \`docs/AI_CONTEXT.md\`
397
+ - **Project overview:** \`docs/CONTEXTO.md\`
398
+ - **Workflow:** \`docs/WORKFLOW.md\`
399
+
400
+ ---
401
+
286
402
  ## Autenticación
287
403
 
288
404
  - **Spec:** \`../specs/$PROJECT_SLUG/slices/slice-01/slice.json\`
@@ -309,8 +425,11 @@ cat > "docs/SEARCH.md" << EOF
309
425
 
310
426
  **Fin de la búsqueda**
311
427
  EOF
428
+ fi
312
429
 
313
- print_success "Creado: docs/SEARCH.md"
430
+ if [ "$MIGRATE_MODE" != "1" ] || [ ! -f "docs/SEARCH.md" ]; then
431
+ print_success "Creado: docs/SEARCH.md"
432
+ fi
314
433
 
315
434
  # Crear README.md en la raíz del proyecto (si no existe)
316
435
  if [ ! -f "README.md" ]; then
@@ -321,20 +440,74 @@ if [ ! -f "README.md" ]; then
321
440
 
322
441
  ## Quick Start
323
442
 
443
+ Run Quiver from this project root. Do not install it globally.
444
+
324
445
  \`\`\`bash
325
446
  npm install
326
- cp .env.example .env.local
327
- npm run dev
447
+ npx create-quiver analyze --dir .
448
+ npx create-quiver doctor --dir .
449
+ \`\`\`
450
+
451
+ If this project needs a pinned Quiver version, install it as a devDependency:
452
+
453
+ \`\`\`bash
454
+ npm install --save-dev create-quiver
455
+ \`\`\`
456
+
457
+ If your project path contains spaces, quote it explicitly when using \`--dir\`.
458
+
459
+ ## Upgrading Existing Projects
460
+
461
+ If the project already existed before this Quiver version, upgrade it from the project root:
462
+
463
+ \`\`\`bash
464
+ cd /path/to/your-project
465
+ npx create-quiver migrate --dir .
466
+ npx create-quiver analyze --dir .
467
+ npx create-quiver doctor --dir .
468
+ \`\`\`
469
+
470
+ If your team prefers a pinned local dependency, update the package first and then run the same flow:
471
+
472
+ \`\`\`bash
473
+ npm install --save-dev create-quiver@latest
474
+ npx create-quiver migrate --dir .
475
+ npx create-quiver analyze --dir .
476
+ npx create-quiver doctor --dir .
477
+ \`\`\`
478
+
479
+ ## AI Context Onboarding
480
+
481
+ After analysis and doctor validation, open your AI agent in this project and run:
482
+
483
+ \`\`\`text
484
+ Read docs/AI_ONBOARDING_PROMPT.md and execute it.
485
+ Do not modify product code unless I explicitly authorize it.
486
+ Prepare the project context docs and report assumptions, risks, and files changed.
328
487
  \`\`\`
329
488
 
489
+ Review the AI changes to docs/AI_CONTEXT.md, docs/CONTEXTO.md, docs/STATUS.md, and specs/$PROJECT_SLUG/SPEC.md before starting implementation work.
490
+
491
+ ## First Slice Workflow
492
+
493
+ 1. Review or refine specs/$PROJECT_SLUG/SPEC.md.
494
+ 2. Create the first slice from specs/$PROJECT_SLUG/slices/slice-template/slice.json.
495
+ 3. Start work with tools/scripts/start-slice.sh <slice.json>.
496
+ 4. Make one commit per slice.
497
+ 5. Open one PR per spec.
498
+
330
499
  ## Verification Checklist
331
500
 
332
501
  - [ ] npm install completes
333
- - [ ] npm run dev starts
334
- - [ ] App opens at http://localhost:3000
502
+ - [ ] npx create-quiver analyze --dir . completes
503
+ - [ ] npx create-quiver doctor --dir . completes
504
+ - [ ] AI agent executed docs/AI_ONBOARDING_PROMPT.md
505
+ - [ ] Context docs were reviewed before the first slice
335
506
 
336
507
  ## Documentation
337
508
 
509
+ - [AI Context](./docs/AI_CONTEXT.md) - Contexto resumido para IA
510
+ - [AI Onboarding Prompt](./docs/AI_ONBOARDING_PROMPT.md) - Handoff exacto para agentes después del análisis
338
511
  - [Contexto](./docs/CONTEXTO.md) - Qué es $PROJECT_NAME
339
512
  - [Workflow](./docs/WORKFLOW.md) - Cómo implementar
340
513
  - [Support Matrix](./docs/SUPPORT_MATRIX.md) - Qué entornos están soportados
@@ -357,10 +530,11 @@ echo " docs/archive/ ← Histórico (vacío)"
357
530
  echo " specs/$PROJECT_SLUG/ ← Especificaciones del proyecto"
358
531
  echo ""
359
532
  echo "📝 Próximos pasos:"
360
- echo " 1. Editar docs/CONTEXTO.md con la información de tu proyecto"
361
- echo " 2. Editar docs/STATUS.md con el estado actual"
362
- echo " 3. Crear el primer directorio de slice en specs/$PROJECT_SLUG/slices/[slice-id]/"
363
- echo " 4. Actualizar docs/SEARCH.md con temas específicos"
533
+ echo " 1. Editar docs/AI_CONTEXT.md con el contexto resumido para IA"
534
+ echo " 2. Editar docs/CONTEXTO.md con la información de tu proyecto"
535
+ echo " 3. Editar docs/STATUS.md con el estado actual"
536
+ echo " 4. Crear el primer directorio de slice en specs/$PROJECT_SLUG/slices/[slice-id]/"
537
+ echo " 5. Actualizar docs/SEARCH.md con temas específicos"
364
538
  echo ""
365
539
  echo "📖 Más información:"
366
540
  echo " - Ver docs-template/TEMPLATE.md para guía de personalización"
@@ -58,6 +58,8 @@ required_paths=(
58
58
  "package/src/create-quiver/index.js"
59
59
  "package/README.md"
60
60
  "package/README_FOR_AI.md"
61
+ "package/docs/AI_CONTEXT.md.template"
62
+ "package/docs/AI_ONBOARDING_PROMPT.md.template"
61
63
  "package/TEMPLATE.md"
62
64
  "package/LICENSE"
63
65
  "package/CONTRIBUTING.md"
@@ -0,0 +1,24 @@
1
+ # Quiver v0.7 Evidence Report
2
+
3
+ **Spec:** quiver-v07-ai-context-pack
4
+ **Last updated:** 2026-04-21
5
+
6
+ ## Evidence Collected
7
+
8
+ - `docs/AI_CONTEXT.md.template` added as the generated AI context pack template
9
+ - `README_FOR_AI.md` now points agents at `docs/AI_CONTEXT.md` first
10
+ - `README.md`, `docs/INDEX.md.template`, `docs/DOCUMENTATION_GUIDE.md.template`, and `docs/WORKFLOW.md.template` now surface the AI context pack
11
+ - `scripts/init-docs.sh` now creates `docs/AI_CONTEXT.md` and prints it as the first follow-up step
12
+ - installer and package smoke tests require the new context pack
13
+
14
+ ## Validation
15
+
16
+ - `bash -n scripts/init-docs.sh scripts/ci/smoke-init-docs.sh scripts/ci/smoke-create-quiver.sh scripts/package-quiver.sh`
17
+ - `git diff --check`
18
+ - JSON parse of `specs/quiver-v07-ai-context-pack/slices/slice-01-ai-context-pack/slice.json`
19
+ - `bash scripts/ci/smoke-init-docs.sh`
20
+ - `bash scripts/ci/smoke-create-quiver.sh`
21
+
22
+ ## Notes
23
+
24
+ This spec is intentionally narrow: it adds an agent-facing context pack and wires it into bootstrap and documentation, but it does not attempt automatic repository summarization.
@@ -0,0 +1,40 @@
1
+ # Quiver v0.7 - AI Context Pack
2
+
3
+ **Date:** 2026-04-21
4
+ **Status:** Completed
5
+
6
+ Slice numbering resets here: this spec starts at `slice-01` and does not continue any previous spec's numbering.
7
+
8
+ ## Objective
9
+
10
+ Make the generated project expose a first-class AI context pack so new agents can start from a compact project snapshot instead of rereading the whole repository.
11
+
12
+ ## Scope
13
+
14
+ ### Included
15
+
16
+ - Add a generated `docs/AI_CONTEXT.md` template for new projects
17
+ - Wire `init-docs.sh` so the AI context pack is created during bootstrap
18
+ - Surface the AI context pack in README, documentation index, and workflow docs
19
+ - Update installer and package smokes so the new file is required
20
+
21
+ ### Excluded
22
+
23
+ - Building a runtime repository analyzer that auto-summarizes arbitrary source code
24
+ - Changing slice execution semantics
25
+ - Changing release publishing behavior
26
+ - Creating a separate AI localization system
27
+
28
+ ## Slices
29
+
30
+ | Slice | Title | Status |
31
+ |-------|-------|--------|
32
+ | 01 | AI Context Pack Bootstrap | Completed |
33
+
34
+ ## Definition of Done
35
+
36
+ - New projects generated by `init-docs.sh` include `docs/AI_CONTEXT.md`
37
+ - The AI context pack is linked from the generated documentation index, workflow, and README guidance
38
+ - Installer and package smoke tests fail if the AI context pack is missing
39
+ - The AI context pack clearly tells agents what to read first and which invariants to preserve
40
+ - The implementation stays limited to one slice and does not broaden into runtime analysis
@@ -0,0 +1,24 @@
1
+ # Quiver v0.7 Spec Status
2
+
3
+ **Spec:** quiver-v07-ai-context-pack
4
+ **Last updated:** 2026-04-21
5
+
6
+ Slice numbering is local to this spec. The first slice is `slice-01`.
7
+
8
+ ## Status
9
+
10
+ | Slice | Title | Status | PR | Estimated hours | Actual hours |
11
+ |-------|-------|--------|----|-----------------|--------------|
12
+ | slice-01 | AI Context Pack Bootstrap | Completed | - | 3 | 3 |
13
+
14
+ ## Progress
15
+
16
+ - Completed slices: 1 / 1
17
+ - Estimated hours: 3
18
+ - Actual hours: 3
19
+
20
+ ## Blockers
21
+
22
+ | Slice | Blocker | Since | Action needed |
23
+ |-------|---------|-------|---------------|
24
+ | - | - | - | - |
@@ -0,0 +1,79 @@
1
+ {
2
+ "slice_id": "slice-01-ai-context-pack",
3
+ "ticket": "QUIVER-01",
4
+ "type": "docs",
5
+ "title": "AI Context Pack Bootstrap",
6
+ "objective": "Create a first-class generated AI context pack and wire it into bootstrap, docs, and smokes so new projects expose a compact agent entry point by default.",
7
+ "description": "New projects currently generate `docs/CONTEXTO.md` as the human project overview, but they do not generate a dedicated AI context pack. That forces agents to infer too much from scattered docs. This slice adds `docs/AI_CONTEXT.md`, updates the generated docs entry points, and ensures the installer and package smokes require the new file.",
8
+ "git": {
9
+ "branch_type": "docs",
10
+ "base_branch": "develop",
11
+ "branch_slug": "ai-context-pack",
12
+ "branch_name": "docs/QUIVER-01-ai-context-pack"
13
+ },
14
+ "must": [
15
+ "Add `docs/AI_CONTEXT.md.template` to the template repo",
16
+ "Make `scripts/init-docs.sh` create `docs/AI_CONTEXT.md` in generated projects",
17
+ "Link the AI context pack from the README, docs index, workflow guide, and documentation guide",
18
+ "Update the installer and package smoke tests so the new context pack is required",
19
+ "Keep the change limited to a single slice and do not implement runtime summarization"
20
+ ],
21
+ "not_included": [
22
+ "Automatic source-code analysis that derives a repository summary at runtime",
23
+ "Changes to slice execution semantics",
24
+ "Release publishing changes",
25
+ "Localization beyond the existing generated docs"
26
+ ],
27
+ "acceptance": [
28
+ "A fresh project generated by `init-docs.sh` contains `docs/AI_CONTEXT.md`",
29
+ "The generated docs index and workflow link to the AI context pack",
30
+ "The root README tells agents to read the AI context pack first in generated projects",
31
+ "Package and installer smokes fail if the AI context pack template is missing",
32
+ "The AI context pack explains the project contract, read order, and core invariants"
33
+ ],
34
+ "files": [
35
+ "docs/AI_CONTEXT.md.template",
36
+ "README.md",
37
+ "README_FOR_AI.md",
38
+ "docs/INDEX.md.template",
39
+ "docs/DOCUMENTATION_GUIDE.md.template",
40
+ "docs/WORKFLOW.md.template",
41
+ "docs/CONTEXTO.md.template",
42
+ "scripts/init-docs.sh",
43
+ "scripts/ci/smoke-init-docs.sh",
44
+ "scripts/ci/smoke-create-quiver.sh",
45
+ "scripts/package-quiver.sh",
46
+ "specs/quiver-v07-ai-context-pack/SPEC.md",
47
+ "specs/quiver-v07-ai-context-pack/STATUS.md",
48
+ "specs/quiver-v07-ai-context-pack/EVIDENCE_REPORT.md",
49
+ "specs/quiver-v07-ai-context-pack/slices/slice-01-ai-context-pack/slice.json"
50
+ ],
51
+ "tests": [
52
+ "init-docs smoke",
53
+ "package smoke",
54
+ "installer smoke",
55
+ "README and workflow link checks",
56
+ "git diff whitespace check"
57
+ ],
58
+ "documentation": [
59
+ "specs/quiver-v07-ai-context-pack/SPEC.md",
60
+ "specs/quiver-v07-ai-context-pack/STATUS.md",
61
+ "specs/quiver-v07-ai-context-pack/EVIDENCE_REPORT.md"
62
+ ],
63
+ "dependencies": [
64
+ "quiver-v05-readme-adoption-contract",
65
+ "quiver-v06-release-readiness"
66
+ ],
67
+ "assumptions": [
68
+ "The AI context pack should remain a generated doc, not a runtime analyzer",
69
+ "The generated context pack should complement, not replace, `docs/CONTEXTO.md`",
70
+ "The project keeps its existing slice workflow and release helpers"
71
+ ],
72
+ "estimated_hours": 3,
73
+ "actual_hours": 3,
74
+ "status": "completed",
75
+ "blocked_reason": null,
76
+ "ready_at": "2026-04-21T00:00:00Z",
77
+ "started_at": "2026-04-21T00:00:00Z",
78
+ "completed_at": "2026-04-21T00:00:00Z"
79
+ }
@@ -0,0 +1,49 @@
1
+ # Quiver v0.8 Evidence Report
2
+
3
+ **Spec:** quiver-v08-agent-onboarding-analysis
4
+ **Last updated:** 2026-04-21
5
+ **Status:** Completed
6
+
7
+ ## Summary
8
+
9
+ | Slice | Acceptance criteria | Status | Evidence |
10
+ |-------|---------------------|--------|----------|
11
+ | slice-01 | 6 | Completed | `bash scripts/ci/smoke-create-quiver.sh`, `node -c src/create-quiver/index.js`, `bash -n scripts/ci/smoke-create-quiver.sh` |
12
+ | slice-02 | 6 | Completed | `bash scripts/ci/smoke-init-docs.sh`, `bash scripts/ci/smoke-create-quiver.sh`, `bash scripts/package-quiver.sh` |
13
+ | slice-03 | 6 | Completed | `bash scripts/ci/smoke-init-docs.sh`, `bash scripts/ci/smoke-create-quiver.sh`, `bash scripts/package-quiver.sh`, `git diff --check` |
14
+
15
+ ## Evidence by Slice
16
+
17
+ ### slice-01-project-scan-command
18
+
19
+ - Added `create-quiver analyze --dir <project>` support in `src/create-quiver/index.js`
20
+ - Generated `docs/PROJECT_SCAN.json` and `docs/PROJECT_MAP.md` from a local repository scan
21
+ - Extended the smoke test to run `analyze` on fresh, existing, and packaged installs
22
+ - Verified syntax with `node -c src/create-quiver/index.js`
23
+ - Verified shell syntax with `bash -n scripts/ci/smoke-create-quiver.sh`
24
+ - Verified end-to-end behavior with `bash scripts/ci/smoke-create-quiver.sh`
25
+
26
+ ### slice-02-ai-onboarding-prompt
27
+
28
+ - Added `docs/AI_ONBOARDING_PROMPT.md.template` to the packaged docs templates
29
+ - Wired `scripts/init-docs.sh` to generate `docs/AI_ONBOARDING_PROMPT.md`
30
+ - Updated the AI guide and generated docs templates to link the onboarding prompt
31
+ - Extended init, create, and package smokes to require and validate the prompt artifact
32
+ - Verified shell syntax with `bash -n scripts/init-docs.sh scripts/ci/smoke-init-docs.sh scripts/ci/smoke-create-quiver.sh scripts/package-quiver.sh`
33
+ - Verified `docs/AI_ONBOARDING_PROMPT.md` generation with `bash scripts/ci/smoke-init-docs.sh`
34
+ - Verified end-to-end behavior with `bash scripts/ci/smoke-create-quiver.sh`
35
+ - Verified package inclusion with `bash scripts/package-quiver.sh`
36
+
37
+ ### slice-03-doctor-readme-adoption-flow
38
+
39
+ - Updated `doctor` to print copy-pasteable commands without the confusing `Run` prefix
40
+ - Made `doctor` recommend `npx create-quiver analyze --dir .` when scan artifacts are missing
41
+ - Updated the root README and generated bootstrap README to describe the full adopt-analyze-doctor-prompt flow
42
+ - Added quoting guidance for paths that contain spaces
43
+ - Extended the smoke tests to verify the new doctor guidance and README onboarding sequence
44
+ - Verified shell syntax with `bash -n scripts/init-docs.sh scripts/ci/smoke-init-docs.sh scripts/ci/smoke-create-quiver.sh scripts/package-quiver.sh`
45
+ - Verified syntax with `node -c src/create-quiver/index.js`
46
+ - Verified end-to-end behavior with `bash scripts/ci/smoke-init-docs.sh`
47
+ - Verified end-to-end behavior with `bash scripts/ci/smoke-create-quiver.sh`
48
+ - Verified package inclusion with `bash scripts/package-quiver.sh`
49
+ - Verified the final diff stays clean with `git diff --check`
@@ -0,0 +1,53 @@
1
+ # Quiver v0.8 - Agent Onboarding Analysis
2
+
3
+ **Date:** 2026-04-21
4
+ **Status:** Completed
5
+
6
+ Slice numbering resets here: this spec starts at `slice-01` and does not continue any previous spec's numbering.
7
+
8
+ ## Objective
9
+
10
+ Make Quiver adoption plug-and-play after installation by adding a deterministic local analysis step that helps an AI agent understand an existing project and fill the generated context docs without guessing.
11
+
12
+ ## Scope
13
+
14
+ ### Included
15
+
16
+ - Add a local `create-quiver analyze --dir <project>` command that scans a project without calling an AI provider
17
+ - Generate a structured scan artifact and human-readable project map for AI onboarding
18
+ - Generate an exact AI onboarding prompt that tells an agent how to complete Quiver context docs safely
19
+ - Update README, doctor output, and smoke tests so the recommended onboarding flow is install, analyze, validate, then run the prompt with an AI agent
20
+ - Preserve Quiver's existing workflow rules: one commit per slice and one PR per spec
21
+
22
+ ### Excluded
23
+
24
+ - Calling OpenAI, Claude, or any other AI provider from the CLI
25
+ - Reading or exposing secrets from `.env` files or private local configuration
26
+ - Making product-code changes in the target project during analysis
27
+ - Replacing `docs/AI_CONTEXT.md`, `docs/CONTEXTO.md`, or the existing spec/slice workflow
28
+ - Windows-specific shell UX fixes beyond using portable Node.js path handling in the analyzer
29
+
30
+ ## Proposed Onboarding Flow
31
+
32
+ 1. Install or run Quiver in an existing project.
33
+ 2. Run `npx create-quiver analyze --dir .`.
34
+ 3. Run `npx create-quiver doctor --dir .`.
35
+ 4. Open the AI agent and run the generated prompt from `docs/AI_ONBOARDING_PROMPT.md`.
36
+ 5. Review the documentation-only changes and create the first Quiver onboarding PR.
37
+
38
+ ## Slices
39
+
40
+ | Slice | Title | Status | Spec |
41
+ |-------|-------|--------|------|
42
+ | 01 | Project Scan Command | Completed | [slice-01](./slices/slice-01-project-scan-command/slice.json) |
43
+ | 02 | AI Onboarding Prompt | Completed | [slice-02-ai-onboarding-prompt/slice.json](./slices/slice-02-ai-onboarding-prompt/slice.json) |
44
+ | 03 | Doctor and README Adoption Flow | Completed | [slice-03-doctor-readme-adoption-flow/slice.json](./slices/slice-03-doctor-readme-adoption-flow/slice.json) |
45
+
46
+ ## Definition of Done
47
+
48
+ - `create-quiver analyze --dir .` creates safe onboarding artifacts in a generated project
49
+ - The analyzer ignores heavy/generated folders and never reads real secret files
50
+ - Generated artifacts give an AI agent enough project structure to fill Quiver context docs
51
+ - README and doctor output expose the exact post-install flow and do not imply that "Run" is part of a command
52
+ - Smoke tests prove the installer/package includes the analyzer and generated onboarding prompt
53
+ - All slices are completed with one commit per slice and one PR for this spec