원클릭으로
code-review
// Review code written during a run, auto-fix no-brainer issues, and suggest improvements requiring confirmation. Invoked after tests pass.
// Review code written during a run, auto-fix no-brainer issues, and suggest improvements requiring confirmation. Invoked after tests pass.
Execute work items based on their assigned mode (autopilot, confirm, validate). Supports single-item and multi-item (batch/wide) runs.
Plan the scope of a run by discovering available work items and suggesting groupings. Invoked before run-execute.
Display current run status and progress. Shows work item, mode, duration, and files changed.
Display current FIRE project status and validate integrity of intents, work items, and runs.
Generate implementation walkthrough for human review after run completion. Documents decisions, changes, and verification steps.
Migrate existing FIRE project to latest version. Adds constitution.md, updates schema, and optionally detects monorepo modules.
| name | code-review |
| description | Review code written during a run, auto-fix no-brainer issues, and suggest improvements requiring confirmation. Invoked after tests pass. |
| version | 1.0.0 |
<degrees_of_freedom>
<input_context> The skill receives from run-execute:
files_created:
- path: src/auth/login.ts
purpose: Login endpoint handler
- path: src/auth/login.test.ts
purpose: Unit tests for login
files_modified:
- path: src/routes/index.ts
changes: Added login route
run_id: run-001
intent_id: user-auth
</input_context>
<references_index> </references_index>
Receive files_created and files_modified from parent workflow Load project standards: .specs-fire/standards/coding-standards.md .specs-fire/standards/testing-standards.md<action>Detect project tooling:</action>
<substep>Check for .eslintrc, eslint.config.js (JavaScript/TypeScript)</substep>
<substep>Check for .prettierrc (formatting)</substep>
<substep>Check for golangci.yml (Go)</substep>
<substep>Check for pyproject.toml, ruff.toml (Python)</substep>
<action>Read each file to be reviewed</action>
<output>Reviewing {file_count} files...</output>
Run: npm run lint --fix 2>&1 || npx eslint --fix {files}
Parse output for remaining issues
<check if="golangci config exists">
<action>Run: golangci-lint run --fix {files}</action>
<action>Parse output for remaining issues</action>
</check>
<check if="ruff/pyproject config exists">
<action>Run: ruff check --fix {files}</action>
<action>Parse output for remaining issues</action>
</check>
<check if="no linter configured">
<action>Use built-in review rules from references/review-categories.md</action>
</check>
For each file, check against review categories:
Code Quality — unused imports, console statements, formatting
Security — hardcoded secrets, injection vulnerabilities, missing validation
Architecture — code placement, coupling, error handling
Testing — coverage gaps, edge cases, brittle patterns
<action>Classify each finding using references/auto-fix-rules.md:</action>
<substep>AUTO-FIX: Mechanical, non-semantic, reversible, tests won't break</substep>
<substep>CONFIRM: Behavioral change, security implication, judgment required</substep>
<action>Group findings by category and severity</action>
Apply all AUTO-FIX changes
Track each change made (file, line, before, after)
<critical>Re-run tests to verify no breakage</critical>
<action>Run project test command</action>
<check if="tests fail after auto-fix">
<output>Auto-fix caused test failure. Reverting...</output>
<action>Revert all auto-fix changes</action>
<action>Move failed fixes to CONFIRM category</action>
</check>
<check if="tests pass">
<output>Auto-fixed {count} issues. Tests still passing.</output>
</check>
</check>
Create review report using template: templates/review-report.md.hbs
Write to: .specs-fire/runs/{run-id}/review-report.md
Include: auto-fixed issues, pending suggestions, skipped items
## Code Review Complete
Auto-fixed {auto_count} issues. No additional suggestions.
Review report: .specs-fire/runs/{run-id}/review-report.md
</output>
<return>success</return>
</check>
<check if="suggestions exist">
<template_output section="suggestions">
## Code Review Complete
**Auto-fixed ({auto_count} issues)**:
{for each auto_fixed}
- {description} ({file}:{line})
{/for}
**Suggestions requiring approval ({suggest_count} issues)**:
{for each suggestion with index}
{index}. **[{category}]** {title}
- File: {file}:{line}
- Suggestion: {description}
- Risk: {risk_level}
{/for}
---
Apply suggestions?
[a] Apply all suggestions
{for each suggestion with index}
[{index}] Apply #{index} only ({category})
{/for}
[s] Skip all suggestions
[r] Review each individually
</template_output>
<checkpoint>Wait for user response</checkpoint>
</check>
Apply all suggestions
Re-run tests
Update review-report.md with applied status
<check if="response == s">
<action>Skip all suggestions</action>
<action>Update review-report.md with skipped status</action>
</check>
<check if="response == r">
<iterate over="suggestions" as="suggestion">
<template_output section="individual_suggestion">
**[{suggestion.category}]** {suggestion.title}
File: {suggestion.file}:{suggestion.line}
Current code:
```
{suggestion.current_code}
```
Suggested change:
```
{suggestion.suggested_code}
```
Rationale: {suggestion.rationale}
Apply this change? [y/n]
</template_output>
<checkpoint>Wait for response</checkpoint>
<check if="response == y">
<action>Apply this suggestion</action>
</check>
</iterate>
<action>Re-run tests if any changes applied</action>
</check>
<check if="response is number">
<action>Apply only the numbered suggestion</action>
<action>Re-run tests</action>
<action>Update review-report.md</action>
</check>
Return summary to run-execute workflow:
{
"success": true,
"auto_fixed_count": {count},
"suggestions_applied": {count},
"suggestions_skipped": {count},
"tests_passing": true,
"report_path": ".specs-fire/runs/{run-id}/review-report.md"
}
<output_artifact>
Creates .specs-fire/runs/{run-id}/review-report.md with:
<success_criteria> All files created/modified in run reviewed Auto-fixes applied without breaking tests Suggestions presented for user approval review-report.md created in run folder Return status to parent workflow </success_criteria>