opencodekit 0.16.15 → 0.16.18
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 +77 -242
- package/dist/index.js +19 -6
- package/dist/template/.opencode/AGENTS.md +72 -236
- package/dist/template/.opencode/README.md +49 -482
- package/dist/template/.opencode/agent/build.md +71 -345
- package/dist/template/.opencode/agent/explore.md +47 -139
- package/dist/template/.opencode/agent/general.md +61 -172
- package/dist/template/.opencode/agent/looker.md +65 -161
- package/dist/template/.opencode/agent/painter.md +46 -200
- package/dist/template/.opencode/agent/plan.md +37 -220
- package/dist/template/.opencode/agent/review.md +72 -153
- package/dist/template/.opencode/agent/scout.md +44 -486
- package/dist/template/.opencode/agent/vision.md +63 -178
- package/dist/template/.opencode/command/create.md +75 -307
- package/dist/template/.opencode/command/design.md +53 -589
- package/dist/template/.opencode/command/handoff.md +76 -180
- package/dist/template/.opencode/command/init.md +45 -211
- package/dist/template/.opencode/command/plan.md +62 -514
- package/dist/template/.opencode/command/pr.md +56 -226
- package/dist/template/.opencode/command/research.md +55 -266
- package/dist/template/.opencode/command/resume.md +33 -138
- package/dist/template/.opencode/command/review-codebase.md +54 -202
- package/dist/template/.opencode/command/ship.md +78 -127
- package/dist/template/.opencode/command/start.md +47 -577
- package/dist/template/.opencode/command/status.md +60 -353
- package/dist/template/.opencode/command/ui-review.md +52 -298
- package/dist/template/.opencode/command/verify.md +36 -250
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +133 -35
- package/dist/template/.opencode/plugin/README.md +40 -166
- package/dist/template/.opencode/plugin/compaction.ts +162 -131
- package/dist/template/.opencode/plugin/lib/memory-db.ts +112 -0
- package/dist/template/.opencode/plugin/swarm-enforcer.ts +182 -27
- package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +112 -0
- package/dist/template/.opencode/skill/augment-context-engine/mcp.json +6 -0
- package/dist/template/.opencode/skill/core-data-expert/SKILL.md +82 -0
- package/dist/template/.opencode/skill/core-data-expert/references/batch-operations.md +543 -0
- package/dist/template/.opencode/skill/core-data-expert/references/cloudkit-integration.md +259 -0
- package/dist/template/.opencode/skill/core-data-expert/references/concurrency.md +522 -0
- package/dist/template/.opencode/skill/core-data-expert/references/fetch-requests.md +643 -0
- package/dist/template/.opencode/skill/core-data-expert/references/glossary.md +233 -0
- package/dist/template/.opencode/skill/core-data-expert/references/migration.md +393 -0
- package/dist/template/.opencode/skill/core-data-expert/references/model-configuration.md +597 -0
- package/dist/template/.opencode/skill/core-data-expert/references/performance.md +300 -0
- package/dist/template/.opencode/skill/core-data-expert/references/persistent-history.md +553 -0
- package/dist/template/.opencode/skill/core-data-expert/references/project-audit.md +60 -0
- package/dist/template/.opencode/skill/core-data-expert/references/saving.md +574 -0
- package/dist/template/.opencode/skill/core-data-expert/references/stack-setup.md +625 -0
- package/dist/template/.opencode/skill/core-data-expert/references/testing.md +300 -0
- package/dist/template/.opencode/skill/core-data-expert/references/threading.md +589 -0
- package/dist/template/.opencode/skill/swift-concurrency/SKILL.md +246 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/actors.md +640 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/async-algorithms.md +822 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/async-await-basics.md +249 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/async-sequences.md +670 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/core-data.md +533 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/glossary.md +128 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/linting.md +142 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/memory-management.md +542 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/migration.md +1076 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/performance.md +574 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/sendable.md +578 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/tasks.md +604 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/testing.md +565 -0
- package/dist/template/.opencode/skill/swift-concurrency/references/threading.md +452 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/SKILL.md +290 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/animation-advanced.md +351 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/animation-basics.md +284 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/animation-transitions.md +326 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/image-optimization.md +286 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/layout-best-practices.md +312 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/liquid-glass.md +377 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/list-patterns.md +153 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/modern-apis.md +400 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/performance-patterns.md +377 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/scroll-patterns.md +305 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/sheet-navigation-patterns.md +292 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/state-management.md +447 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/text-formatting.md +285 -0
- package/dist/template/.opencode/skill/swiftui-expert-skill/references/view-structure.md +276 -0
- package/dist/template/.opencode/tool/action-queue.ts +308 -0
- package/dist/template/.opencode/tool/swarm.ts +65 -40
- package/package.json +16 -3
- package/dist/template/.opencode/.agents/skills/context7/SKILL.md +0 -88
|
@@ -1,303 +1,133 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Create and submit pull request with bead traceability
|
|
3
|
-
argument-hint: "
|
|
3
|
+
argument-hint: "[bead-id] [--draft]"
|
|
4
4
|
agent: build
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pull Request
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Load Skills
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
skill({ name: "beads" });
|
|
12
|
+
skill({ name: "beads" });
|
|
13
13
|
skill({ name: "verification-before-completion" });
|
|
14
|
-
skill({ name: "memory-system" });
|
|
15
14
|
```
|
|
16
15
|
|
|
17
|
-
##
|
|
16
|
+
## Parse Arguments
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
memory_search({ query: "$ARGUMENTS [feature keywords]", limit: 3 });
|
|
24
|
-
|
|
25
|
-
// Find any gotchas related to this area
|
|
26
|
-
memory_search({ query: "[affected files/modules] gotchas", limit: 2 });
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Include relevant context from memory in PR description.
|
|
30
|
-
|
|
31
|
-
## Options
|
|
32
|
-
|
|
33
|
-
- `--draft`: Create as draft PR (for WIP or early feedback)
|
|
34
|
-
- `--wait`: Wait for CI checks to pass after creation
|
|
18
|
+
| Argument | Default | Description |
|
|
19
|
+
| ----------- | -------- | ------------------ |
|
|
20
|
+
| `<bead-id>` | optional | Link PR to bead |
|
|
21
|
+
| `--draft` | false | Create as draft PR |
|
|
35
22
|
|
|
36
23
|
## Phase 1: Pre-PR Verification
|
|
37
24
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
!`git status --porcelain` # Check for uncommitted changes
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
If uncommitted changes exist, ask: "Commit these changes first?"
|
|
45
|
-
|
|
46
|
-
Run project gates:
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
!`npm run build 2>&1 | tail -5`
|
|
50
|
-
!`npm test 2>&1 | tail -10`
|
|
51
|
-
!`npm run lint 2>&1 | tail -5`
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
Pre-PR Gates:
|
|
56
|
-
━━━━━━━━━━━━━
|
|
57
|
-
|
|
58
|
-
Build: [✓/✗]
|
|
59
|
-
Tests: [✓/✗]
|
|
60
|
-
Lint: [✓/✗]
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
**If any gate fails: STOP.**
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
Cannot create PR: [gate] failed.
|
|
67
|
-
|
|
68
|
-
Fix errors first, then run /pr again.
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Phase 2: Check for Conflicts
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
!`git fetch origin main`
|
|
75
|
-
!`git merge-base --is-ancestor origin/main HEAD || git diff origin/main...HEAD --name-only`
|
|
25
|
+
```bash
|
|
26
|
+
git status --porcelain
|
|
76
27
|
```
|
|
77
28
|
|
|
78
|
-
|
|
29
|
+
If uncommitted changes exist, ask whether to commit first.
|
|
79
30
|
|
|
80
|
-
|
|
81
|
-
!`git merge --no-commit --no-ff origin/main 2>&1 || true`
|
|
82
|
-
!`git merge --abort 2>/dev/null || true`
|
|
83
|
-
```
|
|
31
|
+
Run verification gates. Detect project type and use the appropriate commands:
|
|
84
32
|
|
|
85
|
-
|
|
33
|
+
| Project Type | Detect Via | Build | Test | Lint | Typecheck |
|
|
34
|
+
| --------------- | ----------------------------- | ---------------- | --------------- | ----------------------------- | ------------------------------------- |
|
|
35
|
+
| Node/TypeScript | `package.json` | `npm run build` | `npm test` | `npm run lint` | `npm run typecheck` or `tsc --noEmit` |
|
|
36
|
+
| Rust | `Cargo.toml` | `cargo build` | `cargo test` | `cargo clippy -- -D warnings` | (included in build) |
|
|
37
|
+
| Python | `pyproject.toml` / `setup.py` | — | `pytest` | `ruff check .` | `mypy .` |
|
|
38
|
+
| Go | `go.mod` | `go build ./...` | `go test ./...` | `golangci-lint run` | (included in build) |
|
|
86
39
|
|
|
87
|
-
|
|
88
|
-
⚠️ Merge conflicts detected with main:
|
|
89
|
-
- [file1]
|
|
90
|
-
- [file2]
|
|
91
|
-
|
|
92
|
-
Resolve conflicts before creating PR:
|
|
93
|
-
git fetch origin main
|
|
94
|
-
git rebase origin/main
|
|
95
|
-
# Fix conflicts, then /pr again
|
|
96
|
-
```
|
|
40
|
+
Check `package.json` scripts, `Makefile`, or `justfile` for project-specific commands first — prefer those over generic defaults.
|
|
97
41
|
|
|
98
|
-
|
|
42
|
+
If any gate fails, stop. Fix errors first, then run `/pr` again.
|
|
99
43
|
|
|
100
|
-
|
|
44
|
+
## Phase 2: Gather Context
|
|
101
45
|
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**Load bead context (if provided):**
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
!`br show $ARGUMENTS`
|
|
46
|
+
```bash
|
|
47
|
+
git branch --show-current
|
|
48
|
+
git log main...HEAD --oneline
|
|
49
|
+
git diff main...HEAD --stat
|
|
112
50
|
```
|
|
113
51
|
|
|
114
|
-
|
|
52
|
+
If bead ID provided:
|
|
115
53
|
|
|
54
|
+
```bash
|
|
55
|
+
br show $ARGUMENTS
|
|
56
|
+
ls .beads/artifacts/$ARGUMENTS/
|
|
116
57
|
```
|
|
117
|
-
!`ls .beads/artifacts/<bead-id>/ 2>/dev/null`
|
|
118
|
-
!`cat .beads/artifacts/<bead-id>/spec.md 2>/dev/null | head -30`
|
|
119
|
-
!`cat .beads/artifacts/<bead-id>/review.md 2>/dev/null | head -30`
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Extract from artifacts:
|
|
123
|
-
|
|
124
|
-
- **Goal** from spec.md
|
|
125
|
-
- **Changes Made** from review.md
|
|
126
|
-
- **Estimation Accuracy** from review.md
|
|
127
|
-
- **Success Criteria** verification
|
|
128
58
|
|
|
129
|
-
|
|
59
|
+
Read the PRD to extract goal and success criteria for the PR description.
|
|
130
60
|
|
|
131
|
-
|
|
61
|
+
## Phase 3: Push and Confirm
|
|
132
62
|
|
|
133
|
-
|
|
134
|
-
git log origin/$(git branch --show-current)..HEAD --oneline 2>/dev/null || git log --oneline -5
|
|
135
|
-
git diff --stat origin/$(git branch --show-current)..HEAD 2>/dev/null || git diff --stat HEAD~3..HEAD
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
**Use question tool to get push/PR decision:**
|
|
63
|
+
Show what will be pushed and ask the user:
|
|
139
64
|
|
|
140
65
|
```typescript
|
|
141
66
|
question({
|
|
142
67
|
questions: [
|
|
143
68
|
{
|
|
144
69
|
header: "Push",
|
|
145
|
-
question: "Ready to push and create PR
|
|
70
|
+
question: "Ready to push and create PR. Proceed?",
|
|
146
71
|
options: [
|
|
147
|
-
{
|
|
148
|
-
label: "Push & create PR (Recommended)",
|
|
149
|
-
description: "Push branch and create PR",
|
|
150
|
-
},
|
|
72
|
+
{ label: "Push & create PR (Recommended)", description: "Push branch and create PR" },
|
|
151
73
|
{ label: "Push & draft PR", description: "Create as draft for review" },
|
|
152
|
-
{
|
|
153
|
-
label: "Show diff first",
|
|
154
|
-
description: "Review changes before pushing",
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
label: "Skip (I'll push manually)",
|
|
158
|
-
description: "Handle PR creation manually",
|
|
159
|
-
},
|
|
74
|
+
{ label: "Show diff first", description: "Review changes before pushing" },
|
|
160
75
|
],
|
|
161
76
|
},
|
|
162
77
|
],
|
|
163
78
|
});
|
|
164
79
|
```
|
|
165
80
|
|
|
166
|
-
If
|
|
81
|
+
If confirmed:
|
|
167
82
|
|
|
168
83
|
```bash
|
|
169
84
|
git push -u origin $(git branch --show-current)
|
|
170
85
|
```
|
|
171
86
|
|
|
172
|
-
## Phase
|
|
173
|
-
|
|
174
|
-
Generate PR content from context:
|
|
87
|
+
## Phase 4: Create PR
|
|
175
88
|
|
|
176
89
|
```bash
|
|
177
|
-
gh pr create --title "<title>" --body "$(cat <<'EOF'
|
|
90
|
+
gh pr create --title "<title>" --body "$(cat <<'EOF'
|
|
178
91
|
## Summary
|
|
179
92
|
|
|
180
|
-
[1-2
|
|
93
|
+
[1-2 sentences: what this PR does and why]
|
|
181
94
|
|
|
182
95
|
## Changes
|
|
183
96
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
| `src/foo.ts` | [description] |
|
|
187
|
-
| `src/bar.ts` | [description] |
|
|
97
|
+
- `file.ts`: [what changed]
|
|
98
|
+
- `other.ts`: [what changed]
|
|
188
99
|
|
|
189
100
|
## Testing
|
|
190
101
|
|
|
191
|
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
- Type check passes ✓
|
|
195
|
-
|
|
196
|
-
**Manual verification:**
|
|
197
|
-
- [ ] [How to test manually]
|
|
198
|
-
|
|
199
|
-
## Screenshots
|
|
200
|
-
|
|
201
|
-
[If UI changes, include before/after screenshots]
|
|
202
|
-
|
|
203
|
-
## Estimation
|
|
204
|
-
|
|
205
|
-
| Metric | Value |
|
|
206
|
-
| ------ | ----- |
|
|
207
|
-
| Estimated | [S/M/L] (~N calls) |
|
|
208
|
-
| Actual | N calls |
|
|
209
|
-
| Accuracy | [+/-N%] |
|
|
102
|
+
- All tests pass
|
|
103
|
+
- Lint and typecheck pass
|
|
104
|
+
- Manual verification: [how to test]
|
|
210
105
|
|
|
211
106
|
## Checklist
|
|
212
107
|
|
|
213
108
|
- [x] Tests added/updated
|
|
214
109
|
- [x] All gates pass
|
|
215
110
|
- [ ] Docs updated (if applicable)
|
|
216
|
-
- [ ] Breaking changes documented (if any)
|
|
217
|
-
|
|
218
|
-
## Artifacts
|
|
219
|
-
|
|
220
|
-
- [spec.md](.beads/artifacts/<bead-id>/spec.md)
|
|
221
|
-
- [review.md](.beads/artifacts/<bead-id>/review.md)
|
|
222
|
-
[- research.md, plan.md, adr.md if they exist]
|
|
223
|
-
|
|
224
|
-
## Bead Reference
|
|
225
|
-
|
|
226
|
-
Closes: <bead-id>
|
|
227
111
|
EOF
|
|
228
112
|
)"
|
|
229
113
|
```
|
|
230
114
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
```bash
|
|
234
|
-
gh pr create --draft --title "<title>" --body "..." # Keep as-is (instructional)
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
## Phase 6: Wait for CI (if --wait)
|
|
238
|
-
|
|
239
|
-
```
|
|
240
|
-
!`gh pr checks --watch`
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
Report CI status:
|
|
115
|
+
If `--draft`, add `--draft` flag.
|
|
244
116
|
|
|
245
|
-
|
|
246
|
-
CI Status:
|
|
247
|
-
━━━━━━━━━━
|
|
248
|
-
|
|
249
|
-
- build: [✓/✗/pending]
|
|
250
|
-
- test: [✓/✗/pending]
|
|
251
|
-
- lint: [✓/✗/pending]
|
|
252
|
-
|
|
253
|
-
[If all pass] CI passed ✓
|
|
254
|
-
[If any fail] CI failed: [which check]
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
## Phase 7: Update Bead & Sync
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
br sync --flush-only
|
|
261
|
-
```
|
|
117
|
+
If bead ID provided, add artifacts section linking to `.beads/artifacts/$ARGUMENTS/prd.md`.
|
|
262
118
|
|
|
263
119
|
## Output
|
|
264
120
|
|
|
265
|
-
|
|
266
|
-
PR Created: <bead-id>
|
|
267
|
-
━━━━━━━━━━━━━━━━━━━━
|
|
121
|
+
Report:
|
|
268
122
|
|
|
269
|
-
URL
|
|
270
|
-
Status
|
|
271
|
-
Branch
|
|
123
|
+
1. PR URL
|
|
124
|
+
2. Status (Ready for Review / Draft)
|
|
125
|
+
3. Branch → main
|
|
126
|
+
4. Gate results
|
|
272
127
|
|
|
273
|
-
|
|
274
|
-
Conflicts: None ✓
|
|
275
|
-
[CI: Passed ✓ (if --wait)]
|
|
276
|
-
|
|
277
|
-
Artifacts linked:
|
|
278
|
-
- spec.md ✓
|
|
279
|
-
- review.md ✓
|
|
280
|
-
[- research.md, plan.md, adr.md]
|
|
281
|
-
```
|
|
128
|
+
## Related Commands
|
|
282
129
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
Request review:
|
|
289
|
-
gh pr edit <pr-number> --add-reviewer <username>
|
|
290
|
-
|
|
291
|
-
Check CI:
|
|
292
|
-
gh pr checks
|
|
293
|
-
|
|
294
|
-
Merge when approved:
|
|
295
|
-
gh pr merge --squash
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
**If draft PR:**
|
|
299
|
-
|
|
300
|
-
```
|
|
301
|
-
Draft PR created. When ready:
|
|
302
|
-
gh pr ready
|
|
303
|
-
```
|
|
130
|
+
| Need | Command |
|
|
131
|
+
| ------------ | -------------- |
|
|
132
|
+
| Ship first | `/ship <id>` |
|
|
133
|
+
| Verify first | `/verify <id>` |
|