3 minutes

31. Score architecture from the IcePanel C4 model

Date: 2026-10-11

Status

Accepted

Amended by 32. Package architecture scoring as an ArcKit companion plugin

Supersedes 28. Implement Architecture Scoring via Spec-Driven Development (SDD)

Context

ADR 0028 made the Python Architecture Scoring Component (repos/archi-agentic-toolset) read Archimate models exported from Archi and versioned on GitHub via coArchi2, with history per git commit. It was built with speckitplus, opencode and Big Pickle. ADR 0030 made IcePanel the C4 source of truth. The Archi files are legacy and read-only, so the scorer’s input no longer changes. The score CLI command and the POST /api/v1/score endpoint were stubs. The real container and component scoring was Neo4j Cypher tied to ArchiMate element types and stereotypes (Flow/Triggering).

Decision

We will score the architecture from the IcePanel C4 model. The metrics from ADR 0028 stay the same: C4 container-level coupling Ca, Ce and instability I = Ce / (Ca + Ce).

Input is the IcePanel REST API, using the same endpoints as the RAG ingestion (python-service/app/kb.py), behind a ModelSource interface in the toolset. ArchiMate stays available as a legacy read-only source behind the same interface.

Mapping: IcePanel system -> System, app and store -> Container, component -> Component. The parent comes from parentId. Actors, groups and external systems are only dependency endpoints and are not scored.

Sync/async comes from an IcePanel tag group “Interaction” with tags Sync and Async on connections. Untagged connections count as sync. The weights stay as in the current code (sync 1.5, async 1.0, same 30-70 coupling band), so legacy and IcePanel scores use the same scale. Bidirectional connections count both ways. Component connections roll up to their container. Connections inside one container don’t count for container coupling. Only live connections are scored by default; future ones can be included for what-if analysis.

History is one score snapshot per IcePanel landscape version id, instead of per git commit sha.

The archi-c4 CLI and the FastAPI score endpoint take a source (icepanel|archimate) and a version. The Hugo dashboard on hugo.royerm.fr gets IcePanel scores. A read-only MCP server, archi-scoring (score_landscape, compare_versions, list_versions), is registered in the Claude Code harness, so the architecture-reviewer agent (/arch-check) reports score changes per container.

We keep SDD, but with Spec Kit specs in the toolset specs/ folder run through the Claude Code harness (ADR 0029), not speckitplus, opencode and Big Pickle.

--- config: look: handDrawn theme: neutral --- graph LR A[IcePanel API] --> B[ModelSource] B --> C[C4 scorer] C --> D[CLI / API] C --> E[Hugo dashboard] C --> F[MCP server] F --> G["/arch-check"]

Consequences

Connections must be tagged Sync or Async in IcePanel for the scores to mean something. Until then everything counts as sync. The toolset needs ICEPANEL_API_KEY and ICEPANEL_LANDSCAPE_ID (optional ICEPANEL_VERSION_ID) and depends on IcePanel SaaS being available. Scores from before and after the switch can’t be compared directly, because the model changed shape (actors, stores, external systems). The legacy ArchiMate commit timeline can still be read but no longer changes. opencode.md in the toolset becomes legacy. The toolset README weight table said 1.0/0.5 while the code used 1.5/1.0. The code values are the reference. No containers or connections change in IcePanel; only connection tags are added.