Skip to content

feat: base-branch diff, token budget, repo tree#1

Merged
zpenka merged 3 commits into
mainfrom
claude/brief-improvements-brainstorm-TS3QV
Jun 1, 2026
Merged

feat: base-branch diff, token budget, repo tree#1
zpenka merged 3 commits into
mainfrom
claude/brief-improvements-brainstorm-TS3QV

Conversation

@zpenka

@zpenka zpenka commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Three new features for richer LLM session context:

  • --base <branch>: shows commits ahead of base and the cumulative diff
    (git diff base...HEAD), plus TODOs extracted from that diff. Gracefully
    skips if the ref doesn't exist.

  • --tokens <n>: token budget (0 = unlimited). Truncates BranchDiff first
    (largest field), then trims Commits/BranchCommits to stay under budget.
    Uses the ~4 chars/token heuristic.

  • --tree: includes a condensed repo file tree (tracked + untracked
    non-ignored files via git ls-files). Collapses directories beyond
    --depth (default 3) with a file count.

All three features are covered by TDD tests written before implementation.
Also adds mustGit test helper and disables commit signing in tempGitRepo
for the CI environment.

https://claude.ai/code/session_01S4dxye9bnFuf4uEVZr8Edr

zpenka added 2 commits June 1, 2026 18:52
Three new features for richer LLM session context:

- `--base <branch>`: shows commits ahead of base and the cumulative diff
  (git diff base...HEAD), plus TODOs extracted from that diff. Gracefully
  skips if the ref doesn't exist.

- `--tokens <n>`: token budget (0 = unlimited). Truncates BranchDiff first
  (largest field), then trims Commits/BranchCommits to stay under budget.
  Uses the ~4 chars/token heuristic.

- `--tree`: includes a condensed repo file tree (tracked + untracked
  non-ignored files via git ls-files). Collapses directories beyond
  --depth (default 3) with a file count.

All three features are covered by TDD tests written before implementation.
Also adds `mustGit` test helper and disables commit signing in tempGitRepo
for the CI environment.

https://claude.ai/code/session_01S4dxye9bnFuf4uEVZr8Edr
- README: add --base, --tree, --depth, --tokens to synopsis, examples,
  and flags table; update description blurb
- CLAUDE.md: add tree.go and truncate.go to package layout; add new
  flags to run examples; update data flow and output format descriptions

https://claude.ai/code/session_01S4dxye9bnFuf4uEVZr8Edr
@zpenka zpenka force-pushed the claude/brief-improvements-brainstorm-TS3QV branch from 6b268a8 to a9a896e Compare June 1, 2026 18:52
Sets user.name and user.email in the local git config at the start of
every session, so commits are always attributed to Zack Penka regardless
of the global Claude identity configured in the environment.

https://claude.ai/code/session_01S4dxye9bnFuf4uEVZr8Edr
@zpenka zpenka merged commit 4321b51 into main Jun 1, 2026
2 checks passed
@zpenka zpenka deleted the claude/brief-improvements-brainstorm-TS3QV branch June 1, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant