@vpxa/aikit 0.1.99 → 0.1.100

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 (36) hide show
  1. package/README.md +29 -33
  2. package/package.json +1 -2
  3. package/packages/aikit-client/dist/index.d.ts +27 -27
  4. package/packages/aikit-client/dist/index.js +2 -2
  5. package/packages/analyzers/dist/index.js +2 -2
  6. package/packages/cli/dist/index.js +2 -2
  7. package/packages/cli/dist/init-DlY4IHCF.js +7 -0
  8. package/packages/cli/dist/{templates-DVcEiTlc.js → templates-Dz2d2veK.js} +9 -9
  9. package/packages/cli/dist/{user-Dj8KE0_0.js → user-DfEC00FY.js} +1 -1
  10. package/packages/core/dist/index.d.ts +8 -8
  11. package/packages/core/dist/index.js +1 -1
  12. package/packages/dashboard/dist/assets/{index-C6D-PCp0.js → index-CxrC6OtB.js} +3 -3
  13. package/packages/dashboard/dist/index.html +1 -1
  14. package/packages/enterprise-bridge/dist/index.d.ts +1 -1
  15. package/packages/enterprise-bridge/dist/index.js +1 -1
  16. package/packages/indexer/dist/index.d.ts +6 -6
  17. package/packages/server/dist/index.d.ts +1 -1
  18. package/packages/server/dist/index.js +1 -1
  19. package/packages/server/dist/server-DfCR_Bix.js +1282 -0
  20. package/packages/server/dist/{version-check-AMfxaZUw.js → version-check-Bj07vc5x.js} +1 -1
  21. package/packages/store/dist/index.d.ts +9 -22
  22. package/packages/store/dist/index.js +6 -6
  23. package/packages/tools/dist/index.d.ts +16 -15
  24. package/packages/tools/dist/index.js +6 -6
  25. package/scaffold/dist/adapters/intellij.mjs +3 -0
  26. package/scaffold/dist/adapters/zed.mjs +4 -0
  27. package/scaffold/dist/definitions/agents.mjs +1 -1
  28. package/scaffold/dist/definitions/bodies.mjs +16 -16
  29. package/scaffold/dist/definitions/flows.mjs +32 -32
  30. package/scaffold/dist/definitions/hooks.mjs +1 -1
  31. package/scaffold/dist/definitions/prompts.mjs +7 -7
  32. package/scaffold/dist/definitions/protocols.mjs +28 -24
  33. package/scaffold/dist/definitions/skills.mjs +67 -67
  34. package/scaffold/dist/definitions/tools.mjs +1 -1
  35. package/packages/cli/dist/init-CVtbu7zj.js +0 -7
  36. package/packages/server/dist/server-DZ1V42_x.js +0 -1282
@@ -0,0 +1,4 @@
1
+ import{AGENTS as e}from"../definitions/agents.mjs";import{PROMPTS as t}from"../definitions/prompts.mjs";function n(e){return e.replace(/^./,e=>e.toLowerCase())}function r(e){return e?.length?[`## Skills`,``,`| Skill | When to load |`,`|-------|--------------|`,...e.map(([e,t])=>`| ${e} | ${t} |`)].join(`
2
+ `):``}function i(e,t,r,i,a){let o=[`# ${e} - ${t}`,``,`> ${r}`,``,`You are the **${e}**, ${n(r)}.`];return i&&o.push(``,i.trim()),a&&o.push(``,a),o.push(``),o.join(`
3
+ `)}function a(){let n=[];for(let[e,r]of Object.entries(t)){let t=[`# aikit ${e}`,``,`> ${r.description}`,``,r.content.trim(),``].join(`
4
+ `);n.push({path:`.zed/prompts/aikit-${e}.md`,content:t})}for(let[t,a]of Object.entries(e)){let e=a.title||t,o=r(a.skills);if(a.variants){for(let[r,s]of Object.entries(a.variants)){let c=`${t}-${r}`,l=s.description||a.description;n.push({path:`.zed/prompts/agent-${c}.md`,content:i(c,e,l,s.bodyAddendum,o)})}continue}n.push({path:`.zed/prompts/agent-${t}.md`,content:i(t,e,a.description,``,o)})}return n}export{a as generateZed};
@@ -62,7 +62,7 @@ During multi-model decision sessions, apply the **Executor** lens:
62
62
  - Reject elegant theory that can't survive contact with the codebase
63
63
 
