opencode-onboard 0.0.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.
- package/content/.opencode/agents/.bootstrap/AGENTS.template.md +230 -0
- package/content/.opencode/agents/.bootstrap/CUSTOM-AGENT.template.md +24 -0
- package/content/.opencode/agents/ob-pullrequest-creator-az.md +332 -0
- package/content/.opencode/agents/ob-pullrequest-creator-gh.md +177 -0
- package/content/.opencode/agents/ob-pullrequest-observer-az.md +248 -0
- package/content/.opencode/agents/ob-pullrequest-observer-gh.md +197 -0
- package/content/.opencode/agents/qa.md +137 -0
- package/content/.opencode/commands/.gitkeep +0 -0
- package/content/.opencode/ensemble.json +12 -0
- package/content/.opencode/opencode.json +8 -0
- package/content/.opencode/package-lock.json +378 -0
- package/content/.opencode/package.json +5 -0
- package/content/.opencode/skills/ob-userstory-az/SKILL.md +206 -0
- package/content/.opencode/skills/ob-userstory-gh/SKILL.md +171 -0
- package/content/AGENTS.md +90 -0
- package/content/ARCHITECTURE.md +327 -0
- package/content/DESIGN.md +26 -0
- package/content/openspec/changes/archive/.gitkeep +0 -0
- package/content/openspec/config.yaml +20 -0
- package/content/openspec/specs/.gitkeep +0 -0
- package/package.json +28 -0
- package/src/index.js +2 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ob-userstory-az
|
|
3
|
+
description: Parse Azure DevOps user story URL and create OpenSpec change. Use when user provides an Azure DevOps URL.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI and Azure CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: copilots
|
|
8
|
+
version: "3.0"
|
|
9
|
+
---
|
|
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
|
+
**Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Azure CLI Setup (One-Time)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
az config set extension.dynamic_install_allow_preview=true
|
|
25
|
+
az extension add --name azure-devops
|
|
26
|
+
az login
|
|
27
|
+
az devops login --organization https://dev.azure.com/plainconcepts
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**PAT Token** — go to `https://dev.azure.com/plainconcepts/_usersSettings/tokens`
|
|
31
|
+
Create with scopes: **Work Items (Read & Write)** + **Code (Read & Write)**
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Steps
|
|
36
|
+
|
|
37
|
+
1. **Extract Work Item ID** from URL
|
|
38
|
+
- `?workitem=193208` → ID: 193208
|
|
39
|
+
- `/workitems/edit/193208` → ID: 193208
|
|
40
|
+
|
|
41
|
+
2. **Fetch Work Item**
|
|
42
|
+
```bash
|
|
43
|
+
rtk az boards work-item show --id 193208
|
|
44
|
+
```
|
|
45
|
+
Do NOT use `--organization` flag (uses default org).
|
|
46
|
+
|
|
47
|
+
3. **Extract Key Fields** from JSON response:
|
|
48
|
+
- `fields.System.Title` → Title
|
|
49
|
+
- `fields.System.Description` → Description (may be HTML — strip tags)
|
|
50
|
+
- `fields.System.WorkItemType` → Type
|
|
51
|
+
- `fields.System.IterationPath` → Sprint
|
|
52
|
+
- `fields.System.State` → State
|
|
53
|
+
- `fields.System.AcceptanceCriteria` → AC (if present)
|
|
54
|
+
|
|
55
|
+
4. **Create OpenSpec Change**
|
|
56
|
+
```bash
|
|
57
|
+
rtk openspec new change "us-{id}-{slug}"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Full Azure DevOps CLI Reference
|
|
63
|
+
|
|
64
|
+
Use these for ALL DevOps operations — browser MCP is FORBIDDEN.
|
|
65
|
+
|
|
66
|
+
### Work Items
|
|
67
|
+
```bash
|
|
68
|
+
# Read work item
|
|
69
|
+
rtk az boards work-item show --id <id>
|
|
70
|
+
|
|
71
|
+
# Update work item state
|
|
72
|
+
rtk az boards work-item update --id <id> --state "Active"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Pull Requests
|
|
76
|
+
```bash
|
|
77
|
+
# List open PRs
|
|
78
|
+
rtk az repos pr list --repository <repo> --status active --top 5
|
|
79
|
+
|
|
80
|
+
# Show PR details
|
|
81
|
+
rtk az repos pr show --id <pr-id>
|
|
82
|
+
|
|
83
|
+
# Create PR
|
|
84
|
+
rtk az repos pr create \
|
|
85
|
+
--repository <repo> \
|
|
86
|
+
--source-branch feature/<id>-<slug> \
|
|
87
|
+
--target-branch main \
|
|
88
|
+
--title "feat(#<id>): <title>" \
|
|
89
|
+
--description "<description>"
|
|
90
|
+
|
|
91
|
+
# Update PR description
|
|
92
|
+
rtk az repos pr update --id <pr-id> --description "<text>"
|
|
93
|
+
|
|
94
|
+
# Link work item to PR (run sequentially — not parallel)
|
|
95
|
+
rtk az repos pr work-item add --id <pr-id> --work-items <work-item-id>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### PR Threads (Comments)
|
|
99
|
+
```bash
|
|
100
|
+
# Read all threads
|
|
101
|
+
rtk az devops invoke \
|
|
102
|
+
--area git --resource pullRequestThreads \
|
|
103
|
+
--route-parameters project=PlainConcepts.CapacityTool repositoryId=<repo> pullRequestId=<id> \
|
|
104
|
+
--http-method GET --api-version 7.1
|
|
105
|
+
|
|
106
|
+
# Post new comment thread (requires body.json)
|
|
107
|
+
rtk az devops invoke \
|
|
108
|
+
--area git --resource pullRequestThreads \
|
|
109
|
+
--route-parameters project=PlainConcepts.CapacityTool repositoryId=<repo> pullRequestId=<id> \
|
|
110
|
+
--http-method POST --api-version 7.1 --in-file body.json
|
|
111
|
+
|
|
112
|
+
# Reply to existing thread
|
|
113
|
+
rtk az devops invoke \
|
|
114
|
+
--area git --resource pullRequestThreadComments \
|
|
115
|
+
--route-parameters project=PlainConcepts.CapacityTool repositoryId=<repo> pullRequestId=<id> threadId=<tid> \
|
|
116
|
+
--http-method POST --api-version 7.1 --in-file reply.json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Comment Body JSON format
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"comments": [
|
|
123
|
+
{
|
|
124
|
+
"parentCommentId": 0,
|
|
125
|
+
"content": "Your markdown comment here.",
|
|
126
|
+
"commentType": 1
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"status": "active"
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
For replies, `parentCommentId` should be the ID of the first comment in the thread (usually 1).
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Screenshot / Image Strategy
|
|
138
|
+
|
|
139
|
+
**Never upload images as PR attachments.** Save to openspec change folder and reference via raw URL.
|
|
140
|
+
|
|
141
|
+
### Save location
|
|
142
|
+
```
|
|
143
|
+
openspec/changes/{change-name}/images/{screenshot}.png
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Raw URL format (renders inline in PR comments)
|
|
147
|
+
```
|
|
148
|
+
https://dev.azure.com/plainconcepts/PlainConcepts.CapacityTool/_apis/git/repositories/{repo}/items?path=openspec/changes/{change}/images/{file}.png&versionType=branch&version={branch}&api-version=7.1
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Do NOT use `_git/` URLs — they return HTML, not raw binary.
|
|
152
|
+
|
|
153
|
+
### PR comment with screenshot
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"comments": [
|
|
157
|
+
{
|
|
158
|
+
"parentCommentId": 0,
|
|
159
|
+
"content": "## Screenshots\n\n",
|
|
160
|
+
"commentType": 1
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"status": "active"
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## URL Formats Reference
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
# Sprint board with work item
|
|
173
|
+
https://dev.azure.com/{org}/{project}/_sprints/backlog/{team}/{project}/Sprint%20110?workitem=193208
|
|
174
|
+
|
|
175
|
+
# Direct work item
|
|
176
|
+
https://dev.azure.com/{org}/{project}/_workitems/edit/193208
|
|
177
|
+
|
|
178
|
+
# PR
|
|
179
|
+
https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/{pr-id}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Output Format
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
## User Story Parsed
|
|
188
|
+
|
|
189
|
+
**Work Item:** #193208
|
|
190
|
+
**Title:** Roles CRUD
|
|
191
|
+
**Type:** User Story
|
|
192
|
+
**Iteration:** Sprint 110
|
|
193
|
+
**State:** New
|
|
194
|
+
|
|
195
|
+
**Change Created:** us-193208-roles-crud
|
|
196
|
+
|
|
197
|
+
### Next Steps
|
|
198
|
+
1. Review the proposal
|
|
199
|
+
2. Say "implement the plan" to start implementation
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Constraints
|
|
203
|
+
|
|
204
|
+
- This skill only PARSES and PROPOSES — implementation via openspec-apply-change
|
|
205
|
+
- Always use `rtk` for CLI commands
|
|
206
|
+
- Browser MCP tools FORBIDDEN for all DevOps operations
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ob-userstory-gh
|
|
3
|
+
description: Parse GitHub Issue URL and create OpenSpec change. Use when user provides a GitHub Issue URL.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI and gh CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: copilots
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
**Browser MCP tools are FORBIDDEN for all GitHub operations.**
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## GitHub CLI Setup (One-Time)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
gh auth login
|
|
19
|
+
# Follow prompts — authenticate via browser or token
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Verify:
|
|
23
|
+
```bash
|
|
24
|
+
gh auth status
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Steps
|
|
30
|
+
|
|
31
|
+
1. **Extract Issue Number** from URL
|
|
32
|
+
- `https://github.com/{owner}/{repo}/issues/42` → number: 42
|
|
33
|
+
|
|
34
|
+
2. **Fetch Issue**
|
|
35
|
+
```bash
|
|
36
|
+
gh issue view 42 --json number,title,body,labels,milestone,state
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. **Extract Key Fields** from JSON response:
|
|
40
|
+
- `number` → Issue number
|
|
41
|
+
- `title` → Title
|
|
42
|
+
- `body` → Description / acceptance criteria
|
|
43
|
+
- `labels` → Labels
|
|
44
|
+
- `milestone` → Milestone / sprint equivalent
|
|
45
|
+
- `state` → State (open/closed)
|
|
46
|
+
|
|
47
|
+
4. **Create OpenSpec Change**
|
|
48
|
+
```bash
|
|
49
|
+
openspec new change "gh-{number}-{slug}"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Full GitHub CLI Reference
|
|
55
|
+
|
|
56
|
+
Use these for ALL GitHub operations — browser MCP is FORBIDDEN.
|
|
57
|
+
|
|
58
|
+
### Issues
|
|
59
|
+
```bash
|
|
60
|
+
# Read issue
|
|
61
|
+
gh issue view <number>
|
|
62
|
+
|
|
63
|
+
# List open issues
|
|
64
|
+
gh issue list --state open --limit 10
|
|
65
|
+
|
|
66
|
+
# Update issue
|
|
67
|
+
gh issue edit <number> --add-label "in-progress"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Pull Requests
|
|
71
|
+
```bash
|
|
72
|
+
# List open PRs
|
|
73
|
+
gh pr list --state open
|
|
74
|
+
|
|
75
|
+
# Show PR details
|
|
76
|
+
gh pr view <number>
|
|
77
|
+
|
|
78
|
+
# Create PR
|
|
79
|
+
gh pr create \
|
|
80
|
+
--base main \
|
|
81
|
+
--head feature/{slug} \
|
|
82
|
+
--title "feat: <title>" \
|
|
83
|
+
--body "<description>"
|
|
84
|
+
|
|
85
|
+
# Update PR
|
|
86
|
+
gh pr edit <number> --body "<text>"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### PR Comments
|
|
90
|
+
```bash
|
|
91
|
+
# Read PR comments
|
|
92
|
+
gh pr view <number> --comments
|
|
93
|
+
|
|
94
|
+
# Post PR comment
|
|
95
|
+
gh pr comment <number> --body "Your markdown comment here."
|
|
96
|
+
|
|
97
|
+
# Reply to review comment via API
|
|
98
|
+
gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies \
|
|
99
|
+
--method POST \
|
|
100
|
+
--field body="Reply text here."
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Review Comments (structured)
|
|
104
|
+
```bash
|
|
105
|
+
# Get all review comments on a PR
|
|
106
|
+
gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
|
|
107
|
+
|
|
108
|
+
# Get all reviews
|
|
109
|
+
gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Screenshot / Image Strategy
|
|
115
|
+
|
|
116
|
+
**Never embed images as attachments.** Save to openspec change folder and reference via raw GitHub URL.
|
|
117
|
+
|
|
118
|
+
### Save location
|
|
119
|
+
```
|
|
120
|
+
openspec/changes/{change-name}/images/{screenshot}.png
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Raw URL format (renders inline in PR comments)
|
|
124
|
+
```
|
|
125
|
+
https://raw.githubusercontent.com/{owner}/{repo}/{branch}/openspec/changes/{change}/images/{file}.png
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### PR comment with screenshot
|
|
129
|
+
```bash
|
|
130
|
+
gh pr comment <number> --body "## Screenshots\n\n"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## URL Formats Reference
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
# Issue
|
|
139
|
+
https://github.com/{owner}/{repo}/issues/{number}
|
|
140
|
+
|
|
141
|
+
# PR
|
|
142
|
+
https://github.com/{owner}/{repo}/pull/{number}
|
|
143
|
+
|
|
144
|
+
# Raw file
|
|
145
|
+
https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{path}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Output Format
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
## Issue Parsed
|
|
154
|
+
|
|
155
|
+
**Issue:** #{number}
|
|
156
|
+
**Title:** {title}
|
|
157
|
+
**State:** {state}
|
|
158
|
+
**Milestone:** {milestone}
|
|
159
|
+
|
|
160
|
+
**Change Created:** gh-{number}-{slug}
|
|
161
|
+
|
|
162
|
+
### Next Steps
|
|
163
|
+
1. Review the proposal
|
|
164
|
+
2. Say "implement the plan" to start implementation
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Constraints
|
|
168
|
+
|
|
169
|
+
- This skill only PARSES and PROPOSES — implementation via openspec-apply-change
|
|
170
|
+
- Always use `gh` CLI for GitHub operations
|
|
171
|
+
- Browser MCP tools FORBIDDEN for all GitHub operations
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# AGENTS.md — Bootstrap Mode
|
|
2
|
+
|
|
3
|
+
> This project has not been initialized yet.
|
|
4
|
+
> Your ONLY job right now is to run the initialization sequence below.
|
|
5
|
+
> Do not do anything else until all steps are complete.
|
|
6
|
+
|
|
7
|
+
## Trigger
|
|
8
|
+
|
|
9
|
+
When the user says anything resembling initialization — "init", "initialize", "setup", "start", "bootstrap", "get started", "prepare" — execute all steps below in order. Do not ask for confirmation before starting.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Initialization Sequence
|
|
14
|
+
|
|
15
|
+
### Step 1 — Archive project history into OpenSpec
|
|
16
|
+
|
|
17
|
+
Scan the codebase for any existing documentation, changelogs, ADRs, README files, or notable history that describes decisions already made in this project. Create an OpenSpec archive entry that captures this history so agents have context going forward.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
openspec new change "project-history"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Write a `proposal.md` inside that change summarizing:
|
|
24
|
+
- What this project is
|
|
25
|
+
- Key decisions already made (inferred from code and docs)
|
|
26
|
+
- Known tech debt or constraints visible in the codebase
|
|
27
|
+
- Current state of the project
|
|
28
|
+
|
|
29
|
+
Then archive it immediately:
|
|
30
|
+
```bash
|
|
31
|
+
openspec archive "project-history"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
### Step 2 — Generate DESIGN.md
|
|
37
|
+
|
|
38
|
+
Read the current contents of `DESIGN.md`. It contains a prompt/command. Do the following:
|
|
39
|
+
|
|
40
|
+
1. Copy the prompt text from `DESIGN.md` into memory
|
|
41
|
+
2. Wipe `DESIGN.md` completely (write empty file)
|
|
42
|
+
3. Execute the copied prompt against this codebase — analyze the design system, visual tokens, typography, colors, spacing, and UI patterns
|
|
43
|
+
4. Write the result back into `DESIGN.md` following the format described in the prompt
|
|
44
|
+
|
|
45
|
+
The output must be a real, populated `DESIGN.md` — not the prompt itself.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### Step 3 — Generate ARCHITECTURE.md
|
|
50
|
+
|
|
51
|
+
Read the current contents of `ARCHITECTURE.md`. It contains a prompt/command. Do the following:
|
|
52
|
+
|
|
53
|
+
1. Copy the prompt text from `ARCHITECTURE.md` into memory
|
|
54
|
+
2. Wipe `ARCHITECTURE.md` completely (write empty file)
|
|
55
|
+
3. Execute the copied prompt against this codebase — analyze the full architecture, structure, components, data flows, integrations, and tech stack
|
|
56
|
+
4. Write the result back into `ARCHITECTURE.md` following the structure described in the prompt
|
|
57
|
+
|
|
58
|
+
The output must be a real, populated `ARCHITECTURE.md` covering all sections the prompt describes — not the prompt itself.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### Step 4 — Rewrite this file
|
|
63
|
+
|
|
64
|
+
Replace the entire contents of `AGENTS.md` with the real agent guidance template located at `.opencode/agents/.bootstrap/AGENTS.template.md`.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### Step 5 — Confirm
|
|
69
|
+
|
|
70
|
+
Tell the user:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Initialization complete.
|
|
74
|
+
|
|
75
|
+
- ARCHITECTURE.md generated
|
|
76
|
+
- DESIGN.md generated
|
|
77
|
+
- Project history archived in openspec
|
|
78
|
+
- AGENTS.md updated with real guidance
|
|
79
|
+
|
|
80
|
+
You're ready to work.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Guardrails During Init
|
|
86
|
+
|
|
87
|
+
- Do NOT implement any features
|
|
88
|
+
- Do NOT create branches or PRs
|
|
89
|
+
- Do NOT modify any project source files
|
|
90
|
+
- Only read source files for analysis — write only to ARCHITECTURE.md, DESIGN.md, AGENTS.md, and openspec/
|