Skip to content

Commit 5aa3718

Browse files
committed
no-mistakes(review): Unify generator cost test wording across skills
Assisted-by: no-mistakes:claude:claude-sonnet-5-5
1 parent 492f4a3 commit 5aa3718

13 files changed

Lines changed: 53 additions & 52 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ generator catalog and the Atlas evaluation are 1.2 work.
6060

6161
### Added
6262

63-
- **Agent skills: a cost test for owned generators.** The `metaobjects-codegen` skill now says when not to write a generator: only when generator plus
64-
output is smaller than the hand-written code it replaces (generator code counted as
65-
hand-written cost), more instances of the shape are expected, or drift protection is the
63+
- **Agent skills: a cost test for owned generators.** The `metaobjects-codegen` skill now says when not to write a generator: only when generator code plus
64+
its generated output and added metadata is fewer lines than the hand-written code it
65+
replaces, more instances of the shape are expected, or drift protection is the
6666
point; a general-shape generator belongs in the library. The `metaobjects-audit` skill applies
6767
the same test: a one-off hand-written layer that fails it is reported as acceptable, and any
68-
generated-share figure must carry the net hand-written line change and is never a target.
68+
generated-share figure must carry the net hand-written line change (a figure to report, not
69+
the test) and is never a target.
6970
Documentation only; no code or generator changed.
7071
- **TypeScript: the `cube-model` reference generator (FR-044 Plan 4).** `cubeModel()` writes the
7172
reporting vocabulary as Cube data-model files, `model/cubes/<Cube>.yml`: a cube for each

‎agent-context/skills/metaobjects-audit/SKILL.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ description: Use when assessing how well a project has adopted MetaObjects — g
88
**Thesis.** Typed metadata is the durable spine; generated code is the disposable
99
artifact. Hand-writing a layer the metadata could own creates a second source of
1010
truth for one fact — it will drift. This audit hunts those second sources of truth
11-
and proposes folding them into the spine — where doing so costs fewer hand-written lines
12-
than it saves, more of that shape are coming, or silent drift is the risk. A one-off layer
11+
and proposes folding them into the spine — where the generator code plus its generated output
12+
and added metadata is fewer lines than the hand-written code it replaces, more of that shape
13+
are coming, or silent drift is the risk. A one-off layer
1314
that fails that cost test is acceptable, not a defect.
1415

