agentpack-cli 0.1.20__tar.gz → 0.1.22__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/PKG-INFO +182 -25
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/README.md +180 -23
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/pyproject.toml +2 -2
- agentpack_cli-0.1.22/src/agentpack/__init__.py +3 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/ranking.py +173 -32
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/application/pack_service.py +61 -5
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/cli.py +2 -2
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/benchmark.py +231 -3
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/doctor.py +34 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/explain.py +2 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/pack.py +41 -0
- agentpack_cli-0.1.22/src/agentpack/commands/quickstart.py +112 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/stats.py +33 -11
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/config.py +12 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/context_pack.py +15 -0
- agentpack_cli-0.1.20/src/agentpack/__init__.py +0 -3
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/.gitignore +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/LICENSE +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/adapters/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/adapters/antigravity.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/adapters/base.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/adapters/claude.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/adapters/codex.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/adapters/cursor.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/adapters/detect.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/adapters/generic.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/adapters/windsurf.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/dependency_graph.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/go_imports.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/java_imports.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/js_ts_imports.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/python_imports.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/rust_imports.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/symbols.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/analysis/tests.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/application/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/_shared.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/claude_cmd.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/diff.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/hook_cmd.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/init.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/install.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/mcp_cmd.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/monitor.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/scan.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/status.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/summarize.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/commands/watch.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/bootstrap.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/cache.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/diff.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/git.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/git_hooks.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/global_install.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/ignore.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/merkle.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/models.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/redactor.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/scanner.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/snapshot.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/token_estimator.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/core/vscode_tasks.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/data/agentpack.md +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/installers/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/installers/antigravity.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/installers/claude.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/installers/codex.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/installers/cursor.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/installers/windsurf.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/integrations/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/integrations/git_hooks.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/integrations/global_install.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/integrations/vscode_tasks.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/mcp_server.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/renderers/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/renderers/compact.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/renderers/markdown.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/renderers/receipts.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/session/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/session/state.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/summaries/__init__.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/summaries/base.py +0 -0
- {agentpack_cli-0.1.20 → agentpack_cli-0.1.22}/src/agentpack/summaries/offline.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentpack-cli
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.1.22
|
|
4
|
+
Summary: Task-aware context packing for AI coding agents — Claude, Cursor, Windsurf, Codex, and Antigravity
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Keywords: ai,claude,codex,coding-agent,context,cursor,llm,packing,windsurf
|
|
@@ -44,11 +44,27 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|
[](https://opensource.org/licenses/MIT)
|
|
45
45
|
[](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
|
|
46
46
|
|
|
47
|
-
> **Status: alpha (v0.1.
|
|
47
|
+
> **Status: alpha (v0.1.22).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Not yet validated across a wide range of repos. API may change before 1.0.
|
|
48
48
|
>
|
|
49
49
|
> **Platform note:** macOS and Linux are fully supported. Windows support is not yet implemented (git hooks use POSIX shell; the Claude Code session hooks use `python3`/`rm -f`). Contributions welcome.
|
|
50
50
|
|
|
51
|
-
**
|
|
51
|
+
**Task-aware context packing for AI coding agents.**
|
|
52
|
+
|
|
53
|
+
AgentPack scans a repository, ranks files for the task you are working on, and writes a compact markdown context pack for Claude Code, Cursor, Windsurf, Codex, Antigravity, CI jobs, or any LLM workflow.
|
|
54
|
+
|
|
55
|
+
It is useful when the repo is too large to paste, but you still want the agent to start with more than a blank slate.
|
|
56
|
+
|
|
57
|
+
**What it is**
|
|
58
|
+
- A local CLI for building task-focused context packs
|
|
59
|
+
- A summary cache, import graph, ranking engine, and token-budget selector
|
|
60
|
+
- Optional integrations for popular coding agents
|
|
61
|
+
- An eval harness for measuring whether selected files match files you actually changed
|
|
62
|
+
|
|
63
|
+
**What it is not**
|
|
64
|
+
- Not a coding agent
|
|
65
|
+
- Not a semantic code search engine
|
|
66
|
+
- Not a replacement for manual inspection on high-stakes changes
|
|
67
|
+
- Not yet proven across a large public benchmark suite
|
|
52
68
|
|
|
53
69
|
---
|
|
54
70
|
|
|
@@ -71,15 +87,19 @@ None of these scale. On a 200-file codebase, option 1 wastes 5–10 turns just o
|
|
|
71
87
|
AgentPack solves this with a one-time offline analysis pass:
|
|
72
88
|
|
|
73
89
|
1. **Scans your repo once** — builds a summary cache of every file (signatures, imports, responsibilities). No API calls. Takes a few seconds.
|
|
74
|
-
2. **On each task** — uses git diff
|
|
75
|
-
3. **Packs a tight context document** — changed files get full content,
|
|
76
|
-
4. **
|
|
90
|
+
2. **On each task** — uses git diff, import graph traversal, keyword/concept expansion, implementation-role boosts, and cross-layer relatedness to rank every file.
|
|
91
|
+
3. **Packs a tight context document** — changed files get full content, large changed files get relevant symbol bodies, dependencies and likely implementation files get summaries, everything else gets dropped.
|
|
92
|
+
4. **Explains pack quality** — noisy-pack diagnostics, score receipts, token-precision metrics, and benchmark miss reports show when the pack is broad or missing expected files.
|
|
93
|
+
5. **Stays current** — auto-repacks silently on commit, so next session starts fresh.
|
|
77
94
|
|
|
78
|
-
The result: your agent starts
|
|
95
|
+
The result: your agent starts with a focused map of the relevant code. It should reduce blind exploration, not replace the agent's own file reads or your judgment.
|
|
79
96
|
|
|
80
97
|
```bash
|
|
81
98
|
pip install agentpack-cli
|
|
82
99
|
|
|
100
|
+
# Show the fastest path for your repo
|
|
101
|
+
agentpack quickstart --task "fix auth token expiry"
|
|
102
|
+
|
|
83
103
|
# One-time setup per project
|
|
84
104
|
cd your-project
|
|
85
105
|
agentpack init # creates config, session, task.md — nothing else needed
|
|
@@ -99,13 +119,53 @@ agentpack global-install --dry-run # preview first
|
|
|
99
119
|
agentpack global-install
|
|
100
120
|
```
|
|
101
121
|
|
|
102
|
-
Supported agents: **Claude Code**, **Cursor**, **Windsurf**, **Codex**, **Antigravity** (Google), or any LLM.
|
|
122
|
+
Supported agents: **Claude Code**, **Cursor**, **Windsurf**, **Codex**, **Antigravity** (Google), or any LLM that can read markdown.
|
|
103
123
|
|
|
104
124
|
---
|
|
105
125
|
|
|
106
|
-
##
|
|
126
|
+
## What to expect
|
|
127
|
+
|
|
128
|
+
AgentPack's strongest value is repeatable orientation: it gives the agent a compact first-pass map before tool calls begin.
|
|
129
|
+
|
|
130
|
+
Typical results on large repos:
|
|
131
|
+
|
|
132
|
+
| Signal | What good looks like |
|
|
133
|
+
|---|---|
|
|
134
|
+
| Token reduction | 90-99% smaller than raw repo text |
|
|
135
|
+
| Pack size | Usually 8k-25k tokens for a specific task |
|
|
136
|
+
| Pack time | Seconds on warm cache; first summarize pass is slower |
|
|
137
|
+
| Recall | Should be high for files you later edit; validate with `agentpack benchmark` |
|
|
138
|
+
| Precision | Often modest; summaries are cheap but can still add noise |
|
|
139
|
+
|
|
140
|
+
The compression number is easy to verify, but it is not the same as usefulness. The important question is: **did AgentPack include the files you actually needed?**
|
|
141
|
+
|
|
142
|
+
Use the built-in eval flow:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
agentpack benchmark --init
|
|
146
|
+
# add real historical tasks and files you actually changed
|
|
147
|
+
agentpack benchmark --compare --misses
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
For source checkouts, there is also a small smoke suite:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
agentpack benchmark --sample-fixtures --misses
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
This runs FastAPI, Next.js, and mixed Python/TypeScript fixture tasks. It is a sanity check, not a substitute for real repo evals.
|
|
157
|
+
|
|
158
|
+
### Current quality bar
|
|
159
|
+
|
|
160
|
+
AgentPack is best described as a **map, not a compass**. It is already good at token reduction, changed-file inclusion, related tests, imports, configs, and common concepts like auth/cache/rate limiting. Recent ranking work also improves full-stack tasks by pulling service/controller/schema/handler files when UI routes or pages match the same domain.
|
|
161
|
+
|
|
162
|
+
Known weak spot: recall can still be low on unfamiliar product domains or cross-language flows. Use `benchmark --misses` and `agentpack explain` when an expected file is absent. Those commands show whether the miss was caused by ignore rules, low score, summary floor, budget cutoff, or missing task signal.
|
|
107
163
|
|
|
108
|
-
###
|
|
164
|
+
### Observed author-run numbers
|
|
165
|
+
|
|
166
|
+
These are local author-session numbers, included as anecdotal context rather than a benchmark claim.
|
|
167
|
+
|
|
168
|
+
#### Token Compression
|
|
109
169
|
|
|
110
170
|
| Metric | Value |
|
|
111
171
|
|--------|-------|
|
|
@@ -117,7 +177,7 @@ Supported agents: **Claude Code**, **Cursor**, **Windsurf**, **Codex**, **Antigr
|
|
|
117
177
|
|
|
118
178
|
Per session: ~4.1M raw repo → ~35K packed context.
|
|
119
179
|
|
|
120
|
-
|
|
180
|
+
#### Cost (Sonnet 4.6, input tokens only)
|
|
121
181
|
|
|
122
182
|
| Scenario | Cost |
|
|
123
183
|
|----------|------|
|
|
@@ -127,7 +187,7 @@ Per session: ~4.1M raw repo → ~35K packed context.
|
|
|
127
187
|
|
|
128
188
|
> Honest note: raw_tokens = full repo estimate. Real savings depend on how much context you'd pass manually. Compression ratio (99%+) is verifiable; dollar figure is scenario-dependent.
|
|
129
189
|
|
|
130
|
-
|
|
190
|
+
#### Quality Signal
|
|
131
191
|
|
|
132
192
|
- 42 commits in 7 days (~6/day) vs 4.9/day before
|
|
133
193
|
- Shift from single-file fixes → multi-system coordinated fixes
|
|
@@ -201,9 +261,10 @@ _*`--agent generic` outputs standard markdown. Claude adapter has richer instruc
|
|
|
201
261
|
|
|
202
262
|
### What agentpack does NOT do well
|
|
203
263
|
|
|
204
|
-
- **Interactive sessions on small repos**: if your whole repo is <20k tokens,
|
|
205
|
-
- **One-shot public repo questions**: gitingest's "replace hub with ingest" is faster for
|
|
206
|
-
- **
|
|
264
|
+
- **Interactive sessions on small repos**: if your whole repo is <20k tokens, a simple repo dump may be enough
|
|
265
|
+
- **One-shot public repo questions**: gitingest's "replace hub with ingest" is faster for quick read-only exploration
|
|
266
|
+
- **Guaranteed source-of-truth selection**: AgentPack ranks likely files; it can miss task-critical files. Use `agentpack benchmark --misses`, `agentpack explain`, and normal `rg`/agent file reads for correctness.
|
|
267
|
+
- **Deep semantic understanding**: keyword/concept scoring, imports, symbols, and path roles help, but they are not an LLM-level code understanding system
|
|
207
268
|
|
|
208
269
|
---
|
|
209
270
|
|
|
@@ -221,6 +282,14 @@ Requires Python 3.10+.
|
|
|
221
282
|
|
|
222
283
|
## Start Once, Then Work Normally
|
|
223
284
|
|
|
285
|
+
For a guided two-minute path in any repo:
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
agentpack quickstart --task "fix auth token expiry"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
It shows the exact commands to initialize, set task text, generate a first pack, inspect stats, start watch mode, and scaffold a small benchmark file for your own tasks.
|
|
292
|
+
|
|
224
293
|
The full workflow:
|
|
225
294
|
|
|
226
295
|
```bash
|
|
@@ -546,6 +615,7 @@ Some checks failed. Run the suggested commands above to fix.
|
|
|
546
615
|
The new checks in `doctor`:
|
|
547
616
|
- **Local vs global hooks**: warns when Claude hooks are only in the per-project `.claude/settings.json` — context won't auto-inject in other repos
|
|
548
617
|
- **Slash command presence**: checks both local (`.claude/commands/`) and global (`~/.claude/commands/`) installations
|
|
618
|
+
- **Source checkout mismatch**: warns when you're inside an AgentPack source checkout but the `agentpack` executable imports the installed site-packages copy. Use `PYTHONPATH=src python -m agentpack.cli ...` or `pip install -e .` for local development.
|
|
549
619
|
|
|
550
620
|
---
|
|
551
621
|
|
|
@@ -632,9 +702,25 @@ Options:
|
|
|
632
702
|
|
|
633
703
|
| Mode | What's included |
|
|
634
704
|
|------|----------------|
|
|
635
|
-
| `minimal` | Changed files + direct configs
|
|
636
|
-
| `balanced` | Changed files + deps + reverse deps + tests + summaries |
|
|
637
|
-
| `deep` | Everything in balanced + docs + more full-content files |
|
|
705
|
+
| `minimal` | Changed files + direct configs, with a small summary cap |
|
|
706
|
+
| `balanced` | Changed files + deps + reverse deps + tests + capped summaries |
|
|
707
|
+
| `deep` | Everything in balanced + docs + more full-content files, uncapped summaries |
|
|
708
|
+
|
|
709
|
+
`pack` also prints diagnostics when the pack looks noisy: very short task text, no changed files, mostly filename matches, mostly summaries, many symbol matches, weak summaries excluded by the score floor, or summaries excluded by the mode cap.
|
|
710
|
+
|
|
711
|
+
---
|
|
712
|
+
|
|
713
|
+
### `agentpack quickstart`
|
|
714
|
+
|
|
715
|
+
Show the shortest useful path for the current repo.
|
|
716
|
+
|
|
717
|
+
```bash
|
|
718
|
+
agentpack quickstart
|
|
719
|
+
agentpack quickstart --task "fix auth token expiry"
|
|
720
|
+
agentpack quickstart --task "fix auth token expiry" --write
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
`quickstart` does not guess at magic. It checks whether `.agentpack/config.toml`, `.agentpack/task.md`, and context packs exist, then prints the next few commands. With `--write`, it writes the supplied task into `.agentpack/task.md`.
|
|
638
724
|
|
|
639
725
|
---
|
|
640
726
|
|
|
@@ -758,6 +844,8 @@ agentpack benchmark --task "fix auth token expiry" # single task
|
|
|
758
844
|
agentpack benchmark --task "fix auth bug" --compare # compare minimal/balanced/deep
|
|
759
845
|
agentpack benchmark --init # scaffold .agentpack/benchmark.toml
|
|
760
846
|
agentpack benchmark # run all cases in benchmark.toml
|
|
847
|
+
agentpack benchmark --sample-fixtures # source checkout demo evals
|
|
848
|
+
agentpack benchmark --misses # explain expected-file misses
|
|
761
849
|
```
|
|
762
850
|
|
|
763
851
|
Output per case:
|
|
@@ -808,6 +896,8 @@ expected_files = [
|
|
|
808
896
|
hit: src/auth/session.py, src/auth/token.py
|
|
809
897
|
```
|
|
810
898
|
|
|
899
|
+
Use `--misses` when recall is low. It prints each expected file that was not selected with status, rank, score, and scoring reasons, which helps separate ignored files, budget cuts, low scores, and missing dependency signals.
|
|
900
|
+
|
|
811
901
|
---
|
|
812
902
|
|
|
813
903
|
### `agentpack scan`
|
|
@@ -832,7 +922,23 @@ Show session state, token statistics, and selection accuracy for the last pack.
|
|
|
832
922
|
agentpack stats
|
|
833
923
|
```
|
|
834
924
|
|
|
835
|
-
When a session is active, shows session panel (agent, mode, started, refresh count) above token stats. Also lists top included files
|
|
925
|
+
When a session is active, shows session panel (agent, mode, started, refresh count) above token stats. Also lists top included files from the latest pack and avg recall/precision/F1 over the last 10 runs.
|
|
926
|
+
|
|
927
|
+
Newer metrics include token-weighted precision. File precision answers "how many selected files were later changed"; token precision answers "how many selected tokens were spent on files later changed." `stats` also breaks token precision down by inclusion mode (`full`, `symbols`, `summary`) so summary noise is visible.
|
|
928
|
+
|
|
929
|
+
To build a real usefulness signal for your repo:
|
|
930
|
+
|
|
931
|
+
```bash
|
|
932
|
+
agentpack benchmark --sample-fixtures
|
|
933
|
+
|
|
934
|
+
agentpack benchmark --init
|
|
935
|
+
# edit .agentpack/benchmark.toml with real tasks + files you actually changed
|
|
936
|
+
agentpack benchmark --compare --misses
|
|
937
|
+
```
|
|
938
|
+
|
|
939
|
+
`--sample-fixtures` runs bundled FastAPI, Next.js, and mixed Python/TypeScript fixture evals from an AgentPack source checkout. It is a smoke test, not a claim about your repo.
|
|
940
|
+
|
|
941
|
+
For an 8+ usefulness signal, use `benchmark.toml` with real third-party or customer-style repos: 5-20 historical tasks, the files actually changed for each task, and `--compare` results for recall, F1, rank@K, and token noise. That is better than trusting generic benchmarks because it tells you whether AgentPack selects the files that matter in code the package has never seen.
|
|
836
942
|
|
|
837
943
|
---
|
|
838
944
|
|
|
@@ -917,7 +1023,7 @@ agentpack monitor --clear
|
|
|
917
1023
|
| Large unrelated file | −50 |
|
|
918
1024
|
| Ignored/binary | −100 |
|
|
919
1025
|
|
|
920
|
-
Keyword scoring uses concept synonym expansion — "rate limiting"
|
|
1026
|
+
Keyword scoring uses weighted concept synonym expansion — literal task terms are strongest, normalized variants are slightly weaker, and broad concept synonyms are weaker again. "rate limiting" still expands to `throttle`, `leaky`, `bucket`, `quota`, but broad expansions no longer dominate literal task terms. Matching is token-based, so `task` does not accidentally match every `tasks.py`.
|
|
921
1027
|
|
|
922
1028
|
---
|
|
923
1029
|
|
|
@@ -934,6 +1040,10 @@ ignore_file = ".agentignore"
|
|
|
934
1040
|
default_budget = 25000
|
|
935
1041
|
default_mode = "balanced"
|
|
936
1042
|
max_file_tokens = 4000
|
|
1043
|
+
min_summary_score = 60
|
|
1044
|
+
max_summary_files_minimal = 15
|
|
1045
|
+
max_summary_files_balanced = 40
|
|
1046
|
+
max_summary_files_deep = 0
|
|
937
1047
|
include_tests = true
|
|
938
1048
|
include_configs = true
|
|
939
1049
|
include_receipts = true
|
|
@@ -1179,6 +1289,7 @@ src/agentpack/
|
|
|
1179
1289
|
pack.py # agentpack pack → PackService.run()
|
|
1180
1290
|
install.py # agentpack install / global-install → installers/
|
|
1181
1291
|
init.py # agentpack init
|
|
1292
|
+
quickstart.py # agentpack quickstart — guided first-run commands
|
|
1182
1293
|
scan.py # agentpack scan
|
|
1183
1294
|
diff.py # agentpack diff
|
|
1184
1295
|
status.py # agentpack status
|
|
@@ -1187,10 +1298,11 @@ src/agentpack/
|
|
|
1187
1298
|
monitor.py # agentpack monitor
|
|
1188
1299
|
explain.py # agentpack explain
|
|
1189
1300
|
doctor.py # agentpack doctor
|
|
1190
|
-
|
|
1301
|
+
hook_cmd.py # agentpack hook — Claude prompt hook + stale detection
|
|
1302
|
+
mcp_cmd.py # agentpack mcp — MCP server entrypoint
|
|
1191
1303
|
watch.py # agentpack watch — file watcher with debounce
|
|
1192
1304
|
claude_cmd.py # agentpack claude — refresh + launch claude
|
|
1193
|
-
benchmark.py # agentpack benchmark — token efficiency
|
|
1305
|
+
benchmark.py # agentpack benchmark — token efficiency, recall, miss diagnostics
|
|
1194
1306
|
```
|
|
1195
1307
|
|
|
1196
1308
|
### Key architectural properties
|
|
@@ -1318,7 +1430,17 @@ The more descriptive your branch names (`feat/add-rate-limiting` beats `dev`) an
|
|
|
1318
1430
|
|
|
1319
1431
|
### Concept synonym expansion
|
|
1320
1432
|
|
|
1321
|
-
AgentPack expands task keywords automatically — "rate limiting" expands to `throttle`, `leaky`, `bucket`, `quota`, `debounce`; "auth" expands to `jwt`, `bearer`, `token`, `oauth`; "cache" expands to `lru`, `memoize`, `redis`, `ttl
|
|
1433
|
+
AgentPack expands task keywords automatically — "rate limiting" expands to `throttle`, `leaky`, `bucket`, `quota`, `debounce`; "auth" expands to `jwt`, `bearer`, `token`, `oauth`; "cache" expands to `lru`, `memoize`, `redis`, `ttl`; domain terms such as `kundali` expand toward astrology/chart/compatibility terms. Files that implement a concept but don't use its exact name can still rank.
|
|
1434
|
+
|
|
1435
|
+
### Full-stack role boosts
|
|
1436
|
+
|
|
1437
|
+
When a task points at a page, route, or API surface, AgentPack also gives a controlled boost to related implementation roles such as `service`, `controller`, `schema`, `handler`, `repository`, and `client`. This helps full-stack tasks pull backend implementation files instead of only frontend entrypoints.
|
|
1438
|
+
|
|
1439
|
+
This is still heuristic. If a service should have appeared and did not, add it as an `expected_files` entry in `benchmark.toml` and run:
|
|
1440
|
+
|
|
1441
|
+
```bash
|
|
1442
|
+
agentpack benchmark --compare --misses
|
|
1443
|
+
```
|
|
1322
1444
|
|
|
1323
1445
|
### Content-based keyword enrichment
|
|
1324
1446
|
|
|
@@ -1369,6 +1491,8 @@ agentpack explain --task "fix auth session bug"
|
|
|
1369
1491
|
|
|
1370
1492
|
Shows ranked scores and reasons before committing to a pack. Use when a file you expect isn't appearing.
|
|
1371
1493
|
|
|
1494
|
+
For repeatable evals, prefer `benchmark --misses` because it compares selected files against the files you actually changed for historical tasks.
|
|
1495
|
+
|
|
1372
1496
|
### Check what got included and why
|
|
1373
1497
|
|
|
1374
1498
|
Every pack includes a context receipt explaining each file's inclusion or exclusion:
|
|
@@ -1400,7 +1524,8 @@ config_file = 60 # was 25 — configs always matter here
|
|
|
1400
1524
|
- **Non-destructive**: never overwrites user files; config patching only touches agentpack-managed blocks
|
|
1401
1525
|
- **Agent-neutral**: architecture is generic; Claude Code is the primary target (deepest integration); Cursor, Windsurf, Codex, and Antigravity are supported but less battle-tested
|
|
1402
1526
|
- **No daemons**: file watching is opt-in via `agentpack watch`; git hooks run in the background and are opt-in via `install`
|
|
1403
|
-
- **
|
|
1527
|
+
- **Measurable**: `benchmark`, `stats`, receipts, and `--misses` are first-class because compression without recall is not enough
|
|
1528
|
+
- **Honest**: packed token count reflects real content, and raw-repo savings are presented separately from practical usefulness
|
|
1404
1529
|
|
|
1405
1530
|
---
|
|
1406
1531
|
|
|
@@ -1409,6 +1534,7 @@ config_file = 60 # was 25 — configs always matter here
|
|
|
1409
1534
|
- **Windows**: not supported. Git hooks use POSIX shell (`#!/bin/sh`, `>/dev/null 2>&1 &`). The Claude Code session hooks use `python3` and `rm -f`. Contributions welcome.
|
|
1410
1535
|
- **Monorepos**: single-root repos only. If you `agentpack pack` from a monorepo root, all packages are scanned together with no workspace awareness. Workaround: `cd packages/my-pkg && agentpack init && agentpack pack`.
|
|
1411
1536
|
- **Symbol extraction**: Python (AST, full) and JavaScript/TypeScript (regex, arrow functions + classes) are well-supported. Go, Rust, Java, Kotlin have import graph traversal but no symbol extraction — they fall back to file-level summaries.
|
|
1537
|
+
- **Selection recall**: ranking is heuristic. It can miss files when task language differs from code language, when repos have unusual architecture, or when important files are only connected at runtime.
|
|
1412
1538
|
- **Secret redaction**: covers AWS keys, GitHub tokens, OpenAI/Anthropic keys, JWTs, and private key blocks. Not a substitute for a dedicated secrets scanner on sensitive repos.
|
|
1413
1539
|
- **Token estimates**: uses tiktoken `cl100k_base` — approximate, not exact for Claude's billing.
|
|
1414
1540
|
- **Large repos (>5k files)**: global auto-bootstrap is skipped for repos over 5,000 files to avoid hangs. Run `agentpack init` explicitly in large codebases.
|
|
@@ -1425,6 +1551,37 @@ pip install "agentpack-cli[all]" # watch + mcp
|
|
|
1425
1551
|
|
|
1426
1552
|
---
|
|
1427
1553
|
|
|
1554
|
+
## Development
|
|
1555
|
+
|
|
1556
|
+
Clone and run locally:
|
|
1557
|
+
|
|
1558
|
+
```bash
|
|
1559
|
+
git clone https://github.com/vishal2612200/agentpack.git
|
|
1560
|
+
cd agentpack
|
|
1561
|
+
python -m pip install -e ".[dev,watch,mcp]" build
|
|
1562
|
+
pytest
|
|
1563
|
+
```
|
|
1564
|
+
|
|
1565
|
+
Useful checks before opening a PR:
|
|
1566
|
+
|
|
1567
|
+
```bash
|
|
1568
|
+
pytest
|
|
1569
|
+
python -m build
|
|
1570
|
+
agentpack benchmark --sample-fixtures --misses
|
|
1571
|
+
```
|
|
1572
|
+
|
|
1573
|
+
Good contribution areas:
|
|
1574
|
+
|
|
1575
|
+
- More real-world benchmark fixtures and public repo eval cases
|
|
1576
|
+
- Windows support for hooks and session integrations
|
|
1577
|
+
- Better symbol extraction for Go, Rust, Java, and Kotlin
|
|
1578
|
+
- More precise import/dependency resolution for framework-heavy repos
|
|
1579
|
+
- Ranking regressions with `expected_files` cases that reproduce misses
|
|
1580
|
+
|
|
1581
|
+
Please include tests for ranking changes. A good ranking PR usually adds one focused unit test and one scenario in `tests/test_ranking_evals.py`.
|
|
1582
|
+
|
|
1583
|
+
---
|
|
1584
|
+
|
|
1428
1585
|
## License
|
|
1429
1586
|
|
|
1430
1587
|
MIT
|