Install
openclaw skills install architect-reviewArchitecture review based on OpenSpec documents and code. Multi-dimension concurrent evaluation with structured scoring and actionable recommendations. Use when asked to "review architecture", "arch review", "架构评审", "evaluate the design", or "review openspec". Proactively suggest when a project has openspec/specs/ and the user is about to start implementation or refactoring.
openclaw skills install architect-reviewTHIS IS AN ARCHITECTURE REVIEW, NOT A CODE REVIEW. Evaluate at the MODULE/COMPONENT level — system structure, boundaries, data flow, design trade-offs. Ignore code style, variable naming, function-level implementation, individual bugs, formatting.
THIS SKILL PRODUCES A REPORT. It does NOT fix, modify, or implement anything. Output: a structured architecture evaluation report. No file edits. No code changes. No PRs. Report only.
Before any analysis, read and understand the current dimensions and report template. These files live alongside this SKILL.md — the user may have customized them.
Read dimensions.md (relative to this SKILL.md).
## Dimension: <name> section.Read report-template.md (relative to this SKILL.md).
Read examples.md (relative to this SKILL.md) for output style reference.
If any file is missing, warn the user and fall back to inline defaults.
Locate the project's OpenSpec specifications:
openspec/specs/ directory in the project root.specs/, spec/, or any *.spec.md files.--spec-only mode with a provided document.For each spec file found:
### Requirement: <name> blocks and their #### Scenario: sub-blocks.Look for {project_root}/.arch-review/ directory.
If it exists, read the MOST RECENT report file (sorted by date in filename).
From the previous report, extract:
If a previous report exists, this review becomes an INCREMENTAL review:
If no previous report exists, proceed with a full scan.
If code exists (skip if spec-only mode):
Focus on STRUCTURE, not implementation details:
DO NOT read individual function bodies. Only scan module-level structure, entry points, and interfaces.
Construct the shared context payload that every subagent will receive:
SHARED_CONTEXT:
- Project summary: language, framework, domain
- OpenSpec requirements list (name + SHALL statement, no full scenarios unless small)
- Code structure summary from Phase 2
- Key file paths for deeper inspection
Keep this under 3000 tokens to leave room for dimension-specific instructions.
The main agent performs the review directly — one dimension at a time. Do NOT delegate to subagents via Task tool. You (the main agent) do all the work.
Default: Sequential (main agent)
Optional: Parallel (subagents)
model parameter with the full slug from ALIAS_MAP below.ALIAS_MAP (for subagent mode only):
| Alias | Full Slug |
|---|---|
| opus | claude-4.6-opus-medium-thinking |
| sonnet | claude-4.6-sonnet-medium-thinking |
| gemini | gemini-3.1-pro |
| codex | gpt-5.3-codex |
| fast | composer-2-fast |
For EACH dimension in the active list:
### {dimension_name} — {score}/10
#### Strengths
- {architectural strength}: {explanation referencing spec or module}
#### Weaknesses
- {architectural weakness}: {explanation referencing spec or module}
#### Recommendations
| # | Priority | Recommendation | Related Spec/Module |
|---|----------|---------------|---------------------|
| 1 | ... | ... | ... |
DO NOT focus on code style, naming, formatting, individual bugs, or line-level issues. Focus on design decisions, component relationships, responsibility distribution, and evolvability.
The user may express preferences in natural language. Parse their intent:
Scope (which dimensions to review):
Mode (with or without code):
Execution (sequential or parallel):
Once all dimensions are evaluated:
Show the user the FULL report so they understand the complete picture before making decisions.
After the user has reviewed the full analysis report, walk through issues dimension by dimension. Each dimension is ONE interaction step.
For each dimension that has weaknesses/recommendations:
AskQuestion:
title: "{dimension_name} ({score}/10) — 问题确认"
prompt: "以下是该维度的架构问题(已按推荐优先级排序)。请勾选要纳入正式报告的:"
options:
- "[推荐: HIGH] {issue summary} — {location}"
- "[推荐: MEDIUM] {issue summary} — {location}"
- "[推荐: LOW] {issue summary} — {location}"
allow_multiple: true
After the user selects, ask in plain text (not AskQuestion): "对以上勾选的问题,是否有批注或补充意见?(直接输入,或回复"无"跳过)"
Record any user comments — they will be included in the final report alongside the issue.
Present a final summary of selections:
"已确认 X 个问题纳入正式报告,Y 个问题留档。是否确认生成最终报告?"
Wait for user confirmation before proceeding to Phase 7.
Based on user selection, produce the final report with this structure:
This section enables downstream agents to quickly understand the system without re-scanning.
Include:
## Architecture Overview
### System Diagram
\`\`\`mermaid
flowchart TD
...
\`\`\`
### Summary
{3-5 sentence architecture description}
### Tech Stack
| Layer | Technology |
|-------|-----------|
| Language | ... |
| Framework | ... |
| Storage | ... |
| External | ... |
### Module Registry
| Module | Responsibility | Entry Point |
|--------|---------------|-------------|
| {module_path} | {what it does} | {main file/class} |
| ... | ... | ... |
### Data Flow
{source} → {processing} → {storage} → {presentation}
### External Boundaries
| System | Protocol | Module |
|--------|----------|--------|
| {e.g. GitHub API} | {REST/gRPC/etc} | {which module handles it} |
This section serves as an INDEX for future agent invocations — it should contain enough structural info that a new agent can orient itself in < 30 seconds.
Selected issues → Include in the final report with full detail:
Unselected issues → Save to an appendix section "Deferred Issues":
Write the final report to a file in the project:
{project_root}/.arch-review/{date}-report.mdThe final report MUST include a machine-readable metadata section at the end for downstream agents to consume:
<!-- ARCH-REVIEW-META
project: {project_path}
date: {iso_date}
dimensions_reviewed: [list of dimension ids]
selected_issues:
- id: {issue_id}
dimension: {dimension}
severity: {high|medium|low}
location: {module or file path where the problem is rooted}
spec_refs: [related requirement names]
summary: {one-line}
deferred_issues:
- id: {issue_id}
dimension: {dimension}
severity: {high|medium|low}
location: {module or file path}
summary: {one-line}
-->
THIS SKILL PRODUCES A REPORT. It does NOT fix, modify, or implement anything beyond writing the report file itself. No code changes. No PRs. Report only.
The report is designed to be consumed by a separate fix agent that will:
Trigger: /arch-review — then the user may add natural language instructions:
| User says | Effect |
|---|---|
/arch-review | Full review, all dimensions, sequential |
/arch-review 只看安全和可观测性 | Only review security + observability |
/arch-review 还没写代码,先评审 spec | Spec-only mode, no code scanning |
/arch-review 并发 | Use parallel subagents |
帮我做个架构评审 | Same as /arch-review (natural trigger) |
Note: The review uses whatever model the user chose for the current conversation. To use a specific model, start the conversation with that model, then trigger the review.