@vpxa/aikit 0.1.341 → 0.1.343

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 (40) hide show
  1. package/bin/postinstall-managed-launcher.mjs +86 -0
  2. package/package.json +2 -1
  3. package/packages/blocks-core/dist/index.mjs +3 -1
  4. package/packages/browser/dist/index.js +4 -3
  5. package/packages/cli/dist/index.js +16 -16
  6. package/packages/flows/dist/index.d.ts +1 -1
  7. package/packages/flows/dist/index.js +2 -2
  8. package/packages/server/dist/bin.js +1 -1
  9. package/packages/server/dist/index.js +1 -1
  10. package/packages/server/dist/prelude-CYbX3SD5.js +1 -0
  11. package/packages/server/dist/prelude-SM1mxlBF.js +2 -0
  12. package/packages/server/dist/{server-LFvVKN0j.js → server-QHpy3Vo9.js} +56 -70
  13. package/packages/server/dist/{server-DU6Jsp0h.js → server-WTo9MN4i.js} +56 -70
  14. package/packages/server/dist/{server-http-DhxqJtr-.js → server-http-Cxq-Bg3K.js} +1 -1
  15. package/packages/server/dist/{server-http-BNooFgZY.js → server-http-fvgPEVn5.js} +1 -1
  16. package/packages/server/dist/{server-stdio-yLODmHTh.js → server-stdio-DiT0r0Q3.js} +1 -1
  17. package/packages/server/dist/{server-stdio-qlRhmE4f.js → server-stdio-vC20j-3j.js} +1 -1
  18. package/packages/server/dist/version-check-2-tfmCnt.js +2 -0
  19. package/packages/server/dist/version-check-BKtLrLhw.js +1 -0
  20. package/packages/server/viewers/architecture-static.html +802 -789
  21. package/packages/server/viewers/c4-viewer.html +27 -27
  22. package/packages/server/viewers/canvas.html +83 -83
  23. package/packages/server/viewers/process-flow-static.html +13 -2
  24. package/packages/server/viewers/task-plan-static.html +7 -7
  25. package/packages/server/viewers/tour-viewer.html +3 -3
  26. package/scaffold/dist/adapters/_shared.mjs +2 -1
  27. package/scaffold/dist/adapters/claude-code.mjs +7 -10
  28. package/scaffold/dist/adapters/copilot.mjs +14 -16
  29. package/scaffold/dist/adapters/gemini.mjs +6 -8
  30. package/scaffold/dist/adapters/hermes-agent.mjs +14 -16
  31. package/scaffold/dist/adapters/hermes.mjs +5 -7
  32. package/scaffold/dist/adapters/opencode.mjs +7 -9
  33. package/scaffold/dist/definitions/flows.mjs +84 -138
  34. package/scaffold/dist/definitions/skills/browser-use.mjs +63 -33
  35. package/scaffold/dist/definitions/skills/c4-architecture.mjs +1 -1
  36. package/scaffold/dist/definitions/skills/docs.mjs +1 -1
  37. package/packages/server/dist/prelude-CQibCk9Y.js +0 -1
  38. package/packages/server/dist/prelude-ClS2lMwX.js +0 -2
  39. package/packages/server/dist/version-check-Bx7ump1d.js +0 -1
  40. package/packages/server/dist/version-check-obaVU70k.js +0 -2
