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.
Files changed (79) hide show
  1. package/README.md +266 -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/opsx-apply.md +50 -33
  13. package/content/.opencode/plugins/session-log.js +1 -1
  14. package/content/.opencode/skills/openspec-apply-change/SKILL.md +50 -33
  15. package/content/AGENTS.md +94 -144
  16. package/content/skills-lock.json +4 -0
  17. package/package.json +6 -1
  18. package/src/index.js +13 -47
  19. package/src/presets/browser.json +18 -0
  20. package/src/presets/clean.json +21 -0
  21. package/src/presets/models.json +33 -0
  22. package/src/presets/optimization.json +22 -0
  23. package/src/presets/platforms.json +29 -2
  24. package/src/presets/quota.json +14 -0
  25. package/src/presets/source.json +17 -0
  26. package/src/steps/browser/browser.test.js +81 -0
  27. package/src/steps/{install-browser.js → browser/index.js} +12 -15
  28. package/src/steps/{__tests__/clean-ai-files.test.js → clean/clean.test.js} +28 -13
  29. package/src/steps/{clean-ai-files.js → clean/index.js} +32 -30
  30. package/src/steps/copy/agents.js +106 -0
  31. package/src/steps/{__tests__/copy-content.test.js → copy/copy.test.js} +10 -1
  32. package/src/steps/copy/index.js +33 -0
  33. package/src/steps/copy/skills.js +55 -0
  34. package/src/steps/{write-onboard-config.js → metadata/index.js} +3 -3
  35. package/src/steps/metadata/metadata.test.js +96 -0
  36. package/src/steps/models/format.js +60 -0
  37. package/src/steps/models/format.test.js +74 -0
  38. package/src/steps/models/index.js +52 -0
  39. package/src/steps/models/write.js +54 -0
  40. package/src/steps/models/write.test.js +119 -0
  41. package/src/steps/{init-openspec.js → openspec/ensemble.js} +20 -57
  42. package/src/steps/openspec/ensemble.test.js +79 -0
  43. package/src/steps/openspec/index.js +32 -0
  44. package/src/steps/optimization/caveman-guidance.js +11 -0
  45. package/src/steps/{install-caveman.js → optimization/caveman.js} +5 -19
  46. package/src/steps/optimization/global.js +64 -0
  47. package/src/steps/optimization/index.js +101 -0
  48. package/src/steps/{__tests__/token-optimization.test.js → optimization/optimization.test.js} +19 -24
  49. package/src/steps/{install-quota.js → optimization/quota.js} +12 -10
  50. package/src/steps/platform/index.js +81 -0
  51. package/src/steps/platform/platform.test.js +129 -0
  52. package/src/steps/{choose-source-scope.js → source/index.js} +11 -17
  53. package/src/steps/source/source.test.js +89 -0
  54. package/src/utils/__tests__/copy.test.js +12 -5
  55. package/src/utils/copy.js +4 -24
  56. package/src/utils/exec-spinner.js +47 -0
  57. package/src/utils/exec.js +120 -162
  58. package/src/utils/models-cache.js +25 -68
  59. package/src/utils/models-pricing.js +42 -0
  60. package/src/utils/models-pricing.test.js +94 -0
  61. package/content/.agents/agents/back-engineer.md +0 -87
  62. package/content/.agents/agents/front-engineer.md +0 -86
  63. package/content/.agents/agents/infra-engineer.md +0 -85
  64. package/content/.agents/agents/quality-engineer.md +0 -86
  65. package/content/.agents/agents/security-auditor.md +0 -86
  66. package/src/steps/__tests__/check-env.test.js +0 -70
  67. package/src/steps/__tests__/check-platform.test.js +0 -104
  68. package/src/steps/__tests__/check-rtk.test.js +0 -38
  69. package/src/steps/__tests__/choose-platform.test.js +0 -38
  70. package/src/steps/check-env.js +0 -26
  71. package/src/steps/check-platform.js +0 -80
  72. package/src/steps/check-rtk.js +0 -38
  73. package/src/steps/choose-models.js +0 -165
  74. package/src/steps/choose-platform.js +0 -22
  75. package/src/steps/choose-skills-provider.js +0 -79
  76. package/src/steps/copy-content.js +0 -89
  77. package/src/steps/enable-caveman-guidance.js +0 -78
  78. package/src/steps/patch-agents-md.js +0 -153
  79. package/src/steps/token-optimization.js +0 -59
