opencode-onboard 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +304 -301
- package/content/.agents/agents/basic-engineer.md +4 -2
- 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 -49
- 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/commands/init.md +1 -1
- package/content/.opencode/commands/main.md +1 -1
- package/content/.opencode/commands/opsx-apply.md +131 -70
- package/content/.opencode/commands/plan.md +1 -1
- package/content/.opencode/plugins/session-log.js +523 -519
- package/content/.opencode/skills/openspec-apply-change/SKILL.md +86 -64
- package/content/AGENTS.md +67 -39
- package/package.json +1 -1
- package/src/commands/join.js +3 -3
- package/src/commands/single.js +2 -0
- package/src/commands/wizard.js +124 -99
- package/src/presets/browser.json +22 -18
- package/src/presets/optimization.json +27 -22
- package/src/presets/source.json +7 -1
- 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/copy/agents.js +28 -0
- package/src/steps/copy/copy.test.js +1 -0
- package/src/steps/copy/index.js +2 -1
- package/src/steps/metadata/index.js +63 -61
- package/src/steps/models/format.js +61 -60
- package/src/steps/models/write.test.js +117 -117
- package/src/steps/openspec/ensemble.js +30 -7
- 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 +52 -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/index.js +48 -0
- package/src/steps/source/source.test.js +124 -91
- 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,123 +1,123 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Process agent. Reads work items and user stories at pipeline start. Creates PRs, posts screenshots, responds to review comments at pipeline end. Bridges the work tracker and the repository. Platform knowledge comes from skills.
|
|
3
|
-
mode: subagent
|
|
4
|
-
color: primary
|
|
5
|
-
permission:
|
|
6
|
-
edit: allow
|
|
7
|
-
bash: allow
|
|
8
|
-
read: allow
|
|
9
|
-
glob: allow
|
|
10
|
-
grep: allow
|
|
11
|
-
webfetch: allow
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# DevOps Manager
|
|
15
|
-
|
|
16
|
-
Process agent, reads work items, creates PRs, handles review feedback. Bookends the pipeline. Spawned by the lead agent via opencode-ensemble.
|
|
17
|
-
|
|
18
|
-
## Domain
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
## Skills and Platform Resolution
|
|
23
|
-
|
|
24
|
-
Skills are located in `.agents/skills/`. Load required skills explicitly from context and onboarding metadata.
|
|
25
|
-
|
|
26
|
-
Always load `@ob-global` FIRST before any other skill.
|
|
27
|
-
|
|
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 -->
|
|
32
|
-
|
|
33
|
-
1. If the spawn prompt lists specific skills to load, read those `SKILL.md` files FIRST before any implementation
|
|
34
|
-
2. Additionally, identify the platform from URLs or context
|
|
35
|
-
|
|
36
|
-
Examples of intent → skill mapping:
|
|
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
|
|
41
|
-
|
|
42
|
-
Rules:
|
|
43
|
-
- Platform selected in onboarding metadata takes precedence over URL inference when both exist
|
|
44
|
-
- Never interact with a platform without loading the matching skill first
|
|
45
|
-
- Follow skill instructions exactly, do not partially apply them
|
|
46
|
-
- If no skill exists for the platform, report it as a blocker rather than improvising
|
|
47
|
-
- Skills listed in the spawn prompt are MANDATORY, not optional
|
|
48
|
-
|
|
49
|
-
##
|
|
50
|
-
|
|
51
|
-
### Read Mode (pipeline start)
|
|
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
|
|
57
|
-
|
|
58
|
-
### Ship Mode (pipeline end)
|
|
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
|
|
69
|
-
|
|
70
|
-
### Feedback Mode (PR review loop)
|
|
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.
|
|
82
|
-
|
|
83
|
-
## Constraints
|
|
84
|
-
|
|
85
|
-
- Does not write application code, process only
|
|
86
|
-
- Does not push to `main`, feature branches only
|
|
87
|
-
- Does not merge PRs, human-only
|
|
88
|
-
- Does not approve PRs, human-only
|
|
89
|
-
- Does not force push
|
|
90
|
-
- ALL GitHub and Azure DevOps data MUST come from `gh` or `az` CLI, NEVER use webfetch or HTTP requests to fetch platform URLs, even as a fallback. If CLI is unavailable, report as a blocker.
|
|
91
|
-
- Browser MCP tools permitted only for screenshots of local app on `localhost` URLs, never for navigating GitHub or Azure DevOps
|
|
92
|
-
|
|
93
|
-
## Output Format
|
|
94
|
-
|
|
95
|
-
**Read mode:**
|
|
96
|
-
```
|
|
97
|
-
## DevOps Manager, Work Item Parsed
|
|
98
|
-
|
|
99
|
-
**Platform:** GitHub | Azure DevOps
|
|
100
|
-
**Item:** <id>, <title>
|
|
101
|
-
**Type:** feature | bug | chore
|
|
102
|
-
**Summary:** <2-3 sentences>
|
|
103
|
-
**Acceptance criteria:** <list>
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**Ship mode:**
|
|
107
|
-
```
|
|
108
|
-
## DevOps Manager, PR Created
|
|
109
|
-
|
|
110
|
-
**Branch:** feature/<id>-<slug>
|
|
111
|
-
**PR:** <url>
|
|
112
|
-
**Screenshots:** <count> captured and posted
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**Feedback mode:**
|
|
116
|
-
```
|
|
117
|
-
## DevOps Manager, Feedback Classified
|
|
118
|
-
|
|
119
|
-
**Comments:** <total>
|
|
120
|
-
**Code changes needed:** <count>, <list>
|
|
121
|
-
**Questions for human:** <count>, <list>
|
|
122
|
-
**Acknowledged only:** <count>
|
|
123
|
-
```
|
|
1
|
+
---
|
|
2
|
+
description: Process agent. Reads work items and user stories at pipeline start. Creates PRs, posts screenshots, responds to review comments at pipeline end. Bridges the work tracker and the repository. Platform knowledge comes from skills.
|
|
3
|
+
mode: subagent
|
|
4
|
+
color: primary
|
|
5
|
+
permission:
|
|
6
|
+
edit: allow
|
|
7
|
+
bash: allow
|
|
8
|
+
read: allow
|
|
9
|
+
glob: allow
|
|
10
|
+
grep: allow
|
|
11
|
+
webfetch: allow
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# DevOps Manager
|
|
15
|
+
|
|
16
|
+
Process agent, reads work items, creates PRs, handles review feedback. Bookends the pipeline. Spawned by the lead agent via opencode-ensemble.
|
|
17
|
+
|
|
18
|
+
## Domain
|
|
19
|
+
|
|
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
|
+
|
|
22
|
+
## Skills and Platform Resolution
|
|
23
|
+
|
|
24
|
+
Skills are located in `.agents/skills/`. Load required skills explicitly from context and onboarding metadata.
|
|
25
|
+
|
|
26
|
+
Always load `@ob-global` FIRST before any other skill.
|
|
27
|
+
|
|
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 -->
|
|
32
|
+
|
|
33
|
+
1. If the spawn prompt lists specific skills to load, read those `SKILL.md` files FIRST before any implementation
|
|
34
|
+
2. Additionally, identify the platform from URLs or context
|
|
35
|
+
|
|
36
|
+
Examples of intent → skill mapping:
|
|
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
|
|
41
|
+
|
|
42
|
+
Rules:
|
|
43
|
+
- Platform selected in onboarding metadata takes precedence over URL inference when both exist
|
|
44
|
+
- Never interact with a platform without loading the matching skill first
|
|
45
|
+
- Follow skill instructions exactly, do not partially apply them
|
|
46
|
+
- If no skill exists for the platform, report it as a blocker rather than improvising
|
|
47
|
+
- Skills listed in the spawn prompt are MANDATORY, not optional
|
|
48
|
+
|
|
49
|
+
## Working Modes
|
|
50
|
+
|
|
51
|
+
### Read Mode (pipeline start)
|
|
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
|
|
57
|
+
|
|
58
|
+
### Ship Mode (pipeline end)
|
|
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
|
|
69
|
+
|
|
70
|
+
### Feedback Mode (PR review loop)
|
|
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.
|
|
82
|
+
|
|
83
|
+
## Constraints
|
|
84
|
+
|
|
85
|
+
- Does not write application code, process only
|
|
86
|
+
- Does not push to `main`, feature branches only
|
|
87
|
+
- Does not merge PRs, human-only
|
|
88
|
+
- Does not approve PRs, human-only
|
|
89
|
+
- Does not force push
|
|
90
|
+
- ALL GitHub and Azure DevOps data MUST come from `gh` or `az` CLI, NEVER use webfetch or HTTP requests to fetch platform URLs, even as a fallback. If CLI is unavailable, report as a blocker.
|
|
91
|
+
- Browser MCP tools permitted only for screenshots of local app on `localhost` URLs, never for navigating GitHub or Azure DevOps
|
|
92
|
+
|
|
93
|
+
## Output Format
|
|
94
|
+
|
|
95
|
+
**Read mode:**
|
|
96
|
+
```
|
|
97
|
+
## DevOps Manager, Work Item Parsed
|
|
98
|
+
|
|
99
|
+
**Platform:** GitHub | Azure DevOps
|
|
100
|
+
**Item:** <id>, <title>
|
|
101
|
+
**Type:** feature | bug | chore
|
|
102
|
+
**Summary:** <2-3 sentences>
|
|
103
|
+
**Acceptance criteria:** <list>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Ship mode:**
|
|
107
|
+
```
|
|
108
|
+
## DevOps Manager, PR Created
|
|
109
|
+
|
|
110
|
+
**Branch:** feature/<id>-<slug>
|
|
111
|
+
**PR:** <url>
|
|
112
|
+
**Screenshots:** <count> captured and posted
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Feedback mode:**
|
|
116
|
+
```
|
|
117
|
+
## DevOps Manager, Feedback Classified
|
|
118
|
+
|
|
119
|
+
**Comments:** <total>
|
|
120
|
+
**Code changes needed:** <count>, <list>
|
|
121
|
+
**Questions for human:** <count>, <list>
|
|
122
|
+
**Acknowledged only:** <count>
|
|
123
|
+
```
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
---
|
|
2
|
+
name: ob-default
|
|
3
|
+
description: Fallback skill, used when no other skill matches. Still loads ob-global for baseline rules. Use when task is unclear or no specialized skill applies.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When used
|
|
8
|
+
|
|
9
|
+
- No other skill matches the user's request
|
|
10
|
+
- Task is unclear or ambiguous
|
|
11
|
+
- Load ob-global first for baseline rules
|
|
12
|
+
|
|
13
|
+
## Approach
|
|
14
|
+
|
|
15
|
+
1. **Understand the ask**, Clarify if ambiguous
|
|
16
|
+
2. **Check existing context**, Read DESIGN.md, ARCHITECTURE.md first
|
|
17
|
+
3. **Start small**, MVP, iterate
|
|
18
|
+
4. **Verify**, Run tests + build before claiming done
|
|
19
|
+
5. **Report results**, Show what was done, what remains
|
|
20
|
+
|
|
21
|
+
## Communication
|
|
22
|
+
|
|
23
|
+
- Ask for clarification if unclear
|
|
24
|
+
- Report blockers immediately
|
|
25
|
+
- Show progress when asked
|
|
@@ -1,32 +1,36 @@
|
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
name: ob-generic-guardrails
|
|
3
|
+
description: Generic guardrails, foundational rules that all agents follow. Users add specialized guardrails skills for specific concerns. Covers git, secrets, code quality, and security rules.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Git
|
|
8
|
+
|
|
9
|
+
- NEVER commit or push to main
|
|
10
|
+
- NEVER force push
|
|
11
|
+
- NEVER merge PRs (human-only)
|
|
12
|
+
- Feature branches only: `feature/*` or `bugfix/*`
|
|
13
|
+
|
|
14
|
+
## Secrets
|
|
15
|
+
|
|
16
|
+
- NEVER read or output .env files
|
|
17
|
+
- NEVER log credentials, API keys, tokens
|
|
18
|
+
- NEVER commit secrets to git
|
|
19
|
+
|
|
20
|
+
## Code
|
|
21
|
+
|
|
22
|
+
- Run tests before marking done
|
|
23
|
+
- Run lint/build before pushing
|
|
24
|
+
- Keep changes small and focused
|
|
25
|
+
|
|
26
|
+
## Security
|
|
27
|
+
|
|
28
|
+
- Validate all inputs
|
|
29
|
+
- Escape all outputs
|
|
30
|
+
- No hardcoded credentials
|
|
31
|
+
|
|
32
|
+
## Communication
|
|
33
|
+
|
|
34
|
+
- Ask for clarification if unclear
|
|
35
|
+
- Report blockers immediately
|
|
36
|
+
- Show progress when asked
|
|
@@ -1,49 +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
|
-
|
|
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 -->
|