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.
Files changed (46) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/agent/planner.md +3 -2
  3. package/dist/template/.opencode/command/accessibility-check.md +293 -30
  4. package/dist/template/.opencode/command/analyze-mockup.md +406 -20
  5. package/dist/template/.opencode/command/analyze-project.md +439 -30
  6. package/dist/template/.opencode/command/brainstorm.md +288 -5
  7. package/dist/template/.opencode/command/commit.md +226 -17
  8. package/dist/template/.opencode/command/create.md +138 -35
  9. package/dist/template/.opencode/command/design-audit.md +477 -29
  10. package/dist/template/.opencode/command/design.md +609 -6
  11. package/dist/template/.opencode/command/edit-image.md +223 -20
  12. package/dist/template/.opencode/command/finish.md +162 -71
  13. package/dist/template/.opencode/command/fix-ci.md +296 -24
  14. package/dist/template/.opencode/command/fix-types.md +345 -13
  15. package/dist/template/.opencode/command/fix-ui.md +293 -13
  16. package/dist/template/.opencode/command/fix.md +256 -9
  17. package/dist/template/.opencode/command/generate-diagram.md +327 -26
  18. package/dist/template/.opencode/command/generate-icon.md +266 -22
  19. package/dist/template/.opencode/command/generate-image.md +232 -12
  20. package/dist/template/.opencode/command/generate-pattern.md +234 -20
  21. package/dist/template/.opencode/command/generate-storyboard.md +231 -21
  22. package/dist/template/.opencode/command/handoff.md +202 -30
  23. package/dist/template/.opencode/command/implement.md +162 -50
  24. package/dist/template/.opencode/command/import-plan.md +247 -51
  25. package/dist/template/.opencode/command/init.md +154 -35
  26. package/dist/template/.opencode/command/integration-test.md +405 -24
  27. package/dist/template/.opencode/command/issue.md +171 -21
  28. package/dist/template/.opencode/command/new-feature.md +382 -54
  29. package/dist/template/.opencode/command/plan.md +144 -118
  30. package/dist/template/.opencode/command/pr.md +229 -28
  31. package/dist/template/.opencode/command/quick-build.md +234 -5
  32. package/dist/template/.opencode/command/research-and-implement.md +436 -12
  33. package/dist/template/.opencode/command/research-ui.md +444 -34
  34. package/dist/template/.opencode/command/research.md +173 -45
  35. package/dist/template/.opencode/command/restore-image.md +416 -22
  36. package/dist/template/.opencode/command/resume.md +439 -63
  37. package/dist/template/.opencode/command/revert-feature.md +341 -64
  38. package/dist/template/.opencode/command/review-codebase.md +193 -4
  39. package/dist/template/.opencode/command/skill-create.md +506 -14
  40. package/dist/template/.opencode/command/skill-optimize.md +487 -16
  41. package/dist/template/.opencode/command/status.md +320 -60
  42. package/dist/template/.opencode/command/summarize.md +374 -33
  43. package/dist/template/.opencode/command/triage.md +355 -0
  44. package/dist/template/.opencode/command/ui-review.md +292 -25
  45. package/dist/template/.opencode/skill/playwriter/SKILL.md +148 -0
  46. package/package.json +1 -1
@@ -1,107 +1,367 @@
1
1
  ---
2
- description: Show task and project status
2
+ description: Comprehensive project and session status dashboard
3
+ argument-hint: "[--full] [--health] [--sessions] [--git]"
3
4
  agent: explore
4
5
  ---
5
6
 
6
- # Project Status
7
+ # Status Dashboard
7
8
 
8
- ## Quick Summary
9
+ Generate a comprehensive project status report covering tasks, sessions, git state, and system health.
9
10
 
10
- 1. **Git:** Current branch, uncommitted changes
11
- 2. **Tasks:** `bd_ls()` - count by status
12
- 3. **CI:** Any build issues
13
- 4. **Sessions:** Recent activity
11
+ ## Phase 1: Gather All State (Parallel)
14
12
 
15
- ## Recent Session Activity
13
+ Run all status checks simultaneously:
16
14
 
