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.
This commit is contained in:
2026-06-09 19:14:41 +02:00
parent d311c8fb3c
commit 3dbb3cb7b2
9 changed files with 733 additions and 34 deletions
+5 -1
View File
@@ -1,5 +1,9 @@
import { discoverProject, type DirectoryEntry } from "./discover.js";
import { renderPackageMap, type PackageMapData, type FileEntry } from "./format.js";
import {
renderPackageMap,
type PackageMapData,
type FileEntry,
} from "./format.js";
import { extractFileLLM, extractPackageLLM } from "./llm-extract.js";
import { extractFileAST } from "./ast-extract.js";
import { mergeFileData } from "./merge.js";