File size: 11,971 Bytes
a6a5d8e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
#!/usr/bin/env python3
"""Build the deterministic SZL ecosystem readiness report.

The report is intentionally offline by default. It converts the curated
ecosystem registry into a reviewable investor/UDS readiness packet and adds the
current claim guardrails observed during the GitHub deep dive. Live GitHub
status is useful for operators, but reproducible CI should not depend on network
calls.
"""

from __future__ import annotations

import argparse
import json
from pathlib import Path


REPO_ROOT = Path.cwd()
REGISTRY_PATH = REPO_ROOT / "docs" / "ecosystem-registry.json"
DEFAULT_OUTPUT = REPO_ROOT / "docs" / "ecosystem-readiness-report.json"
OBSERVED_AT = "2026-05-30"
LIVE_AUDIT_NOTES = {
    "a11oy": [
        "Live main has seven policy gate files under packages/policy/src/gates and ten theorem-runtime manifest entries; larger gate counts require merged PR evidence.",
        "uds-v0.3.0 release currently carries SBOM assets only, not signed binary payload assets.",
    ],
    "vessels": [
        "uds-v0.3.0 release was observed with zero release assets; use uds-v0.2.0 for signed-asset demonstration until v0.3.x assets land.",
        "GHCR manifest checks returned an authentication challenge in this environment; package availability needs owner-side push or visibility confirmation.",
    ],
    "lutar-lean": [
        "Competition-math benchmark public language must stay raw-score and reproducible; cite only what an upstream proof report verifies.",
    ],
}


ACTIVE_DEMO_REPOS = {
    "a11oy",
    "amaru",
    "sentra",
    "rosie",
    "ouroboros",
    "lutar-lean",
    "ouroboros-thesis",
    "uds-mesh",
    "vsp-otel",
    "vessels",
    "agi-forecast",
    "szl-trust",
    "szl-brand",
    "szl-cookbook",
    ".github",
    "platform",
}

EXCLUDED_UNTIL_FUNDED = {"counsel", "terra", "carlota-jo"}

FUNCTIONAL_STATUS = {
    "a11oy": "demo-ready",
    "vessels": "demo-ready",
    "amaru": "supporting",
    "sentra": "supporting",
    "rosie": "supporting",
    "ouroboros": "supporting",
    "uds-mesh": "supporting",
    "vsp-otel": "supporting",
    "agi-forecast": "supporting",
    "szl-trust": "supporting",
    "szl-brand": "supporting",
    "szl-cookbook": "supporting",
    ".github": "supporting",
    "platform": "supporting",
    "lutar-lean": "needs-upstream-fix",
    "ouroboros-thesis": "needs-upstream-fix",
    "counsel": "scaffold-excluded",
    "terra": "scaffold-excluded",
    "carlota-jo": "scaffold-excluded",
}

SHOWCASE_LABELS = {
    "a11oy": "Operational hub and UDS/Zarf-compatible payload publisher",
    "platform": "Canonical product integration monorepo and runtime evidence surface",
    "ouroboros": "Bounded-loop runtime and governance receipt spine",
    "lutar-lean": "Lean 4 proof substrate; cite exact closed modules and current CI",
    "ouroboros-thesis": "DOI-pinned thesis and public claim taxonomy",
    "rosie": "Khipu receipt DAG and CSS-ingress orchestration",
    "amaru": "Receipt minting, append-only provenance, and anchoring component",
    "sentra": "Telemetry, posture drift, and incident-command evidence component",
    "uds-mesh": "UDS/Zarf mesh pointer manifest and bundle topology",
    "vsp-otel": "OpenTelemetry exporter for Lambda-axis spans and receipt hashes",
    "szl-cookbook": "Operator recipes and governed-AI development patterns",
    "agi-forecast": "Governance trajectory forecast scenarios",
    "vessels": "Maritime vertical demo wedge with governed alert trails",
    "szl-trust": "Public trust and replay artifact ledger",
    "szl-brand": "Brand, anatomy, social previews, and visual doctrine",
    ".github": "Organization profile, reusable workflows, templates, and checks",
    "counsel": "Funded-roadmap legal vertical scaffold",
    "terra": "Funded-roadmap real-estate vertical scaffold",
    "carlota-jo": "Funded-roadmap advisory services scaffold",
}

