$npx -y skills add testdouble/han --skill architectural-analysisPerforms deep architectural analysis of a specified module, directory, or feature area by examining structural coupling, data flow, concurrency patterns, risk, and SOLID alignment. Use when the user wants to assess, evaluate, or review the architecture, design quality, dependency
| 1 | ## Project Context |
| 2 | |
| 3 | - git installed: !`which git 2>/dev/null || echo "not installed"` |
| 4 | - CLAUDE.md: !`find . -maxdepth 1 -name "CLAUDE.md" -type f` |
| 5 | - project-discovery.md: !`find . -maxdepth 3 -name "project-discovery.md" -type f` |
| 6 | |
| 7 | ## Operating Principles |
| 8 | |
| 9 | Read these before dispatching anything. They constrain every step below. |
| 10 | |
| 11 | - **A focus area is required.** This skill analyzes a specific module, directory, or feature. "Analyze the whole codebase" is not a valid input. If no focus area resolves to real files, stop and ask the user to name one. |
| 12 | - **The agents own the judgment; the skill orchestrates.** The skill validates the focus area, classifies size, selects the roster, fans agents out and in, and renders the report. It does not produce findings itself. |
| 13 | - **The discovery roster is signal-selected; the synthesis spine always runs.** `han-core:structural-analyst`, `han-core:behavioral-analyst`, `han-core:risk-analyst`, and `han-core:software-architect` run at every size BECAUSE structure, runtime behavior, risk-of-inaction, and SOLID synthesis are the irreducible core of an architectural read. Every other specialist is added only when the focus area's signals warrant it and the size band allows it, BECAUSE dispatching an agent whose domain the code does not touch burns tokens and dilutes the report with low-signal findings. |
| 14 | - **Default to small.** Start classification at small and escalate only when a higher-band signal is clearly present. Borderline signals stay at the smaller band. Under-dispatching is recoverable by re-running at a larger size; over-dispatching is not. |
| 15 | - **Recommendations, not refactors.** The skill never modifies code. `han-core:software-architect` (and `han-core:system-architect` when dispatched) produce pseudocode sketches for proposed boundaries. Implementation is a separate, later step. |
| 16 | - **Negative results are valuable.** When a dimension is genuinely clean (no concurrency in a pure-functional module, sound boundaries), the report says so. Agents must not fabricate findings to fill a section. |
| 17 | - **Single pass, no iteration round.** This skill is a fan-out / fan-in, not an iterative loop. If a band proves too small, the user re-runs at a larger size — the skill does not self-escalate mid-run. |
| 18 | - **System-altitude work is deferred by default.** `han-core:software-architect` defers cross-service / bounded-context / trust-boundary findings rather than absorbing them. `han-core:system-architect` is added to the roster only at large size and only when a boundary-crossing seam is actually present. When it is not dispatched, those deferrals are surfaced in the report so the user can dispatch `han-core:system-architect` separately. |
| 19 | - **The report template lives at [references/architectural-analysis-report-template.md](./references/architectural-analysis-report-template.md).** The skill renders that template by filling placeholders and removing the sections whose agent was not dispatched. It does not invent a structure inline. |
| 20 | - **The synthesized report is written for a named reader.** As the skill writes the final report's synthesized prose, it loads and applies [`../../references/readability-rule.md`](../../references/readability-rule.md), holding one audience above the writing: the engineer weighing the module's design and deciding whether to change it. Scope that frame per section so the technical specifics that reader needs — file paths, finding IDs, exact conditions, pseudocode — are preserved, never simplified away. |
| 21 | |
| 22 | # Run an Architectural Analysis |
| 23 | |
| 24 | ## Step 1: Validate the Focus Area and Resolve Project Context |
| 25 | |
| 26 | **Bind `$size`.** If the user passed `small`, `medium`, or `large` as the first positional argument, bind `$size` to it. Anything else is part of the focus-area context, not a size; bind `$size` to the literal `none provided`. |
| 27 | |
| 28 | **Resolve the focus area.** Take the remaining argument and conversation context as the focus area. Confirm it resolves to real files using `Glob` and `Read`. Identify the boundary: which files and directories the focus area includes, and one la |