juicesharp/rpiv-mono/architecture-review

Claude Code and agent skill by juicesharp/rpiv-mono

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Conduct a top-down, layer-by-layer architecture review of a software module by reading every file in scope, running a uniform 10-dimension checklist per layer, and triaging each candidate finding through a structured developer checkpoint. Produces a phased polish plan in .rpiv/artifacts/architecture-reviews/ that blueprint can consume per phase. Language-agnostic — works on TypeScript, Java, .NET, Rust, Python, Go, or any other typed module. Use before a 1.0 release, after a major refactor, or when a module has grown enough to warrant a structural audit.

Install

npx vskill@latest install juicesharp/rpiv-mono/architecture-review

SKILL.md

The same SKILL.md was published earlier as juicesharp/rpiv-mono/architecture-review.

Architecture Review

You are tasked with conducting a layer-by-layer architecture review of a target module, producing a single living artifact that captures every triaged finding plus a phased polish plan downstream skills can consume.

Input

$ARGUMENTS — target path (file, directory, or module). Empty input triggers a developer checkpoint to identify the target.

Metadata

!
node "${SKILL_DIR}/../_shared/now.mjs"
echo
node "${SKILL_DIR}/../_shared/git-context.mjs"

Copy values verbatim — do not reformat the timezone offset.

Flow

  1. Identify target → 2. Plan layer structure → 3. Layer-split checkpoint → 4. Skeleton artifact → 5. Per-layer review (loop) → 6. Capture emergent principles → 7. Synthesize cross-cutting themes → 8. Phased polish plan → 9. Present and chain → 10. Follow-ups

The final artifact is blueprint-consumable per phase.

Steps

Step 1: Identify the Target
  1. Argument is empty: use the ask_user_question tool with the following question: "What are we reviewing?". Header: "Target". Options: "Single module" (one package / project / crate / namespace directory); "Single subdirectory" (a subtree inside a module); "Single file" (deep review of one large file). The automatic Type something. row accepts a custom target.
  • Header is capped at ≤16 characters (MAX_HEADER_LENGTH = 16 — longer values are rejected).
  1. Validate the target exists. Use ls via the Bash tool on the resolved path. If missing, ask for a corrected path.
  1. Capture target context into main context:
  • Read the target's manifest file if one exists (package.json, pom.xml, *.csproj, Cargo.toml, pyproject.toml, go.mod, build.gradle[.kts], mix.exs). The manifest names public exports, dependencies, and ecosystem.
  • Read any README.md or architecture doc at the target root.
  • For a single file: read it FULLY (no limit/offset).
  • Enumerate all source files in scope via ls -R or find, filtering by the extensions visible at the target root. Record total file count and LOC ballpark.
Step 2: Plan Layer Structure

Layers mirror dependency direction. Higher layers consume lower-layer vocabulary, so the review walks from the public surface inward.

  1. Categorize each in-scope file by responsibility. Typical role buckets:
  • Public surface / facade / entry point (the file users import)
  • Type vocabulary / shared types
  • Authoring DSL / public API
  • Command / dispatch / UI surface
  • Configuration / loaders
  • Validation
  • Orchestration / runtime
  • Sessions / I/O lifecycle
  • Persistence / on-disk format
  • Cross-cutting utilities
  1. For complex targets, dispatch parallel agents to accelerate categorization — all in a single assistant message with multiple Agent calls (concurrent, synchronous). Never `run_in_background`: its completion can't re-drive a workflow session, so the skill ends its turn before writing the review and the stage fails with no artifact.

Agent — codebase-locator: "Map every source file in {target path} to one responsibility from the standard role buckets (facade, vocabulary, DSL, command, loaders, validation, orchestration, sessions, persistence, utilities). Return a file → responsibility table."

Agent — codebase-analyzer: "For {target path}, identify the import / use-graph dependency direction. Which files are leaves? Which are hubs? Return a topo-ordered list from leaves to hubs."

Wait for ALL agents to complete before proceeding.

  1. Synthesize a layer proposal:
  • Group by responsibility, not file count. A layer is 1 file (a barrel) or 100+ files (an enterprise DAL); both are valid.
  • Top-down by review direction: entry point at Layer 0, deepest concern at Layer N. Entry point = library barrel / MVC controller / lib.rs / __init__.py / whatever the request hits first.
  • Layers >~10 files: propose sub-layers (3.1, 3.2, ...) grouped by file-name cohesion. Example .NET DAL: 3.1 DbContext + migrations; 3.2 entities + value objects; 3.3 entity configurations; 3.4 repositories; 3.5 specifications.
  • Aim for 3–10 top-level layers; sub-layers reviewable in one Step 5 pass.
  • Flag uncategorisable files as cross-cutting utility candidates.
Step 3: Layer-Split Checkpoint
  1. Surface the proposal. Use the ask_user_question tool with the following question: "Proposed split: {N} top-level layers, {file count} files. L0 — {names or count}; L1 — ...; {sub-layers if any: L3.1, L3.2, ...}. Approve?". Header: "Layers". Options: "Approve (Recommended)"; "Adjust split" (reorder / merge / split — describe); "Reduce scope" (drop layers — useful for monolith reviewed one bounded context at a time); "Specify manually".
  1. Loop until approved. Adjustments re-enter Step 2.3 then return here.
