flurdy/agent-skills / skills/release-manager
release-manager
VerifiedAttended release gatekeeper: consume shared readiness verdicts, offer confirmed single-service pushes (publish_commit in Pi), track CI failures and rollouts, and recommend watch cadence. Maintenance and restarts are separately owned.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 16.8 KB |
| scripts/pact-graphexecutable | script | 5.9 KB |
| scripts/release-ciexecutable | script | 27.5 KB |
| scripts/release-orderexecutable | script | 10.0 KB |
| scripts/release-stateexecutable | script | 13.1 KB |
| tests/test-skill-contract.shexecutable | script | 3.4 KB |
| tests/test_release_ci.py | script | 20.6 KB |
| tests/test_release_order.py | script | 6.0 KB |
| tests/test_release_state.py | script | 14.3 KB |
scripts/pact-graph
View on GitHub#!/usr/bin/env python3
"""Derive the service dependency graph from consumer-driven pact filenames and
detect drift against the GENERATED block in docs/release-manifest.yaml.
This is the pact-specific deploy-order provider. release-order owns the effective
rate-limiter map that keeps a consumer from going live ahead of a provider it
depends on. Contract HEALTH (staleness, sync gaps, and CI verification coverage)
is /contract-check's job; this script does not duplicate it.
Used by release-order as the pact-specific read and reconcile provider.
Pact filename convention: <consumer>-consumer-<provider>-provider.json
The ordering graph is built from synced provider pacts
(<provider>/(src/)test/resources/pacts/) so it is deterministic across machines
(target/ build output would churn the committed manifest diff).
Read-only by default. With --write it rewrites the GENERATED block in the
manifest when release-order delegates an explicit reconcile.
No third-party deps (no pyyaml): the script only ever parses the
marker-delimited GENERATED block. release-order merges the human-owned
order.manual / order.suppress sections.
Ships in agent-skills/shared (skills/release-manager/scripts/) as a provider for
release-order. RELEASE_PROJECT_ROOT pins the project when invoked by that authority;
direct invocation otherwise prefers a .mgit.conf workspace, then a release manifest,
then a Git root.
"""
import glob
import os
import re
import sys
def find_project_root():
configured = os.environ.get("RELEASE_PROJECT_ROOT")
if configured:
return os.path.abspath(configured)
current = os.path.abspath(os.getcwd())
ancestors = []
while True:
ancestors.append(current)
parent = os.path.dirname(current)
if parent == current:
break
current = parent
for marker in (
".mgit.conf",
os.path.join("docs", "release-manifest.yaml"),
".git",
):
for directory in ancestors:
if os.path.exists(os.path.join(directory, marker)):
return directory
return os.path.abspath(os.getcwd())
ROOT = find_project_root()
MANIFEST = os.path.join(ROOT, "docs", "release-manifest.yaml")
GEN_START = " # >>> GENERATED by scripts/pact-graph — do not hand-edit (release-manager rewrites)"
GEN_END = " # <<< END GENERATED"
PACT_RE = re.compile(r"([a-z0-9]+)-consumer-([a-z0-9]+)-provider\.json$")
def _scan(patterns):
edges = set()
for pat in patterns:
for path in glob.glob(pat):
m = PACT_RE.search(os.path.basename(path))
if m and m.group(1) != m.group(2):
edges.add((m.group(1), m.group(2)))
return edges
def synced_edges():
"""Pacts synced into the provider's source tree — the deterministic graph."""
return _scan([
os.path.join(ROOT, "*", "test", "resources", "pacts", "*-consumer-*-provider.json"),
os.path.join(ROOT, "*", "src", "test", "resources", "pacts", "*-consumer-*-provider.json"),
])
def graph_by_consumer(edges):
g = {}
for c, p in edges:
g.setdefault(c, set()).add(p)
return g
def render_derived(by_consumer):
lines = []
for c in sorted(by_consumer):
provs = ",".join(sorted(by_consumer[c]))
lines.append(f" {c}: [{provs}]")
return lines
def read_generated_block():
"""Parse the consumer: [providers] lines inside the GENERATED markers."""
if not os.path.isfile(MANIFEST):
return None, []
lines = open(MANIFEST, encoding="utf-8").read().splitlines()
inside = False
edges = set()
found = False
for ln in lines:
if ln.strip() == GEN_START.strip():
inside = True
found = True
continue
if ln.strip() == GEN_END.strip():
inside = False
continue
if inside:
m = re.match(r"\s*([a-z0-9]+):\s*\[([^\]]*)\]", ln)
if m:
c = m.group(1)
for p in m.group(2).split(","):
p = p.strip()
if p:
edges.add((c, p))
return (found, edges)
def write_generated_block(by_consumer):
if not os.path.isfile(MANIFEST):
sys.stderr.write("pact-graph: release manifest not found\n")
return False
text = open(MANIFEST, encoding="utf-8").read()
block = "\n".join([GEN_START] + render_derived(by_consumer) + [GEN_END])
pat = re.compile(re.escape(GEN_START) + r".*?" + re.escape(GEN_END), re.DOTALL)
if pat.search(text):
text = pat.sub(block, text)
else:
sys.stderr.write("pact-graph: GENERATED markers not found in manifest; "
"add them under order.derived first.\n")
return False
open(MANIFEST, "w", encoding="utf-8").write(text)
return True
def main():
write = "--write" in sys.argv[1:]
synced = synced_edges()
# Synced-source-only so the committed ordering graph is deterministic across
# machines (target/ build output is local and would churn the diff).
by_consumer = graph_by_consumer(synced)
if write:
ok = write_generated_block(by_consumer)
print("---WRITE---")
print("ok" if ok else "failed")
if not ok:
sys.exit(1)
return
# --- ordering graph ---
print("---GRAPH---")
for ln in render_derived(by_consumer):
print(ln.strip())
# --- drift vs manifest GENERATED block ---
print("---DRIFT---")
found, manifest_edges = read_generated_block()
if not found:
print("status: no-generated-block")
else:
new = synced - manifest_edges
removed = manifest_edges - synced
if not new and not removed:
print("status: in-sync")
else:
for c, p in sorted(new):
print(f"new: {c} -> {p}")
for c, p in sorted(removed):
print(f"removed: {c} -> {p}")
print("# contract coverage moved to /contract-check coverage")
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |