agentpack-cli 0.3.12__tar.gz → 0.3.13__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.
Files changed (134) hide show
  1. agentpack_cli-0.3.12/README.md → agentpack_cli-0.3.13/PKG-INFO +125 -6
  2. agentpack_cli-0.3.12/PKG-INFO → agentpack_cli-0.3.13/README.md +86 -45
  3. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/pyproject.toml +3 -3
  4. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/__init__.py +1 -1
  5. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/dependency_graph.py +11 -0
  6. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/application/pack_service.py +257 -11
  7. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/cli.py +2 -0
  8. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/benchmark.py +596 -0
  9. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/init.py +14 -0
  10. agentpack_cli-0.3.13/src/agentpack/commands/learn.py +101 -0
  11. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/pack.py +13 -0
  12. agentpack_cli-0.3.13/src/agentpack/core/changed_paths.py +46 -0
  13. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/config.py +54 -0
  14. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/context_pack.py +158 -0
  15. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/git.py +84 -0
  16. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/models.py +16 -0
  17. agentpack_cli-0.3.13/src/agentpack/core/scanner.py +334 -0
  18. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/snapshot.py +5 -2
  19. agentpack_cli-0.3.13/src/agentpack/learning/__init__.py +21 -0
  20. agentpack_cli-0.3.13/src/agentpack/learning/collector.py +64 -0
  21. agentpack_cli-0.3.13/src/agentpack/learning/extractor.py +261 -0
  22. agentpack_cli-0.3.13/src/agentpack/learning/feedback.py +22 -0
  23. agentpack_cli-0.3.13/src/agentpack/learning/models.py +65 -0
  24. agentpack_cli-0.3.13/src/agentpack/learning/quality.py +47 -0
  25. agentpack_cli-0.3.13/src/agentpack/learning/renderers.py +99 -0
  26. agentpack_cli-0.3.13/src/agentpack/learning/skill_map.py +29 -0
  27. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/renderers/markdown.py +70 -1
  28. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/summaries/base.py +41 -13
  29. agentpack_cli-0.3.12/src/agentpack/core/scanner.py +0 -204
  30. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/.gitignore +0 -0
  31. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/LICENSE +0 -0
  32. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/adapters/__init__.py +0 -0
  33. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/adapters/antigravity.py +0 -0
  34. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/adapters/base.py +0 -0
  35. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/adapters/claude.py +0 -0
  36. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/adapters/codex.py +0 -0
  37. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/adapters/cursor.py +0 -0
  38. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/adapters/detect.py +0 -0
  39. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/adapters/generic.py +0 -0
  40. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/adapters/windsurf.py +0 -0
  41. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/__init__.py +0 -0
  42. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/go_imports.py +0 -0
  43. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/java_imports.py +0 -0
  44. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/js_ts_imports.py +0 -0
  45. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/monorepo.py +0 -0
  46. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/naming_signals.py +0 -0
  47. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/python_imports.py +0 -0
  48. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/ranking.py +0 -0
  49. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/repo_map.py +0 -0
  50. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/role_inference.py +0 -0
  51. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/rust_imports.py +0 -0
  52. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/symbols.py +0 -0
  53. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/task_classifier.py +0 -0
  54. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/analysis/tests.py +0 -0
  55. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/application/__init__.py +0 -0
  56. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/__init__.py +0 -0
  57. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/_shared.py +0 -0
  58. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/ci_cmd.py +0 -0
  59. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/claude_cmd.py +0 -0
  60. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/dev_check.py +0 -0
  61. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/diagnose_selection.py +0 -0
  62. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/diff.py +0 -0
  63. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/doctor.py +0 -0
  64. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/eval_cmd.py +0 -0
  65. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/explain.py +0 -0
  66. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/guard.py +0 -0
  67. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/hook_cmd.py +0 -0
  68. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/ignore_cmd.py +0 -0
  69. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/install.py +0 -0
  70. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/mcp_cmd.py +0 -0
  71. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/migrate.py +0 -0
  72. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/monitor.py +0 -0
  73. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/next_cmd.py +0 -0
  74. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/quickstart.py +0 -0
  75. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/release_check.py +0 -0
  76. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/release_cmd.py +0 -0
  77. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/repair.py +0 -0
  78. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/route.py +0 -0
  79. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/scan.py +0 -0
  80. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/skills.py +0 -0
  81. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/start_cmd.py +0 -0
  82. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/state_cmd.py +0 -0
  83. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/stats.py +0 -0
  84. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/status.py +0 -0
  85. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/summarize.py +0 -0
  86. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/task_cmd.py +0 -0
  87. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/threads.py +0 -0
  88. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/tune.py +0 -0
  89. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/verify_wheel.py +0 -0
  90. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/watch.py +0 -0
  91. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/commands/workflow_cmd.py +0 -0
  92. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/__init__.py +0 -0
  93. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/bootstrap.py +0 -0
  94. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/cache.py +0 -0
  95. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/diff.py +0 -0
  96. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/evals.py +0 -0
  97. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/execution_state.py +0 -0
  98. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/git_hooks.py +0 -0
  99. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/global_install.py +0 -0
  100. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/ignore.py +0 -0
  101. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/merkle.py +0 -0
  102. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/redactor.py +0 -0
  103. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/task_freshness.py +0 -0
  104. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/thread_context.py +0 -0
  105. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/token_estimator.py +0 -0
  106. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/core/vscode_tasks.py +0 -0
  107. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/data/agentpack.md +0 -0
  108. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/installers/__init__.py +0 -0
  109. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/installers/antigravity.py +0 -0
  110. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/installers/claude.py +0 -0
  111. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/installers/codex.py +0 -0
  112. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/installers/cursor.py +0 -0
  113. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/installers/windsurf.py +0 -0
  114. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/integrations/__init__.py +0 -0
  115. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/integrations/agents.py +0 -0
  116. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/integrations/git_hooks.py +0 -0
  117. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/integrations/global_install.py +0 -0
  118. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/integrations/platform.py +0 -0
  119. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/integrations/vscode_tasks.py +0 -0
  120. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/mcp_server.py +0 -0
  121. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/renderers/__init__.py +0 -0
  122. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/renderers/compact.py +0 -0
  123. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/renderers/receipts.py +0 -0
  124. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/router/__init__.py +0 -0
  125. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/router/discovery.py +0 -0
  126. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/router/models.py +0 -0
  127. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/router/parser.py +0 -0
  128. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/router/prompt_builder.py +0 -0
  129. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/router/scoring.py +0 -0
  130. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/router/service.py +0 -0
  131. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/session/__init__.py +0 -0
  132. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/session/state.py +0 -0
  133. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/summaries/__init__.py +0 -0
  134. {agentpack_cli-0.3.12 → agentpack_cli-0.3.13}/src/agentpack/summaries/offline.py +0 -0
@@ -1,3 +1,42 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentpack-cli
3
+ Version: 0.3.13
4
+ Summary: Local MCP context router for Claude Code, Codex, Cursor, and AI coding agents.
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Keywords: ai,ai-agent,ai-coding-agents,antigravity,ci,claude-code,codex,coding-agent,context,context-engine,context-packing,context-router,cursor,developer-tools,llm,mcp,mcp-context-engine,packing,prompt-context,reduce-token-usage,repo-analysis,repo-context,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
+
1
40
  # AgentPack
2
41
 
3
42
  [![PyPI version](https://img.shields.io/pypi/v/agentpack-cli.svg)](https://pypi.org/project/agentpack-cli/)
@@ -8,15 +47,60 @@
8
47
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
48
  [![CI](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml/badge.svg)](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
10
49
 
11
- > **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.
50
+ **Local MCP context router for AI coding agents.**
51
+
52
+ Claude Code, Codex, Cursor, and other coding agents can waste tool calls rediscovering your repo before they make the edit you asked for.
53
+
54
+ AgentPack gives them a ranked map of likely relevant files, tests, rules, and skills for each task. It analyzes your repo locally and packages compact context for CLI and MCP workflows.
55
+
56
+ No cloud indexing. No embeddings required. No API calls for scan, summarize, rank, pack, stats, or benchmark. AgentPack is a context preparation tool, not a coding agent.
57
+
58
+ Try the read-only task router without writing context files:
59
+
60
+ ```bash
61
+ pipx run --spec agentpack-cli agentpack route --task "fix auth token expiry"
62
+ ```
63
+
64
+ ![AgentPack route demo](docs/assets/agentpack-route-demo.svg)
65
+
66
+ > **Status: alpha (v0.3.13).** Works, tested, and used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Current benchmarks are useful regression checks, not broad proof that AgentPack improves coding-agent success. API may change before 1.0.
12
67
  >
13
68
  > **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.
69
+ >
70
+ > **Name note:** PyPI package is `agentpack-cli`, npm package is `@vishal2612200/agentpack`, and the command is `agentpack`. This project is unrelated to AgentPack dataset papers or other repos with the same name.
14
71
 
15
- **Local context engine for AI coding agents.**
72
+ ## Before vs After
16
73
 
17
- 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.
74
+ Without AgentPack, a cold coding-agent session often starts with manual repo orientation:
18
75
 
19
- 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.
76
+ ```text
77
+ Task: fix auth token expiry
78
+
79
+ Agent:
80
+ - searches for auth files
81
+ - opens nearby middleware and config
82
+ - may miss related tests
83
+ - spends early turns building a repo map
84
+ ```
85
+
86
+ With AgentPack:
87
+
88
+ ```bash
89
+ agentpack route --task "fix auth token expiry"
90
+ ```
91
+
92
+ ```text
93
+ Task:
94
+ fix auth token expiry
95
+
96
+ Relevant files:
97
+ - tests/test_auth.py
98
+ - src/app/auth.py
99
+ - src/app/users.py
100
+
101
+ Suggested commands:
102
+ - pytest tests/test_auth.py -q
103
+ ```
20
104
 
21
105
  ## Features
22
106
 
@@ -27,6 +111,7 @@ Use AgentPack when a repo is too large to paste and you want faster, more consis
27
111
  - **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.
28
112
  - **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.
29
113
  - **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.
114
+ - **Learning layer**: turns task diffs into developer learning notes, skill evidence, and compact lessons future agents can reuse.
30
115
  - **Agent integrations**: installs Claude Code, Cursor, Windsurf, Codex, Antigravity, VS Code tasks, git hooks, and MCP configuration.
31
116
  - **Local and measurable**: no API calls for scan, summarize, rank, pack, stats, or benchmark; quality is measured with expected-file evals.
32
117
 
@@ -43,6 +128,17 @@ Latest public release gate: 8 real commits from Pallets Click, ItsDangerous, and
43
128
 
44
129
  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`.
45
130
 
131
+ ## Use Cases
132
+
133
+ - [Claude Code context engine](docs/claude-code-context-engine.md)
134
+ - [MCP context engine](docs/mcp-context-engine.md)
135
+ - [Cursor context packing](docs/cursor-context-packing.md)
136
+ - [AI coding agent context packing](docs/ai-coding-agent-context.md)
137
+ - [Reduce Claude Code token usage](docs/reduce-claude-code-token-usage.md)
138
+ - [AgentPack vs Repomix](docs/agentpack-vs-repomix.md)
139
+ - [AgentPack vs Augment Context Engine](docs/agentpack-vs-augment-context-engine.md)
140
+ - [Docs index](docs/index.md)
141
+
46
142
  ## Install
47
143
 
48
144
  ```bash
@@ -99,6 +195,21 @@ agentpack finish --since main
99
195
 
100
196
  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.
101
197
 
198
+ ### Learn from AI-assisted work
199
+
200
+ Generate local post-task learning artifacts from `.agentpack/task.md` and git changes:
201
+
202
+ ```bash
203
+ agentpack learn
204
+ agentpack learn --today
205
+ agentpack learn --since main
206
+ agentpack learn --json
207
+ agentpack learn --llm-prompt --pr-comment
208
+ agentpack learn --feedback helpful --feedback-note "Useful review prompts"
209
+ ```
210
+
211
+ AgentPack writes developer notes to `.agentpack/learning.md` or `.agentpack/daily-summary.md`, updates `.agentpack/skills-progress.json`, writes `.agentpack/agent-lessons.md` for future coding agents, and can emit `.agentpack/learning.prompt.md` or `.agentpack/pr-learning-comment.md`. The MVP is local-first and reuses AgentPack redaction before reading diff snippets.
212
+
102
213
  ## Agent Setup
103
214
 
104
215
  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.
@@ -208,6 +319,7 @@ gate.
208
319
  | `agentpack work "task"` | Initialize if needed, start task, refresh context, show next steps |
209
320
  | `agentpack start "task"` | Write task and run the guard/refresh workflow |
210
321
  | `agentpack finish --since main` | Diagnose, capture benchmark case, run checks, mark done |
322
+ | `agentpack learn` | Generate developer learning notes, skill progress, and future-agent lessons |
211
323
  | `agentpack task show|set|clear` | Manage global or thread-scoped task files |
212
324
  | `agentpack pack` | Generate a ranked context pack for `.agentpack/task.md` |
213
325
  | `agentpack next --fix-all-safe` | Ask AgentPack what command or safe repair should happen next |
@@ -255,7 +367,7 @@ AGENTPACK_THREAD_ID=codex-local make context-thread
255
367
 
256
368
  ## Benchmark Proof
257
369
 
258
- AgentPack is best treated as a ranked starting map. It should reduce repeated orientation work, but the agent and reviewer still own correctness.
370
+ AgentPack is best treated as a ranked starting map. It can reduce repeated orientation work, but the agent and reviewer still own correctness.
259
371
 
260
372
  Use real repo evals instead of trusting compression numbers:
261
373
 
@@ -263,7 +375,7 @@ Use real repo evals instead of trusting compression numbers:
263
375
  agentpack benchmark --release-gate
264
376
  ```
265
377
 
266
- Current public benchmark evidence is documented in [`benchmarks/README.md`](benchmarks/README.md) and the generated public table under `benchmarks/results/`.
378
+ Current benchmark evidence is documented in [`benchmarks/README.md`](benchmarks/README.md) and the generated tables under `benchmarks/results/`. Treat these as scoped evidence for the included cases, not a universal performance claim.
267
379
 
268
380
  ## What A Pack Contains
269
381
 
@@ -290,6 +402,13 @@ AgentPack writes local artifacts under `.agentpack/`:
290
402
  | `.agentpack/task_state.md` | optional global execution state |
291
403
  | `.agentpack/context.md` | generic/Codex/Cursor/Windsurf fallback context |
292
404
  | `.agentpack/context.claude.md` | Claude-flavored fallback context |
405
+ | `.agentpack/learning.md` | local post-task developer learning notes |
406
+ | `.agentpack/daily-summary.md` | local daily learning rollup from `agentpack learn --today` |
407
+ | `.agentpack/skills-progress.json` | local skill evidence map from task work |
408
+ | `.agentpack/agent-lessons.md` | compact repo-specific lessons injected into future packs |
409
+ | `.agentpack/learning.prompt.md` | optional source-backed prompt for external LLM refinement |
410
+ | `.agentpack/pr-learning-comment.md` | optional PR-comment-ready learning summary |
411
+ | `.agentpack/learning-feedback.jsonl` | optional local helpful/not-helpful feedback records |
293
412
  | `.agentpack/pack_metadata.json` | freshness and pack metadata |
294
413
  | `.agentpack/cache/` | offline file summaries keyed by hash |
295
414
  | `.agentpack/snapshots/` | repo snapshot hashes |
@@ -1,42 +1,3 @@
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
1
  # AgentPack
41
2
 
42
3
  [![PyPI version](https://img.shields.io/pypi/v/agentpack-cli.svg)](https://pypi.org/project/agentpack-cli/)
@@ -47,15 +8,60 @@ Description-Content-Type: text/markdown
47
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
48
9
  [![CI](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml/badge.svg)](https://github.com/vishal2612200/agentpack/actions/workflows/ci.yml)
49
10
 
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.
11
+ **Local MCP context router for AI coding agents.**
12
+
13
+ Claude Code, Codex, Cursor, and other coding agents can waste tool calls rediscovering your repo before they make the edit you asked for.
14
+
15
+ AgentPack gives them a ranked map of likely relevant files, tests, rules, and skills for each task. It analyzes your repo locally and packages compact context for CLI and MCP workflows.
16
+
17
+ No cloud indexing. No embeddings required. No API calls for scan, summarize, rank, pack, stats, or benchmark. AgentPack is a context preparation tool, not a coding agent.
18
+
19
+ Try the read-only task router without writing context files:
20
+
21
+ ```bash
22
+ pipx run --spec agentpack-cli agentpack route --task "fix auth token expiry"
23
+ ```
24
+
25
+ ![AgentPack route demo](docs/assets/agentpack-route-demo.svg)
26
+
27
+ > **Status: alpha (v0.3.13).** Works, tested, and used in real sessions. Python and JavaScript/TypeScript are the best-supported languages. Current benchmarks are useful regression checks, not broad proof that AgentPack improves coding-agent success. API may change before 1.0.
51
28
  >
52
29
  > **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.
30
+ >
31
+ > **Name note:** PyPI package is `agentpack-cli`, npm package is `@vishal2612200/agentpack`, and the command is `agentpack`. This project is unrelated to AgentPack dataset papers or other repos with the same name.
53
32
 
54
- **Local context engine for AI coding agents.**
33
+ ## Before vs After
55
34
 
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.
35
+ Without AgentPack, a cold coding-agent session often starts with manual repo orientation:
57
36
 
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.
37
+ ```text
38
+ Task: fix auth token expiry
39
+
40
+ Agent:
41
+ - searches for auth files
42
+ - opens nearby middleware and config
43
+ - may miss related tests
44
+ - spends early turns building a repo map
45
+ ```
46
+
47
+ With AgentPack:
48
+
49
+ ```bash
50
+ agentpack route --task "fix auth token expiry"
51
+ ```
52
+
53
+ ```text
54
+ Task:
55
+ fix auth token expiry
56
+
57
+ Relevant files:
58
+ - tests/test_auth.py
59
+ - src/app/auth.py
60
+ - src/app/users.py
61
+
62
+ Suggested commands:
63
+ - pytest tests/test_auth.py -q
64
+ ```
59
65
 
60
66
  ## Features
61
67
 
@@ -66,6 +72,7 @@ Use AgentPack when a repo is too large to paste and you want faster, more consis
66
72
  - **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
73
  - **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
74
  - **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.
75
+ - **Learning layer**: turns task diffs into developer learning notes, skill evidence, and compact lessons future agents can reuse.
69
76
  - **Agent integrations**: installs Claude Code, Cursor, Windsurf, Codex, Antigravity, VS Code tasks, git hooks, and MCP configuration.
70
77
  - **Local and measurable**: no API calls for scan, summarize, rank, pack, stats, or benchmark; quality is measured with expected-file evals.
71
78
 
@@ -82,6 +89,17 @@ Latest public release gate: 8 real commits from Pallets Click, ItsDangerous, and
82
89
 
83
90
  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
91
 
92
+ ## Use Cases
93
+
94
+ - [Claude Code context engine](docs/claude-code-context-engine.md)
95
+ - [MCP context engine](docs/mcp-context-engine.md)
96
+ - [Cursor context packing](docs/cursor-context-packing.md)
97
+ - [AI coding agent context packing](docs/ai-coding-agent-context.md)
98
+ - [Reduce Claude Code token usage](docs/reduce-claude-code-token-usage.md)
99
+ - [AgentPack vs Repomix](docs/agentpack-vs-repomix.md)
100
+ - [AgentPack vs Augment Context Engine](docs/agentpack-vs-augment-context-engine.md)
101
+ - [Docs index](docs/index.md)
102
+
85
103
  ## Install
86
104
 
87
105
  ```bash
@@ -138,6 +156,21 @@ agentpack finish --since main
138
156
 
139
157
  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
158
 
159
+ ### Learn from AI-assisted work
160
+
161
+ Generate local post-task learning artifacts from `.agentpack/task.md` and git changes:
162
+
163
+ ```bash
164
+ agentpack learn
165
+ agentpack learn --today
166
+ agentpack learn --since main
167
+ agentpack learn --json
168
+ agentpack learn --llm-prompt --pr-comment
169
+ agentpack learn --feedback helpful --feedback-note "Useful review prompts"
170
+ ```
171
+
172
+ AgentPack writes developer notes to `.agentpack/learning.md` or `.agentpack/daily-summary.md`, updates `.agentpack/skills-progress.json`, writes `.agentpack/agent-lessons.md` for future coding agents, and can emit `.agentpack/learning.prompt.md` or `.agentpack/pr-learning-comment.md`. The MVP is local-first and reuses AgentPack redaction before reading diff snippets.
173
+
141
174
  ## Agent Setup
142
175
 
143
176
  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.
@@ -247,6 +280,7 @@ gate.
247
280
  | `agentpack work "task"` | Initialize if needed, start task, refresh context, show next steps |
248
281
  | `agentpack start "task"` | Write task and run the guard/refresh workflow |
249
282
  | `agentpack finish --since main` | Diagnose, capture benchmark case, run checks, mark done |
283
+ | `agentpack learn` | Generate developer learning notes, skill progress, and future-agent lessons |
250
284
  | `agentpack task show|set|clear` | Manage global or thread-scoped task files |
251
285
  | `agentpack pack` | Generate a ranked context pack for `.agentpack/task.md` |
252
286
  | `agentpack next --fix-all-safe` | Ask AgentPack what command or safe repair should happen next |
@@ -294,7 +328,7 @@ AGENTPACK_THREAD_ID=codex-local make context-thread
294
328
 
295
329
  ## Benchmark Proof
296
330
 
297
- AgentPack is best treated as a ranked starting map. It should reduce repeated orientation work, but the agent and reviewer still own correctness.
331
+ AgentPack is best treated as a ranked starting map. It can reduce repeated orientation work, but the agent and reviewer still own correctness.
298
332
 
299
333
  Use real repo evals instead of trusting compression numbers:
300
334
 
@@ -302,7 +336,7 @@ Use real repo evals instead of trusting compression numbers:
302
336
  agentpack benchmark --release-gate
303
337
  ```
304
338
 
305
- Current public benchmark evidence is documented in [`benchmarks/README.md`](benchmarks/README.md) and the generated public table under `benchmarks/results/`.
339
+ Current benchmark evidence is documented in [`benchmarks/README.md`](benchmarks/README.md) and the generated tables under `benchmarks/results/`. Treat these as scoped evidence for the included cases, not a universal performance claim.
306
340
 
307
341
  ## What A Pack Contains
308
342
 
@@ -329,6 +363,13 @@ AgentPack writes local artifacts under `.agentpack/`:
329
363
  | `.agentpack/task_state.md` | optional global execution state |
330
364
  | `.agentpack/context.md` | generic/Codex/Cursor/Windsurf fallback context |
331
365
  | `.agentpack/context.claude.md` | Claude-flavored fallback context |
366
+ | `.agentpack/learning.md` | local post-task developer learning notes |
367
+ | `.agentpack/daily-summary.md` | local daily learning rollup from `agentpack learn --today` |
368
+ | `.agentpack/skills-progress.json` | local skill evidence map from task work |
369
+ | `.agentpack/agent-lessons.md` | compact repo-specific lessons injected into future packs |
370
+ | `.agentpack/learning.prompt.md` | optional source-backed prompt for external LLM refinement |
371
+ | `.agentpack/pr-learning-comment.md` | optional PR-comment-ready learning summary |
372
+ | `.agentpack/learning-feedback.jsonl` | optional local helpful/not-helpful feedback records |
332
373
  | `.agentpack/pack_metadata.json` | freshness and pack metadata |
333
374
  | `.agentpack/cache/` | offline file summaries keyed by hash |
334
375
  | `.agentpack/snapshots/` | repo snapshot hashes |
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "agentpack-cli"
3
- version = "0.3.12"
4
- description = "Local context engine for AI coding agents that ranks relevant files and builds task-focused context packs."
3
+ version = "0.3.13"
4
+ description = "Local MCP context router for Claude Code, Codex, Cursor, and AI coding agents."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  license = {text = "MIT"}
8
- keywords = ["ai-coding-agents", "developer-tools", "repo-analysis", "context-engine", "context-packing", "prompt-context", "mcp", "ci", "codex", "cursor", "windsurf", "antigravity", "ai", "llm", "context", "packing"]
8
+ keywords = ["ai-coding-agents", "coding-agent", "ai-agent", "claude-code", "developer-tools", "repo-analysis", "repo-context", "context-engine", "mcp-context-engine", "context-router", "context-packing", "prompt-context", "reduce-token-usage", "mcp", "ci", "codex", "cursor", "windsurf", "antigravity", "ai", "llm", "context", "packing"]
9
9
  classifiers = [
10
10
  "Development Status :: 3 - Alpha",
11
11
  "Intended Audience :: Developers",
@@ -1,3 +1,3 @@
1
1
  """AgentPack — task-aware context packing for AI coding agents."""
2
2
 
3
- __version__ = "0.3.12"
3
+ __version__ = "0.3.13"
@@ -11,6 +11,8 @@ from agentpack.analysis.go_imports import extract_imports as go_imports
11
11
  from agentpack.analysis.rust_imports import extract_imports as rust_imports
12
12
  from agentpack.analysis.java_imports import extract_imports as java_imports
13
13
 
14
+ _GRAPH_CACHE: dict[tuple[tuple[tuple[str, str | None], ...], bool], DependencyGraph] = {}
15
+
14
16
 
15
17
  def build(
16
18
  files: list[FileInfo],
@@ -28,6 +30,14 @@ def build(
28
30
  DependencyGraph with typed DependencyNode entries. Caller fills tests
29
31
  via find_related_tests after construction.
30
32
  """
33
+ cache_key = (
34
+ tuple(sorted((fi.path, fi.hash) for fi in files)),
35
+ bool(summaries),
36
+ )
37
+ cached_graph = _GRAPH_CACHE.get(cache_key)
38
+ if cached_graph is not None:
39
+ return cached_graph.model_copy(deep=True)
40
+
31
41
  graph = DependencyGraph(
32
42
  nodes={fi.path: DependencyNode(path=fi.path) for fi in files}
33
43
  )
@@ -66,6 +76,7 @@ def build(
66
76
  if dep in graph:
67
77
  graph.nodes[dep].imported_by.append(fi.path)
68
78
 
79
+ _GRAPH_CACHE[cache_key] = graph.model_copy(deep=True)
69
80
  return graph
70
81
 
71
82