@vpxa/aikit 0.1.128 → 0.1.129
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/core/dist/index.js +1 -1
- package/packages/embeddings/dist/index.d.ts +14 -0
- package/packages/embeddings/dist/index.js +1 -1
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/{server-C_cXoajp.js → server-GAK3m_Kn.js} +262 -246
- package/scaffold/dist/adapters/skills.mjs +1 -1
- package/scaffold/dist/definitions/prompts.mjs +126 -1
- package/scaffold/dist/definitions/skills/c4-architecture.mjs +26 -2
- package/scaffold/dist/definitions/skills/docs.mjs +7 -3
- package/scaffold/dist/definitions/skills/present.mjs +3 -47
- package/scaffold/dist/generated/block-docs.mjs +81 -0
- package/scaffold/generated/block-docs.mjs +13 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SKILLS as e}from"../definitions/skills/index.mjs";function
|
|
1
|
+
import{SKILLS as e}from"../definitions/skills/index.mjs";import{ALL_BLOCK_DOCS as t,BLOCK_DOCS_BY_SKILL as n,BLOCK_TYPE_LIST as r}from"../generated/block-docs.mjs";const i={bySkill:n,all:t,typeList:r};function a(){let t=[];for(let[n,r]of Object.entries(e)){let e=typeof r==`function`?r({blockDocs:i}):r;for(let{file:r,content:i}of e)t.push({path:`${n}/${r}`,content:i})}return t}export{a as generateSkills};
|
|
@@ -222,4 +222,129 @@ Each step README should include:
|
|
|
222
222
|
- **Inputs** — What context/artifacts from prior steps are needed
|
|
223
223
|
- **Instructions** — Detailed steps for the agent to follow
|
|
224
224
|
- **Output** — What artifact(s) to produce and where to save them
|
|
225
|
-
- **Acceptance criteria** — How to know the step is complete`}
|
|
225
|
+
- **Acceptance criteria** — How to know the step is complete`},docs:{description:`Deep codebase understanding — analyze, learn, document, and visualize the entire project as an interactive knowledge graph`,agent:`Orchestrator`,tools:[`onboard`,`analyze`,`audit`,`produce_knowledge`,`graph`,`measure`,`blast_radius`,`search`,`symbol`,`trace`,`dead_symbols`,`file_summary`,`compact`,`digest`,`knowledge`,`present`,`check`,`test_run`,`git_context`],content:`## Understand & Document — Full Codebase Intelligence
|
|
226
|
+
|
|
227
|
+
Turn this codebase into a deeply understood, richly documented, and visually explorable project.
|
|
228
|
+
"Understand Anything" philosophy: **graphs that teach > graphs that impress.**
|
|
229
|
+
|
|
230
|
+
This is NOT just documentation generation — it is a full **analyze → understand → learn → document → present** pipeline.
|
|
231
|
+
|
|
232
|
+
### Phase 1: Deep Scan (parallel analysis)
|
|
233
|
+
|
|
234
|
+
Run all analysis tools in parallel to build a comprehensive baseline:
|
|
235
|
+
|
|
236
|
+
1. **Onboard** — \`onboard({ path: "." })\` if not already done (check \`status()\` first)
|
|
237
|
+
2. **Structure** — \`analyze({ aspect: "structure", path: "." })\`
|
|
238
|
+
3. **Dependencies** — \`analyze({ aspect: "dependencies", path: "." })\`
|
|
239
|
+
4. **Symbols** — \`analyze({ aspect: "symbols", path: "." })\`
|
|
240
|
+
5. **Patterns** — \`analyze({ aspect: "patterns", path: "." })\`
|
|
241
|
+
6. **Entry Points** — \`analyze({ aspect: "entry_points", path: "." })\`
|
|
242
|
+
7. **Diagrams** — \`analyze({ aspect: "diagram", path: "." })\`
|
|
243
|
+
8. **Health Audit** — \`audit({ path: "." })\`
|
|
244
|
+
9. **Complexity** — \`measure({ path: "." })\`
|
|
245
|
+
10. **Git Context** — \`git_context({ include_diff: true })\`
|
|
246
|
+
11. **Dead Symbols** — \`dead_symbols({ path: "." })\`
|
|
247
|
+
|
|
248
|
+
Stash all results for later phases.
|
|
249
|
+
|
|
250
|
+
### Phase 2: Knowledge Graph Construction
|
|
251
|
+
|
|
252
|
+
Build a navigable knowledge graph of the codebase:
|
|
253
|
+
|
|
254
|
+
1. **Discover modules** — \`graph({ action: 'find_nodes' })\` to get all indexed modules
|
|
255
|
+
2. **Map relationships** — For key modules, \`graph({ action: 'neighbors', node_id, direction: 'both' })\`
|
|
256
|
+
3. **Trace critical paths** — Use \`trace({ start: "<entry-point>", direction: "forward" })\` on each entry point
|
|
257
|
+
4. **Identify layers** — Classify modules into architectural layers (API, Service, Domain, Data, Infrastructure, UI, Utility, Config)
|
|
258
|
+
5. **Detect communities** — \`graph({ action: 'detect_communities' })\` to find natural module clusters
|
|
259
|
+
6. **Symbol deep-dive** — For each public API/export, \`symbol({ name })\` to understand usage
|
|
260
|
+
|
|
261
|
+
Persist the graph structure and layer classification.
|
|
262
|
+
|
|
263
|
+
### Phase 3: Multi-Agent Understanding (parallel dispatch)
|
|
264
|
+
|
|
265
|
+
Dispatch Researcher agents **in parallel** to deeply understand different aspects:
|
|
266
|
+
|
|
267
|
+
**Researcher-Alpha** — Architecture & Design Patterns:
|
|
268
|
+
- What architectural style is used? (layered, hexagonal, microservice, monolith)
|
|
269
|
+
- What design patterns appear? (repository, factory, strategy, observer, etc.)
|
|
270
|
+
- How is data flow organized? (request lifecycle, event pipeline, etc.)
|
|
271
|
+
|
|
272
|
+
**Researcher-Beta** — Business Logic & Domain:
|
|
273
|
+
- What are the core business domains/bounded contexts?
|
|
274
|
+
- What are the key business flows and processes?
|
|
275
|
+
- What domain entities and value objects exist?
|
|
276
|
+
- How is business logic separated from infrastructure?
|
|
277
|
+
|
|
278
|
+
**Researcher-Gamma** — Integration & Infrastructure:
|
|
279
|
+
- What external services, APIs, databases are used?
|
|
280
|
+
- How is authentication/authorization handled?
|
|
281
|
+
- What is the deployment topology?
|
|
282
|
+
- What monitoring, logging, observability exists?
|
|
283
|
+
|
|
284
|
+
**Researcher-Delta** — Quality & Concerns:
|
|
285
|
+
- What is the test coverage strategy?
|
|
286
|
+
- What tech debt or code smells exist?
|
|
287
|
+
- What security concerns should be noted?
|
|
288
|
+
- What performance bottlenecks are visible?
|
|
289
|
+
- What are the highest-complexity files?
|
|
290
|
+
|
|
291
|
+
### Phase 4: Document Everything
|
|
292
|
+
|
|
293
|
+
Load the \`docs\` skill and generate comprehensive documentation:
|
|
294
|
+
|
|
295
|
+
1. **Project Knowledge** (7 architecture docs):
|
|
296
|
+
- \`docs/architecture/stack.md\` — Language, runtime, frameworks, all dependencies
|
|
297
|
+
- \`docs/architecture/structure.md\` — Directory layout, entry points, key files
|
|
298
|
+
- \`docs/architecture/design.md\` — Layers, patterns, data flow, component boundaries
|
|
299
|
+
- \`docs/architecture/conventions.md\` — Naming, formatting, error handling, imports
|
|
300
|
+
- \`docs/architecture/integrations.md\` — External APIs, databases, auth, monitoring
|
|
301
|
+
- \`docs/architecture/testing.md\` — Test frameworks, file organization, mocking
|
|
302
|
+
- \`docs/architecture/concerns.md\` — Tech debt, security risks, performance issues
|
|
303
|
+
|
|
304
|
+
2. **Component Docs** — For each major module/component:
|
|
305
|
+
- \`docs/architecture/components/{name}.md\` — Purpose, API, design decisions, data flow
|
|
306
|
+
|
|
307
|
+
3. **Reference Docs**:
|
|
308
|
+
- \`docs/reference/api.md\` — API surface, endpoints, schemas
|
|
309
|
+
- \`docs/reference/configuration.md\` — Config options, environment variables
|
|
310
|
+
|
|
311
|
+
4. **Guides**:
|
|
312
|
+
- \`docs/guides/onboarding.md\` — Guided tour for new developers (dependency-ordered walkthrough)
|
|
313
|
+
- \`docs/guides/architecture-tour.md\` — Visual architecture walkthrough
|
|
314
|
+
|
|
315
|
+
5. **Project Overview**:
|
|
316
|
+
- \`docs/README.md\` — Index linking all docs, project summary
|
|
317
|
+
|
|
318
|
+
6. **Persist Knowledge** — \`produce_knowledge({ path: "." })\` + \`knowledge({ action: "remember", ... })\` for key findings
|
|
319
|
+
|
|
320
|
+
### Phase 5: Interactive Presentation
|
|
321
|
+
|
|
322
|
+
Present the understanding as a rich interactive dashboard using \`present\`:
|
|
323
|
+
|
|
324
|
+
1. **Architecture Overview** — Mermaid diagram of system layers and component relationships
|
|
325
|
+
2. **Dependency Graph** — Module dependency visualization
|
|
326
|
+
3. **Metrics Dashboard** — File count, complexity distribution, test coverage, health score
|
|
327
|
+
4. **Knowledge Map** — Key modules with descriptions, organized by architectural layer
|
|
328
|
+
5. **Guided Tour** — Recommended reading order for codebase onboarding
|
|
329
|
+
6. **Concerns Board** — Tech debt, dead code, security risks as a status board
|
|
330
|
+
7. **Business Domain Map** — Domain entities and their relationships
|
|
331
|
+
|
|
332
|
+
Use the \`c4-architecture\` skill for generating proper C4 architecture diagrams (Context, Container, Component levels).
|
|
333
|
+
|
|
334
|
+
### Output Summary
|
|
335
|
+
|
|
336
|
+
After all phases complete, present a final summary to the user:
|
|
337
|
+
- Total files analyzed, modules discovered, patterns detected
|
|
338
|
+
- Architecture style and key design decisions identified
|
|
339
|
+
- Number of docs generated and their locations
|
|
340
|
+
- Top concerns and recommendations
|
|
341
|
+
- Links to the interactive dashboard
|
|
342
|
+
|
|
343
|
+
### Rules
|
|
344
|
+
|
|
345
|
+
- **Every claim must be traceable** to source files or tool output
|
|
346
|
+
- **Never infer or assume** — only document what is verifiable
|
|
347
|
+
- **Mark unknowns** with \`[TODO]\` and intent-dependent decisions with \`[ASK USER]\`
|
|
348
|
+
- **Delegate to specialists**: architecture diagrams → \`c4-architecture\` skill, ADRs → \`adr-skill\`
|
|
349
|
+
- **Compress between phases** — use \`digest\` and \`stash\` to manage context
|
|
350
|
+
- **🛑 STOP after Phase 5** — present results and ask user for feedback before any follow-up work`}};export{e as PROMPTS};
|