From 11c3941440b1e61bcc65ab985314b01f5222ca01 Mon Sep 17 00:00:00 2001 From: yaojingang Date: Tue, 16 Jun 2026 06:25:29 +0800 Subject: [PATCH] Extract submission kit renderers --- registry/index.json | 2 +- registry/packages/yao-meta-skill.json | 6 +- reports/architecture_maintainability.json | 29 +- reports/architecture_maintainability.md | 11 +- reports/context_budget.json | 20 +- reports/context_budget.md | 2 +- reports/context_budget_summary.json | 10 +- reports/install_simulation.json | 2 +- reports/output_execution_runs.json | 20 +- reports/output_execution_runs.md | 20 +- reports/package_verification.json | 4 +- reports/package_verification.md | 2 +- reports/python_compatibility.json | 8 +- reports/python_compatibility.md | 2 +- reports/registry_audit.json | 8 +- reports/registry_audit.md | 4 +- reports/security_trust_report.json | 30 +- reports/security_trust_report.md | 11 +- reports/skill-os-2-review.md | 9 +- reports/skill_atlas.json | 1 + reports/skill_os2_audit.json | 4 +- reports/skill_os2_audit.md | 4 +- reports/skill_os2_coverage.json | 4 +- reports/skill_os2_coverage.md | 4 +- reports/upgrade_check.json | 4 +- scripts/prepare_world_class_submission_kit.py | 381 +---------------- .../world_class_submission_kit_rendering.py | 390 ++++++++++++++++++ skill_atlas/catalog.json | 1 + 28 files changed, 512 insertions(+), 481 deletions(-) create mode 100644 scripts/world_class_submission_kit_rendering.py diff --git a/registry/index.json b/registry/index.json index 096a10b..ff40998 100644 --- a/registry/index.json +++ b/registry/index.json @@ -16,7 +16,7 @@ "vscode" ], "package_metadata": "registry/packages/yao-meta-skill.json", - "package_sha256": "c6d6f2a9b0e22b9ecdf1d8ff74a9d18b16d34729b063c813dc5e16e8328e66f9" + "package_sha256": "00efa72ae52906f680980aa05c3e4205d9556654e7a14c5fcc1bdc8eb2a81313" } ] } diff --git a/registry/packages/yao-meta-skill.json b/registry/packages/yao-meta-skill.json index 9fb1aa0..9052768 100644 --- a/registry/packages/yao-meta-skill.json +++ b/registry/packages/yao-meta-skill.json @@ -16,8 +16,8 @@ "trust_level": "local", "license": "MIT", "checksums": { - "package_sha256": "c6d6f2a9b0e22b9ecdf1d8ff74a9d18b16d34729b063c813dc5e16e8328e66f9", - "archive_sha256": "f8ad7d6f98bd00553984225a54ce6809611e868fb6653605dec71774a4b5c730" + "package_sha256": "00efa72ae52906f680980aa05c3e4205d9556654e7a14c5fcc1bdc8eb2a81313", + "archive_sha256": "d26f3390edd0335f75fe05f77fd65d40541728fdb1d0779419cd9dce077a4034" }, "compatibility": { "openai": "pass", @@ -48,7 +48,7 @@ }, "distribution": { "archive_verified": true, - "archive_sha256": "f8ad7d6f98bd00553984225a54ce6809611e868fb6653605dec71774a4b5c730", + "archive_sha256": "d26f3390edd0335f75fe05f77fd65d40541728fdb1d0779419cd9dce077a4034", "package_verification": "reports/package_verification.json", "install_simulated": true, "install_simulation": "reports/install_simulation.json" diff --git a/reports/architecture_maintainability.json b/reports/architecture_maintainability.json index e5068a1..9319413 100644 --- a/reports/architecture_maintainability.json +++ b/reports/architecture_maintainability.json @@ -4,10 +4,10 @@ "generated_at": "2026-06-16", "skill_dir": ".", "summary": { - "python_file_count": 189, - "script_file_count": 120, + "python_file_count": 190, + "script_file_count": 121, "test_file_count": 69, - "internal_module_count": 37, + "internal_module_count": 38, "cli_script_count": 85, "command_handler_count": 68, "entrypoint_command_handler_count": 18, @@ -16,7 +16,7 @@ "watch_line_threshold": 720, "block_line_threshold": 1500, "largest_file_lines": 899, - "watchlist_count": 11, + "watchlist_count": 10, "hotspot_count": 0, "blocker_count": 0, "decision": "pass" @@ -71,13 +71,6 @@ "severity": "pass", "recommendation": "Break broad integration assertions into focused verifier helpers when the next behavior change lands." }, - { - "path": "scripts/prepare_world_class_submission_kit.py", - "lines": 783, - "kind": "cli-script", - "severity": "pass", - "recommendation": "Watch this file before adding new responsibilities; extract a helper module when one concern dominates." - }, { "path": "scripts/build_skill_atlas.py", "lines": 730, @@ -105,6 +98,13 @@ "kind": "internal-module", "severity": "pass", "recommendation": "Watch this file before adding new responsibilities; extract a helper module when one concern dominates." + }, + { + "path": "scripts/apply_adaptation.py", + "lines": 706, + "kind": "cli-script", + "severity": "pass", + "recommendation": "Watch this file before adding new responsibilities; extract a helper module when one concern dominates." } ], "watchlist": [ @@ -157,13 +157,6 @@ "severity": "pass", "recommendation": "Break broad integration assertions into focused verifier helpers when the next behavior change lands." }, - { - "path": "scripts/prepare_world_class_submission_kit.py", - "lines": 783, - "kind": "cli-script", - "severity": "pass", - "recommendation": "Watch this file before adding new responsibilities; extract a helper module when one concern dominates." - }, { "path": "scripts/build_skill_atlas.py", "lines": 730, diff --git a/reports/architecture_maintainability.md b/reports/architecture_maintainability.md index ae19ca3..f619cf8 100644 --- a/reports/architecture_maintainability.md +++ b/reports/architecture_maintainability.md @@ -5,17 +5,17 @@ Generated at: `2026-06-16` ## Summary - decision: `pass` -- python files: `189` -- scripts: `120` +- python files: `190` +- scripts: `121` - tests: `69` -- internal modules: `37` +- internal modules: `38` - CLI scripts: `85` - Yao CLI command handlers: `68` - entrypoint command handlers: `18` - command modules: `6` - largest file lines: `899` - watch threshold lines: `720` -- watchlist: `11` +- watchlist: `10` - hotspots: `0` - blockers: `0` @@ -36,7 +36,6 @@ No file-size hotspots found. | `scripts/skill_report_layout.py` | `808` | `internal-module` | Watch this file before adding new responsibilities; extract a helper module when one concern dominates. | | `scripts/skill_report_model.py` | `800` | `internal-module` | Watch this file before adding new responsibilities; extract a helper module when one concern dominates. | | `tests/verify_review_studio.py` | `784` | `test` | Break broad integration assertions into focused verifier helpers when the next behavior change lands. | -| `scripts/prepare_world_class_submission_kit.py` | `783` | `cli-script` | Watch this file before adding new responsibilities; extract a helper module when one concern dominates. | | `scripts/build_skill_atlas.py` | `730` | `cli-script` | Watch this file before adding new responsibilities; extract a helper module when one concern dominates. | | `scripts/compile_skill.py` | `723` | `cli-script` | Watch this file before adding new responsibilities; extract a helper module when one concern dominates. | | `scripts/optimize_description.py` | `723` | `cli-script` | Watch this file before adding new responsibilities; extract a helper module when one concern dominates. | @@ -52,11 +51,11 @@ No file-size hotspots found. | `scripts/skill_report_layout.py` | `808` | `internal-module` | `pass` | | `scripts/skill_report_model.py` | `800` | `internal-module` | `pass` | | `tests/verify_review_studio.py` | `784` | `test` | `pass` | -| `scripts/prepare_world_class_submission_kit.py` | `783` | `cli-script` | `pass` | | `scripts/build_skill_atlas.py` | `730` | `cli-script` | `pass` | | `scripts/compile_skill.py` | `723` | `cli-script` | `pass` | | `scripts/optimize_description.py` | `723` | `cli-script` | `pass` | | `scripts/trust_check.py` | `714` | `internal-module` | `pass` | +| `scripts/apply_adaptation.py` | `706` | `cli-script` | `pass` | ## Release Rule diff --git a/reports/context_budget.json b/reports/context_budget.json index c4caa0b..f02efc8 100644 --- a/reports/context_budget.json +++ b/reports/context_budget.json @@ -6,16 +6,16 @@ "context_budget_tier": "production", "context_budget_limit": 1000, "skill_body_tokens": 797, - "other_text_tokens": 1034004, + "other_text_tokens": 1034215, "estimated_initial_load_tokens": 990, - "estimated_total_text_tokens": 1034801, - "deferred_resource_tokens": 477478, + "estimated_total_text_tokens": 1035012, + "deferred_resource_tokens": 477560, "deferred_resource_warn_threshold": 120000, "deferred_resource_dirs": [ { "path": "scripts", - "estimated_tokens": 427698, - "file_count": 120 + "estimated_tokens": 427780, + "file_count": 121 }, { "path": "references", @@ -31,8 +31,8 @@ "large_deferred_resource_dirs": [ { "path": "scripts", - "estimated_tokens": 427698, - "file_count": 120 + "estimated_tokens": 427780, + "file_count": 121 } ], "deferred_resource_governance": { @@ -54,14 +54,14 @@ ], "missing": [], "path": "scripts", - "estimated_tokens": 427698, - "file_count": 120, + "estimated_tokens": 427780, + "file_count": 121, "rationale": "Script resources are deterministic deferred tools, not initial-load prompt context." } ], "summary": "Large deferred resources are indexed and backed by evidence." }, - "relevant_file_count": 623, + "relevant_file_count": 625, "unused_resource_dirs": [], "quality_signal_points": 130, "quality_density": 131.3 diff --git a/reports/context_budget.md b/reports/context_budget.md index 2dcb5e3..49e38f8 100644 --- a/reports/context_budget.md +++ b/reports/context_budget.md @@ -2,7 +2,7 @@ | Target | Path | Tier | Limit | Initial | SKILL | Deferred | Resource Governance | Large Deferred Dirs | Quality Density | Unused Dirs | Status | | --- | --- | --- | ---: | ---: | ---: | ---: | --- | --- | ---: | --- | --- | -| root | `.` | `production` | 1000 | 990 | 797 | 477478 | `governed` | scripts:427698 | 131.3 | - | ok | +| root | `.` | `production` | 1000 | 990 | 797 | 477560 | `governed` | scripts:427780 | 131.3 | - | ok | | complex-release-orchestrator | `examples/complex-release-orchestrator/generated-skill` | `production` | 1000 | 790 | 718 | 1657 | `not-required` | - | 164.6 | - | ok | | governed-incident-command | `examples/governed-incident-command/generated-skill` | `production` | 1000 | 760 | 658 | 1030 | `not-required` | - | 171.1 | - | ok | diff --git a/reports/context_budget_summary.json b/reports/context_budget_summary.json index 7978aaf..1e88f7e 100644 --- a/reports/context_budget_summary.json +++ b/reports/context_budget_summary.json @@ -8,12 +8,12 @@ "budget_limit": 1000, "initial_tokens": 990, "skill_body_tokens": 797, - "deferred_resource_tokens": 477478, + "deferred_resource_tokens": 477560, "large_deferred_resource_dirs": [ { "path": "scripts", - "estimated_tokens": 427698, - "file_count": 120 + "estimated_tokens": 427780, + "file_count": 121 } ], "deferred_resource_governance": { @@ -35,8 +35,8 @@ ], "missing": [], "path": "scripts", - "estimated_tokens": 427698, - "file_count": 120, + "estimated_tokens": 427780, + "file_count": 121, "rationale": "Script resources are deterministic deferred tools, not initial-load prompt context." } ], diff --git a/reports/install_simulation.json b/reports/install_simulation.json index b608222..80b27db 100644 --- a/reports/install_simulation.json +++ b/reports/install_simulation.json @@ -8,7 +8,7 @@ "installed_skill_dir": "dist/install-simulation/simulate-yao-meta-skill/yao-meta-skill", "summary": { "archive_present": true, - "archive_entry_count": 644, + "archive_entry_count": 643, "archive_extracted": true, "entrypoint_loaded": true, "manifest_loaded": true, diff --git a/reports/output_execution_runs.json b/reports/output_execution_runs.json index b05485e..5b44f5e 100644 --- a/reports/output_execution_runs.json +++ b/reports/output_execution_runs.json @@ -34,7 +34,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 28.04, + "duration_ms": 27.12, "provider": "local-output-eval-runner", "model": "", "usage": { @@ -62,7 +62,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 28.0, + "duration_ms": 26.13, "provider": "local-output-eval-runner", "model": "", "usage": { @@ -85,7 +85,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 28.27, + "duration_ms": 25.74, "provider": "local-output-eval-runner", "model": "", "usage": { @@ -113,7 +113,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 28.05, + "duration_ms": 29.06, "provider": "local-output-eval-runner", "model": "", "usage": { @@ -136,7 +136,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 29.85, + "duration_ms": 29.38, "provider": "local-output-eval-runner", "model": "", "usage": { @@ -164,7 +164,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 30.65, + "duration_ms": 29.82, "provider": "local-output-eval-runner", "model": "", "usage": { @@ -187,7 +187,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 31.13, + "duration_ms": 26.07, "provider": "local-output-eval-runner", "model": "", "usage": { @@ -214,7 +214,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 33.72, + "duration_ms": 26.04, "provider": "local-output-eval-runner", "model": "", "usage": { @@ -237,7 +237,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 31.79, + "duration_ms": 26.08, "provider": "local-output-eval-runner", "model": "", "usage": { @@ -266,7 +266,7 @@ "execution_mode": "command", "model_executed": false, "command_executed": true, - "duration_ms": 31.11, + "duration_ms": 26.17, "provider": "local-output-eval-runner", "model": "", "usage": { diff --git a/reports/output_execution_runs.md b/reports/output_execution_runs.md index f1dfdd0..2ffa794 100644 --- a/reports/output_execution_runs.md +++ b/reports/output_execution_runs.md @@ -23,16 +23,16 @@ Command runner evidence is present. This proves the eval harness executed an ext | Case | Variant | Mode | Model | Duration ms | Tokens | Score | Status | | --- | --- | --- | --- | ---: | ---: | ---: | --- | -| skill-package-contract | baseline | command | local-output-eval-runner | 28.04 | 33 | 0.0 | pass | -| skill-package-contract | with_skill | command | local-output-eval-runner | 28.0 | 73 | 100.0 | pass | -| output-eval-expectation | baseline | command | local-output-eval-runner | 28.27 | 36 | 0.0 | pass | -| output-eval-expectation | with_skill | command | local-output-eval-runner | 28.05 | 80 | 100.0 | pass | -| ir-before-packaging | baseline | command | local-output-eval-runner | 29.85 | 33 | 0.0 | pass | -| ir-before-packaging | with_skill | command | local-output-eval-runner | 30.65 | 80 | 100.0 | pass | -| near-neighbor-boundary | baseline | command | local-output-eval-runner | 31.13 | 36 | 0.0 | pass | -| near-neighbor-boundary | with_skill | command | local-output-eval-runner | 33.72 | 65 | 100.0 | pass | -| file-backed-governed-package | baseline | command | local-output-eval-runner | 31.79 | 37 | 0.0 | pass | -| file-backed-governed-package | with_skill | command | local-output-eval-runner | 31.11 | 98 | 100.0 | pass | +| skill-package-contract | baseline | command | local-output-eval-runner | 27.12 | 33 | 0.0 | pass | +| skill-package-contract | with_skill | command | local-output-eval-runner | 26.13 | 73 | 100.0 | pass | +| output-eval-expectation | baseline | command | local-output-eval-runner | 25.74 | 36 | 0.0 | pass | +| output-eval-expectation | with_skill | command | local-output-eval-runner | 29.06 | 80 | 100.0 | pass | +| ir-before-packaging | baseline | command | local-output-eval-runner | 29.38 | 33 | 0.0 | pass | +| ir-before-packaging | with_skill | command | local-output-eval-runner | 29.82 | 80 | 100.0 | pass | +| near-neighbor-boundary | baseline | command | local-output-eval-runner | 26.07 | 36 | 0.0 | pass | +| near-neighbor-boundary | with_skill | command | local-output-eval-runner | 26.04 | 65 | 100.0 | pass | +| file-backed-governed-package | baseline | command | local-output-eval-runner | 26.08 | 37 | 0.0 | pass | +| file-backed-governed-package | with_skill | command | local-output-eval-runner | 26.17 | 98 | 100.0 | pass | ## Next Fixes diff --git a/reports/package_verification.json b/reports/package_verification.json index 10dce28..cd0cce7 100644 --- a/reports/package_verification.json +++ b/reports/package_verification.json @@ -8,8 +8,8 @@ "target_count": 4, "adapter_count": 4, "archive_present": true, - "archive_sha256": "f8ad7d6f98bd00553984225a54ce6809611e868fb6653605dec71774a4b5c730", - "archive_entry_count": 644, + "archive_sha256": "d26f3390edd0335f75fe05f77fd65d40541728fdb1d0779419cd9dce077a4034", + "archive_entry_count": 643, "failure_count": 0, "warning_count": 0 }, diff --git a/reports/package_verification.md b/reports/package_verification.md index c88072f..4c1a6ee 100644 --- a/reports/package_verification.md +++ b/reports/package_verification.md @@ -4,7 +4,7 @@ - Package directory: `dist` - Targets: `4 / 4` adapters present - Archive present: `True` -- Archive SHA256: `f8ad7d6f98bd00553984225a54ce6809611e868fb6653605dec71774a4b5c730` +- Archive SHA256: `d26f3390edd0335f75fe05f77fd65d40541728fdb1d0779419cd9dce077a4034` - Failures: `0` - Warnings: `0` diff --git a/reports/python_compatibility.json b/reports/python_compatibility.json index 238924f..da55a9c 100644 --- a/reports/python_compatibility.json +++ b/reports/python_compatibility.json @@ -5,7 +5,7 @@ "root": ".", "summary": { "target_python": "3.11", - "file_count": 192, + "file_count": 193, "issue_count": 0, "syntax_error_count": 0, "fstring_311_violation_count": 0, @@ -694,6 +694,12 @@ "issue_count": 0, "issues": [] }, + { + "path": "scripts/world_class_submission_kit_rendering.py", + "ok": true, + "issue_count": 0, + "issues": [] + }, { "path": "scripts/world_class_submission_matrix.py", "ok": true, diff --git a/reports/python_compatibility.md b/reports/python_compatibility.md index 7300aa5..dcd90a8 100644 --- a/reports/python_compatibility.md +++ b/reports/python_compatibility.md @@ -6,7 +6,7 @@ Generated at: `2026-06-16` - decision: `pass` - target python: `3.11` -- files scanned: `192` +- files scanned: `193` - issues: `0` - syntax errors: `0` - f-string 3.11 violations: `0` diff --git a/reports/registry_audit.json b/reports/registry_audit.json index adc798c..6918e9f 100644 --- a/reports/registry_audit.json +++ b/reports/registry_audit.json @@ -21,8 +21,8 @@ "trust_level": "local", "license": "MIT", "checksums": { - "package_sha256": "c6d6f2a9b0e22b9ecdf1d8ff74a9d18b16d34729b063c813dc5e16e8328e66f9", - "archive_sha256": "f8ad7d6f98bd00553984225a54ce6809611e868fb6653605dec71774a4b5c730" + "package_sha256": "00efa72ae52906f680980aa05c3e4205d9556654e7a14c5fcc1bdc8eb2a81313", + "archive_sha256": "d26f3390edd0335f75fe05f77fd65d40541728fdb1d0779419cd9dce077a4034" }, "compatibility": { "openai": "pass", @@ -53,7 +53,7 @@ }, "distribution": { "archive_verified": true, - "archive_sha256": "f8ad7d6f98bd00553984225a54ce6809611e868fb6653605dec71774a4b5c730", + "archive_sha256": "d26f3390edd0335f75fe05f77fd65d40541728fdb1d0779419cd9dce077a4034", "package_verification": "reports/package_verification.json", "install_simulated": true, "install_simulation": "reports/install_simulation.json" @@ -78,7 +78,7 @@ "vscode" ], "package_metadata": "registry/packages/yao-meta-skill.json", - "package_sha256": "c6d6f2a9b0e22b9ecdf1d8ff74a9d18b16d34729b063c813dc5e16e8328e66f9" + "package_sha256": "00efa72ae52906f680980aa05c3e4205d9556654e7a14c5fcc1bdc8eb2a81313" } ] }, diff --git a/reports/registry_audit.md b/reports/registry_audit.md index f785d38..20cea6f 100644 --- a/reports/registry_audit.md +++ b/reports/registry_audit.md @@ -6,8 +6,8 @@ - Maturity: `governed` - Owner: `Yao Team` - License: `MIT` -- Package SHA256: `c6d6f2a9b0e22b9ecdf1d8ff74a9d18b16d34729b063c813dc5e16e8328e66f9` -- Archive SHA256: `f8ad7d6f98bd00553984225a54ce6809611e868fb6653605dec71774a4b5c730` +- Package SHA256: `00efa72ae52906f680980aa05c3e4205d9556654e7a14c5fcc1bdc8eb2a81313` +- Archive SHA256: `d26f3390edd0335f75fe05f77fd65d40541728fdb1d0779419cd9dce077a4034` - Install simulated: `True` ## Compatibility diff --git a/reports/security_trust_report.json b/reports/security_trust_report.json index ba31324..c6b1de3 100644 --- a/reports/security_trust_report.json +++ b/reports/security_trust_report.json @@ -2,9 +2,9 @@ "ok": true, "skill_dir": ".", "summary": { - "scanned_files": 208, - "script_count": 120, - "internal_module_count": 34, + "scanned_files": 209, + "script_count": 121, + "internal_module_count": 35, "secret_findings": 0, "dependency_files": [ "requirements-ci.txt" @@ -22,8 +22,8 @@ "help_smoke_failed_count": 0, "interactive_script_count": 0, "package_hash_scope": "source-contract-without-generated-reports", - "package_hash_file_count": 208, - "package_sha256": "c6d6f2a9b0e22b9ecdf1d8ff74a9d18b16d34729b063c813dc5e16e8328e66f9" + "package_hash_file_count": 209, + "package_sha256": "00efa72ae52906f680980aa05c3e4205d9556654e7a14c5fcc1bdc8eb2a81313" }, "failures": [], "warnings": [], @@ -1572,6 +1572,20 @@ "network_urls": [], "network_hosts": [] }, + { + "path": "scripts/world_class_submission_kit_rendering.py", + "interface": "internal-module", + "interface_declared": true, + "interface_reason": "Shared renderer for world-class submission kit Markdown and HTML artifacts.", + "has_argparse": false, + "has_main_guard": false, + "uses_input": false, + "uses_network": false, + "uses_file_write": false, + "uses_subprocess": false, + "network_urls": [], + "network_hosts": [] + }, { "path": "scripts/world_class_submission_matrix.py", "interface": "internal-module", @@ -1761,7 +1775,7 @@ "checked_count": 86, "passed_count": 86, "failed_count": 0, - "skipped_count": 34, + "skipped_count": 35, "failed_scripts": [], "results": [ { @@ -2722,6 +2736,10 @@ "path": "scripts/world_class_source_checks.py", "reason": "internal module" }, + { + "path": "scripts/world_class_submission_kit_rendering.py", + "reason": "internal module" + }, { "path": "scripts/world_class_submission_matrix.py", "reason": "internal module" diff --git a/reports/security_trust_report.md b/reports/security_trust_report.md index 25fa496..41453ab 100644 --- a/reports/security_trust_report.md +++ b/reports/security_trust_report.md @@ -1,9 +1,9 @@ # Security Trust Report - OK: `True` -- Scanned files: `208` -- Scripts: `120` -- Internal script modules: `34` +- Scanned files: `209` +- Scripts: `121` +- Internal script modules: `35` - Secret findings: `0` - Network-capable scripts: `3` - Network policy covered scripts: `3` @@ -15,8 +15,8 @@ - CLI help smoke failures: `0` - Interactive scripts: `0` - Package hash scope: `source-contract-without-generated-reports` -- Package hash files: `208` -- Package SHA256: `c6d6f2a9b0e22b9ecdf1d8ff74a9d18b16d34729b063c813dc5e16e8328e66f9` +- Package hash files: `209` +- Package SHA256: `00efa72ae52906f680980aa05c3e4205d9556654e7a14c5fcc1bdc8eb2a81313` ## Failures @@ -171,6 +171,7 @@ | scripts/verify_package.py | cli | False | True | True | False | False | True | False | Default CLI classification; add SCRIPT_INTERFACE for internal modules. | | scripts/world_class_evidence_contract.py | internal-module | True | False | False | False | False | False | False | Imported by world-class evidence reports to share intake validation and artifact integrity checks. | | scripts/world_class_source_checks.py | internal-module | True | False | False | False | False | False | False | Imported by world-class evidence reports to keep source-evidence readiness checks consistent. | +| scripts/world_class_submission_kit_rendering.py | internal-module | True | False | False | False | False | False | False | Shared renderer for world-class submission kit Markdown and HTML artifacts. | | scripts/world_class_submission_matrix.py | internal-module | True | False | False | False | False | False | False | Shared by submission kit rendering to summarize draft, artifact, and source-check readiness. | | scripts/yao.py | cli | False | True | True | False | False | False | True | Default CLI classification; add SCRIPT_INTERFACE for internal modules. | | scripts/yao_cli_adaptation_commands.py | internal-module | True | True | False | False | False | False | False | Imported by yao.py to keep adaptive scan/proposal/apply command handlers outside the thin CLI orchestrator. | diff --git a/reports/skill-os-2-review.md b/reports/skill-os-2-review.md index 0d9e9b1..6090482 100644 --- a/reports/skill-os-2-review.md +++ b/reports/skill-os-2-review.md @@ -18,6 +18,7 @@ Yao Meta Skill is no longer only a Meta Skill factory. The current working tree - World-Class Evidence Ledger v0 that records current acceptance state, provenance requirements, privacy contracts, and anti-overclaim guards for those remaining gaps. - World-Class Intake Contract Hardening v0 so real evidence submissions must use the ledger's canonical `.json` filename and are recursively rejected when they include raw prompt, output, transcript, message, credential, secret, token, or API-key fields. - World-Class Submission Matrix v0 so the submission kit exposes a single operator-facing matrix for draft status, artifact readiness, source-check blockers, and the next action without counting matrix rows as completion evidence. +- World-Class Submission Kit Rendering v0 so Markdown and HTML kit presentation lives in a dedicated internal renderer, keeping the CLI focused on evidence assembly and file emission. - Benchmark Reproducibility v0 that turns public benchmark methodology, required artifacts, failure disclosure, and reproduction commands into machine-checkable release evidence. - Review Studio 2.0 v0 for one-page blocker, warning, evidence-path, review-action, and release-gate review. - Review Studio Source Refs v0 so every non-pass review action can expose structured relative source/report links with best-effort line numbers. @@ -61,7 +62,7 @@ This is still not the final world-class state. Target-native behavior contracts | World-Class Evidence Plan | `scripts/render_world_class_evidence_plan.py`, `reports/world_class_evidence_plan.md`, `tests/verify_world_class_evidence_plan.py` | v0 landed | | World-Class Evidence Ledger | `scripts/render_world_class_evidence_ledger.py`, `reports/world_class_evidence_ledger.md`, `tests/verify_world_class_evidence_ledger.py` | v0 landed | | World-Class Evidence Intake | `scripts/world_class_evidence_contract.py`, `scripts/render_world_class_evidence_intake.py`, `evidence/world_class/intake.schema.json`, `tests/verify_world_class_evidence_intake.py` with canonical filename and nested raw-field rejection | v0 landed | -| World-Class Submission Kit | `scripts/prepare_world_class_submission_kit.py`, `scripts/world_class_submission_matrix.py`, `tests/verify_world_class_evidence_intake.py` with draft, artifact, source-check, and next-action matrix evidence | v0 landed | +| World-Class Submission Kit | `scripts/prepare_world_class_submission_kit.py`, `scripts/world_class_submission_matrix.py`, `scripts/world_class_submission_kit_rendering.py`, `tests/verify_world_class_evidence_intake.py` with draft, artifact, source-check, next-action matrix evidence, and separated Markdown/HTML rendering | v0 landed | | Runtime Conformance | `scripts/run_conformance_suite.py`, `reports/conformance_matrix.md` | v0 landed | | Trust & Security | `scripts/trust_check.py`, `reports/security_trust_report.md`, `security/*.md` | v0 landed | | Review Studio 2.0 | `scripts/render_review_studio.py`, `reports/review-studio.html`, `reports/review-studio.json` with per-warning `review_actions` | v0 landed | @@ -121,13 +122,13 @@ Next move: add real client or installer permission enforcement integration. | Output Eval | `5` cases, with-skill pass rate `100`, baseline pass rate `0`, with file-backed, near-neighbor, boundary coverage, `10` local command-runner execution runs, `0` recorded fixture runs, `0` provider model-executed runs in root release evidence, `10` estimated token counts, provider runner v0 available, `5` blind A/B review pairs, a generated `reports/output_review_decisions.json` template, `0 / 5` reviewer decisions pending, `0` answer keys revealed, and `5` pending answers hidden | | Runtime Conformance | `5 / 5` targets passing | | Target Compiler | `5 / 5` compiled target contracts generated for OpenAI, Claude, generic, Agent Skills compatible, and VS Code / Copilot outputs, including target permission contracts and target-native behavior contracts | -| Trust | `0` secret findings, `1` pinned dependency file, `34` declared internal modules, `3 / 3` network-capable scripts covered by bounded host policy, `86 / 86` CLI help smoke checks passing across `120` scripts, source-contract hash scope explicit | +| Trust | `0` secret findings, `1` pinned dependency file, `35` declared internal modules, `3 / 3` network-capable scripts covered by bounded host policy, `86 / 86` CLI help smoke checks passing across `121` scripts, source-contract hash scope explicit | | Permission Governance | `3 / 3` required high-permission capabilities approved, `0` missing, `0` invalid, `0` expired | | Runtime Permission Probes | `4 / 4` target adapters probed, `0` native-enforcement adapters, `4` explicit metadata fallbacks, `4` residual risks retained for reviewer visibility | | Skill Atlas | `12` scanned skills, `1` actionable root skill, `1` telemetry report, `0` actionable route collisions, `0` actionable owner gaps, `0` actionable stale skills, `0` actionable drift signals, `24` scoped non-actionable issue signals retained for visibility | | Registry Audit | package metadata generated with version, owner, license, source checksum, archive checksum, Skill IR provenance, and compatibility matrix | -| Package Verification | `4 / 4` target adapters present, archive verified, `644` zip entries, `0` failures, `0` warnings | -| Install Simulation | archive with `644` entries extracted into a local verification root, entrypoint/manifest/interface loaded, reports present, `4` adapters readable, `12` installer permission checks enforced, `0` permission failures, `0` failures, `0` warnings | +| Package Verification | `4 / 4` target adapters present, archive verified, `643` zip entries, `0` failures, `0` warnings | +| Install Simulation | archive with `643` entries extracted into a local verification root, entrypoint/manifest/interface loaded, reports present, `4` adapters readable, `12` installer permission checks enforced, `0` permission failures, `0` failures, `0` warnings | | Local Install Sync Preflight | `make sync-local-install` and `make sync-active-install` rebuild the package first, then sync only after install simulation passes with `12` enforced installer permission checks and `0` permission failures | | Upgrade Check | current package declares `minor` over the 1.0.0 baseline, recommended bump is `minor`, and release notes include added targets plus checksum changes | | Adoption Drift | `1` metadata-only review event, `1` adoption sample, adoption `100`, risk band `low`; optional `yao.py` CLI capture, external client `telemetry-emit`, `5` `telemetry-hooks` recipes, Browser/Chrome native messaging host, and validated external JSONL import are available but off by default for reproducible release evidence; raw `reports/telemetry_events.jsonl` is gitignored and blocked from zip packages | diff --git a/reports/skill_atlas.json b/reports/skill_atlas.json index 783ffd2..2ef54b7 100644 --- a/reports/skill_atlas.json +++ b/reports/skill_atlas.json @@ -173,6 +173,7 @@ "scripts/verify_package.py", "scripts/world_class_evidence_contract.py", "scripts/world_class_source_checks.py", + "scripts/world_class_submission_kit_rendering.py", "scripts/world_class_submission_matrix.py", "scripts/yao.py", "scripts/yao_cli_adaptation_commands.py", diff --git a/reports/skill_os2_audit.json b/reports/skill_os2_audit.json index d9346ca..da9a749 100644 --- a/reports/skill_os2_audit.json +++ b/reports/skill_os2_audit.json @@ -197,7 +197,7 @@ "key": "trust-security", "label": "Trust Security", "status": "pass", - "current": "secrets 0; scripts 120; help failures 0", + "current": "secrets 0; scripts 121; help failures 0", "target": "Secrets, scripts, dependencies, permissions, and package hash are reviewable", "evidence": [ { @@ -285,7 +285,7 @@ "key": "registry-distribution", "label": "Registry Distribution", "status": "pass", - "current": "zip entries 644; install failures 0; permission failures 0", + "current": "zip entries 643; install failures 0; permission failures 0", "target": "Package metadata, archive checksum, package verification, and install simulation pass", "evidence": [ { diff --git a/reports/skill_os2_audit.md b/reports/skill_os2_audit.md index 3f9e407..94d3470 100644 --- a/reports/skill_os2_audit.md +++ b/reports/skill_os2_audit.md @@ -23,11 +23,11 @@ Generated at: `2026-06-16` | Human Adjudication | human-required | 0/5 decisions; pending 5 | Real reviewer decisions recorded before claiming output review completion | Record real A/B choices in the decision template, then regenerate adjudication. | | Benchmark Reproducibility | pass | artifacts 25; missing 0; failures 3 | Public methodology, reproducible commands, required artifacts, and failure disclosure are machine-checkable | Keep the manifest current with every benchmark, package, and release evidence change. | | Runtime Conformance | pass | 5/5 targets pass | Target package structure, metadata, relative paths, and degradation notes pass | Keep target conformance fixtures updated as platform contracts change. | -| Trust Security | pass | secrets 0; scripts 120; help failures 0 | Secrets, scripts, dependencies, permissions, and package hash are reviewable | Keep high-permission approvals scoped, expiring, and target-mapped. | +| Trust Security | pass | secrets 0; scripts 121; help failures 0 | Secrets, scripts, dependencies, permissions, and package hash are reviewable | Keep high-permission approvals scoped, expiring, and target-mapped. | | Permission Metadata | pass | 4/4 target probes pass; metadata fallback 4; installer enforcement 4 | Packaged adapters expose explicit permission metadata, residual risks, and installer enforcement evidence when available | Preserve residual-risk notes until real native enforcement exists. | | Native Permission Enforcement | external-required | native-enforced targets 0; installer-enforced targets 4 | At least one target/client enforces approved permissions at runtime | Integrate a real target-client or external installer runtime guard before claiming native permission enforcement. | | Skill Atlas | pass | 12 skills; actionable collisions 0 | Workspace catalog, route overlap, stale/owner gaps, drift, and no-route opportunities | Feed real drift data into Atlas once client telemetry is installed. | -| Registry Distribution | pass | zip entries 644; install failures 0; permission failures 0 | Package metadata, archive checksum, package verification, and install simulation pass | Regenerate registry after package verification so checksums stay aligned. | +| Registry Distribution | pass | zip entries 643; install failures 0; permission failures 0 | Package metadata, archive checksum, package verification, and install simulation pass | Regenerate registry after package verification so checksums stay aligned. | | Review Studio | pass | decision review; warnings 3; score 91 | One page shows gates, evidence paths, blockers, warnings, actions, waivers, and annotations | Resolve human/external warning gates before claiming full release readiness. | | Telemetry Drift | pass | events 1; risk low; recipes 5 | Local-first metadata-only event contract, aggregate drift report, hook recipes, and import path | Keep raw JSONL out of distributed packages and use aggregate reports for Atlas. | | Native Client Telemetry | external-required | external source events 0; adoption samples 0 | A real Browser/Chrome/provider client sends production metadata events | Install a real client against the native host and import production metadata-only events. | diff --git a/reports/skill_os2_coverage.json b/reports/skill_os2_coverage.json index 47ff104..bc65d68 100644 --- a/reports/skill_os2_coverage.json +++ b/reports/skill_os2_coverage.json @@ -130,7 +130,7 @@ "label": "Trust Security", "status": "pass", "objective": "Scripts, dependencies, permissions, secrets, and package hash are reviewable for team distribution.", - "current": "120 scripts; secrets 0; help failures 0", + "current": "121 scripts; secrets 0; help failures 0", "command": "python3 scripts/yao.py trust .", "test": "python3 tests/verify_trust_check.py", "evidence": [ @@ -204,7 +204,7 @@ "label": "Registry Distribution", "status": "pass", "objective": "Skill packages are installable, versioned, checksumed, and upgrade-reviewable.", - "current": "archive entries 644; install failures 0", + "current": "archive entries 643; install failures 0", "command": "python3 scripts/yao.py package . --platform openai --platform claude --platform generic --platform vscode --output-dir dist --zip && python3 scripts/yao.py registry-audit .", "test": "python3 tests/verify_registry_audit.py", "evidence": [ diff --git a/reports/skill_os2_coverage.md b/reports/skill_os2_coverage.md index ae0a1f3..bebb4e3 100644 --- a/reports/skill_os2_coverage.md +++ b/reports/skill_os2_coverage.md @@ -26,9 +26,9 @@ This report maps the Skill OS 2.0 upgrade blueprint to concrete local artifacts, | Skill IR | `pass` | schema 2.0.0; targets 5 | `python3 scripts/yao.py skill-ir .` | `python3 tests/verify_skill_ir.py` | | Output Eval Lab | `pass` | 5 cases; delta 100.0; execution 10 | `python3 scripts/yao.py output-exec . && python3 scripts/yao.py output-review .` | `python3 tests/verify_output_eval_lab.py` | | Runtime Conformance | `pass` | 5/5 targets pass | `python3 scripts/yao.py conformance .` | `python3 tests/verify_conformance_suite.py` | -| Trust Security | `pass` | 120 scripts; secrets 0; help failures 0 | `python3 scripts/yao.py trust .` | `python3 tests/verify_trust_check.py` | +| Trust Security | `pass` | 121 scripts; secrets 0; help failures 0 | `python3 scripts/yao.py trust .` | `python3 tests/verify_trust_check.py` | | Skill Atlas | `pass` | 12 scanned skills; actionable collisions 0 | `python3 scripts/yao.py skill-atlas --workspace-root .` | `python3 tests/verify_skill_atlas.py` | -| Registry Distribution | `pass` | archive entries 644; install failures 0 | `python3 scripts/yao.py package . --platform openai --platform claude --platform generic --platform vscode --output-dir dist --zip && python3 scripts/yao.py registry-audit .` | `python3 tests/verify_registry_audit.py` | +| Registry Distribution | `pass` | archive entries 643; install failures 0 | `python3 scripts/yao.py package . --platform openai --platform claude --platform generic --platform vscode --output-dir dist --zip && python3 scripts/yao.py registry-audit .` | `python3 tests/verify_registry_audit.py` | | Review Studio | `pass` | 16 gates; decision review; warnings 3 | `python3 scripts/yao.py review-studio .` | `python3 tests/verify_review_studio.py` | | Telemetry Drift | `pass` | events 1; recipes 5; risk low | `python3 scripts/yao.py telemetry-hooks . && python3 scripts/yao.py adoption-drift .` | `python3 tests/verify_telemetry_hooks.py` | diff --git a/reports/upgrade_check.json b/reports/upgrade_check.json index ca396ec..148196b 100644 --- a/reports/upgrade_check.json +++ b/reports/upgrade_check.json @@ -70,12 +70,12 @@ { "field": "archive_sha256", "from": "", - "to": "f8ad7d6f98bd00553984225a54ce6809611e868fb6653605dec71774a4b5c730" + "to": "d26f3390edd0335f75fe05f77fd65d40541728fdb1d0779419cd9dce077a4034" }, { "field": "package_sha256", "from": "0000000000000000000000000000000000000000000000000000000000000000", - "to": "c6d6f2a9b0e22b9ecdf1d8ff74a9d18b16d34729b063c813dc5e16e8328e66f9" + "to": "00efa72ae52906f680980aa05c3e4205d9556654e7a14c5fcc1bdc8eb2a81313" } ] }, diff --git a/scripts/prepare_world_class_submission_kit.py b/scripts/prepare_world_class_submission_kit.py index 74bc8d8..bd46859 100644 --- a/scripts/prepare_world_class_submission_kit.py +++ b/scripts/prepare_world_class_submission_kit.py @@ -7,11 +7,11 @@ from datetime import date from pathlib import Path from typing import Any -from html_rendering import html_text from render_world_class_evidence_intake import build_intake from world_class_evidence_contract import DISALLOWED_REAL_ARTIFACTS from world_class_source_checks import build_source_checklist, summarize_source_checklist from world_class_submission_matrix import build_evidence_matrix, summarize_evidence_matrix +from world_class_submission_kit_rendering import render_html, render_readme ROOT = Path(__file__).resolve().parent.parent @@ -264,385 +264,6 @@ def build_artifact_checklist(skill_dir: Path, items: list[dict[str, Any]]) -> li return rows -def render_readme(report: dict[str, Any]) -> str: - commands = report["commands"] - lines = [ - "# World-Class Evidence Submission Kit", - "", - f"Generated at: `{report['generated_at']}`", - "", - "This kit contains editable drafts for human and external evidence packets. Drafts are not accepted evidence.", - "", - "## Workflow", - "", - "1. Run the real provider, human review, native permission, or native client telemetry work first.", - "2. Edit the matching JSON draft with only aggregate artifact references and provenance metadata.", - "3. Set `template_only` to `false` only after real evidence exists.", - "4. Set attestation booleans truthfully; do not include credentials, raw prompts, raw outputs, transcripts, notes, or private user content.", - "5. Validate the packet before asking the ledger reviewer to accept it.", - "6. Optional artifact prefill only inserts SHA-256 digests for current local aggregate artifacts; it does not mark a draft as real evidence.", - "", - "## Commands", - "", - f"- validate intake: `{commands['validate_intake']}`", - f"- refresh ledger: `{commands['refresh_ledger']}`", - f"- guard public claims: `{commands['guard_claim']}`", - "", - "## Drafts", - "", - "| Evidence | Draft | Status | Prefilled refs |", - "| --- | --- | --- | ---: |", - ] - for item in report["files"]: - lines.append( - f"| `{item['evidence_key']}` | `{item['output_path']}` | `{item['status']}` | `{item.get('prefilled_artifact_ref_count', 0)}` |" - ) - lines.extend( - [ - "", - "## Evidence Matrix", - "", - "This matrix combines draft, artifact, and source-check readiness into one operator action list. Matrix rows are guidance only; they do not count as completion evidence.", - "", - "| Evidence | Stage | Draft | Artifacts | Source checks | Next action |", - "| --- | --- | --- | ---: | ---: | --- |", - ] - ) - for item in report.get("evidence_matrix", []): - lines.append( - f"| `{item['evidence_key']}` | `{item['stage']}` | `{item['draft_status']}` | " - f"`{item['artifact_ready_count']}/{item['artifact_total_count']}` | " - f"`{item['source_pass_count']}/{item['source_check_count']}` | {item['next_action']} |" - ) - lines.extend(["", "## Execution Runbook", ""]) - for item in report.get("evidence_items", []): - must_collect = item.get("must_collect", {}) if isinstance(item.get("must_collect", {}), dict) else {} - runbook = must_collect.get("runbook", []) - lines.extend(["", f"### {item.get('label', item.get('evidence_key', 'Evidence'))}", ""]) - if runbook: - for step in runbook: - lines.append(f"- `{step}`" if str(step).startswith("python3 ") or "=" in str(step) else f"- {step}") - else: - lines.append("- No source runbook listed.") - lines.extend( - [ - "", - "## Artifact Checklist", - "", - "Use these paths and SHA-256 digests when filling `artifact_refs`. Glob patterns are expanded into concrete files; submissions must reference concrete paths, not globs.", - "", - "| Evidence | Path | Status | SHA-256 |", - "| --- | --- | --- | --- |", - ] - ) - for item in report.get("artifact_checklist", []): - digest = item.get("sha256") or "n/a" - lines.append( - f"| `{item['evidence_key']}` | `{item['path']}` | `{item['status']}` | `{digest}` |" - ) - lines.extend( - [ - "", - "## Source Evidence Snapshot", - "", - "These checks explain why a draft is not ready for ledger acceptance yet. They mirror current aggregate reports and do not accept evidence by themselves.", - "", - "| Evidence | Check | Current | Expected | Status |", - "| --- | --- | --- | --- | --- |", - ] - ) - for item in report.get("source_checklist", []): - lines.append( - f"| `{item['evidence_key']}` | {item['label']} | `{item['actual']}` | `{item['expected']}` | `{item['status']}` |" - ) - lines.extend( - [ - "", - "## Anti-Overclaim", - "", - "- This kit never marks ledger evidence as accepted.", - "- Planned work, metadata fallback, pending review, and local command-runner output remain non-evidence.", - "- A valid intake packet means ready for ledger review, not world-class completion.", - ] - ) - return "\n".join(lines).rstrip() + "\n" - - -def render_html_list(values: list[Any], empty: str) -> str: - if not values: - return f"
  • {html_text(empty)}
  • " - return "".join(f"
  • {html_text(value)}
  • " for value in values) - - -def render_html_commands(commands: dict[str, str]) -> str: - return "".join( - f"
  • {html_text(label.replace('_', ' '))}{html_text(command)}
  • " - for label, command in commands.items() - ) - - -def render_html_files(files: list[dict[str, Any]]) -> str: - if not files: - return "

    No submission drafts were requested.

    " - return "".join( - """ -
    -
    - {status} -

    {key}

    -
    -
    -
    Template
    {template}
    -
    Draft
    {output}
    -
    Prefill
    {prefill} artifact refs
    -
    - {errors} -
    - """.format( - status=html_text(item.get("status", "")), - key=html_text(item.get("evidence_key", "")), - template=html_text(item.get("template_path", "")), - output=html_text(item.get("output_path", "")), - prefill=html_text(item.get("prefilled_artifact_ref_count", 0)), - errors=( - "" - if item.get("errors") - else "" - ), - ) - for item in files - ) - - -def render_html_artifact_checklist(items: list[dict[str, Any]]) -> str: - if not items: - return "

    No required artifacts were listed for the requested evidence.

    " - return "".join( - """ -
    -
    - {key} -

    {path}

    -
    -
    -
    Pattern
    {pattern}
    -
    Status
    {status}
    -
    SHA-256
    {sha}
    -
    -
    - """.format( - status=html_text(item.get("status", "")), - key=html_text(item.get("evidence_key", "")), - path=html_text(item.get("path", "")), - pattern=html_text(item.get("source_pattern", "")), - sha=html_text(item.get("sha256") or "n/a"), - ) - for item in items - ) - - -def render_html_source_checklist(items: list[dict[str, Any]]) -> str: - if not items: - return "

    No source checks were listed for the requested evidence.

    " - return "".join( - """ -
    -
    - {key} -

    {label}

    -
    -
    -
    Field
    {field}
    -
    Current
    {actual}
    -
    Expected
    {expected}
    -
    Action
    {action}
    -
    -
    - """.format( - status=html_text(item.get("status", "")), - key=html_text(item.get("evidence_key", "")), - label=html_text(item.get("label", "")), - field=html_text(item.get("field", "")), - actual=html_text(item.get("actual", "")), - expected=html_text(item.get("expected", "")), - action=html_text(item.get("next_action", "")), - ) - for item in items - ) - - -def render_html_matrix(items: list[dict[str, Any]]) -> str: - if not items: - return "

    No evidence matrix rows were generated.

    " - return "".join( - """ -
    -
    - {stage} -

    {key}

    -
    -
    -
    Draft
    {draft}
    -
    Artifacts
    {artifact_ready}/{artifact_total} ready
    -
    Source
    {source_pass}/{source_total} pass
    -
    Owner
    {owner}
    -
    -

    {action}

    -
    - """.format( - stage=html_text(item.get("stage", "")), - key=html_text(item.get("evidence_key", "")), - draft=html_text(item.get("draft_status", "")), - artifact_ready=html_text(item.get("artifact_ready_count", 0)), - artifact_total=html_text(item.get("artifact_total_count", 0)), - source_pass=html_text(item.get("source_pass_count", 0)), - source_total=html_text(item.get("source_check_count", 0)), - owner=html_text(item.get("owner", "")), - action=html_text(item.get("next_action", "")), - ) - for item in items - ) - - -def render_html_item(item: dict[str, Any]) -> str: - must_collect = item.get("must_collect", {}) if isinstance(item.get("must_collect", {}), dict) else {} - runbook = must_collect.get("runbook", []) - return f""" -
    -
    - {html_text(item.get('category', ''))} · {html_text(item.get('readiness', ''))} -

    {html_text(item.get('label', item.get('evidence_key', '')))}

    -
    -

    {html_text(item.get('blocking_reason', ''))}

    -
    -
    Owner
    {html_text(item.get('owner', ''))}
    -
    Evidence
    {html_text(item.get('evidence_key', ''))}
    -
    Submission
    {html_text(item.get('submission_path', ''))}
    -
    -
    -

    Execution Runbook

    -
      {render_html_list(runbook, 'No source runbook listed.')}
    -
    -
    -
    -

    Must Collect

    -
      {render_html_list(must_collect.get('provenance_requirements', []), 'No provenance requirements listed.')}
    -
    -
    -

    Pass Checks

    -
      {render_html_list(must_collect.get('success_checks', []), 'No success checks listed.')}
    -
    -
    -

    Privacy

    -
      {render_html_list(must_collect.get('privacy_contract', []), 'No privacy contract listed.')}
    -
    -
    -
    - """ - - -def render_html(report: dict[str, Any]) -> str: - summary = report["summary"] - artifact_ready = summary.get("artifact_ready_count", 0) - artifact_total = summary.get("artifact_checklist_count", 0) - stats = [ - ("Requested", summary["requested_count"]), - ("Written", summary["written_count"]), - ("Existing", summary["existing_count"]), - ("Skipped", summary["skipped_count"]), - ("Artifacts", f"{artifact_ready}/{artifact_total}"), - ("Prefilled", summary.get("artifact_ref_prefill_count", 0)), - ] - stat_html = "".join(f"
    {html_text(label)}{html_text(value)}
    " for label, value in stats) - evidence_html = "".join(render_html_item(item) for item in report.get("evidence_items", [])) - matrix_html = render_html_matrix(report.get("evidence_matrix", [])) - artifact_html = render_html_artifact_checklist(report.get("artifact_checklist", [])) - source_html = render_html_source_checklist(report.get("source_checklist", [])) - return f""" - - - - - World-Class Evidence Submission Kit - - - - -
    -
    - Evidence Intake -

    World-Class Evidence Submission Kit

    -

    Use this cockpit to prepare human and external evidence packets. Drafts are not accepted evidence, artifact prefill only inserts local SHA-256 digests, and this page never changes the ledger result.

    -
    {stat_html}
    -
    -
    -

    Workflow

    1. Run the real provider, human review, native permission, or native client telemetry work first.
    2. Edit the matching JSON draft with aggregate artifact references and provenance metadata.
    3. Set template_only to false only after real evidence exists.
    4. Use prefilled SHA-256 values as convenience data, not evidence acceptance.
    5. Validate intake, refresh the ledger, then guard public claims.
    - -
    -

    Evidence Matrix

    The matrix combines draft status, artifact readiness, source checks, and the next operator action. It is guidance only and never counts as accepted evidence.

    {matrix_html}
    -

    Drafts

    {render_html_files(report['files'])}
    -

    Artifact Checklist

    Copy concrete paths and SHA-256 digests from here into artifact_refs after real evidence exists. Glob patterns are expanded for operator convenience only.

    {artifact_html}
    -

    Source Evidence Snapshot

    This section shows current aggregate source checks. It explains remaining blockers without changing the ledger.

    {source_html}
    -

    Evidence Requirements

    {evidence_html}
    -

    Safety Boundary

    • Drafts never count as accepted ledger evidence.
    • Valid intake means ready for ledger review, not world-class completion.
    • Do not include credentials, raw prompts, raw outputs, transcripts, notes, or private user content.
    -
    - - -""" - - def build_submission_kit( skill_dir: Path, output_dir: Path, diff --git a/scripts/world_class_submission_kit_rendering.py b/scripts/world_class_submission_kit_rendering.py new file mode 100644 index 0000000..8163169 --- /dev/null +++ b/scripts/world_class_submission_kit_rendering.py @@ -0,0 +1,390 @@ +#!/usr/bin/env python3 +"""Render Markdown and HTML artifacts for world-class submission kits.""" + +from typing import Any + +from html_rendering import html_text + + +SCRIPT_INTERFACE = "internal-module" +SCRIPT_INTERFACE_REASON = "Shared renderer for world-class submission kit Markdown and HTML artifacts." + + +def render_readme(report: dict[str, Any]) -> str: + commands = report["commands"] + lines = [ + "# World-Class Evidence Submission Kit", + "", + f"Generated at: `{report['generated_at']}`", + "", + "This kit contains editable drafts for human and external evidence packets. Drafts are not accepted evidence.", + "", + "## Workflow", + "", + "1. Run the real provider, human review, native permission, or native client telemetry work first.", + "2. Edit the matching JSON draft with only aggregate artifact references and provenance metadata.", + "3. Set `template_only` to `false` only after real evidence exists.", + "4. Set attestation booleans truthfully; do not include credentials, raw prompts, raw outputs, transcripts, notes, or private user content.", + "5. Validate the packet before asking the ledger reviewer to accept it.", + "6. Optional artifact prefill only inserts SHA-256 digests for current local aggregate artifacts; it does not mark a draft as real evidence.", + "", + "## Commands", + "", + f"- validate intake: `{commands['validate_intake']}`", + f"- refresh ledger: `{commands['refresh_ledger']}`", + f"- guard public claims: `{commands['guard_claim']}`", + "", + "## Drafts", + "", + "| Evidence | Draft | Status | Prefilled refs |", + "| --- | --- | --- | ---: |", + ] + for item in report["files"]: + lines.append( + f"| `{item['evidence_key']}` | `{item['output_path']}` | `{item['status']}` | `{item.get('prefilled_artifact_ref_count', 0)}` |" + ) + lines.extend( + [ + "", + "## Evidence Matrix", + "", + "This matrix combines draft, artifact, and source-check readiness into one operator action list. Matrix rows are guidance only; they do not count as completion evidence.", + "", + "| Evidence | Stage | Draft | Artifacts | Source checks | Next action |", + "| --- | --- | --- | ---: | ---: | --- |", + ] + ) + for item in report.get("evidence_matrix", []): + lines.append( + f"| `{item['evidence_key']}` | `{item['stage']}` | `{item['draft_status']}` | " + f"`{item['artifact_ready_count']}/{item['artifact_total_count']}` | " + f"`{item['source_pass_count']}/{item['source_check_count']}` | {item['next_action']} |" + ) + lines.extend(["", "## Execution Runbook", ""]) + for item in report.get("evidence_items", []): + must_collect = item.get("must_collect", {}) if isinstance(item.get("must_collect", {}), dict) else {} + runbook = must_collect.get("runbook", []) + lines.extend(["", f"### {item.get('label', item.get('evidence_key', 'Evidence'))}", ""]) + if runbook: + for step in runbook: + lines.append(f"- `{step}`" if str(step).startswith("python3 ") or "=" in str(step) else f"- {step}") + else: + lines.append("- No source runbook listed.") + lines.extend( + [ + "", + "## Artifact Checklist", + "", + "Use these paths and SHA-256 digests when filling `artifact_refs`. Glob patterns are expanded into concrete files; submissions must reference concrete paths, not globs.", + "", + "| Evidence | Path | Status | SHA-256 |", + "| --- | --- | --- | --- |", + ] + ) + for item in report.get("artifact_checklist", []): + digest = item.get("sha256") or "n/a" + lines.append(f"| `{item['evidence_key']}` | `{item['path']}` | `{item['status']}` | `{digest}` |") + lines.extend( + [ + "", + "## Source Evidence Snapshot", + "", + "These checks explain why a draft is not ready for ledger acceptance yet. They mirror current aggregate reports and do not accept evidence by themselves.", + "", + "| Evidence | Check | Current | Expected | Status |", + "| --- | --- | --- | --- | --- |", + ] + ) + for item in report.get("source_checklist", []): + lines.append( + f"| `{item['evidence_key']}` | {item['label']} | `{item['actual']}` | `{item['expected']}` | `{item['status']}` |" + ) + lines.extend( + [ + "", + "## Anti-Overclaim", + "", + "- This kit never marks ledger evidence as accepted.", + "- Planned work, metadata fallback, pending review, and local command-runner output remain non-evidence.", + "- A valid intake packet means ready for ledger review, not world-class completion.", + ] + ) + return "\n".join(lines).rstrip() + "\n" + + +def render_html_list(values: list[Any], empty: str) -> str: + if not values: + return f"
  • {html_text(empty)}
  • " + return "".join(f"
  • {html_text(value)}
  • " for value in values) + + +def render_html_commands(commands: dict[str, str]) -> str: + return "".join( + f"
  • {html_text(label.replace('_', ' '))}{html_text(command)}
  • " + for label, command in commands.items() + ) + + +def render_html_files(files: list[dict[str, Any]]) -> str: + if not files: + return '

    No submission drafts were requested.

    ' + return "".join( + """ +
    +
    + {status} +

    {key}

    +
    +
    +
    Template
    {template}
    +
    Draft
    {output}
    +
    Prefill
    {prefill} artifact refs
    +
    + {errors} +
    + """.format( + status=html_text(item.get("status", "")), + key=html_text(item.get("evidence_key", "")), + template=html_text(item.get("template_path", "")), + output=html_text(item.get("output_path", "")), + prefill=html_text(item.get("prefilled_artifact_ref_count", 0)), + errors=( + '" + if item.get("errors") + else "" + ), + ) + for item in files + ) + + +def render_html_artifact_checklist(items: list[dict[str, Any]]) -> str: + if not items: + return '

    No required artifacts were listed for the requested evidence.

    ' + return "".join( + """ +
    +
    + {key} +

    {path}

    +
    +
    +
    Pattern
    {pattern}
    +
    Status
    {status}
    +
    SHA-256
    {sha}
    +
    +
    + """.format( + status=html_text(item.get("status", "")), + key=html_text(item.get("evidence_key", "")), + path=html_text(item.get("path", "")), + pattern=html_text(item.get("source_pattern", "")), + sha=html_text(item.get("sha256") or "n/a"), + ) + for item in items + ) + + +def render_html_source_checklist(items: list[dict[str, Any]]) -> str: + if not items: + return '

    No source checks were listed for the requested evidence.

    ' + return "".join( + """ +
    +
    + {key} +

    {label}

    +
    +
    +
    Field
    {field}
    +
    Current
    {actual}
    +
    Expected
    {expected}
    +
    Action
    {action}
    +
    +
    + """.format( + status=html_text(item.get("status", "")), + key=html_text(item.get("evidence_key", "")), + label=html_text(item.get("label", "")), + field=html_text(item.get("field", "")), + actual=html_text(item.get("actual", "")), + expected=html_text(item.get("expected", "")), + action=html_text(item.get("next_action", "")), + ) + for item in items + ) + + +def render_html_matrix(items: list[dict[str, Any]]) -> str: + if not items: + return '

    No evidence matrix rows were generated.

    ' + return "".join( + """ +
    +
    + {stage} +

    {key}

    +
    +
    +
    Draft
    {draft}
    +
    Artifacts
    {artifact_ready}/{artifact_total} ready
    +
    Source
    {source_pass}/{source_total} pass
    +
    Owner
    {owner}
    +
    +

    {action}

    +
    + """.format( + stage=html_text(item.get("stage", "")), + key=html_text(item.get("evidence_key", "")), + draft=html_text(item.get("draft_status", "")), + artifact_ready=html_text(item.get("artifact_ready_count", 0)), + artifact_total=html_text(item.get("artifact_total_count", 0)), + source_pass=html_text(item.get("source_pass_count", 0)), + source_total=html_text(item.get("source_check_count", 0)), + owner=html_text(item.get("owner", "")), + action=html_text(item.get("next_action", "")), + ) + for item in items + ) + + +def render_html_item(item: dict[str, Any]) -> str: + must_collect = item.get("must_collect", {}) if isinstance(item.get("must_collect", {}), dict) else {} + runbook = must_collect.get("runbook", []) + return f""" +
    +
    + {html_text(item.get('category', ''))} · {html_text(item.get('readiness', ''))} +

    {html_text(item.get('label', item.get('evidence_key', '')))}

    +
    +

    {html_text(item.get('blocking_reason', ''))}

    +
    +
    Owner
    {html_text(item.get('owner', ''))}
    +
    Evidence
    {html_text(item.get('evidence_key', ''))}
    +
    Submission
    {html_text(item.get('submission_path', ''))}
    +
    +
    +

    Execution Runbook

    +
      {render_html_list(runbook, 'No source runbook listed.')}
    +
    +
    +
    +

    Must Collect

    +
      {render_html_list(must_collect.get('provenance_requirements', []), 'No provenance requirements listed.')}
    +
    +
    +

    Pass Checks

    +
      {render_html_list(must_collect.get('success_checks', []), 'No success checks listed.')}
    +
    +
    +

    Privacy

    +
      {render_html_list(must_collect.get('privacy_contract', []), 'No privacy contract listed.')}
    +
    +
    +
    + """ + + +def render_html(report: dict[str, Any]) -> str: + summary = report["summary"] + artifact_ready = summary.get("artifact_ready_count", 0) + artifact_total = summary.get("artifact_checklist_count", 0) + stats = [ + ("Requested", summary["requested_count"]), + ("Written", summary["written_count"]), + ("Existing", summary["existing_count"]), + ("Skipped", summary["skipped_count"]), + ("Artifacts", f"{artifact_ready}/{artifact_total}"), + ("Prefilled", summary.get("artifact_ref_prefill_count", 0)), + ] + stat_html = "".join( + f"
    {html_text(label)}{html_text(value)}
    " + for label, value in stats + ) + evidence_html = "".join(render_html_item(item) for item in report.get("evidence_items", [])) + matrix_html = render_html_matrix(report.get("evidence_matrix", [])) + artifact_html = render_html_artifact_checklist(report.get("artifact_checklist", [])) + source_html = render_html_source_checklist(report.get("source_checklist", [])) + return f""" + + + + + World-Class Evidence Submission Kit + + + + +
    +
    + Evidence Intake +

    World-Class Evidence Submission Kit

    +

    Use this cockpit to prepare human and external evidence packets. Drafts are not accepted evidence, artifact prefill only inserts local SHA-256 digests, and this page never changes the ledger result.

    +
    {stat_html}
    +
    +
    +

    Workflow

    1. Run the real provider, human review, native permission, or native client telemetry work first.
    2. Edit the matching JSON draft with aggregate artifact references and provenance metadata.
    3. Set template_only to false only after real evidence exists.
    4. Use prefilled SHA-256 values as convenience data, not evidence acceptance.
    5. Validate intake, refresh the ledger, then guard public claims.
    + +
    +

    Evidence Matrix

    The matrix combines draft status, artifact readiness, source checks, and the next operator action. It is guidance only and never counts as accepted evidence.

    {matrix_html}
    +

    Drafts

    {render_html_files(report['files'])}
    +

    Artifact Checklist

    Copy concrete paths and SHA-256 digests from here into artifact_refs after real evidence exists. Glob patterns are expanded for operator convenience only.

    {artifact_html}
    +

    Source Evidence Snapshot

    This section shows current aggregate source checks. It explains remaining blockers without changing the ledger.

    {source_html}
    +

    Evidence Requirements

    {evidence_html}
    +

    Safety Boundary

    • Drafts never count as accepted ledger evidence.
    • Valid intake means ready for ledger review, not world-class completion.
    • Do not include credentials, raw prompts, raw outputs, transcripts, notes, or private user content.
    +
    + + +""" diff --git a/skill_atlas/catalog.json b/skill_atlas/catalog.json index fd23249..ca72de3 100644 --- a/skill_atlas/catalog.json +++ b/skill_atlas/catalog.json @@ -129,6 +129,7 @@ "scripts/verify_package.py", "scripts/world_class_evidence_contract.py", "scripts/world_class_source_checks.py", + "scripts/world_class_submission_kit_rendering.py", "scripts/world_class_submission_matrix.py", "scripts/yao.py", "scripts/yao_cli_adaptation_commands.py",