opencodekit 0.17.1 → 0.17.2

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 (26) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENT_ALIGNMENT.md +564 -0
  3. package/dist/template/.opencode/agent/build.md +140 -0
  4. package/dist/template/.opencode/agent/general.md +89 -0
  5. package/dist/template/.opencode/agent/plan.md +175 -0
  6. package/dist/template/.opencode/agent/review.md +96 -0
  7. package/dist/template/.opencode/command/create.md +57 -15
  8. package/dist/template/.opencode/command/init-context.md +259 -0
  9. package/dist/template/.opencode/command/init-user.md +103 -0
  10. package/dist/template/.opencode/command/init.md +53 -39
  11. package/dist/template/.opencode/command/plan.md +200 -16
  12. package/dist/template/.opencode/command/ship.md +251 -17
  13. package/dist/template/.opencode/command/start.md +35 -4
  14. package/dist/template/.opencode/memory/_templates/PROJECT.md +58 -0
  15. package/dist/template/.opencode/memory/_templates/ROADMAP.md +93 -0
  16. package/dist/template/.opencode/memory/_templates/STATE.md +89 -0
  17. package/dist/template/.opencode/memory/_templates/tech-stack.md +35 -0
  18. package/dist/template/.opencode/memory/project/project.md +92 -0
  19. package/dist/template/.opencode/memory/project/roadmap.md +142 -0
  20. package/dist/template/.opencode/memory/project/state.md +84 -0
  21. package/dist/template/.opencode/opencode.json +1030 -1027
  22. package/dist/template/.opencode/package.json +1 -1
  23. package/dist/template/.opencode/skill/context-initialization/SKILL.md +60 -0
  24. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +76 -0
  25. package/dist/template/.opencode/skill/writing-plans/SKILL.md +68 -0
  26. package/package.json +1 -1
@@ -11,7 +11,7 @@
11
11
  "type-check": "tsc --noEmit"
12
12
  },
