super-opencode 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/agents/architect.md +84 -84
- package/.opencode/agents/backend.md +124 -124
- package/.opencode/agents/frontend.md +137 -137
- package/.opencode/agents/optimizer.md +51 -51
- package/.opencode/agents/pm-agent.md +105 -105
- package/.opencode/agents/quality.md +107 -107
- package/.opencode/agents/researcher.md +105 -105
- package/.opencode/agents/reviewer.md +80 -80
- package/.opencode/agents/security.md +107 -107
- package/.opencode/agents/writer.md +136 -136
- package/.opencode/commands/soc-analyze.md +136 -137
- package/.opencode/commands/soc-brainstorm.md +109 -110
- package/.opencode/commands/soc-cleanup.md +107 -107
- package/.opencode/commands/soc-design.md +0 -1
- package/.opencode/commands/soc-explain.md +113 -113
- package/.opencode/commands/soc-git.md +104 -104
- package/.opencode/commands/soc-help.md +94 -94
- package/.opencode/commands/soc-implement.md +112 -112
- package/.opencode/commands/soc-improve.md +105 -105
- package/.opencode/commands/soc-pm.md +99 -99
- package/.opencode/commands/soc-research.md +105 -105
- package/.opencode/commands/soc-review.md +102 -102
- package/.opencode/commands/soc-test.md +109 -109
- package/.opencode/commands/soc-workflow.md +97 -97
- package/.opencode/settings.json +3 -3
- package/.opencode/skills/confidence-check/SKILL.md +97 -97
- package/.opencode/skills/debug-protocol/SKILL.md +83 -83
- package/.opencode/skills/reflexion/SKILL.md +108 -108
- package/.opencode/skills/security-audit/SKILL.md +90 -90
- package/.opencode/skills/self-check/SKILL.md +95 -95
- package/.opencode/skills/simplification/SKILL.md +92 -92
- package/AGENTS.md +175 -175
- package/LICENSE +21 -21
- package/dist/cli.js +8 -5
- package/package.json +45 -45
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Project management and orchestration
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /soc-pm
|
|
6
|
-
|
|
7
|
-
## 1. Command Overview
|
|
8
|
-
The `/soc-pm` command is the "Orchestrator." It manages the high-level state of the project. It uses the PDCA (Plan-Do-Check-Act) cycle to break down complex goals into `tasks`, track progress, and unblock other agents. It is the owner of `task.md`.
|
|
9
|
-
|
|
10
|
-
## 2. Triggers & Routing
|
|
11
|
-
The command is the primary interface for the `pm-agent`.
|
|
12
|
-
|
|
13
|
-
| Trigger Scenario | Flag | Target Agent | Action |
|
|
14
|
-
| :--- | :--- | :--- | :--- |
|
|
15
|
-
| **New Project** | `plan` | `[pm-agent]` | Create `task.md` |
|
|
16
|
-
| **Progress Check** | `status` | `[pm-agent]` | Read/Update `task.md` |
|
|
17
|
-
| **Verify Work** | `review` | `[pm-agent]` | Check deliverables |
|
|
18
|
-
|
|
19
|
-
## 3. Usage & Arguments
|
|
20
|
-
```bash
|
|
21
|
-
/soc-pm [action] [target] [flags]
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Arguments
|
|
25
|
-
- **`[action]`**: `plan`, `status`, `review`, `checkpoint`.
|
|
26
|
-
- **`[target]`**: (Optional) Specific feature or milestone.
|
|
27
|
-
|
|
28
|
-
### Flags
|
|
29
|
-
- **`--detail`**: Show full task history.
|
|
30
|
-
|
|
31
|
-
## 4. Behavioral Flow (Orchestration)
|
|
32
|
-
|
|
33
|
-
### Phase 1: Plan (The Roadmap)
|
|
34
|
-
1. **Analyze**: Read User Request -> Break into Epics/Stories.
|
|
35
|
-
2. **Document**: updates `task.md` with checkboxes `[ ]`.
|
|
36
|
-
|
|
37
|
-
### Phase 2: Do (Tracking)
|
|
38
|
-
- Monitors tool usage.
|
|
39
|
-
- Updates task status to `[/]` (In Progress) or `[x]` (Done).
|
|
40
|
-
|
|
41
|
-
### Phase 3: Check (The Audit)
|
|
42
|
-
- **Review**: Did we meet the acceptance criteria?
|
|
43
|
-
- **Reflect**: Use `reflexion` skill if blocked.
|
|
44
|
-
|
|
45
|
-
## 5. Output Guidelines (The Contract)
|
|
46
|
-
|
|
47
|
-
### Project Status Report
|
|
48
|
-
```markdown
|
|
49
|
-
## Project Status: [Phase]
|
|
50
|
-
|
|
51
|
-
### Progress
|
|
52
|
-
- **Completed**: 3/5 Tasks (60%)
|
|
53
|
-
- **Current Focus**: Implementing API Auth
|
|
54
|
-
|
|
55
|
-
### Task List
|
|
56
|
-
- [x] Setup DB Schema
|
|
57
|
-
- [/] **Implement Login Route** (Active)
|
|
58
|
-
- [ ] Write Tests
|
|
59
|
-
|
|
60
|
-
### Blockers
|
|
61
|
-
- Waiting for API Key from user.
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 6. Examples
|
|
65
|
-
|
|
66
|
-
### A. Initial Planning
|
|
67
|
-
```bash
|
|
68
|
-
/soc-pm plan "Build User Dashboard"
|
|
69
|
-
```
|
|
70
|
-
*Effect:* Creates `task.md` with breakdown: "Design UI", "Setup API", "Integrate Frontend".
|
|
71
|
-
|
|
72
|
-
### B. Status Update
|
|
73
|
-
```bash
|
|
74
|
-
/soc-pm status
|
|
75
|
-
```
|
|
76
|
-
*Effect:* Reads current state and summarizes what has been done vs what is left.
|
|
77
|
-
|
|
78
|
-
## 7. Dependencies & Capabilities
|
|
79
|
-
|
|
80
|
-
### Agents
|
|
81
|
-
- **PM Agent**: `@[.opencode/agents/pm-agent.md]` - Self-referential.
|
|
82
|
-
- **All Agents**: Delegates work to them.
|
|
83
|
-
|
|
84
|
-
### Skills
|
|
85
|
-
- **Reflexion**: `@[.opencode/skills/reflexion/SKILL.md]` - For unblocking the team.
|
|
86
|
-
|
|
87
|
-
### MCP Integration
|
|
88
|
-
- **`filesystem`**: Managing `task.md` and `implementation_plan.md`.
|
|
89
|
-
|
|
90
|
-
## 8. Boundaries
|
|
91
|
-
|
|
92
|
-
**Will:**
|
|
93
|
-
- Manage `task.md`.
|
|
94
|
-
- Delegate tasks to other agents.
|
|
95
|
-
- Track overall progress.
|
|
96
|
-
|
|
97
|
-
**Will Not:**
|
|
98
|
-
- **Write Code**: It manages those who write code.
|
|
99
|
-
- **Solve Technical Bugs**: It assigns `[backend]` or `[quality]` to solve them.
|
|
1
|
+
---
|
|
2
|
+
description: Project management and orchestration
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /soc-pm
|
|
6
|
+
|
|
7
|
+
## 1. Command Overview
|
|
8
|
+
The `/soc-pm` command is the "Orchestrator." It manages the high-level state of the project. It uses the PDCA (Plan-Do-Check-Act) cycle to break down complex goals into `tasks`, track progress, and unblock other agents. It is the owner of `task.md`.
|
|
9
|
+
|
|
10
|
+
## 2. Triggers & Routing
|
|
11
|
+
The command is the primary interface for the `pm-agent`.
|
|
12
|
+
|
|
13
|
+
| Trigger Scenario | Flag | Target Agent | Action |
|
|
14
|
+
| :--- | :--- | :--- | :--- |
|
|
15
|
+
| **New Project** | `plan` | `[pm-agent]` | Create `task.md` |
|
|
16
|
+
| **Progress Check** | `status` | `[pm-agent]` | Read/Update `task.md` |
|
|
17
|
+
| **Verify Work** | `review` | `[pm-agent]` | Check deliverables |
|
|
18
|
+
|
|
19
|
+
## 3. Usage & Arguments
|
|
20
|
+
```bash
|
|
21
|
+
/soc-pm [action] [target] [flags]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Arguments
|
|
25
|
+
- **`[action]`**: `plan`, `status`, `review`, `checkpoint`.
|
|
26
|
+
- **`[target]`**: (Optional) Specific feature or milestone.
|
|
27
|
+
|
|
28
|
+
### Flags
|
|
29
|
+
- **`--detail`**: Show full task history.
|
|
30
|
+
|
|
31
|
+
## 4. Behavioral Flow (Orchestration)
|
|
32
|
+
|
|
33
|
+
### Phase 1: Plan (The Roadmap)
|
|
34
|
+
1. **Analyze**: Read User Request -> Break into Epics/Stories.
|
|
35
|
+
2. **Document**: updates `task.md` with checkboxes `[ ]`.
|
|
36
|
+
|
|
37
|
+
### Phase 2: Do (Tracking)
|
|
38
|
+
- Monitors tool usage.
|
|
39
|
+
- Updates task status to `[/]` (In Progress) or `[x]` (Done).
|
|
40
|
+
|
|
41
|
+
### Phase 3: Check (The Audit)
|
|
42
|
+
- **Review**: Did we meet the acceptance criteria?
|
|
43
|
+
- **Reflect**: Use `reflexion` skill if blocked.
|
|
44
|
+
|
|
45
|
+
## 5. Output Guidelines (The Contract)
|
|
46
|
+
|
|
47
|
+
### Project Status Report
|
|
48
|
+
```markdown
|
|
49
|
+
## Project Status: [Phase]
|
|
50
|
+
|
|
51
|
+
### Progress
|
|
52
|
+
- **Completed**: 3/5 Tasks (60%)
|
|
53
|
+
- **Current Focus**: Implementing API Auth
|
|
54
|
+
|
|
55
|
+
### Task List
|
|
56
|
+
- [x] Setup DB Schema
|
|
57
|
+
- [/] **Implement Login Route** (Active)
|
|
58
|
+
- [ ] Write Tests
|
|
59
|
+
|
|
60
|
+
### Blockers
|
|
61
|
+
- Waiting for API Key from user.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 6. Examples
|
|
65
|
+
|
|
66
|
+
### A. Initial Planning
|
|
67
|
+
```bash
|
|
68
|
+
/soc-pm plan "Build User Dashboard"
|
|
69
|
+
```
|
|
70
|
+
*Effect:* Creates `task.md` with breakdown: "Design UI", "Setup API", "Integrate Frontend".
|
|
71
|
+
|
|
72
|
+
### B. Status Update
|
|
73
|
+
```bash
|
|
74
|
+
/soc-pm status
|
|
75
|
+
```
|
|
76
|
+
*Effect:* Reads current state and summarizes what has been done vs what is left.
|
|
77
|
+
|
|
78
|
+
## 7. Dependencies & Capabilities
|
|
79
|
+
|
|
80
|
+
### Agents
|
|
81
|
+
- **PM Agent**: `@[.opencode/agents/pm-agent.md]` - Self-referential.
|
|
82
|
+
- **All Agents**: Delegates work to them.
|
|
83
|
+
|
|
84
|
+
### Skills
|
|
85
|
+
- **Reflexion**: `@[.opencode/skills/reflexion/SKILL.md]` - For unblocking the team.
|
|
86
|
+
|
|
87
|
+
### MCP Integration
|
|
88
|
+
- **`filesystem`**: Managing `task.md` and `implementation_plan.md`.
|
|
89
|
+
|
|
90
|
+
## 8. Boundaries
|
|
91
|
+
|
|
92
|
+
**Will:**
|
|
93
|
+
- Manage `task.md`.
|
|
94
|
+
- Delegate tasks to other agents.
|
|
95
|
+
- Track overall progress.
|
|
96
|
+
|
|
97
|
+
**Will Not:**
|
|
98
|
+
- **Write Code**: It manages those who write code.
|
|
99
|
+
- **Solve Technical Bugs**: It assigns `[backend]` or `[quality]` to solve them.
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Deep web research and documentation lookup
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /soc-research
|
|
6
|
-
|
|
7
|
-
## 1. Command Overview
|
|
8
|
-
The `/soc-research` command is the "Archive." It scours the web and internal docs to find definitive truth. It operates on the "Cite or Die" principle: every claim must optionally be backed by a source. It does not hallucinate; it verifies.
|
|
9
|
-
|
|
10
|
-
## 2. Triggers & Routing
|
|
11
|
-
The command routes to the `researcher` agent.
|
|
12
|
-
|
|
13
|
-
| Trigger Scenario | Flag | Target Agent | Tool Used |
|
|
14
|
-
| :--- | :--- | :--- | :--- |
|
|
15
|
-
| **Quick Fact** | `--depth quick` | `[researcher]` | DuckDuckGo/Tavily |
|
|
16
|
-
| **Docs Lookup** | `[topic]` | `[researcher]` | `context7` |
|
|
17
|
-
| **Deep Dive** | `--depth deep` | `[researcher]` | Recursive Search |
|
|
18
|
-
|
|
19
|
-
## 3. Usage & Arguments
|
|
20
|
-
```bash
|
|
21
|
-
/soc-research [topic] [flags]
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Arguments
|
|
25
|
-
- **`[topic]`**: The question or technology to investigate.
|
|
26
|
-
|
|
27
|
-
### Flags
|
|
28
|
-
- **`--depth [quick|standard|deep]`**: (Default: `standard`).
|
|
29
|
-
- **`--domain [url]`**: Restrict search to specific site (e.g., `github.com`).
|
|
30
|
-
|
|
31
|
-
## 4. Behavioral Flow (Orchestration)
|
|
32
|
-
|
|
33
|
-
### Phase 1: Parsing
|
|
34
|
-
1. **Decompose**: Break query into keywords.
|
|
35
|
-
2. **Select**: Choose tool (`tavily` for web, `context7` for docs).
|
|
36
|
-
|
|
37
|
-
### Phase 2: Execution (The Hunt)
|
|
38
|
-
- **Broad Search**: Find candidate URLs.
|
|
39
|
-
- **Deep Read**: Scrape content.
|
|
40
|
-
- **Synthesize**: Cross-reference facts to find consensus.
|
|
41
|
-
|
|
42
|
-
### Phase 3: Reporting
|
|
43
|
-
- Construct "Review of Literature."
|
|
44
|
-
- Flag conflicting info ("Source A says X, Source B says Y").
|
|
45
|
-
|
|
46
|
-
## 5. Output Guidelines (The Contract)
|
|
47
|
-
|
|
48
|
-
### Research Report
|
|
49
|
-
```markdown
|
|
50
|
-
## Research: [Topic]
|
|
51
|
-
|
|
52
|
-
### Executive Summary
|
|
53
|
-
[Direct Answer]
|
|
54
|
-
|
|
55
|
-
### Key Findings
|
|
56
|
-
1. **[Fact 1]**: [Detail]
|
|
57
|
-
* *Source*: [Link]
|
|
58
|
-
2. **[Fact 2]**: [Detail]
|
|
59
|
-
|
|
60
|
-
### Code Patterns (if applicable)
|
|
61
|
-
```typescript
|
|
62
|
-
// Verified pattern from docs
|
|
63
|
-
const x = new Library();
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Conflicting Info
|
|
67
|
-
- StackOverflow suggests X, but Official Docs say Y (Deprecated).
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## 6. Examples
|
|
71
|
-
|
|
72
|
-
### A. Library Selection
|
|
73
|
-
```bash
|
|
74
|
-
/soc-research "Best React form library 2025" --depth deep
|
|
75
|
-
```
|
|
76
|
-
*Effect:* Compares React Hook Form vs TanStack Form based on bundle size and weekly downloads.
|
|
77
|
-
|
|
78
|
-
### B. Bug Hunting
|
|
79
|
-
```bash
|
|
80
|
-
/soc-research "Prisma error P2002" --domain github.com
|
|
81
|
-
```
|
|
82
|
-
*Effect:* Finds specific GitHub issues related to Unique Constraint violations.
|
|
83
|
-
|
|
84
|
-
## 7. Dependencies & Capabilities
|
|
85
|
-
|
|
86
|
-
### Agents
|
|
87
|
-
- **Researcher**: `@[.opencode/agents/researcher.md]` - Primary persona.
|
|
88
|
-
|
|
89
|
-
### Skills
|
|
90
|
-
- **Sequential Thinking**: `@[.opencode/skills/sequential-thinking/SKILL.md]` - For resolving conflicts.
|
|
91
|
-
|
|
92
|
-
### MCP Integration
|
|
93
|
-
- **`tavily`**: Real-time web search.
|
|
94
|
-
- **`context7`**: Documentation retrieval.
|
|
95
|
-
|
|
96
|
-
## 8. Boundaries
|
|
97
|
-
|
|
98
|
-
**Will:**
|
|
99
|
-
- Find official documentation.
|
|
100
|
-
- Summarize community consensus.
|
|
101
|
-
- Provide direct links.
|
|
102
|
-
|
|
103
|
-
**Will Not:**
|
|
104
|
-
- **Execute Info**: It finds the code, but does not run it.
|
|
105
|
-
- **Make Decisions**: It informs decisions, but `architect` decides.
|
|
1
|
+
---
|
|
2
|
+
description: Deep web research and documentation lookup
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /soc-research
|
|
6
|
+
|
|
7
|
+
## 1. Command Overview
|
|
8
|
+
The `/soc-research` command is the "Archive." It scours the web and internal docs to find definitive truth. It operates on the "Cite or Die" principle: every claim must optionally be backed by a source. It does not hallucinate; it verifies.
|
|
9
|
+
|
|
10
|
+
## 2. Triggers & Routing
|
|
11
|
+
The command routes to the `researcher` agent.
|
|
12
|
+
|
|
13
|
+
| Trigger Scenario | Flag | Target Agent | Tool Used |
|
|
14
|
+
| :--- | :--- | :--- | :--- |
|
|
15
|
+
| **Quick Fact** | `--depth quick` | `[researcher]` | DuckDuckGo/Tavily |
|
|
16
|
+
| **Docs Lookup** | `[topic]` | `[researcher]` | `context7` |
|
|
17
|
+
| **Deep Dive** | `--depth deep` | `[researcher]` | Recursive Search |
|
|
18
|
+
|
|
19
|
+
## 3. Usage & Arguments
|
|
20
|
+
```bash
|
|
21
|
+
/soc-research [topic] [flags]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Arguments
|
|
25
|
+
- **`[topic]`**: The question or technology to investigate.
|
|
26
|
+
|
|
27
|
+
### Flags
|
|
28
|
+
- **`--depth [quick|standard|deep]`**: (Default: `standard`).
|
|
29
|
+
- **`--domain [url]`**: Restrict search to specific site (e.g., `github.com`).
|
|
30
|
+
|
|
31
|
+
## 4. Behavioral Flow (Orchestration)
|
|
32
|
+
|
|
33
|
+
### Phase 1: Parsing
|
|
34
|
+
1. **Decompose**: Break query into keywords.
|
|
35
|
+
2. **Select**: Choose tool (`tavily` for web, `context7` for docs).
|
|
36
|
+
|
|
37
|
+
### Phase 2: Execution (The Hunt)
|
|
38
|
+
- **Broad Search**: Find candidate URLs.
|
|
39
|
+
- **Deep Read**: Scrape content.
|
|
40
|
+
- **Synthesize**: Cross-reference facts to find consensus.
|
|
41
|
+
|
|
42
|
+
### Phase 3: Reporting
|
|
43
|
+
- Construct "Review of Literature."
|
|
44
|
+
- Flag conflicting info ("Source A says X, Source B says Y").
|
|
45
|
+
|
|
46
|
+
## 5. Output Guidelines (The Contract)
|
|
47
|
+
|
|
48
|
+
### Research Report
|
|
49
|
+
```markdown
|
|
50
|
+
## Research: [Topic]
|
|
51
|
+
|
|
52
|
+
### Executive Summary
|
|
53
|
+
[Direct Answer]
|
|
54
|
+
|
|
55
|
+
### Key Findings
|
|
56
|
+
1. **[Fact 1]**: [Detail]
|
|
57
|
+
* *Source*: [Link]
|
|
58
|
+
2. **[Fact 2]**: [Detail]
|
|
59
|
+
|
|
60
|
+
### Code Patterns (if applicable)
|
|
61
|
+
```typescript
|
|
62
|
+
// Verified pattern from docs
|
|
63
|
+
const x = new Library();
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Conflicting Info
|
|
67
|
+
- StackOverflow suggests X, but Official Docs say Y (Deprecated).
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 6. Examples
|
|
71
|
+
|
|
72
|
+
### A. Library Selection
|
|
73
|
+
```bash
|
|
74
|
+
/soc-research "Best React form library 2025" --depth deep
|
|
75
|
+
```
|
|
76
|
+
*Effect:* Compares React Hook Form vs TanStack Form based on bundle size and weekly downloads.
|
|
77
|
+
|
|
78
|
+
### B. Bug Hunting
|
|
79
|
+
```bash
|
|
80
|
+
/soc-research "Prisma error P2002" --domain github.com
|
|
81
|
+
```
|
|
82
|
+
*Effect:* Finds specific GitHub issues related to Unique Constraint violations.
|
|
83
|
+
|
|
84
|
+
## 7. Dependencies & Capabilities
|
|
85
|
+
|
|
86
|
+
### Agents
|
|
87
|
+
- **Researcher**: `@[.opencode/agents/researcher.md]` - Primary persona.
|
|
88
|
+
|
|
89
|
+
### Skills
|
|
90
|
+
- **Sequential Thinking**: `@[.opencode/skills/sequential-thinking/SKILL.md]` - For resolving conflicts.
|
|
91
|
+
|
|
92
|
+
### MCP Integration
|
|
93
|
+
- **`tavily`**: Real-time web search.
|
|
94
|
+
- **`context7`**: Documentation retrieval.
|
|
95
|
+
|
|
96
|
+
## 8. Boundaries
|
|
97
|
+
|
|
98
|
+
**Will:**
|
|
99
|
+
- Find official documentation.
|
|
100
|
+
- Summarize community consensus.
|
|
101
|
+
- Provide direct links.
|
|
102
|
+
|
|
103
|
+
**Will Not:**
|
|
104
|
+
- **Execute Info**: It finds the code, but does not run it.
|
|
105
|
+
- **Make Decisions**: It informs decisions, but `architect` decides.
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Code review and quality assessment
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /soc-review
|
|
6
|
-
|
|
7
|
-
## 1. Command Overview
|
|
8
|
-
The `/soc-review` command is the "Critic." It acts as a second pair of eyes before code is merged. It checks for logic errors, security vulnerabilities (OWASP), and adherence to the "Intentional Minimalism" design philosophy.
|
|
9
|
-
|
|
10
|
-
## 2. Triggers & Routing
|
|
11
|
-
The command routes to specialized reviewers.
|
|
12
|
-
|
|
13
|
-
| Trigger Scenario | Flag | Target Agent | Focus |
|
|
14
|
-
| :--- | :--- | :--- | :--- |
|
|
15
|
-
| **Logic/Bugs** | `--scope full` | `[reviewer]` | Correctness |
|
|
16
|
-
| **Security** | `--security` | `[security]` | Injection, AuthZ |
|
|
17
|
-
| **Style/Lint** | `--quick` | `[reviewer]` | Formatting, Naming |
|
|
18
|
-
|
|
19
|
-
## 3. Usage & Arguments
|
|
20
|
-
```bash
|
|
21
|
-
/soc-review [target] [flags]
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Arguments
|
|
25
|
-
- **`[target]`**: File, directory, or Pull Request ID to review.
|
|
26
|
-
|
|
27
|
-
### Flags
|
|
28
|
-
- **`--scope [full|quick]`**: (Default: `full`).
|
|
29
|
-
- **`--security`**: Triggers explicit security scan protocol.
|
|
30
|
-
|
|
31
|
-
## 4. Behavioral Flow (Orchestration)
|
|
32
|
-
|
|
33
|
-
### Phase 1: Context Loading
|
|
34
|
-
1. **Read**: Load the target code.
|
|
35
|
-
2. **Context**: Load `implementation_plan.md` (to see what was intended).
|
|
36
|
-
|
|
37
|
-
### Phase 2: Analysis (The Audit)
|
|
38
|
-
- **Static Analysis**: Grep for "smells" (`any`, `eval`, `console.log`).
|
|
39
|
-
- **Logic Check**: Trace variable data flow.
|
|
40
|
-
- **Design Check**: Does it match the Project Persona (Minimalism)?
|
|
41
|
-
|
|
42
|
-
### Phase 3: Reporting
|
|
43
|
-
- Categorize findings by Severity (Critical, Warning, Info).
|
|
44
|
-
- Reject if Critical issues exist.
|
|
45
|
-
|
|
46
|
-
## 5. Output Guidelines (The Contract)
|
|
47
|
-
|
|
48
|
-
### Code Review
|
|
49
|
-
```markdown
|
|
50
|
-
## Review: [Target]
|
|
51
|
-
|
|
52
|
-
### Verdict
|
|
53
|
-
❌ **Changes Requested** (1 Critical Issue)
|
|
54
|
-
|
|
55
|
-
### Findings
|
|
56
|
-
|
|
57
|
-
#### 🔴 Critical: SQL Injection
|
|
58
|
-
- **File**: `src/api/search.ts:15`
|
|
59
|
-
- **Code**: `db.query("SELECT * FROM users WHERE name = " + req.query.name)`
|
|
60
|
-
- **Fix**: Use parameterized query `$1`.
|
|
61
|
-
|
|
62
|
-
#### 🟡 Warning: Performance
|
|
63
|
-
- **File**: `src/utils.ts:40`
|
|
64
|
-
- **Issue**: `README.md` parsing is synchronous. Use `fs.promises`.
|
|
65
|
-
|
|
66
|
-
### Summary
|
|
67
|
-
Solid logic, but the SQL injection must be fixed before merge.
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## 6. Examples
|
|
71
|
-
|
|
72
|
-
### A. Pre-Merge Review
|
|
73
|
-
```bash
|
|
74
|
-
/soc-review src/features/payments --security
|
|
75
|
-
```
|
|
76
|
-
*Effect:* Triggers `security` agent to specifically look for PCI compliance issues and raw secrets.
|
|
77
|
-
|
|
78
|
-
### B. Quick Sanity Check
|
|
79
|
-
```bash
|
|
80
|
-
/soc-review --quick
|
|
81
|
-
```
|
|
82
|
-
*Effect:* Scans changed files for obvious errors (lint, types) before commit.
|
|
83
|
-
|
|
84
|
-
## 7. Dependencies & Capabilities
|
|
85
|
-
|
|
86
|
-
### Agents
|
|
87
|
-
- **Reviewer**: `@[.opencode/agents/reviewer.md]` - General code quality.
|
|
88
|
-
- **Security**: `@[.opencode/agents/security.md]` - Vulnerability scanning.
|
|
89
|
-
|
|
90
|
-
### Skills
|
|
91
|
-
- **Security Audit**: `@[.opencode/skills/security-audit/SKILL.md]` - Automated checking.
|
|
92
|
-
|
|
93
|
-
## 8. Boundaries
|
|
94
|
-
|
|
95
|
-
**Will:**
|
|
96
|
-
- Point out specific lines of code.
|
|
97
|
-
- Suggest concrete fixes.
|
|
98
|
-
- Block "unsafe" code.
|
|
99
|
-
|
|
100
|
-
**Will Not:**
|
|
101
|
-
- **Fix the code**: It only comments. Use `/soc-improve` to fix.
|
|
102
|
-
- **Judge Aesthetics**: Unless it violates "Intentional Minimalism."
|
|
1
|
+
---
|
|
2
|
+
description: Code review and quality assessment
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /soc-review
|
|
6
|
+
|
|
7
|
+
## 1. Command Overview
|
|
8
|
+
The `/soc-review` command is the "Critic." It acts as a second pair of eyes before code is merged. It checks for logic errors, security vulnerabilities (OWASP), and adherence to the "Intentional Minimalism" design philosophy.
|
|
9
|
+
|
|
10
|
+
## 2. Triggers & Routing
|
|
11
|
+
The command routes to specialized reviewers.
|
|
12
|
+
|
|
13
|
+
| Trigger Scenario | Flag | Target Agent | Focus |
|
|
14
|
+
| :--- | :--- | :--- | :--- |
|
|
15
|
+
| **Logic/Bugs** | `--scope full` | `[reviewer]` | Correctness |
|
|
16
|
+
| **Security** | `--security` | `[security]` | Injection, AuthZ |
|
|
17
|
+
| **Style/Lint** | `--quick` | `[reviewer]` | Formatting, Naming |
|
|
18
|
+
|
|
19
|
+
## 3. Usage & Arguments
|
|
20
|
+
```bash
|
|
21
|
+
/soc-review [target] [flags]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Arguments
|
|
25
|
+
- **`[target]`**: File, directory, or Pull Request ID to review.
|
|
26
|
+
|
|
27
|
+
### Flags
|
|
28
|
+
- **`--scope [full|quick]`**: (Default: `full`).
|
|
29
|
+
- **`--security`**: Triggers explicit security scan protocol.
|
|
30
|
+
|
|
31
|
+
## 4. Behavioral Flow (Orchestration)
|
|
32
|
+
|
|
33
|
+
### Phase 1: Context Loading
|
|
34
|
+
1. **Read**: Load the target code.
|
|
35
|
+
2. **Context**: Load `implementation_plan.md` (to see what was intended).
|
|
36
|
+
|
|
37
|
+
### Phase 2: Analysis (The Audit)
|
|
38
|
+
- **Static Analysis**: Grep for "smells" (`any`, `eval`, `console.log`).
|
|
39
|
+
- **Logic Check**: Trace variable data flow.
|
|
40
|
+
- **Design Check**: Does it match the Project Persona (Minimalism)?
|
|
41
|
+
|
|
42
|
+
### Phase 3: Reporting
|
|
43
|
+
- Categorize findings by Severity (Critical, Warning, Info).
|
|
44
|
+
- Reject if Critical issues exist.
|
|
45
|
+
|
|
46
|
+
## 5. Output Guidelines (The Contract)
|
|
47
|
+
|
|
48
|
+
### Code Review
|
|
49
|
+
```markdown
|
|
50
|
+
## Review: [Target]
|
|
51
|
+
|
|
52
|
+
### Verdict
|
|
53
|
+
❌ **Changes Requested** (1 Critical Issue)
|
|
54
|
+
|
|
55
|
+
### Findings
|
|
56
|
+
|
|
57
|
+
#### 🔴 Critical: SQL Injection
|
|
58
|
+
- **File**: `src/api/search.ts:15`
|
|
59
|
+
- **Code**: `db.query("SELECT * FROM users WHERE name = " + req.query.name)`
|
|
60
|
+
- **Fix**: Use parameterized query `$1`.
|
|
61
|
+
|
|
62
|
+
#### 🟡 Warning: Performance
|
|
63
|
+
- **File**: `src/utils.ts:40`
|
|
64
|
+
- **Issue**: `README.md` parsing is synchronous. Use `fs.promises`.
|
|
65
|
+
|
|
66
|
+
### Summary
|
|
67
|
+
Solid logic, but the SQL injection must be fixed before merge.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 6. Examples
|
|
71
|
+
|
|
72
|
+
### A. Pre-Merge Review
|
|
73
|
+
```bash
|
|
74
|
+
/soc-review src/features/payments --security
|
|
75
|
+
```
|
|
76
|
+
*Effect:* Triggers `security` agent to specifically look for PCI compliance issues and raw secrets.
|
|
77
|
+
|
|
78
|
+
### B. Quick Sanity Check
|
|
79
|
+
```bash
|
|
80
|
+
/soc-review --quick
|
|
81
|
+
```
|
|
82
|
+
*Effect:* Scans changed files for obvious errors (lint, types) before commit.
|
|
83
|
+
|
|
84
|
+
## 7. Dependencies & Capabilities
|
|
85
|
+
|
|
86
|
+
### Agents
|
|
87
|
+
- **Reviewer**: `@[.opencode/agents/reviewer.md]` - General code quality.
|
|
88
|
+
- **Security**: `@[.opencode/agents/security.md]` - Vulnerability scanning.
|
|
89
|
+
|
|
90
|
+
### Skills
|
|
91
|
+
- **Security Audit**: `@[.opencode/skills/security-audit/SKILL.md]` - Automated checking.
|
|
92
|
+
|
|
93
|
+
## 8. Boundaries
|
|
94
|
+
|
|
95
|
+
**Will:**
|
|
96
|
+
- Point out specific lines of code.
|
|
97
|
+
- Suggest concrete fixes.
|
|
98
|
+
- Block "unsafe" code.
|
|
99
|
+
|
|
100
|
+
**Will Not:**
|
|
101
|
+
- **Fix the code**: It only comments. Use `/soc-improve` to fix.
|
|
102
|
+
- **Judge Aesthetics**: Unless it violates "Intentional Minimalism."
|