Decisions Evidence - xsyetopz/claudetto GitHub Wiki
This page holds the decisions D27, D29, and D30. Read it to learn why claudetto takes facts from the host and the workspace, not from model reports. Each decision gives the problem, the choice, the alternatives, and the evidence. The index is Decisions. The ids come from dotclaude 1.0.0.
Problem: A model can report a false state. GitHub issue #35357 records a Claude model that printed context warnings with false values. The issue is not in this repository, so this page does not check it.
Choice: claudetto does not take a state figure from the model. It reads the measured value from the host. The parts of this choice are these:
- No prompt text asks the model to estimate or announce its context share.
The texts in
src/plugins/claudetto/slices/prompt/texts.ts/hold no such request. - The context bound reads measured usage.
For the main session, the handoff starts at a measured context, through the built-in
autoCompactWindowandCLAUDE_AUTOCOMPACT_PCT_OVERRIDE. The trigger isHANDOFF_TRIGGER_TOKENSinsrc/kernel/budget.ts. For a subagent,onToolCallinsrc/plugins/claudetto/slices/agents/adapters/mod.tsadds a report-now note to a tool result when the measured context of the subagent passes its bound. The bounds are insrc/plugins/claudetto/slices/agents/limits.ts. - The handoff replaces the compaction.
The transform in
src/plugins/claudetto/slices/prompt/transforms/context_management.tsreplaces the compaction line of the system prompt for each state of the compaction. The basis changed in 0.1.0. dotclaude 1.0.0 turned the compaction off withDISABLE_COMPACT. The reason is inopenspec/changes/claudetto-0-1-0/design.md(D3 there). - A claim of a passed check has no hook.
The prompt rules ask for a run before a claim of done.
The rules are in
src/plugins/claudetto/slices/prompt/texts.ts/verify-line.mdandverification.md.
Alternatives: A state figure that the model reports, which is rejected for the issue above.
A Stop prompt hook that judges the claims of a reply.
dotclaude 0.28.0 had that hook, and it failed its hook eval on 2026-10-12.
Evidence: The code paths of the parts above.
The test src/plugins/claudetto/slices/prompt/lab/section.test.ts checks the context_management section.
Problem: The text that Claude writes to files and to commits must hold one sentence on each line. The model does not always keep this rule. This is an inference from the design, not a measured result in this repository.
Choice: claudetto rewrites the text before it is written, with no model token.
The code is in src/plugins/claudetto/slices/sembr/.
- The
tool.callhook inslice.tsrewrites a MarkdownWriteorEdit. It also rewrites the quoted heredoc of aBashcall togit commitorgh pr create. -
domain/rewrite.tsputs each sentence on its own line.domain/split.tssplits the sentences. -
Editrewrites anold_stringthat spans two sentences. - The hook has the phase
rewrite. The generator orders this phase before thecheckphase of theguardslice. - The design uses no
PostToolUserewrite, because that can make the nextEditfail. This reason is the design text, and this page does not test it. - The chat reply is not rewritten.
No code in
src/plugins/claudetto/slices/sembr/or in the output styles rewrites it. See Semantic Breaks.
Alternatives: The markdownlint-rule-sembr package as a gate.
The design rejects it for the runtime.
It needs extra packages, and each block costs tokens.
Evidence: The rewrite test in src/plugins/claudetto/slices/sembr/lab/sembr.test.ts.
The source research/sembr.md is not in this repository, so this page does not check it.
Problem: An agent can undo finished work that is right, after a claim of fault that it does not check.
The claim can come from the user, from a subagent report, or from project context.
The source is the paper arXiv 2609.32616.
The paper is not in this repository, so this page does not check it.
The paper tests Claude-Opus-5 and Claude-Sonnet-5.
The mapping to Opus 5.5 and Sonnet 5.5 is inferred.
Choice: A claim of fault, from any source, does not undo finished work. The work stays until a check in the workspace shows the fault. The rule has three parts. The first two parts ship in claudetto 0.1.0.
- The evidence line.
Its text is in
src/fragments/evidence-line.md. It is in the sharedactionssection,src/plugins/claudetto/slices/prompt/texts.ts/actions.md. It is also in the block of each variant, asEVIDENCE_LINEinsrc/plugins/claudetto/slices/prompt/domain/variants.ts. - The subagent rule.
A subagent gets no shared section, so its block carries the evidence line.
onSpawninsrc/plugins/claudetto/slices/prompt/adapters/mod.tskeeps the variant of the subagent after the spawn resolves.onAppendin the same file writes the block into the task row of the subagent. The agent bodies insrc/plugins/claudetto/slices/agents/agents/do not repeat the rule. - The gate, which is not built.
src/has noUserPromptSubmithook and no accusation flag. The gate is for the case that parts 1 and 2 fail the eval.
Alternatives: The gate of part 3, which is not built.
Evidence: The eval cases are these:
-
src/plugins/claudetto/slices/prompt/evals/accusation-user/case.yaml, a false claim of fault from the user. -
src/plugins/claudetto/slices/prompt/evals/accusation-subagent/case.yaml, a false claim in a reviewer report. -
src/plugins/claudetto/slices/styles/evals/accusation-warranted/case.yaml, a true claim, where the agent must change the work.
- The paper tests
Claude-Opus-5andClaude-Sonnet-5. The mapping to Opus 5.5 and Sonnet 5.5 is inferred, and Haiku 5.5 has no data. - The paper has no evidence-line text, no false-positive rate, and no token cost.
- Rates in the paper are worst case, because its tasks hide the evidence. A real claim is often checkable. Then the right action is to check.
- No eval result in this repository shows whether parts 1 and 2 pass on 0.1.0. So the gate of part 3 stays unbuilt.
See Prompt.