Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
a7979ab
docs(plan): add M24, the boundaries
jgrodziski Nov 27, 2026
533c3aa
feat(core): name the member on an edge to a stub
jgrodziski Nov 27, 2026
47691c4
feat(analyzer): carry the edge member to model.db
jgrodziski Nov 27, 2026
b79de8e
feat(cli): count the members named in validate
jgrodziski Nov 27, 2026
d341f43
feat(model-rs): write an edge's member as core does
jgrodziski Nov 27, 2026
6acc6fd
test(metrics): keep an edge's member through the pass
jgrodziski Nov 27, 2026
995efd5
feat(core): note in each profile it names no member
jgrodziski Nov 27, 2026
41bbd0b
docs: record MM-6, the member on an edge to a stub
jgrodziski Nov 27, 2026
e5cbd78
docs: pin MM-6's evidence to the base line numbers
jgrodziski Nov 27, 2026
6194015
feat(insights): record the lines a slice shows
jgrodziski Nov 27, 2026
aff65b4
feat(insights): check anchors in a walk's answer
jgrodziski Nov 27, 2026
8d6ac5d
feat(insights): present walk records as claims
jgrodziski Nov 27, 2026
a6275a9
feat(cli): add insights --claims
jgrodziski Nov 27, 2026
348fd76
docs(insights): record IN-10, checked fields
jgrodziski Nov 27, 2026
981e196
feat(insights): number source lines of anchored levels
jgrodziski Nov 27, 2026
5fea12b
docs(insights): say anchored source is numbered
jgrodziski Nov 27, 2026
ce239ce
Merge branch 'm24/a-core' into feat/m24-boundaries
jgrodziski Nov 28, 2026
af1bf51
docs(plan): record M24a core and M24d as built
jgrodziski Nov 28, 2026
9ead3d9
feat(analyzer): apply boundary rules, reach
jgrodziski Nov 28, 2026
bc8e28c
test(cli): hold boundaries to M23's query files
jgrodziski Nov 28, 2026
f6d717b
feat(extractor-elixir): name the member on stubs
jgrodziski Nov 28, 2026
02be112
docs(extractor-elixir): state the member spelling
jgrodziski Nov 28, 2026
1ad2809
feat(extractor-java): name the member on stub edges
jgrodziski Nov 28, 2026
a73fefe
docs(java): state the member spelling
jgrodziski Nov 28, 2026
318e3bf
feat(cli): add the three boundary reports
jgrodziski Nov 28, 2026
ffbdcd2
fix(cli): say "1 edge crosses", strip members
jgrodziski Nov 28, 2026
681244c
docs: document boundaries files and reports
jgrodziski Nov 28, 2026
1cba567
fix(insights): fold edges that differ by member
jgrodziski Nov 28, 2026
1a671d0
Merge branch 'm24/b-reports' into feat/m24-boundaries
jgrodziski Nov 28, 2026
6fabd4e
feat(extractor-elixir): name stub struct fields
jgrodziski Nov 28, 2026
33c3386
docs(extractor-elixir): state stub field accesses
jgrodziski Nov 28, 2026
7120e0e
Merge branch 'm24/a-elixir' into feat/m24-boundaries
jgrodziski Nov 28, 2026
c8f08c3
docs: correct MM-6 on the fixture's repeats
jgrodziski Nov 28, 2026
eecc690
feat(core): state whether a producer merges edges
jgrodziski Nov 28, 2026
8e7d700
fix(insights): fold members only for a set producer
jgrodziski Nov 28, 2026
600652f
feat(analyzer): entry, outbound and rule terms
jgrodziski Nov 28, 2026
cd6eb39
feat(insights): roots and reach select by distance
jgrodziski Nov 28, 2026
c89ac6b
feat(extractor-ts): name the member on stub edges
jgrodziski Nov 28, 2026
a85baf6
docs(profiles): state the ts member spelling
jgrodziski Nov 28, 2026
2415e2e
feat(cli): --roots, --max-depth, --via, --boundaries
jgrodziski Nov 28, 2026
ccd805f
docs: reach as selection and boundary terms
jgrodziski Nov 28, 2026
e24a5c8
test(extractor-ts): no member on a corpus merge
jgrodziski Nov 28, 2026
d337fcd
Merge branch 'm24/a-java' into feat/m24-boundaries
jgrodziski Nov 28, 2026
9fc8b68
Merge branch 'm24/c-reach' into feat/m24-boundaries
jgrodziski Nov 28, 2026
9b1f1f5
Merge branch 'm24/a-typescript' into feat/m24-boundaries
jgrodziski Nov 28, 2026
7ffa3cb
docs(plan): record M24a extractors, M24b, M24c
jgrodziski Nov 28, 2026
dbd4ef4
test(cli): count the Changeset accesses
jgrodziski Nov 28, 2026
d2bc9bf
docs(profiles): date the ts member count
jgrodziski Nov 28, 2026
d6fb57b
feat(insights): a walk order turned over
jgrodziski Nov 28, 2026
f70d26e
feat(insights): direction, layering, quotes keys
jgrodziski Nov 28, 2026
584aa7c
feat(extractor-ruby): name stub members on calls
jgrodziski Nov 28, 2026
bb96a21
docs: state Ruby's member spelling (MM-6)
jgrodziski Nov 28, 2026
d844a47
feat(insights): a walk may show stub members
jgrodziski Nov 28, 2026
5c284cd
feat(plugin): ship three walk definitions
jgrodziski Nov 28, 2026
5a1c476
feat(extractor-csharp): name the member on stubs
jgrodziski Nov 28, 2026
f16bb36
docs(plugin): point the steps at the shipped walks
jgrodziski Nov 28, 2026
de8761a
docs(core): state the C# member spelling
jgrodziski Nov 28, 2026
1279157
docs: context.members and the shipped walks
jgrodziski Nov 28, 2026
22d1bf7
docs(insights): IN-12, members and shipped walks
jgrodziski Nov 28, 2026
0a5c363
feat(insights): what reaches a unit, and quotes
jgrodziski Nov 28, 2026
c796064
feat(insights): a down walk's header says so
jgrodziski Nov 28, 2026
4a57b73
test(extractor-ruby): format the MM-6 tests
jgrodziski Nov 28, 2026
cece4e7
feat(extractor-python): name stub members on edges
jgrodziski Nov 28, 2026
31cefeb
docs: state Python's member spelling (MM-6)
jgrodziski Nov 28, 2026
182f149
feat(cli): walk --direction down, --quotes
jgrodziski Nov 28, 2026
bc4de83
docs: a walk turned over, and quoting
jgrodziski Nov 28, 2026
4be12cd
Merge branch 'feat/m24-boundaries' into m24/a-rust
jgrodziski Nov 28, 2026
f47a545
Merge branch 'm24/a-rust' into feat/m24-boundaries
jgrodziski Nov 28, 2026
c742ea7
Merge feat/m24-boundaries into m24/a-csharp
jgrodziski Nov 28, 2026
7257008
docs: no nested fence in IN-12's prompt excerpt
jgrodziski Nov 28, 2026
f68237d
Merge branch 'm24/d-walks' into feat/m24-boundaries
jgrodziski Nov 28, 2026
acf501b
docs: the down walk is IN-13
jgrodziski Nov 28, 2026
c25312f
docs(plan): record Ruby, Python, shipped walks
jgrodziski Nov 28, 2026
51dc529
feat(extractor-csharp): name unbound receivers
jgrodziski Nov 28, 2026
d08b32e
Merge branch 'm24/f-down' into feat/m24-boundaries
jgrodziski Nov 28, 2026
8aec36a
feat(analyzer): read a proposal's header
jgrodziski Nov 28, 2026
a08f929
Merge branch 'm24/a-csharp' into feat/m24-boundaries
jgrodziski Nov 28, 2026
af1ff59
docs(plan): record C# and the down walk
jgrodziski Nov 28, 2026
98f11ad
feat(analyzer): add concept rules
jgrodziski Nov 28, 2026
afbae4d
feat(insights): propose boundaries from censuses
jgrodziski Nov 28, 2026
0ab3111
feat(insights): sample N rows per boundary rule
jgrodziski Nov 28, 2026
89d54cc
feat(insights): read the audit as a precision
jgrodziski Nov 28, 2026
cf30f1c
feat(cli): hand concept labels to the rules
jgrodziski Nov 28, 2026
addd21d
docs: state the concepts rules (BD-11)
jgrodziski Nov 28, 2026
73198b2
feat(plugin): ship the boundaries-audit walk
jgrodziski Nov 28, 2026
e362e9a
feat(cli): boundaries propose and audit
jgrodziski Nov 28, 2026
e3b2680
docs(plugin): run the audit after a proposal
jgrodziski Nov 28, 2026
fa3c79b
docs: boundaries propose, its checks and audit
jgrodziski Nov 28, 2026
2827cb3
fix(insights): name the census language plainly
jgrodziski Nov 28, 2026
bb1189d
Merge branch 'm24/e-propose' into feat/m24-boundaries
jgrodziski Nov 28, 2026
5c64a22
fix(analyzer): classify uncalled concept operations
jgrodziski Nov 28, 2026
f34bca0
docs: concepts rules find uncalled operations
jgrodziski Nov 28, 2026
e234fad
docs(plan): record boundaries propose (M24e)
jgrodziski Nov 28, 2026
cee333e
chore: merge feat/m24-boundaries
jgrodziski Nov 28, 2026
965d4a9
Merge branch 'm24/g-concepts' into feat/m24-boundaries
jgrodziski Nov 28, 2026
6b1786c
docs(plan): record rules over insights (M24g)
jgrodziski Nov 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,19 @@ node scripts/homebrew/render.mjs --version X.Y.Z --sums SHA256SUMS [--npm-sha256
# after a dependency change: node extractors/metrics/scripts/licenses.mjs > extractors/metrics/THIRD-PARTY-LICENSES.txt

./bin/codegraph analyze model.jsonl --report deps # after `pnpm -r build`
./bin/codegraph analyze model.jsonl --report entrypoints --boundaries plugin/references/stacks/spring.json [--json]
./bin/codegraph analyze model.jsonl --report outbound --boundaries FILE # one row per call into a stub a rule names
./bin/codegraph analyze model.jsonl --report reach --boundaries FILE --from entries|ID [--via facts|candidates|dispatch] [--max-depth N]
# a codegraph.boundaries/1 file (an M23 stack table reads as its inbound half): rules as data, applied in
# @codegraph/analyzer (src/boundaries/), never stored; the inventory equals entry-points.sql and the slice
# reach.sql on every fixture (boundaries-oracle.test.ts); docs/boundaries.md, website reference/boundaries
# inbound.concepts / outbound.concepts match explain's type concepts: the store beside the model is opened READ-ONLY
# ([--insights FILE] names another, on analyze, walk and explain); without one those rules are not evaluated (BD-11)
./bin/codegraph boundaries propose model.jsonl [--out FILE] --estimate # a model writes a boundaries file from censuses (two calls)
# checked on receipt: a name the census did not show, a rule with no row, dropped and listed; a broad rule flagged;
# a file a person edited is never replaced (FILE.proposed + a diff on stdout); docs/boundaries.md BD-10
./bin/codegraph boundaries audit model.jsonl --boundaries FILE [--threshold 0.8] # after the shipped walk
# plugin/walks/boundaries-audit.json (`sample`: 5 rows per inbound rule, docs/insights.md IN-14): precision per rule
./bin/codegraph serve model.jsonl # navigator + City tab at http://localhost:4177
# binds EVERY interface by default; --host 127.0.0.1 keeps it local
./bin/codegraph serve --app --data-dir DIR --extractors registry.json # the desktop app's daemon (M14a)
Expand Down Expand Up @@ -335,13 +348,25 @@ claude plugin tag plugin --push # at a release: codeg
./bin/codegraph walk model.jsonl --src DIR --prompt "…" --include 'edge:annotationUse>name:Audited' --dry-run
# your question, bottom-up, of the selected units (--include/--exclude SEL, --levels, --closure);
# every explain run flag; → model.adhoc.walk.db + .jsonl (--name N: model.N.walk.*), never explain's store
./bin/codegraph walk model.jsonl --src DIR --prompt "…" --roots entries|sources|SEL [--max-depth N] [--via facts|candidates|dispatch] --boundaries FILE --estimate
# ask only what lies within N breadth-first steps of the roots (definition keys roots, reach; docs/insights.md IN-11): the
# plan prices units and tokens per depth first; --max-calls skips the farthest. The terms entry[:KIND], outbound[:KIND],
# rule:NAME read --boundaries FILE (walk and explain; without it they are an error; docs/boundaries.md BD-9)
./bin/codegraph walk model.jsonl --src DIR --prompt "…" --name N --direction down --levels operation --roots SEL [--layering nearest|all-callers] [--max-dependents N] [--quotes explain|NAME] --dry-run
# the order turned over (docs/insights.md IN-13): an operation is asked after the operations in reach that call it and is
# shown their answers; the plan prints the cone an edit re-asks. --quotes reads another walk's store, read-only.
# A walk only: explain walks up. A definition opts in to stub members with context.members (IN-12); plugin/walks/ ships three
./bin/codegraph walk --print-definition [explain] # a codegraph.walk/1 file to start from; no model read
./bin/codegraph walk model.jsonl --src DIR --walk FILE [--name N] [--estimate] # task per level, instructions, answer fields
# output tokens per block: operation 500, type/module 620, measured on ONE PetClinic run (sonnet,
# claude-code, no field declared; module and fields unmeasured); docs/insights.md IN-9 "Cost"
./bin/codegraph explain model.jsonl --src DIR --exclude 'file:**/generated/**' --instructions @context.md
# explain customized (also --include, --levels, --closure, --walk FILE); --scope a,b = --include id:a --include id:b
./bin/codegraph insights model.jsonl --walk N [--id ID] # a walk's store (or --store FILE: whichever walk its header names)
./bin/codegraph insights model.jsonl --claims [--id ID] [--json] # every <model>.N.walk.db beside the model as claims
# (codegraph.claims/1: per entity, each declared field + walk, version, digest, model, confidence, checks lost);
# not explain's store; read-only; one unreadable store refuses the answer. A walk field "anchor" / "entity" is
# checked on receipt against what the prompt showed: a list item dropped, a field nulled (docs/insights.md IN-10)
```

## Metamodel invariants (violating these is a bug, not a style choice)
Expand Down
28 changes: 25 additions & 3 deletions METAMODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,21 @@ Rules:
a tested property of every model.
- **No self-reference:** `from ≠ to`.

**The member of a stub (MM-6).** An `invocation`, `access` or `reference`
edge whose `to` is a stub may carry `member: string`: the name of the member
it reaches, as written at the site, in the spelling the language profile
states (Elixir `insert/2`, since arity is identity there; Java `save`, the
simple name). It is a string, never an id, so no entity is made for it (§6),
and it is legal nowhere else: on another kind core's schema refuses it, and on
an edge to a corpus entity the integrity rule does — a corpus member is an
entity, and the edge points at it. It is no part of any entity's identity but
it is part of the edge's: two calls on one line to two members of one stub are
two edges, ordered by member after provenance (absent first). A consumer reads
`edge.member`; `model.db` holds it in `edge.member` and the `dep` view;
`codegraph validate` counts `members named: N of M edges to stubs`.
Decision and evidence: `docs/model-metamodel.md` MM-6. Not to be confused with
the navigator's dependency `member`, which is the corpus entity a row reaches.

![The edge in the middle: its eleven kinds in four families, its four provenance values, the entities at its ends, its anchor and the profile that licenses it](website/assets/diagrams/edges-metamodel.svg)

The relation on one sheet: an edge has exactly one kind, so at most one of a
Expand Down Expand Up @@ -390,15 +405,15 @@ Eleven kinds, in four families by what an edge connects.

| Kind | From → To | Extra attributes | Notes |
|---|---|---|---|
| `invocation` | Invocable → Invocable | `candidates` | uncertain dispatch → `provenance: dynamic-candidate` + candidates list |
| `access` | Invocable → Structural | `isRead: bool`, `isWrite: bool` | field/variable reads and writes |
| `invocation` | Invocable → Invocable | `candidates`, `member` (to a stub) | uncertain dispatch → `provenance: dynamic-candidate` + candidates list |
| `access` | Invocable → Structural | `isRead: bool`, `isWrite: bool`, `member` (to a stub) | field/variable reads and writes |
| `throws` | Invocable → Type (exception) | | a written `throw` statement whose static exception type resolved; the anchor is the throw SITE — the evidence a guard clause leaves. A declared propagation clause (Java `throws E`) is a plain `reference`, not this. Distinct from `reference` so failure exits are selectable without reading the target's kind, which a stub target cannot answer |

#### References

| Kind | From → To | Extra attributes | Notes |
|---|---|---|---|
| `reference` | Entity → Type | | type usage that is none of the above (declarations, generics, casts) |
| `reference` | Entity → Type | `member` (to a stub) | type usage that is none of the above (declarations, generics, casts) |
| `annotationUse` | Entity → Type (annotation) | `arguments: NamedArgument[]` (§1.6) | a written annotation on any entity, with its arguments. Formerly a plain `reference`; the dedicated kind both carries the values and lets a consumer select annotation usages without guessing from the target's kind — which a stub target cannot answer |

**Relations:** edges connect Entities; are licensed per Language Profile
Expand Down Expand Up @@ -502,6 +517,13 @@ folds up to its declaring type's stub. Fabricating a `class` named `bill(Order)`
to close an endpoint is the one thing stub synthesis exists to prevent — an
unresolvable member id is reported and left dangling instead.

What the fold loses is the member's **name**, and that one is kept (MM-6, §4):
an edge to a stub may say `member: "insert/2"`. The stub still has no member
entity and gains none — the string rides on the edge, so `Repo.insert/2` and
`Repo.get/2` are two edges to one stub, and `:ets.lookup` is told from
`:ets.delete` without fabricating either. Membership, closure and the stub's
shape above are unchanged.

### 6.1 Why a stub may carry a parent

The one non-degraded thing a stub type may hold is `TChildOf` — the external
Expand Down
Loading
Loading