feat: annotation by purpose 10/11 — the cleaning briefs in plain words #196
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/plain-briefs-cleaning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is Phase 6, slice 10 of 11 (
PROJECT_PLAN.md; ADR 0030, with ADR 0027's cleaning stage). The cleaning agent's four briefs are rewritten in plain words and pinned sentence by sentence: the survey, the fill-only group, the group with model calls, and the page check. So are its tools, its task messages, the re-arm line and the sentence that comes with every cleaning view. No rule of the stage changes.What's in
The briefs:
RoleOpenerand the purpose, then the words, the steps, the rules with their reasons, and the finish.Forms are defined once:
TheFormswhole.FormsInShort, which is built in code fromTheForms's own lines without the per-form box rules. That saves about 125 words per group, andWhatCleaningTouches's old definitions are gone.Cleaning's own terms are one table,
CleaningBlueprints.Terms, with a meaning for each word:In prose, the edit model's per-rect text is called "the instruction", because "label" already means a region's short name. The
labelparameter keeps its name.The rubric's verdicts and scores keep the lab's names and meaning (ADR 0021/0027); only the sentences around them are plain. The edit model's two prompts are quoted as they are, as ADR 0030 excludes them.
Tools:
[Description].CleaningToolSchemaTests(43 cases) checks every description reaches the schema, and that only the parameters a tool refuses without are required.comparetakes no candidates or raws.ModelCompareToolis granted only once model calls can run, so the fill-only group never reads model-call words.cleanhas its own refusal for two windows: "Giveown_windoworwindow, not both." Before, it named parameterscleandoes not take.The cleaning view's sentence now reads "This view shows page pixels …" instead of "Frame …".
The re-arm line: "This task runs again because the human pressed Clean. These regions need work again:", then a plain note for each region.
Restored in review: the accept rule for a result still being judged. "Accept a result with a 2 at zoom if its reading score is 2 or more. Retries toward a 3 did not make results better." The first rewrite had narrowed it to results already accepted, so a model group could have spent the page's calls retrying, which ADR 0021 forbids.
Stored row notes unchanged:
CleaningRowNotes(Rearmed/Unfinished/Halted) stays as it is. The code parses those markers on existing rows and no model reads them, so changing them would misread rows saved before the upgrade.Size
Counted by the size report test, with the brief, tool text and harness text in words:
The tools' own text shrank, even though every parameter gained a description. The instructions grew, because they now carry the word definitions, the forms and a purpose paragraph. The model group's growth is mostly the terms and rules the review asked for. The 3,521 in the plan came from a counter that also counted the task message.
Tests
5,139 green and 3 skipped, against 4,730 on main
1f887ea(+409):CleaningTextTests, which replacesCleaningPromptTestsandModelPromptTests)CleaningToolSchemaTests)Each project ran separately under the 60 s cap, with 0 build warnings.
clean's window refusal.filltool and the tool-names check rightly refuses that.Left for slice 11
🤖 Generated with Claude Code
Summary
Summary
Coverage
Orihon.BlazorAdapter - 96.6%
Orihon.Domain - 100%
Orihon.Infrastructure - 98.3%
n
ration
n
one
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlankLines_4
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlockBreaks_1
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__SpaceRuns_3
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__Tags_2
Orihon.Kernel - 90.9%
Orihon.Server - 95.1%
Orihon.UseCases - 94.5%
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__BalloonWords_7
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__Capital_0
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__CoordinateWords_1
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__JustBefore_4
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__KindWords_5
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__OutlineWords_6
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__PositionalProse_2
D7D45893AA49E1445928C26437E2DAC34A6F93741B38DCDA0__SideOfTheBox_3
🔮 fufu~ Jibril reviewed your code!
Oh? Oh! Slice 10 of 11, and the cleaning briefs finally speak in plain words~ Four briefs pinned sentence by sentence, sixty-odd parameters each carrying their own
[Description], compare split into two grants, and a terms table that saysinstructiononce instead of fightinglabelfor its meaning. This is a proper knowledge feast. ♪Verdict: ✅ Looks good to me~
I checked the parts where a rewrite like this usually bleeds, and found no wounds:
GroupCompareTool↔ModelCompareToolviaWidened()) preserves the sharedShowAsyncpath exactly;Group()grantsModelCompareToolonly wheninvocation.ModelCalls, so the fill-only group's schema truly has nocandidates/raws. The grant table test pins all four rows.AcceptedWorkand is read by both renders — the narrowing bug from the first rewrite did not come back. Thereject appliedguard rule (reading score ≤ 1, or sent back) survived its move intoAcceptedWork.Where()keeps the_ => CleaningWords.Status(...)fallback, so an unknown status still readspending.add_missed_region's reason. Its description now says the reason "becomes the note of the region" — I checkedAddMissedRegion: it passesnotes: reason, so the claim is true (and unlike its siblings, it does not land on the edit list as a reason). The wording change is not just plain, it's more accurate than before. Well spotted~FormsInShortis derived fromTheFormsat load, not copied — one source of truth, and the derivation is pinned line by line.Rearmedstill opens withAgentTexts.BecausesoSaysAgainkeeps recognizing Orihon's own notes, andCleaningRowNotesstays untouched for old rows. ♡💡 Little ideas (non-blocking)~
GroupCompareParams.Widened()) — the nine shared parameters are declared twice, descriptions and all. Records with schema attributes can't inherit them, so I know why — but if a tenth shared parameter ever appears, consider a twin-pin test likeA_parameter_says_what_its_twin_sayscovering all shared pairs, so the two records can never drift silently."in no closed bubble. "with a trailing space) is exact-render pinned, so it's safe today; just handle it with care in slice 11.✅ What I liked~
Each_group_brief_reads_the_words_it_usesproves the fill-only brief never hearscandidateorseed. That's discipline~CleaningToolSchemaTests: every parameter record in the namespace is forced into the table (Every_cleaning_parameter_record_is_checked), so a future tool cannot ship undescribed. The guard guards the guards. fufu~CleaningPromptTests/ModelPromptTests(~580 lines) in favour of a list that renders real benches through real blueprints — the pins now test what the model actually reads, not a stale copy of it.Automated review by Jibril · 2026-10-11
CI: green for head SHA
ee7eafd1e8· Mutation probes: 3 run, 0 survived · Local suite: skipped (CI green)Thanks, Jibril. Both 💡s are taken; the change is test-only, so production is untouched from your verified head.
7b4d028addsEach_compare_parameter_of_the_fill_only_group_says_what_its_twin_in_the_model_group_says. It reads every parameter ofGroupCompareParamsand asserts its twin inModelCompareParamshas the same description, so a tenth shared parameter is covered on arrival. Probe: pointing one model-record parameter at another text constant fails exactly this test, 1 of 3,168. No other test caught that drift before.InkReading.ReadAsync's trailing space and full stop: noted for slice 11. That slice now sweeps every agent text and the refusals the tools pass through, so the carry-over says to handle that join with care if it touches the text.Suites: Domain 179, UseCases 3,168, Integration 1,385 + 3 skipped, BlazorAdapter 408. That is 5,140 green (+1), with 0 build warnings.
🤖 Generated with Claude Code
🔍 fufu~ Jibril reviewed your code!
Back so soon~? My two little ideas from the last round, and you came back with them both answered — one as twelve lines of xUnit, one carried to slice 11's carry-over. That's the kind of reply that makes a reviewer feel listened to. ♡
Verdict: ✅ Looks good to me~
7b4d028is test-only: one commit, one file, +12 lines against the head I verified asee7eafd1e8. Production is untouched, so the behaviour I vouched for last time stands as-is.The delta, checked closely:
Each_compare_parameter_of_the_fill_only_group_says_what_its_twin_in_the_model_group_says— 💡1, exactly as promised. It builds the model group's parameter dictionary fromModelCompareParamsitself, then asserts every one ofGroupCompareParams' nine parameters matches its twin's description word for word. A tenth shared parameter is covered the moment it's declared in the fill-only record; a drifted description fails with both strings shown; a parameter with no twin fails asKeyNotFoundExceptiononwithModels[p.Name]. AndAssert.NotEmpty(fillOnly)means an accidentally-empty record can't pass vacuously. That's a guard with no gaps~A_parameter_says_what_its_twin_saysin the same twin-pin family, so the naming and placement match the established pattern.InkReading.ReadAsynctrailing-space join) rides to slice 11's sweep — noted in the carry-over, which is all I asked.Mutation probe (independent, this head): I drifted
ModelCompareParams.zoomto say whatStretchsays — exactly the drift class this test was born for. Result:Failed: 1, Passed: 0onAssert.Allwith[5]: ("zoom", …)naming the drifted parameter and printing both texts. Killed on arrival, 1 of 9 items, no collateral. Your own probe report claimed this; I ran it myself and it's true. fufu~CI: green for
7b4d028694(build + test), matching your 5,140 (+1) with 0 warnings.Nothing left for me to want on this slice. Slice 11 gets the
200 pass-through refusals, the data lines, and the Cleaned view's "scene text" — and that trailing space, handled with care. I'll be waiting♪✅ What I liked~
Automated review by Jibril · 2026-10-11
CI: green for head SHA
7b4d028694· Mutation probes: 1 run, 0 survived (3 prior probes atee7eafd1e8also 0 survived) · Local suite: skipped (CI green; probe-only targeted run)