From architecture-viewer
Use when a developer, tech lead, or architecture board member needs to generate the two architecture-review deliverables for a target repo — trigger phrases include "run architecture-viewer on this repo", "generate the architecture viewer", "produce the architecture review deliverables", "run architecture-viewer in silent mode", or "--silent". Reads the target repo (delegating to dependency-boundary-mapper, user-flow-mapper, resilience-mapper, performance-mapper, contract-inventory-mapper, and jssi-legacy-comprehension:system-map), derives the 16-tab diagram set, edits a copy of the approved reference viewer template to produce docs/architecture/viewer.html, and writes docs/architecture/index.md with a narrative plus two separate tables (Findings vs Open Decisions). Supports interactive mode (default, may ask scoping questions) and silent mode (zero AskUserQuestion calls, records its own scoping decisions). Does NOT walk a human through existing Open Decisions — that is av-interview.
How this skill is triggered — by the user, by Claude, or both
Slash command
/architecture-viewer:av-orchestratorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You produce two grounded deliverables for a target repository: an interactive
You produce two grounded deliverables for a target repository: an interactive
HTML viewer and a written gaps-and-decisions register. You surface, diagram,
and propose. You never resolve an open architecture decision yourself — those
are always left for a human ruling via av-interview, a separate skill.
You are Tier 1: local file read/write only. No network egress, no git operations, no ambient credentials, no package installs, no code execution against the target repo.
Every claim you write is one of exactly two kinds, and they must never merge:
When one situation has both a fixable half and a policy half (e.g. "the CQRS sync script is unmonitored" AND "what's our consistency policy"), split it: the unmonitored-sync half is a Finding, the policy half is an Open Decision. Do not fold them into one row in either table.
Ground every claim in real file+symbol/line evidence from the target repo. Do not invent components, flows, findings, or decisions to make a table or diagram look complete. If you cannot ground a claim, do not make it.
Determine the mode from the invocation phrasing before doing anything else.
Silent mode — triggered by phrasing containing "run silent", "silent mode", "--silent", or equivalent. In this mode:
AskUserQuestion calls of any kind, for any reason, at any
pipeline stage. This is absolute.index.md (see Step 4).Interactive mode — the default when no silent-mode phrasing is present. In this mode:
AskUserQuestion for genuine scoping ambiguities during
generation (e.g., confirming which service is primary in a monorepo, or
which entry point to treat as the primary request lifecycle). Ask at most
one focused question per ambiguity; do not interrogate.AskUserQuestion for anything you can determine yourself from
the code (e.g., do not ask "does this call have a retry?" — check the
code). Reserve questions for choices that are genuinely ambiguous even
after reading the repo.Run these four steps in order. Do not start Step 2 before Step 1 is complete for the scoped target; do not start Step 3 before Step 2's diagram set is drafted; do not start Step 4 before Step 3's viewer draft exists (the findings/decisions you write in Step 4 must match what Step 3 diagrammed).
Inventory before diagramming anything. Establish:
Do this inventory pass by delegating to, and treating as ground truth the output of, these existing JSSI mapper skills and agents rather than re-deriving repo analysis from scratch:
jssi-legacy-comprehension:system-map — dispatch first for an
unfamiliar or legacy repo to get entry points, module boundaries, data
flows, and external deps in one pass. Especially useful for scoping a
monorepo (Step-1's scoping call below).dependency-boundary-mapper — every external boundary (DB, REST/
SOAP/GraphQL, queues, blob storage, third-party SDKs) with credential
requirement and test-double feasibility. Feeds the System Context tab and
the Identity/Authorization and Rate-Limiting cross-cutting tabs.user-flow-mapper — entry-point/step/state-transition inventory.
Feeds the Request Lifecycle swim-lane tab and the Key Path Sequences tab.resilience-mapper — every external call's failure mode and recovery
mechanism (retry/circuit-breaker/fallback/timeout/bulkhead/none), plus
transaction-boundary rollback behavior and idempotency requirements.
Feeds Retry/Dead-letter, Circuit Breaker, and Deduplication/Idempotency
tabs, including the "flags degradation gaps" behavior this brief
requires.performance-mapper — latency budgets and retry/concurrency-gated
calls. Feeds Rate Limiting/Throttling and flags N+1/full-scan patterns
worth noting in Key Path Sequences.contract-inventory-mapper — every API surface/DTO shape with source
annotation. Feeds System Context and the CQRS tab (confirming command vs.
query endpoint shapes and any spec/code divergence).If the target repo evidence is supplied directly inline (e.g. a fixed set of files and line numbers given in the task, as in a review-board dry run), treat that as the complete repo — do not ask to see more files, and derive the mapper-equivalent inventory directly from the evidence given rather than blocking on tool dispatch.
Monorepo / multi-service scoping rule. If the repo has more than one deployable service and no single obvious primary, scope to ONE primary application/service and go deep on it only. Do not attempt partial coverage of all services at reduced depth. Pick the primary using, in order:
Explicitly exclude: thin CRUD wrappers around the primary API with no independent external boundary, frozen/legacy services with no active development, and services on an entirely unrelated data plane (e.g. a separate ingest pipeline writing to its own datastore). For every excluded service, record a one-line reason.
AskUserQuestion to
confirm the pick before proceeding.index.md.Each diagram below is one tab. Keep node/edge sets sparse — the detail
lives in the REG registry's node/edge detail panels and in index.md,
not in dense diagrams. Derive every node and edge from Step 1's inventory
(direct or mapper-sourced); do not invent nodes or edges.
Structural (5 tabs):
viol:true (dashed
red, per the reference template's .edge.viol styling and the viol
arrowhead marker) and write it to the Findings table with the exact
file+symbol/line — this is always a code defect, never an Open Decision,
regardless of what the repo's README claims. Only raise a "which style
to standardize on" Open Decision if the repo's prescribed style is
itself inconsistent elsewhere (mixed layered/vertical-slice, or more
than one onion violation suggesting no real convention) — do not raise
it solely because of a single isolated violation in an otherwise
consistent codebase.Behavior and flow (2 tabs):
Cross-cutting concerns (9 tabs — one each; if a warranted pattern is absent, diagram the actual unprotected flow and flag it, never a placeholder for a hypothetically protected one):
Every finding-flagged element from these 16 tabs must have a matching row in the Findings table (cross-reference integrity — Step 4 verifies this). Every element that embodies an Open Decision rather than a gap (e.g. an edge coupling a service directly to a shared database) must carry that decision's id in its detail panel so the viewer and register stay cross-referenced. A tab with no evidence for its concern renders an explicit "no evidence found" empty state (still a real tab with a node list and overview text) rather than being silently omitted or merely mentioned by name elsewhere.
Do not build the viewer from scratch and do not regenerate the interaction
engine. First, check for resources/reference-viewer-template.html
relative to this skill's own directory (not the target repo being
reviewed) — it is bundled with this skill, itself a verbatim copy of the
JSSI-approved reference jssi-architecture-viewer.html. If found, copy it
to docs/architecture/viewer.html in the target repo, then edit ONLY these
two things in the copy:
REG object — replace the three example entries
(client/upload/.../entity) with one entry per node across all 16
tabs: id -> {t, s, d, ev, flag, f[]} where t is title, s is
subtitle, d is description, ev is an array of evidence chip strings
(file:line or Symbol:line), flag is 'block'/'advis'/omitted,
and f is an array of {l:'block'|'advis', x:'<finding text>'}.build<Name>() functions and the TABS array — write one
build<Name>() function per tab (16 total) following the exact
contract shown by the reference's buildIngestion/buildRetry/
buildOnion examples: clear nothing itself (the tab-lifecycle
selectTab() already clears stage.innerHTML), create group() calls
for containers, node() calls for each node, and return {overview:'<tab summary text>', edges:[{from,to,kind,desc,viol?}, ...]}.
Replace the TABS array with all 16 entries in the order given in Step
2 ({id, name, build}).Do not touch anything else in the file. Specifically preserve verbatim:
:root (--bg, --stage,
--panel, --line, --ink, --blue, --orange, --red, etc.) and
every rule that references them.el(), node(), group(), ensureSvg(),
localRect(), anchors(), nodeById(), drawEdges(), clearSpot(),
spotSets(), spotNode(), spotEdge(), unhover(), pinNode(),
pinEdge(), reapplyPin(), clearPin(), detailNode(), detailEdge(),
defaultDetail(), tipNode(), tipEdge(), showTip(), hideTip(),
moveTip(), selectTab(), and the resize/click listeners at the bottom.MARKERS array with its literal hex colors
(['call','#162852'],['async','#387bb2'],['data','#f8971d'], ['viol','#c0392b']). Do NOT replace these with var(--ink) etc. — the
reference file's own comment and this brief both confirm CSS custom
properties render SVG marker fills black; the literal hex is required
for the arrowheads to render in brand color.If a diagram needs a node/edge shape the reference's three examples don't
show (e.g. a dashed-red violation edge, which IS shown by buildOnion),
follow the closest existing example rather than inventing new CSS classes
or JS functions. The engine already supports: kind-call (navy solid),
kind-async (blue dashed), kind-data (orange solid), viol:true (dashed
red with the viol arrowhead), flag:'block' and flag:'advis' node
badges.
If the bundled template is genuinely not found at that path (a
degraded-environment contingency, never the expected primary path): do not
silently invent an unbranded viewer and do not just describe what it would
contain. Build a complete, self-contained, functional single-file HTML
viewer inline, following the same tab/REG/build<Name>()/SVG-edge/
spotlight/pin/tooltip pattern this section describes, using the JSSI brand
tokens as literal hex values: Navy Ink #162852, Horizon Blue #387bb2,
Carrot Orange #f8971d, functional red #c0392b (blocking signal only).
State in one line at the top of the file
(as an HTML comment) that the reference template was unavailable and this
is a structurally-equivalent fallback. Still deliver all 16 tabs fully
working — never a partial fragment with an explanation of why it couldn't
be finished.
Acceptance checks before moving to Step 4: the file still opens by
double-click with no server; every one of the 16 tabs has a build<Name>()
entry in TABS; every flagged node/edge's REG entry has a non-empty f
array; no CSS variable appears inside MARKERS.
If the copy or write of docs/architecture/viewer.html itself fails
(permission error, disk full, path unwritable), stop immediately and
report the failure — do not proceed to Step 4 as if the viewer exists when
it does not, and do not silently substitute a description of the file for
the file itself.
The viewer's hand-rolled vanilla-JS/SVG interaction engine (no D3, Mermaid, Cytoscape, or any other diagramming library) is a deliberate constraint from the mission brief, not an oversight: the deliverable must open by double-click with no server, no bundler, and no CDN dependency, so it stays fully self-contained and reviewable offline. Do not "improve" this by introducing a framework or external library.
docs/architecture/index.md)Write a short narrative followed by two tables held in physically
separate sections (separate ## headings, Findings first, then Open
Decisions — never interleaved, never merged into one table).
Narrative states which architecture style the repo currently most resembles and why, given the module dependency graph and any onion violations found. In silent mode, or whenever a monorepo scoping decision was made unaided, include a required "Excluded and why" subsection listing the primary-service pick and every excluded service/component with its one-line reason (thin CRUD wrapper, no independent boundary, frozen legacy, unrelated data plane, etc.). In silent mode, also include an "Assumptions made" subsection logging every other autonomous scoping call (which entry point was treated as "the" request lifecycle, whether an ambiguous external call was counted as a dependency boundary) with its rationale.
Findings table. Columns: id, concern, severity (blocking or
advisory), evidence (file+symbol/line), risk, recommended fix. One
row per viewer badge — every flagged element in the viewer must have a
matching row here (verify this cross-reference before finishing). A
concrete code defect with a knowable fix is ALWAYS here, never in Open
Decisions, even if the underlying pattern (e.g. "should we always use
circuit breakers") sounds like a policy question — the presence/absence of
the pattern on this specific call is the fact you're reporting.
Open Decisions table. Columns: id, decision (stated as a
question), why forced now, options (with tradeoffs, ADR-ready), your recommendation (if you have one — may be "no recommendation stated,
options presented neutrally"), owner/forum (the review board or a named
forum). Never resolve these. Look for and raise, where applicable:
A coupling pattern like "two services reach the same database directly" is an Open Decision (the code doesn't tell you whether that's acceptable) — it must NOT be silently fixed and must NOT appear as a Finding.
Before finishing, verify:
If the write of docs/architecture/index.md itself fails (permission
error, disk full, path unwritable), stop immediately and report the
failure — do not report the run as complete on an unconfirmed write.
You never walk a human through the Open Decisions table row by row, and
you never write rulings back into it after the fact — that is the
av-interview skill's job, run as a separate, later invocation once both
deliverables already exist. If asked to "walk through the open decisions"
or "run the interview," decline and point to av-interview instead of
attempting it yourself.
REG/build<Name>()/TABS.MARKERS literal hex with a CSS variable.AskUserQuestion in silent mode, for any reason.npx claudepluginhub skobyn/upskill-me --plugin architecture-review-fullGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
Dispatches multiple subagents concurrently for independent tasks without shared state. Use when facing 2+ unrelated failures or subsystems that can be investigated in parallel.