ingest-code
Installation
SKILL.md
STOP. READ THIS ENTIRE SKILL.MD BEFORE CALLING ANY ENDPOINT.
ingest-code
Codebase ingestion into /memory:
- Phase 1 — Functional Knowledge: Python AST extracts module docstrings, function signatures, class hierarchies. Markdown parser extracts section-level knowledge from CONTEXT.md, README.md, etc. Generic parser handles TS/JS exports.
- Phase 2 — CWE Scanning:
/taxonomyextracts security-relevant patterns (bridge tags + CWE mappings) per file. - Phase 3 — Relationship Edges: Python import analysis stores resolved code dependency edges in
/memory; the local code-graph bundle also records typed import/call/inheritance occurrences, including inactive unresolved and ambiguous candidates for audit. - Phase 4 — Structured Code Index: Optional Tree-sitter extraction emits a complete code-graph bundle and applies it through Memory/GMO's governed
/code/projection/applylifecycle endpoint. - Static Debugger Affordances: Code-graph bundles emit
debugger.invocation_candidate.v1rows indebug_invocations.jsonl. These are candidate routes only;$debuggermust prove a candidate at runtime before Memory can promote it.
Functional lessons and CWE summaries remain lesson-style memory records for compatibility. Structured files, symbols, and edges are canonicalized by Memory/GMO's complete projection lifecycle, not by independent per-symbol batches. /memory owns ArangoDB, Qdrant, embeddings, sparse/hybrid retrieval, and payload/index behavior. /ingest-code must not talk to ArangoDB or Qdrant directly.
Quick Start
cd .pi/skills/ingest-code