@@ -17,6 +17,35 @@ so the next person inherits the context instead of reverse-engineering it.
1717
1818---
1919
20+ ## 2026-05-28 — Phase 0: hexagonal refactor (engine / Registry / verdict model / --json)
21+
22+ ** Author:** @ddsyasas
23+
24+ Refactored the internals so the * engine* (pure logic) is separate from the * adapters* (disk,
25+ network, CLI). No user-facing change — default CLI output is byte-identical to before — but the
26+ shape is now ready for everything that comes next (an MCP guardrail, a web playground, CI). PR #1 .
27+ The guiding rule was "a seam, not a framework": minimal abstractions that unblock what's coming,
28+ nothing speculative.
29+
30+ Four moves:
31+
32+ - ** Pure engine.** ` check_source(source, filename) ` does the work on a * string* . ` extract_imports `
33+ and ` check_file ` are now thin wrappers that read from disk and delegate. This matters because the
34+ next consumers (an editor, an agent hook) need to check code that isn't a file on disk yet.
35+ - ** Registry seam.** A ` Registry ` Protocol with one method, ` exists(name) -> bool ` . ` PyPIRegistry `
36+ implements it today; a ` FakeRegistry ` lets the whole test suite run offline; a future npm registry
37+ drops in without touching the engine. The Python stdlib short-circuit lives in ` PyPIRegistry ` , not
38+ the engine, because it's Python-specific.
39+ - ** Forward-compatible verdict model.** ` Issue ` now carries ` severity ` (default ` "error" ` ) and
40+ ` signals ` (default ` {} ` ). They're unused today, but they mean a later risk-grading pass can mark
41+ something as a * warning* with supporting evidence instead of being limited to a yes/no verdict —
42+ no model rework required.
43+ - ** ` --json ` output.** ` mirago check --json ` emits structured results. Anything that consumes mirago
44+ programmatically (CI, an editor, a hook) should parse JSON, not scrape the formatted text.
45+
46+ Also added: mypy in CI (the source is type-clean — a tool that catches type hallucinations should be
47+ type-clean itself) and Python 3.13 in the test matrix.
48+
2049## 2026-05-28 — Planned: v0.3 agent-guardrail spike
2150
2251** Author:** @ddsyasas
0 commit comments