framework/claude/skills/sdd-review-self/SKILL.md
Framework self-review for sync-sdd development repo. Runs automated code quality review using external engines (Codex CLI, Claude Code headless, Gemini CLI) or SubAgents against framework/ directory. Use this skill for self-review, framework review, review-self, quality check on framework files, code review of SDD framework, verify framework consistency, check framework compliance, audit framework changes, run self-review pipeline.
npx skillsauth add sync-dev-org/sync-sdd sdd-review-selfInstall 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.
Self-review pipeline for the sync-sdd framework development repository. Dispatches external engines or SubAgents to review framework/ for flow integrity, cross-file consistency, and platform compliance. Lead acts as supervisor — it does not read Inspector findings directly (context preservation) but reviews the Auditor's synthesized verdict, applying FP judgment and severity corrections that require session context (D121).
framework/ directory exists. If absent, report "This skill targets the sync-sdd framework repo only. framework/ not found." and stop.Parse $ARGUMENTS for per-stage overrides. Each stage (inspectors, auditor) accepts --{stage}-engine, --{stage}-model, --{stage}-effort. Also parse --timeout <seconds>. Unspecified stages use the level chain from engines.yaml. Note: Briefer is a fixed SubAgent (Step 4) and does not accept engine overrides.
Read .sdd/lib/prompts/dispatch/engine.md and follow Section 1 (Engine Resolution) with:
review-selfinspectors, auditorSCOPE_DIR = .sdd/project/reviews/self
ACTIVE = .sdd/project/reviews/self/active/
If active/ exists and contains files, remove all files in it (stale from interrupted run). Create active/ if it does not exist.
Determine B_SEQ: read {SCOPE_DIR}/verdicts.yaml. If it exists, next seq = max(seq values) + 1. Otherwise, seq = 1.
The Briefer is dispatched as a SubAgent (not an external engine). Lead does NOT read the Briefer prompt — the SubAgent reads it itself.
Dispatch via Agent tool with model: "sonnet" and run_in_background: true:
Read .sdd/lib/prompts/review-self/briefer.md and follow its instructions exactly. Write all output files to .sdd/project/reviews/self/active/.After Briefer completes, verify .sdd/project/reviews/self/active/briefer-status.md does not exist, or if it exists, does not contain NO_CHANGES. If it contains NO_CHANGES, report "No framework changes detected. Nothing to review." and stop.
Verify active/shared-prompt.md exists. Read active/dynamic-manifest.md to learn the count and names of dynamic Inspectors.
Dispatch all Inspectors in parallel: 3 fixed (flow, consistency, compliance) + N dynamic (from manifest).
Each Inspector receives its prompt via stdin pipe (all prompts are in active/ — Briefer writes fixed and dynamic Inspector prompts there):
cat .sdd/project/reviews/self/active/shared-prompt.md .sdd/project/reviews/self/active/inspector-{name}.mdcat .sdd/project/reviews/self/active/shared-prompt.md .sdd/project/reviews/self/active/inspector-dynamic-{N}-{slug}.mdFollow .sdd/lib/prompts/dispatch/engine.md Section 3 (Dispatch Modes) for the resolved inspector engine.
For tmux mode, use staggered parallel dispatch (0.5s intervals) + hold-and-release pattern:
sdd-{SID}-inspector-{name}-B{B_SEQ}sdd-{SID}-close-B{B_SEQ}cat {prompt_files} | {engine_cmd}; tmux wait-for -S {channel}; tmux wait-for {close_channel}Bash(run_in_background=true) calls with sleep stagger.For SubAgent mode: dispatch all via Agent tool with run_in_background: true. Each Inspector reads shared-prompt.md and its own inspector prompt file.
For background mode: dispatch all via Bash(run_in_background=true).
If any Inspector fails to produce its expected output file, read .sdd/lib/prompts/dispatch/escalation.md and follow its instructions to classify the failure, escalate, and re-dispatch.
After all Inspectors complete (or fail), verify findings files exist in active/:
findings-inspector-flow.yamlfindings-inspector-consistency.yamlfindings-inspector-compliance.yamlfindings-inspector-dynamic-{N}-{slug}.yaml (per manifest)For tmux mode: release all slots by sending the close channel signal (tmux wait-for -S {close_channel}), then update all slot statuses to idle in state.yaml.
Lead does NOT read the Auditor template. The Auditor prompt is fully static — all input paths (findings files, decisions.yaml) are hardcoded in auditor.md.
Dispatch the Auditor using the resolved engine for the auditor stage, following .sdd/lib/prompts/dispatch/engine.md Section 3:
Read .sdd/lib/prompts/review-self/auditor.md and follow its instructions.cat .sdd/lib/prompts/review-self/auditor.md | {engine_cmd}Verify active/verdict-auditor.yaml exists. If missing, read .sdd/lib/prompts/dispatch/escalation.md and follow its instructions.
Read active/verdict-auditor.yaml. Do NOT read individual Inspector findings files -- the Auditor has already synthesized them.
Read .sdd/lib/references/index.yaml. Check the Auditor's references_read list — verify the Auditor consulted appropriate references for its findings. For findings with a ref field, Lead may selectively read the cited reference to confirm the Auditor's reasoning. Lead's own session context (decisions, knowledge, prior reviews) takes precedence over Auditor's reference-based judgment when they conflict.
Cross-reference each Auditor finding against:
decisions.yaml: intentional decisions that explain the finding.verdicts.yaml tracked items: already known and tracked.ref citations: verify the reference actually supports the finding's severity and recommendation.For each finding, determine:
lead_overrides with action: "eliminate".lead_overrides with action: "reclassify". Lead may only downgrade severity.Review the Auditor's A/B classification for each confirmed finding:
Adjust classification if the Auditor miscategorized.
Write active/verdict.yaml following the schema in .sdd/settings/rules/agent/verdict-format.md Section 3. Include:
verdict: GO / CONDITIONAL / NO-GOcounts: severity counts (updated after Lead overrides)issues: confirmed findings with classification field (A or B)lead_overrides: all FP eliminations and reclassifications with rationaledisposition: see verdict-format.md Disposition CodesPresent the full verdict to the user with ALL fields expanded. Do not compress into summary tables.
For B items: include impact, options (if applicable), and recommendation for each.
User approves, rejects, or defers each item:
approved -> will be fixed by Lead in Step 8rejected -> move to fp_eliminated (user-confirmed FP)deferred -> add to tracked, record as issue (Read .sdd/lib/prompts/log/record.md, type=issue, issue type=ENHANCEMENT, status=deferred)Update verdict.yaml with user_decision for each item.
For A items: auto-approved (present for visibility, proceed to Lead Fix).
Collect all items with user_decision: approved (A + B approved). If none, skip to Step 9.
Lead directly applies fixes to the codebase:
resolution: fixed in verdict.yaml.git diff and report: Fixed {N}/{total} items. Files modified: {list}resolution: deferred in verdict.yaml and report reason.Append a new batch entry to .sdd/project/reviews/self/verdicts.yaml following verdict-format.md Section 4:
- seq: {B_SEQ}
type: "self"
scope: "framework"
date: "{ISO-8601 timestamp via date command}"
version: "{contents of .sdd/.version}"
engines:
briefer: "{actual model used}"
inspectors: "{actual model used}"
auditor: "{actual model used}"
builder: "lead"
agents:
fixed: 3
dynamic: {N from manifest}
total: {3 + N}
counts: {from verdict.yaml}
verdict: "{from verdict.yaml}"
disposition: "{from verdict.yaml}"
tracked: {from verdict.yaml, if any}
resolved: {from verdict.yaml, if any}
Rename active/ to B{B_SEQ}/:
mv .sdd/project/reviews/self/active .sdd/project/reviews/self/B{B_SEQ}
For any items with user_decision: deferred, record each as an issue if not already recorded in Step 7:
.sdd/lib/prompts/log/record.md and follow its instructionsRead .sdd/lib/prompts/log/flush.md and follow its instructions, then auto-draft handover.md:
**Mode**: auto-draftReport completion to user with summary: verdict, disposition, counts, batch number.
tools
--- name: sdd-steering description: Set up project-wide context (create, update, delete, custom) allowed-tools: Bash, Glob, Grep, Read, Write, Edit, Skill argument-hint: [-y] [custom] --- # SDD Steering (Unified) <instructions> ## Core Task Manage project steering documents. Lead handles directly (no SubAgent dispatch needed) since it requires user interaction. **Before any steering operation**, read `{{SDD_DIR}}/settings/rules/agent/steering-principles.md` and apply its principles (content
tools
--- name: sdd-status description: Check progress and analyze downstream impact allowed-tools: Read, Glob, Grep argument-hint: [feature-name] [--impact] --- # SDD Status (Unified) <instructions> ## Core Task Display comprehensive status for specifications and optionally analyze downstream impact of changes. Lead handles directly (read-only, no SubAgent needed). ## Step 1: Parse Arguments ``` $ARGUMENTS = "" → Overall roadmap + all specs progress $ARGUMENTS = "{feature}"
tools
Session start — invoke on "再開", "continue", "resume", or at every session start
content-media
Unified spec lifecycle (design, impl, review, roadmap management)