create-quiver 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +7 -30
- package/AGENTS.md.template +41 -0
- package/CHANGELOG.md +5 -0
- package/README.md +53 -9
- package/README_FOR_AI.md +36 -14
- package/ROADMAP.md +78 -0
- package/docs/AI_CONTEXT.md.template +19 -25
- package/docs/AI_ONBOARDING_PROMPT.md.template +12 -0
- package/docs/CONTEXTO.md.template +4 -17
- package/docs/DECISIONS.md.template +18 -0
- package/docs/DEEP.md.template +34 -0
- package/docs/DOCUMENTATION_GUIDE.md.template +9 -7
- package/docs/GITFLOW_PR_GUIDE.md.template +7 -0
- package/docs/INDEX.md.template +9 -0
- package/docs/QUICK.md.template +27 -0
- package/docs/STANDARD.md.template +49 -0
- package/docs/STATUS.md.template +2 -2
- package/docs/SUPPORT_MATRIX.md.template +7 -4
- package/docs/TESTING_GUIDE_FOR_AI.md.template +4 -3
- package/docs/TROUBLESHOOTING.md.template +14 -0
- package/docs/WORKFLOW.md.template +19 -5
- package/package.json +3 -1
- package/package.template.json +13 -1
- package/scripts/cleanup-slice.sh +2 -172
- package/scripts/init-docs.sh +246 -44
- package/scripts/package-quiver.sh +5 -0
- package/scripts/start-slice.sh +3 -425
- package/specs/[project-name]/EVIDENCE_REPORT.md.template +3 -1
- package/specs/[project-name]/slices/slice-template/slice.json +2 -2
- package/specs/quiver-v11-existing-project-migration/EVIDENCE_REPORT.md +38 -0
- package/specs/quiver-v11-existing-project-migration/SPEC.md +59 -0
- package/specs/quiver-v11-existing-project-migration/STATUS.md +26 -0
- package/specs/quiver-v11-existing-project-migration/slices/slice-01-non-destructive-migrate-command/slice.json +73 -0
- package/specs/quiver-v11-existing-project-migration/slices/slice-02-version-metadata-doctor-upgrade-checks/slice.json +71 -0
- package/specs/quiver-v11-existing-project-migration/slices/slice-03-upgrade-docs-legacy-project-smokes/slice.json +78 -0
- package/specs/quiver-v12-cross-platform-native-runtime/EVIDENCE_REPORT.md +30 -0
- package/specs/quiver-v12-cross-platform-native-runtime/SPEC.md +86 -0
- package/specs/quiver-v12-cross-platform-native-runtime/STATUS.md +29 -0
- package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-01-cross-platform-support-contract/slice.json +69 -0
- package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-02-node-init-docs-runtime/slice.json +76 -0
- package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-03-node-migrate-analyze-doctor-flow/slice.json +74 -0
- package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-04-node-slice-lifecycle-commands/slice.json +81 -0
- package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-05-generated-project-scripts-and-migration/slice.json +78 -0
- package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-06-cross-platform-ci-release-readiness/slice.json +74 -0
- package/specs/quiver-v13-token-efficient-ai-context/EVIDENCE_REPORT.md +28 -0
- package/specs/quiver-v13-token-efficient-ai-context/SPEC.md +68 -0
- package/specs/quiver-v13-token-efficient-ai-context/STATUS.md +26 -0
- package/specs/quiver-v13-token-efficient-ai-context/slices/slice-01-token-efficient-ai-modes-guidance/slice.json +65 -0
- package/specs/quiver-v13-token-efficient-ai-context/slices/slice-02-decision-log-context-checkpoint/slice.json +64 -0
- package/specs/quiver-v13-token-efficient-ai-context/slices/slice-03-project-map-reading-order/slice.json +66 -0
- package/specs/quiver-v14-tiered-context-pack/EVIDENCE_REPORT.md +42 -0
- package/specs/quiver-v14-tiered-context-pack/SPEC.md +116 -0
- package/specs/quiver-v14-tiered-context-pack/STATUS.md +35 -0
- package/specs/quiver-v14-tiered-context-pack/slices/slice-01-tiered-context-pack/slice.json +77 -0
- package/specs/quiver-v14-tiered-context-pack/slices/slice-02-agents-md-router/slice.json +74 -0
- package/specs/quiver-v14-tiered-context-pack/slices/slice-03-active-slice-lifecycle/slice.json +74 -0
- package/specs/quiver-v14-tiered-context-pack/slices/slice-04-dedup-frontmatter/slice.json +83 -0
- package/specs/quiver-v14-tiered-context-pack/slices/slice-05-doctor-smokes-tiered-pack/slice.json +84 -0
- package/src/create-quiver/index.js +360 -40
- package/src/create-quiver/lib/analyze.js +9 -0
- package/src/create-quiver/lib/doctor.js +212 -0
- package/src/create-quiver/lib/git.js +154 -0
- package/src/create-quiver/lib/init-docs.js +616 -0
- package/src/create-quiver/lib/lifecycle.js +478 -0
- package/src/create-quiver/lib/paths.js +19 -0
- package/src/create-quiver/lib/readiness.js +300 -0
- package/src/create-quiver/lib/scope.js +5 -0
- package/src/create-quiver/lib/slice.js +194 -0
- package/src/create-quiver/lib/state.js +89 -0
package/scripts/init-docs.sh
CHANGED
|
@@ -40,9 +40,23 @@ 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())}`);')
|
|
47
|
+
PACKAGE_MANAGER="npm"
|
|
48
|
+
STACK_SUMMARY="unknown until analyze"
|
|
49
|
+
PRIMARY_INSTALL="npm install"
|
|
50
|
+
PRIMARY_DEV="npm run quiver:analyze"
|
|
51
|
+
PRIMARY_TEST="npm test"
|
|
52
|
+
ANALYZE_COMMAND="npx create-quiver analyze"
|
|
53
|
+
DOCTOR_COMMAND="npx create-quiver doctor"
|
|
54
|
+
START_SLICE_COMMAND="npx create-quiver start-slice <slice.json>"
|
|
55
|
+
CHECK_SLICE_COMMAND="npx create-quiver check-slice <slice.json>"
|
|
56
|
+
CHECK_PR_COMMAND="npx create-quiver check-pr <slice.json>"
|
|
57
|
+
CLEANUP_SLICE_COMMAND="npx create-quiver cleanup-slice <slice.json>"
|
|
58
|
+
CHECK_SCOPE_COMMAND="npx create-quiver check-scope <slice.json>"
|
|
59
|
+
REFRESH_ACTIVE_SLICES_COMMAND="npx create-quiver refresh-active-slices"
|
|
46
60
|
|
|
47
61
|
print_info "Inicializando documentación para: $PROJECT_NAME"
|
|
48
62
|
print_info "Project slug: $PROJECT_SLUG"
|
|
@@ -76,6 +90,11 @@ copy_template() {
|
|
|
76
90
|
if [ -f "$src" ]; then
|
|
77
91
|
# Remover .template del nombre si existe
|
|
78
92
|
dest=$(echo "$dest" | sed 's/\.template$//')
|
|
93
|
+
|
|
94
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "$dest" ]; then
|
|
95
|
+
print_info "Saltado: $dest ya existe"
|
|
96
|
+
return 0
|
|
97
|
+
fi
|
|
79
98
|
|
|
80
99
|
# Copiar y reemplazar placeholders
|
|
81
100
|
sed -e "s/{{PROJECT_NAME}}/$PROJECT_NAME/g" \
|
|
@@ -86,11 +105,24 @@ copy_template() {
|
|
|
86
105
|
-e "s/{{FECHA}}/$CURRENT_DATE/g" \
|
|
87
106
|
-e "s/{{FECHA_PROXIMA}}/$DATE_PLUS_7/g" \
|
|
88
107
|
-e "s/{{FECHA_PROXIMA_MES}}/$DATE_PLUS_30/g" \
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
108
|
+
-e "s/{{FECHA_LAUNCH}}/$DATE_PLUS_35/g" \
|
|
109
|
+
-e "s/{{ESTADO}}/En planificación/g" \
|
|
110
|
+
-e "s/{{FASE}}/Fase 1/g" \
|
|
111
|
+
-e "s/{{X}}%/0%/g" \
|
|
112
|
+
-e "s/{{PACKAGE_MANAGER}}/$PACKAGE_MANAGER/g" \
|
|
113
|
+
-e "s/{{STACK_SUMMARY}}/$STACK_SUMMARY/g" \
|
|
114
|
+
-e "s/{{PRIMARY_INSTALL}}/$PRIMARY_INSTALL/g" \
|
|
115
|
+
-e "s/{{PRIMARY_DEV}}/$PRIMARY_DEV/g" \
|
|
116
|
+
-e "s/{{PRIMARY_TEST}}/$PRIMARY_TEST/g" \
|
|
117
|
+
-e "s/{{ANALYZE_COMMAND}}/$ANALYZE_COMMAND/g" \
|
|
118
|
+
-e "s/{{DOCTOR_COMMAND}}/$DOCTOR_COMMAND/g" \
|
|
119
|
+
-e "s/{{START_SLICE_COMMAND}}/$START_SLICE_COMMAND/g" \
|
|
120
|
+
-e "s/{{CHECK_SLICE_COMMAND}}/$CHECK_SLICE_COMMAND/g" \
|
|
121
|
+
-e "s/{{CHECK_PR_COMMAND}}/$CHECK_PR_COMMAND/g" \
|
|
122
|
+
-e "s/{{CLEANUP_SLICE_COMMAND}}/$CLEANUP_SLICE_COMMAND/g" \
|
|
123
|
+
-e "s/{{CHECK_SCOPE_COMMAND}}/$CHECK_SCOPE_COMMAND/g" \
|
|
124
|
+
-e "s/{{REFRESH_ACTIVE_SLICES_COMMAND}}/$REFRESH_ACTIVE_SLICES_COMMAND/g" \
|
|
125
|
+
"$src" > "$dest"
|
|
94
126
|
|
|
95
127
|
print_success "Creado: $dest"
|
|
96
128
|
fi
|
|
@@ -101,6 +133,11 @@ copy_template_keep_name() {
|
|
|
101
133
|
local dest="$2"
|
|
102
134
|
|
|
103
135
|
if [ -f "$src" ]; then
|
|
136
|
+
if [ -f "$dest" ]; then
|
|
137
|
+
print_info "Saltado: $dest ya existe"
|
|
138
|
+
return 0
|
|
139
|
+
fi
|
|
140
|
+
|
|
104
141
|
sed -e "s/{{PROJECT_NAME}}/$PROJECT_NAME/g" \
|
|
105
142
|
-e "s/{{PROJECT_SLUG}}/$PROJECT_SLUG/g" \
|
|
106
143
|
-e "s/\[project\]/$PROJECT_SLUG/g" \
|
|
@@ -109,11 +146,24 @@ copy_template_keep_name() {
|
|
|
109
146
|
-e "s/{{FECHA}}/$CURRENT_DATE/g" \
|
|
110
147
|
-e "s/{{FECHA_PROXIMA}}/$DATE_PLUS_7/g" \
|
|
111
148
|
-e "s/{{FECHA_PROXIMA_MES}}/$DATE_PLUS_30/g" \
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
149
|
+
-e "s/{{FECHA_LAUNCH}}/$DATE_PLUS_35/g" \
|
|
150
|
+
-e "s/{{ESTADO}}/En planificación/g" \
|
|
151
|
+
-e "s/{{FASE}}/Fase 1/g" \
|
|
152
|
+
-e "s/{{X}}%/0%/g" \
|
|
153
|
+
-e "s/{{PACKAGE_MANAGER}}/$PACKAGE_MANAGER/g" \
|
|
154
|
+
-e "s/{{STACK_SUMMARY}}/$STACK_SUMMARY/g" \
|
|
155
|
+
-e "s/{{PRIMARY_INSTALL}}/$PRIMARY_INSTALL/g" \
|
|
156
|
+
-e "s/{{PRIMARY_DEV}}/$PRIMARY_DEV/g" \
|
|
157
|
+
-e "s/{{PRIMARY_TEST}}/$PRIMARY_TEST/g" \
|
|
158
|
+
-e "s/{{ANALYZE_COMMAND}}/$ANALYZE_COMMAND/g" \
|
|
159
|
+
-e "s/{{DOCTOR_COMMAND}}/$DOCTOR_COMMAND/g" \
|
|
160
|
+
-e "s/{{START_SLICE_COMMAND}}/$START_SLICE_COMMAND/g" \
|
|
161
|
+
-e "s/{{CHECK_SLICE_COMMAND}}/$CHECK_SLICE_COMMAND/g" \
|
|
162
|
+
-e "s/{{CHECK_PR_COMMAND}}/$CHECK_PR_COMMAND/g" \
|
|
163
|
+
-e "s/{{CLEANUP_SLICE_COMMAND}}/$CLEANUP_SLICE_COMMAND/g" \
|
|
164
|
+
-e "s/{{CHECK_SCOPE_COMMAND}}/$CHECK_SCOPE_COMMAND/g" \
|
|
165
|
+
-e "s/{{REFRESH_ACTIVE_SLICES_COMMAND}}/$REFRESH_ACTIVE_SLICES_COMMAND/g" \
|
|
166
|
+
"$src" > "$dest"
|
|
117
167
|
|
|
118
168
|
print_success "Creado: $dest"
|
|
119
169
|
fi
|
|
@@ -140,7 +190,12 @@ copy_file_if_missing() {
|
|
|
140
190
|
}
|
|
141
191
|
|
|
142
192
|
# Copiar templates de docs/
|
|
193
|
+
copy_template_keep_name "docs-template/AGENTS.md.template" "AGENTS.md"
|
|
143
194
|
copy_template "docs-template/docs/INDEX.md.template" "docs/INDEX.md"
|
|
195
|
+
copy_template "docs-template/docs/QUICK.md.template" "docs/ai/QUICK.md"
|
|
196
|
+
copy_template "docs-template/docs/STANDARD.md.template" "docs/ai/STANDARD.md"
|
|
197
|
+
copy_template "docs-template/docs/DEEP.md.template" "docs/ai/DEEP.md"
|
|
198
|
+
copy_template "docs-template/docs/DECISIONS.md.template" "docs/DECISIONS.md"
|
|
144
199
|
copy_template "docs-template/docs/AI_CONTEXT.md.template" "docs/AI_CONTEXT.md"
|
|
145
200
|
copy_template "docs-template/docs/AI_ONBOARDING_PROMPT.md.template" "docs/AI_ONBOARDING_PROMPT.md"
|
|
146
201
|
copy_template "docs-template/docs/CONTEXTO.md.template" "docs/CONTEXTO.md"
|
|
@@ -157,24 +212,40 @@ copy_template "docs-template/docs/TESTING_GUIDE_FOR_AI.md.template" "docs/TESTIN
|
|
|
157
212
|
|
|
158
213
|
# Copiar archivos que no son templates
|
|
159
214
|
if [ -f "docs-template/docs/UI_STANDARDS.md" ]; then
|
|
160
|
-
|
|
161
|
-
|
|
215
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/UI_STANDARDS.md" ]; then
|
|
216
|
+
print_info "Saltado: docs/UI_STANDARDS.md ya existe"
|
|
217
|
+
else
|
|
218
|
+
cp "docs-template/docs/UI_STANDARDS.md" "docs/UI_STANDARDS.md"
|
|
219
|
+
print_success "Creado: docs/UI_STANDARDS.md"
|
|
220
|
+
fi
|
|
162
221
|
fi
|
|
163
222
|
|
|
164
223
|
if [ -f "docs-template/docs/MOCK_DATA_GUIDE.md" ]; then
|
|
165
|
-
|
|
166
|
-
|
|
224
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/MOCK_DATA_GUIDE.md" ]; then
|
|
225
|
+
print_info "Saltado: docs/MOCK_DATA_GUIDE.md ya existe"
|
|
226
|
+
else
|
|
227
|
+
cp "docs-template/docs/MOCK_DATA_GUIDE.md" "docs/MOCK_DATA_GUIDE.md"
|
|
228
|
+
print_success "Creado: docs/MOCK_DATA_GUIDE.md"
|
|
229
|
+
fi
|
|
167
230
|
fi
|
|
168
231
|
|
|
169
232
|
# Copiar configuración de IA
|
|
170
233
|
if [ -f "docs-template/docs/ai/PRINCIPLES.md" ]; then
|
|
171
|
-
|
|
172
|
-
|
|
234
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/ai/PRINCIPLES.md" ]; then
|
|
235
|
+
print_info "Saltado: docs/ai/PRINCIPLES.md ya existe"
|
|
236
|
+
else
|
|
237
|
+
cp "docs-template/docs/ai/PRINCIPLES.md" "docs/ai/PRINCIPLES.md"
|
|
238
|
+
print_success "Creado: docs/ai/PRINCIPLES.md"
|
|
239
|
+
fi
|
|
173
240
|
fi
|
|
174
241
|
|
|
175
242
|
if [ -f "docs-template/docs/ai/RULES.yaml" ]; then
|
|
176
|
-
|
|
177
|
-
|
|
243
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/ai/RULES.yaml" ]; then
|
|
244
|
+
print_info "Saltado: docs/ai/RULES.yaml ya existe"
|
|
245
|
+
else
|
|
246
|
+
cp "docs-template/docs/ai/RULES.yaml" "docs/ai/RULES.yaml"
|
|
247
|
+
print_success "Creado: docs/ai/RULES.yaml"
|
|
248
|
+
fi
|
|
178
249
|
fi
|
|
179
250
|
|
|
180
251
|
# Copiar template de LESSONS (vacío)
|
|
@@ -240,44 +311,123 @@ NODE
|
|
|
240
311
|
|
|
241
312
|
sync_package_json
|
|
242
313
|
|
|
314
|
+
mkdir -p ".quiver"
|
|
315
|
+
node - <<'NODE'
|
|
316
|
+
const fs = require('fs');
|
|
317
|
+
const path = require('path');
|
|
318
|
+
|
|
319
|
+
const statePath = path.join('.quiver', 'state.json');
|
|
320
|
+
const packageJson = fs.existsSync('package.json') ? JSON.parse(fs.readFileSync('package.json', 'utf8')) : {};
|
|
321
|
+
const currentVersion = process.env.QUIVER_VERSION || packageJson.version || '0.0.0';
|
|
322
|
+
const migrateMode = process.env.QUIVER_MIGRATE === '1';
|
|
323
|
+
const now = new Date().toISOString();
|
|
324
|
+
const projectName = process.env.QUIVER_PROJECT_NAME || packageJson.name || '';
|
|
325
|
+
|
|
326
|
+
let existing = {};
|
|
327
|
+
if (fs.existsSync(statePath)) {
|
|
328
|
+
existing = JSON.parse(fs.readFileSync(statePath, 'utf8'));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
const nextState = migrateMode
|
|
332
|
+
? {
|
|
333
|
+
...existing,
|
|
334
|
+
quiver_version: currentVersion,
|
|
335
|
+
project_name: projectName || existing.project_name || '',
|
|
336
|
+
initialized_version: existing.initialized_version ?? null,
|
|
337
|
+
migrated_version: currentVersion,
|
|
338
|
+
last_initialized_at: existing.last_initialized_at ?? null,
|
|
339
|
+
last_migration_at: now,
|
|
340
|
+
last_analysis_at: existing.last_analysis_at ?? null,
|
|
341
|
+
}
|
|
342
|
+
: {
|
|
343
|
+
...existing,
|
|
344
|
+
quiver_version: currentVersion,
|
|
345
|
+
project_name: projectName || existing.project_name || '',
|
|
346
|
+
initialized_version: existing.initialized_version || currentVersion,
|
|
347
|
+
migrated_version: existing.migrated_version ?? null,
|
|
348
|
+
last_initialized_at: existing.last_initialized_at || now,
|
|
349
|
+
last_migration_at: existing.last_migration_at ?? null,
|
|
350
|
+
last_analysis_at: existing.last_analysis_at ?? null,
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
fs.writeFileSync(statePath, `${JSON.stringify(nextState, null, 2)}\n`);
|
|
354
|
+
NODE
|
|
355
|
+
|
|
243
356
|
# Copiar bootstrap de slices a tools/scripts
|
|
244
357
|
if [ -f "docs-template/scripts/start-slice.sh" ]; then
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
358
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/start-slice.sh" ]; then
|
|
359
|
+
print_info "Saltado: tools/scripts/start-slice.sh ya existe"
|
|
360
|
+
else
|
|
361
|
+
cp "docs-template/scripts/start-slice.sh" "tools/scripts/start-slice.sh"
|
|
362
|
+
chmod +x "tools/scripts/start-slice.sh"
|
|
363
|
+
print_success "Creado: tools/scripts/start-slice.sh"
|
|
364
|
+
fi
|
|
248
365
|
fi
|
|
249
366
|
|
|
250
367
|
if [ -f "docs-template/scripts/refresh-active-slices.sh" ]; then
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
368
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/refresh-active-slices.sh" ]; then
|
|
369
|
+
print_info "Saltado: tools/scripts/refresh-active-slices.sh ya existe"
|
|
370
|
+
else
|
|
371
|
+
cp "docs-template/scripts/refresh-active-slices.sh" "tools/scripts/refresh-active-slices.sh"
|
|
372
|
+
chmod +x "tools/scripts/refresh-active-slices.sh"
|
|
373
|
+
print_success "Creado: tools/scripts/refresh-active-slices.sh"
|
|
374
|
+
fi
|
|
254
375
|
fi
|
|
255
376
|
|
|
256
377
|
if [ -f "docs-template/scripts/check-slice-readiness.sh" ]; then
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
378
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/check-slice-readiness.sh" ]; then
|
|
379
|
+
print_info "Saltado: tools/scripts/check-slice-readiness.sh ya existe"
|
|
380
|
+
else
|
|
381
|
+
cp "docs-template/scripts/check-slice-readiness.sh" "tools/scripts/check-slice-readiness.sh"
|
|
382
|
+
chmod +x "tools/scripts/check-slice-readiness.sh"
|
|
383
|
+
print_success "Creado: tools/scripts/check-slice-readiness.sh"
|
|
384
|
+
fi
|
|
260
385
|
fi
|
|
261
386
|
|
|
262
387
|
if [ -f "docs-template/scripts/check-pr-readiness.sh" ]; then
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
388
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/check-pr-readiness.sh" ]; then
|
|
389
|
+
print_info "Saltado: tools/scripts/check-pr-readiness.sh ya existe"
|
|
390
|
+
else
|
|
391
|
+
cp "docs-template/scripts/check-pr-readiness.sh" "tools/scripts/check-pr-readiness.sh"
|
|
392
|
+
chmod +x "tools/scripts/check-pr-readiness.sh"
|
|
393
|
+
print_success "Creado: tools/scripts/check-pr-readiness.sh"
|
|
394
|
+
fi
|
|
266
395
|
fi
|
|
267
396
|
|
|
268
397
|
if [ -f "docs-template/scripts/cleanup-slice.sh" ]; then
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
398
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/cleanup-slice.sh" ]; then
|
|
399
|
+
print_info "Saltado: tools/scripts/cleanup-slice.sh ya existe"
|
|
400
|
+
else
|
|
401
|
+
cp "docs-template/scripts/cleanup-slice.sh" "tools/scripts/cleanup-slice.sh"
|
|
402
|
+
chmod +x "tools/scripts/cleanup-slice.sh"
|
|
403
|
+
print_success "Creado: tools/scripts/cleanup-slice.sh"
|
|
404
|
+
fi
|
|
272
405
|
fi
|
|
273
406
|
|
|
274
407
|
if [ -f "docs-template/scripts/check-scope.sh" ]; then
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
408
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/check-scope.sh" ]; then
|
|
409
|
+
print_info "Saltado: tools/scripts/check-scope.sh ya existe"
|
|
410
|
+
else
|
|
411
|
+
cp "docs-template/scripts/check-scope.sh" "tools/scripts/check-scope.sh"
|
|
412
|
+
chmod +x "tools/scripts/check-scope.sh"
|
|
413
|
+
print_success "Creado: tools/scripts/check-scope.sh"
|
|
414
|
+
fi
|
|
415
|
+
fi
|
|
416
|
+
|
|
417
|
+
if [ -f "docs-template/scripts/migrate-project.sh" ]; then
|
|
418
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "tools/scripts/migrate-project.sh" ]; then
|
|
419
|
+
print_info "Saltado: tools/scripts/migrate-project.sh ya existe"
|
|
420
|
+
else
|
|
421
|
+
cp "docs-template/scripts/migrate-project.sh" "tools/scripts/migrate-project.sh"
|
|
422
|
+
chmod +x "tools/scripts/migrate-project.sh"
|
|
423
|
+
print_success "Creado: tools/scripts/migrate-project.sh"
|
|
424
|
+
fi
|
|
278
425
|
fi
|
|
279
426
|
|
|
280
427
|
# Crear archivo SEARCH.md básico
|
|
428
|
+
if [ "$MIGRATE_MODE" = "1" ] && [ -f "docs/SEARCH.md" ]; then
|
|
429
|
+
print_info "Saltado: docs/SEARCH.md ya existe"
|
|
430
|
+
else
|
|
281
431
|
cat > "docs/SEARCH.md" << EOF
|
|
282
432
|
# Búsqueda por Tema
|
|
283
433
|
|
|
@@ -297,7 +447,7 @@ cat > "docs/SEARCH.md" << EOF
|
|
|
297
447
|
|
|
298
448
|
- **Spec:** \`../specs/$PROJECT_SLUG/slices/slice-01/slice.json\`
|
|
299
449
|
- **PR del slice:** \`../specs/$PROJECT_SLUG/slices/slice-01/pr.md\`
|
|
300
|
-
- **Bootstrap del slice:**
|
|
450
|
+
- **Bootstrap del slice:** \`npx create-quiver start-slice ../specs/$PROJECT_SLUG/slices/slice-01/slice.json\`
|
|
301
451
|
- **Hook:** \`hooks/useAuth.ts\`
|
|
302
452
|
- **API:** \`docs/api/auth/README.md\`
|
|
303
453
|
- **Componentes:** \`app/(auth)/\`
|
|
@@ -319,8 +469,11 @@ cat > "docs/SEARCH.md" << EOF
|
|
|
319
469
|
|
|
320
470
|
**Fin de la búsqueda**
|
|
321
471
|
EOF
|
|
472
|
+
fi
|
|
322
473
|
|
|
323
|
-
|
|
474
|
+
if [ "$MIGRATE_MODE" != "1" ] || [ ! -f "docs/SEARCH.md" ]; then
|
|
475
|
+
print_success "Creado: docs/SEARCH.md"
|
|
476
|
+
fi
|
|
324
477
|
|
|
325
478
|
# Crear README.md en la raíz del proyecto (si no existe)
|
|
326
479
|
if [ ! -f "README.md" ]; then
|
|
@@ -335,8 +488,8 @@ Run Quiver from this project root. Do not install it globally.
|
|
|
335
488
|
|
|
336
489
|
\`\`\`bash
|
|
337
490
|
npm install
|
|
338
|
-
npx create-quiver analyze
|
|
339
|
-
npx create-quiver doctor
|
|
491
|
+
npx create-quiver analyze
|
|
492
|
+
npx create-quiver doctor
|
|
340
493
|
\`\`\`
|
|
341
494
|
|
|
342
495
|
If this project needs a pinned Quiver version, install it as a devDependency:
|
|
@@ -345,10 +498,54 @@ If this project needs a pinned Quiver version, install it as a devDependency:
|
|
|
345
498
|
npm install --save-dev create-quiver
|
|
346
499
|
\`\`\`
|
|
347
500
|
|
|
348
|
-
If
|
|
501
|
+
If you need to target another directory from outside the project, pass \`--dir\` explicitly. Quote paths that contain spaces.
|
|
502
|
+
|
|
503
|
+
## Project NPM Scripts
|
|
504
|
+
|
|
505
|
+
The generated project includes \`quiver:*\` npm scripts that call the Node CLI and are the preferred repeatable workflow:
|
|
506
|
+
|
|
507
|
+
\`\`\`bash
|
|
508
|
+
npm run quiver:analyze
|
|
509
|
+
npm run quiver:doctor
|
|
510
|
+
npm run quiver:migrate
|
|
511
|
+
npm run quiver:start-slice -- specs/$PROJECT_SLUG/slices/slice-01/slice.json
|
|
512
|
+
npm run quiver:check-slice -- specs/$PROJECT_SLUG/slices/slice-01/slice.json
|
|
513
|
+
npm run quiver:check-pr -- specs/$PROJECT_SLUG/slices/slice-01/slice.json
|
|
514
|
+
npm run quiver:cleanup-slice -- specs/$PROJECT_SLUG/slices/slice-01/slice.json
|
|
515
|
+
npm run quiver:check-scope -- specs/$PROJECT_SLUG/slices/slice-01/slice.json
|
|
516
|
+
npm run quiver:refresh-active-slices
|
|
517
|
+
\`\`\`
|
|
518
|
+
|
|
519
|
+
The legacy Bash wrappers remain in \`tools/scripts/\` for compatibility, but new project-level automation should prefer the \`quiver:*\` scripts and the direct \`npx create-quiver ...\` commands below.
|
|
520
|
+
|
|
521
|
+
## Cross-Platform Support
|
|
522
|
+
|
|
523
|
+
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 generated workflow should be read as a native Node-first contract rather than a Bash-first one. Windows support is only considered verified once the CI matrix is green.
|
|
524
|
+
|
|
525
|
+
## Upgrading Existing Projects
|
|
526
|
+
|
|
527
|
+
If the project already existed before this Quiver version, upgrade it from the project root:
|
|
528
|
+
|
|
529
|
+
\`\`\`bash
|
|
530
|
+
cd /path/to/your-project
|
|
531
|
+
npx create-quiver migrate
|
|
532
|
+
npx create-quiver analyze
|
|
533
|
+
npx create-quiver doctor
|
|
534
|
+
\`\`\`
|
|
535
|
+
|
|
536
|
+
If your team prefers a pinned local dependency, update the package first and then run the same flow:
|
|
537
|
+
|
|
538
|
+
\`\`\`bash
|
|
539
|
+
npm install --save-dev create-quiver@latest
|
|
540
|
+
npx create-quiver migrate
|
|
541
|
+
npx create-quiver analyze
|
|
542
|
+
npx create-quiver doctor
|
|
543
|
+
\`\`\`
|
|
349
544
|
|
|
350
545
|
## AI Context Onboarding
|
|
351
546
|
|
|
547
|
+
Lee \`AGENTS.md\` primero y después \`docs/AI_ONBOARDING_PROMPT.md\` tras el análisis.
|
|
548
|
+
|
|
352
549
|
After analysis and doctor validation, open your AI agent in this project and run:
|
|
353
550
|
|
|
354
551
|
\`\`\`text
|
|
@@ -359,25 +556,30 @@ Prepare the project context docs and report assumptions, risks, and files change
|
|
|
359
556
|
|
|
360
557
|
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.
|
|
361
558
|
|
|
559
|
+
## Decision Log
|
|
560
|
+
|
|
561
|
+
Record durable decisions in \`docs/DECISIONS.md\` so future AI agents do not re-litigate the same choices.
|
|
562
|
+
|
|
362
563
|
## First Slice Workflow
|
|
363
564
|
|
|
364
565
|
1. Review or refine specs/$PROJECT_SLUG/SPEC.md.
|
|
365
566
|
2. Create the first slice from specs/$PROJECT_SLUG/slices/slice-template/slice.json.
|
|
366
|
-
3. Start work with
|
|
567
|
+
3. Start work with \`npx create-quiver start-slice <slice.json>\` or \`npm run quiver:start-slice -- <slice.json>\`.
|
|
367
568
|
4. Make one commit per slice.
|
|
368
569
|
5. Open one PR per spec.
|
|
369
570
|
|
|
370
571
|
## Verification Checklist
|
|
371
572
|
|
|
372
573
|
- [ ] npm install completes
|
|
373
|
-
- [ ] npx create-quiver analyze
|
|
374
|
-
- [ ] npx create-quiver doctor
|
|
574
|
+
- [ ] npx create-quiver analyze completes
|
|
575
|
+
- [ ] npx create-quiver doctor completes
|
|
375
576
|
- [ ] AI agent executed docs/AI_ONBOARDING_PROMPT.md
|
|
376
577
|
- [ ] Context docs were reviewed before the first slice
|
|
377
578
|
|
|
378
579
|
## Documentation
|
|
379
580
|
|
|
380
581
|
- [AI Context](./docs/AI_CONTEXT.md) - Contexto resumido para IA
|
|
582
|
+
- [Decision Log](./docs/DECISIONS.md) - Decisiones durables del proyecto
|
|
381
583
|
- [AI Onboarding Prompt](./docs/AI_ONBOARDING_PROMPT.md) - Handoff exacto para agentes después del análisis
|
|
382
584
|
- [Contexto](./docs/CONTEXTO.md) - Qué es $PROJECT_NAME
|
|
383
585
|
- [Workflow](./docs/WORKFLOW.md) - Cómo implementar
|
|
@@ -58,6 +58,11 @@ required_paths=(
|
|
|
58
58
|
"package/src/create-quiver/index.js"
|
|
59
59
|
"package/README.md"
|
|
60
60
|
"package/README_FOR_AI.md"
|
|
61
|
+
"package/AGENTS.md.template"
|
|
62
|
+
"package/docs/QUICK.md.template"
|
|
63
|
+
"package/docs/STANDARD.md.template"
|
|
64
|
+
"package/docs/DEEP.md.template"
|
|
65
|
+
"package/docs/DECISIONS.md.template"
|
|
61
66
|
"package/docs/AI_CONTEXT.md.template"
|
|
62
67
|
"package/docs/AI_ONBOARDING_PROMPT.md.template"
|
|
63
68
|
"package/TEMPLATE.md"
|