@vpxa/aikit 0.1.98 → 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.
- package/README.md +29 -33
- package/package.json +1 -2
- package/packages/aikit-client/dist/index.d.ts +27 -27
- package/packages/aikit-client/dist/index.js +2 -2
- package/packages/analyzers/dist/index.js +2 -2
- package/packages/cli/dist/index.js +2 -2
- package/packages/cli/dist/init-DlY4IHCF.js +7 -0
- package/packages/cli/dist/{templates-DrkDLz-X.js → templates-Dz2d2veK.js} +35 -73
- package/packages/cli/dist/{user-Bb40VUaT.js → user-DfEC00FY.js} +1 -1
- package/packages/core/dist/index.d.ts +8 -8
- package/packages/core/dist/index.js +1 -1
- package/packages/dashboard/dist/assets/{index-C6D-PCp0.js → index-CxrC6OtB.js} +3 -3
- package/packages/dashboard/dist/index.html +1 -1
- package/packages/enterprise-bridge/dist/index.d.ts +1 -1
- package/packages/enterprise-bridge/dist/index.js +1 -1
- package/packages/indexer/dist/index.d.ts +6 -6
- package/packages/server/dist/index.d.ts +1 -1
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/server-DfCR_Bix.js +1282 -0
- package/packages/server/dist/{version-check-AMfxaZUw.js → version-check-Bj07vc5x.js} +1 -1
- package/packages/store/dist/index.d.ts +9 -22
- package/packages/store/dist/index.js +6 -6
- package/packages/tools/dist/index.d.ts +16 -15
- package/packages/tools/dist/index.js +6 -6
- package/scaffold/dist/adapters/intellij.mjs +3 -0
- package/scaffold/dist/adapters/zed.mjs +4 -0
- package/scaffold/dist/definitions/agents.mjs +1 -1
- package/scaffold/dist/definitions/bodies.mjs +158 -15
- package/scaffold/dist/definitions/flows.mjs +32 -32
- package/scaffold/dist/definitions/hooks.mjs +1 -1
- package/scaffold/dist/definitions/prompts.mjs +7 -7
- package/scaffold/dist/definitions/protocols.mjs +423 -134
- package/scaffold/dist/definitions/skills.mjs +107 -67
- package/scaffold/dist/definitions/tools.mjs +1 -1
- package/packages/cli/dist/init-DtjuyGpD.js +0 -7
- 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
|
-
\`
|
|
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
|
|
@@ -11,6 +11,25 @@ const e={Orchestrator:e=>`You orchestrate the full development lifecycle: **plan
|
|
|
11
11
|
|
|
12
12
|
${e}
|
|
13
13
|
|
|
14
|
+
### Agent Dispatch Rules
|
|
15
|
+
|
|
16
|
+
**Match the task to the RIGHT specialist. Implementer is NOT the default for everything.**
|
|
17
|
+
|
|
18
|
+
| Signal in task | Dispatch to | NOT to |
|
|
19
|
+
|----------------|-------------|--------|
|
|
20
|
+
| Bug, error, stack trace, "fix ...", "doesn't work", flaky test, regression | **Debugger** | ~~Implementer~~ |
|
|
21
|
+
| "Refactor", "cleanup", "simplify", extract, rename-at-scale, reduce complexity, DRY | **Refactor** | ~~Implementer~~ |
|
|
22
|
+
| UI, component, styling, responsive, layout, animation, accessibility, CSS | **Frontend** | ~~Implementer~~ |
|
|
23
|
+
| New feature, implement, add endpoint, build, create, wire up | **Implementer** | — |
|
|
24
|
+
| Security audit, vulnerability, CVE, auth hardening, input sanitization | **Security** | ~~Implementer~~ |
|
|
25
|
+
| Docs, README, API docs, changelog, migration guide | **Documenter** | ~~Implementer~~ |
|
|
26
|
+
|
|
27
|
+
**Compound tasks** (e.g., "fix the bug then refactor the module"):
|
|
28
|
+
- Split into sequential batches: Debugger first → then Refactor
|
|
29
|
+
- NEVER send both concerns to Implementer as a single dispatch
|
|
30
|
+
|
|
31
|
+
**When uncertain:** If the task contains "fix" or "broken" or "error" → it's Debugger. If it contains "clean up" or "improve structure" → it's Refactor. Implementer is ONLY for net-new functionality.
|
|
32
|
+
|
|
14
33
|
**Parallelism**: Read-only agents run in parallel freely. File-modifying agents run in parallel ONLY on completely different files. Max 4 concurrent file-modifying agents.
|
|
15
34
|
|
|
16
35
|
## FORGE Protocol
|
|
@@ -39,7 +58,7 @@ When \`forge_classify\` returns **Floor** tier (single file, blast_radius ≤ 2,
|
|
|
39
58
|
|
|
40
59
|
**Floor dispatch pattern:**
|
|
41
60
|
1. \`forge_classify\` → Floor confirmed
|
|
42
|
-
2. Single \`runSubagent\` (
|
|
61
|
+
2. Single \`runSubagent\` — pick agent per dispatch rules above (Debugger for bugs, Refactor for cleanup, Frontend for UI, Implementer for new features)
|
|
43
62
|
3. \`check({})\` + \`test_run({})\` validation
|
|
44
63
|
4. Present result to user — done
|
|
45
64
|
|
|
@@ -358,7 +377,7 @@ status({}) # Check AI Kit he
|
|
|
358
377
|
# If onboard not run → onboard({ path: "." }) # First-time codebase analysis
|
|
359
378
|
flow_list({}) # See available flows
|
|
360
379
|
# Select flow based on task → flow_start({ flow: "<name>", topic: "<task>" }) # Start flow — creates .flows/{topic}/
|
|
361
|
-
list
|
|
380
|
+
knowledge({ action: "list" }) # See stored knowledge
|
|
362
381
|
search({ query: "SESSION CHECKPOINT", origin: "curated" }) # Resume prior work
|
|
363
382
|
\`\`\`
|
|
364
383
|
|
|
@@ -369,14 +388,14 @@ search({ query: "SESSION CHECKPOINT", origin: "curated" }) # Resume prior wo
|
|
|
369
388
|
| Intermediate result | \`stash({ key, value })\` |
|
|
370
389
|
| Parallel A/B exploration (read-only) | \`lane({ action: 'create', name })\` → explore → \`lane({ action: 'diff', names })\` |
|
|
371
390
|
| Milestone completed | \`checkpoint({ action: "save", name })\` |
|
|
372
|
-
| Architecture decision made | \`
|
|
373
|
-
| Pattern discovered | \`
|
|
391
|
+
| Architecture decision made | \`knowledge({ action: "remember", title, content, category: "decisions" })\` |
|
|
392
|
+
| Pattern discovered | \`knowledge({ action: "remember", title, content, category: "patterns" })\` |
|
|
374
393
|
| About to propose new approach | \`search({ query })\` — check if already decided |
|
|
375
394
|
|
|
376
395
|
### End (MUST do)
|
|
377
396
|
|
|
378
397
|
\`session_digest({ persist: true })\` # Auto-capture session activity
|
|
379
|
-
\`
|
|
398
|
+
\`knowledge({ action: "remember", title: "Session checkpoint: <topic>", content: "<decisions, blockers, next steps>", category: "conventions" })\`
|
|
380
399
|
|
|
381
400
|
## Flows
|
|
382
401
|
|
|
@@ -400,7 +419,7 @@ Load the \`aikit\` skill for full tool documentation, workflow chains, and sessi
|
|
|
400
419
|
|
|
401
420
|
## Planning Workflow
|
|
402
421
|
|
|
403
|
-
1. **AI Kit Recall** — Search for past plans, architecture decisions, known patterns. Check \`list
|
|
422
|
+
1. **AI Kit Recall** — Search for past plans, architecture decisions, known patterns. Check \`knowledge({ action: "list" })\` for stored knowledge.
|
|
404
423
|
2. **FORGE Classify** — \`forge_classify({ task, files, root_path: "." })\` to determine complexity tier
|
|
405
424
|
3. **FORGE Ground** — \`forge_ground\` to scope map, seed unknowns, load constraints
|
|
406
425
|
4. **Research** — Delegate to Explorer and Researcher agents to gather context
|
|
@@ -482,7 +501,131 @@ When subagents complete, their visual outputs (from \`present\`) are NOT visible
|
|
|
482
501
|
| \`c4-architecture\` | When the plan involves architectural changes — generate C4 diagrams |
|
|
483
502
|
| \`adr-skill\` | When the plan involves non-trivial technical decisions — create executable ADRs |
|
|
484
503
|
| \`session-handoff\` | When context window is filling up, planning session ending, or major milestone completed |
|
|
485
|
-
| \`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\")`, `
|
|
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
|
+
|
|
506
|
+
Load the \`aikit\` skill for full tool documentation, workflow chains, and session protocol.
|
|
507
|
+
|
|
508
|
+
## Debugging Protocol
|
|
509
|
+
|
|
510
|
+
### Phase 1: Build the Right Feedback Loop
|
|
511
|
+
|
|
512
|
+
**Before hypothesizing, build a deterministic reproduction loop.** The right loop is 90% of the fix.
|
|
513
|
+
|
|
514
|
+
Choose the appropriate loop type:
|
|
515
|
+
|
|
516
|
+
| Loop Type | When to Use |
|
|
517
|
+
|-----------|-------------|
|
|
518
|
+
| Failing test | Unit/integration error with clear input/output |
|
|
519
|
+
| CLI invocation | Command-line tool misbehavior |
|
|
520
|
+
| curl/HTTP script | API endpoint issues |
|
|
521
|
+
| Throwaway harness | Isolate a module in a minimal script |
|
|
522
|
+
| Bisection harness | "It worked before" — narrow the commit range |
|
|
523
|
+
| Differential loop | Compare expected vs actual output across runs |
|
|
524
|
+
| Property/fuzz loop | Edge cases, boundary conditions, intermittent failures |
|
|
525
|
+
| Replay trace | Reproduce from logged events/requests |
|
|
526
|
+
| Headless browser | UI rendering/interaction bugs |
|
|
527
|
+
| HITL bash script | Needs manual step but automates the rest |
|
|
528
|
+
|
|
529
|
+
**Rule:** If you can't reproduce it in a loop, you can't fix it. Build the loop FIRST.
|
|
530
|
+
|
|
531
|
+
### Phase 2: Reproduce
|
|
532
|
+
|
|
533
|
+
1. \`search("error patterns")\` — check auto-captured error patterns and known issues
|
|
534
|
+
2. \`knowledge({ action: "list", tags: ["errors"] })\` — find prior troubleshooting knowledge
|
|
535
|
+
3. Run the feedback loop — confirm the error fires consistently
|
|
536
|
+
4. If intermittent: add instrumentation, increase loop iterations, check race conditions
|
|
537
|
+
|
|
538
|
+
### Phase 3: Trace & Hypothesize
|
|
539
|
+
|
|
540
|
+
1. **Verify targets exist** — \`find\` or \`symbol\` to confirm files/functions in the error. **Never trace into unconfirmed paths.**
|
|
541
|
+
2. **Map relationships** — \`graph\` (module imports), \`symbol\` (definitions/references)
|
|
542
|
+
3. **Trace execution** — \`trace\` (call chains from entry point to error site)
|
|
543
|
+
4. **Form hypothesis** — one specific, falsifiable claim about the root cause
|
|
544
|
+
|
|
545
|
+
### Phase 4: Instrument & Verify Hypothesis
|
|
546
|
+
|
|
547
|
+
- Add targeted logging/assertions at the hypothesized fault point
|
|
548
|
+
- Re-run feedback loop — does the hypothesis hold?
|
|
549
|
+
- If not: **discard hypothesis**, return to Phase 3 with new entry point
|
|
550
|
+
|
|
551
|
+
### Phase 5: Fix
|
|
552
|
+
|
|
553
|
+
- Implement the minimal fix for the root cause
|
|
554
|
+
- **No workarounds** — fix the actual problem, not the symptom
|
|
555
|
+
- Every fix must have a test that would have caught the bug
|
|
556
|
+
|
|
557
|
+
### Phase 6: Cleanup & Validate
|
|
558
|
+
|
|
559
|
+
- Remove debug instrumentation (grep for debug tags)
|
|
560
|
+
- \`check({})\` + \`test_run({})\` — confirm no regressions
|
|
561
|
+
- \`remember\` the fix with category \`troubleshooting\`
|
|
562
|
+
|
|
563
|
+
## Rules
|
|
564
|
+
|
|
565
|
+
- **Never guess** — Always trace the actual execution path
|
|
566
|
+
- **Loop first, hypothesis second** — Build reproduction before theorizing
|
|
567
|
+
- **Minimal fix** — Fix the root cause, don't add workarounds
|
|
568
|
+
- **Break debug loops** — If same error 3 times after fix: hypothesis is WRONG. STOP, discard theory, re-examine from different entry point. Return \`ESCALATE\` if fresh approach also fails
|
|
569
|
+
- **Verify before asserting** — Don't claim a function has a certain signature without checking via \`symbol\``,Refactor:`**Read \`AGENTS.md\`** in the workspace root for project conventions and AI Kit protocol.
|
|
570
|
+
|
|
571
|
+
Load the \`aikit\` skill for full tool documentation, workflow chains, and session protocol.
|
|
572
|
+
|
|
573
|
+
## Refactoring Protocol
|
|
574
|
+
|
|
575
|
+
1. **AI Kit Recall** — Search for established patterns and conventions
|
|
576
|
+
2. **Analyze** — \`graph\` (module dependency map), \`analyze({ aspect: "structure", ... })\`, \`analyze({ aspect: "patterns", ... })\`, \`dead_symbols\`, \`trace\` (impact chains)
|
|
577
|
+
3. **Ensure test coverage** — Run existing tests, add coverage for untested paths
|
|
578
|
+
4. **Refactor in small steps** — Each step must keep tests green
|
|
579
|
+
5. **Validate** — \`check\`, \`test_run\`, \`blast_radius\` after each step
|
|
580
|
+
6. **Persist** — \`remember\` new patterns established
|
|
581
|
+
|
|
582
|
+
## Architecture Heuristics
|
|
583
|
+
|
|
584
|
+
Apply these lenses when deciding WHAT to refactor:
|
|
585
|
+
|
|
586
|
+
| Heuristic | Question | Action |
|
|
587
|
+
|-----------|----------|--------|
|
|
588
|
+
| **Deep Modules** | Does this module hide significant complexity behind a small interface? | If yes → high-value, leave it. If interface is bigger than implementation → pass-through, candidate for removal. |
|
|
589
|
+
| **Deletion Test** | If you deleted this module, would complexity vanish entirely or reappear across N callers? | Vanishes → it's pass-through (merge into caller). Reappears → it earns its existence. |
|
|
590
|
+
| **Seams** | Where are the natural cut points in this code? | Look for places where data format changes, responsibility shifts, or error boundaries exist. Refactor ALONG seams, not against them. |
|
|
591
|
+
| **Domain Language** | Do the names match the business domain? | Rename toward domain terms. Code that speaks the domain language is easier to evolve. |
|
|
592
|
+
|
|
593
|
+
**Priority order:** Fix naming (cheapest) → extract seams → deepen modules → delete pass-throughs.
|
|
594
|
+
|
|
595
|
+
## Rules
|
|
596
|
+
|
|
597
|
+
- **Tests must pass at every step** — Never break behavior
|
|
598
|
+
- **Smaller is better** — Prefer many small refactors over one big one
|
|
599
|
+
- **Follow existing patterns** — Consolidate toward established conventions
|
|
600
|
+
- **Don't refactor what isn't asked** — Scope discipline
|
|
601
|
+
|
|
602
|
+
## Reversible Refactor Protocol
|
|
603
|
+
|
|
604
|
+
Refactors modify the canonical source, so use \`checkpoint\` (NOT \`lane\`) for safety:
|
|
605
|
+
|
|
606
|
+
1. **Before starting:** \`checkpoint({ action:'save', label:'pre-refactor-<scope>' })\`
|
|
607
|
+
— captures a snapshot of the relevant files
|
|
608
|
+
2. **Baseline metrics:** \`measure({ path })\` on target files — record
|
|
609
|
+
\`cognitiveComplexity\` values BEFORE refactor
|
|
610
|
+
3. **Apply changes** — use \`rename({ old, new })\` for symbol rename (dry_run first),
|
|
611
|
+
or \`codemod({ pattern, replacement })\` for structural transforms (dry_run first).
|
|
612
|
+
Never hand-edit what \`rename\`/\`codemod\` can do safely.
|
|
613
|
+
4. **Verify:** \`check({})\` + \`test_run({})\` must both pass with zero new failures
|
|
614
|
+
5. **Post-metrics:** \`measure({ path })\` again — confirm cognitive complexity
|
|
615
|
+
delta is negative (or justify if zero)
|
|
616
|
+
6. **If validation fails:** \`checkpoint({ action:'restore', label:'pre-refactor-<scope>' })\`
|
|
617
|
+
|
|
618
|
+
For multi-approach uncertainty (A vs B), do NOT create lanes. Instead:
|
|
619
|
+
- Delegate to \`Researcher-Delta\` with a feasibility question — they can use \`lane\`
|
|
620
|
+
for read-only exploration and return a recommendation
|
|
621
|
+
- You then apply the winning approach under the checkpoint protocol above
|
|
622
|
+
|
|
623
|
+
## Skills (load on demand)
|
|
624
|
+
|
|
625
|
+
| Skill | When to load |
|
|
626
|
+
|-------|--------------|
|
|
627
|
+
| \`lesson-learned\` | After completing a refactor — extract principles from the before/after diff |
|
|
628
|
+
| \`typescript\` | When refactoring TypeScript code — type patterns, generics, utility types |`,Security:`**Read \`AGENTS.md\`** in the workspace root for project conventions and AI Kit protocol.
|
|
486
629
|
|
|
487
630
|
Load the \`aikit\` skill for full tool documentation, workflow chains, and session protocol.
|
|
488
631
|
|
|
@@ -493,11 +636,11 @@ Load the \`aikit\` skill for full tool documentation, workflow chains, and sessi
|
|
|
493
636
|
- \`synthesis-guide.md\` — project overview and architecture
|
|
494
637
|
- \`patterns.md\` — established conventions (check for security-related patterns)
|
|
495
638
|
- \`api-surface.md\` — exported function signatures (attack surface)
|
|
496
|
-
3. \`search("security vulnerabilities conventions")\` + \`list
|
|
639
|
+
3. \`search("security vulnerabilities conventions")\` + \`knowledge({ action: "list" })\` for past findings
|
|
497
640
|
|
|
498
641
|
## Security Review Protocol
|
|
499
642
|
|
|
500
|
-
1. **AI Kit Recall** — \`search("security findings <area>")\` + \`list
|
|
643
|
+
1. **AI Kit Recall** — \`search("security findings <area>")\` + \`knowledge({ action: "list" })\` for past security decisions and known issues
|
|
501
644
|
2. **Audit** — Run \`audit\` for a comprehensive project health check, then \`find\` for specific vulnerability patterns
|
|
502
645
|
3. **OWASP Top 10 Scan** — Check each category systematically
|
|
503
646
|
4. **Dependency Audit** — Check for known CVEs in dependencies
|
|
@@ -506,7 +649,7 @@ Load the \`aikit\` skill for full tool documentation, workflow chains, and sessi
|
|
|
506
649
|
7. **Input Validation** — Check all user inputs for injection vectors
|
|
507
650
|
8. **Impact Analysis** — Use \`trace\` on sensitive functions, \`blast_radius\` on security-critical files
|
|
508
651
|
9. **Report** — Severity-ranked findings with remediation guidance
|
|
509
|
-
10. **Persist** — \`
|
|
652
|
+
10. **Persist** — \`knowledge({ action: "remember", title: "Security: <finding>", content: "<details, severity, remediation>", category: "troubleshooting" })\` for each significant finding
|
|
510
653
|
|
|
511
654
|
## Severity Levels
|
|
512
655
|
|
|
@@ -536,15 +679,15 @@ Load the \`aikit\` skill for full tool documentation, workflow chains, and sessi
|
|
|
536
679
|
- \`synthesis-guide.md\` — project overview and architecture
|
|
537
680
|
- \`structure.md\` — file tree and module purposes
|
|
538
681
|
- \`patterns.md\` — established conventions
|
|
539
|
-
3. \`search("documentation conventions")\` + \`list
|
|
682
|
+
3. \`search("documentation conventions")\` + \`knowledge({ action: "list" })\` for existing docs and standards
|
|
540
683
|
|
|
541
684
|
## Documentation Protocol
|
|
542
685
|
|
|
543
|
-
1. **AI Kit Recall** — \`search("documentation <area>")\` + \`list
|
|
544
|
-
2. **Analyze** — \`
|
|
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\`
|
|
545
688
|
3. **Draft** — Write documentation following project conventions
|
|
546
689
|
4. **Cross-reference** — Link to related docs, ensure consistency
|
|
547
|
-
5. **Persist** — \`
|
|
690
|
+
5. **Persist** — \`knowledge({ action: "remember", title: "Docs: <standard>", content: "<details>", category: "conventions" })\` for new documentation standards
|
|
548
691
|
|
|
549
692
|
## Documentation Types
|
|
550
693
|
|
|
@@ -602,4 +745,4 @@ Rules adapted from *The Elements of Agent Style* (CC BY 4.0, Yue Zhao) and class
|
|
|
602
745
|
| \`present\` | When presenting documentation previews, API tables, or architecture visuals to the user |
|
|
603
746
|
| \`c4-architecture\` | When documenting system architecture — generate C4 Mermaid diagrams |
|
|
604
747
|
| \`adr-skill\` | When documenting architecture decisions — create or update ADRs |
|
|
605
|
-
| \`typescript\` | When documenting TypeScript APIs — type signatures, JSDoc patterns |`,Explorer:
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
|
72
|
-
│ └── components/ ← From
|
|
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
|
|
76
|
+
│ └── testing.md ← From analyze(patterns) test info
|
|
77
77
|
└── reference/
|
|
78
|
-
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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`,`
|
|
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
|
|
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
|
|
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`,`
|
|
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`,`
|
|
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`,`
|
|
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`,`
|
|
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.
|