.agents/skills/gf-review/SKILL.md
Structured code and specification review for the OpenSpec development workflow.
Spec Source: CLAUDE.md is the single source of truth for all review criteria.
Automatic triggers:
/opsx:apply/gf-feedback/opsx:archiveManual trigger:
Determine what needs to be reviewed:
Mandatory scope collection rules:
git diff alone:
git status --short
git ls-files --others --exclude-standard
???? path/git status --short reports an untracked directory, expand it to concrete files before review:
find <path> -type f
# Or prefer:
rg --files <path>
make ctrl, make dao, codegen scripts, or produced new test files, explicitly include the generated untracked files in review scope even if they do not appear in git diff.git diff may be used only as a secondary narrowing aid after status collection. It is never sufficient by itself for review scope definition.Run openspec status --change "<name>" --json to understand the current change state.
Read CLAUDE.md to load all specifications. This is the single source of truth.
Trigger: Changes to files under apps/lina-core directory
goframe-v2 skill for GoFrame framework conventionsCLAUDE.md backend code specificationsTrigger: Any API endpoint changes
Check against CLAUDE.md API design specifications.
Trigger: Any implementation changes
Check against CLAUDE.md architecture design specifications and code development specifications.
Trigger: New or modified files under apps/lina-core/manifest/sql/、apps/lina-core/manifest/sql/mock-data/、apps/lina-plugins/**/manifest/sql/ or SQL snippets embedded in related delivery docs
Check against CLAUDE.md SQL file management specifications, at minimum covering:
IF [NOT] EXISTS, IF EXISTS, INSERT IGNORE, or equivalent safe re-entry patternsINSERT ... ON DUPLICATE KEY UPDATE and reject explicit writes to AUTO_INCREMENT id columns in seed/mock/install dataTrigger: New or modified Go implementation files, or new/modified Go unit test files matching *_test.go
Check at minimum:
*_z_unit*_test.go or *_test.gogo test ./path/to/pkg -run TestName during development and package-level go test ./path/to/pkg for regression## GF Review Report
**Change:** <change-name>
**Scope:** <task-specific / full change>
**Files Reviewed:** <count>
**Scope Source:** `git status --short` + `git ls-files --others --exclude-standard` + task/change context
### Backend Code Review
✓ All checks passed / ⚠ N issues found
### RESTful API Review
✓ All endpoints compliant / ⚠ N violations found
### Project Spec Review
✓ Compliant with CLAUDE.md / ⚠ N violations found
### SQL Review
✓ No SQL changes / ✓ SQL changes compliant / ⚠ N SQL issues found
### Unit Test Review
✓ Unit tests are focused and sufficient / ⚠ N issues found
### Summary
- **Critical:** N (must fix before archive)
- **Warnings:** N (recommended to fix)
### Recommended Actions
1. [Specific action with CLAUDE.md reference]
| Level | Behavior |
|---|---|
| Critical | Block archive, must fix |
| Warning | Show but allow proceed |
| Workflow Step | Behavior |
|---|---|
/opsx:apply task done | Review, offer to fix issues before next task |
/gf-feedback task done | Review, fix before marking complete |
/opsx:archive | Review all changes, block on critical issues |
git diff alone