Skip to content

Add task-conditioned slicing v1 integration plan for context_pack #135

@mohanagy

Description

@mohanagy

Goal

Turn the existing broad slicing roadmap (#73) into an integration plan for a first user-visible task-conditioned slicing path inside context_pack / retrieve flows.

This issue should not replace #73. It should define the smallest useful v1 integration that can ship safely after the benchmark and selector work.

Why

SPI gives better program structure, but graphify-ts still needs the real methodology shift:

task → anchors → backward/forward behavior slice → budgeted context pack

Without this, graphify-ts remains mostly "better graph + better retrieval" instead of a true task-conditioned context compiler.

Related

Scope

Create a v1 integration design and, if appropriate, a minimal implementation behind an opt-in strategy flag.

v1 task modes

Limit v1 to these modes:

  1. explain
  2. debug
  3. impact
  4. pr-review

v1 anchors

Support anchors from:

  • explicit file path in prompt
  • explicit symbol/class/function/method name
  • framework route/path/http method metadata
  • git diff changed ranges / changed symbols
  • stack trace line if provided
  • high-confidence lexical match fallback

v1 slice directions

explain

  • include target node
  • direct callees
  • immediate callers
  • containing module/file
  • tests where available

debug

  • backward: callers, config/env/db reads, guards/middleware
  • forward: side effects, external calls, DB writes, queues/events where represented
  • include stack-trace exact source if available

impact

  • forward: dependents/callers/routes/tests/public boundaries
  • include high-impact/god/bridge nodes only if directly connected

pr-review

  • changed ranges → containing symbols
  • direct callers/callees
  • tests
  • public API/config/db/route boundaries

Deliverables

  • Design doc or implementation note describing v1 slicing semantics
  • Slicer adapter interface compatible with current context_pack/retrieve path
  • Optional strategy: 'default' | 'slice-v1' flag or equivalent if implemented
  • Unit tests with small fixtures
  • Comparison against default retrieval on at least 3 prompts

Acceptance criteria

Non-goals

Suggested labels

retrieval, context-quality, architecture, spi, slicing

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureCross-cutting design or substrate decisionscontext-qualityQuality of the compiled context packenhancementNew feature or requestretrievalGraph retrieval / search / candidate selectionroadmapTracked on the public README roadmap

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions