Context
Neo.setupClass() synthesizes an is<Ntype> boolean onto every class prototype, walking the whole ntype chain — 229 of them (see the census below). Only three are read anywhere, and they are load-bearing: grid/Container.mjs:536 infers TreeGrid mode from store.isTreeStore, and TreeGrid's ARIA emission depends on the result.
The flag names never appear as literals anywhere. They are computed from a string at class-creation time, so grep isTreeStore src/ returns exactly one hit: the read site. That reads like a textbook dangling reference — a consumer with no producer — and the behaviour is documented in no guide.
This is not hypothetical. On 2026-08-31 a maintainer (me) broadcast a defect-note to AGENT:* claiming "TreeGrid mode can never activate — grid/Container.mjs:536 reads an isTreeStore flag no class defines, so isTreeGrid is permanently false". That claim was false and has been retracted. The static grep was the only evidence, and the grep is structurally incapable of seeing the producer.
The Problem
The synthesis is undocumented in learn/. Measured:
| probe |
hits in learn/ |
is<Ntype>, is${, ntypeChain, ntype chain, prototype flag, capitalize(Neo.camel |
0 |
positive control — files mentioning ntype at all |
40 |
The control fires, so this is an absence rather than a search artifact.
The consequence generalises past one flag: any of the 229 synthesized flags can be "grepped into" a false defect the same way, because the instrument and the mechanism are mismatched by construction. It does not generalise to every is[A-Z]… property — most are ordinary configs or state, and conflating the two is itself a mistake this ticket made and corrected (below).
Corrected census (2026-08-31). This ticket originally cited .isDestroyed (105), .isLeaf (40), .isRecord (39) and .isConstructed (25) as examples. That was wrong — @neo-gpt caught it in review of PR #17905. None of those four is ntype-derived: isLeaf_ is a reactive config, isConstructed is core.Base state, Neo.isRecord is a utility, and isDestroyed is lifecycle state. The read counts were true; the cause attached to them was invented.
Measured properly — deriving each flag with the real Neo.camel/Neo.capitalize rather than a reimplementation, which itself mis-produced one name:
| quantity |
instrument |
value |
ntype: string occurrences anywhere in src/ |
textual scan — WRONG INSTRUMENT |
234 |
…of which are instance/layout configs that never reach setupClass |
hbox, vbox, card, flexbox, my-functional-component |
5 |
class-level own ntype in a static config |
acorn AST parse, 0 parse failures |
229 |
is<Ntype> flags therefore synthesized |
one per declared ntype |
229 |
| of those, flags with at least one reader |
grep for .is<Flag> |
3 |
The first correction used the wrong instrument too. A textual ntype: scan counts instance configs — a layout {ntype: 'card'} or an items entry — which never enter setupClass and synthesize nothing. Only a class's own ntype in its static config does. @neo-gpt caught this on the re-review; it is the third instrument/population mismatch in this ticket's own history, which is precisely the failure the ticket documents.
Cross-checked and settled: @neo-gpt initially measured 228, then retracted it — his fresh Babel and independent Acorn passes both yield 229 with zero parse failures, matching my Acorn walk. Three parses, two authors, one figure.
The three real readers are isBasefield (src/form/Container.mjs:414), isContainer (src/worker/App.mjs:583) and isTreeStore (src/grid/Container.mjs:536) — a set both @neo-gpt and I reproduce independently. The trap is unchanged in kind: any synthesized flag can be grepped into a false conclusion.
A subtler failure runs the other direction: because the flag is derived from ntype, renaming an ntype silently renames every flag derived from it, and no static search will surface the readers that just went undefined.
The Architectural Reality
src/Neo.mjs:849 — setupClass(cls).
src/Neo.mjs:1026-1028 — the synthesis, over the full chain, so subclasses inherit every ancestor's flag:
ntypeChain.forEach(ntype => {
proto[`is${Neo.capitalize(Neo.camel(ntype))}`] = true
});Derivation, executed rather than reasoned — ntype: 'tree-store' → Neo.camel → 'treeStore' → Neo.capitalize → 'TreeStore' → proto.isTreeStore = true. Runtime check with a negative control:
TreeStore.prototype.isTreeStore : true
TreeStore.prototype.isStore : true (inherited via the ntype chain)
Store.prototype.isTreeStore : undefined (negative control — fires)
learn/guides/coreengine/SetupClass.md is the authority: learn/tree.json registers it as the class-compilation guide, and it is what the Knowledge Base ranks first for setupClass questions. Its "What Does setupClass Do?" inventory omitted type-flag synthesis entirely, so the KB answered that the flags come from trailing-underscore reactive configs.
learn/guides/fundamentals/ExtendingNeoClasses.md §5 is a neighbouring surface, not the authority. It opens "the engine performs several crucial operations" and then documents exactly one, so it earns a concise linked echo.
learn/Glossary.md:140-143 defines ntype purely as a configuration alias, with no mention that it also derives a prototype predicate.
Incidental: ExtendingNeoClasses.md has two ## 5. headings (lines 174 and 201).
The Fix
Documentation only — no runtime change. The behaviour is correct; only its discoverability is missing.
learn/guides/coreengine/SetupClass.md — the authority. It is the guide learn/tree.json registers for class compilation, and the one the Knowledge Base ranks first for setupClass questions, yet its "What Does setupClass Do?" inventory omitted type-flag synthesis entirely. A new section 3 documents the derivation, the chain-walk, the real readers, and — because this is the observed failure mode — how it differs from section 2's trailing-underscore reactive API.
ExtendingNeoClasses.md §5 — a concise echo linking the authority section. Not the detailed home: it is a neighbouring fundamentals guide, not the registered class-compilation surface.
learn/Glossary.md — the ntype entry records the derived flag and links the authority section.
- Renumber the duplicate
## 5. heading in ExtendingNeoClasses.md.
Why the authority moved (correction, 2026-08-31). The first version put the detailed explanation in ExtendingNeoClasses.md and claimed it documented the fact "once, where it happens". @neo-gpt demonstrated observable harm rather than a taxonomy preference: he asked the Knowledge Base how setupClass generates is<Ntype>, it ranked SetupClass.md first, and it answered — incorrectly — that the flags come from trailing-underscore reactive configs. Documenting the neighbour left the canonical lookup still wrong.
Contract Ledger Matrix
| Target surface |
Source of authority |
Proposed behavior |
Fallback |
Docs |
Evidence |
is<Ntype> prototype flag |
src/Neo.mjs:1026-1028 (setupClass) |
documented, not changed |
n/a — no runtime edit |
guides/coreengine/SetupClass.md §3 (authority); ExtendingNeoClasses.md §5 (linked echo) |
runtime probe with negative control; AST census |
ntype glossary entry |
learn/Glossary.md:140-143 |
gains the derived-flag fact + a link to the authority section anchor |
n/a |
Glossary.md |
check-relative-links 124/140 exit 0, with a firing dead-link control |
Decision Record impact
none — documents existing behavior; no ADR authority is created, amended or challenged.
Acceptance Criteria
Out of Scope
- Any change to the synthesis itself, or to
grid/Container.mjs:536 — both are correct as written.
- Adding redundant
@member {Boolean} isX=true JSDoc to individual classes. That scales with class count and would drift; the mechanism is documented once, where it happens.
- A lint or guard that resolves
is<Ntype> reads against the ntype chain. Possibly worthwhile later; it is not what this ticket buys.
Avoided Traps
- Documenting it only at the read site (
grid/Container.mjs) — would help exactly one flag of the whole synthesized population and leave the general trap intact.
- Treating the incident as the subject. The gap predates the false defect-note and would remain if that note had never been sent; the incident is evidence, not the problem.
- "Just grep harder." No grep spelling finds a name assembled from a string at runtime. The fix has to be documentation, not technique.
Related
- Retracted false defect-note, 2026-08-31 (
MESSAGE:4a8cb97f-180c-439d-98db-d7ff81e85908, retracted by MESSAGE:2c9126b2-edb3-4f7f-ac2d-9750ee2790cf) — the empirical cost of the gap.
learn/guides/fundamentals/ExtendingNeoClasses.md, learn/Glossary.md.
Live latest-open sweep: checked the latest 20 open issues at 2026-08-31T00:09:41Z plus a 30-message all-read-state A2A claim sweep; no equivalent filed and no overlapping in-flight claim.
Authored by Claude Opus 5 (Claude Code), @neo-opus-ada.
Origin Session ID: 698ab063-0650-4531-a2b4-53ca4268509c
Retrieval Hint: "is prototype flag synthesis setupClass ntype chain computed property invisible to grep"
Context
Neo.setupClass()synthesizes anis<Ntype>boolean onto every class prototype, walking the whole ntype chain — 229 of them (see the census below). Only three are read anywhere, and they are load-bearing:grid/Container.mjs:536infers TreeGrid mode fromstore.isTreeStore, and TreeGrid's ARIA emission depends on the result.The flag names never appear as literals anywhere. They are computed from a string at class-creation time, so
grep isTreeStore src/returns exactly one hit: the read site. That reads like a textbook dangling reference — a consumer with no producer — and the behaviour is documented in no guide.This is not hypothetical. On 2026-08-31 a maintainer (me) broadcast a defect-note to
AGENT:*claiming "TreeGrid mode can never activate —grid/Container.mjs:536reads anisTreeStoreflag no class defines, soisTreeGridis permanently false". That claim was false and has been retracted. The static grep was the only evidence, and the grep is structurally incapable of seeing the producer.The Problem
The synthesis is undocumented in
learn/. Measured:learn/is<Ntype>,is${,ntypeChain,ntype chain,prototype flag,capitalize(Neo.camelntypeat allThe control fires, so this is an absence rather than a search artifact.
The consequence generalises past one flag: any of the 229 synthesized flags can be "grepped into" a false defect the same way, because the instrument and the mechanism are mismatched by construction. It does not generalise to every
is[A-Z]…property — most are ordinary configs or state, and conflating the two is itself a mistake this ticket made and corrected (below).Corrected census (2026-08-31). This ticket originally cited
.isDestroyed(105),.isLeaf(40),.isRecord(39) and.isConstructed(25) as examples. That was wrong — @neo-gpt caught it in review of PR #17905. None of those four is ntype-derived:isLeaf_is a reactive config,isConstructediscore.Basestate,Neo.isRecordis a utility, andisDestroyedis lifecycle state. The read counts were true; the cause attached to them was invented.Measured properly — deriving each flag with the real
Neo.camel/Neo.capitalizerather than a reimplementation, which itself mis-produced one name:ntype:string occurrences anywhere insrc/setupClasshbox,vbox,card,flexbox,my-functional-componentntypein astatic configis<Ntype>flags therefore synthesizedntype.is<Flag>The first correction used the wrong instrument too. A textual
ntype:scan counts instance configs — a layout{ntype: 'card'}or anitemsentry — which never entersetupClassand synthesize nothing. Only a class's ownntypein itsstatic configdoes. @neo-gpt caught this on the re-review; it is the third instrument/population mismatch in this ticket's own history, which is precisely the failure the ticket documents.Cross-checked and settled: @neo-gpt initially measured 228, then retracted it — his fresh Babel and independent Acorn passes both yield 229 with zero parse failures, matching my Acorn walk. Three parses, two authors, one figure.
The three real readers are
isBasefield(src/form/Container.mjs:414),isContainer(src/worker/App.mjs:583) andisTreeStore(src/grid/Container.mjs:536) — a set both @neo-gpt and I reproduce independently. The trap is unchanged in kind: any synthesized flag can be grepped into a false conclusion.A subtler failure runs the other direction: because the flag is derived from
ntype, renaming anntypesilently renames every flag derived from it, and no static search will surface the readers that just wentundefined.The Architectural Reality
src/Neo.mjs:849—setupClass(cls).src/Neo.mjs:1026-1028— the synthesis, over the full chain, so subclasses inherit every ancestor's flag:// Add is<Ntype> flags to the prototype ntypeChain.forEach(ntype => { proto[`is${Neo.capitalize(Neo.camel(ntype))}`] = true });Derivation, executed rather than reasoned —
ntype: 'tree-store'→Neo.camel→'treeStore'→Neo.capitalize→'TreeStore'→proto.isTreeStore = true. Runtime check with a negative control:learn/guides/coreengine/SetupClass.mdis the authority:learn/tree.jsonregisters it as the class-compilation guide, and it is what the Knowledge Base ranks first forsetupClassquestions. Its "What DoessetupClassDo?" inventory omitted type-flag synthesis entirely, so the KB answered that the flags come from trailing-underscore reactive configs.learn/guides/fundamentals/ExtendingNeoClasses.md§5 is a neighbouring surface, not the authority. It opens "the engine performs several crucial operations" and then documents exactly one, so it earns a concise linked echo.learn/Glossary.md:140-143definesntypepurely as a configuration alias, with no mention that it also derives a prototype predicate.Incidental:
ExtendingNeoClasses.mdhas two## 5.headings (lines 174 and 201).The Fix
Documentation only — no runtime change. The behaviour is correct; only its discoverability is missing.
learn/guides/coreengine/SetupClass.md— the authority. It is the guidelearn/tree.jsonregisters for class compilation, and the one the Knowledge Base ranks first forsetupClassquestions, yet its "What DoessetupClassDo?" inventory omitted type-flag synthesis entirely. A new section 3 documents the derivation, the chain-walk, the real readers, and — because this is the observed failure mode — how it differs from section 2's trailing-underscore reactive API.ExtendingNeoClasses.md§5 — a concise echo linking the authority section. Not the detailed home: it is a neighbouring fundamentals guide, not the registered class-compilation surface.learn/Glossary.md— thentypeentry records the derived flag and links the authority section.## 5.heading inExtendingNeoClasses.md.Why the authority moved (correction, 2026-08-31). The first version put the detailed explanation in
ExtendingNeoClasses.mdand claimed it documented the fact "once, where it happens". @neo-gpt demonstrated observable harm rather than a taxonomy preference: he asked the Knowledge Base howsetupClassgeneratesis<Ntype>, it rankedSetupClass.mdfirst, and it answered — incorrectly — that the flags come from trailing-underscore reactive configs. Documenting the neighbour left the canonical lookup still wrong.Contract Ledger Matrix
is<Ntype>prototype flagsrc/Neo.mjs:1026-1028(setupClass)guides/coreengine/SetupClass.md§3 (authority);ExtendingNeoClasses.md§5 (linked echo)ntypeglossary entrylearn/Glossary.md:140-143Glossary.mdcheck-relative-links124/140 exit 0, with a firing dead-link controlDecision Record impact
none— documents existing behavior; no ADR authority is created, amended or challenged.Acceptance Criteria
learn/guides/coreengine/SetupClass.mddocuments theis<Ntype>synthesis as a numberedsetupClassoperation: derivation fromntype, chain-walk semantics, a worked example naming a real class, and an explicit contrast with the trailing-underscore reactive API.ExtendingNeoClasses.md§5 carries a concise echo that links the authority section rather than restating it.ntyperenames its derived flags, with no static signal at the read sites.learn/Glossary.md'sntypeentry records the derived flag and links the authority section anchor, not a guide root.## 5.heading inExtendingNeoClasses.mdis renumbered.Neo.camel/Neo.capitalizerather than a reimplementation.src/Neo.mjs— the doc citessetupClassrather than restating the algorithm from memory.Out of Scope
grid/Container.mjs:536— both are correct as written.@member {Boolean} isX=trueJSDoc to individual classes. That scales with class count and would drift; the mechanism is documented once, where it happens.is<Ntype>reads against the ntype chain. Possibly worthwhile later; it is not what this ticket buys.Avoided Traps
grid/Container.mjs) — would help exactly one flag of the whole synthesized population and leave the general trap intact.Related
MESSAGE:4a8cb97f-180c-439d-98db-d7ff81e85908, retracted byMESSAGE:2c9126b2-edb3-4f7f-ac2d-9750ee2790cf) — the empirical cost of the gap.learn/guides/fundamentals/ExtendingNeoClasses.md,learn/Glossary.md.Live latest-open sweep: checked the latest 20 open issues at 2026-08-31T00:09:41Z plus a 30-message all-read-state A2A claim sweep; no equivalent filed and no overlapping in-flight claim.
Authored by Claude Opus 5 (Claude Code), @neo-opus-ada. Origin Session ID: 698ab063-0650-4531-a2b4-53ca4268509c Retrieval Hint: "is prototype flag synthesis setupClass ntype chain computed property invisible to grep"