@@ -0,0 +1,41 @@
1
+ [
2
+ {
3
+ "ts": "2026-05-04T21:04:09.899Z",
4
+ "agent": "lead",
5
+ "member": null,
6
+ "agentType": null,
7
+ "team": null,
8
+ "action": "started",
9
+ "sessionId": "ses_20b31c36cffeBfsYI2hJ1BNcM5"
10
+ },
11
+ {
12
+ "ts": "2026-05-04T21:04:26.180Z",
13
+ "agent": "lead",
14
+ "member": null,
15
+ "agentType": null,
16
+ "team": null,
17
+ "action": "skill-loaded",
18
+ "skill": "ob-userstory-gh",
19
+ "source": "read-skill-file"
20
+ },
21
+ {
22
+ "ts": "2026-05-04T21:04:47.306Z",
23
+ "agent": "lead",
24
+ "member": null,
25
+ "agentType": null,
26
+ "team": null,
27
+ "action": "completed",
28
+ "filesEdited": 0,
29
+ "skills": [
30
+ "ob-userstory-gh"
31
+ ],
32
+ "usage": {
33
+ "inputTokensReported": null,
34
+ "outputTokensReported": null,
35
+ "totalTokensReported": null,
36
+ "tokenEstimateLow": 3469,
37
+ "tokenEstimateHigh": 6940,
38
+ "method": "heuristic"
39
+ }
40
+ }
41
+ ]
@@ -0,0 +1,21 @@
1
+ Fallback skill, used when no other skill matches. Still loads ob-global for baseline rules.
2
+
3
+ ## When used
4
+
5
+ - No other skill matches the user's request
6
+ - Task is unclear or ambiguous
7
+ - Load ob-global first for baseline rules
8
+
9
+ ## Approach
10
+
11
+ 1. **Understand the ask**, Clarify if ambiguous
12
+ 2. **Check existing context**, Read DESIGN.md, ARCHITECTURE.md first
13
+ 3. **Start small**, MVP, iterate
14
+ 4. **Verify**, Run tests + build before claiming done
15
+ 5. **Report results**, Show what was done, what remains
16
+
17
+ ## Communication
18
+
19
+ - Ask for clarification if unclear
20
+ - Report blockers immediately
21
+ - Show progress when asked
@@ -0,0 +1,32 @@
1
+ Generic guardrails, foundational rules that all agents follow. Users add specialized guardrails skills for specific concerns.
2
+
3
+ ## Git
4
+
5
+ - NEVER commit or push to main
6
+ - NEVER force push
7
+ - NEVER merge PRs (human-only)
8
+ - Feature branches only: `feature/*` or `bugfix/*`
9
+
10
+ ## Secrets
11
+
12
+ - NEVER read or output .env files
13
+ - NEVER log credentials, API keys, tokens
14
+ - NEVER commit secrets to git
15
+
16
+ ## Code
17
+
18
+ - Run tests before marking done
19
+ - Run lint/build before pushing
20
+ - Keep changes small and focused
21
+
22
+ ## Security
23
+
24
+ - Validate all inputs
25
+ - Escape all outputs
26
+ - No hardcoded credentials
27
+
28
+ ## Communication
29
+
30
+ - Ask for clarification if unclear
31
+ - Report blockers immediately
32
+ - Show progress when asked
@@ -0,0 +1,49 @@
1
+ Generic skill, common project-level guidance loaded by all agents. Provides baseline rules; specialized skills add specific concerns.
2
+
3
+ ## When loaded
4
+
5
+ Load this skill first in any session. All other skills add to it, never replace it.
6
+
7
+ ## Context
8
+
9
+ - Load DESIGN.md first for design principles and guidelines.
10
+ - Load ARCHITECTURE.md for system architecture and component interactions.
11
+
12
+ ## Source Roots
13
+
14
+ <!-- OB-SOURCE-ROOTS-START -->
15
+ Source roots are generated during onboarding from the user's source-scope selection.
16
+ Read and analyze code ONLY from those generated roots.
17
+
18
+ If multiple roots are generated, each root is an independent git repository. Branch, commit, push, and PR operations must be handled per repository.
19
+ <!-- OB-SOURCE-ROOTS-END -->
20
+
21
+ ## Git Guardrails
22
+
23
+ - NEVER commit or push to main
24
+ - NEVER force push
25
+ - NEVER merge PRs (human-only)
26
+ - Feature branches only: `feature/*` or `bugfix/*`
27
+
28
+ ## Secrets Guardrails
29
+
30
+ - NEVER read or output .env files
31
+ - NEVER log credentials, API keys, tokens
32
+ - NEVER commit secrets to git
33
+
34
+ ## Code Quality
35
+
36
+ - Run tests before marking done
37
+ - Run lint/build before pushing
38
+ - Keep changes small and focused
39
+ - Ask for clarification if unclear
40
+
41
+ ## Token Optimization Rules
42
+
43
+ <!-- OB-RTK-START -->
44
+ RTK rules are generated here when RTK is selected during onboarding.
45
+ <!-- OB-RTK-END -->
46
+
47
+ <!-- OB-CAVEMAN-START -->
48
+ Caveman rules are generated here when Caveman is selected during onboarding.
49
+ <!-- OB-CAVEMAN-END -->
@@ -8,16 +8,6 @@ metadata:
8
8
  version: "1.0"
