feat: versioned deploys with update subcommand + MCP server plan#7
Open
bebingando wants to merge 2 commits into
Open
feat: versioned deploys with update subcommand + MCP server plan#7bebingando wants to merge 2 commits into
bebingando wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VERSION, seeded at0.1.0), anddeploy.sh/deploy.ps1write a.agentic-context.lockat the target recording installed version, agent set, and per-file SHA-256 + ownership.updatesubcommand (./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).mcp-server/README.md— TypeScript +@modelcontextprotocol/sdk, same-repo subdirectory reading from the existingstandards/andplaybooks/trees, distributed vianpx. 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.shinupdatemode 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
template.context/standards/*,.context/playbooks/*,.windsurfrules, generated.claude/skills/*configure[CONFIGURE]sections or permissions). Written once on init; never overwritten on update.AGENTS.md,CLAUDE.md,.claude/settings.jsonBehaviour
update(no changes anywhere) — silent, reports "No template files needed updating."Updated.Preserved — locally modified template files, with guidance on how to accept upstream or keep local edits.Added.Preserved — project-owned, never touched.--overwrite/--no-overwriteare 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
pwshon this machine) — mirrors the bash logic closely and should be smoke-tested on Windows before merge../deploy.sh --agents claude <target>writes lockfile with 109 tracked files; ownership classification correct (AGENTS.md,CLAUDE.md,.claude/settings.json→configure; everything else →template)../deploy.sh --agents all <target>writes lockfile with 143 tracked files.updateon unmodified deployment reports no changes..context/standards/docker.mdlocally, runupdate→ file preserved with warning, lockfile entry unchanged.update→ pristine local copy refreshed, listed under Updated.update→ both the playbook file and its generated skill wrapper appear under Added.AGENTS.mdlocally, runupdate→ untouched, listed under Preserved configure..\deploy.ps1 -Update -TargetRepo <path>on Windows.Files
VERSION— new, seeded at0.1.0.deploy.sh— adds lockfile infra (read/write_lockfile,compute_hash,ownership_for), dispatchescopy_fileandgenerate_skillonDEPLOY_MODE, addsupdatesubcommand parsing and update-mode main flow + summary.deploy.ps1— same treatment:Set-LockEntry/Get-LockHash/Read-ExistingLockfile/Write-Lockfile,-Updateswitch,Copy-SingleFileandNew-SkillWrapperdispatch 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