plugins/pensive/skills/architecture-review/SKILL.md
Assesses architecture decisions, ADR compliance, and coupling. Use when evaluating design changes or validating structural decisions before merging.
npx skillsauth add athola/claude-night-market architecture-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
arch-review:context-established)arch-review:adr-audit)arch-review:interaction-mapping)arch-review:principle-checks)arch-review:risks-actions)Run pytest plugins/pensive/tests/skills/test_architecture_review.py to verify review logic.
Architecture assessment against ADRs and design principles.
/architecture-review
Load modules based on review scope:
modules/adr-audit.md (~400 tokens): ADR verification and documentation.modules/coupling-analysis.md (~450 tokens): Dependency analysis and boundary violations.modules/principle-checks.md (~500 tokens): Code quality, security, and performance.modules/fpf-methodology.md (~800 tokens): FPF (Functional, Practical, Foundation) multi-perspective review methodology.modules/ceremony-audit.md (~600 tokens): Manual lenses for mapping layers that never diverge. Passthrough mappers, twin types, speculative DTOs, single-implementation interfaces. Includes the IO boundary counter-signal.Load all modules for full reviews. For focused reviews, load only relevant modules.
arch-review:context-established: Repository, branch, motivation.arch-review:adr-audit: ADR verification and new ADR needs.arch-review:interaction-mapping: Module coupling analysis.arch-review:invariant-check: Invariant conflict detection and 3-option analysis.arch-review:principle-checks: LoD, security, performance.arch-review:ceremony-audit: Mapping layers that never diverge.arch-review:risks-actions: Recommendation and follow-ups.arch-review:findings-verifiedarch-review:context-established)Confirm repository and branch:
pwd
git status -sb
Document:
arch-review:adr-audit)Load: modules/adr-audit.md
arch-review:interaction-mapping)Load: modules/coupling-analysis.md
arch-review:invariant-check)Before checking principles, identify whether the changes conflict with existing design invariants. This is the highest-judgment step in architecture review: models get this wrong more often than any other call.
Identify existing invariants:
# Detect boundary crossings in changed files
git diff --name-only | while read f; do
head -20 "$f" 2>/dev/null | rg "^(import|from|use |require)" || true
done
When a conflict is detected:
Do NOT recommend a resolution. Present the three options and escalate to human judgment:
| Option | When Right | When Wrong | |--------|------------|------------| | Preserve invariant (reject feature) | Invariant simplifies many things; feature is marginal | Feature is genuinely needed and invariant is stale | | Layer on top (add inelegantly) | Feature is needed; invariant still valuable; imperfection is OK | Layering creates a maintenance trap that will compound | | Revise invariant (change the design) | Genuine new learning invalidates the original reasoning | You're "cleaning up" a decision you don't fully understand |
Output format:
### Invariant Conflicts
[I1] **[Invariant name]** — [what decision it represents]
- **Location**: file.py:42
- **Anchor**: `verbatim source text at line 42`
- **Conflict**: [what change clashes]
- **Options**: Preserve / Layer / Revise
- **Recommendation**: ESCALATE TO HUMAN
- **Risk if wrong**: [what compounds]
Why this matters: Bad invariant decisions compound. After a few wrong calls the codebase becomes unsalvageable. This is a judgment problem rather than a context problem: the agent should surface it, not solve it.
arch-review:principle-checks)Load: modules/principle-checks.md
arch-review:ceremony-audit)Load: modules/ceremony-audit.md
Coupling analysis (Step 3) finds boundaries that leak. This step finds the opposite failure: boundaries that cost something and separate nothing.
Each finding must name the need the ceremony serves today. If no current need can be named, the ceremony is the finding.
Do not flag mappers at an IO boundary. They are load-bearing even when they look like passthroughs, because they stop future internal fields from escaping. See the counter-signal in the module.
arch-review:risks-actions)Summarize using imbue:diff-analysis/modules/risk-assessment-framework:
List follow-ups with owners and dates.
Provide recommendation:
arch-review:findings-verified)Every finding must cite a real location and a verbatim anchor. Write
findings to .review/findings.json and confirm each citation resolves:
python plugins/imbue/scripts/citation_verifier.py \
--findings .review/findings.json --repo-root .
Drop or label UNVERIFIED any finding the verifier fails (exit 1); only
verified findings enter the report. See Skill(imbue:review-core) Step 5
and Skill(imbue:structured-output) for the schema.
Location + verbatim Anchor
confirmed by citation_verifier.py (exit 0), or unverified findings
were dropped or labeled UNVERIFIED.data-ai
Models a business in its own language. Use when the domain has real business rules to capture.
research
Generate diverse solution candidates with category-spanning ideation methods and rotation. Use when stuck on a design or fighting repetitive LLM output.
development
Generates and self-executes a diff-derived test plan for a PR. Use when validating PR changes before merge. Do not use for code review; use sanctum:pr-review.
development
Ramps implementation ambition a notch only after the prior increment is understood. Use when building a feature you must understand, not just ship.