9
9
  ---
10
10
 
11
- **RTK - MANDATORY**
12
-
13
- Use `rtk` wrapper for ALL CLI commands:
14
- - `rtk git add` NOT `git add`
15
- - `rtk git commit` NOT `git commit`
16
- - `rtk git push` NOT `git push`
17
- - `rtk az repos pr create` NOT `az repos pr create`
18
- - `rtk az repos pr work-item add` NOT `az repos pr work-item add`
19
- - `rtk az devops invoke` NOT `az devops invoke`
20
-
21
11
  **Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
22
12
  Browser tools are ONLY permitted for screenshots of the LOCAL running app on `localhost` URLs.
23
13
 
@@ -30,7 +20,7 @@ Triggered when devops-manager is in ship mode after implementation is complete.
30
20
  ### Step 1: Verify feature branch
31
21
 
32
22
  ```bash
33
- rtk git branch --show-current
23
+ git branch --show-current
34
24
  ```
35
25
 
36
26
  Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
@@ -48,15 +38,15 @@ Save to: `openspec/changes/{change-name}/images/{feature}.png`
48
38
  ### Step 3: Commit and push
49
39
 
50
40
  ```bash
51
- rtk git add .
52
- rtk git commit -m "feat(#{id}): {description}"
53
- rtk git push origin feature/{id}-{slug}
41
+ git add .
42
+ git commit -m "feat(#{id}): {description}"
43
+ git push origin feature/{id}-{slug}
54
44
  ```
55
45
 
56
46
  ### Step 4: Create PR
57
47
 
58
48
  ```bash
59
- rtk az repos pr create \
49
+ az repos pr create \
60
50
  --repository {repo} \
61
51
  --source-branch feature/{id}-{slug} \
62
52
  --target-branch main \
@@ -67,7 +57,7 @@ rtk az repos pr create \
67
57
  ### Step 5: Link work item (MANDATORY, run sequentially, not in parallel)
68
58
 
69
59
  ```bash
70
- rtk az repos pr work-item add --id {pr-id} --work-items {workitem-id}
60
+ az repos pr work-item add --id {pr-id} --work-items {workitem-id}
71
61
  ```
72
62
 
73
63
  ### Step 6: Post screenshot comment
@@ -79,7 +69,7 @@ https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repo}/items?path=o
79
69
 
80
70
  Post via:
81
71
  ```bash
82
- rtk az devops invoke \
72
+ az devops invoke \
83
73
  --area git --resource pullRequestThreads \
84
74
  --route-parameters project={project} repositoryId={repo} pullRequestId={pr-id} \
85
75
  --http-method POST --api-version 7.1 --in-file body.json
@@ -107,13 +97,13 @@ Triggered when user says "I've added comments to the PR" or "check PR feedback".
107
97
 
108
98
  If PR link provided, extract ID from URL. Otherwise:
109
99
  ```bash
110
- rtk az repos pr list --repository {repo} --status active --top 1
100
+ az repos pr list --repository {repo} --status active --top 1
111
101
  ```
112
102
 
113
103
  ### Step 2: Read comment threads
114
104
 
115
105
  ```bash
116
- rtk az devops invoke \
106
+ az devops invoke \
117
107
  --area git --resource pullRequestThreads \
118
108
  --route-parameters project={project} repositoryId={repo} pullRequestId={id} \
119
109
  --http-method GET --api-version 7.1
@@ -131,7 +121,7 @@ rtk az devops invoke \
131
121
  ### Step 4: Update openspec (if spec-update)
132
122
 
133
123
  ```bash
