Repository navigation
Commit c407886
fix(docs): the auto-loading codegen rule taught metadata that no longer loads
`.claude/rules/codegen-architecture.md` loads itself into a Claude Code session
on any codegen path match, unprompted. Its "Source-aware entities + projections"
section was written before the v2 source paradigm and never revisited, so the
file an agent doing codegen reads FIRST taught three spellings that are now
illegal:
- `source.dbTable` / `source.dbView` — retired subtypes (ADR-0007). There is
one subtype, `source.rdb`, and read-only-ness comes from `@kind`.
- `@name` for the physical name — it is the kind-matching alias, `@table` /
`@view` (ADR-0018).
- a projection as an `object.entity extends Program` with a view source —
which is now `ERR_ENTITY_PRIMARY_SOURCE_READONLY` outright (ADR-0028 B4b).
A read-only derived representation is `object.projection`.
Every example in that block had stopped loading. Corrected, and the dispatch
list now states the projection route contract (GET list + GET by id; write
verbs answer 405) and points at the two corpora that gate it.
`AGENTS.md` carried the same retired `source.dbView` in its file-organization
section.
Closes the gap that let it rot. `scripts/check-doc-examples.ts` exists to fail
the build when shipped metadata examples stop loading, and its SCAN_ROOTS are
described as "trees whose fenced metadata examples ship to a reader or to an
agent" — but it read only `docs` and `agent-context`. `.claude/rules` is the
most agent-facing prose in the repo and was the one such tree it did not read.
This is exactly what #337 cost in agent-context, in the one place still
unguarded. Adding the root takes the gate from 100 examples over 72 blocks to
103 over 75, all green.
Found while building the F22 projection corpus — the stale block is the
projection-authoring guidance.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015NrWUxA6euwvnFcwKxcK6A1 parent d88fc95 commit c407886
3 files changed
Lines changed: 41 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
119 | 124 | | |
120 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
121 | 133 | | |
122 | 134 | | |
123 | | - | |
| 135 | + | |
124 | 136 | | |
125 | | - | |
126 | 137 | | |
127 | | - | |
| 138 | + | |
| 139 | + | |
128 | 140 | | |
129 | 141 | | |
130 | 142 | | |
131 | 143 | | |
132 | | - | |
| 144 | + | |
133 | 145 | | |
134 | 146 | | |
135 | 147 | | |
136 | 148 | | |
137 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
138 | 152 | | |
139 | 153 | | |
140 | | - | |
141 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
142 | 159 | | |
143 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
144 | 164 | | |
145 | 165 | | |
146 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
88 | 98 | | |
89 | 99 | | |
90 | 100 | | |
| |||
0 commit comments