opencodekit 0.23.2 → 0.23.4

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 (51) hide show
  1. package/README.md +7 -14
  2. package/dist/index.js +1 -1
  3. package/dist/template/.opencode/AGENTS.md +92 -19
  4. package/dist/template/.opencode/README.md +43 -6
  5. package/dist/template/.opencode/artifacts/harness-workflows/plan.md +317 -0
  6. package/dist/template/.opencode/command/audit.md +65 -0
  7. package/dist/template/.opencode/command/init.md +19 -2
  8. package/dist/template/.opencode/command/research.md +67 -16
  9. package/dist/template/.opencode/command/ship.md +55 -5
  10. package/dist/template/.opencode/command/verify.md +5 -5
  11. package/dist/template/.opencode/opencode.json +12 -0
  12. package/dist/template/.opencode/plugin/README.md +0 -6
  13. package/dist/template/.opencode/plugin/codesearch.ts +730 -0
  14. package/dist/template/.opencode/plugin/memory/tools.ts +6 -6
  15. package/dist/template/.opencode/plugin/session-summary.ts +0 -2
  16. package/dist/template/.opencode/plugin/srcwalk.ts +22 -157
  17. package/dist/template/.opencode/skill/code-review-and-quality/SKILL.md +1 -1
  18. package/dist/template/.opencode/skill/debugging-and-error-recovery/SKILL.md +1 -1
  19. package/dist/template/.opencode/skill/deep-module-design/SKILL.md +1 -1
  20. package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +0 -2
  21. package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +11 -9
  22. package/dist/template/.opencode/skill/manifest.json +77 -0
  23. package/dist/template/.opencode/skill/planning-and-task-breakdown/SKILL.md +1 -1
  24. package/dist/template/.opencode/skill/srcwalk/SKILL.md +10 -13
  25. package/dist/template/.opencode/tool/grepsearch.ts +92 -103
  26. package/dist/template/.opencode/workflows/audit-pattern.md +51 -0
  27. package/dist/template/.opencode/workflows/batch-implement.md +82 -0
  28. package/dist/template/.opencode/workflows/deep-research.md +58 -0
  29. package/dist/template/.opencode/workflows/development-lifecycle-workflow.md +129 -0
  30. package/package.json +1 -1
  31. package/dist/template/.opencode/command/clarify.md +0 -46
  32. package/dist/template/.opencode/command/commit.md +0 -53
  33. package/dist/template/.opencode/command/design.md +0 -129
  34. package/dist/template/.opencode/command/explore.md +0 -169
  35. package/dist/template/.opencode/command/improve-architecture.md +0 -55
  36. package/dist/template/.opencode/command/pr.md +0 -148
  37. package/dist/template/.opencode/command/refactor.md +0 -65
  38. package/dist/template/.opencode/command/review-codebase.md +0 -128
  39. package/dist/template/.opencode/command/test.md +0 -66
  40. package/dist/template/.opencode/command/ui-review.md +0 -109
  41. package/dist/template/.opencode/opencodex-fast.jsonc +0 -3
  42. package/dist/template/.opencode/plugin/rtk.ts +0 -43
  43. package/dist/template/.opencode/skill/agent-teams/SKILL.md +0 -268
  44. package/dist/template/.opencode/skill/code-navigation/SKILL.md +0 -142
  45. package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +0 -135
  46. package/dist/template/.opencode/skill/condition-based-waiting/example.ts +0 -171
  47. package/dist/template/.opencode/skill/context-engineering/SKILL.md +0 -176
  48. package/dist/template/.opencode/skill/memory-system/SKILL.md +0 -147
  49. package/dist/template/.opencode/skill/structured-edit/SKILL.md +0 -191
  50. package/dist/template/.opencode/skill/ubiquitous-language/SKILL.md +0 -184
  51. package/dist/template/.opencode/skill/v0/SKILL.md +0 -158
@@ -0,0 +1,65 @@
1
+ ---
2
+ description: Audit codebase for a specific pattern
3
+ argument-hint: "<pattern>"
4
+ agent: build
5
+ ---
6
+
7
+ # Audit: $ARGUMENTS
8
+
9
+ Find all occurrences of a code pattern in the codebase, review each for issues, and produce prioritized remediation recommendations.
10
+
11
+ > Use for cross-cutting concerns like auth checks, error handling, API patterns, or security vulnerabilities.
12
+
13
+ ## Parse Arguments
14
+
15
+ | Argument | Default | Description |
16
+ | -------- | -------- | ------------------------------------ |
17
+ | Pattern | required | Code pattern to search for |
18
+
19
+ **Examples:**
20
+ - `/audit console.log` — Find all console.log statements
21
+ - `/audit app.use(` — Find all middleware registrations
22
+ - `/audit fetch(` — Find all fetch calls
23
+ - `/audit try {` — Find all try-catch blocks
24
+
25
+ ## Execution
26
+
27
+ This command invokes the `audit-pattern` workflow for multi-agent parallel execution.
28
+
29
+ ### Workflow Execution
30
+
31
+ 1. **Read the workflow:** `.opencode/workflows/audit-pattern.md`
32
+ 2. **Execute all phases:**
33
+ - Phase 1: Spawn 1 @explore agent to discover all occurrences
34
+ - Phase 2: Spawn multiple @review agents (dynamic count based on occurrences)
35
+ - Phase 3: Spawn 1 @general agent to synthesize findings
36
+ 3. **Replace placeholders:**
37
+ - `{pattern}` → the pattern from $ARGUMENTS
38
+ - `{phase_N_output}` → actual output from completed phases
39
+ 4. **Aggregate results** between phases
40
+ 5. **Write final report** to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/audit.md`
41
+
42
+ **Announce:** "Auditing codebase for pattern: [pattern]. Invoking audit-pattern workflow."
43
+
44
+ ## Output
45
+
46
+ Report:
47
+
48
+ 1. **Pattern:** [pattern searched]
49
+ 2. **Occurrences found:** [count]
50
+ 3. **Files affected:** [count]
51
+ 4. **Issues by severity:**
52
+ - Critical: [N]
53
+ - Important: [N]
54
+ - Minor: [N]
55
+ 5. **Recommended fixes:** [list with file:line refs]
56
+ 6. **Correct patterns:** [list of occurrences that are already correct]
57
+
58
+ ## Related Commands
59
+
60
+ | Need | Command |
61
+ | ----------------- | ------------- |
62
+ | Research a topic | `/research` |
63
+ | Create feature | `/create` |
64
+ | Ship feature | `/ship` |
65
+ | Verify gates | `/verify` |
@@ -9,7 +9,7 @@ agent: build
9
9
  Initialize project setup. Run once per project.
10
10
 
11
11
  > **Next step for fresh projects:** `/plan` to create first implementation plan.
12
- > **Next step for existing codebases:** `/review-codebase` for deep codebase analysis.
12
+ > **Next step for existing codebases:** `/research` for deep codebase analysis, or just start describing what you want to build.
13
13
 
14
14
  ## Idempotency Rules
15
15
 
@@ -293,4 +293,21 @@ Report what was created:
293
293
  2. tech-stack.md (if core setup ran)
294
294
  3. roadmap.md + state.md (if `--context`)
295
295
  4. user.md (if `--user`)
296
- 5. Recommended next command: `/plan`, `/review-codebase`, or `/resume`
296
+ 5. Recommended next command: `/plan` to start planning, `/research` to explore the codebase, or just describe what you want to build.
297
+
298
+ ---
299
+
300
+ ### Skill Installation
301
+
302
+ If you use a platform-specific technology, install the matching skill:
303
+
304
+ ```
305
+ .opencode/scripts/install-skill.sh cloudflare
306
+ .opencode/scripts/install-skill.sh react-best-practices
307
+ .opencode/scripts/install-skill.sh supabase-postgres-best-practices
308
+ .opencode/scripts/install-skill.sh swiftui-expert-skill
309
+ .opencode/scripts/install-skill.sh swift-concurrency
310
+ .opencode/scripts/install-skill.sh core-data-expert
311
+ ```
312
+
313
+ Run `.opencode/scripts/install-skill.sh --list` to see all available. Skills are on-demand — only install what your project actually needs.
@@ -10,7 +10,56 @@ Gather information before implementation. Find answers, document findings, stop
10
10
 
11
11
  > Research can happen at any phase when you need external information or codebase understanding.
12
12
 
13
- ## Parse Arguments
13
+ ## Complexity Detection
14
+
15
+ Before starting, analyze the research topic complexity:
16
+
17
+ **Simple research** (execute directly):
18
+ - Single factual question
19
+ - One specific API or library
20
+ - Narrow scope with clear boundaries
21
+ - Example: "How does React useEffect work?"
22
+
23
+ **Complex research** (invoke workflow):
24
+ - Multi-angle topic requiring cross-checking
25
+ - Broad scope with multiple perspectives
26
+ - Requires verification from multiple sources
27
+ - Example: "What are the best practices for authentication in 2026?"
28
+
29
+ ### Decision Logic
30
+
31
+ 1. **Parse the topic** from $ARGUMENTS
32
+ 2. **Assess complexity:**
33
+ - Contains "best practices", "compare", "approaches", "strategies" → Complex
34
+ - Contains "how does", "what is", "explain" → Simple
35
+ - Topic spans multiple domains or technologies → Complex
36
+ - Topic is narrow and specific → Simple
37
+ 3. **Route accordingly:**
38
+ - Simple → Execute directly (see "Direct Execution" below)
39
+ - Complex → Invoke `deep-research` workflow (see "Workflow Execution" below)
40
+
41
+ ## Workflow Execution (Complex Research)
42
+
43
+ If complexity is detected as complex:
44
+
45
+ 1. **Read the workflow:** `.opencode/workflows/deep-research.md`
46
+ 2. **Execute all phases:**
47
+ - Phase 1: Spawn multiple @scout agents (dynamic count based on angles)
48
+ - Phase 2: Spawn @review agents to cross-check findings
49
+ - Phase 3: Spawn 1 @general agent to synthesize report
50
+ 3. **Replace placeholders:**
51
+ - `{question}` → the research topic from $ARGUMENTS
52
+ - `{phase_N_output}` → actual output from completed phases
53
+ 4. **Aggregate results** between phases
54
+ 5. **Write final report** to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/research.md`
55
+
56
+ **Announce:** "This is complex research requiring multi-angle analysis. Invoking deep-research workflow."
57
+
58
+ ## Direct Execution (Simple Research)
59
+
60
+ If complexity is simple, execute directly:
61
+
62
+ ### Parse Arguments
14
63
 
15
64
  | Argument | Default | Description |
16
65
  | ---------------- | -------- | ----------------------------------- |
@@ -20,7 +69,7 @@ Gather information before implementation. Find answers, document findings, stop
20
69
 
21
70
  Default depth: ~30 tool calls for moderate exploration.
22
71
 
23
- ## Before You Research
72
+ ### Before You Research
24
73
 
25
74
  - **Be certain**: Only research what you need for implementation
26
75
  - **Don't over-research**: Stop when you have enough to proceed
@@ -28,7 +77,7 @@ Default depth: ~30 tool calls for moderate exploration.
28
77
  - **Verify confidence**: Medium+ confidence required before stopping
29
78
  - **Document findings**: Write to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/research.md` or report directly
30
79
 
31
- ## Available Tools
80
+ ### Available Tools
32
81
 
33
82
  | Tool | Use When |
34
83
  | ------------ | ------------------------------- |
@@ -39,17 +88,17 @@ Default depth: ~30 tool calls for moderate exploration.
39
88
  | `codesearch` | Real-world usage examples |
40
89
  | `grepsearch` | GitHub code search |
41
90
 
42
- ## Phase 1: Load Context
91
+ ### Phase 1: Load Context
43
92
 
44
93
  Read `.opencode/artifacts/$(cat .opencode/artifacts/.active)/spec.md` if it exists and extract questions that need answering.
45
94
 
46
- ### Memory Search (Required)
95
+ #### Memory Search (Required)
47
96
 
48
97
  Search memory for existing findings. Use them to: skip already-answered questions, narrow scope to gaps only, avoid contradicting prior decisions without justification.
49
98
 
50
- ## Phase 2: Research
99
+ ### Phase 2: Research
51
100
 
52
- ### Source Priority
101
+ #### Source Priority
53
102
 
54
103
  1. **Codebase patterns** — delegate to `explore` agent for LSP analysis
55
104
  2. **Official docs** — `context7` for API references
@@ -57,7 +106,7 @@ Search memory for existing findings. Use them to: skip already-answered question
57
106
  4. **GitHub examples** — `codesearch` / `grepsearch` for real-world patterns
58
107
  5. **Web search** — only if tiers 1-4 don't answer
59
108
 
60
- ### Delegation
109
+ #### Delegation
61
110
 
62
111
  | What | Agent | When |
63
112
  | ----------------- | ---------------------------- | -------------------------------------- |
@@ -65,20 +114,20 @@ Search memory for existing findings. Use them to: skip already-answered question
65
114
  | External docs | `scout` (this agent) | Library APIs, best practices |
66
115
  | Multiple domains | Parallel `explore` + `scout` | 3+ independent questions |
67
116
 
68
- ### Confidence Levels
117
+ #### Confidence Levels
69
118
 
70
119
  - **High**: Multiple authoritative sources agree, verified in codebase
71
120
  - **Medium**: Single good source, plausible but unverified
72
121
  - **Low**: Conflicting info, speculation — discard without corroboration
73
122
 
74
- ## Phase 3: Stop When
123
+ ### Phase 3: Stop When
75
124
 
76
125
  - All questions answered with medium+ confidence
77
126
  - Tool budget exhausted for depth level
78
127
  - Last 5 tool calls yielded no new insights
79
128
  - Blocked and need human input
80
129
 
81
- ## Phase 4: Document
130
+ ### Phase 4: Document
82
131
 
83
132
  Write findings to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/research.md` (if plan exists) or report directly (if topic):
