All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Pi launch-context extension at
.pi/extensions/dirpack-launch-context.tsfor automatic hiddendirpackinjection on session start, enabled by default with a 2000-token budget and/dirpack on|off|budget|status|refreshcontrols. /dirpack create <tokens>one-shot command for explicit hidden context injection without persisting config changes.- Claude Code plugin at
integrations/claude-code/(marketplacerawwerks-dirpack). Injects a fresh token-budgeted dirpack index into every Claude Code session via aSessionStarthook, and ships five slash commands:/dirpack:status,/dirpack:on,/dirpack:off,/dirpack:budget <N>, and/dirpack:create <N>(the last being a one-shot pack of the current working directory that doesn't mutate persisted config). Default budget is 2000 tokens; state persists to${XDG_CONFIG_HOME:-~/.config}/dirpack/cc-plugin.json. - On-disk pack cache that short-circuits repeated packs when inputs are unchanged. Cache key is a SHA-256 of the dirpack version, canonical root, budget target, config digest, and a sorted manifest of every scanned file's
(path, size, mtime). Opt out with--no-cache,DIRPACK_NO_CACHE=1, or[cache] enabled = falsein dirpack.toml. max_file_size_bytesscanning config (default: 2 MiB). Files larger than this limit still appear in the directory spine but are skipped for signature extraction and content reads, preventing multi-second stalls on repos with large binary/data files.- CLI
--excludepatterns are now merged into config exclude patterns and applied in all scan modes (previously--excludewas parsed but not wired intorun_pack). content_weightper file category controls how aggressively each category's files are included in the content phase. Defaults: code/docs 1.0, config 0.2, build/data 0.0. Configurable in dirpack.toml via[categories.<name>].content_weight.test_content_weightandfixture_content_weightin[priority](both default 0.0). Test and fixture files get spine + signatures but never content body. Set to 1.0 to restore old behavior.- Import-only snippet detection: truncated snippets where >80% of lines are import/require/use statements are skipped automatically.
- Content extractors: optional
extractfield on priority rules transforms file content before budget accounting. Four built-in extractors:json_keys(package.json deps/scripts),toml_sections(Cargo.toml dependencies),lines_matching(go.mod require blocks),api_surface(pub mod/use/fn declarations from entry points). Default rules auto-extract for common manifests and lib.rs files. Configurable per-pattern in dirpack.toml.
- Content phase skips files under 50 bytes (fully represented by spine) and snippets truncated to fewer than 3 lines (eliminates single-import/shebang junk). Among equal-priority files, larger files now sort first for content inclusion instead of smaller ones.
- Submodule-like edge-case tests now stage their nested
.gitfile in a temp copy of the fixture so colocatedjjrepos do not report phantom deletions undertests/fixtures/submodule_like/. - User-configured
[exclude] patternsnow apply in--no-gitmode. Previously they were silently dropped whenuse_gitwas false, which meant--no-gitpacks could scan directories that should have been excluded (e.g.,target/,node_modules/).
- CLI alias
--budgetfor--target-tokens.
- Raised max token budget from 8,000 to 200,000 (and max byte budget from 32KB to 800KB).
- CLI alias
--token-budgetfor--target-tokens.
- Use unused full-content budget for snippets so content fills available budget.
- Apply per-file snippet cap only when the snippet pool is tight.
- Eval metrics now report budget utilization ratio and include a utilization guard on a content-heavy fixture.
- Utilization guard allows modest variance and skips enforcement when content is insufficient.
- Hybrid content budgeting for progressive disclosure (full content for small/high-priority files, then per-file snippets from remaining budget).
- Configurable content controls:
full_budget_ratio,max_full_tokens,max_snippet_tokens,exclude_patterns.
--root-labelflag to override displayed root path in output- One-liner install script:
curl -fsSL https://raw.githubusercontent.com/rawwerks/dirpack/master/install.sh | bash - GitHub release workflow for pre-built binaries (Linux/macOS, x86_64/aarch64)
- Truncation indicator
[+N files truncated]shows what was cut from output - Pack concurrency limiter via
DIRPACK_PACK_CONCURRENCY_LIMITenv var - Budget caps and safe config overrides to prevent runaway scanning
- Configurable priority weights in
[priority]config section - 44 edge case tests covering all fixture scenarios
- Visual inspection output in eval harness
- Round-robin signature budget distribution across top-level directories
- Source code (
src/) now prioritized over test fixtures in output - Tree budget ratio reduced to 30% for better signature coverage
- Single directory no longer dominates signature budget
- Test fixtures no longer appear before core code at low budgets
- Initial release of the dirpack CLI with budgeted directory packing.
- Tree-sitter signature extraction and multiple output formats.