feat(shapes): the practice is written where it is read, and the coverage line measures the slip (milestone 439 step 6)
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 16s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 47s
CI & Build / Python tests (push) Successful in 1m39s
CI & Build / Build & push image (push) Successful in 29s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 16s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 47s
CI & Build / Python tests (push) Successful in 1m39s
CI & Build / Build & push image (push) Successful in 29s
- reusing-code: "Before the turn ends — say what you built" — the four verdicts, the one classify_shapes(repo=…) call, and the component file as a shape. Description names the end-of-turn moment. - shape-accounting: the writer judges; audits are the check that it held. The write path SUGGESTS (no more hook instances); component file rows and whole-file canon described; scoped covers Svelte too. - _INSTRUCTIONS reuse line: "before the turn ends, say what you built (create_snippet the reusable, classify_shapes the rest)" — 1570/1600. - Coverage line: "written-shape check (7d): N turns checked, M asked, K left unjudged", from the Stop hook's recorded outcomes; silent until the question has been put. - test_guidance_ownership pins the new topic on reusing-code. - prior-art hook header no longer says it stamps instance rows. Plugin version minted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -907,3 +907,16 @@ def test_a_file_is_a_unit_when_it_renders_and_nothing_inside_carries_its_name(pa
|
||||
from scribe.services.coverage import class_references, extract_definitions, is_file_unit
|
||||
|
||||
assert is_file_unit(path, text, extract_definitions(text), class_references(path, text)) is unit
|
||||
|
||||
|
||||
def test_the_line_says_whether_writers_judged_what_they_wrote():
|
||||
"""Milestone 439: the write-time figure — silent until the question has
|
||||
been put, then turns checked, asked, and asks walked past."""
|
||||
from scribe.services.coverage import coverage_line
|
||||
base = {"accounted": 10, "total": 10, "counts": {"exempt": 10},
|
||||
"unclassified": 0, "computed_at": "2026-10-01T00:00:00"}
|
||||
assert "written-shape check" not in coverage_line(base)
|
||||
assert "written-shape check" not in coverage_line(
|
||||
{**base, "write_time": {"checked": 0, "asked": 0, "left": 0, "days": 7}})
|
||||
line = coverage_line({**base, "write_time": {"checked": 12, "asked": 4, "left": 1, "days": 7}})
|
||||
assert line.endswith("; written-shape check (7d): 12 turns checked, 4 asked, 1 left unjudged")
|
||||
|
||||
Reference in New Issue
Block a user