create-quiver 0.8.0 → 0.9.1
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/CHANGELOG.md +7 -0
- package/README.md +350 -116
- package/README_FOR_AI.md +3 -2
- package/ROADMAP.md +12 -11
- package/docs/AI_ONBOARDING_PROMPT.md.template +110 -52
- package/docs/COMMANDS.md.template +17 -6
- package/package.json +1 -1
- package/scripts/init-docs.sh +9 -3
- package/specs/quiver-v19-self-install-dev-dep/EVIDENCE_REPORT.md +19 -0
- package/specs/quiver-v19-self-install-dev-dep/SPEC.md +51 -0
- package/specs/quiver-v19-self-install-dev-dep/STATUS.md +20 -0
- package/specs/quiver-v19-self-install-dev-dep/slices/slice-01-auto-install-dev-dep/CLOSURE_BRIEF.md +29 -0
- package/specs/quiver-v19-self-install-dev-dep/slices/slice-01-auto-install-dev-dep/EXECUTION_BRIEF.md +287 -0
- package/specs/quiver-v19-self-install-dev-dep/slices/slice-01-auto-install-dev-dep/slice.json +56 -0
- package/src/create-quiver/index.js +26 -3
- package/src/create-quiver/lib/init-docs.js +46 -3
- package/.claude/settings.local.json +0 -45
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-01-auto-install-dev-dep",
|
|
3
|
+
"ticket": "QUIVER-01",
|
|
4
|
+
"type": "feature",
|
|
5
|
+
"title": "Auto-install create-quiver as dev dependency after init/migrate",
|
|
6
|
+
"objective": "After `npx create-quiver` init or migrate, the target project has create-quiver in devDependencies and installed in node_modules. Uses the correct package manager. Skippable via --skip-install.",
|
|
7
|
+
"description": "Add two functions to init-docs.js: detectPackageManager (checks lockfiles) and installSelfAsDevDep (runs the appropriate install command). Call installSelfAsDevDep from the init and migrate flows in index.js after runInitDocs. Add --skip-install flag to the CLI arg parser.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "feature",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "auto-install-dev-dep",
|
|
12
|
+
"branch_name": "feature/QUIVER-01-auto-install-dev-dep"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src/create-quiver/lib/init-docs.js",
|
|
16
|
+
"src/create-quiver/index.js",
|
|
17
|
+
"tests/lib/init-docs.test.js"
|
|
18
|
+
],
|
|
19
|
+
"depends_on": [],
|
|
20
|
+
"must": [
|
|
21
|
+
"detectPackageManager(projectRoot) returns 'bun'|'pnpm'|'yarn'|'npm' based on lockfile presence",
|
|
22
|
+
"installSelfAsDevDep(projectRoot, version) runs the correct install command for the detected pm",
|
|
23
|
+
"installSelfAsDevDep skips if no package.json exists (returns 'skipped-no-package-json')",
|
|
24
|
+
"installSelfAsDevDep skips if create-quiver already in devDependencies (returns 'skipped-already-present')",
|
|
25
|
+
"installSelfAsDevDep catches install errors and returns 'failed' without throwing",
|
|
26
|
+
"--skip-install flag parsed in index.js and passed through to suppress the install step",
|
|
27
|
+
"Both init and migrate flows call installSelfAsDevDep unless --skip-install is set",
|
|
28
|
+
"Init output prints 'Added create-quiver@X.Y.Z as dev dependency' on success or a warning on skip/fail",
|
|
29
|
+
"node --test tests/**/*.test.js passes"
|
|
30
|
+
],
|
|
31
|
+
"not_included": [
|
|
32
|
+
"Auto-updating an existing create-quiver version in devDependencies",
|
|
33
|
+
"Supporting private registries or custom npm configs",
|
|
34
|
+
"Changing the scaffold output beyond the install step message"
|
|
35
|
+
],
|
|
36
|
+
"acceptance": [
|
|
37
|
+
"After init: package.json has create-quiver in devDependencies",
|
|
38
|
+
"After init: node_modules/create-quiver exists",
|
|
39
|
+
"npx create-quiver plan works without @version in a freshly initialized project",
|
|
40
|
+
"--skip-install suppresses the install in both init and migrate",
|
|
41
|
+
"yarn/pnpm/bun projects use the right install command",
|
|
42
|
+
"Install failure prints a warning but does not crash the init",
|
|
43
|
+
"node --test tests/**/*.test.js exits 0"
|
|
44
|
+
],
|
|
45
|
+
"tests": [
|
|
46
|
+
"node --test tests/**/*.test.js",
|
|
47
|
+
"npx create-quiver --skip-install --name test --dir /tmp/quiver-test-skip && ls /tmp/quiver-test-skip/node_modules/create-quiver 2>/dev/null && echo FAIL || echo OK"
|
|
48
|
+
],
|
|
49
|
+
"estimated_hours": 1.5,
|
|
50
|
+
"actual_hours": 1,
|
|
51
|
+
"status": "completed",
|
|
52
|
+
"blocked_reason": null,
|
|
53
|
+
"ready_at": "2026-05-14T00:00:00Z",
|
|
54
|
+
"started_at": "2026-05-14T00:00:00Z",
|
|
55
|
+
"completed_at": "2026-05-14T00:00:00Z"
|
|
56
|
+
}
|
|
@@ -7,7 +7,7 @@ const { collectDoctorWarnings } = require('./lib/doctor');
|
|
|
7
7
|
const { runGraph } = require('./commands/graph');
|
|
8
8
|
const { runNext } = require('./commands/next');
|
|
9
9
|
const { runPlan } = require('./commands/plan');
|
|
10
|
-
const { initializeProjectDocs } = require('./lib/init-docs');
|
|
10
|
+
const { initializeProjectDocs, installSelfAsDevDep } = require('./lib/init-docs');
|
|
11
11
|
const { checkPrReadiness, checkScope, checkSliceReadiness } = require('./lib/readiness');
|
|
12
12
|
const { cleanupSlice, refreshActiveSlicesBoard, startSlice } = require('./lib/lifecycle');
|
|
13
13
|
const { relativePosixPath, resolveTargetRoot } = require('./lib/paths');
|
|
@@ -144,6 +144,11 @@ function parseArgs(argv) {
|
|
|
144
144
|
continue;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
if (arg === '--skip-install') {
|
|
148
|
+
result.skipInstall = true;
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
|
|
147
152
|
if (arg === '--doctor') {
|
|
148
153
|
result.mode = 'doctor';
|
|
149
154
|
continue;
|
|
@@ -1133,7 +1138,7 @@ function runAnalyze(targetDir) {
|
|
|
1133
1138
|
console.log(`Detected package manager: ${scan.project.package_manager}`);
|
|
1134
1139
|
}
|
|
1135
1140
|
|
|
1136
|
-
function runMigrate(targetDir) {
|
|
1141
|
+
function runMigrate(targetDir, options = {}) {
|
|
1137
1142
|
const projectRoot = resolveTargetRoot(process.cwd(), targetDir);
|
|
1138
1143
|
|
|
1139
1144
|
if (!fs.existsSync(projectRoot)) {
|
|
@@ -1160,6 +1165,15 @@ function runMigrate(targetDir) {
|
|
|
1160
1165
|
});
|
|
1161
1166
|
updateStateForMigrate(projectRoot, projectName, CLI_VERSION);
|
|
1162
1167
|
|
|
1168
|
+
if (!options.skipInstall) {
|
|
1169
|
+
const installResult = installSelfAsDevDep(projectRoot, CLI_VERSION);
|
|
1170
|
+
if (installResult === 'installed') {
|
|
1171
|
+
console.log(`Added create-quiver@${CLI_VERSION} as dev dependency`);
|
|
1172
|
+
} else if (installResult === 'failed') {
|
|
1173
|
+
console.warn(`Warning: could not install create-quiver automatically. Run: npm install -D create-quiver@${CLI_VERSION}`);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1163
1177
|
console.log(`Quiver migration completed for ${projectRoot}`);
|
|
1164
1178
|
console.log('Missing workflow files were restored without overwriting existing project files.');
|
|
1165
1179
|
} finally {
|
|
@@ -1336,7 +1350,7 @@ async function run(argv) {
|
|
|
1336
1350
|
}
|
|
1337
1351
|
|
|
1338
1352
|
if (args.mode === 'migrate') {
|
|
1339
|
-
runMigrate(args.targetDir);
|
|
1353
|
+
runMigrate(args.targetDir, { skipInstall: args.skipInstall });
|
|
1340
1354
|
return;
|
|
1341
1355
|
}
|
|
1342
1356
|
|
|
@@ -1415,6 +1429,15 @@ async function run(argv) {
|
|
|
1415
1429
|
copyTemplate(templateRoot, targetDir);
|
|
1416
1430
|
runInitDocs(targetDir, projectName);
|
|
1417
1431
|
|
|
1432
|
+
if (!args.skipInstall) {
|
|
1433
|
+
const installResult = installSelfAsDevDep(targetDir, CLI_VERSION);
|
|
1434
|
+
if (installResult === 'installed') {
|
|
1435
|
+
console.log(`Added create-quiver@${CLI_VERSION} as dev dependency`);
|
|
1436
|
+
} else if (installResult === 'failed') {
|
|
1437
|
+
console.warn(`Warning: could not install create-quiver automatically. Run: npm install -D create-quiver@${CLI_VERSION}`);
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1418
1441
|
console.log(`Installed Quiver into ${targetDir}`);
|
|
1419
1442
|
printInitNextSteps(targetDir, projectName);
|
|
1420
1443
|
} finally {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
|
+
const { execSync } = require('child_process');
|
|
3
4
|
const { writeState } = require('./state');
|
|
4
5
|
|
|
5
6
|
function ensureDir(dirPath) {
|
|
@@ -334,9 +335,15 @@ Read \`AGENTS.md\` first, then open \`docs/AI_ONBOARDING_PROMPT.md\` after analy
|
|
|
334
335
|
After analysis and doctor validation, open your AI agent in this project and run:
|
|
335
336
|
|
|
336
337
|
\`\`\`text
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
Lee \`docs/AI_ONBOARDING_PROMPT.md\` y ejecútalo como fuente principal de verdad para incorporarte a este repositorio.
|
|
339
|
+
|
|
340
|
+
Actúa como asistente de onboarding de IA. Prepara el contexto del proyecto para trabajar de forma segura con el workflow documentado, specs y slices.
|
|
341
|
+
|
|
342
|
+
No modifiques código de producto salvo autorización explícita. Puedes crear o actualizar documentación de contexto si el onboarding lo requiere.
|
|
343
|
+
|
|
344
|
+
Usa solo la documentación del repositorio como fuente de verdad. Si encuentras información faltante, ambigua o contradictoria, documenta el supuesto, el riesgo y continúa por el camino más seguro.
|
|
345
|
+
|
|
346
|
+
Responde en español y finaliza con un reporte breve de archivos leídos, archivos modificados, estado del código de producto, supuestos, riesgos y próximos pasos.
|
|
340
347
|
\`\`\`
|
|
341
348
|
|
|
342
349
|
Review the AI changes to docs/AI_CONTEXT.md, docs/CONTEXTO.md, docs/STATUS.md, and specs/${projectSlug}/SPEC.md before starting implementation work. Use \`docs/PROJECT_MAP.md\` for stack and command details.
|
|
@@ -667,8 +674,44 @@ function initializeProjectDocs(options) {
|
|
|
667
674
|
};
|
|
668
675
|
}
|
|
669
676
|
|
|
677
|
+
function detectPackageManager(projectRoot) {
|
|
678
|
+
if (fs.existsSync(path.join(projectRoot, 'bun.lockb'))) return 'bun';
|
|
679
|
+
if (fs.existsSync(path.join(projectRoot, 'pnpm-lock.yaml'))) return 'pnpm';
|
|
680
|
+
if (fs.existsSync(path.join(projectRoot, 'yarn.lock'))) return 'yarn';
|
|
681
|
+
return 'npm';
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
function installSelfAsDevDep(projectRoot, version) {
|
|
685
|
+
const packageJsonPath = path.join(projectRoot, 'package.json');
|
|
686
|
+
if (!fs.existsSync(packageJsonPath)) {
|
|
687
|
+
return 'skipped-no-package-json';
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
691
|
+
if (pkg.devDependencies && pkg.devDependencies['create-quiver']) {
|
|
692
|
+
return 'skipped-already-present';
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
const pm = detectPackageManager(projectRoot);
|
|
696
|
+
const commands = {
|
|
697
|
+
npm: `npm install -D create-quiver@${version}`,
|
|
698
|
+
yarn: `yarn add -D create-quiver@${version}`,
|
|
699
|
+
pnpm: `pnpm add -D create-quiver@${version}`,
|
|
700
|
+
bun: `bun add -d create-quiver@${version}`,
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
try {
|
|
704
|
+
execSync(commands[pm], { cwd: projectRoot, stdio: 'inherit' });
|
|
705
|
+
return 'installed';
|
|
706
|
+
} catch {
|
|
707
|
+
return 'failed';
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
670
711
|
module.exports = {
|
|
671
712
|
initializeProjectDocs,
|
|
672
713
|
writeFrontMatter,
|
|
673
714
|
toProjectSlug,
|
|
715
|
+
detectPackageManager,
|
|
716
|
+
installSelfAsDevDep,
|
|
674
717
|
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(git fetch *)",
|
|
5
|
-
"Bash(git checkout *)",
|
|
6
|
-
"Bash(git add *)",
|
|
7
|
-
"Bash(git commit -m ' *)",
|
|
8
|
-
"Bash(git cherry-pick *)",
|
|
9
|
-
"Bash(git reset *)",
|
|
10
|
-
"Bash(gh pr create --title 'docs: register v17-v22 orchestration plan and park web console idea' --base main --head docs/register-orchestration-plan-park-web-console --body ' *)",
|
|
11
|
-
"Bash(gh auth *)",
|
|
12
|
-
"Bash(gh pr *)",
|
|
13
|
-
"Bash(node -e \"const g=require\\('./src/create-quiver/lib/slice-graph'\\); const slices=g.readAllSlices\\('.'\\); console.log\\('Total slices:', slices.length\\); const graph=g.buildGraph\\(slices\\); const levels=g.computeLevels\\(graph\\); console.log\\('Levels:', levels.length\\);\")",
|
|
14
|
-
"Bash(npx . plan)",
|
|
15
|
-
"Bash(git pull *)",
|
|
16
|
-
"Read(//Users/fabrijk/Documents/Work/Proyectos Personales/nika/frameworks/.worktrees/quiver/bugfix-QUIVER-01-fix-legacy-dependency-resolution/**)",
|
|
17
|
-
"Bash(node --test tests/)",
|
|
18
|
-
"Bash(node --test tests/**/*.test.js)",
|
|
19
|
-
"Bash(node bin/create-quiver.js plan)",
|
|
20
|
-
"Bash(echo \"EXIT_$?\")",
|
|
21
|
-
"Bash(node bin/create-quiver.js plan --json)",
|
|
22
|
-
"Bash(node -e \"const d=JSON.parse\\(require\\('fs'\\).readFileSync\\('/dev/stdin','utf8'\\)\\); console.log\\('plan items:', Array.isArray\\(d.plan\\) ? d.plan.length : 'NOT ARRAY'\\); console.log\\('critical_path:', Array.isArray\\(d.critical_path\\)\\); console.log\\('total_hours:', typeof d.total_hours\\); process.exit\\(Array.isArray\\(d.plan\\) && Array.isArray\\(d.critical_path\\) && typeof d.total_hours === 'number' ? 0 : 1\\)\")",
|
|
23
|
-
"Bash(grep -v \"^\\\\-\\\\-$\")",
|
|
24
|
-
"Bash(echo \"EXIT:$?\")",
|
|
25
|
-
"Bash(node -e \"const d=JSON.parse\\(require\\('fs'\\).readFileSync\\('/tmp/plan_json.txt','utf8'\\)\\); console.log\\('plan:', Array.isArray\\(d.plan\\) ? d.plan.length + ' items' : 'INVALID'\\); console.log\\('critical_path:', Array.isArray\\(d.critical_path\\)\\); console.log\\('total_hours:', typeof d.total_hours\\)\")",
|
|
26
|
-
"Bash(xargs git branch -d)",
|
|
27
|
-
"Bash(git branch *)",
|
|
28
|
-
"Read(//private/tmp/**)",
|
|
29
|
-
"Read(//Users/fabrijk/Documents/Work/Proyectos Personales/nika/frameworks/quiver-v18-slice02/**)",
|
|
30
|
-
"Bash(git worktree *)",
|
|
31
|
-
"Bash(git ls-remote *)",
|
|
32
|
-
"Bash(node *)",
|
|
33
|
-
"Bash(npm view *)",
|
|
34
|
-
"Bash(bash scripts/release-quiver.sh)",
|
|
35
|
-
"Bash(git stash *)",
|
|
36
|
-
"Bash(npm whoami *)",
|
|
37
|
-
"Bash(bash scripts/release-quiver.sh --publish-current)",
|
|
38
|
-
"Bash(npm pkg *)",
|
|
39
|
-
"Bash(NPM_TOKEN=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 npm publish --access public)",
|
|
40
|
-
"Bash(NPM_TOKEN=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 npm publish --access public)",
|
|
41
|
-
"Bash(npm info *)",
|
|
42
|
-
"Bash(npm publish *)"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
}
|