@@ -1,23 +1,21 @@
1
- import{AGENTS as e}from"../definitions/agents.mjs";import{AGENT_BODIES as t}from"../definitions/bodies.mjs";import{VARIANT_GROUPS as n,getPrimaryAgentModel as r}from"../definitions/models.mjs";import{PROMPTS as i}from"../definitions/prompts.mjs";import{AIKIT_INSTALL_HINT_SECTION as a,PLATFORM_OUTPUT_RULES_SECTION as o,PROTOCOLS as s,TEMPLATES as c}from"../definitions/protocols.mjs";import{IDE_CAPABILITIES as l}from"../definitions/tools.mjs";import{buildCompactAgentTable as u}from"./_shared.mjs";import{generateHooks as d,getHookScriptFiles as f}from"./hooks.mjs";import{generateForbiddenTable as p}from"../definitions/policies.mjs";const m={terminal:`terminal`,problems:`mcp_aikit_check`,readFile:`read_file`,lastCommand:`terminal`,subagent:`delegate_task`,createFile:`write_file`,editFiles:`patch`,rename:`write_file`,createDirectory:`terminal(mkdir)`,search:`search_files, mcp_aikit_search, mcp_aikit_find`,web:`web_search, web_extract, mcp_aikit_web_search, mcp_aikit_web_fetch`,todo:`todo`,memory:`memory`,newWorkspace:`terminal(cd)`,reviewPlan:`clarify`,askQuestions:`clarify`,resolveMemoryFileUri:`read_file`,runCommand:`terminal`,switchAgent:`delegate_task`,killTerminal:`process(kill)`,createTask:`todo`,terminalSel:`terminal`,fileSearch:`search_files`,listDir:`search_files(target=files)`,textSearch:`search_files(target=content)`,searchSubagent:`delegate_task`,browser:`mcp_aikit_browser, browser_navigate`};function h(e){let t=[[/`runSubagent`/g,"`delegate_task`"],[/`runSubagent\(/g,"`delegate_task("],[/\brunSubagent\b/g,`delegate_task`],[/`editFiles`/g,"`patch`"],[/`createFile`/g,"`write_file`"],[/`edit\/createFile`/g,"`write_file`"],[/`edit\/editFiles`/g,"`patch`"],[/`run_in_terminal`/g,"`terminal`"],[/`execute\/runInTerminal`/g,"`terminal`"],[/`execute\/killTerminal`/g,"`process(kill)`"],[/`grep_search`/g,"`search_files`"],[/`search\/codebase`/g,"`mcp_aikit_search`"],[/`search\/changes`/g,"`search_files`"],[/`search\/usages`/g,"`mcp_aikit_symbol` / `mcp_aikit_trace`"],[/`search\/textSearch`/g,"`search_files`"],[/`search\/searchSubagent`/g,"`delegate_task`"],[/`web\/fetch`/g,"`web_extract` / `mcp_aikit_web_fetch`"],[/`web\/githubRepo`/g,"`terminal(git ...)`"],[/`web\/webSearch`/g,"`web_search` / `mcp_aikit_web_search`"],[/`vscode\/memory`/g,"`memory`"],[/`vscode\/runCommand`/g,"`terminal`"],[/`vscode\/switchAgent`/g,"`delegate_task`"],[/`vscode\/newWorkspace`/g,"`terminal(cd)`"],[/`vscode\/reviewPlan`/g,"`clarify`"],[/`vscode\/askQuestions`/g,"`clarify`"],[/`vscode\/resolveMemoryFileUri`/g,"`read_file`"],[/`read\/readFile`/g,"`read_file`"],[/`read\/terminalLastCommand`/g,"`terminal`"],[/`read\/terminalSelection`/g,"`terminal`"],[/`read\/problems`/g,"`mcp_aikit_check`"],[/`agent\/runSubagent`/g,"`delegate_task`"],[/`execute\/createAndRunTask`/g,"`todo` / `delegate_task`"],[/`read_file` \(for understanding\)/g,"`read_file` (Hermes)"],[/\(copilot\)/g,`(hermes)`],[/runSubagent\(\{agentName:/g,`delegate_task({goal:`],[/runSubagent\(\{/g,`delegate_task({`]],n=e;for(let[e,r]of t)n=n.replace(e,r);return n}function g(e){let t=(l[e]||[]).map(e=>{let t=m[e];return t?t.split(`,`).map(e=>e.trim()):null}).filter(Boolean).flat();return`[${[...new Set(t),`aikit/*`].join(`, `)}]`}function _(e){return r(`hermes`,e,`Auto (hermes)`)}const v=[`## Flows`,``,"This project uses aikit's pluggable flow system. Check flow status with the `flow` or `mcp_aikit_flow` MCP tool.","If a flow is active, follow the current step's skill instructions. Advance with `mcp_aikit_flow({ action: 'step', advance: 'next' })`.","Use `mcp_aikit_flow({ action: 'list' })` to see available flows and `mcp_aikit_flow({ action: 'start', name, topic })` to begin one."].join(`
2
- `),y=[`## Flows`,``,"This project uses aikit's pluggable flow system. Use `mcp_aikit_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 b(){let t=[];for(let[i,a]of Object.entries(e))if(a.variants)for(let e of n[i]||[]){let n=`${i}-${e}`,o=r(`hermes`,n,`Unknown`),s=(a.variants[e]||{}).description||a.description;t.push(`| **${n}** | ${s} | ${o} | ${a.category} |`)}else{let e=r(`hermes`,i,`Unknown`);t.push(`| **${i}** | ${a.description} | ${e} | ${a.category} |`)}return`| Agent | Purpose | Model | Category |\n|-------|---------|-------|----------|\n${t.join(`
4
- `)}`}function x(e,t,r){let i=`${e}-${t}`,a=r.variants[t]||{},o=_(i),c=a.description||r.description,l=a.identity||(t===n[e]?.[0]?`, the primary ${e} agent.`:`, a variant of ${e}. Same responsibilities, different model perspective.`),u=r.sharedBase&&s[r.sharedBase]?`\n\n${s[r.sharedBase]}`:``;u=h(u);let d=r.extraBody?`\n\n${h(r.extraBody)}`:``,f=a.bodyAddendum?`\n\n${h(a.bodyAddendum)}`:``,p=(r.sharedProtocols||[]).map(e=>{let t=s[e];return t?`\n\n${h(t)}`:``}).join(``),m=r.skills?.length?`\n\n## Skills (load on demand)\n\n${r.skills.map(([e,t])=>`- \`${e}\`: ${t}`).join(`
5
- `)}`:``,v=r.title||e;return`---
1
+ import{AGENTS as e}from"../definitions/agents.mjs";import{AGENT_BODIES as t}from"../definitions/bodies.mjs";import{VARIANT_GROUPS as n,getPrimaryAgentModel as r}from"../definitions/models.mjs";import{PROMPTS as i}from"../definitions/prompts.mjs";import{AIKIT_INSTALL_HINT_SECTION as a,PLATFORM_OUTPUT_RULES_SECTION as o,PROTOCOLS as s,TEMPLATES as c}from"../definitions/protocols.mjs";import{IDE_CAPABILITIES as l}from"../definitions/tools.mjs";import{buildCompactAgentTable as u,buildFlowSection as d}from"./_shared.mjs";import{generateHooks as f,getHookScriptFiles as p}from"./hooks.mjs";import{generateForbiddenTable as m}from"../definitions/policies.mjs";const h={terminal:`terminal`,problems:`mcp_aikit_check`,readFile:`read_file`,lastCommand:`terminal`,subagent:`delegate_task`,createFile:`write_file`,editFiles:`patch`,rename:`write_file`,createDirectory:`terminal(mkdir)`,search:`search_files, mcp_aikit_search, mcp_aikit_find`,web:`web_search, web_extract, mcp_aikit_web_search, mcp_aikit_web_fetch`,todo:`todo`,memory:`memory`,newWorkspace:`terminal(cd)`,reviewPlan:`clarify`,askQuestions:`clarify`,resolveMemoryFileUri:`read_file`,runCommand:`terminal`,switchAgent:`delegate_task`,killTerminal:`process(kill)`,createTask:`todo`,terminalSel:`terminal`,fileSearch:`search_files`,listDir:`search_files(target=files)`,textSearch:`search_files(target=content)`,searchSubagent:`delegate_task`,browser:`mcp_aikit_browser, browser_navigate`};function g(e){let t=[[/`runSubagent`/g,"`delegate_task`"],[/`runSubagent\(/g,"`delegate_task("],[/\brunSubagent\b/g,`delegate_task`],[/`editFiles`/g,"`patch`"],[/`createFile`/g,"`write_file`"],[/`edit\/createFile`/g,"`write_file`"],[/`edit\/editFiles`/g,"`patch`"],[/`run_in_terminal`/g,"`terminal`"],[/`execute\/runInTerminal`/g,"`terminal`"],[/`execute\/killTerminal`/g,"`process(kill)`"],[/`grep_search`/g,"`search_files`"],[/`search\/codebase`/g,"`mcp_aikit_search`"],[/`search\/changes`/g,"`search_files`"],[/`search\/usages`/g,"`mcp_aikit_symbol` / `mcp_aikit_trace`"],[/`search\/textSearch`/g,"`search_files`"],[/`search\/searchSubagent`/g,"`delegate_task`"],[/`web\/fetch`/g,"`web_extract` / `mcp_aikit_web_fetch`"],[/`web\/githubRepo`/g,"`terminal(git ...)`"],[/`web\/webSearch`/g,"`web_search` / `mcp_aikit_web_search`"],[/`vscode\/memory`/g,"`memory`"],[/`vscode\/runCommand`/g,"`terminal`"],[/`vscode\/switchAgent`/g,"`delegate_task`"],[/`vscode\/newWorkspace`/g,"`terminal(cd)`"],[/`vscode\/reviewPlan`/g,"`clarify`"],[/`vscode\/askQuestions`/g,"`clarify`"],[/`vscode\/resolveMemoryFileUri`/g,"`read_file`"],[/`read\/readFile`/g,"`read_file`"],[/`read\/terminalLastCommand`/g,"`terminal`"],[/`read\/terminalSelection`/g,"`terminal`"],[/`read\/problems`/g,"`mcp_aikit_check`"],[/`agent\/runSubagent`/g,"`delegate_task`"],[/`execute\/createAndRunTask`/g,"`todo` / `delegate_task`"],[/`read_file` \(for understanding\)/g,"`read_file` (Hermes)"],[/\(copilot\)/g,`(hermes)`],[/runSubagent\(\{agentName:/g,`delegate_task({goal:`],[/runSubagent\(\{/g,`delegate_task({`]],n=e;for(let[e,r]of t)n=n.replace(e,r);return n}function _(e){let t=(l[e]||[]).map(e=>{let t=h[e];return t?t.split(`,`).map(e=>e.trim()):null}).filter(Boolean).flat();return`[${[...new Set(t),`aikit/*`].join(`, `)}]`}function v(e){return r(`hermes`,e,`Auto (hermes)`)}const y=d({flowTool:`mcp_aikit_flow`,isLifecycleOwner:!0}),b=d({flowTool:`mcp_aikit_flow`,isLifecycleOwner:!1});function x(){let t=[];for(let[i,a]of Object.entries(e))if(a.variants)for(let e of n[i]||[]){let n=`${i}-${e}`,o=r(`hermes`,n,`Unknown`),s=(a.variants[e]||{}).description||a.description;t.push(`| **${n}** | ${s} | ${o} | ${a.category} |`)}else{let e=r(`hermes`,i,`Unknown`);t.push(`| **${i}** | ${a.description} | ${e} | ${a.category} |`)}return`| Agent | Purpose | Model | Category |\n|-------|---------|-------|----------|\n${t.join(`
2
+ `)}`}function S(e,t,r){let i=`${e}-${t}`,a=r.variants[t]||{},o=v(i),c=a.description||r.description,l=a.identity||(t===n[e]?.[0]?`, the primary ${e} agent.`:`, a variant of ${e}. Same responsibilities, different model perspective.`),u=r.sharedBase&&s[r.sharedBase]?`\n\n${s[r.sharedBase]}`:``;u=g(u);let d=r.extraBody?`\n\n${g(r.extraBody)}`:``,f=a.bodyAddendum?`\n\n${g(a.bodyAddendum)}`:``,p=(r.sharedProtocols||[]).map(e=>{let t=s[e];return t?`\n\n${g(t)}`:``}).join(``),m=r.skills?.length?`\n\n## Skills (load on demand)\n\n${r.skills.map(([e,t])=>`- \`${e}\`: ${t}`).join(`
3
+ `)}`:``,h=r.title||e;return`---
6
4
  description: '${c}'
7
- ${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${g(r.toolRole)}
5
+ ${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${_(r.toolRole)}
8
6
  model: ${o}
9
7
  ---
10
8
 
11
- # ${i} - ${v}
9
+ # ${i} - ${h}
12
10
 
13
11
  You are **${i}**${l}${d}
14
12
  ${u}${p}${f}${m}
15
13
 
16
- ${y}
17
- `}function S(n,r){let i=_(n),a=typeof t[n]==`function`?t[n](u(e)):t[n]||``;a=h(a);let o=r.sharedBase&&s[r.sharedBase]?`\n\n${s[r.sharedBase]}`:``;o=h(o);let c=(r.sharedProtocols||[]).map(e=>{let t=s[e];return t?`\n\n${h(t)}`:``}).join(``),l=r.title||n,d=r.skills?.length?`\n## Skills (load on demand)\n\n${r.skills.map(([e,t])=>`- \`${e}\`: ${t}`).join(`
14
+ ${b}
15
+ `}function C(n,r){let i=v(n),a=typeof t[n]==`function`?t[n](u(e)):t[n]||``;a=g(a);let o=r.sharedBase&&s[r.sharedBase]?`\n\n${s[r.sharedBase]}`:``;o=g(o);let c=(r.sharedProtocols||[]).map(e=>{let t=s[e];return t?`\n\n${g(t)}`:``}).join(``),l=r.title||n,d=r.skills?.length?`\n## Skills (load on demand)\n\n${r.skills.map(([e,t])=>`- \`${e}\`: ${t}`).join(`
18
16
  `)}\n`:``;return`---
19
17
  description: '${r.description}'
20
- ${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${g(r.toolRole)}
18
+ ${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${_(r.toolRole)}
21
19
  model: ${i}
22
20
  ---
23
21
 
@@ -27,20 +25,20 @@ You are the **${n}**, ${r.description.toLowerCase().replace(/^./,e=>e.toLowerCas
27
25
 
28
26
  ${a}${o}${c}${d}
29
27
 
30
- ${n===`Orchestrator`?v:y}
31
- `}function C(e,t){return`---
28
+ ${n===`Orchestrator`?y:b}
29
+ `}function w(e,t){return`---
32
30
  description: "${t.description}"
33
31
  agent: "${t.agent}"
34
32
  ---
35
33
 
36
34
  ${t.content}
37
- `}function w(){return`# Hermes Agents
35
+ `}function T(){return`# Hermes Agents
38
36
 
39
37
  This directory contains AI agent definitions generated by \`@vpxa/aikit init\` for **Hermes Agent**.
40
38
 
41
39
  ## Agent Roster
42
40
 
43
- ${b()}
41
+ ${x()}
44
42
 
45
43
  ## Multi-Model Pattern
46
44
 
@@ -52,5 +50,5 @@ Hermes provides native tools (\`terminal\`, \`read_file\`, \`write_file\`, \`pat
52
50
  plus AI Kit MCP tools (\`mcp_aikit_search\`, \`mcp_aikit_knowledge\`, etc.) for code analysis, memory, and context compression.
53
51
 
54
52
  See \`AGENTS.md\` (in Hermes config directory) for complete tool usage guidance.
55
- `}function T(){return[`# aikit — Hermes Agent Instructions`,``,"This file is generated from `scaffold/definitions/`. Do not edit directly.",``,o,``,`## Tool Routing Rules`,``,`Hermes provides native tools (terminal, read_file, write_file, patch, search_files, delegate_task, etc.)`,`plus AI Kit MCP tools (mcp_aikit_*) for code analysis, memory, and context compression.`,``,`### When to Use AI Kit Tools`,``,`| Instead of | Use AI Kit Tool | Why |`,`|-----------|----------------|-----|`,"| `grep` / `rg` | `mcp_aikit_search` or `mcp_aikit_find` | Hybrid search across all indexed content |","| `cat` for understanding | `mcp_aikit_file_summary` or `mcp_aikit_compact` | 10x fewer tokens than raw file reads |","| Running tests in terminal | `mcp_aikit_test_run` | Structured output — no shell needed |","| `tsc` / `biome` in terminal | `mcp_aikit_check` | Typecheck + lint combined |","| Web search | `mcp_aikit_web_search` | Fans out to multiple keyless providers |",``,p(),``,a,``].join(`
56
- `)}function E(){let t=[];if(f().length===0)throw Error(`Executable hooks are not configured.`);t.push({path:`hermes-instructions.md`,content:T()});for(let[r,i]of Object.entries(e))if(i.variants)for(let e of n[r]||[])t.push({path:`agents/${r}-${e}.agent.md`,content:x(r,e,i)});else t.push({path:`agents/${r}.agent.md`,content:S(r,i)});for(let[e,n]of Object.entries(c))t.push({path:`agents/templates/${e}.md`,content:`${n}\n`});t.push({path:`agents/README.md`,content:w()});for(let[e,n]of Object.entries(i))t.push({path:`prompts/aikit-${e}.prompt.md`,content:C(e,n)});let r=d(`hermes`,`~/.hermes/hooks/scripts`);return t.push(...r.map(e=>({path:`hooks/${e.path}`,content:e.content}))),t}export{E as generateHermesAgent};
53
+ `}function E(){return[`# aikit — Hermes Agent Instructions`,``,"This file is generated from `scaffold/definitions/`. Do not edit directly.",``,o,``,`## Tool Routing Rules`,``,`Hermes provides native tools (terminal, read_file, write_file, patch, search_files, delegate_task, etc.)`,`plus AI Kit MCP tools (mcp_aikit_*) for code analysis, memory, and context compression.`,``,`### When to Use AI Kit Tools`,``,`| Instead of | Use AI Kit Tool | Why |`,`|-----------|----------------|-----|`,"| `grep` / `rg` | `mcp_aikit_search` or `mcp_aikit_find` | Hybrid search across all indexed content |","| `cat` for understanding | `mcp_aikit_file_summary` or `mcp_aikit_compact` | 10x fewer tokens than raw file reads |","| Running tests in terminal | `mcp_aikit_test_run` | Structured output — no shell needed |","| `tsc` / `biome` in terminal | `mcp_aikit_check` | Typecheck + lint combined |","| Web search | `mcp_aikit_web_search` | Fans out to multiple keyless providers |",``,m(),``,a,``].join(`
54
+ `)}function D(){let t=[];if(p().length===0)throw Error(`Executable hooks are not configured.`);t.push({path:`hermes-instructions.md`,content:E()});for(let[r,i]of Object.entries(e))if(i.variants)for(let e of n[r]||[])t.push({path:`agents/${r}-${e}.agent.md`,content:S(r,e,i)});else t.push({path:`agents/${r}.agent.md`,content:C(r,i)});for(let[e,n]of Object.entries(c))t.push({path:`agents/templates/${e}.md`,content:`${n}\n`});t.push({path:`agents/README.md`,content:T()});for(let[e,n]of Object.entries(i))t.push({path:`prompts/aikit-${e}.prompt.md`,content:w(e,n)});let r=f(`hermes`,`~/.hermes/hooks/scripts`);return t.push(...r.map(e=>({path:`hooks/${e.path}`,content:e.content}))),t}export{D as generateHermesAgent};
@@ -1,8 +1,6 @@
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{PROMPTS as r}from"../definitions/prompts.mjs";import{PROTOCOLS as i}from"../definitions/protocols.mjs";import{buildAgentTable as a,buildCompactAgentTable as o,buildHooksSection as s,buildPromptSections as c,buildSkillsSection as l,lowerFirst as u}from"./_shared.mjs";const d=[`## 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
- `),f=[`## 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 p(e,n){let r=t[e];return typeof r==`function`?r(n):r||``}function m(e){let t=[];e.extraBody&&t.push(e.extraBody),e.sharedBase&&i[e.sharedBase]&&t.push(i[e.sharedBase]);for(let n of e.sharedProtocols||[])i[n]&&t.push(i[n]);return t}function h(){let t=a(e),i=o(e),l=c(r),u=[];for(let[t,n]of Object.entries(e)){let e=p(t,i);if(n.variants){for(let[r,i]of Object.entries(n.variants)){let a=`${t}-${r}`;u.push(g(a,{...n,description:i.description||n.description,identity:i.identity,bodyAddendum:i.bodyAddendum},e))}continue}u.push(g(t,n,e))}return[`# AI Kit — Hermes Agent Instructions`,``,"This project uses **AI Kit** (`@vpxa/aikit`), a local-first MCP server that provides search,",`code analysis, persistent memory, context compression, and guided development flows.`,``,`The AI Kit MCP server is registered in your Hermes config and its 64 tools are available`,"as `mcp_aikit_*` tool calls in every conversation.",``,`## MCP Server`,``,"Server name: `aikit`","Configured via `hermes mcp add` (user-level). Tools are auto-discovered at session start.",``,`## Skills-First Rule`,``,`**Before starting ANY task, check available skills.** If a skill matches your task domain`,`— load it first. Skills contain domain-specific patterns, templates, and constraints.`,``,`## Available Tools (64)`,``,`AI Kit provides tools across the following categories:`,``,`| Category | Tools |`,`|----------|-------|`,"| **Search & Discovery** | `search`, `find`, `symbol`, `trace`, `lookup`, `scope_map`, `file_summary`, `dead_symbols` |","| **Code Analysis** | `analyze`, `blast_radius`, `audit`, `graph`, `health`, `check` |","| **Context Compression** | `compact`, `digest`, `stratum_card` |","| **Memory & Knowledge** | `knowledge`, `remember`, `read`, `update`, `forget`, `list`, `stash` |","| **FORGE Quality Gates** | `forge_classify`, `forge_ground`, `evidence_map`, `compliance_score` |","| **Development Workflows** | `flow`, `onboard`, `reindex`, `status`, `guide`, `config` |","| **Testing & Build** | `test_run`, `parse_output`, `check`, `eval` |","| **Code Manipulation** | `rename`, `codemod`, `data_transform`, `diff_parse`, `git_context`, `replay` |","| **Web & HTTP** | `web_search`, `web_fetch`, `http` |","| **Present & Visualize** | `present`, `signal`, `session_digest` |","| **Sandbox & Process** | `process`, `watch`, `workset`, `lane`, `queue`, `restore`, `delegate` |","| **Utilities** | `encode`, `regex_test`, `measure`, `changelog`, `schema_validate`, `env`, `time` |","| **Browser** | `browser` |",``,`## Important: Prefer AI Kit Tools Over Generic Shell Commands`,``,`When working in this project, use AI Kit MCP tools instead of generic alternatives:`,``,`| Instead of | Use AI Kit Tool | Why |`,`|-----------|----------------|-----|`,"| `grep` / `rg` | `mcp_aikit_search` or `mcp_aikit_find` | Hybrid search (vector + keyword + BM25) across all indexed content |","| `read_file` for understanding | `mcp_aikit_file_summary` or `mcp_aikit_compact` | Structure, exports, imports — 10x fewer tokens than raw file reads |","| `cd` + `ls` | `mcp_aikit_analyze` | Structural analysis with tree views |","| Running tests in terminal | `mcp_aikit_test_run` | Structured test output — no shell needed |","| `tsc` / `biome` in terminal | `mcp_aikit_check` | Typecheck + lint combined |","| Web search | `mcp_aikit_web_search` | Fans out to multiple keyless providers |",``,`## Agents`,``,t,``,`## Agent Instructions`,``,u.join(`
4
- `),``,`## Prompts`,``,l,``,d,``,`## Session Protocol`,``,s(n),``].join(`
5
- `)}function g(e,t,n){let r=m(t),i=l(t.skills),a=e===`Orchestrator`?d:f,o=[n,...r,t.bodyAddendum,i,a].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{PROMPTS as r}from"../definitions/prompts.mjs";import{PROTOCOLS as i}from"../definitions/protocols.mjs";import{buildAgentTable as a,buildCompactAgentTable as o,buildFlowSection as s,buildHooksSection as c,buildPromptSections as l,buildSkillsSection as u,lowerFirst as d}from"./_shared.mjs";const f=s({flowTool:`flow`,isLifecycleOwner:!0}),p=s({flowTool:`flow`,isLifecycleOwner:!1});function m(e,n){let r=t[e];return typeof r==`function`?r(n):r||``}function h(e){let t=[];e.extraBody&&t.push(e.extraBody),e.sharedBase&&i[e.sharedBase]&&t.push(i[e.sharedBase]);for(let n of e.sharedProtocols||[])i[n]&&t.push(i[n]);return t}function g(){let t=a(e),i=o(e),s=l(r),u=[];for(let[t,n]of Object.entries(e)){let e=m(t,i);if(n.variants){for(let[r,i]of Object.entries(n.variants)){let a=`${t}-${r}`;u.push(_(a,{...n,description:i.description||n.description,identity:i.identity,bodyAddendum:i.bodyAddendum},e))}continue}u.push(_(t,n,e))}return[`# AI Kit — Hermes Agent Instructions`,``,"This project uses **AI Kit** (`@vpxa/aikit`), a local-first MCP server that provides search,",`code analysis, persistent memory, context compression, and guided development flows.`,``,`The AI Kit MCP server is registered in your Hermes config and its 64 tools are available`,"as `mcp_aikit_*` tool calls in every conversation.",``,`## MCP Server`,``,"Server name: `aikit`","Configured via `hermes mcp add` (user-level). Tools are auto-discovered at session start.",``,`## Skills-First Rule`,``,`**Before starting ANY task, check available skills.** If a skill matches your task domain`,`— load it first. Skills contain domain-specific patterns, templates, and constraints.`,``,`## Available Tools (64)`,``,`AI Kit provides tools across the following categories:`,``,`| Category | Tools |`,`|----------|-------|`,"| **Search & Discovery** | `search`, `find`, `symbol`, `trace`, `lookup`, `scope_map`, `file_summary`, `dead_symbols` |","| **Code Analysis** | `analyze`, `blast_radius`, `audit`, `graph`, `health`, `check` |","| **Context Compression** | `compact`, `digest`, `stratum_card` |","| **Memory & Knowledge** | `knowledge`, `remember`, `read`, `update`, `forget`, `list`, `stash` |","| **FORGE Quality Gates** | `forge_classify`, `forge_ground`, `evidence_map`, `compliance_score` |","| **Development Workflows** | `flow`, `onboard`, `reindex`, `status`, `guide`, `config` |","| **Testing & Build** | `test_run`, `parse_output`, `check`, `eval` |","| **Code Manipulation** | `rename`, `codemod`, `data_transform`, `diff_parse`, `git_context`, `replay` |","| **Web & HTTP** | `web_search`, `web_fetch`, `http` |","| **Present & Visualize** | `present`, `signal`, `session_digest` |","| **Sandbox & Process** | `process`, `watch`, `workset`, `lane`, `queue`, `restore`, `delegate` |","| **Utilities** | `encode`, `regex_test`, `measure`, `changelog`, `schema_validate`, `env`, `time` |","| **Browser** | `browser` |",``,`## Important: Prefer AI Kit Tools Over Generic Shell Commands`,``,`When working in this project, use AI Kit MCP tools instead of generic alternatives:`,``,`| Instead of | Use AI Kit Tool | Why |`,`|-----------|----------------|-----|`,"| `grep` / `rg` | `mcp_aikit_search` or `mcp_aikit_find` | Hybrid search (vector + keyword + BM25) across all indexed content |","| `read_file` for understanding | `mcp_aikit_file_summary` or `mcp_aikit_compact` | Structure, exports, imports — 10x fewer tokens than raw file reads |","| `cd` + `ls` | `mcp_aikit_analyze` | Structural analysis with tree views |","| Running tests in terminal | `mcp_aikit_test_run` | Structured test output — no shell needed |","| `tsc` / `biome` in terminal | `mcp_aikit_check` | Typecheck + lint combined |","| Web search | `mcp_aikit_web_search` | Fans out to multiple keyless providers |",``,`## Agents`,``,t,``,`## Agent Instructions`,``,u.join(`
2
+ `),``,`## Prompts`,``,s,``,f,``,`## Session Protocol`,``,c(n),``].join(`
3
+ `)}function _(e,t,n){let r=h(t),i=u(t.skills),a=e===`Orchestrator`?f:p,o=[n,...r,t.bodyAddendum,i,a].filter(Boolean).join(`
6
4
 
7
- `).trim();return[`## ${e} - ${t.title||e}`,``,`> ${t.description}`,``,t.identity?`You are the **${e}**${t.identity}`:`You are the **${e}**, ${u(t.description)}.`,...o?[``,o]:[],``].join(`
8
- `)}function _(){return[{path:`AGENTS.md`,content:h()}]}export{_ as generateHermes};
5
+ `).trim();return[`## ${e} - ${t.title||e}`,``,`> ${t.description}`,``,t.identity?`You are the **${e}**${t.identity}`:`You are the **${e}**, ${d(t.description)}.`,...o?[``,o]:[],``].join(`
6
+ `)}function v(){return[{path:`AGENTS.md`,content:g()}]}export{v as generateHermes};
@@ -1,10 +1,8 @@
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{PROMPTS as a}from"../definitions/prompts.mjs";import{PROTOCOLS as o}from"../definitions/protocols.mjs";import{buildAgentTable as s,buildCompactAgentTable as c,buildHooksSection as l,buildPromptSections as u,buildSkillsSection as d,lowerFirst as f}from"./_shared.mjs";const p=[`## 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
- `),m=[`## 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 h(e,n){let r=t[e];return typeof r==`function`?r(n):r||``}function g(e){let t=[];e.extraBody&&t.push(e.extraBody),e.sharedBase&&o[e.sharedBase]&&t.push(o[e.sharedBase]);for(let n of e.sharedProtocols||[])o[n]&&t.push(o[n]);return t}function _(){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 v(e){return _().map(({name:t,description:n})=>`- \`${e}/${t}.md\` — ${n}`).join(`
4
- `)}const y={orchestrator:{edit:`allow`,bash:`allow`},planner:{edit:`allow`,bash:`allow`},codeAgent:{edit:`allow`,bash:`allow`},refactor:{edit:`allow`,bash:`allow`},debugger:{edit:`allow`,bash:`allow`},security:{edit:`allow`,bash:`allow`},documenter:{edit:`allow`,bash:`deny`},explorer:{edit:`deny`,bash:`deny`},researcher:{edit:`deny`,bash:`deny`},reviewer:{edit:`deny`,bash:`deny`}};function b(e){let t=e.category===`orchestration`&&e.title===`The Master Conductor`?`primary`:`subagent`,n=y[e.toolRole]||{edit:`deny`,bash:`deny`},r=[`---`,`description: ${e.description}`,`mode: ${t}`,`permission:`];for(let[e,t]of Object.entries(n))r.push(` ${e}: ${t}`);return r.push(`---`),r.join(`
5
- `)}function x(e,t,n){let r=g(t),i=d(t.skills),a=e===`Orchestrator`?p:m,o=[n,...r,t.bodyAddendum,i,a].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{PROMPTS as a}from"../definitions/prompts.mjs";import{PROTOCOLS as o}from"../definitions/protocols.mjs";import{buildAgentTable as s,buildCompactAgentTable as c,buildFlowSection as l,buildHooksSection as u,buildPromptSections as d,buildSkillsSection as f,lowerFirst as p}from"./_shared.mjs";const m=l({flowTool:`flow`,isLifecycleOwner:!0}),h=l({flowTool:`flow`,isLifecycleOwner:!1});function g(e,n){let r=t[e];return typeof r==`function`?r(n):r||``}function _(e){let t=[];e.extraBody&&t.push(e.extraBody),e.sharedBase&&o[e.sharedBase]&&t.push(o[e.sharedBase]);for(let n of e.sharedProtocols||[])o[n]&&t.push(o[n]);return t}function v(){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 y(e){return v().map(({name:t,description:n})=>`- \`${e}/${t}.md\` ${n}`).join(`
2
+ `)}const b={orchestrator:{edit:`allow`,bash:`allow`},planner:{edit:`allow`,bash:`allow`},codeAgent:{edit:`allow`,bash:`allow`},refactor:{edit:`allow`,bash:`allow`},debugger:{edit:`allow`,bash:`allow`},security:{edit:`allow`,bash:`allow`},documenter:{edit:`allow`,bash:`deny`},explorer:{edit:`deny`,bash:`deny`},researcher:{edit:`deny`,bash:`deny`},reviewer:{edit:`deny`,bash:`deny`}};function x(e){let t=e.category===`orchestration`&&e.title===`The Master Conductor`?`primary`:`subagent`,n=b[e.toolRole]||{edit:`deny`,bash:`deny`},r=[`---`,`description: ${e.description}`,`mode: ${t}`,`permission:`];for(let[e,t]of Object.entries(n))r.push(` ${e}: ${t}`);return r.push(`---`),r.join(`
3
+ `)}function S(e,t,n){let r=_(t),i=f(t.skills),a=e===`Orchestrator`?m:h,o=[n,...r,t.bodyAddendum,i,a].filter(Boolean).join(`
6
4
 
7
- `).trim(),s=[`# ${e} - ${t.title||e}`,``,`> ${t.description}`,``,t.identity?`You are the **${e}**${t.identity}`:`You are the **${e}**, ${f(t.description)}.`,...o?[``,o]:[],``].join(`
8
- `);return`${b(t)}\n\n${s}`}function S(){return[`# aikit — OpenCode Agents`,``,"This workspace keeps the root `OPENCODE.md` intentionally small. Full agent instructions are split into per-agent files under `.opencode/agents/`.",``,`## MCP Server`,``,"Server name: `aikit`","Configure in `.opencode/opencode.json` (already done if scaffold was deployed).",``,`## Agents`,``,s(e),``,`## Agent Files`,``,v(`.opencode/agents`),``,`## Prompts`,``,u(a),``,`## Session Protocol`,``,l(n),``].join(`
9
- `)}function C(){return[`# aikit — OpenCode Instructions`,``,"Detailed workspace instructions live in `OPENCODE.md`.","Per-agent instructions are emitted under `.opencode/agents/`.","MCP server config lives in `.opencode/opencode.json`.",``,"Start with `OPENCODE.md`, then open the specific agent file you want to use.",``].join(`
10
- `)}function w(e,t){let{type:n,...r}=t;return JSON.stringify({mcp:{[e]:{type:`local`,command:[r.command,...r.args]}}},null,2)}function T(){let t=[{path:`.opencode/opencode.json`,content:`${w(i,r)}\n`},{path:`OPENCODE.md`,content:C()},{path:`AGENTS.md`,content:S()}],n=c(e);for(let[r,i]of Object.entries(e)){let e=h(r,n);if(i.variants){for(let[n,a]of Object.entries(i.variants)){let o=`${r}-${n}`;t.push({path:`.opencode/agents/${o}.md`,content:x(o,{...i,description:a.description||i.description,identity:a.identity,bodyAddendum:a.bodyAddendum},e)})}continue}t.push({path:`.opencode/agents/${r}.md`,content:x(r,i,e)})}return t}export{T as generateOpencode};
5
+ `).trim(),s=[`# ${e} - ${t.title||e}`,``,`> ${t.description}`,``,t.identity?`You are the **${e}**${t.identity}`:`You are the **${e}**, ${p(t.description)}.`,...o?[``,o]:[],``].join(`
6
+ `);return`${x(t)}\n\n${s}`}function C(){return[`# aikit — OpenCode Agents`,``,"This workspace keeps the root `OPENCODE.md` intentionally small. Full agent instructions are split into per-agent files under `.opencode/agents/`.",``,`## MCP Server`,``,"Server name: `aikit`","Configure in `.opencode/opencode.json` (already done if scaffold was deployed).",``,`## Agents`,``,s(e),``,`## Agent Files`,``,y(`.opencode/agents`),``,`## Prompts`,``,d(a),``,`## Session Protocol`,``,u(n),``].join(`
7
+ `)}function w(){return[`# aikit — OpenCode Instructions`,``,"Detailed workspace instructions live in `OPENCODE.md`.","Per-agent instructions are emitted under `.opencode/agents/`.","MCP server config lives in `.opencode/opencode.json`.",``,"Start with `OPENCODE.md`, then open the specific agent file you want to use.",``].join(`
8
+ `)}function T(e,t){let{type:n,...r}=t;return JSON.stringify({mcp:{[e]:{type:`local`,command:[r.command,...r.args]}}},null,2)}function E(){let t=[{path:`.opencode/opencode.json`,content:`${T(i,r)}\n`},{path:`OPENCODE.md`,content:w()},{path:`AGENTS.md`,content:C()}],n=c(e);for(let[r,i]of Object.entries(e)){let e=g(r,n);if(i.variants){for(let[n,a]of Object.entries(i.variants)){let o=`${r}-${n}`;t.push({path:`.opencode/agents/${o}.md`,content:S(o,{...i,description:a.description||i.description,identity:a.identity,bodyAddendum:a.bodyAddendum},e)})}continue}t.push({path:`.opencode/agents/${r}.md`,content:S(r,i,e)})}return t}export{E as generateOpencode};
@@ -1,49 +1,5 @@
1
- const e=`### Orchestrator Dispatch Protocol
2
-
3
- Follow \`multi-agents-development\` dispatch patterns:
4
-
5
- 1. **Independence Check**:
6
- - Same files, shared mutable state, or order dependency → sequential
7
- - Shared new types → define contract, then parallel
8
- - Otherwise → **parallel dispatch**
9
-
10
- 2. **Subagent Context**:
11
- - **Scope**: exact files + do NOT touch boundary
12
- - **Goal**: testable acceptance criteria
13
- - **Arch Context**: code via \`compact()\`/\`digest()\` or a cached ref via \`compact({ ref, query? })\`
14
- - **Constraints**: patterns, conventions, anti-patterns
15
- - **Self-Review**: checklist before DONE
16
-
17
- 3. **Status**: \`DONE\` | \`DONE_WITH_CONCERNS\` | \`NEEDS_CONTEXT\` | \`BLOCKED\`
18
- 4. **Max 2 retries** per task → escalate`,t=`### FORGE Quality Gate
19
-
20
- After reviews complete:
21
- 1. \`evidence_map({ action: "gate", task_id: "<slug>" })\` → YIELD/HOLD/HARD_BLOCK
22
- 2. YIELD → approved, proceed
23
- 3. HOLD → fix, re-gate (max 3 rounds)
24
- 4. HARD_BLOCK → escalate`;function n(e,t=``,n=``){return`## Foundation Integration
25
-
26
- Load these skills BEFORE executing this step:
27
-
28
- | Skill | Purpose | When |
29
- |-------|---------|------|
30
- | \`aikit\` | Core MCP tools — search, analyze, ${e}, validate | Always |
31
- | \`present\` | Rich rendering for structured output | Any output that benefits from rich rendering |
32
- | \`multi-agents-development\` | Dispatch templates, task decomposition, review patterns | Before dispatching any subagent |
33
- | \`brainstorming\` | Structured ideation for design decisions | Before design choice or feature exploration |${t?`\n${t}`:``}
34
-
35
- ### Presentation Rules
36
- - Use \`present\` for any output that benefits from rich rendering
37
- - Assessments, reports, comparisons, reviews, status boards, tables, charts, progress, findings → \`present({ schemaVersion: 1, title: "Assessment", blocks: [...] })\`
38
- - Use \`table\` for comparisons/findings, \`kv\` for status/summary, \`list\` for findings/tasks, \`metrics\` for numeric health, \`checklist\` for task status, \`markdown\` for prose
39
- - NEVER use \`code\` blocks for structured data
40
- - Plain text only for brief confirmations and simple questions${n?`\n\n${n}`:``}`}const r=e=>`## Knowledge Capture
41
-
42
- Before completing this step, persist important findings with \`knowledge({ action: "remember", ... })\`:
43
-
44
- ${e}
45
-
46
- If this step produced reusable knowledge, store it now.`,i={_epilogue:[{file:`steps/docs-sync/README.md`,content:`# Epilogue: Documentation Sync
1
+ const e=e=>!e||e.length===0?``:`**Skills for this step:** ${e.map(e=>`\`${e}\``).join(`, `)}.
2
+ Load them when their preconditions are met.`,t="### Dispatch Protocol\n- **Max 2 corrective retries** per task, then escalate.\n- Use `knowledge({ action: 'withdraw', scope: 'flow', profile: '<role>', budget: 6000 })` before dispatching.\n- Context: `stratum_card` for efficient, `compact` for focused, `digest` for multi-file synthesis.\n- Subagents: `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED`. No `present`. No flow advance.",n='### Evidence Gate\nStandard/Critical: Use one stable `task_id` (from Design/Assessment).\n1. `evidence_map({ action: "create", task_id: "<slug>", tier: "<tier>" })` — create once.\n2. Add CRITICAL/HIGH claims during implementation and review.\n3. Orchestrator calls `evidence_map({ action: "gate", task_id: "<slug>" })` → YIELD/HOLD/HARD_BLOCK.\n4. HOLD → fix, re-gate (max 2 retries). HARD_BLOCK → escalate.',r={_epilogue:[{file:`steps/docs-sync/README.md`,content:`# Epilogue: Documentation Sync
47
3
 
48
4
  > **This is a mandatory epilogue step.** Runs after every flow to keep project documentation synced with code changes.
49
5
 
@@ -259,7 +215,7 @@ Each step has a **README.md**. Orchestrator reads it via \`flow({ action: 'read'
259
215
  - Build on design decisions
260
216
 
261
217
  ### Step 3: Planning
262
- - Analyze codebase with \`search\`, \`scope_map\`, \`trace\`, \`analyze_*\`
218
+ - Analyze codebase with \`search\`, \`scope_map\`, \`trace\`, \`analyze\`
263
219
  - Design architecture from spec and design decisions
264
220
  - Create implementation plan with file-level changes
265
221
 
@@ -296,7 +252,12 @@ When the Orchestrator activates a step:
296
252
  ## Artifacts
297
253
 
298
254
  Artifacts are stored under \`.flows/{topic}/\`. \`{{artifacts_path}}\` resolves at runtime.
299
- `},{file:`steps/design/README.md`,content:`# Design Gate — Advanced Flow
255
+ `},{file:`steps/design/README.md`,content:`---
256
+ name: design
257
+ description: Full brainstorming, FORGE classification, decision protocol with parallel research. ADR for critical-tier tasks.
258
+ ---
259
+
260
+ # Design Gate — Advanced Flow
300
261
 
301
262
  Full design gate for new features, API design, and architecture changes. Runs brainstorming, decision protocol, and FORGE classification before specification begins.
302
263
 
@@ -437,12 +398,17 @@ Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this
437
398
 
438
399
  ## Agents
439
400
 
440
- - \`Researcher-Alpha\` Primary approach
441
- - \`Researcher-Beta\` — Trade-offs
442
- - \`Researcher-Gamma\` Cross-domain patterns
443
- - \`Researcher-Delta\` Feasibility
401
+ | Agent | Role | When |
402
+ |-------|------|------|
403
+ | **Researcher-Alpha** | Contrarian analysis | Standard+ |
404
+ | **Researcher-Beta** | First-principles analysis | Standard+ (decision fork exists) |
405
+ | **Researcher-Gamma** | Cross-domain patterns | Critical only |
406
+ | **Researcher-Delta** | Feasibility, implementation path | Standard+ |
407
+
408
+ Floor: 0 researchers. Standard: ≤2. Critical: full 4.
444
409
 
445
- ${n(`knowledge`,"| `c4-architecture` | C4 diagrams for system structure changes | When visualizing architecture |\n| `adr-skill` | ADRs for non-trivial decisions | Critical tier — document architecture decisions |")}
410
+ ${e([`c4-architecture`,`adr-skill`,`multi-agents-development`])}
411
+ ${t}
446
412
 
447
413
  ## Completion Criteria
448
414
 
@@ -451,10 +417,6 @@ ${n(`knowledge`,"| `c4-architecture` | C4 diagrams for system structure changes
451
417
  - [ ] Brainstorming completed (for Standard+ tier)
452
418
  - [ ] Key design decisions documented with rationale
453
419
  - [ ] User approval received (🛑 MANDATORY STOP)
454
-
455
- ${r(`- **Design decisions**: Chosen approach and rejected alternatives
456
- - **Architecture patterns**: New patterns or patterns that must be followed
457
- - **Constraints discovered**: Technical, compatibility, performance limits`)}
458
420
  `},{file:`steps/execute/README.md`,content:`---
459
421
  name: execute
460
422
  description: Implement tasks from the task breakdown, dispatching agents in parallel where possible.
@@ -555,7 +517,8 @@ Template:
555
517
  - File-modifying agents: parallel ONLY on different files
556
518
  - Max 4 concurrent file-modifying agents
557
519
 
558
- ${n(`knowledge`,"| `session-handoff` | Context preservation for long-running execution | When execution spans sessions or context is filling |",e)}
520
+ ${e([`session-handoff`])}
521
+ ${t}
559
522
 
560
523
  ## Completion Criteria
561
524
 
@@ -564,10 +527,6 @@ ${n(`knowledge`,"| `session-handoff` | Context preservation for long-running exe
564
527
  - [ ] \`test_run({})\` passes
565
528
  - [ ] No blocked items remaining
566
529
  - [ ] \`{{artifacts_path}}/progress.md\` written
567
-
568
- ${r(`- **Implementation decisions**: Why specific approaches were chosen
569
- - **Patterns established**: New conventions or patterns to follow
570
- - **Gotchas encountered**: Edge cases, workarounds, non-obvious behaviors`)}
571
530
  `},{file:`steps/plan/README.md`,content:`---
572
531
  name: plan
573
532
  description: Analyze the codebase, design the architecture, and create an implementation plan.
@@ -663,7 +622,8 @@ Template:
663
622
 
664
623
  The Planner agent (\`Planner.agent.md\`) owns the \`{{artifacts_path}}/plan.md\` artifact. Pass spec content, Explorer findings, and artifacts path as context.
665
624
 
666
- ${n(`knowledge`,"| `adr-skill` | ADRs for non-trivial technical decisions | When plan involves architecture choices that need documentation |\n| `c4-architecture` | C4 diagrams for system structure changes | When plan modifies system architecture |")}
625
+ ${e([`adr-skill`,`c4-architecture`])}
626
+ ${t}
667
627
 
668
628
  ## Completion Criteria
669
629
 
@@ -673,10 +633,6 @@ ${n(`knowledge`,"| `adr-skill` | ADRs for non-trivial technical decisions | When
673
633
  - [ ] Dependency graph has no circular dependencies
674
634
  - [ ] Risks identified with mitigations
675
635
  - [ ] \`{{artifacts_path}}/plan.md\` written
676
-
677
- ${r(`- **Task dependencies**: Ordering constraints and parallel opportunities
678
- - **Risk assessment**: Risks and mitigations
679
- - **Resource decisions**: File ownership, module boundaries, integration points`)}
680
636
  `},{file:`steps/spec/README.md`,content:`---
681
637
  name: spec
682
638
  description: Elicit requirements, clarify scope, and define acceptance criteria through dialogue.
@@ -798,7 +754,8 @@ Key Clarifications:
798
754
 
799
755
  Use \`brainstorming\` for creative/design exploration before formalizing requirements. Use \`requirements-clarity\` to score and iterate until the spec is unambiguous.
800
756
 
801
- ${n(`remember`,"| `requirements-clarity` | Score requirements 0-100, iterate until ≥90 | Before writing spec — ensures requirements are clear enough |")}
757
+ ${e([`requirements-clarity`])}
758
+ ${t}
802
759
 
803
760
  ## Completion Criteria
804
761
 
@@ -807,10 +764,6 @@ ${n(`remember`,"| `requirements-clarity` | Score requirements 0-100, iterate unt
807
764
  - [ ] Requirements clarity score ≥ 90
808
765
  - [ ] No open questions remain
809
766
  - [ ] \`{{artifacts_path}}/spec.md\` written
810
-
811
- ${r(`- **Requirements clarified**: Ambiguities resolved and assumptions validated
812
- - **Scope boundaries**: What the spec covers and excludes
813
- - **Acceptance criteria**: Key testable conditions that define "done"`)}
814
767
  `},{file:`steps/task/README.md`,content:`---
815
768
  name: task
816
769
  description: Break the implementation plan into ordered, atomic tasks with deps and agent assignments.
@@ -909,7 +862,8 @@ Use the template-driven graph for the dependency view; if you add summary conten
909
862
 
910
863
  Planner does the decomposition; Architect-Reviewer validates the task graph.
911
864
 
912
- ${n(`remember`)}
865
+ ${e([])}
866
+ ${t}
913
867
 
914
868
  ## Completion Criteria
915
869
 
@@ -919,10 +873,6 @@ ${n(`remember`)}
919
873
  - [ ] Parallelism opportunities identified
920
874
  - [ ] Architect review confirms no integration risks
921
875
  - [ ] \`{{artifacts_path}}/tasks.md\` written
922
-
923
- ${r(`- **Task decomposition rationale**: Why tasks were split this way
924
- - **Interface contracts**: APIs, types, or data shapes tasks depend on
925
- - **Coordination points**: Where tasks interact and handoff requirements`)}
926
876
  `},{file:`steps/verify/README.md`,content:`---
927
877
  name: verify
928
878
  description: Dual code review, architecture review, security review, and test validation.
@@ -953,18 +903,17 @@ Perform multi-perspective validation through dual code review, architecture revi
953
903
  ## Process
954
904
 
955
905
  1. **Load all artifacts** — read spec, plan, tasks, progress
956
- 2. **Dual code review** (parallel):
957
- - Code-Reviewer-Alpha: correctness, conventions, quality
958
- - Code-Reviewer-Beta: edge cases, error handling, maintainability
959
- 3. **Architecture review** (parallel with code review):
960
- - Architect-Reviewer-Alpha: alignment with plan and ADRs
961
- - Architect-Reviewer-Beta: long-term maintainability and evolution
962
- 4. **Security review**:
963
- - Security agent: OWASP Top 10, auth/authz, input validation, secrets
906
+ 2. **Determine review depth from FORGE tier:**
907
+ - **Standard**: One code review (Code-Reviewer-Alpha). Security only if auth/input/secrets/deps in changed scope. Architecture only for public contracts or cross-module changes.
908
+ - **Critical**: Dual code review, dual architecture review, security review.
909
+ 3. **Code review** review changed files for correctness, quality, conventions, error handling
910
+ 4. **Conditional reviews** (triggered by risk, not tier alone):
911
+ - Security: when changed scope touches auth, secrets, input validation, deps, transport
912
+ - Architecture: when plan includes boundary changes, new modules, public API changes
964
913
  5. **Quality gates** — \`check({})\` + \`test_run({})\` must pass
965
914
  6. **Blast radius** — \`blast_radius({ path: ".", files: [...] })\` on all modified files
966
915
  7. **Acceptance criteria** — Verify each spec acceptance criterion is met
967
- 8. **FORGE gate** — \`evidence_map({ action: "gate" })\` for final quality assessment
916
+ 8. **FORGE gate** — \`evidence_map({ action: "gate", task_id: "<task_id>" })\` for final quality assessment
968
917
  9. **Synthesize report** — merge reviewer findings into a unified verdict
969
918
 
970
919
  ## Evidence Map Gate Detail
@@ -972,7 +921,7 @@ Perform multi-perspective validation through dual code review, architecture revi
972
921
  After the process steps above, the FORGE gate must return YIELD:
973
922
 
974
923
  - **YIELD** → All claims verified, proceed to completion
975
- - **HOLD** → Fix unresolved claims, re-gate (max 2 retries)
924
+ - **HOLD** → Fix unresolved claims, re-gate (max 2 retries, not 3)
976
925
  - **HARD_BLOCK** → Contract-type unknowns detected, escalate to user
977
926
 
978
927
  Never declare verification complete without YIELD.
@@ -1020,33 +969,31 @@ APPROVE | REQUEST CHANGES
1020
969
 
1021
970
  ## Agents
1022
971
 
1023
- | Agent | Role |
1024
- |-------|------|
1025
- | **Code-Reviewer-Alpha** | Correctness, quality, conventions |
1026
- | **Code-Reviewer-Beta** | Edge cases, error handling, maintainability |
1027
- | **Architect-Reviewer-Alpha** | Alignment with plan and ADRs |
1028
- | **Architect-Reviewer-Beta** | Long-term evolution |
1029
- | **Security** | OWASP, auth, input validation |
972
+ | Agent | Role | When |
973
+ |-------|------|------|
974
+ | **Code-Reviewer-Alpha** | Correctness, quality, conventions | Always (Standard+) |
975
+ | **Code-Reviewer-Beta** | Edge cases, error handling, maintainability | Critical only |
976
+ | **Architect-Reviewer-Alpha** | Alignment with plan and ADRs | Public contract / cross-module changes |
977
+ | **Architect-Reviewer-Beta** | Long-term evolution | Critical only |
978
+ | **Security** | OWASP, auth, input validation | When scope touches auth/secrets/input/transport |
1030
979
 
1031
- **Parallelism**: All 5 reviewers can run in parallel read-only.
980
+ **Parallelism**: Active reviewers run in parallel (read-only).
1032
981
 
1033
- ${n(`remember`,"| `lesson-learned` | Extract engineering principles from completed work | After verification — capture lessons from the implementation |\n| `session-handoff` | Context preservation for session continuity | When verification spans sessions or for final handoff |",t)}
982
+ ${e([`lesson-learned`,`session-handoff`])}
983
+ ${t}
984
+ ${n}
1034
985
 
1035
986
  ## Completion Criteria
1036
987
 
1037
- - [ ] Dual code review complete (2 reviewers)
1038
- - [ ] Architecture review complete (2 reviewers)
1039
- - [ ] Security review complete
988
+ - [ ] Dual code review complete (2 reviewers, Critical) or single (Standard)
989
+ - [ ] Architecture review complete (when triggered)
990
+ - [ ] Security review complete (when triggered)
1040
991
  - [ ] \`check({})\` passes
1041
992
  - [ ] \`test_run({})\` passes
1042
993
  - [ ] All spec acceptance criteria verified
1043
994
  - [ ] FORGE gate passed (YIELD)
1044
995
  - [ ] \`{{artifacts_path}}/verify-report.md\` written with clear verdict
1045
-
1046
- ${r(`- **Test coverage gaps**: Areas that couldn't be fully tested and why
1047
- - **Quality findings**: Issues found during verification and their resolutions
1048
- - **Session checkpoint**: What was accomplished, decisions made, remaining work`)}
1049
- `}],"aikit-basic":[{file:`README.md`,content:"# aikit:basic — Quick Development Flow\n\nQuick development flow for **bug fixes, small features, and refactoring**.\n\n## Steps\n\n| # | Step | Skill | Produces | Requires | Agents |\n|---|------|-------|----------|----------|--------|\n| 1 | **Design Gate** | `steps/design/README.md` | `design-decisions.md` | — | Researcher-Alpha/Beta/Gamma/Delta |\n| 2 | **Assessment** | `steps/assess/README.md` | `assessment.md` | `design-decisions.md` | Explorer, Researcher-Alpha |\n| 3 | **Implementation** | `steps/implement/README.md` | `progress.md` | `assessment.md` | Implementer, Frontend |\n| 4 | **Verification** | `steps/verify/README.md` | `verify-report.md` | `progress.md` | Code-Reviewer-Alpha, Security |\n\n## How It Works\n\nEach step has a **README.md**. Orchestrator reads it via `flow({ action: 'read' })` and delegates work.\n\n### Step 1: Design Gate\n- **Auto-skips** for bug fixes and refactors (produces minimal `design-decisions.md` noting the skip)\n- For small features: runs quick brainstorming, FORGE classification, and optional decision protocol\n- Read `steps/design/README.md` for the full decision tree\n\n### Step 2: Assessment\n- Explore the codebase to understand scope and impact\n- Use `search`, `scope_map`, `file_summary`, `compact` to gather context\n- Identify the approach and produce `assessment.md`\n\n### Step 3: Implementation\n- Write code following the assessment plan\n- The Orchestrator dispatches Implementer/Frontend agents with specific file scopes\n- Follow TDD practices where applicable\n\n### Step 4: Verification\n- Code review, test execution, security check\n- Run `check({})` + `test_run({})` + `blast_radius({})`\n- Produce `verify-report.md` with findings\n\n## Using Skills Inside Steps\n\nWhen the Orchestrator activates a step:\n\n1. **Read the instruction first** — `flow({ action: 'read' })` returns the current step README.md\n2. **Follow step instructions** — primary guide\n3. **Delegate to listed agents** — each step lists which agents are appropriate\n4. **Produce the required artifact** — the step's `produces` field specifies the artifact file\n5. **Check dependencies** — required prior artifacts must exist\n6. **Report status** — agents report `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED` to the Orchestrator\n\n## Artifacts\n\nArtifacts are stored under `.flows/{topic}/`. `{{artifacts_path}}` resolves at runtime.\n"},{file:`steps/assess/README.md`,content:`---
996
+ `}],"aikit-basic":[{file:`README.md`,content:"# aikit:basic — Quick Development Flow\n\nQuick development flow for **bug fixes, small features, and refactoring**.\n\n## Steps\n\n| # | Step | Skill | Produces | Requires | Agents |\n|---|------|-------|----------|----------|--------|\n| 1 | **Design Gate** | `steps/design/README.md` | `design-decisions.md` | — | Researcher-Alpha, Researcher-Delta |\n| 2 | **Assessment** | `steps/assess/README.md` | `assessment.md` | `design-decisions.md` | Explorer, Researcher-Alpha |\n| 3 | **Implementation** | `steps/implement/README.md` | `progress.md` | `assessment.md` | Implementer, Frontend |\n| 4 | **Verification** | `steps/verify/README.md` | `verify-report.md` | `progress.md` | Code-Reviewer-Alpha, Security |\n\n## How It Works\n\nEach step has a **README.md**. Orchestrator reads it via `flow({ action: 'read' })` and delegates work.\n\n### Step 1: Design Gate\n- **Auto-skips** for bug fixes and refactors (produces minimal `design-decisions.md` noting the skip)\n- For small features: runs quick brainstorming, FORGE classification, and optional decision protocol\n- Read `steps/design/README.md` for the full decision tree\n\n### Step 2: Assessment\n- Explore the codebase to understand scope and impact\n- Use `search`, `scope_map`, `file_summary`, `compact` to gather context\n- Identify the approach and produce `assessment.md`\n\n### Step 3: Implementation\n- Write code following the assessment plan\n- The Orchestrator dispatches Implementer/Frontend agents with specific file scopes\n- Follow TDD practices where applicable\n\n### Step 4: Verification\n- Code review, test execution, security check\n- Run `check({})` + `test_run({})` + `blast_radius({})`\n- Produce `verify-report.md` with findings\n\n## Using Skills Inside Steps\n\nWhen the Orchestrator activates a step:\n\n1. **Read the instruction first** — `flow({ action: 'read' })` returns the current step README.md\n2. **Follow step instructions** — primary guide\n3. **Delegate to listed agents** — each step lists which agents are appropriate\n4. **Produce the required artifact** — the step's `produces` field specifies the artifact file\n5. **Check dependencies** — required prior artifacts must exist\n6. **Report status** — agents report `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED` to the Orchestrator\n\n## Artifacts\n\nArtifacts are stored under `.flows/{topic}/`. `{{artifacts_path}}` resolves at runtime.\n"},{file:`steps/assess/README.md`,content:`---
1050
997
  name: assess
1051
998
  description: Understand scope, analyze the codebase, and identify the approach.
1052
999
  ---
@@ -1127,7 +1074,8 @@ Template:
1127
1074
 
1128
1075
  Use Explorer first for breadth, then Researcher-Alpha for depth.
1129
1076
 
1130
- ${n(`remember`,"| `c4-architecture` | C4 diagrams — system context, container, component, deployment | When visualizing system structure during assessment |\n| `adr-skill` | ADRs — create, review, maintain | When assessment reveals non-trivial design decisions |")}
1077
+ ${e([`c4-architecture`,`adr-skill`])}
1078
+ ${t}
1131
1079
 
1132
1080
  ## Completion Criteria
1133
1081
 
@@ -1136,11 +1084,12 @@ ${n(`remember`,"| `c4-architecture` | C4 diagrams — system context, container,
1136
1084
  - [ ] Risks documented with mitigations
1137
1085
  - [ ] No unresolved open questions that block implementation
1138
1086
  - [ ] \`{{artifacts_path}}/assessment.md\` written
1087
+ `},{file:`steps/design/README.md`,content:`---
1088
+ name: design
1089
+ description: Evaluate task type, classify risk, run lightweight brainstorming for small features. Auto-skips for bug fixes and refactors.
1090
+ ---
1139
1091
 
1140
- ${r(`- **Codebase discoveries**: File locations, patterns, or dependency relationships found during assessment
1141
- - **Problem diagnosis**: Root cause, contributing factors, affected components
1142
- - **Scope decisions**: What's in scope, what's excluded, and why`)}
1143
- `},{file:`steps/design/README.md`,content:`# Design Gate — Basic Flow
1092
+ # Design Gate Basic Flow
1144
1093
 
1145
1094
  Lightweight design gate for bug fixes, small features, and refactoring. Evaluates task type and whether design work is needed.
1146
1095
 
@@ -1188,12 +1137,12 @@ For small features that need minimal design:
1188
1137
  - What is the user trying to achieve?
1189
1138
  - What are the constraints?
1190
1139
  - What is the simplest approach?
1191
- 3. **Decision Protocol** (if technical decisions exist) — Follow the full 3-phase multi-model decision protocol:
1192
- - **Phase 1**: Launch ALL 4 Researcher variants in parallel (Alpha/Beta/Gamma/Delta)
1193
- - **Phase 2**: Anonymize outputs as A/B/C/D, run peer review round (4 reviewers in parallel)
1194
- - **Phase 3**: Synthesize into structured verdict (Agrees / Clashes / Blind Spots / Recommendation / First Step)
1195
- - Present verdict visually using \`present({ schemaVersion: 1, title: "Decision Verdict", blocks: [...] })\`; use \`table\` for multi-approach comparisons and \`markdown\` (bullet list) for recommendations/blind spots. NEVER \`code\` blocks for structured data. Produce ADR for Standard+ tiers
1196
- 4. **Write \`{{artifacts_path}}/design-decisions.md\`** to disk:
1140
+ 3. **Decision Protocol** (if technical decisions exist) — Adaptive depth by tier:
1141
+ - **Floor**: No researcher. Decide inline from existing knowledge.
1142
+ - **Standard**: At most 2 researchers (Alpha + Delta). Skip peer review. Synthesize directly.
1143
+ - **Critical**: Recommend migrating to \`aikit:advanced\` for full protocol. If user keeps Basic, escalate gates but do not launch 4 researchers. **User must confirm** before proceeding with escalated gates.
1144
+ - Present verdict using \`present\` with \`kv\` and \`markdown\` blocks. Use \`knowledge({ action: "remember", ... })\` for the decision.
1145
+ 4. **Write \`{{artifacts_path}}/design-decisions.md\`** to disk:
1197
1146
 
1198
1147
  \`\`\`markdown
1199
1148
  ## Design Decisions
@@ -1230,19 +1179,21 @@ Write \`{{artifacts_path}}/design-decisions.md\` to disk. **You MUST create this
1230
1179
 
1231
1180
  ## Agents
1232
1181
 
1233
- - \`Researcher-Alpha\`, \`Researcher-Beta\`, \`Researcher-Gamma\`, \`Researcher-Delta\` — parallel research during decision protocol
1182
+ | Agent | Role |
1183
+ |-------|------|
1184
+ | **Researcher-Alpha** | Primary analysis (Standard+ tier) |
1185
+ | **Researcher-Delta** | Feasibility (Standard tier, when needed) |
1234
1186
 
1235
- ${n(`remember`,"| `c4-architecture` | C4 diagrams system context, container, component, deployment | When visualizing system structure during design |\n| `adr-skill` | ADRs — create, review, maintain | When making non-trivial design or technology decisions |")}
1187
+ Floor tier uses 0 researchers. Standard uses ≤2. Critical suggests migrating to \`aikit:advanced\`.
1188
+
1189
+ ${e([`brainstorming`,`adr-skill`])}
1190
+ ${t}
1236
1191
 
1237
1192
  ## Completion Criteria
1238
1193
 
1239
1194
  - [ ] \`{{artifacts_path}}/design-decisions.md\` written to disk (NOT just presented in chat)
1240
1195
  - [ ] FORGE tier determined (for small features)
1241
1196
  - [ ] Key design decisions documented
1242
-
1243
- ${r(`- **Design decisions**: Chosen approach and rejected alternatives
1244
- - **Architecture patterns**: New patterns or patterns that must be followed
1245
- - **Constraints discovered**: Technical, compatibility, performance limits`)}
1246
1197
  `},{file:`steps/implement/README.md`,content:`---
1247
1198
  name: implement
1248
1199
  description: Write code following the assessment plan, using TDD where applicable.
@@ -1331,7 +1282,8 @@ Template:
1331
1282
 
1332
1283
  Dispatch Implementer for backend/logic changes, Frontend for UI changes. They can run in parallel on different files.
1333
1284
 
1334
- ${n(`remember`,"| `session-handoff` | Context preservation for session transfers | When implementation is long-running or context may fill up |",e)}
1285
+ ${e([`session-handoff`])}
1286
+ ${t}
1335
1287
 
1336
1288
  ## Completion Criteria
1337
1289
 
@@ -1340,10 +1292,6 @@ ${n(`remember`,"| `session-handoff` | Context preservation for session transfers
1340
1292
  - [ ] \`test_run({})\` passes (no test failures)
1341
1293
  - [ ] No files modified outside assessed scope
1342
1294
  - [ ] \`{{artifacts_path}}/progress.md\` written
1343
-
1344
- ${r(`- **Implementation decisions**: Why specific approaches were chosen
1345
- - **Patterns established**: New conventions or patterns to follow
1346
- - **Gotchas encountered**: Edge cases, workarounds, non-obvious behaviors`)}
1347
1295
  `},{file:`steps/verify/README.md`,content:`---
1348
1296
  name: verify
1349
1297
  description: Review code changes, run tests, validate correctness and quality.
@@ -1383,7 +1331,7 @@ If prerequisites are missing or incomplete:
1383
1331
  - No unnecessary changes (scope creep)
1384
1332
  3. **Run quality gates** — \`check({})\` + \`test_run({})\` must pass
1385
1333
  4. **Blast radius** — \`blast_radius({ path: ".", files: [...] })\` to assess impact
1386
- 5. **Security scan** — Check for OWASP Top 10 issues in changed code
1334
+ 5. **Conditional security scan** — Check for OWASP Top 10 only when scope touches auth, secrets, input validation, deps, or transport
1387
1335
  6. **Write report** — document findings with PASS/FAIL verdict
1388
1336
 
1389
1337
  ## Outputs
@@ -1414,14 +1362,16 @@ Template:
1414
1362
 
1415
1363
  ## Agents
1416
1364
 
1417
- | Agent | Role |
1418
- |-------|------|
1419
- | **Code-Reviewer-Alpha** | Correctness, quality, conventions |
1420
- | **Security** | Vulnerability analysis, OWASP compliance |
1365
+ | Agent | Role | When |
1366
+ |-------|------|------|
1367
+ | **Code-Reviewer-Alpha** | Correctness, quality, conventions | Always |
1368
+ | **Security** | Vulnerability analysis, OWASP compliance | Only when scope touches auth/secrets/input/transport |
1421
1369
 
1422
- Run both in parallel — they review different aspects of the same changes.
1370
+ Run both in parallel when active — they review different aspects.
1423
1371
 
1424
- ${n(`remember`,"| `lesson-learned` | Extract engineering lessons from completed work via git history | After verification completes — capture principles from what was built |\n| `session-handoff` | Context preservation for session transfers | When verification is final step and session context should be saved |",t)}
1372
+ ${e([`lesson-learned`,`session-handoff`])}
1373
+ ${t}
1374
+ ${n}
1425
1375
 
1426
1376
  ## Completion Criteria
1427
1377
 
@@ -1431,8 +1381,4 @@ ${n(`remember`,"| `lesson-learned` | Extract engineering lessons from completed
1431
1381
  - [ ] Security review complete
1432
1382
  - [ ] Blast radius assessed
1433
1383
  - [ ] \`{{artifacts_path}}/verify-report.md\` written with clear PASS/FAIL verdict
1434
-
1435
- ${r(`- **Test coverage gaps**: Areas that couldn't be fully tested and why
1436
- - **Quality findings**: Issues found during verification and their resolutions
1437
- - **Session checkpoint**: What was accomplished, decisions made, remaining work`)}
1438
- `}]};export{i as FLOWS};
1384
+ `}]};export{r as FLOWS};