super-opencode 1.1.2 → 1.2.0
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 +54 -31
- package/.opencode/agents/backend.md +61 -34
- package/.opencode/agents/data-agent.md +422 -0
- package/.opencode/agents/devops-agent.md +331 -0
- package/.opencode/agents/frontend.md +63 -36
- package/.opencode/agents/mobile-agent.md +636 -0
- package/.opencode/agents/optimizer.md +25 -18
- package/.opencode/agents/pm-agent.md +114 -50
- package/.opencode/agents/quality.md +36 -29
- package/.opencode/agents/researcher.md +30 -21
- package/.opencode/agents/reviewer.md +39 -32
- package/.opencode/agents/security.md +42 -34
- package/.opencode/agents/writer.md +42 -31
- package/.opencode/commands/soc-analyze.md +55 -31
- package/.opencode/commands/soc-brainstorm.md +48 -26
- package/.opencode/commands/soc-cleanup.md +47 -25
- package/.opencode/commands/soc-deploy.md +271 -0
- package/.opencode/commands/soc-design.md +51 -26
- package/.opencode/commands/soc-explain.md +46 -23
- package/.opencode/commands/soc-git.md +47 -25
- package/.opencode/commands/soc-help.md +35 -14
- package/.opencode/commands/soc-implement.md +59 -29
- package/.opencode/commands/soc-improve.md +42 -20
- package/.opencode/commands/soc-onboard.md +329 -0
- package/.opencode/commands/soc-plan.md +215 -0
- package/.opencode/commands/soc-pm.md +40 -18
- package/.opencode/commands/soc-research.md +43 -20
- package/.opencode/commands/soc-review.md +39 -18
- package/.opencode/commands/soc-test.md +43 -21
- package/.opencode/commands/soc-validate.md +221 -0
- package/.opencode/commands/soc-workflow.md +38 -17
- package/.opencode/skills/confidence-check/SKILL.md +26 -19
- package/.opencode/skills/debug-protocol/SKILL.md +27 -17
- package/.opencode/skills/decision-log/SKILL.md +236 -0
- package/.opencode/skills/doc-sync/SKILL.md +345 -0
- package/.opencode/skills/package-manager/SKILL.md +502 -0
- package/.opencode/skills/package-manager/scripts/README.md +106 -0
- package/.opencode/skills/package-manager/scripts/detect-package-manager.sh +796 -0
- package/.opencode/skills/reflexion/SKILL.md +18 -11
- package/.opencode/skills/security-audit/SKILL.md +19 -14
- package/.opencode/skills/self-check/SKILL.md +30 -14
- package/.opencode/skills/simplification/SKILL.md +19 -5
- package/.opencode/skills/tech-debt/SKILL.md +245 -0
- package/LICENSE +1 -1
- package/README.md +126 -9
- package/dist/cli.js +143 -41
- package/package.json +27 -12
- package/.opencode/settings.json +0 -3
|
@@ -5,9 +5,11 @@ description: Code explanation and understanding
|
|
|
5
5
|
# /soc-explain
|
|
6
6
|
|
|
7
7
|
## 1. Command Overview
|
|
8
|
+
|
|
8
9
|
The `/soc-explain` command is the "Tutor." It translates complex code, errors, or concepts into natural language. It adapts its depth to the user's needs, from simple analogies to expert technical deep-dives. It generates documentation that can be saved.
|
|
9
10
|
|
|
10
11
|
## 2. Triggers & Routing
|
|
12
|
+
|
|
11
13
|
The command uses the `writer` agent effectively to synthesize information.
|
|
12
14
|
|
|
13
15
|
| Trigger Scenario | Flag | Target Agent | Style |
|
|
@@ -17,36 +19,43 @@ The command uses the `writer` agent effectively to synthesize information.
|
|
|
17
19
|
| **Deep Dive** | `--depth expert` | `[architect]` | Memory, performance, edge cases |
|
|
18
20
|
|
|
19
21
|
## 3. Usage & Arguments
|
|
22
|
+
|
|
20
23
|
```bash
|
|
21
24
|
/soc-explain [target] [flags]
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
### Arguments
|
|
25
|
-
|
|
28
|
+
|
|
29
|
+
- **`[target]`**: Code snippet, file path, error message, or concept (e.g., "Dependency Injection").
|
|
26
30
|
|
|
27
31
|
### Flags
|
|
28
|
-
|
|
29
|
-
-
|
|
32
|
+
|
|
33
|
+
- **`--depth [simple|detailed|expert]`**: (Default: `detailed`).
|
|
34
|
+
- **`--context [file]`**: Add extra context for better explanation.
|
|
30
35
|
|
|
31
36
|
## 4. Behavioral Flow (Orchestration)
|
|
32
37
|
|
|
33
38
|
### Phase 1: Analysis
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
|
|
40
|
+
1. **Parse**: Is the target a file, a string, or a concept?
|
|
41
|
+
2. **Context**: If it's an error, where did it come from? If it's code, what language?
|
|
36
42
|
|
|
37
43
|
### Phase 2: Synthesis (The Lesson)
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
44
|
+
|
|
45
|
+
- **Analogy**: "Think of a Promise like a pizza buzzer..."
|
|
46
|
+
- **Technical**: "It wraps the value in a microtask queue..."
|
|
47
|
+
- **Example**: "Here is how you use it:"
|
|
41
48
|
|
|
42
49
|
### Phase 3: Formatting
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
50
|
+
|
|
51
|
+
- Structure with clear Headers.
|
|
52
|
+
- Use Code Blocks for syntax.
|
|
53
|
+
- Highlight "Key Takeaways."
|
|
46
54
|
|
|
47
55
|
## 5. Output Guidelines (The Contract)
|
|
48
56
|
|
|
49
57
|
### Explanation Document
|
|
58
|
+
|
|
50
59
|
```markdown
|
|
51
60
|
## Explanation: [Topic]
|
|
52
61
|
|
|
@@ -70,8 +79,10 @@ goodCode()
|
|
|
70
79
|
```
|
|
71
80
|
|
|
72
81
|
### Key Takeaways
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
|
|
83
|
+
1. [Point 1]
|
|
84
|
+
2. [Point 2]
|
|
85
|
+
|
|
75
86
|
```
|
|
76
87
|
|
|
77
88
|
## 6. Examples
|
|
@@ -80,34 +91,46 @@ goodCode()
|
|
|
80
91
|
```bash
|
|
81
92
|
/soc-explain "How Node Event Loop works" --depth expert
|
|
82
93
|
```
|
|
94
|
+
|
|
83
95
|
*Effect:* Explains Phases (Timers, Poll, Check), Microtasks vs Macrotasks, and `process.nextTick`.
|
|
84
96
|
|
|
85
97
|
### B. Error Parsing
|
|
98
|
+
|
|
86
99
|
```bash
|
|
87
100
|
/soc-explain "TypeError: Cannot read property 'map' of undefined"
|
|
88
101
|
```
|
|
102
|
+
|
|
89
103
|
*Effect:* Explains that the array is missing, helps identify the source variable, suggests Optional Chaining (`?.`).
|
|
90
104
|
|
|
91
105
|
## 7. Dependencies & Capabilities
|
|
92
106
|
|
|
93
107
|
### Agents
|
|
94
|
-
|
|
95
|
-
-
|
|
108
|
+
|
|
109
|
+
- **Writer**: `@[.opencode/agents/writer.md]` - Primary explainer.
|
|
110
|
+
- **Architect**: `@[.opencode/agents/architect.md]` - For system-level concepts.
|
|
96
111
|
|
|
97
112
|
### Skills
|
|
98
|
-
|
|
113
|
+
|
|
114
|
+
- **Simplification**: `@[.opencode/skills/simplification/SKILL.md]` - To de-jargonize complex topics.
|
|
99
115
|
|
|
100
116
|
### MCP Integration
|
|
101
|
-
|
|
102
|
-
-
|
|
117
|
+
|
|
118
|
+
- **`context7`**: Fetching official docs to cite sources.
|
|
119
|
+
- **`read_file`**: Reading the full content of the file being explained.
|
|
103
120
|
|
|
104
121
|
## 8. Boundaries
|
|
105
122
|
|
|
106
123
|
**Will:**
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
124
|
+
|
|
125
|
+
- Explain *why* code works.
|
|
126
|
+
- Suggest *best practices*.
|
|
127
|
+
- Debug *logic* errors via explanation.
|
|
110
128
|
|
|
111
129
|
**Will Not:**
|
|
112
|
-
|
|
113
|
-
-
|
|
130
|
+
|
|
131
|
+
- **Write the Fix**: It explains the fix; `/soc-implement` writes it.
|
|
132
|
+
- **Execute Code**: It analyzes static text.
|
|
133
|
+
|
|
134
|
+
## User Instruction
|
|
135
|
+
|
|
136
|
+
The user have executed the `/soc-explain` command by parsing the user's arguments provided in `<user-instruction>$ARGUMENTS</user-instruction>`, then analyze the specified target (code snippet, file path, error message, or concept) to determine its type and context, route to the appropriate agent based on depth level—writer agent for simple analogies and detailed explanations, or architect agent for expert-level system concepts—adapt the explanation style to match the requested depth (simple with analogies, detailed with code logic, or expert with performance and edge cases), incorporate additional context files if provided via `--context`, and generate a structured explanation document with summary, technical breakdown, code examples, and key takeaways.
|
|
@@ -5,9 +5,11 @@ description: "Git operations with intelligent commit messages and workflow optim
|
|
|
5
5
|
# /soc-git
|
|
6
6
|
|
|
7
7
|
## 1. Command Overview
|
|
8
|
+
|
|
8
9
|
The `/soc-git` command is the "Version Controller." It wraps standard git operations with intelligence. It can analyze diffs to generate Conventional Commit messages, check for accidental secrets before pushing, and manage branching strategies.
|
|
9
10
|
|
|
10
11
|
## 2. Triggers & Routing
|
|
12
|
+
|
|
11
13
|
The command routes to the `writer` agent for message generation and `security` for pre-push checks.
|
|
12
14
|
|
|
13
15
|
| Trigger Scenario | Flag | Target Agent | Action |
|
|
@@ -17,40 +19,47 @@ The command routes to the `writer` agent for message generation and `security` f
|
|
|
17
19
|
| **Branching** | `branch` | `[pm-agent]` | Enforce naming conventions |
|
|
18
20
|
|
|
19
21
|
## 3. Usage & Arguments
|
|
22
|
+
|
|
20
23
|
```bash
|
|
21
24
|
/soc-git [operation] [args] [flags]
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
### Arguments
|
|
25
|
-
|
|
28
|
+
|
|
29
|
+
- **`[operation]`**: `commit`, `push`, `pull`, `branch`, `status`, `diff`.
|
|
26
30
|
|
|
27
31
|
### Flags
|
|
28
|
-
|
|
29
|
-
-
|
|
32
|
+
|
|
33
|
+
- **`--smart`**: Auto-generate messages/descriptions.
|
|
34
|
+
- **`--force`**: Bypass safety checks (Use with caution).
|
|
30
35
|
|
|
31
36
|
## 4. Behavioral Flow (Orchestration)
|
|
32
37
|
|
|
33
38
|
### Phase 1: Context Analysis
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
|
|
40
|
+
1. **Status Check**: Run `git status`.
|
|
41
|
+
2. **Diff Analysis**: Run `git diff --staged`.
|
|
42
|
+
3. **Safety Check**: Scan pending changes for keys/env files.
|
|
37
43
|
|
|
38
44
|
### Phase 2: Operations
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
45
|
+
|
|
46
|
+
- **Commit**:
|
|
47
|
+
- If `--smart`: Feed diff to LLM -> Generate Conventional Commit.
|
|
48
|
+
- If standard: Execute `git commit -m`.
|
|
49
|
+
- **Push**:
|
|
50
|
+
- Check upstream. If missing, auto-set `-u origin`.
|
|
51
|
+
- **Branch**:
|
|
52
|
+
- Normalize name (e.g., `My Feature` -> `feat/my-feature`).
|
|
46
53
|
|
|
47
54
|
### Phase 3: Post-Op
|
|
48
|
-
|
|
49
|
-
-
|
|
55
|
+
|
|
56
|
+
- Confirm success.
|
|
57
|
+
- Show Next Step (e.g., "Ready to open PR").
|
|
50
58
|
|
|
51
59
|
## 5. Output Guidelines (The Contract)
|
|
52
60
|
|
|
53
61
|
### Git Operation Result
|
|
62
|
+
|
|
54
63
|
```markdown
|
|
55
64
|
## Git: [Operation]
|
|
56
65
|
|
|
@@ -68,37 +77,50 @@ The command routes to the `writer` agent for message generation and `security` f
|
|
|
68
77
|
## 6. Examples
|
|
69
78
|
|
|
70
79
|
### A. Smart Commit
|
|
80
|
+
|
|
71
81
|
```bash
|
|
72
82
|
/soc-git commit --smart
|
|
73
83
|
```
|
|
84
|
+
|
|
74
85
|
*Effect:* Analyzes staged files, detects added login logic, commits with: `feat(auth): implement user login flow`.
|
|
75
86
|
|
|
76
87
|
### B. Branch Creation
|
|
88
|
+
|
|
77
89
|
```bash
|
|
78
90
|
/soc-git branch "Update README"
|
|
79
91
|
```
|
|
92
|
+
|
|
80
93
|
*Effect:* Creates and checks out `docs/update-readme` (auto-categorized).
|
|
81
94
|
|
|
82
95
|
## 7. Dependencies & Capabilities
|
|
83
96
|
|
|
84
97
|
### Agents
|
|
85
|
-
|
|
86
|
-
-
|
|
98
|
+
|
|
99
|
+
- **Writer**: `@[.opencode/agents/writer.md]` - For commit messages.
|
|
100
|
+
- **Security**: `@[.opencode/agents/security.md]` - For pre-commit hooks.
|
|
87
101
|
|
|
88
102
|
### Skills
|
|
89
|
-
|
|
103
|
+
|
|
104
|
+
- **Security Audit**: `@[.opencode/skills/security-audit/SKILL.md]` - Scanning staged files.
|
|
90
105
|
|
|
91
106
|
### MCP Integration
|
|
92
|
-
|
|
93
|
-
-
|
|
107
|
+
|
|
108
|
+
- **`run_command`**: Executing actual git binaries.
|
|
109
|
+
- **`filesystem`**: Reading ignores and config.
|
|
94
110
|
|
|
95
111
|
## 8. Boundaries
|
|
96
112
|
|
|
97
113
|
**Will:**
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
114
|
+
|
|
115
|
+
- Execute git commands.
|
|
116
|
+
- Generate text for messages.
|
|
117
|
+
- Block commits with secrets (unless `--force`).
|
|
101
118
|
|
|
102
119
|
**Will Not:**
|
|
103
|
-
|
|
104
|
-
-
|
|
120
|
+
|
|
121
|
+
- **Solve Merge Conflicts**: It will report them, but user must resolve.
|
|
122
|
+
- **Rewrite History**: No `rebase` or `reset --hard` without explicit user confirmation.
|
|
123
|
+
|
|
124
|
+
## User Instruction
|
|
125
|
+
|
|
126
|
+
The user have executed the `/soc-git` command by parsing the user's arguments provided in `<user-instruction>$ARGUMENTS</user-instruction>`, then perform the specified git operation (commit, push, pull, branch, status, or diff) with the provided arguments, route to the appropriate agent for intelligent assistance—using the writer agent to generate conventional commit messages when `--smart` is specified, or the security agent to scan for secrets before push operations—analyze the current repository context through git status and diff analysis, apply safety checks to prevent accidental commits of secrets or sensitive files, normalize branch names to follow conventions when creating new branches, and provide clear operation results with next-step recommendations.
|
|
@@ -5,9 +5,11 @@ description: Help and command reference
|
|
|
5
5
|
# /soc-help
|
|
6
6
|
|
|
7
7
|
## 1. Command Overview
|
|
8
|
+
|
|
8
9
|
The `/soc-help` command is the "Librarian." It serves as the primary documentation interface for the agent system. It explains *how* to use the other commands, details what each agent does, and lists available skills. It uses the `researcher` agent to find answers within the system's own documentation.
|
|
9
10
|
|
|
10
11
|
## 2. Triggers & Routing
|
|
12
|
+
|
|
11
13
|
The command is self-contained but may use `researcher` for deep queries.
|
|
12
14
|
|
|
13
15
|
| Trigger Scenario | Flag | Target Agent | Action |
|
|
@@ -17,29 +19,35 @@ The command is self-contained but may use `researcher` for deep queries.
|
|
|
17
19
|
| **Workflow Guide** | `[topic]` | `[researcher]` | Summarize best practices |
|
|
18
20
|
|
|
19
21
|
## 3. Usage & Arguments
|
|
22
|
+
|
|
20
23
|
```bash
|
|
21
24
|
/soc-help [target] [flags]
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
### Arguments
|
|
25
|
-
|
|
28
|
+
|
|
29
|
+
- **`[target]`**: (Optional) Specific command (`implement`), agent (`backend`), or topic (`workflows`). Default: Shows index.
|
|
26
30
|
|
|
27
31
|
### Flags
|
|
28
|
-
|
|
32
|
+
|
|
33
|
+
- **`--verbose`**: Show detailed descriptions and hidden flags.
|
|
29
34
|
|
|
30
35
|
## 4. Behavioral Flow (Orchestration)
|
|
31
36
|
|
|
32
37
|
### Phase 1: Lookup
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
|
|
39
|
+
1. **Index**: Check if target is a known Command, Agent, or Skill.
|
|
40
|
+
2. **Search**: If unknown, grep `.opencode/` documentation for keywords.
|
|
35
41
|
|
|
36
42
|
### Phase 2: Formatting
|
|
37
|
-
|
|
38
|
-
-
|
|
43
|
+
|
|
44
|
+
- **Structure**: Group by Category (Workflow vs Skill).
|
|
45
|
+
- **Clarity**: Show "Quick Start" snippets.
|
|
39
46
|
|
|
40
47
|
## 5. Output Guidelines (The Contract)
|
|
41
48
|
|
|
42
49
|
### Help Document
|
|
50
|
+
|
|
43
51
|
```markdown
|
|
44
52
|
## Help: [Target]
|
|
45
53
|
|
|
@@ -60,35 +68,48 @@ The command is self-contained but may use `researcher` for deep queries.
|
|
|
60
68
|
## 6. Examples
|
|
61
69
|
|
|
62
70
|
### A. Command Help
|
|
71
|
+
|
|
63
72
|
```bash
|
|
64
73
|
/soc-help implement
|
|
65
74
|
```
|
|
75
|
+
|
|
66
76
|
*Effect:* Displays usage for `/soc-implement`, including flags like `--agent` and `--test`.
|
|
67
77
|
|
|
68
78
|
### B. Agent Role
|
|
79
|
+
|
|
69
80
|
```bash
|
|
70
81
|
/soc-help backend
|
|
71
82
|
```
|
|
83
|
+
|
|
72
84
|
*Effect:* Shows the `backend` agent's persona, including "Prime Directives" and "Restrictions."
|
|
73
85
|
|
|
74
86
|
## 7. Dependencies & Capabilities
|
|
75
87
|
|
|
76
88
|
### Agents
|
|
77
|
-
|
|
89
|
+
|
|
90
|
+
- **Researcher**: `@[.opencode/agents/researcher.md]` - For finding unstructured help.
|
|
78
91
|
|
|
79
92
|
### Skills
|
|
80
|
-
|
|
93
|
+
|
|
94
|
+
- **None**: This is a read-only command.
|
|
81
95
|
|
|
82
96
|
### MCP Integration
|
|
83
|
-
|
|
97
|
+
|
|
98
|
+
- **`filesystem`**: Reading documentation files.
|
|
84
99
|
|
|
85
100
|
## 8. Boundaries
|
|
86
101
|
|
|
87
102
|
**Will:**
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
103
|
+
|
|
104
|
+
- Explain system capabilities.
|
|
105
|
+
- List available tools.
|
|
106
|
+
- Provide syntax examples.
|
|
91
107
|
|
|
92
108
|
**Will Not:**
|
|
93
|
-
|
|
94
|
-
-
|
|
109
|
+
|
|
110
|
+
- **Execute Commands**: It only explains them.
|
|
111
|
+
- **Hallucinate Features**: Only lists what exists in `.opencode/`.
|
|
112
|
+
|
|
113
|
+
## User Instruction
|
|
114
|
+
|
|
115
|
+
The user have executed the `/soc-help` command by parsing the user's arguments provided in `<user-instruction>$ARGUMENTS</user-instruction>`, then look up the specified target (command, agent, skill, or topic) in the system documentation, search the `.opencode/` directory for relevant information if the target is unknown, and format a comprehensive help document showing the description, usage syntax, key features, and related commands for the requested item, providing quick start snippets and grouping information by category for clarity.
|
|
@@ -5,53 +5,65 @@ description: Code implementation with best practices
|
|
|
5
5
|
# /soc-implement
|
|
6
6
|
|
|
7
7
|
## 1. Command Overview
|
|
8
|
+
|
|
8
9
|
The `/soc-implement` command is the execution engine of the agent system. It transforms approved designs and specifications into production-ready code. It enforces strict quality control, testing (TDD), and "self-correction" loops via the `reflexion` skill. It does not plan; it executes.
|
|
9
10
|
|
|
10
11
|
## 2. Triggers & Routing
|
|
12
|
+
|
|
11
13
|
The command routes to specialized sub-agents based on the `--agent` flag or file context.
|
|
12
14
|
|
|
13
15
|
| Trigger Scenario | Flag | Target Agent | Context Injected |
|
|
14
16
|
| :--- | :--- | :--- | :--- |
|
|
15
17
|
| **API/Database Logic** | `--agent backend` | `[backend]` | DB Schemas, Error Handling Middleware |
|
|
16
18
|
| **UI/Components** | `--agent frontend` | `[frontend]` | Design System, A11y Rules, Hooks |
|
|
19
|
+
| **Mobile Apps** | `--agent mobile` | `[mobile-agent]` | React Native, Flutter, Platform APIs |
|
|
20
|
+
| **Data Pipelines** | `--agent data` | `[data-agent]` | ETL, Analytics, Data Warehouse |
|
|
21
|
+
| **Infrastructure** | `--agent devops` | `[devops-agent]` | CI/CD, Deployment, IaC |
|
|
17
22
|
| **Testing/QA** | `--agent quality` | `[quality]` | Test Runner Config, Coverage Reports |
|
|
18
23
|
| **Refactoring** | `--agent fullstack` | `[backend]` + `[frontend]` | Cross-layer dependencies |
|
|
19
24
|
|
|
20
25
|
## 3. Usage & Arguments
|
|
26
|
+
|
|
21
27
|
```bash
|
|
22
28
|
/soc-implement [target] [flags]
|
|
23
29
|
```
|
|
24
30
|
|
|
25
31
|
### Arguments
|
|
26
|
-
|
|
32
|
+
|
|
33
|
+
- **`[target]`**: The feature or file to implement (e.g., "Login Flow", "src/components/Button.tsx").
|
|
27
34
|
|
|
28
35
|
### Flags
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
36
|
+
|
|
37
|
+
- **`--agent [backend|frontend|quality]`**: **MANDATORY**. Specifies the executing persona.
|
|
38
|
+
- **`--test`**: (Default: true) Run capabilities tests after implementation.
|
|
39
|
+
- **`--document`**: (Default: true) Update associated documentation/comments.
|
|
32
40
|
|
|
33
41
|
## 4. Behavioral Flow (Orchestration)
|
|
34
42
|
|
|
35
43
|
### Phase 1: Pre-Flight (Confidence Check)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
|
|
45
|
+
1. **Read**: Review existing code and referencing `design.md` or `requirements`.
|
|
46
|
+
2. **Verify**: Check for patterns (e.g., "How do existing controllers handle errors?").
|
|
47
|
+
3. **Gate**: If confidence < 80%, ask user/PM for clarification.
|
|
39
48
|
|
|
40
49
|
### Phase 2: Execution (The Loop)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
*
|
|
50
|
+
|
|
51
|
+
1. **Test**: Write the test case first (TDD) if applicable.
|
|
52
|
+
2. **Edit**: Apply changes using `replace_file_content` or `write_to_file`.
|
|
53
|
+
3. **Verify**: Run the project's build/test command.
|
|
54
|
+
- *If Fail*: Trigger `reflexion` skill (Why did it fail? -> Fix -> Retry).
|
|
55
|
+
- *Limit*: Max 3 retries before asking for help.
|
|
46
56
|
|
|
47
57
|
### Phase 3: Post-Flight (Self Check)
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
58
|
+
|
|
59
|
+
- Did I leave any `console.log`?
|
|
60
|
+
- Are inputs sanitized?
|
|
61
|
+
- Did I break the build?
|
|
51
62
|
|
|
52
63
|
## 5. Output Guidelines (The Contract)
|
|
53
64
|
|
|
54
65
|
### Standard Implementation Report
|
|
66
|
+
|
|
55
67
|
```markdown
|
|
56
68
|
## Implementation: [Feature Name]
|
|
57
69
|
|
|
@@ -72,41 +84,59 @@ The command routes to specialized sub-agents based on the `--agent` flag or file
|
|
|
72
84
|
## 6. Examples
|
|
73
85
|
|
|
74
86
|
### A. Backend Feature
|
|
87
|
+
|
|
75
88
|
```bash
|
|
76
89
|
/soc-implement "User Registration API" --agent backend
|
|
77
90
|
```
|
|
91
|
+
|
|
78
92
|
*Effect:* `backend` agent writes `POST /register`, adds `UserSchema` validation, inputs into Postgres, and returns a sanitized User DTO.
|
|
79
93
|
|
|
80
94
|
### B. Frontend Component
|
|
95
|
+
|
|
81
96
|
```bash
|
|
82
97
|
/soc-implement "DarkMode Toggle" --agent frontend
|
|
83
98
|
```
|
|
99
|
+
|
|
84
100
|
*Effect:* `frontend` agent checks `tailwind.config.js`, creates a toggle component using `Radix UI` primitives (if installed) and handles local storage state.
|
|
85
101
|
|
|
86
102
|
## 7. Dependencies & Capabilities
|
|
87
103
|
|
|
88
104
|
### Agents
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
105
|
+
|
|
106
|
+
- **Backend**: `@[.opencode/agents/backend.md]`
|
|
107
|
+
- **Frontend**: `@[.opencode/agents/frontend.md]`
|
|
108
|
+
- **Quality**: `@[.opencode/agents/quality.md]` - For TDD and verification.
|
|
92
109
|
|
|
93
110
|
### Skills
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
111
|
+
|
|
112
|
+
- **Confidence Check**: `@[.opencode/skills/confidence-check/SKILL.md]` - MANDATORY step before starting.
|
|
113
|
+
- **Self Check**: `@[.opencode/skills/self-check/SKILL.md]` - Validation protocol after changes.
|
|
114
|
+
- **Debug Protocol**: `@[.opencode/skills/debug-protocol/SKILL.md]` - If implementation hits errors.
|
|
115
|
+
- **Package Manager**: `@[.opencode/skills/package-manager/SKILL.md]` - MANDATORY for all dependency operations.
|
|
116
|
+
- **Simplification**: `@[.opencode/skills/simplification/SKILL.md]` - Keeps implementations minimal.
|
|
117
|
+
- **Doc Sync**: `@[.opencode/skills/doc-sync/SKILL.md]` - Ensures documentation matches implementation.
|
|
97
118
|
|
|
98
119
|
### MCP Integration
|
|
99
|
-
|
|
100
|
-
-
|
|
120
|
+
|
|
121
|
+
- **`context7`**: For looking up exact syntax and library API usage to prevent hallucinations.
|
|
122
|
+
- **`filesystem`**: For determining current project structure and patterns.
|
|
123
|
+
- **`tavily`**: Research latest best practices and library versions.
|
|
124
|
+
- **`sequential-thinking`**: Step through complex implementation logic.
|
|
101
125
|
|
|
102
126
|
## 8. Boundaries
|
|
103
127
|
|
|
104
128
|
**Will:**
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
129
|
+
|
|
130
|
+
- Write code modules, tests, and documentation.
|
|
131
|
+
- Fix compilation errors it causes.
|
|
132
|
+
- Respect existing linters and formatters.
|
|
108
133
|
|
|
109
134
|
**Will Not:**
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
135
|
+
|
|
136
|
+
- **Invent Designs**: If no design exists, it will fall back to simple best practices or ask for a design.
|
|
137
|
+
- **Commit Violations**: Will not commit code with secrets or critical bugs.
|
|
138
|
+
- **Touch Forbidden Files**: (e.g., `package-lock.json` manual edits, `.env` manual edits).
|
|
139
|
+
|
|
140
|
+
## User Instruction
|
|
141
|
+
|
|
142
|
+
The user have executed the `/soc-implement` command by parsing the user's arguments provided in `<user-instruction>$ARGUMENTS</user-instruction>`, then route to the appropriate specialized agent based on the extracted `--agent` flag (backend, frontend, quality, or fullstack), perform a confidence check by reviewing existing code and patterns before starting, write test cases first following TDD principles if applicable, implement the feature or component using appropriate file operations, run the project's build and test commands for verification, trigger the reflexion skill to analyze and fix any failures with a maximum of 3 retry attempts, conduct a post-flight self-check for debugging artifacts and input sanitization, and generate an implementation report documenting changes made, verification status, and key architectural decisions.
|