Sdd review

From CarlosCaPe/octorato · View interactive version

Sdd review is an AI agent skill from the GitHub repository CarlosCaPe/octorato. SDD step 5. Reviews the implemented feature code against language and framework best practices, checks for code duplication, security vulnerabilities, performance issues and test quality. Completion against feature.md is decided by /sdd-converge; the review reads that verdict and never re-grades the

How to use this skill

Skill file

SDD: Code Review

You are a principal engineer conducting a thorough code review.

Your review must be honest, specific, and actionable: not generic.

Every finding must reference the exact file and line range.

Inputs

| Input | Required | Description | Example |

|---------------|----------|---------------------------------------------------------------------------|-----------------------------------|

| review_path | Optional | File, package, or module path to review. Defaults to full git diff scope. | src/auth/ |

Steps

Step 0: Validate Inputs (ALWAYS DO THIS FIRST)

1. Run git diff main...HEAD --name-only to find files changed in this branch.

2. If not on a feature branch, ask the user to specify a path or confirm they want a full codebase review.

Proceed to Step 1 once scope is resolved.


Pre-conditions

Read the following before starting:

the converge subagent (recorded in the receipt ledger). Quote it in the

Summary; if it is GAPS or missing, say so first.

Scope

Review the path or file set resolved in Step 0. Focus on changed/added files; note but do not deeply review unrelated pre-existing code.


Review Dimensions

Work through each dimension below in order. For each finding, add one row to the appropriate severity table (see Output Format):

| [ ] | `path/to/File.java:line` | <category> | <one sentence: what is wrong and why it matters> | <one sentence: concrete fix> |

Severity levels:


Dimension 1: Language & Framework Best Practices

Review against the conventions and idiomatic patterns for the tech stack declared in docs/project.md.

Consult any linting rules, style guides, or formatter config present in the project.

Language
Framework
Data Access

Dimension 2: Security


Dimension 3: Code Duplication


Dimension 4: Design & Architecture

no data-access or infrastructure code in the domain layer for Hexagonal/Clean Architecture)


Dimension 5: Performance


Dimension 6: Test Quality


Dimension 7: Observability

(DEBUG for diagnostic detail, INFO for business events, WARN for recoverable issues, ERROR for failures)


Output Format

Write the review to review.md in the spec directory using this structure:

# Code Review: <Feature Name or Path>

## Summary
<2-3 sentence overall assessment. Be direct: is this ready to merge, needs minor fixes, or needs significant rework?>

## Findings

### 🔴 Critical

| Done | Location | Category | Problem | Suggestion |
|------|----------|----------|---------|------------|
| [ ] | `src/service/AuthService.java:42` | Null Safety | `user` may be null; NPE at runtime | Add null guard before line 42 |

### 🟠 Major

| Done | Location | Category | Problem | Suggestion |
|------|----------|----------|---------|------------|

### 🟡 Minor

| Done | Location | Category | Problem | Suggestion |
|------|----------|----------|---------|------------|

### 🔵 Info / Suggestions

| Done | Location | Category | Problem | Suggestion |
|------|----------|----------|---------|------------|

## Convergence
<CONVERGE-VERDICT quoted from the converge report, or "not run (not a LARGE task)">

## Verdict
- [ ] ✅ Ready to merge
- [ ] 🟡 Merge after minor fixes (no re-review needed)
- [ ] 🟠 Requires fixes and re-review
- [ ] 🔴 Do not merge: significant issues found

After writing the file, print a one-line confirmation: review.md written.

Then show the Summary and Verdict sections inline so the user gets immediate context without opening the file.


After the Review

Ask the user:

"Would you like me to fix any of these findings now? You can say 'fix all critical and major' or call out specific items."

If the user asks for fixes, address them and then re-run the relevant tests to confirm the fixes hold.

If all findings are resolved, prompt the user to run /sdd-archive if not already done.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.