opencode-onboard 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -40
- 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 -84
- 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/plugins/session-log.js +523 -519
- package/content/AGENTS.md +32 -21
- package/package.json +1 -1
- package/src/commands/wizard.js +124 -113
- package/src/presets/browser.json +22 -18
- package/src/presets/optimization.json +27 -22
- 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/metadata/index.js +63 -62
- package/src/steps/models/format.js +61 -60
- package/src/steps/models/write.test.js +117 -117
- 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 +103 -0
- package/src/steps/optimization/codegraph.test.js +104 -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/source.test.js +124 -124
- 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
|
@@ -1,84 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
**
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
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
|
-
<!-- OB-
|
|
83
|
-
|
|
84
|
-
<!-- OB-
|
|
1
|
+
---
|
|
2
|
+
name: ob-global
|
|
3
|
+
description: Generic skill, common project-level guidance loaded by all agents. Provides baseline rules; specialized skills add specific concerns. Load this skill first in any session.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When loaded
|
|
8
|
+
|
|
9
|
+
Load this skill first in any session. All other skills add to it, never replace it.
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
|
|
13
|
+
- Load DESIGN.md first for design principles and guidelines.
|
|
14
|
+
- Load ARCHITECTURE.md for system architecture and component interactions.
|
|
15
|
+
|
|
16
|
+
## Source Roots
|
|
17
|
+
|
|
18
|
+
<!-- OB-SOURCE-ROOTS-START -->
|
|
19
|
+
Source roots are generated during onboarding from the user's source-scope selection.
|
|
20
|
+
Read and analyze code ONLY from those generated roots.
|
|
21
|
+
|
|
22
|
+
If multiple roots are generated, each root is an independent git repository. Branch, commit, push, and PR operations must be handled per repository.
|
|
23
|
+
<!-- OB-SOURCE-ROOTS-END -->
|
|
24
|
+
|
|
25
|
+
## Git Guardrails
|
|
26
|
+
|
|
27
|
+
- NEVER commit or push to main
|
|
28
|
+
- NEVER force push
|
|
29
|
+
- NEVER merge PRs (human-only)
|
|
30
|
+
- Feature branches only: `feature/*` or `bugfix/*`
|
|
31
|
+
|
|
32
|
+
## Secrets Guardrails
|
|
33
|
+
|
|
34
|
+
- NEVER read or output .env files
|
|
35
|
+
- NEVER log credentials, API keys, tokens
|
|
36
|
+
- NEVER commit secrets to git
|
|
37
|
+
|
|
38
|
+
## Code Quality
|
|
39
|
+
|
|
40
|
+
- Run tests before marking done
|
|
41
|
+
- Run lint/build before pushing
|
|
42
|
+
- Keep changes small and focused
|
|
43
|
+
- Ask for clarification if unclear
|
|
44
|
+
|
|
45
|
+
## Ensemble Task Board Rules
|
|
46
|
+
|
|
47
|
+
When working as a spawned agent in an ensemble team, these rules are mandatory:
|
|
48
|
+
|
|
49
|
+
**Claim-first execution:**
|
|
50
|
+
- Your FIRST tool call after loading skills MUST be `team_claim task_id:<id>`. The dashboard must show your active task immediately.
|
|
51
|
+
- Do NOT spend more than 2 tool calls reading/planning before writing code. Claim first, then explore only what's needed for that specific task.
|
|
52
|
+
|
|
53
|
+
**One task at a time:**
|
|
54
|
+
- Claim → implement → build/verify → commit → `team_tasks_complete` → claim next.
|
|
55
|
+
- NEVER hold multiple claimed tasks simultaneously.
|
|
56
|
+
- NEVER batch completions. Mark done immediately after each commit.
|
|
57
|
+
|
|
58
|
+
**Dependency check before claiming:**
|
|
59
|
+
- Before calling `team_claim task_id:<id>`, call `team_tasks_list` and verify every dependency of that task has status `done`.
|
|
60
|
+
- If any dependency is not `done`, do NOT claim that task. Scan the board for another assigned task whose dependencies ARE all done and claim that one instead.
|
|
61
|
+
- If no assigned task is unblocked, report blocked to lead and STOP. Do NOT poll, sleep, or loop waiting for a dependency.
|
|
62
|
+
|
|
63
|
+
**Commit cadence:**
|
|
64
|
+
- After each task passes build: `git add -A && git commit -m "feat: <short description>"`
|
|
65
|
+
- ONE task = ONE commit. No multi-task commits.
|
|
66
|
+
|
|
67
|
+
**Communication discipline:**
|
|
68
|
+
- NEVER message lead with "I'm reading" or "I'm planning". Only message when BATCH DONE or BLOCKED.
|
|
69
|
+
- When BATCH DONE: report number of tasks completed + commit count. Lead may assign more tasks, stay active until lead confirms no more.
|
|
70
|
+
- When BLOCKED: report which task, what's blocking, what you tried.
|
|
71
|
+
- NEVER ask lead for permission to proceed, skip, or reorder tasks. Task sequencing and dependency resolution are YOUR responsibility. Only message lead when BATCH DONE or genuinely BLOCKED (no unblocked tasks remain).
|
|
72
|
+
- When lead sends new task IDs via team_message, treat them as new assignments and continue working.
|
|
73
|
+
|
|
74
|
+
**Stall prevention:**
|
|
75
|
+
- If a build fails, fix it immediately (max 3 attempts). Then report blocker.
|
|
76
|
+
- If you don't understand a task, message lead asking for clarification. Do NOT guess.
|
|
77
|
+
- If a file you need doesn't exist yet (dependency on another agent), report as blocked, don't create stubs.
|
|
78
|
+
- NEVER use sleep loops or polling to wait for a dependency. Waiting is always a blocker: report it and stop.
|
|
79
|
+
|
|
80
|
+
## Token Optimization Rules
|
|
81
|
+
|
|
82
|
+
<!-- OB-RTK-START -->
|
|
83
|
+
RTK rules are generated here when RTK is selected during onboarding.
|
|
84
|
+
<!-- OB-RTK-END -->
|
|
85
|
+
|
|
86
|
+
<!-- OB-CAVEMAN-START -->
|
|
87
|
+
Caveman rules are generated here when Caveman is selected during onboarding.
|
|
88
|
+
<!-- OB-CAVEMAN-END -->
|
|
89
|
+
|
|
90
|
+
<!-- OB-CODEGRAPH-START -->
|
|
91
|
+
Codegraph rules are generated here when codegraph is selected during onboarding.
|
|
92
|
+
<!-- OB-CODEGRAPH-END -->
|
|
@@ -1,160 +1,168 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ob-pullrequest-az
|
|
3
|
-
description: Create Azure DevOps PRs with screenshots, or read and triage PR review feedback. Use when shipping a feature branch or when user says "I've added comments to the PR".
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: Requires az CLI, az devops extension, openspec CLI, and opencode-browser for screenshots.
|
|
6
|
-
metadata:
|
|
7
|
-
author: copilots
|
|
8
|
-
version: "1.0"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
**Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
|
|
12
|
-
Browser tools are ONLY permitted for screenshots of the LOCAL running app on `localhost` URLs.
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Mode A: Create PR (ship mode)
|
|
17
|
-
|
|
18
|
-
Triggered when devops-manager is in ship mode after implementation is complete.
|
|
19
|
-
|
|
20
|
-
### Step 1: Verify feature branch
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
git branch --show-current
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
|
|
27
|
-
|
|
28
|
-
### Step 2: Capture screenshots (if UI changes exist)
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
browser_navigate url="http://localhost:{port}/{route}"
|
|
32
|
-
browser_wait ms=2000
|
|
33
|
-
browser_screenshot
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
37
|
-
|
|
38
|
-
### Step 3: Commit and push
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
git add .
|
|
42
|
-
git commit -m "feat(#{id}): {description}"
|
|
43
|
-
git push origin feature/{id}-{slug}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Step 4: Create PR
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
az repos pr create \
|
|
50
|
-
--repository {repo} \
|
|
51
|
-
--source-branch feature/{id}-{slug} \
|
|
52
|
-
--target-branch main \
|
|
53
|
-
--title "feat(#{id}): {title}" \
|
|
54
|
-
--description "{description}"
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Step 5: Link work item (MANDATORY, run sequentially, not in parallel)
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
az repos pr work-item add --id {pr-id} --work-items {workitem-id}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Step 6: Post screenshot comment
|
|
64
|
-
|
|
65
|
-
Build raw URL for each image:
|
|
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
|
-
```bash
|
|
106
|
-
az
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
name: ob-pullrequest-az
|
|
3
|
+
description: Create Azure DevOps PRs with screenshots, or read and triage PR review feedback. Use when shipping a feature branch or when user says "I've added comments to the PR".
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires az CLI, az devops extension, openspec CLI, and opencode-browser for screenshots.
|
|
6
|
+
metadata:
|
|
7
|
+
author: copilots
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
**Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
|
|
12
|
+
Browser tools are ONLY permitted for screenshots of the LOCAL running app on `localhost` URLs.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Mode A: Create PR (ship mode)
|
|
17
|
+
|
|
18
|
+
Triggered when devops-manager is in ship mode after implementation is complete.
|
|
19
|
+
|
|
20
|
+
### Step 1: Verify feature branch
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
git branch --show-current
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
|
|
27
|
+
|
|
28
|
+
### Step 2: Capture screenshots (if UI changes exist)
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
browser_navigate url="http://localhost:{port}/{route}"
|
|
32
|
+
browser_wait ms=2000
|
|
33
|
+
browser_screenshot
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
37
|
+
|
|
38
|
+
### Step 3: Commit and push
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
git add .
|
|
42
|
+
git commit -m "feat(#{id}): {description}"
|
|
43
|
+
git push origin feature/{id}-{slug}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Step 4: Create PR
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
az repos pr create \
|
|
50
|
+
--repository {repo} \
|
|
51
|
+
--source-branch feature/{id}-{slug} \
|
|
52
|
+
--target-branch main \
|
|
53
|
+
--title "feat(#{id}): {title}" \
|
|
54
|
+
--description "{description}"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Step 5: Link work item (MANDATORY, run sequentially, not in parallel)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
az repos pr work-item add --id {pr-id} --work-items {workitem-id}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Step 6: Post screenshot comment
|
|
64
|
+
|
|
65
|
+
Build raw URL for each image:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repo}/items?path=openspec/changes/{change}/images/{file}.png&versionType=branch&version={branch}&api-version=7.1
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Post via:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
az devops invoke \
|
|
75
|
+
--area git --resource pullRequestThreads \
|
|
76
|
+
--route-parameters project={project} repositoryId={repo} pullRequestId={pr-id} \
|
|
77
|
+
--http-method POST --api-version 7.1 --in-file body.json
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`body.json`:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"comments": [
|
|
85
|
+
{
|
|
86
|
+
"parentCommentId": 0,
|
|
87
|
+
"content": "## Screenshots\n\n",
|
|
88
|
+
"commentType": 1
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"status": "active"
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Mode B: Read PR Feedback (feedback mode)
|
|
98
|
+
|
|
99
|
+
Triggered when user says "I've added comments to the PR" or "check PR feedback".
|
|
100
|
+
|
|
101
|
+
### Step 1: Find PRs
|
|
102
|
+
|
|
103
|
+
If PR link provided, extract ID from URL. Otherwise:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
az repos pr list --repository {repo} --status active --top 1
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Step 2: Read comment threads
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
az devops invoke \
|
|
113
|
+
--area git --resource pullRequestThreads \
|
|
114
|
+
--route-parameters project={project} repositoryId={repo} pullRequestId={id} \
|
|
115
|
+
--http-method GET --api-version 7.1
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Step 3: Categorize feedback
|
|
119
|
+
|
|
120
|
+
| Category | Description | Action |
|
|
121
|
+
| ------------- | ----------------------------------- | ----------------------------------- |
|
|
122
|
+
| `code-change` | Reviewer requests code modification | Return to lead to spawn specialists |
|
|
123
|
+
| `spec-update` | Affects proposal, design, or tasks | Update openspec artifacts |
|
|
124
|
+
| `question` | Reviewer asks a question | Reply with answer |
|
|
125
|
+
| `resolved` | Thread already resolved | Skip |
|
|
126
|
+
|
|
127
|
+
### Step 4: Update openspec (if spec-update)
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
git branch --show-current
|
|
131
|
+
# feature/193208-roles-crud → change: us-193208-roles-crud
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as appropriate.
|
|
135
|
+
|
|
136
|
+
### Step 5: Reply to each thread
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
az devops invoke \
|
|
140
|
+
--area git --resource pullRequestThreadComments \
|
|
141
|
+
--route-parameters project={project} repositoryId={repo} pullRequestId={id} threadId={tid} \
|
|
142
|
+
--http-method POST --api-version 7.1 --in-file reply.json
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
`reply.json`:
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"comments": [
|
|
150
|
+
{
|
|
151
|
+
"parentCommentId": 1,
|
|
152
|
+
"content": "Acknowledged, applying this change now.",
|
|
153
|
+
"commentType": 1
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Guardrails
|
|
161
|
+
|
|
162
|
+
- ✅ Commit and push to feature branches only
|
|
163
|
+
- ✅ Create and comment on PRs via az CLI
|
|
164
|
+
- ✅ Screenshots of localhost only via browser_screenshot
|
|
165
|
+
- ❌ Commit or push to `main`, FORBIDDEN
|
|
166
|
+
- ❌ Force push, FORBIDDEN
|
|
167
|
+
- ❌ Merge or approve PRs, human-only
|
|
168
|
+
- ❌ Navigate browser to dev.azure.com, FORBIDDEN
|