Add human-review script for 13 high-blast-radius repos, bulk-push helper, and SSH-based Gitea inventory probe. Update exclusion list with SSH-verified absent slugs; marki-docx now classified and registered.
194 lines
8.4 KiB
Python
194 lines
8.4 KiB
Python
#!/usr/bin/env python3
|
|
"""Apply human-reviewed classification corrections (CUST-WP-0050 follow-up)."""
|
|
from __future__ import annotations
|
|
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import yaml
|
|
|
|
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
VALIDATOR = REPO_ROOT / "tools" / "validate_repo_classification.py"
|
|
HOME = Path.home()
|
|
|
|
# Curated human-reviewed classifications for high-blast-radius portfolio anchors.
|
|
HUMAN_REVIEWS: dict[str, dict] = {
|
|
"helix-forge": {
|
|
"category": "product",
|
|
"domain": "infotech",
|
|
"secondary_domains": ["agents"],
|
|
"capability_tags": [
|
|
"platform",
|
|
"capability-registry",
|
|
"coordination",
|
|
"knowledge",
|
|
"product-development",
|
|
],
|
|
"business_stake": ["product", "technology", "execution", "automation", "intelligence"],
|
|
"business_mechanics": ["intention", "coordination", "operation", "adaptation"],
|
|
"notes": "Capability development platform; standard §13.1 — human confirmed.",
|
|
},
|
|
"reuse-surface": {
|
|
"category": "product",
|
|
"domain": "infotech",
|
|
"secondary_domains": ["agents"],
|
|
"capability_tags": ["capability-registry", "discovery", "reuse", "maturity", "evidence"],
|
|
"business_stake": ["technology", "product", "intelligence", "automation"],
|
|
"business_mechanics": ["intention", "control", "adaptation"],
|
|
"notes": "Reuse discovery surface; standard §13.7 — human confirmed.",
|
|
},
|
|
"coordination-engine": {
|
|
"category": "product",
|
|
"domain": "communication",
|
|
"secondary_domains": ["infotech", "agents"],
|
|
"capability_tags": ["coordination", "workflow", "orchestration", "evidence", "platform"],
|
|
"business_stake": ["product", "technology", "operations", "automation"],
|
|
"business_mechanics": ["coordination", "operation", "adaptation"],
|
|
"notes": "Goal-driven coordination framework; human confirmed.",
|
|
},
|
|
"markitect-main": {
|
|
"category": "product",
|
|
"domain": "communication",
|
|
"secondary_domains": ["infotech", "agents"],
|
|
"capability_tags": ["knowledge", "documentation", "product-development", "platform"],
|
|
"business_stake": ["product", "technology", "execution"],
|
|
"business_mechanics": ["intention", "coordination", "operation", "adaptation"],
|
|
"notes": "Markitect successor to archived markitect-project; human confirmed.",
|
|
},
|
|
"citation-evidence": {
|
|
"category": "product",
|
|
"domain": "infotech",
|
|
"secondary_domains": ["communication", "government"],
|
|
"capability_tags": ["citations", "evidence", "knowledge", "traceability", "source-management"],
|
|
"business_stake": ["intelligence", "legal", "product", "technology"],
|
|
"business_mechanics": ["control", "coordination", "adaptation"],
|
|
"notes": "Citation/evidence product; standard §13.5 — human confirmed.",
|
|
},
|
|
"adaptive-pricing": {
|
|
"category": "product",
|
|
"domain": "financials",
|
|
"secondary_domains": ["infotech", "agents"],
|
|
"capability_tags": ["pricing", "monetization", "lifecycle", "decision-support", "product-development"],
|
|
"business_stake": ["finance", "product", "sales", "intelligence", "automation"],
|
|
"business_mechanics": ["intention", "control", "adaptation"],
|
|
"notes": "Adaptive pricing product; standard §13.6 — human confirmed.",
|
|
},
|
|
"identity-canon": {
|
|
"category": "research",
|
|
"domain": "infotech",
|
|
"secondary_domains": ["government"],
|
|
"capability_tags": ["identity", "access-control", "terminology", "canon", "governance"],
|
|
"business_stake": ["technology", "legal", "operations", "intelligence"],
|
|
"business_mechanics": ["intention", "control", "adaptation"],
|
|
"notes": "Identity canon; standard §13.3 — human confirmed.",
|
|
},
|
|
"net-kingdom": {
|
|
"category": "product",
|
|
"domain": "infotech",
|
|
"secondary_domains": [],
|
|
"capability_tags": ["security", "identity", "platform", "operations", "access-control"],
|
|
"business_stake": ["technology", "operations", "legal", "automation"],
|
|
"business_mechanics": ["control", "operation", "adaptation"],
|
|
"notes": "NetKingdom security/identity platform; standard §13.4 — human confirmed.",
|
|
},
|
|
"audit-core": {
|
|
"category": "tooling",
|
|
"domain": "infotech",
|
|
"secondary_domains": [],
|
|
"capability_tags": ["audit", "traceability", "security", "governance", "operations"],
|
|
"business_stake": ["technology", "operations", "legal", "automation"],
|
|
"business_mechanics": ["control", "operation"],
|
|
"notes": "Multi-tenant audit emit capability; human confirmed.",
|
|
},
|
|
"key-cape": {
|
|
"category": "product",
|
|
"domain": "infotech",
|
|
"secondary_domains": ["communication"],
|
|
"capability_tags": ["identity", "access-control", "security", "platform", "operations"],
|
|
"business_stake": ["technology", "operations", "legal", "product"],
|
|
"business_mechanics": ["control", "operation", "adaptation"],
|
|
"notes": "NetKingdom IAM Profile lightweight mode (Authelia/LLDAP/privacyIDEA); human corrected domain from communication→infotech.",
|
|
},
|
|
"flex-auth": {
|
|
"category": "product",
|
|
"domain": "infotech",
|
|
"secondary_domains": ["government"],
|
|
"capability_tags": ["identity", "access-control", "policy", "governance", "audit"],
|
|
"business_stake": ["technology", "legal", "operations", "product"],
|
|
"business_mechanics": ["control", "coordination", "adaptation"],
|
|
"notes": "Policy-as-code authorization registry; human corrected domain from communication→infotech.",
|
|
},
|
|
"ops-hub": {
|
|
"category": "tooling",
|
|
"domain": "infotech",
|
|
"secondary_domains": [],
|
|
"capability_tags": ["operations", "platform", "observability", "coordination", "governance"],
|
|
"business_stake": ["operations", "technology", "automation"],
|
|
"business_mechanics": ["coordination", "operation", "control"],
|
|
"notes": "Inter-Hub operations extension (environments, incidents, runbooks); human corrected category project→tooling.",
|
|
},
|
|
"railiance-platform": {
|
|
"category": "tooling",
|
|
"domain": "financials",
|
|
"secondary_domains": ["infotech"],
|
|
"capability_tags": ["platform", "operations", "configuration", "governance"],
|
|
"business_stake": ["finance", "technology", "operations"],
|
|
"business_mechanics": ["control", "operation", "coordination"],
|
|
"notes": "Railiance platform substrate; human corrected category project→tooling.",
|
|
},
|
|
}
|
|
|
|
|
|
def build_block(slug: str, data: dict) -> dict:
|
|
notes = data.pop("notes", None)
|
|
block = {
|
|
"repo_classification": {
|
|
"standard": "Repo Classification Standard",
|
|
"version": "1.0",
|
|
"classified_at": "2026-06-22",
|
|
"classified_by": "human",
|
|
**data,
|
|
}
|
|
}
|
|
if notes:
|
|
block["repo_classification"]["notes"] = notes
|
|
return block
|
|
|
|
|
|
def main() -> int:
|
|
updated: list[str] = []
|
|
for slug, data in HUMAN_REVIEWS.items():
|
|
repo_path = HOME / slug
|
|
target = repo_path / ".repo-classification.yaml"
|
|
if not repo_path.is_dir():
|
|
print(f"skip {slug}: no checkout", file=sys.stderr)
|
|
continue
|
|
payload = build_block(slug, dict(data))
|
|
target.write_text(yaml.dump(payload, sort_keys=False, allow_unicode=True))
|
|
proc = subprocess.run([sys.executable, str(VALIDATOR), str(target)], capture_output=True, text=True)
|
|
if proc.returncode != 0:
|
|
print(proc.stdout, proc.stderr, file=sys.stderr)
|
|
return 1
|
|
subprocess.run(["git", "add", ".repo-classification.yaml"], cwd=repo_path, check=True)
|
|
diff = subprocess.run(["git", "diff", "--cached", "--quiet"], cwd=repo_path)
|
|
if diff.returncode != 0:
|
|
subprocess.run(
|
|
[
|
|
"git",
|
|
"commit",
|
|
"-m",
|
|
"Human-review .repo-classification.yaml (CUST-WP-0050 follow-up)",
|
|
],
|
|
cwd=repo_path,
|
|
check=True,
|
|
)
|
|
updated.append(slug)
|
|
print(f"Human-reviewed: {len(updated)}")
|
|
for slug in updated:
|
|
print(f" ✓ {slug}")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main()) |