1516
**Boundary — read-only.** Deliverables: `.metaobjects/adoption-audit.json` (machine-readable
@@ -51,8 +52,9 @@ Actual cutovers run through the existing skills mapped per finding tier (§ Brid
5152
Compute **leverage ratio** = `generated_lines / (metadata_lines + generator_lines)`;
5253
healthy = multi-× (example: ~4.7k spine → ~15.7k generated ≈ 3.3×). **Never report a
5354
generated-share or leverage figure alone, and never as a target:** pair it with the **net
54-
hand-written line change** (app lines removed minus generator and metadata lines added;
55-
generator code is hand-written cost). A share can rise while total hand-written code grows.
55+
hand-written line change**, a figure to report and not the cost test (hand-written lines
56+
removed minus generator and metadata lines added). A share can rise while total hand-written
57+
code grows.
5658

5759
**Coverage matrix:** per entity/projection/value — query helpers? view? routes? UI?
5860
The gap between "modeled + query helpers" and "has view + route + UI" is the headline

‎agent-context/skills/metaobjects-codegen/references/owning-generators.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ written.
5555
**Is it worth a generator? Run the cost test first.** Write an adopter-owned generator only
5656
when at least one holds:
5757

58-
1. **It is smaller.** The generator plus its emitted output, plus the metadata it adds, is
59-
fewer lines than the hand-written code it replaces. Count generator code as hand-written
60-
cost: it is code the team reads, tests and maintains. A generated-line total does not
61-
count; the emitted files cost nothing to write but the generator that makes them does.
58+
1. **It is smaller.** The generator code plus its generated output, plus the metadata it
59+
adds, is fewer lines than the hand-written code it replaces.
6260
2. **More instances are coming.** The app will keep adding entities, routes or events of this
6361
shape, so the generator's cost is paid back as the model grows.
6462
3. **Drift protection is the point.** A change to the model could pass the compiler and go

‎fixtures/agent-context-conformance/java-kotlin-react-tanstack/expected/.claude/skills/metaobjects-audit/SKILL.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ description: Use when assessing how well a project has adopted MetaObjects — g
88
**Thesis.** Typed metadata is the durable spine; generated code is the disposable
99
artifact. Hand-writing a layer the metadata could own creates a second source of
1010
truth for one fact — it will drift. This audit hunts those second sources of truth
11-
and proposes folding them into the spine — where doing so costs fewer hand-written lines
12-
than it saves, more of that shape are coming, or silent drift is the risk. A one-off layer
11+
and proposes folding them into the spine — where the generator code plus its generated output
12+
and added metadata is fewer lines than the hand-written code it replaces, more of that shape
13+
are coming, or silent drift is the risk. A one-off layer
1314
that fails that cost test is acceptable, not a defect.
1415

1516
**Boundary — read-only.** Deliverables: `.metaobjects/adoption-audit.json` (machine-readable
@@ -51,8 +52,9 @@ Actual cutovers run through the existing skills mapped per finding tier (§ Brid
5152
Compute **leverage ratio** = `generated_lines / (metadata_lines + generator_lines)`;
5253
healthy = multi-× (example: ~4.7k spine → ~15.7k generated ≈ 3.3×). **Never report a
5354
generated-share or leverage figure alone, and never as a target:** pair it with the **net
54-
hand-written line change** (app lines removed minus generator and metadata lines added;
55-
generator code is hand-written cost). A share can rise while total hand-written code grows.
55+
hand-written line change**, a figure to report and not the cost test (hand-written lines
56+
removed minus generator and metadata lines added). A share can rise while total hand-written
57+
code grows.
5658

5759
**Coverage matrix:** per entity/projection/value — query helpers? view? routes? UI?
5860
The gap between "modeled + query helpers" and "has view + route + UI" is the headline

‎fixtures/agent-context-conformance/java-kotlin-react-tanstack/expected/.claude/skills/metaobjects-codegen/references/owning-generators.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ written.
5555
**Is it worth a generator? Run the cost test first.** Write an adopter-owned generator only
5656
when at least one holds:
5757

58-
1. **It is smaller.** The generator plus its emitted output, plus the metadata it adds, is
59-
fewer lines than the hand-written code it replaces. Count generator code as hand-written
60-
cost: it is code the team reads, tests and maintains. A generated-line total does not
61-
count; the emitted files cost nothing to write but the generator that makes them does.
58+
1. **It is smaller.** The generator code plus its generated output, plus the metadata it
59+
adds, is fewer lines than the hand-written code it replaces.
6260
2. **More instances are coming.** The app will keep adding entities, routes or events of this
6361
shape, so the generator's cost is paid back as the model grows.
6462
3. **Drift protection is the point.** A change to the model could pass the compiler and go

‎fixtures/agent-context-conformance/java-react/expected/.claude/skills/metaobjects-audit/SKILL.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ description: Use when assessing how well a project has adopted MetaObjects — g
88
**Thesis.** Typed metadata is the durable spine; generated code is the disposable
99
artifact. Hand-writing a layer the metadata could own creates a second source of
1010
truth for one fact — it will drift. This audit hunts those second sources of truth
11-
and proposes folding them into the spine — where doing so costs fewer hand-written lines
12-
than it saves, more of that shape are coming, or silent drift is the risk. A one-off layer
11+
and proposes folding them into the spine — where the generator code plus its generated output
12+
and added metadata is fewer lines than the hand-written code it replaces, more of that shape
13+
are coming, or silent drift is the risk. A one-off layer
1314
that fails that cost test is acceptable, not a defect.
1415

1516
**Boundary — read-only.** Deliverables: `.metaobjects/adoption-audit.json` (machine-readable
@@ -51,8 +52,9 @@ Actual cutovers run through the existing skills mapped per finding tier (§ Brid
5152
Compute **leverage ratio** = `generated_lines / (metadata_lines + generator_lines)`;
5253
healthy = multi-× (example: ~4.7k spine → ~15.7k generated ≈ 3.3×). **Never report a
5354
generated-share or leverage figure alone, and never as a target:** pair it with the **net
54-
hand-written line change** (app lines removed minus generator and metadata lines added;
55-
generator code is hand-written cost). A share can rise while total hand-written code grows.
55+
hand-written line change**, a figure to report and not the cost test (hand-written lines
56+
removed minus generator and metadata lines added). A share can rise while total hand-written
57+
code grows.
5658

5759
**Coverage matrix:** per entity/projection/value — query helpers? view? routes? UI?
5860
The gap between "modeled + query helpers" and "has view + route + UI" is the headline

‎fixtures/agent-context-conformance/java-react/expected/.claude/skills/metaobjects-codegen/references/owning-generators.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ written.
5555
**Is it worth a generator? Run the cost test first.** Write an adopter-owned generator only
5656
when at least one holds:
5757

58-
1. **It is smaller.** The generator plus its emitted output, plus the metadata it adds, is
59-
fewer lines than the hand-written code it replaces. Count generator code as hand-written
60-
cost: it is code the team reads, tests and maintains. A generated-line total does not
61-
count; the emitted files cost nothing to write but the generator that makes them does.
58+
1. **It is smaller.** The generator code plus its generated output, plus the metadata it
59+
adds, is fewer lines than the hand-written code it replaces.
6260
2. **More instances are coming.** The app will keep adding entities, routes or events of this
6361
shape, so the generator's cost is paid back as the model grows.
6462
3. **Drift protection is the point.** A change to the model could pass the compiler and go

‎fixtures/agent-context-conformance/python/expected/.claude/skills/metaobjects-audit/SKILL.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ description: Use when assessing how well a project has adopted MetaObjects — g
88
**Thesis.** Typed metadata is the durable spine; generated code is the disposable
99
artifact. Hand-writing a layer the metadata could own creates a second source of
1010
truth for one fact — it will drift. This audit hunts those second sources of truth
11-
and proposes folding them into the spine — where doing so costs fewer hand-written lines
12-
than it saves, more of that shape are coming, or silent drift is the risk. A one-off layer
11+
and proposes folding them into the spine — where the generator code plus its generated output
12+
and added metadata is fewer lines than the hand-written code it replaces, more of that shape
13+
are coming, or silent drift is the risk. A one-off layer
1314
that fails that cost test is acceptable, not a defect.
1415

1516
**Boundary — read-only.** Deliverables: `.metaobjects/adoption-audit.json` (machine-readable
@@ -51,8 +52,9 @@ Actual cutovers run through the existing skills mapped per finding tier (§ Brid
5152
Compute **leverage ratio** = `generated_lines / (metadata_lines + generator_lines)`;
5253
healthy = multi-× (example: ~4.7k spine → ~15.7k generated ≈ 3.3×). **Never report a
5354
generated-share or leverage figure alone, and never as a target:** pair it with the **net
54-
hand-written line change** (app lines removed minus generator and metadata lines added;
55-
generator code is hand-written cost). A share can rise while total hand-written code grows.
55+
hand-written line change**, a figure to report and not the cost test (hand-written lines
56+
removed minus generator and metadata lines added). A share can rise while total hand-written
57+
code grows.
5658

5759
**Coverage matrix:** per entity/projection/value — query helpers? view? routes? UI?
5860
The gap between "modeled + query helpers" and "has view + route + UI" is the headline

‎fixtures/agent-context-conformance/python/expected/.claude/skills/metaobjects-codegen/references/owning-generators.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ written.
5555
**Is it worth a generator? Run the cost test first.** Write an adopter-owned generator only
5656
when at least one holds:
5757

58-
1. **It is smaller.** The generator plus its emitted output, plus the metadata it adds, is
59-
fewer lines than the hand-written code it replaces. Count generator code as hand-written
60-
cost: it is code the team reads, tests and maintains. A generated-line total does not
61-
count; the emitted files cost nothing to write but the generator that makes them does.
58+
1. **It is smaller.** The generator code plus its generated output, plus the metadata it
59+
adds, is fewer lines than the hand-written code it replaces.
6260
2. **More instances are coming.** The app will keep adding entities, routes or events of this
6361
shape, so the generator's cost is paid back as the model grows.
6462
3. **Drift protection is the point.** A change to the model could pass the compiler and go

‎fixtures/agent-context-conformance/ts-react-tanstack/expected/.claude/skills/metaobjects-audit/SKILL.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ description: Use when assessing how well a project has adopted MetaObjects — g
88
**Thesis.** Typed metadata is the durable spine; generated code is the disposable
99
artifact. Hand-writing a layer the metadata could own creates a second source of
1010
truth for one fact — it will drift. This audit hunts those second sources of truth
11-
and proposes folding them into the spine — where doing so costs fewer hand-written lines
12-
than it saves, more of that shape are coming, or silent drift is the risk. A one-off layer
11+
and proposes folding them into the spine — where the generator code plus its generated output
12+
and added metadata is fewer lines than the hand-written code it replaces, more of that shape
13+
are coming, or silent drift is the risk. A one-off layer
1314
that fails that cost test is acceptable, not a defect.
1415

1516
**Boundary — read-only.** Deliverables: `.metaobjects/adoption-audit.json` (machine-readable
@@ -51,8 +52,9 @@ Actual cutovers run through the existing skills mapped per finding tier (§ Brid
5152
Compute **leverage ratio** = `generated_lines / (metadata_lines + generator_lines)`;
5253
healthy = multi-× (example: ~4.7k spine → ~15.7k generated ≈ 3.3×). **Never report a
5354
generated-share or leverage figure alone, and never as a target:** pair it with the **net
54-
hand-written line change** (app lines removed minus generator and metadata lines added;
55-
generator code is hand-written cost). A share can rise while total hand-written code grows.
55+
hand-written line change**, a figure to report and not the cost test (hand-written lines
56+
removed minus generator and metadata lines added). A share can rise while total hand-written
57+
code grows.
5658

5759
**Coverage matrix:** per entity/projection/value — query helpers? view? routes? UI?
5860
The gap between "modeled + query helpers" and "has view + route + UI" is the headline

0 commit comments

Comments
 (0)