@vpxa/aikit 0.1.384 → 0.1.385
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/claude-desktop/dist/manifest.json +1 -1
- package/packages/server/dist/bin.js +1 -1
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/{register-tools-DLj1eMq3.js → register-tools-DQozoQCc.js} +141 -140
- package/packages/server/dist/{register-tools-CCDtIMgE.js → register-tools-jeARoElg.js} +141 -140
- package/packages/server/dist/{server-B6YroA9y.js → server-BtBhCSgd.js} +1 -1
- package/packages/server/dist/{server-QCZQCfjf.js → server-Dn5krTHS.js} +1 -1
- package/packages/server/dist/{server-http-tJ-qTrTX.js → server-http-BXgL1pzw.js} +1 -1
- package/packages/server/dist/{server-http-agZcmQoQ.js → server-http-NwhEoWbY.js} +1 -1
- package/packages/server/dist/{server-stdio-BpzUm6FP.js → server-stdio-0TjK5HFr.js} +1 -1
- package/packages/server/dist/{server-stdio-B0CPUULy.js → server-stdio-DLsg8ccQ.js} +1 -1
- package/packages/tools/dist/index.d.ts +60 -24
- package/packages/tools/dist/index.js +81 -76
- package/scaffold/dist/definitions/bodies.mjs +2 -1
- package/scaffold/dist/definitions/skills/aikit.mjs +121 -1
- package/scaffold/dist/definitions/skills/orchestrator.mjs +12 -1
|
@@ -169,7 +169,8 @@ Use web_fetch/http first. On auth failure, load repo-access; if exhausted, use A
|
|
|
169
169
|
- After read-only/epilogue-only flows: no reindex (0 token cost). remember decisions as normal.
|
|
170
170
|
- If re-onboard/reindex fails: log warning, surface in flow status, do not block.
|
|
171
171
|
- Flow-derived promotion: evidence-backed promotion candidates from final consolidation; confidence alone never promotes.
|
|
172
|
-
- session_digest({ persist: true })
|
|
172
|
+
- session_digest({ persist: true }).
|
|
173
|
+
- **Contribute durable knowledge**: After meaningful work, persist user preferences, repo conventions, architecture invariants, pitfalls, and lessons via \`knowledge({ action: "remember|lesson", ... })\` with appropriate categories and tags. Without curation the workspace skill stays at structural-only — curated facts make it self-improving.`,Planner:`${r()}
|
|
173
174
|
|
|
174
175
|
> **Reminder:** Follow ## MANDATORY FIRST ACTION from your shared base protocol.
|
|
175
176
|
|
|
@@ -1,4 +1,124 @@
|
|
|
1
|
-
var e=[{file:`SKILL.md`,content
|
|
1
|
+
var e=[{file:`SKILL.md`,content:`---
|
|
2
|
+
name: aikit
|
|
3
|
+
description: "Use the @vpxa/aikit AI Kit MCP server for codebase search, context compression, validation, and persistent memory. Load at session start or before using aikit_* tools. This skill teaches tool judgment: minimize raw reads, choose the smallest useful retrieval path, and persist decisions that matter."
|
|
4
|
+
metadata:
|
|
5
|
+
category: cross-cutting
|
|
6
|
+
domain: general
|
|
7
|
+
applicability: always
|
|
8
|
+
inputs: [codebase]
|
|
9
|
+
outputs: [search-results, analysis, knowledge]
|
|
10
|
+
relatedSkills: [session-handoff, present]
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# @vpxa/aikit - AI Kit
|
|
14
|
+
|
|
15
|
+
Use AI Kit as compression, memory, validation, and coordination layer. Each call should reduce uncertainty or token load.
|
|
16
|
+
|
|
17
|
+
## Communicating With the User
|
|
18
|
+
|
|
19
|
+
**Use \`present({ schemaVersion: 1, title, blocks })\` for ALL non-trivial output.** This is the preferred way to show summaries, results, evidence maps, task plans, reviews, comparisons, dashboards, charts, timelines, and batch results to the user. Plain text is only for 1-2 sentence status updates or simple questions. The \`present\` tool renders rich, structured output that the user can interact with.
|
|
20
|
+
|
|
21
|
+
## Session Loop
|
|
22
|
+
|
|
23
|
+
Start:
|
|
24
|
+
1. status({ includePrelude: true }).
|
|
25
|
+
2. If \`onboarded\` is false or \`prelude.onboardContext\` / \`structuredContent.onboard_context\` is null → run \`onboard({ path, mode: 'generate' })\`, then \`status({ includePrelude: true })\` again.
|
|
26
|
+
3. If \`onboard_context.freshness.status\` is \`stale\` or \`unknown\`, or \`nextAction.kind === "update_onboard"\` → run \`onboard({ path, update: true })\`, then \`status({ includePrelude: true })\` again.
|
|
27
|
+
4. **Workspace context start**: Extract workspace skill + fresh onboard context from status: \`workspace_skill.uri\`, \`prelude.workspaceSkillResource\`, \`onboard_context.freshness\`, \`onboard_context.packageMap\`, \`onboard_context.architecture\`, and \`onboard_context.recommendedReadOrder\`. Read \`aikit://skill/SKILL.md\` when full repo-specific guidance is needed. Use fresh onboard context before broad retrieval. ≤ 2,100 tokens.
|
|
28
|
+
5. search({ query: "SESSION CHECKPOINT", origin: "curated" }).
|
|
29
|
+
6. flow({ action: 'status' }) when active flow may exist — use L1 snapshot before broad retrieval.
|
|
30
|
+
7. scope_map({ task }) only when workspace context + checkpoint do not identify a narrow workset.
|
|
31
|
+
|
|
32
|
+
During:
|
|
33
|
+
- Prefer search/file_summary/digest/symbol/trace/graph over raw reads.
|
|
34
|
+
- Use stash for temporary findings; knowledge for durable decisions.
|
|
35
|
+
- Run blast_radius before shared/public edits.
|
|
36
|
+
- Validate with check + relevant test_run.
|
|
37
|
+
|
|
38
|
+
End:
|
|
39
|
+
- reindex after structural changes.
|
|
40
|
+
- produce_knowledge for durable project updates.
|
|
41
|
+
- session_digest({ persist: true }).
|
|
42
|
+
- knowledge remember session checkpoint with done/decisions/next/blockers.
|
|
43
|
+
|
|
44
|
+
## Retrieval Ladder — Layered (Workspace Context + L1-L3)
|
|
45
|
+
|
|
46
|
+
> This table maps knowledge layers to tool needs. For the canonical quick-reference tool decision table, see \`aiKitToolPreference()\` in protocols.mjs.
|
|
47
|
+
|
|
48
|
+
| Layer | Need | Tool |
|
|
49
|
+
|-------|------|------|
|
|
50
|
+
| **Workspace Context** | Workspace skill + fresh onboard context | \`status({ includePrelude: true })\`; read \`aikit://skill/SKILL.md\` only when full guidance is needed. Run \`onboard({ path, mode: 'generate' })\` if \`onboard_context\` is missing; run \`onboard({ path, update: true })\` if \`onboard_context.freshness.status\` is \`stale\` or \`unknown\`. Consume fresh context before broad scans. |
|
|
51
|
+
| **Workspace Context** | Architecture overview | \`status({ includePrelude: true }).onboard_context.architecture\`, then onboard \`diagram.md\` / \`domains.md\` when deeper detail is needed |
|
|
52
|
+
| **Workspace Context** | Package map / repo shape | \`status({ includePrelude: true }).onboard_context.packageMap\`, then onboard \`structure.md\` / \`dependencies.md\` |
|
|
53
|
+
| **Flow Context** | Flow-specific context | L1 flow snapshot via \`knowledge({ action: 'withdraw', scope: 'flow', profile: '<role>' })\` |
|
|
54
|
+
| **L1** | Active flow state | \`knowledge({ action: 'withdraw', scope: 'flow', profile: '<role>' })\` |
|
|
55
|
+
| **L2** | Prior decisions/conventions | \`search\` / \`knowledge\` |
|
|
56
|
+
| **L2** | File structure | \`file_summary({ files, tier: 'T1' })\` |
|
|
57
|
+
| **L2** | Exact relevant section | \`file_summary({ files, tier: 'T2' })\` |
|
|
58
|
+
| **L2** | Many files | \`digest\` |
|
|
59
|
+
| **L2** | Symbol defs/refs | \`symbol\` |
|
|
60
|
+
| **L2** | Call/data flow | \`trace\` |
|
|
61
|
+
| **L2** | Module/import relationships | \`graph\` |
|
|
62
|
+
| **L2** | Impact | \`blast_radius\` |
|
|
63
|
+
| **L2** | Type/lint/test | \`check\` / \`test_run\` |
|
|
64
|
+
| **L3** | Evidence, provenance, conflict review | \`search\` with \`knowledge({ action: 'lesson' })\` — focused only |
|
|
65
|
+
| **General** | Tool choice unknown | \`list_tools({ intent: "<task>" })\` (use intent param for planner-ranked results) or \`search({ query: "tool to <do X>" })\` |
|
|
66
|
+
|
|
67
|
+
Raw read_file only for exact edit lines after compressed tools identify target.
|
|
68
|
+
|
|
69
|
+
## Context Reuse
|
|
70
|
+
|
|
71
|
+
Before rereading path/topic, search exact path/topic first. If response gives ctxc_..., reuse with file_summary({ ref }) or file_summary({ ref, query }). Use enrich: true on tools that support it after first pass.
|
|
72
|
+
|
|
73
|
+
## Patterns
|
|
74
|
+
|
|
75
|
+
- New area: search -> scope_map -> file_summary -> graph/trace -> stash.
|
|
76
|
+
- Bug: search -> symbol -> trace -> file_summary -> test/check -> remember.
|
|
77
|
+
- Refactor shared code: blast_radius -> checkpoint -> file_summary -> rename/codemod -> check -> test_run.
|
|
78
|
+
- Web/API: web_search/web_fetch/http; browser only when JS/auth interaction needed. Browser snapshots now use ~200-400 tokens, making them practical for quick page state checks.
|
|
79
|
+
|
|
80
|
+
## Memory Discipline
|
|
81
|
+
|
|
82
|
+
Store only high-signal facts:
|
|
83
|
+
- Decisions and rationale.
|
|
84
|
+
- Conventions that constrain future work.
|
|
85
|
+
- Non-obvious root causes and fixes.
|
|
86
|
+
- Checkpoints and blockers.
|
|
87
|
+
|
|
88
|
+
Review decayed/stale entries periodically with knowledge({ action: 'flagged' }). Use lesson actions for reusable engineering lessons; load lesson-learned after implementation/review work.
|
|
89
|
+
|
|
90
|
+
### Contribute Durable Knowledge
|
|
91
|
+
|
|
92
|
+
The workspace skill auto-improves from curated knowledge. After meaningful work, persist durable facts:
|
|
93
|
+
- User preferences or collaboration style → \`knowledge({ action: "remember", category: "context", tags: ["user-preference", "collaboration"] })\`
|
|
94
|
+
- Repo conventions or constraints → \`knowledge({ action: "remember", category: "conventions", tags: ["repo-rule", "constraint"] })\`
|
|
95
|
+
- Architecture invariants → \`knowledge({ action: "remember", category: "context", tags: ["architecture-memory", "invariant"] })\`
|
|
96
|
+
- Recurring pitfalls or prevention rules → \`knowledge({ action: "lesson", subAction: "create", context: "...", insight: "...", evidence: "..." })\` with tag \`pitfall\` or \`prevention\`
|
|
97
|
+
- Tool-use or retrieval patterns → \`knowledge({ action: "remember", category: "patterns", tags: ["tool-use", "retrieval"] })\`
|
|
98
|
+
- Stable engineering lessons → \`knowledge({ action: "lesson", ... })\` with confidence >= 60
|
|
99
|
+
|
|
100
|
+
The skill regenerates when promoted knowledge changes. Without curation, the skill stays at structural-only.
|
|
101
|
+
|
|
102
|
+
## Flow + FORGE
|
|
103
|
+
|
|
104
|
+
Flows guide multi-step work. Read active step before acting. FORGE handles tiering/evidence/gates; load references only when main skill is too thin.
|
|
105
|
+
|
|
106
|
+
### Layered Knowledge Protocol
|
|
107
|
+
- **Workspace Context** → Workspace skill + fresh onboard context: load via \`status({ includePrelude: true })\`. Requires \`onboard()\` first — if \`onboard_context\` is null, run \`onboard\`; if \`onboard_context.freshness.status\` is \`stale\` or \`unknown\`, run \`onboard({ path, update: true })\`. Consume the workspace skill preview/resource pointer and fresh onboard package map/architecture/read-order before \`search\`, \`scope_map\`, \`digest\`, or repeated \`file_summary\`. Use \`file_summary({ tier: 'T1' })\` for structure, or \`file_summary({ tier: 'T2', query })\` for content only after status/onboard context narrows the workset. Token-bounded.
|
|
108
|
+
- **L1** → Flow working context. Withdraw before dispatch; reuse before broad retrieval.
|
|
109
|
+
- **L2** → Canonical curated knowledge. Retrieve on demand; never preload broadly.
|
|
110
|
+
- **L3** → Evidence/auto-knowledge. Inspect only for provenance, conflict, or promotion assessment.
|
|
111
|
+
|
|
112
|
+
Reference docs:
|
|
113
|
+
- references/coordination.md - queue, lanes, stash, checkpoints, signaling.
|
|
114
|
+
- references/forge-protocol.md - tiering, evidence, gates.
|
|
115
|
+
- references/search-patterns.md - search, trace, graph, compression recipes.
|
|
116
|
+
- references/layered-knowledge-protocol.md - workspace context + L1-L3 operating policy and hot path.
|
|
117
|
+
|
|
118
|
+
## Self-Dogfooding
|
|
119
|
+
|
|
120
|
+
When developing AI Kit itself: regenerate scaffold output, run focused checks, rebuild, then reindex so future searches see new shape.
|
|
121
|
+
`},{file:`references/coordination.md`,content:`# Coordination
|
|
2
122
|
|
|
3
123
|
Use coordination tools when work is parallel, long-running, or easy to repeat incorrectly.
|
|
4
124
|
|
|
@@ -77,4 +77,15 @@ Every subagent dispatch MUST include:
|
|
|
77
77
|
|
|
78
78
|
STOP → ASSESS (\`git diff --stat\` + \`check({})\`) → CONTAIN (1-3 files: fix, widespread: stash) → RECOVER (stash first) → DOCUMENT (remember what went wrong).
|
|
79
79
|
|
|
80
|
-
Max 2 retries per task. Same failure twice → stop loop, change plan
|
|
80
|
+
Max 2 retries per task. Same failure twice → stop loop, change plan.
|
|
81
|
+
|
|
82
|
+
## Contribute Durable Knowledge
|
|
83
|
+
|
|
84
|
+
After meaningful work, persist facts that make the workspace skill self-improving:
|
|
85
|
+
- **User preferences** → \`knowledge({ action: "remember", category: "context", tags: ["user-preference"] })\`
|
|
86
|
+
- **Repo conventions** → \`knowledge({ action: "remember", category: "conventions", tags: ["repo-rule"] })\`
|
|
87
|
+
- **Architecture invariants** → \`knowledge({ action: "remember", category: "context", tags: ["architecture-memory"] })\`
|
|
88
|
+
- **Pitfalls/prevention** → \`knowledge({ action: "lesson", ..., tags: ["pitfall"] })\`
|
|
89
|
+
- **Tool-use/retrieval patterns** → \`knowledge({ action: "remember", category: "patterns", tags: ["tool-use"] })\`
|
|
90
|
+
|
|
91
|
+
The workspace skill regenerates from curated knowledge. Without deliberate curation, the skill stays at structural-only (package name + build commands). The promotion engine observes tool use and can auto-promote conventions, but manual curation produces the highest-quality skill sections.`}];export{e as default};
|