@vpxa/kb 0.1.18 → 0.1.20
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/package.json +1 -1
- package/packages/cli/dist/commands/init/constants.d.ts +20 -1
- package/packages/cli/dist/commands/init/constants.js +1 -1
- package/packages/cli/dist/commands/init/user.d.ts +17 -5
- package/packages/cli/dist/commands/init/user.js +5 -5
- package/scaffold/adapters/copilot.mjs +9 -4
- package/scaffold/definitions/agents.mjs +12 -0
- package/scaffold/definitions/bodies.mjs +35 -4
- package/scaffold/definitions/tools.mjs +4 -0
- package/scaffold/general/agents/Architect-Reviewer-Alpha.agent.md +1 -1
- package/scaffold/general/agents/Architect-Reviewer-Beta.agent.md +1 -1
- package/scaffold/general/agents/Code-Reviewer-Alpha.agent.md +1 -1
- package/scaffold/general/agents/Code-Reviewer-Beta.agent.md +1 -1
- package/scaffold/general/agents/Debugger.agent.md +1 -1
- package/scaffold/general/agents/Documenter.agent.md +8 -8
- package/scaffold/general/agents/Explorer.agent.md +1 -1
- package/scaffold/general/agents/Frontend.agent.md +1 -1
- package/scaffold/general/agents/Implementer.agent.md +1 -1
- package/scaffold/general/agents/Orchestrator.agent.md +9 -9
- package/scaffold/general/agents/Planner.agent.md +11 -11
- package/scaffold/general/agents/Refactor.agent.md +7 -7
- package/scaffold/general/agents/Researcher-Alpha.agent.md +1 -1
- package/scaffold/general/agents/Researcher-Beta.agent.md +1 -1
- package/scaffold/general/agents/Researcher-Delta.agent.md +1 -1
- package/scaffold/general/agents/Researcher-Gamma.agent.md +1 -1
- package/scaffold/general/agents/Security.agent.md +1 -1
- package/scaffold/general/agents/_shared/code-agent-base.md +0 -18
- package/scaffold/generate.mjs +13 -5
- package/scaffold/general/agents/_shared/adr-protocol.md +0 -91
package/package.json
CHANGED
|
@@ -11,8 +11,27 @@ declare const MCP_SERVER_ENTRY: {
|
|
|
11
11
|
readonly type: "stdio";
|
|
12
12
|
readonly command: "npx";
|
|
13
13
|
readonly args: readonly ["-y", "@vpxa/kb", "serve"];
|
|
14
|
+
readonly cwd: "${workspaceFolder}";
|
|
14
15
|
};
|
|
15
16
|
/** Skills shipped with the KB package and installed during init. */
|
|
16
17
|
declare const SKILL_NAMES: readonly ["knowledge-base", "brainstorming", "session-handoff", "requirements-clarity", "lesson-learned", "c4-architecture", "adr-skill"];
|
|
18
|
+
/**
|
|
19
|
+
* VS Code settings merged into each VS Code-family IDE's settings.json.
|
|
20
|
+
*
|
|
21
|
+
* - agentFilesLocations: Disables ~/.claude/agents so agents are only loaded
|
|
22
|
+
* from ~/.copilot/agents (our scaffold root) and workspace .github/agents/.
|
|
23
|
+
* Without this, VS Code discovers both locations causing duplicates with
|
|
24
|
+
* mismatched tool-name formats.
|
|
25
|
+
* - copilotMemory: Enables Copilot Memory so KB `remember` persists across sessions.
|
|
26
|
+
* - customAgentInSubagent: Enables custom agents as subagents — required for
|
|
27
|
+
* Orchestrator's multi-agent `runSubagent` workflow.
|
|
28
|
+
* - useNestedAgentsMdFiles: Agents reference _shared/*.md protocol files —
|
|
29
|
+
* without this, shared protocols are silently ignored.
|
|
30
|
+
* - useAgentSkills: Agents load SKILL.md files on demand (brainstorming,
|
|
31
|
+
* session-handoff, etc.) — without this, skills never activate.
|
|
32
|
+
* - switchAgent: Orchestrator uses the switchAgent tool to hand off to Plan —
|
|
33
|
+
* without this, agent switching is unavailable.
|
|
34
|
+
*/
|
|
35
|
+
declare const VSCODE_SETTINGS: Record<string, unknown>;
|
|
17
36
|
//#endregion
|
|
18
|
-
export { MCP_SERVER_ENTRY, SERVER_NAME, SKILL_NAMES };
|
|
37
|
+
export { MCP_SERVER_ENTRY, SERVER_NAME, SKILL_NAMES, VSCODE_SETTINGS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=`knowledge-base`,t={type:`stdio`,command:`npx`,args:[`-y`,`@vpxa/kb`,`serve`]},n=[`knowledge-base`,`brainstorming`,`session-handoff`,`requirements-clarity`,`lesson-learned`,`c4-architecture`,`adr-skill`];export{t as MCP_SERVER_ENTRY,e as SERVER_NAME,n as SKILL_NAMES};
|
|
1
|
+
const e=`knowledge-base`,t={type:`stdio`,command:`npx`,args:[`-y`,`@vpxa/kb`,`serve`],cwd:"${workspaceFolder}"},n=[`knowledge-base`,`brainstorming`,`session-handoff`,`requirements-clarity`,`lesson-learned`,`c4-architecture`,`adr-skill`],r={"chat.agentFilesLocations":{"~/.claude/agents":!1},"github.copilot.chat.copilotMemory.enabled":!0,"chat.customAgentInSubagent.enabled":!0,"chat.useNestedAgentsMdFiles":!0,"chat.useAgentSkills":!0,"github.copilot.chat.switchAgent.enabled":!0};export{t as MCP_SERVER_ENTRY,e as SERVER_NAME,n as SKILL_NAMES,r as VSCODE_SETTINGS};
|
|
@@ -12,10 +12,16 @@ interface UserLevelIdePath {
|
|
|
12
12
|
mcpConfigPath: string;
|
|
13
13
|
/**
|
|
14
14
|
* User-level scaffold root for agents/prompts/skills.
|
|
15
|
-
* VS Code: ~/.
|
|
15
|
+
* VS Code: ~/.copilot, Claude Code: ~/.claude, Cursor: ~/.cursor, Windsurf: ~/.windsurf.
|
|
16
16
|
* Null if the IDE has no user-level scaffold support.
|
|
17
17
|
*/
|
|
18
18
|
globalScaffoldRoot: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* User-level instruction file root (may differ from scaffold root).
|
|
21
|
+
* VS Code uses ~/.github for copilot-instructions.md but ~/.copilot for agents.
|
|
22
|
+
* When null, falls back to globalScaffoldRoot.
|
|
23
|
+
*/
|
|
24
|
+
instructionsRoot: string | null;
|
|
19
25
|
}
|
|
20
26
|
/**
|
|
21
27
|
* Detect all installed IDEs by checking if their user-level config directory exists.
|
|
@@ -26,16 +32,22 @@ declare function detectInstalledIdes(): UserLevelIdePath[];
|
|
|
26
32
|
* Preserves all existing non-KB entries. Backs up existing file before writing.
|
|
27
33
|
*/
|
|
28
34
|
declare function writeUserLevelMcpConfig(idePath: UserLevelIdePath, serverName: string, force?: boolean): void;
|
|
35
|
+
/**
|
|
36
|
+
* Merge KB-related settings into a VS Code-family IDE's settings.json.
|
|
37
|
+
* Preserves all existing settings. Only writes keys defined in VSCODE_SETTINGS.
|
|
38
|
+
*/
|
|
39
|
+
declare function writeVscodeSettings(idePath: UserLevelIdePath, force?: boolean): void;
|
|
29
40
|
/**
|
|
30
41
|
* Install agents, prompts, skills, and instruction files to each detected IDE's
|
|
31
42
|
* global scaffold root.
|
|
32
43
|
*
|
|
33
44
|
* Each IDE has its own global discovery path:
|
|
34
|
-
* - VS Code / VSCodium: ~/.
|
|
45
|
+
* - VS Code / VSCodium: ~/.copilot/ (agents/, prompts/, skills/) + ~/.github/ (copilot-instructions.md)
|
|
35
46
|
* - Claude Code: ~/.claude/ (CLAUDE.md, agents/)
|
|
36
|
-
* - Cursor /
|
|
47
|
+
* - Cursor: ~/.cursor/ (rules/kb.mdc, agents/, prompts/, skills/)
|
|
48
|
+
* - Windsurf: ~/.windsurf/ (rules/kb.md, agents/, prompts/, skills/)
|
|
37
49
|
*
|
|
38
|
-
* Multiple IDEs may share the same root (e.g. VS Code + VSCodium both use ~/.
|
|
50
|
+
* Multiple IDEs may share the same root (e.g. VS Code + VSCodium both use ~/.copilot/).
|
|
39
51
|
* We deduplicate scaffold files but generate IDE-specific instruction files.
|
|
40
52
|
*/
|
|
41
53
|
declare function installGlobalScaffold(pkgRoot: string, ides: UserLevelIdePath[], serverName: string, force?: boolean): void;
|
|
@@ -46,4 +58,4 @@ declare function initUser(options: {
|
|
|
46
58
|
force: boolean;
|
|
47
59
|
}): Promise<void>;
|
|
48
60
|
//#endregion
|
|
49
|
-
export { UserLevelIdePath, detectInstalledIdes, initUser, installGlobalScaffold, writeUserLevelMcpConfig };
|
|
61
|
+
export { UserLevelIdePath, detectInstalledIdes, initUser, installGlobalScaffold, writeUserLevelMcpConfig, writeVscodeSettings };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{MCP_SERVER_ENTRY as e,SERVER_NAME as t,SKILL_NAMES as n}from"./constants.js";import{buildAgentsMd as
|
|
2
|
-
`);let r=
|
|
3
|
-
No supported IDEs detected. You can manually add the MCP server config.`);else{console.log(`\n Detected ${i.length} IDE(s):`);for(let t of i)
|
|
4
|
-
Installing scaffold files:`),
|
|
1
|
+
import{MCP_SERVER_ENTRY as e,SERVER_NAME as t,SKILL_NAMES as n,VSCODE_SETTINGS as r}from"./constants.js";import{buildAgentsMd as i,buildCopilotInstructions as a}from"./templates.js";import{copyDirectoryRecursive as o}from"./scaffold.js";import{copyFileSync as s,existsSync as c,mkdirSync as l,readFileSync as u,readdirSync as d,statSync as f,writeFileSync as p}from"node:fs";import{dirname as m,resolve as h}from"node:path";import{fileURLToPath as g}from"node:url";import{getGlobalDataDir as _,saveRegistry as v}from"../../../../core/dist/index.js";import{homedir as y}from"node:os";function b(){let e=y(),t=process.platform,n=[],r=h(e,`.copilot`),i=h(e,`.github`),a=h(e,`.claude`),o=h(e,`.cursor`),s=h(e,`.windsurf`);if(t===`win32`){let t=process.env.APPDATA??h(e,`AppData`,`Roaming`);n.push({ide:`VS Code`,configDir:h(t,`Code`,`User`),mcpConfigPath:h(t,`Code`,`User`,`mcp.json`),globalScaffoldRoot:r,instructionsRoot:i},{ide:`VS Code Insiders`,configDir:h(t,`Code - Insiders`,`User`),mcpConfigPath:h(t,`Code - Insiders`,`User`,`mcp.json`),globalScaffoldRoot:r,instructionsRoot:i},{ide:`VSCodium`,configDir:h(t,`VSCodium`,`User`),mcpConfigPath:h(t,`VSCodium`,`User`,`mcp.json`),globalScaffoldRoot:r,instructionsRoot:i},{ide:`Cursor`,configDir:h(t,`Cursor`,`User`),mcpConfigPath:h(t,`Cursor`,`User`,`mcp.json`),globalScaffoldRoot:o,instructionsRoot:null},{ide:`Cursor Nightly`,configDir:h(t,`Cursor Nightly`,`User`),mcpConfigPath:h(t,`Cursor Nightly`,`User`,`mcp.json`),globalScaffoldRoot:o,instructionsRoot:null},{ide:`Windsurf`,configDir:h(t,`Windsurf`,`User`),mcpConfigPath:h(t,`Windsurf`,`User`,`mcp.json`),globalScaffoldRoot:s,instructionsRoot:null})}else if(t===`darwin`){let t=h(e,`Library`,`Application Support`);n.push({ide:`VS Code`,configDir:h(t,`Code`,`User`),mcpConfigPath:h(t,`Code`,`User`,`mcp.json`),globalScaffoldRoot:r,instructionsRoot:i},{ide:`VS Code Insiders`,configDir:h(t,`Code - Insiders`,`User`),mcpConfigPath:h(t,`Code - Insiders`,`User`,`mcp.json`),globalScaffoldRoot:r,instructionsRoot:i},{ide:`VSCodium`,configDir:h(t,`VSCodium`,`User`),mcpConfigPath:h(t,`VSCodium`,`User`,`mcp.json`),globalScaffoldRoot:r,instructionsRoot:i},{ide:`Cursor`,configDir:h(t,`Cursor`,`User`),mcpConfigPath:h(t,`Cursor`,`User`,`mcp.json`),globalScaffoldRoot:o,instructionsRoot:null},{ide:`Cursor Nightly`,configDir:h(t,`Cursor Nightly`,`User`),mcpConfigPath:h(t,`Cursor Nightly`,`User`,`mcp.json`),globalScaffoldRoot:o,instructionsRoot:null},{ide:`Windsurf`,configDir:h(t,`Windsurf`,`User`),mcpConfigPath:h(t,`Windsurf`,`User`,`mcp.json`),globalScaffoldRoot:s,instructionsRoot:null})}else{let t=process.env.XDG_CONFIG_HOME??h(e,`.config`);n.push({ide:`VS Code`,configDir:h(t,`Code`,`User`),mcpConfigPath:h(t,`Code`,`User`,`mcp.json`),globalScaffoldRoot:r,instructionsRoot:i},{ide:`VS Code Insiders`,configDir:h(t,`Code - Insiders`,`User`),mcpConfigPath:h(t,`Code - Insiders`,`User`,`mcp.json`),globalScaffoldRoot:r,instructionsRoot:i},{ide:`VSCodium`,configDir:h(t,`VSCodium`,`User`),mcpConfigPath:h(t,`VSCodium`,`User`,`mcp.json`),globalScaffoldRoot:r,instructionsRoot:i},{ide:`Cursor`,configDir:h(t,`Cursor`,`User`),mcpConfigPath:h(t,`Cursor`,`User`,`mcp.json`),globalScaffoldRoot:o,instructionsRoot:null},{ide:`Cursor Nightly`,configDir:h(t,`Cursor Nightly`,`User`),mcpConfigPath:h(t,`Cursor Nightly`,`User`,`mcp.json`),globalScaffoldRoot:o,instructionsRoot:null},{ide:`Windsurf`,configDir:h(t,`Windsurf`,`User`),mcpConfigPath:h(t,`Windsurf`,`User`,`mcp.json`),globalScaffoldRoot:s,instructionsRoot:null})}return n.push({ide:`Claude Code`,configDir:h(e,`.claude`),mcpConfigPath:h(e,`.claude`,`mcp.json`),globalScaffoldRoot:a,instructionsRoot:null}),n.filter(e=>c(e.configDir))}function x(t,n,r=!1){let{mcpConfigPath:i,configDir:a}=t,o={...e},s={};if(c(i)){try{let e=u(i,`utf-8`);s=JSON.parse(e)}catch{let e=`${i}.bak`;p(e,u(i,`utf-8`),`utf-8`),console.log(` Backed up invalid ${i} to ${e}`),s={}}if((s.servers??s.mcpServers??{})[n]&&!r){console.log(` ${t.ide}: ${n} already configured (use --force to update)`);return}}let d=new Set([`VS Code`,`VS Code Insiders`,`VSCodium`,`Windsurf`]).has(t.ide)?`servers`:`mcpServers`,f=s[d]??{};f[n]=o,s[d]=f,l(a,{recursive:!0}),p(i,`${JSON.stringify(s,null,2)}\n`,`utf-8`),console.log(` ${t.ide}: configured ${n} in ${i}`)}const S=new Set([`VS Code`,`VS Code Insiders`,`VSCodium`]);function C(e,t=!1){if(!S.has(e.ide))return;let n=h(e.configDir,`settings.json`),i={};if(c(n))try{let e=u(n,`utf-8`);i=JSON.parse(e)}catch{console.log(` ${e.ide}: skipped settings.json (invalid JSON)`);return}let a=!1;for(let[e,n]of Object.entries(r))if(typeof n==`object`&&n){let t=typeof i[e]==`object`&&i[e]!==null?i[e]:{},r={...t,...n};JSON.stringify(r)!==JSON.stringify(t)&&(i[e]=r,a=!0)}else (t||!(e in i))&&(i[e]=n,a=!0);a&&(p(n,`${JSON.stringify(i,null,2)}\n`,`utf-8`),console.log(` ${e.ide}: updated settings.json`))}function w(e,t,n,r){let i=h(t,n);l(i,{recursive:!0});let a=h(e,`scaffold`,`general`,n);if(!c(a))return 0;let u=0;for(let e of d(a)){let t=h(a,e),l=h(i,e);f(t).isDirectory()?o(t,l,`${n}/${e}`,r):(r||!c(l))&&(s(t,l),u++)}return u}function T(e,t,r,s=!1){let u=new Set;for(let e of t)e.globalScaffoldRoot&&u.add(e.globalScaffoldRoot);if(u.size===0){console.log(` No IDEs with global scaffold support detected.`);return}for(let t of u){let r=w(e,t,`agents`,s),i=w(e,t,`prompts`,s),a=h(t,`skills`),l=0;for(let t of n){let n=h(e,`skills`,t);c(n)&&(o(n,h(a,t),`skills/${t}`,s),l++)}console.log(` ${t}: ${r} agents, ${i} prompts, ${l} skills`)}let d=new Set,f=a(`kb`,r),m=i(`kb`,r);for(let e of t){if(!e.globalScaffoldRoot)continue;let t=e.globalScaffoldRoot;if(e.ide===`Claude Code`){let e=h(t,`CLAUDE.md`);(s||!c(e))&&(p(e,`${f}\n---\n\n${m}`,`utf-8`),d.add(e))}else if(e.ide===`VS Code`||e.ide===`VS Code Insiders`||e.ide===`VSCodium`){let n=e.instructionsRoot??t;l(n,{recursive:!0});let r=h(n,`copilot-instructions.md`);d.has(r)||(s||!c(r))&&(p(r,`${f}\n---\n\n${m}`,`utf-8`),d.add(r))}else if(e.ide===`Cursor`||e.ide===`Cursor Nightly`){let e=h(t,`rules`);l(e,{recursive:!0});let n=h(e,`kb.mdc`);d.has(n)||(s||!c(n))&&(p(n,`${f}\n---\n\n${m}`,`utf-8`),d.add(n))}else if(e.ide===`Windsurf`){let e=h(t,`rules`);l(e,{recursive:!0});let n=h(e,`kb.md`);d.has(n)||(s||!c(n))&&(p(n,`${f}\n---\n\n${m}`,`utf-8`),d.add(n))}}d.size>0&&console.log(` Instruction files: ${[...d].join(`, `)}`)}async function E(e){let n=t;console.log(`Initializing user-level KB installation...
|
|
2
|
+
`);let r=_();l(r,{recursive:!0}),console.log(` Global data store: ${r}`),v({version:1,workspaces:{}}),console.log(` Created registry.json`);let i=b();if(i.length===0)console.log(`
|
|
3
|
+
No supported IDEs detected. You can manually add the MCP server config.`);else{console.log(`\n Detected ${i.length} IDE(s):`);for(let t of i)x(t,n,e.force),C(t,e.force)}let a=h(m(g(import.meta.url)),`..`,`..`,`..`,`..`,`..`);console.log(`
|
|
4
|
+
Installing scaffold files:`),T(a,i,n,e.force),console.log(`
|
|
5
5
|
User-level KB installation complete!`),console.log(`
|
|
6
|
-
Next steps:`),console.log(` 1. Open any workspace in your IDE`),console.log(` 2. The KB server will auto-start and index the workspace`),console.log(` 3. Agents, prompts, skills & instructions are available globally`),console.log(` 4. No per-workspace init needed — just open a project and start coding`)}export{
|
|
6
|
+
Next steps:`),console.log(` 1. Open any workspace in your IDE`),console.log(` 2. The KB server will auto-start and index the workspace`),console.log(` 3. Agents, prompts, skills & instructions are available globally`),console.log(` 4. No per-workspace init needed — just open a project and start coding`)}export{b as detectInstalledIdes,E as initUser,T as installGlobalScaffold,x as writeUserLevelMcpConfig,C as writeVscodeSettings};
|
|
@@ -21,7 +21,7 @@ import { AGENT_BODIES } from '../definitions/bodies.mjs';
|
|
|
21
21
|
import { MODELS, VARIANT_GROUPS } from '../definitions/models.mjs';
|
|
22
22
|
import { PROMPTS } from '../definitions/prompts.mjs';
|
|
23
23
|
import { PROTOCOLS } from '../definitions/protocols.mjs';
|
|
24
|
-
import { IDE_CAPABILITIES
|
|
24
|
+
import { IDE_CAPABILITIES } from '../definitions/tools.mjs';
|
|
25
25
|
|
|
26
26
|
// ─── Copilot tool mapping ─────────────────────────────────────────────────
|
|
27
27
|
|
|
@@ -52,8 +52,9 @@ const COPILOT_TOOL_MAP = {
|
|
|
52
52
|
function buildToolsYaml(toolRole) {
|
|
53
53
|
const capabilities = IDE_CAPABILITIES[toolRole] || [];
|
|
54
54
|
const copilotTools = capabilities.map((cap) => COPILOT_TOOL_MAP[cap]).filter(Boolean);
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
// Use server wildcard instead of listing all 64 tools individually.
|
|
56
|
+
// VS Code expands `<server-name>/*` to all tools from that MCP server.
|
|
57
|
+
return `[${[...copilotTools, 'knowledge-base/*'].join(', ')}]`;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
function copilotModel(agentName) {
|
|
@@ -99,6 +100,10 @@ function generateVariantAgent(roleName, suffix, def) {
|
|
|
99
100
|
|
|
100
101
|
const extra = def.extraBody ? `\n\n${def.extraBody}` : '';
|
|
101
102
|
|
|
103
|
+
const skillsSection = def.skills?.length
|
|
104
|
+
? `\n\n## Skills (load on demand)\n\n| Skill | When to load |\n|-------|--------------|\n${def.skills.map(([s, w]) => `| ${s} | ${w} |`).join('\n')}`
|
|
105
|
+
: '';
|
|
106
|
+
|
|
102
107
|
const titleMap = {
|
|
103
108
|
Researcher: 'The Context Gatherer',
|
|
104
109
|
'Code-Reviewer': 'The Quality Guardian',
|
|
@@ -115,7 +120,7 @@ model: ${model}
|
|
|
115
120
|
# ${fullName} - ${title}
|
|
116
121
|
|
|
117
122
|
You are **${fullName}**${identity}${extra}
|
|
118
|
-
${sharedRef}
|
|
123
|
+
${sharedRef}${skillsSection}
|
|
119
124
|
`;
|
|
120
125
|
}
|
|
121
126
|
|
|
@@ -106,6 +106,11 @@ export const AGENTS = {
|
|
|
106
106
|
toolRole: 'researcher',
|
|
107
107
|
sharedBase: 'researcher-base',
|
|
108
108
|
category: 'research',
|
|
109
|
+
skills: [
|
|
110
|
+
['`lesson-learned`', 'When analyzing past changes to extract engineering principles'],
|
|
111
|
+
['`c4-architecture`', 'When researching system architecture \u2014 produce C4 diagrams'],
|
|
112
|
+
['`adr-skill`', 'When the research involves a technical decision \u2014 draft an ADR'],
|
|
113
|
+
],
|
|
109
114
|
variants: {
|
|
110
115
|
Alpha: {
|
|
111
116
|
description: 'Primary deep research agent — also serves as default Researcher',
|
|
@@ -153,6 +158,13 @@ export const AGENTS = {
|
|
|
153
158
|
toolRole: 'reviewer',
|
|
154
159
|
sharedBase: 'architect-reviewer-base',
|
|
155
160
|
category: 'review',
|
|
161
|
+
skills: [
|
|
162
|
+
['`c4-architecture`', 'When reviewing architectural diagrams or boundary changes'],
|
|
163
|
+
[
|
|
164
|
+
'`adr-skill`',
|
|
165
|
+
'When the review involves architecture decisions \u2014 reference or create ADRs',
|
|
166
|
+
],
|
|
167
|
+
],
|
|
156
168
|
extraBody:
|
|
157
169
|
'You are **not** the Code-Reviewer agent. Code-Reviewer handles correctness, testing, security, and code quality. You handle the big picture: service boundaries, dependency direction, pattern adherence, and structural health.',
|
|
158
170
|
variants: {
|
|
@@ -74,7 +74,15 @@ For each batch: Implement (parallel) → Code Review → Architecture Review (if
|
|
|
74
74
|
3. **Parallel when independent** — never serialize what can run simultaneously
|
|
75
75
|
4. **Route correctly** — brainstorming for design, decision protocol for technical choices
|
|
76
76
|
5. **Never proceed without user approval** at mandatory stops
|
|
77
|
-
6. **Max 2 retries** then escalate
|
|
77
|
+
6. **Max 2 retries** then escalate
|
|
78
|
+
|
|
79
|
+
## Skills (load on demand)
|
|
80
|
+
|
|
81
|
+
| Skill | When to load |
|
|
82
|
+
|-------|--------------|
|
|
83
|
+
| \`brainstorming\` | Before any creative/design work (Phase 0 Design Gate) |
|
|
84
|
+
| \`session-handoff\` | When context window is filling up, session ending, or major milestone completed |
|
|
85
|
+
| \`lesson-learned\` | After completing work — extract engineering principles and persist via \`remember\` |`,
|
|
78
86
|
|
|
79
87
|
Planner: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
|
|
80
88
|
|
|
@@ -110,7 +118,17 @@ For each batch: Implement (parallel) → Code Review → Architecture Review (if
|
|
|
110
118
|
**Open Questions** / **Risks**
|
|
111
119
|
\`\`\`
|
|
112
120
|
|
|
113
|
-
**🛑 MANDATORY STOP** — Wait for user approval before any implementation
|
|
121
|
+
**🛑 MANDATORY STOP** — Wait for user approval before any implementation.
|
|
122
|
+
|
|
123
|
+
## Skills (load on demand)
|
|
124
|
+
|
|
125
|
+
| Skill | When to load |
|
|
126
|
+
|-------|--------------|
|
|
127
|
+
| \`brainstorming\` | Before planning any new feature, component, or behavior change — use Visual Companion for architecture mockups |
|
|
128
|
+
| \`requirements-clarity\` | When requirements are vague or complex (>2 days) — score 0-100 before committing to a plan |
|
|
129
|
+
| \`c4-architecture\` | When the plan involves architectural changes — generate C4 diagrams |
|
|
130
|
+
| \`adr-skill\` | When the plan involves non-trivial technical decisions — create executable ADRs |
|
|
131
|
+
| \`session-handoff\` | When context window is filling up, planning session ending, or major milestone completed |`,
|
|
114
132
|
|
|
115
133
|
Implementer: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
|
|
116
134
|
|
|
@@ -191,7 +209,13 @@ For each batch: Implement (parallel) → Code Review → Architecture Review (if
|
|
|
191
209
|
- **Tests must pass at every step** — Never break behavior
|
|
192
210
|
- **Smaller is better** — Prefer many small refactors over one big one
|
|
193
211
|
- **Follow existing patterns** — Consolidate toward established conventions
|
|
194
|
-
- **Don't refactor what isn't asked** — Scope discipline
|
|
212
|
+
- **Don't refactor what isn't asked** — Scope discipline
|
|
213
|
+
|
|
214
|
+
## Skills (load on demand)
|
|
215
|
+
|
|
216
|
+
| Skill | When to load |
|
|
217
|
+
|-------|--------------|
|
|
218
|
+
| \`lesson-learned\` | After completing a refactor — extract principles from the before/after diff |`,
|
|
195
219
|
|
|
196
220
|
Security: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
|
|
197
221
|
|
|
@@ -248,7 +272,14 @@ For each batch: Implement (parallel) → Code Review → Architecture Review (if
|
|
|
248
272
|
|
|
249
273
|
- **Accuracy over completeness** — Better to be correct and concise than thorough and wrong
|
|
250
274
|
- **Examples always** — Every API docs section needs a code example
|
|
251
|
-
- **Keep it current** — Update docs with every code change
|
|
275
|
+
- **Keep it current** — Update docs with every code change
|
|
276
|
+
|
|
277
|
+
## Skills (load on demand)
|
|
278
|
+
|
|
279
|
+
| Skill | When to load |
|
|
280
|
+
|-------|--------------|
|
|
281
|
+
| \`c4-architecture\` | When documenting system architecture — generate C4 Mermaid diagrams |
|
|
282
|
+
| \`adr-skill\` | When documenting architecture decisions — create or update ADRs |`,
|
|
252
283
|
|
|
253
284
|
Explorer: `**Read \`AGENTS.md\`** in the workspace root for project conventions and KB protocol.
|
|
254
285
|
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
* maps these to its own format (e.g., Copilot tool identifiers).
|
|
7
7
|
*
|
|
8
8
|
* When KB adds/removes a tool, update `kb` here — all agents pick it up.
|
|
9
|
+
*
|
|
10
|
+
* NOTE: The copilot adapter currently uses `knowledge-base/*` wildcard instead
|
|
11
|
+
* of listing individual tools. This array is kept as a reference and for future
|
|
12
|
+
* adapters that may need explicit tool lists (e.g., claude-code).
|
|
9
13
|
*/
|
|
10
14
|
|
|
11
15
|
export const KB_TOOLS = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Primary architecture reviewer'
|
|
3
3
|
argument-hint: Files, PR, or subsystem to architecture-review
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: GPT-5.4 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Architecture reviewer variant — different LLM perspective for dual review'
|
|
3
3
|
argument-hint: Files, PR, or subsystem to architecture-review
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: Claude Opus 4.6 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Primary code reviewer'
|
|
3
3
|
argument-hint: File path, PR, or code to review
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: GPT-5.4 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Code reviewer variant — different LLM perspective for dual review'
|
|
3
3
|
argument-hint: File path, PR, or code to review
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: Claude Opus 4.6 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Expert debugger that diagnoses issues, traces errors, and provides solutions'
|
|
3
3
|
argument-hint: Error message, stack trace, or description of issue
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalSelection, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalSelection, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, knowledge-base/*]
|
|
5
5
|
model: Claude Opus 4.6 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Documentation specialist that creates and maintains comprehensive project documentation'
|
|
3
3
|
argument-hint: Component, API, feature, or area to document
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: GPT-5.4 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -11,13 +11,6 @@ You are the **Documenter**, documentation specialist that creates and maintains
|
|
|
11
11
|
|
|
12
12
|
**Read `AGENTS.md`** in the workspace root for project conventions and KB protocol.
|
|
13
13
|
|
|
14
|
-
## Skills (load on demand)
|
|
15
|
-
|
|
16
|
-
| Skill | When to load |
|
|
17
|
-
|-------|--------------|
|
|
18
|
-
| `c4-architecture` | When documenting system architecture — generate C4 Mermaid diagrams |
|
|
19
|
-
| `adr-skill` | When documenting architecture decisions — create or update ADRs |
|
|
20
|
-
|
|
21
14
|
## Documentation Protocol
|
|
22
15
|
|
|
23
16
|
1. **KB Recall** — Search for existing docs, conventions, architecture decisions
|
|
@@ -40,3 +33,10 @@ You are the **Documenter**, documentation specialist that creates and maintains
|
|
|
40
33
|
- **Accuracy over completeness** — Better to be correct and concise than thorough and wrong
|
|
41
34
|
- **Examples always** — Every API docs section needs a code example
|
|
42
35
|
- **Keep it current** — Update docs with every code change
|
|
36
|
+
|
|
37
|
+
## Skills (load on demand)
|
|
38
|
+
|
|
39
|
+
| Skill | When to load |
|
|
40
|
+
|-------|--------------|
|
|
41
|
+
| `c4-architecture` | When documenting system architecture — generate C4 Mermaid diagrams |
|
|
42
|
+
| `adr-skill` | When documenting architecture decisions — create or update ADRs |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Rapid codebase exploration to find files, usages, dependencies, and structural context'
|
|
3
3
|
argument-hint: Find files, usages, and context related to: {topic or goal}
|
|
4
|
-
tools: [read/problems, read/readFile, search/changes, search/codebase, search/usages, search/fileSearch, search/listDirectory, search/textSearch, knowledge-base
|
|
4
|
+
tools: [read/problems, read/readFile, search/changes, search/codebase, search/usages, search/fileSearch, search/listDirectory, search/textSearch, knowledge-base/*]
|
|
5
5
|
model: Gemini 3 Flash (Preview) (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'UI/UX specialist for React, styling, responsive design, and frontend implementation'
|
|
3
3
|
argument-hint: UI component, styling task, or frontend feature
|
|
4
|
-
tools: [execute/createAndRunTask, execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, todo, knowledge-base
|
|
4
|
+
tools: [execute/createAndRunTask, execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, todo, knowledge-base/*]
|
|
5
5
|
model: Gemini 3.1 Pro (Preview) (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Persistent implementation agent that writes code following TDD practices until all tasks are complete'
|
|
3
3
|
argument-hint: Implementation task, feature, or phase from plan
|
|
4
|
-
tools: [execute/createAndRunTask, execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, todo, knowledge-base
|
|
4
|
+
tools: [execute/createAndRunTask, execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, todo, knowledge-base/*]
|
|
5
5
|
model: GPT-5.4 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Master conductor that orchestrates the full development lifecycle: Planning → Implementation → Review → Recovery → Commit'
|
|
3
|
-
tools: [vscode/memory, vscode/runCommand, vscode/switchAgent, execute/killTerminal, execute/createAndRunTask, execute/runInTerminal, read/terminalSelection, read/terminalLastCommand, read/problems, read/readFile, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, todo, search/searchResults, search/textSearch, knowledge-base
|
|
3
|
+
tools: [vscode/memory, vscode/runCommand, vscode/switchAgent, execute/killTerminal, execute/createAndRunTask, execute/runInTerminal, read/terminalSelection, read/terminalLastCommand, read/problems, read/readFile, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, todo, search/searchResults, search/textSearch, knowledge-base/*]
|
|
4
4
|
model: Claude Opus 4.6 (copilot)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -15,14 +15,6 @@ You are the **Orchestrator**, master conductor that orchestrates the full develo
|
|
|
15
15
|
4. **Read _shared/forge-protocol.md** for the quality gate protocol.
|
|
16
16
|
5. **Use templates/adr-template.md** when writing Architecture Decision Records.
|
|
17
17
|
|
|
18
|
-
## Skills (load on demand)
|
|
19
|
-
|
|
20
|
-
| Skill | When to load |
|
|
21
|
-
|-------|--------------|
|
|
22
|
-
| `brainstorming` | Before any creative/design work (Phase 0 Design Gate) |
|
|
23
|
-
| `session-handoff` | When context window is filling up, session ending, or major milestone completed |
|
|
24
|
-
| `lesson-learned` | After completing work — extract engineering principles and persist via `remember` |
|
|
25
|
-
|
|
26
18
|
## Agent Arsenal
|
|
27
19
|
|
|
28
20
|
| Agent | Purpose | Model | Category |
|
|
@@ -102,3 +94,11 @@ For each batch: Implement (parallel) → Code Review → Architecture Review (if
|
|
|
102
94
|
4. **Route correctly** — brainstorming for design, decision protocol for technical choices
|
|
103
95
|
5. **Never proceed without user approval** at mandatory stops
|
|
104
96
|
6. **Max 2 retries** then escalate
|
|
97
|
+
|
|
98
|
+
## Skills (load on demand)
|
|
99
|
+
|
|
100
|
+
| Skill | When to load |
|
|
101
|
+
|-------|--------------|
|
|
102
|
+
| `brainstorming` | Before any creative/design work (Phase 0 Design Gate) |
|
|
103
|
+
| `session-handoff` | When context window is filling up, session ending, or major milestone completed |
|
|
104
|
+
| `lesson-learned` | After completing work — extract engineering principles and persist via `remember` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Autonomous planner that researches codebases and writes comprehensive TDD implementation plans'
|
|
3
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, todo, knowledge-base
|
|
3
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/createFile, edit/editFiles, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, todo, knowledge-base/*]
|
|
4
4
|
model: Claude Opus 4.6 (copilot)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -12,16 +12,6 @@ You are the **Planner**, autonomous planner that researches codebases and writes
|
|
|
12
12
|
|
|
13
13
|
**Read _shared/code-agent-base.md NOW** — it contains KB recall, FORGE, and handoff protocols.
|
|
14
14
|
|
|
15
|
-
## Skills (load on demand)
|
|
16
|
-
|
|
17
|
-
| Skill | When to load |
|
|
18
|
-
|-------|--------------|
|
|
19
|
-
| `brainstorming` | Before planning any new feature, component, or behavior change — use Visual Companion for architecture mockups |
|
|
20
|
-
| `requirements-clarity` | When requirements are vague or complex (>2 days) — score 0-100 before committing to a plan |
|
|
21
|
-
| `c4-architecture` | When the plan involves architectural changes — generate C4 diagrams |
|
|
22
|
-
| `adr-skill` | When the plan involves non-trivial technical decisions — create executable ADRs |
|
|
23
|
-
| `session-handoff` | When context window is filling up, planning session ending, or major milestone completed |
|
|
24
|
-
|
|
25
15
|
## Planning Workflow
|
|
26
16
|
|
|
27
17
|
1. **KB Recall** — Search for past plans, architecture decisions, known patterns
|
|
@@ -53,3 +43,13 @@ You are the **Planner**, autonomous planner that researches codebases and writes
|
|
|
53
43
|
```
|
|
54
44
|
|
|
55
45
|
**🛑 MANDATORY STOP** — Wait for user approval before any implementation.
|
|
46
|
+
|
|
47
|
+
## Skills (load on demand)
|
|
48
|
+
|
|
49
|
+
| Skill | When to load |
|
|
50
|
+
|-------|--------------|
|
|
51
|
+
| `brainstorming` | Before planning any new feature, component, or behavior change — use Visual Companion for architecture mockups |
|
|
52
|
+
| `requirements-clarity` | When requirements are vague or complex (>2 days) — score 0-100 before committing to a plan |
|
|
53
|
+
| `c4-architecture` | When the plan involves architectural changes — generate C4 diagrams |
|
|
54
|
+
| `adr-skill` | When the plan involves non-trivial technical decisions — create executable ADRs |
|
|
55
|
+
| `session-handoff` | When context window is filling up, planning session ending, or major milestone completed |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Code refactoring specialist that improves structure, readability, and maintainability'
|
|
3
3
|
argument-hint: Code, component, or pattern to refactor
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/editFiles, search/changes, search/codebase, search/usages, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, edit/editFiles, search/changes, search/codebase, search/usages, knowledge-base/*]
|
|
5
5
|
model: GPT-5.4 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -13,12 +13,6 @@ You are the **Refactor**, code refactoring specialist that improves structure, r
|
|
|
13
13
|
|
|
14
14
|
**Read _shared/code-agent-base.md NOW** — it contains KB recall, FORGE, and handoff protocols.
|
|
15
15
|
|
|
16
|
-
## Skills (load on demand)
|
|
17
|
-
|
|
18
|
-
| Skill | When to load |
|
|
19
|
-
|-------|--------------|
|
|
20
|
-
| `lesson-learned` | After completing a refactor — extract principles from the before/after diff |
|
|
21
|
-
|
|
22
16
|
## Refactoring Protocol
|
|
23
17
|
|
|
24
18
|
1. **KB Recall** — Search for established patterns and conventions
|
|
@@ -34,3 +28,9 @@ You are the **Refactor**, code refactoring specialist that improves structure, r
|
|
|
34
28
|
- **Smaller is better** — Prefer many small refactors over one big one
|
|
35
29
|
- **Follow existing patterns** — Consolidate toward established conventions
|
|
36
30
|
- **Don't refactor what isn't asked** — Scope discipline
|
|
31
|
+
|
|
32
|
+
## Skills (load on demand)
|
|
33
|
+
|
|
34
|
+
| Skill | When to load |
|
|
35
|
+
|-------|--------------|
|
|
36
|
+
| `lesson-learned` | After completing a refactor — extract principles from the before/after diff |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Primary deep research agent — also serves as default Researcher'
|
|
3
3
|
argument-hint: Research question, problem statement, or subsystem to investigate
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: Claude Opus 4.6 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Research variant for multi-model decision protocol — different LLM perspective'
|
|
3
3
|
argument-hint: Research question, problem statement, or subsystem to investigate
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: Claude Sonnet 4.6 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Research variant for multi-model decision protocol — different LLM perspective'
|
|
3
3
|
argument-hint: Research question, problem statement, or subsystem to investigate
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: Gemini 3.1 Pro (Preview) (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Research variant for multi-model decision protocol — different LLM perspective'
|
|
3
3
|
argument-hint: Research question, problem statement, or subsystem to investigate
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, read/terminalLastCommand, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: GPT-5.4 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: 'Security specialist that analyzes code for vulnerabilities and compliance'
|
|
3
3
|
argument-hint: Code, feature, or component to security review
|
|
4
|
-
tools: [execute/runInTerminal, read/problems, read/readFile, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base
|
|
4
|
+
tools: [execute/runInTerminal, read/problems, read/readFile, agent/runSubagent, search/changes, search/codebase, search/usages, web/fetch, web/githubRepo, cai-mcp/webFetch, cai-mcp/webSearch, ms-vscode.vscode-websearchforcopilot/websearch, knowledge-base/*]
|
|
5
5
|
model: Claude Opus 4.6 (copilot)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -40,24 +40,6 @@ You may be invoked in two modes:
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
-
## Tool Preference (BLOCKING — Use KB Tools Over Native Tools)
|
|
44
|
-
|
|
45
|
-
KB tools return **AST-analyzed structured data** — 10x fewer tokens than raw file reads. **Always prefer KB tools:**
|
|
46
|
-
|
|
47
|
-
| Instead of... | Use KB Tool |
|
|
48
|
-
|---------------|-------------|
|
|
49
|
-
| `read_file` (full file) | `file_summary` — exports, imports, call edges, 10x fewer tokens |
|
|
50
|
-
| `read_file` (section) | `compact({ path, query })` — server-side extract, 5-20x reduction |
|
|
51
|
-
| `grep_search` / `textSearch` | `search` — semantic + keyword hybrid |
|
|
52
|
-
| `grep_search` for symbol | `symbol` — definition + references with scope context |
|
|
53
|
-
| Multiple `read_file` | `digest` — compressed multi-source summary |
|
|
54
|
-
| Manual code tracing | `trace` — AST call-graph traversal |
|
|
55
|
-
| Line counting | `measure` — lines, complexity, cognitive complexity |
|
|
56
|
-
|
|
57
|
-
**Only use `read_file` as a last resort** when you need exact line content for editing.
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
43
|
## KB Learn (After Completing Work)
|
|
62
44
|
|
|
63
45
|
Before returning your handoff, persist discoveries to KB:
|
package/scaffold/generate.mjs
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Architecture:
|
|
11
11
|
* definitions/ — IDE-agnostic data (agents, models, tools, prompts, hooks, plugins)
|
|
12
12
|
* adapters/ — IDE-specific generators (copilot, claude-code)
|
|
13
|
-
*
|
|
13
|
+
* general/ — Generated output (agents, prompts) — `kb init` copies from here
|
|
14
|
+
*
|
|
15
|
+
* The copilot adapter writes directly to general/ since all IDEs currently
|
|
16
|
+
* consume the same VS Code-format .agent.md files. When a future adapter
|
|
17
|
+
* needs a different format, it gets its own output directory.
|
|
14
18
|
*/
|
|
15
19
|
|
|
16
20
|
import { existsSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
@@ -22,7 +26,7 @@ import { generateCopilot } from './adapters/copilot.mjs';
|
|
|
22
26
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
23
27
|
|
|
24
28
|
const ADAPTERS = {
|
|
25
|
-
copilot: { generate: generateCopilot, outDir: '
|
|
29
|
+
copilot: { generate: generateCopilot, outDir: 'general' },
|
|
26
30
|
'claude-code': { generate: generateClaudeCode, outDir: 'claude-code' },
|
|
27
31
|
};
|
|
28
32
|
|
|
@@ -45,9 +49,13 @@ for (const ide of idesToRun) {
|
|
|
45
49
|
|
|
46
50
|
const outDir = resolve(__dirname, adapter.outDir);
|
|
47
51
|
|
|
48
|
-
// Clean
|
|
49
|
-
if
|
|
50
|
-
|
|
52
|
+
// Clean only the subdirectories the generator manages (agents/, prompts/).
|
|
53
|
+
// This avoids wiping hand-maintained files if they coexist in general/.
|
|
54
|
+
for (const subdir of ['agents', 'prompts']) {
|
|
55
|
+
const sub = resolve(outDir, subdir);
|
|
56
|
+
if (existsSync(sub)) {
|
|
57
|
+
rmSync(sub, { recursive: true });
|
|
58
|
+
}
|
|
51
59
|
}
|
|
52
60
|
|
|
53
61
|
console.log(`\n─── Generating ${ide} scaffold ───`);
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
# Architecture Decision Record (ADR) Protocol
|
|
2
|
-
|
|
3
|
-
Captures **why** a decision was made so future agents and developers don't re-litigate resolved choices.
|
|
4
|
-
|
|
5
|
-
## When to Produce an ADR
|
|
6
|
-
|
|
7
|
-
| Trigger | Example |
|
|
8
|
-
|---------|---------|
|
|
9
|
-
| Multi-model decision protocol completes | 4 Researchers analyzed DB choice → user picked PostgreSQL |
|
|
10
|
-
| Brainstorming skill resolves a non-trivial technical choice | Advanced Mode escalated to decision protocol, user approved |
|
|
11
|
-
| User explicitly overrides a multi-model recommendation | Researchers recommended approach A, user chose B |
|
|
12
|
-
| A prior ADR is being superseded or deprecated | New constraint invalidates DR-003 |
|
|
13
|
-
|
|
14
|
-
**Do NOT create an ADR for:** routine implementation choices, formatting preferences, or anything that doesn't affect architecture, contracts, or cross-cutting concerns.
|
|
15
|
-
|
|
16
|
-
## Process
|
|
17
|
-
|
|
18
|
-
### 1. Gather inputs
|
|
19
|
-
After decision protocol synthesis (or user override), collect:
|
|
20
|
-
- The original question framed to Researchers
|
|
21
|
-
- Each Researcher's recommendation + key reasoning
|
|
22
|
-
- Agreement/disagreement map
|
|
23
|
-
- The user's final choice and rationale
|
|
24
|
-
|
|
25
|
-
### 2. Determine numbering
|
|
26
|
-
- Find the highest existing `DR-NNN` in `docs/decisions/`
|
|
27
|
-
- Increment by 1
|
|
28
|
-
- If no existing ADRs, start at `DR-001`
|
|
29
|
-
|
|
30
|
-
### 3. Write the ADR
|
|
31
|
-
- Create `docs/decisions/DR-NNN-<slug>.md` using the template below
|
|
32
|
-
- Use a slug derived from the short title (lowercase, hyphens, no special chars)
|
|
33
|
-
- Set status to **Accepted** (or **Proposed** if pending user confirmation)
|
|
34
|
-
|
|
35
|
-
### 4. Persist to KB
|
|
36
|
-
```
|
|
37
|
-
remember({
|
|
38
|
-
title: "DR-NNN: <Short Title>",
|
|
39
|
-
content: "<1-2 sentence summary of what was decided and why>",
|
|
40
|
-
category: "decisions"
|
|
41
|
-
})
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 5. Commit
|
|
45
|
-
- Commit the ADR file with message: `docs: add DR-NNN <short title>`
|
|
46
|
-
- ADRs are append-only — never delete, only supersede or deprecate
|
|
47
|
-
|
|
48
|
-
## Lifecycle
|
|
49
|
-
|
|
50
|
-
| Status | Meaning |
|
|
51
|
-
|--------|---------|
|
|
52
|
-
| **Proposed** | Under discussion, not yet binding |
|
|
53
|
-
| **Accepted** | Active and binding — follow this decision |
|
|
54
|
-
| **Deprecated** | No longer relevant (context changed), but not replaced |
|
|
55
|
-
| **Superseded** | Replaced by a newer ADR — link to successor |
|
|
56
|
-
| **Rejected** | Considered and explicitly declined |
|
|
57
|
-
|
|
58
|
-
To supersede: create the new ADR, add "Supersedes DR-NNN" to its Context, and update the old ADR's status to `Superseded by DR-MMM`.
|
|
59
|
-
|
|
60
|
-
## Template
|
|
61
|
-
|
|
62
|
-
```markdown
|
|
63
|
-
# DR-NNN: {Short Title}
|
|
64
|
-
|
|
65
|
-
**Status:** Proposed | Accepted | Rejected | Deprecated | Superseded
|
|
66
|
-
**Date:** YYYY-MM-DD
|
|
67
|
-
**Participants:** {which Researcher variants participated}
|
|
68
|
-
|
|
69
|
-
## Context
|
|
70
|
-
{What is the issue? Why are we making this decision?}
|
|
71
|
-
{If superseding, link: "Supersedes DR-NNN."}
|
|
72
|
-
|
|
73
|
-
## Decision
|
|
74
|
-
{What was decided and why — 2-5 sentences max}
|
|
75
|
-
|
|
76
|
-
## Decision Analysis Summary
|
|
77
|
-
| Model | Recommendation | Key Reasoning |
|
|
78
|
-
|-------|---------------|---------------|
|
|
79
|
-
|
|
80
|
-
**Agreements:** {what 3+ models agreed on}
|
|
81
|
-
**Disagreements:** {where they diverged}
|
|
82
|
-
|
|
83
|
-
## Consequences
|
|
84
|
-
**Positive:** {benefits}
|
|
85
|
-
**Negative:** {trade-offs accepted}
|
|
86
|
-
**Risks:** {what could go wrong, and any mitigations}
|
|
87
|
-
|
|
88
|
-
## Alternatives Considered
|
|
89
|
-
{Other approaches evaluated and why they were rejected — keeps the "why not" alongside the "why"}
|
|
90
|
-
```
|
|
91
|
-
|