opencodekit 0.10.0 → 0.11.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/dist/index.js +1 -1
- package/dist/template/.opencode/agent/planner.md +3 -2
- package/dist/template/.opencode/command/accessibility-check.md +293 -30
- package/dist/template/.opencode/command/analyze-mockup.md +406 -20
- package/dist/template/.opencode/command/analyze-project.md +439 -30
- package/dist/template/.opencode/command/brainstorm.md +288 -5
- package/dist/template/.opencode/command/commit.md +226 -17
- package/dist/template/.opencode/command/create.md +138 -35
- package/dist/template/.opencode/command/design-audit.md +477 -29
- package/dist/template/.opencode/command/design.md +609 -6
- package/dist/template/.opencode/command/edit-image.md +223 -20
- package/dist/template/.opencode/command/finish.md +162 -71
- package/dist/template/.opencode/command/fix-ci.md +296 -24
- package/dist/template/.opencode/command/fix-types.md +345 -13
- package/dist/template/.opencode/command/fix-ui.md +293 -13
- package/dist/template/.opencode/command/fix.md +256 -9
- package/dist/template/.opencode/command/generate-diagram.md +327 -26
- package/dist/template/.opencode/command/generate-icon.md +266 -22
- package/dist/template/.opencode/command/generate-image.md +232 -12
- package/dist/template/.opencode/command/generate-pattern.md +234 -20
- package/dist/template/.opencode/command/generate-storyboard.md +231 -21
- package/dist/template/.opencode/command/handoff.md +202 -30
- package/dist/template/.opencode/command/implement.md +162 -50
- package/dist/template/.opencode/command/import-plan.md +247 -51
- package/dist/template/.opencode/command/init.md +154 -35
- package/dist/template/.opencode/command/integration-test.md +405 -24
- package/dist/template/.opencode/command/issue.md +171 -21
- package/dist/template/.opencode/command/new-feature.md +382 -54
- package/dist/template/.opencode/command/plan.md +144 -118
- package/dist/template/.opencode/command/pr.md +229 -28
- package/dist/template/.opencode/command/quick-build.md +234 -5
- package/dist/template/.opencode/command/research-and-implement.md +436 -12
- package/dist/template/.opencode/command/research-ui.md +444 -34
- package/dist/template/.opencode/command/research.md +173 -45
- package/dist/template/.opencode/command/restore-image.md +416 -22
- package/dist/template/.opencode/command/resume.md +439 -63
- package/dist/template/.opencode/command/revert-feature.md +341 -64
- package/dist/template/.opencode/command/review-codebase.md +193 -4
- package/dist/template/.opencode/command/skill-create.md +506 -14
- package/dist/template/.opencode/command/skill-optimize.md +487 -16
- package/dist/template/.opencode/command/status.md +320 -60
- package/dist/template/.opencode/command/summarize.md +374 -33
- package/dist/template/.opencode/command/triage.md +355 -0
- package/dist/template/.opencode/command/ui-review.md +292 -25
- package/dist/template/.opencode/skill/playwriter/SKILL.md +148 -0
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ One command to onboard a project. Creates project-root AGENTS.md and populates m
|
|
|
10
10
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
|
-
- `--deep`: Comprehensive research (~100+ tool calls). Git history, patterns, contributors.
|
|
13
|
+
- `--deep`: Comprehensive research (~100+ tool calls). Git history, patterns, contributors, subsystem detection.
|
|
14
14
|
- `--skip-questions`: Skip upfront questions, infer from git config.
|
|
15
15
|
|
|
16
16
|
Default: Standard research (~20-50 tool calls).
|
|
@@ -23,6 +23,7 @@ Unless `--skip-questions`, ask in one message:
|
|
|
23
23
|
2. **Communication**: "Terse or detailed responses?"
|
|
24
24
|
3. **Workflow**: "Auto-commit or ask-first?"
|
|
25
25
|
4. **Rules**: "Any rules I should always follow?"
|
|
26
|
+
5. **Beads**: "Use beads for task tracking? (y/n)"
|
|
26
27
|
|
|
27
28
|
If skipped, infer identity from `git config user.name` and `git config user.email`.
|
|
28
29
|
|
|
@@ -30,11 +31,20 @@ If skipped, infer identity from `git config user.name` and `git config user.emai
|
|
|
30
31
|
|
|
31
32
|
### Always Check
|
|
32
33
|
|
|
33
|
-
- `package.json`, `go.mod`, `pyproject.toml`, `Cargo.toml` - tech stack
|
|
34
|
+
- `package.json`, `go.mod`, `pyproject.toml`, `Cargo.toml` - tech stack WITH VERSIONS
|
|
34
35
|
- `README.md` - project description
|
|
35
36
|
- `.github/workflows/`, `.gitlab-ci.yml` - CI/CD
|
|
36
37
|
- `Makefile`, `justfile` - build commands
|
|
37
38
|
- Existing rules: `.cursor/rules/`, `.cursorrules`, `.github/copilot-instructions.md`
|
|
39
|
+
- Top-level directories - identify structure
|
|
40
|
+
|
|
41
|
+
### Validate Commands
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Actually run detected commands to verify they work
|
|
45
|
+
npm run build 2>&1 | head -5 # Check for errors
|
|
46
|
+
npm test -- --help 2>&1 | head -3 # Verify test syntax
|
|
47
|
+
```
|
|
38
48
|
|
|
39
49
|
### With --deep
|
|
40
50
|
|
|
@@ -42,34 +52,99 @@ If skipped, infer identity from `git config user.name` and `git config user.emai
|
|
|
42
52
|
- `git log --format="%s" -50` - commit conventions
|
|
43
53
|
- `git branch -a` - branching strategy
|
|
44
54
|
- Source file analysis for patterns
|
|
55
|
+
- Identify subsystems needing nested AGENTS.md
|
|
45
56
|
|
|
46
57
|
## Phase 3: Create Project-Root AGENTS.md
|
|
47
58
|
|
|
48
|
-
Create `./AGENTS.md`
|
|
59
|
+
Create `./AGENTS.md` - **TARGET: <60 lines** (max 150 lines).
|
|
60
|
+
|
|
61
|
+
Research shows: Frontier LLMs reliably follow ~150-200 instructions. More = degraded quality across ALL instructions.
|
|
49
62
|
|
|
50
63
|
```markdown
|
|
51
|
-
|
|
64
|
+
# [Project Name]
|
|
65
|
+
|
|
66
|
+
## Tech Stack
|
|
67
|
+
|
|
68
|
+
- [Language] [version] with [framework] [version]
|
|
69
|
+
- [Key dependencies with versions]
|
|
70
|
+
- [Build tool]: [tool name]
|
|
71
|
+
|
|
72
|
+
## File Structure
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
src/ # Source code
|
|
76
|
+
tests/ # Test files
|
|
77
|
+
docs/ # Documentation
|
|
78
|
+
scripts/ # Build/deploy scripts
|
|
79
|
+
|
|
80
|
+
````
|
|
81
|
+
|
|
82
|
+
## Commands
|
|
83
|
+
|
|
84
|
+
**Build**: `[detected command]`
|
|
85
|
+
**Test**: `[detected command]` (single test: `[syntax]`)
|
|
86
|
+
**Lint**: `[detected command]`
|
|
87
|
+
**Dev**: `[detected command]`
|
|
88
|
+
|
|
89
|
+
## Code Examples
|
|
90
|
+
|
|
91
|
+
Good pattern (from your codebase):
|
|
92
|
+
|
|
93
|
+
```[language]
|
|
94
|
+
[Actual code snippet showing preferred style - 5-10 lines]
|
|
95
|
+
````
|
|
96
|
+
|
|
97
|
+
## Testing
|
|
98
|
+
|
|
99
|
+
- Tests live in: `[path]`
|
|
100
|
+
- Run single test: `[command]`
|
|
101
|
+
- Verify changes: `[command]`
|
|
102
|
+
|
|
103
|
+
## Boundaries
|
|
104
|
+
|
|
105
|
+
✅ **Always**: Run lint before commit, include tests for new features
|
|
106
|
+
⚠️ **Ask first**: Schema changes, new dependencies, file deletions
|
|
107
|
+
🚫 **Never**: Commit secrets, modify vendor/, force push main, skip tests
|
|
108
|
+
|
|
109
|
+
## Gotchas
|
|
52
110
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
**Lint**: [detected command]
|
|
111
|
+
- [Known issue or edge case]
|
|
112
|
+
- [Thing that will waste 2+ hours if forgotten]
|
|
56
113
|
|
|
57
|
-
|
|
114
|
+
````
|
|
58
115
|
|
|
59
|
-
**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
**Error Handling**: [pattern detected]
|
|
116
|
+
**Key principles:**
|
|
117
|
+
- Examples > Explanations (LLMs are in-context learners)
|
|
118
|
+
- Pointers > Copies ("See docs/architecture.md" not inline everything)
|
|
119
|
+
- If AGENTS.md exists, improve it - don't overwrite blindly
|
|
64
120
|
|
|
65
|
-
##
|
|
121
|
+
## Phase 4: Detect Subsystems (--deep only)
|
|
122
|
+
|
|
123
|
+
For projects with distinct subsystems, identify candidates for nested AGENTS.md:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Find directories with significant code
|
|
127
|
+
find . -type d -name "src" -o -name "packages" -o -name "apps" | head -10
|
|
128
|
+
````
|
|
129
|
+
|
|
130
|
+
Suggest nested AGENTS.md for:
|
|
131
|
+
|
|
132
|
+
- `packages/*/` in monorepos
|
|
133
|
+
- `src/` vs `tests/` if patterns differ significantly
|
|
134
|
+
- `frontend/` vs `backend/` directories
|
|
135
|
+
|
|
136
|
+
Output suggestion:
|
|
66
137
|
|
|
67
|
-
[Include any rules from .cursorrules, copilot-instructions, or user-provided]
|
|
68
138
|
```
|
|
139
|
+
Detected subsystems that may benefit from nested AGENTS.md:
|
|
140
|
+
- packages/api/ - API server patterns
|
|
141
|
+
- packages/web/ - Frontend patterns
|
|
142
|
+
- tests/ - Testing conventions
|
|
69
143
|
|
|
70
|
-
|
|
144
|
+
Create nested AGENTS.md files? (y/n)
|
|
145
|
+
```
|
|
71
146
|
|
|
72
|
-
## Phase
|
|
147
|
+
## Phase 5: Populate Memory Files
|
|
73
148
|
|
|
74
149
|
### .opencode/memory/user.md
|
|
75
150
|
|
|
@@ -108,15 +183,20 @@ updated: [today]
|
|
|
108
183
|
|
|
109
184
|
## Build
|
|
110
185
|
|
|
111
|
-
[detected]
|
|
186
|
+
`[detected and validated]`
|
|
112
187
|
|
|
113
188
|
## Test
|
|
114
189
|
|
|
115
|
-
[detected
|
|
190
|
+
`[detected]`
|
|
191
|
+
Single test: `[syntax with example]`
|
|
116
192
|
|
|
117
193
|
## Lint
|
|
118
194
|
|
|
119
|
-
[detected]
|
|
195
|
+
`[detected]`
|
|
196
|
+
|
|
197
|
+
## Dev Server
|
|
198
|
+
|
|
199
|
+
`[detected]`
|
|
120
200
|
```
|
|
121
201
|
|
|
122
202
|
### .opencode/memory/project/architecture.md
|
|
@@ -131,11 +211,15 @@ updated: [today]
|
|
|
131
211
|
|
|
132
212
|
## Structure
|
|
133
213
|
|
|
134
|
-
[detected directory layout]
|
|
214
|
+
[detected directory layout with purpose annotations]
|
|
135
215
|
|
|
136
216
|
## Key Modules
|
|
137
217
|
|
|
138
|
-
[identified entry points, core modules]
|
|
218
|
+
[identified entry points, core modules, their responsibilities]
|
|
219
|
+
|
|
220
|
+
## Data Flow
|
|
221
|
+
|
|
222
|
+
[how data moves through the system - if detectable]
|
|
139
223
|
```
|
|
140
224
|
|
|
141
225
|
### With --deep, also create:
|
|
@@ -143,34 +227,69 @@ updated: [today]
|
|
|
143
227
|
- `project/conventions.md` - from git log analysis
|
|
144
228
|
- `project/gotchas.md` - from bug-fix patterns in history
|
|
145
229
|
|
|
146
|
-
## Phase
|
|
230
|
+
## Phase 6: Initialize Beads (if requested)
|
|
147
231
|
|
|
148
|
-
|
|
232
|
+
If user said yes to beads:
|
|
149
233
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
234
|
+
```bash
|
|
235
|
+
bd init # or equivalent initialization
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Create `.beads/` directory structure for task tracking.
|
|
239
|
+
|
|
240
|
+
## Phase 7: Reflection
|
|
241
|
+
|
|
242
|
+
Before finishing, verify:
|
|
243
|
+
|
|
244
|
+
1. [ ] AGENTS.md is <60 lines (or has good reason to be longer)?
|
|
245
|
+
2. [ ] Commands were validated and actually work?
|
|
246
|
+
3. [ ] Boundaries section includes Never rules?
|
|
247
|
+
4. [ ] At least one code example from actual codebase?
|
|
248
|
+
5. [ ] Memory files created with accurate info?
|
|
154
249
|
|
|
155
|
-
Fix issues found.
|
|
250
|
+
Fix any issues found.
|
|
156
251
|
|
|
157
|
-
## Phase
|
|
252
|
+
## Phase 8: Summary
|
|
158
253
|
|
|
159
254
|
Report:
|
|
160
255
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
256
|
+
```
|
|
257
|
+
Initialization Complete
|
|
258
|
+
━━━━━━━━━━━━━━━━━━━━━━━
|
|
259
|
+
|
|
260
|
+
Files created:
|
|
261
|
+
- ./AGENTS.md ([N] lines)
|
|
262
|
+
- .opencode/memory/user.md
|
|
263
|
+
- .opencode/memory/project/commands.md
|
|
264
|
+
- .opencode/memory/project/architecture.md
|
|
265
|
+
[- .beads/ (if initialized)]
|
|
266
|
+
|
|
267
|
+
Tech stack: [detected]
|
|
268
|
+
Commands validated: [yes/no]
|
|
269
|
+
|
|
270
|
+
Suggested next steps:
|
|
271
|
+
1. Review AGENTS.md and adjust boundaries
|
|
272
|
+
2. Run /review-codebase to check conventions
|
|
273
|
+
3. [If --deep suggested subsystems] Create nested AGENTS.md files
|
|
274
|
+
```
|
|
165
275
|
|
|
166
276
|
## File Locations
|
|
167
277
|
|
|
168
278
|
```
|
|
169
|
-
./AGENTS.md # Project-specific rules (created)
|
|
279
|
+
./AGENTS.md # Project-specific rules (created, <60 lines)
|
|
170
280
|
.opencode/AGENTS.md # Global rules (untouched)
|
|
171
281
|
.opencode/memory/user.md # User preferences (created)
|
|
172
282
|
.opencode/memory/project/commands.md # Build commands (created)
|
|
173
283
|
.opencode/memory/project/architecture.md # Structure (created)
|
|
174
284
|
.opencode/memory/project/conventions.md # Patterns (--deep only)
|
|
175
285
|
.opencode/memory/project/gotchas.md # Warnings (--deep only)
|
|
286
|
+
[packages/*/AGENTS.md] # Subsystem rules (--deep, if requested)
|
|
176
287
|
```
|
|
288
|
+
|
|
289
|
+
## Anti-Patterns to Avoid
|
|
290
|
+
|
|
291
|
+
- ❌ Vague instructions: "Be helpful" or "Write good code"
|
|
292
|
+
- ❌ Detailed style rules (use linters instead)
|
|
293
|
+
- ❌ Every possible command (context bloat)
|
|
294
|
+
- ❌ Auto-generated content without review
|
|
295
|
+
- ❌ Code snippets that go stale (use pointers)
|