134
- rtk git branch --show-current
124
+ git branch --show-current
135
125
  # feature/193208-roles-crud → change: us-193208-roles-crud
136
126
  ```
137
127
 
@@ -140,7 +130,7 @@ Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as a
140
130
  ### Step 5: Reply to each thread
141
131
 
142
132
  ```bash
143
- rtk az devops invoke \
133
+ az devops invoke \
144
134
  --area git --resource pullRequestThreadComments \
145
135
  --route-parameters project={project} repositoryId={repo} pullRequestId={id} threadId={tid} \
146
136
  --http-method POST --api-version 7.1 --in-file reply.json
@@ -8,16 +8,6 @@ metadata:
8
8
  version: "1.0"
9
9
  ---
10
10
 
11
- **RTK - MANDATORY**
12
-
13
- Use `rtk` wrapper for ALL CLI commands:
14
- - `rtk git add` NOT `git add`
15
- - `rtk git commit` NOT `git commit`
16
- - `rtk git push` NOT `git push`
17
- - `rtk gh pr create` NOT `gh pr create`
18
- - `rtk gh pr comment` NOT `gh pr comment`
19
- - `rtk gh api` NOT `gh api`
20
-
21
11
  **ALL GitHub data MUST come from `gh` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitHub operations, even if gh CLI fails. If `gh` is unavailable, report as a blocker.**
22
12
  Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
23
13
 
@@ -30,7 +20,7 @@ Triggered when devops-manager is in ship mode after implementation is complete.
30
20
  ### Step 1: Verify feature branch
31
21
 
32
22
  ```bash
33
- rtk git branch --show-current
23
+ git branch --show-current
34
24
  ```
35
25
 
36
26
  Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
@@ -48,15 +38,15 @@ Save to: `openspec/changes/{change-name}/images/{feature}.png`
48
38
  ### Step 3: Commit and push
49
39
 
50
40
  ```bash
51
- rtk git add .
52
- rtk git commit -m "feat(#{id}): {description}"
53
- rtk git push origin feature/{slug}
41
+ git add .
42
+ git commit -m "feat(#{id}): {description}"
43
+ git push origin feature/{slug}
54
44
  ```
55
45
 
56
46
  ### Step 4: Create PR
57
47
 
58
48
  ```bash
59
- rtk gh pr create \
49
+ gh pr create \
60
50
  --base main \
61
51
  --head feature/{slug} \
62
52
  --title "feat: {title}" \
@@ -67,7 +57,7 @@ rtk gh pr create \
67
57
 
68
58
  Resolve commit SHA (the commit that includes screenshots):
69
59
  ```bash
70
- rtk git rev-parse HEAD
60
+ git rev-parse HEAD
71
61
  ```
72
62
 
73
63
  Build blob URL for each image (preferred, stable in PR discussion):
@@ -77,7 +67,7 @@ https://github.com/{owner}/{repo}/blob/{sha}/openspec/changes/{change}/images/{f
77
67
 
78
68
  Post comment:
79
69
  ```bash
80
- rtk gh pr comment {pr-number} --repo {owner}/{repo} --body $'## Screenshots\n\n![{feature}]({blob-url})'
70
+ gh pr comment {pr-number} --repo {owner}/{repo} --body $'## Screenshots\n\n![{feature}]({blob-url})'
81
71
  ```
82
72
 
83
73
  ---
@@ -90,16 +80,16 @@ Triggered when user says "I've added comments to the PR" or "check PR feedback".
90
80
 
91
81
  If PR link provided, extract number from URL. Otherwise:
92
82
  ```bash
93
- rtk gh pr list --repo {owner}/{repo} --state open --limit 1
83
+ gh pr list --repo {owner}/{repo} --state open --limit 1
94
84
  ```
95
85
 
96
86
  ### Step 2: Read comment threads
97
87
 
98
88
  ```bash
99
- rtk gh pr view {pr-number} --repo {owner}/{repo} --comments
89
+ gh pr view {pr-number} --repo {owner}/{repo} --comments
100
90
  # Or structured output:
101
- rtk gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
102
- rtk gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
91
+ gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
92
+ gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
103
93
  ```
104
94
 
105
95
  ### Step 3: Categorize feedback
@@ -114,7 +104,7 @@ rtk gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
114
104
  ### Step 4: Update openspec (if spec-update)
115
105
 
116
106
  ```bash