EVIDENCE = {
    "a11oy": [
        "README.md",
        "docs/PROVENANCE.md",
        "docs/INVESTOR_DEMO.md",
        "artifacts/a11oy-uds/README.md",
        "deploy/MANIFEST.json",
        ".github/workflows/doctrine.yml",
        ".github/workflows/operational.yml",
        ".github/workflows/huggingface.yml",
        "https://github.com/szl-holdings/a11oy/releases/tag/v1.0.1",
        "https://github.com/szl-holdings/a11oy/releases/tag/uds-v0.2.0",
    ],
    "platform": [
        "https://github.com/szl-holdings/platform",
        "https://github.com/szl-holdings/platform/releases/tag/v1.0.0-codex-kernel",
    ],
    "ouroboros": [
        "https://github.com/szl-holdings/ouroboros",
        "https://github.com/szl-holdings/ouroboros/releases/tag/v6.3.0",
    ],
    "lutar-lean": [
        "https://github.com/szl-holdings/lutar-lean",
        "https://github.com/szl-holdings/lutar-lean/releases/tag/lutar-v18.0.0",
        "https://doi.org/10.5281/zenodo.20434308",
    ],
    "ouroboros-thesis": [
        "https://github.com/szl-holdings/ouroboros-thesis",
        "https://doi.org/10.5281/zenodo.20434276",
        "https://doi.org/10.5281/zenodo.19944926",
    ],
    "rosie": [
        "https://github.com/szl-holdings/rosie",
        "https://github.com/szl-holdings/rosie/releases/tag/v1.0.1",
        "https://github.com/szl-holdings/rosie/releases/tag/uds-v0.2.0",
    ],
    "amaru": [
        "https://github.com/szl-holdings/amaru",
        "https://github.com/szl-holdings/amaru/releases/tag/uds-v0.2.0",
    ],
    "sentra": [
        "https://github.com/szl-holdings/sentra",
        "https://github.com/szl-holdings/sentra/releases/tag/uds-v0.2.0",
    ],
    "uds-mesh": [
        "https://github.com/szl-holdings/uds-mesh",
        "https://github.com/szl-holdings/uds-mesh/releases/tag/uds-v0.2.0",
    ],
    "vsp-otel": [
        "https://github.com/szl-holdings/vsp-otel",
        "https://github.com/szl-holdings/vsp-otel/releases/tag/v0.1.0",
    ],
    "szl-cookbook": [
        "https://github.com/szl-holdings/szl-cookbook",
        "https://github.com/szl-holdings/szl-cookbook/releases/tag/v0.1.0",
    ],
    "agi-forecast": [
        "https://github.com/szl-holdings/agi-forecast",
        "https://github.com/szl-holdings/agi-forecast/releases/tag/v0.1.0",
    ],
    "vessels": [
        "https://github.com/szl-holdings/vessels",
        "https://github.com/szl-holdings/vessels/releases/tag/uds-v0.2.0",
    ],
    "szl-trust": [
        "https://github.com/szl-holdings/szl-trust",
    ],
    "szl-brand": [
        "https://github.com/szl-holdings/szl-brand",
        "https://github.com/szl-holdings/szl-brand/releases/tag/v0.1.0",
    ],
    ".github": [
        "https://github.com/szl-holdings/.github",
    ],
    "counsel": ["https://github.com/szl-holdings/counsel"],
    "terra": ["https://github.com/szl-holdings/terra"],
    "carlota-jo": ["https://github.com/szl-holdings/carlota-jo"],
}

CAVEATS = {
    "lutar-lean": [
        "Latest observed Lean kernel CI needs upstream repair before broad 'all green' or 'zero sorry' copy is repeated.",
        "Use exact theorem/module references for formal claims.",
    ],
    "ouroboros-thesis": [
        "Thesis v18.0 DOI is the current citation anchor; GitHub release list reconciliation remains an upstream action.",
        "Treat the thesis as the claim taxonomy, not blanket runtime proof.",
    ],
    "platform": [
        "Use as canonical integration evidence; keep production-readiness claims scoped to current CI and release artifacts.",
    ],
    "vessels": [
        "Use as the active vertical demo wedge; avoid implying every vertical scaffold is funded or production-ready.",
    ],
}


