Skip to content

feat: FAMILY.md v2.2 harmonises exit 3; gate can see codes above 3 - #89

Merged
chaoz23 merged 2 commits into
mainfrom
fix/exit-codes-above-three
Aug 25, 2026
Merged

chaoz23 merged 2 commits into
mainfrom
fix/exit-codes-above-three

Conversation

@chaoz23

@chaoz23 chaoz23 commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Resolves the decision blocking chaoz23/charactercheck#18. Two halves of one problem.

Contract: v2.2

v2.1 said "srdcheck's exit 3 is the family precedent" — too weak to settle what a member should do when 3 is already spent. v2.2 states the pattern outright:

  • 0 / 1 / 2 are the universal verdict contract. A consuming agent branches on these and treats anything >= 3 as not a verdict — read the payload.
  • 3 is usage error in every member. A malformed call is the one non-verdict outcome every tool has, so harmonising it means an agent that mis-invokes any member gets the same answer.
  • Further non-verdict outcomes take 4 and up, named in the tool's own SKILL.md.

charactercheck moves could-not-retrieve from 3 to 4. Decided over the cheaper alternative of letting it keep 3 and putting usage errors on 4 — that would have left the family with two spellings for the outcome an agent hits most often. Harmonising costs a breaking change in one repo; not harmonising costs every future caller.

Gate: it could not see exit 4

parse_skill capped recorded codes at 0 <= code <= 3. A documented exit 4 was silently dropped — and the CLI returning 4 then surfaced as a bogus UNDOCUMENTED_EXIT_CODE against a tool that had documented itself correctly.

The gate would have rejected the very refactor the contract now requires.

input before after
synthetic 0/1/2/3/4 SKILL.md parsed [0,1,2,3], exit 4 dropped parses [0,1,2,3,4], honest-lane=2, usage=4
the four real SKILL.md files [0,1,2,3] [0,1,2,3] — unchanged

Third time this parser has been the defect rather than the tools it checks (line-vs-paragraph in #82, stream-word matching in #84). The shape repeats exactly: the checker silently cannot perceive the thing it is checking. Worth remembering before adding a fourth rule to it.

Next

chaoz23/charactercheck#18 does the refactor: usage errors → 3, could-not-retrieve → 4, with SKILL.md, tool.json, the action field and doctor updated to match. Then its waiver comes out of the baseline.

Suite: 711 passed.

🤖 Generated with Claude Code

chaoz23 and others added 2 commits August 25, 2026 14:15
Two halves of one problem, surfaced by chaoz23/charactercheck#18.

CONTRACT. v2.1 said "srdcheck's exit 3 is the family precedent", which was too
weak to settle what a member should do when 3 is already spent. v2.2 states
the pattern outright: 0/1/2 are the universal verdict contract, >= 3 is the
no-verdict taxonomy, and 3 is usage error in EVERY member. A malformed call is
the one non-verdict outcome every tool has, so harmonising it means an agent
that mis-invokes any member gets the same answer. Further outcomes take 4+.

charactercheck therefore moves could-not-retrieve from 3 to 4 rather than
taking a different usage code. Decided deliberately over the cheaper option of
letting it keep 3 and putting usage on 4: that would have left the family with
two spellings for the concept an agent hits most often.

GATE. parse_skill capped recorded codes at 0..3, so a documented exit 4 was
silently dropped -- and the CLI returning 4 then surfaced as a bogus
UNDOCUMENTED_EXIT_CODE against a tool that had documented itself correctly.
The gate would have rejected the very refactor the contract now requires.

That is the third time this parser has been the defect rather than the tools
it checks (line-vs-paragraph in #82, stream-word matching in #84). The shape
repeats: the checker silently cannot perceive the thing it is checking.

Verified both directions: a synthetic 0/1/2/3/4 SKILL.md now parses all five
with honest-lane=2 and usage=4, and all four real SKILL.md files parse
unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
charactercheck is harmonising onto exit 3 for usage errors
(chaoz23/charactercheck#18). The waiver comes out before the fix lands, as the
ratchet requires; the SHA pin keeps charactercheck's CI green in the meantime.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chaoz23
chaoz23 merged commit 79a7b61 into main Aug 25, 2026
15 checks passed
@chaoz23
chaoz23 deleted the fix/exit-codes-above-three branch August 25, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant