Batch extraction and history caching
Implement efficient batch extraction of history for all plan entities and integrate with the existing .plan-cache.json caching mechanism. Handle shallow clone edge cases.
Implement efficient batch extraction of history for all plan entities and integrate with the existing .plan-cache.json caching mechanism. Handle shallow clone edge cases.
No incremental history — criteria tracking started on Apr 19.
git log call to get all commits affecting the plan directory with file listscreated event without running full extractionHistoryCacheEntry added to cache structure with latestCommit hash and events arrayExtend the existing scanPlanFiles() cache structure in runes/plan/src/scanner.ts (or a sibling module) to include history entries keyed by latest commit hash. The batch extraction function runs git log --format="%H %aI %aN %s" --name-only -- <plan-dir> once to get all commits with affected files, then delegates to per-entity extraction for files with multiple commits.
Follow the shallow clone detection pattern from packages/content/src/timestamps.ts (git rev-parse --is-shallow-repository).
Completed: 2026-04-13
Branch: claude/spec-038-breakdown-pChav
runes/plan/src/history.ts — Core event model types (HistoryEvent, AttributeChange, CriteriaChange) + per-entity extraction algorithm (git log --follow, git show, parse/diff) + batch extraction + cachingrunes/plan/src/commands/history.ts — CLI plan history command with single-entity and global modes, all filters (--since, --type, --author, --status, --all, --limit, --format json)runes/plan/src/cli-plugin.ts — Registered history command in CLI pluginrunes/plan/src/tags/plan-history.ts — Self-closing plan-history tag definition with sentinel patternrunes/plan/src/pipeline.ts — Extended PlanAggregatedData with history + repositoryUrl fields, added aggregate hook extraction, added postProcess resolver for per-entity timeline and global commit-grouped feedrunes/plan/src/commands/render-pipeline.ts — Pass plan directory to pipeline via setPlanDirrunes/plan/src/config.ts — Added PlanHistory rune configrunes/plan/src/index.ts — Exported plan-history rune in RunePackagerunes/plan/styles/default.css — Timeline CSS with vertical line, circle markers, diff coloring, responsive layoutrunes/plan/test/history.test.ts — 31 tests covering parsing, diffing, and integration with real git repos