@thebassclef/lite 1.0.3 → 1.1.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 (275) hide show
  1. package/dist/cli.cjs +92 -6
  2. package/dist/cli.js +92 -6
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lite/.claude/agents/architect.md +70 -0
  7. package/dist/lite/.claude/agents/builder.md +114 -0
  8. package/dist/lite/.claude/agents/designer.md +156 -0
  9. package/dist/lite/.claude/agents/reviewer.md +88 -0
  10. package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
  11. package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
  12. package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
  13. package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
  14. package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
  15. package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
  16. package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
  17. package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
  18. package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
  19. package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
  20. package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
  21. package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
  22. package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
  23. package/dist/lite/.claude/luminaries/don-norman.md +173 -0
  24. package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
  25. package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
  26. package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
  27. package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
  28. package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
  29. package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
  30. package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
  31. package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
  32. package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
  33. package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
  34. package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
  35. package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
  36. package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
  37. package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
  38. package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
  39. package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
  40. package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
  41. package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
  42. package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
  43. package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
  44. package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
  45. package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
  46. package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
  47. package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
  48. package/dist/lite/.claude/rules/adr-discipline.md +96 -0
  49. package/dist/lite/.claude/rules/api-conventions.md +115 -0
  50. package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
  51. package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
  52. package/dist/lite/.claude/rules/blocked-items.md +139 -0
  53. package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
  54. package/dist/lite/.claude/rules/branching.md +28 -0
  55. package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
  56. package/dist/lite/.claude/rules/commit-conventions.md +22 -0
  57. package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
  58. package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
  59. package/dist/lite/.claude/rules/context-engineering.md +155 -0
  60. package/dist/lite/.claude/rules/context-management.md +85 -0
  61. package/dist/lite/.claude/rules/defensive-bash.md +52 -0
  62. package/dist/lite/.claude/rules/deferred-actions.md +233 -0
  63. package/dist/lite/.claude/rules/destructive-operations.md +69 -0
  64. package/dist/lite/.claude/rules/diagnosis.md +38 -0
  65. package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
  66. package/dist/lite/.claude/rules/guardrails.md +73 -0
  67. package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
  68. package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
  69. package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
  70. package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
  71. package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
  72. package/dist/lite/.claude/rules/loop-discipline.md +71 -0
  73. package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
  74. package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
  75. package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
  76. package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
  77. package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
  78. package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
  79. package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
  80. package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
  81. package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
  82. package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
  83. package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
  84. package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
  85. package/dist/lite/.claude/rules/pr-strategy.md +142 -0
  86. package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
  87. package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
  88. package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
  89. package/dist/lite/.claude/rules/schema-management.md +42 -0
  90. package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
  91. package/dist/lite/.claude/rules/security.md +37 -0
  92. package/dist/lite/.claude/rules/session-artifacts.md +236 -0
  93. package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
  94. package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
  95. package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
  96. package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
  97. package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
  98. package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
  99. package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
  100. package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
  101. package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
  102. package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
  103. package/dist/lite/.claude/rules/testing.md +38 -0
  104. package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
  105. package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
  106. package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
  107. package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
  108. package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
  109. package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
  110. package/dist/lite/.claude/skills/build/SKILL.md +640 -0
  111. package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
  112. package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
  113. package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
  114. package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
  115. package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
  116. package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
  117. package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
  118. package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
  119. package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
  120. package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
  121. package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
  122. package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
  123. package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
  124. package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
  125. package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
  126. package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
  127. package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
  128. package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
  129. package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
  130. package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
  131. package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
  132. package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
  133. package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
  134. package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
  135. package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
  136. package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
  137. package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
  138. package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
  139. package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
  140. package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
  141. package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
  142. package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
  143. package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
  144. package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
  145. package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
  146. package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
  147. package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
  148. package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
  149. package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
  150. package/dist/lite/AGENTS.md +79 -0
  151. package/dist/lite/CLAUDE-lite.md +85 -0
  152. package/dist/lite/CODE_OF_CONDUCT.md +28 -0
  153. package/dist/lite/CONTRIBUTING.md +177 -0
  154. package/dist/lite/README.md +173 -0
  155. package/dist/lite/SECURITY.md +19 -0
  156. package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
  157. package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
  158. package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
  159. package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
  160. package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
  161. package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
  162. package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
  163. package/dist/lite/lib/code-comment-discipline.sh +144 -0
  164. package/dist/lite/lib/composer-preflight.sh +459 -0
  165. package/dist/lite/lib/deferred-actions.sh +146 -0
  166. package/dist/lite/lib/hook-header-parser.sh +61 -0
  167. package/dist/lite/lib/hook-heartbeat.sh +152 -0
  168. package/dist/lite/lib/hook-inject.sh +255 -0
  169. package/dist/lite/lib/hook-installer.sh +195 -0
  170. package/dist/lite/lib/luminary-pick.sh +96 -0
  171. package/dist/lite/lib/output-discipline.sh +143 -0
  172. package/dist/lite/lib/prose-scan-boundary.sh +171 -0
  173. package/dist/lite/lib/rewrite-check.sh +214 -0
  174. package/dist/lite/lib/session-rescue.sh +151 -0
  175. package/dist/lite/lib/source-graph-walker.sh +277 -0
  176. package/dist/lite/lib/state.sh +1372 -0
  177. package/dist/lite/lib/telemetry.sh +205 -0
  178. package/dist/lite/lib/tier-check.sh +187 -0
  179. package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
  180. package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
  181. package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
  182. package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
  183. package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
  184. package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
  185. package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
  186. package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
  187. package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
  188. package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
  189. package/dist/lite/scripts/intent-drift-check.sh +456 -0
  190. package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
  191. package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
  192. package/dist/lite/standards/adr-template.md +86 -0
  193. package/dist/lite/standards/api-conventions/nextjs.md +84 -0
  194. package/dist/lite/standards/artifact-composition.md +209 -0
  195. package/dist/lite/standards/bash-hook-safety.md +246 -0
  196. package/dist/lite/standards/bassclef-configs-schema.md +232 -0
  197. package/dist/lite/standards/bassclef-evolution.md +143 -0
  198. package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
  199. package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
  200. package/dist/lite/standards/bassclef-source-config.md +228 -0
  201. package/dist/lite/standards/branch-stacking.md +408 -0
  202. package/dist/lite/standards/code-safety-principles.md +176 -0
  203. package/dist/lite/standards/composer-prerequisites.md +155 -0
  204. package/dist/lite/standards/deferred-actions-schema.md +204 -0
  205. package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
  206. package/dist/lite/standards/dependency-discipline/gem.md +43 -0
  207. package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
  208. package/dist/lite/standards/dependency-discipline/npm.md +42 -0
  209. package/dist/lite/standards/dependency-discipline/pip.md +42 -0
  210. package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
  211. package/dist/lite/standards/deployment-topology.md +69 -0
  212. package/dist/lite/standards/docs-sync-allowlist.md +76 -0
  213. package/dist/lite/standards/domain-and-dns.md +145 -0
  214. package/dist/lite/standards/frontend-stack.md +67 -0
  215. package/dist/lite/standards/frontmatter-schema.md +154 -0
  216. package/dist/lite/standards/graceful-exit.md +227 -0
  217. package/dist/lite/standards/hook-idempotency.md +102 -0
  218. package/dist/lite/standards/hook-injection-discipline.md +202 -0
  219. package/dist/lite/standards/hook-install-class.md +215 -0
  220. package/dist/lite/standards/input-handler-interface.md +152 -0
  221. package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
  222. package/dist/lite/standards/lite-manifest.json +2797 -0
  223. package/dist/lite/standards/luminary-matching.md +105 -0
  224. package/dist/lite/standards/luminary-problem-patterns.md +481 -0
  225. package/dist/lite/standards/migration-discipline/active-record.md +50 -0
  226. package/dist/lite/standards/migration-discipline/alembic.md +43 -0
  227. package/dist/lite/standards/migration-discipline/gorm.md +50 -0
  228. package/dist/lite/standards/migration-discipline/prisma.md +53 -0
  229. package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
  230. package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
  231. package/dist/lite/standards/model-routing-discipline.md +160 -0
  232. package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
  233. package/dist/lite/standards/opener-discipline.md +96 -0
  234. package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
  235. package/dist/lite/standards/persona-schema.md +229 -0
  236. package/dist/lite/standards/pluggable-luminaries.md +323 -0
  237. package/dist/lite/standards/pr-body-discipline.md +115 -0
  238. package/dist/lite/standards/preview-state-schema.md +189 -0
  239. package/dist/lite/standards/project-directory-layout.md +276 -0
  240. package/dist/lite/standards/release-tagging.md +137 -0
  241. package/dist/lite/standards/reserved-skill-names.md +120 -0
  242. package/dist/lite/standards/scannable-multi-option-output.md +265 -0
  243. package/dist/lite/standards/sdlc-compliance.md +286 -0
  244. package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
  245. package/dist/lite/standards/secrets-lifecycle.md +210 -0
  246. package/dist/lite/standards/security-scanner-adapter.md +145 -0
  247. package/dist/lite/standards/session-board.md +256 -0
  248. package/dist/lite/standards/skill-output-discipline.md +121 -0
  249. package/dist/lite/standards/state-spine-contract.md +255 -0
  250. package/dist/lite/standards/state-spine.md +511 -0
  251. package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
  252. package/dist/lite/standards/substrate-config-schema.md +267 -0
  253. package/dist/lite/standards/tech-stack-config.md +109 -0
  254. package/dist/lite/standards/tier-dependency-analysis.md +167 -0
  255. package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
  256. package/dist/lite/standards/tier-tag-schema.md +155 -0
  257. package/dist/lite/standards/two-layer-config.md +99 -0
  258. package/dist/lite/standards/use-case-format.md +292 -0
  259. package/dist/lite/standards/user-story-invest.md +268 -0
  260. package/dist/lite/standards/velocity-and-appetite.md +229 -0
  261. package/dist/lite/standards/voice-input-pattern.md +119 -0
  262. package/dist/lite/standards/whereami-schema.md +301 -0
  263. package/dist/lite/standards/worktree-management.md +211 -0
  264. package/dist/lite/standards/writing-guide.md +213 -0
  265. package/dist/lite/templates/chronicle-template.md +75 -0
  266. package/dist/lite/templates/deferred-action-template.md +45 -0
  267. package/dist/lite/templates/memory-proposal-template.md +77 -0
  268. package/dist/lite/templates/persona-template.md +200 -0
  269. package/dist/lite/templates/pr-faq.md +45 -0
  270. package/dist/lite/templates/secret-rotation-template.md +162 -0
  271. package/dist/lite/templates/spec-template.md +131 -0
  272. package/dist/lite/templates/use-case-template.md +194 -0
  273. package/dist/lite/templates/user-story-template.md +107 -0
  274. package/dist/lite/templates/whereami-template.md +101 -0
  275. package/package.json +1 -1
