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.
Files changed (50) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +304 -301
  3. package/content/.agents/agents/basic-engineer.md +4 -2
  4. package/content/.agents/agents/devops-manager.md +123 -123
  5. package/content/.agents/skills/ob-default/SKILL.md +25 -21
  6. package/content/.agents/skills/ob-generic-guardrails/SKILL.md +36 -32
  7. package/content/.agents/skills/ob-global/SKILL.md +92 -49
  8. package/content/.agents/skills/ob-pullrequest-az/SKILL.md +168 -160
  9. package/content/.agents/skills/ob-pullrequest-gh/SKILL.md +140 -136
  10. package/content/.opencode/commands/create-engineer.md +109 -0
  11. package/content/.opencode/commands/init.md +1 -1
  12. package/content/.opencode/commands/main.md +1 -1
  13. package/content/.opencode/commands/opsx-apply.md +131 -70
  14. package/content/.opencode/commands/plan.md +1 -1
  15. package/content/.opencode/plugins/session-log.js +523 -519
  16. package/content/.opencode/skills/openspec-apply-change/SKILL.md +86 -64
  17. package/content/AGENTS.md +67 -39
  18. package/package.json +1 -1
  19. package/src/commands/join.js +3 -3
  20. package/src/commands/single.js +2 -0
  21. package/src/commands/wizard.js +124 -99
  22. package/src/presets/browser.json +22 -18
  23. package/src/presets/optimization.json +27 -22
  24. package/src/presets/source.json +7 -1
  25. package/src/steps/browser/browser.test.js +115 -81
  26. package/src/steps/browser/index.js +62 -54
  27. package/src/steps/clean/index.js +108 -107
  28. package/src/steps/copy/agents.js +28 -0
  29. package/src/steps/copy/copy.test.js +1 -0
  30. package/src/steps/copy/index.js +2 -1
  31. package/src/steps/metadata/index.js +63 -61
  32. package/src/steps/models/format.js +61 -60
  33. package/src/steps/models/write.test.js +117 -117
  34. package/src/steps/openspec/ensemble.js +30 -7
  35. package/src/steps/openspec/ensemble.test.js +79 -79
  36. package/src/steps/openspec/index.js +121 -32
  37. package/src/steps/openspec/index.test.js +63 -0
  38. package/src/steps/optimization/caveman.js +34 -29
  39. package/src/steps/optimization/codegraph.js +52 -0
  40. package/src/steps/optimization/global.js +88 -64
  41. package/src/steps/optimization/global.test.js +99 -0
  42. package/src/steps/optimization/index.js +109 -101
  43. package/src/steps/optimization/optimization.test.js +101 -93
  44. package/src/steps/optimization/quota.js +84 -84
  45. package/src/steps/source/index.js +48 -0
  46. package/src/steps/source/source.test.js +124 -91
  47. package/src/utils/__tests__/copy.test.js +117 -117
  48. package/src/utils/exec-spinner.js +47 -47
  49. package/src/utils/exec.js +134 -131
  50. 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