def repo_entry(repo: dict[str, object]) -> dict[str, object]:
    name = str(repo["name"])
    status = FUNCTIONAL_STATUS.get(name, "roadmap")
    active = name in ACTIVE_DEMO_REPOS and name not in EXCLUDED_UNTIL_FUNDED
    return {
        "name": name,
        "tier": repo.get("tier"),
        "readiness": repo.get("readiness"),
        "functionalDemoStatus": status,
        "activeShowcase": active,
        "showcaseLabel": SHOWCASE_LABELS.get(name, repo.get("role", "")),
        "role": repo.get("role"),
        "github": repo.get("github"),
        "defaultBranch": repo.get("defaultBranch"),
        "evidence": EVIDENCE.get(name, [repo.get("github")]),
        "guardrails": CAVEATS.get(name, []),
        "liveAuditNotes": LIVE_AUDIT_NOTES.get(name, []),
    }


def build_report() -> dict[str, object]:
    registry = json.loads(REGISTRY_PATH.read_text(encoding="utf-8"))
    repos = [repo_entry(repo) for repo in registry["repos"]]
    status_counts: dict[str, int] = {}
    for repo in repos:
        status = str(repo["functionalDemoStatus"])
        status_counts[status] = status_counts.get(status, 0) + 1

    return {
        "schemaVersion": 1,
        "generatedBy": "scripts/build_ecosystem_readiness.py",
        "observedAt": OBSERVED_AT,
        "canonicalHub": registry["canonicalHub"],
        "huggingFaceTarget": registry["huggingFaceTarget"],
        "thesis": registry["thesis"],
        "namingPolicy": {
            "activeProductNames": [
                "a11oy",
                "amaru",
                "sentra",
                "rosie",
                "ouroboros",
                "lutar-lean",
                "ouroboros-thesis",
                "uds-mesh",
                "vsp-otel",
                "vessels",
                "agi-forecast",
                "szl-trust",
                "szl-brand",
                "szl-cookbook",
                "platform",
            ],
            "excludedUntilFunded": sorted(EXCLUDED_UNTIL_FUNDED),
            "retiredOrDisallowedInShowcase": ["KORA", "LUMINA", "PARAGON", "Lyte"],
        },
        "claimGuardrails": [
            "GitHub releases, workflows, manifests, checksums, and DOI records are canonical.",
            "Hugging Face is a generated diligence mirror, not the source of release truth.",
            "Counsel, Terra, and Carlota Jo are intentionally excluded from active-demo scope until funded.",
            "Do not repeat broad all-green or zero-sorry proof claims without a current machine-readable proof report.",
            "Do not repeat inflated benchmark closure claims; keep public language raw-score and reproducible, citing only what upstream proof reports verify.",
            "Do not describe SBOM-only or empty UDS v0.3.0 releases as signed binary payload releases.",
            "Do not describe unmerged G36-G40 or broader gate totals as live A11oy main runtime gates.",
            "Use Defense Unicorns UDS/Zarf-compatible phrasing; do not imply Defense Unicorns endorsement or catalog acceptance.",
        ],
        "runtimeManifestSummary": {
            "path": "docs/theorem-runtime-manifest.json",
            "trackedEntries": 10,
            "verifiedRuntimeEntries": 8,
            "stagedOrRoadmapEntries": 2,
        },
        "statusCounts": status_counts,
        "repos": repos,
    }


def main() -> int:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--output", default=str(DEFAULT_OUTPUT))
    parser.add_argument("--check", action="store_true", help="fail if output is stale")
    args = parser.parse_args()

    output = Path(args.output)
    report = build_report()
    rendered = json.dumps(report, indent=2, sort_keys=False) + "\n"

    if args.check:
        if not output.exists():
            print(f"Missing readiness report: {output}")
            return 1
        current = output.read_text(encoding="utf-8")
        if current != rendered:
            print(f"Readiness report is stale: {output}")
            return 1
        print(f"Readiness report is current: {output.relative_to(REPO_ROOT)}")
        return 0

    output.parent.mkdir(parents=True, exist_ok=True)
    output.write_text(rendered, encoding="utf-8")
    print(f"Wrote ecosystem readiness report: {output.relative_to(REPO_ROOT)}")
    return 0


if __name__ == "__main__":
    raise SystemExit(main())