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,78 @@
1
+ {
2
+ "slice_id": "slice-05-generated-project-scripts-and-migration",
3
+ "ticket": "QUIVER-05",
4
+ "type": "feature",
5
+ "title": "Generated Project Scripts and Migration",
6
+ "objective": "Update generated and migrated projects to use Node-native Quiver commands as the primary npm scripts.",
7
+ "description": "After Node-native lifecycle commands exist, generated projects should stop advertising Bash scripts as the primary workflow. This slice updates package templates, generated README content, migration behavior, and docs while preserving legacy script compatibility where useful.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "generated-scripts-migration",
12
+ "branch_name": "feature/QUIVER-05-generated-scripts-migration"
13
+ },
14
+ "must": [
15
+ "Update `package.template.json` scripts to call `create-quiver` commands",
16
+ "Update generated README and AI context commands to use Node-native commands",
17
+ "Teach `migrate` to add new npm scripts without deleting user scripts",
18
+ "Preserve legacy Bash script entries where needed with clear naming or documentation",
19
+ "Update doctor to recommend migration when generated scripts still only point to Bash",
20
+ "Add smokes for old projects migrated to Node-native npm scripts"
21
+ ],
22
+ "not_included": [
23
+ "Deleting legacy Bash scripts",
24
+ "Adding Windows CI matrix",
25
+ "Changing slice JSON schema",
26
+ "Publishing a release"
27
+ ],
28
+ "acceptance": [
29
+ "New projects include npm scripts that work without Bash",
30
+ "Existing projects gain Node-native scripts after `create-quiver migrate`",
31
+ "User-defined package scripts are preserved",
32
+ "Generated docs show `npx create-quiver start-slice`, `check-slice`, and `check-pr`",
33
+ "Doctor identifies projects that need script migration"
34
+ ],
35
+ "files": [
36
+ "package.template.json",
37
+ "package.json",
38
+ "README.md",
39
+ "README_FOR_AI.md",
40
+ "docs/AI_CONTEXT.md.template",
41
+ "docs/WORKFLOW.md.template",
42
+ "scripts/init-docs.sh",
43
+ "src/create-quiver/index.js",
44
+ "scripts/ci/smoke-init-docs.sh",
45
+ "scripts/ci/smoke-create-quiver.sh",
46
+ "scripts/package-quiver.sh",
47
+ "specs/quiver-v12-cross-platform-native-runtime/SPEC.md",
48
+ "specs/quiver-v12-cross-platform-native-runtime/STATUS.md",
49
+ "specs/quiver-v12-cross-platform-native-runtime/EVIDENCE_REPORT.md",
50
+ "specs/quiver-v12-cross-platform-native-runtime/slices/slice-05-generated-project-scripts-and-migration/slice.json"
51
+ ],
52
+ "tests": [
53
+ "node -c src/create-quiver/index.js",
54
+ "bash scripts/ci/smoke-init-docs.sh",
55
+ "bash scripts/ci/smoke-create-quiver.sh",
56
+ "bash scripts/package-quiver.sh",
57
+ "git diff --check"
58
+ ],
59
+ "documentation": [
60
+ "specs/quiver-v12-cross-platform-native-runtime/SPEC.md",
61
+ "specs/quiver-v12-cross-platform-native-runtime/STATUS.md",
62
+ "specs/quiver-v12-cross-platform-native-runtime/EVIDENCE_REPORT.md"
63
+ ],
64
+ "dependencies": [
65
+ "slice-04-node-slice-lifecycle-commands"
66
+ ],
67
+ "assumptions": [
68
+ "Project-local devDependency usage should remain supported",
69
+ "npx usage should remain the recommended first path"
70
+ ],
71
+ "estimated_hours": 5,
72
+ "actual_hours": null,
73
+ "status": "draft",
74
+ "blocked_reason": null,
75
+ "ready_at": null,
76
+ "started_at": null,
77
+ "completed_at": null
78
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "slice_id": "slice-06-cross-platform-ci-release-readiness",
3
+ "ticket": "QUIVER-06",
4
+ "type": "ci",
5
+ "title": "Cross-Platform CI and Release Readiness",
6
+ "objective": "Prove native behavior on Linux, macOS, and Windows before declaring Windows support complete.",
7
+ "description": "The runtime port should only be considered complete when CI exercises the generated project lifecycle on all supported operating systems. This slice adds cross-platform GitHub Actions coverage, final documentation updates, and release readiness evidence.",
8
+ "git": {
9
+ "branch_type": "ci",
10
+ "base_branch": "main",
11
+ "branch_slug": "cross-platform-ci-release-readiness",
12
+ "branch_name": "ci/QUIVER-06-cross-platform-ci-release-readiness"
13
+ },
14
+ "must": [
15
+ "Add or update GitHub Actions matrix for `ubuntu-latest`, `macos-latest`, and `windows-latest`",
16
+ "Run core Quiver smokes on each OS without Bash as the required path",
17
+ "Package and install the tarball in CI on each OS",
18
+ "Validate initialization, migration, analysis, doctor, and slice lifecycle commands",
19
+ "Update support matrix from target support to verified support when CI passes",
20
+ "Prepare release notes and evidence for the next package release"
21
+ ],
22
+ "not_included": [
23
+ "Publishing the npm package",
24
+ "Removing legacy Bash wrappers",
25
+ "Adding non-Git version control support"
26
+ ],
27
+ "acceptance": [
28
+ "CI passes on Linux, macOS, and Windows",
29
+ "Windows CI runs PowerShell or CMD commands without Bash",
30
+ "Packaged CLI works on all matrix OSes",
31
+ "Docs state Windows native support only after the matrix is green",
32
+ "Evidence report links or records all relevant CI validations"
33
+ ],
34
+ "files": [
35
+ ".github/workflows/ci.yml",
36
+ "README.md",
37
+ "README_FOR_AI.md",
38
+ "docs/SUPPORT_MATRIX.md.template",
39
+ "docs/TROUBLESHOOTING.md.template",
40
+ "CHANGELOG.md",
41
+ "scripts/ci/smoke-cross-platform.js",
42
+ "scripts/ci/smoke-create-quiver.sh",
43
+ "scripts/ci/smoke-workflow-gates.sh",
44
+ "specs/quiver-v12-cross-platform-native-runtime/SPEC.md",
45
+ "specs/quiver-v12-cross-platform-native-runtime/STATUS.md",
46
+ "specs/quiver-v12-cross-platform-native-runtime/EVIDENCE_REPORT.md",
47
+ "specs/quiver-v12-cross-platform-native-runtime/slices/slice-06-cross-platform-ci-release-readiness/slice.json"
48
+ ],
49
+ "tests": [
50
+ "GitHub Actions matrix on ubuntu-latest, macos-latest, and windows-latest",
51
+ "Node portable cross-platform smoke",
52
+ "bash scripts/package-quiver.sh",
53
+ "git diff --check"
54
+ ],
55
+ "documentation": [
56
+ "specs/quiver-v12-cross-platform-native-runtime/SPEC.md",
57
+ "specs/quiver-v12-cross-platform-native-runtime/STATUS.md",
58
+ "specs/quiver-v12-cross-platform-native-runtime/EVIDENCE_REPORT.md"
59
+ ],
60
+ "dependencies": [
61
+ "slice-05-generated-project-scripts-and-migration"
62
+ ],
63
+ "assumptions": [
64
+ "Windows support should not be declared final until CI proves the package path",
65
+ "Release publishing happens after this spec completes"
66
+ ],
67
+ "estimated_hours": 5,
68
+ "actual_hours": 5,
69
+ "status": "completed",
70
+ "blocked_reason": null,
71
+ "ready_at": "2026-04-22T00:00:00Z",
72
+ "started_at": "2026-04-22T00:00:00Z",
73
+ "completed_at": "2026-04-22T00:00:00Z"
74
+ }
@@ -0,0 +1,28 @@
1
+ # Quiver v0.13 Evidence Report
2
+
3
+ **Spec:** quiver-v13-token-efficient-ai-context
4
+ **Date:** 2026-04-23
5
+ **Status:** Draft
6
+
7
+ ## Summary
8
+
9
+ This spec will reduce AI token usage by improving Quiver's context contracts, generated prompts, analyzer map, and minimal doctor guidance without adding heavy retrieval infrastructure.
10
+
11
+ ## Slice Evidence
12
+
13
+ | Slice | Status | Evidence |
14
+ |-------|--------|----------|
15
+ | slice-01 | Completed | README_FOR_AI.md, AI_ONBOARDING_PROMPT.md.template, WORKFLOW.md.template, and GITFLOW_PR_GUIDE.md.template now name onboarding, implementation, review, and debugging modes explicitly |
16
+ | slice-02 | Completed | docs/DECISIONS.md.template added; docs/INDEX.md.template, README guidance, AI context, workflow, and PR guide now link or route to the decision log |
17
+ | slice-03 | Completed | create-quiver analyze now writes Suggested Reading Order, Entry Points, Primary Config Files, Likely Test Commands, High-Signal Files, and Do Not Read First sections into PROJECT_MAP.md |
18
+
19
+ ## Required Final Evidence
20
+
21
+ - Generated docs include the four token-efficient modes
22
+ - Generated `docs/DECISIONS.md` exists and is linked from the docs index
23
+ - Generated `docs/PROJECT_MAP.md` includes suggested reading order and high-signal files
24
+ - Review guidance instructs agents to inspect `git diff` before opening full files
25
+ - Implementation guidance instructs agents to start from `slice.json` and declared files
26
+ - Debug guidance preserves command, exit code, first relevant error, stacktrace, and log path when available
27
+ - `doctor` prints a concise token-efficient next step after analysis succeeds
28
+ - Smokes validate the new generated artifacts and key sections
@@ -0,0 +1,68 @@
1
+ # Quiver v0.13 - Token-Efficient AI Context
2
+
3
+ **Date:** 2026-04-23
4
+ **Status:** Draft
5
+
6
+ Slice numbering resets here: this spec starts at `slice-01` and does not continue any previous spec's numbering.
7
+
8
+ ## Objective
9
+
10
+ Reduce AI token usage in Quiver workflows by making the generated context, prompts, analyzer output, and doctor guidance more selective, structured, and mode-aware without adding heavyweight retrieval infrastructure.
11
+
12
+ ## Scope
13
+
14
+ ### Included
15
+
16
+ - Define token-efficient AI work modes for onboarding, implementation, review, and debugging
17
+ - Teach generated prompts to prefer maps, metadata, diffs, and scoped files before full source reads
18
+ - Add a lightweight decision log contract
19
+ - Improve `PROJECT_MAP.md` so it becomes the first useful reading index for AI agents
20
+ - Preserve the existing spec/slice workflow and one commit per slice discipline
21
+ - Add smoke coverage for the generated token-efficiency artifacts and guidance
22
+
23
+ ### Excluded
24
+
25
+ - Embeddings, vector databases, or mandatory semantic indexes
26
+ - Automatic multi-language call graph generation
27
+ - Automatic memory pruning without human review
28
+ - Exact token counting or provider-specific billing integrations
29
+ - A new orchestration command such as `create-quiver context`
30
+
31
+ ## Token-Efficient Modes
32
+
33
+ Quiver should guide AI agents differently depending on the task:
34
+
35
+ - **Onboarding:** read `docs/PROJECT_MAP.md`, `docs/AI_CONTEXT.md`, and `docs/AI_ONBOARDING_PROMPT.md` before source files
36
+ - **Implementation:** read `slice.json`, declared files, nearby tests, and only then adjacent source
37
+ - **Review:** inspect `git diff` and declared slice scope before full files
38
+ - **Debug:** inspect the command, exit code, first relevant error, stacktrace, and nearest changed code before long logs
39
+
40
+ ## Principles
41
+
42
+ - Prefer durable project context over repeated chat history
43
+ - Prefer deltas over full files when reviewing or iterating
44
+ - Prefer summaries with evidence over pasted logs
45
+ - Keep new artifacts few, useful, and easy to maintain
46
+ - Make analyzer output more valuable before adding infrastructure
47
+
48
+ ## Slices
49
+
50
+ | Slice | Title | Status | Spec |
51
+ |-------|-------|--------|------|
52
+ | 01 | Token-Efficient AI Modes Guidance | Completed | [slice-01](./slices/slice-01-token-efficient-ai-modes-guidance/slice.json) |
53
+ | 02 | Decision Log | Completed | [slice-02](./slices/slice-02-decision-log-context-checkpoint/slice.json) |
54
+ | 03 | Project Map Reading Order | Completed | [slice-03](./slices/slice-03-project-map-reading-order/slice.json) |
55
+
56
+ ## Definition of Done
57
+
58
+ - Generated projects document mode-aware AI reading rules
59
+ - Generated projects include `docs/DECISIONS.md`
60
+ - `create-quiver analyze` writes a `PROJECT_MAP.md` with suggested reading order and high-signal files
61
+ - `doctor` gives a minimal token-efficient next step without becoming noisy
62
+ - Smokes verify the generated artifacts and key sections
63
+
64
+ ## Relationship to v14
65
+
66
+ - v13 slice-02 is narrowed to `DECISIONS.md` only; assumptions and context-efficiency content are produced by v14 slice-01 in `docs/ai/DEEP.md`
67
+ - v13 slice-04 was absorbed into v14 slice-05; doctor warnings and smoke assertions for token-efficiency artifacts live there now
68
+ - Recommended execution order: v13 slice-01 -> v13 slice-02 (narrowed) -> v13 slice-03 -> v14 slice-01 -> v14 slice-02 -> v14 slice-03 -> v14 slice-04 -> v14 slice-05
@@ -0,0 +1,26 @@
1
+ # Quiver v0.13 Spec Status
2
+
3
+ **Spec:** quiver-v13-token-efficient-ai-context
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 | Token-Efficient AI Modes Guidance | Completed | - | 3 | 3 |
13
+ | slice-02 | Decision Log | Completed | - | 2 | 2 |
14
+ | slice-03 | Project Map Reading Order | Completed | - | 5 | 5 |
15
+
16
+ ## Progress
17
+
18
+ - Completed slices: 3 / 3
19
+ - Estimated hours: 10
20
+ - Actual hours: 10
21
+
22
+ ## Blockers
23
+
24
+ | Slice | Blocker | Since | Action needed |
25
+ |-------|---------|-------|---------------|
26
+ | - | - | - | - |
@@ -0,0 +1,65 @@
1
+ {
2
+ "slice_id": "slice-01-token-efficient-ai-modes-guidance",
3
+ "ticket": "QUIVER-01",
4
+ "type": "docs",
5
+ "title": "Token-Efficient AI Modes Guidance",
6
+ "objective": "Define mode-aware AI reading rules so agents spend tokens on the right artifacts for onboarding, implementation, review, and debugging.",
7
+ "description": "The current AI guidance encourages structured onboarding, but it does not clearly separate when to use map-first, slice-scope-first, diff-first, or error-first workflows. This slice makes those modes explicit in the generated guidance without introducing new runtime behavior.",
8
+ "git": {
9
+ "branch_type": "docs",
10
+ "base_branch": "main",
11
+ "branch_slug": "token-efficient-ai-modes-guidance",
12
+ "branch_name": "docs/QUIVER-01-token-efficient-ai-modes-guidance"
13
+ },
14
+ "must": [
15
+ "Document the four AI work modes: onboarding, implementation, review, and debugging",
16
+ "Update `README_FOR_AI.md` with token-efficient reading rules",
17
+ "Update `docs/AI_ONBOARDING_PROMPT.md.template` to start from maps and metadata before source files",
18
+ "Update `docs/WORKFLOW.md.template` with mode-aware context selection",
19
+ "Update `docs/GITFLOW_PR_GUIDE.md.template` with diff-first review guidance"
20
+ ],
21
+ "not_included": [
22
+ "Adding new generated files",
23
+ "Changing analyzer output",
24
+ "Changing doctor output",
25
+ "Adding semantic search or embeddings"
26
+ ],
27
+ "acceptance": [
28
+ "AI guidance names all four modes explicitly",
29
+ "Review guidance instructs agents to inspect `git diff` before opening full files",
30
+ "Implementation guidance instructs agents to start from `slice.json` and declared files",
31
+ "Debug guidance preserves command, exit code, first relevant error, stacktrace, and log path when available"
32
+ ],
33
+ "files": [
34
+ "README_FOR_AI.md",
35
+ "docs/AI_ONBOARDING_PROMPT.md.template",
36
+ "docs/WORKFLOW.md.template",
37
+ "docs/GITFLOW_PR_GUIDE.md.template",
38
+ "specs/quiver-v13-token-efficient-ai-context/SPEC.md",
39
+ "specs/quiver-v13-token-efficient-ai-context/STATUS.md",
40
+ "specs/quiver-v13-token-efficient-ai-context/EVIDENCE_REPORT.md",
41
+ "specs/quiver-v13-token-efficient-ai-context/slices/slice-01-token-efficient-ai-modes-guidance/slice.json"
42
+ ],
43
+ "tests": [
44
+ "rg check for onboarding, implementation, review, and debugging modes",
45
+ "git diff --check"
46
+ ],
47
+ "documentation": [
48
+ "README_FOR_AI.md",
49
+ "docs/AI_ONBOARDING_PROMPT.md.template",
50
+ "docs/WORKFLOW.md.template",
51
+ "docs/GITFLOW_PR_GUIDE.md.template"
52
+ ],
53
+ "dependencies": [],
54
+ "assumptions": [
55
+ "Mode-aware guidance is more useful than one generic token-efficiency checklist",
56
+ "Detailed enforcement can wait until the generated artifacts exist"
57
+ ],
58
+ "estimated_hours": 3,
59
+ "actual_hours": 3,
60
+ "status": "completed",
61
+ "blocked_reason": null,
62
+ "ready_at": null,
63
+ "started_at": null,
64
+ "completed_at": "2026-04-23"
65
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "slice_id": "slice-02-decision-log-context-checkpoint",
3
+ "ticket": "QUIVER-02",
4
+ "type": "docs",
5
+ "title": "Decision Log",
6
+ "objective": "Add a durable decision log so AI agents do not re-litigate past decisions.",
7
+ "description": "Quiver already externalizes project context, but it lacks a dedicated decision log. This slice adds that one durable artifact; assumptions and context-efficiency notes are handled by the tiered context pack in v14 instead.",
8
+ "git": {
9
+ "branch_type": "docs",
10
+ "base_branch": "main",
11
+ "branch_slug": "decision-log-context-checkpoint",
12
+ "branch_name": "docs/QUIVER-02-decision-log-context-checkpoint"
13
+ },
14
+ "must": [
15
+ "Add `docs/DECISIONS.md.template` with a compact decision log table",
16
+ "Generate `docs/DECISIONS.md` during init and migration",
17
+ "Link `docs/DECISIONS.md` from `docs/INDEX.md.template` and generated README guidance where appropriate"
18
+ ],
19
+ "not_included": [
20
+ "Creating a separate assumptions file",
21
+ "Automatic decision extraction",
22
+ "Token counting",
23
+ "Deleting existing context sections"
24
+ ],
25
+ "acceptance": [
26
+ "New projects contain `docs/DECISIONS.md`",
27
+ "Migration adds `docs/DECISIONS.md` without overwriting existing docs",
28
+ "Existing user package scripts and docs are preserved during migration"
29
+ ],
30
+ "files": [
31
+ "docs/DECISIONS.md.template",
32
+ "docs/INDEX.md.template",
33
+ "scripts/init-docs.sh",
34
+ "src/create-quiver/lib/init-docs.js",
35
+ "scripts/ci/smoke-init-docs.sh",
36
+ "scripts/ci/smoke-create-quiver.sh",
37
+ "scripts/package-quiver.sh",
38
+ "specs/quiver-v13-token-efficient-ai-context/SPEC.md",
39
+ "specs/quiver-v13-token-efficient-ai-context/EVIDENCE_REPORT.md",
40
+ "specs/quiver-v13-token-efficient-ai-context/slices/slice-02-decision-log-context-checkpoint/slice.json"
41
+ ],
42
+ "tests": [
43
+ "bash scripts/ci/smoke-init-docs.sh",
44
+ "bash scripts/ci/smoke-create-quiver.sh",
45
+ "bash scripts/package-quiver.sh",
46
+ "git diff --check"
47
+ ],
48
+ "documentation": [
49
+ "docs/DECISIONS.md.template"
50
+ ],
51
+ "dependencies": [
52
+ "slice-01-token-efficient-ai-modes-guidance"
53
+ ],
54
+ "assumptions": [
55
+ "A single decision log is enough for now"
56
+ ],
57
+ "estimated_hours": 2,
58
+ "actual_hours": 2,
59
+ "status": "completed",
60
+ "blocked_reason": null,
61
+ "ready_at": null,
62
+ "started_at": null,
63
+ "completed_at": "2026-04-23"
64
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "slice_id": "slice-03-project-map-reading-order",
3
+ "ticket": "QUIVER-03",
4
+ "type": "feature",
5
+ "title": "Project Map Reading Order",
6
+ "objective": "Improve `create-quiver analyze` so `docs/PROJECT_MAP.md` becomes a practical first-read index for AI agents.",
7
+ "description": "The highest token savings come from a better project map. This slice enriches analyzer output with a suggested reading order, entry points, primary config files, likely test commands, high-signal files, and paths that should not be read first.",
8
+ "git": {
9
+ "branch_type": "feature",
10
+ "base_branch": "main",
11
+ "branch_slug": "project-map-reading-order",
12
+ "branch_name": "feature/QUIVER-03-project-map-reading-order"
13
+ },
14
+ "must": [
15
+ "Add `Suggested Reading Order` to generated `docs/PROJECT_MAP.md`",
16
+ "Add `Entry Points` to generated `docs/PROJECT_MAP.md`",
17
+ "Add `Primary Config Files` to generated `docs/PROJECT_MAP.md`",
18
+ "Add `Likely Test Commands` to generated `docs/PROJECT_MAP.md`",
19
+ "Add `High-Signal Files` and `Do Not Read First` sections",
20
+ "Keep analyzer secret-safe and avoid reading secret file contents"
21
+ ],
22
+ "not_included": [
23
+ "Embeddings",
24
+ "Vector databases",
25
+ "Multi-language AST call graph",
26
+ "Provider-specific token accounting"
27
+ ],
28
+ "acceptance": [
29
+ "`create-quiver analyze` creates `PROJECT_MAP.md` with all new sections",
30
+ "`PROJECT_SCAN.json` remains parseable and backward-compatible for existing fields",
31
+ "The analyzer continues to skip secrets, dependency folders, build outputs, and generated heavy paths",
32
+ "Smokes validate the new map sections"
33
+ ],
34
+ "files": [
35
+ "src/create-quiver/lib/analyze.js",
36
+ "scripts/ci/smoke-create-quiver.sh",
37
+ "scripts/ci/smoke-cross-platform.js",
38
+ "specs/quiver-v13-token-efficient-ai-context/SPEC.md",
39
+ "specs/quiver-v13-token-efficient-ai-context/STATUS.md",
40
+ "specs/quiver-v13-token-efficient-ai-context/EVIDENCE_REPORT.md",
41
+ "specs/quiver-v13-token-efficient-ai-context/slices/slice-03-project-map-reading-order/slice.json"
42
+ ],
43
+ "tests": [
44
+ "node -c src/create-quiver/lib/analyze.js",
45
+ "bash scripts/ci/smoke-create-quiver.sh",
46
+ "node scripts/ci/smoke-cross-platform.js",
47
+ "git diff --check"
48
+ ],
49
+ "documentation": [
50
+ "docs/PROJECT_MAP.md generated output contract"
51
+ ],
52
+ "dependencies": [
53
+ "slice-02-decision-log-context-checkpoint"
54
+ ],
55
+ "assumptions": [
56
+ "Better map quality saves more tokens than adding retrieval infrastructure at this stage",
57
+ "Heuristics are acceptable as long as they are conservative and transparent"
58
+ ],
59
+ "estimated_hours": 5,
60
+ "actual_hours": 5,
61
+ "status": "completed",
62
+ "blocked_reason": null,
63
+ "ready_at": null,
64
+ "started_at": null,
65
+ "completed_at": "2026-04-23"
66
+ }
@@ -0,0 +1,42 @@
1
+ # Quiver v0.14 Evidence Report
2
+
3
+ **Spec:** quiver-v14-tiered-context-pack
4
+ **Date:** 2026-04-23
5
+ **Status:** Completed
6
+
7
+ ## Summary
8
+
9
+ This spec materializes the v13 token-efficient modes into concrete, stratified artifacts. A freshly generated project gets a three-tier context pack (QUICK, STANDARD, DEEP), a single `AGENTS.md` router, an auto-generated `ACTIVE_SLICE.md` during slice work, structured YAML front-matter on every context file, and deduplicated stack information so only `PROJECT_MAP.md` owns that data.
10
+
11
+ The primary measurable outcome is a reduction in default token loadout for execution-mode tasks from roughly 8k tokens (reading the current flat pack) to under 1k tokens (reading only QUICK + ACTIVE_SLICE).
12
+
13
+ ## Slice Evidence
14
+
15
+ | Slice | Status | Evidence |
16
+ |-------|--------|----------|
17
+ | slice-01 | Completed | `docs/QUICK.md.template`, `docs/STANDARD.md.template`, and `docs/DEEP.md.template` now exist; init and migrate render them into `docs/ai/QUICK.md`, `docs/ai/STANDARD.md`, and `docs/ai/DEEP.md`; `docs/INDEX.md.template` links to the new tiers |
18
+ | slice-02 | Completed | Root `AGENTS.md.template` now exists; init and migrate render `AGENTS.md` at the project root and preserve an existing file on rerun; generated README and `README_FOR_AI.md` now point agents to `AGENTS.md` first; doctor and smokes validate the new router |
19
+ | slice-03 | Completed | `docs/ai/ACTIVE_SLICE.md` is created by `start-slice`, rewritten when a stale active brief exists, and removed by `cleanup-slice`; `WORKTREE_CONTEXT.md` now points to the active brief path; legacy Bash wrappers delegate to the Node CLI |
20
+ | slice-04 | Completed | Front-matter helper added in `src/create-quiver/lib/init-docs.js`; generated context docs now get YAML front matter idempotently; `docs/AI_CONTEXT.md`, `docs/CONTEXTO.md`, `docs/STATUS.md`, `docs/WORKFLOW.md`, `docs/AI_ONBOARDING_PROMPT.md`, `docs/ai/QUICK.md`, `docs/ai/STANDARD.md`, `docs/ai/DEEP.md`, `docs/ai/LESSONS.md`, and `docs/ai/PRINCIPLES.md` are validated; `docs/PROJECT_MAP.md` is now the only generated file carrying the package manager/command surface |
21
+ | slice-05 | Completed | `src/create-quiver/lib/doctor.js` now warns on oversize QUICK/STANDARD files, missing AGENTS sections, missing front matter, orphaned ACTIVE_SLICE briefs, and duplicated stack info; `scripts/ci/smoke-tiered-pack.sh` validates the tiered pack, lifecycle, and warning scenarios; CI matrix now runs the new smoke on macOS, Linux, and Windows; `specs/[project-name]/EVIDENCE_REPORT.md.template` now asks for summarized evidence |
22
+
23
+ ## Required Final Evidence
24
+
25
+ - A freshly generated project contains `docs/ai/QUICK.md`, `docs/ai/STANDARD.md`, `docs/ai/DEEP.md`, and root `AGENTS.md`
26
+ - `docs/ai/QUICK.md` is ≤ 50 lines, `docs/ai/STANDARD.md` is ≤ 300 lines
27
+ - `AGENTS.md` declares: reading budget per task mode, output policy forbidding restating and summarizing, and routing rules pointing to QUICK first
28
+ - Running `start-slice <slice.json>` creates `docs/ai/ACTIVE_SLICE.md` with objective, allowed_files, tests, DoD, and prohibition clause
29
+ - Running `cleanup-slice <slice.json>` removes `docs/ai/ACTIVE_SLICE.md`
30
+ - Every file in `docs/ai/` declares YAML front-matter with `purpose`, `applies_when`, `token_cost`, `last_updated`, and `supersedes`
31
+ - `PROJECT_MAP.md` is the only generated file containing the detected stack table and command table
32
+ - `doctor` prints warnings when QUICK exceeds 50 lines, STANDARD exceeds 300 lines, or any `docs/ai/` file is missing front-matter
33
+ - Smoke tests in CI verify tier bounds, AGENTS.md required sections, ACTIVE_SLICE lifecycle, and absence of duplicated stack information across context files
34
+ - Smoke tests also verify that `docs/DECISIONS.md` exists, that `PROJECT_MAP.md` includes a `Suggested Reading Order` section, that generated guidance names all four AI modes, and that `EVIDENCE_REPORT.md.template` prefers summarized command evidence over pasted long logs
35
+ - `migrate` on a project generated before v14 adds the new artifacts additively without deleting or overwriting existing content
36
+
37
+ ## Validation Checkpoint (Post-Merge)
38
+
39
+ - The maintainer uses v14 in at least one real project for at least one week
40
+ - A before/after measurement of execution-mode token loadout is recorded (heuristic: 4 chars per token)
41
+ - At least one external user installs the tiered pack and reports whether it helps or adds friction
42
+ - Decision to scope v15 is made based on this evidence, not on the original plan
@@ -0,0 +1,116 @@
1
+ # Quiver v0.14 - Tiered Context Pack
2
+
3
+ **Date:** 2026-04-22
4
+ **Status:** Completed
5
+
6
+ Slice numbering resets here: this spec starts at `slice-01` and does not continue any previous spec's numbering.
7
+
8
+ ## Objective
9
+
10
+ Restructure the generated AI context pack so execution-oriented models (Sonnet, GPT-5.4 Mini, Qwen Code) can operate with a minimal, predictable token footprint, while planning-oriented models (Opus, GPT-5.4) can still opt into deeper context when needed. Do this without adding retrieval infrastructure or model-specific adapters.
11
+
12
+ ## Context
13
+
14
+ v13 introduces token-efficient AI modes as guidance, but leaves context artifacts flat and undifferentiated. In a typical execution session a model still loads several hundred lines of `AI_CONTEXT.md`, `CONTEXTO.md`, and `WORKFLOW.md` even when it only needs the active slice boundaries. This spec turns the mode guidance into concrete, stratified artifacts that agents can load selectively.
15
+
16
+ This spec is the operational counterpart to v13: v13 defined the modes, v14 materializes the pack that each mode consumes.
17
+
18
+ ## Scope
19
+
20
+ ### Included
21
+
22
+ - Generate a three-tier context pack: `docs/ai/QUICK.md` (≤50 lines), `docs/ai/STANDARD.md` (≤300 lines), `docs/ai/DEEP.md` (unbounded)
23
+ - Generate a single root `AGENTS.md` that routes agents to the appropriate tier and declares a reading budget and output policy
24
+ - Auto-generate `docs/ai/ACTIVE_SLICE.md` on `start-slice` and remove it on `cleanup-slice`
25
+ - Add structured YAML front-matter (`purpose`, `applies_when`, `token_cost`, `supersedes`, `last_updated`) to every generated context file
26
+ - Deduplicate stack and command information so a single file is authoritative (`PROJECT_MAP.md` owns stack/commands; other files link to it)
27
+ - Add `doctor` warnings and smoke tests that verify the pack is well-formed
28
+ - Preserve backward compatibility: existing templates stay generated, but consolidated via links instead of duplication
29
+
30
+ ### Excluded
31
+
32
+ - A new `token-cost` diagnostic command (deferred to v15)
33
+ - A `diff-pack` command (deferred to v15)
34
+ - Model-specific adapters such as `.cursorrules` or `copilot-instructions.md` (only AGENTS.md for now)
35
+ - Exact tokenizer-aware counting (estimates only, via heuristic)
36
+ - Embeddings, vector search, or retrieval augmentation
37
+ - Automatic pruning of context without human review
38
+ - A new orchestration command such as `create-quiver context`
39
+
40
+ ## Tiered Context Pack
41
+
42
+ Quiver will generate three tiers, each with a bounded purpose:
43
+
44
+ - **QUICK (`docs/ai/QUICK.md`, ≤50 lines):** the minimum viable briefing. Stack, primary commands, hard rules, pointer to STANDARD and DEEP. Targeted at execution models that must start acting in under 2k tokens.
45
+ - **STANDARD (`docs/ai/STANDARD.md`, ≤300 lines):** conventions, workflow overview, testing expectations, mode guidance from v13, links to slice lifecycle. Targeted at mid-sized tasks and default planning.
46
+ - **DEEP (`docs/ai/DEEP.md`, unbounded):** project history, past decisions, cultural context, legacy notes. Targeted at planning models that explicitly need depth.
47
+
48
+ AGENTS.md is the router: every agent reads AGENTS.md first, and AGENTS.md decides which tier to load based on declared task mode.
49
+
50
+ ## Active Slice Contract
51
+
52
+ `start-slice` will generate `docs/ai/ACTIVE_SLICE.md` containing, in order:
53
+
54
+ 1. Slice objective (one line)
55
+ 2. `allowed_files` (verbatim from slice.json)
56
+ 3. Validation commands (from slice.json `tests`)
57
+ 4. Definition of Done checklist (from slice.json `acceptance`)
58
+ 5. Explicit prohibition against editing files outside `allowed_files`
59
+
60
+ `cleanup-slice` will remove `docs/ai/ACTIVE_SLICE.md` as part of the existing cleanup lifecycle. AGENTS.md will instruct agents: when ACTIVE_SLICE.md exists, it is the single source of truth for execution — do not read SPEC.md unless ACTIVE_SLICE.md points to it.
61
+
62
+ ## Deduplication Contract
63
+
64
+ - `docs/PROJECT_MAP.md` remains the single authoritative source for detected stack, package manager, commands, and structure.
65
+ - `docs/AI_CONTEXT.md` stops repeating that information and links to PROJECT_MAP.md instead.
66
+ - `docs/CONTEXTO.md` becomes a thin alias/summary that links to AI_CONTEXT.md for new projects. Existing generated `CONTEXTO.md` files are preserved on migration.
67
+ - Every generated context file declares a `supersedes` field in its front-matter when it replaces another file, so agents can follow the chain without guessing.
68
+
69
+ ## Front-Matter Contract
70
+
71
+ Every file in `docs/ai/` and the generated context pack carries this YAML header:
72
+
73
+ ```yaml
74
+ ---
75
+ purpose: <one-line description of what the file is for>
76
+ applies_when: <task modes or conditions where this file is relevant>
77
+ token_cost: <integer, heuristic estimate at generation time>
78
+ last_updated: <YYYY-MM-DD>
79
+ supersedes: <path or null>
80
+ ---
81
+ ```
82
+
83
+ This lets agents skip files without reading the body.
84
+
85
+ ## Principles
86
+
87
+ - The default loadout for execution tasks should fit in under 1000 estimated tokens
88
+ - Tiers should never duplicate each other; deeper tiers only add, never restate
89
+ - AGENTS.md must declare an explicit reading budget per mode and an anti-verbosity output policy
90
+ - Generated artifacts should be few, bounded, and easy to maintain
91
+ - Backward compatibility over aggressive cleanup: deprecate silently via `supersedes`, do not delete
92
+
93
+ ## Slices
94
+
95
+ | Slice | Title | Status | Spec |
96
+ |-------|-------|--------|------|
97
+ | 01 | Tiered Context Pack | Completed | [slice-01](./slices/slice-01-tiered-context-pack/slice.json) |
98
+ | 02 | AGENTS.md Router | Completed | [slice-02](./slices/slice-02-agents-md-router/slice.json) |
99
+ | 03 | Active Slice Lifecycle | Completed | [slice-03](./slices/slice-03-active-slice-lifecycle/slice.json) |
100
+ | 04 | Dedup and Front-Matter | Completed | [slice-04](./slices/slice-04-dedup-frontmatter/slice.json) |
101
+ | 05 | Doctor and Smokes for Tiered Pack | Completed | [slice-05](./slices/slice-05-doctor-smokes-tiered-pack/slice.json) |
102
+
103
+ ## Definition of Done
104
+
105
+ - A freshly generated project contains `docs/ai/QUICK.md`, `docs/ai/STANDARD.md`, `docs/ai/DEEP.md`, and root `AGENTS.md`
106
+ - `start-slice` creates `docs/ai/ACTIVE_SLICE.md` and `cleanup-slice` removes it
107
+ - AGENTS.md declares a reading budget, an output policy, and points to QUICK first
108
+ - Every file in `docs/ai/` has valid YAML front-matter with the five declared fields
109
+ - `PROJECT_MAP.md` is the only generated file that lists stack and commands; other files link to it
110
+ - `doctor` warns when QUICK exceeds 50 lines, STANDARD exceeds 300 lines, or a context file is missing front-matter
111
+ - Smoke tests verify tier bounds, AGENTS.md sections, ACTIVE_SLICE creation and cleanup, and no duplicated stack data across files
112
+ - Backward compatibility: existing projects running `migrate` gain the new artifacts without losing existing content
113
+
114
+ ## Validation Checkpoint
115
+
116
+ Before v15 is scoped, v14 must be used in at least one real project for at least one week, with a measurable reduction in execution-mode token loadout (before vs. after). If measurement is inconclusive or the tiered pack adds more friction than value, v15 is rescoped before it is written.