WORK-086
ID:WORK-086Status:done

Consolidate Plan Scanner with Shared Git Timestamp Utility

Priority:mediumComplexity:simpleMilestone:v1.0.0Source:SPEC-029

Criteria completion

Criteria completion: 6 of 6 (100%) checked; history from Mar 30 to Apr 30%25%50%75%100%Mar 30Apr 3
Branches 3
History 7
  1. f2b3512
    Content editedby Claude
    Add {ID}-{slug}.md filename convention + migrate filenames subcommand
  2. 59ded4a
    Content editedby Claude
    Implement SPEC-037 plan package hardening: all 7 work items
  3. f262d7b
    Content editedby Claude
  4. f0a845a
    • ☑ `runes/plan/src/scanner.ts` imports and uses the shared timestamp utility from `packages/content/` instead of its own `getGitMtimes()` implementation
    • ☑ The `getGitMtimes()` function is removed from `scanner.ts`
    • ☑ The `mtime` field in scanner results is derived from the shared utility's `modified` value
    • ☑ `plan-activity` rune displays the same modification dates as `$file.modified` on individual plan runes
    • ☑ No functional change in plan-activity output (dates match previous behavior)
    • ☑ All existing plan scanner tests pass
    by Claude
  5. f87ae8d
    statusreadydone
    by Claude
  6. 2a05e00
    Content editedby Claude
  7. 43cadfe
    Created (ready)by Claude
    plan: break down SPEC-029 into work items WORK-083 through WORK-087

Summary

Refactor the plan scanner's getGitMtimes() in runes/plan/src/scanner.ts to use the shared git timestamp utility from packages/content/, eliminating duplicate git timestamp collection code. The plan-activity rune's mtime field will be sourced from the same data as $file.modified, ensuring consistency between the activity feed and individual rune attributes.

Acceptance Criteria

  • runes/plan/src/scanner.ts imports and uses the shared timestamp utility from packages/content/ instead of its own getGitMtimes() implementation
  • The getGitMtimes() function is removed from scanner.ts
  • The mtime field in scanner results is derived from the shared utility's modified value
  • plan-activity rune displays the same modification dates as $file.modified on individual plan runes
  • No functional change in plan-activity output (dates match previous behavior)
  • All existing plan scanner tests pass

Approach

  1. Add @refrakt-md/content as a dependency of @refrakt-md/plan (or extract the utility to a shared location both can import)
  2. Replace getGitMtimes() calls in scanner.ts with the shared utility
  3. Map the shared utility's output format to the scanner's expected mtime field
  4. Verify plan-activity output is unchanged

References

  • SPEC-029 (Phase 4 — Plan Scanner Consolidation)
  • WORK-083 (shared git timestamp utility — dependency)
  • runes/plan/src/scanner.ts — current getGitMtimes() implementation