@vpxa/aikit 0.1.209 → 0.1.211

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 (53) hide show
  1. package/package.json +1 -1
  2. package/packages/cli/dist/index.js +13 -13
  3. package/packages/core/dist/index.d.ts +2 -0
  4. package/packages/server/dist/auth-Bz5dmZgR.js +1 -0
  5. package/packages/server/dist/bin.js +12 -6
  6. package/packages/server/dist/config-C4mVyqAF.js +2 -0
  7. package/packages/server/dist/config-jGZ91cRx.js +1 -0
  8. package/packages/server/dist/curated-manager-D1u5qOwK.js +7 -0
  9. package/packages/server/dist/evolution-9hXRopDC.js +3 -0
  10. package/packages/server/dist/evolution-DJhTM6nu.js +2 -0
  11. package/packages/server/dist/index.d.ts +28 -1
  12. package/packages/server/dist/index.js +1 -1
  13. package/packages/server/dist/lessons-B05P_TOl.js +3 -0
  14. package/packages/server/dist/lessons-D7sdHa2e.js +2 -0
  15. package/packages/server/dist/promotion-Bd_YB7E1.js +3 -0
  16. package/packages/server/dist/promotion-OY53YCsT.js +2 -0
  17. package/packages/server/dist/proxy.js +1 -1
  18. package/packages/server/dist/replay-interceptor-CGLyom5f.js +7 -0
  19. package/packages/server/dist/retention-B4ITAs7F.js +1 -0
  20. package/packages/server/dist/retention-C3tsarCT.js +2 -0
  21. package/packages/server/dist/rolldown-runtime-DT7IzrpZ.js +1 -0
  22. package/packages/server/dist/{server-BhQwVWsr.js → server-DGu2FgFO.js} +167 -145
  23. package/packages/server/dist/{server-BaMsrcyc.js → server-SleKFw4B.js} +168 -144
  24. package/packages/server/dist/supersession-9edUDEQ8.js +1 -0
  25. package/packages/server/dist/{version-check-BgHzxxCW.js → version-check-D_uN0n0Y.js} +1 -1
  26. package/packages/store/dist/index.js +30 -30
  27. package/packages/tools/dist/index.d.ts +9 -1
  28. package/packages/tools/dist/index.js +78 -79
  29. package/packages/tools/package.json +5 -5
  30. package/scaffold/dist/adapters/claude-code.mjs +10 -10
  31. package/scaffold/dist/adapters/copilot.mjs +17 -17
  32. package/scaffold/dist/adapters/hooks.mjs +1 -0
  33. package/scaffold/dist/definitions/bodies.mjs +20 -114
  34. package/scaffold/dist/definitions/exec-hooks.mjs +1 -0
  35. package/scaffold/dist/definitions/flows.mjs +81 -345
  36. package/scaffold/dist/definitions/protocols.mjs +21 -4
  37. package/scaffold/dist/definitions/skills/aikit.mjs +35 -55
  38. package/scaffold/dist/definitions/skills/lesson-learned.mjs +46 -0
  39. package/scaffold/general/hooks/scripts/_runtime.mjs +161 -0
  40. package/scaffold/general/hooks/scripts/post-edit-check.mjs +36 -0
  41. package/scaffold/general/hooks/scripts/pre-compact-save.mjs +13 -0
  42. package/scaffold/general/hooks/scripts/privacy-guard.mjs +39 -0
  43. package/scaffold/general/hooks/scripts/scout-guard.mjs +45 -0
  44. package/scaffold/general/hooks/scripts/session-init.mjs +85 -0
  45. package/scaffold/general/hooks/scripts/session-learn.mjs +53 -0
  46. package/scaffold/general/hooks/scripts/session-observer.mjs +77 -0
  47. package/scaffold/general/hooks/scripts/subagent-context.mjs +59 -0
  48. package/packages/server/dist/auth-BfqgawfR.js +0 -1
  49. package/packages/server/dist/config-DAnAxrUW.js +0 -1
  50. package/packages/server/dist/config-PfoXsIC3.js +0 -2
  51. package/packages/server/dist/curated-manager-BnP6VqvL.js +0 -7
  52. package/packages/server/dist/supersession-BIV-v6JG.js +0 -3
  53. package/packages/server/dist/supersession-DJQGXMWm.js +0 -2
@@ -17,6 +17,11 @@
17
17
  "test": "vitest run"
18
18
  },
19
19
  "dependencies": {
20
+ "@aikit/analyzers": "workspace:*",
21
+ "@aikit/chunker": "workspace:*",
22
+ "@aikit/core": "workspace:*",
23
+ "@aikit/embeddings": "workspace:*",
24
+ "@aikit/store": "workspace:*",
20
25
  "diff": "^9.x",
21
26
  "gpt-tokenizer": "^3.x",
22
27
  "linkedom": "^0.x",
@@ -24,11 +29,6 @@
24
29
  "turndown": "^7.x"
25
30
  },
26
31
  "devDependencies": {
27
- "@aikit/analyzers": "workspace:*",
28
- "@aikit/chunker": "workspace:*",
29
- "@aikit/core": "workspace:*",
30
- "@aikit/embeddings": "workspace:*",
31
- "@aikit/store": "workspace:*",
32
32
  "@types/turndown": "^5.x"
33
33
  }
34
34
  }
