This pull request introduces new and updated prompt and instruction documents for the experimental OPSX workflow system, providing detailed, step-by-step guidance for proposing, applying, archiving, and exploring changes using OpenSpec. The changes standardize workflow guardrails, clarify user interactions, and ensure consistent artifact handling across all major workflow operations. **OPSX Workflow Prompt Additions and Enhancements:** * **Propose Workflow** - Adds `.agents/prompts/opsx/propose.md` outlining how to propose a new change, including artifact creation order, dependency handling, and user input requirements. Emphasizes using schema-defined instructions and templates, and clarifies that context/rules are for internal guidance only. * **Apply Workflow** - Introduces `.agents/prompts/opsx/apply.md` detailing the process for implementing tasks from an OpenSpec change. Covers change selection, context reading, task loop execution, state handling, and output formatting. Includes guardrails for ambiguity, blockers, and minimal change scope. * **Archive Workflow** - Adds `.agents/prompts/opsx/archive.md` specifying the process for archiving completed changes, including artifact/task completion checks, delta spec sync assessment, user prompts for incomplete work, and summary output. Ensures robust handling of archive naming conflicts and user confirmations. * **Explore Mode** - Adds `.agents/prompts/opsx/explore.md` describing "explore mode" for non-implementation discovery, problem investigation, and requirements clarification. Outlines stance, behaviors, and guardrails for thinking and artifact capture without code changes. **Documentation Standardization:** * **Markdown Formatting Standards** - Adds `.agents/instructions/markdown-format.instructions.md` to standardize markdown document formatting, including heading levels, code block usage, list formatting, and language-specific punctuation rules for improved clarity and consistency.
6.0 KiB
name, description, compatibility
| name | description | compatibility |
|---|---|---|
| gf-review | Code and specification review for OpenSpec workflow. Triggers automatically after /opsx:apply task completion, after /gf-feedback task completion, and before /opsx:archive. Use when user requests code review, spec compliance check, or when explicitly invoked via /gf-review. | Requires OpenSpec CLI and GoFrame v2 skill. |
GF Review
Structured code and specification review for the OpenSpec development workflow.
Spec Source: CLAUDE.md is the single source of truth for all review criteria.
When This Skill Activates
Automatic triggers:
- After completing each task in
/opsx:apply - After completing each task in
/gf-feedback - Before executing
/opsx:archive
Manual trigger:
- User explicitly requests: "review this code", "check spec compliance", "/gf-review"
Review Workflow
1. Identify Scope
Determine what needs to be reviewed:
- After task completion — Review files modified/created by the completed task
- Before archive — Review all changes in the current OpenSpec change
- Manual invocation — Ask user to specify scope or use current change
Mandatory scope collection rules:
- Start with repository status, not
git diffalone:git status --short git ls-files --others --exclude-standard - Treat all tracked and untracked changes as review candidates, including:
- staged files
- unstaged files
- untracked files shown as
?? - untracked directories shown as
?? path/
- When
git status --shortreports an untracked directory, expand it to concrete files before review:find <path> -type f # Or prefer: rg --files <path> - If the task ran generators such as
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 ingit diff. git diffmay 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.
2. Load Specifications
Read CLAUDE.md to load all specifications. This is the single source of truth.
3. Backend Code Review
Trigger: Changes to files under apps/lina-core directory
- Invoke
goframe-v2skill for GoFrame framework conventions - Check against
CLAUDE.mdbackend code specifications
4. RESTful API Review
Trigger: Any API endpoint changes
Check against CLAUDE.md API design specifications.
5. Project Specification Review
Trigger: Any implementation changes
Check against CLAUDE.md architecture design specifications and code development specifications.
6. SQL Review
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:
- File naming, versioning, and single-iteration single-file rules
- Seed DML vs mock data separation
- Idempotent execution safety — SQL must be safe to run multiple times without duplicate-object errors or duplicate seed data; verify use of
IF [NOT] EXISTS,IF EXISTS,INSERT IGNORE, or equivalent safe re-entry patterns - Seed write style compliance — delivered SQL must reject
INSERT ... ON DUPLICATE KEY UPDATEand reject explicit writes toAUTO_INCREMENTidcolumns in seed/mock/install data - Whether schema/data changes still match the current change scope and deployment path
7. Unit Test Review
Trigger: New or modified Go implementation files, or new/modified Go unit test files matching *_test.go
Check at minimum:
- Behavior-changing Go code includes focused unit coverage in the same package, preferably by extending existing
*_z_unit*_test.goor*_test.go - Tests assert the changed logic directly instead of relying on broad workflow-level coverage when a package-level test is sufficient
- Verification uses targeted
go test ./path/to/pkg -run TestNameduring development and package-levelgo test ./path/to/pkgfor regression
8. Generate Review Report
## 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]
Issue Severity
| Level | Behavior |
|---|---|
| Critical | Block archive, must fix |
| Warning | Show but allow proceed |
Integration Points
| 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 |
Guardrails
- CLAUDE.md is the single source of truth — All spec references point to it
- Only check categories relevant to changed files
- Scope identification MUST include untracked files and expanded untracked directories; never rely on
git diffalone - Behavior-changing Go code without focused unit tests is a review finding unless the author documents why tests are not applicable
- Don't block on warnings — only critical issues block archive
- Include file paths and line numbers in issue reports
- Offer to fix issues automatically when straightforward