SDLC Review (Read-Only)
A read-only codebase review that produces consolidated findings and
recommendations without touching source code, creating commits, or making
any changes outside of docs/.tmp/.
Parse the user's arguments first:
- If a
scope argument is present (comma-separated paths), limit the review
to those components only. If omitted, treat the entire repo as in scope.
- If a
type argument is present, use it to select which audit agents to
spawn: security (security-audit agents only), code (code-review agents
only), or both (default, spawn both types).
Before starting
- Check whether
docs/.tmp is listed in .gitignore at the repo root.
Run grep -r 'docs/.tmp' .gitignore to verify. If it is missing, warn
the user and run echo 'docs/.tmp/' >> .gitignore to add it.
- Run
mkdir -p docs/.tmp to ensure the output directory exists.
- Read
.claude/settings.json. Verify that background agents will have
the permissions they need. Review agents (code-review, security-audit)
need at minimum: Read(*), Glob(*), Grep(*), Write(docs/.tmp/*).
If any required permissions are absent, warn the user before spawning
agents — background agents cannot prompt for permissions and will silently
fail without them.
Phase 1: Parallel Audit (read-only)
- Identify the components to audit. If
scope was provided, use those paths.
Otherwise, enumerate the top-level directories or logical components of the
repo.
- Create a team via TeamCreate. Use 3 reviewers unless the user specified a
different count. Name the team
sdlc-review.
- Announce to the user which model and approach each reviewer will use before
spawning them. Spawn agent types according to the
type argument:
security — spawn only security-audit agents, pinned to Opus.
code — spawn only code-review agents, pinned to Opus.
both (default) — spawn a mix of code-review and security-audit
agents, pinned to Opus.
- Create one TaskCreate entry per component per audit type (e.g., one task for
code-review of src/api/, one for security-audit of src/api/, etc.).
- Assign tasks to reviewers so each reviewer owns 2-3 components. Use
TaskUpdate to set the owner for each task.
- Each reviewer must:
a. Claim their first task (TaskUpdate status to
in_progress).
b. Read the component source thoroughly.
c. Write all findings to docs/.tmp/<agent-name>-<component>-<audit-type>.md.
Use the repo root as the base for this path.
d. Mark the task completed (TaskUpdate status to completed).
e. Call TaskList to find the next unclaimed task and repeat until none remain.
- Wait for all reviewers to report completion. Then send each reviewer a
shutdown_request via SendMessage and call TeamDelete once all have shut down.
Agent type matters for permissions. If .claude/settings.json does not allow
the tools those agent types require, they will stall silently. Verify before
spawning.
Phase 2: Consolidation & Triage
Spawn a single consolidation agent (Opus, general-purpose). Pass it the
following instructions:
- Read every file in
docs/.tmp/ from Phase 1.
- Produce exactly two output files in
docs/.tmp/:
consolidated-fix-list.md — findings recommended for fixing, grouped
by component. Label each entry as a recommendation, not a required
action item. Include severity (Critical / High / Medium / Low) and
enough context for a human to act on it manually.
consolidated-exceptions.md — findings recommended to skip or accept
as-is, each with a rationale.
- Apply the triage rules below to decide which output each finding goes into.
- Deduplicate cross-source findings: if the same issue appears in both a
code-review and a security-audit report, produce one entry in the output
and annotate it Source: both.
- Cross-reference overlapping file/function findings — note co-location
opportunities so a human or future
/sdlc-audit fix run can handle them
together.
- After writing the two final files, delete all intermediate per-agent report
files from
docs/.tmp/. Only consolidated-fix-list.md and
consolidated-exceptions.md should remain when done.
- Every finding from Phase 1 must appear in exactly one of the two output
files. Nothing may be silently dropped.
Triage rules
| Category |
Output |
| Real bugs (wrong IDs, silent failures, broken imports) |
FIX recommendation |
| DRY violations (duplicated logic across services) |
FIX recommendation |
| Dead code, dangling functions |
FIX recommendation |
| Security issues regardless of environment |
FIX recommendation |
| Large file decomposition |
FIX recommendation |
| Dev-only QoL (swagger exposure, localhost URLs, debug output) |
EXCEPTION |
| Test coverage gaps |
EXCEPTION (note for prioritization) |
| Prod-specific hardening handled by infra |
EXCEPTION |
| Intentional duplication (documented architectural reason) |
EXCEPTION (document why) |
Summary output
After consolidation completes, print a summary to the user:
- Total findings count across all components.
- Breakdown: N items recommended for fixing, M items excepted.
- Top 3 highest-severity findings (by severity level, then component name).
- Remind the user that all details are in
docs/.tmp/consolidated-fix-list.md
and docs/.tmp/consolidated-exceptions.md.
Collation protocol (all phases)
Follow these rules in every phase without exception:
- All output stays in
docs/.tmp/ — this directory is gitignored and
ephemeral. Never write findings to docs/, the repo root, or any tracked
location.
- Each agent writes to
docs/.tmp/<agent-name>-<output-type>.md. Use the
repo root as the base for all paths.
- The orchestrating skill (this file) concatenates within
docs/.tmp/ when
collation is needed.
- The consolidation agent deduplicates and normalizes, then deletes all
intermediate files — only the final deliverables remain.
- Never
cd into docs/.tmp/. Always use absolute paths or paths relative
to the repo root (e.g., docs/.tmp/foo.md).
- Never write, read, or delete any file outside
docs/.tmp/ except when
reading source code for analysis.
Explicit: no code changes
This skill is read-only. It does not modify source code, create commits, or
make any changes outside of docs/.tmp/. To act on the findings, run
/sdlc-audit fix or address them manually.
1---2name: sdlc-review3description: Read-only codebase review using parallel audit agents. Produces consolidated findings and exceptions in docs/.tmp/ without making any code changes.4---56# SDLC Review (Read-Only)78A read-only codebase review that produces consolidated findings and9recommendations without touching source code, creating commits, or making10any changes outside of `docs/.tmp/`.1112Parse the user's arguments first:13- If a `scope` argument is present (comma-separated paths), limit the review14 to those components only. If omitted, treat the entire repo as in scope.15- If a `type` argument is present, use it to select which audit agents to16 spawn: `security` (security-audit agents only), `code` (code-review agents17 only), or `both` (default, spawn both types).1819---2021## Before starting22231. Check whether `docs/.tmp` is listed in `.gitignore` at the repo root.24 Run `grep -r 'docs/.tmp' .gitignore` to verify. If it is missing, warn25 the user and run `echo 'docs/.tmp/' >> .gitignore` to add it.262. Run `mkdir -p docs/.tmp` to ensure the output directory exists.273. Read `.claude/settings.json`. Verify that background agents will have28 the permissions they need. Review agents (`code-review`, `security-audit`)29 need at minimum: `Read(*)`, `Glob(*)`, `Grep(*)`, `Write(docs/.tmp/*)`.30 If any required permissions are absent, warn the user before spawning31 agents — background agents cannot prompt for permissions and will silently32 fail without them.3334---3536## Phase 1: Parallel Audit (read-only)37381. Identify the components to audit. If `scope` was provided, use those paths.39 Otherwise, enumerate the top-level directories or logical components of the40 repo.412. Create a team via TeamCreate. Use 3 reviewers unless the user specified a42 different count. Name the team `sdlc-review`.433. Announce to the user which model and approach each reviewer will use before44 spawning them. Spawn agent types according to the `type` argument:45 - `security` — spawn only `security-audit` agents, pinned to Opus.46 - `code` — spawn only `code-review` agents, pinned to Opus.47 - `both` (default) — spawn a mix of `code-review` and `security-audit`48 agents, pinned to Opus.494. Create one TaskCreate entry per component per audit type (e.g., one task for50 `code-review` of `src/api/`, one for `security-audit` of `src/api/`, etc.).515. Assign tasks to reviewers so each reviewer owns 2-3 components. Use52 TaskUpdate to set the owner for each task.536. Each reviewer must:54 a. Claim their first task (TaskUpdate status to `in_progress`).55 b. Read the component source thoroughly.56 c. Write all findings to `docs/.tmp/<agent-name>-<component>-<audit-type>.md`.57 Use the repo root as the base for this path.58 d. Mark the task completed (TaskUpdate status to `completed`).59 e. Call TaskList to find the next unclaimed task and repeat until none remain.607. Wait for all reviewers to report completion. Then send each reviewer a61 shutdown_request via SendMessage and call TeamDelete once all have shut down.6263Agent type matters for permissions. If `.claude/settings.json` does not allow64the tools those agent types require, they will stall silently. Verify before65spawning.6667---6869## Phase 2: Consolidation & Triage7071Spawn a single consolidation agent (Opus, general-purpose). Pass it the72following instructions:73741. Read every file in `docs/.tmp/` from Phase 1.752. Produce exactly two output files in `docs/.tmp/`:76 - `consolidated-fix-list.md` — findings recommended for fixing, grouped77 by component. Label each entry as a **recommendation**, not a required78 action item. Include severity (Critical / High / Medium / Low) and79 enough context for a human to act on it manually.80 - `consolidated-exceptions.md` — findings recommended to skip or accept81 as-is, each with a rationale.823. Apply the triage rules below to decide which output each finding goes into.834. Deduplicate cross-source findings: if the same issue appears in both a84 `code-review` and a `security-audit` report, produce one entry in the output85 and annotate it `Source: both`.865. Cross-reference overlapping file/function findings — note co-location87 opportunities so a human or future `/sdlc-audit fix` run can handle them88 together.896. After writing the two final files, delete all intermediate per-agent report90 files from `docs/.tmp/`. Only `consolidated-fix-list.md` and91 `consolidated-exceptions.md` should remain when done.927. Every finding from Phase 1 must appear in exactly one of the two output93 files. Nothing may be silently dropped.9495### Triage rules9697| Category | Output |98|----------|--------|99| Real bugs (wrong IDs, silent failures, broken imports) | FIX recommendation |100| DRY violations (duplicated logic across services) | FIX recommendation |101| Dead code, dangling functions | FIX recommendation |102| Security issues regardless of environment | FIX recommendation |103| Large file decomposition | FIX recommendation |104| Dev-only QoL (swagger exposure, localhost URLs, debug output) | EXCEPTION |105| Test coverage gaps | EXCEPTION (note for prioritization) |106| Prod-specific hardening handled by infra | EXCEPTION |107| Intentional duplication (documented architectural reason) | EXCEPTION (document why) |108109---110111## Summary output112113After consolidation completes, print a summary to the user:1141151. Total findings count across all components.1162. Breakdown: N items recommended for fixing, M items excepted.1173. Top 3 highest-severity findings (by severity level, then component name).1184. Remind the user that all details are in `docs/.tmp/consolidated-fix-list.md`119 and `docs/.tmp/consolidated-exceptions.md`.120121---122123## Collation protocol (all phases)124125Follow these rules in every phase without exception:1261271. All output stays in `docs/.tmp/` — this directory is gitignored and128 ephemeral. Never write findings to `docs/`, the repo root, or any tracked129 location.1302. Each agent writes to `docs/.tmp/<agent-name>-<output-type>.md`. Use the131 repo root as the base for all paths.1323. The orchestrating skill (this file) concatenates within `docs/.tmp/` when133 collation is needed.1344. The consolidation agent deduplicates and normalizes, then deletes all135 intermediate files — only the final deliverables remain.1365. Never `cd` into `docs/.tmp/`. Always use absolute paths or paths relative137 to the repo root (e.g., `docs/.tmp/foo.md`).1386. Never write, read, or delete any file outside `docs/.tmp/` except when139 reading source code for analysis.140141---142143## Explicit: no code changes144145This skill is read-only. It does not modify source code, create commits, or146make any changes outside of `docs/.tmp/`. To act on the findings, run147`/sdlc-audit fix` or address them manually.