64
64
  Your lens: implementation feasibility + executor. Prefer \`measure\` + \`blast_radius\` +
65
- \`analyze_patterns\` over abstract reasoning.`}}},"Code-Reviewer":{title:`The Quality Guardian`,description:`Code review specialist analyzing code for quality, security, performance, and maintainability`,argumentHint:`File path, PR, or code to review`,toolRole:`reviewer`,sharedBase:`code-reviewer-base`,category:`review`,skills:[[`aikit`,`**Always** — AI Kit tool signatures, search, analysis`],[`typescript`,`When reviewing TypeScript code — type patterns, best practices`]],variants:{Alpha:{description:`Primary code reviewer`,identity:`, the primary Code-Reviewer agent. Your lens is **compliance and red-teaming** — you hunt for correctness bugs, security holes, and contract violations that will break in production.`,bodyAddendum:`## Review Lens: Compliance & Red-Team
65
+ \`analyze({ aspect: "patterns", ... })\` over abstract reasoning.`}}},"Code-Reviewer":{title:`The Quality Guardian`,description:`Code review specialist analyzing code for quality, security, performance, and maintainability`,argumentHint:`File path, PR, or code to review`,toolRole:`reviewer`,sharedBase:`code-reviewer-base`,category:`review`,skills:[[`aikit`,`**Always** — AI Kit tool signatures, search, analysis`],[`typescript`,`When reviewing TypeScript code — type patterns, best practices`]],variants:{Alpha:{description:`Primary code reviewer`,identity:`, the primary Code-Reviewer agent. Your lens is **compliance and red-teaming** — you hunt for correctness bugs, security holes, and contract violations that will break in production.`,bodyAddendum:`## Review Lens: Compliance & Red-Team
66
66
 
67
67
  Your primary focus areas (in order of priority):
68
68
  1. **Correctness** — Logic errors, race conditions, null/undefined paths, off-by-one
@@ -377,7 +377,7 @@ status({}) # Check AI Kit he
377
377
  # If onboard not run → onboard({ path: "." }) # First-time codebase analysis
378
378
  flow_list({}) # See available flows
379
379
  # Select flow based on task → flow_start({ flow: "<name>", topic: "<task>" }) # Start flow — creates .flows/{topic}/
380
- list() # See stored knowledge
380
+ knowledge({ action: "list" }) # See stored knowledge
381
381
  search({ query: "SESSION CHECKPOINT", origin: "curated" }) # Resume prior work
382
382
  \`\`\`
383
383
 
@@ -388,14 +388,14 @@ search({ query: "SESSION CHECKPOINT", origin: "curated" }) # Resume prior wo
388
388
  | Intermediate result | \`stash({ key, value })\` |
389
389
  | Parallel A/B exploration (read-only) | \`lane({ action: 'create', name })\` → explore → \`lane({ action: 'diff', names })\` |
390
390
  | Milestone completed | \`checkpoint({ action: "save", name })\` |
391
- | Architecture decision made | \`remember({ title, content, category: "decisions" })\` |
392
- | Pattern discovered | \`remember({ title, content, category: "patterns" })\` |
391
+ | Architecture decision made | \`knowledge({ action: "remember", title, content, category: "decisions" })\` |
392
+ | Pattern discovered | \`knowledge({ action: "remember", title, content, category: "patterns" })\` |
393
393
  | About to propose new approach | \`search({ query })\` — check if already decided |
394
394
 
395
395
  ### End (MUST do)
396
396
 
397
397
  \`session_digest({ persist: true })\` # Auto-capture session activity
398
- \`remember({ title: "Session checkpoint: <topic>", content: "<decisions, blockers, next steps>", category: "conventions" })\`
398
+ \`knowledge({ action: "remember", title: "Session checkpoint: <topic>", content: "<decisions, blockers, next steps>", category: "conventions" })\`
399
399
 
400
400
  ## Flows
401
401
 
@@ -419,7 +419,7 @@ Load the \`aikit\` skill for full tool documentation, workflow chains, and sessi
419
419
 
420
420
  ## Planning Workflow
421
421
 
422
- 1. **AI Kit Recall** — Search for past plans, architecture decisions, known patterns. Check \`list()\` for stored knowledge.
422
+ 1. **AI Kit Recall** — Search for past plans, architecture decisions, known patterns. Check \`knowledge({ action: "list" })\` for stored knowledge.
423
423
  2. **FORGE Classify** — \`forge_classify({ task, files, root_path: "." })\` to determine complexity tier
424
424
  3. **FORGE Ground** — \`forge_ground\` to scope map, seed unknowns, load constraints
425
425
  4. **Research** — Delegate to Explorer and Researcher agents to gather context
@@ -501,7 +501,7 @@ When subagents complete, their visual outputs (from \`present\`) are NOT visible
501
501
  | \`c4-architecture\` | When the plan involves architectural changes — generate C4 diagrams |
502
502
  | \`adr-skill\` | When the plan involves non-trivial technical decisions — create executable ADRs |
503
503
  | \`session-handoff\` | When context window is filling up, planning session ending, or major milestone completed |
504
- | \`repo-access\` | When the plan involves accessing private, enterprise, or self-hosted repositories |`,Implementer:"**Read `AGENTS.md`** in the workspace root for project conventions and AI Kit protocol.\n\nLoad the `aikit` skill for full tool documentation, workflow chains, and session protocol.\n\n## Implementation Protocol\n\n1. **Understand scope** — Read the phase objective, identify target files\n2. **Write test first** (Red) — Create failing tests that define expected behavior\n3. **Implement** (Green) — Write minimal code to make tests pass\n4. **Refactor** — Clean up while keeping tests green\n5. **Validate** — `check`, `test_run`, `blast_radius`\n6. **Persist** — `remember` any decisions or patterns discovered\n\n## Rules\n\n- **Test-first always** — No implementation without a failing test\n- **Minimal code** — Don't build what isn't asked for\n- **Follow existing patterns** — Search AI Kit for conventions before creating new ones (`search(\"convention\")`, `list({ category: \"conventions\" })`)\n- **Never modify tests to make them pass** — Fix the implementation instead\n- **Run `check` after every change** — Catch errors early\n- **Loop-break** — If the same test fails 3 times with the same error after your fixes, STOP. Re-read the error from scratch, check your assumptions with `trace` or `symbol`, and try a fundamentally different approach. Do not attempt a 4th fix in the same direction\n- **Think-first for complex tasks** — If a task involves 3+ files or non-obvious logic, outline your approach before writing code. Check existing patterns with `search` first. Design, then implement\n\n## Pre-Edit Checklist (before modifying any file)\n\n1. **Understand consumers** — `graph({action:'find_nodes', name_pattern:'<target>'})` → `graph({action:'neighbors', node_id, direction:'incoming'})`. See who calls/imports before changing a contract.\n2. **Compress, don't raw-read** — `file_summary` then `compact({path, query})` for the specific area. Only `read_file` when you need exact lines for `replace_string_in_file`.\n3. **Snapshot risky edits** — `checkpoint({action:'save', label:'pre-<scope>'})` before cross-cutting changes. `checkpoint({action:'restore', ...})` if `check`/`test_run` fails.\n4. **Estimate blast radius** — `blast_radius({changed_files:[...]})` BEFORE editing when changing a public/shared symbol; re-run AFTER to confirm actual impact matches.\n5. **TDD when tests exist** — write/extend the failing test first, then minimum code to pass.\n\n## Post-Edit Checklist\n\n1. `check({})` — typecheck + lint must pass clean\n2. `test_run({})` — full suite or targeted pattern\n3. 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.",Frontend:"**Read `AGENTS.md`** in the workspace root for project conventions and AI Kit protocol.\n\nLoad the `aikit` skill for full tool documentation, workflow chains, and session protocol.\n\n## Frontend Protocol\n\n1. **Search KB** for existing component patterns and design tokens\n2. **Write component tests first** — Accessibility, rendering, interaction\n3. **Implement** — Follow existing component patterns, use design system tokens\n4. **Validate** — `check`, `test_run`, visual review\n5. **Persist** — `remember` new component patterns\n\n## Rules\n\n- **Accessibility first** — ARIA attributes, keyboard navigation, screen reader support\n- **Follow design system** — Use existing tokens, don't create one-off values\n- **Responsive by default** — Mobile-first, test all breakpoints\n- **Test-first** — Component tests before implementation\n\n## Frontend Exploration Mode\n\n| Need | Tool |\n|------|------|\n| Component dependency graph | `graph({action:'neighbors', node_id:'src/components/X.tsx', direction:'incoming'})` |\n| Stale / unused components | `dead_symbols({ path:'src/components' })` |\n| React / a11y / library API research | `web_search({ query })`, `web_fetch({ urls })` |\n| Component complexity hotspots | `measure({ path:'src/components' })` |\n| Verify a component's callers | `graph({action:'find_nodes', name_pattern})` → `neighbors` |\n\n## Visual Validation Protocol (post `test_run`)\n\n**Pre-flight (MANDATORY before any browser step):**\n1. Read `package.json` scripts — identify dev command (e.g. `dev`, `start`, `vite`)\n2. Determine default port (check script args, `vite.config.*`, or env)\n3. Check if dev server already running on port (attempt `http({ url:'http://localhost:<port>' })`)\n4. If NOT running, delegate to a helper or use `createAndRunTask` to start `npm run dev`\n in the background; wait for ready signal\n5. Capture the base URL\n\n**Validation:**\n6. `open_browser_page({ url })` — render target component page\n7. `screenshot_page` + `read_page` — capture visual + DOM\n8. Keyboard-only navigation check: simulate Tab/Enter/Escape via `type_in_page` —\n verify focus ring, activation, dismiss\n9. Compare against design tokens / Figma URL if supplied\n10. Fail fast if color contrast < 4.5:1 (WCAG AA) or focus indicator missing\n\nIf the pre-flight dev server cannot be started (e.g. sandbox), fall back to\n`compact` inspection of the component source + describe expected visual behavior.",Debugger:`**Read \`AGENTS.md\`** in the workspace root for project conventions and AI Kit protocol.
504
+ | \`repo-access\` | When the plan involves accessing private, enterprise, or self-hosted repositories |`,Implementer:"**Read `AGENTS.md`** in the workspace root for project conventions and AI Kit protocol.\n\nLoad the `aikit` skill for full tool documentation, workflow chains, and session protocol.\n\n## Implementation Protocol\n\n1. **Understand scope** — Read the phase objective, identify target files\n2. **Write test first** (Red) — Create failing tests that define expected behavior\n3. **Implement** (Green) — Write minimal code to make tests pass\n4. **Refactor** — Clean up while keeping tests green\n5. **Validate** — `check`, `test_run`, `blast_radius`\n6. **Persist** — `remember` any decisions or patterns discovered\n\n## Rules\n\n- **Test-first always** — No implementation without a failing test\n- **Minimal code** — Don't build what isn't asked for\n- **Follow existing patterns** — Search AI Kit for conventions before creating new ones (`search(\"convention\")`, `knowledge({ action: \"list\", category: \"conventions\" })`)\n- **Never modify tests to make them pass** — Fix the implementation instead\n- **Run `check` after every change** — Catch errors early\n- **Loop-break** — If the same test fails 3 times with the same error after your fixes, STOP. Re-read the error from scratch, check your assumptions with `trace` or `symbol`, and try a fundamentally different approach. Do not attempt a 4th fix in the same direction\n- **Think-first for complex tasks** — If a task involves 3+ files or non-obvious logic, outline your approach before writing code. Check existing patterns with `search` first. Design, then implement\n\n## Pre-Edit Checklist (before modifying any file)\n\n1. **Understand consumers** — `graph({action:'find_nodes', name_pattern:'<target>'})` → `graph({action:'neighbors', node_id, direction:'incoming'})`. See who calls/imports before changing a contract.\n2. **Compress, don't raw-read** — `file_summary` then `compact({path, query})` for the specific area. Only `read_file` when you need exact lines for `replace_string_in_file`.\n3. **Snapshot risky edits** — `checkpoint({action:'save', label:'pre-<scope>'})` before cross-cutting changes. `checkpoint({action:'restore', ...})` if `check`/`test_run` fails.\n4. **Estimate blast radius** — `blast_radius({changed_files:[...]})` BEFORE editing when changing a public/shared symbol; re-run AFTER to confirm actual impact matches.\n5. **TDD when tests exist** — write/extend the failing test first, then minimum code to pass.\n\n## Post-Edit Checklist\n\n1. `check({})` — typecheck + lint must pass clean\n2. `test_run({})` — full suite or targeted pattern\n3. 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.",Frontend:"**Read `AGENTS.md`** in the workspace root for project conventions and AI Kit protocol.\n\nLoad the `aikit` skill for full tool documentation, workflow chains, and session protocol.\n\n## Frontend Protocol\n\n1. **Search AI Kit** for existing component patterns and design tokens\n2. **Write component tests first** — Accessibility, rendering, interaction\n3. **Implement** — Follow existing component patterns, use design system tokens\n4. **Validate** — `check`, `test_run`, visual review\n5. **Persist** — `remember` new component patterns\n\n## Rules\n\n- **Accessibility first** — ARIA attributes, keyboard navigation, screen reader support\n- **Follow design system** — Use existing tokens, don't create one-off values\n- **Responsive by default** — Mobile-first, test all breakpoints\n- **Test-first** — Component tests before implementation\n\n## Frontend Exploration Mode\n\n| Need | Tool |\n|------|------|\n| Component dependency graph | `graph({action:'neighbors', node_id:'src/components/X.tsx', direction:'incoming'})` |\n| Stale / unused components | `dead_symbols({ path:'src/components' })` |\n| React / a11y / library API research | `web_search({ query })`, `web_fetch({ urls })` |\n| Component complexity hotspots | `measure({ path:'src/components' })` |\n| Verify a component's callers | `graph({action:'find_nodes', name_pattern})` → `neighbors` |\n\n## Visual Validation Protocol (post `test_run`)\n\n**Pre-flight (MANDATORY before any browser step):**\n1. Read `package.json` scripts — identify dev command (e.g. `dev`, `start`, `vite`)\n2. Determine default port (check script args, `vite.config.*`, or env)\n3. Check if dev server already running on port (attempt `http({ url:'http://localhost:<port>' })`)\n4. If NOT running, delegate to a helper or use `createAndRunTask` to start `npm run dev`\n in the background; wait for ready signal\n5. Capture the base URL\n\n**Validation:**\n6. `open_browser_page({ url })` — render target component page\n7. `screenshot_page` + `read_page` — capture visual + DOM\n8. Keyboard-only navigation check: simulate Tab/Enter/Escape via `type_in_page` —\n verify focus ring, activation, dismiss\n9. Compare against design tokens / Figma URL if supplied\n10. Fail fast if color contrast < 4.5:1 (WCAG AA) or focus indicator missing\n\nIf the pre-flight dev server cannot be started (e.g. sandbox), fall back to\n`compact` inspection of the component source + describe expected visual behavior.",Debugger:`**Read \`AGENTS.md\`** in the workspace root for project conventions and AI Kit protocol.
505
505
 
506
506
  Load the \`aikit\` skill for full tool documentation, workflow chains, and session protocol.
507
507
 
@@ -531,7 +531,7 @@ Choose the appropriate loop type:
531
531
  ### Phase 2: Reproduce
532
532
 
533
533
  1. \`search("error patterns")\` — check auto-captured error patterns and known issues
534
- 2. \`list({ tags: ["errors"] })\` — find prior troubleshooting knowledge
534
+ 2. \`knowledge({ action: "list", tags: ["errors"] })\` — find prior troubleshooting knowledge
535
535
  3. Run the feedback loop — confirm the error fires consistently
536
536
  4. If intermittent: add instrumentation, increase loop iterations, check race conditions
537
537
 
@@ -573,7 +573,7 @@ Load the \`aikit\` skill for full tool documentation, workflow chains, and sessi
573
573
  ## Refactoring Protocol
574
574
 
575
575
  1. **AI Kit Recall** — Search for established patterns and conventions
576
- 2. **Analyze** — \`graph\` (module dependency map), \`analyze_structure\`, \`analyze_patterns\`, \`dead_symbols\`, \`trace\` (impact chains)
576
+ 2. **Analyze** — \`graph\` (module dependency map), \`analyze({ aspect: "structure", ... })\`, \`analyze({ aspect: "patterns", ... })\`, \`dead_symbols\`, \`trace\` (impact chains)
577
577
  3. **Ensure test coverage** — Run existing tests, add coverage for untested paths
578
578
  4. **Refactor in small steps** — Each step must keep tests green
579
579
  5. **Validate** — \`check\`, \`test_run\`, \`blast_radius\` after each step
@@ -636,11 +636,11 @@ Load the \`aikit\` skill for full tool documentation, workflow chains, and sessi
636
636
  - \`synthesis-guide.md\` — project overview and architecture
637
637
  - \`patterns.md\` — established conventions (check for security-related patterns)
638
638
  - \`api-surface.md\` — exported function signatures (attack surface)
639
- 3. \`search("security vulnerabilities conventions")\` + \`list()\` for past findings
639
+ 3. \`search("security vulnerabilities conventions")\` + \`knowledge({ action: "list" })\` for past findings
640
640
 
641
641
  ## Security Review Protocol
642
642
 
643
- 1. **AI Kit Recall** — \`search("security findings <area>")\` + \`list()\` for past security decisions and known issues
643
+ 1. **AI Kit Recall** — \`search("security findings <area>")\` + \`knowledge({ action: "list" })\` for past security decisions and known issues
644
644
  2. **Audit** — Run \`audit\` for a comprehensive project health check, then \`find\` for specific vulnerability patterns
645
645
  3. **OWASP Top 10 Scan** — Check each category systematically
646
646
  4. **Dependency Audit** — Check for known CVEs in dependencies
@@ -649,7 +649,7 @@ Load the \`aikit\` skill for full tool documentation, workflow chains, and sessi
649
649
  7. **Input Validation** — Check all user inputs for injection vectors
650
650
  8. **Impact Analysis** — Use \`trace\` on sensitive functions, \`blast_radius\` on security-critical files
651
651
  9. **Report** — Severity-ranked findings with remediation guidance
652
- 10. **Persist** — \`remember({ title: "Security: <finding>", content: "<details, severity, remediation>", category: "troubleshooting" })\` for each significant finding
652
+ 10. **Persist** — \`knowledge({ action: "remember", title: "Security: <finding>", content: "<details, severity, remediation>", category: "troubleshooting" })\` for each significant finding
653
653
 
654
654
  ## Severity Levels
655
655
 
@@ -679,15 +679,15 @@ Load the \`aikit\` skill for full tool documentation, workflow chains, and sessi
679
679
  - \`synthesis-guide.md\` — project overview and architecture
680
680
  - \`structure.md\` — file tree and module purposes
681
681
  - \`patterns.md\` — established conventions
682
- 3. \`search("documentation conventions")\` + \`list()\` for existing docs and standards
682
+ 3. \`search("documentation conventions")\` + \`knowledge({ action: "list" })\` for existing docs and standards
683
683
 
684
684
  ## Documentation Protocol
685
685
 
686
- 1. **AI Kit Recall** — \`search("documentation <area>")\` + \`list()\` for existing docs, conventions, architecture decisions
687
- 2. **Analyze** — \`analyze_structure\`, \`analyze_entry_points\`, \`file_summary\`
686
+ 1. **AI Kit Recall** — \`search("documentation <area>")\` + \`knowledge({ action: "list" })\` for existing docs, conventions, architecture decisions
687
+ 2. **Analyze** — \`analyze({ aspect: "structure", ... })\`, \`analyze({ aspect: "entry_points", ... })\`, \`file_summary\`
688
688
  3. **Draft** — Write documentation following project conventions
689
689
  4. **Cross-reference** — Link to related docs, ensure consistency
690
- 5. **Persist** — \`remember({ title: "Docs: <standard>", content: "<details>", category: "conventions" })\` for new documentation standards
690
+ 5. **Persist** — \`knowledge({ action: "remember", title: "Docs: <standard>", content: "<details>", category: "conventions" })\` for new documentation standards
691
691
 
692
692
  ## Documentation Types
693
693
 
@@ -745,4 +745,4 @@ Rules adapted from *The Elements of Agent Style* (CC BY 4.0, Yue Zhao) and class
745
745
  | \`present\` | When presenting documentation previews, API tables, or architecture visuals to the user |
746
746
  | \`c4-architecture\` | When documenting system architecture — generate C4 Mermaid diagrams |
747
747
  | \`adr-skill\` | When documenting architecture decisions — create or update ADRs |
748
- | \`typescript\` | When documenting TypeScript APIs — type signatures, JSDoc patterns |`,Explorer:"**Read `AGENTS.md`** in the workspace root for project conventions and AI Kit protocol.\n\nLoad the `aikit` skill for full tool documentation, workflow chains, and session protocol.\n\n## MANDATORY FIRST ACTION\n\n1. Run `status({})` — if onboard shows ❌, run `onboard({ path: \".\" })` and wait for completion\n2. Note the **Onboard Directory** path from status output\n3. **Before exploring**, read relevant onboard artifacts using `compact({ path: \"<dir>/<file>\" })`:\n - `synthesis-guide.md` — project overview and architecture\n - `structure.md` — file tree and module purposes\n - `symbols.md` + `api-surface.md` — exported symbols\n - `dependencies.md` — import relationships\n - `code-map.md` — module graph\n4. Only use `find`, `symbol`, `trace`, `graph` for details NOT covered by artifacts\n\n## Exploration Protocol\n\n1. **AI Kit Recall** — `search` for existing analysis on this area\n2. **Discover** — Use `find`, `symbol`, `scope_map` to locate relevant files\n3. **Analyze** — Use `analyze_structure`, `analyze_dependencies`, `file_summary`\n4. **Compress** — Use `compact` for targeted file sections, `digest` when synthesizing 3+ sources, `stratum_card` for files you'll reference repeatedly\n5. **Map** — Build a picture of the subsystem: files, exports, dependencies, call chains\n6. **Report** — Structured findings with file paths and key observations\n\n## Exploration Modes\n\n| Goal | Tools |\n|------|-------|\n| Find files for a feature | `find`, `scope_map` |\n| Map a symbol's usage | `symbol`, `trace` |\n| Map module relationships | `graph({ action: 'neighbors' })` — import/export edges across packages |\n| Understand a package | `analyze_structure`, `analyze_dependencies`, `file_summary` |\n| Check impact of a change | `blast_radius` |\n\n## Output Format\n\n```markdown\n## Exploration: {topic}\n\n### Files Found\n- path/to/file.ts — purpose, key exports\n\n### Dependencies\n- package A → package B (via import)\n\n### Key Observations\n- Notable patterns, potential issues, architectural notes\n```\n\n## Rules\n\n- **Speed over depth** — Provide a useful map quickly, not an exhaustive analysis\n- **Read-only** — Never create, edit, or delete files\n- **Structured output** — Always return findings in the format above"};export{e as AGENT_BODIES};
748
+ | \`typescript\` | When documenting TypeScript APIs — type signatures, JSDoc patterns |`,Explorer:'**Read `AGENTS.md`** in the workspace root for project conventions and AI Kit protocol.\n\nLoad the `aikit` skill for full tool documentation, workflow chains, and session protocol.\n\n## MANDATORY FIRST ACTION\n\n1. Run `status({})` — if onboard shows ❌, run `onboard({ path: "." })` and wait for completion\n2. Note the **Onboard Directory** path from status output\n3. **Before exploring**, read relevant onboard artifacts using `compact({ path: "<dir>/<file>" })`:\n - `synthesis-guide.md` — project overview and architecture\n - `structure.md` — file tree and module purposes\n - `symbols.md` + `api-surface.md` — exported symbols\n - `dependencies.md` — import relationships\n - `code-map.md` — module graph\n4. Only use `find`, `symbol`, `trace`, `graph` for details NOT covered by artifacts\n\n## Exploration Protocol\n\n1. **AI Kit Recall** — `search` for existing analysis on this area\n2. **Discover** — Use `find`, `symbol`, `scope_map` to locate relevant files\n3. **Analyze** — Use `analyze({ aspect: "structure", ... })`, `analyze({ aspect: "dependencies", ... })`, `file_summary`\n4. **Compress** — Use `compact` for targeted file sections, `digest` when synthesizing 3+ sources, `stratum_card` for files you\'ll reference repeatedly\n5. **Map** — Build a picture of the subsystem: files, exports, dependencies, call chains\n6. **Report** — Structured findings with file paths and key observations\n\n## Exploration Modes\n\n| Goal | Tools |\n|------|-------|\n| Find files for a feature | `find`, `scope_map` |\n| Map a symbol\'s usage | `symbol`, `trace` |\n| Map module relationships | `graph({ action: \'neighbors\' })` — import/export edges across packages |\n| Understand a package | `analyze({ aspect: "structure", ... })`, `analyze({ aspect: "dependencies", ... })`, `file_summary` |\n| Check impact of a change | `blast_radius` |\n\n## Output Format\n\n```markdown\n## Exploration: {topic}\n\n### Files Found\n- path/to/file.ts — purpose, key exports\n\n### Dependencies\n- package A → package B (via import)\n\n### Key Observations\n- Notable patterns, potential issues, architectural notes\n```\n\n## Rules\n\n- **Speed over depth** — Provide a useful map quickly, not an exhaustive analysis\n- **Read-only** — Never create, edit, or delete files\n- **Structured output** — Always return findings in the format above'};export{e as AGENT_BODIES};
@@ -58,24 +58,24 @@ If \`docs/\` doesn't exist, run the **Architecture Blueprint Workflow** from the
58
58
  \`\`\`
59
59
  # Step 1: Generate content with AI Kit tools
60
60
  produce_knowledge({ path: "." }) # → Foundation for docs/README.md
61
- analyze_structure({ path: "." }) # → docs/architecture/overview.md structure
62
- analyze_diagram({ path: "." }) # → docs/architecture/ Mermaid diagrams
63
- analyze_dependencies({ path: "." }) # → docs/architecture/overview.md deps section
64
- analyze_entry_points({ path: "." }) # → docs/reference/api.md foundation
65
- analyze_patterns({ path: "." }) # → docs/architecture/overview.md patterns
61
+ analyze({ aspect: "structure", path: "." }) # → docs/architecture/overview.md structure
62
+ analyze({ aspect: "diagram", path: "." }) # → docs/architecture/ Mermaid diagrams
63
+ analyze({ aspect: "dependencies", path: "." }) # → docs/architecture/overview.md deps section
64
+ analyze({ aspect: "entry_points", path: "." }) # → docs/reference/api.md foundation
65
+ analyze({ aspect: "patterns", path: "." }) # → docs/architecture/overview.md patterns
66
66
 
67
67
  # Step 2: Create the docs/ tree from tool outputs
68
68
  docs/
69
69
  ├── README.md ← From produce_knowledge + project context
70
70
  ├── architecture/
71
- │ ├── overview.md ← From analyze_structure + analyze_dependencies + analyze_diagram
72
- │ └── components/ ← From analyze_symbols per major component
71
+ │ ├── overview.md ← From analyze(structure|dependencies|diagram)
72
+ │ └── components/ ← From analyze(symbols) per major component
73
73
  ├── decisions/
74
74
  │ └── index.md ← ADR log (delegate to adr-skill)
75
75
  ├── guides/
76
- │ └── testing.md ← From analyze_patterns test info
76
+ │ └── testing.md ← From analyze(patterns) test info
77
77
  └── reference/
78
- └── api.md ← From analyze_entry_points
78
+ └── api.md ← From analyze(entry_points)
79
79
  \`\`\`
80
80
 
81
81
  Use the Architecture Blueprint sections from the \`docs\` skill as the template for each document.
@@ -267,7 +267,7 @@ Load these skills BEFORE executing this step:
267
267
 
268
268
  | Skill | Purpose | When |
269
269
  |-------|---------|------|
270
- | \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
270
+ | \`aikit\` | Core MCP tools — search, analyze, knowledge, validate | Always (auto-loaded) |
271
271
  | \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
272
272
  | \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
273
273
  | \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
@@ -291,13 +291,13 @@ Load these skills BEFORE executing this step:
291
291
 
292
292
  ## Knowledge Capture
293
293
 
294
- Before completing this step, persist important findings using \`remember()\`:
294
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
295
295
 
296
296
  - **Design decisions**: Chosen approach and alternatives considered with trade-offs
297
297
  - **Architecture patterns**: New patterns introduced or existing patterns that must be followed
298
298
  - **Constraints discovered**: Technical limitations, compatibility requirements, or performance boundaries
299
299
 
300
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
300
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
301
301
  `},{file:`steps/execute/README.md`,content:`---
302
302
  name: execute
303
303
  description: Implement all tasks from the task breakdown, dispatching agents in parallel where possible.
@@ -392,7 +392,7 @@ Load these skills BEFORE executing this step:
392
392
 
393
393
  | Skill | Purpose | When |
394
394
  |-------|---------|------|
395
- | \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
395
+ | \`aikit\` | Core MCP tools — search, analyze, knowledge, validate | Always (auto-loaded) |
396
396
  | \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
397
397
  | \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
398
398
  | \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
@@ -436,13 +436,13 @@ Follow the \`multi-agents-development\` skill patterns for dispatch:
436
436
 
437
437
  ## Knowledge Capture
438
438
 
439
- Before completing this step, persist important findings using \`remember()\`:
439
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
440
440
 
441
441
  - **Implementation decisions**: Why specific approaches were chosen over alternatives
442
442
  - **Patterns established**: New conventions or patterns that future code should follow
443
443
  - **Gotchas encountered**: Edge cases, workarounds, or non-obvious behaviors discovered during execution
444
444
 
445
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
445
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
446
446
  `},{file:`steps/plan/README.md`,content:`---
447
447
  name: plan
448
448
  description: Analyze the codebase, design the architecture, and create a detailed implementation plan.
@@ -537,7 +537,7 @@ Load these skills BEFORE executing this step:
537
537
 
538
538
  | Skill | Purpose | When |
539
539
  |-------|---------|------|
540
- | \`aikit\` | Core MCP tools — search, analyze, remember, validate | Always (auto-loaded) |
540
+ | \`aikit\` | Core MCP tools — search, analyze, knowledge, validate | Always (auto-loaded) |
541
541
  | \`present\` | Rich rendering for any structured output — assessments, reports, comparisons, reviews, status boards, tables, charts, and all artifact content | Use for ANY output that benefits from rich rendering, not just dashboards |
542
542
  | \`multi-agents-development\` | Dispatch templates, task decomposition, review pipeline patterns | Before dispatching any subagent |
543
543
  | \`brainstorming\` | Structured ideation for design/creative decisions | Before any design choice or new feature exploration |
@@ -562,13 +562,13 @@ Load these skills BEFORE executing this step:
562
562
 
563
563
  ## Knowledge Capture
564
564
 
565
- Before completing this step, persist important findings using \`remember()\`:
565
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
566
566
 
567
567
  - **Task dependencies**: Critical ordering constraints and parallel opportunities
568
568
  - **Risk assessment**: Identified risks and mitigation strategies
569
569
  - **Resource decisions**: File ownership, module boundaries, and integration points
570
570
 
571
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
571
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
572
572
  `},{file:`steps/spec/README.md`,content:`---
573
573
  name: spec
574
574
  description: Elicit requirements, clarify scope, and define acceptance criteria through structured dialogue.
@@ -683,13 +683,13 @@ Load these skills BEFORE executing this step:
683
683
 
684
684
  ## Knowledge Capture
685
685
 
686
- Before completing this step, persist important findings using \`remember()\`:
686
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
687
687
 
688
688
  - **Requirements clarified**: Ambiguities resolved and assumptions validated
689
689
  - **Scope boundaries**: What the spec covers and explicit exclusions
690
690
  - **Acceptance criteria**: Key testable conditions that define "done"
691
691
 
692
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
692
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
693
693
  `},{file:`steps/task/README.md`,content:`---
694
694
  name: task
695
695
  description: Break the implementation plan into ordered, atomic tasks with dependencies and agent assignments.
@@ -802,13 +802,13 @@ Load these skills BEFORE executing this step:
802
802
 
803
803
  ## Knowledge Capture
804
804
 
805
- Before completing this step, persist important findings using \`remember()\`:
805
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
806
806
 
807
807
  - **Task decomposition rationale**: Why tasks were split this way and what each accomplishes
808
808
  - **Interface contracts**: APIs, types, or data shapes that tasks depend on
809
809
  - **Coordination points**: Where tasks interact and handoff requirements
810
810
 
811
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
811
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
812
812
  `},{file:`steps/verify/README.md`,content:`---
813
813
  name: verify
814
814
  description: Dual code review, architecture review, security review, and comprehensive test validation.
@@ -947,13 +947,13 @@ After all reviews complete:
947
947
 
948
948
  ## Knowledge Capture
949
949
 
950
- Before completing this step, persist important findings using \`remember()\`:
950
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
951
951
 
952
952
  - **Test coverage gaps**: Areas that couldn't be fully tested and why
953
953
  - **Quality findings**: Issues found during verification and their resolutions
954
954
  - **Session checkpoint**: Summarize what was accomplished, decisions made, and any remaining work
955
955
 
956
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
956
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
957
957
  `}],"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** file that contains the detailed instructions for the agent(s) executing that step. The Orchestrator reads the README.md via `flow_read_instruction` and delegates work accordingly.\n\n### Step 1: Design Gate\n- **Auto-skips** for bug fixes and refactors (produces a minimal `design-decisions.md` noting it was skipped)\n- For small features: runs quick brainstorming, FORGE classification, and optional decision protocol (see Orchestrator's inlined Multi-Model Decision Protocol for the full 3-phase process)\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_read_instruction` returns the README.md for the current step\n2. **Follow step instructions** — the README.md is the primary guide for what to do\n3. **Delegate to listed agents** — each step lists which agents are appropriate\n4. **Produce the required artifact** — the step's `produces` field specifies what file to create in the artifacts directory\n5. **Check dependencies** — the step's `requires` field lists artifacts from previous steps that must exist\n6. **Report status** — agents report `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED` to the Orchestrator\n\n## Artifacts\n\nAll artifacts are stored in the run directory under `.flows/{topic}/`. The template variable `{{artifacts_path}}` resolves to the actual path at runtime.\n"},{file:`steps/assess/README.md`,content:`---
958
958
  name: assess
959
959
  description: Understand scope, analyze the codebase, and identify the implementation approach.
@@ -1056,13 +1056,13 @@ Load these skills BEFORE executing this step:
1056
1056
 
1057
1057
  ## Knowledge Capture
1058
1058
 
1059
- Before completing this step, persist important findings using \`remember()\`:
1059
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
1060
1060
 
1061
1061
  - **Codebase discoveries**: File locations, architecture patterns, or dependency relationships found during assessment
1062
1062
  - **Problem diagnosis**: Root cause analysis, contributing factors, and affected components
1063
1063
  - **Scope decisions**: What's in scope, what's explicitly excluded, and why
1064
1064
 
1065
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
1065
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
1066
1066
  `},{file:`steps/design/README.md`,content:`# Design Gate — Basic Flow
1067
1067
 
1068
1068
  Lightweight design gate for bug fixes, small features, and refactoring. Evaluates the task type and determines whether design work is needed before proceeding.
@@ -1174,13 +1174,13 @@ Load these skills BEFORE executing this step:
1174
1174
 
1175
1175
  ## Knowledge Capture
1176
1176
 
1177
- Before completing this step, persist important findings using \`remember()\`:
1177
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
1178
1178
 
1179
1179
  - **Design decisions**: Chosen approach and alternatives considered with trade-offs
1180
1180
  - **Architecture patterns**: New patterns introduced or existing patterns that must be followed
1181
1181
  - **Constraints discovered**: Technical limitations, compatibility requirements, or performance boundaries
1182
1182
 
1183
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
1183
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
1184
1184
  `},{file:`steps/implement/README.md`,content:`---
1185
1185
  name: implement
1186
1186
  description: Write code following the assessment plan, using TDD practices where applicable.
@@ -1305,13 +1305,13 @@ Follow the \`multi-agents-development\` skill patterns for dispatch:
1305
1305
 
1306
1306
  ## Knowledge Capture
1307
1307
 
1308
- Before completing this step, persist important findings using \`remember()\`:
1308
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
1309
1309
 
1310
1310
  - **Implementation decisions**: Why specific approaches were chosen over alternatives
1311
1311
  - **Patterns established**: New conventions or patterns that future code should follow
1312
1312
  - **Gotchas encountered**: Edge cases, workarounds, or non-obvious behaviors discovered during implementation
1313
1313
 
1314
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
1314
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
1315
1315
  `},{file:`steps/verify/README.md`,content:`---
1316
1316
  name: verify
1317
1317
  description: Review code changes, run tests, validate correctness and quality.
@@ -1428,11 +1428,11 @@ After all reviews complete:
1428
1428
 
1429
1429
  ## Knowledge Capture
1430
1430
 
1431
- Before completing this step, persist important findings using \`remember()\`:
1431
+ Before completing this step, persist important findings using \`knowledge({ action: "remember", ... })\`:
1432
1432
 
1433
1433
  - **Test coverage gaps**: Areas that couldn't be fully tested and why
1434
1434
  - **Quality findings**: Issues found during verification and their resolutions
1435
1435
  - **Session checkpoint**: Summarize what was accomplished, decisions made, and any remaining work
1436
1436
 
1437
- **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`remember()\` now.
1437
+ **Every step produces knowledge worth preserving.** If you discovered something that would help a future session, call \`knowledge({ action: "remember", ... })\` now.
1438
1438
  `}]};export{e as FLOWS};
