Repository navigation
feat(agent-context): add cost test for owned generators to MetaObjects skills - #422
Merged
Merged
Conversation
…ayers as acceptable Codegen skill gains a when-not-to-write-a-generator test (generator counted as hand-written cost). Audit skill applies it and pairs any generated-share figure with the net hand-written line change. Goldens regenerated.
Assisted-by: no-mistakes:claude:claude-sonnet-5-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
metaobjects-codegenskill and itsreferences/owning-generators.md: before writing an owned generator, apply a cost test. Write one only when generator code plus generated output plus added metadata is smaller than the hand-written code it replaces, more instances of the shape are expected, or drift protection is the point. A general-shape generator belongs in the library, not copied into each app.metaobjects-auditskill: adds anACCEPTABLE (one-off)classification for hand-written layers that fail the cost test, and cost-tests every generate recommendation. Generated-share and leverage figures must be paired with the net hand-written line change and are never a target.fixtures/agent-context-conformance/*/expected/.claude/skills/outputs (java-kotlin-react-tanstack, java-react, python, ts-react-tanstack, ts-requirements) andCHANGELOG.mdare regenerated to carry the revised skill text.Validation
Risk Assessment
✅ Low: Documentation-only change to agent skills, the changelog and golden fixtures. The round-1 contradiction is resolved: all three texts use one rule, and all 15 fixture copies match their sources.
Testing
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
agent-context/skills/metaobjects-codegen/references/owning-generators.md:58- The cost test's first condition contradicts itself. It says 'The generator plus its emitted output, plus the metadata it adds, is fewer lines than the hand-written code it replaces'. Two sentences later it says 'A generated-line total does not count; the emitted files cost nothing to write'. So emitted output is both counted and not counted. The audit skill's 'net hand-written line change' counts only generator and metadata lines, with no emitted output. The CHANGELOG entry says 'generator plus output'. The stated intent is 'the generated code plus generator are more than handwritten', which counts output. Example: a 100-line generator emits 400 lines from 20 lines of metadata and replaces 300 hand-written lines. Under the first sentence it fails (520 > 300). Under the second sentence and the audit's net metric it passes (120 < 300). An agent can reach opposite verdicts from the same text. Fix: pick one rule and state it identically in agent-context/skills/metaobjects-codegen/references/owning-generators.md:58-61, agent-context/skills/metaobjects-audit/SKILL.md:52-56 (net hand-written line change) and the CHANGELOG Added bullet. The five fixture copies of each file must match the source; they currently do.🔧 Fix applied.
✅ Re-checked - no issues remain.
⏭️ **Test** - skipped
Step was skipped.
⏭️ **Document** - skipped
Step was skipped.
⏭️ **Lint** - skipped
Step was skipped.
✅ **Push** - passed
✅ No issues found.