skills/ops-architecture-review/SKILL.md
Use when reviewing codebase architecture for refactoring opportunities, surfacing shallow modules, or proposing deepening refactors. Identifies architectural friction and produces GitHub issues with the ops-triage labeling scheme.
npx skillsauth add paulund/ai ops-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.
Read every file in docs/adr/ first. ADRs encode accepted design decisions — the patterns documented there (data fetching layer, service interfaces, configuration-driven dispatch, etc.) are the baseline you measure friction against. Any candidate that contradicts an ADR must be flagged as such and linked to the ADR; don't silently re-litigate the decision.
Read CONTEXT.md / CONTEXT-MAP.md if present for domain vocabulary. Don't flag the absence of these files.
Walk the codebase and note friction:
Apply the deletion test: would deleting the suspect module concentrate complexity (keep) or move it (remove)?
Search GitHub issues for existing reports on the identified friction to avoid duplicates. Present a numbered list of deepening opportunities, then create a GitHub issue for every new candidate.
Issue title — Deepen <module-name>: <one-line outcome>
Issue body:
> *This was generated by AI during triage.*
## Context
<friction this refactor relieves>
> **Recommendation:** Strong | Worth exploring | Speculative — <one-line why>
## Files
- path/to/module/a
- path/to/module/b
## Current shape (shallow)
<deletion test analysis>
## Target shape (deep)
<new interface surface, what stays inside, what the seam looks like>
## Dependency category
TBD — to be filled during grilling loop.
## Seam & adapters
TBD — to be filled during grilling loop.
## Testing strategy
TBD — to be filled during grilling loop.
## Out of scope
TBD — to be filled during grilling loop.
## Acceptance criteria
- [ ] Deepened module exists at <path>
- [ ] Old shallow modules deleted (or thin compatibility shim + follow-up)
- [ ] New tests at deepened interface pass; old tests deleted
- [ ] No callers import old internal modules
Labels (exactly one per category):
| Label | When |
|---|---|
| chore (category) | Always |
| planned (state) | Always |
| afk (execution) | Default. Use hitl when target shape or AC are genuinely undecided. |
ADR conflicts: If a candidate contradicts an existing ADR, only surface it when friction warrants reopening. Mark it clearly and link the ADR.
When CONTEXT.md is missing domain terms used in issue titles/bodies, add a ## Domain vocabulary notes section below Acceptance criteria.
After creating all issues, print a one-line top recommendation: Start with <issue-url> — <one-line reason>.
When the user picks a candidate, load references/deepening.md and walk the design tree:
If the user rejects with a load-bearing architectural reason, post a draft ADR header and ask: "Want me to record this as an ADR?" Close with wontfix.
After grilling, update the issue body with resolved sections. Flip hitl → afk if applicable.
| File | When to load |
|------|-------------|
| references/architecture-rules.md | Before step 1 (Explore) and before step 2 (Ship candidates) |
| references/language.md | When writing proposals, issue bodies, or documentation |
| references/deepening.md | When user initiates step 3 (Grilling loop) |
MUST DO
references/language.md exactly. Treat drift as a bug.docs/adr/ before exploring. ADRs are the baseline; candidates that contradict them must be flagged and linked, not silently re-litigated.CONTEXT.md / CONTEXT-MAP.md if present for domain vocabulary.chore), one state (planned), one execution (afk/hitl).references/architecture-rules.md.MUST NOT DO
CONTEXT.md or ADRs upfront.references/language.md.needs-triage or needs-info on issues from this workflow.development
Use when implementing any logic, fixing any bug, or changing any behaviour. Use when you need to prove code works, when a bug report arrives, or when modifying existing functionality. Do NOT use for config changes, data migrations, or dependency updates.
development
Use when starting a new feature, when requirements are unclear, when asked to write code without a clear spec, or before any non-trivial implementation. Do NOT use for trivial bug fixes or one-line changes.
development
Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. Detects the stack from dependency files, fetches official documentation, implements following documented patterns, and cites sources for every framework-specific decision.
development
Use when preparing to ship a feature, release, or deployment. Use before merging to main, creating a release, or deploying to production. Do NOT use for CI-only changes or internal refactors that don't reach production.