opencodekit 0.20.1 → 0.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/agent/build.md +4 -0
  3. package/dist/template/.opencode/agent/explore.md +4 -0
  4. package/dist/template/.opencode/agent/general.md +4 -0
  5. package/dist/template/.opencode/agent/plan.md +4 -0
  6. package/dist/template/.opencode/agent/review.md +4 -0
  7. package/dist/template/.opencode/agent/scout.md +4 -0
  8. package/dist/template/.opencode/command/create.md +119 -25
  9. package/dist/template/.opencode/command/design.md +1 -2
  10. package/dist/template/.opencode/command/health.md +234 -0
  11. package/dist/template/.opencode/command/init-user.md +15 -0
  12. package/dist/template/.opencode/command/plan.md +3 -4
  13. package/dist/template/.opencode/command/pr.md +13 -0
  14. package/dist/template/.opencode/command/research.md +15 -3
  15. package/dist/template/.opencode/command/review-codebase.md +11 -1
  16. package/dist/template/.opencode/command/ship.md +72 -8
  17. package/dist/template/.opencode/command/status.md +1 -1
  18. package/dist/template/.opencode/command/ui-review.md +0 -1
  19. package/dist/template/.opencode/command/ui-slop-check.md +1 -1
  20. package/dist/template/.opencode/command/verify.md +11 -1
  21. package/dist/template/.opencode/dcp.jsonc +31 -24
  22. package/dist/template/.opencode/memory.db +0 -0
  23. package/dist/template/.opencode/memory.db-shm +0 -0
  24. package/dist/template/.opencode/memory.db-wal +0 -0
  25. package/dist/template/.opencode/opencode.json +1678 -1677
  26. package/dist/template/.opencode/package.json +1 -1
  27. package/dist/template/.opencode/plugin/lib/compile.ts +253 -0
  28. package/dist/template/.opencode/plugin/lib/index-generator.ts +170 -0
  29. package/dist/template/.opencode/plugin/lib/lint.ts +359 -0
  30. package/dist/template/.opencode/plugin/lib/memory-admin-tools.ts +42 -1
  31. package/dist/template/.opencode/plugin/lib/memory-db.ts +7 -0
  32. package/dist/template/.opencode/plugin/lib/memory-helpers.ts +30 -0
  33. package/dist/template/.opencode/plugin/lib/memory-hooks.ts +10 -0
  34. package/dist/template/.opencode/plugin/lib/memory-tools.ts +30 -1
  35. package/dist/template/.opencode/plugin/lib/operation-log.ts +109 -0
  36. package/dist/template/.opencode/plugin/lib/validate.ts +243 -0
  37. package/dist/template/.opencode/skill/design-taste-frontend/SKILL.md +13 -1
  38. package/dist/template/.opencode/skill/figma-go/SKILL.md +1 -1
  39. package/dist/template/.opencode/skill/full-output-enforcement/SKILL.md +13 -0
  40. package/dist/template/.opencode/skill/high-end-visual-design/SKILL.md +13 -0
  41. package/dist/template/.opencode/skill/industrial-brutalist-ui/SKILL.md +13 -0
  42. package/dist/template/.opencode/skill/memory-system/SKILL.md +65 -1
  43. package/dist/template/.opencode/skill/minimalist-ui/SKILL.md +13 -0
  44. package/dist/template/.opencode/skill/redesign-existing-projects/SKILL.md +13 -0
  45. package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +48 -2
  46. package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md +108 -0
  47. package/dist/template/.opencode/skill/skill-creator/SKILL.md +25 -0
  48. package/dist/template/.opencode/skill/stitch-design-taste/SKILL.md +13 -0
  49. package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +46 -0
  50. package/package.json +1 -1
  51. package/dist/template/.opencode/agent/runner.md +0 -79
  52. package/dist/template/.opencode/command/start.md +0 -156
@@ -8,9 +8,9 @@ agent: build
8
8
 
9
9
  Execute PRD tasks, verify each passes, run review, close the bead.
10
10
 
11
- > **Workflow:** `/create` → `/start <id>` → **`/ship <id>`**
11
+ > **Workflow:** `/create` → **`/ship <id>`**
12
12
  >
13
- > Bead MUST be `in_progress` with `prd.md`. Run `/start` first if not.
13
+ > Bead MUST have `prd.md`. If not yet claimed, `/ship` auto-claims it.
14
14
 
15
15
  ## Load Skills
16
16
 
@@ -48,19 +48,84 @@ skill({ name: "verification-before-completion" });
48
48
 
49
49
  ## Phase 1: Guards
50
50
 
