feat(standards): MR-based tag strategy + repository inventory (registry://repos)
Versioning standard now documents the MR flow: bump pyproject.toml/VERSION and promote CHANGELOG in the MR (referencing the version/tag, not a commit id), merge/squash, then tag the resulting commit. Adds the agent-assisted tagging procedure (wait for the go-ahead, find the version-bump commit, tag only it, ask the user to push) to both the reference page and the releasing wiki runbook. Adds the repo inventory (src/repos.json -> mcp/repos.json), the registry://repos resource + list_repos tool, the 15_repository_inventory lib page, and two MCP prompts: compliance (remediate repos) and release (agent tagging).
This commit is contained in:
34
build.py
34
build.py
@@ -490,6 +490,39 @@ def build_release_templates(folder: Path, dry_run: bool = False) -> None:
|
||||
f"({len(manifest['components'])} components)")
|
||||
|
||||
|
||||
# ── Repository inventory bundle ───────────────────────────────────────────────
|
||||
|
||||
|
||||
def build_repos(folder: Path, dry_run: bool = False) -> None:
|
||||
"""Publish ``folder/src/repos.json`` as ``<name>/mcp/repos.json``.
|
||||
|
||||
The repository inventory (name, type, version source, Drone shape) is a
|
||||
single hand-authored JSON file, surfaced to agents through the
|
||||
``registry://repos`` resource and the ``list_repos`` tool. See standards
|
||||
"15_repository_inventory".
|
||||
|
||||
Args:
|
||||
folder (Path): The hub folder owning ``src/repos.json``.
|
||||
dry_run (bool): Print the plan without executing.
|
||||
"""
|
||||
name = folder.name
|
||||
src = folder / "src" / "repos.json"
|
||||
if not src.is_file():
|
||||
return
|
||||
out = folder / "mcp" / "repos.json"
|
||||
if dry_run:
|
||||
print(f"[REP] {name} {src.relative_to(ROOT)} -> {out.relative_to(ROOT)}")
|
||||
return
|
||||
|
||||
data = json.loads(src.read_text(encoding="utf-8"))
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
out.write_text(
|
||||
json.dumps(data, indent=2, ensure_ascii=False), encoding="utf-8"
|
||||
)
|
||||
print(f"[REP] {name} repo inventory written to {out.relative_to(ROOT)} "
|
||||
f"({len(data.get('repos', []))} repos)")
|
||||
|
||||
|
||||
# ── CLI ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -511,6 +544,7 @@ def main() -> None:
|
||||
build_templates(folder, dry_run=args.dry_run)
|
||||
build_drone_templates(folder, dry_run=args.dry_run)
|
||||
build_release_templates(folder, dry_run=args.dry_run)
|
||||
build_repos(folder, dry_run=args.dry_run)
|
||||
build_html(folder, dry_run=args.dry_run)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user