agentpack-cli 0.3.18__tar.gz → 0.3.19__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.18 → agentpack_cli-0.3.19}/PKG-INFO +2 -2
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/README.md +1 -1
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/pyproject.toml +1 -1
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/__init__.py +1 -1
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/renderers/compact.py +11 -7
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/renderers/markdown.py +39 -28
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/.gitignore +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/LICENSE +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/adapters/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/adapters/antigravity.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/adapters/base.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/adapters/claude.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/adapters/codex.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/adapters/cursor.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/adapters/detect.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/adapters/generic.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/adapters/windsurf.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/dependency_graph.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/go_imports.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/java_imports.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/js_ts_imports.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/monorepo.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/naming_signals.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/python_ast.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/python_imports.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/ranking.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/repo_map.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/role_inference.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/rust_imports.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/symbols.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/task_classifier.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/analysis/tests.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/application/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/application/pack_service.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/cli.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/_shared.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/benchmark.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/ci_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/claude_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/compress_output.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/dashboard.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/dev_check.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/diagnose_selection.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/diff.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/doctor.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/eval_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/explain.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/guard.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/hook_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/ignore_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/init.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/install.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/learn.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/mcp_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/memory.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/migrate.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/monitor.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/next_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/pack.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/perf.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/quickstart.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/release_check.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/release_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/repair.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/retrieve.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/route.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/scan.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/skills.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/start_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/state_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/stats.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/status.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/summarize.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/task_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/threads.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/tune.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/verify_wheel.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/watch.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/workflow_cmd.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/commands/wrap.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/bootstrap.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/cache.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/changed_paths.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/config.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/context_pack.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/diff.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/evals.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/execution_state.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/git.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/git_hooks.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/global_install.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/ignore.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/loop_protocol.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/merkle.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/models.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/pack_registry.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/redactor.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/scanner.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/snapshot.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/task_freshness.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/thread_context.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/token_estimator.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/core/vscode_tasks.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/dashboard/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/dashboard/collectors.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/dashboard/models.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/dashboard/renderers.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/data/agentpack.md +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/installers/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/installers/antigravity.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/installers/claude.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/installers/codex.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/installers/cursor.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/installers/windsurf.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/integrations/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/integrations/agents.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/integrations/git_hooks.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/integrations/global_install.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/integrations/platform.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/integrations/vscode_tasks.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/collector.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/extractor.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/feedback.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/lesson_ranker.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/models.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/provider.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/quality.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/renderers.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/learning/skill_map.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/mcp_server.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/output_compression/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/output_compression/core.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/renderers/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/renderers/receipts.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/router/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/router/discovery.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/router/models.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/router/parser.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/router/prompt_builder.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/router/scoring.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/router/service.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/router/skills_index.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/session/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/session/events.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/session/state.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/summaries/__init__.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/summaries/base.py +0 -0
- {agentpack_cli-0.3.18 → agentpack_cli-0.3.19}/src/agentpack/summaries/offline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentpack-cli
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.19
|
|
4
4
|
Summary: Local MCP context router for Claude Code, Codex, Cursor, and AI coding agents.
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -55,7 +55,7 @@ Claude Code, Codex, Cursor, and other coding agents can waste tool calls redisco
|
|
|
55
55
|
|
|
56
56
|
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.
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
How it works: AgentPack compresses repo context into ranked packs, caches scans/summaries/pack metadata for fast refreshes, and retrieves exact file or symbol blocks later when an agent needs more detail. Rendered packs also put stable instructions before volatile task, timestamp, git, and file sections so provider prompt-prefix caches can reuse the front of repeated refreshes. No cloud indexing, embeddings, or API calls are required for scan, summarize, rank, pack, stats, or benchmark.
|
|
59
59
|
|
|
60
60
|
Try the read-only task router without writing context files:
|
|
61
61
|
|
|
@@ -14,7 +14,7 @@ Claude Code, Codex, Cursor, and other coding agents can waste tool calls redisco
|
|
|
14
14
|
|
|
15
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
16
|
|
|
17
|
-
|
|
17
|
+
How it works: AgentPack compresses repo context into ranked packs, caches scans/summaries/pack metadata for fast refreshes, and retrieves exact file or symbol blocks later when an agent needs more detail. Rendered packs also put stable instructions before volatile task, timestamp, git, and file sections so provider prompt-prefix caches can reuse the front of repeated refreshes. No cloud indexing, embeddings, or API calls are required for scan, summarize, rank, pack, stats, or benchmark.
|
|
18
18
|
|
|
19
19
|
Try the read-only task router without writing context files:
|
|
20
20
|
|
|
@@ -34,6 +34,17 @@ def render_compact(pack: ContextPack) -> str:
|
|
|
34
34
|
|
|
35
35
|
sections.append("# AgentPack Context")
|
|
36
36
|
sections.append("")
|
|
37
|
+
sections.append("<!-- agentpack:stable-prefix:start -->")
|
|
38
|
+
sections.append("")
|
|
39
|
+
sections.append("## instructions")
|
|
40
|
+
sections.append("")
|
|
41
|
+
sections.append("- Prefer selected files first.")
|
|
42
|
+
sections.append("- Include modes: full, diff, symbols, skeleton, summary.")
|
|
43
|
+
sections.append("- If task changes significantly, update `.agentpack/task.md`.")
|
|
44
|
+
sections.append("- Run `agentpack session refresh` if context seems stale.")
|
|
45
|
+
sections.append("")
|
|
46
|
+
sections.append("<!-- agentpack:stable-prefix:end -->")
|
|
47
|
+
sections.append("")
|
|
37
48
|
sections.append(f"task: {pack.task}")
|
|
38
49
|
sections.append(f"mode: {pack.mode}")
|
|
39
50
|
sections.append(f"task_class: {pack.task_class}")
|
|
@@ -78,11 +89,4 @@ def render_compact(pack: ContextPack) -> str:
|
|
|
78
89
|
sections.append("(none)")
|
|
79
90
|
sections.append("")
|
|
80
91
|
|
|
81
|
-
sections.append("## instructions")
|
|
82
|
-
sections.append("")
|
|
83
|
-
sections.append("- Prefer selected files first.")
|
|
84
|
-
sections.append("- If task changes significantly, update `.agentpack/task.md`.")
|
|
85
|
-
sections.append("- Run `agentpack session refresh` if context seems stale.")
|
|
86
|
-
sections.append("")
|
|
87
|
-
|
|
88
92
|
return "\n".join(sections)
|
|
@@ -68,6 +68,10 @@ def _omitted_relevant_lines(pack: ContextPack, limit: int = 10) -> list[str]:
|
|
|
68
68
|
)[:limit]
|
|
69
69
|
lines = ["## Omitted But Relevant Files", ""]
|
|
70
70
|
lines.append("These files matched the task but were not included due to token budget.")
|
|
71
|
+
lines.append(
|
|
72
|
+
"Do not assume omitted relevant files are safe. If a selected function/class has omitted callers, "
|
|
73
|
+
"tests, routes, schemas, or configs, inspect them before finalizing the fix."
|
|
74
|
+
)
|
|
71
75
|
lines.append(
|
|
72
76
|
"Before finalizing changes, inspect high-risk omitted files if your fix changes shared behavior, "
|
|
73
77
|
"function signatures, data models, API contracts, or side effects."
|
|
@@ -241,11 +245,34 @@ def _has_task_stale_warning(pack: ContextPack) -> bool:
|
|
|
241
245
|
)
|
|
242
246
|
|
|
243
247
|
|
|
248
|
+
def _stable_prefix_lines(agent_name: str) -> list[str]:
|
|
249
|
+
return [
|
|
250
|
+
f"# AgentPack Context for {agent_name}",
|
|
251
|
+
"",
|
|
252
|
+
"<!-- agentpack:stable-prefix:start -->",
|
|
253
|
+
"",
|
|
254
|
+
f"## Instructions for {agent_name}",
|
|
255
|
+
"",
|
|
256
|
+
(
|
|
257
|
+
"This is a task-focused context pack. Act on it immediately:\n\n"
|
|
258
|
+
"1. **Orient** — identify the changed files and key symbols relevant to the task.\n"
|
|
259
|
+
"2. **Diagnose or plan** — find the root cause (bug fix) or outline the approach (feature).\n"
|
|
260
|
+
"3. **Work** — edit files, write code, fix the issue. Do not wait for more instructions.\n\n"
|
|
261
|
+
"Priority order: changed files → keyword matches → dependencies → summaries.\n"
|
|
262
|
+
"Modes: `full` source, `diff` hunks, `symbols` or `skeleton` interfaces, `summary` brief context.\n"
|
|
263
|
+
"If this pack's task does not match the user's current task, write the new task to "
|
|
264
|
+
"`.agentpack/task.md`, run `agentpack pack --task auto`, re-read the context, then proceed. "
|
|
265
|
+
"If the pack looks stale (changed files list is empty but you expect changes), refresh the pack before editing."
|
|
266
|
+
),
|
|
267
|
+
"",
|
|
268
|
+
"<!-- agentpack:stable-prefix:end -->",
|
|
269
|
+
"",
|
|
270
|
+
]
|
|
271
|
+
|
|
272
|
+
|
|
244
273
|
def render_claude(pack: ContextPack) -> str:
|
|
245
|
-
sections: list[str] =
|
|
274
|
+
sections: list[str] = _stable_prefix_lines("Claude")
|
|
246
275
|
|
|
247
|
-
sections.append("# AgentPack Context for Claude")
|
|
248
|
-
sections.append("")
|
|
249
276
|
sections.append(_machine_freshness_block(pack))
|
|
250
277
|
sections.append("")
|
|
251
278
|
|
|
@@ -303,28 +330,6 @@ def render_claude(pack: ContextPack) -> str:
|
|
|
303
330
|
sections.append(pack.agent_lessons)
|
|
304
331
|
sections.append("")
|
|
305
332
|
|
|
306
|
-
sections.append("## Instructions for Claude")
|
|
307
|
-
sections.append("")
|
|
308
|
-
sections.append(
|
|
309
|
-
"This is a task-focused context pack. Act on it immediately:\n\n"
|
|
310
|
-
"1. **Orient** — identify the changed files and key symbols relevant to the task.\n"
|
|
311
|
-
"2. **Diagnose or plan** — find the root cause (bug fix) or outline the approach (feature).\n"
|
|
312
|
-
"3. **Work** — edit files, write code, fix the issue. Do not wait for more instructions.\n\n"
|
|
313
|
-
"Priority order: changed files → keyword-matched files → dependencies → summaries.\n"
|
|
314
|
-
"Files marked `full` contain complete source. Files marked `diff` contain relevant changed hunks. "
|
|
315
|
-
"Files marked `symbols` contain relevant function/class bodies. Files marked `skeleton` contain imports/signatures. "
|
|
316
|
-
"Files marked `summary` are unchanged context.\n"
|
|
317
|
-
"If this pack's task does not match the user's current task, write the new task to "
|
|
318
|
-
"`.agentpack/task.md`, run `agentpack pack --task auto`, re-read the context, then proceed. "
|
|
319
|
-
"If the pack looks stale (changed files list is empty but you expect changes), refresh the pack before editing."
|
|
320
|
-
)
|
|
321
|
-
if pack.omitted_relevant_files:
|
|
322
|
-
sections.append(
|
|
323
|
-
"Do not assume omitted relevant files are safe. If a selected function/class has omitted callers, "
|
|
324
|
-
"tests, routes, schemas, or configs, inspect them before finalizing the fix."
|
|
325
|
-
)
|
|
326
|
-
sections.append("")
|
|
327
|
-
|
|
328
333
|
sections.append("## Token Stats")
|
|
329
334
|
sections.append("")
|
|
330
335
|
sections.append(f"Raw repo tokens: {pack.raw_repo_tokens:,}")
|
|
@@ -399,13 +404,19 @@ def render_claude(pack: ContextPack) -> str:
|
|
|
399
404
|
|
|
400
405
|
|
|
401
406
|
def render_generic(pack: ContextPack) -> str:
|
|
402
|
-
return
|
|
407
|
+
return (
|
|
408
|
+
render_claude(pack)
|
|
409
|
+
.replace("# AgentPack Context for Claude", "# AgentPack Context")
|
|
410
|
+
.replace("## Instructions for Claude", "## Instructions for Agent")
|
|
411
|
+
)
|
|
403
412
|
|
|
404
413
|
|
|
405
414
|
def render_antigravity(pack: ContextPack) -> str:
|
|
406
415
|
"""Render context as an Antigravity SKILL.md with required frontmatter."""
|
|
407
|
-
body =
|
|
408
|
-
|
|
416
|
+
body = (
|
|
417
|
+
render_claude(pack)
|
|
418
|
+
.replace("# AgentPack Context for Claude", "# AgentPack Context")
|
|
419
|
+
.replace("## Instructions for Claude", "## Instructions for Agent")
|
|
409
420
|
)
|
|
410
421
|
frontmatter = (
|
|
411
422
|
"---\n"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|