opencodekit 0.14.5 → 0.15.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.
- package/README.md +2 -2
- package/dist/index.js +100 -58
- package/dist/template/.opencode/.env.example +1 -0
- package/dist/template/.opencode/AGENTS.md +13 -24
- package/dist/template/.opencode/README.md +8 -119
- package/dist/template/.opencode/agent/explore.md +2 -3
- package/dist/template/.opencode/agent/general.md +56 -0
- package/dist/template/.opencode/agent/plan.md +54 -0
- package/dist/template/.opencode/agent/scout.md +15 -5
- package/dist/template/.opencode/command/analyze-project.md +2 -2
- package/dist/template/.opencode/command/brainstorm.md +1 -1
- package/dist/template/.opencode/command/design-audit.md +4 -5
- package/dist/template/.opencode/command/design.md +4 -13
- package/dist/template/.opencode/command/generate-pattern.md +2 -9
- package/dist/template/.opencode/command/implement.md +4 -4
- package/dist/template/.opencode/command/init.md +1 -1
- package/dist/template/.opencode/command/new-feature.md +2 -3
- package/dist/template/.opencode/command/plan.md +1 -1
- package/dist/template/.opencode/command/pr.md +0 -1
- package/dist/template/.opencode/command/research.md +20 -6
- package/dist/template/.opencode/command/restore-image.md +1 -9
- package/dist/template/.opencode/command/revert-feature.md +1 -1
- package/dist/template/.opencode/command/review-codebase.md +4 -4
- package/dist/template/.opencode/command/status.md +1 -2
- package/dist/template/.opencode/command/summarize.md +1 -2
- package/dist/template/.opencode/command/triage.md +4 -32
- package/dist/template/.opencode/dcp.jsonc +68 -68
- package/dist/template/.opencode/memory/_templates/README.md +35 -0
- package/dist/template/.opencode/memory/_templates/project/architecture.md +60 -0
- package/dist/template/.opencode/memory/_templates/project/commands.md +72 -0
- package/dist/template/.opencode/memory/_templates/project/conventions.md +68 -0
- package/dist/template/.opencode/memory/_templates/project/gotchas.md +41 -0
- package/dist/template/.opencode/memory/beads-workflow.md +30 -29
- package/dist/template/.opencode/memory/project/architecture.md +31 -50
- package/dist/template/.opencode/memory/project/commands.md +41 -22
- package/dist/template/.opencode/memory/project/conventions.md +39 -177
- package/dist/template/.opencode/memory/project/gotchas.md +21 -177
- package/dist/template/.opencode/memory/user.example.md +5 -0
- package/dist/template/.opencode/opencode.json +644 -533
- package/dist/template/.opencode/package.json +18 -21
- package/dist/template/.opencode/plugin/compaction.ts +79 -85
- package/dist/template/.opencode/plugin/env-ctx.ts +34 -0
- package/dist/template/.opencode/plugin/lib/notify.ts +41 -45
- package/dist/template/.opencode/plugin/lsp.ts +197 -200
- package/dist/template/.opencode/plugin/memory.ts +14 -112
- package/dist/template/.opencode/plugin/package.json +5 -5
- package/dist/template/.opencode/plugin/sessions.ts +1 -1
- package/dist/template/.opencode/plugin/skill-mcp.ts +486 -521
- package/dist/template/.opencode/plugin/truncator.ts +47 -50
- package/dist/template/.opencode/plugin/tsconfig.json +14 -14
- package/dist/template/.opencode/skill/chrome-devtools/mcp.json +17 -17
- package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +17 -12
- package/dist/template/.opencode/skill/condition-based-waiting/example.ts +63 -69
- package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +14 -8
- package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +14 -3
- package/dist/template/.opencode/skill/playwright/mcp.json +14 -14
- package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +21 -8
- package/dist/template/.opencode/skill/requesting-code-review/review.md +14 -0
- package/dist/template/.opencode/skill/root-cause-tracing/SKILL.md +18 -4
- package/dist/template/.opencode/skill/source-code-research/SKILL.md +9 -7
- package/dist/template/.opencode/skill/test-driven-development/SKILL.md +49 -32
- package/dist/template/.opencode/skill/testing-anti-patterns/SKILL.md +40 -22
- package/dist/template/.opencode/skill/testing-skills-with-subagents/SKILL.md +46 -26
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +117 -44
- package/dist/template/.opencode/skill/v0/SKILL.md +1 -7
- package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +27 -19
- package/dist/template/.opencode/skill/writing-skills/anthropic-best-practices.md +171 -148
- package/dist/template/.opencode/skill/writing-skills/persuasion-principles.md +39 -6
- package/dist/template/.opencode/tool/memory-read.ts +44 -56
- package/dist/template/.opencode/tool/memory-search.ts +8 -291
- package/dist/template/.opencode/tool/memory-update.ts +47 -51
- package/dist/template/.opencode/tool/observation.ts +6 -180
- package/dist/template/.opencode/tsconfig.json +19 -19
- package/package.json +19 -15
- package/dist/template/.opencode/.background-tasks.json +0 -114
- package/dist/template/.opencode/.ralph-state.json +0 -12
- package/dist/template/.opencode/agent/build.md +0 -327
- package/dist/template/.opencode/agent/planner.md +0 -281
- package/dist/template/.opencode/agent/rush.md +0 -223
- package/dist/template/.opencode/memory/handoffs/README.md +0 -83
- package/dist/template/.opencode/memory/observations/.gitkeep +0 -0
- package/dist/template/.opencode/memory/observations/2026-01-09-pattern-ampcode-mcp-json-includetools-pattern.md +0 -42
- package/dist/template/.opencode/memory/vector_db/memories.lance/_transactions/0-0d25ba80-ba3b-4209-9046-b45d6093b4da.txn +0 -0
- package/dist/template/.opencode/memory/vector_db/memories.lance/_versions/1.manifest +0 -0
- package/dist/template/.opencode/memory/vector_db/memories.lance/data/1111100101010101011010004a9ef34df6b29f36a9a53a2892.lance +0 -0
- package/dist/template/.opencode/tool/ast-grep.ts +0 -245
- package/dist/template/.opencode/tool/background.ts +0 -509
- package/dist/template/.opencode/tool/bd-inbox.ts +0 -110
- package/dist/template/.opencode/tool/bd-msg.ts +0 -62
- package/dist/template/.opencode/tool/bd-release.ts +0 -71
- package/dist/template/.opencode/tool/bd-reserve.ts +0 -121
- package/dist/template/.opencode/tool/memory-embed.ts +0 -183
- package/dist/template/.opencode/tool/memory-index.ts +0 -769
- package/dist/template/.opencode/tool/repo-map.ts +0 -451
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ create test.txt with "Hello OpenCodeKit"
|
|
|
65
65
|
```
|
|
66
66
|
build (Primary Orchestrator - 70% of work)
|
|
67
67
|
├→ @rush (Fast agent for simple tasks)
|
|
68
|
-
├→ @
|
|
68
|
+
├→ @plan (Complex planning ≥3 phases)
|
|
69
69
|
├→ @review (Code review + security + debugging)
|
|
70
70
|
├→ @scout (External research, library docs, GitHub patterns)
|
|
71
71
|
├→ @explore (Fast codebase search)
|
|
@@ -175,7 +175,7 @@ Need speed over depth?
|
|
|
175
175
|
✓ → @rush (fast agent, same capabilities)
|
|
176
176
|
|
|
177
177
|
Complex task (≥3 phases)?
|
|
178
|
-
✓ → @
|
|
178
|
+
✓ → @plan (creates implementation plan)
|
|
179
179
|
|
|
180
180
|
Need research?
|
|
181
181
|
✓ → @scout (library docs + GitHub patterns)
|
package/dist/index.js
CHANGED
|
@@ -750,21 +750,24 @@ var cac = (name = "") => new CAC(name);
|
|
|
750
750
|
// package.json
|
|
751
751
|
var package_default = {
|
|
752
752
|
name: "opencodekit",
|
|
753
|
-
version: "0.
|
|
753
|
+
version: "0.15.0",
|
|
754
754
|
description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
755
|
-
|
|
755
|
+
keywords: ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
|
|
756
|
+
license: "MIT",
|
|
757
|
+
author: "OpenCodeKit",
|
|
756
758
|
repository: {
|
|
757
759
|
type: "git",
|
|
758
760
|
url: "git+https://github.com/opencodekit/opencodekit-template.git"
|
|
759
761
|
},
|
|
760
|
-
publishConfig: {
|
|
761
|
-
access: "public",
|
|
762
|
-
registry: "https://registry.npmjs.org"
|
|
763
|
-
},
|
|
764
762
|
bin: {
|
|
765
763
|
ock: "dist/index.js"
|
|
766
764
|
},
|
|
767
765
|
files: ["dist", "README.md"],
|
|
766
|
+
type: "module",
|
|
767
|
+
publishConfig: {
|
|
768
|
+
access: "public",
|
|
769
|
+
registry: "https://registry.npmjs.org"
|
|
770
|
+
},
|
|
768
771
|
scripts: {
|
|
769
772
|
dev: "bun run src/index.ts",
|
|
770
773
|
build: "bun run build.ts && mkdir -p dist/template && rsync -av --exclude=node_modules --exclude=dist --exclude=.git --exclude=coverage --exclude=.next --exclude=.turbo --exclude=logs --exclude=package-lock.json .opencode/ dist/template/.opencode/",
|
|
@@ -773,14 +776,10 @@ var package_default = {
|
|
|
773
776
|
typecheck: "tsc --noEmit",
|
|
774
777
|
test: "bun test",
|
|
775
778
|
"test:watch": "bun test --watch",
|
|
776
|
-
lint: "
|
|
777
|
-
"lint:fix": "
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
author: "OpenCodeKit",
|
|
781
|
-
license: "MIT",
|
|
782
|
-
engines: {
|
|
783
|
-
bun: ">=1.3.2"
|
|
779
|
+
lint: "oxlint .",
|
|
780
|
+
"lint:fix": "oxlint --fix .",
|
|
781
|
+
format: "oxfmt",
|
|
782
|
+
"format:check": "oxfmt --check"
|
|
784
783
|
},
|
|
785
784
|
dependencies: {
|
|
786
785
|
"@clack/prompts": "^0.7.0",
|
|
@@ -792,7 +791,7 @@ var package_default = {
|
|
|
792
791
|
"cli-table3": "^0.6.5",
|
|
793
792
|
ora: "^9.0.0",
|
|
794
793
|
picocolors: "^1.1.1",
|
|
795
|
-
"solid-js": "
|
|
794
|
+
"solid-js": "1.9.9",
|
|
796
795
|
zod: "^3.25.76"
|
|
797
796
|
},
|
|
798
797
|
devDependencies: {
|
|
@@ -800,8 +799,13 @@ var package_default = {
|
|
|
800
799
|
"@biomejs/biome": "^1.9.4",
|
|
801
800
|
"@types/bun": "latest",
|
|
802
801
|
"@types/node": "^22.19.5",
|
|
802
|
+
oxfmt: "^0.23.0",
|
|
803
|
+
oxlint: "^1.38.0",
|
|
803
804
|
typescript: "^5.9.3"
|
|
804
805
|
},
|
|
806
|
+
engines: {
|
|
807
|
+
bun: ">=1.3.2"
|
|
808
|
+
},
|
|
805
809
|
trustedDependencies: ["@beads/bd"]
|
|
806
810
|
};
|
|
807
811
|
|
|
@@ -2762,7 +2766,7 @@ async function editModel(configPath, modelType = "model") {
|
|
|
2762
2766
|
}
|
|
2763
2767
|
f2.success("Fetched models from models.dev");
|
|
2764
2768
|
const localProviders = config.provider || {};
|
|
2765
|
-
const
|
|
2769
|
+
const _configuredProviderIds = new Set(Object.keys(localProviders));
|
|
2766
2770
|
const allProviders = Object.values(modelsDevData);
|
|
2767
2771
|
const quickOptions = [];
|
|
2768
2772
|
quickOptions.push({
|
|
@@ -2929,7 +2933,7 @@ async function editAgentModel(configPath) {
|
|
|
2929
2933
|
config.agent = {};
|
|
2930
2934
|
}
|
|
2931
2935
|
const serverAgents = await getAgentsFromServer();
|
|
2932
|
-
const
|
|
2936
|
+
const _serverData = await getProvidersFromServer();
|
|
2933
2937
|
let agentNames = [];
|
|
2934
2938
|
const agentInfoMap = new Map;
|
|
2935
2939
|
if (serverAgents && serverAgents.length > 0) {
|
|
@@ -2943,7 +2947,7 @@ async function editAgentModel(configPath) {
|
|
|
2943
2947
|
});
|
|
2944
2948
|
}
|
|
2945
2949
|
} else {
|
|
2946
|
-
agentNames = Object.keys(config.agent)
|
|
2950
|
+
agentNames = Object.keys(config.agent);
|
|
2947
2951
|
for (const name of agentNames) {
|
|
2948
2952
|
const agent = config.agent[name];
|
|
2949
2953
|
agentInfoMap.set(name, {
|
|
@@ -3758,32 +3762,13 @@ async function editAutoupdate(configPath) {
|
|
|
3758
3762
|
|
|
3759
3763
|
// src/commands/init.ts
|
|
3760
3764
|
import { execSync } from "node:child_process";
|
|
3761
|
-
import {
|
|
3762
|
-
existsSync as existsSync4,
|
|
3763
|
-
mkdirSync as mkdirSync3,
|
|
3764
|
-
readFileSync as readFileSync4,
|
|
3765
|
-
readdirSync as readdirSync3,
|
|
3766
|
-
writeFileSync as writeFileSync4
|
|
3767
|
-
} from "node:fs";
|
|
3765
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync3, readFileSync as readFileSync4, readdirSync as readdirSync3, writeFileSync as writeFileSync4 } from "node:fs";
|
|
3768
3766
|
import { homedir, platform } from "node:os";
|
|
3769
3767
|
import { basename as basename2, dirname, join as join4 } from "node:path";
|
|
3770
3768
|
import { fileURLToPath } from "node:url";
|
|
3771
3769
|
var import_picocolors8 = __toESM(require_picocolors(), 1);
|
|
3772
|
-
var EXCLUDED_DIRS = [
|
|
3773
|
-
|
|
3774
|
-
".git",
|
|
3775
|
-
"dist",
|
|
3776
|
-
".DS_Store",
|
|
3777
|
-
"coverage",
|
|
3778
|
-
".next",
|
|
3779
|
-
".turbo"
|
|
3780
|
-
];
|
|
3781
|
-
var EXCLUDED_FILES = [
|
|
3782
|
-
"bun.lock",
|
|
3783
|
-
"package-lock.json",
|
|
3784
|
-
"yarn.lock",
|
|
3785
|
-
"pnpm-lock.yaml"
|
|
3786
|
-
];
|
|
3770
|
+
var EXCLUDED_DIRS = ["node_modules", ".git", "dist", ".DS_Store", "coverage", ".next", ".turbo"];
|
|
3771
|
+
var EXCLUDED_FILES = ["bun.lock", "package-lock.json", "yarn.lock", "pnpm-lock.yaml"];
|
|
3787
3772
|
function getGlobalConfigDir() {
|
|
3788
3773
|
const os = platform();
|
|
3789
3774
|
if (os === "win32") {
|
|
@@ -3810,10 +3795,7 @@ function detectMode(targetDir) {
|
|
|
3810
3795
|
function getTemplateRoot() {
|
|
3811
3796
|
const __filename2 = fileURLToPath(import.meta.url);
|
|
3812
3797
|
const __dirname2 = dirname(__filename2);
|
|
3813
|
-
const possiblePaths = [
|
|
3814
|
-
join4(__dirname2, "template"),
|
|
3815
|
-
join4(__dirname2, "..", "..", ".opencode")
|
|
3816
|
-
];
|
|
3798
|
+
const possiblePaths = [join4(__dirname2, "template"), join4(__dirname2, "..", "..", ".opencode")];
|
|
3817
3799
|
for (const path of possiblePaths) {
|
|
3818
3800
|
const opencodeDir = join4(path, ".opencode");
|
|
3819
3801
|
if (existsSync4(opencodeDir)) {
|
|
@@ -3964,14 +3946,7 @@ import { basename as basename4, join as join7 } from "node:path";
|
|
|
3964
3946
|
var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
3965
3947
|
|
|
3966
3948
|
// src/commands/skill.ts
|
|
3967
|
-
import {
|
|
3968
|
-
existsSync as existsSync5,
|
|
3969
|
-
mkdirSync as mkdirSync4,
|
|
3970
|
-
readFileSync as readFileSync5,
|
|
3971
|
-
readdirSync as readdirSync4,
|
|
3972
|
-
rmSync,
|
|
3973
|
-
writeFileSync as writeFileSync5
|
|
3974
|
-
} from "node:fs";
|
|
3949
|
+
import { existsSync as existsSync5, mkdirSync as mkdirSync4, readFileSync as readFileSync5, readdirSync as readdirSync4, rmSync, writeFileSync as writeFileSync5 } from "node:fs";
|
|
3975
3950
|
import { basename as basename3, join as join5 } from "node:path";
|
|
3976
3951
|
var import_picocolors9 = __toESM(require_picocolors(), 1);
|
|
3977
3952
|
async function skillCommand(action) {
|
|
@@ -4677,7 +4652,7 @@ async function doctorCommand() {
|
|
|
4677
4652
|
}
|
|
4678
4653
|
checks.push(...configChecks);
|
|
4679
4654
|
displayChecks(configChecks);
|
|
4680
|
-
} catch
|
|
4655
|
+
} catch {
|
|
4681
4656
|
checks.push({
|
|
4682
4657
|
name: "Valid JSON syntax",
|
|
4683
4658
|
ok: false,
|
|
@@ -4964,7 +4939,6 @@ async function runBrowser(options) {
|
|
|
4964
4939
|
items,
|
|
4965
4940
|
icon = "●",
|
|
4966
4941
|
color: itemColor = import_picocolors12.default.cyan,
|
|
4967
|
-
onSelect,
|
|
4968
4942
|
onBack
|
|
4969
4943
|
} = options;
|
|
4970
4944
|
if (items.length === 0) {
|
|
@@ -5155,7 +5129,24 @@ function padRight2(str, len) {
|
|
|
5155
5129
|
return str + " ".repeat(pad);
|
|
5156
5130
|
}
|
|
5157
5131
|
function stripAnsi(str) {
|
|
5158
|
-
|
|
5132
|
+
const esc = "\x1B";
|
|
5133
|
+
let result = "";
|
|
5134
|
+
let index = 0;
|
|
5135
|
+
while (index < str.length) {
|
|
5136
|
+
const start = str.indexOf(esc, index);
|
|
5137
|
+
if (start === -1) {
|
|
5138
|
+
result += str.slice(index);
|
|
5139
|
+
break;
|
|
5140
|
+
}
|
|
5141
|
+
result += str.slice(index, start);
|
|
5142
|
+
const end = str.indexOf("m", start);
|
|
5143
|
+
if (end === -1) {
|
|
5144
|
+
index = start + 1;
|
|
5145
|
+
continue;
|
|
5146
|
+
}
|
|
5147
|
+
index = end + 1;
|
|
5148
|
+
}
|
|
5149
|
+
return result;
|
|
5159
5150
|
}
|
|
5160
5151
|
async function showFileViewer(item) {
|
|
5161
5152
|
if (!existsSync8(item.path)) {
|
|
@@ -5570,7 +5561,24 @@ function padRight3(str, len) {
|
|
|
5570
5561
|
return str + " ".repeat(pad);
|
|
5571
5562
|
}
|
|
5572
5563
|
function stripAnsi2(str) {
|
|
5573
|
-
|
|
5564
|
+
const esc = "\x1B";
|
|
5565
|
+
let result = "";
|
|
5566
|
+
let index = 0;
|
|
5567
|
+
while (index < str.length) {
|
|
5568
|
+
const start = str.indexOf(esc, index);
|
|
5569
|
+
if (start === -1) {
|
|
5570
|
+
result += str.slice(index);
|
|
5571
|
+
break;
|
|
5572
|
+
}
|
|
5573
|
+
result += str.slice(index, start);
|
|
5574
|
+
const end = str.indexOf("m", start);
|
|
5575
|
+
if (end === -1) {
|
|
5576
|
+
index = start + 1;
|
|
5577
|
+
continue;
|
|
5578
|
+
}
|
|
5579
|
+
index = end + 1;
|
|
5580
|
+
}
|
|
5581
|
+
return result;
|
|
5574
5582
|
}
|
|
5575
5583
|
|
|
5576
5584
|
// src/tui/components/Dashboard.tsx
|
|
@@ -5685,7 +5693,24 @@ function padRight4(str, len) {
|
|
|
5685
5693
|
return str + " ".repeat(pad);
|
|
5686
5694
|
}
|
|
5687
5695
|
function stripAnsi3(str) {
|
|
5688
|
-
|
|
5696
|
+
const esc = "\x1B";
|
|
5697
|
+
let result = "";
|
|
5698
|
+
let index = 0;
|
|
5699
|
+
while (index < str.length) {
|
|
5700
|
+
const start = str.indexOf(esc, index);
|
|
5701
|
+
if (start === -1) {
|
|
5702
|
+
result += str.slice(index);
|
|
5703
|
+
break;
|
|
5704
|
+
}
|
|
5705
|
+
result += str.slice(index, start);
|
|
5706
|
+
const end = str.indexOf("m", start);
|
|
5707
|
+
if (end === -1) {
|
|
5708
|
+
index = start + 1;
|
|
5709
|
+
continue;
|
|
5710
|
+
}
|
|
5711
|
+
index = end + 1;
|
|
5712
|
+
}
|
|
5713
|
+
return result;
|
|
5689
5714
|
}
|
|
5690
5715
|
|
|
5691
5716
|
// src/tui/components/MCPMonitor.ts
|
|
@@ -5869,7 +5894,24 @@ function padRight5(str, len) {
|
|
|
5869
5894
|
return str + " ".repeat(pad);
|
|
5870
5895
|
}
|
|
5871
5896
|
function stripAnsi4(str) {
|
|
5872
|
-
|
|
5897
|
+
const esc = "\x1B";
|
|
5898
|
+
let result = "";
|
|
5899
|
+
let index = 0;
|
|
5900
|
+
while (index < str.length) {
|
|
5901
|
+
const start = str.indexOf(esc, index);
|
|
5902
|
+
if (start === -1) {
|
|
5903
|
+
result += str.slice(index);
|
|
5904
|
+
break;
|
|
5905
|
+
}
|
|
5906
|
+
result += str.slice(index, start);
|
|
5907
|
+
const end = str.indexOf("m", start);
|
|
5908
|
+
if (end === -1) {
|
|
5909
|
+
index = start + 1;
|
|
5910
|
+
continue;
|
|
5911
|
+
}
|
|
5912
|
+
index = end + 1;
|
|
5913
|
+
}
|
|
5914
|
+
return result;
|
|
5873
5915
|
}
|
|
5874
5916
|
|
|
5875
5917
|
// src/tui/hooks/useData.ts
|
|
@@ -11,6 +11,7 @@ export OPENCODE_DISABLE_PRUNE=0 # Disable potentially buggy pruning
|
|
|
11
11
|
export OPENCODE_EXPERIMENTAL_TURN_SUMMARY=1
|
|
12
12
|
export OPENCODE_ENABLE_EXPERIMENTAL_MODELS=1
|
|
13
13
|
export OPENCODE_EXPERIMENTAL_EXA=1
|
|
14
|
+
export OPENCODE_EXPERIMENTAL_OXFMT=1
|
|
14
15
|
|
|
15
16
|
# =============================================================================
|
|
16
17
|
# MCP SERVICES (Remote APIs)
|
|
@@ -14,9 +14,10 @@ Everything else is guidelines, not laws.
|
|
|
14
14
|
|
|
15
15
|
**Rule**: Before any complex tool call, ask: "Can a specialist agent do this better?"
|
|
16
16
|
|
|
17
|
+
- **Fast Tasks** → @general (small, well-defined, ≤3 files)
|
|
17
18
|
- **Search/Docs** → @explore / @scout
|
|
18
19
|
- **Review/Debug** → @review
|
|
19
|
-
- **Plan/Design** → @
|
|
20
|
+
- **Plan/Design** → @plan / @vision
|
|
20
21
|
- **Media Extraction** → @looker (images, PDFs, diagrams needing OCR/parsing)
|
|
21
22
|
|
|
22
23
|
If yes → Delegate. If no → Execute directly.
|
|
@@ -99,8 +100,8 @@ question({
|
|
|
99
100
|
- `prepareCallHierarchy` - Get call hierarchy item at position
|
|
100
101
|
- `incomingCalls` - Find what calls this function
|
|
101
102
|
- `outgoingCalls` - Find what this function calls
|
|
102
|
-
2. **Memory**: `memory-search` (Check past learnings)
|
|
103
|
-
3. **Structure**: `
|
|
103
|
+
2. **Memory**: `memory-search` (Check past learnings)
|
|
104
|
+
3. **Structure**: `lsp` (Find symbols, definitions, references)
|
|
104
105
|
4. **Search**: `grep` (Find text/TODOs)
|
|
105
106
|
5. **Files**: `glob` (Find files)
|
|
106
107
|
|
|
@@ -122,40 +123,28 @@ Violations: `read → edit` or `grep → edit` without LSP = WRONG.
|
|
|
122
123
|
|
|
123
124
|
## Beads (Task Tracking)
|
|
124
125
|
|
|
125
|
-
**Leader Only**: `build` and `
|
|
126
|
+
**Leader Only**: `build` and `plan` agents own the DB. Subagents read-only.
|
|
126
127
|
|
|
127
128
|
- **Start**: `bd ready` → `bd update <id> --status in_progress`
|
|
128
|
-
- **Work**: `bd
|
|
129
|
+
- **Work**: `bd update <id> --status in_progress` → Edit
|
|
129
130
|
- **Finish**: `bd close <id> --reason "..."` → `bd sync` → **RESTART SESSION**
|
|
130
131
|
|
|
131
132
|
## Parallel Execution
|
|
132
133
|
|
|
133
|
-
**Rule**: Fire research subagents in
|
|
134
|
+
**Rule**: Fire research subagents in parallel, continue working, collect when needed.
|
|
134
135
|
|
|
135
|
-
For complex tasks with multiple unknowns, don't wait for sequential research. Launch parallel
|
|
136
|
-
|
|
137
|
-
**Allowed agents for background delegation:**
|
|
138
|
-
|
|
139
|
-
- **Subagents**: explore, scout, review, planner, vision, looker (stateless workers)
|
|
140
|
-
- **Primary**: rush (autonomous execution)
|
|
141
|
-
- **NOT allowed**: build (build is the orchestrator that uses this tool)
|
|
136
|
+
For complex tasks with multiple unknowns, don't wait for sequential research. Launch parallel tasks using the built-in `task` tool:
|
|
142
137
|
|
|
143
138
|
```typescript
|
|
144
|
-
//
|
|
145
|
-
|
|
146
|
-
|
|
139
|
+
// Parallel Task tool calls (recommended)
|
|
140
|
+
task({ subagent_type: "explore", prompt: "Find auth patterns..." }); // → runs in parallel
|
|
141
|
+
task({ subagent_type: "scout", prompt: "Find JWT docs..." }); // → runs in parallel
|
|
147
142
|
|
|
148
143
|
// Continue with implementation work immediately...
|
|
149
|
-
|
|
150
|
-
// Collect results when needed
|
|
151
|
-
background_output({ taskId: "bg_123_abc" });
|
|
152
|
-
background_output({ taskId: "bg_456_def" });
|
|
153
|
-
|
|
154
|
-
// Cleanup at session end
|
|
155
|
-
background_cancel({ all: true });
|
|
144
|
+
// Results come back in same message (no manual collection needed)
|
|
156
145
|
```
|
|
157
146
|
|
|
158
|
-
**When to use
|
|
147
|
+
**When to use parallel execution:**
|
|
159
148
|
|
|
160
149
|
- Multiple independent research questions
|
|
161
150
|
- Complex tasks touching unfamiliar code
|
|
@@ -42,7 +42,7 @@ opencode
|
|
|
42
42
|
├── agent/ # Custom agents (5 total)
|
|
43
43
|
├── command/ # Custom commands (26 workflows)
|
|
44
44
|
├── skill/ # Domain expertise (27 skills)
|
|
45
|
-
├── tool/ # Custom MCP tools (memory-*, observation
|
|
45
|
+
├── tool/ # Custom MCP tools (memory-*, observation)
|
|
46
46
|
├── plugin/ # Background plugins (enforcer, compactor, truncator)
|
|
47
47
|
└── memory/ # Persistent context
|
|
48
48
|
```
|
|
@@ -84,11 +84,11 @@ GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
|
|
|
84
84
|
**Primary Agents:**
|
|
85
85
|
|
|
86
86
|
- **@build** - Main orchestrator (Claude Opus 4.5) - handles 70% of work
|
|
87
|
-
- **@
|
|
87
|
+
- **@general** - Fast subagent for small, well-defined tasks
|
|
88
88
|
|
|
89
89
|
**Subagents:**
|
|
90
90
|
|
|
91
|
-
- **@
|
|
91
|
+
- **@plan** - Architecture, multi-phase coordination
|
|
92
92
|
- **@scout** - External research (library docs + GitHub patterns)
|
|
93
93
|
- **@review** - Code review + debugging + security audit
|
|
94
94
|
- **@vision** - UI/UX design: mockup, UI review, accessibility, aesthetics, visual
|
|
@@ -161,124 +161,13 @@ Plugins run automatically in every session:
|
|
|
161
161
|
|
|
162
162
|
- **memory-read** - Load previous context, templates
|
|
163
163
|
- **memory-update** - Save learnings, handoffs
|
|
164
|
-
- **memory-search** - Search across all memory files (keyword
|
|
165
|
-
- **
|
|
166
|
-
- **memory-embed** - Generate embeddings using Ollama
|
|
167
|
-
- **observation** - Create structured observations (auto-embedded)
|
|
168
|
-
- **ast-grep** - Semantic code search/replace (AST-based)
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## Semantic Memory Setup (Ollama)
|
|
173
|
-
|
|
174
|
-
Semantic search requires Ollama running locally. Zero API keys needed.
|
|
175
|
-
|
|
176
|
-
**Model:** `qwen3-embedding:0.6b` (639MB)
|
|
177
|
-
|
|
178
|
-
- State-of-the-art quality (MTEB #1 for 8B version)
|
|
179
|
-
- Code-aware (optimized for code retrieval)
|
|
180
|
-
- Multilingual (100+ languages including Vietnamese)
|
|
181
|
-
- 32K context, 1024 dimensions
|
|
182
|
-
|
|
183
|
-
### Installation
|
|
184
|
-
|
|
185
|
-
**macOS:**
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
brew install ollama
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
**Linux:**
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
curl -fsSL https://ollama.com/install.sh | sh
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
**Windows:**
|
|
198
|
-
|
|
199
|
-
1. Download from https://ollama.com/download/windows
|
|
200
|
-
2. Run the installer
|
|
201
|
-
3. Ollama runs as a background service automatically
|
|
202
|
-
|
|
203
|
-
### Setup
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
# Start Ollama (macOS/Linux - if not running as service)
|
|
207
|
-
ollama serve
|
|
208
|
-
|
|
209
|
-
# Pull embedding model (one-time, ~639MB)
|
|
210
|
-
ollama pull qwen3-embedding:0.6b
|
|
211
|
-
|
|
212
|
-
# Verify
|
|
213
|
-
ollama list # Should show qwen3-embedding:0.6b
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
**Linux:**
|
|
217
|
-
|
|
218
|
-
```bash
|
|
219
|
-
curl -fsSL https://ollama.com/install.sh | sh
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
**Windows:**
|
|
223
|
-
|
|
224
|
-
1. Download from https://ollama.com/download/windows
|
|
225
|
-
2. Run the installer
|
|
226
|
-
3. Ollama runs as a background service automatically
|
|
227
|
-
|
|
228
|
-
### Setup
|
|
229
|
-
|
|
230
|
-
```bash
|
|
231
|
-
# Start Ollama (macOS/Linux - if not running as service)
|
|
232
|
-
ollama serve
|
|
233
|
-
|
|
234
|
-
# Pull embedding model (one-time, ~274MB)
|
|
235
|
-
ollama pull nomic-embed-text
|
|
236
|
-
|
|
237
|
-
# Verify
|
|
238
|
-
ollama list # Should show nomic-embed-text
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
### Custom Host (Optional)
|
|
242
|
-
|
|
243
|
-
If Ollama runs on a different machine:
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
export OLLAMA_HOST=http://192.168.1.100:11434
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### Usage
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
# Rebuild vector index (after adding new observations)
|
|
253
|
-
memory-index action=rebuild
|
|
254
|
-
|
|
255
|
-
# Search with semantic similarity
|
|
256
|
-
memory-search query="authentication patterns" mode=semantic
|
|
257
|
-
|
|
258
|
-
# Hybrid search (keyword + semantic)
|
|
259
|
-
memory-search query="auth" mode=hybrid
|
|
260
|
-
```
|
|
164
|
+
- **memory-search** - Search across all memory files (keyword-based)
|
|
165
|
+
- **observation** - Create structured observations (decision, bugfix, feature, etc.)
|
|
261
166
|
|
|
262
167
|
---
|
|
263
168
|
|
|
264
169
|
### AST-Grep Usage
|
|
265
170
|
|
|
266
|
-
Semantic code operations - smarter than regex:
|
|
267
|
-
|
|
268
|
-
```bash
|
|
269
|
-
# Search patterns
|
|
270
|
-
ast-grep pattern="console.log($$$)" # Find all console.log
|
|
271
|
-
ast-grep pattern="async function $NAME($$$) { $$$ }" # Find async functions
|
|
272
|
-
ast-grep pattern="const [$S, $SET] = useState($$$)" # Find React hooks
|
|
273
|
-
|
|
274
|
-
# Replace (dry run by default)
|
|
275
|
-
ast-grep pattern="oldFunc($$$)" rewrite="newFunc($$$)" dryRun=true
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**Pattern syntax**: `$NAME` = single node, `$$$` = zero or more nodes
|
|
279
|
-
|
|
280
|
-
**Requires**: `brew install ast-grep` or `cargo install ast-grep --locked`
|
|
281
|
-
|
|
282
171
|
---
|
|
283
172
|
|
|
284
173
|
## MCP Services
|
|
@@ -335,8 +224,8 @@ Result: Comprehensive research doc
|
|
|
335
224
|
|
|
336
225
|
```
|
|
337
226
|
User: "Build auth system"
|
|
338
|
-
@build → @
|
|
339
|
-
@
|
|
227
|
+
@build → @plan (4 phases)
|
|
228
|
+
@plan → @review (security audit)
|
|
340
229
|
Result: Secure auth with tests
|
|
341
230
|
```
|
|
342
231
|
|
|
@@ -409,7 +298,7 @@ fi
|
|
|
409
298
|
**Delegation:**
|
|
410
299
|
|
|
411
300
|
- Use @build for 70% of work
|
|
412
|
-
- Delegate to @
|
|
301
|
+
- Delegate to @plan for 3+ phases
|
|
413
302
|
- Use @review before deployment (code review + security)
|
|
414
303
|
- Use @scout for library docs + GitHub patterns
|
|
415
304
|
- Use @explore for codebase search
|
|
@@ -41,7 +41,6 @@ File search specialist. Navigate and explore codebases efficiently.
|
|
|
41
41
|
- Finding files using glob patterns
|
|
42
42
|
- Searching code with regex patterns
|
|
43
43
|
- Reading and analyzing file contents
|
|
44
|
-
- Semantic code search with AST-Grep
|
|
45
44
|
- Understanding symbol types and definitions with LSP
|
|
46
45
|
|
|
47
46
|
## Navigation Strategy
|
|
@@ -64,8 +63,8 @@ File search specialist. Navigate and explore codebases efficiently.
|
|
|
64
63
|
|
|
65
64
|
## Thoroughness Levels
|
|
66
65
|
|
|
67
|
-
**Quick**: Single
|
|
66
|
+
**Quick**: Single grep, lsp_lsp_workspace_symbols, or glob. Read 1-3 files. Return immediately.
|
|
68
67
|
|
|
69
|
-
**Medium**:
|
|
68
|
+
**Medium**: grep + LSP verification. Check 2-3 naming conventions. Read 3-5 files. Use `lsp_lsp_find_references` to trace usage.
|
|
70
69
|
|
|
71
70
|
**Very Thorough**: Comprehensive search across multiple terms and locations. Use `lsp_lsp_find_references` to build dependency map. Report with file:line references.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: General-purpose subagent for fast, well-defined tasks; delegates complexity to specialists.
|
|
3
|
+
mode: subagent
|
|
4
|
+
temperature: 0.1
|
|
5
|
+
permission:
|
|
6
|
+
bash:
|
|
7
|
+
"*": allow
|
|
8
|
+
"git push*": ask
|
|
9
|
+
"rm -rf*": deny
|
|
10
|
+
"sudo*": deny
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# General Agent
|
|
14
|
+
|
|
15
|
+
Fast subagent for small, clear tasks. Delegate complexity quickly.
|
|
16
|
+
|
|
17
|
+
<system-reminder>
|
|
18
|
+
# General Mode - System Reminder
|
|
19
|
+
|
|
20
|
+
You are the general subagent. Move fast, avoid risk.
|
|
21
|
+
|
|
22
|
+
## Critical Constraints
|
|
23
|
+
|
|
24
|
+
1. Read before edit; never edit unseen code.
|
|
25
|
+
2. Two-strike rule: after 2 failed attempts, stop and escalate.
|
|
26
|
+
3. Bail on complexity: 4+ files, architecture decisions, unclear specs → delegate.
|
|
27
|
+
4. No hallucinated URLs; only use provided or verified links.
|
|
28
|
+
5. Ask before commits/pushes.
|
|
29
|
+
|
|
30
|
+
## Intent Gate
|
|
31
|
+
|
|
32
|
+
- Specialist fit? Use explore/scout/review/plan/vision/looker when better.
|
|
33
|
+
- Scope small and clear (≤3 files, no refactors)? Otherwise delegate.
|
|
34
|
+
- Need clarification? One focused question; if more, escalate.
|
|
35
|
+
|
|
36
|
+
## Bail Triggers
|
|
37
|
+
|
|
38
|
+
- Scope creep or cross-cutting changes
|
|
39
|
+
- Research-heavy tasks
|
|
40
|
+
- Two failed attempts
|
|
41
|
+
- Architecture pattern choices
|
|
42
|
+
- Legacy/edge-case minefields
|
|
43
|
+
|
|
44
|
+
## Guidelines
|
|
45
|
+
|
|
46
|
+
- Match existing style; change only what’s requested.
|
|
47
|
+
- Prefer minimal, surgical edits; avoid unrelated refactors.
|
|
48
|
+
- Run a quick sanity check (lint/typecheck or LSP diagnostics) after edits.
|
|
49
|
+
- Use `file:line` references in summaries; no emojis unless asked.
|
|
50
|
+
|
|
51
|
+
## Progress Updates
|
|
52
|
+
|
|
53
|
+
- Keep brief preambles (8–12 words) during multi-step changes.
|
|
54
|
+
- Examples: “Found issue; patching helper now.” / “Config updated; running lint.”
|
|
55
|
+
|
|
56
|
+
</system-reminder>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Primary planning agent for architecture and multi-phase execution; produces actionable plans with gated steps.
|
|
3
|
+
mode: primary
|
|
4
|
+
temperature: 0.2
|
|
5
|
+
permission:
|
|
6
|
+
write:
|
|
7
|
+
"*": deny
|
|
8
|
+
".beads/artifacts/*/*.md": allow
|
|
9
|
+
edit:
|
|
10
|
+
"*": deny
|
|
11
|
+
".beads/artifacts/*/*.md": allow
|
|
12
|
+
bash:
|
|
13
|
+
"*": allow
|
|
14
|
+
"rm*": deny
|
|
15
|
+
"git push*": deny
|
|
16
|
+
"git commit*": deny
|
|
17
|
+
"git reset*": deny
|
|
18
|
+
"npm publish*": deny
|
|
19
|
+
question: allow
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Plan Agent
|
|
23
|
+
|
|
24
|
+
<system-reminder>
|
|
25
|
+
# Plan Mode - System Reminder
|
|
26
|
+
|
|
27
|
+
You are the primary planning agent. Stay read-focused; only edit planning artifacts in `.beads/artifacts/<bead_id>/` when needed.
|
|
28
|
+
|
|
29
|
+
## Critical Constraints
|
|
30
|
+
|
|
31
|
+
1. No code edits outside planning docs. Read-first, no destructive commands.
|
|
32
|
+
2. Two-strike rule: after two failed attempts to get clarity, escalate.
|
|
33
|
+
3. Bail on complexity outside planning scope; delegate execution to @build, research to @explore/@scout.
|
|
34
|
+
4. No hallucinated URLs; only use provided or verified links.
|
|
35
|
+
5. Ask before commits/pushes.
|
|
36
|
+
|
|
37
|
+
## When to Plan vs Execute
|
|
38
|
+
|
|
39
|
+
- Plan when work spans multiple phases, has dependencies, or needs coordination.
|
|
40
|
+
- Skip planning for trivial single-step fixes; delegate directly to @build.
|
|
41
|
+
|
|
42
|
+
## Planning Workflow
|
|
43
|
+
|
|
44
|
+
- Phase 1: Understand request; launch minimal @explore/@scout in parallel when scope is unclear.
|
|
45
|
+
- Phase 2: Draft approach with phases, owners, and validation gates.
|
|
46
|
+
- Phase 3: Synthesize into a concise plan with deliverables and risks.
|
|
47
|
+
- End with a clarifying question if options exist, otherwise present the plan and ask "Ready to proceed?"
|
|
48
|
+
|
|
49
|
+
## Output Expectations
|
|
50
|
+
|
|
51
|
+
- Provide phase breakdown, critical files to touch, validation steps, and agent assignments.
|
|
52
|
+
- Surface risks, edge cases, and acceptance criteria.
|
|
53
|
+
- Keep progress updates brief (8–12 words) during research.
|
|
54
|
+
</system-reminder>
|