@adia-ai/adia-ui-forge 0.1.3 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/.claude-plugin/plugin.json +3 -6
  2. package/CHANGELOG.md +27 -34
  3. package/README.md +35 -40
  4. package/agents/a2ui-engineer.md +22 -53
  5. package/agents/component-author.md +29 -0
  6. package/agents/framework-verifier.md +26 -0
  7. package/agents/release-engineer.md +21 -81
  8. package/agents/routing-corpus.json +293 -64
  9. package/bin/demo-postwrite-pattern-gate +94 -0
  10. package/bin/forge-lint +17 -2
  11. package/bin/sidecar-prewrite-guard +104 -0
  12. package/commands/deploy.md +9 -0
  13. package/commands/dogfood.md +10 -0
  14. package/commands/gen-review.md +9 -0
  15. package/commands/release.md +10 -0
  16. package/hooks/hooks.json +15 -0
  17. package/package.json +3 -6
  18. package/references/contracts/a2ui-mcp-surface.md +35 -0
  19. package/references/contracts/migration-guide-format.md +34 -0
  20. package/references/shared/content-trust.md +19 -74
  21. package/skills/adia-a2ui/SKILL.md +99 -0
  22. package/skills/{adia-ui-a2ui → adia-a2ui}/evals/routing-corpus.json +10 -10
  23. package/skills/adia-a2ui/references/anti-patterns.md +27 -0
  24. package/skills/adia-a2ui/references/chunk-authoring.md +71 -0
  25. package/skills/adia-a2ui/references/corpus-discipline.md +68 -0
  26. package/skills/adia-a2ui/references/eval-diagnostics.md +86 -0
  27. package/skills/adia-a2ui/references/format-extension-decisions.md +66 -0
  28. package/skills/adia-a2ui/references/leverage-rules.md +52 -0
  29. package/skills/adia-a2ui/references/mcp-pipeline-ops.md +83 -0
  30. package/skills/adia-a2ui/references/mcp-tool-reference.md +59 -0
  31. package/skills/adia-a2ui/references/pipeline-overview.md +115 -0
  32. package/skills/adia-a2ui/references/semantic-fail-lifting.md +74 -0
  33. package/skills/adia-a2ui/references/strategy-engines.md +109 -0
  34. package/skills/adia-a2ui/references/zettel-calibration.md +104 -0
  35. package/skills/adia-author/SKILL.md +112 -0
  36. package/skills/adia-author/evals/routing-corpus.json +222 -0
  37. package/skills/{adia-ui-authoring → adia-author}/references/anti-patterns.md +33 -4
  38. package/skills/{adia-ui-authoring → adia-author}/references/authoring-cycle.md +9 -11
  39. package/skills/adia-author/references/canonical-pattern-index.md +243 -0
  40. package/skills/{adia-ui-authoring → adia-author}/references/code-style.md +19 -21
  41. package/skills/adia-author/references/common-gotchas.md +129 -0
  42. package/skills/adia-author/references/composite-demo-protocol.md +271 -0
  43. package/skills/{adia-ui-authoring → adia-author}/references/css-patterns.md +19 -6
  44. package/skills/{adia-ui-authoring → adia-author}/references/lifecycle-patterns.md +1 -0
  45. package/skills/{adia-ui-authoring → adia-author}/references/llm-bridge.md +3 -5
  46. package/skills/{adia-ui-authoring → adia-author}/references/module-promotion.md +20 -38
  47. package/skills/{adia-ui-authoring → adia-author}/references/primitive-audit.md +2 -4
  48. package/skills/{adia-ui-authoring → adia-author}/references/shell-patterns.md +12 -18
  49. package/skills/{adia-ui-authoring → adia-author}/references/token-contract.md +5 -7
  50. package/skills/{adia-ui-authoring → adia-author}/references/worked-example.md +3 -3
  51. package/skills/{adia-ui-authoring → adia-author}/references/yaml-contract.md +3 -3
  52. package/skills/{adia-ui-authoring → adia-author}/scripts/build-canonical-pattern-index.mjs +3 -3
  53. package/skills/adia-deploy/SKILL.md +128 -0
  54. package/skills/{adia-ui-ops → adia-deploy}/references/deploy-playbooks.md +47 -30
  55. package/skills/adia-dogfood/SKILL.md +124 -0
  56. package/skills/adia-dogfood/references/admin-shell-anatomy.md +77 -0
  57. package/skills/adia-dogfood/references/app-shell-pitfalls.md +66 -0
  58. package/skills/adia-dogfood/references/card-anatomy-sweep.md +66 -0
  59. package/skills/adia-dogfood/references/html-attr-sweep.md +63 -0
  60. package/skills/adia-dogfood/references/native-leak-annotations.md +73 -0
  61. package/skills/adia-dogfood/references/visual-probe-triage.md +80 -0
  62. package/skills/{adia-ui-dogfood → adia-dogfood}/scripts/analyze.mjs +30 -14
  63. package/skills/adia-gen-review/SKILL.md +127 -0
  64. package/skills/adia-gen-review/references/corpus-html-patterns.md +279 -0
  65. package/skills/adia-gen-review/references/loop-protocol.md +216 -0
  66. package/skills/adia-gen-review/references/rubric-cosmetic.md +100 -0
  67. package/skills/adia-gen-review/references/rubric-decompose.md +101 -0
  68. package/skills/adia-gen-review/references/rubric-score.md +214 -0
  69. package/skills/{adia-ui-gen-review → adia-gen-review}/references/scores.schema.json +2 -2
  70. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-coverage-audit.mjs +4 -4
  71. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-decompose.mjs +10 -6
  72. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-status.mjs +5 -5
  73. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/validate-cycle-scores.mjs +5 -5
  74. package/skills/adia-llm-internals/SKILL.md +77 -0
  75. package/skills/{adia-ui-llm → adia-llm-internals}/references/adapter-contract.md +4 -2
  76. package/skills/{adia-ui-llm → adia-llm-internals}/references/add-a-provider.md +4 -5
  77. package/skills/{adia-ui-llm → adia-llm-internals}/references/bridge-facade.md +10 -3
  78. package/skills/{adia-ui-llm → adia-llm-internals}/references/browser-proxy-boundary.md +1 -1
  79. package/skills/{adia-ui-llm → adia-llm-internals}/references/model-registry.md +5 -3
  80. package/skills/{adia-ui-llm → adia-llm-internals}/references/streaming-sse.md +2 -2
  81. package/skills/adia-release/SKILL.md +72 -0
  82. package/skills/adia-release/references/changelog-discipline.md +119 -0
  83. package/skills/adia-release/references/cut-procedure.md +247 -0
  84. package/skills/adia-release/references/gates-catalog.md +222 -0
  85. package/skills/adia-release/references/independent-package-release.md +52 -0
  86. package/skills/adia-release/references/migration-guide-authoring.md +86 -0
  87. package/skills/adia-release/references/notes-authoring.md +90 -0
  88. package/skills/adia-release/references/recovery-paths.md +106 -0
  89. package/skills/{adia-ui-release → adia-release}/scripts/bump.mjs +27 -2
  90. package/skills/{adia-ui-release → adia-release}/scripts/dispatch-publish.mjs +4 -1
  91. package/skills/{adia-ui-release → adia-release}/scripts/insert-stub.mjs +1 -1
  92. package/skills/{adia-ui-release → adia-release}/scripts/package-paths.mjs +6 -0
  93. package/skills/{adia-ui-release → adia-release}/scripts/promote-unreleased.mjs +1 -1
  94. package/skills/{adia-ui-release → adia-release}/scripts/release-pack.mjs +13 -21
  95. package/skills/{adia-ui-release → adia-release}/scripts/tag-lockstep.mjs +5 -1
  96. package/skills/adia-site-docs/SKILL.md +68 -0
  97. package/skills/adia-site-docs/evals/audit-report.md +30 -0
  98. package/skills/adia-site-docs/evals/routing-corpus.json +176 -0
  99. package/skills/adia-site-docs/intent.md +72 -0
  100. package/agents/README.md +0 -209
  101. package/agents/author.md +0 -56
  102. package/agents/repo-steward.md +0 -56
  103. package/agents/spec-architect.md +0 -53
  104. package/agents/tech-lead.md +0 -57
  105. package/agents/verifier.md +0 -55
  106. package/bin/lib/audit-axes.mjs +0 -555
  107. package/bin/lib/dry-run-irreversible.mjs +0 -236
  108. package/bin/lib/run-skill-evals.mjs +0 -487
  109. package/bin/lib/teach-router.mjs +0 -250
  110. package/commands/adia-forge-a2ui.md +0 -10
  111. package/commands/adia-forge-author.md +0 -10
  112. package/commands/adia-forge-dogfood.md +0 -8
  113. package/commands/adia-forge-llm.md +0 -8
  114. package/commands/adia-forge-orient.md +0 -10
  115. package/commands/adia-forge-release.md +0 -8
  116. package/commands/adia-forge-review.md +0 -10
  117. package/references/shared/pev-rationale.md +0 -64
  118. package/references/shared/skill-conventions.md +0 -133
  119. package/skills/adia-ui-a2ui/CHANGELOG.md +0 -32
  120. package/skills/adia-ui-a2ui/SKILL.md +0 -243
  121. package/skills/adia-ui-a2ui/evals/adversarial-corpus.json +0 -75
  122. package/skills/adia-ui-a2ui/evals/teach-routing-cases.json +0 -100
  123. package/skills/adia-ui-a2ui/references/anti-patterns.md +0 -24
  124. package/skills/adia-ui-a2ui/references/chunk-authoring.md +0 -88
  125. package/skills/adia-ui-a2ui/references/corpus-discipline.md +0 -56
  126. package/skills/adia-ui-a2ui/references/eval-diagnostics.md +0 -127
  127. package/skills/adia-ui-a2ui/references/fragment-graph.md +0 -91
  128. package/skills/adia-ui-a2ui/references/mcp-pipeline-ops.md +0 -106
  129. package/skills/adia-ui-a2ui/references/mcp-tool-reference.md +0 -398
  130. package/skills/adia-ui-a2ui/references/pipeline-overview.md +0 -175
  131. package/skills/adia-ui-a2ui/references/semantic-fail-lifting.md +0 -120
  132. package/skills/adia-ui-a2ui/references/strategy-engines.md +0 -111
  133. package/skills/adia-ui-a2ui/references/teach-protocol.md +0 -220
  134. package/skills/adia-ui-a2ui/references/zettel-calibration.md +0 -93
  135. package/skills/adia-ui-a2ui/scripts/audit-a2ui-roster.mjs +0 -96
  136. package/skills/adia-ui-a2ui/scripts/teach-route.mjs +0 -157
  137. package/skills/adia-ui-a2ui/skill.json +0 -38
  138. package/skills/adia-ui-authoring/CHANGELOG.md +0 -32
  139. package/skills/adia-ui-authoring/SKILL.md +0 -256
  140. package/skills/adia-ui-authoring/assets/case-studies/admin-shell-decomposition.md +0 -101
  141. package/skills/adia-ui-authoring/assets/case-studies/maxtokens-32768-discovery.md +0 -109
  142. package/skills/adia-ui-authoring/assets/case-studies/theme-panel-promotion.md +0 -113
  143. package/skills/adia-ui-authoring/evals/adversarial-design-plan-gates.json +0 -138
  144. package/skills/adia-ui-authoring/evals/routing-corpus.json +0 -245
  145. package/skills/adia-ui-authoring/references/canonical-pattern-index.md +0 -179
  146. package/skills/adia-ui-authoring/references/common-gotchas.md +0 -93
  147. package/skills/adia-ui-authoring/references/composite-demo-protocol.md +0 -1084
  148. package/skills/adia-ui-authoring/references/teach-protocol.md +0 -428
  149. package/skills/adia-ui-authoring/scripts/audit-authoring-roster.mjs +0 -148
  150. package/skills/adia-ui-authoring/skill.json +0 -45
  151. package/skills/adia-ui-dogfood/CHANGELOG.md +0 -17
  152. package/skills/adia-ui-dogfood/README.md +0 -62
  153. package/skills/adia-ui-dogfood/SKILL.md +0 -866
  154. package/skills/adia-ui-dogfood/skill.json +0 -40
  155. package/skills/adia-ui-forge/SKILL.md +0 -88
  156. package/skills/adia-ui-forge/evals/routing-corpus.json +0 -30
  157. package/skills/adia-ui-gen-review/CHANGELOG.md +0 -108
  158. package/skills/adia-ui-gen-review/SKILL.md +0 -266
  159. package/skills/adia-ui-gen-review/references/loop-protocol.md +0 -712
  160. package/skills/adia-ui-gen-review/references/rubric-cosmetic.md +0 -144
  161. package/skills/adia-ui-gen-review/references/rubric-decompose.md +0 -117
  162. package/skills/adia-ui-gen-review/references/rubric-score.md +0 -249
  163. package/skills/adia-ui-gen-review/references/teach-protocol.md +0 -214
  164. package/skills/adia-ui-gen-review/skill.json +0 -23
  165. package/skills/adia-ui-llm/CHANGELOG.md +0 -25
  166. package/skills/adia-ui-llm/SKILL.md +0 -165
  167. package/skills/adia-ui-llm/evals/adversarial-corpus.json +0 -75
  168. package/skills/adia-ui-llm/evals/routing-corpus.json +0 -30
  169. package/skills/adia-ui-llm/evals/teach-routing-cases.json +0 -73
  170. package/skills/adia-ui-llm/references/teach-protocol.md +0 -78
  171. package/skills/adia-ui-llm/scripts/audit-llm-roster.mjs +0 -93
  172. package/skills/adia-ui-llm/scripts/teach-route.mjs +0 -119
  173. package/skills/adia-ui-llm/skill.json +0 -33
  174. package/skills/adia-ui-ops/CHANGELOG.md +0 -291
  175. package/skills/adia-ui-ops/SKILL.md +0 -401
  176. package/skills/adia-ui-ops/references/INDEX.md +0 -158
  177. package/skills/adia-ui-ops/references/audit-cadence.md +0 -263
  178. package/skills/adia-ui-ops/references/audit-patterns/archive-link-sweep.md +0 -96
  179. package/skills/adia-ui-ops/references/audit-patterns/audit-history-ledger.md +0 -162
  180. package/skills/adia-ui-ops/references/audit-patterns/browser-bundle-node-imports.md +0 -154
  181. package/skills/adia-ui-ops/references/audit-patterns/changelog-unreleased-bloat.md +0 -75
  182. package/skills/adia-ui-ops/references/audit-patterns/coverage-gaps.md +0 -187
  183. package/skills/adia-ui-ops/references/audit-patterns/entry-file-coverage.md +0 -122
  184. package/skills/adia-ui-ops/references/audit-patterns/format-hygiene.md +0 -217
  185. package/skills/adia-ui-ops/references/audit-patterns/lockstep-versioning.md +0 -113
  186. package/skills/adia-ui-ops/references/audit-patterns/memory-fragmentation.md +0 -180
  187. package/skills/adia-ui-ops/references/audit-patterns/orphan-detection.md +0 -202
  188. package/skills/adia-ui-ops/references/audit-patterns/pointer-validation.md +0 -180
  189. package/skills/adia-ui-ops/references/audit-patterns/redundancy-detection.md +0 -210
  190. package/skills/adia-ui-ops/references/audit-patterns/spec-dating-sweep.md +0 -91
  191. package/skills/adia-ui-ops/references/audit-patterns/stale-content.md +0 -182
  192. package/skills/adia-ui-ops/references/audit-patterns/staleness-tooling.md +0 -156
  193. package/skills/adia-ui-ops/references/audit-patterns/token-waste-detection.md +0 -196
  194. package/skills/adia-ui-ops/references/doc-types/adr-pattern.md +0 -210
  195. package/skills/adia-ui-ops/references/doc-types/architecture-md.md +0 -190
  196. package/skills/adia-ui-ops/references/doc-types/changelog.md +0 -183
  197. package/skills/adia-ui-ops/references/doc-types/decisions-log.md +0 -146
  198. package/skills/adia-ui-ops/references/doc-types/plan-roadmap.md +0 -182
  199. package/skills/adia-ui-ops/references/doc-types/postmortem-pattern.md +0 -206
  200. package/skills/adia-ui-ops/references/genres/prose-and-writing.md +0 -149
  201. package/skills/adia-ui-ops/references/guidance/context-budget.md +0 -137
  202. package/skills/adia-ui-ops/references/guidance/llm-doc-writing.md +0 -116
  203. package/skills/adia-ui-ops/references/guidance/reliability-dial.md +0 -186
  204. package/skills/adia-ui-ops/references/recipes/adr-introduction.md +0 -211
  205. package/skills/adia-ui-ops/references/recipes/audit-existing-repo.md +0 -234
  206. package/skills/adia-ui-ops/references/recipes/cold-start-harvest.md +0 -263
  207. package/skills/adia-ui-ops/references/recipes/concurrent-learnings-merge.md +0 -158
  208. package/skills/adia-ui-ops/references/recipes/continuous-learning-loop.md +0 -169
  209. package/skills/adia-ui-ops/references/recipes/external-reference-verification.md +0 -158
  210. package/skills/adia-ui-ops/references/recipes/findings-index-readout.md +0 -126
  211. package/skills/adia-ui-ops/references/recipes/greenfield-setup.md +0 -252
  212. package/skills/adia-ui-ops/references/recipes/harvest-repo-brain.md +0 -169
  213. package/skills/adia-ui-ops/references/recipes/import-repo-brain-harvest.md +0 -153
  214. package/skills/adia-ui-ops/references/recipes/memory-organization.md +0 -182
  215. package/skills/adia-ui-ops/references/recipes/recommend-then-validate.md +0 -199
  216. package/skills/adia-ui-ops/references/recipes/self-healing-hooks.md +0 -366
  217. package/skills/adia-ui-ops/references/recipes/skill-stewardship-loop.md +0 -113
  218. package/skills/adia-ui-ops/references/standards/agents-md-spec.md +0 -138
  219. package/skills/adia-ui-ops/references/standards/claude-md-convention.md +0 -123
  220. package/skills/adia-ui-ops/references/standards/cross-tool-matrix.md +0 -85
  221. package/skills/adia-ui-ops/references/standards/readme-conventions.md +0 -232
  222. package/skills/adia-ui-ops/references/teach-protocol.md +0 -215
  223. package/skills/adia-ui-ops/scripts/audit-ops-roster.mjs +0 -104
  224. package/skills/adia-ui-ops/skill.json +0 -65
  225. package/skills/adia-ui-release/CHANGELOG.md +0 -66
  226. package/skills/adia-ui-release/SKILL.md +0 -323
  227. package/skills/adia-ui-release/assets/case-studies/2026-05-20-batch-push-v0.6.14-v0.6.15.md +0 -144
  228. package/skills/adia-ui-release/assets/case-studies/2026-05-20-corpus-drift-remediation-v0.6.15.md +0 -155
  229. package/skills/adia-ui-release/assets/case-studies/2026-05-20-version-skip-correction-v0.6.12.md +0 -114
  230. package/skills/adia-ui-release/assets/case-studies/2026-05-21-author-from-scratch-v0.6.18.md +0 -139
  231. package/skills/adia-ui-release/assets/case-studies/2026-05-21-feedback37-retraction-v0.6.21.md +0 -124
  232. package/skills/adia-ui-release/assets/case-studies/2026-05-21-fn1-enrichment-pass-v0.6.19.md +0 -125
  233. package/skills/adia-ui-release/assets/case-studies/2026-05-21-stale-test-detection-v0.6.20.md +0 -142
  234. package/skills/adia-ui-release/assets/case-studies/2026-05-23-freshness-gate-recovery-v0.6.32.md +0 -97
  235. package/skills/adia-ui-release/assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md +0 -147
  236. package/skills/adia-ui-release/assets/templates/stub-changelog.template.md +0 -22
  237. package/skills/adia-ui-release/evals/evals.json +0 -164
  238. package/skills/adia-ui-release/references/changelog-discipline.md +0 -250
  239. package/skills/adia-ui-release/references/cycle-happy-path.md +0 -520
  240. package/skills/adia-ui-release/references/exe-deploy.md +0 -149
  241. package/skills/adia-ui-release/references/gates-catalog.md +0 -778
  242. package/skills/adia-ui-release/references/independent-package-release.md +0 -129
  243. package/skills/adia-ui-release/references/ledger-discipline.md +0 -232
  244. package/skills/adia-ui-release/references/migration-guide-authoring.md +0 -174
  245. package/skills/adia-ui-release/references/multi-agent-baseline.md +0 -207
  246. package/skills/adia-ui-release/references/notes-authoring.md +0 -212
  247. package/skills/adia-ui-release/references/recovery-paths.md +0 -262
  248. package/skills/adia-ui-release/references/rollup-notes.md +0 -208
  249. package/skills/adia-ui-release/references/teach-protocol.md +0 -468
  250. package/skills/adia-ui-release/scripts/audit-gate-roster.mjs +0 -196
  251. package/skills/adia-ui-release/scripts/make-ledger.mjs +0 -200
  252. package/skills/adia-ui-release/skill.json +0 -77
  253. package/skills/dogfood-sweep/CHANGELOG.md +0 -37
  254. package/skills/dogfood-sweep/README.md +0 -105
  255. package/skills/dogfood-sweep/SKILL.md +0 -1000
  256. package/skills/dogfood-sweep/analyze.mjs +0 -600
  257. package/skills/dogfood-sweep/skill.json +0 -31
  258. /package/skills/{adia-ui-authoring → adia-author}/references/api-contract.md +0 -0
  259. /package/skills/{adia-ui-release → adia-release}/scripts/assert-monorepo-root.mjs +0 -0
