원클릭으로
arch-code-review
Architecture-aware review against canonical structured YAML artifacts. Read-only workflow; no legacy prose docs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Architecture-aware review against canonical structured YAML artifacts. Read-only workflow; no legacy prose docs.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | arch-code-review |
| description | Architecture-aware review against canonical structured YAML artifacts. Read-only workflow; no legacy prose docs. |
Goal: review diffs for correctness, drift, data consistency, side-effect boundaries, contract compatibility, and tests using YAML artifacts from the resolved structured docs root.
Legacy prose artifacts are deprecated. Do not create, update, or rely on docs/agent/*.md, scoped prose docs, or generated human-readable Markdown views. Use structured YAML for canonical artifacts. Root AGENTS.md remains a harness interoperability file and may be generated/updated only by workflows that explicitly say so.
Resolved structured docs root:
Treat docs/agent/api as a logical layout rooted at a resolved structured docs root, not a fixed repo path.
Resolution rules:
workspace_root with git rev-parse --show-toplevel 2>/dev/null or fallback to pwd.workspace_root before fingerprinting when possible (realpath, pwd -P, Path(...).resolve(), or equivalent).safe-start always creates and uses the initial repo-local root: <workspace_root>/docs/agent/api.<workspace_root>/docs/agent/api already exists.~/.pi/agent/workspaces/<workspace-fingerprint>/docs/agent/api.<workspace-fingerprint> exactly from canonical workspace_root: strip one leading slash/backslash, replace every slash, backslash, and colon with -, then wrap with --. This keeps the same workspace stable./data/data/com.termux/files/home/CodeProjects/pi-mono -> --data-data-com.termux-files-home-CodeProjects-pi-mono--.Logical structured layout under the resolved docs root:
repo/
scopes.yaml
repo-inventory.yaml
project-intent.yaml
architecture.yaml
data-flow.yaml
data-model.yaml
invariants.yaml
dependency-rules.yaml
design-issues.yaml
risk-register.yaml
change-guide.yaml
testing-strategy.yaml
validation-baseline.yaml
contracts.yaml
adr.yaml
agent-operating-guide.yaml
scopes/
by-path/<repo-relative-path>/...
by-domain/<slug>/...
Every structured artifact must conform to ../_shared/references/schemas/common.schema.json plus its artifact-specific schema. Do not inline, invent, or vary envelope fields.
Stable IDs required: scope:*, component:*, entity:*, invariant:*, risk:*, contract:*, flow:*, command:*, issue:*, adr:*, testplan:*.
Ownership rules:
scopes: scope routing, ownership, cross-scope discovery only.repo-inventory: file tree, commands index, entry points, external boundaries, configs.validation-baseline: command status, blockers, recommended validation order.project-intent: goals, users, journeys, non-goals, constraints, assumptions.architecture: components, architecture style, side-effect boundaries, high-level flow refs.data-flow: typed flow graph/steps, inputs, outputs, error states.data-model: entities, IDs, schemas, relationships, lifecycles, serialized formats.invariants: rules, forbidden states, enforcement locations, invariant-test refs.dependency-rules: layers, allowed/forbidden dependencies, violations, coupling hotspots.design-issues: structural drift, deferred decisions, ambiguity, ownership gaps.risk-register: failure modes, severity/confidence, affected refs, suggested tests/fixes.contracts: cross-scope APIs, schemas, events, generated clients, DB/file/deployment/env contracts.testing-strategy: test topology, coverage gaps, risk-to-test priorities.change-guide: workflow routing and checklists; references owner artifacts, duplicates no facts.adr: structured decision records with bounded prose fields.agent-operating-guide: structured source for agent operating rules. Root AGENTS.md may mirror this in compact harness-readable Markdown when produced by safe-start or codebase-recon Pass 6.Redundancy rule: define each fact in its owner artifact exactly once. Other artifacts reference IDs.
Prose rule: bounded prose allowed only in summary, notes, rationale, context, decision, recommended_action, and similar scalar fields.
Scope rule: if focus is path-like, read under <docs-root>/scopes/by-path/<focus>/; otherwise under <docs-root>/scopes/by-domain/<slug>/. Always resolve scope from <docs-root>/repo/scopes.yaml when present.
When a workflow creates, updates, migrates, or validates structured artifacts, read ../_shared/references/artifact-api.md first. Then read only the shared skill package schemas needed for the artifacts being written:
../_shared/references/schemas/common.schema.json../_shared/references/schemas/<artifact-file-base>.schema.jsonDo not read all schemas. Do not use templates. Schemas are runtime API contracts; project docs outside the shared runtime refs are maintainer aids unless the user asks about this package itself.
Use this protocol whenever creating or updating YAML artifacts.
<docs-root>/repo/scopes.yaml when present.risk:<slug>, entity:<slug>, component:<slug>, etc.For each discovered fact/object:
order field.status: stale or deprecated, add evidence/unknown explaining why, and link replacement ID when known.evidence_mode: planned and confidence low or medium.unknowns.status: current or confidence high without source or command evidence.Before writing final artifacts:
*_ref, *_refs, and depends_on ID points to a record in the same artifact set or is explicitly listed as external/unknown.scopes.yaml and contracts.yaml identify owner/consumer relationship.design-issues.yaml with kind: ownership_gap and reference it.Allowed transitions:
planned -> partial -> currentcurrent -> stale -> currentcurrent|stale|partial -> deprecatedRules:
current requires sufficient observed evidence for the represented scope.partial means useful but incomplete evidence.stale means contradicted by newer source evidence or missing source path.deprecated means superseded; include replacement_ref when known.id; keep ordered flow/checklist arrays by order.null, [], or {} consistently rather than omitting required envelope fields.Perform best-effort validation after writing:
AGENTS.md when explicitly produced for harness interoperability.Use this skill directly or use /review-arch as the prompt-template shortcut for architecture-aware diff review.
repo/scopes.yaml first if present; match changed paths by longest prefix; then read relevant owner YAML artifacts.architecture.yaml components/boundaries.dependency-rules.yaml.data-model.yaml and contracts.yaml as owner artifacts.data-flow.yaml.invariants.yaml remain enforced/tested.risk-register.yaml are not worsened.design-issues.yaml is addressed or not worsened.testing-strategy.yaml and validation-baseline.yaml commands.scopes.yaml and contracts.yaml.Structured safe-change workflow for documented codebases. Reads and writes only canonical YAML artifacts under a resolved structured docs root.
Structured reconstruction workflow for unfamiliar or undocumented codebases. Produces agent-first YAML artifacts only under a resolved structured docs root, with no prose Markdown fallback.
Structured greenfield project workflow. Creates agent-first YAML project truth under a resolved structured docs root plus root AGENTS.md for harness interoperability.
Validate canonical structured YAML artifacts for schema shape, reference integrity, evidence quality, coverage, and granularity. Read-only by default; no legacy prose docs.
Migration workflow from deprecated prose-style docs/agent Markdown artifacts to canonical structured YAML artifacts under a resolved structured docs root. No fallback or Markdown generation.