Files
boshu2__agentops/scripts/generate-documentation-index.py
Bo 7a765cde19 Align AgentOps around its operations-layer identity (#1051)
Executes docs/plans/2026-08-07-agentops-operations-layer-alignment.md:
AgentOps is the operations layer for agentic engineering; the federated
integration graph is the topology, the semantic work-and-proof protocol
is the contract, and RPI is the standard one-experiment traversal.

Retires the ao flywheel command family and all knowledge-flywheel
product state, tombstones the seven-move operating-loop workflow,
narrows ao init and the .agents state writers to declared destinations,
renames the core architecture page to rpi-traversal.md with a
compatibility redirect, aligns AGENTS.md, 25 skills, public and package
copy, regenerates every owned projection, and strengthens the
conformance gates with planted-negative proofs.

Both the alignment subject and the follow-up gate-bookkeeping commit
carry fresh author-distinct validation PASS verdicts with empty
not_checked scope.

Test-Removal-Reason: dead knowledge-flywheel and session-store surfaces were deleted with their tests (operations-layer alignment)
2026-08-07 18:37:03 -04:00

75 lines
2.6 KiB
Python
Executable File

#!/usr/bin/env python3
"""Generate the small public documentation index from live files."""
from __future__ import annotations
import argparse
from pathlib import Path
import sys
ROOT = Path(__file__).resolve().parents[1]
TARGET = ROOT / "docs" / "documentation-index.md"
# Repo-root files sit OUTSIDE the MkDocs docs_dir, so a relative ../README.md
# link 404s on the published site. Emit absolute GitHub URLs for those targets.
GITHUB_BLOB = "https://github.com/boshu2/agentops/blob/main"
def title(path: Path) -> str:
if path.suffix == ".md":
for line in path.read_text(encoding="utf-8", errors="replace").splitlines():
if line.startswith("# "):
return line[2:].strip()
return path.stem.replace("-", " ").replace("_", " ").title()
def render() -> str:
lines = [
"# Documentation index",
"",
"This index is generated from live files by `scripts/generate-documentation-index.py`.",
"Dated plans, audits, releases, and archive material are historical evidence, not current authority.",
"",
"## Product and workflow",
"",
f"- [README]({GITHUB_BLOB}/README.md)",
f"- [Product boundary]({GITHUB_BLOB}/PRODUCT.md)",
f"- [Fitness goals]({GITHUB_BLOB}/GOALS.md)",
f"- [Program boundary]({GITHUB_BLOB}/PROGRAM.md)",
"- [RPI traversal](architecture/rpi-traversal.md)",
"- [Gas City reliability boundary](operations/gas-city-reliability.md)",
"- [Agent workflow](agent-workflow-reference.md)",
"- [Repository CI and delivery](CI-CD.md)",
"- [Component map](architecture/component-map.md)",
"- [Ports and adapters](architecture/ports-and-adapters.md)",
"- [Skill router](SKILL-ROUTER.md)",
"- [Skill graph](reference/agentops-skill-graph.md)",
"",
"## Contracts",
"",
]
for path in sorted((ROOT / "docs" / "contracts").iterdir()):
if path.is_file() and not path.name.startswith("."):
lines.append(f"- [{title(path)}](contracts/{path.name})")
lines.append("")
return "\n".join(lines)
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--check", action="store_true")
args = parser.parse_args()
expected = render()
if args.check:
if not TARGET.exists() or TARGET.read_text(encoding="utf-8") != expected:
print("documentation index drift", file=sys.stderr)
return 1
return 0
TARGET.write_text(expected, encoding="utf-8")
return 0
if __name__ == "__main__":
raise SystemExit(main())