mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-18 03:46:43 +00:00
Make the CC2 board schema executable for G001
The canonical Stream 0 board must be machine-checkable before Ultragoal can checkpoint G001, so the generated board and validation wrapper now share the same rich board schema and Markdown renderer. Constraint: G001 requires .omx/cc2/board.json and .omx/cc2/board.md to prove all frozen ROADMAP.md headings and ordered actions are mapped. Rejected: Relying on worker-reported validation alone | leader-side validation found schema drift between the status-only and lifecycle_status board entrypoints. Confidence: high Scope-risk: narrow Directive: Keep scripts/generate_cc2_board.py, scripts/validate_cc2_board.py, scripts/cc2_board.py, and .omx/cc2/render_board_md.py aligned on board schema changes. Tested: python3 scripts/generate_cc2_board.py; python3 scripts/validate_cc2_board.py; python3 scripts/cc2_board.py validate; python3 .omx/cc2/validate_issue_parity_intake.py; python3 .omx/cc2/render_board_md.py .omx/cc2/board.json .omx/cc2/board.md --check; python3 -m py_compile scripts/generate_cc2_board.py scripts/validate_cc2_board.py scripts/cc2_board.py .omx/cc2/validate_issue_parity_intake.py .omx/cc2/render_board_md.py; cargo check --manifest-path rust/Cargo.toml --workspace. Not-tested: Full cargo test workspace has unrelated existing failures reported by workers in session lifecycle/permission-mode tests. Co-authored-by: OmX <omx@oh-my-codex.dev>
This commit is contained in:
@@ -6,6 +6,8 @@ import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
@@ -503,10 +505,18 @@ def main() -> int:
|
||||
out_dir = args.out_dir or (repo_root / ".omx" / "cc2")
|
||||
out_dir.mkdir(parents=True, exist_ok=True)
|
||||
board = build_board(repo_root)
|
||||
(out_dir / "board.json").write_text(json.dumps(board, indent=2, sort_keys=True) + "\n", encoding="utf-8")
|
||||
(out_dir / "board.md").write_text(render_markdown(board) + "\n", encoding="utf-8")
|
||||
print(f"wrote {out_dir / 'board.json'}")
|
||||
print(f"wrote {out_dir / 'board.md'}")
|
||||
board_json = out_dir / "board.json"
|
||||
board_md = out_dir / "board.md"
|
||||
board_json.write_text(json.dumps(board, indent=2, sort_keys=True) + "\n", encoding="utf-8")
|
||||
|
||||
renderer = repo_root / ".omx" / "cc2" / "render_board_md.py"
|
||||
if renderer.exists():
|
||||
subprocess.run([sys.executable, str(renderer), str(board_json), str(board_md)], check=True, cwd=str(repo_root))
|
||||
else:
|
||||
board_md.write_text(render_markdown(board) + "\n", encoding="utf-8")
|
||||
|
||||
print(f"wrote {board_json}")
|
||||
print(f"wrote {board_md}")
|
||||
print(f"roadmap headings mapped: {board['coverage']['roadmap_headings_mapped']}/{board['coverage']['roadmap_headings_total']}")
|
||||
print(f"roadmap actions mapped: {board['coverage']['roadmap_actions_mapped']}/{board['coverage']['roadmap_actions_total']}")
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user