@@ -0,0 +1,150 @@
1
+ #!/usr/bin/env bash
2
+ # tier: lite
3
+ # Render human-readable companion doc from lite-manifest.json.
4
+ #
5
+ # Reads lite-manifest.json at repo root by default; writes docs/lite-manifest.md.
6
+ # The companion doc IS the human-readable projection of the machine-readable
7
+ # manifest — same source of truth, two projections per Ousterhout deep-modules.
8
+ #
9
+ # Per bassclef-upstream#1020 Step 4. Session 2026-08-01d option b.
10
+ #
11
+ # Cures per pre-mortem risk ledger docs/risk-ledgers/2026-08-01c-lite-manifest.md:
12
+ # F3.4 — prominent version banner at top; every regeneration bumps timestamp
13
+ # F-b.N3 — anchor on schema file (stable path) not manifest file (may move)
14
+ #
15
+ # Usage:
16
+ # scripts/render-lite-manifest-doc.sh # reads root manifest, writes docs/lite-manifest.md
17
+ # scripts/render-lite-manifest-doc.sh --dry-run # prints to stdout
18
+ # scripts/render-lite-manifest-doc.sh --input PATH # read manifest from PATH
19
+ # scripts/render-lite-manifest-doc.sh --output PATH # write to PATH
20
+ # scripts/render-lite-manifest-doc.sh --root PATH # override repo root
21
+
22
+ set -euo pipefail
23
+
24
+ DRY_RUN=0
25
+ INPUT_PATH=""
26
+ OUTPUT_PATH=""
27
+ REPO_ROOT_OVERRIDE=""
28
+
29
+ while [[ $# -gt 0 ]]; do
30
+ case "$1" in
31
+ --dry-run) DRY_RUN=1; shift ;;
32
+ --input) INPUT_PATH="${2:-}"; shift 2 ;;
33
+ --output) OUTPUT_PATH="${2:-}"; shift 2 ;;
34
+ --root) REPO_ROOT_OVERRIDE="${2:-}"; shift 2 ;;
35
+ -h|--help)
36
+ grep -E '^# ' "$0" | sed 's/^# \?//'
37
+ exit 0
38
+ ;;
39
+ *) echo "Unknown arg: $1 (use --help)" >&2; exit 1 ;;
40
+ esac
41
+ done
42
+
43
+ if [[ -n "$REPO_ROOT_OVERRIDE" ]]; then
44
+ REPO_ROOT="$REPO_ROOT_OVERRIDE"
45
+ else
46
+ REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || true)"
47
+ fi
48
+
49
+ if [[ -z "$REPO_ROOT" || ! -d "$REPO_ROOT" ]]; then
50
+ echo "render-lite-manifest-doc: cannot resolve repo root" >&2
51
+ exit 1
52
+ fi
53
+
54
+ [[ -z "$INPUT_PATH" ]] && INPUT_PATH="${REPO_ROOT}/lite-manifest.json"
55
+ [[ -z "$OUTPUT_PATH" ]] && OUTPUT_PATH="${REPO_ROOT}/docs/lite-manifest.md"
56
+
57
+ if [[ ! -f "$INPUT_PATH" ]]; then
58
+ echo "render-lite-manifest-doc: manifest not found at $INPUT_PATH" >&2
59
+ echo "Run scripts/generate-lite-manifest.sh first." >&2
60
+ exit 1
61
+ fi
62
+
63
+ if ! command -v jq >/dev/null 2>&1; then
64
+ echo "render-lite-manifest-doc: missing dependency: jq" >&2
65
+ exit 1
66
+ fi
67
+
68
+ VERSION=$(jq -r '.manifest_version' "$INPUT_PATH")
69
+ GENERATED=$(jq -r '.generated_at' "$INPUT_PATH")
70
+ COMMIT=$(jq -r '.upstream_commit' "$INPUT_PATH")
71
+ SHORT_COMMIT="${COMMIT:0:7}"
72
+ TOTAL=$(jq '.entries | length' "$INPUT_PATH")
73
+
74
+ # Emit doc to stdout via function; caller decides where to redirect.
75
+ render_doc() {
76
+ echo "# Lite manifest — v${VERSION}"
77
+ echo ""
78
+ echo "<!-- Auto-generated by scripts/render-lite-manifest-doc.sh from lite-manifest.json. Do not edit by hand. -->"
79
+ echo ""
80
+ echo "**Version:** \`${VERSION}\` "
81
+ echo "**Generated:** \`${GENERATED}\` "
82
+ echo "**Upstream commit:** \`${SHORT_COMMIT}\` "
83
+ echo "**Total entries:** ${TOTAL} "
84
+ echo "**Schema:** [\`standards/lite-manifest.schema.json\`](../standards/lite-manifest.schema.json) "
85
+ echo "**Machine-readable:** [\`lite-manifest.json\`](../lite-manifest.json) (at repo root)"
86
+ echo ""
87
+ echo "> Partners pin against \`manifest_version\`. Membership changes ship as manifest bumps with a changelog entry. Adding an entry is a minor bump; removing is a major bump (breaks partners); description or content-hash change without membership change is a patch bump."
88
+
89
+ render_section "skill" "Skills"
90
+ render_section "rule" "Rules"
91
+ render_section "hook" "Hooks"
92
+ render_section "luminary" "Luminaries"
93
+ render_section "agent" "Agents"
94
+ render_section "standard" "Standards"
95
+ render_section "adr" "Architecture Decision Records"
96
+ # Per #1392 Shape 3 (goal 2026-08-27a) — 5 install surfaces bassclef-cli needs
97
+ render_section "lib" "Shared Libraries"
98
+ render_section "script" "Scripts"
99
+ render_section "presence-template" "Install Templates"
100
+ render_section "template" "Content Templates"
101
+ render_section "root-doc" "Root Documentation"
102
+
103
+ echo ""
104
+ echo "---"
105
+ echo ""
106
+ echo "## For partners"
107
+ echo ""
108
+ echo "- Fetch the manifest from repo root: \`lite-manifest.json\`"
109
+ echo "- Validate against the schema at \`standards/lite-manifest.schema.json\` (JSON Schema draft 2020-12 strict)"
110
+ echo "- Pin your build to a specific \`manifest_version\`; upgrade deliberately"
111
+ echo "- Every \`entries[].path\` is repo-relative; the source file at that path is the authoritative content"
112
+ echo "- Use \`entries[].content_hash\` to cache-invalidate"
113
+ echo ""
114
+ echo "## Semver bump policy"
115
+ echo ""
116
+ echo "| Change | Bump |"
117
+ echo "|---|---|"
118
+ echo "| Entry added to \`entries[]\` | Minor |"
119
+ echo "| Entry removed from \`entries[]\` | Major (breaks partners) |"
120
+ echo "| Description or content_hash change without membership change | Patch |"
121
+ echo "| Schema shape change (new field added) | Minor |"
122
+ echo "| Schema shape change (field removed or type changed) | Major |"
123
+ echo ""
124
+ echo "Refs — bassclef-upstream#1020 (this manifest) + bassclef-upstream#1030 (root location) + ADR-040 (lite profile) + ADR-031 (we don't break adopters)."
125
+ }
126
+
127
+ render_section() {
128
+ local surface_type="$1"
129
+ local title="$2"
130
+ local count
131
+ count=$(jq --arg t "$surface_type" '[.entries[] | select(.type == $t)] | length' "$INPUT_PATH")
132
+ [[ "$count" -eq "0" ]] && return
133
+
134
+ echo ""
135
+ echo "## ${title} (${count})"
136
+ echo ""
137
+ jq -r --arg t "$surface_type" '
138
+ .entries[] | select(.type == $t) |
139
+ "- **" + .slug + "** — `" + .path + "`" +
140
+ (if .description then " \n " + .description else "" end)
141
+ ' "$INPUT_PATH"
142
+ }
143
+
144
+ if [[ "$DRY_RUN" == "1" ]]; then
145
+ render_doc
146
+ else
147
+ mkdir -p "$(dirname "$OUTPUT_PATH")"
148
+ render_doc > "$OUTPUT_PATH"
149
+ echo "Wrote $OUTPUT_PATH ($TOTAL entries; commit $SHORT_COMMIT)" >&2
150
+ fi
@@ -0,0 +1,86 @@
1
+ ---
2
+ tier: lite
3
+ id: ADR-NNN
4
+ title: <Short title — present-tense imperative, ≤80 chars>
5
+ status: proposed
6
+ date: <YYYY-MM-DD>
7
+ supersedes: null
8
+ superseded_by: null
9
+ ---
10
+
11
+ # ADR-NNN — <Title>
12
+
13
+ ## Context
14
+
15
+ What is the issue motivating this decision? Describe the forces at play. Include constraints (technical, business, organizational), prior options considered, and what's driving the need for a decision now.
16
+
17
+ Keep this section descriptive, not prescriptive. The reader should understand the situation before encountering the decision.
18
+
19
+ ## Decision
20
+
21
+ What did we decide? State the choice in one or two sentences.
22
+
23
+ Follow with the rationale — why this option, not the alternatives.
24
+
25
+ ## Status
26
+
27
+ `proposed` | `accepted` | `deprecated` | `superseded`
28
+
29
+ Lifecycle:
30
+ - `proposed` — drafted, under review
31
+ - `accepted` — adopted; load-bearing
32
+ - `deprecated` — no longer recommended, but not yet replaced
33
+ - `superseded` — replaced by ADR-MMM (note in `superseded_by` frontmatter)
34
+
35
+ ## Consequences
36
+
37
+ What becomes easier? Harder? More expensive? Cheaper?
38
+
39
+ What follow-on work does this decision enable or block?
40
+
41
+ What invariants does this decision establish? Future decisions must respect them.
42
+
43
+ ## References
44
+
45
+ - Related ADRs: ADR-XXX, ADR-YYY
46
+ - External sources: links to RFCs, blog posts, library docs that informed the decision
47
+ - Source incidents: PRs, chronicles, or tickets that surfaced the need
48
+
49
+ ---
50
+
51
+ ## How to use this template
52
+
53
+ 1. Copy this file to your project's ADR directory:
54
+ - `docs/adrs/ADR-NNN-<slug>.md` (most common)
55
+ - `architecture/decisions/ADR-NNN-<slug>.md` (bassclef's own layout)
56
+ 2. Pick the next sequential ADR number (look at existing files)
57
+ 3. Replace the placeholder content; fill every section
58
+ 4. Set status to `proposed` on draft; flip to `accepted` after operator review
59
+ 5. Touch the marker: `mkdir -p state/markers/adr && touch state/markers/adr/<decision-slug>-ADR-NNN.md`
60
+ 6. Commit alongside the architectural change
61
+
62
+ ## When to write an ADR
63
+
64
+ Per `.claude/rules/adr-discipline.md`, ADRs are required for load-bearing decisions:
65
+
66
+ - Schema changes (ORM schema files, migration creation)
67
+ - Framework or library choice at the platform level (not per-component)
68
+ - Deployment topology changes (orchestrator, region, service-mesh, single-vs-multi-region)
69
+ - Cross-cutting concerns (auth, logging, multi-tenancy, observability stack)
70
+ - Interface boundaries between bounded contexts (per Evans DDD)
71
+ - Deprecating or superseding a prior ADR
72
+
73
+ Skip ADRs for:
74
+ - Routine code changes (bug fixes, feature additions within an existing pattern)
75
+ - Component-level library choices (which icon library, which date-picker)
76
+ - Cosmetic refactors (variable renames, file reorganizations without behavior change)
77
+
78
+ When in doubt, write the ADR. The marginal cost is ten minutes; the value to future you reading "why" is large.
79
+
80
+ ## Refs
81
+
82
+ - Michael Nygard's original ADR proposal: [Documenting Architecture Decisions](https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions)
83
+ - bassclef#1149 — adr-discipline rule + hook
84
+ - `.claude/rules/adr-discipline.md` — the rule that fires
85
+ - `.claude/hooks/adr-discipline-check.sh` — the mechanical check
86
+ - `.claude/rules/blocked-items.md` — BLOCK protocol the hook fires
@@ -0,0 +1,84 @@
1
+ ---
2
+ tier: lite
3
+ description: Stack-specific instantiation of .claude/rules/api-conventions.md for Next.js App Router.
4
+ ---
5
+
6
+ # API Conventions — Next.js App Router
7
+
8
+ Stack-specific instantiation of `.claude/rules/api-conventions.md` for Next.js App Router. Composed under ARCH-T0 #1133 Path A.
9
+
10
+ ## When this sibling fires
11
+
12
+ When adopter's `.claude/bassclef-configs.jsonc` has `tech_stack.frontend: nextjs`. The loader (future ticket) reads this sibling and applies the Next.js-specific guidance below in addition to the universal principles in the parent rule.
13
+
14
+ Until the loader ships, this sibling is discoverable via the cross-reference table in the parent rule.
15
+
16
+ ## File location
17
+
18
+ - API routes live under `src/app/api/`
19
+ - Route handler files: `src/app/api/[resource]/route.ts`
20
+ - Nested resources: `src/app/api/[parent]/[parentId]/[child]/route.ts`
21
+ - Dynamic segments use bracket syntax per Next.js App Router conventions
22
+
23
+ ## Globs (for hook + tooling targeting)
24
+
25
+ - `src/app/api/**/*.ts`
26
+ - `src/app/api/**/*.tsx`
27
+
28
+ These globs scope hooks + linting rules that fire only when the adopter is on Next.js.
29
+
30
+ ## Auth conventions
31
+
32
+ Next.js-specific auth helpers:
33
+
34
+ - Use `getServerSession()` from NextAuth.js (or equivalent for the adopter's auth provider) for session retrieval in route handlers
35
+ - Middleware at `src/middleware.ts` runs before route handlers; use it for auth gating, redirects, tenant resolution
36
+ - API routes that modify data MUST check the session at handler entry; no exceptions
37
+
38
+ ## Validation conventions
39
+
40
+ Recommended Next.js + TypeScript stack pattern:
41
+
42
+ - Use Zod schemas for request body validation
43
+ - Parse + validate at the start of the route handler:
44
+
45
+ ```typescript
46
+ import { z } from "zod";
47
+
48
+ const CreateDealSchema = z.object({
49
+ title: z.string().min(1).max(200),
50
+ amount: z.number().positive(),
51
+ });
52
+
53
+ export async function POST(req: Request) {
54
+ const body = await req.json();
55
+ const parsed = CreateDealSchema.safeParse(body);
56
+ if (!parsed.success) {
57
+ return Response.json(
58
+ { error: { code: "VALIDATION_ERROR", message: "Invalid input", details: parsed.error.issues } },
59
+ { status: 400 }
60
+ );
61
+ }
62
+ // ...
63
+ }
64
+ ```
65
+
66
+ ## Tenant context resolution
67
+
68
+ For multi-tenant Next.js apps:
69
+
70
+ - Tenant context resolved in middleware or at route boundary
71
+ - Passed through to queries via React Server Components context or explicit function arguments
72
+ - Never resolved inside ORM query callbacks (race conditions, leak risk)
73
+
74
+ ## Composition with universal principles
75
+
76
+ Apply the universal principles from `.claude/rules/api-conventions.md` first; the Next.js-specific patterns above add detail without overriding. When the two conflict (e.g., a Next.js convention contradicts the universal route-naming rule), the universal principle wins; file a `/promote` ticket if you believe the convention should be amended.
77
+
78
+ ## Refs
79
+
80
+ - Parent rule: `.claude/rules/api-conventions.md`
81
+ - ARCH-T0 #1133 — operator-stack-leakage audit + remediation
82
+ - bassclef#1309 — this sibling (api-conventions Path A WU-6 of bet 2026-06-20e)
83
+ - bassclef#1150 T18 — sister Path A (migration-discipline)
84
+ - Next.js App Router docs: https://nextjs.org/docs/app/building-your-application/routing/route-handlers
@@ -0,0 +1,209 @@
1
+ ---
2
+ tier: lite
3
+ description: The substrate has three artifact classes that logically compose into a work-decomposition tree.
4
+ ---
5
+
6
+ # Artifact-Composition Standard
7
+
8
+ The substrate has three artifact classes that logically compose into a
9
+ work-decomposition tree. This standard codifies that hierarchy and the
10
+ typed cross-references that make it walkable.
11
+
12
+ ## The composition tree
13
+
14
+ ```
15
+ Roadmap (multi-week, multi-stage strategic frame)
16
+ └── Stage
17
+ └── Iteration goal (scoped commitment, fixed time budget)
18
+ └── Phase
19
+ └── Stack manifest (physical implementation plan)
20
+ └── WS branch → PR → merged
21
+ ```
22
+
23
+ Each level is a separate artifact in a separate directory. The
24
+ relationship between levels is expressed via **typed frontmatter
25
+ fields** — not implicit-by-date-prefix or implicit-by-prose-citation.
26
+
27
+ ## When this standard applies
28
+
29
+ Required for every roadmap, iteration goal, and stack manifest written
30
+ in any sunj-labs repo (bassclef + consumers via bassclef-sync).
31
+
32
+ Optional for older artifacts predating this standard — backfill
33
+ opportunistically when touching them, not as a forcing migration.
34
+
35
+ ## Required + optional cross-references
36
+
37
+ | Artifact class | Location | Required frontmatter | Optional frontmatter |
38
+ |---|---|---|---|
39
+ | Roadmap | `docs/roadmaps/` | — | `bets: [list of paths]` (populated as bets shape) |
40
+ | Iteration goal | `docs/iteration-bets/` | — | `parent_roadmap: <path>`, `stack_manifest: <path>` |
41
+ | Stack manifest | `docs/stacks/` (or `docs/branch-stacks/` — see note) | `bet: <path>` | `parent_roadmap: <path>` (transitive convenience) |
42
+
43
+ **Required** = if the relationship exists, the field MUST be present in
44
+ frontmatter. A bet that descends from a roadmap MUST set
45
+ `parent_roadmap:`. A bet that doesn't descend from any roadmap (small
46
+ one-off bets) doesn't have the field.
47
+
48
+ **Optional** = the field is present when the artifact has a downward
49
+ relationship the parent should know about. A roadmap's `bets:` list
50
+ can be empty until the first goal shapes; populating it is a
51
+ maintenance discipline.
52
+
53
+ ### Note on stack-manifest directory
54
+
55
+ The standard's earlier `standards/project-directory-layout.md` named
56
+ `docs/branch-stacks/` for stack manifests. Actual usage in bassclef
57
+ landed at `docs/stacks/`. Both paths exist in some repos. Consolidation
58
+ is a separate cleanup; this standard accepts either as a valid stack-
59
+ manifest location and points at whichever the artifact resolves to.
60
+
61
+ ## Cross-reference integrity rule
62
+
63
+ **A half-broken cross-reference is a substrate-defect.** Specifically:
64
+
65
+ | Pattern | Signal |
66
+ |---|---|
67
+ | Prose citation present, frontmatter field missing | Substrate-defect — fix the artifact |
68
+ | Frontmatter field present, target path doesn't exist | Substrate-defect — broken link |
69
+ | Frontmatter field present, target's reciprocal field missing | Substrate-defect — one-way reference |
70
+
71
+ Reciprocal-field discipline:
72
+
73
+ - A bet with `parent_roadmap:` SHOULD appear in that roadmap's `bets:`
74
+ list (the parent maintains the index).
75
+ - A bet with `stack_manifest:` MUST point to a stack manifest whose
76
+ `bet:` field points back at this bet.
77
+ - A stack manifest with `parent_roadmap:` SHOULD point to a roadmap
78
+ whose `bets:` list includes the manifest's parent goal.
79
+
80
+ These reciprocal checks are surface-level mechanical: a future
81
+ `/compose` skill (or `/sprint --tree` extension) can validate them
82
+ in one pass. Today they're agent self-discipline at artifact write
83
+ time.
84
+
85
+ ## Why typed, not implicit-by-prose
86
+
87
+ The substrate already had implicit composition by date-prefix
88
+ convention (a roadmap at `2026-04-25-...` is "the parent of" a bet at
89
+ `2026-04-25-...` simply because they share a date). That implicit
90
+ convention failed:
91
+
92
+ - Bets without roadmaps share dates with bets that have them
93
+ - Stack manifests reference bets via prose mention with no parseable
94
+ link
95
+ - New session pickup has to read three directories and infer
96
+ relationships from filenames
97
+
98
+ Typed frontmatter:
99
+
100
+ - Makes the relationship machine-readable (skills can walk the tree)
101
+ - Survives renames (path is explicit, not derived)
102
+ - Self-documents at the artifact level (a reader of any one artifact
103
+ sees its parent + children without external context)
104
+
105
+ ## Walkable lineage
106
+
107
+ Given a typed cross-reference graph, any tool can render the lineage
108
+ from any starting point:
109
+
110
+ ```
111
+ $ /compose docs/iteration-bets/2026-04-25-example-pipeline.md
112
+
113
+ Lineage:
114
+ docs/roadmaps/2026-04-25-example-roadmap.md
115
+ └── docs/iteration-bets/2026-04-25-example-pipeline.md (active, Phase A0)
116
+ └── docs/stacks/2026-04-25-pipeline-stack.md (6 WSes, 1 pr-open)
117
+
118
+ Siblings (other bets descending from same roadmap):
119
+ - (none yet — pipeline is sole child)
120
+ ```
121
+
122
+ The `/compose` skill is a separate /promote (bassclef#275 Part 3,
123
+ deferred from this WS). Until it ships, agents walk the lineage
124
+ manually by reading frontmatter — but the discipline is the same.
125
+
126
+ ## Anti-patterns
127
+
128
+ **Don't substitute prose for frontmatter fields.** "This bet descends
129
+ from a historical example roadmap" in the body is not a substitute for
130
+ `parent_roadmap: docs/roadmaps/...` in the frontmatter. Prose is for
131
+ narrative; frontmatter is for the machine-readable graph.
132
+
133
+ **Don't forget reciprocal updates.** When you set `stack_manifest:` on
134
+ a bet, also update the stack manifest's `bet:` field if it doesn't
135
+ already point back. One-way edges silently break the walkable lineage.
136
+
137
+ **Don't backfill mass migrations.** Older artifacts predating this
138
+ standard don't need a forcing PR. Backfill opportunistically when you
139
+ touch them. The cost of mass backfill (large diff, no behavior change)
140
+ exceeds the value of consistency-now.
141
+
142
+ **Don't add fields not in the table above.** If a new relationship
143
+ shape emerges (e.g., a bet that supersedes a prior bet), propose
144
+ extending this standard before adding ad-hoc frontmatter fields.
145
+ Schema discipline matters because tools will eventually parse this.
146
+
147
+ ## Composition with other standards
148
+
149
+ - `standards/project-directory-layout.md` — defines WHERE artifacts
150
+ go; this standard defines HOW they reference each other. Pair, not
151
+ replace.
152
+ - `standards/branch-stacking.md` — stack-manifest content discipline;
153
+ this standard adds the `bet:` and `parent_roadmap:` cross-refs.
154
+ - `standards/session-board.md` — session-board references active bets
155
+ by path in its `active_bets:` frontmatter; that's another typed
156
+ cross-ref pattern (session → bets), but the session-board owns the
157
+ schema for that one.
158
+ - `.claude/rules/artifact-ingestion.md` — "Sources read" block is the
159
+ ingestion pattern at write time; cross-refs are the persistent graph
160
+ the ingestion block samples from.
161
+
162
+ ## Enforcement
163
+
164
+ Methodology-level today. Future mechanical enforcement:
165
+
166
+ 1. `/compose` skill validates reciprocal references and surfaces
167
+ half-broken edges.
168
+ 2. `/sprint` extension renders the lineage tree as an orientation aid
169
+ at session start.
170
+ 3. A hook on PR creation could grep the touched bet/manifest/roadmap
171
+ files for required-field presence and flag missing cross-refs.
172
+
173
+ Until those exist, the discipline is agent self-check at artifact
174
+ write time. The "Sources read" block in any new artifact is the
175
+ natural moment to verify cross-refs resolve — both directions.
176
+
177
+ ## Override
178
+
179
+ There is no override. Cross-references are either typed in frontmatter
180
+ or they don't exist. Prose-only references don't count toward the
181
+ graph and a future tooling pass will flag them.
182
+
183
+ If a relationship genuinely doesn't exist (e.g., a one-off bet with no
184
+ parent roadmap), don't fabricate one. Omit the field entirely. Empty
185
+ fields are not the same as missing relationships — only set a field
186
+ when the relationship it expresses is real.
187
+
188
+ ## Retirement condition
189
+
190
+ This standard retires when (a) all bassclef and consumer-repo
191
+ roadmap/bet/stack artifacts conform AND (b) the `/compose` skill is
192
+ shipped and validated AND (c) cross-ref drift hasn't surfaced as an
193
+ operator-visible defect for ≥6 months.
194
+
195
+ Until then, it's load-bearing for any session that writes or modifies
196
+ an artifact in any of the three classes.
197
+
198
+ ## Relationship to other standards/rules
199
+
200
+ - `standards/project-directory-layout.md` — directory destinations
201
+ (where) paired with this standard's relationships (how)
202
+ - `standards/branch-stacking.md` — stack-manifest internal schema;
203
+ this standard adds the upward cross-refs
204
+ - `standards/session-board.md` — session-level coordinator; references
205
+ bets by path (sibling cross-ref pattern)
206
+ - `.claude/rules/artifact-ingestion.md` — write-time discipline that
207
+ surfaces cross-ref work
208
+ - bassclef#275 — promotion issue this standard partially closes
209
+ (Part 1; the dir mv is WS-A0-4, the `/compose` skill is deferred)