opencodekit 0.7.0 → 0.9.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 (42) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +65 -27
  3. package/dist/template/.opencode/README.md +14 -19
  4. package/dist/template/.opencode/agent/build.md +4 -6
  5. package/dist/template/.opencode/agent/explore.md +18 -18
  6. package/dist/template/.opencode/agent/planner.md +4 -7
  7. package/dist/template/.opencode/agent/review.md +1 -2
  8. package/dist/template/.opencode/agent/rush.md +4 -6
  9. package/dist/template/.opencode/agent/scout.md +45 -38
  10. package/dist/template/.opencode/agent/vision.md +16 -24
  11. package/dist/template/.opencode/command/analyze-project.md +9 -9
  12. package/dist/template/.opencode/command/create.md +9 -4
  13. package/dist/template/.opencode/command/finish.md +12 -17
  14. package/dist/template/.opencode/command/fix-ci.md +10 -9
  15. package/dist/template/.opencode/command/fix-types.md +4 -11
  16. package/dist/template/.opencode/command/handoff.md +14 -18
  17. package/dist/template/.opencode/command/implement.md +11 -11
  18. package/dist/template/.opencode/command/import-plan.md +25 -14
  19. package/dist/template/.opencode/command/integration-test.md +1 -1
  20. package/dist/template/.opencode/command/issue.md +10 -9
  21. package/dist/template/.opencode/command/new-feature.md +4 -6
  22. package/dist/template/.opencode/command/plan.md +3 -5
  23. package/dist/template/.opencode/command/pr.md +2 -4
  24. package/dist/template/.opencode/command/research-and-implement.md +1 -1
  25. package/dist/template/.opencode/command/research.md +13 -15
  26. package/dist/template/.opencode/command/resume.md +2 -2
  27. package/dist/template/.opencode/command/revert-feature.md +5 -7
  28. package/dist/template/.opencode/command/status.md +8 -10
  29. package/dist/template/.opencode/dcp.jsonc +20 -2
  30. package/dist/template/.opencode/opencode.json +20 -35
  31. package/dist/template/.opencode/package.json +1 -1
  32. package/dist/template/.opencode/plugin/beads.ts +667 -0
  33. package/dist/template/.opencode/plugin/compaction.ts +80 -0
  34. package/dist/template/.opencode/plugin/skill-mcp.ts +458 -0
  35. package/dist/template/.opencode/skill/beads/SKILL.md +419 -0
  36. package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +218 -0
  37. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +130 -0
  38. package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +180 -0
  39. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +222 -0
  40. package/dist/template/.opencode/skill/figma/SKILL.md +214 -0
  41. package/dist/template/.opencode/skill/playwright/SKILL.md +187 -0
  42. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
750
750
  // package.json