@@ -1,149 +0,0 @@
1
- ---
2
- date: 2026-04-27
3
- coverage: extended
4
- peers:
5
- - ../recipes/greenfield-setup.md
6
- - ../recipes/memory-organization.md
7
- - ../doc-types/adr-pattern.md
8
- - ../doc-types/postmortem-pattern.md
9
- primary_sources:
10
- - https://diataxis.fr/
11
- - https://www.amwa.org/page/style_guides
12
- - https://en.wikipedia.org/wiki/Series_bible
13
- - https://github.com/errata-ai/vale
14
- status: research-verified
15
- ---
16
-
17
- # Genre: prose and writing
18
-
19
- > **Premise.** ops-repo was designed for code repositories, but five of the six promises (less-wasteful, token-and-context-optimized, less-prone-to-staleness, self-healing partial, continuously-learning) translate cleanly to prose, fiction, journalism, and documentation projects. The skill works — with a vocabulary swap and one fewer trip-wire.
20
-
21
- _Last reviewed: 2026-04-27_
22
-
23
- ## Where it fits
24
-
25
- | Genre | Fit | Why |
26
- |---|---|---|
27
- | Technical documentation | Excellent | Drift-vs-code is the same concern; ADRs map 1:1 to documentation decisions |
28
- | Long-form non-fiction (book) | Excellent | Voice EDRs, source-of-fact registries, revision retrospectives all matter |
29
- | Long-form fiction (novel/series) | Excellent | "Series bible" is exactly the brain metaphor; EDRs become world-building decisions |
30
- | Academic / research writing | Strong | Citation-stale (papers retracted, replaced) is the same as live-link-stale-content |
31
- | Journalism / essays | Partial | Revision retrospectives become "what I'd revise"; EDRs less natural for one-off pieces |
32
- | Screenplay / playwriting | Partial | Character-bible decisions are EDR-shaped; but writers' rooms don't usually want the process ceremony |
33
- | Marketing / SEO copy | Low | Optimization is dominated by A/B testing; not a docs problem |
34
- | Poetry | Poor | Wrong tool. Voice is not decomposable into decision records. |
35
-
36
- ## Vocabulary translation
37
-
38
- | ops-repo (code) | Prose equivalent |
39
- |---|---|
40
- | `AGENTS.md` | `STYLE.md` or `VOICE.md` (the canonical style/voice guide) |
41
- | ADR (Architecture Decision Record) | EDR (Editorial Decision Record) — voice/POV/structure decisions |
42
- | Postmortem | Revision retrospective — "what broke in this draft" |
43
- | Runbook | Process ritual — "how I plan a chapter," "submission checklist" |
44
- | Architecture overview | Series bible / world bible (fiction) or content map (docs) |
45
- | Trip-wire | Editorial gate (e.g., "no draft published without sensitivity check") |
46
- | Audit | Manuscript health check |
47
- | Browserslist baseline | House-style baseline (AP, Chicago, NYT, brand-specific) |
48
-
49
- ## Folder layout (prose adaptation)
50
-
51
- ```
52
- .brain/
53
- ├── config.toml
54
- ├── edrs/ # editorial decision records (was adrs/)
55
- │ ├── 0001-pov-third-limited.md
56
- │ ├── 0002-no-second-person.md
57
- │ └── 0003-style-guide-AP-not-Chicago.md
58
- ├── retrospectives/ # was postmortems/
59
- │ ├── draft-1-feedback-synthesis.md
60
- │ └── reader-survey-q1.md
61
- ├── rituals/ # was runbooks/
62
- │ ├── chapter-planning.md
63
- │ └── pre-submission-checklist.md
64
- ├── bible/ # was architecture/
65
- │ ├── characters.md
66
- │ ├── world.md
67
- │ └── timeline.md
68
- ├── archive/ # superseded EDRs, abandoned drafts (not deleted)
69
- └── audit-history/ # manuscript-health JSON ledgers
70
- ```
71
-
72
- The dotfile prefix is *more* useful for prose than for code: drafts live at the repo root or in `chapters/` / `posts/`, and `.brain/` is structurally clearly the "out of band" memory layer that humans curate but don't read every day.
73
-
74
- ## Promise-by-promise applicability
75
-
76
- | Promise | Applies to prose? | How |
77
- |---|---|---|
78
- | 1. Less-wasteful | Yes | Style-guide drift detection (one canonical, no duplicated style rules across files) |
79
- | 2. Token-and-context-optimized | Yes | Prose has the same agent-context-window problem; STYLE.md ≤200 lines |
80
- | 3. Less-prone-to-staleness | Yes | Citation rot, character-name conflicts across drafts, world-bible vs current-draft drift |
81
- | 4. Self-healing | Partial | Pre-commit hooks for spelling/style work (Vale, markdownlint); but most prose tooling is editor-internal not git-hook-internal |
82
- | 5. Continuously-learning | Yes | Voice/POV decisions accumulate; series spans years; humans curate the editorial log |
83
- | Reliability dial | Yes | A novelist working alone uses `lax`; a magazine staff with multiple writers uses `strict` |
84
-
85
- ## What translates as-is
86
-
87
- - `../standards/agents-md-spec.md` — replace `AGENTS.md` → `STYLE.md`; the 8-section skeleton works (Project overview = book/series overview, Build/test/run = build commands for the manuscript build, Conventions = style rules, etc.)
88
- - `../audit-patterns/orphan-detection.md` — orphan files in `.brain/` not reachable from STYLE.md
89
- - `../audit-patterns/redundancy-detection.md` — same style rule repeated in two files
90
- - `../audit-patterns/format-hygiene.md` — every EDR has a date and status
91
- - `../audit-patterns/staleness-tooling.md` — Vale, lychee work for prose too (Vale is *primarily* a prose tool)
92
- - `../audit-patterns/token-waste-detection.md` — STYLE.md bloat is the same problem
93
- - `../recipes/self-healing-hooks.md` — Vale + spell + style-rule hooks instead of code linters
94
- - `../recipes/audit-existing-repo.md` — survey an existing manuscript repo
95
- - `../recipes/cold-start-harvest.md` — same procedure for an old manuscript with style notes scattered everywhere
96
- - `../guidance/context-budget.md` — same math; agent context is finite
97
- - `../guidance/reliability-dial.md` — strictness picker
98
-
99
- ## What needs translation
100
-
101
- - `../doc-types/adr-pattern.md` → EDR pattern. Change the `## Status` allowed values to `Drafted | Adopted | Superseded | Abandoned`. Keep the Y-statement / MADR templates.
102
- - `../doc-types/postmortem-pattern.md` → revision retrospective. Replace "incident timeline" with "draft timeline"; keep "blameless" and "what we'd do differently."
103
- - `../doc-types/architecture-md.md` → series bible. matklad's pattern translates: "what is where in this story-world."
104
- - `../doc-types/decisions-log.md` → editorial decision log.
105
-
106
- ## What doesn't apply
107
-
108
- - `../standards/cross-tool-matrix.md` — Cursor/Codex/Devin don't have prose equivalents. Use Claude/ChatGPT/Cursor-for-prose; one entry file (STYLE.md) plus one tool-specific pointer is enough.
109
- - `../audit-patterns/entry-file-coverage.md` — partial. Fewer entry-file conventions in prose; just STYLE.md.
110
- - `../audit-patterns/memory-fragmentation.md` — partial. Less likely to fragment when one author works alone.
111
-
112
- ## When NOT to use ops-repo for prose
113
-
114
- - Single short essay or a one-week project. Overhead exceeds benefit.
115
- - Pure ideation / brainstorming. Premature structuring kills exploration.
116
- - Marketing copy where the "right answer" comes from A/B tests, not editorial decisions.
117
- - Poetry. Voice is not decomposable into decision records.
118
-
119
- ## Examples in the wild
120
-
121
- - **Fiction series bibles** — Brandon Sanderson's wikis, the WGA "showrunner bible" pattern — these are exactly `architecture-md.md` content, just predating the convention.
122
- - **House style guides** — Chicago, AP, NYT, The Economist — these are STYLE.md / EDR collections.
123
- - **Diátaxis / Divio documentation framework** — already practices most of ops-repo's promises; this skill names what's already happening in well-run docs orgs.
124
-
125
- ## Greenfield prose setup (analogue of `recipes/greenfield-setup.md`)
126
-
127
- Drop these files at the repo root of a manuscript or docs repo:
128
-
129
- ```
130
- STYLE.md # canonical style/voice guide (≤200 lines)
131
- .brain/
132
- ├── config.toml
133
- ├── edrs/0001-record-editorial-decisions.md # bootstrap EDR
134
- ├── retrospectives/.gitkeep
135
- ├── rituals/.gitkeep
136
- ├── bible/.gitkeep
137
- └── archive/.gitkeep
138
- .github/pull_request_template.md # "Editorial impact" checkbox
139
- ```
140
-
141
- The 5 promises ship from day one. EDR 0001 records the decision to use EDRs, exactly mirroring ADR 0001 in the code-greenfield recipe.
142
-
143
- ## Cross-references
144
-
145
- - AGENTS.md spec (the analogue of STYLE.md): `../standards/agents-md-spec.md`
146
- - Greenfield setup (procedural): `../recipes/greenfield-setup.md`
147
- - Memory organization (folder layout rationale): `../recipes/memory-organization.md`
148
- - ADR pattern (the EDR template): `../doc-types/adr-pattern.md`
149
- - Reliability dial: `../guidance/reliability-dial.md`
@@ -1,137 +0,0 @@
1
- ---
2
- date: 2026-04-27
3
- coverage: canonical
4
- peers:
5
- - llm-doc-writing.md
6
- - ../audit-patterns/token-waste-detection.md
7
- - ../standards/agents-md-spec.md
8
- primary_sources:
9
- - https://code.claude.com/docs/en/best-practices — Anthropic's CLAUDE.md guidance
10
- - https://docs.anthropic.com/en/docs/about-claude/models — Claude model context windows
11
- - https://github.blog/ai-and-ml/github-copilot/how-to-write-a-great-agents-md-lessons-from-over-2500-repositories/
12
- status: research-verified
13
- ---
14
-
15
- # Context budget (delivers Promise 2)
16
-
17
- > **The premise.** Every token in AGENTS.md / CLAUDE.md / loaded docs is a token *not* available for the actual code being worked on. "Token-and-context-optimized" means treating the agent's context window as a budget — and refusing to spend it on prose that could be a link.
18
-
19
- ## The math
20
-
21
- Claude model context windows (April 2026):
22
-
23
- | Model | Context window |
24
- |---|---|
25
- | Claude Opus 4.7 | **1M tokens** (1,000,000) |
26
- | Claude Sonnet 4.6 | 200K tokens |
27
- | Claude Haiku 4.5 | 200K tokens |
28
-
29
- That sounds like a lot. It isn't — once you load:
30
-
31
- - AGENTS.md / CLAUDE.md (load every session — Anthropic loads CLAUDE.md automatically)
32
- - The files the agent is editing (often 3-10 files, 200-2000 lines each)
33
- - The files the agent is *reading* to make decisions (10-50 files easily)
34
- - Tool-call results (test output, lint errors, build logs)
35
- - The conversation transcript itself (can grow to 30K+ tokens in long sessions)
36
-
37
- A naked 800-line AGENTS.md costs **~10K tokens** — 5% of Sonnet's window, just for the entry file. If `ARCHITECTURE.md` is 1500 lines and gets loaded too, that's another 18K. Now you've spent 14% of the window on metadata before doing any work.
38
-
39
- The Opus 4.7 1M window changes the math but not the principle. **Token economy is good engineering regardless of window size** — bigger window means tokens are cheaper, not free.
40
-
41
- ## Anthropic's load-bearing rule
42
-
43
- > Keep CLAUDE.md under ~200 lines. Instruction quality decreases as count increases.
44
- >
45
- > — [Anthropic Claude Code best practices](https://code.claude.com/docs/en/best-practices)
46
-
47
- The **same ergonomic ceiling applies to AGENTS.md.** This isn't an arbitrary number — it's where empirical observation says adherence drops. Long files are skimmed, ignored, or contradicted by their own later sections.
48
-
49
- GitHub's [analysis of 2,500+ AGENTS.md files](https://github.blog/ai-and-ml/github-copilot/how-to-write-a-great-agents-md-lessons-from-over-2500-repositories/) confirms this — the most-effective files cluster around 50-150 lines.
50
-
51
- ## Layered docs (the navigability principle)
52
-
53
- The ceiling forces a structural choice: **detail goes into linked subfolders, not into the entry file**.
54
-
55
- ```
56
- AGENTS.md (~150 lines: agent persona, build/test/run, conventions, trust
57
- boundaries, where-to-find-things, memory primitives)
58
- ↓ links to
59
- ARCHITECTURE.md (~500 lines: system overview, component map,
60
- data-flow diagrams, deployment topology)
61
- ↓ links to
62
- .brain/adrs/0001-*.md (each ADR ~100 lines: one decision in depth)
63
- .brain/postmortems/2026-04-*.md (each ~150 lines: one incident)
64
- .brain/runbooks/*.md (each ~100 lines: one procedure)
65
- ```
66
-
67
- The agent loads AGENTS.md every session (~150 lines, ~2K tokens). It loads ARCHITECTURE.md *only when needed* (~7K tokens). It loads a specific ADR *only when about to make a related decision* (~1K tokens).
68
-
69
- **Total cost in the common case: 2K tokens. Total cost when deeply needed: ~10K tokens.** Compare to a flat 800-line AGENTS.md (10K every session, even when not relevant).
70
-
71
- ## The budget breakdown for a healthy repo
72
-
73
- A target shape:
74
-
75
- | Surface | Line ceiling | Token cost (approx) | When loaded |
76
- |---|---|---|---|
77
- | AGENTS.md | 200 | 2-3K | Every session |
78
- | CLAUDE.md | 15 (thin pointer or symlink) | 0-200 | Every session (Claude Code) |
79
- | README.md | 200-300 | 3-5K | Sometimes (human-facing) |
80
- | ARCHITECTURE.md | 500 | 6-8K | When agent needs system overview |
81
- | .brain/PLAN.md | 200 | 2-3K | When agent needs current priorities |
82
- | .brain/adrs/<one>.md | 100-200 | 1-3K each | When agent makes architectural decisions |
83
- | .brain/postmortems/<one>.md | 100-200 | 1-3K each | When agent debugs production issues |
84
- | .brain/runbooks/<one>.md | 100-200 | 1-3K each | When agent runs operational procedures |
85
- | `CHANGELOG.md` | (any) | varies | When agent needs version history |
86
-
87
- The rule of thumb: **anything an agent needs *every session* must be tiny; everything else can be large but must be reachable on demand**.
88
-
89
- ## What violates the budget (the trip-wires)
90
-
91
- The token-waste-detection audit (Promise 2) flags these specifically:
92
-
93
- 1. **AGENTS.md or CLAUDE.md > 200 lines** — hard cap.
94
- 2. **AGENTS.md or CLAUDE.md > 150 lines** — warning (approaching cap).
95
- 3. **A `.brain/` file > 500 lines that isn't in `.brain/adrs/`, `.brain/postmortems/`, or `.brain/architecture/`** — likely a place where one big doc should be a folder of smaller ones.
96
- 4. **Repeated content** — the same command listed in AGENTS.md, README.md, AND CONTRIBUTING.md. Pick one canonical, link from the others.
97
- 5. **Verbose prose where bullets would work** — 8 paragraphs explaining what could be a 3-bullet checklist.
98
- 6. **Generated content checked in** — TypeDoc / JSDoc / API reference generated docs that should be regenerated, not committed.
99
-
100
- ## What does NOT violate the budget
101
-
102
- - **Long ADRs** — an ADR should be as long as the decision warrants. Some are 30 lines; some are 300. Don't compress for compression's sake.
103
- - **Long post-mortems** — same: an incident with a complex root cause needs depth.
104
- - **CHANGELOG.md** — append-only history, expected to grow without bound. Agents rarely load all of it.
105
- - **Long ARCHITECTURE.md** — within reason; if it gets >1500 lines, split into `.brain/architecture/`.
106
-
107
- ## How to reduce a bloated AGENTS.md (the recipe)
108
-
109
- Bloated AGENTS.md is the most common failure. Recipe to compress:
110
-
111
- 1. **Strip "we use TypeScript" lines.** If `tsconfig.json` is present, the agent already knows.
112
- 2. **Strip personal preferences.** Move to `CLAUDE.local.md` (gitignored) or `~/.claude/CLAUDE.md` (user-global).
113
- 3. **Strip TODOs / WIP notes.** Move to `.brain/PLAN.md` and link.
114
- 4. **Strip long history / motivation.** Move to `README.md` or `ARCHITECTURE.md`.
115
- 5. **Compress prose to bullets.** "Run tests with Vitest, our preferred test runner" → "Tests: Vitest".
116
- 6. **Replace inline detail with a link.** "Our deployment uses Cloud Run with the following 14 steps..." → "Deployment: see `.brain/runbooks/deploy.md`".
117
- 7. **Audit for self-contradictions.** A file that contradicts itself is worse than incomplete.
118
- 8. **Re-read the file as if you were the agent.** Anything that doesn't change behavior gets cut.
119
-
120
- A 600-line AGENTS.md typically reduces to 120-150 lines without losing instructional value.
121
-
122
- ## The Anthropic feedback loop applied to context budget
123
-
124
- When AGENTS.md grows past 200 lines, two patterns work:
125
-
126
- **Pattern A — extract to a linked file.** A "Conventions" section growing past 30 lines becomes `.brain/CONVENTIONS.md` linked from AGENTS.md. The link is permanent; the file can grow.
127
-
128
- **Pattern B — ask Claude to compress.** "AGENTS.md is 280 lines. Compress to 180 while preserving all instructional content. Move detail to linked subfolders if needed." This is the inverse of the iterate-pattern: instead of *adding* corrections, *delete* what no longer earns its tokens.
129
-
130
- Run pattern B quarterly. The audit can prompt this with a finding: `WARN: AGENTS.md is 240 lines. Run quarterly compression pass.`
131
-
132
- ## Cross-references
133
-
134
- - LLM-doc-writing (companion guidance on content quality): `llm-doc-writing.md`
135
- - Token-waste detection (the audit pattern that catches violations): `../audit-patterns/token-waste-detection.md`
136
- - AGENTS.md spec: `../standards/agents-md-spec.md`
137
- - Self-healing hooks (the pre-commit length check): `../recipes/self-healing-hooks.md`
@@ -1,116 +0,0 @@
1
- ---
2
- date: 2026-04-27
3
- coverage: extended
4
- peers:
5
- - ../standards/agents-md-spec.md
6
- - ../standards/claude-md-convention.md
7
- primary_sources:
8
- - https://code.claude.com/docs/en/best-practices — Anthropic Claude Code best practices
9
- - https://github.blog/ai-and-ml/github-copilot/how-to-write-a-great-agents-md-lessons-from-over-2500-repositories/ — empirical study of 2,500+ AGENTS.md files
10
- - https://www.humanlayer.dev/blog/writing-a-good-claude-md
11
- status: research-verified
12
- ---
13
-
14
- # Writing AGENTS.md / CLAUDE.md content well
15
-
16
- > **The empirical case for short, specific, navigable.** Not a style guide — a set of load-bearing constraints distilled from Anthropic's own best practices and GitHub's analysis of 2,500+ AGENTS.md files in the wild.
17
-
18
- ## Length
19
-
20
- **Anthropic's own guidance for CLAUDE.md is "under ~200 lines."** The same ergonomic ceiling applies to AGENTS.md — instruction quality drops as count rises. Long files are skimmed, ignored, or contradicted by their own later sections.
21
-
22
- If you have more than 200 lines of relevant content, push detail into linked subfolders (`ARCHITECTURE.md`, `.brain/adrs/`, `.brain/runbooks/`). The entry file should *navigate to* depth, not *contain* depth.
23
-
24
- ## What to include (per GitHub's 2,500-repo study)
25
-
26
- The most-effective AGENTS.md files share these sections:
27
-
28
- 1. **Project overview** — one paragraph, what + who + why.
29
- 2. **Build / test / run commands** — exact shell commands, no prose. Wrong commands are worse than missing commands.
30
- 3. **Coding conventions** — short bullets. Style, types, formatting.
31
- 4. **Trust boundaries** — what to modify, what not to. Critical for preventing destructive edits.
32
- 5. **Where to find things** — pointers to subfolders. The skill's load-bearing recommendation.
33
- 6. **Memory primitives** — when to read ADRs, when to check post-mortems.
34
-
35
- Sections that don't help LLM agents (move elsewhere):
36
-
37
- - Long history / motivation / vision (move to `README.md` or `ARCHITECTURE.md`).
38
- - Detailed architecture diagrams (move to `ARCHITECTURE.md`; reference from AGENTS.md).
39
- - Personal preferences (move to `CLAUDE.local.md` or `~/.claude/CLAUDE.md`, gitignored).
40
-
41
- ## What to delete
42
-
43
- Per Anthropic's best-practices doc and HumanLayer's writeup:
44
-
45
- - **Delete instructions Claude already follows correctly without being told.** "Use TypeScript" in a TS-only repo is noise.
46
- - **Delete instructions that contradict each other.** Diff your own AGENTS.md for self-contradictions.
47
- - **Delete TODOs, comments, work-in-progress notes.** Use `.brain/PLAN.md` instead.
48
- - **Delete commands that fail.** A wrong `npm test` is worse than no `npm test`.
49
-
50
- ## Iteration pattern
51
-
52
- Anthropic recommends treating AGENTS.md as **live, not frozen**: when the agent makes a mistake, ask it to add a correction to AGENTS.md itself. Over a few weeks the file converges on what's load-bearing.
53
-
54
- Don't write AGENTS.md from scratch in one session — author the skeleton, then iterate by **deleting** as Claude proves it doesn't need a given line.
55
-
56
- ## Hooks > advisory text (where possible)
57
-
58
- Per Anthropic: prefer **hooks** for deterministic behavior, not AGENTS.md text. A hook always executes; advisory text is suggestion.
59
-
60
- Examples:
61
- - "Run `pnpm typecheck` before committing" → write a `pre-commit` hook in `.husky/pre-commit`.
62
- - "Don't edit `db/migrations/`" → enforce via CODEOWNERS or branch protection, not AGENTS.md prose.
63
-
64
- AGENTS.md should explain *why* and reference the hook; the hook does the work.
65
-
66
- ## The "agent persona + boundaries + commands" pattern
67
-
68
- GitHub's empirical study found this three-part shape works well:
69
-
70
- ```markdown
71
- # AGENTS.md
72
-
73
- ## You are
74
- A senior Rust engineer working on a high-throughput web service.
75
- Prioritize correctness over cleverness.
76
-
77
- ## Boundaries
78
- - DO NOT: modify `migrations/`, generated code under `gen/`, `Cargo.lock`
79
- - DO: write tests for every public function; run `cargo fmt` and `cargo clippy` before committing
80
- - ASK: before changing anything in `crates/core/`
81
-
82
- ## Commands
83
- build: `cargo build --release`
84
- test: `cargo test --workspace`
85
- lint: `cargo clippy --all-targets -- -D warnings`
86
- fmt: `cargo fmt --all -- --check`
87
- run: `cargo run --bin server`
88
-
89
- ## Where to find things
90
- - Architecture overview: `ARCHITECTURE.md`
91
- - ADRs: `.brain/adrs/`
92
- - Postmortems: `.brain/postmortems/`
93
- - Runbooks: `.brain/runbooks/`
94
- - Active plan: `.brain/PLAN.md`
95
-
96
- _Last reviewed: 2026-04-27_
97
- ```
98
-
99
- 50-60 lines. Sufficient for most repos.
100
-
101
- ## Anti-patterns (what shows up in stale AGENTS.md / CLAUDE.md)
102
-
103
- 1. **The 800-line dump.** Nobody reads it; the agent doesn't either.
104
- 2. **The "we use TypeScript" file.** Noise — it's already in `tsconfig.json`.
105
- 3. **Stale build commands.** Repo migrated to pnpm a year ago; AGENTS.md still says `npm`. The audit catches this by comparing to the lockfile.
106
- 4. **The duplicated CLAUDE.md.** AGENTS.md and CLAUDE.md both fat, drifted apart.
107
- 5. **No "Where to find things."** Naked entry; agent has nothing to navigate to.
108
- 6. **Personal preferences in the committed file.** "I like 2-space indents" → move to `CLAUDE.local.md` (gitignored).
109
- 7. **TODOs that never got done.** "// TODO: document the auth flow" sitting in AGENTS.md for a year.
110
-
111
- ## Cross-references
112
-
113
- - AGENTS.md spec: `../standards/agents-md-spec.md`
114
- - CLAUDE.md as thin pointer / symlink: `../standards/claude-md-convention.md`
115
- - Audit checks: `../audit-patterns/entry-file-coverage.md`
116
- - Staleness detection tooling: `../audit-patterns/staleness-tooling.md`
@@ -1,186 +0,0 @@
1
- ---
2
- date: 2026-04-27
3
- coverage: canonical
4
- peers:
5
- - llm-doc-writing.md
6
- - context-budget.md
7
- - ../recipes/self-healing-hooks.md
8
- - ../recipes/recommend-then-validate.md
9
- primary_sources:
10
- - Steve Yegge, "Welcome to Gas City" — https://steve-yegge.medium.com/welcome-to-gas-city-57f564bb3607
11
- - https://code.claude.com/docs/en/best-practices
12
- status: research-verified
13
- ---
14
-
15
- # Reliability dial (configurable strictness)
16
-
17
- > _"Reliability, friends, is a dial. You choose where to set it. More rounds of review, more backstops, more guardrails… you can get agentic workers to be as reliable as you need."_
18
- > — Steve Yegge, "Welcome to Gas City"
19
-
20
- ## What this delivers
21
-
22
- Yegge's load-bearing insight: trying to set one absolute level of strictness for every repo is wrong. A solo side project and a regulated production codebase need different friction. `ops-repo` exposes a single explicit knob — **strictness** — and routes every trip-wire's threshold through it.
23
-
24
- Three positions:
25
-
26
- | Position | Posture | When to use |
27
- |---|---|---|
28
- | **`lax`** | Discoverable but never blocks | Side projects, prototypes, exploration phases |
29
- | **`normal`** | Default. Pre-commit warns/fails on critical | Most production repos |
30
- | **`strict`** | Every promise's trip-wire must pass; multi-agent review required for any apply-mode fix | Regulated codebases, monorepos with many contributors, repos where doc breakage is costly |
31
-
32
- Explicit knob beats implicit severity rubric: the team picks its dial position once, in `.brain/config.toml`, and every check derives from there.
33
-
34
- ## The config file
35
-
36
- `.brain/config.toml` at repo root:
37
-
38
- ```toml
39
- [ops-repo]
40
- strictness = "normal" # lax | normal | strict
41
- version = "1.1"
42
-
43
- # Optional per-trip-wire overrides
44
- [ops-repo.overrides]
45
- entry_file_max_lines = 200 # default for "normal"; "strict" = 150
46
- orphan_grace_days = 30 # default for "normal"; "strict" = 7
47
- doc_age_threshold_days = 365 # default for "normal"; "strict" = 180
48
- ```
49
-
50
- For Node projects, equivalent block in `package.json`:
51
-
52
- ```json
53
- {
54
- "ops-repo": { "strictness": "normal" }
55
- }
56
- ```
57
-
58
- For Python projects, `pyproject.toml`:
59
-
60
- ```toml
61
- [tool.ops-repo]
62
- strictness = "normal"
63
- ```
64
-
65
- ## What each position does
66
-
67
- | Trip-wire | `lax` | `normal` | `strict` |
68
- |---|---|---|---|
69
- | **Entry-file length** | Warn >250 lines | Warn >150, fail pre-commit >200 | Fail pre-commit >150 |
70
- | **AGENTS.md/CLAUDE.md drift** | Warn | Fail pre-commit | Require symlink (`ln -s AGENTS.md CLAUDE.md`) |
71
- | **Broken intra-repo links** | Report only | Fail PR | Fail pre-commit |
72
- | **Broken external links** (lychee) | Report weekly | Fail PR | Fail PR + fail pre-commit |
73
- | **Doc frontmatter dates** | Suggest | Require on new docs | Require on all docs; review every 365d |
74
- | **Orphan grace period** | 90 days | 30 days | 7 days |
75
- | **AGENTS.md "Memory primitives" section** | Recommend | Require | Require + fail audit if missing |
76
- | **`.brain/adrs/` for repos > 1 year old** | Recommend | Recommend (medium severity) | Required (high severity) |
77
- | **Apply-mode fixes** | Single agent | Single agent | Recommend agent + validate agent (see `../recipes/recommend-then-validate.md`) |
78
- | **Auto-archive PR** | Manual review | Manual review | Multi-agent review |
79
-
80
- ## Choosing your position
81
-
82
- The dial is **not a quality scale**. `lax` isn't bad and `strict` isn't good. They're matched to *cost of failure*.
83
-
84
- ```
85
- cost of doc breakage to your team
86
- low ←───────────────────────────────────────→ high
87
-
88
- lax normal strict
89
- │ │ │
90
- solo prototype most production repos monorepo, regulated,
91
- high-stakes shared codebase
92
- ```
93
-
94
- If `strict` causes more friction than it prevents, you're at the wrong position. Try `normal` first.
95
-
96
- ## Git sync (where the brain lives)
97
-
98
- By default, `.brain/` is committed to git — the brain *is* shared across the team. But not every team wants this. Solo developers, research notebooks, individual scratch repos, or teams that sync memory through a non-git mechanism (internal wiki, S3, Notion) may prefer to keep `.brain/` local.
99
-
100
- Two modes:
101
-
102
- | Mode | What gets committed | Promise 5 (continuously-learning) | When to use |
103
- |---|---|---|---|
104
- | **`shared`** (default) | `.brain/{adrs,postmortems,runbooks,archive,architecture,audit-history,changesets,config.toml}` (`cache/` + `cold-start/working/` always gitignored) | Applies to the team — artifacts compound across contributors | Most repos with >1 contributor |
105
- | **`local-only`** | Nothing in `.brain/` is committed; entire `.brain/` is gitignored | Applies to **your local clone only** — your individual brain compounds; the team's doesn't | Solo, prototypes, or repos where memory syncs via a non-git system |
106
-
107
- Configure in `.brain/config.toml`:
108
-
109
- ```toml
110
- [ops-repo.git-sync]
111
- mode = "shared" # shared | local-only
112
- ```
113
-
114
- Default is `shared` — when omitted, behavior is identical to v1.5.0.
115
-
116
- ### What `local-only` changes
117
-
118
- When `mode = "local-only"`:
119
-
120
- - `.gitignore` should include `.brain/` at the top (greenfield adds this automatically when configured).
121
- - Every contributor maintains their own `.brain/`. Your ADRs are not your teammate's ADRs.
122
- - The **auto-archive PR workflow is disabled** (no PRs because nothing is tracked).
123
- - The audit-history-ledger remains useful as a *local* diagnostic but is not a SOC2-grade shared trail.
124
- - The `concurrent-learnings-merge.md` recipe is irrelevant (no shared brain to merge into).
125
- - The `cold-start-harvest.md` recipe is irrelevant (no shared brain to import into).
126
- - Promise 5 still applies — but to *you*, not the team.
127
-
128
- Switching `local-only` → `shared` later: remove `.brain/` from `.gitignore`, set `mode = "shared"`, then `git add .brain/` to stage what you've accumulated. The reverse direction (`shared` → `local-only`) requires deciding what to do with already-committed artifacts (typically: leave them committed for history; new artifacts go local).
129
-
130
- ### Granular per-subdir sync (advanced)
131
-
132
- Some teams want finer control — e.g., share ADRs but keep `audit-history/` local-only (less PR noise; the SOC2 trail kept on a separate machine):
133
-
134
- ```toml
135
- [ops-repo.git-sync]
136
- mode = "shared"
137
-
138
- [ops-repo.git-sync.committed]
139
- adrs = true
140
- postmortems = true
141
- runbooks = true
142
- archive = true
143
- architecture = true
144
- changesets = true
145
- config = true # config.toml itself
146
- audit-history = false # opt out of committing audit-history; stays local
147
- ```
148
-
149
- Defaults match the `shared` mode table above. The audit warns if a subdir is gitignored when the chosen mode says it should be committed (or vice versa).
150
-
151
- ### Why this is separate from strictness
152
-
153
- Strictness controls *how loud* the audit/hooks are. Git-sync controls *where the brain lives*. The two are orthogonal:
154
-
155
- - A **`local-only` + `strict`** brain is fine — you take your own notes very seriously.
156
- - A **`shared` + `lax`** brain is fine — the team gathers but doesn't enforce.
157
- - A **`shared` + `strict`** brain is the regulated-codebase posture (the original v1.1 default).
158
- - A **`local-only` + `lax`** brain is the personal-scratch posture.
159
-
160
- ## How the audit honors the dial
161
-
162
- When the audit runs, it loads `.brain/config.toml` and threshold-routes every check. Findings include the dial position they were evaluated against:
163
-
164
- ```markdown
165
- - **DRIFT — CLAUDE.md vs AGENTS.md** (severity: critical, evaluated at strictness=strict)
166
- - At `lax`: would have been a warning.
167
- - At `normal`: would have failed pre-commit.
168
- - At `strict`: requires symlink. Recommended fix: `ln -s AGENTS.md CLAUDE.md`.
169
- ```
170
-
171
- This makes the dial *visible*, not just operative — when a finding fires, the team can see whether re-tuning the dial is the right answer or fixing the issue is.
172
-
173
- ## Anti-patterns
174
-
175
- - **Setting `strict` and ignoring half the trip-wires.** Inconsistent. Either commit to the position or move to `normal`.
176
- - **Setting `lax` permanently as a way to silence findings.** That defeats the purpose. Lax is for prototypes; if a real repo lives at `lax` for a year, escalate.
177
- - **Per-file overrides everywhere.** Override sparingly. The defaults exist because they're empirically reasonable; per-file exceptions become drift over time.
178
- - **Changing the dial mid-PR to make a check pass.** The dial belongs to the team and the repo, not to a single change.
179
-
180
- ## Cross-references
181
-
182
- - The trip-wires themselves: `../recipes/self-healing-hooks.md`
183
- - Recommend-then-validate (the multi-agent pattern `strict` requires): `../recipes/recommend-then-validate.md`
184
- - Token-budget defaults (entry-file lengths): `context-budget.md`
185
- - LLM-doc-writing (content quality): `llm-doc-writing.md`
186
- - Audit history (where the dial position is recorded per run): `../audit-patterns/audit-history-ledger.md`