agent-context-mcp 0.3.0__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.
@@ -0,0 +1,12 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ .pytest_cache/
8
+ .coverage
9
+ htmlcov/
10
+ *.swp
11
+ .DS_Store
12
+ agent/runtime/
@@ -0,0 +1,61 @@
1
+ # Changelog
2
+
3
+ All notable changes to acp-mcp will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.3.0] - 2026-05-14
11
+
12
+ ### Changed
13
+
14
+ - **Breaking**: Templates are no longer bundled with the wheel. `acp init` and `acp version update` now fetch templates from `agent-context-protocol` (GitHub) at runtime via `git clone --depth=1`. Templates evolve independently of acp-mcp releases.
15
+ - **Breaking**: `acp version update` now refreshes the project's ACP artifacts from agent-context-protocol mainline (matching bash semantics). Previously it ran `uv tool upgrade acp-mcp`. To upgrade the tool itself, use `uv tool upgrade acp-mcp` directly.
16
+ - **Breaking**: `acp version check` now compares the project's ACP version (from `AGENT.md`) against agent-context-protocol mainline. Previously it checked PyPI for a new acp-mcp release.
17
+ - `acp init` now performs a shallow git clone instead of copying bundled resources. Requires `git` on PATH.
18
+
19
+ ### Added
20
+
21
+ - `acp.core.fetch.fetch_acp_templates()` — runtime git-clone primitive (context manager; yields clone root, cleans up on exit).
22
+ - `acp version show` — print the project's ACP version from `AGENT.md` (separate from `acp --version` which shows the tool version).
23
+ - `acp_version` MCP tool: `show` (project ACP version), `check` (compare project vs upstream), `update` (refresh project artifacts).
24
+ - `acp_enumerate` MCP tool: discover ACP artifacts (commands, patterns, designs, specs) in `./agent/` and `~/.acp/agent/`. Extracts `@scry.entry` marker metadata via `scry-parse` when installed; falls back to plain file listing.
25
+ - `acp_package` MCP tool: full implementation — `list`, `install`, `update`, `remove`, `info` backed by `acp.core.package_manager`. `search` returns `status: "not_available"` pending registry launch.
26
+ - `acp package install/list/update/remove/info` CLI commands backed by `acp.core.package_manager`.
27
+ - `acp.core.package_manager` module: package management logic (install from git URL, list, info, remove, update — reads/writes `agent/manifest.yaml`).
28
+ - `scry-parse>=1.0.2` as a runtime dependency.
29
+ - 62+ tests covering fetch, init, version, MCP server, and package manager flows. All tests mock the network; one integration test (real clone, opt-in via `pytest -m integration`) is included.
30
+
31
+ ### Removed
32
+
33
+ - Bundled template tree under `src/acp/templates/` (73 markdown files). Templates now come from `git clone` at runtime.
34
+ - `uv tool upgrade acp-mcp` wrapper in `acp version update`. Users should run `uv tool upgrade acp-mcp` directly.
35
+ - PyPI version-check logic from `acp version check`. Project ACP version is now the thing being checked.
36
+
37
+ ### Requirements
38
+
39
+ - `git` must be installed and on PATH for `acp init` and `acp version update`.
40
+
41
+ ## [0.2.0] - 2026-05-14
42
+
43
+ ### Added
44
+
45
+ - `acp init .` — bootstrap a new ACP project in any directory.
46
+ - Copies 64+ bundled template files (commands, design templates, patterns, schemas, AGENT.md) into the target directory.
47
+ - Generates `agent/progress.yaml` with project metadata (name, version, started date).
48
+ - `--force` flag to overwrite an existing `agent/` directory.
49
+ - Rich colored output with next-step suggestions.
50
+ - Bundled ACP template library under `src/acp/templates/` (72 files total):
51
+ - 48+ command files from `agent/commands/`
52
+ - Design, pattern, milestone, task, spec, artifact, clarification templates
53
+ - Schema files (`package.schema.yaml`, `progress.schema.yaml`, etc.)
54
+ - `AGENT.md` methodology documentation
55
+ - Templates are accessible at runtime via `importlib.resources.files("acp.templates")`.
56
+
57
+ ## [0.1.0] - 2026-05-14
58
+
59
+ ### Added
60
+
61
+ - Project bootstrap.
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-context-mcp
3
+ Version: 0.3.0
4
+ Summary: Python package manager and MCP server for Agent Context Protocol (ACP) projects.
5
+ Project-URL: Homepage, https://github.com/prmichaelsen/acp-mcp
6
+ Project-URL: Repository, https://github.com/prmichaelsen/acp-mcp
7
+ Author-email: Patrick Michaelsen <michaelsenpatrick@gmail.com>
8
+ License-Expression: MIT
9
+ Requires-Python: >=3.11
10
+ Requires-Dist: fastmcp>=0.2.0
11
+ Requires-Dist: httpx>=0.27.0
12
+ Requires-Dist: pyyaml>=6.0.0
13
+ Requires-Dist: rich>=13.0.0
14
+ Requires-Dist: scry-parse>=1.0.2
15
+ Requires-Dist: typer>=0.12.0
16
+ Description-Content-Type: text/markdown
17
+
18
+ # acp-mcp
19
+
20
+ Python package manager and MCP server for [Agent Context Protocol (ACP)](https://github.com/prmichaelsen/agent-context-protocol) projects.
21
+
22
+ ## What this provides
23
+
24
+ **Substrate operations** for ACP projects, available as both CLI commands and MCP tools:
25
+
26
+ - **Project bootstrap**: `acp init` — scaffold a new ACP project from agent-context-protocol's latest templates
27
+ - **Version management**: check and refresh a project's ACP methodology version against agent-context-protocol mainline
28
+ - **Package management**: list, install, update, remove ACP packages from git repositories
29
+ - **Discovery**: enumerate available commands, patterns, designs, and specs across global (`~/.acp/agent/`) and project (`./agent/`) contexts
30
+
31
+ ## What this does NOT provide
32
+
33
+ Workflow commands like `@acp.proceed`, `@acp.status`, `@acp.task-create`, etc. remain as **markdown directives** in `agent/commands/`. Agents read those files directly — they are intentionally not exposed as CLI or MCP tools. acp-mcp is the substrate; the workflow is the markdown.
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ uv tool install agent-context-mcp
39
+ ```
40
+
41
+ This registers:
42
+ - CLI command: `acp`
43
+ - MCP server: `agent-context-mcp` (auto-discovered by Claude Code and compatible MCP clients)
44
+
45
+ **Requirements**: `git` must be installed and on PATH (required by `acp init` and `acp version update`).
46
+
47
+ ## Usage
48
+
49
+ ### CLI
50
+
51
+ ```bash
52
+ # Bootstrap a new ACP project in the current directory
53
+ # Fetches latest templates from agent-context-protocol (GitHub)
54
+ acp init .
55
+
56
+ # Show the project's ACP methodology version
57
+ acp version show
58
+
59
+ # Check if project is behind agent-context-protocol mainline
60
+ acp version check
61
+
62
+ # Refresh the project's ACP templates from agent-context-protocol mainline
63
+ # (Only updates templates; your design docs, tasks, milestones are preserved)
64
+ acp version update
65
+
66
+ # Install an ACP package
67
+ acp package install https://github.com/user/acp-firebase.git
68
+
69
+ # List installed packages
70
+ acp package list
71
+ ```
72
+
73
+ ### MCP
74
+
75
+ Once installed via `uv tool install`, the MCP server is discoverable by your agent runtime. Tools available:
76
+
77
+ - `acp_package(action, ...)` — package operations
78
+ - `acp_version(action)` — version management (show/check/update)
79
+ - `acp_enumerate(scope, kind)` — discovery with rich `@scry.entry` marker metadata
80
+
81
+ > **Note**: The PyPI package name is `agent-context-mcp` (not `acp-mcp`, which is a different unrelated package by IBM Corp). The CLI binary is still `acp`.
82
+
83
+ ## How `acp init` works
84
+
85
+ `acp init .` performs a shallow git clone of [agent-context-protocol](https://github.com/prmichaelsen/agent-context-protocol) to a temp directory, copies the relevant template files into the target project, then cleans up the clone.
86
+
87
+ **What gets copied:**
88
+
89
+ - **`AGENT.md`** — ACP methodology documentation
90
+ - **`agent/commands/`** — all workflow command files (`acp.proceed.md`, `acp.plan.md`, `acp.task-create.md`, etc.)
91
+ - **`agent/design/`** — `*.template.md` files only
92
+ - **`agent/patterns/`**, **`agent/milestones/`**, **`agent/tasks/`**, **`agent/specs/`** — `*.template.md` files only
93
+ - **`agent/schemas/`** — all schema files
94
+ - **`agent/progress.template.yaml`** — progress tracking template
95
+ - **`agent/progress.yaml`** — generated fresh with project name and start date
96
+ - **`.gitignore`** — ACP-recommended gitignore
97
+
98
+ **What is NOT copied:** bash scripts (`agent/scripts/`), reports, clarifications, feedback, drafts, project-specific files.
99
+
100
+ Templates live in agent-context-protocol's GitHub repo — not bundled with this wheel. This means template fixes and new commands flow to users via `acp version update`, not via acp-mcp releases.
101
+
102
+ ## Runtime-fetch model
103
+
104
+ acp-mcp does **not** bundle templates. Instead, `acp init` and `acp version update` clone `agent-context-protocol/mainline` at runtime. This decouples template evolution from acp-mcp release cadence — a typo fix in `acp.proceed.md` doesn't require a new acp-mcp release.
105
+
106
+ This mirrors the bash install path (`acp.install.sh` also curls from GitHub at runtime).
107
+
108
+ ## Status
109
+
110
+ See [CHANGELOG.md](./CHANGELOG.md) for shipped features and version history.
111
+
112
+ ## License
113
+
114
+ MIT
@@ -0,0 +1,97 @@
1
+ # acp-mcp
2
+
3
+ Python package manager and MCP server for [Agent Context Protocol (ACP)](https://github.com/prmichaelsen/agent-context-protocol) projects.
4
+
5
+ ## What this provides
6
+
7
+ **Substrate operations** for ACP projects, available as both CLI commands and MCP tools:
8
+
9
+ - **Project bootstrap**: `acp init` — scaffold a new ACP project from agent-context-protocol's latest templates
10
+ - **Version management**: check and refresh a project's ACP methodology version against agent-context-protocol mainline
11
+ - **Package management**: list, install, update, remove ACP packages from git repositories
12
+ - **Discovery**: enumerate available commands, patterns, designs, and specs across global (`~/.acp/agent/`) and project (`./agent/`) contexts
13
+
14
+ ## What this does NOT provide
15
+
16
+ Workflow commands like `@acp.proceed`, `@acp.status`, `@acp.task-create`, etc. remain as **markdown directives** in `agent/commands/`. Agents read those files directly — they are intentionally not exposed as CLI or MCP tools. acp-mcp is the substrate; the workflow is the markdown.
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ uv tool install agent-context-mcp
22
+ ```
23
+
24
+ This registers:
25
+ - CLI command: `acp`
26
+ - MCP server: `agent-context-mcp` (auto-discovered by Claude Code and compatible MCP clients)
27
+
28
+ **Requirements**: `git` must be installed and on PATH (required by `acp init` and `acp version update`).
29
+
30
+ ## Usage
31
+
32
+ ### CLI
33
+
34
+ ```bash
35
+ # Bootstrap a new ACP project in the current directory
36
+ # Fetches latest templates from agent-context-protocol (GitHub)
37
+ acp init .
38
+
39
+ # Show the project's ACP methodology version
40
+ acp version show
41
+
42
+ # Check if project is behind agent-context-protocol mainline
43
+ acp version check
44
+
45
+ # Refresh the project's ACP templates from agent-context-protocol mainline
46
+ # (Only updates templates; your design docs, tasks, milestones are preserved)
47
+ acp version update
48
+
49
+ # Install an ACP package
50
+ acp package install https://github.com/user/acp-firebase.git
51
+
52
+ # List installed packages
53
+ acp package list
54
+ ```
55
+
56
+ ### MCP
57
+
58
+ Once installed via `uv tool install`, the MCP server is discoverable by your agent runtime. Tools available:
59
+
60
+ - `acp_package(action, ...)` — package operations
61
+ - `acp_version(action)` — version management (show/check/update)
62
+ - `acp_enumerate(scope, kind)` — discovery with rich `@scry.entry` marker metadata
63
+
64
+ > **Note**: The PyPI package name is `agent-context-mcp` (not `acp-mcp`, which is a different unrelated package by IBM Corp). The CLI binary is still `acp`.
65
+
66
+ ## How `acp init` works
67
+
68
+ `acp init .` performs a shallow git clone of [agent-context-protocol](https://github.com/prmichaelsen/agent-context-protocol) to a temp directory, copies the relevant template files into the target project, then cleans up the clone.
69
+
70
+ **What gets copied:**
71
+
72
+ - **`AGENT.md`** — ACP methodology documentation
73
+ - **`agent/commands/`** — all workflow command files (`acp.proceed.md`, `acp.plan.md`, `acp.task-create.md`, etc.)
74
+ - **`agent/design/`** — `*.template.md` files only
75
+ - **`agent/patterns/`**, **`agent/milestones/`**, **`agent/tasks/`**, **`agent/specs/`** — `*.template.md` files only
76
+ - **`agent/schemas/`** — all schema files
77
+ - **`agent/progress.template.yaml`** — progress tracking template
78
+ - **`agent/progress.yaml`** — generated fresh with project name and start date
79
+ - **`.gitignore`** — ACP-recommended gitignore
80
+
81
+ **What is NOT copied:** bash scripts (`agent/scripts/`), reports, clarifications, feedback, drafts, project-specific files.
82
+
83
+ Templates live in agent-context-protocol's GitHub repo — not bundled with this wheel. This means template fixes and new commands flow to users via `acp version update`, not via acp-mcp releases.
84
+
85
+ ## Runtime-fetch model
86
+
87
+ acp-mcp does **not** bundle templates. Instead, `acp init` and `acp version update` clone `agent-context-protocol/mainline` at runtime. This decouples template evolution from acp-mcp release cadence — a typo fix in `acp.proceed.md` doesn't require a new acp-mcp release.
88
+
89
+ This mirrors the bash install path (`acp.install.sh` also curls from GitHub at runtime).
90
+
91
+ ## Status
92
+
93
+ See [CHANGELOG.md](./CHANGELOG.md) for shipped features and version history.
94
+
95
+ ## License
96
+
97
+ MIT
@@ -0,0 +1,334 @@
1
+ <!-- @scry.entry
2
+ id: design.migrate-from-bash-acp~e9c4f1a2
3
+ kind: design
4
+ summary: >
5
+ Architectural separation between agent-context-protocol (canonical ACP
6
+ methodology repo) and acp-mcp (Python tooling that consumes it). Eliminates
7
+ template duplication via runtime git clone, not wheel bundling. Bash version
8
+ remains as a legacy install path; acp-mcp becomes the preferred tool surface.
9
+ status: active
10
+ weight: 0.95
11
+ tags: ["scope:acp-mcp", "topic:architecture", "topic:templates", "topic:fetch"]
12
+ rationale: >
13
+ Two repos, clear separation of concerns. agent-context-protocol owns the
14
+ methodology (templates, commands, patterns, AGENT.md); acp-mcp consumes it
15
+ via runtime git clone. Templates evolve at agent-context-protocol's cadence,
16
+ decoupled from acp-mcp release cycles. Mirrors the scry-spec / scry-parse
17
+ pattern: spec in one repo, implementations consume it.
18
+ applies: implementing acp init, implementing acp version check/update, deciding where templates live, naming version commands, planning agent-context-protocol's continued role
19
+ seeded_questions:
20
+ - "Why fetch from github instead of bundling templates with the wheel?"
21
+ - "What happens to agent-context-protocol the GitHub repo?"
22
+ - "How do acp init and acp version update differ?"
23
+ - "What does the bash version do that acp-mcp doesn't?"
24
+ - "Does this break existing ACP packages (acp-firebase, etc.)?"
25
+ @scry.entry.end -->
26
+
27
+ # Architecture: acp-mcp consumes agent-context-protocol via runtime fetch
28
+
29
+ **Concept**: agent-context-protocol stays alive as the canonical source of truth for ACP methodology. acp-mcp is a preferred Python tooling layer that fetches templates from agent-context-protocol at runtime via git clone.
30
+ **Created**: 2026-05-14
31
+ **Status**: Design Specification
32
+
33
+ ---
34
+
35
+ ## Overview
36
+
37
+ `agent-context-protocol` (ACP) is a project that ships the **ACP methodology**:
38
+ - `AGENT.md` (methodology documentation)
39
+ - 48+ command markdown files (`agent/commands/acp.*.md`)
40
+ - Pattern, design, milestone, task, spec, and clarification templates
41
+ - Schemas (`package.yaml`, `progress.yaml`, etc.)
42
+ - Key file index conventions
43
+ - Bash scripts for install, version-check, and update (legacy install path)
44
+
45
+ `acp-mcp` is a Python package that provides:
46
+ - A CLI for ACP operations (`acp init`, `acp package`, `acp version`)
47
+ - An MCP server exposing substrate tools to agents (`acp_package`, `acp_version`, `acp_enumerate`)
48
+ - A core library for project detection, marker parsing (via scry-parse), and package management
49
+
50
+ **The relationship**: acp-mcp is a **preferred consumer tool**, not a fork. It fetches templates and commands from agent-context-protocol at runtime; both projects evolve independently.
51
+
52
+ ---
53
+
54
+ ## Problem Statement
55
+
56
+ The earlier draft of this design proposed bundling templates inside acp-mcp's wheel as Python package data. That approach has a critical downside: **templates can only evolve at acp-mcp's release cadence**. A typo in `acp.proceed.md` would require a new acp-mcp release, even though no Python code changed.
57
+
58
+ The bash version solves this differently: `acp.install.sh` and `acp.version-update.sh` both **curl from agent-context-protocol's github** at runtime. Templates evolve in agent-context-protocol on their own cadence; the bash scripts just orchestrate the fetch.
59
+
60
+ acp-mcp should preserve this property. Otherwise, every template fix requires a Python release.
61
+
62
+ ---
63
+
64
+ ## Solution
65
+
66
+ ### Two repos, clean separation
67
+
68
+ ```
69
+ agent-context-protocol → Source of truth for ACP methodology
70
+ (templates, commands, patterns, AGENT.md, schemas)
71
+ ├─ bash install path (legacy, still works)
72
+ └─ git/github (canonical content host)
73
+
74
+ acp-mcp → Preferred Python tooling
75
+ ├─ CLI: acp init, acp version, acp package
76
+ ├─ MCP surface: acp_package, acp_version, acp_enumerate
77
+ └─ Fetches templates from agent-context-protocol via git clone
78
+ ```
79
+
80
+ This mirrors the scry ecosystem:
81
+ - `scry-spec` (markdown contract) — source of truth
82
+ - `scry-parse-py` / `scry-parse-ts` (implementations) — consume the spec
83
+ - `scry-mcp` (server) — consumes scry-parse
84
+
85
+ Same pattern. agent-context-protocol is the spec/content; acp-mcp is one consumer.
86
+
87
+ ### Runtime template fetching via git clone
88
+
89
+ `acp init` and `acp version update` clone agent-context-protocol's `mainline` branch to a temporary directory, copy files into the target project, then clean up.
90
+
91
+ **Why git clone instead of per-file fetch or tarball**:
92
+ - Single command, well-understood semantics
93
+ - Works with private repos via SSH if ever needed
94
+ - Shallow clone (`--depth=1`) is fast (~1 second for agent-context-protocol)
95
+ - No need to know individual file paths or maintain a manifest
96
+ - Idempotent — clone, copy what's needed, clean up
97
+
98
+ **Why /tmp instead of persistent cache**:
99
+ - Simpler model: every fetch gets a fresh clone
100
+ - No staleness concerns (cache invalidation is a hard problem)
101
+ - Disk churn is negligible (one shallow clone per operation)
102
+ - A future optimization could add `~/.cache/acp-mcp/` if measurements show /tmp churn is a real cost
103
+
104
+ ### Command surface (clarified)
105
+
106
+ | Command | What it does |
107
+ |---|---|
108
+ | `acp init [PATH]` | Clone agent-context-protocol/mainline to /tmp, copy AGENT.md + agent/ templates into PATH, generate progress.yaml, clean up. |
109
+ | `acp version show` | Print the project's ACP version (read from progress.yaml or similar). |
110
+ | `acp version check` | Compare the project's ACP version against agent-context-protocol's mainline HEAD. |
111
+ | `acp version update` | Clone agent-context-protocol/mainline to /tmp, refresh template files in `agent/`, preserve user content (milestones, designs, etc.), clean up. |
112
+ | `acp --version` | Print acp-mcp tool version (typer adds this automatically). |
113
+ | `uv tool upgrade acp-mcp` | Upgrade the acp-mcp tool itself (not our command — defer to uv). |
114
+
115
+ **Key distinction**: `acp version *` operates on the **project's ACP methodology version**, not the **acp-mcp tool version**. The tool version is uv's concern; the project version is ours.
116
+
117
+ This matches bash semantics — `@acp.version-update` historically refreshed project files, not the bash scripts.
118
+
119
+ ---
120
+
121
+ ## Implementation
122
+
123
+ ### Phase 1: Build the fetch primitive
124
+
125
+ Add `src/acp/core/fetch.py`:
126
+
127
+ ```python
128
+ import subprocess
129
+ import tempfile
130
+ from pathlib import Path
131
+ from contextlib import contextmanager
132
+
133
+ ACP_REPO_URL = "https://github.com/prmichaelsen/agent-context-protocol.git"
134
+ ACP_BRANCH = "mainline"
135
+
136
+
137
+ @contextmanager
138
+ def fetch_acp_templates(branch: str = ACP_BRANCH):
139
+ """Shallow-clone agent-context-protocol to a temp dir and yield the path.
140
+ Cleans up on exit.
141
+ """
142
+ tmpdir = Path(tempfile.mkdtemp(prefix="acp-mcp-fetch-"))
143
+ try:
144
+ subprocess.run(
145
+ ["git", "clone", "--depth=1", "--branch", branch, ACP_REPO_URL, str(tmpdir)],
146
+ check=True, capture_output=True,
147
+ )
148
+ yield tmpdir
149
+ finally:
150
+ shutil.rmtree(tmpdir, ignore_errors=True)
151
+ ```
152
+
153
+ ### Phase 2: Rework `acp init`
154
+
155
+ Replace the bundle-reading logic with a fetch-and-copy:
156
+
157
+ ```python
158
+ def init(path: Path = ".", force: bool = False):
159
+ target = path.resolve()
160
+ agent_dir = target / "agent"
161
+ if agent_dir.exists() and not force:
162
+ # error
163
+ ...
164
+
165
+ with fetch_acp_templates() as src_root:
166
+ # Copy AGENT.md and agent/ from src_root into target
167
+ # Skip bash scripts (agent/scripts/), reports, clarifications, drafts
168
+ ...
169
+
170
+ # Generate fresh progress.yaml
171
+ ...
172
+ ```
173
+
174
+ ### Phase 3: Implement `acp version check` and `acp version update`
175
+
176
+ ```python
177
+ def check():
178
+ """Compare project's ACP version to agent-context-protocol/mainline HEAD."""
179
+ project_version = read_acp_version_from_project() # from progress.yaml or similar
180
+ with fetch_acp_templates() as src_root:
181
+ upstream_version = read_acp_version_from_repo(src_root) # from AGENT.md or VERSION file
182
+ # report whether project is up to date
183
+ ...
184
+
185
+
186
+ def update():
187
+ """Refresh project's ACP template files from agent-context-protocol/mainline."""
188
+ project_root = find_project_root()
189
+ with fetch_acp_templates() as src_root:
190
+ for tpl in template_files(src_root):
191
+ dest = project_root / tpl.relative_to(src_root)
192
+ shutil.copy(tpl, dest)
193
+ # Preserve user content (don't overwrite milestone/task/design instances)
194
+ ...
195
+ ```
196
+
197
+ ### Phase 4: Drop the bundled templates
198
+
199
+ Remove the bundled `src/acp/templates/` tree. The package no longer carries 73 markdown files. Wheel shrinks.
200
+
201
+ Remove the `[tool.hatch.build.targets.wheel.shared-data]` config (or simplify the comment block) so hatchling doesn't include the templates directory.
202
+
203
+ ### Phase 5: agent-context-protocol stays alive
204
+
205
+ - **bash scripts get deprecated**: `acp.install.sh`, `acp.version-update.sh`, `acp.version-check.sh` are no longer the recommended install path. They keep working for users who still want bash.
206
+ - **Templates and methodology live on**: AGENT.md, agent/commands/, agent/*.template.md, agent/schemas/ — all stay in agent-context-protocol's repo. This is the canonical content.
207
+ - **README updates**: agent-context-protocol's README points users to `uv tool install acp-mcp` as the preferred install path, with bash as the fallback.
208
+ - **Repo lives in its own release cadence**: template/command/pattern changes happen on agent-context-protocol's release schedule. acp-mcp just consumes the latest.
209
+
210
+ ---
211
+
212
+ ## Benefits
213
+
214
+ - **Templates evolve independently of tool releases** — typo fix in `acp.proceed.md` doesn't require an acp-mcp release.
215
+ - **Single source of truth** — agent-context-protocol is the canonical methodology repo. acp-mcp is one consumer (others can exist).
216
+ - **bash version stays functional** — legacy install path still works for users who want it; no forced migration.
217
+ - **Simpler model** — both `acp init` and `acp version update` do the same thing (clone, copy); only the destination's prior state differs.
218
+ - **Consistent semantics with bash** — `acp version update` refreshes project files, matching what bash users already expect.
219
+ - **Smaller wheel** — no bundled markdown payload (~500 KB saved). Minor but nice.
220
+ - **No staleness surprises** — users always get whatever's on mainline at the moment they ran the command.
221
+
222
+ ---
223
+
224
+ ## Trade-offs
225
+
226
+ ### Network required at `acp init` time
227
+
228
+ **Impact**: First-time bootstrap requires network access (git clone).
229
+
230
+ **Mitigation**: Same as bash version's `acp.install.sh` (which curls from github). Standard expectation for install operations in 2026. Airgapped environments use the bash version's offline-friendly path (template files copied manually).
231
+
232
+ ### Git dependency
233
+
234
+ **Impact**: `git` must be installed and on PATH.
235
+
236
+ **Mitigation**: Same as bash version's requirements. Virtually all dev environments have git. Document the requirement in README.
237
+
238
+ ### No reproducibility from acp-mcp version alone
239
+
240
+ **Impact**: `acp init` today and tomorrow can produce different output if agent-context-protocol's mainline moved.
241
+
242
+ **Mitigation**: This is by design — users want fresh templates. If reproducibility is needed for a specific deployment, pin via `--branch` or `--ref` (future flag) to a specific commit or tag.
243
+
244
+ ### Slower than bundled
245
+
246
+ **Impact**: Shallow clone takes ~1 second vs file-copy taking ~10ms.
247
+
248
+ **Mitigation**: `acp init` is a one-time operation per project; the latency is invisible against the user's first-run mental model. `acp version update` is periodic; same.
249
+
250
+ ---
251
+
252
+ ## Migration for already-bundled v0.2.0
253
+
254
+ The acp-worker shipped v0.2.0 with bundled templates and a fully functional `acp init` reading from `importlib.resources`. That work isn't wasted — the structure and tests carry forward — but the template source changes.
255
+
256
+ Migration tasks (to be queued to acp-worker):
257
+
258
+ 1. Add `src/acp/core/fetch.py` with the git-clone primitive.
259
+ 2. Rework `src/acp/cli/init.py` to fetch + copy instead of reading bundled resources.
260
+ 3. Remove `src/acp/templates/` directory (bundle no longer needed).
261
+ 4. Update `pyproject.toml` to drop the bundled data config.
262
+ 5. Rework `src/acp/cli/version.py`:
263
+ - `acp version show` — show project's ACP version (from progress.yaml)
264
+ - `acp version check` — compare project vs agent-context-protocol mainline
265
+ - `acp version update` — fetch and refresh project artifacts (NOT `uv tool upgrade`)
266
+ 6. Rework `src/acp/mcp/server.py`'s `acp_version` MCP tool to mirror the new CLI semantics.
267
+ 7. Update README to describe the runtime-fetch model.
268
+ 8. Add tests for the fetch primitive (mock subprocess) and the new init/version flows.
269
+ 9. Bump to v0.3.0.
270
+
271
+ ---
272
+
273
+ ## Dependencies
274
+
275
+ - `git` must be installed and on PATH (runtime requirement, not a Python dependency).
276
+ - No new Python dependencies (subprocess + tempfile + pathlib are stdlib).
277
+ - `scry-parse` is still required for `acp_enumerate` (marker extraction) — that path is unchanged.
278
+
279
+ ---
280
+
281
+ ## Testing Strategy
282
+
283
+ ### Fetch tests
284
+ - Unit test: mock subprocess.run, verify the right `git clone` command is issued
285
+ - Integration test: actually clone agent-context-protocol from github, verify expected files appear (gated behind a marker, skipped in CI by default to avoid network requirements)
286
+
287
+ ### `acp init` tests
288
+ - Verify clone happens, files are copied, progress.yaml is generated
289
+ - Verify --force overwrites
290
+ - Verify tempdir is cleaned up on success and on failure
291
+
292
+ ### `acp version update` tests
293
+ - Verify template files get updated
294
+ - Verify user content (specific milestones, designs, etc.) is preserved
295
+ - Verify dry-run mode shows diff without applying
296
+
297
+ ### Reliability tests
298
+ - Network failure during clone: clean error, no partial state
299
+ - Tempdir cleanup happens even on exception
300
+ - Git not installed: clear error message
301
+
302
+ ---
303
+
304
+ ## Key Design Decisions
305
+
306
+ | Decision | Choice | Rationale |
307
+ |---|---|---|
308
+ | Template source | agent-context-protocol github | Stays canonical; templates evolve independently |
309
+ | Fetch mechanism | `git clone --depth=1` to /tmp | Simple, fast, well-understood |
310
+ | Cache strategy | None — fresh fetch every time | Avoids cache invalidation; cheap enough |
311
+ | Bundle templates in wheel | No | Defeats the purpose of independent evolution |
312
+ | `acp version update` semantics | Project artifact refresh | Matches bash semantics; tool upgrade is uv's job |
313
+ | Tool self-upgrade command | No (defer to `uv tool upgrade acp-mcp`) | Don't reinvent uv |
314
+ | Bash version status | Deprecated but functional | Backward compat for legacy users |
315
+ | agent-context-protocol status | Active, canonical methodology repo | Same model as scry-spec / scry-parse |
316
+ | Project ACP version source | progress.yaml or VERSION file | TBD during implementation; one place to read it |
317
+
318
+ ---
319
+
320
+ ## Future Considerations
321
+
322
+ - **Cached fetches**: if `/tmp` clones become a measurable cost, add `~/.cache/acp-mcp/templates/` with TTL-based invalidation.
323
+ - **Pinning**: `--branch`, `--ref`, or `--tag` flag on `acp init` for reproducible deployments.
324
+ - **Multi-source templates**: support custom template sources beyond agent-context-protocol (e.g., for orgs with their own ACP fork).
325
+ - **Diff/preview mode**: `acp version update --dry-run` shows what would change without applying.
326
+ - **Offline mode**: detect network failure and prompt to install via bash, or use a manually-supplied template directory.
327
+
328
+ ---
329
+
330
+ **Status**: Active design specification.
331
+ **Recommendation**: Queue the migration tasks to acp-worker. Drop bundled templates. Implement fetch primitive. Rework version commands. Bump to v0.3.0.
332
+ **Related documents**:
333
+ - `acp-mcp/CHANGELOG.md` — track releases that implement each phase
334
+ - `scry-spec v1.0` — markers used in fetched templates (when `@scry.entry` markers are added to agent-context-protocol's templates)
@@ -0,0 +1,48 @@
1
+ [project]
2
+ name = "agent-context-mcp"
3
+ version = "0.3.0"
4
+ description = "Python package manager and MCP server for Agent Context Protocol (ACP) projects."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ authors = [
8
+ { name = "Patrick Michaelsen", email = "michaelsenpatrick@gmail.com" }
9
+ ]
10
+ requires-python = ">=3.11"
11
+ dependencies = [
12
+ "fastmcp>=0.2.0",
13
+ "typer>=0.12.0",
14
+ "pyyaml>=6.0.0",
15
+ "httpx>=0.27.0",
16
+ "rich>=13.0.0",
17
+ "scry-parse>=1.0.2",
18
+ ]
19
+
20
+ [project.scripts]
21
+ acp = "acp.cli.main:app"
22
+
23
+ [project.entry-points."mcp.server"]
24
+ agent-context-mcp = "acp.mcp.server:main"
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/prmichaelsen/acp-mcp"
28
+ Repository = "https://github.com/prmichaelsen/acp-mcp"
29
+
30
+ [build-system]
31
+ requires = ["hatchling"]
32
+ build-backend = "hatchling.build"
33
+
34
+ [tool.hatch.build.targets.wheel]
35
+ packages = ["src/acp"]
36
+ # No bundled templates. Templates are fetched at runtime from agent-context-protocol
37
+ # via shallow git clone. The wheel contains only Python source.
38
+
39
+ [tool.pytest.ini_options]
40
+ markers = [
41
+ "integration: marks tests that require network access and git (skipped by default)",
42
+ ]
43
+
44
+ [dependency-groups]
45
+ dev = [
46
+ "pytest>=8.0.0",
47
+ "pytest-asyncio>=0.23.0",
48
+ ]
@@ -0,0 +1,3 @@
1
+ """acp — Python package manager and MCP server for Agent Context Protocol projects."""
2
+
3
+ __version__ = "0.3.0"
@@ -0,0 +1 @@
1
+ """CLI entry points."""