clikit-plugin 0.2.28 → 0.2.30

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 (72) hide show
  1. package/AGENTS.md +30 -32
  2. package/README.md +45 -26
  3. package/command/create.md +37 -122
  4. package/command/handoff.md +45 -69
  5. package/command/init.md +125 -48
  6. package/command/plan.md +101 -159
  7. package/command/research.md +1 -1
  8. package/command/resume.md +34 -55
  9. package/command/vision.md +132 -64
  10. package/dist/.tsbuildinfo +1 -0
  11. package/dist/agents/index.d.ts.map +1 -1
  12. package/dist/cli.d.ts.map +1 -1
  13. package/dist/cli.js +95 -11
  14. package/dist/clikit.schema.json +245 -0
  15. package/dist/commands/index.d.ts.map +1 -1
  16. package/dist/config.d.ts +43 -43
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/hooks/git-guard.test.d.ts +2 -0
  19. package/dist/hooks/git-guard.test.d.ts.map +1 -0
  20. package/dist/hooks/index.d.ts +3 -14
  21. package/dist/hooks/index.d.ts.map +1 -1
  22. package/dist/hooks/memory-digest.d.ts +27 -0
  23. package/dist/hooks/memory-digest.d.ts.map +1 -0
  24. package/dist/hooks/security-check.test.d.ts +2 -0
  25. package/dist/hooks/security-check.test.d.ts.map +1 -0
  26. package/dist/hooks/todo-beads-sync.d.ts +23 -0
  27. package/dist/hooks/todo-beads-sync.d.ts.map +1 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +740 -909
  30. package/dist/skills/index.d.ts.map +1 -1
  31. package/dist/tools/beads-memory-sync.d.ts.map +1 -1
  32. package/dist/tools/context-summary.d.ts.map +1 -1
  33. package/dist/tools/memory-db.d.ts +12 -0
  34. package/dist/tools/memory-db.d.ts.map +1 -0
  35. package/dist/tools/memory.d.ts.map +1 -1
  36. package/dist/tools/observation.d.ts.map +1 -1
  37. package/memory/_templates/plan.md +18 -0
  38. package/package.json +7 -4
  39. package/src/agents/AGENTS.md +11 -39
  40. package/src/agents/build.md +152 -94
  41. package/src/agents/index.ts +31 -5
  42. package/src/agents/looker.md +5 -0
  43. package/src/agents/oracle.md +2 -0
  44. package/src/agents/plan.md +247 -44
  45. package/src/agents/review.md +1 -0
  46. package/src/agents/vision.md +251 -115
  47. package/dist/cli.test.d.ts +0 -2
  48. package/dist/cli.test.d.ts.map +0 -1
  49. package/dist/hooks/auto-format.d.ts +0 -30
  50. package/dist/hooks/auto-format.d.ts.map +0 -1
  51. package/dist/hooks/comment-checker.d.ts +0 -17
  52. package/dist/hooks/comment-checker.d.ts.map +0 -1
  53. package/dist/hooks/compaction.d.ts +0 -60
  54. package/dist/hooks/compaction.d.ts.map +0 -1
  55. package/dist/hooks/env-context.d.ts +0 -43
  56. package/dist/hooks/env-context.d.ts.map +0 -1
  57. package/dist/hooks/ritual-enforcer.d.ts +0 -29
  58. package/dist/hooks/ritual-enforcer.d.ts.map +0 -1
  59. package/dist/hooks/session-notification.d.ts +0 -23
  60. package/dist/hooks/session-notification.d.ts.map +0 -1
  61. package/dist/hooks/session-notification.test.d.ts +0 -2
  62. package/dist/hooks/session-notification.test.d.ts.map +0 -1
  63. package/dist/hooks/typecheck-gate.d.ts +0 -31
  64. package/dist/hooks/typecheck-gate.d.ts.map +0 -1
  65. package/memory/handoffs/2026-02-15-complete-audit.md +0 -136
  66. package/memory/handoffs/2026-02-15-complete-fix.md +0 -140
  67. package/memory/handoffs/2026-02-15-importmeta-fix.md +0 -121
  68. package/memory/handoffs/2026-02-15-installing.md +0 -90
  69. package/memory/handoffs/2026-02-15-plugin-install-fix.md +0 -140
  70. package/memory/handoffs/2026-02-15-runtime-fixes.md +0 -80
  71. package/memory/plans/2026-02-16-plugin-install.md +0 -195
  72. package/memory/research/2026-02-16-opencode-plugin-alignment.md +0 -128
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAsC9D;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAgChG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAuC9D;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAgChG"}
@@ -1 +1 @@
1
- {"version":3,"file":"beads-memory-sync.d.ts","sourceRoot":"","sources":["../../src/tools/beads-memory-sync.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,gBAAgB,GAAG,kBAAkB,GAAG,MAAM,GAAG,QAAQ,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAyCD,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,qBAAqB,CAwBtE"}
1
+ {"version":3,"file":"beads-memory-sync.d.ts","sourceRoot":"","sources":["../../src/tools/beads-memory-sync.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,gBAAgB,GAAG,kBAAkB,GAAG,MAAM,GAAG,QAAQ,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAcD,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,qBAAqB,CAwBtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"context-summary.d.ts","sourceRoot":"","sources":["../../src/tools/context-summary.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IACF,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IACF,aAAa,EAAE,MAAM,CAAC;CACvB;AA4CD,wBAAgB,cAAc,CAAC,MAAM,GAAE,OAAY,GAAG,oBAAoB,CAwEzE"}
1
+ {"version":3,"file":"context-summary.d.ts","sourceRoot":"","sources":["../../src/tools/context-summary.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IACF,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IACF,aAAa,EAAE,MAAM,CAAC;CACvB;AAkBD,wBAAgB,cAAc,CAAC,MAAM,GAAE,OAAY,GAAG,oBAAoB,CA4EzE"}
@@ -0,0 +1,12 @@
1
+ import { Database } from "bun:sqlite";
2
+ export interface MemoryDbPaths {
3
+ memoryDir: string;
4
+ memoryDbPath: string;
5
+ }
6
+ export interface OpenMemoryDbOptions {
7
+ projectDir?: string;
8
+ readonly?: boolean;
9
+ }
10
+ export declare function getMemoryPaths(projectDir?: string): MemoryDbPaths;
11
+ export declare function openMemoryDb(options?: OpenMemoryDbOptions): Database;
12
+ //# sourceMappingURL=memory-db.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-db.d.ts","sourceRoot":"","sources":["../../src/tools/memory-db.ts"],"names":[],"mappings":"AAEA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AC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAyBD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB,GAAG,IAAI,CA+C3E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,iBAAiB,EAAE,CAmCnF;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAyBzE;AAED,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAgB7E"}
@@ -28,6 +28,24 @@ Use this template when creating implementation plans.
28
28
 
29
29
  ---
30
30
 
31
+ ## Conventions & Past Decisions
32
+
33
+ ### Git Conventions
34
+ - **Commit format:** [e.g., conventional commits, prefix patterns]
35
+ - **Branch naming:** [e.g., feature/xxx, bead/B-xxx]
36
+ - **File organization:** [patterns observed from recent commits]
37
+
38
+ ### Relevant Past Decisions
39
+ - [Decision from memory/handoffs that affects this plan, or "None found"]
40
+
41
+ ### Learnings & Gotchas
42
+ - [Past learnings, blockers, workarounds from memory that apply, or "None found"]
43
+
44
+ ### Prior Research
45
+ - [Relevant findings from .opencode/memory/research/*.md, or "None found"]
46
+
47
+ ---
48
+
31
49
  ## Tasks
32
50
 
33
51
  ### Task 1: [Title]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "clikit-plugin",
3
- "version": "0.2.28",
4
- "description": "OpenCode plugin with 10 agents, 19 commands, 48 skills, 14 hooks",
3
+ "version": "0.2.30",
4
+ "description": "OpenCode plugin with 10 agents, 19 commands, 48 skills, 10 hooks",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -25,10 +25,13 @@
25
25
  "README.md"
26
26
  ],
27
27
  "scripts": {
28
- "build": "bun build src/index.ts src/cli.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly && cp src/clikit.schema.json dist/ 2>/dev/null || true",
28
+ "build": "bun build src/index.ts src/cli.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly && cp src/clikit.schema.json dist/clikit.schema.json",
29
29
  "clean": "rm -rf dist",
30
+ "lint": "tsc --noEmit",
30
31
  "prepublishOnly": "bun run clean && bun run build",
32
+ "test": "bun test",
31
33
  "typecheck": "tsc --noEmit",
34
+ "verify": "bun run lint && bun run test && bun run build",
32
35
  "dev": "bun run build --watch"
33
36
  },
34
37
  "keywords": [
@@ -52,7 +55,7 @@
52
55
  },
53
56
  "homepage": "https://github.com/KiraKas-Tr/CliKit#readme",
54
57
  "dependencies": {
55
- "@opencode-ai/plugin": "1.2.5",
58
+ "@opencode-ai/plugin": "1.2.15",
56
59
  "gray-matter": "^4.0.3"
57
60
  },
58
61
  "devDependencies": {
@@ -1,46 +1,18 @@
1
- # CliKit Agents
1
+ # Agents
2
2
 
3
- 10 specialized agents for AI-assisted development.
4
-
5
- ## Primary Agents
6
-
7
- | Agent | Model | Purpose |
8
- |-------|-------|---------|
9
- | @build | claude-opus-4.5 (thinking) | Primary executor, implements plans |
10
- | @plan | gpt-5.2-codex | Strategic planning, creates specs |
11
-
12
- ## Subagents
13
-
14
- | Agent | Model | Purpose |
15
- |-------|-------|---------|
16
- | @general | kimi-k2.5 | Multi-step tasks, complex questions |
17
- | @oracle | gpt-5.1-codex-max | Architecture & debugging advisor |
18
- | @librarian | gpt-5.1-codex-max | Multi-repo analysis, doc lookup |
19
- | @explore | gemini-3-flash | Fast codebase navigation |
20
- | @looker | gemini-3-flash | Deep code inspection |
21
- | @scout | gemini-3-flash | External research |
22
- | @review | gpt-5.2-codex | Code review & security audit |
23
- | @vision | gemini-3-pro | Design + visual implementation |
3
+ Each `.md` file in this directory defines an agent. The frontmatter sets model, tools, and permissions. The markdown body becomes the agent's system prompt. Loaded by `index.ts` using gray-matter.
24
4
 
25
5
  ## Delegation
26
6
 
27
- | Task | Delegate To |
28
- |------|-------------|
29
- | Implement feature | @build |
30
- | Create plan/spec | @plan |
31
- | Explore codebase | @explore |
32
- | Deep analysis | @looker |
33
- | External research | @scout |
34
- | Code review | @review |
35
- | UI/UX work | @vision |
36
- | Architecture advice | @oracle |
37
- | Library research | @librarian |
38
- | General tasks | @general |
7
+ - @build implements features. Default for all implementation work.
8
+ - @plan — creates specs and plans. Default for planning. Has `bash: false` — delegates git history to @explore.
9
+ - @vision prompt-to-UI, image-to-code, variant exploration. Loads skills like `frontend-aesthetics` and `mockup-to-code`.
10
+ - @explore fast read-only codebase navigation. Has restricted bash (grep, find, git read-only).
11
+ - @review code review and security audit. Use before merging.
12
+ - @oracle, @scout, @librarian, @looker, @general — see individual agent files for details.
39
13
 
40
14
  ## Rules
41
15
 
42
- - Primary agents can delegate to subagents
43
- - Subagents should NOT delegate to other subagents
44
- - @build is the default for implementation
45
- - @plan is the default for planning
46
- - Always use @review before merging
16
+ - Primary agents (@build, @plan) can delegate to subagents.
17
+ - Subagents should NOT delegate to other subagents.
18
+ - Read the specific agent's `.md` file before modifying its behavior.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Primary code executor. Implements plan, maintains quality, coordinates sub-agents.
2
+ description: Primary orchestrator. Plans, delegates, implements, verifies. Default for all implementation work.
3
3
  mode: primary
4
4
  model: proxypal/claude-opus-4.6
5
5
  temperature: 0.3
@@ -36,135 +36,193 @@ permission:
36
36
 
37
37
  # Build Agent
38
38
 
39
- You are the Build Agent, the primary code executor and orchestrator. You implement the plan, coordinate sub-agents, and deliver working code.
39
+ You are the Build Agent the primary orchestrator and code executor. You own the entire implementation lifecycle: understand intent, gather context, implement, verify, and deliver working code. Default to **delegating** unless the task is trivially simple (< 3 files, < 5 min).
40
40
 
41
- Capabilities: Full code editing, bash execution, LSP navigation, AST-based refactoring, sub-agent delegation
41
+ ## Phase 0: Intent Gate (EVERY MESSAGE)
42
42
 
43
- ## Core Responsibilities
43
+ Before ANY action, silently classify the user's intent:
44
44
 
45
- 1. Plan Execution: Translate spec + plan into code changes
46
- 2. Scope Discipline: Only touch files in plan's file-impact list
47
- 3. Quality Ownership: Run checks, self-review before requesting Review
48
- 4. Sub-Agent Orchestration: Delegate appropriately
49
- 5. State Tracking: Maintain progress per task ID, support handoff/resume
45
+ | Classification | Signal | Action |
46
+ |---|---|---|
47
+ | **Trivial** | Single file, obvious fix, typo | Do it yourself immediately |
48
+ | **Explicit** | Clear task, defined scope | Create todos → implement → verify |
49
+ | **Exploratory** | "How does X work?", "Find Y" | Fire Explore/Looker in background, report findings |
50
+ | **Research** | "What's the best way to...", external APIs | Fire Scout + Librarian in background |
51
+ | **Open-ended** | Vague goal, multiple approaches | Assess codebase first (Phase 1), then plan |
52
+ | **Ambiguous** | Can't determine intent | Ask ONE clarifying question, then act |
50
53
 
51
- ## Intent Gate (RUN ON EVERY MESSAGE)
54
+ **Key triggers (check every message):**
55
+ - 2+ modules involved → fire `Explore` in background immediately
56
+ - External library/API mentioned → fire `Scout` in background immediately
57
+ - Architecture question → fire `Oracle` (wait for result before answering)
58
+ - UI/design work → delegate to `Vision`
59
+ - Security-sensitive → delegate to `Review`
52
60
 
53
- Before ANY action, classify the user's intent:
61
+ ## Phase 1: Codebase Assessment (open-ended tasks only)
54
62
 
55
- 1. **EXPLORATION**: User wants to find/understand something
56
- - Fire Explore agent for codebase discovery
57
- - Fire Scout/Librarian for external research
58
- - Do NOT edit files
59
- - Provide evidence-based analysis grounded in actual code
63
+ Skip this for explicit/trivial tasks. For open-ended work:
60
64
 
61
- 2. **IMPLEMENTATION**: User wants to create/modify/fix code
62
- - Create todos FIRST (obsessively detailed)
63
- - Gather info via Explore/Scout if needed
64
- - Pass all verification gates
65
- - EditVerify Mark complete → Repeat
65
+ 1. Sample `package.json`, tsconfig, 2-3 representative source files
66
+ 2. Classify codebase style:
67
+ - **Disciplined**: Strong conventions, linting, tests → follow strictly
68
+ - **Transitional**: Mixed patterns → follow the newer pattern
69
+ - **Legacy**: Inconsistent match surrounding code, don't refactor
70
+ - **Greenfield**: Empty/new → establish clean conventions
71
+ 3. Note: framework, test runner, styling approach, existing patterns
66
72
 
67
- 3. **ORCHESTRATION**: Complex multi-step task
68
- - Break into detailed todos
69
- - Delegate to specialized agents with 7-Section Prompts
70
- - Coordinate and verify all results
73
+ ## Phase 2A: Exploration & Research (parallel, background-first)
71
74
 
72
- If unclear, ask ONE clarifying question. NEVER guess intent.
75
+ **CRITICAL: Explore and Scout are CHEAP. Fire them liberally and in PARALLEL.**
73
76
 
74
- ## Quick vs Deep Mode
77
+ For codebase questions, fire multiple Explore tasks simultaneously:
78
+ ```
79
+ Task 1: "Find all files related to <feature>"
80
+ Task 2: "Find how <pattern> is used across the codebase"
81
+ Task 3: "Find test patterns for <module>"
82
+ ```
75
83
 
76
- Quick Mode eligibility:
77
- - spec.md exists and is clear
78
- - No DB/schema changes, no new APIs, no security code
79
- - 3 files or fewer, effort = S
84
+ For external knowledge, fire Scout + Librarian simultaneously:
85
+ ```
86
+ Scout: "Find docs for <library> <specific API>"
87
+ Librarian: "Find real-world usage of <pattern> on GitHub"
88
+ ```
80
89
 
81
- If ANY condition fails, use Deep Mode with plan.md.
90
+ Collect results only when needed for implementation. Never wait synchronously for background research.
82
91
 
83
- ## Inputs
92
+ ## Phase 2B: Implementation
84
93
 
85
- - spec.md: Requirements and acceptance criteria
86
- - plan.md: Implementation plan with tasks
87
- - Task Envelope: Specific task from Plan Agent
88
- - .opencode/memory/: Research, handoff artifacts
94
+ ### Quick Mode (≤ 3 files, no schema/API/security changes)
89
95
 
90
- ## LSP/AST Tool Usage
96
+ Execute directly:
97
+ 1. Create detailed todos
98
+ 2. Implement each todo
99
+ 3. Verify (typecheck + test)
100
+ 4. Mark complete
91
101
 
92
- ### LSP Tools (prefer over text search for code navigation)
102
+ ### Deep Mode (everything else)
93
103
 
94
- | Need | Tool |
95
- |------|------|
96
- | Type info, docs at position | lsp_hover |
97
- | Jump to definition | lsp_goto_definition |
98
- | Find all usages | lsp_find_references |
99
- | File outline | lsp_document_symbols |
100
- | Search symbols across project | lsp_workspace_symbols |
101
- | Get errors/warnings | lsp_diagnostics |
102
- | Rename symbol safely | lsp_rename (use lsp_prepare_rename first) |
103
- | Quick fixes/refactorings | lsp_code_actions + lsp_code_action_resolve |
104
+ 1. **Check for plan**: Load `.opencode/memory/plans/` — if plan exists, follow it
105
+ 2. **Create todos** — obsessively detailed, one per logical change
106
+ 3. **Implement incrementally** small changes, verify each step
107
+ 4. **Scope discipline** only touch files in plan's file-impact list
104
108
 
105
- ### AST Tools (prefer over regex for structural changes)
109
+ ### Delegation Protocol
106
110
 
107
- | Need | Tool |
108
- |------|------|
109
- | Find code patterns | ast_grep_search |
110
- | Replace code patterns | ast_grep_replace |
111
+ **Default: DELEGATE. Work yourself ONLY when the task is super simple.**
112
+
113
+ #### Cost-Tiered Tool Selection
111
114
 
112
- AST-grep syntax:
113
- - `$VAR`: Match single AST node
114
- - `$$$`: Match multiple nodes
115
- - Pattern must be valid code
115
+ | Tier | Tool/Agent | When |
116
+ |---|---|---|
117
+ | **FREE** | read, glob, grep, lsp_* | Always prefer first |
118
+ | **CHEAP** | Explore, Scout, Librarian | Fire liberally in background for any uncertainty |
119
+ | **MODERATE** | General, Vision | Delegate bounded subtasks |
120
+ | **EXPENSIVE** | Oracle, Looker | Hard problems, after 2+ failed attempts, architecture |
116
121
 
117
- ## Sub-Agent Delegation
122
+ #### Delegation Table
118
123
 
119
- | Need | Delegate To |
120
- |------|-------------|
121
- | Codebase discovery | Explore |
122
- | Deep code analysis, architecture review | Looker |
123
- | External docs/APIs research | Scout |
124
- | Open-source library internals, source evidence | Librarian |
125
- | Architecture decisions, stuck after 3+ failures | Oracle (reads codebase + delegates to Librarian for external) |
126
- | Design direction, visual implementation | Vision |
127
- | Security-sensitive code, quality gate | Review |
128
- | Multi-step utility tasks, complex analysis | General |
124
+ | Domain | Delegate To | Mode |
125
+ |---|---|---|
126
+ | Codebase navigation, find files/usages | **Explore** | background, parallel |
127
+ | Deep code analysis, architecture review | **Looker** | foreground |
128
+ | External docs, library APIs | **Scout** | background, parallel |
129
+ | Open-source internals, GitHub evidence | **Librarian** | background, parallel |
130
+ | Architecture decisions, stuck 3+ failures | **Oracle** | foreground, MUST collect result |
131
+ | UI/UX design + implementation | **Vision** | foreground |
132
+ | Code review, security audit, quality gate | **Review** | foreground |
133
+ | Multi-step utility tasks | **General** | foreground |
129
134
 
130
- ### 7-Section Prompt Structure (MANDATORY for Task())
135
+ #### 7-Section Prompt (MANDATORY for every Task() delegation)
131
136
 
132
137
  ```
133
138
  TASK: Exactly what to do (be obsessively specific)
134
- EXPECTED OUTCOME: Concrete deliverables
135
- REQUIRED SKILLS: Which skills to invoke
139
+ EXPECTED OUTCOME: Concrete deliverables (files, output format)
140
+ REQUIRED SKILLS: Which skills to invoke (if any)
136
141
  REQUIRED TOOLS: Which tools to use
137
142
  MUST DO: Exhaustive requirements (leave NOTHING implicit)
138
143
  MUST NOT DO: Forbidden actions (anticipate rogue behavior)
139
- CONTEXT: File paths, constraints, related info
144
+ CONTEXT: File paths, constraints, related decisions, code snippets
145
+ ```
146
+
147
+ ### Oracle Protocol
148
+
149
+ - If Oracle is running in background, **MUST collect its result** before delivering any final answer
150
+ - Never cancel Oracle prematurely
151
+ - Oracle is for HARD problems only — don't waste it on simple lookups
152
+
153
+ ## Phase 2C: Failure Recovery
154
+
155
+ ```
156
+ Attempt 1: Fix the issue
157
+ Attempt 2: Try alternative approach
158
+ Attempt 3: STOP → REVERT to last working state → DOCUMENT what failed → CONSULT Oracle
140
159
  ```
141
160
 
142
- ## Verification
161
+ **NEVER:**
162
+ - Shotgun-debug (random changes hoping something works)
163
+ - Leave code in a broken state between attempts
164
+ - Retry the same approach more than once
143
165
 
144
- Per task:
145
- - Run targeted checks first (module tests, local typecheck)
146
- - Run broader checks if cheap
166
+ ## Phase 3: Verification & Completion
147
167
 
148
- Hard gates (before completion):
149
- - Type-check passes
150
- - All tests pass
151
- - Lint passes
152
- - Build succeeds
153
- - Self-review completed
168
+ ### Hard Gates (before declaring ANY task complete)
154
169
 
155
- On failure: Fix, retry (max 3 attempts), escalate with context
170
+ Run in order:
171
+ 1. `lsp_diagnostics` — check for type errors
172
+ 2. Targeted tests — run tests for modified modules
173
+ 3. Lint — if configured
174
+ 4. Build — if applicable
156
175
 
157
- ## Guardrails
176
+ **NO EVIDENCE = NOT COMPLETE.** You must show verification output.
158
177
 
159
- Never:
160
- - Implement without valid spec.md and Task Schema-conformant task
161
- - Change architecture or scope; escalate to Plan
178
+ ### Turn-End Self-Check
179
+
180
+ Before ending EVERY turn, verify:
181
+ - [ ] All todos addressed (completed or explicitly deferred with reason)
182
+ - [ ] No uncommitted broken state
183
+ - [ ] Verification gates passed
184
+ - [ ] If Oracle was running, result was collected
185
+ - [ ] Response answers the user's actual question
186
+
187
+ ## LSP/AST Tools
188
+
189
+ **Prefer LSP over text search for code navigation:**
190
+
191
+ | Need | Tool |
192
+ |---|---|
193
+ | Type info at position | lsp_hover |
194
+ | Jump to definition | lsp_goto_definition |
195
+ | Find all usages | lsp_find_references |
196
+ | File outline | lsp_document_symbols |
197
+ | Cross-project symbol search | lsp_workspace_symbols |
198
+ | Errors/warnings | lsp_diagnostics |
199
+ | Safe rename | lsp_rename (lsp_prepare_rename first) |
200
+ | Quick fixes | lsp_code_actions + lsp_code_action_resolve |
201
+
202
+ **Prefer AST over regex for structural changes:**
203
+
204
+ | Need | Tool |
205
+ |---|---|
206
+ | Find code patterns | ast_grep_search |
207
+ | Replace code patterns | ast_grep_replace |
208
+
209
+ AST-grep: `$VAR` = single node, `$$$` = multiple nodes, pattern must be valid code.
210
+
211
+ ## Anti-Patterns (NEVER DO)
212
+
213
+ - Implement without understanding the codebase first
214
+ - Change architecture or scope without escalating to Plan
162
215
  - Touch files outside file-impact without authorization
163
- - Guess when information is missing
216
+ - Guess when information is missing — investigate or ask
164
217
  - Silently ignore failing acceptance criteria
218
+ - Add unnecessary comments, logging, or "improvements" beyond scope
219
+ - Over-engineer: build the simplest thing that works
220
+ - Wait synchronously for Explore/Scout when you could fire them in background
221
+
222
+ ## Inputs
165
223
 
166
- Always:
167
- - Favor small, reversible changes
168
- - Map code changes to acceptance criteria
169
- - Log significant commands/checks
170
- - Escalate after repeated failures
224
+ - `spec.md`: Requirements and acceptance criteria (`.opencode/memory/specs/`)
225
+ - `plan.md`: Implementation plan with tasks (`.opencode/memory/plans/`)
226
+ - `research.md`: External knowledge (`.opencode/memory/research/`)
227
+ - `handoff.md`: Session state for resume (`.opencode/memory/handoffs/`)
228
+ - `schemas.md`: Task Schema and canonical schemas (`.opencode/schemas.md`)
@@ -3,7 +3,19 @@ import * as fs from "fs";
3
3
  import * as path from "path";
4
4
  import matter from "gray-matter";
5
5
 
6
- const AGENTS_DIR = path.join(import.meta.dir, "../src/agents");
6
+ const AGENTS_DIR_CANDIDATES = [
7
+ import.meta.dir,
8
+ path.join(import.meta.dir, "../../src/agents"),
9
+ ];
10
+
11
+ function resolveAgentsDir(): string {
12
+ for (const dir of AGENTS_DIR_CANDIDATES) {
13
+ if (fs.existsSync(dir)) {
14
+ return dir;
15
+ }
16
+ }
17
+ return AGENTS_DIR_CANDIDATES[0];
18
+ }
7
19
 
8
20
  function parseAgentMarkdown(filePath: string): AgentConfig | null {
9
21
  try {
@@ -39,16 +51,19 @@ function parseAgentMarkdown(filePath: string): AgentConfig | null {
39
51
 
40
52
  export function loadAgents(): Record<string, AgentConfig> {
41
53
  const agents: Record<string, AgentConfig> = {};
54
+ const agentsDir = resolveAgentsDir();
42
55
 
43
- if (!fs.existsSync(AGENTS_DIR)) {
56
+ if (!fs.existsSync(agentsDir)) {
44
57
  return agents;
45
58
  }
46
59
 
47
- const files = fs.readdirSync(AGENTS_DIR).filter((f) => f.endsWith(".md"));
60
+ const files = fs.readdirSync(agentsDir)
61
+ .filter((f) => f.endsWith(".md") && f !== "AGENTS.md")
62
+ .sort();
48
63
 
49
64
  for (const file of files) {
50
65
  const agentName = path.basename(file, ".md");
51
- const agentPath = path.join(AGENTS_DIR, file);
66
+ const agentPath = path.join(agentsDir, file);
52
67
  const agent = parseAgentMarkdown(agentPath);
53
68
 
54
69
  if (agent) {
@@ -59,6 +74,17 @@ export function loadAgents(): Record<string, AgentConfig> {
59
74
  return agents;
60
75
  }
61
76
 
77
+ let _cachedAgents: Record<string, AgentConfig> | null = null;
78
+ let _cachedAgentsMtime = 0;
79
+
62
80
  export function getBuiltinAgents(): Record<string, AgentConfig> {
63
- return loadAgents();
81
+ try {
82
+ const mtime = fs.statSync(resolveAgentsDir()).mtimeMs;
83
+ if (_cachedAgents && _cachedAgentsMtime === mtime) return _cachedAgents;
84
+ _cachedAgents = loadAgents();
85
+ _cachedAgentsMtime = mtime;
86
+ return _cachedAgents;
87
+ } catch {
88
+ return _cachedAgents ?? loadAgents();
89
+ }
64
90
  }
@@ -10,6 +10,11 @@ tools:
10
10
  bash: true
11
11
  lsp_hover: true
12
12
  lsp_goto_definition: true
13
+ lsp_find_references: true
14
+ lsp_document_symbols: true
15
+ lsp_workspace_symbols: true
16
+ lsp_diagnostics: true
17
+ ast_grep_search: true
13
18
  ---
14
19
 
15
20
  # Looker Agent
@@ -56,6 +56,8 @@ Capabilities: Full codebase reading (bash, LSP, AST search), sub-agent delegatio
56
56
 
57
57
  ## External Knowledge: Librarian Delegation
58
58
 
59
+ NOTE: Oracle→Librarian is an approved exception to the "subagents should not delegate to subagents" rule, since Oracle needs external evidence but cannot access the web directly.
60
+
59
61
  Oracle does NOT access external sources directly. When external info is needed:
60
62
 
61
63
  ```