17
- ```bash
18
- list_sessions(project="current", since="today", limit=5)
15
+ ```typescript
16
+ // Beads state
17
+ bd_status({ include_agents: true });
18
+ bd_ls({ status: "in_progress", limit: 10, offset: 0 });
19
+ bd_ls({ status: "ready", limit: 10, offset: 0 });
20
+ bd_inbox({ n: 5, unread: true, global: true });
21
+ bd_doctor({ reason: "Health check" });
22
+ bd_reservations({ reason: "Check file locks" });
23
+
24
+ // Sessions
25
+ list_sessions({ project: "current", since: "today", limit: 5, _: true });
26
+
27
+ // Git state
28
+ bash("git status --porcelain");
29
+ bash("git branch --show-current");
30
+ bash("git log --oneline -5");
19
31
  ```
20
32
 
21
- Show:
33
+ ## Phase 2: Health Score Calculation
22
34
 
23
- - Session IDs and timestamps
24
- - Message counts
25
- - File changes per session
26
- - Active work periods
35
+ Calculate overall project health (0-100):
36
+
37
+ ```
38
+ ┌─────────────────────────────────────────────────────────────────────────┐
39
+ │ HEALTH SCORE FORMULA │
40
+ ├─────────────────────────────────────────────────────────────────────────┤
41
+ │ │
42
+ │ Health = Base(60) + Bonuses - Penalties │
43
+ │ │
44
+ │ BONUSES (up to +40) │
45
+ │ ├── Database healthy: +10 │
46
+ │ ├── No SLA breaches: +10 │
47
+ │ ├── All P0/P1 assigned: +10 │
48
+ │ └── CI passing: +10 │
49
+ │ │
50
+ │ PENALTIES (uncapped) │
51
+ │ ├── Per SLA breach: -5 │
52
+ │ ├── Per unread urgent msg: -3 │
53
+ │ ├── Per stale task (>7d): -2 │
54
+ │ ├── Database issues: -20 │
55
+ │ └── Per circular dependency: -10 │
56
+ │ │
57
+ │ GRADES │
58
+ │ ├── 90-100: 🟢 EXCELLENT │
59
+ │ ├── 75-89: 🟢 GOOD │
60
+ │ ├── 60-74: 🟡 FAIR │
61
+ │ ├── 40-59: 🟠 NEEDS ATTENTION │
62
+ │ └── 0-39: 🔴 CRITICAL │
63
+ │ │
64
+ └─────────────────────────────────────────────────────────────────────────┘
65
+ ```
66
+
67
+ ## Phase 3: Generate Dashboard
68
+
69
+ ```
70
+ ╔══════════════════════════════════════════════════════════════════════════╗
71
+ ║ PROJECT STATUS ║
72
+ ║ [Project Name] ║
73
+ ║ [Timestamp] ║
74
+ ╠══════════════════════════════════════════════════════════════════════════╣
75
+
76
+ HEALTH: 🟢 85/100 GOOD
77
+ ━━━━━━━━━━━━━━━━━━━━━━
78
+
79
+ [████████████████████████░░░░░░] 85%
80
+
81
+ Database: ✓ OK
82
+ CI: ✓ Passing
83
+ SLA: ✓ No breaches
84
+ Agents: 3 active
85
+
86
+
87
+ TASK OVERVIEW
88
+ ━━━━━━━━━━━━━
89
+ ┌────────────────────────────────────────────────────┐
90
+ │ │
91
+ │ Open: 12 In Progress: 3 Ready: 5 │
92
+ │ ├── P0: 0 ├── P0: 1 ├── Blocked: 2 │
93
+ │ ├── P1: 2 ├── P1: 1 └── Unblocked: 3 │
94
+ │ ├── P2: 5 └── P2: 1 │
95
+ │ └── P3+: 5 │
96
+ │ │
97
+ │ Closed Today: 4 This Week: 18 │
98
+ │ │
99
+ └────────────────────────────────────────────────────┘
100
+
101
+
102
+ IN PROGRESS
103
+ ━━━━━━━━━━━
104
+ ID │ Priority │ Title │ Agent │ Age
105
+ ─────────┼──────────┼──────────────────────────┼──────────┼────────
106
+ bd-abc12 │ P0 │ Fix auth regression │ be-agent │ 2h
107
+ bd-def34 │ P1 │ Add user dashboard │ fe-agent │ 1d
108
+ bd-ghi56 │ P2 │ Refactor logging │ be-agent │ 3h
109
+
110
+
111
+ READY TO START
112
+ ━━━━━━━━━━━━━━
113
+ ID │ Priority │ Title │ Blocked By
114
+ ─────────┼──────────┼──────────────────────────┼───────────
115
+ bd-xyz11 │ P1 │ Add notifications │ -
116
+ bd-xyz22 │ P2 │ Update API docs │ -
117
+ bd-xyz33 │ P2 │ Add analytics │ bd-abc12
118
+
119
+
120
+ MESSAGES
121
+ ━━━━━━━━
122
+ [If unread messages exist:]
123
+ 📬 3 unread messages
124
+
125
+ From │ Subject │ Time
126
+ ────────────┼──────────────────────────────────┼────────
127
+ fe-agent │ Need API spec for dashboard │ 2h ago
128
+ qa-agent │ Tests failing on staging │ 4h ago
129
+ be-agent │ Migration complete │ 1d ago
130
+
131
+ [If no messages:]
132
+ 📭 No unread messages
133
+
134
+
135
+ FILE LOCKS
136
+ ━━━━━━━━━━
137
+ [If locks exist:]
138
+ 🔒 2 active locks
139
+
140
+ Path │ Owner │ Expires
141
+ ───────────────────────────────┼───────────┼─────────
142
+ src/auth/service.ts │ be-agent │ 8m
143
+ src/components/Dashboard.tsx │ fe-agent │ 15m
144
+
145
+ [If no locks:]
146
+ 🔓 No active file locks
147
+
148
+
149
+ GIT STATUS
150
+ ━━━━━━━━━━
151
+ Branch: feature/auth-refactor
152
+ Ahead: 2 commits
153
+ Behind: 0 commits
154
+
155
+ [If changes:]
156
+ Modified: 3 files
157
+ Staged: 1 file
158
+ Untracked: 2 files
159
+
160
+ [If clean:]
161
+ Working tree clean ✓
162
+
163
+
164
+ RECENT COMMITS
165
+ ━━━━━━━━━━━━━━
166
+ abc1234 - fix: auth token validation (2h ago)
167
+ def5678 - feat: add dashboard skeleton (5h ago)
168
+ ghi9012 - refactor: extract user service (1d ago)
169
+
170
+
171
+ SESSIONS TODAY
172
+ ━━━━━━━━━━━━━━
173
+ Session │ Time │ Messages │ Files │ Focus
174
+ ────────────┼──────────┼──────────┼───────┼──────────────────
175
+ ses_abc123 │ 2:30 PM │ 45 │ 12 │ Auth refactor
176
+ ses_def456 │ 11:00 AM │ 28 │ 8 │ Dashboard setup
177
+ ses_ghi789 │ 9:15 AM │ 15 │ 3 │ Bug triage
178
+
179
+ Total: 3 sessions, 88 messages, 23 files modified
180
+
181
+
182
+ TASK COMPLIANCE
183
+ ━━━━━━━━━━━━━━━
184
+ [Check .beads/artifacts/<id>/ for each in-progress task]
185
+
186
+ Complete (spec + plan):
187
+ ✓ bd-abc12: Fix auth regression
188
+ ✓ bd-def34: Add user dashboard
189
+
190
+ Incomplete:
191
+ ⚠ bd-ghi56: Missing plan.md
192
+
193
+ Compliance: 2/3 (67%)
194
+
195
+
196
+ CONTEXT STATUS
197
+ ━━━━━━━━━━━━━━
198
+ Current Session: ses_xyz999
199
+ Token Usage: ~85,000 (estimated)
200
+ Status: 🟡 Consider pruning soon
201
+
202
+ Recommendation: Prune completed tool outputs before next major task
27
203
 
