opencode-onboard 0.3.3 → 0.4.2

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 (87) hide show
  1. package/README.md +278 -214
  2. package/content/.agents/agents/basic-engineer.md +30 -0
  3. package/content/.agents/agents/devops-manager.md +38 -29
  4. package/content/.agents/session-log.json +41 -0
  5. package/content/.agents/skills/ob-default/SKILL.md +21 -0
  6. package/content/.agents/skills/ob-generic-guardrails/SKILL.md +32 -0
  7. package/content/.agents/skills/ob-global/SKILL.md +49 -0
  8. package/content/.agents/skills/ob-pullrequest-az/SKILL.md +11 -21
  9. package/content/.agents/skills/ob-pullrequest-gh/SKILL.md +14 -24
  10. package/content/.agents/skills/ob-userstory-az/SKILL.md +8 -14
  11. package/content/.agents/skills/ob-userstory-gh/SKILL.md +6 -14
  12. package/content/.opencode/commands/init.md +8 -0
  13. package/content/.opencode/commands/main.md +17 -0
  14. package/content/.opencode/commands/opsx-apply.md +50 -33
  15. package/content/.opencode/commands/plan.md +37 -0
  16. package/content/.opencode/plugins/session-log.js +1 -1
  17. package/content/.opencode/skills/openspec-apply-change/SKILL.md +50 -33
  18. package/content/AGENTS.md +94 -144
  19. package/content/skills-lock.json +4 -0
  20. package/package.json +6 -1
  21. package/src/commands/join.js +43 -0
  22. package/src/commands/shared.js +12 -0
  23. package/src/commands/shared.test.js +56 -0
  24. package/src/commands/single.js +64 -0
  25. package/src/commands/wizard.js +99 -0
  26. package/src/index.js +25 -202
  27. package/src/presets/browser.json +18 -0
  28. package/src/presets/clean.json +21 -0
  29. package/src/presets/models.json +33 -0
  30. package/src/presets/optimization.json +22 -0
  31. package/src/presets/platforms.json +29 -2
  32. package/src/presets/quota.json +14 -0
  33. package/src/presets/source.json +17 -0
  34. package/src/steps/browser/browser.test.js +81 -0
  35. package/src/steps/{install-browser.js → browser/index.js} +12 -15
  36. package/src/steps/{__tests__/clean-ai-files.test.js → clean/clean.test.js} +28 -13
  37. package/src/steps/{clean-ai-files.js → clean/index.js} +32 -30
  38. package/src/steps/copy/agents.js +106 -0
  39. package/src/steps/{__tests__/copy-content.test.js → copy/copy.test.js} +10 -1
  40. package/src/steps/copy/index.js +33 -0
  41. package/src/steps/copy/skills.js +55 -0
  42. package/src/steps/{write-onboard-config.js → metadata/index.js} +3 -3
  43. package/src/steps/metadata/metadata.test.js +99 -0
  44. package/src/steps/models/format.js +60 -0
  45. package/src/steps/models/format.test.js +75 -0
  46. package/src/steps/models/index.js +52 -0
  47. package/src/steps/models/write.js +54 -0
  48. package/src/steps/models/write.test.js +117 -0
  49. package/src/steps/{init-openspec.js → openspec/ensemble.js} +20 -57
  50. package/src/steps/openspec/ensemble.test.js +79 -0
  51. package/src/steps/openspec/index.js +32 -0
  52. package/src/steps/optimization/caveman-guidance.js +11 -0
  53. package/src/steps/{install-caveman.js → optimization/caveman.js} +5 -19
  54. package/src/steps/optimization/global.js +64 -0
  55. package/src/steps/optimization/index.js +101 -0
  56. package/src/steps/{__tests__/token-optimization.test.js → optimization/optimization.test.js} +37 -22
  57. package/src/steps/{install-quota.js → optimization/quota.js} +12 -10
  58. package/src/steps/platform/index.js +81 -0
  59. package/src/steps/platform/platform.test.js +129 -0
  60. package/src/steps/{choose-source-scope.js → source/index.js} +11 -17
  61. package/src/steps/source/source.test.js +91 -0
  62. package/src/utils/__tests__/copy.test.js +12 -5
  63. package/src/utils/copy.js +4 -24
  64. package/src/utils/exec-spinner.js +47 -0
  65. package/src/utils/exec.js +120 -162
  66. package/src/utils/models-cache.js +25 -68
  67. package/src/utils/models-pricing.js +42 -0
  68. package/src/utils/models-pricing.test.js +93 -0
  69. package/content/.agents/agents/back-engineer.md +0 -87
  70. package/content/.agents/agents/front-engineer.md +0 -86
  71. package/content/.agents/agents/infra-engineer.md +0 -85
  72. package/content/.agents/agents/quality-engineer.md +0 -86
  73. package/content/.agents/agents/security-auditor.md +0 -86
  74. package/src/steps/__tests__/check-env.test.js +0 -70
  75. package/src/steps/__tests__/check-platform.test.js +0 -104
  76. package/src/steps/__tests__/check-rtk.test.js +0 -38
  77. package/src/steps/__tests__/choose-platform.test.js +0 -38
  78. package/src/steps/check-env.js +0 -26
  79. package/src/steps/check-platform.js +0 -80
  80. package/src/steps/check-rtk.js +0 -38
  81. package/src/steps/choose-models.js +0 -165
  82. package/src/steps/choose-platform.js +0 -22
  83. package/src/steps/choose-skills-provider.js +0 -79
  84. package/src/steps/copy-content.js +0 -89
  85. package/src/steps/enable-caveman-guidance.js +0 -78
  86. package/src/steps/patch-agents-md.js +0 -153
  87. 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