84
133
 
@@ -91,11 +140,12 @@ Write findings to `.opencode/artifacts/$(cat .opencode/artifacts/.active)/resear
91
140
 
92
141
  Report:
93
142
 
94
- 1. Depth level and tool call count
95
- 2. Questions with answer status and confidence
96
- 3. Key insights (bullet points)
97
- 4. Open items remaining
98
- 5. Next step suggestion
143
+ 1. **Execution mode:** Direct or Workflow
144
+ 2. Depth level and tool call count (if direct)
145
+ 3. Questions with answer status and confidence
146
+ 4. Key insights (bullet points)
147
+ 5. Open items remaining
148
+ 6. Next step suggestion
99
149
 
100
150
  ## Related Commands
101
151
 
@@ -104,3 +154,4 @@ Report:
104
154
  | Create + start | `/create` |
105
155
  | Plan details | `/plan <id>` |
106
156
  | Pick up work | `/ship <id>` |
157
+ | Audit codebase | `/audit` |
@@ -56,6 +56,53 @@ Set up the workspace: create branch, install deps if needed.
56
56
 
57
57
  ## Phase 2: Route to Execution
58
58
 
59
+ ### Complexity Detection
60
+
61
+ Before routing, analyze the plan complexity:
62
+
63
+ **Direct execution** (use existing logic):
64
+ - Plan has <5 tasks
65
+ - Tasks have dependencies (not fully independent)
66
+ - Tasks require sequential execution
67
+ - User explicitly requests sequential execution
68
+
69
+ **Workflow execution** (invoke `batch-implement`):
70
+ - Plan has ≥5 independent tasks
71
+ - Tasks have no file conflicts
72
+ - Tasks can run in parallel
73
+ - User wants maximum parallelism
74
+
75
+ ### Decision Logic
76
+
77
+ 1. **Parse the plan** from `.opencode/artifacts/$(cat .opencode/artifacts/.active)/plan.md` or `tasks.json`
78
+ 2. **Count independent tasks** (tasks with no dependencies)
79
+ 3. **Check for file conflicts** (do any tasks edit the same files?)
80
+ 4. **Route accordingly:**
81
+ - <5 tasks OR has dependencies OR has file conflicts → Direct execution (see "Direct Execution" below)
82
+ - ≥5 independent tasks AND no file conflicts → Invoke `batch-implement` workflow (see "Workflow Execution" below)
83
+
84
+ ### Workflow Execution (Parallel Implementation)
85
+
86
+ If complexity is detected as parallel:
87
+
88
+ 1. **Read the workflow:** `.opencode/workflows/batch-implement.md`
89
+ 2. **Execute all phases:**
90
+ - Phase 1: Spawn 1 @review agent to review plan for task independence
91
+ - Phase 2: Spawn multiple @general agents (1 per task, dynamic count)
92
+ - Phase 3: Spawn multiple @review agents to verify implementations
93
+ - Phase 4: Spawn 1 @general agent to merge results
94
+ 3. **Replace placeholders:**
95
+ - `{plan}` → the implementation plan
96
+ - `{phase_N_output}` → actual output from completed phases
97
+ 4. **Aggregate results** between phases
98
+ 5. **Continue to Phase 4: Verification** (skip Phase 3 below)
99
+
100
+ **Announce:** "This plan has [N] independent tasks. Invoking batch-implement workflow for parallel execution."
101
+
102
+ ### Direct Execution
103
+
104
+ If complexity is simple or tasks have dependencies, use the existing execution logic below.
105
+
59
106
  | Artifact exists in `.opencode/artifacts/$(cat .opencode/artifacts/.active)/` | Action |
60
107
  | --------------- | -------------------------------------------------------- |
61
108
  | `plan.md` | Parse plan header + dependency graph, execute wave-by-wave |
@@ -436,13 +483,16 @@ Report:
436
483
  - Overall assessment: [pass/needs work]
437
484
 
438
485
  6. **Next Steps:**
439
- - `/pr` to create pull request
486
+ - **Ask user** if they want a PR created from the current branch — always ask, never push without confirmation
440
487
  - Manual commits if not already done
441
488
  - Note deferred work in `.opencode/artifacts/todo.md`
442
489
 
443
490
  ## Related Commands
444
491
 
445
- | Need | Command |
446
- | ----------- | --------- |
447
- | Create spec | `/create` |
448
- | Create PR | `/pr` |
492
+ | Need | Command |
493
+ | ----------------- | ------------- |
494
+ | Create feature | `/create` |
495
+ | Plan execution | `/plan` |
496
+ | Research a topic | `/research` |
497
+ | Fix a bug | `/fix` |
498
+ | Verify gate | `/verify` |
@@ -158,8 +158,8 @@ observation({
158
158
 
159
159
  ## Related Commands
160
160
 
161
- | Need | Command |
162
- | ----------------- | ------------------ |
163
- | Ship after verify | `/ship <id>` |
164
- | Review code | `/review-codebase` |
165
- | Check status | `/status` |
161
+ | Need | Command |
162
+ | ----------------- | ------------- |
163
+ | Ship after verify | `/ship <id>` |
164
+ | Plan a feature | `/plan` |
165
+ | Fix a bug | `/fix` |
@@ -413,6 +413,18 @@
413
413
  },
414
414
  "reasoning": true,
415
415
  "tool_call": true
416
+ },
417
+ "qwen3.7-plus": {
418
+ "limit": {
419
+ "context": 300000,
420
+ "output": 64000
421
+ },
422
+ "modalities": {
423
+ "input": ["text", "image", "video"],
424
+ "output": ["text"]
425
+ },
426
+ "reasoning": true,
427
+ "tool_call": true
416
428
  }
417
429
  }
418
430
  },
@@ -10,7 +10,6 @@ plugin/
10
10
  ├── sessions.ts # Session search tools (find/read)
11
11
  ├── copilot-auth.ts # GitHub Copilot provider/auth integration
12
12
  ├── prompt-leverage.ts # Prompt pre-processing with structured execution framing
13
- ├── rtk.ts # Optional RTK command-output compression hook
14
13
  ├── session-summary.ts # Structured persistent session summary (artifact trail, decisions, anchored merge)
15
14
  ├── skill-mcp.ts # Skill-scoped MCP bridge (skill_mcp tools)
16
15
  └── lib/
@@ -65,11 +64,6 @@ plugin/
65
64
  - Upgrades user prompts with objective, context, tool rules, verification, and done criteria
66
65
  - Runs through `experimental.chat.messages.transform`
67
66
 
68
- - `rtk.ts`
69
- - Optional OpenCode hook for RTK command-output compression
70
- - Rewrites low-risk `bash`/`shell` commands through `rtk rewrite`
71
- - Keeps an idempotency guard for symlinked global/project config double-loading
72
-
73
67
  - `session-summary.ts`
74
68
  - Maintains a structured, incrementally-updated session summary that survives DCP compression cycles
75
69
  - **File-artifact tracking**: intercepts `read`, `edit`, `write`, `srcwalk_read` via `tool.execute.before` to track which files were read, modified, or created