751
751
  var package_default = {
752
752
  name: "opencodekit",
753
- version: "0.7.0",
753
+ version: "0.9.0",
754
754
  description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
755
755
  type: "module",
756
756
  repository: {
@@ -79,13 +79,12 @@ Specify depth when delegating to control tool call budget:
79
79
 
80
80
  ## Tool Priority
81
81
 
82
- **GKG tools → LSP tools → AST tools → Built-in tools**
82
+ **LSP tools → AST tools → Built-in tools**
83
83
 
84
- 1. `gkg_search_codebase_definitions`, `gkg_get_references`, `gkg_repo_map` - Find symbols, usages, API overview
85
- 2. `lsp_rename`, `lsp_code_actions`, `lsp_organize_imports` - Semantic refactoring (LSP-based)
86
- 3. `ast-grep` - Semantic code search/replace (AST-based)
87
- 4. `grep`, `glob` - Pattern matching, file discovery
88
- 5. `read`, `edit`, `write` - File operations
84
+ 1. `lsp_rename`, `lsp_code_actions`, `lsp_organize_imports` - Semantic refactoring (LSP-based)
85
+ 2. `ast-grep` - Semantic code search/replace (AST-based)
86
+ 3. `grep`, `glob` - Pattern matching, file discovery
87
+ 4. `read`, `edit`, `write` - File operations
89
88
 
90
89
  **Rule**: Always `read` before `edit` to verify content.
91
90
 
@@ -296,15 +295,15 @@ Use all three:
296
295
 
297
296
  ## Beads Usage
298
297
 
299
- **Session start**: `bd doctor --fix` then `bd ready`
298
+ **Session start**: `bd_doctor()` then `bd_claim()`
300
299
  **Session end**: Complete one bead fully before starting next
301
- **Weekly**: `bd cleanup --older-than 7d` then `bd sync`
300
+ **Weekly**: `bd_cleanup(days=7)` then `bd_sync()`
302
301
 
303
302
  **Philosophy**: Beads is execution, not planning. Plan elsewhere, track in Beads.
304
303
 
305
- ## Beads Village (Multi-Agent Coordination)
304
+ ## Beads Tools (Multi-Agent Coordination)
306
305
 
307
- MCP server for task coordination and file locking between agents.
306
+ Native plugin tools for task coordination and file locking between agents.
308
307
 
309
308
  ### When to Use
310
309
 
@@ -315,41 +314,80 @@ MCP server for task coordination and file locking between agents.
315
314
  ### Core Workflow
316
315
 
317
316
  ```
318
- init() → claim() → reserve(paths) → [work] → done(id, msg) → RESTART
317
+ bd_init() → bd_claim() → bd_reserve(paths) → [work] → bd_done(id, msg) → RESTART
319
318
  ```
320
319
 
321
- ### Key Tools
320
+ ### Tool Reference
322
321
 
323
- **Session Management**
322
+ **Lifecycle Tools**
324
323
 
325
- Start every session by calling `init` with your team name and role. This registers you in the workspace and enables role-based task filtering. For example, `init(team="project", role="fe")` joins as a frontend agent.
324
+ Start every session by calling `bd_init` with your team name and role. This registers you in the workspace and enables role-based task filtering. For example, `bd_init({ team: "project", role: "fe" })` joins as a frontend agent.
326
325
 
327
- Check workspace state with `status(include_agents=true)` to see active agents, file locks, and pending messages.
326
+ Call `bd_claim` to get the next ready task assigned to your role. It auto-filters based on task tags matching your role and marks the task as in_progress.
328
327
 
329
- **Task Operations**
328
+ When work is complete, call `bd_done` with the task ID and completion message. This closes the task, releases all file reservations, and syncs with git. After `bd_done`, restart your session for fresh context.
330
329
 
331
- Call `claim` to get the next ready task assigned to your role. It auto-filters based on task tags matching your role.
330
+ **Task Management Tools**
332
331
 
333
- When work is complete, call `done(id="bd-42", msg="Implemented feature X")` to close the task and notify other agents. After `done`, restart your session for a fresh context.
332
+ Use `bd_add` to create new tasks for discovered work. Specify title, optional description, and priority (0=critical through 4=backlog). Use `bd_assign` to assign tasks to specific roles like fe, be, mobile, devops, or qa.
334
333
 
335
- **File Reservations**
334
+ Call `bd_ls` to list tasks filtered by status: open, closed, in_progress, ready, or all. Use `bd_show` with a task ID to get full details including description, notes, and history.
336
335
 
337
- Before editing files, call `reserve(paths=["src/auth.ts"])` to lock them. This prevents other agents from modifying the same files. Call `release` when finished to unlock.
336
+ **File Reservation Tools**
338
337
 
339
- **Messaging**
338
+ Before editing any file, call `bd_reserve` with the file paths you need. This creates locks that prevent other agents from modifying the same files. Locks expire after 600 seconds by default.
340
339
 
341
- Send messages with `msg(subj="API Ready", global=true, to="all")` for cross-workspace announcements. Check incoming messages with `inbox(unread=true)`.
340
+ Call `bd_release` to unlock files early, or let `bd_done` release them automatically. Use `bd_reservations` to see all active locks across the workspace before editing.
342
341
 
343
- ### Integration with Commands
342
+ **Messaging Tools**
344
343
 
345
- Use `/create` for the full spec workflow instead of the Village `add` tool. When implementing, `claim` gets your task and `reserve` locks files - Village handles the coordination while your `/implement` command handles the actual work. When finishing, `done` syncs state and notifies other agents.
344
+ Send messages with `bd_msg` using a subject and optional body. Set `to: "all"` for broadcast messages visible to all agents. Check incoming messages with `bd_inbox`, optionally filtering to unread only.
345
+
346
+ **Status and Maintenance Tools**
347
+
348
+ Call `bd_status` to get workspace overview including ready task count, in-progress tasks, and active locks. Use `bd_sync` to manually sync with git.
349
+
350
+ Run `bd_cleanup` periodically to remove old closed issues. Use `bd_doctor` to check and repair database health.
351
+
352
+ **Analysis Tools**
353
+
354
+ Call `bd_insights` for graph analysis showing bottlenecks and high-priority keystones. Use `bd_plan` to see a parallel execution plan with tasks grouped by priority tracks.
355
+
356
+ Get `bd_priority` recommendations for what to work on next based on graph analysis. Use `bd_diff` to compare issue changes between git revisions.
357
+
358
+ ### Quick Start
359
+
360
+ ```typescript
361
+ // 1. Join workspace
362
+ bd_init({ team: "project", role: "fe" });
363
+
364
+ // 2. Get next task
365
+ const task = bd_claim();
366
+
367
+ // 3. Lock files before editing
368
+ bd_reserve({ paths: ["src/auth.ts", "src/types.ts"] });
369
+
370
+ // 4. Do the work...
371
+
372
+ // 5. Complete and restart
373
+ bd_done({ id: task.id, msg: "Implemented auth" });
374
+ // RESTART SESSION
375
+ ```
346
376
 
347
377
  ### Rules
348
378
 
349
- - **Always `init()` first** in any session using Village tools
379
+ - **Always `bd_init()` first** in any session using beads tools
350
380
  - **Reserve before edit** to prevent conflicts
351
- - **One task per session** - restart after `done()`
352
- - **Use `msg(global=true)`** for cross-workspace announcements
381
+ - **One task per session** - restart after `bd_done()`
382
+ - **Use `bd_msg(to="all")`** for team-wide announcements
383
+
384
+ ### Skill
385
+
386
+ Load `beads` skill for detailed workflow guidance:
387
+
388
+ ```
389
+ skill({ name: "beads" })
390
+ ```
353
391
 
354
392
  ## Skills System
355
393
 
@@ -144,11 +144,9 @@ Memory (Permanent) → Beads (Multi-session) → Git (Audit Trail)
144
144
 
145
145
  Plugins run automatically in every session:
146
146
 
147
- | Plugin | What it does |
148
- | ------------- | ----------------------------------------------------------- |
149
- | **enforcer** | OS notification when session idles with incomplete TODOs |
150
- | **compactor** | Warns at 70%, 85%, 95% context usage - prevents rushed work |
151
- | **truncator** | Dynamic output truncation based on context remaining |
147
+ - **enforcer** - OS notification when session idles with incomplete TODOs
148
+ - **compactor** - Warns at 70%, 85%, 95% context usage - prevents rushed work
149
+ - **truncator** - Dynamic output truncation based on context remaining
152
150
 
153
151
  **Compactor thresholds**:
154
152
 
@@ -160,13 +158,11 @@ Plugins run automatically in every session:
160
158
 
161
159
  ## Custom Tools
162
160
 
163
- | Tool | Purpose |
164
- | ----------------- | ---------------------------------------- |
165
- | **memory-read** | Load previous context, templates |
166
- | **memory-update** | Save learnings, handoffs |
167
- | **memory-search** | Search across all memory files |
168
- | **observation** | Create structured observations |
169
- | **ast-grep** | Semantic code search/replace (AST-based) |
161
+ - **memory-read** - Load previous context, templates
162
+ - **memory-update** - Save learnings, handoffs
163
+ - **memory-search** - Search across all memory files
164
+ - **observation** - Create structured observations
165
+ - **ast-grep** - Semantic code search/replace (AST-based)
170
166
 
171
167
  ### AST-Grep Usage
172
168
 
@@ -190,7 +186,7 @@ ast-grep pattern="oldFunc($$$)" rewrite="newFunc($$$)" dryRun=true
190
186
 
191
187
  ## MCP Services
192
188
 
193
- **Enabled by default (5 total):**
189
+ **Enabled by default (4 total):**
194
190
 
195
191
  1. **context7** - Up-to-date library documentation (37.6k+ libraries)
196
192
  - Requires: CONTEXT7_API_KEY
@@ -204,18 +200,17 @@ ast-grep pattern="oldFunc($$$)" rewrite="newFunc($$$)" dryRun=true
204
200
  - No API key needed (public service)
205
201
  - GitHub: https://github.com/Shachlan/grep.app-mcp
206
202
 
207
- 4. **gkg** - GitLab Knowledge Graph (local codebase semantic search)
208
- - No API key needed (runs locally on port 27495)
209
- - Docs: https://gitlab-org.gitlab.io/rust/knowledge-graph/
210
- - Install: Follow https://gitlab-org.gitlab.io/rust/knowledge-graph/getting-started/install/
211
-
212
203
  **Optional (disabled by default):**
213
204
 
214
- 5. **Framelink MCP for Figma** - Extract Figma layouts and design tokens
205
+ 4. **Framelink MCP for Figma** - Extract Figma layouts and design tokens
215
206
  - Requires: FIGMA_API_KEY
216
207
  - GitHub: https://github.com/GLips/Figma-Context-MCP (11.9k+ stars)
217
208
  - Enable: Set `"Framelink MCP for Figma": { "enabled": true }` in opencode.json
218
209
 
210
+ 5. **playwright** - Browser automation for testing
211
+ - No API key needed
212
+ - Use via skill: `skill({ name: "playwright" })` then `skill_mcp()`
213
+
219
214
  ---
220
215
 
221
216
  ## Getting Started Examples
@@ -14,7 +14,6 @@ tools:
14
14
  webfetch: true
15
15
  websearch: true
16
16
  codesearch: true
17
- gkg*: true
18
17
  ast-grep*: true
19
18
  lsp*: true
20
19
  context7*: true
@@ -47,11 +46,10 @@ Primary orchestrator. Execute-first. Autonomous task completion until resolved.
47
46
 
48
47
  ## Tool Priority
49
48
 
50
- 1. **GKG tools** for code search (definitions, references, repo map)
51
- 2. **LSP tools** for semantic refactoring (rename, code actions, organize imports)
52
- 3. **AST-Grep** for semantic code search/replace
53
- 4. **Built-in tools** for pattern matching (grep, glob, read)
54
- 5. **Bash** for running tests, builds, commands
49
+ 1. **LSP tools** for semantic refactoring (rename, code actions, organize imports)
50
+ 2. **AST-Grep** for semantic code search/replace
51
+ 3. **Built-in tools** for pattern matching (grep, glob, read)
52
+ 4. **Bash** for running tests, builds, commands
55
53
 
56
54
  ### LSP Tools
57
55
 
@@ -13,7 +13,7 @@ tools:
13
13
  list: true
14
14
  todoread: false
15
15
  todowrite: false
16
- gkg*: true
16
+ ast-grep*: true
17
17
  ---
18
18
 
19
19
  # Explore Agent
@@ -25,7 +25,7 @@ File search specialist. Navigate and explore codebases efficiently.
25
25
  - Finding files using glob patterns
26
26
  - Searching code with regex patterns
27
27
  - Reading and analyzing file contents
28
- - Semantic code search with GKG tools
28
+ - Semantic code search with AST-Grep
29
29
 
30
30
  ## Guidelines
31
31
 
@@ -37,30 +37,30 @@ File search specialist. Navigate and explore codebases efficiently.
37
37
 
38
38
  ## Tool Priority
39
39
 
40
- **Use GKG tools FIRST, then fall back to built-in tools.**
40
+ **Use AST-Grep for semantic search, then fall back to built-in tools.**
41
41
 
42
- ### GKG Tools (Semantic Search)
42
+ ### AST-Grep (Semantic Search)
43
43
 
44
- | Tool | Use For |
45
- | --------------------------------- | ------------------------------------------ |
46
- | `gkg_search_codebase_definitions` | Find functions, classes, constants by name |
47
- | `gkg_get_references` | Find all callers/usages of a symbol |
48
- | `gkg_read_definitions` | Read function/class body only |
49
- | `gkg_get_definition` | Jump to definition from usage |
50
- | `gkg_repo_map` | API-level overview of directories |
44
+ `ast-grep` finds functions, classes, and patterns semantically.
45
+
46
+ **Pattern syntax:** `$NAME` = single node, `$$$` = zero or more nodes
47
+
48
+ **Examples:**
49
+
50
+ - `ast-grep pattern="function $NAME($$$) { $$$ }"` - Find all functions
51
+ - `ast-grep pattern="console.log($$$)"` - Find all console.log calls
52
+ - `ast-grep pattern="const [$S, $SET] = useState($$$)"` - Find React hooks
51
53
 
52
54
  ### Built-in Tools (Pattern Matching)
53
55
 
54
- | Tool | Use For |
55
- | ------ | --------------------------------- |
56
- | `glob` | Find files by pattern (`**/*.ts`) |
57
- | `grep` | Search file contents with regex |
58
- | `read` | Read specific file contents |
56
+ - `glob` - Find files by pattern (`**/*.ts`)
57
+ - `grep` - Search file contents with regex
58
+ - `read` - Read specific file contents
59
59
 
60
60
  ## Thoroughness Levels
61
61
 
62
- **Quick**: Single GKG search or glob. Read 1-3 files. Return immediately.
62
+ **Quick**: Single ast-grep or glob. Read 1-3 files. Return immediately.
63
63
 
64
- **Medium**: GKG + grep verification. Check 2-3 naming conventions. Read 3-5 files.
64
+ **Medium**: AST-grep + grep verification. Check 2-3 naming conventions. Read 3-5 files.
65
65
 
66
66
  **Very Thorough**: Comprehensive search across multiple terms and locations. Build dependency map. Report with file:line references.
@@ -16,7 +16,6 @@ tools:
16
16
  task: true
17
17
  todowrite: true
18
18
  todoread: true
19
- gkg*: true
20
19
  context7*: true
21
20
  codesearch: true
22
21
  gh_grep*: true
@@ -60,12 +59,10 @@ Use **Facts/Guesses/Plans** in bead notes:
60
59
 
61
60
  ## Agent Assignments
62
61
 
63
- | Task Type | Agent |
64
- | ---------------------- | -------- |
65
- | Codebase search | @explore |
66
- | Library docs, patterns | @scout |
67
- | Code review, debugging | @review |
68
- | Implementation | @build |
62
+ - Codebase search → @explore
63
+ - Library docs, patterns → @scout
64
+ - Code review, debugging → @review
65
+ - Implementation @build
69
66
 
70
67
  **Typical chain**: research → plan → build → review
71
68
 
@@ -11,7 +11,6 @@ tools:
11
11
  grep: true
12
12
  read: true
13
13
  list: true
14
- gkg*: true
15
14
  webfetch: true
16
15
  websearch: true
17
16
  context7*: true
@@ -70,7 +69,7 @@ bd create "[type]: [description]" -t bug -p [0-4] -d "[details, file:line]"
70
69
 
71
70
  ## Tool Priority
72
71
 
73
- **Codebase**: gkg_searchgkg_get_references → read → grep
72
+ **Codebase**: grepast-grep → read
74
73
  **Verification**: bash (tests, lint, type-check)
75
74
  **History**: `git log -p`, `git blame`
76
75
 
@@ -13,7 +13,6 @@ tools:
13
13
  list: true
14
14
  webfetch: true
15
15
  websearch: true
16
- gkg*: true
17
16
  ast-grep*: true
18
17
  lsp*: true
19
18
  context7*: true
@@ -46,12 +45,11 @@ Fast execute-first agent. Speed over depth. Delegate anything complex.
46
45
 
47
46
  ## Tool Priority
48
47
 
49
- **GKG tools FIRST, then LSP, then AST-Grep, then built-in tools.**
48
+ **LSP tools FIRST, then AST-Grep, then built-in tools.**
50
49
 
51
- 1. `gkg_search_codebase_definitions`, `gkg_get_references` - Find symbols, usages
52
- 2. `lsp_rename`, `lsp_organize_imports` - Semantic refactoring
53
- 3. `ast-grep` - Semantic code search/replace
54
- 4. `grep`, `glob` - Text search, file patterns
50
+ 1. `lsp_rename`, `lsp_organize_imports` - Semantic refactoring
51
+ 2. `ast-grep` - Semantic code search/replace
52
+ 3. `grep`, `glob` - Text search, file patterns
55
53
 
56
54
  ### LSP Tools (Fast Refactoring)
57
55
 
@@ -11,7 +11,6 @@ tools:
11
11
  grep: false
12
12
  read: false
13
13
  list: false
14
- gkg*: false
15
14
  webfetch: true
16
15
  websearch: true
17
16
  context7*: true
@@ -32,62 +31,70 @@ External research: library docs, GitHub patterns, framework analysis.
32
31
  - Cross-repository analysis
33
32
  - Best practices research
34
33
 
35
- ## Guidelines
34
+ ## First: Classify the Request
35
+
36
+ Before searching, identify what you're dealing with.
36
37
 
37
- - Cite sources with links
38
- - No emojis in responses
39
- - Explain WHAT, WHY, HOW in deep mode
40
- - Compare implementations across repositories
38
+ **Conceptual questions** sound like "how do I use X", "what's the best practice for Y", or "docs for Z". These need official documentation plus recent web sources. Run context7 and websearch in parallel.
41
39
 
42
- ## Responsibility
40
+ **Implementation questions** sound like "how does X implement Y", "show me the source of Z", or "internal logic of W". These need actual source code with permalinks. Clone the repo, find the code, construct a permalink.
43
41
 
44
- **DO**: Library docs, API references, GitHub code search, framework deep dives.
42
+ **Context questions** sound like "why was this changed", "history of X", or "what issues led to Y". These need git history, issues, and PRs. Search issues and PRs, check git blame, find the discussion.
45
43
 
46
- **DON'T**: Local codebase search, code generation, implementation.
44
+ **Comprehensive questions** are complex or ambiguous. Hit everything in parallel: docs, web search, GitHub code search, and source analysis.
47
45
 
48
46
  ## Quick Mode
49
47
 
50
- For API lookups, syntax help, configuration guides.
48
+ For API lookups, syntax help, configuration guides. Triggered by: "how to", "syntax for", "API for", "docs for".
51
49
 
52
- ```
53
- 1. context7_resolve_library_id("library")
54
- 2. context7_get_library_docs(libraryID, topic)
55
- 3. Return: API signature + example + source link
56
- ```
50
+ Start with context7 to resolve the library ID, then query the specific topic. If context7 lacks coverage, fall back to websearch or codesearch. Return the API signature, a minimal example, and the source link.
57
51
 
58
- **Output**: 2-3 sentences + syntax example + link
59
- **Performance**: <10 seconds
52
+ Run at least 2-3 tool calls in parallel. Output should be 2-3 sentences plus a code example. Target under 10 seconds.
60
53
 
61
54
  ## Deep Mode
62
55
 
63
- For cross-repository analysis, pattern comparison.
56
+ For cross-repository analysis and pattern comparison. Triggered by: "how do others", "compare", "best practices", "production patterns".
57
+
58
+ Search GitHub for real implementations using gh_grep_searchGitHub. Vary your queries to hit different angles of the same concept. Compare 3-5 implementations from different repositories. Synthesize the common patterns and note the tradeoffs.
59
+
60
+ Run at least 4-6 tool calls in parallel. Output should include a summary, multiple code examples, tradeoffs, and a recommendation.
61
+
62
+ ## Permalink Protocol
64
63
 
65
- ```
66
- 1. gh_grep_searchGitHub(pattern, language)
67
- 2. context7 for official docs
68
- 3. Compare 3-5 implementations
69
- 4. Synthesize patterns
70
- ```
64
+ Every code reference must include a GitHub permalink. Never link to a branch or tag that can change.
71
65
 
72
- **Output**: Summary + code examples + tradeoffs + recommendations
73
- **Performance**: 30-60 seconds
66
+ To construct a permalink: clone the repo with depth 1, get the commit SHA with `git rev-parse HEAD`, then build the URL as `https://github.com/owner/repo/blob/<sha>/path/to/file#L10-L20`.
67
+
68
+ When citing code, format it as the claim, then the evidence with a permalink, then the code block, then a brief explanation of why this matters.
74
69
 
75
70
  ## Tool Priority
76
71
 
77
- 1. **context7**: Official documentation
78
- 2. **gh_grep_searchGitHub**: Real GitHub code
79
- 3. **codesearch**: Code examples
80
- 4. **websearch**: Best practices, comparisons
81
- 5. **webfetch**: Official docs, RFCs, specific URLs
72
+ Use context7 first for official documentation. It's fastest and most authoritative for library APIs.
73
+
74
+ Use gh_grep_searchGitHub for real GitHub code patterns. Vary your queries: search for the function name, then the configuration key, then the error message.
75
+
76
+ Use codesearch for code examples when you need broader coverage than a single repo.
77
+
78
+ Use websearch for best practices, comparisons, and recent articles. Always append the current year to avoid stale results.
79
+
80
+ Use webfetch for specific URLs: official docs, RFCs, blog posts the user shared.
81
+
82
+ ## When Things Fail
83
+
84
+ If context7 doesn't find the library, clone the repo directly and read the source plus README.
85
+
86
+ If gh_grep returns nothing, broaden your query. Search for concepts instead of exact function names.
87
+
88
+ If you hit API rate limits, work from already-cloned repos in the temp directory.
89
+
90
+ If you're uncertain, say so explicitly. Propose a hypothesis but flag it as unverified.
91
+
92
+ ## Guidelines
82
93
 
83
- ## Mode Detection
94
+ Cite sources with links. No emojis. Explain what the code does, why it's designed that way, and how to use it.
84
95
 
85
- **Quick**: "how to", "syntax for", "API for", "docs for"
86
- **Deep**: "how do others", "compare", "best practices", "production patterns"
96
+ Compare implementations across repositories when doing deep research. Note which patterns are common versus unique.
87
97
 
88
98
  ## Delegation
89
99
 
90
- - Local codebase @explore
91
- - Complex reasoning → @review
92
- - Code generation → @build
93
- - Architecture planning → @planner
100
+ If the task requires local codebase search, hand off to @explore. If it requires complex reasoning or debugging, hand off to @review. If it requires code generation, hand off to the main agent. If it requires architecture planning, hand off to @planner.
@@ -16,7 +16,6 @@ tools:
16
16
  task: true
17
17
  todowrite: true
18
18
  todoread: true
19
- gkg*: true
20
19
  context7*: true
21
20
  codesearch: true
22
21
  gh_grep*: true
@@ -57,12 +56,10 @@ Comprehensive analysis with actionable recommendations.
57
56
  **Use when:** Design review, accessibility audit, system consistency check
58
57
  **Skills:** Combine multiple skills based on task:
59
58
 
60
- | Task | Primary Skill | Supporting Skills |
61
- | --------------- | --------------------- | --------------------- |
62
- | UI/UX Review | `ui-ux-research` | `frontend-aesthetics` |
63
- | Accessibility | `accessibility-audit` | `visual-analysis` |
64
- | Design System | `design-system-audit` | `frontend-aesthetics` |
65
- | Mockup Analysis | `mockup-to-code` | `visual-analysis` |
59
+ - **UI/UX Review**: Primary `ui-ux-research`, supporting `frontend-aesthetics`
60
+ - **Accessibility**: Primary `accessibility-audit`, supporting `visual-analysis`
61
+ - **Design System**: Primary `design-system-audit`, supporting `frontend-aesthetics`
62
+ - **Mockup Analysis**: Primary `mockup-to-code`, supporting `visual-analysis`
66
63
 
67
64
  ```
68
65
  Load skill(s) → Systematic analysis → Structured findings → Recommendations
@@ -89,22 +86,19 @@ Load skill(s) → Systematic analysis → Structured findings → Recommendation
89
86
 
90
87
  ## Skill Selection Guide
91
88
 
92
- | User Request | Load This Skill |
93
- | ----------------------------- | --------------------- |
94
- | "Review this mockup" | `visual-analysis` |
95
- | "Check accessibility" | `accessibility-audit` |
96
- | "Audit our design system" | `design-system-audit` |
97
- | "Convert this design to code" | `mockup-to-code` |
98
- | "Is this too AI-looking?" | `frontend-aesthetics` |
99
- | "Deep UI/UX analysis" | `ui-ux-research` |
89
+ - "Review this mockup" `visual-analysis`
90
+ - "Check accessibility" `accessibility-audit`
91
+ - "Audit our design system" `design-system-audit`
92
+ - "Convert this design to code" `mockup-to-code`
93
+ - "Is this too AI-looking?" `frontend-aesthetics`
94
+ - "Deep UI/UX analysis" `ui-ux-research`
100
95
 
101
96
  ## Tool Priority
102
97
 
103
98
  1. **Skills** (`use_skill`) - Load appropriate skill for the task
104
99
  2. **Read/Glob** - Inspect existing components and styles
105
- 3. **GKG tools** - Find design-related code definitions
106
- 4. **Webfetch/Websearch** - Design inspiration and references
107
- 5. **Context7** - UI library documentation
100
+ 3. **Webfetch/Websearch** - Design inspiration and references
101
+ 4. **Context7** - UI library documentation
108
102
 
109
103
  ## Output Format
110
104
 
@@ -138,12 +132,10 @@ All analyses should follow this structure:
138
132
 
139
133
  ## Delegation
140
134
 
141
- | Need | Delegate To |
142
- | --------------------- | ----------- |
143
- | Implement changes | @build |
144
- | Research UI libraries | @scout |
145
- | Review implementation | @review |
146
- | Plan large redesign | @planner |
135
+ - Implement changes @build
136
+ - Research UI libraries → @scout
137
+ - Review implementation @review
138
+ - Plan large redesign @planner
147
139
 
148
140
  ## Anti-Patterns to Flag
149
141
 
@@ -10,7 +10,7 @@ agent: planner
10
10
  ## Quick Status
11
11
 
12
12
  1. **Git:** `git status` - current branch, changes
13
- 2. **Tasks:** `bd list` - active beads
13
+ 2. **Tasks:** `bd_ls({ status: "open" })` - active beads
14
14
  3. **CI:** Check build status
15
15
  4. **Dependencies:** Check for outdated packages
16
16
 
@@ -18,8 +18,8 @@ agent: planner
18
18
 
19
19
  Find actionable tasks with no blockers:
20
20
 
21
- ```bash
22
- bd ready
21
+ ```typescript
22
+ bd_ls({ status: "ready", limit: 10, offset: 0 });
23
23
  ```
24
24
 
25
25
  This shows beads that are unblocked and ready to start. Use `/implement <bead-id>` to begin work on any of these.
@@ -28,9 +28,9 @@ This shows beads that are unblocked and ready to start. Use `/implement <bead-id
28
28
 
29
29
  ### Task Overview
30
30
 
31
- ```bash
32
- bd list --status open
33
- bd ready
31
+ ```typescript
32
+ bd_ls({ status: "open", limit: 10, offset: 0 });
33
+ bd_ls({ status: "ready", limit: 10, offset: 0 });
34
34
  ```
35
35
 
36
36
  For active beads, read spec from `.beads/artifacts/<bead-id>/spec.md`
@@ -39,8 +39,8 @@ For active beads, read spec from `.beads/artifacts/<bead-id>/spec.md`
39
39
 
40
40
  Check what's blocking progress:
41
41
 
42
- ```bash
43
- bd list --status blocked
42
+ ```typescript
43
+ bd_ls({ status: "blocked", limit: 10, offset: 0 });
44
44
  ```
45
45
 
46
46
  For each blocked bead, identify the blocker and either resolve it or escalate.
@@ -55,7 +55,7 @@ For each blocked bead, identify the blocker and either resolve it or escalate.
55
55
 
56
56
  ### Recommendations
57
57
 
58
- - **Immediate:** Tasks from `bd ready` to start now
58
+ - **Immediate:** Tasks from `bd_ls({ status: "ready" })` to start now
59
59
  - **Blocked:** Dependencies preventing progress
60
60
  - **Attention:** Areas needing cleanup or refactoring
61
61
  - **Updates:** Dependency updates needed
@@ -47,14 +47,19 @@ Approve? (yes/modify)
47
47
 
48
48
  On approval:
49
49
 
50
- ```bash
51
- bd create "[title]" -t [type] -p [priority] -d "[description]" --json
50
+ ```typescript
51
+ bd_add({
52
+ title: "[title]",
53
+ type: "[type]",
54
+ pri: [priority],
55
+ desc: "[description]",
56
+ });
52
57
  ```
53
58
 
54
59
  **If using Beads Village for multi-agent coordination:** Add role tags so tasks can be auto-assigned to the right agent:
55
60
 
56
- ```
57
- add(title="[title]", tags=["[role]"], priority=[0-4])
61
+ ```typescript
62
+ bd_add({ title: "[title]", type: "[type]", pri: [priority], tags: ["[role]"] });
58
63
  ```
59
64
 
60
65
  This makes the task claimable by agents with matching roles.