@@ -1 +1 @@
1
- const e={sessionStart:{description:`Run at the start of every agent session`,actions:[`status({})`,`list()`,`search({ query: "SESSION CHECKPOINT", origin: "curated" })`],rationale:`Resume prior work, load existing knowledge`},sessionEnd:{description:`Run at the end of every agent session`,actions:[`remember({ title: "Session checkpoint: <topic>", content: "<decisions, next steps>", category: "conventions" })`],rationale:`Persist decisions for future sessions`},beforeCodeChange:{description:`Run before modifying any code`,actions:[`search({ query: "<what you are changing>" })`,`scope_map({ task: "<description>" })`],rationale:`Check for prior decisions and understand impact`},beforeCommit:{description:`Run before committing changes`,actions:[`check({})`,`test_run({})`,`blast_radius({ changed_files: ["..."] })`],rationale:`Validate changes before they enter version control`}};export{e as HOOKS};
1
+ const e={sessionStart:{description:`Run at the start of every agent session`,actions:[`status({})`,`knowledge({ action: "list" })`,`search({ query: "SESSION CHECKPOINT", origin: "curated" })`],rationale:`Resume prior work, load existing knowledge`},sessionEnd:{description:`Run at the end of every agent session`,actions:[`knowledge({ action: "remember", title: "Session checkpoint: <topic>", content: "<decisions, next steps>", category: "conventions" })`],rationale:`Persist decisions for future sessions`},beforeCodeChange:{description:`Run before modifying any code`,actions:[`search({ query: "<what you are changing>" })`,`scope_map({ task: "<description>" })`],rationale:`Check for prior decisions and understand impact`},beforeCommit:{description:`Run before committing changes`,actions:[`check({})`,`test_run({})`,`blast_radius({ changed_files: ["..."] })`],rationale:`Validate changes before they enter version control`}};export{e as HOOKS};
@@ -1,11 +1,11 @@
1
- const e={ask:{description:`Quick research question — find answer using AI Kit + web search`,agent:`Researcher-Alpha`,tools:[`search`,`web_search`,`web_fetch`,`compact`,`file_summary`,`remember`,`present`],content:`## Quick Research
1
+ const e={ask:{description:`Quick research question — find answer using AI Kit + web search`,agent:`Researcher-Alpha`,tools:[`search`,`web_search`,`web_fetch`,`compact`,`file_summary`,`knowledge`,`present`],content:`## Quick Research
2
2
 
3
- 1. **AI Kit Recall** — Search knowledge base for existing answers
3
+ 1. **AI Kit Recall** — Search the AI Kit index for existing answers
4
4
  2. **Web Search** — If AI Kit has no relevant results, search the web
5
5
  3. **Synthesize** — Combine findings into a clear, concise answer
6
- 4. **Remember** — If the answer is broadly useful, persist it to KB
6
+ 4. **Remember** — If the answer is broadly useful, persist it with \`knowledge({ action: "remember", ... })\`
7
7
 
8
- **Always cite sources** — AI Kit entries, file paths, or URLs.`},debug:{description:`Systematic error diagnosis: reproduce → trace → diagnose → fix → verify`,agent:`Debugger`,tools:[`search`,`symbol`,`trace`,`blast_radius`,`check`,`test_run`,`parse_output`,`compact`,`remember`,`present`],content:"## Debug Workflow\n\n1. **Parse Error** — Use `parse_output` on the error message/stack trace\n2. **AI Kit Recall** — Search for known issues matching this pattern\n3. **Reproduce** — Run the failing command/test to confirm\n4. **Trace** — Use `symbol` and `trace` to follow the call chain\n5. **Diagnose** — Form hypothesis, gather evidence\n6. **Fix** — Implement minimal fix\n7. **Verify** — `check` + `test_run` to confirm fix and no regressions\n8. **Remember** — Persist the fix with category `troubleshooting`"},implement:{description:`Full lifecycle implementation: plan → build → review → commit`,agent:`Orchestrator`,tools:[`search`,`scope_map`,`forge_ground`,`check`,`test_run`,`blast_radius`,`remember`,`audit`,`present`],content:`## Implementation Pipeline
8
+ **Always cite sources** — AI Kit entries, file paths, or URLs.`},debug:{description:`Systematic error diagnosis: reproduce → trace → diagnose → fix → verify`,agent:`Debugger`,tools:[`search`,`symbol`,`trace`,`blast_radius`,`check`,`test_run`,`parse_output`,`compact`,`knowledge`,`present`],content:'## Debug Workflow\n\n1. **Parse Error** — Use `parse_output` on the error message/stack trace\n2. **AI Kit Recall** — Search for known issues matching this pattern\n3. **Reproduce** — Run the failing command/test to confirm\n4. **Trace** — Use `symbol` and `trace` to follow the call chain\n5. **Diagnose** — Form hypothesis, gather evidence\n6. **Fix** — Implement minimal fix\n7. **Verify** — `check` + `test_run` to confirm fix and no regressions\n8. **Remember** — Persist the fix with `knowledge({ action: "remember", category: "troubleshooting", ... })`'},implement:{description:`Full lifecycle implementation: plan → build → review → commit`,agent:`Orchestrator`,tools:[`search`,`scope_map`,`forge_ground`,`check`,`test_run`,`blast_radius`,`knowledge`,`audit`,`present`],content:`## Implementation Pipeline
9
9
 
10
10
  Follow the Orchestrator's full workflow:
11
11
 
@@ -16,7 +16,7 @@ Follow the Orchestrator's full workflow:
16
16
 
17
17
  **🛑 MANDATORY STOPS** — After plan, after each batch, after completion.
18
18
 
19
- Refer to the Orchestrator agent's full instructions for the detailed workflow.`},plan:{description:`Create a detailed TDD implementation plan without executing it`,agent:`Planner`,tools:[`search`,`scope_map`,`forge_ground`,`forge_classify`,`file_summary`,`analyze_structure`,`analyze_dependencies`,`remember`,`present`],content:`## Planning Workflow
19
+ Refer to the Orchestrator agent's full instructions for the detailed workflow.`},plan:{description:`Create a detailed TDD implementation plan without executing it`,agent:`Planner`,tools:[`search`,`scope_map`,`forge_ground`,`forge_classify`,`file_summary`,`analyze`,`knowledge`,`present`],content:`## Planning Workflow
20
20
 
21
21
  1. **AI Kit Recall** — Search for past plans, architecture decisions
22
22
  2. **FORGE Ground** — Classify tier, scope map, seed unknowns
@@ -25,7 +25,7 @@ Refer to the Orchestrator agent's full instructions for the detailed workflow.`}
25
25
  5. **Dependency Graph** — Group into parallel batches
26
26
  6. **Present** — Show plan with open questions
27
27
 
28
- **🛑 MANDATORY STOP** — Wait for user approval. Do NOT implement.`},design:{description:`Collaborative design session — explore ideas, refine requirements, produce a design spec`,agent:`Orchestrator`,tools:[`search`,`scope_map`,`file_summary`,`compact`,`remember`,`forge_classify`,`present`],content:`## Design Session
28
+ **🛑 MANDATORY STOP** — Wait for user approval. Do NOT implement.`},design:{description:`Collaborative design session — explore ideas, refine requirements, produce a design spec`,agent:`Orchestrator`,tools:[`search`,`scope_map`,`file_summary`,`compact`,`knowledge`,`forge_classify`,`present`],content:`## Design Session
29
29
 
30
30
  Enter Phase 0 (Design Gate) directly — the user is requesting a design session.
31
31
 
@@ -34,7 +34,7 @@ Enter Phase 0 (Design Gate) directly — the user is requesting a design session
34
34
  3. If Advanced Mode, use the full Multi-Model Decision Protocol (3-phase: research → peer review → verdict, defined in Orchestrator instructions) for unresolved technical choices
35
35
  4. Terminal state: brainstorming skill invokes writing-plans skill
36
36
 
37
- **🛑 HARD GATE** — Do NOT skip brainstorming. Do NOT write code. Design first.`},review:{description:`Dual-model code + architecture review pipeline`,agent:`Orchestrator`,tools:[`search`,`blast_radius`,`check`,`test_run`,`analyze_dependencies`,`remember`,`present`],content:`## Review Pipeline
37
+ **🛑 HARD GATE** — Do NOT skip brainstorming. Do NOT write code. Design first.`},review:{description:`Dual-model code + architecture review pipeline`,agent:`Orchestrator`,tools:[`search`,`blast_radius`,`check`,`test_run`,`analyze`,`knowledge`,`present`],content:`## Review Pipeline
38
38
 
39
39
  ### Step 1: Scope
40
40
  Identify changed files and their blast radius.
@@ -99,15 +99,15 @@ Past decisions, conventions, and patterns are stored in curated knowledge. Auto-
99
99
 
100
100
  \`\`\`
101
101
  search("keywords about the feature/area you're changing") // check for past decisions
102
- list({ category: "decisions" }) // scan recent decisions that might apply
103
- list({ category: "conventions" }) // see project conventions (includes auto-captured)
102
+ knowledge({ action: "list", category: "decisions" }) // scan recent decisions that might apply
103
+ knowledge({ action: "list", category: "conventions" }) // see project conventions (includes auto-captured)
104
104
  scope_map("what you need") // generates a reading plan
105
105
  \`\`\`
106
106
 
107
107
  **Rules:**
108
108
  - If results exist → **READ them and FOLLOW** established patterns. Do not silently override.
109
109
  - If results conflict with the current task → **surface the conflict** to the user/orchestrator.
110
- - If no results → proceed, but **\`remember()\` your decisions** afterward for future recall.
110
+ - If no results → proceed, but **persist your decisions with \`knowledge({ action: "remember", ... })\`** afterward for future recall.
111
111
  - Never assume "there's nothing stored" — always search first.
112
112
 
113
113
  ### Step 3: Real-time Exploration (only
@@ -199,7 +199,7 @@ Before making changes, establish expected scope. Flag deviations early.
199
199
 
200
200
  ## MANDATORY: Memory Persistence Before Completing
201
201
 
202
- **Before finishing ANY task**, you MUST call \`remember()\` if ANY of these apply:
202
+ **Before finishing ANY task**, you MUST call \`knowledge({ action: "remember", ... })\` if ANY of these apply:
203
203
 
204
204
  - ✅ You discovered how something works that wasn't in onboard artifacts
205
205
  - ✅ You made an architecture or design decision
@@ -207,9 +207,10 @@ Before making changes, establish expected scope. Flag deviations early.
207
207
  - ✅ You identified a pattern, convention, or project-specific gotcha
208
208
  - ✅ You encountered and resolved an error that others might hit
209
209
 
210
- **How to remember:**
210
+ **How to persist knowledge:**
211
211
  \`\`\`
212
- remember({
212
+ knowledge({
213
+ action: "remember",
213
214
  title: "Short descriptive title",
214
215
  content: "Detailed finding with context",
215
216
  category: "patterns" | "conventions" | "decisions" | "troubleshooting"
@@ -217,13 +218,13 @@ remember({
217
218
  \`\`\`
218
219
 
219
220
  **Examples:**
220
- - \`remember({ title: "Auth uses JWT refresh tokens with 15min expiry", content: "Access tokens expire in 15 min, refresh in 7 days. Middleware at src/auth/guard.ts validates.", category: "patterns" })\`
221
- - \`remember({ title: "Build requires Node 20+", content: "Uses Web Crypto API — Node 18 fails silently on crypto.subtle calls.", category: "conventions" })\`
222
- - \`remember({ title: "Decision: LanceDB over Chroma for vector store", content: "LanceDB is embedded (no Docker), supports WASM, better for user-level MCP.", category: "decisions" })\`
221
+ - \`knowledge({ action: "remember", title: "Auth uses JWT refresh tokens with 15min expiry", content: "Access tokens expire in 15 min, refresh in 7 days. Middleware at src/auth/guard.ts validates.", category: "patterns" })\`
222
+ - \`knowledge({ action: "remember", title: "Build requires Node 20+", content: "Uses Web Crypto API — Node 18 fails silently on crypto.subtle calls.", category: "conventions" })\`
223
+ - \`knowledge({ action: "remember", title: "Decision: LanceDB over Chroma for vector store", content: "LanceDB is embedded (no Docker), supports WASM, better for user-level MCP.", category: "decisions" })\`
223
224
 
224
225
  **If you complete a task without remembering anything, you likely missed something.** Review what you learned.
225
226
 
226
- For outdated AI Kit entries → \`update(path, content, reason)\`
227
+ For outdated AI Kit entries → \`knowledge({ action: "update", path, content, reason })\`
227
228
 
228
229
  ---
229
230
 
@@ -239,14 +240,14 @@ For outdated AI Kit entries → \`update(path, content, reason)\`
239
240
 
240
241
  | Phase | What to do | Compress after? |
241
242
  |-------|-----------|----------------|
242
- | **Understand** | Search KB, read summaries, trace symbols | Yes — \`digest\` findings before planning |
243
+ | **Understand** | Search AI Kit, read summaries, trace symbols | Yes — \`digest\` findings before planning |
243
244
  | **Plan** | Design approach, identify files to change | Yes — \`stash\` the plan, compact analysis |
244
245
  | **Execute** | Make changes, one sub-task at a time | Yes — compact between independent sub-tasks |
245
246
  | **Verify** | \`check\` + \`test_run\` + \`blast_radius\` | — |
246
247
 
247
248
  **Rules:**
248
249
  - **Never compact mid-operation** — finish the current sub-task first
249
- - **Recycle context to files** — save analysis results via \`stash\` or \`remember\`, not just in conversation
250
+ - **Recycle context to files** — save analysis results via \`stash\` or \`knowledge({ action: "remember", ... })\`, not just in conversation
250
251
  - **Decompose monolithic work** — break into independent chunks, pass results via artifact files between sub-tasks
251
252
  - **One-shot sub-tasks** — for self-contained changes, provide all context upfront to avoid back-and-forth
252
253
 
@@ -435,7 +436,7 @@ scope_map("what you need to investigate")
435
436
  for code exploration (graph FIRST for module relationships)
436
437
  - Use \`graph({ action: 'neighbors' })\` to understand cross-module dependencies before diving into symbol details
437
438
  - Use \`file_summary\`, \`compact\` for efficient file reading
438
- - Use \`analyze_structure\`, \`analyze_dependencies\` for package-level understanding
439
+ - Use \`analyze({ aspect: "structure", ... })\`, \`analyze({ aspect: "dependencies", ... })\` for package-level understanding
439
440
  - Use \`web_search\`, \`web_fetch\` for external documentation
440
441
 
441
442
  ### Phase 3: Synthesis
@@ -454,21 +455,22 @@ Return structured findings. Always include:
454
455
 
455
456
  ### Phase 5: MANDATORY — Persist Discoveries
456
457
 
457
- **Before returning your report**, you MUST call \`remember()\` for:
458
+ **Before returning your report**, you MUST call \`knowledge({ action: "remember", ... })\` for:
458
459
  - ✅ Architecture insights not already in onboard artifacts
459
460
  - ✅ Non-obvious findings, gotchas, or edge cases
460
461
  - ✅ Trade-off analysis and recommendations made
461
462
  - ✅ External knowledge gathered from web_search/web_fetch
462
463
 
463
464
  \`\`\`
464
- remember({
465
+ knowledge({
466
+ action: "remember",
465
467
  title: "Short descriptive title",
466
468
  content: "Detailed finding with context",
467
469
  category: "patterns" | "conventions" | "decisions" | "troubleshooting"
468
470
  })
469
471
  \`\`\`
470
472
 
471
- **If you complete research without remembering anything, you wasted tokens.** Your research should enrich the knowledge base for future sessions.
473
+ **If you complete research without persisting anything, you wasted tokens.** Your research should enrich the AI Kit knowledge store for future sessions.
472
474
 
473
475
  ---
474
476
 
@@ -561,7 +563,7 @@ Workflow;
561
563
  1 ** AI;
562
564
  Kit;
563
565
  Recall** —
564
- \`search("conventions relevant-area")\` + \`list()\`
566
+ \`search("conventions relevant-area")\` + \`knowledge({ action: "list" })\`
565
567
  for past review findings, patterns
566
568
  2. **Blast
567
569
  Radius** —
@@ -572,8 +574,9 @@ Radius** —
572
574
  6. **Report** — Structured findings
573
575
  with verdict
574
576
  7. **Persist** —
575
- \`remember(
577
+ \`knowledge(
576
578
  {
579
+ action: "remember",
577
580
  title: 'Review: <finding>', content;
578
581
  : "<details>", category: "patterns"
579
582
  }
@@ -736,16 +739,17 @@ Workflow;
736
739
  1 ** AI;
737
740
  Kit;
738
741
  Recall** —
739
- \`search("architecture decisions boundaries")\` + \`list()\`
742
+ \`search("architecture decisions boundaries")\` + \`knowledge({ action: "list" })\`
740
743
  for past ADRs, patterns
741
744
  2. **Analyze** —
742
- \`analyze_structure\`, \`analyze_dependencies\`, \`blast_radius\`
745
+ \`analyze({ aspect: "structure", ... })\`, \`analyze({ aspect: "dependencies", ... })\`, \`blast_radius\`
743
746
  3. **Evaluate** — Check all dimensions below
744
747
  4. **Report** — Structured findings
745
748
  with verdict
746
749
  5. **Persist** —
747
- \`remember(
750
+ \`knowledge(
748
751
  {
752
+ action: "remember",
749
753
  title: 'Architecture: <finding>', content;
750
754
  : "<details>", category: "decisions"
751
755
  }
@@ -971,7 +975,7 @@ The Orchestrator synthesizes BOTH layers (original research + peer reviews) into
971
975
  Then:
972
976
  1. **Present** the verdict using \`present(format: "html" )\` with comparison blocks
973
977
  2. **Produce an ADR** via the \`adr-skill\`
974
- 3. **\`remember\`** the decision for future recall
978
+ 3. **\`knowledge({ action: "remember", ... })\`** the decision for future recall
975
979
 
976
980
  ## When to Use (Auto-Trigger Rules)
977
981
 
@@ -993,14 +997,14 @@ Trigger the decision protocol when there is an **unresolved non-trivial technica
993
997
  - Never make a non-trivial technical decision without multi-model analysis
994
998
  - Always present the verdict visually using \`present\`
995
999
  - **Produce an ADR** after every decision resolution
996
- - \`remember\` the decision for future recall
1000
+ - \`knowledge({ action: "remember", ... })\` the decision for future recall
997
1001
 
998
1002
  ## Shortcut: Floor-Tier Decisions
999
1003
 
1000
1004
  For decisions classified as **Floor tier** (blast_radius ≤ 2, single concern):
1001
1005
  - Skip Phase 2 (peer review) — synthesis directly from Phase 1
1002
1006
  - Verdict format still required but can be abbreviated
1003
- - ADR is optional (use \`remember\` at minimum)
1007
+ - ADR is optional (use \`knowledge({ action: "remember", ... })\` at minimum)
1004
1008
  `,"forge-protocol":`# FORGE Protocol — Quality Overlay
1005
1009
 
1006
1010
  > Follow the FORGE (Fact-Oriented Reasoning with Graduated Evidence) protocol for all code generation and modification tasks.