@@ -1,11 +1,11 @@
1
- import{AGENTS as e}from"../definitions/agents.mjs";import{AGENT_BODIES as t}from"../definitions/bodies.mjs";import{HOOKS as n}from"../definitions/hooks.mjs";import{MCP_SERVER_ENTRY as r,SERVER_NAME as i}from"../definitions/mcp.mjs";import{CLAUDE_MODELS as a}from"../definitions/models.mjs";import{PROMPTS as o}from"../definitions/prompts.mjs";import{PROTOCOLS as s}from"../definitions/protocols.mjs";import{AIKIT_TOOLS as c,CLAUDE_CODE_TOOL_MAP as l,IDE_CAPABILITIES as u}from"../definitions/tools.mjs";import{buildAgentTable as d,buildCompactAgentTable as f,buildHooksSection as p,buildMcpConfigJson as m,buildSkillsSection as h,lowerFirst as g}from"./_shared.mjs";const _=[`## Flows`,``,"This project uses aikit's pluggable flow system. Check flow status with the `flow` MCP tool.","If a flow is active, follow the current step's skill instructions. Advance with `flow({ action: 'step', advance: 'next' })`.","Use `flow({ action: 'list' })` to see available flows and `flow({ action: 'start', name, topic })` to begin one."].join(`
2
- `),v=[`## Flows`,``,"This project uses aikit's pluggable flow system. Check flow status with the `flow` MCP tool.","If a flow is active, follow the current step's skill instructions. Advance with `flow({ action: 'step', advance: 'next' })`.","Use `flow({ action: 'list' })` to see available flows and `flow({ action: 'start', name, topic })` to begin one."].join(`
3
- `),y=[`## Flows`,``,"This project uses aikit's pluggable flow system. Use `flow({ action: 'status' })` to check if a flow is active.",`If dispatched as part of a flow, your work contributes to the current step. Do NOT advance or manage the flow — the Orchestrator handles flow lifecycle.`].join(`
4
- `);function b(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-+|-+$/g,``).toLowerCase()}function x(e){return`"${String(e).replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function S(e){let t=(u[e]||[]).flatMap(e=>l[e]||[]),n=c.map(e=>`mcp__aikit__${e}`);return[...new Set([...t,...n])].sort((e,t)=>e.localeCompare(t))}function C(e,t){let n=[];return n.push(`# aikit ${e}`),n.push(``),t.description&&(n.push(`> ${t.description}`),n.push(``)),n.push(t.content.trim()),n.push(``),n.join(`
5
- `)}function w(e,n){let r=t[e];return typeof r==`function`?r(n):r||``}function T(e){let t=[];e.extraBody&&t.push(e.extraBody),e.sharedBase&&s[e.sharedBase]&&t.push(s[e.sharedBase]);for(let n of e.sharedProtocols||[])s[n]&&t.push(s[n]);return t}function E(){let t=[];for(let[n,r]of Object.entries(e)){if(r.variants){for(let[e,i]of Object.entries(r.variants))t.push({name:`${n}-${e}`,description:i.description||r.description});continue}t.push({name:n,description:r.description})}return t}function D(e){return E().map(({name:t,description:n})=>`- \`${e}/${t}.md\` — ${n}`).join(`
6
- `)}function O(t=d(e,a)){return[`# aikit — Claude Code Agents`,``,"This workspace keeps the root `CLAUDE.md` intentionally small. Full agent instructions are split into per-agent files under `.claude/agents/`.",``,`## MCP Server`,``,"Server name: `aikit`","Configured in `.mcp.json` (already done if scaffold was deployed).",``,`## Agents`,``,t,``,`## Agent Files`,``,D(`.claude/agents`),``,`## Commands`,``,"Slash commands live under `.claude/commands/`.",``,`## Session Protocol`,``,p(n),``].join(`
7
- `)}function k(){return[`# aikit — Claude Code Instructions`,``,"Detailed workspace instructions live in `AGENTS.md`.","Full sub-agent instructions live in `.claude/agents/`.","Slash commands live in `.claude/commands/`.","MCP server config lives in `.mcp.json`.",``,"Start with `AGENTS.md`, then open the specific sub-agent file you want to use.",``].join(`
8
- `)}function A(e,t,n,r){let i=S(t.toolRole),a=T(t),o=h(t.skills),s=e===`Orchestrator`?[_,v]:[y],c=[n,...a,t.bodyAddendum,o,...s].filter(Boolean).join(`
1
+ import{AGENTS as e}from"../definitions/agents.mjs";import{AGENT_BODIES as t}from"../definitions/bodies.mjs";import{HOOKS as n}from"../definitions/hooks.mjs";import{MCP_SERVER_ENTRY as r,SERVER_NAME as i}from"../definitions/mcp.mjs";import{CLAUDE_MODELS as a}from"../definitions/models.mjs";import{PROMPTS as o}from"../definitions/prompts.mjs";import{PROTOCOLS as s}from"../definitions/protocols.mjs";import{AIKIT_TOOLS as c,CLAUDE_CODE_TOOL_MAP as l,IDE_CAPABILITIES as u}from"../definitions/tools.mjs";import{buildAgentTable as d,buildCompactAgentTable as f,buildHooksSection as p,buildMcpConfigJson as m,buildSkillsSection as h,lowerFirst as g}from"./_shared.mjs";import{generateHooks as _}from"./hooks.mjs";const v=[`## Flows`,``,"This project uses aikit's pluggable flow system. Check flow status with the `flow` MCP tool.","If a flow is active, follow the current step's skill instructions. Advance with `flow({ action: 'step', advance: 'next' })`.","Use `flow({ action: 'list' })` to see available flows and `flow({ action: 'start', name, topic })` to begin one."].join(`
2
+ `),y=[`## Flows`,``,"This project uses aikit's pluggable flow system. Check flow status with the `flow` MCP tool.","If a flow is active, follow the current step's skill instructions. Advance with `flow({ action: 'step', advance: 'next' })`.","Use `flow({ action: 'list' })` to see available flows and `flow({ action: 'start', name, topic })` to begin one."].join(`
3
+ `),b=[`## Flows`,``,"This project uses aikit's pluggable flow system. Use `flow({ action: 'status' })` to check if a flow is active.",`If dispatched as part of a flow, your work contributes to the current step. Do NOT advance or manage the flow — the Orchestrator handles flow lifecycle.`].join(`
4
+ `);function x(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-+|-+$/g,``).toLowerCase()}function S(e){return`"${String(e).replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function C(e){let t=(u[e]||[]).flatMap(e=>l[e]||[]),n=c.map(e=>`mcp__aikit__${e}`);return[...new Set([...t,...n])].sort((e,t)=>e.localeCompare(t))}function w(e,t){let n=[];return n.push(`# aikit ${e}`),n.push(``),t.description&&(n.push(`> ${t.description}`),n.push(``)),n.push(t.content.trim()),n.push(``),n.join(`
5
+ `)}function T(e,n){let r=t[e];return typeof r==`function`?r(n):r||``}function E(e){let t=[];e.extraBody&&t.push(e.extraBody),e.sharedBase&&s[e.sharedBase]&&t.push(s[e.sharedBase]);for(let n of e.sharedProtocols||[])s[n]&&t.push(s[n]);return t}function D(){let t=[];for(let[n,r]of Object.entries(e)){if(r.variants){for(let[e,i]of Object.entries(r.variants))t.push({name:`${n}-${e}`,description:i.description||r.description});continue}t.push({name:n,description:r.description})}return t}function O(e){return D().map(({name:t,description:n})=>`- \`${e}/${t}.md\` — ${n}`).join(`
6
+ `)}function k(t=d(e,a)){return[`# aikit — Claude Code Agents`,``,"This workspace keeps the root `CLAUDE.md` intentionally small. Full agent instructions are split into per-agent files under `.claude/agents/`.",``,`## MCP Server`,``,"Server name: `aikit`","Configured in `.mcp.json` (already done if scaffold was deployed).",``,`## Agents`,``,t,``,`## Agent Files`,``,O(`.claude/agents`),``,`## Commands`,``,"Slash commands live under `.claude/commands/`.",``,`## Session Protocol`,``,p(n),``].join(`
7
+ `)}function A(){return[`# aikit — Claude Code Instructions`,``,"Detailed workspace instructions live in `AGENTS.md`.","Full sub-agent instructions live in `.claude/agents/`.","Slash commands live in `.claude/commands/`.","MCP server config lives in `.mcp.json`.",``,"Start with `AGENTS.md`, then open the specific sub-agent file you want to use.",``].join(`
8
+ `)}function j(e,t,n,r){let i=C(t.toolRole),a=E(t),o=h(t.skills),s=e===`Orchestrator`?[v,y]:[b],c=[n,...a,t.bodyAddendum,o,...s].filter(Boolean).join(`
9
9
 
10
- `).trim(),l=t.identity?`You are the **${e}**${t.identity}`:`You are the **${e}**, ${g(t.description)}.`,u=[`---`,`name: ${b(e)}`,`description: ${x(t.description)}`,`allowedTools:`,...i.map(e=>` - ${e}`),`---`,``,`# ${e} - ${t.title||e}`,``,l];return c&&u.push(``,c),u.push(``),u.join(`
11
- `)}function j(){let t=[],n=d(e,a),s=f(e);t.push({path:`.mcp.json`,content:`${m({serverName:i,mcpEntry:r,configKey:`mcpServers`})}\n`}),t.push({path:`CLAUDE.md`,content:k()}),t.push({path:`AGENTS.md`,content:O(n)});for(let[e,n]of Object.entries(o))t.push({path:`.claude/commands/aikit-${e}.md`,content:C(e,n)});for(let[r,i]of Object.entries(e)){let e=w(r,s);if(i.variants){for(let[a,o]of Object.entries(i.variants)){let s=`${r}-${a}`;t.push({path:`.claude/agents/${s}.md`,content:A(s,{...i,description:o.description||i.description,identity:o.identity,bodyAddendum:o.bodyAddendum},e,n)})}continue}t.push({path:`.claude/agents/${r}.md`,content:A(r,i,e,n)})}return t}export{_ as CLAUDE_FLOWS_SECTION,v as CLAUDE_ORCHESTRATOR_FLOW_ROUTING_SECTION,j as generateClaudeCode};
10
+ `).trim(),l=t.identity?`You are the **${e}**${t.identity}`:`You are the **${e}**, ${g(t.description)}.`,u=[`---`,`name: ${x(e)}`,`description: ${S(t.description)}`,`allowedTools:`,...i.map(e=>` - ${e}`),`---`,``,`# ${e} - ${t.title||e}`,``,l];return c&&u.push(``,c),u.push(``),u.join(`
11
+ `)}function M(){let t=[],n=d(e,a),s=f(e);t.push({path:`.mcp.json`,content:`${m({serverName:i,mcpEntry:r,configKey:`mcpServers`})}\n`}),t.push({path:`CLAUDE.md`,content:A()}),t.push({path:`AGENTS.md`,content:k(n)});let c=_(`claude`,`~/.copilot/hooks/scripts`);t.push(...c.map(e=>({path:e.path,content:e.content})));for(let[e,n]of Object.entries(o))t.push({path:`.claude/commands/aikit-${e}.md`,content:w(e,n)});for(let[r,i]of Object.entries(e)){let e=T(r,s);if(i.variants){for(let[a,o]of Object.entries(i.variants)){let s=`${r}-${a}`;t.push({path:`.claude/agents/${s}.md`,content:j(s,{...i,description:o.description||i.description,identity:o.identity,bodyAddendum:o.bodyAddendum},e,n)})}continue}t.push({path:`.claude/agents/${r}.md`,content:j(r,i,e,n)})}return t}export{v as CLAUDE_FLOWS_SECTION,y as CLAUDE_ORCHESTRATOR_FLOW_ROUTING_SECTION,M as generateClaudeCode};
@@ -1,46 +1,46 @@
1
- import{AGENTS as e}from"../definitions/agents.mjs";import{AGENT_BODIES as t}from"../definitions/bodies.mjs";import{COPILOT_MODELS as n,VARIANT_GROUPS as r}from"../definitions/models.mjs";import{PROMPTS as i}from"../definitions/prompts.mjs";import{PROTOCOLS as a,TEMPLATES as o}from"../definitions/protocols.mjs";import{IDE_CAPABILITIES as s}from"../definitions/tools.mjs";import{buildCompactAgentTable as c}from"./_shared.mjs";const l={terminal:`execute/runInTerminal`,problems:`read/problems`,readFile:`read/readFile`,lastCommand:`read/terminalLastCommand`,subagent:`agent/runSubagent`,createFile:`edit/createFile`,editFiles:`edit/editFiles`,rename:`edit/rename`,createDirectory:`edit/createDirectory`,search:`search/changes, search/codebase, search/usages`,web:`web/fetch, web/githubRepo`,todo:`todo`,memory:`vscode/memory`,newWorkspace:`vscode/newWorkspace`,reviewPlan:`vscode/reviewPlan`,askQuestions:`vscode/askQuestions`,resolveMemoryFileUri:`vscode/resolveMemoryFileUri`,runCommand:`vscode/runCommand`,switchAgent:`vscode/switchAgent`,killTerminal:`execute/killTerminal`,createTask:`execute/createAndRunTask`,terminalSel:`read/terminalSelection`,fileSearch:`search/fileSearch`,listDir:`search/listDirectory`,textSearch:`search/textSearch`,searchSubagent:`search/searchSubagent`};function u(e){return`[${[...(s[e]||[]).map(e=>l[e]).filter(Boolean),`aikit/*`].join(`, `)}]`}function d(e){let t=n[e];return t?Array.isArray(t)?t[0]||`Auto (copilot)`:t:`Auto (copilot)`}const f=[`## Flows`,``,"This project uses aikit's pluggable flow system. Check flow status with the `flow` MCP tool.","If a flow is active, follow the current step's skill instructions. Advance with `flow({ action: 'step', advance: 'next' })`.","Use `flow({ action: 'list' })` to see available flows and `flow({ action: 'start', name, topic })` to begin one."].join(`
2
- `),p=[`## Flows`,``,"This project uses aikit's pluggable flow system. Use `flow({ action: 'status' })` to check if a flow is active.",`If dispatched as part of a flow, your work contributes to the current step. Do NOT advance or manage the flow — the Orchestrator handles flow lifecycle.`].join(`
3
- `);function m(){let t=[];for(let[i,a]of Object.entries(e))if(a.variants)for(let e of r[i]||[]){let r=`${i}-${e}`,o=n[r]||n[i],s=Array.isArray(o)?o[0]:o||`Unknown`,c=(a.variants[e]||{}).description||a.description;t.push(`| **${r}** | ${c} | ${s} | ${a.category} |`)}else{let e=n[i],r=Array.isArray(e)?e[0]:e||`Unknown`;t.push(`| **${i}** | ${a.description} | ${r} | ${a.category} |`)}return`| Agent | Purpose | Model | Category |\n|-------|---------|-------|----------|\n${t.join(`
4
- `)}`}function h(e,t,n){let i=`${e}-${t}`,o=n.variants[t]||{},s=d(i),c=o.description||n.description,l=o.identity||(t===r[e]?.[0]?`, the primary ${e} agent.`:`, a variant of ${e}. Same responsibilities, different model perspective.`),f=n.sharedBase&&a[n.sharedBase]?`\n\n${a[n.sharedBase]}`:``,m=n.extraBody?`\n\n${n.extraBody}`:``,h=o.bodyAddendum?`\n\n${o.bodyAddendum}`:``,g=n.skills?.length?`\n\n## Skills (load on demand)\n\n| Skill | When to load |\n|-------|--------------|\n${n.skills.map(([e,t])=>`| ${e} | ${t} |`).join(`
1
+ import{AGENTS as e}from"../definitions/agents.mjs";import{AGENT_BODIES as t}from"../definitions/bodies.mjs";import{COPILOT_MODELS as n,VARIANT_GROUPS as r}from"../definitions/models.mjs";import{PROMPTS as i}from"../definitions/prompts.mjs";import{PROTOCOLS as a,TEMPLATES as o}from"../definitions/protocols.mjs";import{IDE_CAPABILITIES as s}from"../definitions/tools.mjs";import{buildCompactAgentTable as c}from"./_shared.mjs";import{generateHooks as l,getHookScriptFiles as u}from"./hooks.mjs";const d={terminal:`execute/runInTerminal`,problems:`read/problems`,readFile:`read/readFile`,lastCommand:`read/terminalLastCommand`,subagent:`agent/runSubagent`,createFile:`edit/createFile`,editFiles:`edit/editFiles`,rename:`edit/rename`,createDirectory:`edit/createDirectory`,search:`search/changes, search/codebase, search/usages`,web:`web/fetch, web/githubRepo`,todo:`todo`,memory:`vscode/memory`,newWorkspace:`vscode/newWorkspace`,reviewPlan:`vscode/reviewPlan`,askQuestions:`vscode/askQuestions`,resolveMemoryFileUri:`vscode/resolveMemoryFileUri`,runCommand:`vscode/runCommand`,switchAgent:`vscode/switchAgent`,killTerminal:`execute/killTerminal`,createTask:`execute/createAndRunTask`,terminalSel:`read/terminalSelection`,fileSearch:`search/fileSearch`,listDir:`search/listDirectory`,textSearch:`search/textSearch`,searchSubagent:`search/searchSubagent`};function f(e){return`[${[...(s[e]||[]).map(e=>d[e]).filter(Boolean),`aikit/*`].join(`, `)}]`}function p(e){let t=n[e];return t?Array.isArray(t)?t[0]||`Auto (copilot)`:t:`Auto (copilot)`}const m=[`## Flows`,``,"This project uses aikit's pluggable flow system. Check flow status with the `flow` MCP tool.","If a flow is active, follow the current step's skill instructions. Advance with `flow({ action: 'step', advance: 'next' })`.","Use `flow({ action: 'list' })` to see available flows and `flow({ action: 'start', name, topic })` to begin one."].join(`
2
+ `),h=[`## Flows`,``,"This project uses aikit's pluggable flow system. Use `flow({ action: 'status' })` to check if a flow is active.",`If dispatched as part of a flow, your work contributes to the current step. Do NOT advance or manage the flow — the Orchestrator handles flow lifecycle.`].join(`
3
+ `);function g(){let t=[];for(let[i,a]of Object.entries(e))if(a.variants)for(let e of r[i]||[]){let r=`${i}-${e}`,o=n[r]||n[i],s=Array.isArray(o)?o[0]:o||`Unknown`,c=(a.variants[e]||{}).description||a.description;t.push(`| **${r}** | ${c} | ${s} | ${a.category} |`)}else{let e=n[i],r=Array.isArray(e)?e[0]:e||`Unknown`;t.push(`| **${i}** | ${a.description} | ${r} | ${a.category} |`)}return`| Agent | Purpose | Model | Category |\n|-------|---------|-------|----------|\n${t.join(`
4
+ `)}`}function _(e,t,n){let i=`${e}-${t}`,o=n.variants[t]||{},s=p(i),c=o.description||n.description,l=o.identity||(t===r[e]?.[0]?`, the primary ${e} agent.`:`, a variant of ${e}. Same responsibilities, different model perspective.`),u=n.sharedBase&&a[n.sharedBase]?`\n\n${a[n.sharedBase]}`:``,d=n.extraBody?`\n\n${n.extraBody}`:``,m=o.bodyAddendum?`\n\n${o.bodyAddendum}`:``,g=n.skills?.length?`\n\n## Skills (load on demand)\n\n| Skill | When to load |\n|-------|--------------|\n${n.skills.map(([e,t])=>`| ${e} | ${t} |`).join(`
5
5
  `)}`:``,_=n.title||e;return`---
6
6
  description: '${c}'
7
- ${n.argumentHint?`argument-hint: "${n.argumentHint}"\n`:``}tools: ${u(n.toolRole)}
7
+ ${n.argumentHint?`argument-hint: "${n.argumentHint}"\n`:``}tools: ${f(n.toolRole)}
8
8
  model: ${s}
9
9
  ---
10
10
 
11
11
  # ${i} - ${_}
12
12
 
13
- You are **${i}**${l}${m}
14
- ${f}${h}${g}
13
+ You are **${i}**${l}${d}
14
+ ${u}${m}${g}
15
15
 
16
- ${p}
17
- `}function g(n,r){let i=d(n),o=typeof t[n]==`function`?t[n](c(e)):t[n]||``,s=r.sharedBase&&a[r.sharedBase]?`\n\n${a[r.sharedBase]}`:``,l=(r.sharedProtocols||[]).map(e=>a[e]?`\n\n${a[e]}`:``).join(``),m=r.title||n,h=r.skills?.length?`\n## Skills (load on demand)\n\n| Skill | When to load |\n|-------|--------------|\n${r.skills.map(([e,t])=>`| ${e} | ${t} |`).join(`
16
+ ${h}
17
+ `}function v(n,r){let i=p(n),o=typeof t[n]==`function`?t[n](c(e)):t[n]||``,s=r.sharedBase&&a[r.sharedBase]?`\n\n${a[r.sharedBase]}`:``,l=(r.sharedProtocols||[]).map(e=>a[e]?`\n\n${a[e]}`:``).join(``),u=r.title||n,d=r.skills?.length?`\n## Skills (load on demand)\n\n| Skill | When to load |\n|-------|--------------|\n${r.skills.map(([e,t])=>`| ${e} | ${t} |`).join(`
18
18
  `)}\n`:``;return`---
19
19
  description: '${r.description}'
20
- ${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${u(r.toolRole)}
20
+ ${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${f(r.toolRole)}
21
21
  model: ${i}
22
22
  ---
23
23
 
24
- # ${n} - ${m}
24
+ # ${n} - ${u}
25
25
 
26
26
  You are the **${n}**, ${r.description.toLowerCase().replace(/^./,e=>e.toLowerCase())}
27
27
 
28
- ${o}${s}${l}${h}
28
+ ${o}${s}${l}${d}
29
29
 
30
- ${n===`Orchestrator`?f:p}
31
- `}function _(e,t){return`---
30
+ ${n===`Orchestrator`?m:h}
31
+ `}function y(e,t){return`---
32
32
  description: "${t.description}"
33
33
  agent: "${t.agent}"
34
34
  ---
35
35
 
36
36
  ${t.content}
37
- `}function v(){return`# Agents
37
+ `}function b(){return`# Agents
38
38
 
39
39
  This directory contains AI agent definitions generated by \`@vpxa/aikit init\`.
40
40
 
41
41
  ## Agent Roster
42
42
 
43
- ${m()}
43
+ ${g()}
44
44
 
45
45
  ## Multi-Model Pattern
46
46
 
@@ -73,4 +73,4 @@ To regenerate after changing models or agent definitions:
73
73
  cd knowledge-base
74
74
  node scaffold/generate.mjs
75
75
  \`\`\`
76
- `}function y(){let t=[];for(let[n,i]of Object.entries(e))if(i.variants)for(let e of r[n]||[])t.push({path:`agents/${n}-${e}.agent.md`,content:h(n,e,i)});else t.push({path:`agents/${n}.agent.md`,content:g(n,i)});for(let[e,n]of Object.entries(a))t.push({path:`agents/_shared/${e}.md`,content:`${n}\n`});for(let[e,n]of Object.entries(o))t.push({path:`agents/templates/${e}.md`,content:`${n}\n`});t.push({path:`agents/README.md`,content:v()});for(let[e,n]of Object.entries(i))t.push({path:`prompts/aikit-${e}.prompt.md`,content:_(e,n)});return t}export{y as generateCopilot};
76
+ `}function x(){let t=[];if(u().length===0)throw Error(`Executable hooks are not configured.`);for(let[n,i]of Object.entries(e))if(i.variants)for(let e of r[n]||[])t.push({path:`agents/${n}-${e}.agent.md`,content:_(n,e,i)});else t.push({path:`agents/${n}.agent.md`,content:v(n,i)});for(let[e,n]of Object.entries(a))t.push({path:`agents/_shared/${e}.md`,content:`${n}\n`});for(let[e,n]of Object.entries(o))t.push({path:`agents/templates/${e}.md`,content:`${n}\n`});t.push({path:`agents/README.md`,content:b()});for(let[e,n]of Object.entries(i))t.push({path:`prompts/aikit-${e}.prompt.md`,content:y(e,n)});let n=l(`copilot`,`~/.copilot/hooks/scripts`);return t.push(...n.map(e=>({path:`hooks/${e.path}`,content:e.content}))),t}export{x as generateCopilot};
@@ -0,0 +1 @@
1
+ import{EXEC_HOOKS as e,HOOK_EVENTS as t,HOOK_TOOL_MATCHERS as n}from"../definitions/exec-hooks.mjs";const r={PreCompact:3e3,PostToolUse:3e3},i={copilot:`hooks.json`,claude:`hooks-settings.json`,copilotCli:`hooks.json`};function a(e,t){return(e.matcher||[]).flatMap(e=>{let r=n[e];if(!r)throw Error(`Unknown hook matcher: ${e}`);return r[t]||[]})}function o(e,t,n,i){let o=`${n}/${e.script}`;return a(e,i),i===`copilot`?{event:t,steps:[{type:`command`,command:`node`,args:[o],timeout:r[e.event]||5e3}]}:i===`claude`?{type:`command`,command:`node ${o}`}:{command:`node`,args:[o]}}function s(n,r){if(n===`copilot`){let a=Object.values(e).map(e=>{let i=t[e.event]?.[n];if(!i)throw Error(`Unsupported hook event ${e.event} for ${n}`);return o(e,i,r,n)});return[{path:i[n],content:JSON.stringify({hooks:a},null,2)}]}let a={};for(let i of Object.values(e)){let e=t[i.event]?.[n];if(!e)throw Error(`Unsupported hook event ${i.event} for ${n}`);a[e]||=[],a[e].push(o(i,e,r,n))}return[{path:i[n],content:JSON.stringify({hooks:a},null,2)}]}function c(){return[`_runtime.mjs`,...Object.values(e).map(e=>e.script)]}export{s as generateHooks,c as getHookScriptFiles};
@@ -1,4 +1,4 @@
1
- const e=()=>"**`AGENTS.md` is already in your context** — do NOT re-read it. Just load the `aikit` skill.\n\nLoad the `aikit` skill for full tool documentation, workflow chains, and session protocol.",t={Orchestrator:e=>`You orchestrate the full development lifecycle: **planning → implementation → review → recovery → commit**. You own the contract — what gets done, in what order, by whom. The \`multi-agents-development\` skill owns the craft — how to decompose, dispatch, and review. **Load that skill before any delegation work.**
1
+ import{postTaskLesson as e,preTaskKnowledgeRecall as t}from"./protocols.mjs";const n=()=>``,r={Orchestrator:e=>`You orchestrate the full development lifecycle: **planning → implementation → review → recovery → commit**. You own the contract — what gets done, in what order, by whom. The \`multi-agents-development\` skill owns the craft — how to decompose, dispatch, and review. **Load that skill before any delegation work.**
2
2
 
3
3
  ## Bootstrap (before any work)
4
4
 
@@ -332,7 +332,8 @@ When a subagent reports \`NEEDS_CONTEXT\` with an access failure:
332
332
  ### Start
333
333
 
334
334
  1. \`flow({ action: 'status' })\` → if active, \`flow({ action: 'read' })\` and follow current step; skip remaining start steps.
335
- 2. If no active flow: \`status({})\` → \`flow({ action: 'list' })\` → \`search({ query: "SESSION CHECKPOINT", origin: "curated" })\` → select flow → \`flow({ action: 'start', name, topic })\`.
335
+ 2. If no active flow: \`status({ includePrelude: true })\` → \`flow({ action: 'list' })\` → \`search({ query: "SESSION CHECKPOINT", origin: "curated" })\` → select flow → \`flow({ action: 'start', name, topic })\`.
336
+ - Prelude returns top 3 lessons + top 2 conventions + last checkpoint alongside normal status.
336
337
 
337
338
  ### During
338
339
 
@@ -363,7 +364,7 @@ After any \`status()\` call, check the \`contextPressure\` value (0-100):
363
364
  This project uses aikit's pluggable flow system. Check flow status with the \`flow\` MCP tool.
364
365
  If a flow is active, follow the current step's instructions. Advance with \`flow({ action: 'step', advance: 'next' })\`.
365
366
  Use \`flow({ action: 'list' })\` to see available flows and \`flow({ action: 'start', name, topic })\` to begin one.
366
- `,Planner:`${e()}
367
+ `,Planner:`${n()}
367
368
 
368
369
  > **Reminder:** Follow ## MANDATORY FIRST ACTION from your shared base protocol.
369
370
 
@@ -440,9 +441,7 @@ The Planner is typically activated by the Orchestrator as part of a flow step (e
440
441
  | \`adr-skill\` | When the plan involves non-trivial technical decisions — create executable ADRs |
441
442
  | \`session-handoff\` | When context window is filling up, planning session ending, or major milestone completed |
442
443
  | \`repo-access\` | When the plan involves accessing private, enterprise, or self-hosted repositories |
443
- | \`browser-use\` | When the plan involves browser-based auth recovery, web scraping, or interacting with web applications that require login |`,Implementer:`${e()}
444
-
445
- > **HARD RULE:** NEVER use \`read_file\` to understand code. Use \`file_summary\`/\`compact\`/\`digest\`. \`read_file\` is ONLY for exact edit lines. NEVER use \`run_in_terminal\` for tsc/lint/test — use \`check({})\`/\`test_run({})\`.
444
+ | \`browser-use\` | When the plan involves browser-based auth recovery, web scraping, or interacting with web applications that require login |`,Implementer:`${n()}
446
445
 
447
446
  ## Implementation Protocol
448
447
 
@@ -471,22 +470,7 @@ The Planner is typically activated by the Orchestrator as part of a flow step (e
471
470
  4. **Estimate blast radius** — \`blast_radius({ path: ".", files: [...] })\` BEFORE editing when changing a public/shared symbol; re-run AFTER to confirm actual impact matches.
472
471
  5. **TDD when tests exist** — write/extend the failing test first, then minimum code to pass.
473
472
 
474
- ## Pre-Task: Knowledge Recall (MANDATORY)
475
-
476
- Before starting implementation, recall relevant lessons and conventions **scoped to your specific task**:
477
-
478
- \`\`\`
479
- // Extract 2-3 keywords from your assigned task
480
- knowledge({ action: "lesson", subAction: "list-lessons", topic: "<task keywords>", minConfidence: 70, limit: 3 })
481
- search({ query: "<task area> convention", category: "conventions", limit: 3 })
482
- \`\`\`
483
-
484
- **Rules:**
485
- - ALWAYS scope by topic — NEVER call \`list-lessons\` without \`topic\` param
486
- - ALWAYS limit results — \`limit: 3\` for search, \`minConfidence: 70\` for lessons
487
- - If recalled lessons apply → follow them, note which you followed in Status
488
- - If recalled lessons conflict → note the conflict in Status
489
- - Skip ONLY if task is pure config/formatting with zero logic
473
+ ${t({intro:`Before starting implementation, recall relevant lessons and conventions **scoped to your specific task**:`,commands:[`// Extract 2-3 keywords from your assigned task`,`knowledge({ action: "lesson", subAction: "list-lessons", topic: "<task keywords>", minConfidence: 70, limit: 3 })`,`search({ query: "<task area> convention", category: "conventions", limit: 3 })`],followUp:"**Rules:**\n- ALWAYS scope by topic — NEVER call `list-lessons` without `topic` param\n- ALWAYS limit results — `limit: 3` for search, `minConfidence: 70` for lessons\n- If recalled lessons apply → follow them, note which you followed in Status\n- If recalled lessons conflict → note the conflict in Status\n- Skip ONLY if task is pure config/formatting with zero logic"})}
490
474
 
491
475
  ## Post-Edit Checklist
492
476
 
@@ -494,18 +478,7 @@ search({ query: "<task area> convention", category: "conventions", limit: 3 })
494
478
  2. \`test_run({})\` — full suite or targeted pattern
495
479
  3. If Orchestrator passed a \`task_id\`: \`evidence_map({action:'add', task_id, claim, status:'V', receipt:'file.ts#Lxx'})\` for each verified contract/acceptance claim. Do NOT run the gate — Orchestrator owns it.
496
480
 
497
- ## Post-Task: Capture Lesson
498
-
499
- **HARD RULE:** Before reporting DONE status, load the \`lesson-learned\` skill and extract 1-2 engineering lessons from the changes made. Skip ONLY if changes are pure config/formatting with no logic modified.
500
-
501
- Quick lesson capture (when full skill feels heavy):
502
- \`\`\`
503
- knowledge({ action: "lesson", subAction: "create", context: "<what situation you faced>", insight: "<what principle the solution demonstrates>", evidence: "<file:line or commit that proves it>", confidence: 65 })
504
- \`\`\`
505
-
506
- **Confirm/Contradict (if pre-task recalled relevant lessons):**
507
- - Lesson proved correct → \`knowledge({ action: "lesson", subAction: "confirm", id: "<recalled-lesson-path>" })\`
508
- - Lesson was wrong/outdated → \`knowledge({ action: "lesson", subAction: "contradict", id: "<recalled-lesson-path>", evidence: "<what actually happened>" })\`
481
+ ${e()}
509
482
 
510
483
  ## Structured Output (MANDATORY)
511
484
 
@@ -532,9 +505,7 @@ Every implementation response MUST end with a structured status block:
532
505
  | Skill | When to load |
533
506
  |-------|--------------|
534
507
  | \`typescript\` | When implementing TypeScript code — type patterns, generics, utility types |
535
- | \`react\` | When implementing React components — hooks, patterns, Server Components |`,Frontend:`${e()}
536
-
537
- > **HARD RULE:** NEVER use \`read_file\` to understand code. Use \`file_summary\`/\`compact\`/\`digest\`. \`read_file\` is ONLY for exact edit lines. NEVER use \`run_in_terminal\` for tsc/lint/test — use \`check({})\`/\`test_run({})\`.
508
+ | \`react\` | When implementing React components — hooks, patterns, Server Components |`,Frontend:`${n()}
538
509
 
539
510
  ## Frontend Protocol
540
511
 
@@ -583,29 +554,9 @@ Every implementation response MUST end with a structured status block:
583
554
  If the pre-flight dev server cannot be started (e.g. sandbox), fall back to
584
555
  \`compact\` inspection of the component source + describe expected visual behavior.
585
556
 
586
- ## Pre-Task: Pattern Recall (MANDATORY)
587
-
588
- Before implementing UI work, check existing component patterns:
589
-
590
- \`\`\`
591
- search({ query: "<component/feature area> pattern", category: "conventions", limit: 3 })
592
- knowledge({ action: "lesson", subAction: "list-lessons", topic: "<UI area>", minConfidence: 70, limit: 3 })
593
- \`\`\`
594
-
595
- Follow discovered patterns for consistency. Note any patterns followed in Status.
596
-
597
- ## Post-Task: Capture Lesson
598
-
599
- **HARD RULE:** Before reporting DONE status, load the \`lesson-learned\` skill and extract 1-2 engineering lessons from the changes made. Skip ONLY if changes are pure config/formatting with no logic modified.
600
-
601
- Quick lesson capture (when full skill feels heavy):
602
- \`\`\`
603
- knowledge({ action: "lesson", subAction: "create", context: "<what situation you faced>", insight: "<what principle the solution demonstrates>", evidence: "<file:line or commit that proves it>", confidence: 65 })
604
- \`\`\`
557
+ ${t({title:`Pattern Recall`,intro:`Before implementing UI work, check existing component patterns:`,commands:[`search({ query: "<component/feature area> pattern", category: "conventions", limit: 3 })`,`knowledge({ action: "lesson", subAction: "list-lessons", topic: "<UI area>", minConfidence: 70, limit: 3 })`],followUp:`Follow discovered patterns for consistency. Note any patterns followed in Status.`})}
605
558
 
606
- **Confirm/Contradict (if pre-task recalled relevant lessons):**
607
- - Lesson proved correct → \`knowledge({ action: "lesson", subAction: "confirm", id: "<recalled-lesson-path>" })\`
608
- - Lesson was wrong/outdated → \`knowledge({ action: "lesson", subAction: "contradict", id: "<recalled-lesson-path>", evidence: "<what actually happened>" })\`
559
+ ${e()}
609
560
 
610
561
  ## Skills (load on demand)
611
562
 
@@ -614,9 +565,7 @@ knowledge({ action: "lesson", subAction: "create", context: "<what situation you
614
565
  | \`typescript\` | When implementing TypeScript code — type patterns, generics, utility types |
615
566
  | \`react\` | When implementing React components — hooks, patterns, Server Components |
616
567
  | \`frontend-design\` | When making visual/UX decisions — design tokens, typography, color, spacing |
617
- | \`browser-use\` | When needing to visually validate rendered UI in a browser |`,Debugger:`${e()}
618
-
619
- > **HARD RULE:** NEVER use \`read_file\` to understand code. Use \`file_summary\`/\`compact\`/\`digest\`. \`read_file\` is ONLY for exact edit lines. NEVER use \`run_in_terminal\` for tsc/lint/test — use \`check({})\`/\`test_run({})\`.
568
+ | \`browser-use\` | When needing to visually validate rendered UI in a browser |`,Debugger:`${n()}
620
569
 
621
570
  ## Debugging Protocol
622
571
 
@@ -694,38 +643,15 @@ When debugging tool invocation issues, use the replay audit trail with traceId:
694
643
  - Server middleware context (\`ctx.requestId\`)
695
644
  4. Filter by traceId: search replay.jsonl for the specific UUID to trace the full invocation lifecycle
696
645
 
697
- ## Pre-Task: Error Pattern Recall (MANDATORY)
698
-
699
- Before diagnosing, search for prior solutions to similar errors:
700
-
701
- \`\`\`
702
- // Use error message keywords or failing module name
703
- search({ query: "<error keywords or module name>", category: "context", limit: 3 })
704
- knowledge({ action: "lesson", subAction: "list-lessons", topic: "<error area>", minConfidence: 60, limit: 3 })
705
- \`\`\`
706
-
707
- If a prior fix exists for the same pattern → try it first before deep investigation.
708
-
709
- ## Post-Task: Capture Lesson
710
-
711
- **HARD RULE:** Before reporting DONE status, load the \`lesson-learned\` skill and extract 1-2 engineering lessons from the changes made. Skip ONLY if changes are pure config/formatting with no logic modified.
712
-
713
- Quick lesson capture (when full skill feels heavy):
714
- \`\`\`
715
- knowledge({ action: "lesson", subAction: "create", context: "<what situation you faced>", insight: "<what principle the solution demonstrates>", evidence: "<file:line or commit that proves it>", confidence: 65 })
716
- \`\`\`
646
+ ${t({title:`Error Pattern Recall`,intro:`Before diagnosing, search for prior solutions to similar errors:`,commands:[`// Use error message keywords or failing module name`,`search({ query: "<error keywords or module name>", category: "context", limit: 3 })`,`knowledge({ action: "lesson", subAction: "list-lessons", topic: "<error area>", minConfidence: 60, limit: 3 })`],followUp:`If a prior fix exists for the same pattern → try it first before deep investigation.`})}
717
647
 
718
- **Confirm/Contradict (if pre-task recalled relevant lessons):**
719
- - Lesson proved correct → \`knowledge({ action: "lesson", subAction: "confirm", id: "<recalled-lesson-path>" })\`
720
- - Lesson was wrong/outdated → \`knowledge({ action: "lesson", subAction: "contradict", id: "<recalled-lesson-path>", evidence: "<what actually happened>" })\`
648
+ ${e()}
721
649
 
722
650
  ## Skills (load on demand)
723
651
 
724
652
  | Skill | When to load |
725
653
  |-------|--------------|
726
- | \`typescript\` | When debugging TypeScript code — type narrowing, compiler errors |`,Refactor:`${e()}
727
-
728
- > **HARD RULE:** NEVER use \`read_file\` to understand code. Use \`file_summary\`/\`compact\`/\`digest\`. \`read_file\` is ONLY for exact edit lines. NEVER use \`run_in_terminal\` for tsc/lint/test — use \`check({})\`/\`test_run({})\`.
654
+ | \`typescript\` | When debugging TypeScript code — type narrowing, compiler errors |`,Refactor:`${n()}
729
655
 
730
656
  ## Refactoring Protocol
731
657
 
@@ -777,36 +703,16 @@ For multi-approach uncertainty (A vs B), do NOT create lanes. Instead:
777
703
  for read-only exploration and return a recommendation
778
704
  - You then apply the winning approach under the checkpoint protocol above
779
705
 
780
- ## Pre-Task: Convention Recall (MANDATORY)
781
-
782
- Before refactoring, check existing conventions for the target area:
783
-
784
- \`\`\`
785
- search({ query: "<module/pattern being refactored> convention", category: "conventions", limit: 3 })
786
- knowledge({ action: "lesson", subAction: "list-lessons", topic: "<refactor area>", minConfidence: 70, limit: 3 })
787
- \`\`\`
788
-
789
- Follow discovered conventions. Do NOT introduce patterns that contradict established conventions without surfacing the conflict.
790
-
791
- ## Post-Task: Capture Lesson
792
-
793
- **HARD RULE:** Before reporting DONE status, load the \`lesson-learned\` skill and extract 1-2 engineering lessons from the changes made. Skip ONLY if changes are pure config/formatting with no logic modified.
794
-
795
- Quick lesson capture (when full skill feels heavy):
796
- \`\`\`
797
- knowledge({ action: "lesson", subAction: "create", context: "<what situation you faced>", insight: "<what principle the solution demonstrates>", evidence: "<file:line or commit that proves it>", confidence: 65 })
798
- \`\`\`
706
+ ${t({title:`Convention Recall`,intro:`Before refactoring, check existing conventions for the target area:`,commands:[`search({ query: "<module/pattern being refactored> convention", category: "conventions", limit: 3 })`,`knowledge({ action: "lesson", subAction: "list-lessons", topic: "<refactor area>", minConfidence: 70, limit: 3 })`],followUp:`Follow discovered conventions. Do NOT introduce patterns that contradict established conventions without surfacing the conflict.`})}
799
707
 
800
- **Confirm/Contradict (if pre-task recalled relevant lessons):**
801
- - Lesson proved correct → \`knowledge({ action: "lesson", subAction: "confirm", id: "<recalled-lesson-path>" })\`
802
- - Lesson was wrong/outdated → \`knowledge({ action: "lesson", subAction: "contradict", id: "<recalled-lesson-path>", evidence: "<what actually happened>" })\`
708
+ ${e()}
803
709
 
804
710
  ## Skills (load on demand)
805
711
 
806
712
  | Skill | When to load |
807
713
  |-------|--------------|
808
714
  | \`lesson-learned\` | After completing a refactor — extract principles from the before/after diff |
809
- | \`typescript\` | When refactoring TypeScript code — type patterns, generics, utility types |`,Security:`${e()}
715
+ | \`typescript\` | When refactoring TypeScript code — type patterns, generics, utility types |`,Security:`${n()}
810
716
 
811
717
  > **Reminder:** Follow ## MANDATORY FIRST ACTION from your shared base protocol.
812
718
 
@@ -857,7 +763,7 @@ After shared bootstrap, run \`search({ query: "security vulnerabilities conventi
857
763
 
858
764
  | Skill | When to load |
859
765
  |-------|--------------|
860
- | \`typescript\` | When reviewing TypeScript for type-safety vulnerabilities |`,Documenter:`${e()}
766
+ | \`typescript\` | When reviewing TypeScript for type-safety vulnerabilities |`,Documenter:`${n()}
861
767
 
862
768
  > **Reminder:** Follow ## MANDATORY FIRST ACTION from your shared base protocol.
863
769
 
@@ -927,7 +833,7 @@ Rules adapted from *The Elements of Agent Style* (CC BY 4.0, Yue Zhao) and class
927
833
  | \`present\` | When presenting documentation previews, API tables, or architecture visuals to the user |
928
834
  | \`c4-architecture\` | When documenting system architecture — generate C4 Mermaid diagrams |
929
835
  | \`adr-skill\` | When documenting architecture decisions — create or update ADRs |
930
- | \`typescript\` | When documenting TypeScript APIs — type signatures, JSDoc patterns |`,Explorer:`${e()}
836
+ | \`typescript\` | When documenting TypeScript APIs — type signatures, JSDoc patterns |`,Explorer:`${n()}
931
837
 
932
838
  ## MANDATORY FIRST ACTION
933
839
 
@@ -998,4 +904,4 @@ When dispatched as a subagent within an active flow:
998
904
 
999
905
  - **Speed over depth** — Provide a useful map quickly, not an exhaustive analysis
1000
906
  - **Read-only** — Never create, edit, or delete files
1001
- - **Structured output** — Always return findings in the format above`};export{t as AGENT_BODIES};
907
+ - **Structured output** — Always return findings in the format above`};export{r as AGENT_BODIES};
@@ -0,0 +1 @@
1
+ const e={SessionStart:{copilot:`SessionStart`,claude:`PreToolCall`,copilotCli:`sessionStart`},PreToolUse:{copilot:`PreToolUse`,claude:`PreToolCall`,copilotCli:`preToolUse`},PostToolUse:{copilot:`PostToolUse`,claude:`PostToolCall`,copilotCli:`postToolUse`},SubagentStart:{copilot:`SubagentStart`,claude:`PreToolCall`,copilotCli:`subagentStart`},PreCompact:{copilot:`PreCompact`,claude:`PreToolCall`,copilotCli:`preCompact`},Stop:{copilot:`Stop`,claude:`PostToolCall`,copilotCli:`stop`}},t={fileRead:{copilot:[`read_file`,`readFile`],claude:[`Read`],copilotCli:[`read_file`]},fileWrite:{copilot:[`editFiles`,`replace_string_in_file`,`create_file`],claude:[`Write`,`Edit`],copilotCli:[`editFiles`,`replace_string_in_file`]},fileSearch:{copilot:[`grep_search`,`semantic_search`,`find`],claude:[`Bash`],copilotCli:[`grep_search`]}},n={"privacy-guard":{id:`privacy-guard`,event:`PreToolUse`,tier:`safety`,description:`Blocks reads of secret-bearing env files, key material, SSH paths, and credential artifacts.`,script:`privacy-guard.mjs`,matcher:[`fileRead`],scope:`user`,patterns:[`.env`,`*.pem`,`*.key`,`id_rsa*`,`.ssh/*`,`*credentials*`,`*.secret`]},"scout-guard":{id:`scout-guard`,event:`PreToolUse`,tier:`safety`,description:`Blocks reads and searches inside generated, dependency, and git object directories.`,script:`scout-guard.mjs`,matcher:[`fileRead`,`fileSearch`],scope:`user`,patterns:[`node_modules/`,`dist/`,`.git/objects/`,`vendor/`,`build/`]},"subagent-context":{id:`subagent-context`,event:`SubagentStart`,tier:`efficiency`,description:`Injects compact project context into each subagent spawn to reduce repeated discovery.`,script:`subagent-context.mjs`,scope:`user`},"pre-compact-save":{id:`pre-compact-save`,event:`PreCompact`,tier:`efficiency`,description:`Persists critical state before context compaction truncates recent session history.`,script:`pre-compact-save.mjs`,scope:`user`},"post-edit-check":{id:`post-edit-check`,event:`PostToolUse`,tier:`nudge`,description:`After repeated file edits, injects a validation reminder so checks are not skipped.`,script:`post-edit-check.mjs`,matcher:[`fileWrite`],scope:`user`},"session-init":{id:`session-init`,event:`SessionStart`,tier:`nudge`,description:`Detects project stack and injects workspace metadata and environment context at startup.`,script:`session-init.mjs`,scope:`user`},"session-observer":{id:`session-observer`,event:`PostToolUse`,tier:`efficiency`,description:`Captures tool usage patterns for autonomous lesson extraction. Writes to session buffer.`,script:`session-observer.mjs`,scope:`user`},"session-learn":{id:`session-learn`,event:`Stop`,tier:`efficiency`,description:`Nudges final pattern analysis on buffered observations at session end.`,script:`session-learn.mjs`,scope:`user`}};export{n as EXEC_HOOKS,e as HOOK_EVENTS,t as HOOK_TOOL_MATCHERS};