117
- rtk git branch --show-current
107
+ git branch --show-current
118
108
  # feature/add-user-auth → change: add-user-auth
119
109
  ```
120
110
 
@@ -124,12 +114,12 @@ Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as a
124
114
 
125
115
  ```bash
126
116
  # Reply to a review comment
127
- rtk gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies \
117
+ gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies \
128
118
  --method POST \
129
119
  --field body="Acknowledged, applying this change now."
130
120
 
131
121
  # Or post a general PR comment
132
- rtk gh pr comment {pr-number} --body "Updated design.md to reflect feedback."
122
+ gh pr comment {pr-number} --body "Updated design.md to reflect feedback."
133
123
  ```
134
124
 
135
125
  ---
@@ -8,12 +8,6 @@ metadata:
8
8
  version: "3.1"
9
9
  ---
10
10
 
11
- **RTK - MANDATORY**
12
-
13
- Use `rtk` wrapper for ALL CLI commands:
14
- - `rtk az boards work-item show` NOT `az boards work-item show`
15
- - `rtk openspec new change` NOT `openspec new change`
16
-
17
11
  **Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
18
12
 
19
13
  ---
@@ -40,7 +34,7 @@ Create with scopes: **Work Items (Read & Write)** + **Code (Read & Write)**
40
34
 
41
35
  2. **Fetch Work Item**
42
36
  ```bash
43
- rtk az boards work-item show --id 193208
37
+ az boards work-item show --id 193208
44
38
  ```
45
39
  Do NOT use `--organization` flag (uses default org).
46
40
 
@@ -54,7 +48,7 @@ Create with scopes: **Work Items (Read & Write)** + **Code (Read & Write)**
54
48
 
55
49
  4. **Create OpenSpec Change**
56
50
  ```bash
57
- rtk openspec new change "us-{id}-{slug}"
51
+ openspec new change "us-{id}-{slug}"
58
52
  ```
59
53
 
60
54
  ---
@@ -66,28 +60,28 @@ Use these for ALL DevOps operations, browser MCP is FORBIDDEN.
66
60
  ### Work Items
67
61
  ```bash
68
62
  # Read work item
69
- rtk az boards work-item show --id <id>
63
+ az boards work-item show --id <id>
70
64
 
71
65
  # Update work item state
72
- rtk az boards work-item update --id <id> --state "Active"
66
+ az boards work-item update --id <id> --state "Active"
73
67
  ```
74
68
 
75
69
  ### PR Threads (Comments)
76
70
  ```bash
77
71
  # Read all threads
78
- rtk az devops invoke \
72
+ az devops invoke \
79
73
  --area git --resource pullRequestThreads \
80
74
  --route-parameters project={project} repositoryId=<repo> pullRequestId=<id> \
81
75
  --http-method GET --api-version 7.1
82
76
 
83
77
  # Post new comment thread (requires body.json)
84
- rtk az devops invoke \
78
+ az devops invoke \
85
79
  --area git --resource pullRequestThreads \
86
80
  --route-parameters project={project} repositoryId=<repo> pullRequestId=<id> \
87
81
  --http-method POST --api-version 7.1 --in-file body.json
88
82
 
89
83
  # Reply to existing thread
90
- rtk az devops invoke \
84
+ az devops invoke \
91
85
  --area git --resource pullRequestThreadComments \
92
86
  --route-parameters project={project} repositoryId=<repo> pullRequestId=<id> threadId=<tid> \
93
87
  --http-method POST --api-version 7.1 --in-file reply.json
@@ -165,7 +159,7 @@ After outputting the above, the lead MUST run `/opsx-propose` to generate the pr
165
159
  ## Guardrails
166
160
 
167
161
  - ✅ Parse Azure DevOps URL and create OpenSpec change
168
- - ✅ Use `rtk` for all Azure CLI operations
162
+ - ✅ Use `az` CLI for all Azure DevOps operations
169
163
  - ✅ Always run `/opsx-propose` after parsing, never skip to implementation
170
164
  - ✅ Always stop and confirm with user after propose, before running `/opsx-apply`
171
165
  - ❌ Browser MCP tools for Azure DevOps operations, FORBIDDEN
@@ -8,14 +8,6 @@ metadata:
8
8
  version: "1.1"
9
9
  ---
10
10
 