- [![npm version](https://img.shields.io/npm/v/opencode-onboard?style=flat-square&color=black)](https://www.npmjs.com/package/opencode-onboard)
12
- [![npm downloads](https://img.shields.io/npm/dm/opencode-onboard?style=flat-square&color=black)](https://www.npmjs.com/package/opencode-onboard)
13
- [![license](https://img.shields.io/npm/l/opencode-onboard?style=flat-square&color=black)](./LICENSE)
14
- [![node](https://img.shields.io/node/v/opencode-onboard?style=flat-square&color=black)](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
- # Show CLI help and all commands
52
- npx opencode-onboard --help
53
- npx opencode-onboard -h
54
- ```
55
-
56
- When available, step commands reuse context from `.opencode/opencode-onboard.json`.
57
-
58
- Typical flow for reruns:
59
- - Run `clean` if you want to reset old AI files
60
- - Run `copy` if templates/skills changed in a new onboard release
61
- - Run `optimization` if you want to reconfigure RTK/quota/caveman + `ob-global`
62
- - Run `metadata` last to refresh `.opencode/opencode-onboard.json`
63
-
64
- ---
65
-
66
- ## How it works
67
-
68
- 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.
69
-
70
- | Step | What happens |
71
- |------|-------------|
72
- | **1. Source scope** | Choose current repo or sibling source roots for code analysis |
73
- | **2. Clean AI files** | Detects existing `AGENTS.md`, `.cursorrules`, `CLAUDE.md`, `.agents/` etc. and removes them, preserves your `.agents/skills/` |
74
- | **3. Choose platform** | GitHub or Azure DevOps |
75
- | **4. Check platform CLI** | Verifies `gh` (GitHub) or `az` + `azure-devops` (Azure DevOps) |
76
- | **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` |
77
- | **6. Init OpenSpec** | Runs `npx @fission-ai/openspec init` silently for structured change management |
78
- | **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 |
79
- | **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 |
80
- | **9. Install browser plugin** | Installs `@different-ai/opencode-browser` globally for agent browser automation |
81
- | **10. Write onboarding metadata** | Writes `.opencode/opencode-onboard.json` with selected setup details |
82
-
83
- When it finishes, open OpenCode in your project and type:
84
-
85
- ```
86
- init
87
- ```
88
-
89
- OpenCode generates `ARCHITECTURE.md` and `DESIGN.md` from your actual codebase, then activates the full agent team.
90
-
91
- ---
92
-
93
- ## Commands
94
-
95
- Custom slash commands are installed into `.opencode/commands/` and are available directly in OpenCode.
96
-
97
- | Command | Description |
98
- |---------|-------------|
99
- | `/init` | Initialize the project: generate `ARCHITECTURE.md`, `DESIGN.md`, archive history, activate agent team |
100
- | `/plan <url>` | Parse a user story URL and produce a plan — proposal, specs, and tasks. Stops before implementation. |
101
- | `/main <task>` | Quick direct implementation — no OpenSpec, no ensemble, no PRs. Just do it. |
102
-
103
- ---
104
-
105
- ## Agents and Skills
106
-
107
- opencode-onboard draws a hard line between two concepts:
108
-
109
- ### Agents, universal behaviors
110
-
111
- Agents define *how to work*. They are universal personas (same behavior across projects and stacks).
112
-
113
- Current baseline uses a generic execution model:
114
-
115
- ```
116
- devops-manager lead/orchestrator, planning, PR lifecycle
117
- basic-engineer implementation worker, ability-driven
118
- ```
119
-
120
- `basic-engineer` behavior is composed by abilities, not hardcoded role silos.
121
-
122
- ### Skills, platform knowledge
123
-
124
- 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**.
125
-
126
- Current loading model:
127
- - `ob-global` is baseline and should be loaded first
128
- - `ob-default` is fallback when nothing else matches
129
- - `ob-generic-guardrails` is a minimal base users can extend with custom guardrail skills
130
-
131
- Default `basic-engineer` abilities:
132
-
133
- ```
134
- ## Abilities
135
- - Guardrails: @ob-generic-guardrails, @ob-default
136
- - Development: @ob-default
137
- - Testing: @ob-default
138
- - Infrastructure: @ob-default
139
- ```
140
-
141
- Users are expected to create additional skills and map them into abilities over time.
142
-
143
- Built-in skills (`ob-` prefix) shipped with opencode-onboard:
144
-
145
- | Skill | Purpose |
146
- |-------|---------|
147
- | `ob-global` | Baseline skill loaded first: context rules, source-roots scope, git/secrets guardrails, token-optimization rules |
148
- | `ob-default` | Fallback, when no other skill matches. Still loads ob-global first |
149
- | `ob-generic-guardrails` | Foundation for user guardrails skills |
150
- | `ob-userstory-gh` | Parse a GitHub Issue URL into a structured work item |
151
- | `ob-userstory-az` | Parse an Azure DevOps work item URL |
152
- | `browser-automation` | Browser control via `@different-ai/opencode-browser` |
153
-
154
- Skills live in `.agents/skills/`. Any `SKILL.md` file in a subdirectory is automatically discoverable, write your own and agents will pick them up.
155
-
156
- ### Models, plan / build / fast
157
-
158
- During onboarding you pick three models:
159
-
160
- | Role | Used by | Pick |
161
- |------|---------|------|
162
- | **plan** | Main OpenCode session | Something capable with strong reasoning |
163
- | **build** | All builder agents | Something capable for implementation |
164
- | **fast** | `devops-manager` | Something fast and cheap |
165
-
166
- 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 `[$]`.
167
-
168
- ---
169
-
170
- ## The pipeline
171
-
172
- When you give the lead agent a work item URL, execution follows this pipeline:
173
-
174
- ```
175
- devops-manager (load ob-global first)
176
-
177
- parse work item via userstory skill
178
-
179
- openspec-propose
180
- proposal + specs + tasks
181
-
182
- [confirm with user]
183
-
184
- basic-engineer + custom-engineer-* (parallel)
185
- claim tasks load abilities → implement
186
-
187
- verify (tests/build/lint as needed)
188
-
189
- devops-manager (ship mode, if configured)
190
- commit pushPRfeedback loop
191
- ```
192
-
193
- 1. Load `ob-global` baseline rules
194
- 2. Load platform userstory skill (`ob-userstory-gh` or `ob-userstory-az`)
195
- 3. Run `/opsx-propose` to produce `proposal.md`, specs, and `tasks.md`
196
- 4. Confirm with user before implementation
197
- 5. Run `/opsx-apply` to orchestrate implementation workers
198
- 6. Spawn one or more engineers in parallel (`basic-engineer` and/or custom engineers)
199
- 7. Each engineer claims tasks, loads relevant abilities, and executes
200
- 8. Verify with tests/build/lint according to task scope
201
- 9. Ship/update PR via devops-manager flow
202
-
203
- 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`.
204
-
205
- ---
206
-
207
- ## What gets installed
208
-
209
- ```
210
- your-project/
211
- ├── AGENTS.md ← bootstrap mode, replaced after first "init"
212
- ├── ARCHITECTURE.md ← prompt for agents to fill in from your codebase
213
- ├── DESIGN.md ← prompt for agents to fill in from your codebase
214
- ├── .opencode/
215
- │ ├── opencode.json ← default model + plugin config
216
- ├── ensemble.json model assignments for plan/build/fast roles
217
- │ └── opencode-onboard.json onboarding metadata snapshot
218
- └── .agents/
219
- ├── agents/
220
- │ ├── devops-manager.md
221
- └── basic-engineer.md
222
- └── skills/
223
- ├── ob-global/ ← baseline skill, load FIRST
224
- ├── ob-default/ ← fallback skill
225
- ├── ob-generic-guardrails/ ← foundation for user guardrails
226
- ├── ob-userstory-gh/ ← or -az, depending on platform
227
- ├── ob-userstory-az/
228
- └── browser-automation/
229
- ```
230
-
231
- `ob-global` is the baseline skill template. During onboarding, source-roots and token-optimization sections are injected into that template.
232
-
233
- ---
234
-
235
- ## The bootstrap sequence
236
-
237
- The first time you type `init` in OpenCode after onboarding:
238
-
239
- 1. Bootstrap-mode `AGENTS.md` triggers the initialization workflow
240
- 2. OpenCode archives existing project context into OpenSpec (`project-history`)
241
- 3. OpenCode generates real `DESIGN.md` and `ARCHITECTURE.md` from your codebase
242
- 4. Bootstrap `AGENTS.md` is replaced with production guidance
243
- 5. Team workflows become fully active for normal implementation tasks
244
-
245
- After this, every agent has accurate, persistent context about your project, no manual documentation required.
246
-
247
- ---
248
-
249
- ## Prerequisites
250
-
251
- | Requirement | Notes |
252
- |-------------|-------|
253
- | **Node.js 18+** | Required |
254
- | **[OpenCode](https://opencode.ai)** | The agent runtime |
255
- | **[OpenCode Ensemble](https://github.com/hueyexe/opencode-ensemble)** | Multi-agent parallel execution |
256
- | **[rtk](https://github.com/rtk-ai/rtk#pre-built-binaries)** | Recommended for safer agent CLI command execution |
257
- | **[gh CLI](https://cli.github.com)** | GitHub platform, must be authenticated |
258
- | **[az CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)** + azure-devops extension | Azure DevOps platform |
259
-
260
- ---
261
-
262
- ## Development
263
-
264
- Wizard choices and defaults live in `src/presets/` where possible:
265
-
266
- - `source.json` controls source-scope prompt options
267
- - `platforms.json` controls platform labels and CLI checks
268
- - `clean.json` controls AI file detection and preservation
269
- - `models.json` controls model role prompts and agent assignments
270
- - `optimization.json` controls RTK/quota/caveman checklist defaults
271
- - `quota.json` controls opencode-quota defaults
272
- - `browser.json` controls opencode-browser installer automation
273
-
274
- ```bash
275
- git clone https://github.com/ckgrafico/opencode-onboard.git
276
- cd opencode-onboard
277
- pnpm install
278
-
279
- # Run the CLI locally
280
- node src/index.js
281
-
282
- # Run tests
283
- pnpm test
284
-
285
- # Run linting
286
- pnpm lint
287
-
288
- # Fix auto-fixable lint issues
289
- pnpm lint:fix
290
-
291
- # Watch mode
292
- pnpm test:watch
293
- ```
294
-
295
- Tests are written with [Vitest](https://vitest.dev). Linting uses ESLint flat config with Node ESM defaults and stricter correctness rules.
296
-
297
- ---
298
-
299
- ## License
300
-
301
- MIT © [ckgrafico](https://github.com/ckgrafico)
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
+ [![npm version](https://img.shields.io/npm/v/opencode-onboard?style=flat-square&color=black)](https://www.npmjs.com/package/opencode-onboard)
12
+ [![npm downloads](https://img.shields.io/npm/dm/opencode-onboard?style=flat-square&color=black)](https://www.npmjs.com/package/opencode-onboard)
13
+ [![license](https://img.shields.io/npm/l/opencode-onboard?style=flat-square&color=black)](./LICENSE)
14
+ [![node](https://img.shields.io/node/v/opencode-onboard?style=flat-square&color=black)](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 tasksload 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, call `team_claim task_id:<id>` before any implementation work.
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, then send final results to lead via `team_message`.
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.