28
- **Output:**
29
204
 
205
+ REQUIRED ACTIONS
206
+ ━━━━━━━━━━━━━━━━
207
+ Priority │ Action │ Command
208
+ ─────────┼─────────────────────────────────────┼────────────────────
209
+ HIGH │ Reply to fe-agent question │ bd_msg(...)
210
+ HIGH │ Add plan for bd-ghi56 │ /plan bd-ghi56
211
+ MEDIUM │ Review 2 stale tasks │ /triage --stale
212
+ LOW │ Push 2 local commits │ git push
213
+
214
+ ╚══════════════════════════════════════════════════════════════════════════╝
215
+ ```
216
+
217
+ ## Phase 4: Trend Analysis (--full mode)
218
+
219
+ If `--full` flag, add historical comparison:
220
+
221
+ ```
222
+ TRENDS (7 days)
223
+ ━━━━━━━━━━━━━━━
224
+ This Week Last Week Change
225
+ ────────────────────────────────────────────────────
226
+ Tasks Completed 18 12 +50% ↑
227
+ Avg Cycle Time 2.3 days 3.1 days -26% ↑
228
+ SLA Compliance 95% 88% +7% ↑
229
+ Throughput/Day 2.6 1.7 +53% ↑
230
+
231
+ Velocity Chart:
232
+ Mon ████████ 8
233
+ Tue ██████ 6
234
+ Wed ████ 4
235
+ Thu ██████ 6
236
+ Fri ██████████ 10
237
+ └──────────────────→
30
238
  ```
31
- TODAY'S SESSIONS
32
239
 
33
- 1. ses_abc123 - 2:30 PM
34
- Messages: 45, Files: 12
35
- Changes: +234/-56
240
+ ## Phase 5: Session Insights
241
+
242
+ ### Context Health
243
+
244
+ ```typescript
245
+ // Estimate current context usage
246
+ const contextWarnings = [];
247
+
248
+ if (estimatedTokens > 120000) {
249
+ contextWarnings.push("⚠️ High token usage - consider new session");
250
+ }
36
251
 