11
- **RTK - MANDATORY**
12
-
13
- Use `rtk` wrapper for ALL CLI commands:
14
- - `rtk gh issue view` NOT `gh issue view`
15
- - `rtk gh issue list` NOT `gh issue list`
16
- - `rtk gh issue edit` NOT `gh issue edit`
17
- - `rtk openspec new change` NOT `openspec new change`
18
-
19
11
  **ALL GitHub data MUST come from `gh` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools to fetch GitHub URLs, even if gh CLI fails. If `gh` is unavailable, report it as a blocker.**
20
12
 
21
13
  ---
@@ -41,7 +33,7 @@ gh auth status
41
33
 
42
34
  2. **Fetch Issue**, always pass `--repo` explicitly, never rely on git context:
43
35
  ```bash
44
- rtk gh issue view 42 --repo {owner}/{repo} --json number,title,body,labels,milestone,state
36
+ gh issue view 42 --repo {owner}/{repo} --json number,title,body,labels,milestone,state
45
37
  ```
46
38
  If this returns an auth error or 404, report as a blocker, do NOT fall back to webfetch or web search.
47
39
 
@@ -55,7 +47,7 @@ gh auth status
55
47
 
56
48
  4. **Create OpenSpec Change**
57
49
  ```bash
58
- rtk openspec new change "gh-{number}-{slug}"
50
+ openspec new change "gh-{number}-{slug}"
59
51
  ```
60
52
 
61
53
  ---
@@ -67,13 +59,13 @@ Use these for ALL GitHub operations, browser MCP and webfetch are FORBIDDEN. Alw
67
59
  ### Issues
68
60
  ```bash
69
61
  # Read issue
70
- rtk gh issue view <number> --repo {owner}/{repo}
62
+ gh issue view <number> --repo {owner}/{repo}
71
63
 
72
64
  # List open issues
73
- rtk gh issue list --repo {owner}/{repo} --state open --limit 10
65
+ gh issue list --repo {owner}/{repo} --state open --limit 10
74
66
 
75
67
  # Update issue
76
- rtk gh issue edit <number> --repo {owner}/{repo} --add-label "in-progress"
68
+ gh issue edit <number> --repo {owner}/{repo} --add-label "in-progress"
77
69
  ```
78
70
 
79
71
  ---
@@ -129,7 +121,7 @@ After outputting the above, the lead MUST run `/opsx-propose` to generate the pr
129
121
  ## Guardrails
130
122
 
131
123
  - ✅ Parse GitHub Issue URL and create OpenSpec change
132
- - ✅ Use `rtk gh` for all GitHub CLI operations
124
+ - ✅ Use `gh` CLI for all GitHub operations
133
125
  - ✅ Always run `/opsx-propose` after parsing, never skip to implementation
134
126
  - ✅ Always stop and confirm with user after propose, before running `/opsx-apply`
135
127
  - ❌ `webfetch` or HTTP requests to GitHub URLs, FORBIDDEN, use `gh` CLI only
@@ -13,14 +13,14 @@ Implement tasks from an OpenSpec change using the ensemble agent team.
13
13
  If a name is provided, use it. Otherwise:
14
14
  - Infer from conversation context if the user mentioned a change
15
15
  - Auto-select if only one active change exists
16
- - If ambiguous, run `rtk openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
16
+ - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select
17
17
 
18
18
  Always announce: "Using change: <name>" and how to override (e.g., `/opsx-apply <other>`).
19
19
 
20
20
  2. **Check status to understand the schema**
21
21
 
22
22
  ```bash
23
- rtk openspec status --change "<name>" --json
23
+ openspec status --change "<name>" --json
24
24
  ```
25
25
 
26
26
  Parse the JSON to understand:
@@ -30,7 +30,7 @@ Implement tasks from an OpenSpec change using the ensemble agent team.
30
30
  3. **Get apply instructions**
31
31
 
32
32
  ```bash