51
+ ### Memory Grounding
52
+
53
+ Search memory for context, prior decisions, and known issues before executing:
54
+
55
+ ```typescript
56
+ memory-search({ query: "$ARGUMENTS" });
57
+ memory-search({ query: "<bead title keywords>", limit: 5 });
58
+ memory-read({ file: "handoffs/last" });
59
+ ```
60
+
61
+ Use findings to avoid re-discovering known issues or repeating failed approaches.
62
+
63
+ ### Bead Validation
64
+
51
65
  ```bash
52
66
  br show $ARGUMENTS
53
67
  ```
54
68
 
55
69
  Verify:
56
70
 
57
- - Bead status is `in_progress` (if not, tell user to run `/start $ARGUMENTS`)
71
+ - Bead is `in_progress` or unclaimed (auto-claim if needed)
58
72
  - `.beads/artifacts/$ARGUMENTS/prd.md` exists (if not, tell user to run `/create` first)
59
73
 
60
74
  Check what artifacts exist:
61
75
 
62
76
  Read `.beads/artifacts/$ARGUMENTS/` to check what artifacts exist.
63
77
 
78
+ ## Phase 1B: Auto-Claim (if not yet in_progress)
79
+
80
+ If bead status is NOT `in_progress`, auto-claim it:
81
+
82
+ ```bash
83
+ br update $ARGUMENTS --status in_progress
84
+ ```
85
+
86
+ Then ask about workspace:
87
+
88
+ ```typescript
89
+ question({
90
+ questions: [
91
+ {
92
+ header: "Workspace",
93
+ question: "How do you want to set up the workspace?",
94
+ options: [
95
+ {
96
+ label: "Create feature branch (Recommended)",
97
+ description: "git checkout -b feat/<bead-id>-<title>",
98
+ },
99
+ {
100
+ label: "Use current branch",
101
+ description: "Work on current branch",
102
+ },
103
+ ],
104
+ },
105
+ ],
106
+ });
107
+ ```
108
+
109
+ **If feature branch selected:**
110
+
111
+ Map bead type to branch prefix:
112
+
113
+ | Bead Type | Branch Prefix |
114
+ | --------- | ------------- |
115
+ | feature | feat |
116
+ | bug | fix |
117
+ | task | task |
118
+ | epic | epic |
119
+
120
+ ```bash
121
+ # Example: feat/br-42-add-auth
122
+ git checkout -b $PREFIX/$BEAD_ID-$TITLE_SLUG
123
+ ```
124
+
125
+ **If current branch:** Continue without branch creation.
126
+
127
+ **If bead is already `in_progress`:** Skip this phase entirely.
128
+
64
129
  ## Phase 2: Route to Execution
65
130
 
66
131
  | Artifact exists | Action |
@@ -333,8 +398,7 @@ Report:
333
398
 
334
399
  ## Related Commands
335
400
 
336
- | Need | Command |
337
- | ----------- | ------------- |
338
- | Create spec | `/create` |
339
- | Claim task | `/start <id>` |
340
- | Create PR | `/pr` |
401
+ | Need | Command |
402
+ | ----------- | --------- |
403
+ | Create spec | `/create` |
404
+ | Create PR | `/pr` |
@@ -99,7 +99,7 @@ Based on gathered state, recommend ONE next step:
99
99
  | State | Suggestion |
100
100
  | ---------------------------- | ----------------------------- |
101
101
  | Has in_progress tasks | `/ship <id>` (continue work) |
102
- | Has ready tasks, none active | `/start <id>` (pick up work) |
102
+ | Has ready tasks, none active | `/ship <id>` (pick up work) |
103
103
  | Uncommitted changes | Review and commit |
104
104
  | Nothing active or ready | `/create "<desc>"` (new work) |
105
105
 
