opencode-onboard 0.4.2 → 0.4.4
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/LICENSE +21 -0
- package/README.md +304 -301
- package/content/.agents/agents/basic-engineer.md +4 -2
- package/content/.agents/agents/devops-manager.md +123 -123
- package/content/.agents/skills/ob-default/SKILL.md +25 -21
- package/content/.agents/skills/ob-generic-guardrails/SKILL.md +36 -32
- package/content/.agents/skills/ob-global/SKILL.md +92 -49
- package/content/.agents/skills/ob-pullrequest-az/SKILL.md +168 -160
- package/content/.agents/skills/ob-pullrequest-gh/SKILL.md +140 -136
- package/content/.opencode/commands/create-engineer.md +109 -0
- package/content/.opencode/commands/init.md +1 -1
- package/content/.opencode/commands/main.md +1 -1
- package/content/.opencode/commands/opsx-apply.md +131 -70
- package/content/.opencode/commands/plan.md +1 -1
- package/content/.opencode/plugins/session-log.js +523 -519
- package/content/.opencode/skills/openspec-apply-change/SKILL.md +86 -64
- package/content/AGENTS.md +67 -39
- package/package.json +1 -1
- package/src/commands/join.js +3 -3
- package/src/commands/single.js +2 -0
- package/src/commands/wizard.js +124 -99
- package/src/presets/browser.json +22 -18
- package/src/presets/optimization.json +27 -22
- package/src/presets/source.json +7 -1
- package/src/steps/browser/browser.test.js +115 -81
- package/src/steps/browser/index.js +62 -54
- package/src/steps/clean/index.js +108 -107
- package/src/steps/copy/agents.js +28 -0
- package/src/steps/copy/copy.test.js +1 -0
- package/src/steps/copy/index.js +2 -1
- package/src/steps/metadata/index.js +63 -61
- package/src/steps/models/format.js +61 -60
- package/src/steps/models/write.test.js +117 -117
- package/src/steps/openspec/ensemble.js +30 -7
- package/src/steps/openspec/ensemble.test.js +79 -79
- package/src/steps/openspec/index.js +121 -32
- package/src/steps/openspec/index.test.js +63 -0
- package/src/steps/optimization/caveman.js +34 -29
- package/src/steps/optimization/codegraph.js +52 -0
- package/src/steps/optimization/global.js +88 -64
- package/src/steps/optimization/global.test.js +99 -0
- package/src/steps/optimization/index.js +109 -101
- package/src/steps/optimization/optimization.test.js +101 -93
- package/src/steps/optimization/quota.js +84 -84
- package/src/steps/source/index.js +48 -0
- package/src/steps/source/source.test.js +124 -91
- package/src/utils/__tests__/copy.test.js +117 -117
- package/src/utils/exec-spinner.js +47 -47
- package/src/utils/exec.js +134 -131
- package/src/utils/terminal.js +6 -0
package/README.md
CHANGED
|
@@ -1,301 +1,304 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
<img src="https://raw.githubusercontent.com/CKGrafico/opencode-onboard/refs/heads/main/logo.png" alt="opencode-onboard" width="160" />
|
|
4
|
-
|
|
5
|
-
# 🧰 opencode-onboard
|
|
6
|
-
|
|
7
|
-
**One command to prepare any codebase for AI agent workflows in OpenCode.**
|
|
8
|
-
|
|
9
|
-
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.
|
|
10
|
-
|
|
11
|
-
[](https://www.npmjs.com/package/opencode-onboard)
|
|
12
|
-
[](https://www.npmjs.com/package/opencode-onboard)
|
|
13
|
-
[](./LICENSE)
|
|
14
|
-
[](https://nodejs.org)
|
|
15
|
-
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
## What is this?
|
|
19
|
-
|
|
20
|
-
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.
|
|
21
|
-
|
|
22
|
-
**opencode-onboard** fixes that in a single interactive run. It installs a universal and agnostic agent team,but let you choose your own skills, preconfigured your AI models, and initd OpenCode with Openspec and Ensemble.
|
|
23
|
-
|
|
24
|
-
<div align="center">
|
|
25
|
-
<img src="https://raw.githubusercontent.com/CKGrafico/opencode-onboard/refs/heads/main/demo.gif" alt="opencode-onboard demo" width="700" />
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
## Quick start
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npx opencode-onboard@latest
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Requires **Node.js 18+**.
|
|
35
|
-
|
|
36
|
-
### Run specific steps
|
|
37
|
-
|
|
38
|
-
You can run individual setup/maintenance steps without running the full wizard:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# Run one step directly
|
|
42
|
-
npx opencode-onboard clean
|
|
43
|
-
npx opencode-onboard platform
|
|
44
|
-
npx opencode-onboard copy
|
|
45
|
-
npx opencode-onboard openspec
|
|
46
|
-
npx opencode-onboard models
|
|
47
|
-
npx opencode-onboard optimization
|
|
48
|
-
npx opencode-onboard browser
|
|
49
|
-
npx opencode-onboard metadata
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
npx opencode-onboard
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- Run `
|
|
62
|
-
- Run `
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
| **
|
|
76
|
-
| **
|
|
77
|
-
| **
|
|
78
|
-
| **
|
|
79
|
-
| **
|
|
80
|
-
| **
|
|
81
|
-
| **
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
|
151
|
-
|
|
|
152
|
-
| `
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
↓
|
|
182
|
-
|
|
183
|
-
↓
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
↓
|
|
187
|
-
|
|
188
|
-
↓
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
|
257
|
-
|
|
|
258
|
-
| **
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
- `
|
|
270
|
-
- `
|
|
271
|
-
- `
|
|
272
|
-
- `
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
# Run
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
# Run
|
|
286
|
-
pnpm
|
|
287
|
-
|
|
288
|
-
#
|
|
289
|
-
pnpm lint
|
|
290
|
-
|
|
291
|
-
#
|
|
292
|
-
pnpm
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/CKGrafico/opencode-onboard/refs/heads/main/logo.png" alt="opencode-onboard" width="160" />
|
|
4
|
+
|
|
5
|
+
# 🧰 opencode-onboard
|
|
6
|
+
|
|
7
|
+
**One command to prepare any codebase for AI agent workflows in OpenCode.**
|
|
8
|
+
|
|
9
|
+
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.
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.com/package/opencode-onboard)
|
|
12
|
+
[](https://www.npmjs.com/package/opencode-onboard)
|
|
13
|
+
[](./LICENSE)
|
|
14
|
+
[](https://nodejs.org)
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
## What is this?
|
|
19
|
+
|
|
20
|
+
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.
|
|
21
|
+
|
|
22
|
+
**opencode-onboard** fixes that in a single interactive run. It installs a universal and agnostic agent team,but let you choose your own skills, preconfigured your AI models, and initd OpenCode with Openspec and Ensemble.
|
|
23
|
+
|
|
24
|
+
<div align="center">
|
|
25
|
+
<img src="https://raw.githubusercontent.com/CKGrafico/opencode-onboard/refs/heads/main/demo.gif" alt="opencode-onboard demo" width="700" />
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
## Quick start
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx opencode-onboard@latest
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Requires **Node.js 18+**.
|
|
35
|
+
|
|
36
|
+
### Run specific steps
|
|
37
|
+
|
|
38
|
+
You can run individual setup/maintenance steps without running the full wizard:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Run one step directly
|
|
42
|
+
npx opencode-onboard clean
|
|
43
|
+
npx opencode-onboard platform
|
|
44
|
+
npx opencode-onboard copy
|
|
45
|
+
npx opencode-onboard openspec
|
|
46
|
+
npx opencode-onboard models
|
|
47
|
+
npx opencode-onboard optimization
|
|
48
|
+
npx opencode-onboard browser
|
|
49
|
+
npx opencode-onboard metadata
|
|
50
|
+
npx opencode-onboard join
|
|
51
|
+
|
|
52
|
+
# Show CLI help and all commands
|
|
53
|
+
npx opencode-onboard --help
|
|
54
|
+
npx opencode-onboard -h
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
When available, step commands reuse context from `.opencode/opencode-onboard.json`.
|
|
58
|
+
|
|
59
|
+
Typical flow for reruns:
|
|
60
|
+
|
|
61
|
+
- Run `clean` if you want to reset old AI files
|
|
62
|
+
- Run `copy` if templates/skills changed in a new onboard release
|
|
63
|
+
- Run `optimization` if you want to reconfigure RTK/quota/caveman + `ob-global`
|
|
64
|
+
- Run `metadata` last to refresh `.opencode/opencode-onboard.json`
|
|
65
|
+
- Run `join` if you're a new member of an existing onboarded project and want to sync the latest onboarding metadata
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## How it works
|
|
70
|
+
|
|
71
|
+
The CLI runs a 10-step onboarding wizard. It keeps the current step visible, plus the last two completed steps, so progress is always clear.
|
|
72
|
+
|
|
73
|
+
| Step | What happens |
|
|
74
|
+
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
75
|
+
| **1. Source scope** | Choose current repo or sibling source roots for code analysis |
|
|
76
|
+
| **2. Clean AI files** | Detects existing `AGENTS.md`, `.cursorrules`, `CLAUDE.md`, `.agents/` etc. and removes them, preserves your `.agents/skills/` |
|
|
77
|
+
| **3. Choose platform** | GitHub or Azure DevOps |
|
|
78
|
+
| **4. Check platform CLI** | Verifies `gh` (GitHub) or `az` + `azure-devops` (Azure DevOps) |
|
|
79
|
+
| **5. Copy scaffolding** | Copies agents + built-in skills + bootstrap docs, writes source-roots metadata, applies AGENTS bootstrap patching, copies `skills-lock.json`, then runs `npx skills` |
|
|
80
|
+
| **6. Init OpenSpec** | Runs `npx @fission-ai/openspec init` silently for structured change management |
|
|
81
|
+
| **7. Choose models** | Fetches live model list from [models.dev](https://models.dev), lets you pick plan / build / fast models with cost indicators and canonical pricing |
|
|
82
|
+
| **8. Token optimization tools** | Optional (recommended). One checklist step for RTK check, opencode-quota setup, caveman install, and dynamic `ob-global` token-optimization rule injection |
|
|
83
|
+
| **9. Install browser plugin** | Installs `@different-ai/opencode-browser` globally for agent browser automation |
|
|
84
|
+
| **10. Write onboarding metadata** | Writes `.opencode/opencode-onboard.json` with selected setup details |
|
|
85
|
+
|
|
86
|
+
When it finishes, open OpenCode in your project and type:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
init
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
OpenCode generates `ARCHITECTURE.md` and `DESIGN.md` from your actual codebase, then activates the full agent team.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Commands
|
|
97
|
+
|
|
98
|
+
Custom slash commands are installed into `.opencode/commands/` and are available directly in OpenCode.
|
|
99
|
+
|
|
100
|
+
| Command | Description |
|
|
101
|
+
| -------------- | ----------------------------------------------------------------------------------------------------- |
|
|
102
|
+
| `/init` | Initialize the project: generate `ARCHITECTURE.md`, `DESIGN.md`, archive history, activate agent team |
|
|
103
|
+
| `/plan <url>` | Parse a user story URL and produce a plan, proposal, specs, and tasks. Stops before implementation. |
|
|
104
|
+
| `/main <task>` | Quick direct implementation, no OpenSpec, no ensemble, no PRs. Just do it. |
|
|
105
|
+
| `/create-engineer <name> "<description>"` | Create a custom engineer agent from a description, with skills auto-installed from [skills.sh](https://www.skills.sh/) |
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Agents and Skills
|
|
110
|
+
|
|
111
|
+
opencode-onboard draws a hard line between two concepts:
|
|
112
|
+
|
|
113
|
+
### Agents, universal behaviors
|
|
114
|
+
|
|
115
|
+
Agents define _how to work_. They are universal personas (same behavior across projects and stacks).
|
|
116
|
+
|
|
117
|
+
Current baseline uses a generic execution model:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
devops-manager lead/orchestrator, planning, PR lifecycle
|
|
121
|
+
basic-engineer implementation worker, ability-driven
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`basic-engineer` behavior is composed by abilities, not hardcoded role silos.
|
|
125
|
+
|
|
126
|
+
### Skills, platform knowledge
|
|
127
|
+
|
|
128
|
+
Skills define _what to know_. They provide project rules, platform behavior, and task-specific execution guidance. Agents auto-detect/load relevant skills; **you do not manually choose skills per prompt**.
|
|
129
|
+
|
|
130
|
+
Current loading model:
|
|
131
|
+
|
|
132
|
+
- `ob-global` is baseline and should be loaded first
|
|
133
|
+
- `ob-default` is fallback when nothing else matches
|
|
134
|
+
- `ob-generic-guardrails` is a minimal base users can extend with custom guardrail skills
|
|
135
|
+
|
|
136
|
+
Default `basic-engineer` abilities:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
## Abilities
|
|
140
|
+
- Guardrails: @ob-generic-guardrails, @ob-default
|
|
141
|
+
- Development: @ob-default
|
|
142
|
+
- Testing: @ob-default
|
|
143
|
+
- Infrastructure: @ob-default
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Users are expected to create additional skills and map them into abilities over time.
|
|
147
|
+
|
|
148
|
+
Built-in skills (`ob-` prefix) shipped with opencode-onboard:
|
|
149
|
+
|
|
150
|
+
| Skill | Purpose |
|
|
151
|
+
| ----------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
152
|
+
| `ob-global` | Baseline skill loaded first: context rules, source-roots scope, git/secrets guardrails, token-optimization rules |
|
|
153
|
+
| `ob-default` | Fallback, when no other skill matches. Still loads ob-global first |
|
|
154
|
+
| `ob-generic-guardrails` | Foundation for user guardrails skills |
|
|
155
|
+
| `ob-userstory-gh` | Parse a GitHub Issue URL into a structured work item |
|
|
156
|
+
| `ob-userstory-az` | Parse an Azure DevOps work item URL |
|
|
157
|
+
| `browser-automation` | Browser control via `@different-ai/opencode-browser` |
|
|
158
|
+
|
|
159
|
+
Skills live in `.agents/skills/`. Any `SKILL.md` file in a subdirectory is automatically discoverable, write your own and agents will pick them up.
|
|
160
|
+
|
|
161
|
+
### Models, plan / build / fast
|
|
162
|
+
|
|
163
|
+
During onboarding you pick three models:
|
|
164
|
+
|
|
165
|
+
| Role | Used by | Pick |
|
|
166
|
+
| --------- | --------------------- | --------------------------------------- |
|
|
167
|
+
| **plan** | Main OpenCode session | Something capable with strong reasoning |
|
|
168
|
+
| **build** | All builder agents | Something capable for implementation |
|
|
169
|
+
| **fast** | `devops-manager` | Something fast and cheap |
|
|
170
|
+
|
|
171
|
+
Models are fetched live from [models.dev](https://models.dev) (3000+ models, cached weekly). Cost tiers `[$]` `[$$]` `[$$$]` always reflect the canonical provider price, so `github-copilot/claude-opus-4.7` shows `[$$]` not `[$]`.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## The pipeline
|
|
176
|
+
|
|
177
|
+
When you give the lead agent a work item URL, execution follows this pipeline:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
devops-manager (load ob-global first)
|
|
181
|
+
↓
|
|
182
|
+
parse work item via userstory skill
|
|
183
|
+
↓
|
|
184
|
+
openspec-propose
|
|
185
|
+
proposal + specs + tasks
|
|
186
|
+
↓
|
|
187
|
+
[confirm with user]
|
|
188
|
+
↓
|
|
189
|
+
basic-engineer + custom-engineer-* (parallel)
|
|
190
|
+
claim tasks → load abilities → implement
|
|
191
|
+
↓
|
|
192
|
+
verify (tests/build/lint as needed)
|
|
193
|
+
↓
|
|
194
|
+
devops-manager (ship mode, if configured)
|
|
195
|
+
commit → push → PR → feedback loop
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
1. Load `ob-global` baseline rules
|
|
199
|
+
2. Load platform userstory skill (`ob-userstory-gh` or `ob-userstory-az`)
|
|
200
|
+
3. Run `/opsx-propose` to produce `proposal.md`, specs, and `tasks.md`
|
|
201
|
+
4. Confirm with user before implementation
|
|
202
|
+
5. Run `/opsx-apply` to orchestrate implementation workers
|
|
203
|
+
6. Spawn one or more engineers in parallel (`basic-engineer` and/or custom engineers)
|
|
204
|
+
7. Each engineer claims tasks, loads relevant abilities, and executes
|
|
205
|
+
8. Verify with tests/build/lint according to task scope
|
|
206
|
+
9. Ship/update PR via devops-manager flow
|
|
207
|
+
|
|
208
|
+
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`.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## What gets installed
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
your-project/
|
|
216
|
+
├── AGENTS.md ← bootstrap mode, replaced after first "init"
|
|
217
|
+
├── ARCHITECTURE.md ← prompt for agents to fill in from your codebase
|
|
218
|
+
├── DESIGN.md ← prompt for agents to fill in from your codebase
|
|
219
|
+
├── .opencode/
|
|
220
|
+
│ ├── opencode.json ← default model + plugin config
|
|
221
|
+
│ ├── ensemble.json ← model assignments for plan/build/fast roles
|
|
222
|
+
│ └── opencode-onboard.json ← onboarding metadata snapshot
|
|
223
|
+
└── .agents/
|
|
224
|
+
├── agents/
|
|
225
|
+
│ ├── devops-manager.md
|
|
226
|
+
│ └── basic-engineer.md
|
|
227
|
+
└── skills/
|
|
228
|
+
├── ob-global/ ← baseline skill, load FIRST
|
|
229
|
+
├── ob-default/ ← fallback skill
|
|
230
|
+
├── ob-generic-guardrails/ ← foundation for user guardrails
|
|
231
|
+
├── ob-userstory-gh/ ← or -az, depending on platform
|
|
232
|
+
├── ob-userstory-az/
|
|
233
|
+
└── browser-automation/
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
`ob-global` is the baseline skill template. During onboarding, source-roots and token-optimization sections are injected into that template.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## The bootstrap sequence
|
|
241
|
+
|
|
242
|
+
The first time you type `init` in OpenCode after onboarding:
|
|
243
|
+
|
|
244
|
+
1. Bootstrap-mode `AGENTS.md` triggers the initialization workflow
|
|
245
|
+
2. OpenCode archives existing project context into OpenSpec (`project-history`)
|
|
246
|
+
3. OpenCode generates real `DESIGN.md` and `ARCHITECTURE.md` from your codebase
|
|
247
|
+
4. Bootstrap `AGENTS.md` is replaced with production guidance
|
|
248
|
+
5. Team workflows become fully active for normal implementation tasks
|
|
249
|
+
|
|
250
|
+
After this, every agent has accurate, persistent context about your project, no manual documentation required.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Prerequisites
|
|
255
|
+
|
|
256
|
+
| Requirement | Notes |
|
|
257
|
+
| ---------------------------------------------------------------------------------------------------- | -------------------------------------- |
|
|
258
|
+
| **Node.js 18+** | Required |
|
|
259
|
+
| **[OpenCode](https://opencode.ai)** | The agent runtime |
|
|
260
|
+
| **[gh CLI](https://cli.github.com)** | GitHub platform, must be authenticated |
|
|
261
|
+
| **[az CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)** + azure-devops extension | Azure DevOps platform |
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Development
|
|
266
|
+
|
|
267
|
+
Wizard choices and defaults live in `src/presets/` where possible:
|
|
268
|
+
|
|
269
|
+
- `source.json` controls source-scope prompt options
|
|
270
|
+
- `platforms.json` controls platform labels and CLI checks
|
|
271
|
+
- `clean.json` controls AI file detection and preservation
|
|
272
|
+
- `models.json` controls model role prompts and agent assignments
|
|
273
|
+
- `optimization.json` controls RTK/quota/caveman checklist defaults
|
|
274
|
+
- `quota.json` controls opencode-quota defaults
|
|
275
|
+
- `browser.json` controls opencode-browser installer automation
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
git clone https://github.com/ckgrafico/opencode-onboard.git
|
|
279
|
+
cd opencode-onboard
|
|
280
|
+
pnpm install
|
|
281
|
+
|
|
282
|
+
# Run the CLI locally
|
|
283
|
+
node src/index.js
|
|
284
|
+
|
|
285
|
+
# Run tests
|
|
286
|
+
pnpm test
|
|
287
|
+
|
|
288
|
+
# Run linting
|
|
289
|
+
pnpm lint
|
|
290
|
+
|
|
291
|
+
# Fix auto-fixable lint issues
|
|
292
|
+
pnpm lint:fix
|
|
293
|
+
|
|
294
|
+
# Watch mode
|
|
295
|
+
pnpm test:watch
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Tests are written with [Vitest](https://vitest.dev). Linting uses ESLint flat config with Node ESM defaults and stricter correctness rules.
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## License
|
|
303
|
+
|
|
304
|
+
MIT © [ckgrafico](https://github.com/ckgrafico)
|
|
@@ -21,10 +21,12 @@ permission:
|
|
|
21
21
|
|
|
22
22
|
When spawned by the lead:
|
|
23
23
|
1. Call `team_tasks_list` and verify your assigned task IDs and status before starting.
|
|
24
|
-
2. For each assigned task
|
|
24
|
+
2. For each assigned task: before calling `team_claim task_id:<id>`, check `team_tasks_list` to confirm every dependency of that task has status `done`. If any dependency is not done, skip to the next assigned task that IS unblocked. Only claim tasks whose dependencies are fully complete.
|
|
25
25
|
3. Load `@ob-global` first, then load mandatory ability `Guardrails`.
|
|
26
26
|
4. Load additional abilities from the `## Abilities` section as needed for the claimed task domain (for example: development, testing, infrastructure). Each ability can include one or more skills; load all relevant skills listed under each selected ability.
|
|
27
27
|
5. Send a short `team_message` to lead confirming claimed task ID and loaded skills.
|
|
28
28
|
6. Implement the task following all loaded skill rules.
|
|
29
29
|
7. Call `team_tasks_complete task_id:<id>` after finishing that task.
|
|
30
|
-
8. Repeat until all assigned tasks are completed or blocked
|
|
30
|
+
8. Repeat until all currently assigned tasks are completed or blocked.
|
|
31
|
+
9. Message lead with results via `team_message`. Lead may assign more tasks, do NOT stop working or shut down until lead confirms no more tasks for you.
|
|
32
|
+
10. If lead sends new task IDs via `team_message`, treat them as new assignments and go back to step 2.
|