33
- rtk openspec instructions apply --change "<name>" --json
33
+ openspec instructions apply --change "<name>" --json
34
34
  ```
35
35
 
36
36
  This returns:
@@ -58,7 +58,7 @@ Implement tasks from an OpenSpec change using the ensemble agent team.
58
58
 
59
59
  6. **Implement via ensemble team**
60
60
 
61
- NEVER implement tasks directly. Always delegate to specialists via ensemble.
61
+ NEVER implement tasks directly. Always delegate to engineer workers via ensemble.
62
62
  Do NOT touch any source files before the team is running, not even a single edit.
63
63
 
64
64
  Steps MUST be followed in order. Do not skip any step.
@@ -86,20 +86,40 @@ Implement tasks from an OpenSpec change using the ensemble agent team.
86
86
  DO NOT call team_claim yourself, only agents claim tasks.
87
87
  DO NOT proceed to 6d until team_tasks_add succeeds.
88
88
 
89
- **Step 6d.** Discover relevant skills, then spawn specialists.
90
-
91
- Before spawning, scan `.agents/skills/` and read each `SKILL.md` description line.
92
- Match skills to agents by domain:
93
- - front-engineer: UI, components, framework skills (e.g. next-best-practices, browser-automation)
94
- - back-engineer: API, data, service skills
95
- - infra-engineer: cloud, pipeline, deployment skills
96
- - quality-engineer: testing, coverage skills
89
+ **Step 6d.** Discover available agents, assign tasks by best fit, then spawn workers.
90
+
91
+ Agent discovery and assignment rule:
92
+ - Read `.agents/agents/*.md` and use each agent's `description` and `## Abilities` to understand specialization.
93
+ - For each task ID, choose the best-fit agent based on task domain (backend, frontend, infra, testing, etc.).
94
+ - Prefer specialized agents when available; use `basic-engineer` as fallback only.
95
+ - Only spawn agents that have assigned task IDs.
96
+
97
+ REQUIRED assignment algorithm (do not skip):
98
+ 1. Build candidate list from `.agents/agents/*.md` excluding `devops-manager`.
99
+ 2. Classify each task by domain using task text (api/backend, ui/frontend, infra/devops, testing/qa).
100
+ 3. For each task, score every candidate agent:
101
+ - +3 if agent description explicitly matches domain
102
+ - +2 if agent `## Abilities` include domain-relevant skills
103
+ - +1 if prior tasks of same domain already assigned to that agent (cohesion)
104
+ 4. Assign task to highest-score agent.
105
+ 5. Use `basic-engineer` ONLY when no specialized agent has positive score.
106
+ 6. If all tasks go to `basic-engineer`, you MUST explain why no specialist matched.
107
+
108
+ HARD RULES:
109
+ - NEVER assign a task to `basic-engineer` if a specialized agent has higher score.
110
+ - NEVER skip agent discovery from `.agents/agents/*.md`.
111
+ - ALWAYS include assignment rationale in spawn prompt: "Selected because <domain match>".
112
+
113
+ Skill loading is worker-driven:
114
+ - The spawned agent MUST load `@ob-global` first.
115
+ - Then it MUST load skills from its own `## Abilities` for the claimed task domain.
97
116
 
98
117
  Each team_spawn MUST include the agent field (required, causes NOT NULL error if omitted).
99
118
 
100
119
  The spawn prompt must contain exactly:
101
120
  1. Their name and role on this team
102
121
  2. Which tasks are theirs, list the task IDs and content from the board
122
+ 2.1 Why they were selected for those tasks (domain/abilities match)
103
123
  3. Key context they need (summarized from context files, do NOT tell them to read files themselves)
104
124
  4. The 6 OpenCode tools they have available (these are OpenCode tools, NOT shell commands, call them directly as tools, never via bash):
105
125
  team_claim, team_tasks_complete, team_tasks_list, team_tasks_add, team_message, team_broadcast
@@ -109,21 +129,18 @@ Implement tasks from an OpenSpec change using the ensemble agent team.
109
129
  Keep spawn prompts under 600 tokens. Do not describe team internals or how ensemble works.
110
130
  Only spawn agents whose tasks are actually needed by this change. Skip agents with no tasks.
111
131
 
112
- First spawn all agents (wait for each team_spawn to confirm before the next):
132
+ Spawn one or more best-fit workers (parallel when dependencies allow):
113
133
  ```
114
- team_spawn name:"back" agent:"back-engineer" prompt:"..."
115
- (wait for result)
116
- team_spawn name:"front" agent:"front-engineer" prompt:"..."
117
- (wait for result)
118
- team_spawn name:"infra" agent:"infra-engineer" prompt:"..."
119
- (wait for result)
134
+ team_spawn name:"eng-1" agent:"backend-engineer" prompt:"..."
135
+ team_spawn name:"eng-2" agent:"frontend-engineer" prompt:"..."
136
+ team_spawn name:"eng-3" agent:"basic-engineer" prompt:"..."
120
137
  ```
121
138
 
122
- Then immediately send each spawned agent a start message to kick them off:
139
+ Then immediately send each spawned worker a start message with exact task IDs:
123
140
  ```
124
- team_message to:"back" text:"Start now. Read all skills listed in your prompt first, confirm loaded skills, then claim your first task with team_claim."
125
- team_message to:"front" text:"Start now. Read all skills listed in your prompt first, confirm loaded skills, then claim your first task with team_claim."
126
- team_message to:"infra" text:"Start now. Read all skills listed in your prompt first, confirm loaded skills, then claim your first task with team_claim."
141
+ team_message to:"eng-1" text:"Start now. Load @ob-global first, then use your agent `## Abilities` for these tasks: [task-<id1>] ... Claim each task ID before starting."
142
+ team_message to:"eng-2" text:"Start now. Load @ob-global first, then use your agent `## Abilities` for these tasks: [task-<id2>] ... Claim each task ID before starting."
143
+ team_message to:"eng-3" text:"Start now. Load @ob-global first, then use your agent `## Abilities` for these tasks: [task-<id3>] ... Claim each task ID before starting."
127
144
  ```
128
145
 
129
146
  **Step 6e.** After sending start messages, tell the user what is running, then STOP and wait.
@@ -135,18 +152,18 @@ Implement tasks from an OpenSpec change using the ensemble agent team.
135
152
  If team_merge blocks ("overlapping local changes"), commit or stash your local changes first, then retry.
136
153
  Fix any other blockers reported.
137
154
 
138
- 7. **Quality check**
155
+ 7. **Verification check**
139
156
 
140
- Spawn quality engineer with worktree:false (read-only, no file edits):
141
- ```
142
- team_spawn name:"quality" agent:"quality-engineer" worktree:false prompt:"<verification scope, context summary, run tests + build + lint + verify acceptance criteria, no task claiming required in this phase, send results to lead when done>"
143
- ```
144
- Wait for messageteam_results → fix blockers → team_shutdown (no team_merge needed, worktree:false)
157
+ Run verification tasks (tests/build/lint) using a worker suited for verification scope:
158
+ - either same engineer workers
159
+ - or a dedicated verifier worker if your project defines one
160
+
161
+ Wait for results → fix blockers.
145
162
 
146
163
  8. **Mark tasks complete in openspec**
147
164
 
148
165
  Update tasks.md: `- [ ]` → `- [x]` for each completed task.
149
- Run `rtk openspec status --change "<name>" --json` to confirm.
166
+ Run `openspec status --change "<name>" --json` to confirm.
150
167
 
151
168
  9. **Show status, then cleanup**
152
169
 
@@ -169,10 +186,10 @@ Implement tasks from an OpenSpec change using the ensemble agent team.
169
186
  - ALWAYS pass the task IDs returned by team_tasks_add to each agent's spawn prompt
170
187
  - NEVER edit files between team_spawn and team_merge, team_merge blocks on overlapping local changes
171
188
  - ALWAYS add every task to the board with team_tasks_add before spawning
172
- - ALWAYS spawn agents sequentially (wait for each team_spawn result before the next), then send start messages to all of them together
189
+ - ALWAYS spawn workers based on dependencies: parallel when safe, sequential when required
173
190
  - ALWAYS instruct agents to call team_claim before each task and team_tasks_complete after
174
191
  - If teammates are stuck, use team_message to resend tasks, then wait, never implement directly
175
- - Mark tasks complete in openspec AFTER specialists finish, not before
192
+ - Mark tasks complete in openspec AFTER worker implementation and verification finish, not before
176
193
  - Pause on errors, blockers, or unclear requirements. Do not guess
177
194
  - Use contextFiles from CLI output, do not assume specific file paths
178
- - Use `rtk` wrapper for ALL CLI commands. Never run openspec, git, gh, or az directly
195
+ - Follow CLI rules from `@ob-global` when present
@@ -343,7 +343,7 @@ export const SessionLogPlugin = async ({ client, directory }) => {
343
343
  correlationMethod: spawnMatch.spawnedSessionId === sessionId ? "direct" : "time-window",
344
344
  })
345
345
  } else {
346
- // No spawn match schedule an unmatched-session warning
346
+ // No spawn match, schedule an unmatched-session warning
347
347
  const capturedSessionId = sessionId
348
348
  setTimeout(() => {
349
349
  const s = sessionState.get(capturedSessionId)