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.
Files changed (69) hide show
  1. package/.github/workflows/ci.yml +7 -30
  2. package/AGENTS.md.template +41 -0
  3. package/CHANGELOG.md +5 -0
  4. package/README.md +53 -9
  5. package/README_FOR_AI.md +36 -14
  6. package/ROADMAP.md +78 -0
  7. package/docs/AI_CONTEXT.md.template +19 -25
  8. package/docs/AI_ONBOARDING_PROMPT.md.template +12 -0
  9. package/docs/CONTEXTO.md.template +4 -17
  10. package/docs/DECISIONS.md.template +18 -0
  11. package/docs/DEEP.md.template +34 -0
  12. package/docs/DOCUMENTATION_GUIDE.md.template +9 -7
  13. package/docs/GITFLOW_PR_GUIDE.md.template +7 -0
  14. package/docs/INDEX.md.template +9 -0
  15. package/docs/QUICK.md.template +27 -0
  16. package/docs/STANDARD.md.template +49 -0
  17. package/docs/STATUS.md.template +2 -2
  18. package/docs/SUPPORT_MATRIX.md.template +7 -4
  19. package/docs/TESTING_GUIDE_FOR_AI.md.template +4 -3
  20. package/docs/TROUBLESHOOTING.md.template +14 -0
  21. package/docs/WORKFLOW.md.template +19 -5
  22. package/package.json +3 -1
  23. package/package.template.json +13 -1
  24. package/scripts/cleanup-slice.sh +2 -172
  25. package/scripts/init-docs.sh +246 -44
  26. package/scripts/package-quiver.sh +5 -0
  27. package/scripts/start-slice.sh +3 -425
  28. package/specs/[project-name]/EVIDENCE_REPORT.md.template +3 -1
  29. package/specs/[project-name]/slices/slice-template/slice.json +2 -2
  30. package/specs/quiver-v11-existing-project-migration/EVIDENCE_REPORT.md +38 -0
  31. package/specs/quiver-v11-existing-project-migration/SPEC.md +59 -0
  32. package/specs/quiver-v11-existing-project-migration/STATUS.md +26 -0
  33. package/specs/quiver-v11-existing-project-migration/slices/slice-01-non-destructive-migrate-command/slice.json +73 -0
  34. package/specs/quiver-v11-existing-project-migration/slices/slice-02-version-metadata-doctor-upgrade-checks/slice.json +71 -0
  35. package/specs/quiver-v11-existing-project-migration/slices/slice-03-upgrade-docs-legacy-project-smokes/slice.json +78 -0
  36. package/specs/quiver-v12-cross-platform-native-runtime/EVIDENCE_REPORT.md +30 -0
  37. package/specs/quiver-v12-cross-platform-native-runtime/SPEC.md +86 -0
  38. package/specs/quiver-v12-cross-platform-native-runtime/STATUS.md +29 -0
  39. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-01-cross-platform-support-contract/slice.json +69 -0
  40. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-02-node-init-docs-runtime/slice.json +76 -0
  41. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-03-node-migrate-analyze-doctor-flow/slice.json +74 -0
  42. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-04-node-slice-lifecycle-commands/slice.json +81 -0
  43. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-05-generated-project-scripts-and-migration/slice.json +78 -0
  44. package/specs/quiver-v12-cross-platform-native-runtime/slices/slice-06-cross-platform-ci-release-readiness/slice.json +74 -0
  45. package/specs/quiver-v13-token-efficient-ai-context/EVIDENCE_REPORT.md +28 -0
  46. package/specs/quiver-v13-token-efficient-ai-context/SPEC.md +68 -0
  47. package/specs/quiver-v13-token-efficient-ai-context/STATUS.md +26 -0
  48. package/specs/quiver-v13-token-efficient-ai-context/slices/slice-01-token-efficient-ai-modes-guidance/slice.json +65 -0
  49. package/specs/quiver-v13-token-efficient-ai-context/slices/slice-02-decision-log-context-checkpoint/slice.json +64 -0
  50. package/specs/quiver-v13-token-efficient-ai-context/slices/slice-03-project-map-reading-order/slice.json +66 -0
  51. package/specs/quiver-v14-tiered-context-pack/EVIDENCE_REPORT.md +42 -0
  52. package/specs/quiver-v14-tiered-context-pack/SPEC.md +116 -0
  53. package/specs/quiver-v14-tiered-context-pack/STATUS.md +35 -0
  54. package/specs/quiver-v14-tiered-context-pack/slices/slice-01-tiered-context-pack/slice.json +77 -0
  55. package/specs/quiver-v14-tiered-context-pack/slices/slice-02-agents-md-router/slice.json +74 -0
  56. package/specs/quiver-v14-tiered-context-pack/slices/slice-03-active-slice-lifecycle/slice.json +74 -0
  57. package/specs/quiver-v14-tiered-context-pack/slices/slice-04-dedup-frontmatter/slice.json +83 -0
  58. package/specs/quiver-v14-tiered-context-pack/slices/slice-05-doctor-smokes-tiered-pack/slice.json +84 -0
  59. package/src/create-quiver/index.js +360 -40
  60. package/src/create-quiver/lib/analyze.js +9 -0
  61. package/src/create-quiver/lib/doctor.js +212 -0
  62. package/src/create-quiver/lib/git.js +154 -0
  63. package/src/create-quiver/lib/init-docs.js +616 -0
  64. package/src/create-quiver/lib/lifecycle.js +478 -0
  65. package/src/create-quiver/lib/paths.js +19 -0
  66. package/src/create-quiver/lib/readiness.js +300 -0
  67. package/src/create-quiver/lib/scope.js +5 -0
  68. package/src/create-quiver/lib/slice.js +194 -0
  69. package/src/create-quiver/lib/state.js +89 -0
