Files
2026-05-24 23:54:48 -06:00

1.2 KiB

Phase 3 — context extraction

Goal

Build deterministic machine-readable evidence packets for naming, diff summaries, and later transform replay decisions without using an LLM.

Script

scripts/extract-context.js

Deliverables

  • runs/<run-id>/context/segments.jsonl
  • runs/<run-id>/context/bindings.jsonl
  • runs/<run-id>/reports/context-summary.md
  • detailed requirements: docs/phase-3-requirements.md

Packet contents per segment

  • stable segment ID
  • canonical code reference
  • local binding graph
  • visible import-like origins
  • member access patterns
  • string literals, export hints, error text, CLI flags, and neighboring context
  • callsite, assignment, and return usage hints for local functions

Release-oriented requirements

  • context must be deterministic across reruns of the same snapshot
  • context should support compact upstream summaries, not just naming prompts
  • context packets must remain usable when deriving transform anchors for maintained changes

Verification

  • spot-check bindings and call patterns for representative segments
  • confirm packets are deterministic across two runs of the same bundle