- [![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
-
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
34
  Requires **Node.js 18+**.
35
35
 
36
36
  ### Run specific steps
37
37
 
38
- You can also run individual maintenance/setup steps without the full wizard:
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,248 @@ 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
- ## How it works
62
-
63
- The CLI clears the screen, shows a welcome banner, and walks you through 12 steps. The screen always shows the last 2 completed steps + the current one so you always know where you are.
64
-
65
- | Step | What happens |
66
- |------|-------------|
67
- | **1. Environment check** | Verifies Node.js ≥ 18 and pnpm are available |
68
- | **2. Clean AI files** | Detects existing `AGENTS.md`, `.cursorrules`, `CLAUDE.md`, `.agents/` etc. and removes them, preserves your `.agents/skills/` |
69
- | **3. Choose platform** | GitHub or Azure DevOps |
70
- | **4. Check platform CLI** | Verifies `gh` (GitHub) or `az` + `azure-devops` (Azure DevOps) |
71
- | **5. Copy scaffolding** | Drops agents, skills, and bootstrap docs into your project |
72
- | **6. Init OpenSpec** | Runs `npx @fission-ai/openspec init` silently for structured change management |
73
- | **7. Install skills** | Installs built-in `ob-` skills + optional additional skills provider |
74
- | **8. 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 |
75
- | **9. Token optimization tools** | Optional (recommended). One checklist step for RTK check, opencode-quota setup, and caveman install (all preselected) |
76
- | **10. Install browser plugin** | Installs `@different-ai/opencode-browser` globally for agent browser automation |
77
- | **11. Write onboarding metadata** | Writes `.opencode/opencode-onboard.json` with selected setup details |
78
-
79
- When it finishes, open OpenCode in your project and type:
80
-
81
- ```
82
- init
83
- ```
84
-
85
- OpenCode generates `ARCHITECTURE.md` and `DESIGN.md` from your actual codebase, then activates the full agent team.
86
-
87
- ---
88
-
89
- ## Agents and Skills
90
-
91
- opencode-onboard draws a hard line between two concepts:
92
-
93
- ### Agents, universal behaviors
94
-
95
- 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.
96
-
97
- ```
98
- devops-manager reads work items, creates PRs, handles review feedback
99
- front-engineer web, mobile, UI, anything visual
100
- back-engineer APIs, services, data, AI, anything not UI
101
- infra-engineer Terraform, pipelines, cloud infrastructure
102
- quality-engineer unit, integration, e2e tests across all layers
103
- security-auditor vulnerability audit, secrets, auth gaps
104
- ```
105
-
106
- Each agent has a color in the OpenCode UI. Builder agents (`front-engineer`, `back-engineer`, `infra-engineer`) run at `temperature: 0.2` for deterministic output. `security-auditor` is read-only, edit is denied.
107
-
108
- ### Skills, platform knowledge
109
-
110
- Skills define *what to know*. They 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**.
111
-
112
- Built-in skills (`ob-` prefix) shipped with opencode-onboard:
113
-
114
- | Skill | Purpose |
115
- |-------|---------|
116
- | `ob-userstory-gh` | Parse a GitHub Issue URL into a structured work item |
117
- | `ob-userstory-az` | Parse an Azure DevOps work item URL |
118
- | `browser-automation` | Browser control via `@different-ai/opencode-browser` |
119
-
120
- Skills live in `.agents/skills/`. Any `SKILL.md` file in a subdirectory is automatically discoverable, write your own and agents will pick them up.
121
-
122
- ### Models, plan / build / fast
123
-
124
- During onboarding you pick three models:
125
-
126
- | Role | Used by | Pick |
127
- |------|---------|------|
128
- | **plan** | Main OpenCode session | Something capable with strong reasoning |
129
- | **build** | All builder agents | Something capable for implementation |
130
- | **fast** | `devops-manager` | Something fast and cheap |
131
-
132
- 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 `[$]`.
133
-
134
- ---
135
-
136
- ## The pipeline
137
-
138
- When you give the lead agent a work item URL, it runs the full pipeline automatically:
139
-
140
- ```
141
- devops-manager → parse work item via skill → structured summary
142
-
143
- openspec-propose
144
- proposal + specs + tasks
145
-
146
- [confirm with user]
147
-
148
- front-engineer + back-engineer + infra-engineer (parallel)
149
-
150
- quality-engineer
151
- tests, build, lint, acceptance
152
-
153
- security-auditor
154
- vulnerabilities, secrets
155
-
156
- devops-manager → screenshots → commit → push → PR → comment
157
- ```
158
-
159
- 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`.
160
-
161
- ---
162
-
163
- ## What gets installed
164
-
165
- ```
166
- your-project/
167
- ├── AGENTS.md ← bootstrap mode, replaced after first "init"
168
- ├── ARCHITECTURE.md ← prompt for agents to fill in from your codebase
169
- ├── DESIGN.md ← prompt for agents to fill in from your codebase
170
- ├── .opencode/
171
- │ └── opencode.json ← plan model + plugins configured
172
- └── .agents/
173
- ├── agents/
174
- │ ├── devops-manager.md
175
- │ ├── front-engineer.md
176
- │ ├── back-engineer.md
177
- │ ├── infra-engineer.md
178
- │ ├── quality-engineer.md
179
- │ └── security-auditor.md
180
- └── skills/
181
- ├── browser-automation/
182
- ├── ob-userstory-gh/ ← or -az, depending on platform
183
- └── ob-userstory-az/
184
- ```
185
-
186
- ---
187
-
188
- ## The bootstrap sequence
189
-
190
- The first time you type `init` in OpenCode after onboarding:
191
-
192
- 1. OpenCode reads your codebase and writes a real `ARCHITECTURE.md`
193
- 2. OpenCode reads your design patterns and writes a real `DESIGN.md`
194
- 3. `AGENTS.md` is replaced by the production version
195
- 4. Your agent team is live
196
-
197
- After this, every agent has accurate, persistent context about your project, no manual documentation required.
198
-
199
- ---
200
-
201
- ## Prerequisites
202
-
203
- | Requirement | Notes |
204
- |-------------|-------|
205
- | **Node.js 18+** | Required |
206
- | **[OpenCode](https://opencode.ai)** | The agent runtime |
207
- | **[OpenCode Ensemble](https://github.com/hueyexe/opencode-ensemble)** | Multi-agent parallel execution |
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 → push → PR → feedback 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 |
208
256
  | **[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
- ```bash
217
- git clone https://github.com/ckgrafico/opencode-onboard.git
218
- cd opencode-onboard
219
- pnpm install
220
-
221
- # Run the CLI locally
222
- node src/index.js
223
-
224
- # Run tests
225
- pnpm test
226
-
227
- # Watch mode
228
- pnpm test:watch
229
- ```
230
-
231
- Tests are written with [Vitest](https://vitest.dev).
232
-
233
- ---
234
-
235
- ## License
236
-
237
- MIT © [ckgrafico](https://github.com/ckgrafico)
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)
@@ -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`.