@@ -0,0 +1,35 @@
1
+ # Quiver v0.14 Spec Status
2
+
3
+ **Spec:** quiver-v14-tiered-context-pack
4
+ **Last updated:** 2026-04-23
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 | Tiered Context Pack | Completed | - | 4 | 4 |
13
+ | slice-02 | AGENTS.md Router | Completed | #38 | 3 | 3 |
14
+ | slice-03 | Active Slice Lifecycle | Completed | - | 4 | 4 |
15
+ | slice-04 | Dedup and Front-Matter | Completed | - | 4 | 5 |
16
+ | slice-05 | Doctor and Smokes for Tiered Pack | Completed | - | 4 | 5 |
17
+
18
+ ## Progress
19
+
20
+ - Completed slices: 5 / 5
21
+ - Estimated hours: 23
22
+ - Actual hours: 21
23
+
24
+ ## Blockers
25
+
26
+ | Slice | Blocker | Since | Action needed |
27
+ |-------|---------|-------|---------------|
28
+ | - | - | - | - |
29
+
30
+ ## Dependencies
31
+
32
+ - slice-02 depends on slice-01 (AGENTS.md routes to the tiers created in slice-01)
33
+ - slice-03 depends on slice-02 (ACTIVE_SLICE is referenced from AGENTS.md)
34
+ - slice-04 depends on slice-01 (front-matter is applied to the tiered files)
35
+ - slice-05 depends on slices 01-04 (validates the full pack)
@@ -0,0 +1,77 @@
1
+ {
2
+ "slice_id": "slice-01-tiered-context-pack",
3
+ "ticket": "QUIVER-01",
4
+ "type": "feat",
5
+ "title": "Tiered Context Pack (QUICK, STANDARD, DEEP)",
6
+ "objective": "Generate a three-tier AI context pack so execution models load a minimal QUICK brief, default tasks load a bounded STANDARD brief, and planning models can opt into unbounded DEEP context on demand.",
7
+ "description": "Today the generated AI context is flat: agents that only need to act on an active slice still load several hundred lines of project-wide documentation. This slice introduces three bounded tiers under `docs/ai/` with distinct purposes and generation rules, distributing content that currently lives in AI_CONTEXT.md, CONTEXTO.md, and WORKFLOW.md without losing information. The tiers are additive: QUICK is the minimum viable briefing, STANDARD is the default, DEEP is the archive.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "tiered-context-pack",
12
+ "branch_name": "feature/QUIVER-01-tiered-context-pack"
13
+ },
14
+ "must": [
15
+ "Create `docs/QUICK.md.template` with a 50-line upper bound covering stack, primary commands, hard rules, and pointer to STANDARD/DEEP",
16
+ "Create `docs/STANDARD.md.template` with a 300-line upper bound covering conventions, workflow overview, testing expectations, and v13 mode guidance",
17
+ "Create `docs/DEEP.md.template` without a line bound, intended for project history, decisions, and cultural context",
18
+ "Update `src/create-quiver/lib/init-docs.js` to render the three tier templates into `docs/ai/QUICK.md`, `docs/ai/STANDARD.md`, and `docs/ai/DEEP.md` on init and on migrate",
19
+ "Populate QUICK with deterministic content from the existing analyzer scan (stack, package manager, primary commands, slice workflow commands)",
20
+ "Reference the tiers explicitly from `docs/INDEX.md.template` so the project index lists them"
21
+ ],
22
+ "not_included": [
23
+ "Creating AGENTS.md (handled in slice-02)",
24
+ "Generating ACTIVE_SLICE.md (handled in slice-03)",
25
+ "Adding YAML front-matter (handled in slice-04)",
26
+ "Doctor warnings for tier size (handled in slice-05)",
27
+ "Deleting AI_CONTEXT.md, CONTEXTO.md, or WORKFLOW.md"
28
+ ],
29
+ "acceptance": [
30
+ "A freshly initialized project contains `docs/ai/QUICK.md`, `docs/ai/STANDARD.md`, and `docs/ai/DEEP.md`",
31
+ "QUICK.md has 50 or fewer non-empty content lines",
32
+ "STANDARD.md has 300 or fewer non-empty content lines",
33
+ "QUICK.md includes at least: project name, detected stack, primary install/dev/test commands, slice start command, and a pointer line to STANDARD.md and DEEP.md",
34
+ "Running `migrate` on a project generated before v14 creates the three tier files without overwriting existing content",
35
+ "`docs/INDEX.md` links to all three tier files"
36
+ ],
37
+ "files": [
38
+ "docs/QUICK.md.template",
39
+ "docs/STANDARD.md.template",
40
+ "docs/DEEP.md.template",
41
+ "docs/INDEX.md.template",
42
+ "src/create-quiver/lib/init-docs.js",
43
+ "scripts/init-docs.sh",
44
+ "specs/quiver-v14-tiered-context-pack/SPEC.md",
45
+ "specs/quiver-v14-tiered-context-pack/STATUS.md",
46
+ "specs/quiver-v14-tiered-context-pack/EVIDENCE_REPORT.md",
47
+ "specs/quiver-v14-tiered-context-pack/slices/slice-01-tiered-context-pack/slice.json"
48
+ ],
49
+ "tests": [
50
+ "node bin/create-quiver.js --name \"Scratch\" --dir /tmp/quiver-v14-slice-01-smoke",
51
+ "test -f /tmp/quiver-v14-slice-01-smoke/docs/ai/QUICK.md",
52
+ "test -f /tmp/quiver-v14-slice-01-smoke/docs/ai/STANDARD.md",
53
+ "test -f /tmp/quiver-v14-slice-01-smoke/docs/ai/DEEP.md",
54
+ "awk 'NF' /tmp/quiver-v14-slice-01-smoke/docs/ai/QUICK.md | wc -l | awk '{ if ($1 > 50) exit 1 }'",
55
+ "awk 'NF' /tmp/quiver-v14-slice-01-smoke/docs/ai/STANDARD.md | wc -l | awk '{ if ($1 > 300) exit 1 }'",
56
+ "git diff --check"
57
+ ],
58
+ "documentation": [
59
+ "docs/QUICK.md.template",
60
+ "docs/STANDARD.md.template",
61
+ "docs/DEEP.md.template",
62
+ "docs/INDEX.md.template"
63
+ ],
64
+ "dependencies": [],
65
+ "assumptions": [
66
+ "Three tiers are sufficient granularity; no project needs a fourth level",
67
+ "A 50-line cap on QUICK is tight enough to force selection and loose enough to stay useful",
68
+ "Execution models benefit more from a short, deterministic briefing than from a rich but long one"
69
+ ],
70
+ "estimated_hours": 4,
71
+ "actual_hours": 4,
72
+ "status": "completed",
73
+ "blocked_reason": null,
74
+ "ready_at": null,
75
+ "started_at": null,
76
+ "completed_at": "2026-04-23"
77
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "slice_id": "slice-02-agents-md-router",
3
+ "ticket": "QUIVER-02",
4
+ "type": "feat",
5
+ "title": "AGENTS.md Router",
6
+ "objective": "Generate a single root `AGENTS.md` that tells any AI agent which tier to load, how many tokens to spend, and how to respond concisely.",
7
+ "description": "AGENTS.md is the universal entry point that Claude Code, Cursor, Aider, Continue, and other agent runtimes discover automatically. This slice adds a template for it and wires init-docs and migrate to render it at the project root. The content is deliberately narrow: it declares a reading budget per task mode, points to QUICK.md first, and sets an output policy that discourages restating tasks and summarizing diffs.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "agents-md-router",
12
+ "branch_name": "feature/QUIVER-02-agents-md-router"
13
+ },
14
+ "must": [
15
+ "Create `AGENTS.md.template` at repository root with sections: Purpose, Reading Budget, Reading Order, Output Policy, Slice Execution Rules, and Links",
16
+ "Reading Budget section declares explicit per-mode budgets: planning up to 10000 tokens, execution under 2000 tokens before first action, debug under 1000 tokens before proposing a hypothesis",
17
+ "Reading Order section instructs agents to read QUICK first, STANDARD only if QUICK is insufficient, DEEP only when history or past decisions are requested",
18
+ "Output Policy section forbids restating the task before acting, forbids post-edit summaries of diffs, and caps confirmations at one sentence",
19
+ "Slice Execution Rules section instructs agents to treat `docs/ai/ACTIVE_SLICE.md` as the single source of truth when it exists and to avoid reading SPEC.md unless ACTIVE_SLICE.md references it",
20
+ "Update `src/create-quiver/lib/init-docs.js` and `scripts/init-docs.sh` to render AGENTS.md on init and on migrate, preserving existing AGENTS.md if the project already has one"
21
+ ],
22
+ "not_included": [
23
+ "Generating model-specific adapters (CLAUDE.md, .cursorrules, copilot-instructions.md)",
24
+ "Any runtime enforcement of the reading budget",
25
+ "Deleting existing AI guidance files"
26
+ ],
27
+ "acceptance": [
28
+ "A freshly initialized project contains `AGENTS.md` at the repository root",
29
+ "AGENTS.md contains all six required sections named verbatim",
30
+ "Reading Budget section contains explicit numeric budgets for planning, execution, and debug",
31
+ "Reading Order section names QUICK, STANDARD, and DEEP in that order",
32
+ "Output Policy section contains at minimum: no task restatement, no post-edit diff summary, one-sentence confirmation",
33
+ "Migrating a project that already has `AGENTS.md` preserves the existing content and logs a skip message"
34
+ ],
35
+ "files": [
36
+ "AGENTS.md.template",
37
+ "src/create-quiver/lib/init-docs.js",
38
+ "scripts/init-docs.sh",
39
+ "specs/quiver-v14-tiered-context-pack/SPEC.md",
40
+ "specs/quiver-v14-tiered-context-pack/STATUS.md",
41
+ "specs/quiver-v14-tiered-context-pack/EVIDENCE_REPORT.md",
42
+ "specs/quiver-v14-tiered-context-pack/slices/slice-02-agents-md-router/slice.json"
43
+ ],
44
+ "tests": [
45
+ "node bin/create-quiver.js --name \"Scratch\" --dir /tmp/quiver-v14-slice-02-smoke",
46
+ "test -f /tmp/quiver-v14-slice-02-smoke/AGENTS.md",
47
+ "grep -q '^## Reading Budget' /tmp/quiver-v14-slice-02-smoke/AGENTS.md",
48
+ "grep -q '^## Reading Order' /tmp/quiver-v14-slice-02-smoke/AGENTS.md",
49
+ "grep -q '^## Output Policy' /tmp/quiver-v14-slice-02-smoke/AGENTS.md",
50
+ "grep -q '^## Slice Execution Rules' /tmp/quiver-v14-slice-02-smoke/AGENTS.md",
51
+ "grep -q 'QUICK' /tmp/quiver-v14-slice-02-smoke/AGENTS.md",
52
+ "git diff --check"
53
+ ],
54
+ "documentation": [
55
+ "AGENTS.md.template",
56
+ "README.md",
57
+ "README_FOR_AI.md"
58
+ ],
59
+ "dependencies": [
60
+ "slice-01-tiered-context-pack"
61
+ ],
62
+ "assumptions": [
63
+ "AGENTS.md is discoverable by Claude Code, Cursor, Aider, and Continue without additional configuration",
64
+ "A single router is better than multiple model-specific adapters until a user asks for one",
65
+ "Agents respect explicit numeric budgets better than vague guidance"
66
+ ],
67
+ "estimated_hours": 3,
68
+ "actual_hours": null,
69
+ "status": "completed",
70
+ "blocked_reason": null,
71
+ "ready_at": null,
72
+ "started_at": "2026-04-23",
73
+ "completed_at": "2026-04-23"
74
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "slice_id": "slice-03-active-slice-lifecycle",
3
+ "ticket": "QUIVER-03",
4
+ "type": "feat",
5
+ "title": "Active Slice Lifecycle (ACTIVE_SLICE.md)",
6
+ "objective": "Generate `docs/ai/ACTIVE_SLICE.md` on `start-slice` so execution agents get a self-contained slice brief, and remove it on `cleanup-slice` so the signal stays accurate.",
7
+ "description": "Execution models currently waste tokens navigating SPEC.md, STATUS.md, and WORKFLOW.md even when the information they need fits in 30 lines of one file. This slice introduces an auto-generated active slice brief that is the single source of truth for execution while a slice is in progress. The file is ephemeral by design: it is born with `start-slice` and dies with `cleanup-slice`, so its presence is a reliable signal that a slice is active.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "active-slice-lifecycle",
12
+ "branch_name": "feature/QUIVER-03-active-slice-lifecycle"
13
+ },
14
+ "must": [
15
+ "Update `src/create-quiver/lib/lifecycle.js` so `startSlice` writes `docs/ai/ACTIVE_SLICE.md` after the worktree and branch are created",
16
+ "`ACTIVE_SLICE.md` content is rendered from the slice.json being started and contains, in order: slice id, title, objective (one line), `allowed_files` list, validation commands from `tests`, Definition of Done checklist derived from `acceptance`, and an explicit prohibition line against editing files outside `allowed_files`",
17
+ "Update `src/create-quiver/lib/lifecycle.js` so `cleanupSlice` removes `docs/ai/ACTIVE_SLICE.md` when cleanup succeeds",
18
+ "Update `scripts/start-slice.sh` and `scripts/cleanup-slice.sh` to call the Node lifecycle entrypoint so legacy Bash users get the same behavior",
19
+ "Record `ACTIVE_SLICE.md` path in `WORKTREE_CONTEXT.md` so developers see the link when they attach to a worktree"
20
+ ],
21
+ "not_included": [
22
+ "Enforcing `allowed_files` at commit time (out of scope for v14)",
23
+ "Front-matter on ACTIVE_SLICE.md (handled in slice-04)",
24
+ "Doctor warnings for orphaned ACTIVE_SLICE.md (handled in slice-05)",
25
+ "Changing the slice.json schema"
26
+ ],
27
+ "acceptance": [
28
+ "Running `start-slice` on a valid slice.json creates `docs/ai/ACTIVE_SLICE.md`",
29
+ "The file contains the slice id, the title, a one-line objective, the `allowed_files` list, the validation commands, the DoD checklist, and the prohibition line",
30
+ "Running `cleanup-slice` on the same slice removes `docs/ai/ACTIVE_SLICE.md`",
31
+ "Running `cleanup-slice` when `ACTIVE_SLICE.md` is already missing succeeds without error",
32
+ "Running `start-slice` when `ACTIVE_SLICE.md` exists from a previous slice overwrites it and logs a replacement message",
33
+ "`WORKTREE_CONTEXT.md` generated by `start-slice` references `docs/ai/ACTIVE_SLICE.md`"
34
+ ],
35
+ "files": [
36
+ "src/create-quiver/lib/lifecycle.js",
37
+ "src/create-quiver/lib/slice.js",
38
+ "scripts/start-slice.sh",
39
+ "scripts/cleanup-slice.sh",
40
+ "specs/quiver-v14-tiered-context-pack/SPEC.md",
41
+ "specs/quiver-v14-tiered-context-pack/STATUS.md",
42
+ "specs/quiver-v14-tiered-context-pack/EVIDENCE_REPORT.md",
43
+ "specs/quiver-v14-tiered-context-pack/slices/slice-03-active-slice-lifecycle/slice.json"
44
+ ],
45
+ "tests": [
46
+ "node bin/create-quiver.js --name \"Scratch\" --dir /tmp/quiver-v14-slice-03-smoke",
47
+ "node bin/create-quiver.js start-slice --dir /tmp/quiver-v14-slice-03-smoke /tmp/quiver-v14-slice-03-smoke/specs/scratch/slices/slice-template/slice.json --allow-draft",
48
+ "test -f /tmp/quiver-v14-slice-03-smoke/docs/ai/ACTIVE_SLICE.md",
49
+ "grep -q 'allowed_files' /tmp/quiver-v14-slice-03-smoke/docs/ai/ACTIVE_SLICE.md",
50
+ "grep -q 'Definition of Done' /tmp/quiver-v14-slice-03-smoke/docs/ai/ACTIVE_SLICE.md",
51
+ "node bin/create-quiver.js cleanup-slice --dir /tmp/quiver-v14-slice-03-smoke /tmp/quiver-v14-slice-03-smoke/specs/scratch/slices/slice-template/slice.json --discard",
52
+ "test ! -f /tmp/quiver-v14-slice-03-smoke/docs/ai/ACTIVE_SLICE.md",
53
+ "git diff --check"
54
+ ],
55
+ "documentation": [
56
+ "docs/WORKFLOW.md.template",
57
+ "README_FOR_AI.md"
58
+ ],
59
+ "dependencies": [
60
+ "slice-02-agents-md-router"
61
+ ],
62
+ "assumptions": [
63
+ "A single active slice file per project is sufficient; parallel worktrees can read from their own working tree copy",
64
+ "Overwriting an existing ACTIVE_SLICE.md is safer than refusing to start, because the previous slice should have been cleaned up first",
65
+ "A short, deterministic file is more reliable than asking agents to synthesize the same information from SPEC.md"
66
+ ],
67
+ "estimated_hours": 4,
68
+ "actual_hours": null,
69
+ "status": "completed",
70
+ "blocked_reason": null,
71
+ "ready_at": null,
72
+ "started_at": "2026-04-23",
73
+ "completed_at": "2026-04-23"
74
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "slice_id": "slice-04-dedup-frontmatter",
3
+ "ticket": "QUIVER-04",
4
+ "type": "feat",
5
+ "title": "Deduplication and YAML Front-Matter",
6
+ "objective": "Add structured YAML front-matter to every generated context file and remove duplication so `PROJECT_MAP.md` is the single source of truth for stack and commands.",
7
+ "description": "Today stack information, commands, and package manager details are repeated across AI_CONTEXT, CONTEXTO, PROJECT_MAP, STATUS, and WORKFLOW. Agents that load more than one file pay the token cost twice. This slice collapses duplication by making PROJECT_MAP.md authoritative and having other files link to it, and adds a YAML front-matter header on every file in `docs/ai/` so agents can skip irrelevant files without reading the body.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "dedup-frontmatter",
12
+ "branch_name": "feature/QUIVER-04-dedup-frontmatter"
13
+ },
14
+ "must": [
15
+ "Every file rendered into `docs/ai/` (QUICK.md, STANDARD.md, DEEP.md, ACTIVE_SLICE.md, PRINCIPLES.md, RULES.yaml skipped, LESSONS.md) starts with a YAML front-matter block containing: `purpose`, `applies_when`, `token_cost` (integer heuristic using 4 chars per token), `last_updated` (YYYY-MM-DD), `supersedes` (path or null)",
16
+ "AI_CONTEXT.md.template no longer restates stack, package manager, or command tables; it links to `docs/PROJECT_MAP.md` for that information",
17
+ "CONTEXTO.md.template becomes a thin summary that links to AI_CONTEXT.md; existing CONTEXTO.md files in already-generated projects are preserved during migrate",
18
+ "STATUS.md.template stops restating stack or commands; it references PROJECT_MAP.md when needed",
19
+ "Implement a `writeFrontMatter(targetPath, fields)` helper in `src/create-quiver/lib/init-docs.js` that prepends or updates front-matter idempotently without duplicating the block",
20
+ "`supersedes` is populated with the path of the deprecated file when a file replaces another (for example CONTEXTO.md supersedes nothing, but AI_CONTEXT.md stops restating PROJECT_MAP and documents that in a comment)"
21
+ ],
22
+ "not_included": [
23
+ "Deleting AI_CONTEXT.md, CONTEXTO.md, or STATUS.md",
24
+ "Enforcing front-matter outside `docs/ai/`",
25
+ "Tokenizer-accurate token counting; the 4 chars per token heuristic is sufficient",
26
+ "Doctor warnings for missing front-matter (handled in slice-05)"
27
+ ],
28
+ "acceptance": [
29
+ "A freshly initialized project has YAML front-matter on every file directly under `docs/ai/` that is a Markdown file",
30
+ "Each front-matter block contains `purpose`, `applies_when`, `token_cost`, `last_updated`, `supersedes`",
31
+ "`grep -c 'Package manager' docs/PROJECT_MAP.md` returns at least 1 and no other generated file under `docs/` contains the phrase `Package manager:` as a content line",
32
+ "AI_CONTEXT.md contains a link to `docs/PROJECT_MAP.md`",
33
+ "Running init twice on the same directory does not produce duplicated front-matter blocks",
34
+ "Migrating a project generated before v14 adds front-matter to existing `docs/ai/` files idempotently"
35
+ ],
36
+ "files": [
37
+ "docs/AI_CONTEXT.md.template",
38
+ "docs/CONTEXTO.md.template",
39
+ "docs/STATUS.md.template",
40
+ "docs/QUICK.md.template",
41
+ "docs/STANDARD.md.template",
42
+ "docs/DEEP.md.template",
43
+ "src/create-quiver/lib/init-docs.js",
44
+ "scripts/init-docs.sh",
45
+ "specs/quiver-v14-tiered-context-pack/SPEC.md",
46
+ "specs/quiver-v14-tiered-context-pack/STATUS.md",
47
+ "specs/quiver-v14-tiered-context-pack/EVIDENCE_REPORT.md",
48
+ "specs/quiver-v14-tiered-context-pack/slices/slice-04-dedup-frontmatter/slice.json"
49
+ ],
50
+ "tests": [
51
+ "node bin/create-quiver.js --name \"Scratch\" --dir /tmp/quiver-v14-slice-04-smoke",
52
+ "head -n 1 /tmp/quiver-v14-slice-04-smoke/docs/ai/QUICK.md | grep -q '^---$'",
53
+ "head -n 1 /tmp/quiver-v14-slice-04-smoke/docs/ai/STANDARD.md | grep -q '^---$'",
54
+ "head -n 1 /tmp/quiver-v14-slice-04-smoke/docs/ai/DEEP.md | grep -q '^---$'",
55
+ "grep -q 'purpose:' /tmp/quiver-v14-slice-04-smoke/docs/ai/QUICK.md",
56
+ "grep -q 'applies_when:' /tmp/quiver-v14-slice-04-smoke/docs/ai/QUICK.md",
57
+ "grep -q 'token_cost:' /tmp/quiver-v14-slice-04-smoke/docs/ai/QUICK.md",
58
+ "node bin/create-quiver.js --name \"Scratch\" --dir /tmp/quiver-v14-slice-04-smoke -y",
59
+ "test \"$(grep -c '^purpose:' /tmp/quiver-v14-slice-04-smoke/docs/ai/QUICK.md)\" = \"1\"",
60
+ "test \"$(grep -r 'Package manager:' /tmp/quiver-v14-slice-04-smoke/docs | wc -l | tr -d ' ')\" = \"1\"",
61
+ "git diff --check"
62
+ ],
63
+ "documentation": [
64
+ "docs/AI_CONTEXT.md.template",
65
+ "docs/CONTEXTO.md.template",
66
+ "README_FOR_AI.md"
67
+ ],
68
+ "dependencies": [
69
+ "slice-01-tiered-context-pack"
70
+ ],
71
+ "assumptions": [
72
+ "A 4 chars per token heuristic is accurate enough for budget decisions; exact tokenization is not needed",
73
+ "Idempotent front-matter is preferable to regenerating the whole file, since users may edit the body",
74
+ "Linking between generated files is acceptable; agents handle Markdown links well"
75
+ ],
76
+ "estimated_hours": 4,
77
+ "actual_hours": 5,
78
+ "status": "completed",
79
+ "blocked_reason": null,
80
+ "ready_at": null,
81
+ "started_at": "2026-04-23",
82
+ "completed_at": "2026-04-23"
83
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "slice_id": "slice-05-doctor-smokes-tiered-pack",
3
+ "ticket": "QUIVER-05",
4
+ "type": "test",
5
+ "title": "Doctor and Smokes for Tiered Pack",
6
+ "objective": "Teach `doctor` to warn when the tiered pack drifts out of contract, and add CI smokes that cover the pack, AGENTS.md, ACTIVE_SLICE lifecycle, and deduplication.",
7
+ "description": "Slices 01-04 introduce new artifacts. Without validation, those artifacts silently decay: QUICK grows past 50 lines, front-matter fields disappear, ACTIVE_SLICE is left orphaned after cleanup, or stack duplication creeps back in. This slice adds lightweight checks in `doctor` and cross-platform smokes in CI so the contract stays enforced. This slice also absorbs the doctor and smoke assertions originally planned for v13 slice-04, which was removed during reconciliation.",
8
+ "git": {
9
+ "branch_type": "test",
10
+ "base_branch": "main",
11
+ "branch_slug": "doctor-smokes-tiered-pack",
12
+ "branch_name": "test/QUIVER-05-doctor-smokes-tiered-pack"
13
+ },
14
+ "must": [
15
+ "Extend `src/create-quiver/lib/doctor.js` (or the doctor logic in `src/create-quiver/index.js`) to print warnings when: QUICK.md exceeds 50 non-empty lines, STANDARD.md exceeds 300 non-empty lines, AGENTS.md is missing any of the six required sections, any file in `docs/ai/` is missing front-matter, `ACTIVE_SLICE.md` exists without any active worktree, or stack information appears in more than one generated file",
16
+ "Warnings are non-fatal: doctor still exits 0 when only warnings are present, and exits non-zero only for existing hard failures",
17
+ "Add a smoke script `scripts/ci/smoke-tiered-pack.sh` that: creates a scratch project, verifies tier files exist and meet size bounds, verifies AGENTS.md sections, runs start-slice and checks ACTIVE_SLICE.md, runs cleanup-slice and checks ACTIVE_SLICE.md is gone, and greps for duplicated stack info",
18
+ "Wire `scripts/ci/smoke-tiered-pack.sh` into the existing `smoke:create-quiver` package script or add a sibling `smoke:tiered-pack` script",
19
+ "Update `.github/workflows/ci.yml` so the new smoke runs on macOS, Linux, and Windows matrix entries",
20
+ "Smoke asserts that docs/DECISIONS.md exists in a freshly generated project",
21
+ "Smoke asserts that docs/PROJECT_MAP.md contains a Suggested Reading Order section",
22
+ "Smoke asserts that generated guidance names all four AI modes (onboarding, implementation, review, debug)",
23
+ "Update specs/[project-name]/EVIDENCE_REPORT.md.template guidance to prefer summarized command evidence (command, exit code, first relevant error, stacktrace, log path) over pasted long logs"
24
+ ],
25
+ "not_included": [
26
+ "New diagnostic commands (token-cost, diff-pack are deferred to v15)",
27
+ "Blocking doctor on warnings (they stay informational)",
28
+ "Replacing existing smokes"
29
+ ],
30
+ "acceptance": [
31
+ "Running `doctor` on a healthy v14-generated project prints zero warnings and exits 0",
32
+ "Running `doctor` on a project where QUICK.md has 60 non-empty lines prints a warning mentioning the 50-line budget",
33
+ "Running `doctor` on a project where AGENTS.md is missing the Reading Budget section prints a warning naming that section",
34
+ "Running `doctor` on a project where `docs/ai/STANDARD.md` has no front-matter prints a warning for that file",
35
+ "`smoke-tiered-pack.sh` exits 0 against a freshly generated project and non-zero when any check fails",
36
+ "CI matrix entries for macOS, Linux, and Windows execute the new smoke",
37
+ "Smoke fails if DECISIONS.md is missing after init",
38
+ "Smoke fails if PROJECT_MAP.md is missing the Suggested Reading Order section",
39
+ "Smoke fails if any of the four mode names is missing from generated guidance",
40
+ "Generated EVIDENCE_REPORT.md.template prefers summarized command evidence over long logs"
41
+ ],
42
+ "files": [
43
+ "src/create-quiver/lib/doctor.js",
44
+ "src/create-quiver/index.js",
45
+ "scripts/ci/smoke-tiered-pack.sh",
46
+ "package.json",
47
+ ".github/workflows/ci.yml",
48
+ "specs/[project-name]/EVIDENCE_REPORT.md.template",
49
+ "specs/quiver-v14-tiered-context-pack/SPEC.md",
50
+ "specs/quiver-v14-tiered-context-pack/STATUS.md",
51
+ "specs/quiver-v14-tiered-context-pack/EVIDENCE_REPORT.md",
52
+ "specs/quiver-v14-tiered-context-pack/slices/slice-05-doctor-smokes-tiered-pack/slice.json"
53
+ ],
54
+ "tests": [
55
+ "node bin/create-quiver.js --name \"Scratch\" --dir /tmp/quiver-v14-slice-05-smoke",
56
+ "node bin/create-quiver.js doctor --dir /tmp/quiver-v14-slice-05-smoke",
57
+ "bash scripts/ci/smoke-tiered-pack.sh",
58
+ "awk 'NR==1,/^---$/{next} /^---$/{exit} {print}' /tmp/quiver-v14-slice-05-smoke/docs/ai/QUICK.md > /dev/null",
59
+ "git diff --check"
60
+ ],
61
+ "documentation": [
62
+ "docs/TESTING_GUIDE_FOR_AI.md.template",
63
+ "README.md"
64
+ ],
65
+ "dependencies": [
66
+ "slice-01-tiered-context-pack",
67
+ "slice-02-agents-md-router",
68
+ "slice-03-active-slice-lifecycle",
69
+ "slice-04-dedup-frontmatter"
70
+ ],
71
+ "assumptions": [
72
+ "Warnings are more useful than hard failures for stylistic contracts; hard failures belong to migration and file presence checks",
73
+ "A single smoke script is easier to maintain than spreading the checks across the existing smokes",
74
+ "Cross-platform shell differences are already handled by the v12 CI matrix; the new smoke follows the same conventions"
75
+ ],
76
+ "estimated_hours": 4,
77
+ "actual_hours": null,
78
+ "status": "completed",
79
+ "blocked_reason": null,
80
+ "ready_at": null,
81
+ "started_at": "2026-04-23",
82
+ "completed_at": "2026-04-23",
83
+ "actual_hours": 5
84
+ }