◎ new in v0.4.1

Jump straight to
relevant code

Context packs give you a small, ranked starting set for a bugfix or review task — exact matches, key paths, test files, config files, and changed-file signals — without reading full file bodies or spending tokens on unrelated results.

// 01 — overview

Instant trailheads

Context packs are bounded envelopes that surface the highest-signal starting points for a given intent. They work through heuristics only — no LLM calls, no embeddings, no symbol graph.

What's inside a pack

  • Ranked paths — files most likely relevant to the intent
  • Clipped snippets — short preview lines from each file, not full bodies
  • Reason tags — why each file was included (e.g. exact_match, test_file, config_file, changed_file)
  • Next-step hints — suggested searches or reads to follow up with

Output is always bounded: the pack never grows unboundedly with repo size.

Ranking signals (v1)

exact_match · Files matching the intent query directly
path_match · Files whose path segments match the intent keywords
test_file · Test files co-located with matched source files
config_file · Config and fixture files near matched sources
changed_file · Files recently modified according to the watcher

No LLM inference, no embeddings, no full-file indexing beyond the trigram index.

// 02 — cli usage

CLI command

Run triseek context-pack from any directory inside a repo. The pack is printed to stdout in human-readable form by default, or as JSON with --json.

Basic usage

shell
triseek context-pack "fix the auth timeout bug"

Specify a root explicitly:

shell · explicit root
triseek context-pack "add retry logic" /path/to/repo

Machine-readable JSON output:

shell · json
triseek context-pack "review payment flow" --json

Human-readable output

terminal output
Context pack · intent: "fix the auth timeout bug"
──────────────────────────────────────────
 1  src/auth/config.rs        [exact_match]
    12  AuthConfig { timeout: 30, retry_ms: 500 }

 2  src/auth/client.rs         [exact_match, changed_file]
    47  fn connect(cfg: &AuthConfig) -> Result<_>

 3  tests/auth_test.rs         [test_file]
    8   let cfg = AuthConfig::default();
──────────────────────────────────────────
Hints: search_content("AuthConfig"), read src/auth/config.rs
// 03 — mcp tool

MCP context_pack

The context_pack MCP tool exposes the same bounded envelope to Claude Code, Codex, and any MCP-capable client. It is the recommended first call for bugfix or review tasks.

Tool input

context_pack
{
  "intent": "fix the auth timeout bug",
  "limit": 10
}
Field Type Description
intent string Free-text description of the bugfix or review task
limit integer Max entries in the pack (default 10, hard cap 30)

Tool output

response envelope
{
  "intent": "fix the auth timeout bug",
  "entries": [
    {
      "path": "src/auth/config.rs",
      "rank": 1,
      "reasons": ["exact_match"],
      "snippet": {
        "line": 12,
        "text": "AuthConfig { timeout: 30 }"
      }
    }
  ],
  "hints": [
    "search_content(\"AuthConfig\")",
    "read src/auth/config.rs"
  ],
  "truncated": false
}

When to use context_pack

Call context_pack at the start of a session when you have an intent but no specific file in mind. It surfaces the smallest possible starting set so the agent can orient quickly without reading full files or running multiple broad searches. Follow the hints field for the next logical searches.

For general code exploration without a specific intent, use search_content or find_files directly.

// 04 — design notes

Design constraints

Context packs are intentionally heuristic-only in v1. This keeps latency low and output fully deterministic.

What context packs do

  • Run an exact trigram-indexed search on the intent text
  • Collect path, test, config, fixture, and changed-file neighbors
  • Rank by signal strength and clip to the limit
  • Return short snippets (one line per entry) instead of full file bodies
  • Provide hints for the most likely follow-up searches

What context packs don't do

  • Call an LLM or external model
  • Generate embeddings or vector similarity
  • Parse or analyze symbol graphs
  • Return full file bodies
  • Replace search_content for targeted follow-up searches

The v1 design prioritizes zero-latency, zero-token-cost orientation over deep semantic ranking.

// 05 — related

Related docs

Related Pages

v0.4.1 release notes

Context packs shipped in TriSeek v0.4.1. The release also extended the real-harness validation to cover context_pack alongside existing CLI and MCP search and memo checks.

View release on GitHub →