architecture-review
Use when the user wants an architecture review, a design health check, a staff-level read on architectural risk, or an assessment of coupling and cohesion: "review my architecture", "is this codebase well-architected", "architecture health check", "where's the design risk", "design review before we scale". Maps the system, detects the stack, fans out seven parallel reviewers (one per quality dimension — boundaries, coupling, data flow, failure modes, information hiding), and synthesises a verdict plus a prioritised roadmap. Diagnoses only — does not refactor. For a diff or PR, use code-review; to actually apply refactors, use improve-codebase-architecture.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- architecture-review
- description
- Use when the user wants an architecture review, a design health check, a staff-level read on architectural risk, or an assessment of coupling and cohesion: "review my architecture", "is this codebase well-architected", "architecture health check", "where's the design risk", "design review before we scale". Maps the system, detects the stack, fans out seven parallel reviewers (one per quality dimension — boundaries, coupling, data flow, failure modes, information hiding), and synthesises a verdict plus a prioritised roadmap. Diagnoses only — does not refactor. For a diff or PR, use code-review; to actually apply refactors, use improve-codebase-architecture.
02 资源文件 5
- 参考文档evals/evals.json1.7 KB
- 参考文档references/dimensions.md16.7 KB
- 参考文档references/domain-probes.md4.2 KB
- 参考文档references/knowledge-base.md15.1 KB
- 参考文档references/report-template.md2.3 KB
03 SKILL.md 正文
Architecture Review
Critical architectural assessment. Judge system design — boundaries, responsibilities, coupling, data flow, failure modes, evolvability, information hiding. Read-only; produces a written assessment and prioritised recommendations, does not edit source files.
Stance. Adversarial, not a balanced scorecard. Hunt for what is wrong, weak, or risky. Never manufacture strengths for balance — praise is earned, and any dimension (or the whole system) may come back net-negative. Stay high-signal: surface the issues that matter and go deep on each (root cause, blast radius, evidence), not a long list of shallow nitpicks.
Agnostic vocabulary, stack-specific probes. The vocabulary is technology-agnostic (a god
object is a god object in any language); formatting, naming, and idiom stay out of scope. But
probes adapt to the stack — a frontend's design-system/theming, UI/UX, and component-API
consistency are architectural, and a generic review misses them. See
references/domain-probes.md.
Capabilities
A staff-engineer reviewer operating this skill:
- Identifies the architectural style in use and evaluates whether it fits the system's actual constraints
- Names patterns precisely — where they are applied correctly, misapplied, or conspicuously absent
- Traces data flow and transaction/consistency boundaries across service and module edges
- Locates resilience and scalability ceilings (missing circuit breakers, unbounded queues, stateful services)
- Maps trust boundaries and identity/secret flow; flags where authentication, authorisation, or secret handling is absent or porous
- Assesses module depth, coupling direction, cohesion, and information-hiding discipline
- Surfaces genuine quality-attribute trade-offs rather than treating all dimensions as simultaneously maximisable
- Grounds every finding in code evidence — and, where the repo provides it, in measured evidence (bundle reports, dependency graphs, coverage, profiles), not reasoning from reading alone
- Is willing to deliver a net-negative verdict; reserves praise for what is genuinely well-built
The vocabulary for naming patterns precisely lives in
references/knowledge-base.md.
The per-dimension rubric (what good looks like, checklists, anti-patterns) lives in
references/dimensions.md.
Process
Phase 1 — Discover and map
Use the Agent tool with subagent_type=Explore to build a system map:
- Entry points and how the system is driven
- Top-level modules / services and their responsibilities
- Major boundaries and seams
- Data flow through a representative request or job
- State, persistence, and ownership
- External dependencies
- Deployment / runtime shape
Also detect the stack (frontend, backend, data/ML, infra, library, or a mix) and list
the build/analysis tooling the repo provides (bundlers, dependency analysers, coverage
runners, profilers). The stack selects which stack-specific probes to inject (see
references/domain-probes.md); the tooling tells reviewers
what to measure rather than estimate.
Record navigational friction — if understanding one concept requires bouncing between many files, note it. The system map is both this phase's output and the shared context for all reviewer subagents. Do not grade yet.
Phase 2 — Fan out per-dimension reviewers
Spawn seven reviewer subagents in parallel — one message, seven Agent calls,
subagent_type=Explore. Each owns one lens:
- Simplicity & understandability
- Maintainability
- Extensibility
- Security
- Performance & scalability
- Modularity (deep modules + coupling & cohesion)
- Deployability (release coupling, CI/build-matrix coupling, operational blast radius)
Read references/dimensions.md and
references/knowledge-base.md. For each reviewer, paste
(a) their dimension's section from dimensions.md, (b) the knowledge-base domains
listed for their lens in the Lens → domains mapping table at the end of
knowledge-base.md, and (c) any stack-specific probes for their lens from
references/domain-probes.md matching the stack detected in
Phase 1. Subagents do not share your context.
Measure, don't estimate. Explore agents can run read-only shell commands. Where Phase
1 found tooling, tell the reviewer to run it and cite the output (bundle report → Performance,
dependency/cycle graph → Modularity, coverage → Maintainability). Flag any claim that is an
estimate because no tooling existed.
Subagent prompt template — fill the seven {{...}} slots per reviewer:
You are a staff engineer performing a focused architecture review of the codebase at
{{REPO_PATH}}. Your lens: {{DIMENSION NAME}}.
Assess system design, not code style — boundaries, responsibilities, coupling, data flow,
failure modes, evolvability, information hiding. Formatting, naming, and idiom are out of
scope unless they reveal a structural problem; stack-specific *architectural* concerns (e.g.
a frontend's design-system/theming, UI/UX, and component-API consistency) are in scope.
System map (your ground truth — read the real code to confirm or challenge it):
{{SYSTEM MAP}}
Rubric for your lens (definition, what good looks like, checklist, anti-patterns):
{{PASTE THIS DIMENSION'S SECTION FROM references/dimensions.md}}
Architectural vocabulary relevant to your lens:
{{PASTE THE KNOWLEDGE-BASE DOMAINS FOR THIS LENS FROM references/knowledge-base.md}}
Stack-specific probes for your lens (skip any that don't apply to this stack):
{{PASTE THIS LENS'S PROBES FOR THE DETECTED STACK FROM references/domain-probes.md, or "none"}}
Available measurement tooling (run it and cite the output where it strengthens a finding):
{{TOOLING FOUND IN PHASE 1 RELEVANT TO THIS LENS, or "none found — reason from the code and say so"}}
Name patterns from this vocabulary precisely where they apply, are misapplied, or are
conspicuously absent. Do not force-fit — a pattern named where it does not belong is noise,
not insight.
Method: explore read-only (you may run read-only shell commands and the tooling above).
Ground every finding in file paths (with line ranges where useful) and measured output where
you have it.
Stance: be critical — find what is wrong, weak, or risky, do not reassure. Mention a strength
only if it is genuinely well-built and material. Stay high-signal: surface the issues that
matter and go deep on each (root cause, blast radius), not a pile of nitpicks.
Return narrative prose, no scores or severity tags. Structure:
- A 2–3 sentence overall verdict — blunt, allowed to be net-negative. Note strengths only if real.
- Findings, ranked most-serious first. Each: (a) what, (b) where — file-path/measured evidence,
(c) why it matters architecturally, (d) a direction for remediation (direction, not implementation).
Say the dimension is healthy only if the evidence supports it — not as a default.
Phase 3 — Synthesise
Collect the seven reports:
- Dedupe. The same root issue often surfaces across multiple lenses. Merge it.
- Surface cross-cutting themes. Where several lenses independently land on the same subsystem or boundary, that convergence is the highest-signal result — lead with it.
- Rank by impact. Be opinion-forward and critical. The synthesis carries an explicit overall verdict that may be net-negative — do not soften it with manufactured positives. Note strengths only where they are genuine and material to the verdict.
Phase 4 — Deliver
Write the report to ./docs/architecture-reviews/<descriptive-name>.md (create the
directory if needed), following
references/report-template.md. The directory allows
multiple reviews over time.
04 同仓库更多 Skills
vault-recall
Answer the user's conceptual or technical question using their Obsidian vault as well as general knowledge. Use when the user asks a question (not a task) whose topic appears in the vault MOC digest from session start. Not for task instructions, not mid-task, and not for writing to the vault (that is to-vault).
ingest
Ingest one external source (an article, course lesson, doc, PDF or URL) into the user's Obsidian vault: save the original to raw/, then build wiki/ pages per the vault's § Ingest. Use when the user types /ingest, or says "ingest this", "add this source to my wiki", "put this article/lesson in the vault as a wiki page". Works from any repo. Routing rule: someone else's words go to wiki/ (this skill); the user's own learnings and decisions go to notes/ (/to-vault).
to-tickets
Breaks a source into independently-grabbable GitHub tickets. For a code feature the source is the plan (`docs/plans/<feature>.md`, from /to-plan) and every new or changed symbol lands in exactly one ticket, its signatures copied into the ticket body; a non-code feature is cut from the PRD's slices. Cuts tickets for one feature per run. If a code feature has no approved plan, offers /to-plan instead of cutting from prose. In a repo that runs command-centre, also emits `[[task]]` blocks into its config; in a plain treepad repo, emits a Batch Manifest instead so the tickets materialise as stacked worktrees.
to-seams
Records an agreed-but-unlanded cross-repo interface as a seam: the file a consumer's agent gets pasted into its prompt as ground truth, plus the `[[seam]]` block command-centre reads for the retirement pointer. Use when two repos need to build against an interface neither has landed yet — "record a seam for X", "we agreed on this schema, seam it", "add a seam so Y can build against Z's new field". Halts for approval before writing either file.
to-roadmap
Prioritises settled features into a Now / Next / Later kanban board, rendered as a self-contained ./ideas/roadmap.html. Each card is a feature, not a ticket — one card later becomes several tickets via /to-prd -> /to-plan -> /to-tickets. Boards the features in ./docs/approach.md, or the "## Accepted ideas" in ./ideas/CONTEXT.md when there is no approach doc. The approach doc is settled truth: this assigns tiers and reasons about ordering, it never re-litigates what was decided.
to-prd
Turns one feature idea into a PRD built on journeys: a one-line problem, journeys (each ending in an observable state) and delivery slices that say what is usable after each. Interviews, explores the codebase, and saves to docs/prds/<feature>.md. Covers exactly one feature: given a multi-feature source, ask which one. Reads any approach doc or ideate report as priors so it doesn't re-ask what's settled, but needs none. Starts the per-feature spine (/to-prd -> /to-plan -> /to-tickets).