Close the clawability backlog with deterministic CLI output and lane lineage

Finish the remaining roadmap work by making direct CLI JSON output deterministic across the non-interactive surface, restoring the degraded-startup MCP test as a real workspace test, and adding branch-lock plus commit-lineage primitives so downstream lane consumers can distinguish superseded worktree commits from canonical lineage.

Constraint: Keep the user-facing config namespace centered on .claw while preserving legacy fallback discovery for compatibility
Constraint: Verification needed to stay clean-room and reproducible from the checked-in workspace alone
Rejected: Leave the output-format contract implied by ad-hoc smoke runs only | too easy for direct CLI regressions to slip back into prose-only output
Rejected: Keep commit provenance as free-form detail text | downstream consumers need structured branch/worktree/supersession metadata
Confidence: medium
Scope-risk: moderate
Directive: Extend the JSON contract through the same direct CLI entrypoints instead of adding one-off serializers on parallel code paths
Tested: python .github/scripts/check_doc_source_of_truth.py
Tested: cd rust && cargo fmt --all --check
Tested: cd rust && cargo test --workspace
Tested: cd rust && cargo clippy -p commands -p tools -p rusty-claude-cli --all-targets --no-deps -- -D warnings
Not-tested: full cargo clippy --workspace --all-targets -- -D warnings still reports unrelated pre-existing runtime lint debt outside this change set
This commit is contained in:
Yeachan-Heo
2026-04-05 18:40:33 +00:00
parent 93e979261e
commit 163cf00650
14 changed files with 954 additions and 138 deletions

45
.github/scripts/check_doc_source_of_truth.py vendored Executable file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/env python3
from __future__ import annotations
from pathlib import Path
import re
import sys
ROOT = Path(__file__).resolve().parents[2]
FILES = [
ROOT / 'README.md',
ROOT / 'USAGE.md',
ROOT / 'PARITY.md',
ROOT / 'PHILOSOPHY.md',
ROOT / 'ROADMAP.md',
ROOT / '.github' / 'FUNDING.yml',
]
FILES.extend(sorted((ROOT / 'docs').rglob('*.md')) if (ROOT / 'docs').exists() else [])
FORBIDDEN = {
r'github\.com/Yeachan-Heo/claw-code(?!-parity)': 'replace old claw-code GitHub links with ultraworkers/claw-code',
r'github\.com/code-yeongyu/claw-code': 'replace stale alternate claw-code GitHub links with ultraworkers/claw-code',
r'discord\.gg/6ztZB9jvWq': 'replace the stale UltraWorkers Discord invite with the current invite',
r'api\.star-history\.com/svg\?repos=Yeachan-Heo/claw-code': 'update star-history embeds to ultraworkers/claw-code',
r'star-history\.com/#Yeachan-Heo/claw-code': 'update star-history links to ultraworkers/claw-code',
r'assets/clawd-hero\.jpeg': 'rename stale hero asset references to assets/claw-hero.jpeg',
r'assets/instructkr\.png': 'remove stale instructkr image references',
}
errors: list[str] = []
for path in FILES:
if not path.exists():
continue
text = path.read_text(encoding='utf-8')
for pattern, message in FORBIDDEN.items():
for match in re.finditer(pattern, text):
line = text.count('\n', 0, match.start()) + 1
errors.append(f'{path.relative_to(ROOT)}:{line}: {message}')
if errors:
print('doc source-of-truth check failed:', file=sys.stderr)
for error in errors:
print(f' - {error}', file=sys.stderr)
sys.exit(1)
print('doc source-of-truth check passed')

View File

@@ -8,12 +8,28 @@ on:
- 'omx-issue-*'
paths:
- .github/workflows/rust-ci.yml
- .github/scripts/check_doc_source_of_truth.py
- .github/FUNDING.yml
- README.md
- USAGE.md
- PARITY.md
- PHILOSOPHY.md
- ROADMAP.md
- docs/**
- rust/**
pull_request:
branches:
- main
paths:
- .github/workflows/rust-ci.yml
- .github/scripts/check_doc_source_of_truth.py
- .github/FUNDING.yml
- README.md
- USAGE.md
- PARITY.md
- PHILOSOPHY.md
- ROADMAP.md
- docs/**
- rust/**
workflow_dispatch:
@@ -29,6 +45,20 @@ env:
CARGO_TERM_COLOR: always
jobs:
doc-source-of-truth:
name: docs source-of-truth
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Check docs and metadata for stale branding
run: python .github/scripts/check_doc_source_of_truth.py
fmt:
name: cargo fmt
runs-on: ubuntu-latest