opencodekit 0.10.0 → 0.11.1

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