Step 4: Create Skeleton Artifact
  1. Read the template at ${SKILL_DIR}/templates/architecture-review.md FULLY (no limit/offset).
  1. Determine metadata from the Metadata block above: filename .rpiv/artifacts/architecture-reviews/<slug>_<topic>.md (use <slug> from line 1; <topic> is a brief kebab-case description); repository: from repo:; branch: / commit: from matching labels; author: ← matching label (fallback: unknown); date: / last_updated: ← <iso> from line 1 (copy the offset verbatim).
  1. Write the skeleton using the Write tool with status: in-progress in frontmatter. Sections:
  • Frontmatter: date, author, commit, branch, repository, target, target_kind, layer_count, phases (derived from the ### Phase N — name headings — see Step 6), unresolved_finding_count, status, tags, last_updated, last_updated_by.
  • Conventions: finding shape (ID, Evidence, Current state, Desired state, Proposed improvement, Severity, Effort, Blast radius, Class, Status, Depends on, Cross-cut tag).
  • Methodology principles: empty placeholder (_principles emerge during Step 5 triage and are captured at Step 6_).
  • Layers: one ## Layer N — {name} heading per layer from Step 3, each empty.
  • Cross-cutting themes: placeholder (_written last, after all layers have been seen_).
  • Consolidated polish plan: placeholder (_phases assembled after Step 7 cross-cut synthesis_).
  1. All subsequent writes use the Edit tool. Never re-Write the whole file — the artifact is the durable checkpoint between sessions.
Step 5: Per-Layer Review (Loop)

For each layer (and sub-layer, if any) in order (L0, L0.1, L0.2, L1, L1.1, ...), run the five sub-steps below. The ## Layer N section fills progressively; the tally at the end of each layer is the visible progress marker.

5.1. Read Files
  1. Batch (large layer only). When the layer wasn't pre-decomposed into sub-layers at Step 3 and holds >~10 files, propose batches by file-name cohesion (e.g., all *Repository.cs; all *Configuration.cs; DbContext.cs + migrations; entities). Confirm via the ask_user_question tool: "Layer {N}: {count} files. Batches: {B1 — count}; {B2 — count}; .... Approve?". Header: "Layer {N} batches". Options: "Approve"; "Adjust batches"; "Promote to sub-layers" (each batch becomes L{N}.{x} with its own tally).
  1. Read files FULLY (no limit/offset) — the entire layer for unbatched, the current batch for batched.
  1. Resolve non-obvious call graphs. For any file whose internal structure isn't clear from a single read, dispatch a parallel codebase-analyzer agent: "For {file path}: enumerate public-visible symbols, functions/methods, call sites. Report the call graph; highlight outsized functions."
  1. Verify external consumers via the ecosystem's reference-finding pattern (rg "from \"<module>\"", grep -r "import <pkg>", grep -r "using <namespace>", rg "use <crate>::"). Hold counts in main context — feeds the wise-decision lens at triage.
  1. Iterate (batched layers only). After 5.2–5.5 close for the current batch, return to step 2 for the next batch.
5.2. Dimension Sweep
  1. Walk ten dimensions across every file in the layer. Hold candidate findings in memory — do NOT triage yet.
  • Boundary — what does the layer own? Any leaks up or down?
  • Public surface — exported / public-visible names, types, ergonomics. Do siblings reach past the facade? Per-symbol consumer-count audit.
  • Coherence / SRP — does each file and each function/method do one thing?
  • Granularity — functions or methods too big or too small; god-parameter lists; over- or under-decomposed?
  • Programming by intention — does the file read top-down as a story? Named operations preferred over inline blocks? Helpers below entries?
  • DRY — duplicated patterns within the layer or across siblings?
  • DDD / ubiquitous language — domain vocabulary consistent? Any legacy names lingering?
  • Naming — file, type, function, constant names. Symmetric where the concept is symmetric?
  • Error / fail-soft posture — uniform across the layer? Multi-state returns use the language's idiomatic discriminated form?
  • Module-graph hygiene — no cycles. Type-only back-refs only where the language supports them.
  1. Produce a candidate findings list (typically 6–14 per layer). Each candidate carries: ID (L<layer>-<seq>), Evidence (file:line + short quote), Current state, Desired state, Proposed improvement, Severity (Low / Med / High), Effort (S / M / L), Blast radius (internal / public-API / on-disk / cross-module), Class (polish vs redesign).
5.3. Triage Each Candidate
  1. Present each candidate as a structured triage question using the ask_user_question tool: "L{X}-{YY} — {headline}. Evidence: file:line ({short quote}). Current: {one sentence}. Desired: {one sentence}. Pick a triage outcome.". Header: "L{X}-{YY}". Options: "{Concrete option A — action}"; "{Concrete option B — action}"; "Defer" (post-release).
  1. Batch where independent. 2–4 independent candidates per call when answers don't depend on each other; sequential when they do, or when blast-radius is public-API / cross-module.
  1. Author options to force the right calls:
  • Deletion candidates with zero current consumers: ALWAYS include a "Keep as composition primitive" or "Keep as type-narrowing idiom" option alongside the drop option. The developer judges abstraction value, not the skill.
  • Multi-state return candidates (property-presence discrimination, partially-tagged shapes, null-as-state, exception-as-state): include "Convert to {target-language's discriminated form}" as an option. TypeScript: { kind: "ok" } | { kind: "err" }. Java 17+: sealed interface + records. .NET 9+: records + pattern matching. Rust: enum. Kotlin: sealed class. Python 3.10+: matched Union. Go: tagged-struct + type switch.
  • File-size candidates (>~200 LOC for TS/Rust/Go; >~300 for Python/Kotlin; >~400 for C#; >~500 for Java): include "Split into <layer>/ directory with one concern per file" with the proposed decomposition inlined.
5.4. Persist Each Triaged Finding
  1. Edit the `## Layer N` section the instant the developer picks an outcome. Append the finding with its full per-finding block.
  1. Set Status verbatim from the chosen option: **accepted** — {summary} / **rejected** — {reason} / **deferred** — post-release / **accepted (absorbed into LX-YY)** when the change rides another finding.
  1. Maintain the counter. Increment unresolved_finding_count in frontmatter when filing a candidate from 5.2; decrement on each triage outcome. Should hit zero before Step 6.
5.5. Tally
  1. Append a tally table at the end of each layer pass (or each batch within a layer):

```markdown ### Layer N — tally

StatusCount
accepted{A}
rejected{R}
deferred{D}
withdrawn{W}

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
658
Repository forks
121
7-day trend score
32

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/juicesharp/rpiv-mono/architecture-review/badge)](https://verified-skill.com/skills/juicesharp/rpiv-mono/architecture-review)

Something wrong with this skill or its page? Tell us.