Skip to main content

Zubin Pather - generate zethis-style Path Packs from agent session logs

Project description

zather

zather generates Path Packs: procedural docs that teach a coding agent how to recreate the context-building pathway from an excellent Claude Code / Codex CLI session.

Unlike compaction systems that try to reproduce the final patch, zather compacts the path: the ordered set of reads/searches/commands and intermediate "what we learned" checkpoints that got the agent to a useful semantic state.

Install

uv pip install -e .

Quick Start

Generate a Path Pack from a Codex CLI session:

# By session ID
zather build --source codex --session <session-id> --out path-pack.md

# By session file path
zather build --source codex --session-file ~/.codex/sessions/.../rollout-...jsonl --out path-pack.md

Generate from a Claude Code session:

zather build --source claude --project . --session <session-id> --out path-pack.md

List available sessions:

zather list --source codex
zather list --source claude --project .

Options

zather build --source codex --session <id> --out path-pack.md \
    --model gpt-5-mini \           # Override model (default: from prompt YAML)
    --max-events 250 \             # Max trajectory events to include
    --max-chars 1500 \             # Max chars per tool output
    --prompt custom-prompt.yaml \  # Custom prompt template
    --weave-project wandb/zather \ # Enable weave tracking
    --dry-run                      # Write prompts only, no LLM call

Checkpoints

Target a specific time range within a session:

zather build ... --since 2026-01-07T20:04:00Z --until 2026-01-07T20:10:00Z

Architecture

zather uses the WBAL agent framework:

  • ZatherEnv: Loads trajectory data and prompt configuration
  • ZatherAgent: Generates Path Pack using submit_path_pack tool
  • GPT5MiniTester: Default LM (gpt-5-mini with minimal reasoning)
from zather import ZatherEnv, ZatherAgent, build_path_pack

# Load environment with trajectory
env = ZatherEnv.load(
    source="codex",
    session_id="019b9fa7-...",
    output_path=Path("path-pack.md"),
    prompt_path=Path("zather/prompts/path_pack.yaml"),
)

# Generate path pack
build_path_pack(env=env)

Evaluation

The eval/ directory contains a weave-based evaluation framework:

python -m eval.evaluation --sessions-dir eval/sessions --project zather-eval

This runs:

  1. ZatherModel: Generates Path Packs from session files
  2. PathPackQualityScorer: LLM-as-judge for document quality
  3. PathReconstructionScorer: Runs Codex with the Path Pack, compares trajectories

Evaluation Dataset

Place session JSONL files in eval/sessions/. Each file should be a Codex CLI session log.

Prompting

The default prompt template is at zather/prompts/path_pack.yaml. It defines:

  • system_prompt: Instructions for the Path Pack format
  • user_prompt_template: Template with {session_meta_yaml} and {trajectory_markdown} placeholders
  • model: Default model to use
  • reasoning_effort: Optional reasoning effort level

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zather-0.3.0.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zather-0.3.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file zather-0.3.0.tar.gz.

File metadata

  • Download URL: zather-0.3.0.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zather-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7ee8ea9aa207abfdbd98485b1de6b6c326ed9f71b835ebcfe7dbee60bf79fafe
MD5 009239b82a2a69bcaa33ef12fbbb0329
BLAKE2b-256 275e685fbf9f8390cec644bf83703b8a83f8798b2495fdf3b90db5a44742c40b

See more details on using hashes here.

File details

Details for the file zather-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: zather-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zather-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a62de6f5e0ed96fd2b654b0b69e8d2ab498213877901d6305aacf0baaec11bd
MD5 4adabf8390d2b2c754ccf4acecb150b4
BLAKE2b-256 b29af698b8aa46d15f2157852893794497ab5d47ec20c4e9ab893e1e4b34c4d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page