feat(arch): arch_plan_from_spec, three arch_* critique focuses, the arch pack, lean 64 and the counts

The three track-F branches are merged; this is the integration that makes the
twelve SECTION 25 tools one surface.

- engineering/arch/spec.py: a whole plan from one document - walls with their
  openings, stairs, room labels measured off the walls just drawn, the
  exterior chains and the schedules - inside one transaction. Everything the
  model, the wall engine or the stair symbol can refuse is refused before the
  transaction opens, by path; a room point in no closed face rolls it back,
  and so does a cancelled request, under the anyio shield of pid/spec.py.
  EXAMPLE_SPEC's rooms measure 4825 x 5750 and 3825 x 5750 - the net floor,
  computed by hand in the tests.
- engineering/arch/critique.py: arch_room_unlabelled, arch_wall_gap (50 mm,
  one issue per pair of walls, measured to the wall body so an L corner and a
  T stem both read as joined) and arch_opening_clash. One index per critique
  run; a drawing without an ACADMCP_ARCH record yields nothing. Each focus
  has a positive and a negative fixture.
- TOOL_PACK_NAMES gains "arch" (the twelve SECTION 25 tools); lean gains
  arch_wall, arch_opening, arch_room and arch_plan_from_spec and reaches 64;
  the arch tag ranks after mech, so SECTION 25 files as one `architecture`
  group - 241 tools in 26 groups.
- Six golden tuning cases, two of them Turkish, the arch_plan_from_spec alias
  record, the shared-command allowlist reconciled with what the merged records
  claim, the inventory regenerated, the registry snapshot retaken, and the
  README figures taken from check_doc_numbers rather than typed.
- Two more Turkish golden cases close the reconciliation's alias gaps
  ("vaziyet planı çiz" -> arch_plan_from_spec, "oda alanlarını hesapla" ->
  arch_rooms_detect); the arch records carry vaziyet / alan / oda / kat planı
  in diacritic and ASCII-folded spellings, because the search tokenizer splits
  on a non-ASCII letter. BOUNDARY and AREA stay with boundary_trace and
  analysis_measure_entity on purpose, recorded in the arch alias comment.
  Tuning top-1 73/84, top-3 83/84; holdout top-3 15/15.
- tests/test_token_suite.py: TOOL_PACKS=core,mech now drops the arch pack
  too (measured 193 = 236 - 9 - 22 - 12).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
Umut CAN
2026-09-23 23:20:05 +03:00
co-authored by Claude Opus 5.5
parent ad5a32a34a
commit 6e004cc658
14 changed files with 1440 additions and 57 deletions
+12 -31
View File
@@ -495,7 +495,7 @@ async def test_tool_groups_is_byte_identical_to_the_source_declared_grouping():
async def test_tool_group_sizes_are_unchanged():
"""Frozen snapshot of the surface (240 tools, 26 groups).
"""Frozen snapshot of the surface (241 tools, 26 groups).
Taken before @cad_tool landed at 131 tools; `batch` moved 2 -> 3 when
v1.5.0's `cad_batch` joined `entity_batch_create`/`entity_batch_modify`, and
@@ -582,39 +582,20 @@ async def test_tool_group_sizes_are_unchanged():
returned 17 -> 10, `blocks` 11 -> 9, `entity_creation` 19 -> 18 and
`drawing` 12 -> 11 — every one of them its pre-SECTION-24 value.
`architecture` appeared with v1.6's track F: SECTION 25 opened with the
plan model's wall engine (`arch_wall` / `arch_opening` / `arch_stair` /
`arch_dimension_chains`); the `arch` tag is ranked directly after `mech` in
`_GROUP_TAG_PRIORITY`, so those tools file under `architecture` rather
than under their secondary `create` / `dimension` tags.
Track F group R opened SECTION 25 with the rooms: `arch_room` and
`arch_schedule` are tagged `arch` and `create`, `arch_rooms_detect` `arch`
and `query`. `arch` is not in `_GROUP_TAG_PRIORITY` on this branch, so they
file under their secondary tags: `entity_creation` 18 -> 20,
`entity_query` 9 -> 10. This snapshot is branch-local: the track F merge
task recomputes it once the walls, rooms and catalogue branches have landed.
Track F group C opened SECTION 25 with the furniture and sanitary
catalogue: `arch_catalogue_list` is tagged `arch` and `query`,
`arch_catalogue_insert` `arch` and `create`. `arch` is not in
`_GROUP_TAG_PRIORITY` on this branch, so they file under their secondary
tags: `entity_query` 9 -> 10, `entity_creation` 18 -> 19. This snapshot is
branch-local: the track F merge task recomputes it once the walls, rooms
and catalogue branches have landed.
Group C's second task added the structural grid and the plan symbols
(`arch_grid` / `arch_symbol`), both tagged `arch` and `create`:
`entity_creation` 19 -> 21, for the same branch-local reason.
After the track F merge all eleven SECTION 25 tools file under
`architecture` (the `arch` tag outranks `create` / `query` / `dimension`),
so `entity_creation` and `entity_query` are back at 18 and 9.
`architecture` appeared with v1.6's track F (12, SECTION 25: the wall
network, openings, stairs, rooms and their reader, schedules, grid,
symbols, the catalogue, the exterior chains and the whole plan from one
spec). The `arch` tag is ranked directly after `mech` in
`_GROUP_TAG_PRIORITY`, so a SECTION 25 tool that also carries `create`,
`query` or `dimension` files under its own section; `architecture` is
exactly `PACK_TOOL_NAMES["arch"]`, and every group the track-F branches
had grown while the tag was unranked on them returned to its
pre-track-F value.
"""
sizes = {label: len(names) for label, names in (await server._tool_groups()).items()}
assert sizes == {
"analysis": 12,
"architecture": 11,
"architecture": 12,
"batch": 3,
"blocks": 9,
"corner_ops": 4,
@@ -640,4 +621,4 @@ async def test_tool_group_sizes_are_unchanged():
"validation": 1,
"view": 4,
}
assert sum(sizes.values()) == 240
assert sum(sizes.values()) == 241