opencode-onboard 0.3.3 → 0.4.1
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 +266 -214
- package/content/.agents/agents/basic-engineer.md +30 -0
- package/content/.agents/agents/devops-manager.md +38 -29
- package/content/.agents/session-log.json +41 -0
- package/content/.agents/skills/ob-default/SKILL.md +21 -0
- package/content/.agents/skills/ob-generic-guardrails/SKILL.md +32 -0
- package/content/.agents/skills/ob-global/SKILL.md +49 -0
- package/content/.agents/skills/ob-pullrequest-az/SKILL.md +11 -21
- package/content/.agents/skills/ob-pullrequest-gh/SKILL.md +14 -24
- package/content/.agents/skills/ob-userstory-az/SKILL.md +8 -14
- package/content/.agents/skills/ob-userstory-gh/SKILL.md +6 -14
- package/content/.opencode/commands/opsx-apply.md +50 -33
- package/content/.opencode/plugins/session-log.js +1 -1
- package/content/.opencode/skills/openspec-apply-change/SKILL.md +50 -33
- package/content/AGENTS.md +94 -144
- package/content/skills-lock.json +4 -0
- package/package.json +6 -1
- package/src/index.js +13 -47
- package/src/presets/browser.json +18 -0
- package/src/presets/clean.json +21 -0
- package/src/presets/models.json +33 -0
- package/src/presets/optimization.json +22 -0
- package/src/presets/platforms.json +29 -2
- package/src/presets/quota.json +14 -0
- package/src/presets/source.json +17 -0
- package/src/steps/browser/browser.test.js +81 -0
- package/src/steps/{install-browser.js → browser/index.js} +12 -15
- package/src/steps/{__tests__/clean-ai-files.test.js → clean/clean.test.js} +28 -13
- package/src/steps/{clean-ai-files.js → clean/index.js} +32 -30
- package/src/steps/copy/agents.js +106 -0
- package/src/steps/{__tests__/copy-content.test.js → copy/copy.test.js} +10 -1
- package/src/steps/copy/index.js +33 -0
- package/src/steps/copy/skills.js +55 -0
- package/src/steps/{write-onboard-config.js → metadata/index.js} +3 -3
- package/src/steps/metadata/metadata.test.js +96 -0
- package/src/steps/models/format.js +60 -0
- package/src/steps/models/format.test.js +74 -0
- package/src/steps/models/index.js +52 -0
- package/src/steps/models/write.js +54 -0
- package/src/steps/models/write.test.js +119 -0
- package/src/steps/{init-openspec.js → openspec/ensemble.js} +20 -57
- package/src/steps/openspec/ensemble.test.js +79 -0
- package/src/steps/openspec/index.js +32 -0
- package/src/steps/optimization/caveman-guidance.js +11 -0
- package/src/steps/{install-caveman.js → optimization/caveman.js} +5 -19
- package/src/steps/optimization/global.js +64 -0
- package/src/steps/optimization/index.js +101 -0
- package/src/steps/{__tests__/token-optimization.test.js → optimization/optimization.test.js} +19 -24
- package/src/steps/{install-quota.js → optimization/quota.js} +12 -10
- package/src/steps/platform/index.js +81 -0
- package/src/steps/platform/platform.test.js +129 -0
- package/src/steps/{choose-source-scope.js → source/index.js} +11 -17
- package/src/steps/source/source.test.js +89 -0
- package/src/utils/__tests__/copy.test.js +12 -5
- package/src/utils/copy.js +4 -24
- package/src/utils/exec-spinner.js +47 -0
- package/src/utils/exec.js +120 -162
- package/src/utils/models-cache.js +25 -68
- package/src/utils/models-pricing.js +42 -0
- package/src/utils/models-pricing.test.js +94 -0
- package/content/.agents/agents/back-engineer.md +0 -87
- package/content/.agents/agents/front-engineer.md +0 -86
- package/content/.agents/agents/infra-engineer.md +0 -85
- package/content/.agents/agents/quality-engineer.md +0 -86
- package/content/.agents/agents/security-auditor.md +0 -86
- package/src/steps/__tests__/check-env.test.js +0 -70
- package/src/steps/__tests__/check-platform.test.js +0 -104
- package/src/steps/__tests__/check-rtk.test.js +0 -38
- package/src/steps/__tests__/choose-platform.test.js +0 -38
- package/src/steps/check-env.js +0 -26
- package/src/steps/check-platform.js +0 -80
- package/src/steps/check-rtk.js +0 -38
- package/src/steps/choose-models.js +0 -165
- package/src/steps/choose-platform.js +0 -22
- package/src/steps/choose-skills-provider.js +0 -79
- package/src/steps/copy-content.js +0 -89
- package/src/steps/enable-caveman-guidance.js +0 -78
- package/src/steps/patch-agents-md.js +0 -153
- package/src/steps/token-optimization.js +0 -59
package/README.md
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
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
|
-
|
|
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
34
|
Requires **Node.js 18+**.
|
|
35
35
|
|
|
36
36
|
### Run specific steps
|
|
37
37
|
|
|
38
|
-
You can
|
|
38
|
+
You can run individual setup/maintenance steps without running the full wizard:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
# Run one step directly
|
|
@@ -43,7 +43,6 @@ npx opencode-onboard clean
|
|
|
43
43
|
npx opencode-onboard platform
|
|
44
44
|
npx opencode-onboard copy
|
|
45
45
|
npx opencode-onboard openspec
|
|
46
|
-
npx opencode-onboard skills
|
|
47
46
|
npx opencode-onboard models
|
|
48
47
|
npx opencode-onboard optimization
|
|
49
48
|
npx opencode-onboard browser
|
|
@@ -55,183 +54,236 @@ npx opencode-onboard -h
|
|
|
55
54
|
```
|
|
56
55
|
|
|
57
56
|
When available, step commands reuse context from `.opencode/opencode-onboard.json`.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
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
|
+
## Agents and Skills
|
|
94
|
+
|
|
95
|
+
opencode-onboard draws a hard line between two concepts:
|
|
96
|
+
|
|
97
|
+
### Agents, universal behaviors
|
|
98
|
+
|
|
99
|
+
Agents define *how to work*. They are universal personas (same behavior across projects and stacks).
|
|
100
|
+
|
|
101
|
+
Current baseline uses a generic execution model:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
devops-manager lead/orchestrator, planning, PR lifecycle
|
|
105
|
+
basic-engineer implementation worker, ability-driven
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`basic-engineer` behavior is composed by abilities, not hardcoded role silos.
|
|
109
|
+
|
|
110
|
+
### Skills, platform knowledge
|
|
111
|
+
|
|
112
|
+
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**.
|
|
113
|
+
|
|
114
|
+
Current loading model:
|
|
115
|
+
- `ob-global` is baseline and should be loaded first
|
|
116
|
+
- `ob-default` is fallback when nothing else matches
|
|
117
|
+
- `ob-generic-guardrails` is a minimal base users can extend with custom guardrail skills
|
|
118
|
+
|
|
119
|
+
Default `basic-engineer` abilities:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
## Abilities
|
|
123
|
+
- Guardrails: @ob-generic-guardrails, @ob-default
|
|
124
|
+
- Development: @ob-default
|
|
125
|
+
- Testing: @ob-default
|
|
126
|
+
- Infrastructure: @ob-default
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Users are expected to create additional skills and map them into abilities over time.
|
|
130
|
+
|
|
131
|
+
Built-in skills (`ob-` prefix) shipped with opencode-onboard:
|
|
132
|
+
|
|
133
|
+
| Skill | Purpose |
|
|
134
|
+
|-------|---------|
|
|
135
|
+
| `ob-global` | Baseline skill loaded first: context rules, source-roots scope, git/secrets guardrails, token-optimization rules |
|
|
136
|
+
| `ob-default` | Fallback, when no other skill matches. Still loads ob-global first |
|
|
137
|
+
| `ob-generic-guardrails` | Foundation for user guardrails skills |
|
|
138
|
+
| `ob-userstory-gh` | Parse a GitHub Issue URL into a structured work item |
|
|
139
|
+
| `ob-userstory-az` | Parse an Azure DevOps work item URL |
|
|
140
|
+
| `browser-automation` | Browser control via `@different-ai/opencode-browser` |
|
|
141
|
+
|
|
142
|
+
Skills live in `.agents/skills/`. Any `SKILL.md` file in a subdirectory is automatically discoverable, write your own and agents will pick them up.
|
|
143
|
+
|
|
144
|
+
### Models, plan / build / fast
|
|
145
|
+
|
|
146
|
+
During onboarding you pick three models:
|
|
147
|
+
|
|
148
|
+
| Role | Used by | Pick |
|
|
149
|
+
|------|---------|------|
|
|
150
|
+
| **plan** | Main OpenCode session | Something capable with strong reasoning |
|
|
151
|
+
| **build** | All builder agents | Something capable for implementation |
|
|
152
|
+
| **fast** | `devops-manager` | Something fast and cheap |
|
|
153
|
+
|
|
154
|
+
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 `[$]`.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## The pipeline
|
|
159
|
+
|
|
160
|
+
When you give the lead agent a work item URL, execution follows this pipeline:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
devops-manager (load ob-global first)
|
|
164
|
+
↓
|
|
165
|
+
parse work item via userstory skill
|
|
166
|
+
↓
|
|
167
|
+
openspec-propose
|
|
168
|
+
proposal + specs + tasks
|
|
169
|
+
↓
|
|
170
|
+
[confirm with user]
|
|
171
|
+
↓
|
|
172
|
+
basic-engineer + custom-engineer-* (parallel)
|
|
173
|
+
claim tasks → load abilities → implement
|
|
174
|
+
↓
|
|
175
|
+
verify (tests/build/lint as needed)
|
|
176
|
+
↓
|
|
177
|
+
devops-manager (ship mode, if configured)
|
|
178
|
+
commit → push → PR → feedback loop
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
1. Load `ob-global` baseline rules
|
|
182
|
+
2. Load platform userstory skill (`ob-userstory-gh` or `ob-userstory-az`)
|
|
183
|
+
3. Run `/opsx-propose` to produce `proposal.md`, specs, and `tasks.md`
|
|
184
|
+
4. Confirm with user before implementation
|
|
185
|
+
5. Run `/opsx-apply` to orchestrate implementation workers
|
|
186
|
+
6. Spawn one or more engineers in parallel (`basic-engineer` and/or custom engineers)
|
|
187
|
+
7. Each engineer claims tasks, loads relevant abilities, and executes
|
|
188
|
+
8. Verify with tests/build/lint according to task scope
|
|
189
|
+
9. Ship/update PR via devops-manager flow
|
|
190
|
+
|
|
191
|
+
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`.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## What gets installed
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
your-project/
|
|
199
|
+
├── AGENTS.md ← bootstrap mode, replaced after first "init"
|
|
200
|
+
├── ARCHITECTURE.md ← prompt for agents to fill in from your codebase
|
|
201
|
+
├── DESIGN.md ← prompt for agents to fill in from your codebase
|
|
202
|
+
├── .opencode/
|
|
203
|
+
│ ├── opencode.json ← default model + plugin config
|
|
204
|
+
│ ├── ensemble.json ← model assignments for plan/build/fast roles
|
|
205
|
+
│ └── opencode-onboard.json ← onboarding metadata snapshot
|
|
206
|
+
└── .agents/
|
|
207
|
+
├── agents/
|
|
208
|
+
│ ├── devops-manager.md
|
|
209
|
+
│ └── basic-engineer.md
|
|
210
|
+
└── skills/
|
|
211
|
+
├── ob-global/ ← baseline skill, load FIRST
|
|
212
|
+
├── ob-default/ ← fallback skill
|
|
213
|
+
├── ob-generic-guardrails/ ← foundation for user guardrails
|
|
214
|
+
├── ob-userstory-gh/ ← or -az, depending on platform
|
|
215
|
+
├── ob-userstory-az/
|
|
216
|
+
└── browser-automation/
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
`ob-global` is the baseline skill template. During onboarding, source-roots and token-optimization sections are injected into that template.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## The bootstrap sequence
|
|
224
|
+
|
|
225
|
+
The first time you type `init` in OpenCode after onboarding:
|
|
226
|
+
|
|
227
|
+
1. Bootstrap-mode `AGENTS.md` triggers the initialization workflow
|
|
228
|
+
2. OpenCode archives existing project context into OpenSpec (`project-history`)
|
|
229
|
+
3. OpenCode generates real `DESIGN.md` and `ARCHITECTURE.md` from your codebase
|
|
230
|
+
4. Bootstrap `AGENTS.md` is replaced with production guidance
|
|
231
|
+
5. Team workflows become fully active for normal implementation tasks
|
|
232
|
+
|
|
233
|
+
After this, every agent has accurate, persistent context about your project, no manual documentation required.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Prerequisites
|
|
238
|
+
|
|
239
|
+
| Requirement | Notes |
|
|
240
|
+
|-------------|-------|
|
|
241
|
+
| **Node.js 18+** | Required |
|
|
242
|
+
| **[OpenCode](https://opencode.ai)** | The agent runtime |
|
|
243
|
+
| **[OpenCode Ensemble](https://github.com/hueyexe/opencode-ensemble)** | Multi-agent parallel execution |
|
|
208
244
|
| **[rtk](https://github.com/rtk-ai/rtk#pre-built-binaries)** | Recommended for safer agent CLI command execution |
|
|
209
|
-
| **[gh CLI](https://cli.github.com)** | GitHub platform, must be authenticated |
|
|
210
|
-
| **[az CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)** + azure-devops extension | Azure DevOps platform |
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## Development
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
245
|
+
| **[gh CLI](https://cli.github.com)** | GitHub platform, must be authenticated |
|
|
246
|
+
| **[az CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)** + azure-devops extension | Azure DevOps platform |
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Development
|
|
251
|
+
|
|
252
|
+
Wizard choices and defaults live in `src/presets/` where possible:
|
|
253
|
+
|
|
254
|
+
- `source.json` controls source-scope prompt options
|
|
255
|
+
- `platforms.json` controls platform labels and CLI checks
|
|
256
|
+
- `clean.json` controls AI file detection and preservation
|
|
257
|
+
- `models.json` controls model role prompts and agent assignments
|
|
258
|
+
- `optimization.json` controls RTK/quota/caveman checklist defaults
|
|
259
|
+
- `quota.json` controls opencode-quota defaults
|
|
260
|
+
- `browser.json` controls opencode-browser installer automation
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
git clone https://github.com/ckgrafico/opencode-onboard.git
|
|
264
|
+
cd opencode-onboard
|
|
265
|
+
pnpm install
|
|
266
|
+
|
|
267
|
+
# Run the CLI locally
|
|
268
|
+
node src/index.js
|
|
269
|
+
|
|
270
|
+
# Run tests
|
|
271
|
+
pnpm test
|
|
272
|
+
|
|
273
|
+
# Run linting
|
|
274
|
+
pnpm lint
|
|
275
|
+
|
|
276
|
+
# Fix auto-fixable lint issues
|
|
277
|
+
pnpm lint:fix
|
|
278
|
+
|
|
279
|
+
# Watch mode
|
|
280
|
+
pnpm test:watch
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Tests are written with [Vitest](https://vitest.dev). Linting uses ESLint flat config with Node ESM defaults and stricter correctness rules.
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## License
|
|
288
|
+
|
|
289
|
+
MIT © [ckgrafico](https://github.com/ckgrafico)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Basic Engineer Agent.
|
|
3
|
+
mode: subagent
|
|
4
|
+
color: #68A063
|
|
5
|
+
temperature: 0.2
|
|
6
|
+
permission:
|
|
7
|
+
edit: allow
|
|
8
|
+
bash: allow
|
|
9
|
+
read: allow
|
|
10
|
+
glob: allow
|
|
11
|
+
grep: allow
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Abilities
|
|
15
|
+
- Guardrails: @ob-generic-guardrails, @ob-default
|
|
16
|
+
- Development: @ob-default
|
|
17
|
+
- Testing: @ob-default
|
|
18
|
+
- Infrastructure: @ob-default
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
When spawned by the lead:
|
|
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.
|
|
25
|
+
3. Load `@ob-global` first, then load mandatory ability `Guardrails`.
|
|
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
|
+
5. Send a short `team_message` to lead confirming claimed task ID and loaded skills.
|
|
28
|
+
6. Implement the task following all loaded skill rules.
|
|
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`.
|
|
@@ -19,30 +19,28 @@ Process agent, reads work items, creates PRs, handles review feedback. Bookends
|
|
|
19
19
|
|
|
20
20
|
Work item and issue reading, PR creation, PR comment reading and classification, PR updates, screenshot capture of local running app, branch verification. Does not write application code. Platform knowledge (GitHub, Azure DevOps, etc.) comes entirely from loaded skills.
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Skills and Platform Resolution
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Skills are located in `.agents/skills/`. Load required skills explicitly from context and onboarding metadata.
|
|
25
25
|
|
|
26
|
-
-
|
|
27
|
-
- `rtk az repos pr create` NOT `az repos pr create`
|
|
28
|
-
- `rtk git push` NOT `git push`
|
|
26
|
+
Always load `@ob-global` FIRST before any other skill.
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Skills are located in `.agents/skills/`. Detect and use relevant skills automatically, the user will never tell you which skill to use.
|
|
28
|
+
Platform skill selection must follow onboarding platform choice from CLI step:
|
|
29
|
+
<!-- OB-PLATFORM-SKILLS-START -->
|
|
30
|
+
- Platform-specific skill instructions are injected during onboarding copy step.
|
|
31
|
+
<!-- OB-PLATFORM-SKILLS-END -->
|
|
35
32
|
|
|
36
33
|
1. If the spawn prompt lists specific skills to load, read those `SKILL.md` files FIRST before any implementation
|
|
37
34
|
2. Additionally, identify the platform from URLs or context
|
|
38
35
|
|
|
39
36
|
Examples of intent → skill mapping:
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
- "
|
|
43
|
-
-
|
|
37
|
+
- "read issue/work item" → load platform userstory skill
|
|
38
|
+
- "create PR" or "ship" → load platform pullrequest skill
|
|
39
|
+
- "PR has comments" or "review feedback" → load platform pullrequest observer skill
|
|
40
|
+
- URL-based platform inference is fallback-only when onboarding metadata is unavailable
|
|
44
41
|
|
|
45
42
|
Rules:
|
|
43
|
+
- Platform selected in onboarding metadata takes precedence over URL inference when both exist
|
|
46
44
|
- Never interact with a platform without loading the matching skill first
|
|
47
45
|
- Follow skill instructions exactly, do not partially apply them
|
|
48
46
|
- If no skill exists for the platform, report it as a blocker rather than improvising
|
|
@@ -51,25 +49,36 @@ Rules:
|
|
|
51
49
|
## Two Modes
|
|
52
50
|
|
|
53
51
|
### Read Mode (pipeline start)
|
|
54
|
-
1.
|
|
55
|
-
2.
|
|
56
|
-
3.
|
|
57
|
-
4.
|
|
52
|
+
1. Load `@ob-global` first
|
|
53
|
+
2. Resolve platform from `.opencode/opencode-onboard.json` (`wizard.platform`) when available; fallback to URL inference only if missing/ambiguous
|
|
54
|
+
3. Load the matching userstory skill for that resolved platform
|
|
55
|
+
4. Fetch and parse the work item
|
|
56
|
+
5. Output structured summary for the lead
|
|
58
57
|
|
|
59
58
|
### Ship Mode (pipeline end)
|
|
60
|
-
1.
|
|
61
|
-
2.
|
|
62
|
-
3.
|
|
63
|
-
4.
|
|
64
|
-
5.
|
|
65
|
-
6.
|
|
66
|
-
7.
|
|
67
|
-
8.
|
|
59
|
+
1. Load `@ob-global` first
|
|
60
|
+
2. Verify all changes are on a feature branch, never `main`
|
|
61
|
+
3. Resolve platform from `.opencode/opencode-onboard.json` (`wizard.platform`) when available; fallback to URL inference only if missing/ambiguous
|
|
62
|
+
4. Load the matching pullrequest skill for that resolved platform
|
|
63
|
+
5. Capture screenshots of local running app if UI changes exist
|
|
64
|
+
6. Read `.agents/session-log.json` if it exists, parse the JSON array and include a "Session Activity" section in the PR description with agent names, task counts, and skills used
|
|
65
|
+
7. Commit and push the feature branch. If `## Source Roots` lists multiple roots, each root is a separate git repository, create and push the feature branch in EACH repo that has changes; never assume a single repo
|
|
66
|
+
8. Create the PR following the skill instructions (one PR per repo that has changes)
|
|
67
|
+
9. Post PR comment with screenshots and change summary
|
|
68
|
+
10. Report PR URL to the lead
|
|
68
69
|
|
|
69
70
|
### Feedback Mode (PR review loop)
|
|
70
|
-
1. Load
|
|
71
|
-
2.
|
|
72
|
-
3.
|
|
71
|
+
1. Load `@ob-global` first
|
|
72
|
+
2. Resolve platform from `.opencode/opencode-onboard.json` (`wizard.platform`) when available; fallback to URL inference only if missing/ambiguous
|
|
73
|
+
3. Load the matching pullrequest observer skill for that resolved platform
|
|
74
|
+
4. Read and classify all PR comments
|
|
75
|
+
5. Report classified feedback to the lead, do not implement fixes
|
|
76
|
+
|
|
77
|
+
## Worker Model Coordination
|
|
78
|
+
|
|
79
|
+
- Implementation is performed by `basic-engineer` and/or user-defined custom engineers.
|
|
80
|
+
- Multiple engineer workers can run in parallel when task dependencies allow.
|
|
81
|
+
- DevOps Manager orchestrates process, routing, and shipping; it does not implement application code.
|
|
73
82
|
|
|
74
83
|
## Constraints
|
|
75
84
|
|