Calendar Day
Tuesday, July 1, 2026 (PR 1 of 2)
Planned Effort
5 story points (Medium–High) — sprint item #3
Companion PR: Tuesday PR 2 (frontend tool registry #4) — stacks on or follows this PR; static/tool_types.json is generated from KNOWN_TOOL_TYPES established here.
Problem
Adding a new Claude Code tool type requires coordinated changes across four files (utils/tool_dispatch.py, file-activity tracking in utils/jsonl_parser.py, utils/md_exporter.py, and the frontend JS tool registry) with no compile-time or test-time mechanism to detect that one site was missed. The coupling is invisible to static analysis — sites are linked only by magic string literals ("Read", "Write", "Bash", etc.). The verification suite (466 tests) catches regressions in existing behavior but cannot enforce completeness when upstream Claude Code introduces a new tool type.
Goal
One merged PR that establishes a single authoritative KNOWN_TOOL_TYPES registry, wires all four dispatch sites to it, and adds a CI sync test that fails with a clear message when any site drifts.
Scope
Touch points
utils/tool_dispatch.py — define KNOWN_TOOL_TYPES: frozenset[str] at module level; extract keys from _TOOL_RESULT_DISPATCH
utils/jsonl_parser.py — file-activity tracking references KNOWN_TOOL_TYPES
utils/md_exporter.py — exporter references KNOWN_TOOL_TYPES
- Frontend JS tool registry — references or is validated against
KNOWN_TOOL_TYPES
tests/test_tool_dispatch_sync.py (new) — parse frontend JS registry (regex or lightweight AST); assert set identical to KNOWN_TOOL_TYPES; failure names missing type and file
CONTRIBUTING.md or inline docstring — document "add a new tool type" procedure
Out of scope
Acceptance Criteria
Verification
cd C:\Users\Jasen\CppAliance\claude-code-chat-browser
.\.venv\Scripts\Activate.ps1
pytest tests/test_tool_dispatch_sync.py -q
pytest -q
mypy .
ruff check .
Manual: deliberately remove a tool type from the frontend registry — confirm sync test fails with a clear message, then revert.
Calendar Day
Tuesday, July 1, 2026 (PR 1 of 2)
Planned Effort
5 story points (Medium–High) — sprint item #3
Companion PR: Tuesday PR 2 (frontend tool registry #4) — stacks on or follows this PR;
static/tool_types.jsonis generated fromKNOWN_TOOL_TYPESestablished here.Problem
Adding a new Claude Code tool type requires coordinated changes across four files (
utils/tool_dispatch.py, file-activity tracking inutils/jsonl_parser.py,utils/md_exporter.py, and the frontend JS tool registry) with no compile-time or test-time mechanism to detect that one site was missed. The coupling is invisible to static analysis — sites are linked only by magic string literals ("Read","Write","Bash", etc.). The verification suite (466 tests) catches regressions in existing behavior but cannot enforce completeness when upstream Claude Code introduces a new tool type.Goal
One merged PR that establishes a single authoritative
KNOWN_TOOL_TYPESregistry, wires all four dispatch sites to it, and adds a CI sync test that fails with a clear message when any site drifts.Scope
Touch points
utils/tool_dispatch.py— defineKNOWN_TOOL_TYPES: frozenset[str]at module level; extract keys from_TOOL_RESULT_DISPATCHutils/jsonl_parser.py— file-activity tracking referencesKNOWN_TOOL_TYPESutils/md_exporter.py— exporter referencesKNOWN_TOOL_TYPESKNOWN_TOOL_TYPEStests/test_tool_dispatch_sync.py(new) — parse frontend JS registry (regex or lightweight AST); assert set identical toKNOWN_TOOL_TYPES; failure names missing type and fileCONTRIBUTING.mdor inline docstring — document "add a new tool type" procedureOut of scope
static/tool_types.jsonmanifest (Tuesday PR 2 — #4)file_activityhardcoded strings refactor (deferred)Acceptance Criteria
KNOWN_TOOL_TYPESis the single authoritative registry inutils/tool_dispatch.pytests/test_tool_dispatch_sync.pyasserts tool-type sets are identical across all four sitespytest,mypy --strict, andruffpassVerification
Manual: deliberately remove a tool type from the frontend registry — confirm sync test fails with a clear message, then revert.