@@ -88,5 +88,4 @@ observation({
88
88
  | Need | Command |
89
89
  | -------------------- | --------- |
90
90
  | Design from scratch | `/design` |
91
- | Start implementation | `/start` |
92
91
  | Ship implementation | `/ship` |
@@ -143,4 +143,4 @@ observation({
143
143
  | ---------------------------------------- | ------------ |
144
144
  | Design from scratch | `/design` |
145
145
  | Full UI review (single screen/component) | `/ui-review` |
146
- | Implementation work | `/start` |
146
+ | Implementation work | `/ship` |
@@ -149,7 +149,17 @@ Output:
149
149
  5. **Blocking issues** to fix before shipping
150
150
  6. **Next step**: `/ship $ARGUMENTS` if ready, or list fixes needed
151
151
 
152
- Record significant findings with `observation()`.
152
+ Record significant findings with `observation()`:
153
+
154
+ ```typescript
155
+ observation({
156
+ type: "discovery", // or "warning", "bugfix"
157
+ title: "Verify: [bead-id] [key finding]",
158
+ narrative: "[What was found, impact, resolution]",
159
+ concepts: "verification, [component]",
160
+ confidence: "high",
161
+ });
162
+ ```
153
163
 
154
164
  ## Related Commands
155
165
 
@@ -24,11 +24,11 @@
24
24
  },
25
25
  // Glob patterns for files that should never be auto-pruned
26
26
  // Keep tight: broad patterns reduce DCP effectiveness
27
+ // .opencode/** and .beads/** removed — memory-* and tilth_* outputs
28
+ // already survive compression via compress.protectedTools
27
29
  "protectedFilePatterns": [
28
30
  "**/.env*",
29
31
  "**/AGENTS.md",
30
- "**/.opencode/**",
31
- "**/.beads/**",
32
32
  "**/package.json",
33
33
  "**/tsconfig.json"
34
34
  ],
@@ -43,34 +43,41 @@
43
43
  // v3.1.0: active summary tokens extend effective maxContextLimit
44
44
  "summaryBuffer": true,
45
45
  // Soft upper threshold: above this, strong compression nudges fire
46
- // Accepts number or "X%" of model context window
47
- "maxContextLimit": "80%",
46
+ // Use numeric values percentage requires modelContextLimit from runtime
47
+ // which may be unavailable for some provider/model combos (e.g. GitHub Copilot)
48
+ // Rule: must be BELOW OpenCode emergency threshold (model_max - reserved - max_output)
49
+ // For Copilot Claude (216k ctx, 64k out, 16k reserved): emergency = 136k
50
+ // So DCP must start compressing well before 136k
51
+ "maxContextLimit": 100000,
48
52
  // Per-model override for maxContextLimit (takes priority over global)
49
- // Aligned to claude-opus-4.6 (216k context, 64k output) as primary build agent
50
53
  "modelMaxLimits": {
51
- "github-copilot/claude-opus-4.6": 192000,
52
- "github-copilot/claude-opus-4.5": 192000,
53
- "github-copilot/claude-sonnet-4.6": 192000,
54
- "github-copilot/claude-sonnet-4.5": 192000,
55
- "github-copilot/claude-sonnet-4": 192000,
56
- "github-copilot/claude-haiku-4.5": 172000,
57
- "github-copilot/gpt-5.4": 192000,
58
- "github-copilot/gpt-5.3-codex": 192000,
59
- "github-copilot/gemini-3.1-pro-preview": 192000
54
+ // Claude: 216k ctx, 64k out → emergency at 136k → DCP starts at 110k
55
+ "github-copilot/claude-opus-4.6": 110000,
56
+ "github-copilot/claude-opus-4.5": 110000,
57
+ "github-copilot/claude-sonnet-4.6": 110000,
58
+ "github-copilot/claude-sonnet-4.5": 110000,
59
+ "github-copilot/claude-sonnet-4": 110000,
60
+ // Haiku: smaller model, be more conservative
61
+ "github-copilot/claude-haiku-4.5": 90000,
62
+ // GPT/Gemini: assume similar 200k+ windows
63
+ "github-copilot/gpt-5.4": 110000,
64
+ "github-copilot/gpt-5.3-codex": 110000,
65
+ "github-copilot/gemini-3.1-pro-preview": 110000
60
66
  },
61
67
  // Soft lower threshold: below this, turn/iteration reminders are off
62
- "minContextLimit": "35%",
68
+ // Use numeric values — same reason as maxContextLimit above
69
+ "minContextLimit": 50000,
63
70
  // Per-model override for minContextLimit (takes priority over global)
64
71
  "modelMinLimits": {
65
- "github-copilot/claude-opus-4.6": "30%",
66
- "github-copilot/claude-opus-4.5": "35%",
67
- "github-copilot/claude-sonnet-4.6": "35%",
68
- "github-copilot/claude-sonnet-4.5": "35%",
69
- "github-copilot/claude-sonnet-4": "35%",
70
- "github-copilot/claude-haiku-4.5": "25%",
71
- "github-copilot/gpt-5.4": "30%",
72
- "github-copilot/gpt-5.3-codex": "30%",
73
- "github-copilot/gemini-3.1-pro-preview": "30%"
72
+ "github-copilot/claude-opus-4.6": 65000,
73
+ "github-copilot/claude-opus-4.5": 65000,
74
+ "github-copilot/claude-sonnet-4.6": 65000,
75
+ "github-copilot/claude-sonnet-4.5": 65000,
76
+ "github-copilot/claude-sonnet-4": 65000,
77
+ "github-copilot/claude-haiku-4.5": 50000,
78
+ "github-copilot/gpt-5.4": 65000,
79
+ "github-copilot/gpt-5.3-codex": 65000,
80
+ "github-copilot/gemini-3.1-pro-preview": 65000
74
81
  },
75
82
  // How often context-limit nudge fires above maxContextLimit (1 = every fetch)
76
83
  "nudgeFrequency": 5,
Binary file