37
- 2. ses_def456 - 11:00 AM
38
- Messages: 28, Files: 8
39
- Changes: +112/-23
252
+ if (sessionDuration > 3 * 60 * 60 * 1000) {
253
+ // 3 hours
254
+ contextWarnings.push("⚠️ Long session - context may be degraded");
255
+ }
40
256
 
41
- Activity: 2 sessions, 73 messages, 20 files modified
257
+ if (toolCallCount > 200) {
258
+ contextWarnings.push("⚠️ Many tool calls - prune old outputs");
259
+ }
42
260
  ```
43
261
 
44
- ## Task Compliance
262
+ ### Incomplete Sessions
45
263
 
46
264
  ```typescript
47
- bd_ls({ status: "open" });
265
+ // Check for sessions with incomplete work
266
+ const incompleteSessions = recentSessions.filter(
267
+ (s) => !s.hasHandoff && !s.summary?.includes("completed"),
268
+ );
269
+
270
+ if (incompleteSessions.length > 0) {
271
+ console.log("Incomplete work from previous sessions:");
272
+ for (const s of incompleteSessions) {
273
+ console.log(`- ${s.id}: ${s.lastMessage}`);
274
+ }
275
+ }
48
276
  ```
49
277
 
50
- For each bead, check `.beads/artifacts/<bead-id>/`:
278
+ ## Phase 6: CI/CD Status (if available)
51
279
 
52
- - [ ] spec.md exists
53
- - [ ] research.md exists (if needed)
54
- - [ ] plan.md exists (if needed)
280
+ ```bash
281
+ # GitHub Actions
282
+ gh run list --limit 3 --json status,conclusion,name,createdAt
283
+
284
+ # Or check for common CI files
285
+ ls .github/workflows/ 2>/dev/null
286
+ cat .github/workflows/*.yml | grep -A5 "name:"
287
+ ```
55
288
 
56
289
  **Output:**
57
290
 
58
291
  ```
59
- TASK COMPLIANCE
60
-
61
- Complete (spec + plan):
62
- - bd-a1b2: In Progress - [title]
63
- - bd-c3d4: Open - [title]
292
+ CI/CD STATUS
293
+ ━━━━━━━━━━━━
294
+ Pipeline │ Status │ Time
295
+ ────────────────┼───────────┼─────────
296
+ main │ Passing 15m ago
297
+ feature/auth │ ✗ Failed │ 2h ago
298
+ staging-deploy │ ✓ Passing │ 1d ago
299
+
300
+ Failed Check: feature/auth
301
+ └── Jest tests: 2 failures in auth.test.ts
302
+ └── Fix: /implement bd-abc12 (related task)
303
+ ```
64
304
 
65
- Incomplete (missing files):
66
- - bd-e5f6: Missing spec.md
305
+ ## Examples
67
306
 
68
- Compliance: X/Y beads complete
307
+ ```bash
308
+ /status # Quick overview
309
+ /status --full # Include trends and history
310
+ /status --health # Focus on health metrics
311
+ /status --sessions # Focus on session activity
312
+ /status --git # Focus on git state
69
313
  ```
70
314
 
71
- ## Active Tasks
315
+ ## Integration
72
316
 
73
- For `bd_ls({ status: "in_progress" })`:
317
+ Based on status, suggest next actions:
74
318
 
75
- - Bead ID, Title, Priority
76
- - Goal from spec.md
77
- - Progress from plan.md checkboxes
78
- - Last session activity (if available via read_session)
319
+ ```
320
+ RECOMMENDED NEXT STEPS
321
+ ━━━━━━━━━━━━━━━━━━━━━━
79
322
 
80
- ## Required Actions
323
+ Based on current status:
81
324
 
82
- - Missing spec → `/create`
83
- - Has spec `/start <bead-id>`
84
- - In Progress → `/implement <bead-id>`
85
- - Ready to finish → `/finish <bead-id>`
325
+ 1. High Priority Messages:
326
+ → Reply to fe-agent: bd_msg({ to: "fe-agent", subj: "Re: API spec", body: "..." })
86
327
 
87
- ## Session Insights
328
+ 2. Continue In-Progress Work:
329
+ → /implement bd-abc12 (P0, 2h old)
88
330
 
89
- **If token usage high (>120k):**
331
+ 3. Start Ready Tasks:
332
+ → /start bd-xyz11 (P1, unblocked)
90
333
 
334
+ 4. Session Maintenance:
335
+ → Consider /handoff if switching tasks
336
+ → Prune old tool outputs to reduce context
91
337
  ```
92
- ⚠️ Current session: [current token count]
93
338
 
94
- Recommend: Start fresh session for next task
95
- - Current work will be in read_session("last")
96
- - Lower cost, better performance
339
+ ## Caching
340
+
341
+ For performance, cache expensive checks:
342
+
343
+ ```typescript
344
+ // Cache health check for 5 minutes
345
+ const healthCacheKey = `health_${(Date.now() / (5 * 60 * 1000)) | 0}`;
346
+
347
+ // Cache CI status for 10 minutes
348
+ const ciCacheKey = `ci_${(Date.now() / (10 * 60 * 1000)) | 0}`;
97
349
  ```
98
350
 
99
- **If multiple incomplete sessions:**
351
+ ## Error States
352
+
353
+ Handle gracefully:
100
354
 
101
355
  ```
102
- Recent incomplete work:
103
- - ses_abc123: [title from last message]
104
- - ses_def456: [title from last message]
356
+ [If beads unavailable:]
357
+ ⚠️ Beads database not initialized
358
+ Run: bd_init() to connect
359
+
360
+ [If git not available:]
361
+ ⚠️ Not a git repository
362
+ Run: git init
105
363
 
106
- Consider: Review with read_session("<id>") to decide continue or close
364
+ [If CI check fails:]
365
+ ⚠️ CI status unavailable
366
+ Check: GitHub Actions permissions
107
367
  ```