create-quiver 0.6.0 → 0.8.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/.claude/settings.local.json +45 -0
- package/.github/workflows/ci.yml +9 -32
- package/AGENTS.md.template +41 -0
- package/BACKLOG.md +139 -0
- package/CHANGELOG.md +17 -0
- package/README.md +68 -14
- package/README_FOR_AI.md +48 -16
- package/ROADMAP.md +100 -0
- package/docs/AI_CONTEXT.md.template +19 -26
- package/docs/AI_ONBOARDING_PROMPT.md.template +16 -0
- package/docs/COMMANDS.md.template +25 -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 +11 -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 +16 -4
- package/docs/TESTING_GUIDE_FOR_AI.md.template +4 -3
- package/docs/TROUBLESHOOTING.md.template +14 -0
- package/docs/WORKFLOW.md.template +21 -4
- package/docs/examples/graph.md.template +62 -0
- package/docs/examples/next.md.template +27 -0
- package/docs/examples/plan.md.template +28 -0
- package/package.json +6 -2
- package/package.template.json +16 -0
- package/scripts/check-slice-readiness.sh +6 -4
- package/scripts/cleanup-slice.sh +2 -172
- package/scripts/init-docs.sh +147 -26
- 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]/HANDOFF.md.template +37 -0
- package/specs/[project-name]/slices/slice-template/slice.json +7 -2
- package/specs/quiver-v08-agent-onboarding-analysis/slices/slice-01-project-scan-command/slice.json +1 -1
- package/specs/quiver-v08-agent-onboarding-analysis/slices/slice-02-ai-onboarding-prompt/slice.json +1 -1
- package/specs/quiver-v08-agent-onboarding-analysis/slices/slice-03-doctor-readme-adoption-flow/slice.json +1 -1
- 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/specs/quiver-v15-init-required-before-migrate/EVIDENCE_REPORT.md +26 -0
- package/specs/quiver-v15-init-required-before-migrate/SPEC.md +66 -0
- package/specs/quiver-v15-init-required-before-migrate/STATUS.md +26 -0
- package/specs/quiver-v15-init-required-before-migrate/slices/slice-01-migrate-initialization-precondition/slice.json +65 -0
- package/specs/quiver-v15-init-required-before-migrate/slices/slice-02-doctor-not-initialized-guidance/slice.json +61 -0
- package/specs/quiver-v15-init-required-before-migrate/slices/slice-03-docs-smokes-init-before-migrate/slice.json +64 -0
- package/specs/quiver-v16-handoff-contract/EVIDENCE_REPORT.md +26 -0
- package/specs/quiver-v16-handoff-contract/SPEC.md +68 -0
- package/specs/quiver-v16-handoff-contract/STATUS.md +26 -0
- package/specs/quiver-v16-handoff-contract/slices/slice-01-handoff-template-and-contract/slice.json +66 -0
- package/specs/quiver-v16-handoff-contract/slices/slice-02-check-handoff-command/slice.json +70 -0
- package/specs/quiver-v16-handoff-contract/slices/slice-03-handoff-scaffold-optional/slice.json +67 -0
- package/specs/quiver-v17-orchestration-foundation/EVIDENCE_REPORT.md +32 -0
- package/specs/quiver-v17-orchestration-foundation/SPEC.md +79 -0
- package/specs/quiver-v17-orchestration-foundation/STATUS.md +31 -0
- package/specs/quiver-v17-orchestration-foundation/slices/slice-01-ci-matrix-verified/slice.json +68 -0
- package/specs/quiver-v17-orchestration-foundation/slices/slice-02-slice-graph-library/slice.json +65 -0
- package/specs/quiver-v17-orchestration-foundation/slices/slice-03-depends-on-validation/slice.json +72 -0
- package/specs/quiver-v18-slice-orchestration/EVIDENCE_REPORT.md +38 -0
- package/specs/quiver-v18-slice-orchestration/SPEC.md +91 -0
- package/specs/quiver-v18-slice-orchestration/STATUS.md +33 -0
- package/specs/quiver-v18-slice-orchestration/slices/slice-01-plan-command/slice.json +79 -0
- package/specs/quiver-v18-slice-orchestration/slices/slice-02-graph-mvp-tree/slice.json +75 -0
- package/specs/quiver-v18-slice-orchestration/slices/slice-03-graph-extended-formats/slice.json +70 -0
- package/specs/quiver-v18-slice-orchestration/slices/slice-04-next-command/slice.json +73 -0
- package/specs/quiver-v18-stabilization/EVIDENCE_REPORT.md +26 -0
- package/specs/quiver-v18-stabilization/SPEC.md +62 -0
- package/specs/quiver-v18-stabilization/STATUS.md +30 -0
- package/specs/quiver-v18-stabilization/slices/slice-01-fix-legacy-dependency-resolution/CLOSURE_BRIEF.md +29 -0
- package/specs/quiver-v18-stabilization/slices/slice-01-fix-legacy-dependency-resolution/EXECUTION_BRIEF.md +134 -0
- package/specs/quiver-v18-stabilization/slices/slice-01-fix-legacy-dependency-resolution/slice.json +56 -0
- package/specs/quiver-v18-stabilization/slices/slice-02-roadmap-and-branch-cleanup/CLOSURE_BRIEF.md +29 -0
- package/specs/quiver-v18-stabilization/slices/slice-02-roadmap-and-branch-cleanup/EXECUTION_BRIEF.md +118 -0
- package/specs/quiver-v18-stabilization/slices/slice-02-roadmap-and-branch-cleanup/slice.json +57 -0
- package/specs/quiver-v18-stabilization/slices/slice-03-publish-drafts-branch/CLOSURE_BRIEF.md +23 -0
- package/specs/quiver-v18-stabilization/slices/slice-03-publish-drafts-branch/EXECUTION_BRIEF.md +73 -0
- package/specs/quiver-v18-stabilization/slices/slice-03-publish-drafts-branch/slice.json +49 -0
- package/src/create-quiver/commands/graph.js +97 -0
- package/src/create-quiver/commands/next.js +134 -0
- package/src/create-quiver/commands/plan.js +205 -0
- package/src/create-quiver/index.js +476 -123
- 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/handoff.js +104 -0
- package/src/create-quiver/lib/init-docs.js +674 -0
- package/src/create-quiver/lib/json.js +14 -0
- package/src/create-quiver/lib/lifecycle.js +479 -0
- package/src/create-quiver/lib/paths.js +19 -0
- package/src/create-quiver/lib/readiness.js +354 -0
- package/src/create-quiver/lib/renderers/dot.js +129 -0
- package/src/create-quiver/lib/renderers/mermaid.js +119 -0
- package/src/create-quiver/lib/renderers/tree.js +116 -0
- package/src/create-quiver/lib/scope.js +5 -0
- package/src/create-quiver/lib/slice-graph.js +453 -0
- package/src/create-quiver/lib/slice.js +195 -0
- package/src/create-quiver/lib/state.js +139 -0
package/specs/quiver-v18-stabilization/slices/slice-01-fix-legacy-dependency-resolution/slice.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-01-fix-legacy-dependency-resolution",
|
|
3
|
+
"ticket": "QUIVER-01",
|
|
4
|
+
"type": "bugfix",
|
|
5
|
+
"title": "Fix legacy dependency resolution in `slice-graph.js`",
|
|
6
|
+
"objective": "Make `npx create-quiver plan` exit 0 on the Quiver repo by ignoring bare spec-name values in the legacy `\"dependencies\"` field instead of crashing with `MISSING_DEPENDENCY`.",
|
|
7
|
+
"description": "Old slice.json files (v01–v16) declare cross-spec dependencies with bare spec names in a `\"dependencies\"` array, e.g. `[\"quiver-v01\"]`. The `normalizeDependencyRef` function in `slice-graph.js` expands bare values by prepending the current spec slug, producing refs like `quiver-v02-bootstrap-hardening/quiver-v01`. These refs do not match any slice key, causing `buildGraph` to throw `SliceGraphError: Missing dependency reference(s)`. The fix is one guard: if a bare value does not start with `slice-`, it is a spec-level legacy ref and must be returned as null (filtered). The new `\"depends_on\"` format with full `spec/slice-id` paths is unaffected.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "bugfix",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "fix-legacy-dependency-resolution",
|
|
12
|
+
"branch_name": "bugfix/QUIVER-01-fix-legacy-dependency-resolution"
|
|
13
|
+
},
|
|
14
|
+
"must": [
|
|
15
|
+
"Add a guard in `normalizeDependencyRef` that returns `null` when the bare dependency value does not start with `slice-`",
|
|
16
|
+
"Leave all other logic in `normalizeDependencyRef` and `buildGraph` unchanged",
|
|
17
|
+
"Add a unit test that exercises the legacy `\"dependencies\": [\"quiver-vNN\"]` format and confirms no error is thrown and no edge is produced",
|
|
18
|
+
"Run `node --test tests/` and confirm all tests pass",
|
|
19
|
+
"Run `npx create-quiver plan` on the Quiver repo and confirm exit 0"
|
|
20
|
+
],
|
|
21
|
+
"not_included": [
|
|
22
|
+
"Changing the output or behavior of `plan`, `graph`, or `next`",
|
|
23
|
+
"Migrating old slice.json files to the new `depends_on` format",
|
|
24
|
+
"Adding warnings or notices for legacy deps — silent drop is intentional",
|
|
25
|
+
"Any other file besides `src/create-quiver/lib/slice-graph.js` and `tests/`"
|
|
26
|
+
],
|
|
27
|
+
"acceptance": [
|
|
28
|
+
"`npx create-quiver plan` exits 0 on the Quiver repo",
|
|
29
|
+
"`npx create-quiver plan --json` returns valid JSON with `plan`, `critical_path`, and `total_hours`",
|
|
30
|
+
"A test with `\"dependencies\": [\"quiver-v01\"]` does not throw and produces zero edges for that dep",
|
|
31
|
+
"A test with `\"depends_on\": [\"other-spec/slice-01-foo\"]` still produces the expected edge (regression)",
|
|
32
|
+
"`node --test tests/` exits 0"
|
|
33
|
+
],
|
|
34
|
+
"files": [
|
|
35
|
+
"src/create-quiver/lib/slice-graph.js",
|
|
36
|
+
"tests/lib/slice-graph.test.js"
|
|
37
|
+
],
|
|
38
|
+
"tests": [
|
|
39
|
+
"node --test tests/",
|
|
40
|
+
"node bin/create-quiver.js plan > /dev/null",
|
|
41
|
+
"node bin/create-quiver.js plan --json | node -e \"const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); if(!Array.isArray(d.plan)) process.exit(1)\""
|
|
42
|
+
],
|
|
43
|
+
"documentation": [],
|
|
44
|
+
"depends_on": [],
|
|
45
|
+
"assumptions": [
|
|
46
|
+
"All old slices using bare spec names in `\"dependencies\"` are already completed — silently dropping them causes no operational loss",
|
|
47
|
+
"No slice uses a bare dep that starts with `slice-` and refers to a different spec (would be an ambiguous format)"
|
|
48
|
+
],
|
|
49
|
+
"estimated_hours": 0.5,
|
|
50
|
+
"actual_hours": 0.5,
|
|
51
|
+
"status": "completed",
|
|
52
|
+
"blocked_reason": null,
|
|
53
|
+
"ready_at": "2026-05-12T00:00:00Z",
|
|
54
|
+
"started_at": "2026-05-12T00:00:00Z",
|
|
55
|
+
"completed_at": "2026-05-12T00:00:00Z"
|
|
56
|
+
}
|
package/specs/quiver-v18-stabilization/slices/slice-02-roadmap-and-branch-cleanup/CLOSURE_BRIEF.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# CLOSURE BRIEF — slice-02: ROADMAP v0.6 y limpieza de branches
|
|
2
|
+
|
|
3
|
+
**Spec:** quiver-v18-stabilization
|
|
4
|
+
**Slice:** slice-02-roadmap-and-branch-cleanup
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Checklist antes de abrir el PR
|
|
9
|
+
|
|
10
|
+
- [ ] `grep 'unreleased' ROADMAP.md` → retorna vacío (exit 1 en grep, que es lo correcto).
|
|
11
|
+
- [ ] `grep 'v0.6 (shipped)' ROADMAP.md` → retorna match.
|
|
12
|
+
- [ ] `git branch | grep backup` → retorna vacío.
|
|
13
|
+
- [ ] `git branch --merged main` → lista solo `main` (y `develop` si aplica). No hay branches de feature/docs/ci/test.
|
|
14
|
+
- [ ] `git diff --stat HEAD` → solo `ROADMAP.md`.
|
|
15
|
+
|
|
16
|
+
## Checklist del PR
|
|
17
|
+
|
|
18
|
+
- [ ] Branch: `docs/QUIVER-02-close-v06-roadmap` → `main`.
|
|
19
|
+
- [ ] Título: `docs(QUIVER-02): close v0.6 as shipped in ROADMAP`.
|
|
20
|
+
- [ ] Body del PR sigue las secciones del `docs/GITFLOW_PR_GUIDE.md.template`.
|
|
21
|
+
- [ ] En "Summary": mencionar ambas acciones (ROADMAP edit + branch cleanup local).
|
|
22
|
+
- [ ] En "Scope": aclarar que la limpieza de branches es local-only, sin diff.
|
|
23
|
+
- [ ] En "How to Test": `grep 'unreleased' ROADMAP.md` debe retornar sin match.
|
|
24
|
+
- [ ] En "Rollback": `git revert HEAD --no-edit` restaura ROADMAP.md. Las branches borradas no se recuperan automáticamente (pero estaban mergeadas, sin trabajo único).
|
|
25
|
+
|
|
26
|
+
## Post-merge
|
|
27
|
+
|
|
28
|
+
- [ ] Actualizar `specs/quiver-v18-stabilization/STATUS.md`: slice-02 → `Completed`, agregar PR y `actual_hours`.
|
|
29
|
+
- [ ] Actualizar `specs/quiver-v18-stabilization/EVIDENCE_REPORT.md`: registrar evidencia.
|
package/specs/quiver-v18-stabilization/slices/slice-02-roadmap-and-branch-cleanup/EXECUTION_BRIEF.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# EXECUTION BRIEF — slice-02: ROADMAP v0.6 y limpieza de branches
|
|
2
|
+
|
|
3
|
+
**Spec:** quiver-v18-stabilization
|
|
4
|
+
**Slice:** slice-02-roadmap-and-branch-cleanup
|
|
5
|
+
**Estimated time:** 20 min
|
|
6
|
+
**Branch:** `docs/QUIVER-02-close-v06-roadmap` from `main`
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Contexto
|
|
11
|
+
|
|
12
|
+
Dos fuentes de ruido a eliminar:
|
|
13
|
+
|
|
14
|
+
1. `ROADMAP.md` tiene `## v0.6 (unreleased)` aunque su scope (Node-native runtime, `quiver:*` scripts) fue absorbido y publicado en v0.7. Es una entrada engañosa.
|
|
15
|
+
2. El repo tiene ~35 branches locales que son backup artifacts o branches de PRs ya mergeados a main. No bloquean nada, pero añaden ruido a `git branch`.
|
|
16
|
+
|
|
17
|
+
**La limpieza de branches es local y no produce commit.** El único artefacto que va al PR es el cambio en `ROADMAP.md`.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Parte A — Limpieza de branches (local, sin commit)
|
|
22
|
+
|
|
23
|
+
### Paso 1: Listar branches ya merged a main
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git branch --merged main
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Deberías ver una lista larga. Anotá mentalmente las excepciones que NO debes borrar:
|
|
30
|
+
- `main`
|
|
31
|
+
- `develop`
|
|
32
|
+
- `drafts/v19-v22-orchestration-followups`
|
|
33
|
+
|
|
34
|
+
Todo lo demás en esa lista es candidato a eliminar.
|
|
35
|
+
|
|
36
|
+
### Paso 2: Verificar que no hay trabajo no mergeado en esas branches
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
git branch --no-merged main
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Si aparece algo inesperado que no sean las tres excepciones de arriba, revisalo antes de borrar. Si hay dudas, no borrés esa branch.
|
|
43
|
+
|
|
44
|
+
### Paso 3: Borrar branches mergeadas (una por una o en lote)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Borra todas las merged excepto main/develop/drafts de un golpe:
|
|
48
|
+
git branch --merged main \
|
|
49
|
+
| grep -vE "^\*|^ main$|^ develop$|^ drafts/" \
|
|
50
|
+
| xargs git branch -d
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Paso 4: Borrar las dos branches de backup explícitamente
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git branch -d backup/main-before-reconcile-20260512-094512
|
|
57
|
+
git branch -d backup/main-before-reconcile-20260512-094712
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Paso 5: Verificar
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
git branch | wc -l # debería ser significativamente menor que 35
|
|
64
|
+
git branch | grep backup # debe retornar vacío
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Parte B — ROADMAP.md (sí va al PR)
|
|
70
|
+
|
|
71
|
+
### El único cambio
|
|
72
|
+
|
|
73
|
+
En `ROADMAP.md`, localizá la sección:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
## v0.6 (unreleased)
|
|
77
|
+
|
|
78
|
+
- Cross-platform CI matrix (macOS, Linux, Windows) for Node-native runtime
|
|
79
|
+
- Node-native generated project npm scripts (`quiver:*`)
|
|
80
|
+
- Additive migration support for existing projects
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Reemplazá el encabezado y agregá la nota:
|
|
84
|
+
|
|
85
|
+
```markdown
|
|
86
|
+
## v0.6 (shipped)
|
|
87
|
+
|
|
88
|
+
> Scope absorbed into v0.7. Node-native runtime and `quiver:*` npm scripts
|
|
89
|
+
> landed together with the token-efficient context pack work.
|
|
90
|
+
|
|
91
|
+
- Cross-platform CI matrix (macOS, Linux, Windows) for Node-native runtime
|
|
92
|
+
- Node-native generated project npm scripts (`quiver:*`)
|
|
93
|
+
- Additive migration support for existing projects
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Nada más. No toques ninguna otra sección.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Commit y PR
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
git add ROADMAP.md
|
|
104
|
+
git commit -m "docs(QUIVER-02): close v0.6 as shipped in ROADMAP"
|
|
105
|
+
git push origin docs/QUIVER-02-close-v06-roadmap
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Abrí el PR con `gh pr create` apuntando a `main`. El body del PR documenta ambas partes (aunque la limpieza de branches no tiene diff, mencionala en el Summary para trazabilidad).
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Restricciones
|
|
113
|
+
|
|
114
|
+
- **No** toques ninguna otra sección de ROADMAP.md.
|
|
115
|
+
- **No** borres branches en origin — solo local.
|
|
116
|
+
- **No** borres `drafts/v19-v22-orchestration-followups` ni `develop` ni `main`.
|
|
117
|
+
- **No** agregues nada a CHANGELOG.md — este cambio no es una feature.
|
|
118
|
+
- El diff del PR debe mostrar solo `ROADMAP.md`.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-02-roadmap-and-branch-cleanup",
|
|
3
|
+
"ticket": "QUIVER-02",
|
|
4
|
+
"type": "chore",
|
|
5
|
+
"title": "Close v0.6 in ROADMAP and clean stale local branches",
|
|
6
|
+
"objective": "Remove two sources of noise: the `v0.6 (unreleased)` entry in ROADMAP.md (the scope shipped in v0.7) and ~35 stale local branches that are already merged to main or are backup artifacts.",
|
|
7
|
+
"description": "v0.6 was never formally closed in ROADMAP.md even though its scope (Node-native runtime, `quiver:*` scripts) landed in v0.7. The entry currently reads `v0.6 (unreleased)`, which is misleading. Additionally, 35 local branches accumulate since earlier in development — two are explicit backup branches created today, the rest are feature/docs/ci branches whose PRs were merged to main months ago. The branch cleanup is a local-only operation with no commit. The ROADMAP fix is a one-line edit that goes in a docs PR.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "docs",
|
|
10
|
+
"base_branch": "main",
|
|
11
|
+
"branch_slug": "close-v06-roadmap",
|
|
12
|
+
"branch_name": "docs/QUIVER-02-close-v06-roadmap"
|
|
13
|
+
},
|
|
14
|
+
"must": [
|
|
15
|
+
"Edit `ROADMAP.md`: replace `## v0.6 (unreleased)` with `## v0.6 (shipped)` and add a one-line note: scope (Node-native runtime, `quiver:*` npm scripts) was absorbed and shipped as part of v0.7",
|
|
16
|
+
"Delete locally: `backup/main-before-reconcile-20260512-094512` and `backup/main-before-reconcile-20260512-094712`",
|
|
17
|
+
"Delete locally all branches returned by `git branch --merged main` except `main`, `develop`, and `drafts/v19-v22-orchestration-followups`",
|
|
18
|
+
"Confirm no branch with unmerged work is deleted — run `git branch --no-merged main` and verify the list before deleting anything",
|
|
19
|
+
"Commit only `ROADMAP.md` — branch cleanup produces no commit"
|
|
20
|
+
],
|
|
21
|
+
"not_included": [
|
|
22
|
+
"Editing any other section of ROADMAP.md",
|
|
23
|
+
"Deleting branches on origin — local cleanup only",
|
|
24
|
+
"Closing or editing CHANGELOG.md",
|
|
25
|
+
"Any source code changes"
|
|
26
|
+
],
|
|
27
|
+
"acceptance": [
|
|
28
|
+
"`grep 'unreleased' ROADMAP.md` returns no match",
|
|
29
|
+
"`grep 'v0.6 (shipped)' ROADMAP.md` returns a match",
|
|
30
|
+
"`git branch` shows no `backup/*` branches",
|
|
31
|
+
"`git branch --merged main` returns only `main` (and `develop` if present) — no stale feature/docs/ci branches",
|
|
32
|
+
"PR diff contains only `ROADMAP.md` changes"
|
|
33
|
+
],
|
|
34
|
+
"files": [
|
|
35
|
+
"ROADMAP.md"
|
|
36
|
+
],
|
|
37
|
+
"tests": [
|
|
38
|
+
"grep -c 'unreleased' ROADMAP.md | grep -q '^0$'",
|
|
39
|
+
"git branch --merged main",
|
|
40
|
+
"git branch | grep backup | wc -l | grep -q '^0$'"
|
|
41
|
+
],
|
|
42
|
+
"documentation": [
|
|
43
|
+
"ROADMAP.md"
|
|
44
|
+
],
|
|
45
|
+
"depends_on": [],
|
|
46
|
+
"assumptions": [
|
|
47
|
+
"All branches returned by `git branch --merged main` (except main/develop/drafts) are safe to delete — they were created from merged PRs",
|
|
48
|
+
"No branch other than `drafts/v19-v22-orchestration-followups` contains uncommitted or unmerged work worth preserving"
|
|
49
|
+
],
|
|
50
|
+
"estimated_hours": 0.3,
|
|
51
|
+
"actual_hours": 0.1,
|
|
52
|
+
"status": "completed",
|
|
53
|
+
"blocked_reason": null,
|
|
54
|
+
"ready_at": "2026-05-12T00:00:00Z",
|
|
55
|
+
"started_at": "2026-05-12T00:00:00Z",
|
|
56
|
+
"completed_at": "2026-05-12T00:00:00Z"
|
|
57
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# CLOSURE BRIEF — slice-03: Publicar rama de drafts
|
|
2
|
+
|
|
3
|
+
**Spec:** quiver-v18-stabilization
|
|
4
|
+
**Slice:** slice-03-publish-drafts-branch
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Checklist de cierre (sin PR)
|
|
9
|
+
|
|
10
|
+
- [ ] Gate confirmada: el mantenedor declaró explícitamente que el checkpoint de v18 pasó.
|
|
11
|
+
- [ ] `git ls-remote origin drafts/v19-v22-orchestration-followups` retorna un SHA no vacío.
|
|
12
|
+
- [ ] El SHA remoto coincide con `git rev-parse drafts/v19-v22-orchestration-followups`.
|
|
13
|
+
- [ ] No se abrió ningún PR para esta rama.
|
|
14
|
+
|
|
15
|
+
## Post-ejecución
|
|
16
|
+
|
|
17
|
+
- [ ] Actualizar `specs/quiver-v18-stabilization/STATUS.md`: slice-03 → `Completed`, `actual_hours: 0.1`.
|
|
18
|
+
- [ ] Actualizar `specs/quiver-v18-stabilization/EVIDENCE_REPORT.md`: registrar SHA y fecha de push.
|
|
19
|
+
- [ ] Si todos los slices de esta spec están `Completed`, actualizar el campo `Status` del EVIDENCE_REPORT a `Completed`.
|
|
20
|
+
|
|
21
|
+
## Nota sobre el checkpoint de v18
|
|
22
|
+
|
|
23
|
+
Una vez que este slice cierra, la spec `quiver-v18-stabilization` está completa. El siguiente paso en el BACKLOG es la promoción de v19 (Project Visibility) desde la rama de drafts a una spec activa. Ese es un proceso editorial del mantenedor, no un slice de esta spec.
|
package/specs/quiver-v18-stabilization/slices/slice-03-publish-drafts-branch/EXECUTION_BRIEF.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# EXECUTION BRIEF — slice-03: Publicar rama de drafts
|
|
2
|
+
|
|
3
|
+
**Spec:** quiver-v18-stabilization
|
|
4
|
+
**Slice:** slice-03-publish-drafts-branch
|
|
5
|
+
**Estimated time:** 5 min
|
|
6
|
+
**Sin PR** — es un `git push` directo de una rama de referencia.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## ⛔ Gate obligatoria — leer antes de ejecutar cualquier cosa
|
|
11
|
+
|
|
12
|
+
Este slice está **bloqueado** hasta que el mantenedor confirme explícitamente:
|
|
13
|
+
|
|
14
|
+
1. Usé `quiver:plan`, `quiver:graph`, y `quiver:next` en al menos un ciclo real de trabajo.
|
|
15
|
+
2. Registré una observación en `specs/quiver-v18-slice-orchestration/EVIDENCE_REPORT.md`.
|
|
16
|
+
3. Confirmo que el checkpoint de v18 pasó.
|
|
17
|
+
|
|
18
|
+
**Si esa confirmación no está en el prompt que te delega este slice, abortá y pedila.**
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Contexto
|
|
23
|
+
|
|
24
|
+
La rama `drafts/v19-v22-orchestration-followups` existe solo localmente. Contiene 23 archivos (4 specs: v19–v22) en un único commit. ROADMAP.md y BACKLOG.md ya hacen referencia a esta rama por nombre. Publicarla en origin completa la cadena de trazabilidad y protege el trabajo ante pérdida local.
|
|
25
|
+
|
|
26
|
+
No es una rama candidata a merge. Es una rama de referencia que vive indefinidamente hasta que alguna de las specs se promueva formalmente.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Verificación previa
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# 1. Confirmar que la rama existe y tiene el commit correcto
|
|
34
|
+
git log drafts/v19-v22-orchestration-followups --oneline -1
|
|
35
|
+
# Esperás: 13eab96 docs(drafts): park v19-v22 spec drafts pending v18 checkpoint
|
|
36
|
+
|
|
37
|
+
# 2. Confirmar que NO existe ya en origin
|
|
38
|
+
git ls-remote origin drafts/v19-v22-orchestration-followups
|
|
39
|
+
# Esperás: salida vacía (si retorna algo, la rama ya fue publicada — slice completado)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Ejecución
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
GIT_SSH_COMMAND="ssh -i ~/ssh/github-personal" \
|
|
48
|
+
git push origin drafts/v19-v22-orchestration-followups
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Verificación post-push
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Confirmar que el SHA remoto coincide con el local
|
|
57
|
+
LOCAL_SHA=$(git rev-parse drafts/v19-v22-orchestration-followups)
|
|
58
|
+
REMOTE_SHA=$(git ls-remote origin drafts/v19-v22-orchestration-followups | awk '{print $1}')
|
|
59
|
+
|
|
60
|
+
echo "Local: $LOCAL_SHA"
|
|
61
|
+
echo "Remote: $REMOTE_SHA"
|
|
62
|
+
|
|
63
|
+
[ "$LOCAL_SHA" = "$REMOTE_SHA" ] && echo "OK" || echo "MISMATCH — investigar"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Restricciones
|
|
69
|
+
|
|
70
|
+
- **No** abras un PR para esta rama.
|
|
71
|
+
- **No** hagas `--force` en ninguna circunstancia.
|
|
72
|
+
- **No** edites ningún archivo en la rama antes de publicarla.
|
|
73
|
+
- **No** ejecutes este slice si el gate no fue confirmado explícitamente.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slice_id": "slice-03-publish-drafts-branch",
|
|
3
|
+
"ticket": "QUIVER-03",
|
|
4
|
+
"type": "chore",
|
|
5
|
+
"title": "Publish `drafts/v19-v22-orchestration-followups` to origin",
|
|
6
|
+
"objective": "Push the locally-parked v19–v22 draft specs to origin so they are preserved in the remote in case of local machine loss and are accessible for future promotion.",
|
|
7
|
+
"description": "The branch `drafts/v19-v22-orchestration-followups` exists only locally. It contains 23 files across 4 spec directories (v19 Project Visibility, v20 Context Diagnostics, v21 Slice Archaeology, v22 Deferred Tooling) committed in a single commit. ROADMAP.md and BACKLOG.md already reference this branch by name. Pushing it to origin completes the traceability chain. This slice has no PR — it is a single `git push` operation. It is gated by the human checkpoint for v18: the maintainer must confirm that `plan`, `graph`, and `next` were used in real work before this slice is executed.",
|
|
8
|
+
"git": {
|
|
9
|
+
"branch_type": "chore",
|
|
10
|
+
"base_branch": null,
|
|
11
|
+
"branch_slug": "publish-drafts-v19-v22",
|
|
12
|
+
"branch_name": "drafts/v19-v22-orchestration-followups"
|
|
13
|
+
},
|
|
14
|
+
"must": [
|
|
15
|
+
"Confirm the human checkpoint for v18 was explicitly declared by the maintainer before executing",
|
|
16
|
+
"Run `git log drafts/v19-v22-orchestration-followups --oneline -1` and confirm the expected SHA is present",
|
|
17
|
+
"Push with: `GIT_SSH_COMMAND=\"ssh -i ~/ssh/github-personal\" git push origin drafts/v19-v22-orchestration-followups`",
|
|
18
|
+
"Verify with: `git ls-remote origin drafts/v19-v22-orchestration-followups` and confirm the SHA matches local"
|
|
19
|
+
],
|
|
20
|
+
"not_included": [
|
|
21
|
+
"Opening a PR for the drafts branch — it is a reference branch, not a merge candidate",
|
|
22
|
+
"Promoting any of v19–v22 to active spec — that is a separate decision after the checkpoint",
|
|
23
|
+
"Modifying any file in the drafts branch",
|
|
24
|
+
"Any other git push"
|
|
25
|
+
],
|
|
26
|
+
"acceptance": [
|
|
27
|
+
"Maintainer has explicitly confirmed the v18 human checkpoint",
|
|
28
|
+
"`git ls-remote origin drafts/v19-v22-orchestration-followups` returns a non-empty SHA",
|
|
29
|
+
"The returned SHA matches `git rev-parse drafts/v19-v22-orchestration-followups`"
|
|
30
|
+
],
|
|
31
|
+
"files": [],
|
|
32
|
+
"tests": [
|
|
33
|
+
"git ls-remote origin drafts/v19-v22-orchestration-followups",
|
|
34
|
+
"git rev-parse drafts/v19-v22-orchestration-followups"
|
|
35
|
+
],
|
|
36
|
+
"documentation": [],
|
|
37
|
+
"depends_on": [],
|
|
38
|
+
"assumptions": [
|
|
39
|
+
"The SSH key at `~/ssh/github-personal` has push access to `FabriJuncal/quiver`",
|
|
40
|
+
"The local branch `drafts/v19-v22-orchestration-followups` has not been rebased or force-reset since creation"
|
|
41
|
+
],
|
|
42
|
+
"estimated_hours": 0.1,
|
|
43
|
+
"actual_hours": 0.1,
|
|
44
|
+
"status": "completed",
|
|
45
|
+
"blocked_reason": null,
|
|
46
|
+
"ready_at": "2026-05-12T00:00:00Z",
|
|
47
|
+
"started_at": "2026-05-12T00:00:00Z",
|
|
48
|
+
"completed_at": "2026-05-12T00:00:00Z"
|
|
49
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
const { buildGraph, computeLevels, detectFileConflicts, readAllSlices } = require('../lib/slice-graph');
|
|
2
|
+
const { renderDotGraph } = require('../lib/renderers/dot');
|
|
3
|
+
const { renderMermaidGraph } = require('../lib/renderers/mermaid');
|
|
4
|
+
const { renderTreeGraph, isUnicodeEnabled } = require('../lib/renderers/tree');
|
|
5
|
+
|
|
6
|
+
const EXCLUDED_STATUSES = new Set(['completed', 'skipped', 'cancelled']);
|
|
7
|
+
|
|
8
|
+
function toGraphNode(node) {
|
|
9
|
+
return {
|
|
10
|
+
ref: node.ref,
|
|
11
|
+
spec_slug: node.specSlug,
|
|
12
|
+
slice_id: node.sliceId,
|
|
13
|
+
title: node.title || node.sliceId,
|
|
14
|
+
hours: Number.isFinite(Number(node.json?.estimated_hours)) ? Number(node.json.estimated_hours) : 0,
|
|
15
|
+
status: node.status || 'draft',
|
|
16
|
+
files: Array.isArray(node.files) ? node.files : [],
|
|
17
|
+
depends_on: Array.isArray(node.depends_on) ? node.depends_on : [],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function buildConflictPayload(levelIndex, groups) {
|
|
22
|
+
return groups.map((group) => ({
|
|
23
|
+
level: levelIndex,
|
|
24
|
+
files: group.files,
|
|
25
|
+
slices: group.slices,
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function collectGraph(repoRoot, options = {}) {
|
|
30
|
+
const graph = buildGraph(readAllSlices(repoRoot));
|
|
31
|
+
computeLevels(graph);
|
|
32
|
+
const pendingNodes = graph.nodes.filter((node) => !EXCLUDED_STATUSES.has(String(node.status || '').toLowerCase()));
|
|
33
|
+
const pendingNodeRefs = new Set(pendingNodes.map((node) => node.ref));
|
|
34
|
+
const pendingEdges = graph.edges.filter((edge) => pendingNodeRefs.has(edge.from) && pendingNodeRefs.has(edge.to));
|
|
35
|
+
const levels = pendingNodes.length > 0 ? computeLevels({ nodes: pendingNodes, edges: pendingEdges, cycles: [] }) : [];
|
|
36
|
+
const levelEntries = levels.map((level, levelIndex) => {
|
|
37
|
+
const conflictGroups = detectFileConflicts(level);
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
index: levelIndex,
|
|
41
|
+
slices: level.map(toGraphNode),
|
|
42
|
+
conflicts: buildConflictPayload(levelIndex, conflictGroups),
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const filteredLevels = typeof options.level === 'number'
|
|
47
|
+
? levelEntries.filter((entry) => entry.index === options.level)
|
|
48
|
+
: levelEntries;
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
levels: filteredLevels.map((entry) => entry.slices),
|
|
52
|
+
conflicts: filteredLevels.flatMap((entry) => entry.conflicts),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function formatHumanGraph(report, options = {}) {
|
|
57
|
+
const format = options.format || 'tree';
|
|
58
|
+
const sharedOptions = {
|
|
59
|
+
showConflicts: options.showConflicts === true,
|
|
60
|
+
unicode: options.unicode === true || isUnicodeEnabled(options),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
if (format === 'tree') {
|
|
64
|
+
return renderTreeGraph(report, sharedOptions);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (format === 'mermaid') {
|
|
68
|
+
return renderMermaidGraph(report, sharedOptions);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (format === 'dot') {
|
|
72
|
+
return renderDotGraph(report, sharedOptions);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
throw new Error(`create-quiver: unsupported graph format: ${format}`);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function runGraph(repoRoot, options = {}) {
|
|
79
|
+
if (options.format && !['tree', 'mermaid', 'dot'].includes(options.format)) {
|
|
80
|
+
throw new Error(`create-quiver: unsupported graph format: ${options.format}`);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const report = collectGraph(repoRoot, options);
|
|
84
|
+
if (options.json) {
|
|
85
|
+
process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
|
|
86
|
+
return report;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
process.stdout.write(formatHumanGraph(report, options));
|
|
90
|
+
return report;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
module.exports = {
|
|
94
|
+
collectGraph,
|
|
95
|
+
formatHumanGraph,
|
|
96
|
+
runGraph,
|
|
97
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const readline = require('readline');
|
|
3
|
+
const { collectPlan } = require('./plan');
|
|
4
|
+
const { startSlice } = require('../lib/lifecycle');
|
|
5
|
+
|
|
6
|
+
function toStartSliceCommand(slicePath) {
|
|
7
|
+
return `npx create-quiver start-slice "${slicePath}"`;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function collectNext(repoRoot, options = {}) {
|
|
11
|
+
const report = collectPlan(repoRoot, {
|
|
12
|
+
onlyReady: true,
|
|
13
|
+
specSlug: options.specSlug,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const allReady = report.plan.filter((item) => String(item.status || '').toLowerCase() !== 'blocked');
|
|
17
|
+
const next = allReady.length > 0 ? allReady[0] : null;
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
all_ready: allReady,
|
|
21
|
+
next,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function formatHumanNext(report, options = {}) {
|
|
26
|
+
const lines = [options.allReady ? 'Ready slices' : 'Next ready slice'];
|
|
27
|
+
|
|
28
|
+
if (!report.next) {
|
|
29
|
+
lines.push('No ready slices found.');
|
|
30
|
+
return `${lines.join('\n')}\n`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const items = options.allReady ? report.all_ready : [report.next];
|
|
34
|
+
|
|
35
|
+
for (const [index, item] of items.entries()) {
|
|
36
|
+
const command = toStartSliceCommand(item.slice_path);
|
|
37
|
+
if (options.allReady) {
|
|
38
|
+
lines.push('');
|
|
39
|
+
lines.push(`[${index + 1}] ${item.ref}`);
|
|
40
|
+
lines.push(`Title: ${item.title}`);
|
|
41
|
+
lines.push(`Status: ${item.status}`);
|
|
42
|
+
lines.push(`Start: ${command}`);
|
|
43
|
+
} else {
|
|
44
|
+
lines.push(`Slice: ${item.ref}`);
|
|
45
|
+
lines.push(`Title: ${item.title}`);
|
|
46
|
+
lines.push(`Status: ${item.status}`);
|
|
47
|
+
lines.push(`Start: ${command}`);
|
|
48
|
+
if (report.all_ready.length > 1) {
|
|
49
|
+
lines.push(`Also ready: ${report.all_ready.slice(1).map((candidate) => candidate.ref).join(', ')}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return `${lines.join('\n')}\n`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function promptConfirm(message, io = {}) {
|
|
58
|
+
const input = io.input || process.stdin;
|
|
59
|
+
const output = io.output || process.stdout;
|
|
60
|
+
|
|
61
|
+
return new Promise((resolve, reject) => {
|
|
62
|
+
const rl = readline.createInterface({
|
|
63
|
+
input,
|
|
64
|
+
output,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
rl.question(`${message} [y/N] `, (answer) => {
|
|
68
|
+
rl.close();
|
|
69
|
+
resolve(/^y(es)?$/i.test(String(answer || '').trim()));
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
rl.on('SIGINT', () => {
|
|
73
|
+
rl.close();
|
|
74
|
+
reject(new Error('create-quiver: confirmation aborted.'));
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function runNext(repoRoot, options = {}) {
|
|
80
|
+
const report = collectNext(repoRoot, options);
|
|
81
|
+
const isTTY = options.isTTY || {
|
|
82
|
+
stdin: Boolean(process.stdin.isTTY),
|
|
83
|
+
stdout: Boolean(process.stdout.isTTY),
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
if (options.autoStart) {
|
|
87
|
+
if (!isTTY.stdin || !isTTY.stdout) {
|
|
88
|
+
throw new Error('create-quiver: --auto-start requires an interactive TTY.');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (!report.next) {
|
|
92
|
+
process.stdout.write('No ready slices found.\n');
|
|
93
|
+
return report;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const confirmed = await (options.promptConfirm || promptConfirm)(`Start slice ${report.next.ref}?`);
|
|
97
|
+
if (confirmed) {
|
|
98
|
+
const slicePath = path.resolve(repoRoot, report.next.slice_path);
|
|
99
|
+
await Promise.resolve((options.startSliceFn || startSlice)(slicePath, { allowDraft: true }));
|
|
100
|
+
process.stdout.write(`Started: ${report.next.ref}\n`);
|
|
101
|
+
} else {
|
|
102
|
+
process.stdout.write('Aborted.\n');
|
|
103
|
+
}
|
|
104
|
+
return report;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (options.json) {
|
|
108
|
+
const payload = {
|
|
109
|
+
all_ready: report.all_ready.map((item) => ({
|
|
110
|
+
...item,
|
|
111
|
+
start_slice_command: toStartSliceCommand(item.slice_path),
|
|
112
|
+
})),
|
|
113
|
+
next: report.next
|
|
114
|
+
? {
|
|
115
|
+
...report.next,
|
|
116
|
+
start_slice_command: toStartSliceCommand(report.next.slice_path),
|
|
117
|
+
}
|
|
118
|
+
: null,
|
|
119
|
+
};
|
|
120
|
+
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
121
|
+
return payload;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
process.stdout.write(formatHumanNext(report, options));
|
|
125
|
+
return report;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
module.exports = {
|
|
129
|
+
collectNext,
|
|
130
|
+
formatHumanNext,
|
|
131
|
+
promptConfirm,
|
|
132
|
+
runNext,
|
|
133
|
+
toStartSliceCommand,
|
|
134
|
+
};
|