alex
69d3acda5d
feat: M7 proper LLM integration with dual providers, caching, and parallel batching
...
- Add LLM client abstraction (src/llm-client.ts) with factory pattern
- Add OpenAI-compatible external client (src/external-llm-client.ts)
- Add Kimi.com client using Anthropic-based API (src/kimi-llm-client.ts)
- Add Pi native LLM stub (src/pi-llm-client.ts) for future ExtensionAPI wiring
- Add SHA-256 disk cache at ~/.cache/pi-project-map/ (src/llm-cache.ts)
- Add parallel batching with p-limit, retry + exponential backoff (src/llm-batch.ts)
- Rewrite llm-extract.ts to use real LLM calls with structured prompts
- File-level: PURPOSE, DEPS, CONCEPTS
- Package-level: ROLE, ARCH
- Context truncation, 50KB skip, cache before LLM call
- Wire CLI with --llm-provider, --llm-model, --llm-base-url flags
- Update config.ts with llmProvider, llmBaseUrl fields
- Update init.ts and patch.ts to accept optional LLMClient
- Add sample project fixture for manual testing
- Add tests: llm-cache (3), llm-batch (5), llm-integration (8 with real Kimi API),
pi-extension (14 mocked)
- All 56 tests pass
2026-06-09 22:49:34 +02:00
alex
93c2ac60c5
Pi skill integration, CLI polish, --fix flag, config file support
...
- SKILL.md: Proper Agent Skills frontmatter with name/description
- pi-extension.ts: Pi extension registering 4 custom tools
(project_map_init/patch/validate/reinit) with prompt snippets/guidelines
- pi-extension.ts: Auto-detects .pi-map.md files on session start, warns
about dirty markers, injects maintenance hints before agent start
- package.json: Added pi.extensions and pi.skills entries
- CLI: Added picocolors, clean help screen, progress indicators,
summary output with timing, colored check/warning icons
- validate.ts: Added --fix flag that regenerates directories with
discrepancies
- config.ts: Reads .pi-project-map.json from project root with merge
over defaults
- init.ts: Added optional verbose parameter for programmatic use
All 16 tests pass. TypeScript compiles clean. Build succeeds.
2026-06-09 20:54:59 +02:00
alex
ab45859d65
Add AST extraction tests, broader ignore patterns, build dist
...
- ast-extract.ts: Support tree-sitter-python and tree-sitter-go grammar
loading (pkg.language fallback)
- discover.ts: Add cache directories to default ignore (.cache, tmp,
temp, .turbo, .parcel-cache, .eslintcache, .prettiercache)
- tests: Add TypeScript AST extraction tests (exports + imports)
- Verified on real project: media_library_viewer (196 .pi-map.md files)
with accurate React component extraction
- Build: npm run build produces clean dist/ output
All 16 tests pass.
2026-06-09 19:25:56 +02:00
alex
3dbb3cb7b2
Fix discover, improve LLM heuristics, add integration tests
...
- discover.ts: Fix ignore package path handling for root '.' directories,
add .pi-map.md to default ignore list
- llm-extract.ts: Fix export regex to only match line-start exports and
handle 'export async function', fix root package role to 'Project root'
- init.ts: Minor cleanup
- .gitignore: Add .pi-map.md
- tests: 6 integration tests covering init, patch (small/large packages),
validate (missing, orphaned, stale-signature detection)
All 14 tests pass. TypeScript compiles clean.
2026-06-09 19:14:41 +02:00
alex
fd958671ca
Initial commit: pi-project-map skill scaffolding
...
- Design doc with full spec (dense markdown format, hybrid AST+LLM pipeline,
consumption model, stale data mitigation)
- Implementation plan with 6 milestones and rollout strategy
- TypeScript package structure with all source stubs
- CLI entry point, formatter, discover, init, patch, validate, extract, merge
- Pi SKILL.md with tool definitions and format documentation
2026-06-09 17:45:19 +02:00