@plainconceptsplatform/agent-harness 2.0.0 → 2.1.0
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 +426 -419
- package/package.json +3 -3
- package/src/commands/join.js +244 -244
- package/src/commands/shared.js +27 -27
- package/src/commands/single.js +79 -79
- package/src/commands/update.js +109 -109
- package/src/commands/wizard.js +134 -134
- package/src/content/.agents/skills/browser-automation/SKILL.md +66 -66
- package/src/content/.agents/skills/pc-guardrails-generic/SKILL.md +68 -68
- package/src/content/.agents/skills/pc-guardrails-project/SKILL.md +8 -8
- package/src/content/.agents/skills/pc-make-architecture/SKILL.md +51 -51
- package/src/content/.agents/skills/pc-make-architecture/structure-template.md +38 -38
- package/src/content/.agents/skills/pc-make-design/SKILL.md +68 -68
- package/src/content/.agents/skills/pc-make-engineer/SKILL.md +219 -219
- package/src/content/.agents/skills/pc-make-engineer/signal-mapping.md +68 -68
- package/src/content/.agents/skills/pc-make-engineer/template.md +81 -81
- package/src/content/.agents/skills/pc-make-evidence-scaffold/SKILL.md +18 -18
- package/src/content/.agents/skills/pc-make-evidence-scaffold/evidence-contract.md +29 -29
- package/src/content/.agents/skills/pc-make-guardrails/SKILL.md +74 -74
- package/src/content/.agents/skills/pc-make-guardrails/category-reference.md +68 -68
- package/src/content/.agents/skills/pc-make-merge-risk-assess/SKILL.md +70 -70
- package/src/content/.agents/skills/pc-make-merge-risk-assess/category-reference.md +98 -98
- package/src/content/.agents/skills/pc-make-user-model/SKILL.md +66 -66
- package/src/content/.agents/skills/pc-ops-evidence/SKILL.md +127 -127
- package/src/content/.agents/skills/pc-ops-ship/SKILL.md +18 -18
- package/src/content/.agents/skills/pc-plan-apply/SKILL.md +83 -83
- package/src/content/.agents/skills/pc-plan-apply/simple-mode.md +21 -21
- package/src/content/.agents/skills/pc-plan-archive/SKILL.md +63 -63
- package/src/content/.agents/skills/pc-plan-explore/SKILL.md +9 -9
- package/src/content/.agents/skills/pc-plan-goal/SKILL.md +94 -94
- package/src/content/.agents/skills/pc-plan-goal/branching.md +30 -30
- package/src/content/.agents/skills/pc-plan-goal/failure-policy.md +30 -30
- package/src/content/.agents/skills/pc-plan-goal/output-mode.md +9 -9
- package/src/content/.agents/skills/pc-plan-goal/output.md +68 -68
- package/src/content/.agents/skills/pc-plan-propose/SKILL.md +125 -125
- package/src/content/.agents/skills/pc-plan-propose/task-annotation.md +39 -39
- package/src/content/.agents/skills/pc-plan-quick/SKILL.md +62 -62
- package/src/content/.agents/skills/pc-plan-story/SKILL.md +146 -146
- package/src/content/.agents/skills/pc-repo-audit/SKILL.md +44 -44
- package/src/content/.agents/skills/pc-repo-help/SKILL.md +91 -91
- package/src/content/.agents/skills/pc-repo-initialize/SKILL.md +130 -130
- package/src/content/.agents/skills/pc-repo-onboard/SKILL.md +87 -87
- package/src/content/.agents/skills/pc-repo-verify/SKILL.md +34 -34
- package/src/content/.agents/skills/pc-userstory-az/SKILL.md +157 -157
- package/src/content/.agents/skills/pc-userstory-browser/SKILL.md +132 -132
- package/src/content/.agents/skills/pc-userstory-gh/SKILL.md +120 -120
- package/src/content/.agents/skills/pc-userstory-jira/SKILL.md +131 -131
- package/src/content/.opencode/_gitignore +9 -7
- package/src/content/.opencode/commands/init.md +5 -5
- package/src/content/.opencode/commands/make-architecture.md +5 -5
- package/src/content/.opencode/commands/make-design.md +5 -5
- package/src/content/.opencode/commands/make-engineer.md +5 -5
- package/src/content/.opencode/commands/make-evidence-scaffold.md +5 -5
- package/src/content/.opencode/commands/make-guardrails.md +5 -5
- package/src/content/.opencode/commands/make-user-model.md +5 -5
- package/src/content/.opencode/commands/ops-backlog.md +10 -10
- package/src/content/.opencode/commands/ops-evidence.md +9 -9
- package/src/content/.opencode/commands/ops-review.md +8 -8
- package/src/content/.opencode/commands/ops-ship.md +9 -9
- package/src/content/.opencode/commands/plan-apply.md +9 -9
- package/src/content/.opencode/commands/plan-archive.md +5 -5
- package/src/content/.opencode/commands/plan-explore.md +9 -9
- package/src/content/.opencode/commands/plan-goal.md +5 -5
- package/src/content/.opencode/commands/plan-propose.md +9 -9
- package/src/content/.opencode/commands/plan-quick.md +5 -5
- package/src/content/.opencode/commands/plan-story.md +9 -9
- package/src/content/.opencode/commands/repo-audit.md +5 -5
- package/src/content/.opencode/commands/repo-help.md +5 -5
- package/src/content/.opencode/commands/repo-initialize.md +5 -5
- package/src/content/.opencode/commands/repo-onboard.md +5 -5
- package/src/content/.opencode/commands/repo-verify.md +5 -5
- package/src/content/.opencode/plugins/pc-subagent-monitor.js +139 -139
- package/src/content/.opencode/plugins/pc-subagent-tiers.js +281 -179
- package/src/content/.opencode/plugins/pc-system-reminders.js +96 -96
- package/src/content/.opencode/tui/pc-subagents.tsx +98 -98
- package/src/content/.opencode/tui.json +6 -6
- package/src/content/AGENTS.md +71 -71
- package/src/content/opencode.jsonc +39 -31
- package/src/fragments/archive/az.md +95 -95
- package/src/fragments/archive/gh.md +94 -94
- package/src/fragments/archive/gl.md +94 -94
- package/src/fragments/archive/none.md +73 -73
- package/src/fragments/guardrails/codegraph.md +7 -7
- package/src/fragments/guardrails/humanizer.md +4 -4
- package/src/fragments/guardrails/memory.md +4 -4
- package/src/fragments/guardrails/rtk.md +3 -3
- package/src/fragments/guardrails/simple-english.md +4 -4
- package/src/fragments/ops-backlog/az.md +28 -28
- package/src/fragments/ops-backlog/gh.md +29 -29
- package/src/fragments/ops-backlog/jira.md +28 -28
- package/src/fragments/ops-evidence/az.md +41 -41
- package/src/fragments/ops-evidence/gh.md +53 -53
- package/src/fragments/ops-evidence/jira.md +38 -38
- package/src/fragments/ops-review/az.md +62 -62
- package/src/fragments/ops-review/gh.md +52 -52
- package/src/fragments/ops-review/gl.md +56 -56
- package/src/fragments/ops-ship/az.md +80 -80
- package/src/fragments/ops-ship/gh.md +68 -68
- package/src/fragments/ops-ship/gl.md +85 -85
- package/src/index.js +107 -107
- package/src/presets/agents-content.json +53 -53
- package/src/presets/models.json +68 -68
- package/src/steps/copy/agents.js +118 -118
- package/src/steps/copy/commands.js +91 -91
- package/src/steps/copy/fullstack-engineer.js +85 -83
- package/src/steps/copy/index.js +88 -88
- package/src/steps/copy/opencode-json.js +147 -129
- package/src/steps/copy/skills.js +196 -196
- package/src/steps/metadata/index.js +108 -108
- package/src/steps/models/write.js +34 -34
- package/src/steps/optimization/patch-guardrails.js +108 -108
- package/src/utils/copy.js +108 -108
- package/src/utils/legacy-check.js +30 -30
- package/src/utils/models-cache.js +58 -58
- package/src/utils/paths.js +67 -64
- package/src/utils/update-manifest.js +49 -49
- package/src/content/.opencode/plugins/pc-system-reminders.test.js +0 -35
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
**ALL GitLab data MUST come from `glab` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitLab operations, even if glab CLI fails. If `glab` is unavailable, report as a blocker.**
|
|
2
|
-
Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
3
|
-
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
### Step 1: Verify feature branch
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
BRANCH="$(git branch --show-current)"
|
|
10
|
-
DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
|
|
11
|
-
[ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
`$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). NEVER push the default branch.
|
|
15
|
-
|
|
16
|
-
### Step 2: Capture screenshots (if UI changes exist)
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
browser_navigate url="http://localhost:{port}/{route}"
|
|
20
|
-
browser_wait ms=2000
|
|
21
|
-
browser_screenshot
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
25
|
-
|
|
26
|
-
### Step 3: Commit and push
|
|
27
|
-
|
|
28
|
-
The `pc-plan-apply` skill already committed each task group: usually only screenshots or small residuals remain. Stage **specific paths only** (never `git add -A`, it sweeps unrelated files into the ship commit):
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
|
|
32
|
-
git commit -m "{change}: {summary}" # only if there is something to commit
|
|
33
|
-
git push -u origin "$BRANCH"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Step 4: Upload screenshots (if any)
|
|
37
|
-
|
|
38
|
-
If screenshots exist, upload them so they can be referenced in the MR description:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
glab api --method POST "projects/:id/uploads" -f "file=@openspec/changes/{change-name}/images/{feature}.png"
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
(`:id` is glab's placeholder for the current project: this is the one sanctioned use of git context in this skill.)
|
|
45
|
-
|
|
46
|
-
Parse the returned `markdown` field: use it to embed the image in the MR description. If the upload fails (the endpoint needs multipart form data and `-f` support varies by glab version), fall back to referencing the image committed on the branch instead.
|
|
47
|
-
|
|
48
|
-
If no UI changes, skip this step.
|
|
49
|
-
|
|
50
|
-
### Step 5: Create Merge Request
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
glab mr create \
|
|
54
|
-
--source-branch "$BRANCH" \
|
|
55
|
-
--target-branch "$DEFAULT_BRANCH" \
|
|
56
|
-
--title "{title}" \
|
|
57
|
-
--description "Closes {issue-link}
|
|
58
|
-
|
|
59
|
-
## Summary
|
|
60
|
-
{summary from proposal.md}
|
|
61
|
-
|
|
62
|
-
## Changes
|
|
63
|
-
{key changes from tasks.md}
|
|
64
|
-
|
|
65
|
-
## Test plan
|
|
66
|
-
- [ ] {checklist of manual verification steps}
|
|
67
|
-
{screenshots if available}" \
|
|
68
|
-
--remove-source-branch \
|
|
69
|
-
--squash-before-merge
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Do NOT use `--yes` unless running in autopilot/non-interactive mode.
|
|
73
|
-
|
|
74
|
-
### Step 6: Report
|
|
75
|
-
|
|
76
|
-
Display:
|
|
77
|
-
|
|
78
|
-
```text
|
|
79
|
-
Merge Request created
|
|
80
|
-
MR: {mr-url}
|
|
81
|
-
Title: {title}
|
|
82
|
-
Source: {branch}
|
|
83
|
-
Target: {default-branch}
|
|
84
|
-
```
|
|
85
|
-
|
|
1
|
+
**ALL GitLab data MUST come from `glab` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitLab operations, even if glab CLI fails. If `glab` is unavailable, report as a blocker.**
|
|
2
|
+
Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Step 1: Verify feature branch
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
BRANCH="$(git branch --show-current)"
|
|
10
|
+
DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
|
|
11
|
+
[ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). NEVER push the default branch.
|
|
15
|
+
|
|
16
|
+
### Step 2: Capture screenshots (if UI changes exist)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
browser_navigate url="http://localhost:{port}/{route}"
|
|
20
|
+
browser_wait ms=2000
|
|
21
|
+
browser_screenshot
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
25
|
+
|
|
26
|
+
### Step 3: Commit and push
|
|
27
|
+
|
|
28
|
+
The `pc-plan-apply` skill already committed each task group: usually only screenshots or small residuals remain. Stage **specific paths only** (never `git add -A`, it sweeps unrelated files into the ship commit):
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
|
|
32
|
+
git commit -m "{change}: {summary}" # only if there is something to commit
|
|
33
|
+
git push -u origin "$BRANCH"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Step 4: Upload screenshots (if any)
|
|
37
|
+
|
|
38
|
+
If screenshots exist, upload them so they can be referenced in the MR description:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
glab api --method POST "projects/:id/uploads" -f "file=@openspec/changes/{change-name}/images/{feature}.png"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
(`:id` is glab's placeholder for the current project: this is the one sanctioned use of git context in this skill.)
|
|
45
|
+
|
|
46
|
+
Parse the returned `markdown` field: use it to embed the image in the MR description. If the upload fails (the endpoint needs multipart form data and `-f` support varies by glab version), fall back to referencing the image committed on the branch instead.
|
|
47
|
+
|
|
48
|
+
If no UI changes, skip this step.
|
|
49
|
+
|
|
50
|
+
### Step 5: Create Merge Request
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
glab mr create \
|
|
54
|
+
--source-branch "$BRANCH" \
|
|
55
|
+
--target-branch "$DEFAULT_BRANCH" \
|
|
56
|
+
--title "{title}" \
|
|
57
|
+
--description "Closes {issue-link}
|
|
58
|
+
|
|
59
|
+
## Summary
|
|
60
|
+
{summary from proposal.md}
|
|
61
|
+
|
|
62
|
+
## Changes
|
|
63
|
+
{key changes from tasks.md}
|
|
64
|
+
|
|
65
|
+
## Test plan
|
|
66
|
+
- [ ] {checklist of manual verification steps}
|
|
67
|
+
{screenshots if available}" \
|
|
68
|
+
--remove-source-branch \
|
|
69
|
+
--squash-before-merge
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Do NOT use `--yes` unless running in autopilot/non-interactive mode.
|
|
73
|
+
|
|
74
|
+
### Step 6: Report
|
|
75
|
+
|
|
76
|
+
Display:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
Merge Request created
|
|
80
|
+
MR: {mr-url}
|
|
81
|
+
Title: {title}
|
|
82
|
+
Source: {branch}
|
|
83
|
+
Target: {default-branch}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
86
|
---
|
package/src/index.js
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import chalk from 'chalk'
|
|
3
|
-
import { createRequire } from 'node:module'
|
|
4
|
-
import { runJoin } from './commands/join.js'
|
|
5
|
-
import { runUpdate } from './commands/update.js'
|
|
6
|
-
import { runSingleCommand } from './commands/single.js'
|
|
7
|
-
import { runWizard } from './commands/wizard.js'
|
|
8
|
-
import { exit } from './utils/process.js'
|
|
9
|
-
import { findLegacyInstall } from './utils/legacy-check.js'
|
|
10
|
-
|
|
11
|
-
function printHelp(version) {
|
|
12
|
-
console.log(`agent-harness v${version}`)
|
|
13
|
-
console.log()
|
|
14
|
-
console.log('Usage:')
|
|
15
|
-
console.log(' npx @plainconceptsplatform/agent-harness Install the harness (full wizard)')
|
|
16
|
-
console.log(' npx @plainconceptsplatform/agent-harness <command> Run a single step command')
|
|
17
|
-
console.log()
|
|
18
|
-
console.log('Commands:')
|
|
19
|
-
console.log(' update Bring the harness up to date from saved config (no prompts)')
|
|
20
|
-
console.log(' join Set up a teammate\'s machine (checks & local installs only)')
|
|
21
|
-
console.log(' clean Run AI files cleanup step')
|
|
22
|
-
console.log(' platform Run platform selection step')
|
|
23
|
-
console.log(' copy Run content copy step')
|
|
24
|
-
console.log(' openspec Run OpenSpec initialization step')
|
|
25
|
-
console.log(' models Run models selection step')
|
|
26
|
-
console.log(' optimization Run token optimization tools step')
|
|
27
|
-
console.log(' browser Run opencode-browser installer step')
|
|
28
|
-
console.log(' metadata Write onboarding metadata step')
|
|
29
|
-
console.log()
|
|
30
|
-
console.log('Options:')
|
|
31
|
-
console.log(' -h, --help Show this help message')
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (process.stdout.isTTY) console.clear()
|
|
35
|
-
console.log()
|
|
36
|
-
const require = createRequire(import.meta.url)
|
|
37
|
-
const { version } = require('../package.json')
|
|
38
|
-
const args = process.argv.slice(2)
|
|
39
|
-
|
|
40
|
-
if (args.includes('-h') || args.includes('--help')) {
|
|
41
|
-
printHelp(version)
|
|
42
|
-
exit()
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async function refuseLegacyInstall() {
|
|
46
|
-
const legacy = await findLegacyInstall()
|
|
47
|
-
if (!legacy) return false
|
|
48
|
-
|
|
49
|
-
console.log(chalk.red('This project was set up by opencode-onboard v1.'))
|
|
50
|
-
console.log()
|
|
51
|
-
if (legacy.files.length > 0) console.log(chalk.dim(` config: ${legacy.files.join(', ')}`))
|
|
52
|
-
if (legacy.skills.length > 0) {
|
|
53
|
-
const shown = legacy.skills.slice(0, 3).join(', ')
|
|
54
|
-
const rest = legacy.skills.length > 3 ? `, +${legacy.skills.length - 3} more` : ''
|
|
55
|
-
console.log(chalk.dim(` skills: ${shown}${rest}`))
|
|
56
|
-
}
|
|
57
|
-
console.log()
|
|
58
|
-
console.log('agent-harness v2 renamed both the config files and the skill prefix,')
|
|
59
|
-
console.log('and it does not migrate v1 projects. Continuing would leave the harness')
|
|
60
|
-
console.log('half-patched without reporting an error.')
|
|
61
|
-
console.log()
|
|
62
|
-
console.log('Re-onboard on a clean branch instead:')
|
|
63
|
-
console.log(chalk.dim(' git switch -c chore/agent-harness'))
|
|
64
|
-
console.log(chalk.dim(' rm -rf .opencode .agents/skills/ob-*'))
|
|
65
|
-
console.log(chalk.dim(' npx @plainconceptsplatform/agent-harness'))
|
|
66
|
-
return true
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Ctrl-C out of an @inquirer prompt throws ExitPromptError; that is a normal
|
|
70
|
-
// cancellation, not a crash, so it must not exit non-zero.
|
|
71
|
-
async function main() {
|
|
72
|
-
if (await refuseLegacyInstall()) {
|
|
73
|
-
exit(1)
|
|
74
|
-
return
|
|
75
|
-
}
|
|
76
|
-
if (args.length === 0) {
|
|
77
|
-
await runWizard(version)
|
|
78
|
-
return
|
|
79
|
-
}
|
|
80
|
-
if (args[0] === 'join') {
|
|
81
|
-
await runJoin()
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
if (args[0] === 'update') {
|
|
85
|
-
await runUpdate()
|
|
86
|
-
return
|
|
87
|
-
}
|
|
88
|
-
if (!await runSingleCommand(args[0])) {
|
|
89
|
-
console.log(chalk.red(`Unknown command: ${args[0]}`))
|
|
90
|
-
console.log()
|
|
91
|
-
printHelp(version)
|
|
92
|
-
exit(1)
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
try {
|
|
97
|
-
await main()
|
|
98
|
-
} catch (err) {
|
|
99
|
-
if (err.name === 'ExitPromptError') {
|
|
100
|
-
console.log()
|
|
101
|
-
console.log(chalk.yellow('Cancelled.'))
|
|
102
|
-
} else {
|
|
103
|
-
console.error(chalk.red('\nUnexpected error:'), err.message)
|
|
104
|
-
exit(1)
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
exit()
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import chalk from 'chalk'
|
|
3
|
+
import { createRequire } from 'node:module'
|
|
4
|
+
import { runJoin } from './commands/join.js'
|
|
5
|
+
import { runUpdate } from './commands/update.js'
|
|
6
|
+
import { runSingleCommand } from './commands/single.js'
|
|
7
|
+
import { runWizard } from './commands/wizard.js'
|
|
8
|
+
import { exit } from './utils/process.js'
|
|
9
|
+
import { findLegacyInstall } from './utils/legacy-check.js'
|
|
10
|
+
|
|
11
|
+
function printHelp(version) {
|
|
12
|
+
console.log(`agent-harness v${version}`)
|
|
13
|
+
console.log()
|
|
14
|
+
console.log('Usage:')
|
|
15
|
+
console.log(' npx @plainconceptsplatform/agent-harness Install the harness (full wizard)')
|
|
16
|
+
console.log(' npx @plainconceptsplatform/agent-harness <command> Run a single step command')
|
|
17
|
+
console.log()
|
|
18
|
+
console.log('Commands:')
|
|
19
|
+
console.log(' update Bring the harness up to date from saved config (no prompts)')
|
|
20
|
+
console.log(' join Set up a teammate\'s machine (checks & local installs only)')
|
|
21
|
+
console.log(' clean Run AI files cleanup step')
|
|
22
|
+
console.log(' platform Run platform selection step')
|
|
23
|
+
console.log(' copy Run content copy step')
|
|
24
|
+
console.log(' openspec Run OpenSpec initialization step')
|
|
25
|
+
console.log(' models Run models selection step')
|
|
26
|
+
console.log(' optimization Run token optimization tools step')
|
|
27
|
+
console.log(' browser Run opencode-browser installer step')
|
|
28
|
+
console.log(' metadata Write onboarding metadata step')
|
|
29
|
+
console.log()
|
|
30
|
+
console.log('Options:')
|
|
31
|
+
console.log(' -h, --help Show this help message')
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (process.stdout.isTTY) console.clear()
|
|
35
|
+
console.log()
|
|
36
|
+
const require = createRequire(import.meta.url)
|
|
37
|
+
const { version } = require('../package.json')
|
|
38
|
+
const args = process.argv.slice(2)
|
|
39
|
+
|
|
40
|
+
if (args.includes('-h') || args.includes('--help')) {
|
|
41
|
+
printHelp(version)
|
|
42
|
+
exit()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function refuseLegacyInstall() {
|
|
46
|
+
const legacy = await findLegacyInstall()
|
|
47
|
+
if (!legacy) return false
|
|
48
|
+
|
|
49
|
+
console.log(chalk.red('This project was set up by opencode-onboard v1.'))
|
|
50
|
+
console.log()
|
|
51
|
+
if (legacy.files.length > 0) console.log(chalk.dim(` config: ${legacy.files.join(', ')}`))
|
|
52
|
+
if (legacy.skills.length > 0) {
|
|
53
|
+
const shown = legacy.skills.slice(0, 3).join(', ')
|
|
54
|
+
const rest = legacy.skills.length > 3 ? `, +${legacy.skills.length - 3} more` : ''
|
|
55
|
+
console.log(chalk.dim(` skills: ${shown}${rest}`))
|
|
56
|
+
}
|
|
57
|
+
console.log()
|
|
58
|
+
console.log('agent-harness v2 renamed both the config files and the skill prefix,')
|
|
59
|
+
console.log('and it does not migrate v1 projects. Continuing would leave the harness')
|
|
60
|
+
console.log('half-patched without reporting an error.')
|
|
61
|
+
console.log()
|
|
62
|
+
console.log('Re-onboard on a clean branch instead:')
|
|
63
|
+
console.log(chalk.dim(' git switch -c chore/agent-harness'))
|
|
64
|
+
console.log(chalk.dim(' rm -rf .opencode .agents/skills/ob-*'))
|
|
65
|
+
console.log(chalk.dim(' npx @plainconceptsplatform/agent-harness'))
|
|
66
|
+
return true
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Ctrl-C out of an @inquirer prompt throws ExitPromptError; that is a normal
|
|
70
|
+
// cancellation, not a crash, so it must not exit non-zero.
|
|
71
|
+
async function main() {
|
|
72
|
+
if (await refuseLegacyInstall()) {
|
|
73
|
+
exit(1)
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
if (args.length === 0) {
|
|
77
|
+
await runWizard(version)
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
if (args[0] === 'join') {
|
|
81
|
+
await runJoin()
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
if (args[0] === 'update') {
|
|
85
|
+
await runUpdate()
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
if (!await runSingleCommand(args[0])) {
|
|
89
|
+
console.log(chalk.red(`Unknown command: ${args[0]}`))
|
|
90
|
+
console.log()
|
|
91
|
+
printHelp(version)
|
|
92
|
+
exit(1)
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
await main()
|
|
98
|
+
} catch (err) {
|
|
99
|
+
if (err.name === 'ExitPromptError') {
|
|
100
|
+
console.log()
|
|
101
|
+
console.log(chalk.yellow('Cancelled.'))
|
|
102
|
+
} else {
|
|
103
|
+
console.error(chalk.red('\nUnexpected error:'), err.message)
|
|
104
|
+
exit(1)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exit()
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
"platform": {
|
|
3
|
-
"none": {
|
|
4
|
-
"devopsSkills": "- Selected platform: `none` (from onboarding platform step).\n- Do NOT load `pc-userstory` or `pc-ops-ship`.\n- Work only from direct user instructions in the main conversation or from local OpenSpec artifacts.\n- Ignore GitHub/Azure DevOps URL inference unless the user explicitly reconfigures onboarding later.",
|
|
5
|
-
"devopsMode": "This project does not use GitHub or Azure DevOps integration. Do not read work items, create PRs, or process PR feedback. Operate only from direct user instructions and local repository context.",
|
|
6
|
-
"workflow": "When the user gives a task directly in the conversation, **I own the full lifecycle**. I work from the user request and local repository context. I may use OpenSpec when structured planning helps, but I do not depend on issue links or PR workflows.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User describes a feature, bug, or refactor directly → clarify if needed → optionally load the `pc-plan-propose` skill → implement in the main session or `pc-plan-apply` as appropriate\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill against the current OpenSpec change when one exists\n- `just do it` / `quick fix` / `raw conversation` → work directly in the main session without PR or work-item automation\n\n**GitHub Issue URLs, Azure DevOps work item URLs, and PR URLs are NOT automatic triggers in this mode.** Only use platform-specific flows if onboarding is later reconfigured for GitHub or Azure DevOps.",
|
|
7
|
-
"pipeline": "```\nlead (main session)\n → pc-plan-propose (propose + enrich tasks)\n ↓\n [confirm when scope needs it]\n ↓\n*-engineer specialists (parallel via pc-plan-apply)\n → implement assigned tasks (parallel waves)\n ↓\nlead verifies and reports to user\n```\n\n### Phase 1, Clarify & Plan\n\n```\n1. Understand the task from the conversation and local repo context.\n2. If the work benefits from explicit specs/tasks, load the pc-plan-propose skill.\n Enrich tasks.md: assign each task its best matching engineer (the engineer's tier sets the model) plus depends_on and touches.\n3. Show the plan or intended scope when non-trivial.\n4. If the request is small, implement directly in the main session.\n```\n\n### Phase 2, Implement\n\n```\n0. Run /quota before spawning, when available.\n1. If using OpenSpec tasks, load the pc-plan-apply skill.\n - Classify cost tier, confirm if ≥4 tasks.\n - Lead discovers engineers, builds dependency- and file-disjoint waves, and spawns each wave as parallel subagents.\n - Each subagent implements its assigned tasks and returns; the lead commits each group and marks tasks done.\n2. If task is small, implement directly in the main session.\n3. Verify with tests/build/lint.\n```\n\nThere is no PR shipping phase in `none` mode. Report completion directly to the user.",
|
|
8
|
-
"skillsGuide": "No platform skills installed (platform: none). Work from direct user instructions and local OpenSpec artifacts only."
|
|
9
|
-
},
|
|
10
|
-
"azure": {
|
|
11
|
-
"devopsSkills": "- Selected platform: `azure` (from onboarding platform step).\n- Load Azure DevOps skills: `pc-userstory`, `pc-ops-ship`.\n- Use URL-based platform inference only if onboarding metadata is missing or ambiguous.",
|
|
12
|
-
"devopsMode": "This project uses platform-integrated workflow modes described below.",
|
|
13
|
-
"workflow": "When the user provides a work item URL or says \"implement the plan\" or \"I've added comments to the PR\", **I own the full lifecycle**. I load the appropriate userstory skill and coordinate implementation as native subagent waves via the `pc-plan-apply` skill.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions an Azure DevOps URL → load `pc-userstory` skill → parse work item → load the `pc-plan-propose` skill → confirm with user → load the `pc-plan-apply` skill → ship\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill → ship\n- `I've added comments to the PR` → read PR comments → fix → update PR\n- Any Azure DevOps PR URL in a feedback/fix request (e.g. \"check comments\", \"fix PR feedback\") → run PR Feedback Loop\n\n**An Azure DevOps URL in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**",
|
|
14
|
-
"pipeline": "```\nlead (main session)\n → pc-plan-propose (parse work item + propose + enrich tasks)\n ↓\n [confirm with user]\n ↓\n*-engineer specialists (parallel via pc-plan-apply)\n → implement assigned tasks (parallel waves)\n ↓\nlead loads the pc-ops-ship skill → commit + push + create PR\n```\n\n### Phase 1, Parse & Propose\n\n```\n1. If a work item URL is provided, load @pc-userstory skill.\n2. Load the pc-plan-propose skill → fetches work item, generates proposal.md, specs/, tasks.md, enriches tasks with agent + dependencies.\n3. Show the plan: change name, total tasks, task list with agent assignments.\n4. STOP. Ask user: \"Ready to implement? (yes/no)\", DO NOT proceed until confirmed.\n```\n\n### Phase 2, Implement\n\n```\n0. Run /quota to check remaining budget before spawning.\n1. Load the pc-plan-apply skill.\n - Classify cost tier, announce scope, ask user to confirm if ≥4 tasks.\n - Lead discovers available engineers from .opencode/agents/*.md, prefers matching custom engineers.\n - Lead builds dependency- and file-disjoint waves, then spawns each wave as parallel subagents (by agent name; each engineer carries its own model).\n - Each subagent implements its assigned tasks and returns; the lead commits each group and marks tasks done in tasks.md.\n2. Verify with tests/build/lint according to task scope.\n3. Run /quota after all waves complete.\n```\n\n### Phase 3, Ship\n\n```\n1. Load the pc-ops-ship skill to create the PR.\n2. Done: report PR URL to user.\n```\n\n### Handling PR Feedback\n\n```\nWhen user says \"I've added comments to the PR\" or shares a PR URL:\n1. Triage feedback: read and classify the PR comments via the repo platform CLI (the /ops-review flow).\n2. Fix items by loading the pc-plan-apply skill for the required tasks.\n3. Load the pc-ops-ship skill again to push updates and reply to PR threads.\n```",
|
|
15
|
-
"skillsGuide": "Platform skills (Azure DevOps):\n- `@pc-userstory`: load when an Azure DevOps work item URL is detected. Fetches the work item via `az` CLI and creates an OpenSpec change. NEVER use browser tools for Azure DevOps operations.\n- `pc-ops-ship`: load in ship mode to create a PR and link the work item, or in feedback mode to read and classify PR review comments."
|
|
16
|
-
},
|
|
17
|
-
"github": {
|
|
18
|
-
"devopsSkills": "- Selected platform: `github` (from onboarding platform step).\n- Load GitHub skills: `pc-userstory`, `pc-ops-ship`.\n- Use URL-based platform inference only if onboarding metadata is missing or ambiguous.",
|
|
19
|
-
"devopsMode": "This project uses platform-integrated workflow modes described below.",
|
|
20
|
-
"workflow": "When the user provides a work item URL or says \"implement the plan\" or \"I've added comments to the PR\", **I own the full lifecycle**. I load the appropriate userstory skill and coordinate implementation as native subagent waves via the `pc-plan-apply` skill.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions a GitHub Issue URL → load `pc-userstory` skill → parse issue → load the `pc-plan-propose` skill → confirm with user → load the `pc-plan-apply` skill → ship\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill → ship\n- `I've added comments to the PR` → read PR comments → fix → update PR\n- Any GitHub PR URL in a feedback/fix request (e.g. \"check comments\", \"fix PR feedback\") → run PR Feedback Loop\n\n**A GitHub URL in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**",
|
|
21
|
-
"pipeline": "```\nlead (main session)\n → pc-plan-propose (parse work item + propose + enrich tasks)\n ↓\n [confirm with user]\n ↓\n*-engineer specialists (parallel via pc-plan-apply)\n → implement assigned tasks (parallel waves)\n ↓\nlead loads the pc-ops-ship skill → commit + push + create PR\n```\n\n### Phase 1, Parse & Propose\n\n```\n1. If a work item URL is provided, load @pc-userstory skill.\n2. Load the pc-plan-propose skill → fetches work item, generates proposal.md, specs/, tasks.md, enriches tasks with agent + dependencies.\n3. Show the plan: change name, total tasks, task list with agent assignments.\n4. STOP. Ask user: \"Ready to implement? (yes/no)\", DO NOT proceed until confirmed.\n```\n\n### Phase 2, Implement\n\n```\n0. Run /quota to check remaining budget before spawning.\n1. Load the pc-plan-apply skill.\n - Classify cost tier, announce scope, ask user to confirm if ≥4 tasks.\n - Lead discovers available engineers from .opencode/agents/*.md, prefers matching custom engineers.\n - Lead builds dependency- and file-disjoint waves, then spawns each wave as parallel subagents (by agent name; each engineer carries its own model).\n - Each subagent implements its assigned tasks and returns; the lead commits each group and marks tasks done in tasks.md.\n2. Verify with tests/build/lint according to task scope.\n3. Run /quota after all waves complete.\n```\n\n### Phase 3, Ship\n\n```\n1. Load the pc-ops-ship skill to create the PR.\n2. Done: report PR URL to user.\n```\n\n### Handling PR Feedback\n\n```\nWhen user says \"I've added comments to the PR\" or shares a PR URL:\n1. Triage feedback: read and classify the PR comments via the repo platform CLI (the /ops-review flow).\n2. Fix items by loading the pc-plan-apply skill for the required tasks.\n3. Load the pc-ops-ship skill again to push updates and reply to PR threads.\n```",
|
|
22
|
-
"skillsGuide": "Platform skills (GitHub):\n- `@pc-userstory`: load when a GitHub Issue URL is detected. Fetches the issue via `gh` CLI and creates an OpenSpec change. NEVER use webfetch to access GitHub URLs.\n- `pc-ops-ship`: load in ship mode to create a PR with screenshots, or in feedback mode to read and classify PR review comments."
|
|
23
|
-
},
|
|
24
|
-
"mixed": {
|
|
25
|
-
"default": {
|
|
26
|
-
"workflow": "This project uses a mixed-platform setup: the backlog (work items) and the repo (PRs) live on different platforms. Check `.opencode/harness.json` → `platform.backlog` and `platform.repo`.\n\nWhen the user provides a work item URL or says \"implement the plan\" or \"I've added comments to the PR\", **I own the full lifecycle**: parse the work item with `@pc-userstory` (backlog platform CLI), plan via the `pc-plan-propose` skill, confirm with the user, implement via the `pc-plan-apply` skill, ship via the `pc-ops-ship` skill (repo platform CLI).\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- A backlog work-item URL or issue key → load `pc-userstory` → parse → load the `pc-plan-propose` skill → confirm with user → load the `pc-plan-apply` skill → ship\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill → ship\n- A PR/MR URL or \"I've added comments to the PR\" → read the PR comments via the repo platform CLI → run the PR Feedback Loop\n\nNever mix the CLIs: work items always go through the backlog platform CLI, PRs/MRs always through the repo platform CLI.",
|
|
27
|
-
"pipeline": "{repo}",
|
|
28
|
-
"skillsGuide": "Mixed platform setup: the two platform skills target different hosts:\n- `@pc-userstory` → fetches work items from the backlog platform. Load when a work-item URL or issue key is provided.\n- `pc-ops-ship` → creates PRs/MRs and triages review feedback on the repo platform. Load in ship mode or PR-feedback mode."
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"jira": {
|
|
32
|
-
"devopsSkills": "- Selected backlog platform: `jira` (from onboarding platform step).\n- Jira is a BACKLOG-ONLY platform. Work items are fetched via `acli jira` CLI.\n- PRs and code review use the repo platform (GitHub or Azure DevOps) configured separately.\n- Load `pc-userstory` skill when a Jira URL is provided.\n- Load `pc-ops-ship` skill from the repo platform for PR operations.",
|
|
33
|
-
"devopsMode": "This project uses Jira for backlog/work items and a separate repo platform (GitHub or Azure DevOps) for code. Fetch work items via `acli jira` CLI. Create PRs via the repo platform CLI. Do NOT use browser tools for Jira operations.",
|
|
34
|
-
"workflow": "When the user provides a Jira URL or mentions a Jira issue key, **I own the full lifecycle**. I load `pc-userstory` skill to parse the Jira issue via `acli jira workitem view`, then load the `pc-plan-propose` skill to create the plan.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions a Jira URL (atlassian.net/browse/PROJ-123) -> load `pc-userstory` skill -> fetch via `acli jira` -> load the `pc-plan-propose` skill -> confirm -> load the `pc-plan-apply` skill -> ship\n- User mentions a Jira issue key (e.g. \"PROJ-123\") -> same flow\n- `implement the plan` / `implement` / `start` / `go` -> load the `pc-plan-apply` skill -> ship\n- PR feedback -> use the repo platform CLI (gh or az) for PR operations\n\n**A Jira URL or issue key in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**\n\nFor PR creation and code review, use the repo platform (configured as `platform.repo`). Jira has no PR capability.",
|
|
35
|
-
"pipeline": "```\nlead (main session)\n -> fetch Jira work item (acli jira workitem view)\n -> pc-plan-propose (propose + enrich tasks)\n |\n [confirm when scope needs it]\n |\n*-engineer specialists (parallel via pc-plan-apply)\n -> implement assigned tasks (parallel waves)\n |\nlead verifies, creates PR via repo platform (gh or az)\n -> transition Jira work item to Done (acli jira workitem transition)\n```\n\n### Phase 1, Fetch & Plan\n\n```\n1. Fetch the Jira work item via acli jira workitem view --key KEY.\n2. Load the pc-plan-propose skill to create the OpenSpec change from the work item.\n3. Confirm with the user.\n```\n\n### Phase 2, Implement & Ship\n\n```\n1. Load the pc-plan-apply skill to implement via parallel subagent waves.\n2. Create PR via repo platform CLI (gh pr create or az repos pr create).\n3. Transition Jira work item: acli jira workitem transition --key KEY --status \"Done\"\n```",
|
|
36
|
-
"skillsGuide": "### Backlog Platform: Jira\n- `pc-userstory` -> fetches Jira work items via `acli jira` CLI. Load when a Jira URL or issue key is provided.\n\n### Repo Platform\n- PR skills are loaded based on `platform.repo` (GitHub or Azure DevOps)."
|
|
37
|
-
},
|
|
38
|
-
"gitlab": {
|
|
39
|
-
"devopsSkills": "- Selected repo platform: `gitlab` (from onboarding platform step).\n- GitLab is a REPO-ONLY platform. MRs and code review via `glab` CLI.\n- Backlog/work items use the backlog platform (GitHub / Azure / Jira) configured separately.\n- Load `pc-ops-ship` skill for GitLab MR operations.",
|
|
40
|
-
"devopsMode": "This project uses GitLab for code repository and merge requests, with a separate backlog platform for work items. Create MRs via `glab mr create` CLI. Fetch work items via the backlog platform CLI. Do NOT use browser tools for GitLab operations.",
|
|
41
|
-
"workflow": "When the user provides a GitLab MR URL or says \"implement the plan\", **I own the full lifecycle**. I load the appropriate userstory skill (from backlog platform) and `pc-ops-ship` skill (for GitLab MRs).\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions a backlog work item URL -> load `pc-userstory` skill -> fetch via backlog CLI -> load the `pc-plan-propose` skill -> confirm -> load the `pc-plan-apply` skill -> ship\n- `implement the plan` / `implement` / `start` / `go` -> load the `pc-plan-apply` skill -> ship\n- User says \"I've added comments to the MR\" -> read MR comments via `glab mr note list` -> triage feedback\n- Any GitLab MR URL in a feedback/fix request -> run MR Feedback Loop via `glab` CLI\n\n**A GitLab MR URL in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**\n\nFor work item fetching, use the backlog platform (configured as `platform.backlog`). GitLab has no backlog integration.",
|
|
42
|
-
"pipeline": "```\nlead (main session)\n -> fetch work item (backlog platform CLI: gh / az / acli)\n -> pc-plan-propose (propose + enrich tasks)\n |\n [confirm when scope needs it]\n |\n*-engineer specialists (parallel via pc-plan-apply)\n -> implement assigned tasks (parallel waves)\n |\nlead verifies, creates MR via GitLab (glab mr create)\n```\n\n### Phase 1, Fetch & Plan\n\n```\n1. Fetch the work item via backlog platform CLI.\n2. Load the pc-plan-propose skill to create the OpenSpec change.\n3. Confirm with the user.\n```\n\n### Phase 2, Implement & Ship\n\n```\n1. Load the pc-plan-apply skill to implement via parallel subagent waves.\n2. Create MR via glab mr create.\n3. Archive change after MR is merged.\n```",
|
|
43
|
-
"skillsGuide": "### Repo Platform: GitLab\n- `pc-ops-ship` -> creates GitLab merge requests via `glab` CLI. Load when shipping a branch or processing MR feedback.\n\n### Backlog Platform\n- Work item skills are loaded based on `platform.backlog` (GitHub / Azure / Jira)."
|
|
44
|
-
},
|
|
45
|
-
"browser": {
|
|
46
|
-
"devopsSkills": "- Selected backlog platform: `browser` (from onboarding platform step).\n- No CLI integration for the backlog system. Work items are fetched via opencode-browser plugin.\n- The `pc-userstory` skill navigates to work item URLs the user provides and reads page content.\n- PRs and code review use the repo platform (GitHub / Azure DevOps / GitLab) configured separately.",
|
|
47
|
-
"devopsMode": "This project uses browser automation for backlog/work items (no CLI) and a separate repo platform for code. Work items are read from web pages using the opencode-browser plugin. Create PRs via the repo platform CLI. The browser navigation exception ONLY applies to work item URLs the user explicitly provides.",
|
|
48
|
-
"workflow": "When the user provides a work item URL from any backlog tool (Azure DevOps, Linear, Trello, etc.), **I own the full lifecycle**. I load `pc-userstory` skill to navigate to the URL via browser and read the page content.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes any URL to a work item/ticket/issue -> load `pc-userstory` skill -> navigate via browser -> read page text + snapshot -> parse work item -> load the `pc-plan-propose` skill -> confirm -> load the `pc-plan-apply` skill -> ship\n- `implement the plan` / `implement` / `start` / `go` -> load the `pc-plan-apply` skill -> ship\n- PR feedback -> use the repo platform CLI (gh, az, or glab) for PR operations\n\n**Any work item URL in the user's message is a trigger, regardless of the backlog tool it points to.**\n\nFor PR creation and code review, use the repo platform (configured as `platform.repo`). Browser is backlog-only: it has no PR capability.",
|
|
49
|
-
"pipeline": "```\nlead (main session)\n -> open work item URL in browser (browser_open_tab)\n -> read page content (browser_query mode=page_text + browser_snapshot)\n -> parse work item fields from page text\n -> pc-plan-propose (propose + enrich tasks)\n |\n [confirm when scope needs it]\n |\n*-engineer specialists (parallel via pc-plan-apply)\n -> implement assigned tasks (parallel waves)\n |\nlead verifies, creates PR via repo platform (gh / az / glab)\n```\n\n### Phase 1, Fetch & Plan\n\n```\n1. User provides a work item URL.\n2. Navigate to the URL via browser_open_tab.\n3. Read page text via browser_query mode=page_text.\n4. Take accessibility snapshot via browser_snapshot.\n5. Parse title, description, acceptance criteria from the page.\n6. Load the pc-plan-propose skill to create the OpenSpec change.\n7. Confirm with the user.\n```\n\n### Phase 2, Implement & Ship\n\n```\n1. Load the pc-plan-apply skill to implement via parallel subagent waves.\n2. Create PR via repo platform CLI (gh pr create, az repos pr create, or glab mr create).\n3. Archive change after PR is merged.\n```",
|
|
50
|
-
"skillsGuide": "### Backlog Platform: Others (Browser)\n- `pc-userstory` -> navigates to work item URLs via browser plugin, reads page content, creates OpenSpec changes. Load when a URL the user provides does not match GitHub/Azure/Jira CLI platforms.\n\n### Repo Platform\n- PR skills are loaded based on `platform.repo` (GitHub / Azure DevOps / GitLab)."
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"platform": {
|
|
3
|
+
"none": {
|
|
4
|
+
"devopsSkills": "- Selected platform: `none` (from onboarding platform step).\n- Do NOT load `pc-userstory` or `pc-ops-ship`.\n- Work only from direct user instructions in the main conversation or from local OpenSpec artifacts.\n- Ignore GitHub/Azure DevOps URL inference unless the user explicitly reconfigures onboarding later.",
|
|
5
|
+
"devopsMode": "This project does not use GitHub or Azure DevOps integration. Do not read work items, create PRs, or process PR feedback. Operate only from direct user instructions and local repository context.",
|
|
6
|
+
"workflow": "When the user gives a task directly in the conversation, **I own the full lifecycle**. I work from the user request and local repository context. I may use OpenSpec when structured planning helps, but I do not depend on issue links or PR workflows.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User describes a feature, bug, or refactor directly → clarify if needed → optionally load the `pc-plan-propose` skill → implement in the main session or `pc-plan-apply` as appropriate\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill against the current OpenSpec change when one exists\n- `just do it` / `quick fix` / `raw conversation` → work directly in the main session without PR or work-item automation\n\n**GitHub Issue URLs, Azure DevOps work item URLs, and PR URLs are NOT automatic triggers in this mode.** Only use platform-specific flows if onboarding is later reconfigured for GitHub or Azure DevOps.",
|
|
7
|
+
"pipeline": "```\nlead (main session)\n → pc-plan-propose (propose + enrich tasks)\n ↓\n [confirm when scope needs it]\n ↓\n*-engineer specialists (parallel via pc-plan-apply)\n → implement assigned tasks (parallel waves)\n ↓\nlead verifies and reports to user\n```\n\n### Phase 1, Clarify & Plan\n\n```\n1. Understand the task from the conversation and local repo context.\n2. If the work benefits from explicit specs/tasks, load the pc-plan-propose skill.\n Enrich tasks.md: assign each task its best matching engineer (the engineer's tier sets the model) plus depends_on and touches.\n3. Show the plan or intended scope when non-trivial.\n4. If the request is small, implement directly in the main session.\n```\n\n### Phase 2, Implement\n\n```\n0. Run /quota before spawning, when available.\n1. If using OpenSpec tasks, load the pc-plan-apply skill.\n - Classify cost tier, confirm if ≥4 tasks.\n - Lead discovers engineers, builds dependency- and file-disjoint waves, and spawns each wave as parallel subagents.\n - Each subagent implements its assigned tasks and returns; the lead commits each group and marks tasks done.\n2. If task is small, implement directly in the main session.\n3. Verify with tests/build/lint.\n```\n\nThere is no PR shipping phase in `none` mode. Report completion directly to the user.",
|
|
8
|
+
"skillsGuide": "No platform skills installed (platform: none). Work from direct user instructions and local OpenSpec artifacts only."
|
|
9
|
+
},
|
|
10
|
+
"azure": {
|
|
11
|
+
"devopsSkills": "- Selected platform: `azure` (from onboarding platform step).\n- Load Azure DevOps skills: `pc-userstory`, `pc-ops-ship`.\n- Use URL-based platform inference only if onboarding metadata is missing or ambiguous.",
|
|
12
|
+
"devopsMode": "This project uses platform-integrated workflow modes described below.",
|
|
13
|
+
"workflow": "When the user provides a work item URL or says \"implement the plan\" or \"I've added comments to the PR\", **I own the full lifecycle**. I load the appropriate userstory skill and coordinate implementation as native subagent waves via the `pc-plan-apply` skill.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions an Azure DevOps URL → load `pc-userstory` skill → parse work item → load the `pc-plan-propose` skill → confirm with user → load the `pc-plan-apply` skill → ship\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill → ship\n- `I've added comments to the PR` → read PR comments → fix → update PR\n- Any Azure DevOps PR URL in a feedback/fix request (e.g. \"check comments\", \"fix PR feedback\") → run PR Feedback Loop\n\n**An Azure DevOps URL in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**",
|
|
14
|
+
"pipeline": "```\nlead (main session)\n → pc-plan-propose (parse work item + propose + enrich tasks)\n ↓\n [confirm with user]\n ↓\n*-engineer specialists (parallel via pc-plan-apply)\n → implement assigned tasks (parallel waves)\n ↓\nlead loads the pc-ops-ship skill → commit + push + create PR\n```\n\n### Phase 1, Parse & Propose\n\n```\n1. If a work item URL is provided, load @pc-userstory skill.\n2. Load the pc-plan-propose skill → fetches work item, generates proposal.md, specs/, tasks.md, enriches tasks with agent + dependencies.\n3. Show the plan: change name, total tasks, task list with agent assignments.\n4. STOP. Ask user: \"Ready to implement? (yes/no)\", DO NOT proceed until confirmed.\n```\n\n### Phase 2, Implement\n\n```\n0. Run /quota to check remaining budget before spawning.\n1. Load the pc-plan-apply skill.\n - Classify cost tier, announce scope, ask user to confirm if ≥4 tasks.\n - Lead discovers available engineers from .opencode/agents/*.md, prefers matching custom engineers.\n - Lead builds dependency- and file-disjoint waves, then spawns each wave as parallel subagents (by agent name; each engineer carries its own model).\n - Each subagent implements its assigned tasks and returns; the lead commits each group and marks tasks done in tasks.md.\n2. Verify with tests/build/lint according to task scope.\n3. Run /quota after all waves complete.\n```\n\n### Phase 3, Ship\n\n```\n1. Load the pc-ops-ship skill to create the PR.\n2. Done: report PR URL to user.\n```\n\n### Handling PR Feedback\n\n```\nWhen user says \"I've added comments to the PR\" or shares a PR URL:\n1. Triage feedback: read and classify the PR comments via the repo platform CLI (the /ops-review flow).\n2. Fix items by loading the pc-plan-apply skill for the required tasks.\n3. Load the pc-ops-ship skill again to push updates and reply to PR threads.\n```",
|
|
15
|
+
"skillsGuide": "Platform skills (Azure DevOps):\n- `@pc-userstory`: load when an Azure DevOps work item URL is detected. Fetches the work item via `az` CLI and creates an OpenSpec change. NEVER use browser tools for Azure DevOps operations.\n- `pc-ops-ship`: load in ship mode to create a PR and link the work item, or in feedback mode to read and classify PR review comments."
|
|
16
|
+
},
|
|
17
|
+
"github": {
|
|
18
|
+
"devopsSkills": "- Selected platform: `github` (from onboarding platform step).\n- Load GitHub skills: `pc-userstory`, `pc-ops-ship`.\n- Use URL-based platform inference only if onboarding metadata is missing or ambiguous.",
|
|
19
|
+
"devopsMode": "This project uses platform-integrated workflow modes described below.",
|
|
20
|
+
"workflow": "When the user provides a work item URL or says \"implement the plan\" or \"I've added comments to the PR\", **I own the full lifecycle**. I load the appropriate userstory skill and coordinate implementation as native subagent waves via the `pc-plan-apply` skill.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions a GitHub Issue URL → load `pc-userstory` skill → parse issue → load the `pc-plan-propose` skill → confirm with user → load the `pc-plan-apply` skill → ship\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill → ship\n- `I've added comments to the PR` → read PR comments → fix → update PR\n- Any GitHub PR URL in a feedback/fix request (e.g. \"check comments\", \"fix PR feedback\") → run PR Feedback Loop\n\n**A GitHub URL in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**",
|
|
21
|
+
"pipeline": "```\nlead (main session)\n → pc-plan-propose (parse work item + propose + enrich tasks)\n ↓\n [confirm with user]\n ↓\n*-engineer specialists (parallel via pc-plan-apply)\n → implement assigned tasks (parallel waves)\n ↓\nlead loads the pc-ops-ship skill → commit + push + create PR\n```\n\n### Phase 1, Parse & Propose\n\n```\n1. If a work item URL is provided, load @pc-userstory skill.\n2. Load the pc-plan-propose skill → fetches work item, generates proposal.md, specs/, tasks.md, enriches tasks with agent + dependencies.\n3. Show the plan: change name, total tasks, task list with agent assignments.\n4. STOP. Ask user: \"Ready to implement? (yes/no)\", DO NOT proceed until confirmed.\n```\n\n### Phase 2, Implement\n\n```\n0. Run /quota to check remaining budget before spawning.\n1. Load the pc-plan-apply skill.\n - Classify cost tier, announce scope, ask user to confirm if ≥4 tasks.\n - Lead discovers available engineers from .opencode/agents/*.md, prefers matching custom engineers.\n - Lead builds dependency- and file-disjoint waves, then spawns each wave as parallel subagents (by agent name; each engineer carries its own model).\n - Each subagent implements its assigned tasks and returns; the lead commits each group and marks tasks done in tasks.md.\n2. Verify with tests/build/lint according to task scope.\n3. Run /quota after all waves complete.\n```\n\n### Phase 3, Ship\n\n```\n1. Load the pc-ops-ship skill to create the PR.\n2. Done: report PR URL to user.\n```\n\n### Handling PR Feedback\n\n```\nWhen user says \"I've added comments to the PR\" or shares a PR URL:\n1. Triage feedback: read and classify the PR comments via the repo platform CLI (the /ops-review flow).\n2. Fix items by loading the pc-plan-apply skill for the required tasks.\n3. Load the pc-ops-ship skill again to push updates and reply to PR threads.\n```",
|
|
22
|
+
"skillsGuide": "Platform skills (GitHub):\n- `@pc-userstory`: load when a GitHub Issue URL is detected. Fetches the issue via `gh` CLI and creates an OpenSpec change. NEVER use webfetch to access GitHub URLs.\n- `pc-ops-ship`: load in ship mode to create a PR with screenshots, or in feedback mode to read and classify PR review comments."
|
|
23
|
+
},
|
|
24
|
+
"mixed": {
|
|
25
|
+
"default": {
|
|
26
|
+
"workflow": "This project uses a mixed-platform setup: the backlog (work items) and the repo (PRs) live on different platforms. Check `.opencode/harness.json` → `platform.backlog` and `platform.repo`.\n\nWhen the user provides a work item URL or says \"implement the plan\" or \"I've added comments to the PR\", **I own the full lifecycle**: parse the work item with `@pc-userstory` (backlog platform CLI), plan via the `pc-plan-propose` skill, confirm with the user, implement via the `pc-plan-apply` skill, ship via the `pc-ops-ship` skill (repo platform CLI).\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- A backlog work-item URL or issue key → load `pc-userstory` → parse → load the `pc-plan-propose` skill → confirm with user → load the `pc-plan-apply` skill → ship\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill → ship\n- A PR/MR URL or \"I've added comments to the PR\" → read the PR comments via the repo platform CLI → run the PR Feedback Loop\n\nNever mix the CLIs: work items always go through the backlog platform CLI, PRs/MRs always through the repo platform CLI.",
|
|
27
|
+
"pipeline": "{repo}",
|
|
28
|
+
"skillsGuide": "Mixed platform setup: the two platform skills target different hosts:\n- `@pc-userstory` → fetches work items from the backlog platform. Load when a work-item URL or issue key is provided.\n- `pc-ops-ship` → creates PRs/MRs and triages review feedback on the repo platform. Load in ship mode or PR-feedback mode."
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"jira": {
|
|
32
|
+
"devopsSkills": "- Selected backlog platform: `jira` (from onboarding platform step).\n- Jira is a BACKLOG-ONLY platform. Work items are fetched via `acli jira` CLI.\n- PRs and code review use the repo platform (GitHub or Azure DevOps) configured separately.\n- Load `pc-userstory` skill when a Jira URL is provided.\n- Load `pc-ops-ship` skill from the repo platform for PR operations.",
|
|
33
|
+
"devopsMode": "This project uses Jira for backlog/work items and a separate repo platform (GitHub or Azure DevOps) for code. Fetch work items via `acli jira` CLI. Create PRs via the repo platform CLI. Do NOT use browser tools for Jira operations.",
|
|
34
|
+
"workflow": "When the user provides a Jira URL or mentions a Jira issue key, **I own the full lifecycle**. I load `pc-userstory` skill to parse the Jira issue via `acli jira workitem view`, then load the `pc-plan-propose` skill to create the plan.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions a Jira URL (atlassian.net/browse/PROJ-123) -> load `pc-userstory` skill -> fetch via `acli jira` -> load the `pc-plan-propose` skill -> confirm -> load the `pc-plan-apply` skill -> ship\n- User mentions a Jira issue key (e.g. \"PROJ-123\") -> same flow\n- `implement the plan` / `implement` / `start` / `go` -> load the `pc-plan-apply` skill -> ship\n- PR feedback -> use the repo platform CLI (gh or az) for PR operations\n\n**A Jira URL or issue key in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**\n\nFor PR creation and code review, use the repo platform (configured as `platform.repo`). Jira has no PR capability.",
|
|
35
|
+
"pipeline": "```\nlead (main session)\n -> fetch Jira work item (acli jira workitem view)\n -> pc-plan-propose (propose + enrich tasks)\n |\n [confirm when scope needs it]\n |\n*-engineer specialists (parallel via pc-plan-apply)\n -> implement assigned tasks (parallel waves)\n |\nlead verifies, creates PR via repo platform (gh or az)\n -> transition Jira work item to Done (acli jira workitem transition)\n```\n\n### Phase 1, Fetch & Plan\n\n```\n1. Fetch the Jira work item via acli jira workitem view --key KEY.\n2. Load the pc-plan-propose skill to create the OpenSpec change from the work item.\n3. Confirm with the user.\n```\n\n### Phase 2, Implement & Ship\n\n```\n1. Load the pc-plan-apply skill to implement via parallel subagent waves.\n2. Create PR via repo platform CLI (gh pr create or az repos pr create).\n3. Transition Jira work item: acli jira workitem transition --key KEY --status \"Done\"\n```",
|
|
36
|
+
"skillsGuide": "### Backlog Platform: Jira\n- `pc-userstory` -> fetches Jira work items via `acli jira` CLI. Load when a Jira URL or issue key is provided.\n\n### Repo Platform\n- PR skills are loaded based on `platform.repo` (GitHub or Azure DevOps)."
|
|
37
|
+
},
|
|
38
|
+
"gitlab": {
|
|
39
|
+
"devopsSkills": "- Selected repo platform: `gitlab` (from onboarding platform step).\n- GitLab is a REPO-ONLY platform. MRs and code review via `glab` CLI.\n- Backlog/work items use the backlog platform (GitHub / Azure / Jira) configured separately.\n- Load `pc-ops-ship` skill for GitLab MR operations.",
|
|
40
|
+
"devopsMode": "This project uses GitLab for code repository and merge requests, with a separate backlog platform for work items. Create MRs via `glab mr create` CLI. Fetch work items via the backlog platform CLI. Do NOT use browser tools for GitLab operations.",
|
|
41
|
+
"workflow": "When the user provides a GitLab MR URL or says \"implement the plan\", **I own the full lifecycle**. I load the appropriate userstory skill (from backlog platform) and `pc-ops-ship` skill (for GitLab MRs).\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions a backlog work item URL -> load `pc-userstory` skill -> fetch via backlog CLI -> load the `pc-plan-propose` skill -> confirm -> load the `pc-plan-apply` skill -> ship\n- `implement the plan` / `implement` / `start` / `go` -> load the `pc-plan-apply` skill -> ship\n- User says \"I've added comments to the MR\" -> read MR comments via `glab mr note list` -> triage feedback\n- Any GitLab MR URL in a feedback/fix request -> run MR Feedback Loop via `glab` CLI\n\n**A GitLab MR URL in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**\n\nFor work item fetching, use the backlog platform (configured as `platform.backlog`). GitLab has no backlog integration.",
|
|
42
|
+
"pipeline": "```\nlead (main session)\n -> fetch work item (backlog platform CLI: gh / az / acli)\n -> pc-plan-propose (propose + enrich tasks)\n |\n [confirm when scope needs it]\n |\n*-engineer specialists (parallel via pc-plan-apply)\n -> implement assigned tasks (parallel waves)\n |\nlead verifies, creates MR via GitLab (glab mr create)\n```\n\n### Phase 1, Fetch & Plan\n\n```\n1. Fetch the work item via backlog platform CLI.\n2. Load the pc-plan-propose skill to create the OpenSpec change.\n3. Confirm with the user.\n```\n\n### Phase 2, Implement & Ship\n\n```\n1. Load the pc-plan-apply skill to implement via parallel subagent waves.\n2. Create MR via glab mr create.\n3. Archive change after MR is merged.\n```",
|
|
43
|
+
"skillsGuide": "### Repo Platform: GitLab\n- `pc-ops-ship` -> creates GitLab merge requests via `glab` CLI. Load when shipping a branch or processing MR feedback.\n\n### Backlog Platform\n- Work item skills are loaded based on `platform.backlog` (GitHub / Azure / Jira)."
|
|
44
|
+
},
|
|
45
|
+
"browser": {
|
|
46
|
+
"devopsSkills": "- Selected backlog platform: `browser` (from onboarding platform step).\n- No CLI integration for the backlog system. Work items are fetched via opencode-browser plugin.\n- The `pc-userstory` skill navigates to work item URLs the user provides and reads page content.\n- PRs and code review use the repo platform (GitHub / Azure DevOps / GitLab) configured separately.",
|
|
47
|
+
"devopsMode": "This project uses browser automation for backlog/work items (no CLI) and a separate repo platform for code. Work items are read from web pages using the opencode-browser plugin. Create PRs via the repo platform CLI. The browser navigation exception ONLY applies to work item URLs the user explicitly provides.",
|
|
48
|
+
"workflow": "When the user provides a work item URL from any backlog tool (Azure DevOps, Linear, Trello, etc.), **I own the full lifecycle**. I load `pc-userstory` skill to navigate to the URL via browser and read the page content.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes any URL to a work item/ticket/issue -> load `pc-userstory` skill -> navigate via browser -> read page text + snapshot -> parse work item -> load the `pc-plan-propose` skill -> confirm -> load the `pc-plan-apply` skill -> ship\n- `implement the plan` / `implement` / `start` / `go` -> load the `pc-plan-apply` skill -> ship\n- PR feedback -> use the repo platform CLI (gh, az, or glab) for PR operations\n\n**Any work item URL in the user's message is a trigger, regardless of the backlog tool it points to.**\n\nFor PR creation and code review, use the repo platform (configured as `platform.repo`). Browser is backlog-only: it has no PR capability.",
|
|
49
|
+
"pipeline": "```\nlead (main session)\n -> open work item URL in browser (browser_open_tab)\n -> read page content (browser_query mode=page_text + browser_snapshot)\n -> parse work item fields from page text\n -> pc-plan-propose (propose + enrich tasks)\n |\n [confirm when scope needs it]\n |\n*-engineer specialists (parallel via pc-plan-apply)\n -> implement assigned tasks (parallel waves)\n |\nlead verifies, creates PR via repo platform (gh / az / glab)\n```\n\n### Phase 1, Fetch & Plan\n\n```\n1. User provides a work item URL.\n2. Navigate to the URL via browser_open_tab.\n3. Read page text via browser_query mode=page_text.\n4. Take accessibility snapshot via browser_snapshot.\n5. Parse title, description, acceptance criteria from the page.\n6. Load the pc-plan-propose skill to create the OpenSpec change.\n7. Confirm with the user.\n```\n\n### Phase 2, Implement & Ship\n\n```\n1. Load the pc-plan-apply skill to implement via parallel subagent waves.\n2. Create PR via repo platform CLI (gh pr create, az repos pr create, or glab mr create).\n3. Archive change after PR is merged.\n```",
|
|
50
|
+
"skillsGuide": "### Backlog Platform: Others (Browser)\n- `pc-userstory` -> navigates to work item URLs via browser plugin, reads page content, creates OpenSpec changes. Load when a URL the user provides does not match GitHub/Azure/Jira CLI platforms.\n\n### Repo Platform\n- PR skills are loaded based on `platform.repo` (GitHub / Azure DevOps / GitLab)."
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|