opencode-onboard 0.0.1 → 0.0.5
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/README.md +203 -0
- package/content/.opencode/agents/.bootstrap/AGENTS.template.md +130 -126
- package/content/.opencode/agents/back-engineer.md +73 -0
- package/content/.opencode/agents/devops-manager.md +115 -0
- package/content/.opencode/agents/front-engineer.md +73 -0
- package/content/.opencode/agents/infra-engineer.md +73 -0
- package/content/.opencode/agents/quality-engineer.md +75 -0
- package/content/.opencode/agents/security-auditor.md +85 -0
- package/content/.opencode/skills/browser-automation/SKILL.md +63 -0
- package/content/.opencode/skills/ob-userstory-az/SKILL.md +6 -6
- package/content/.opencode/skills/ob-userstory-gh/SKILL.md +3 -3
- package/content/AGENTS.md +12 -12
- package/content/DESIGN.md +1 -1
- package/package.json +18 -1
- package/src/index.js +67 -1
- package/src/presets/platforms.json +10 -0
- package/src/presets/skills-providers.json +14 -0
- package/src/steps/__tests__/check-env.test.js +70 -0
- package/src/steps/__tests__/check-platform.test.js +104 -0
- package/src/steps/__tests__/check-rtk.test.js +37 -0
- package/src/steps/__tests__/choose-platform.test.js +38 -0
- package/src/steps/__tests__/choose-team.test.js +105 -0
- package/src/steps/__tests__/clean-ai-files.test.js +62 -0
- package/src/steps/__tests__/copy-content.test.js +62 -0
- package/src/steps/check-env.js +26 -0
- package/src/steps/check-platform.js +80 -0
- package/src/steps/check-rtk.js +20 -0
- package/src/steps/choose-platform.js +22 -0
- package/src/steps/choose-skills-provider.js +56 -0
- package/src/steps/clean-ai-files.js +51 -0
- package/src/steps/copy-content.js +21 -0
- package/src/steps/init-openspec.js +22 -0
- package/src/steps/install-browser.js +65 -0
- package/src/utils/__tests__/copy.test.js +132 -0
- package/src/utils/__tests__/exec.test.js +106 -0
- package/src/utils/copy.js +54 -0
- package/src/utils/exec.js +84 -0
- package/content/.opencode/agents/ob-pullrequest-creator-az.md +0 -332
- package/content/.opencode/agents/ob-pullrequest-creator-gh.md +0 -177
- package/content/.opencode/agents/ob-pullrequest-observer-az.md +0 -248
- package/content/.opencode/agents/ob-pullrequest-observer-gh.md +0 -197
- package/content/.opencode/agents/qa.md +0 -137
package/README.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
BANNER
|
|
3
|
+
Replace the line below with your actual banner image once ready.
|
|
4
|
+
Recommended size: 1280×640px, dark background.
|
|
5
|
+
<img src="./assets/banner.png" alt="opencode-onboard banner" width="100%" />
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
<div align="center">
|
|
9
|
+
|
|
10
|
+
# opencode-onboard
|
|
11
|
+
|
|
12
|
+
**One command to prepare any codebase for AI agent workflows.**
|
|
13
|
+
|
|
14
|
+
Works with [OpenCode](https://opencode.ai), [OpenCode Ensemble](https://github.com/hueyexe/opencode-ensemble), [OpenSpec](https://github.com/fission-ai/openspec), GitHub and Azure DevOps.
|
|
15
|
+
|
|
16
|
+
[](https://www.npmjs.com/package/opencode-onboard)
|
|
17
|
+
[](https://www.npmjs.com/package/opencode-onboard)
|
|
18
|
+
[](./LICENSE)
|
|
19
|
+
[](https://nodejs.org)
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## What is this?
|
|
26
|
+
|
|
27
|
+
Most codebases have no `AGENTS.md`, no architecture docs agents can read, and no defined workflow for picking up tasks. Agents end up improvising, and that produces inconsistent, brittle results.
|
|
28
|
+
|
|
29
|
+
**opencode-onboard** fixes that in a single interactive run. It installs a universal agent team and the skills they need to work on your project, platform-aware, non-destructive, and ready the moment it finishes.
|
|
30
|
+
|
|
31
|
+
> **Note:** This is an independent community tool, not built by or affiliated with the OpenCode team.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx opencode-onboard@latest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Requires **Node.js 18+**.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## How it works
|
|
46
|
+
|
|
47
|
+
The CLI runs through a short interactive sequence:
|
|
48
|
+
|
|
49
|
+
| Step | What happens |
|
|
50
|
+
|------|-------------|
|
|
51
|
+
| **1. Environment check** | Verifies Node.js ≥ 18 and npm/pnpm are available |
|
|
52
|
+
| **2. Clean AI files** | Detects existing `AGENTS.md`, `.cursorrules`, `CLAUDE.md`, etc. and offers to remove them |
|
|
53
|
+
| **3. Choose platform** | GitHub or Azure DevOps |
|
|
54
|
+
| **4. Copy scaffolding** | Drops the agent layer and bootstrap docs into your project |
|
|
55
|
+
| **5. Choose skills provider** | Installs platform skills agents use for work item and PR workflows |
|
|
56
|
+
| **6. Init OpenSpec** | Runs `npx @fission-ai/openspec init` for structured change management |
|
|
57
|
+
| **7. Install opencode-browser** | Browser plugin agents use for local UI screenshots |
|
|
58
|
+
| **8. Check rtk** | Verifies `rtk` is on PATH |
|
|
59
|
+
| **9. Verify platform CLI** | Checks `gh` (GitHub) or `az` + `azure-devops` (Azure DevOps) |
|
|
60
|
+
|
|
61
|
+
When it finishes, open OpenCode in your project and type:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
init
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
OpenCode generates `ARCHITECTURE.md` and `DESIGN.md` from your actual codebase, then activates the full agent team.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Agents and Skills
|
|
72
|
+
|
|
73
|
+
opencode-onboard draws a hard line between two concepts:
|
|
74
|
+
|
|
75
|
+
### Agents, universal behaviors
|
|
76
|
+
|
|
77
|
+
Agents define *how to work*. They are behavioral personas, the same for every project, every tech stack, every team. You never configure them or choose between them. All six are always installed.
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
devops-manager reads work items, creates PRs, handles review feedback
|
|
81
|
+
front-engineer web, mobile, UI, anything visual
|
|
82
|
+
back-engineer APIs, services, data, AI, anything not UI
|
|
83
|
+
infra-engineer Terraform, pipelines, cloud infrastructure
|
|
84
|
+
quality-engineer unit, integration, e2e tests across all layers
|
|
85
|
+
security-auditor vulnerability audit, secrets, auth gaps
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Skills, platform knowledge
|
|
89
|
+
|
|
90
|
+
Skills define *what to know*. They are installed separately and provide the tech and platform-specific knowledge agents need. Agents detect and load relevant skills automatically, **you never tell an agent which skill to use**.
|
|
91
|
+
|
|
92
|
+
Skills shipped with opencode-onboard (`ob-` prefix):
|
|
93
|
+
|
|
94
|
+
| Skill | Purpose |
|
|
95
|
+
|-------|---------|
|
|
96
|
+
| `ob-userstory-gh` | Parse a GitHub Issue URL into a structured work item |
|
|
97
|
+
| `ob-userstory-az` | Parse an Azure DevOps work item URL |
|
|
98
|
+
| `ob-pullrequest-gh` | Create and update PRs on GitHub |
|
|
99
|
+
| `ob-pullrequest-az` | Create and update PRs on Azure DevOps |
|
|
100
|
+
|
|
101
|
+
Skills are plain Markdown files in `.opencode/skills/`. You can write your own, any file with a `SKILL.md` in a subdirectory is automatically discoverable by agents.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## The pipeline
|
|
106
|
+
|
|
107
|
+
When you give the lead agent a work item URL, it runs the full pipeline automatically:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
devops-manager → parse work item via skill → structured summary
|
|
111
|
+
↓
|
|
112
|
+
openspec-propose
|
|
113
|
+
proposal + specs + tasks
|
|
114
|
+
↓
|
|
115
|
+
[confirm with user]
|
|
116
|
+
↓
|
|
117
|
+
front-engineer + back-engineer + infra-engineer (parallel)
|
|
118
|
+
↓
|
|
119
|
+
quality-engineer
|
|
120
|
+
tests, build, lint, acceptance
|
|
121
|
+
↓
|
|
122
|
+
security-auditor
|
|
123
|
+
vulnerabilities, secrets
|
|
124
|
+
↓
|
|
125
|
+
devops-manager → screenshots → commit → push → PR → comment
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Each agent runs in its own isolated git worktree via [OpenCode Ensemble](https://github.com/hueyexe/opencode-ensemble), with a live dashboard at `http://localhost:4747`.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## What gets installed
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
your-project/
|
|
136
|
+
├── AGENTS.md ← bootstrap mode, replaced after first "init"
|
|
137
|
+
├── ARCHITECTURE.md ← prompt for agents to fill in from your codebase
|
|
138
|
+
├── DESIGN.md ← prompt for agents to fill in from your codebase
|
|
139
|
+
└── .opencode/
|
|
140
|
+
├── agents/
|
|
141
|
+
│ ├── devops-manager.md
|
|
142
|
+
│ ├── front-engineer.md
|
|
143
|
+
│ ├── back-engineer.md
|
|
144
|
+
│ ├── infra-engineer.md
|
|
145
|
+
│ ├── quality-engineer.md
|
|
146
|
+
│ └── security-auditor.md
|
|
147
|
+
└── skills/
|
|
148
|
+
├── ob-userstory-gh/ ← or -az, depending on platform
|
|
149
|
+
└── ob-pullrequest-gh/
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## The bootstrap sequence
|
|
155
|
+
|
|
156
|
+
The first time you type `init` in OpenCode after onboarding:
|
|
157
|
+
|
|
158
|
+
1. OpenCode reads your codebase and writes a real `ARCHITECTURE.md`
|
|
159
|
+
2. OpenCode reads your design patterns and writes a real `DESIGN.md`
|
|
160
|
+
3. `AGENTS.md` is replaced by the production version
|
|
161
|
+
4. Your agent team is live
|
|
162
|
+
|
|
163
|
+
After this, every agent has accurate, persistent context about your project, no manual documentation required.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Prerequisites
|
|
168
|
+
|
|
169
|
+
| Requirement | Notes |
|
|
170
|
+
|-------------|-------|
|
|
171
|
+
| **Node.js 18+** | Required |
|
|
172
|
+
| **[OpenCode](https://opencode.ai)** | The agent runtime |
|
|
173
|
+
| **[OpenCode Ensemble](https://github.com/hueyexe/opencode-ensemble)** | Multi-agent parallel execution |
|
|
174
|
+
| **[rtk](https://github.com/rtk-ai/rtk#pre-built-binaries)** | Required for agents to run CLI commands safely |
|
|
175
|
+
| **[gh CLI](https://cli.github.com)** | GitHub platform, must be authenticated |
|
|
176
|
+
| **[az CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)** + azure-devops extension | Azure DevOps platform |
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Development
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
git clone https://github.com/ckgrafico/opencode-onboard.git
|
|
184
|
+
cd opencode-onboard
|
|
185
|
+
pnpm install
|
|
186
|
+
|
|
187
|
+
# Run the CLI locally
|
|
188
|
+
node src/index.js
|
|
189
|
+
|
|
190
|
+
# Run tests
|
|
191
|
+
pnpm test
|
|
192
|
+
|
|
193
|
+
# Watch mode
|
|
194
|
+
pnpm test:watch
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Tests are written with [Vitest](https://vitest.dev).
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
MIT © [ckgrafico](https://github.com/ckgrafico)
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
This file provides guidance to AI agents when working in this repository.
|
|
4
4
|
|
|
5
|
-
*Agent-agnostic
|
|
5
|
+
*Agent-agnostic, works with OpenCode, Claude Code, Codex, Gemini, etc.*
|
|
6
6
|
|
|
7
7
|
## Project Overview
|
|
8
8
|
|
|
9
9
|
This is the agent orchestration layer for your project. It provides:
|
|
10
|
-
-
|
|
10
|
+
- Universal agent team for development workflow
|
|
11
11
|
- OpenSpec change management
|
|
12
|
-
-
|
|
12
|
+
- Skills for platform-specific knowledge
|
|
13
13
|
|
|
14
|
-
## I Am the Lead
|
|
14
|
+
## I Am the Lead, Full Workflow Ownership
|
|
15
15
|
|
|
16
|
-
When the user provides
|
|
16
|
+
When the user provides a work item URL, says "implement the plan", or "I've added comments to the PR", **I own the full lifecycle**. I load the appropriate skill and use ensemble tools (`team_create`, `team_spawn`, etc.) to coordinate the agent team.
|
|
17
17
|
|
|
18
18
|
Trigger patterns:
|
|
19
|
-
- `work on this <azure-devops-url>` →
|
|
20
|
-
- `work on this <github-url>` →
|
|
21
|
-
- `implement the plan` → load skill `openspec-apply-change` → implement →
|
|
22
|
-
- `I've added comments to the PR` → spawn `
|
|
19
|
+
- `work on this <azure-devops-url>` → spawn `devops-manager` in read mode → propose OpenSpec → implement → ship
|
|
20
|
+
- `work on this <github-url>` → spawn `devops-manager` in read mode → propose OpenSpec → implement → ship
|
|
21
|
+
- `implement the plan` → load skill `openspec-apply-change` → implement → ship
|
|
22
|
+
- `I've added comments to the PR` → spawn `devops-manager` in feedback mode → fix → update PR
|
|
23
23
|
|
|
24
|
-
**Never delegate without a plan. Never write implementation code directly
|
|
24
|
+
**Never delegate without a plan. Never write implementation code directly, always spawn specialists.**
|
|
25
25
|
|
|
26
|
-
## Multi-Agent Execution
|
|
26
|
+
## Multi-Agent Execution, opencode-ensemble
|
|
27
27
|
|
|
28
28
|
Parallel execution uses the `opencode-ensemble` plugin (`team_create`, `team_spawn`, etc.).
|
|
29
29
|
Works on **all platforms** (Windows, macOS, Linux) via OpenCode's built-in worktree support.
|
|
@@ -45,186 +45,190 @@ Works on **all platforms** (Windows, macOS, Linux) via OpenCode's built-in workt
|
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## Pipeline
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
```
|
|
51
|
+
devops-manager (read mode)
|
|
52
|
+
→ parse work item via skill → structured summary
|
|
53
|
+
↓
|
|
54
|
+
openspec-propose
|
|
55
|
+
→ proposal.md + specs + tasks
|
|
56
|
+
↓
|
|
57
|
+
[confirm with user]
|
|
58
|
+
↓
|
|
59
|
+
front-engineer + back-engineer + infra-engineer ← parallel, only spawn what the task needs
|
|
60
|
+
↓
|
|
61
|
+
quality-engineer
|
|
62
|
+
→ tests, build, lint, acceptance criteria
|
|
63
|
+
↓
|
|
64
|
+
security-auditor
|
|
65
|
+
→ vulnerability audit, secrets, auth gaps
|
|
66
|
+
↓
|
|
67
|
+
devops-manager (ship mode)
|
|
68
|
+
→ screenshots → commit → push → PR → post comment
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Phase 1, Parse & Propose
|
|
51
72
|
|
|
52
73
|
```
|
|
53
|
-
1.
|
|
54
|
-
2. Load skill: openspec-propose → generate proposal.md,
|
|
55
|
-
- team_create →
|
|
56
|
-
- Wait for both → team_shutdown + team_merge both → write tasks.md
|
|
74
|
+
1. team_spawn devops-manager (read mode) → fetch work item via skill, output summary
|
|
75
|
+
2. Load skill: openspec-propose → generate proposal.md, specs/, tasks.md
|
|
76
|
+
- team_create → spawn design + specs in parallel → merge → write tasks.md
|
|
57
77
|
3. Show summary, confirm with user before implementing
|
|
58
78
|
```
|
|
59
79
|
|
|
60
|
-
### Phase 2
|
|
80
|
+
### Phase 2, Implement
|
|
61
81
|
|
|
62
82
|
```
|
|
63
83
|
1. Load skill: openspec-apply-change → get apply instructions
|
|
64
|
-
2. Create feature branch
|
|
84
|
+
2. Create feature branch: feature/{id}-{slug}
|
|
65
85
|
3. team_create "<change-name>"
|
|
66
|
-
4. Announce: "Team
|
|
67
|
-
5. Spawn in parallel:
|
|
68
|
-
team_spawn name:
|
|
69
|
-
team_spawn name:
|
|
70
|
-
|
|
86
|
+
4. Announce: "Team running. Monitor at http://localhost:4747/"
|
|
87
|
+
5. Spawn only what the task needs (in parallel):
|
|
88
|
+
team_spawn name:front agent:front-engineer → UI tasks
|
|
89
|
+
team_spawn name:back agent:back-engineer → backend tasks
|
|
90
|
+
team_spawn name:infra agent:infra-engineer → infra tasks
|
|
91
|
+
6. Wait for all → team_results → team_shutdown + team_merge
|
|
71
92
|
```
|
|
72
93
|
|
|
73
|
-
### Phase 3
|
|
94
|
+
### Phase 3, Quality
|
|
74
95
|
|
|
75
96
|
```
|
|
76
|
-
7. team_spawn name:
|
|
77
|
-
8. Wait → team_results → fix any blockers
|
|
78
|
-
9. team_shutdown qa
|
|
97
|
+
7. team_spawn name:quality agent:quality-engineer → tests, build, lint
|
|
98
|
+
8. Wait → team_results → fix any blockers → team_shutdown
|
|
79
99
|
```
|
|
80
100
|
|
|
81
|
-
### Phase 4
|
|
101
|
+
### Phase 4, Security
|
|
82
102
|
|
|
83
103
|
```
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
→ Screenshots → save to openspec/changes/<change>/images/
|
|
87
|
-
→ Commit & push to feature branch
|
|
88
|
-
→ Create PR
|
|
89
|
-
→ Post screenshot comment
|
|
90
|
-
11. Wait → team_results → report PR URLs to user
|
|
91
|
-
12. team_cleanup
|
|
104
|
+
9. team_spawn name:security agent:security-auditor → audit full change
|
|
105
|
+
10. Wait → team_results → fix Critical findings → team_shutdown
|
|
92
106
|
```
|
|
93
107
|
|
|
94
|
-
### Phase 5
|
|
108
|
+
### Phase 5, Ship
|
|
95
109
|
|
|
96
110
|
```
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
2. Wait → team_results → spawn frontend and/or backend in parallel for code-change items
|
|
102
|
-
3. Wait → team_results → team_spawn name:qa → review fixes
|
|
103
|
-
4. Wait → team_results → team_spawn name:ob-pullrequest-*-creator → commit, push, update PR
|
|
104
|
-
5. Wait → team_results → team_cleanup
|
|
111
|
+
11. team_spawn name:devops agent:devops-manager (ship mode)
|
|
112
|
+
→ screenshots → commit & push → create PR → post comment
|
|
113
|
+
12. Wait → team_results → report PR URL to user
|
|
114
|
+
13. team_cleanup
|
|
105
115
|
```
|
|
106
116
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
Format: `feature/{issue-id}-{slug}`
|
|
110
|
-
Example: `feature/42-add-user-auth`
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Project Structure
|
|
117
|
+
### Phase 6, PR Feedback Loop
|
|
115
118
|
|
|
116
119
|
```
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
│ ├── specs/ # Project specs (permanent)
|
|
124
|
-
│ └── changes/ # Change tracking
|
|
125
|
-
│ └── {change}/ # Per-change folder
|
|
126
|
-
│ └── images/ # Screenshots for PR comments (git-tracked)
|
|
127
|
-
├── AGENTS.md # Agent guidance (THIS FILE)
|
|
128
|
-
├── ARCHITECTURE.md # System architecture
|
|
129
|
-
├── DESIGN.md # Design tokens and UI guidelines
|
|
130
|
-
└── README.md # Project readme
|
|
120
|
+
When user says "I've added comments to the PR":
|
|
121
|
+
1. team_spawn devops-manager (feedback mode) → read & classify comments
|
|
122
|
+
2. Wait → team_results → spawn front/back/infra for code-change items (parallel)
|
|
123
|
+
3. Wait → team_results → spawn quality-engineer → verify fixes
|
|
124
|
+
4. Wait → team_results → spawn devops-manager (ship mode) → push & update PR
|
|
125
|
+
5. team_cleanup
|
|
131
126
|
```
|
|
132
127
|
|
|
133
|
-
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Agents
|
|
134
131
|
|
|
135
|
-
-
|
|
136
|
-
- OpenSpec — Spec-driven workflow
|
|
137
|
-
- opencode-ensemble — Multi-agent parallel execution
|
|
132
|
+
All agents are universal, no project-specific knowledge. Platform and tech knowledge comes from skills.
|
|
138
133
|
|
|
139
|
-
|
|
134
|
+
| Agent | File | Role |
|
|
135
|
+
|-------|------|------|
|
|
136
|
+
| `devops-manager` | .opencode/agents/devops-manager.md | Reads work items, creates PRs, handles review feedback |
|
|
137
|
+
| `front-engineer` | .opencode/agents/front-engineer.md | Web, mobile, UI implementation |
|
|
138
|
+
| `back-engineer` | .opencode/agents/back-engineer.md | APIs, services, data, AI implementation |
|
|
139
|
+
| `infra-engineer` | .opencode/agents/infra-engineer.md | Terraform, pipelines, cloud infrastructure |
|
|
140
|
+
| `quality-engineer` | .opencode/agents/quality-engineer.md | Unit, integration, e2e tests across all layers |
|
|
141
|
+
| `security-auditor` | .opencode/agents/security-auditor.md | Vulnerability audit, secrets, auth gaps |
|
|
140
142
|
|
|
141
|
-
|
|
142
|
-
# OpenSpec
|
|
143
|
-
openspec new change "<name>"
|
|
144
|
-
openspec list
|
|
145
|
-
openspec status --change "<name>"
|
|
146
|
-
openspec instructions apply --change "<name>" --json
|
|
143
|
+
## Skills
|
|
147
144
|
|
|
148
|
-
|
|
149
|
-
```
|
|
145
|
+
Skills provide platform and tech-specific knowledge. Agents detect and load them automatically, the user never specifies which skill to use.
|
|
150
146
|
|
|
151
|
-
|
|
147
|
+
Skills are located in `.opencode/skills/`. Each skill has a `SKILL.md` with a description the agent reads to determine relevance.
|
|
152
148
|
|
|
153
149
|
| Skill | Purpose |
|
|
154
150
|
|-------|---------|
|
|
155
|
-
| `ob-userstory-az` | Parse Azure DevOps
|
|
156
|
-
| `ob-userstory-gh` | Parse GitHub Issue URL
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
151
|
+
| `ob-userstory-az` | Parse Azure DevOps work item URL |
|
|
152
|
+
| `ob-userstory-gh` | Parse GitHub Issue URL |
|
|
153
|
+
| `ob-pullrequest-az` | Create PR on Azure DevOps |
|
|
154
|
+
| `ob-pullrequest-gh` | Create PR on GitHub |
|
|
155
|
+
| `openspec-propose` | Propose change artifacts (proposal, specs, tasks) |
|
|
156
|
+
| `openspec-apply-change` | Implement change with agent team |
|
|
159
157
|
| `openspec-archive-change` | Archive completed change |
|
|
160
|
-
| `openspec-explore` | Explore ideas before creating a change |
|
|
161
158
|
|
|
162
|
-
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Branch Naming
|
|
162
|
+
|
|
163
|
+
Format: `feature/{issue-id}-{slug}`
|
|
164
|
+
Example: `feature/42-add-user-auth`
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Project Structure
|
|
163
169
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
```
|
|
171
|
+
[project-root]/
|
|
172
|
+
└── Copilots/ ← THIS FOLDER (agent orchestration)
|
|
173
|
+
├── .opencode/
|
|
174
|
+
│ ├── agents/ # Agent definitions (universal, no project knowledge)
|
|
175
|
+
│ └── skills/ # Skills (platform/tech specific knowledge)
|
|
176
|
+
├── openspec/
|
|
177
|
+
│ ├── specs/
|
|
178
|
+
│ └── changes/
|
|
179
|
+
│ └── {change}/
|
|
180
|
+
│ └── images/
|
|
181
|
+
├── AGENTS.md
|
|
182
|
+
├── ARCHITECTURE.md
|
|
183
|
+
└── DESIGN.md
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
173
187
|
|
|
174
188
|
## Guardrails
|
|
175
189
|
|
|
176
|
-
###
|
|
190
|
+
### Git Operations
|
|
177
191
|
|
|
178
|
-
|
|
192
|
+
Agents CAN:
|
|
193
|
+
- ✅ Commit to feature branches
|
|
194
|
+
- ✅ Push to feature branches
|
|
179
195
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
196
|
+
Agents CANNOT:
|
|
197
|
+
- ❌ Commit or push to `main`, FORBIDDEN
|
|
198
|
+
- ❌ Force push, FORBIDDEN
|
|
199
|
+
- ❌ Merge PRs, human-only
|
|
200
|
+
- ❌ Create or delete branches other than `feature/*`
|
|
185
201
|
|
|
186
|
-
### Platform CLI
|
|
202
|
+
### Platform CLI
|
|
187
203
|
|
|
188
|
-
|
|
204
|
+
ALL platform interactions via CLI only. Browser MCP FORBIDDEN for any DevOps or GitHub operation.
|
|
189
205
|
|
|
190
206
|
| Operation | Azure DevOps | GitHub |
|
|
191
207
|
|-----------|-------------|--------|
|
|
192
|
-
| Read issue
|
|
208
|
+
| Read issue | `az boards work-item show --id <id>` | `gh issue view <number>` |
|
|
193
209
|
| Read PR threads | `az devops invoke ...` | `gh pr view <number> --comments` |
|
|
194
210
|
| Create PR | `az repos pr create ...` | `gh pr create ...` |
|
|
195
|
-
| Reply to thread | `az devops invoke ...` | `gh api .../replies` |
|
|
196
211
|
|
|
197
212
|
Browser MCP tools permitted only for screenshots of **local running app** on `localhost` URLs.
|
|
198
213
|
|
|
199
|
-
### Security
|
|
214
|
+
### Security
|
|
200
215
|
|
|
201
216
|
Agents CANNOT:
|
|
202
217
|
- ❌ Access `.env` or config files with secrets
|
|
203
218
|
- ❌ Log or output credentials, API keys, or tokens
|
|
204
219
|
- ❌ Commit secrets to git
|
|
205
220
|
|
|
206
|
-
###
|
|
207
|
-
|
|
208
|
-
Agents CAN:
|
|
209
|
-
- ✅ Commit to feature branches
|
|
210
|
-
- ✅ Push to feature branches
|
|
211
|
-
|
|
212
|
-
Agents CANNOT:
|
|
213
|
-
- ❌ Commit or push to `main` — FORBIDDEN
|
|
214
|
-
- ❌ Force push — FORBIDDEN
|
|
215
|
-
- ❌ Merge PRs — human-only
|
|
216
|
-
- ❌ Create or delete branches other than `feature/*`
|
|
221
|
+
### Scope
|
|
217
222
|
|
|
218
|
-
### Scope Limits
|
|
219
223
|
- Max 10 files per change
|
|
220
224
|
- No architecture changes without human approval
|
|
221
|
-
- No pipeline modifications
|
|
225
|
+
- No pipeline modifications without human approval
|
|
226
|
+
|
|
227
|
+
---
|
|
222
228
|
|
|
223
229
|
## Communication Style
|
|
224
230
|
|
|
225
|
-
Terse
|
|
226
|
-
Drop: articles, filler
|
|
231
|
+
Terse. Technical substance exact. Only fluff die.
|
|
232
|
+
Drop: articles, filler, pleasantries, hedging.
|
|
227
233
|
Fragments OK. Short synonyms. Code unchanged.
|
|
228
234
|
Pattern: [thing] [action] [reason]. [next step].
|
|
229
|
-
ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift.
|
|
230
|
-
Code/commits/PRs: normal. Off: "stop caveman" / "normal mode".
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Back Engineer
|
|
2
|
+
|
|
3
|
+
> Backend specialist, APIs, monoliths, data, AI, anything not UI. Spawned by the lead agent via opencode-ensemble.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
name: back-engineer
|
|
7
|
+
mode: subagent
|
|
8
|
+
model: build
|
|
9
|
+
description: |
|
|
10
|
+
Backend engineer. Implements APIs, services, data models, business logic, AI integrations.
|
|
11
|
+
Anything that is not UI. Receives tasks from lead, implements, reports back.
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Domain
|
|
15
|
+
|
|
16
|
+
REST and GraphQL APIs, monolithic services, microservices, databases and data models, business logic, background jobs, queues, caching, AI/LLM integrations, third-party service integrations, authentication and authorization logic. Anything that runs server-side or outside the UI.
|
|
17
|
+
|
|
18
|
+
## RTK, MANDATORY
|
|
19
|
+
|
|
20
|
+
Use `rtk` for ALL CLI commands. Never run commands directly.
|
|
21
|
+
|
|
22
|
+
- `rtk dotnet test` NOT `dotnet test`
|
|
23
|
+
- `rtk bun test` NOT `bun test`
|
|
24
|
+
- `rtk npm run build` NOT `npm run build`
|
|
25
|
+
|
|
26
|
+
If `rtk` is not available, report it as a blocker. Do not run commands without it.
|
|
27
|
+
|
|
28
|
+
## Skills, Auto-Detection
|
|
29
|
+
|
|
30
|
+
Skills are located in `.opencode/skills/`. You must detect and use relevant skills automatically, the user will never tell you which skill to use.
|
|
31
|
+
|
|
32
|
+
**How to detect:**
|
|
33
|
+
1. Read the task description and identify the domain and platform
|
|
34
|
+
2. Scan `.opencode/skills/` for available skills
|
|
35
|
+
3. Read each `SKILL.md` description to assess relevance
|
|
36
|
+
4. Load and follow any skill that applies, even partial match warrants loading
|
|
37
|
+
|
|
38
|
+
**Rules:**
|
|
39
|
+
- Never implement directly if a skill applies
|
|
40
|
+
- Follow skill instructions exactly, do not partially apply them
|
|
41
|
+
- A skill that is 50% relevant still takes priority over improvising
|
|
42
|
+
- If two skills apply, follow both, resolve conflicts by asking the lead
|
|
43
|
+
|
|
44
|
+
## Responsibilities
|
|
45
|
+
|
|
46
|
+
Implement all backend tasks assigned by the lead agent:
|
|
47
|
+
- API endpoints and controllers
|
|
48
|
+
- Data models and migrations
|
|
49
|
+
- Business logic and domain services
|
|
50
|
+
- Authentication and authorization
|
|
51
|
+
- Background jobs and workers
|
|
52
|
+
- AI/LLM integrations and prompt engineering
|
|
53
|
+
- Third-party service integrations
|
|
54
|
+
- Performance and query optimization
|
|
55
|
+
|
|
56
|
+
## Constraints
|
|
57
|
+
|
|
58
|
+
- Implement only what is in the assigned tasks, no scope creep
|
|
59
|
+
- Do not modify UI, infra, or pipeline files
|
|
60
|
+
- Do not push to `main`, feature branches only
|
|
61
|
+
- Do not merge PRs, human-only
|
|
62
|
+
- Do not force push
|
|
63
|
+
- Report blockers immediately rather than working around them
|
|
64
|
+
|
|
65
|
+
## Output Format
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
## Back Engineer, Done
|
|
69
|
+
|
|
70
|
+
**Tasks completed:** <count>
|
|
71
|
+
**Files changed:** <list>
|
|
72
|
+
**Blockers:** none | <description>
|
|
73
|
+
```
|