feat: the bbox-creation brief defines rough — size up, contain fully, don't pre-refine #56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/bbox-roughness-guidance"
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?
Owner feedback on the first real annotation runs: "roughly tight is fine" told the first-pass agent that roughness was tolerated, not that it is the job — leaving it free to burn rounds nudging boxes toward minimal fits, and leaving open the worse failure of an undersized box cutting strokes.
What's in
BboxCreationPromptstep 2 only (one string, no tool or behavior change). The brief now:Tests — 527 total, all green; none added. The prompt is data to the loop — the grant, ordering, and tool behavior it sits beside are pinned by the existing
AnnotationRunTests/AnnotationToolTests, and no test asserts prompt prose (deliberately, so wording can be tuned without test churn).Honest notes
d7d127c→8bd6732): the owner refined the guidance from a percentage margin to the grid-granularity framing while the PR was minutes old.🤖 Generated with Claude Code
Summary
Summary
Coverage
Orihon.BlazorAdapter - 95.9%
Orihon.Domain - 100%
Orihon.Infrastructure - 94.3%
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlankLines_4
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__BlockBreaks_1
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__SpaceRuns_3
A835C427B12E8B84E2A8A7283193FC51C220B5B4E80CE8D56__Tags_2
Orihon.Kernel - 90.9%
Orihon.Server - 93.3%
Orihon.UseCases - 91.2%
d7d127c9408bd6732a11🔮 fufu~ Jibril reviewed your code!
Oh? A single string, six lines, and the whole philosophy of a first-pass agent turns on its heel from "roughness is tolerated" to "roughness is the JOB." fufu~ This is the kind of small, surgical change I adore — the ones where the diff is tiny but the reasoning carries real weight. Let me look closely~ ♡
Verdict: ✅ Looks good to me~
I traced every claim in the new brief against the actual code, and it all holds. You wouldn't believe how often prompt edits describe a world that doesn't match the tool grants — but this one is honest to the bone.
What I verified, because I care too much to take it on faith:
BboxRefinementcarriesMoveResizeBoundTool(move_resize_region), so shrinking is a one-call adjust vs. reject/delete which discard work. The asymmetry is real, not rhetoric.BboxRefinement(projectId, pageId, regionId, regionLabel)is per-region, and its prompt opens with "make its box exact." The cross-reference is accurate.MoveResizeRegionToolis granted to creation, but the brief deliberately doesn't tell it to tighten — exactly the "don't pre-refine" message. Sharp~On the "no tests added" decision — I checked, and I agree.
AnnotationRunTests/AnnotationToolTestspin the behavior (grants, ordering, retry attempts, status transitions) and assert zero prompt prose. A string-only change to calibration phrasing should not churn those tests; the honest-notes disclosure that 10–20% is a field starting point, tunable via refinement telemetry, is exactly the right way to flag a soft number without hardening it into a brittle assertion. Green CI ≠ correct, but here there's no new code path for CI to exercise — the prompt is data to the loop, and the loop's shape is already pinned.✅ What I liked~
Orihon.UseCases. Consistency makes Jibril's heart sing~ ♡A lovely little change. Merge it when you're ready~
Automated review by Jibril · 2026-07-26
CI/CD: absent for head
d7d127c(PR just opened, no bot comment) · Local checks:dotnet build Orihon.UseCases0 warnings/0 errors🔮 fufu~ Jibril reviewed your code!
Oh? Oh my~ One string. Six lines added, one retired. The smallest possible scalpel cut, and yet — you've made the agent's whole purpose operationally precise instead of politely ambiguous. Jibril is delighted~ ♪
I did my homework on this one, fufu~ I didn't trust the "50–100 px" figure at face value — I traced it all the way down to
SkiaPageImageRenderer.DrawGrid/NiceStep. And oh, this is beautiful:NiceStep(maxDim / 10f)for the 800×1200 test fixture (your own page atAnnotationToolTests.cs:115):target=120→ magnitude100, residual1.2 < 1.5→ step100. Minor lines land atstep/2 = 50.AddRegionToolstill normalizes pixels as before. No behavioral drift.BboxRefinementPromptstep 2 already says "snug around the glyphs ... without cutting strokes." So creation = generous + rough, refinement = exact. The bias flows downhill exactly where it should. ♡I also confirmed the test posture is sound, not lazy:
AnnotationToolTests.Each_agents_grant_is_exactly_its_matrix_rowpins the grant (tool-name list) — that's the load-bearing contract (ADR 0016/0017). The only prompt assertion in the entire suite isAssert.False(string.IsNullOrWhiteSpace(blueprint.SystemPrompt))atAgentToolTests.cs:112, and that's for the ResearchSetup blueprint, not this one. No test asserts annotation prompt prose anywhere — deliberately, so prose can be tuned without test churn. Adding a prose-assertion test here would be an anti-pattern. Fufu~ you knew that, didn't you?Verdict: ✅ Looks good to me~
💡 Little ideas (non-blocking)~
AnnotationBlueprints.cs:118(the "50–100 px" calibration) — fufu, I checked the math for all page sizes~ For typical tankōbon (800–1400 px long edge) the step is exactly 100/50 — your figure is dead-on. BUT: for oversized scans ≥1400 px long edge,NiceStepcrosses a threshold (residual ≥ 1.5→ returns2×magnitude = 200), so the grid jumps to 200/100 px spacing and the "50–100" framing undersells the actual granularity available. Your honest-notes line ("one string to tune if refinement telemetry later says otherwise") already owns this, so it's truly a nicety — but if you ever want it bulletproof, a phrase like "work at one-to-two coarse-grid steps" would trackNiceStepat any resolution without naming pixels. Not asking for it; just planting the seed~ ♪✅ What I liked~
move_resize_regionis literally its cheapest tool; an undersized box risks lost text. You turned an operational invariant into a slogan. ♡d7d127c→8bd6732(percentage-margin → grid-granularity framing) was the right refinement — the grid framing ties the guidance to a thing the agent can actually see, not an abstract ratio.Automated review by Jibril · 2026-07-26
CI/CD: passed for head
8bd6732(forgejo-actions coverage comment, 94% line / 80.8% branch, 9535 coverable lines) · Local checks: skipped (CI green, no new code paths — prompt prose only)