13
13
  "dependencies": {
14
- "@opencode-ai/plugin": "1.1.59"
14
+ "@opencode-ai/plugin": "1.1.60"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/node": "^25.1.0",
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: context-initialization
3
+ description: Initialize GSD-style project context files from templates
4
+ ---
5
+
6
+ # Context Initialization
7
+
8
+ Create project.md, roadmap.md, and state.md from templates with user input.
9
+
10
+ ## Process
11
+
12
+ ### 1. Verify Templates
13
+
14
+ ```bash
15
+ test -f .opencode/memory/_templates/project.md
16
+ test -f .opencode/memory/_templates/roadmap.md
17
+ test -f .opencode/memory/_templates/state.md
18
+ ```
19
+
20
+ Stop if missing.
21
+
22
+ ### 2. Gather Input
23
+
24
+ Ask 5 questions:
25
+
26
+ 1. Project vision
27
+ 2. Success criteria
28
+ 3. Target users
29
+ 4. Phases
30
+ 5. Current phase
31
+
32
+ Skip if `--skip-questions` flag set.
33
+
34
+ ### 3. Create Files
35
+
36
+ **project.md**
37
+
38
+ - Read template
39
+ - Fill with answers
40
+ - Write to `.opencode/memory/project/`
41
+
42
+ **roadmap.md**
43
+
44
+ - Read template
45
+ - Parse phases into table
46
+ - Write to `.opencode/memory/project/`
47
+
48
+ **state.md**
49
+
50
+ - Read template
51
+ - Set initial state
52
+ - Write to `.opencode/memory/project/`
53
+
54
+ ### 4. Verify
55
+
56
+ ```bash
57
+ ls .opencode/memory/project/
58
+ ```
59
+
60
+ Report created files.
@@ -50,6 +50,62 @@ Use for ANY technical issue:
50
50
 
51
51
  You MUST complete each phase before proceeding to the next.
52
52
 
53
+ ### Debug File Protocol
54
+
55
+ **Persistent debugging state survives context resets:**
56
+
57
+ **Location:** `.planning/debug/{slug}.md` or `.beads/artifacts/<id>/debug/{slug}.md`
58
+
59
+ **Template:**
60
+
61
+ ```markdown
62
+ # Debug: [Brief Issue Description]
63
+
64
+ **Opened:** [Date]
65
+ **Status:** [gathering | investigating | fixing | verifying | resolved]
66
+ **Reporter:** [human partner or "self-detected"]
67
+
68
+ ## Symptoms
69
+
70
+ - [ ] Symptom 1: [What happens / doesn't happen]
71
+ - [ ] Symptom 2: [Additional observation]
72
+
73
+ ## Eliminated Hypotheses
74
+
75
+ - [x] [Hypothesis]: [Why it was wrong] (date)
76
+
77
+ ## Evidence Log
78
+
79
+ | Timestamp | Data | Interpretation |
80
+ | --------- | ------------------- | --------------- |
81
+ | [time] | [What was observed] | [What it means] |
82
+
83
+ ## Current Hypothesis
84
+
85
+ [I think X is happening because Y. Testing with Z.]
86
+
87
+ ## Fix Attempts
88
+
89
+ | # | Change | Result | Notes |
90
+ | --- | ------------------ | ----------- | ----- |
91
+ | 1 | [What was changed] | [Pass/Fail] | [Why] |
92
+
93
+ ## Resolution
94
+
95
+ **Root Cause:** [What was actually wrong]
96
+ **Fix:** [How it was fixed]
97
+ **Date:** [When resolved]
98
+ ```
99
+
100
+ **Update Rules:**
101
+
102
+ - **OVERWRITE** when updating status or hypothesis
103
+ - **APPEND** to Evidence Log and Fix Attempts
104
+
105
+ **Status Transitions:**
106
+
107
+ - `gathering` → `investigating` → `fixing` → `verifying` → `resolved`
108
+
53
109
  ### Phase 1: Root Cause Investigation
54
110
 
55
111
  **BEFORE attempting ANY fix:**
@@ -147,6 +203,26 @@ You MUST complete each phase before proceeding to the next.
147
203
  - What settings, config, environment?
148
204
  - What assumptions does it make?
149
205
 
206
+ **Evidence-Based Debugging (GSD Method):**
207
+
208
+ **Information you have:**
209
+
210
+ - ✅ Errors/warnings (with exact messages, line numbers)
211
+ - ✅ Code I can read and trace through
212
+ - ✅ Evidence from what I can observe directly
213
+
214
+ **Information you DON'T have:**
215
+
216
+ - ❌ What the user intended (ask if unclear)
217
+ - ❌ Environment-specific state I can't observe
218
+ - ❌ Intent behind code that doesn't match my understanding
219
+
220
+ **When to gather more evidence vs. when to form hypothesis:**
221
+
222
+ - **Gather evidence** when: Multiple components involved, unclear which one fails
223
+ - **Form hypothesis** when: Error message points to specific location, pattern is clear
224
+ - **Ask user** when: Behavior contradicts apparent code intent
225
+
150
226
  ### Phase 3: Hypothesis and Testing
151
227
 
152
228
  **Scientific method:**
@@ -45,6 +45,74 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
45
45
  ---
46
46
  ```
47
47
 
48
+ ### Goal-Backward Section (REQUIRED)
49
+
50
+ Document the reasoning that produced this plan using goal-backward methodology:
51
+
52
+ ```markdown
53
+ ## Must-Haves
54
+
55
+ **Goal:** [Outcome-shaped goal from PRD]
56
+
57
+ ### Observable Truths
58
+
59
+ (What must be TRUE for the goal to be achieved?)
60
+
61
+ 1. [Truth 1: User can...]
62
+ 2. [Truth 2: User can...]
63
+ 3. [Truth 3: User can...]
64
+
65
+ ### Required Artifacts
66
+
67
+ (What must EXIST for truths to be true?)
68
+ | Artifact | Provides | Path |
69
+ |----------|----------|------|
70
+ | [File/component] | [What it does] | `src/path/to/file.ts` |
71
+
72
+ ### Key Links
73
+
74
+ (Where is this most likely to break?)
75
+ | From | To | Via | Risk |
76
+ |------|-----|-----|------|
77
+ | [Component] | [API] | `fetch` | [Why it might fail] |
78
+ ```
79
+
80
+ ### Dependency Graph
81
+
82
+ ```markdown
83
+ ### Task Dependencies
84
+ ```
85
+
86
+ Task A (User model): needs nothing, creates src/models/user.ts
87
+ Task B (Product model): needs nothing, creates src/models/product.ts
88
+ Task C (User API): needs Task A, creates src/api/users.ts
89
+
90
+ Wave 1: A, B (parallel)
91
+ Wave 2: C (after Wave 1)
92
+
93
+ ```
94
+
95
+ ```
96
+
97
+ ## Context Budget
98
+
99
+ Target: ~50% context per plan execution
100
+ Maximum: 2-3 tasks per plan
101
+
102
+ | Task Complexity | Max Tasks | Typical Context |
103
+ | --------------- | --------- | --------------- |
104
+ | Simple (CRUD) | 3 | ~30-45% |
105
+ | Complex (auth) | 2 | ~40-50% |
106
+ | Very complex | 1-2 | ~30-50% |
107
+
108
+ **Split signals:**
109
+
110
+ - More than 3 tasks → Create child plans
111
+ - Multiple subsystems → Separate plans
112
+ - Any task with >5 file modifications → Split
113
+ - Checkpoint + implementation → Split
114
+ - Discovery + implementation → Split
115
+
48
116
  ## Task Structure
49
117
 
50
118
  ````markdown
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodekit",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "description": "CLI tool for bootstrapping and managing OpenCodeKit projects",
5
5
  "keywords": ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
6
6
  "license": "MIT",