agentpack-cli 0.3.11__tar.gz → 0.3.12__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.3.12/PKG-INFO +406 -0
- agentpack_cli-0.3.12/README.md +367 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/pyproject.toml +1 -1
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/__init__.py +1 -1
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/application/pack_service.py +127 -15
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/cli.py +24 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/_shared.py +15 -6
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/benchmark.py +285 -220
- agentpack_cli-0.3.12/src/agentpack/commands/ci_cmd.py +80 -0
- agentpack_cli-0.3.12/src/agentpack/commands/dev_check.py +57 -0
- agentpack_cli-0.3.12/src/agentpack/commands/diagnose_selection.py +123 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/doctor.py +46 -1
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/guard.py +18 -8
- agentpack_cli-0.3.12/src/agentpack/commands/ignore_cmd.py +123 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/init.py +2 -2
- agentpack_cli-0.3.12/src/agentpack/commands/next_cmd.py +116 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/pack.py +41 -4
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/quickstart.py +3 -3
- agentpack_cli-0.3.12/src/agentpack/commands/release_check.py +104 -0
- agentpack_cli-0.3.12/src/agentpack/commands/release_cmd.py +54 -0
- agentpack_cli-0.3.12/src/agentpack/commands/start_cmd.py +76 -0
- agentpack_cli-0.3.12/src/agentpack/commands/state_cmd.py +94 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/status.py +16 -5
- agentpack_cli-0.3.12/src/agentpack/commands/task_cmd.py +119 -0
- agentpack_cli-0.3.12/src/agentpack/commands/threads.py +173 -0
- agentpack_cli-0.3.12/src/agentpack/commands/verify_wheel.py +71 -0
- agentpack_cli-0.3.12/src/agentpack/commands/workflow_cmd.py +127 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/config.py +7 -3
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/context_pack.py +63 -4
- agentpack_cli-0.3.12/src/agentpack/core/execution_state.py +136 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/git.py +71 -2
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/models.py +2 -0
- agentpack_cli-0.3.12/src/agentpack/core/thread_context.py +212 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/data/agentpack.md +18 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/installers/antigravity.py +2 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/installers/claude.py +4 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/installers/codex.py +2 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/installers/cursor.py +3 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/installers/windsurf.py +1 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/mcp_server.py +44 -23
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/renderers/markdown.py +111 -2
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/router/discovery.py +57 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/router/scoring.py +70 -2
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/router/service.py +2 -0
- agentpack_cli-0.3.11/PKG-INFO +0 -1880
- agentpack_cli-0.3.11/README.md +0 -1841
- agentpack_cli-0.3.11/src/agentpack/commands/ignore_cmd.py +0 -51
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/.gitignore +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/LICENSE +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/adapters/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/adapters/antigravity.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/adapters/base.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/adapters/claude.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/adapters/codex.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/adapters/cursor.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/adapters/detect.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/adapters/generic.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/adapters/windsurf.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/dependency_graph.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/go_imports.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/java_imports.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/js_ts_imports.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/monorepo.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/naming_signals.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/python_imports.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/ranking.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/repo_map.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/role_inference.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/rust_imports.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/symbols.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/task_classifier.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/analysis/tests.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/application/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/claude_cmd.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/diff.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/eval_cmd.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/explain.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/hook_cmd.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/install.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/mcp_cmd.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/migrate.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/monitor.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/repair.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/route.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/scan.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/skills.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/stats.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/summarize.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/tune.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/commands/watch.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/bootstrap.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/cache.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/diff.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/evals.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/git_hooks.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/global_install.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/ignore.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/merkle.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/redactor.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/scanner.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/snapshot.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/task_freshness.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/token_estimator.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/core/vscode_tasks.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/installers/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/integrations/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/integrations/agents.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/integrations/git_hooks.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/integrations/global_install.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/integrations/platform.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/integrations/vscode_tasks.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/renderers/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/renderers/compact.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/renderers/receipts.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/router/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/router/models.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/router/parser.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/router/prompt_builder.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/session/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/session/state.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/summaries/__init__.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/summaries/base.py +0 -0
- {agentpack_cli-0.3.11 → agentpack_cli-0.3.12}/src/agentpack/summaries/offline.py +0 -0
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentpack-cli
|
|
3
|
+
Version: 0.3.12
|
|
4
|
+
Summary: Local context engine for AI coding agents that ranks relevant files and builds task-focused context packs.
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: ai,ai-coding-agents,antigravity,ci,codex,context,context-engine,context-packing,cursor,developer-tools,llm,mcp,packing,prompt-context,repo-analysis,windsurf
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Requires-Dist: pathspec>=0.12.1
|
|
19
|
+
Requires-Dist: pydantic>=2.0.0
|
|
20
|
+
Requires-Dist: rich>=13.0.0
|
|
21
|
+
Requires-Dist: tiktoken>=0.7.0
|
|
22
|
+
Requires-Dist: tomli-w>=1.0.0
|
|
23
|
+
Requires-Dist: tomli>=2.0.0; python_version < '3.11'
|
|
24
|
+
Requires-Dist: typer>=0.12.0
|
|
25
|
+
Provides-Extra: all
|
|
26
|
+
Requires-Dist: mcp>=1.0.0; extra == 'all'
|
|
27
|
+
Requires-Dist: watchdog>=4.0.0; extra == 'all'
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
33
|
+
Requires-Dist: tomli>=2.0.0; (python_version < '3.11') and extra == 'dev'
|
|
34
|
+
Provides-Extra: mcp
|
|
35
|
+
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
|
|
36
|
+
Provides-Extra: watch
|
|
37
|
+
Requires-Dist: watchdog>=4.0.0; extra == 'watch'
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
|
|
40
|
+
# AgentPack
|
|
41
|
+
|
|
42
|
+
[](https://pypi.org/project/agentpack-cli/)
|
|
43
|
+
[](https://pepy.tech/projects/agentpack-cli)
|
|
44
|
+
[](https://www.npmjs.com/package/@vishal2612200/agentpack)
|
|
45
|
+
[](https://www.npmjs.com/package/@vishal2612200/agentpack)
|
|
46
|
+
[](https://pypi.org/project/agentpack-cli/)
|
|
47
|
+
[](https://opensource.org/licenses/MIT)
|
|
48
|
+
[](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
|
|
49
|
+
|
|
50
|
+
> **Status: alpha (v0.3.12).** Works, tested, used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Public benchmark proof exists for the current suite, but broader repo coverage is still growing. API may change before 1.0.
|
|
51
|
+
>
|
|
52
|
+
> **Platform note:** macOS, Linux, and Windows are supported. Windows support targets PowerShell plus Git for Windows. `cmd.exe` and bare Git setups are not a supported path yet.
|
|
53
|
+
|
|
54
|
+
**Local context engine for AI coding agents.**
|
|
55
|
+
|
|
56
|
+
AgentPack gives Claude Code, Codex, Cursor, Windsurf, Antigravity, CI jobs, and other agent workflows a better starting point. It analyzes your repo locally, finds the files most relevant to a task, and packages them into compact context packs for CLI and MCP workflows.
|
|
57
|
+
|
|
58
|
+
Use AgentPack when a repo is too large to paste and you want faster, more consistent context preparation before an agent starts working. It works offline and is a context preparation tool, not a coding agent.
|
|
59
|
+
|
|
60
|
+
## Features
|
|
61
|
+
|
|
62
|
+
- **Task-focused packing**: ranks files from git changes, task terms, symbols, imports, related tests, configs, churn, repo history, and deterministic offline summaries.
|
|
63
|
+
- **Budget-aware compression**: emits `full`, `diff`, `symbols`, `skeleton`, or `summary` views instead of all-or-nothing file dumps.
|
|
64
|
+
- **Rendered-token accounting**: budgets against the actual markdown context, not only file payloads.
|
|
65
|
+
- **Reserve buckets**: changed files, tests, docs, and dependencies each get protected selection capacity so one dirty area cannot starve the others.
|
|
66
|
+
- **Execution state**: optional task state files and git-derived fallback status show whether work is planned, in progress, blocked, done, committed, or committed but not pushed.
|
|
67
|
+
- **Thread-scoped context**: explicit `--thread <id>` or `--thread auto` isolates task/context files for multiple agents in one repo and warns on same-branch file overlap.
|
|
68
|
+
- **Task router**: MCP and CLI surfaces route a task to relevant files, scoped rules, installed skills, suggested commands, and safety warnings without executing skills automatically.
|
|
69
|
+
- **Agent integrations**: installs Claude Code, Cursor, Windsurf, Codex, Antigravity, VS Code tasks, git hooks, and MCP configuration.
|
|
70
|
+
- **Local and measurable**: no API calls for scan, summarize, rank, pack, stats, or benchmark; quality is measured with expected-file evals.
|
|
71
|
+
|
|
72
|
+
## Benchmark Proof
|
|
73
|
+
|
|
74
|
+
Latest public release gate: 8 real commits from Pallets Click, ItsDangerous, and MarkupSafe, scored against files actually changed by each commit.
|
|
75
|
+
|
|
76
|
+
| Metric | Result |
|
|
77
|
+
|---|---:|
|
|
78
|
+
| Avg recall | 79.2% |
|
|
79
|
+
| Avg token precision | 51.2% |
|
|
80
|
+
| Pack p50 | 1,450 tokens |
|
|
81
|
+
| Pack p95 | 3,805 tokens |
|
|
82
|
+
|
|
83
|
+
Full table: [`benchmarks/results/2026-05-27-public.md`](benchmarks/results/2026-05-27-public.md). This is public smoke proof, not a claim of universal ranking quality; expand cases for your own repo with `agentpack benchmark capture`.
|
|
84
|
+
|
|
85
|
+
## Install
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pipx install agentpack-cli
|
|
89
|
+
agentpack --version
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Requires Python 3.10+. The PyPI package is `agentpack-cli`; the command is `agentpack`. Use `pipx` for normal installs because many macOS/Linux Python distributions block global `pip install` with PEP 668's `externally-managed-environment` error. If you prefer `pip`, install inside a virtual environment.
|
|
93
|
+
|
|
94
|
+
Install `pipx` first if needed:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# macOS
|
|
98
|
+
brew install pipx
|
|
99
|
+
|
|
100
|
+
# Ubuntu/Debian
|
|
101
|
+
sudo apt install pipx
|
|
102
|
+
|
|
103
|
+
# Fedora
|
|
104
|
+
sudo dnf install pipx
|
|
105
|
+
|
|
106
|
+
# Arch
|
|
107
|
+
sudo pacman -S python-pipx
|
|
108
|
+
|
|
109
|
+
pipx ensurepath
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
For JavaScript/TypeScript projects you can use the npm wrapper:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npx @vishal2612200/agentpack --version
|
|
116
|
+
npx @vishal2612200/agentpack init --yes
|
|
117
|
+
npx @vishal2612200/agentpack pack
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Quickstart
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
cd your-repo
|
|
124
|
+
agentpack init --yes
|
|
125
|
+
agentpack work "fix auth token expiry"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Then read `.agentpack/context.md` or the agent-specific context file listed in the output. AgentPack also integrates with MCP so agents can call tools directly instead of reading markdown artifacts.
|
|
129
|
+
|
|
130
|
+
A good explicit workflow is:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
agentpack task set "fix billing webhook retry handling in app/api/billing/route.ts" --guard
|
|
134
|
+
agentpack next --fix-all-safe
|
|
135
|
+
agentpack status
|
|
136
|
+
agentpack finish --since main
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Use `agentpack quickstart --task "..." --write` when you want AgentPack to print the next commands and write the task file for you. Use `agentpack start "..." --pack-only` when you want only a fresh pack and not the guard path.
|
|
140
|
+
|
|
141
|
+
## Agent Setup
|
|
142
|
+
|
|
143
|
+
AgentPack can install repo-local instructions and hooks for the coding agent you use. The installer is idempotent and merges with existing config where possible.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
agentpack init --agent claude
|
|
147
|
+
agentpack init --agent codex
|
|
148
|
+
agentpack init --agent cursor
|
|
149
|
+
agentpack init --agent windsurf
|
|
150
|
+
agentpack init --agent antigravity
|
|
151
|
+
agentpack init --agent generic
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
What each integration writes:
|
|
155
|
+
|
|
156
|
+
| Agent | Files |
|
|
157
|
+
|---|---|
|
|
158
|
+
| Claude Code | `CLAUDE.md`, `.claude/settings.json`, `.mcp.json` |
|
|
159
|
+
| Codex | `AGENTS.md`, `.codex/hooks.json`, git hooks |
|
|
160
|
+
| Cursor | `.cursorrules`, `.cursor/rules/agentpack.mdc`, `.vscode/tasks.json`, git hooks |
|
|
161
|
+
| Windsurf | `.windsurfrules`, `.vscode/tasks.json`, git hooks |
|
|
162
|
+
| Antigravity | `GEMINI.md`, `.vscode/tasks.json`, git hooks |
|
|
163
|
+
| Generic | no agent-specific files; use `context.md` directly |
|
|
164
|
+
|
|
165
|
+
MCP-capable agents should prefer AgentPack MCP tools over reading markdown files directly. The markdown context files remain useful for manual review, CI, non-MCP agents, and logs.
|
|
166
|
+
|
|
167
|
+
Generated instructions keep thread mode explicit. They recommend `AGENTPACK_THREAD_ID=<stable-id> agentpack ... --thread auto` when you want scoped state, but plain installed hooks continue using global `.agentpack/task.md` and `.agentpack/context.md`.
|
|
168
|
+
|
|
169
|
+
## Configuration Snapshot
|
|
170
|
+
|
|
171
|
+
`agentpack init` creates `.agentpack/config.toml`. Most projects can use the defaults:
|
|
172
|
+
|
|
173
|
+
```toml
|
|
174
|
+
[context]
|
|
175
|
+
default_mode = "balanced"
|
|
176
|
+
default_budget = 40000
|
|
177
|
+
|
|
178
|
+
[agents.generic]
|
|
179
|
+
output = ".agentpack/context.md"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Use `.agentignore` to remove generated output, vendored code, large exports, or files that repeatedly appear as ranking noise. AgentPack imports obvious generated/noisy entries from gitignore sources during init, but repository-specific outputs should still be added by hand.
|
|
183
|
+
|
|
184
|
+
Use scoring weights only after measuring a real miss:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
agentpack benchmark --misses
|
|
188
|
+
agentpack explain --file path/to/missed_file.py
|
|
189
|
+
agentpack diagnose-selection
|
|
190
|
+
agentpack ignore suggest
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Configuration detail: [`docs/configuration.md`](docs/configuration.md).
|
|
194
|
+
|
|
195
|
+
## Common Workflows
|
|
196
|
+
|
|
197
|
+
### Debug Selection
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
agentpack explain --task auto
|
|
201
|
+
agentpack explain --file src/auth/session.py
|
|
202
|
+
agentpack explain --omitted
|
|
203
|
+
agentpack stats
|
|
204
|
+
agentpack diagnose-selection
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### MCP-First Agent Flow
|
|
208
|
+
|
|
209
|
+
1. Call `start_task(task)` when a new task begins. AgentPack writes `.agentpack/task.md`, packs context, and returns ranked markdown.
|
|
210
|
+
2. Call `get_context()` when you need the latest pack. It blocks for one refresh if `.agentpack/task.md` or the repo snapshot changed since the last pack.
|
|
211
|
+
3. Use `route_task(task)` for a lightweight route: relevant files, rules, skills, commands, and safety warnings without writing a full context file.
|
|
212
|
+
|
|
213
|
+
### Multiple Agent Threads
|
|
214
|
+
|
|
215
|
+
Plain `agentpack pack`, `agentpack status`, and `agentpack guard` keep legacy global behavior and ignore ambient host thread env vars. Use thread mode only when you explicitly ask for it:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
agentpack pack --thread codex-local
|
|
219
|
+
AGENTPACK_THREAD_ID=codex-local agentpack pack --thread auto
|
|
220
|
+
agentpack threads --active
|
|
221
|
+
agentpack state show --thread codex-local
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Thread mode writes under `.agentpack/threads/<id>/` and appends `.agentpack/thread_index.jsonl`. Same-worktree, same-branch overlap is warning-only; separate worktrees or branches remain the safest workflow for concurrent edits.
|
|
225
|
+
|
|
226
|
+
### Release Validation
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
agentpack dev-check
|
|
230
|
+
agentpack release-check
|
|
231
|
+
agentpack verify-wheel
|
|
232
|
+
agentpack release prepare
|
|
233
|
+
agentpack ci init
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
The Makefile remains maintainer convenience, but the CLI commands above are the
|
|
237
|
+
package-user source of truth. `agentpack benchmark --release-gate` runs the
|
|
238
|
+
public proof path: public repos, proved target files, misses, and public table
|
|
239
|
+
output. `--sample-fixtures` remains a regression smoke path, not the release
|
|
240
|
+
gate.
|
|
241
|
+
|
|
242
|
+
## Commands
|
|
243
|
+
|
|
244
|
+
| Command | Purpose |
|
|
245
|
+
|---|---|
|
|
246
|
+
| `agentpack init --yes` | Create local config and ignore files |
|
|
247
|
+
| `agentpack work "task"` | Initialize if needed, start task, refresh context, show next steps |
|
|
248
|
+
| `agentpack start "task"` | Write task and run the guard/refresh workflow |
|
|
249
|
+
| `agentpack finish --since main` | Diagnose, capture benchmark case, run checks, mark done |
|
|
250
|
+
| `agentpack task show|set|clear` | Manage global or thread-scoped task files |
|
|
251
|
+
| `agentpack pack` | Generate a ranked context pack for `.agentpack/task.md` |
|
|
252
|
+
| `agentpack next --fix-all-safe` | Ask AgentPack what command or safe repair should happen next |
|
|
253
|
+
| `agentpack guard --repair-stale --refresh-context` | Check freshness, repair stale rules, refresh context |
|
|
254
|
+
| `agentpack status` | Show context freshness and git/task state |
|
|
255
|
+
| `agentpack stats` | Show pack size, token savings, and top files |
|
|
256
|
+
| `agentpack explain --task auto` | Debug selected and omitted files |
|
|
257
|
+
| `agentpack diagnose-selection` | Turn latest pack/benchmark signals into concrete tuning actions |
|
|
258
|
+
| `agentpack ignore suggest|apply` | Suggest or apply `.agentignore` improvements |
|
|
259
|
+
| `agentpack route --task "..."` | Get lightweight task routing without a full context file |
|
|
260
|
+
| `agentpack threads [--active] [--conflicts]` | Inspect thread-scoped context state |
|
|
261
|
+
| `agentpack state show|set|done` | Read or update execution state files |
|
|
262
|
+
| `agentpack benchmark capture --since <ref>` | Add a benchmark case from changed files |
|
|
263
|
+
| `agentpack benchmark --release-gate` | Run public benchmark evidence path |
|
|
264
|
+
| `agentpack dev-check` | Run docs, lint, pytest, and npm wrapper checks |
|
|
265
|
+
| `agentpack verify-wheel` | Install built wheel in a temp venv and run benchmark gate |
|
|
266
|
+
| `agentpack release-check` | Run version, changelog, tests, build, and benchmark checks |
|
|
267
|
+
| `agentpack release prepare` | Run full release prep, public table, and wheel verification |
|
|
268
|
+
| `agentpack ci init` | Generate a GitHub Actions workflow for AgentPack checks |
|
|
269
|
+
|
|
270
|
+
Full command reference: [`docs/commands.md`](docs/commands.md).
|
|
271
|
+
|
|
272
|
+
## Make Shortcuts
|
|
273
|
+
|
|
274
|
+
Run `make help` for the current list. The main targets are:
|
|
275
|
+
|
|
276
|
+
| Target | Wraps |
|
|
277
|
+
|---|---|
|
|
278
|
+
| `make test` | `pytest -q` |
|
|
279
|
+
| `make lint` | `python -m ruff check src tests` |
|
|
280
|
+
| `make npm-test` | npm wrapper/version tests |
|
|
281
|
+
| `make docs-check` | README/docs link smoke + `git diff --check` |
|
|
282
|
+
| `make benchmark` | `agentpack benchmark --release-gate --no-public-table` |
|
|
283
|
+
| `make benchmark-publish` | `agentpack benchmark --release-gate` |
|
|
284
|
+
| `make release-fast` | `agentpack release-check --skip-benchmark --skip-build` |
|
|
285
|
+
| `make release` | `agentpack release-check` |
|
|
286
|
+
| `make verify-wheel` | build wheel, install in temp venv, run benchmark gate |
|
|
287
|
+
|
|
288
|
+
`make context` uses legacy global context. For scoped context, run:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
THREAD=codex-local make context-thread
|
|
292
|
+
AGENTPACK_THREAD_ID=codex-local make context-thread
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Benchmark Proof
|
|
296
|
+
|
|
297
|
+
AgentPack is best treated as a ranked starting map. It should reduce repeated orientation work, but the agent and reviewer still own correctness.
|
|
298
|
+
|
|
299
|
+
Use real repo evals instead of trusting compression numbers:
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
agentpack benchmark --release-gate
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Current public benchmark evidence is documented in [`benchmarks/README.md`](benchmarks/README.md) and the generated public table under `benchmarks/results/`.
|
|
306
|
+
|
|
307
|
+
## What A Pack Contains
|
|
308
|
+
|
|
309
|
+
Rendered packs are meant to be readable by humans and directly useful to agents. A typical pack includes:
|
|
310
|
+
|
|
311
|
+
- freshness metadata with task source, generated time, git branch, SHA, and snapshot hash
|
|
312
|
+
- execution state with task status, checklist counts, git dirty/ahead/behind counts, and Docker/Compose availability
|
|
313
|
+
- concurrent-context warnings when another active thread overlaps files on the same branch and worktree
|
|
314
|
+
- token stats and largest token consumers
|
|
315
|
+
- semantic repo map grouped by subsystem
|
|
316
|
+
- selected-file table with include mode and reason
|
|
317
|
+
- compressed context receipts showing why files were included or excluded
|
|
318
|
+
- file context in `full`, `diff`, `symbols`, `skeleton`, or `summary` mode
|
|
319
|
+
|
|
320
|
+
The pack is a starting map. Agents should still verify the selected files against actual code before editing.
|
|
321
|
+
|
|
322
|
+
## Local Files
|
|
323
|
+
|
|
324
|
+
AgentPack writes local artifacts under `.agentpack/`:
|
|
325
|
+
|
|
326
|
+
| Path | Purpose |
|
|
327
|
+
|---|---|
|
|
328
|
+
| `.agentpack/task.md` | current global task summary |
|
|
329
|
+
| `.agentpack/task_state.md` | optional global execution state |
|
|
330
|
+
| `.agentpack/context.md` | generic/Codex/Cursor/Windsurf fallback context |
|
|
331
|
+
| `.agentpack/context.claude.md` | Claude-flavored fallback context |
|
|
332
|
+
| `.agentpack/pack_metadata.json` | freshness and pack metadata |
|
|
333
|
+
| `.agentpack/cache/` | offline file summaries keyed by hash |
|
|
334
|
+
| `.agentpack/snapshots/` | repo snapshot hashes |
|
|
335
|
+
| `.agentpack/thread_index.jsonl` | append-only thread activity index |
|
|
336
|
+
| `.agentpack/threads/<id>/` | scoped task, state, context, and metadata for explicit thread mode |
|
|
337
|
+
|
|
338
|
+
Generated context, cache, snapshots, and thread state are local operational files. The root `.agentpack/config.toml` and `.agentignore` are usually worth committing; generated context artifacts usually are not.
|
|
339
|
+
|
|
340
|
+
## Troubleshooting
|
|
341
|
+
|
|
342
|
+
If AgentPack selects too much:
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
agentpack diagnose-selection
|
|
346
|
+
agentpack stats
|
|
347
|
+
agentpack explain --omitted
|
|
348
|
+
agentpack explain --budget-plan
|
|
349
|
+
agentpack ignore suggest
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
If a required file is missing:
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
agentpack explain --file path/to/file.py
|
|
356
|
+
agentpack benchmark --misses
|
|
357
|
+
agentpack benchmark capture --since HEAD~1 --task "describe the task"
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
If context looks stale:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
agentpack status --deep
|
|
364
|
+
agentpack guard --agent auto --repair-stale --refresh-context
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
If multiple agents are editing the same project:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
agentpack threads --active
|
|
371
|
+
agentpack threads --conflicts
|
|
372
|
+
agentpack state show --thread codex-local
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
If package release checks fail:
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
agentpack release-check --json
|
|
379
|
+
agentpack release-check --skip-benchmark
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
Use the skip flags only for local iteration. The final release proof should include the build and public benchmark gate.
|
|
383
|
+
|
|
384
|
+
## Documentation
|
|
385
|
+
|
|
386
|
+
- [`docs/architecture.md`](docs/architecture.md): pipeline, data flow, package layout, thread/execution state, rendered-budget accounting.
|
|
387
|
+
- [`docs/commands.md`](docs/commands.md): full CLI command reference.
|
|
388
|
+
- [`docs/configuration.md`](docs/configuration.md): config, scoring weights, `.agentignore`, and git integration.
|
|
389
|
+
- [`docs/integrations.md`](docs/integrations.md): agent setup, MCP workflow, hooks, and native integration status.
|
|
390
|
+
- [`docs/benchmarking.md`](docs/benchmarking.md): quality bar, release gate, sample fixtures, and public artifacts.
|
|
391
|
+
- [`docs/development.md`](docs/development.md): local development, release checklist, naming/ranking, and contribution notes.
|
|
392
|
+
- [`docs/limitations.md`](docs/limitations.md): project scope, honest token framing, known limitations, and roadmap.
|
|
393
|
+
|
|
394
|
+
## Limitations
|
|
395
|
+
|
|
396
|
+
- AgentPack prepares context; it does not edit code, run tests for the agent, or prove correctness.
|
|
397
|
+
- Ranking is deterministic and local, but it can still miss files. Use `agentpack explain`, `agentpack benchmark --misses`, and normal code review.
|
|
398
|
+
- Thread coordination is warning-based, not locking-based. It helps agents notice collisions but does not enforce ownership.
|
|
399
|
+
- Language support is strongest for Python and JavaScript/TypeScript. Other languages still benefit from filenames, git signals, and summaries.
|
|
400
|
+
- Token estimates are approximate, even with rendered-budget accounting. Treat them as operational guidance, not provider billing truth.
|
|
401
|
+
|
|
402
|
+
More detail: [`docs/limitations.md`](docs/limitations.md).
|
|
403
|
+
|
|
404
|
+
## License
|
|
405
|
+
|
|
406
|
+
MIT
|