Skip to content

feat: versioned deploys with update subcommand + MCP server plan#7

Open
bebingando wants to merge 2 commits into
ldastey-dev:mainfrom
bebingando:feat/versioned-deploy-mcp-plan
Open

feat: versioned deploys with update subcommand + MCP server plan#7
bebingando wants to merge 2 commits into
ldastey-dev:mainfrom
bebingando:feat/versioned-deploy-mcp-plan

Conversation

@bebingando

Copy link
Copy Markdown

Summary

  • Introduces a versioned deploy model: every release carries a semver (see root VERSION, seeded at 0.1.0), and deploy.sh / deploy.ps1 write a .agentic-context.lock at the target recording installed version, agent set, and per-file SHA-256 + ownership.
  • Adds an update subcommand (./deploy.sh update <target> / .\deploy.ps1 -Update) that refreshes template files whose local hash still matches the lockfile, while preserving locally-edited files and never touching project-owned files (AGENTS.md, CLAUDE.md, .claude/settings.json).
  • Documents the roadmap for an optional MCP server in mcp-server/README.md — TypeScript + @modelcontextprotocol/sdk, same-repo subdirectory reading from the existing standards/ and playbooks/ trees, distributed via npx. Additive, not a replacement; copy-deploy remains the universal fallback.

Motivation

The current copy-deploy is a defensible shadcn-style model, but the recent overwrite-guard commit was the first symptom of its ceiling: once files are copied, there is no way to distinguish a pristine template from a user-customised one, and no way to propagate upstream improvements without clobbering. This PR adds that distinction as the smallest-possible primitive — a lockfile + an ownership classification — so re-running deploy.sh in update mode becomes a safe merge rather than a conflict-prone re-init.

MCP is the natural next step for "library of context many agents read", but it's not universally supported across agents yet. The plan is sequenced deliberately: versioning + update now (no runtime dependency, works with every agent), MCP server later (opt-in, additive, same content). The mcp-server/ README captures the architecture so a contributor can execute that phase without re-deriving the design.

Ownership model

Ownership Meaning Examples
template The upstream repo owns the content. Auto-refreshed on update if the target copy is pristine. .context/standards/*, .context/playbooks/*, .windsurfrules, generated .claude/skills/*
configure The target repo owns the content (project-specific [CONFIGURE] sections or permissions). Written once on init; never overwritten on update. AGENTS.md, CLAUDE.md, .claude/settings.json

Behaviour

  • Clean update (no changes anywhere) — silent, reports "No template files needed updating."
  • Upstream changed, local pristine — refreshed silently, listed under Updated.
  • User edited a template file — skipped, listed under Preserved — locally modified template files, with guidance on how to accept upstream or keep local edits.
  • New file added upstream — copied in, listed under Added.
  • Configure file — always reported under Preserved — project-owned, never touched.
  • --overwrite / --no-overwrite are rejected in update mode (they don't apply).

Test plan

Tested end-to-end locally against throwaway target directories. PowerShell parity implemented but not runtime-verified (no pwsh on this machine) — mirrors the bash logic closely and should be smoke-tested on Windows before merge.

  • Fresh ./deploy.sh --agents claude <target> writes lockfile with 109 tracked files; ownership classification correct (AGENTS.md, CLAUDE.md, .claude/settings.jsonconfigure; everything else → template).
  • ./deploy.sh --agents all <target> writes lockfile with 143 tracked files.
  • Subsequent update on unmodified deployment reports no changes.
  • Edit .context/standards/docker.md locally, run update → file preserved with warning, lockfile entry unchanged.
  • Edit a source standard in the agentic-context repo, run update → pristine local copy refreshed, listed under Updated.
  • Add a new playbook to the source, run update → both the playbook file and its generated skill wrapper appear under Added.
  • Edit AGENTS.md locally, run update → untouched, listed under Preserved configure.
  • PowerShell: verify .\deploy.ps1 -Update -TargetRepo <path> on Windows.

Files

  • VERSION — new, seeded at 0.1.0.
  • deploy.sh — adds lockfile infra (read/write_lockfile, compute_hash, ownership_for), dispatches copy_file and generate_skill on DEPLOY_MODE, adds update subcommand parsing and update-mode main flow + summary.
  • deploy.ps1 — same treatment: Set-LockEntry / Get-LockHash / Read-ExistingLockfile / Write-Lockfile, -Update switch, Copy-SingleFile and New-SkillWrapper dispatch on $script:DeployMode.
  • README.md — adds Versioning & Updates section covering the ownership model, the lockfile, and the workflow.
  • mcp-server/README.md — new; captures the design for the "later" phase.

No changes to standards, playbooks, conventions, AGENTS.md, or the agent redirect stubs.

🤖 Generated with Claude Code

Steve Black and others added 2 commits April 23, 2026 08:51
Introduces a semver-tracked deployment model so consumers can refresh the
agentic-context library in place without clobbering local edits. Classifies
every deployed file as either template-owned (safe to auto-update when the
local copy is pristine) or configure-owned (AGENTS.md, CLAUDE.md,
.claude/settings.json — written once, never overwritten). Both deploy.sh
and deploy.ps1 now write and read a .agentic-context.lock at the target
root that records installed version, agent set, and per-file hashes.

The new `update` subcommand (deploy.sh update / deploy.ps1 -Update) reads
the lockfile, refreshes template files whose local hash still matches the
last install, and preserves locally-edited files with a manual-merge
report. Clean updates are now quiet — only real changes are announced.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds a Versioning & Updates section to the README covering the ownership
model, the lockfile, and the update workflow. Creates mcp-server/README.md
laying out the planned MCP server architecture — same repo, TypeScript
with @modelcontextprotocol/sdk, resource-based URI scheme reading directly
from the existing standards/playbooks directories, distributed via npx.
The server is framed as an additive future path alongside the copy-deploy,
not a replacement; consumers adopt incrementally as their agents mature
MCP support.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant