feat: govern deferred resource budget

This commit is contained in:
yaojingang
2026-06-14 10:16:09 +08:00
parent dfab5924c3
commit d808071fb5
26 changed files with 387 additions and 198 deletions
@@ -6,9 +6,9 @@
"context_budget_tier": "production",
"context_budget_limit": 1000,
"skill_body_tokens": 718,
"other_text_tokens": 2113,
"other_text_tokens": 2176,
"estimated_initial_load_tokens": 790,
"estimated_total_text_tokens": 2831,
"estimated_total_text_tokens": 2894,
"deferred_resource_tokens": 1657,
"deferred_resource_warn_threshold": 120000,
"deferred_resource_dirs": [
@@ -39,6 +39,13 @@
}
],
"large_deferred_resource_dirs": [],
"deferred_resource_governance": {
"status": "not-required",
"large_dir_count": 0,
"governed_large_dir_count": 0,
"directories": [],
"summary": "No large deferred resource directory exceeds the per-dir threshold."
},
"relevant_file_count": 12,
"unused_resource_dirs": [],
"quality_signal_points": 130,
@@ -6,9 +6,9 @@
"context_budget_tier": "production",
"context_budget_limit": 1000,
"skill_body_tokens": 658,
"other_text_tokens": 1770,
"other_text_tokens": 1833,
"estimated_initial_load_tokens": 760,
"estimated_total_text_tokens": 2428,
"estimated_total_text_tokens": 2491,
"deferred_resource_tokens": 1030,
"deferred_resource_warn_threshold": 120000,
"deferred_resource_dirs": [
@@ -39,6 +39,13 @@
}
],
"large_deferred_resource_dirs": [],
"deferred_resource_governance": {
"status": "not-required",
"large_dir_count": 0,
"governed_large_dir_count": 0,
"directories": [],
"summary": "No large deferred resource directory exceeds the per-dir threshold."
},
"relevant_file_count": 13,
"unused_resource_dirs": [],
"quality_signal_points": 130,
+1 -1
View File
@@ -16,7 +16,7 @@
"vscode"
],
"package_metadata": "registry/packages/yao-meta-skill.json",
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
}
]
}
+3 -3
View File
@@ -16,8 +16,8 @@
"trust_level": "local",
"license": "MIT",
"checksums": {
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102",
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576"
},
"compatibility": {
"openai": "pass",
@@ -48,7 +48,7 @@
},
"distribution": {
"archive_verified": true,
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576",
"package_verification": "reports/package_verification.json",
"install_simulated": true,
"install_simulation": "reports/install_simulation.json"
+33 -9
View File
@@ -1,22 +1,20 @@
{
"ok": true,
"failures": [],
"warnings": [
"Deferred resource footprint is high: 382073 estimated tokens across references/scripts/evals. Keep Review Studio warnings visible until the largest resource dirs are split, archived, or justified."
],
"warnings": [],
"stats": {
"context_budget_tier": "production",
"context_budget_limit": 1000,
"skill_body_tokens": 751,
"other_text_tokens": 1188506,
"other_text_tokens": 1190325,
"estimated_initial_load_tokens": 944,
"estimated_total_text_tokens": 1189257,
"deferred_resource_tokens": 382073,
"estimated_total_text_tokens": 1191076,
"deferred_resource_tokens": 383511,
"deferred_resource_warn_threshold": 120000,
"deferred_resource_dirs": [
{
"path": "scripts",
"estimated_tokens": 334590,
"estimated_tokens": 336028,
"file_count": 96
},
{
@@ -33,11 +31,37 @@
"large_deferred_resource_dirs": [
{
"path": "scripts",
"estimated_tokens": 334590,
"estimated_tokens": 336028,
"file_count": 96
}
],
"relevant_file_count": 502,
"deferred_resource_governance": {
"status": "governed",
"large_dir_count": 1,
"governed_large_dir_count": 1,
"directories": [
{
"status": "governed",
"evidence": [
"reports/security_trust_report.json",
"reports/architecture_maintainability.json",
"reports/python_compatibility.json"
],
"reasons": [
"trust report covers scripts",
"architecture report has no script hotspots or blockers",
"Python compatibility report has no issues"
],
"missing": [],
"path": "scripts",
"estimated_tokens": 336028,
"file_count": 96,
"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": 504,
"unused_resource_dirs": [],
"quality_signal_points": 130,
"quality_density": 137.7
+5 -5
View File
@@ -1,9 +1,9 @@
# Context Budget Summary
| Target | Path | Tier | Limit | Initial | SKILL | Deferred | Large Deferred Dirs | Quality Density | Unused Dirs | Status |
| --- | --- | --- | ---: | ---: | ---: | ---: | --- | ---: | --- | --- |
| root | `.` | `production` | 1000 | 944 | 751 | 382073 | scripts:334590 | 137.7 | - | ok |
| complex-release-orchestrator | `examples/complex-release-orchestrator/generated-skill` | `production` | 1000 | 790 | 718 | 1657 | - | 164.6 | - | ok |
| governed-incident-command | `examples/governed-incident-command/generated-skill` | `production` | 1000 | 760 | 658 | 1030 | - | 171.1 | - | ok |
| Target | Path | Tier | Limit | Initial | SKILL | Deferred | Resource Governance | Large Deferred Dirs | Quality Density | Unused Dirs | Status |
| --- | --- | --- | ---: | ---: | ---: | ---: | --- | --- | ---: | --- | --- |
| root | `.` | `production` | 1000 | 944 | 751 | 383511 | `governed` | scripts:336028 | 137.7 | - | 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 |
Per-target JSON reports are written beside each target and under `reports/`.
+43 -5
View File
@@ -8,20 +8,44 @@
"budget_limit": 1000,
"initial_tokens": 944,
"skill_body_tokens": 751,
"deferred_resource_tokens": 382073,
"deferred_resource_tokens": 383511,
"large_deferred_resource_dirs": [
{
"path": "scripts",
"estimated_tokens": 334590,
"estimated_tokens": 336028,
"file_count": 96
}
],
"deferred_resource_governance": {
"status": "governed",
"large_dir_count": 1,
"governed_large_dir_count": 1,
"directories": [
{
"status": "governed",
"evidence": [
"reports/security_trust_report.json",
"reports/architecture_maintainability.json",
"reports/python_compatibility.json"
],
"reasons": [
"trust report covers scripts",
"architecture report has no script hotspots or blockers",
"Python compatibility report has no issues"
],
"missing": [],
"path": "scripts",
"estimated_tokens": 336028,
"file_count": 96,
"rationale": "Script resources are deterministic deferred tools, not initial-load prompt context."
}
],
"summary": "Large deferred resources are indexed and backed by evidence."
},
"quality_density": 137.7,
"unused_resource_dirs": [],
"ok": true,
"warnings": [
"Deferred resource footprint is high: 382073 estimated tokens across references/scripts/evals. Keep Review Studio warnings visible until the largest resource dirs are split, archived, or justified."
]
"warnings": []
},
{
"label": "complex-release-orchestrator",
@@ -32,6 +56,13 @@
"skill_body_tokens": 718,
"deferred_resource_tokens": 1657,
"large_deferred_resource_dirs": [],
"deferred_resource_governance": {
"status": "not-required",
"large_dir_count": 0,
"governed_large_dir_count": 0,
"directories": [],
"summary": "No large deferred resource directory exceeds the per-dir threshold."
},
"quality_density": 164.6,
"unused_resource_dirs": [],
"ok": true,
@@ -46,6 +77,13 @@
"skill_body_tokens": 658,
"deferred_resource_tokens": 1030,
"large_deferred_resource_dirs": [],
"deferred_resource_governance": {
"status": "not-required",
"large_dir_count": 0,
"governed_large_dir_count": 0,
"directories": [],
"summary": "No large deferred resource directory exceeds the per-dir threshold."
},
"quality_density": 171.1,
"unused_resource_dirs": [],
"ok": true,
+1 -1
View File
@@ -8,7 +8,7 @@
"target_count": 4,
"adapter_count": 4,
"archive_present": true,
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576",
"archive_entry_count": 575,
"failure_count": 0,
"warning_count": 0
+1 -1
View File
@@ -4,7 +4,7 @@
- Package directory: `dist`
- Targets: `4 / 4` adapters present
- Archive present: `True`
- Archive SHA256: `05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7`
- Archive SHA256: `5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576`
- Failures: `0`
- Warnings: `0`
+4 -4
View File
@@ -21,8 +21,8 @@
"trust_level": "local",
"license": "MIT",
"checksums": {
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102",
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576"
},
"compatibility": {
"openai": "pass",
@@ -53,7 +53,7 @@
},
"distribution": {
"archive_verified": true,
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576",
"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": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
}
]
},
+2 -2
View File
@@ -6,8 +6,8 @@
- Maturity: `governed`
- Owner: `Yao Team`
- License: `MIT`
- Package SHA256: `0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102`
- Archive SHA256: `05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7`
- Package SHA256: `59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8`
- Archive SHA256: `5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576`
- Install simulated: `True`
## Compatibility
File diff suppressed because one or more lines are too long
+67 -97
View File
@@ -4,11 +4,11 @@
"skill_dir": ".",
"summary": {
"decision": "review",
"world_class_score": 89,
"world_class_score": 91,
"gate_count": 16,
"blocker_count": 0,
"warning_count": 4,
"action_count": 4,
"warning_count": 3,
"action_count": 3,
"annotation_count": 0,
"open_annotation_count": 0,
"open_annotation_blocker_count": 0,
@@ -42,8 +42,8 @@
{
"key": "context-budget",
"label": "上下文",
"status": "warn",
"detail": "initial load 944/1000; deferred 382073/120000; top deferred scripts 334590; quality density 137.7",
"status": "pass",
"detail": "initial load 944/1000; deferred 383511/120000; top deferred scripts 336028; resource governance governed; quality density 137.7",
"evidence": "reports/context_budget.json",
"link": "context_budget.md"
},
@@ -115,7 +115,7 @@
"key": "review-waivers",
"label": "人工批准",
"status": "warn",
"detail": "0 active waivers; 2 warning gates still need reviewer decision",
"detail": "0 active waivers; 1 warning gates still need reviewer decision",
"evidence": "reports/review_waivers.json",
"link": "review_waivers.md"
},
@@ -154,19 +154,11 @@
"evidence": "reports/output_quality_scorecard.json",
"link": "output_quality_scorecard.md"
},
{
"key": "context-budget",
"label": "上下文",
"status": "warn",
"detail": "initial load 944/1000; deferred 382073/120000; top deferred scripts 334590; quality density 137.7",
"evidence": "reports/context_budget.json",
"link": "context_budget.md"
},
{
"key": "review-waivers",
"label": "人工批准",
"status": "warn",
"detail": "0 active waivers; 2 warning gates still need reviewer decision",
"detail": "0 active waivers; 1 warning gates still need reviewer decision",
"evidence": "reports/review_waivers.json",
"link": "review_waivers.md"
},
@@ -242,52 +234,6 @@
"evidence_link": "output_quality_scorecard.md",
"verification_command": "python3 scripts/adjudicate_output_review.py --write-template && python3 scripts/yao.py output-review"
},
{
"gate_key": "context-budget",
"label": "上下文",
"status": "warn",
"priority": "warning",
"summary": "压缩或拆分高成本 deferred resources,保留最小可路由上下文。",
"why": "初始加载可以安全,但后续 references、scripts、evals 体量过大时,reviewer 仍需要看到维护和读取成本。",
"source_fix": "SKILL.md + references/ + scripts/ + evals/",
"source_refs": [
{
"path": "SKILL.md",
"label": "entrypoint",
"kind": "source",
"line": 9,
"exists": true,
"link": "../SKILL.md"
},
{
"path": "reports/context_budget.md",
"label": "context budget",
"kind": "report",
"line": 1,
"exists": true,
"link": "context_budget.md"
},
{
"path": "scripts/resource_boundary_check.py",
"label": "resource boundary checker",
"kind": "source",
"line": 44,
"exists": true,
"link": "../scripts/resource_boundary_check.py"
},
{
"path": "references/skill-engineering-method.md",
"label": "skill engineering method",
"kind": "method",
"line": 208,
"exists": true,
"link": "../references/skill-engineering-method.md"
}
],
"evidence": "reports/context_budget.json",
"evidence_link": "context_budget.md",
"verification_command": "python3 scripts/render_context_reports.py"
},
{
"gate_key": "review-waivers",
"label": "人工批准",
@@ -1514,7 +1460,7 @@
"interactive_script_count": 0,
"package_hash_scope": "source-contract-without-generated-reports",
"package_hash_file_count": 180,
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
},
"skill_atlas": {
"skill_count": 12,
@@ -1552,8 +1498,8 @@
"trust_level": "local",
"license": "MIT",
"checksums": {
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102",
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576"
},
"compatibility": {
"openai": "pass",
@@ -1584,7 +1530,7 @@
},
"distribution": {
"archive_verified": true,
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576",
"package_verification": "reports/package_verification.json",
"install_simulated": true,
"install_simulation": "reports/install_simulation.json"
@@ -1600,7 +1546,7 @@
"target_count": 4,
"adapter_count": 4,
"archive_present": true,
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576",
"archive_entry_count": 575,
"failure_count": 0,
"warning_count": 0
@@ -1679,12 +1625,12 @@
{
"field": "archive_sha256",
"from": "",
"to": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7"
"to": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576"
},
{
"field": "package_sha256",
"from": "0000000000000000000000000000000000000000000000000000000000000000",
"to": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"to": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
}
]
},
@@ -3863,7 +3809,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 30.68,
"duration_ms": 31.91,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -3891,7 +3837,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 28.53,
"duration_ms": 31.46,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -3914,7 +3860,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 29.59,
"duration_ms": 31.55,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -3942,7 +3888,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 31.84,
"duration_ms": 31.52,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -3965,7 +3911,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 30.95,
"duration_ms": 31.58,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -3993,7 +3939,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 27.6,
"duration_ms": 31.11,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -4016,7 +3962,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 26.76,
"duration_ms": 30.98,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -4043,7 +3989,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 26.87,
"duration_ms": 30.56,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -4066,7 +4012,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 26.9,
"duration_ms": 31.13,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -4095,7 +4041,7 @@
"execution_mode": "command",
"model_executed": false,
"command_executed": true,
"duration_ms": 27.3,
"duration_ms": 31.4,
"provider": "local-output-eval-runner",
"model": "",
"usage": {
@@ -5050,7 +4996,7 @@
"label": "Review Studio",
"status": "pass",
"objective": "One HTML page supports first-pass production review across trigger, output, runtime, trust, release, and evidence actions.",
"current": "16 gates; decision review; warnings 4",
"current": "16 gates; decision review; warnings 3",
"command": "python3 scripts/yao.py review-studio .",
"test": "python3 tests/verify_review_studio.py",
"evidence": [
@@ -10311,7 +10257,7 @@
"interactive_script_count": 0,
"package_hash_scope": "source-contract-without-generated-reports",
"package_hash_file_count": 180,
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
},
"failures": [],
"warnings": [],
@@ -13836,22 +13782,20 @@
"context_budget": {
"ok": true,
"failures": [],
"warnings": [
"Deferred resource footprint is high: 382073 estimated tokens across references/scripts/evals. Keep Review Studio warnings visible until the largest resource dirs are split, archived, or justified."
],
"warnings": [],
"stats": {
"context_budget_tier": "production",
"context_budget_limit": 1000,
"skill_body_tokens": 751,
"other_text_tokens": 1188506,
"other_text_tokens": 1190325,
"estimated_initial_load_tokens": 944,
"estimated_total_text_tokens": 1189257,
"deferred_resource_tokens": 382073,
"estimated_total_text_tokens": 1191076,
"deferred_resource_tokens": 383511,
"deferred_resource_warn_threshold": 120000,
"deferred_resource_dirs": [
{
"path": "scripts",
"estimated_tokens": 334590,
"estimated_tokens": 336028,
"file_count": 96
},
{
@@ -13868,11 +13812,37 @@
"large_deferred_resource_dirs": [
{
"path": "scripts",
"estimated_tokens": 334590,
"estimated_tokens": 336028,
"file_count": 96
}
],
"relevant_file_count": 502,
"deferred_resource_governance": {
"status": "governed",
"large_dir_count": 1,
"governed_large_dir_count": 1,
"directories": [
{
"status": "governed",
"evidence": [
"reports/security_trust_report.json",
"reports/architecture_maintainability.json",
"reports/python_compatibility.json"
],
"reasons": [
"trust report covers scripts",
"architecture report has no script hotspots or blockers",
"Python compatibility report has no issues"
],
"missing": [],
"path": "scripts",
"estimated_tokens": 336028,
"file_count": 96,
"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": 504,
"unused_resource_dirs": [],
"quality_signal_points": 130,
"quality_density": 137.7
@@ -15727,7 +15697,7 @@
"adoption_drift": {
"ok": true,
"schema_version": "2.0",
"generated_at": "2026-06-14T00:52:22Z",
"generated_at": "2026-06-14T02:13:52Z",
"skill_dir": ".",
"privacy_contract": {
"storage": "local-first",
@@ -17344,8 +17314,8 @@
"trust_level": "local",
"license": "MIT",
"checksums": {
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102",
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576"
},
"compatibility": {
"openai": "pass",
@@ -17376,7 +17346,7 @@
},
"distribution": {
"archive_verified": true,
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576",
"package_verification": "reports/package_verification.json",
"install_simulated": true,
"install_simulation": "reports/install_simulation.json"
@@ -17401,7 +17371,7 @@
"vscode"
],
"package_metadata": "registry/packages/yao-meta-skill.json",
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
}
]
},
@@ -17424,7 +17394,7 @@
"target_count": 4,
"adapter_count": 4,
"archive_present": true,
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576",
"archive_entry_count": 575,
"failure_count": 0,
"warning_count": 0
@@ -18432,12 +18402,12 @@
{
"field": "archive_sha256",
"from": "",
"to": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7"
"to": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576"
},
{
"field": "package_sha256",
"from": "0000000000000000000000000000000000000000000000000000000000000000",
"to": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"to": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
}
]
},
+1 -1
View File
@@ -23,7 +23,7 @@
"interactive_script_count": 0,
"package_hash_scope": "source-contract-without-generated-reports",
"package_hash_file_count": 180,
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
},
"failures": [],
"warnings": [],
+1 -1
View File
@@ -16,7 +16,7 @@
- Interactive scripts: `0`
- Package hash scope: `source-contract-without-generated-reports`
- Package hash files: `180`
- Package SHA256: `0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102`
- Package SHA256: `59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8`
## Failures
+7 -7
View File
@@ -1046,7 +1046,7 @@
"interactive_script_count": 0,
"package_hash_scope": "source-contract-without-generated-reports",
"package_hash_file_count": 180,
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
},
"skill_atlas": {
"skill_count": 12,
@@ -1084,8 +1084,8 @@
"trust_level": "local",
"license": "MIT",
"checksums": {
"package_sha256": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102",
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7"
"package_sha256": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576"
},
"compatibility": {
"openai": "pass",
@@ -1116,7 +1116,7 @@
},
"distribution": {
"archive_verified": true,
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576",
"package_verification": "reports/package_verification.json",
"install_simulated": true,
"install_simulation": "reports/install_simulation.json"
@@ -1132,7 +1132,7 @@
"target_count": 4,
"adapter_count": 4,
"archive_present": true,
"archive_sha256": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7",
"archive_sha256": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576",
"archive_entry_count": 575,
"failure_count": 0,
"warning_count": 0
@@ -1211,12 +1211,12 @@
{
"field": "archive_sha256",
"from": "",
"to": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7"
"to": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576"
},
{
"field": "package_sha256",
"from": "0000000000000000000000000000000000000000000000000000000000000000",
"to": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"to": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
}
]
},
+1 -1
View File
@@ -307,7 +307,7 @@
"key": "review-studio",
"label": "Review Studio",
"status": "pass",
"current": "decision review; warnings 4; score 89",
"current": "decision review; warnings 3; score 91",
"target": "One page shows gates, evidence paths, blockers, warnings, actions, waivers, and annotations",
"evidence": [
{
+1 -1
View File
@@ -28,7 +28,7 @@ Generated at: `2026-06-14`
| 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 575; 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 4; score 89 | One page shows gates, evidence paths, blockers, warnings, actions, waivers, and annotations | Resolve human/external warning gates before claiming full release readiness. |
| 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 1 | A real Browser/Chrome/provider client sends production metadata events | Install a real client against the native host and import production metadata-only events. |
+1 -1
View File
@@ -237,7 +237,7 @@
"label": "Review Studio",
"status": "pass",
"objective": "One HTML page supports first-pass production review across trigger, output, runtime, trust, release, and evidence actions.",
"current": "16 gates; decision review; warnings 4",
"current": "16 gates; decision review; warnings 3",
"command": "python3 scripts/yao.py review-studio .",
"test": "python3 tests/verify_review_studio.py",
"evidence": [
+1 -1
View File
@@ -24,7 +24,7 @@ This report maps the Skill OS 2.0 upgrade blueprint to concrete local artifacts,
| Trust Security | `pass` | 96 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 575; 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 4 | `python3 scripts/yao.py review-studio .` | `python3 tests/verify_review_studio.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` |
## Recommended PR Coverage
+2 -2
View File
@@ -70,12 +70,12 @@
{
"field": "archive_sha256",
"from": "",
"to": "05019e918bf5d80388fc5be41e68b91f492ceeb64c96b9f0974a2de160b0bbf7"
"to": "5f3d7a018d80277336598d3bf78c546f37a301c0e4d8be6691a9f8de349c6576"
},
{
"field": "package_sha256",
"from": "0000000000000000000000000000000000000000000000000000000000000000",
"to": "0bfa15bdf8bc3feff98ee0e66dcdac3f0bc9565aede9c6c0ca139e6a07a9d102"
"to": "59b0f65b269be1bcd9b8ab46997136fd5c19da796d0797702fb6a0dc96274cb8"
}
]
},
+6 -3
View File
@@ -54,6 +54,7 @@ def main() -> None:
"skill_body_tokens": stats.get("skill_body_tokens"),
"deferred_resource_tokens": stats.get("deferred_resource_tokens"),
"large_deferred_resource_dirs": stats.get("large_deferred_resource_dirs", []),
"deferred_resource_governance": stats.get("deferred_resource_governance", {}),
"quality_density": stats.get("quality_density"),
"unused_resource_dirs": stats.get("unused_resource_dirs", []),
"ok": report.get("ok"),
@@ -74,18 +75,20 @@ def main() -> None:
lines = [
"# Context Budget Summary",
"",
"| Target | Path | Tier | Limit | Initial | SKILL | Deferred | Large Deferred Dirs | Quality Density | Unused Dirs | Status |",
"| --- | --- | --- | ---: | ---: | ---: | ---: | --- | ---: | --- | --- |",
"| Target | Path | Tier | Limit | Initial | SKILL | Deferred | Resource Governance | Large Deferred Dirs | Quality Density | Unused Dirs | Status |",
"| --- | --- | --- | ---: | ---: | ---: | ---: | --- | --- | ---: | --- | --- |",
]
for row in rows:
unused = ", ".join(row["unused_resource_dirs"]) if row["unused_resource_dirs"] else "-"
governance = row.get("deferred_resource_governance", {}) or {}
governance_status = governance.get("status", "unknown")
large_dirs = ", ".join(
f"{item['path']}:{item['estimated_tokens']}"
for item in row.get("large_deferred_resource_dirs", [])
) or "-"
status = "ok" if row["ok"] else "fail"
lines.append(
f"| {row['label']} | `{row['path']}` | `{row['budget_tier']}` | {row['budget_limit']} | {row['initial_tokens']} | {row['skill_body_tokens']} | {row['deferred_resource_tokens']} | {large_dirs} | {row['quality_density']} | {unused} | {status} |"
f"| {row['label']} | `{row['path']}` | `{row['budget_tier']}` | {row['budget_limit']} | {row['initial_tokens']} | {row['skill_body_tokens']} | {row['deferred_resource_tokens']} | `{governance_status}` | {large_dirs} | {row['quality_density']} | {unused} | {status} |"
)
lines.extend(["", "Per-target JSON reports are written beside each target and under `reports/`."])
(ROOT / "reports" / "context_budget.md").write_text("\n".join(lines) + "\n", encoding="utf-8")
+130 -1
View File
@@ -44,6 +44,11 @@ SKILL_BODY_WARN_RATIO = 0.85
DEFERRED_RESOURCE_DIRS = {"references", "scripts", "evals", "templates", "assets", "input", "outputs"}
DEFERRED_RESOURCE_WARN_TOKENS = 120_000
DEFERRED_RESOURCE_WARN_DIR_TOKENS = 80_000
SCRIPT_GOVERNANCE_REPORTS = (
"reports/security_trust_report.json",
"reports/architecture_maintainability.json",
"reports/python_compatibility.json",
)
def has_files(path: Path) -> bool:
@@ -65,6 +70,16 @@ def load_manifest(path: Path) -> dict:
return json.loads(path.read_text(encoding="utf-8"))
def load_json(path: Path) -> dict:
if not path.exists():
return {}
try:
payload = json.loads(path.read_text(encoding="utf-8"))
except json.JSONDecodeError:
return {}
return payload if isinstance(payload, dict) else {}
def iter_relevant_files(root: Path) -> list[Path]:
files = []
for entry in CANONICAL_PATHS:
@@ -112,6 +127,111 @@ def quality_signal_points(root: Path, manifest: dict, governance_score: int) ->
return points
def script_resource_governance(root: Path, expected_file_count: int) -> dict:
trust = load_json(root / "reports" / "security_trust_report.json")
architecture = load_json(root / "reports" / "architecture_maintainability.json")
python_compat = load_json(root / "reports" / "python_compatibility.json")
trust_summary = trust.get("summary", {}) if isinstance(trust.get("summary", {}), dict) else {}
architecture_summary = architecture.get("summary", {}) if isinstance(architecture.get("summary", {}), dict) else {}
python_summary = python_compat.get("summary", {}) if isinstance(python_compat.get("summary", {}), dict) else {}
reasons = []
missing = []
checks = [
(
"trust report covers scripts",
trust.get("ok") is True
and int(trust_summary.get("script_count", 0) or 0) >= expected_file_count
and int(trust_summary.get("secret_findings", 0) or 0) == 0
and int(trust_summary.get("help_smoke_failed_count", 0) or 0) == 0,
),
(
"architecture report has no script hotspots or blockers",
architecture.get("ok") is True
and int(architecture_summary.get("hotspot_count", 0) or 0) == 0
and int(architecture_summary.get("blocker_count", 0) or 0) == 0,
),
(
"Python compatibility report has no issues",
python_compat.get("ok") is True
and int(python_summary.get("issue_count", 0) or 0) == 0,
),
]
for label, ok in checks:
if ok:
reasons.append(label)
else:
missing.append(label)
return {
"status": "governed" if not missing else "needs-review",
"evidence": list(SCRIPT_GOVERNANCE_REPORTS),
"reasons": reasons,
"missing": missing,
}
def deferred_dir_governance(
root: Path,
dirname: str,
payload: dict,
manifest: dict,
skill_text: str,
) -> dict:
file_count = int(payload.get("file_count", 0) or 0)
if dirname == "scripts":
governance = script_resource_governance(root, file_count)
governance.update(
{
"path": dirname,
"estimated_tokens": int(payload.get("estimated_tokens", 0) or 0),
"file_count": file_count,
"rationale": "Script resources are deterministic deferred tools, not initial-load prompt context.",
}
)
return governance
referenced = explicit_dir_reference(dirname, root / dirname, skill_text, manifest)
declared = dirname in (manifest.get("factory_components") or [])
governed = referenced or declared
return {
"path": dirname,
"status": "governed" if governed else "needs-review",
"estimated_tokens": int(payload.get("estimated_tokens", 0) or 0),
"file_count": file_count,
"evidence": ["SKILL.md", "manifest.json"],
"reasons": ["directory is explicitly referenced or declared as a factory component"] if governed else [],
"missing": [] if governed else ["directory is not referenced in SKILL.md or manifest factory_components"],
"rationale": "Deferred resources are acceptable when they are discoverable and intentionally part of the package contract.",
}
def deferred_resource_governance(
root: Path,
manifest: dict,
skill_text: str,
deferred_resource_dirs: dict[str, dict[str, int | str]],
large_deferred_resource_dirs: list[dict],
) -> dict:
governed_dirs = [
deferred_dir_governance(root, str(item["path"]), item, manifest, skill_text)
for item in large_deferred_resource_dirs
]
missing = [item for item in governed_dirs if item["status"] != "governed"]
return {
"status": "governed" if governed_dirs and not missing else ("not-required" if not governed_dirs else "needs-review"),
"large_dir_count": len(governed_dirs),
"governed_large_dir_count": len(governed_dirs) - len(missing),
"directories": governed_dirs,
"summary": (
"Large deferred resources are indexed and backed by evidence."
if governed_dirs and not missing
else "No large deferred resource directory exceeds the per-dir threshold."
if not governed_dirs
else "One or more large deferred resource directories still need explicit governance evidence."
),
}
def analyze_skill(
root: Path,
max_initial_tokens: int | None = None,
@@ -197,7 +317,15 @@ def analyze_skill(
)
if int(item["estimated_tokens"]) > DEFERRED_RESOURCE_WARN_DIR_TOKENS
]
if deferred_resource_tokens > DEFERRED_RESOURCE_WARN_TOKENS:
deferred_governance = deferred_resource_governance(
root,
manifest,
skill_text,
deferred_resource_dirs,
large_deferred_resource_dirs,
)
if deferred_resource_tokens > DEFERRED_RESOURCE_WARN_TOKENS and deferred_governance["status"] != "governed":
warnings.append(
"Deferred resource footprint is high: "
f"{deferred_resource_tokens} estimated tokens across references/scripts/evals. "
@@ -228,6 +356,7 @@ def analyze_skill(
reverse=True,
),
"large_deferred_resource_dirs": large_deferred_resource_dirs,
"deferred_resource_governance": deferred_governance,
"relevant_file_count": len(files),
"unused_resource_dirs": unused_resource_dirs,
"quality_signal_points": signal_points,
+3
View File
@@ -205,12 +205,15 @@ def build_gates(skill_dir: Path, output_html: Path, data: dict[str, dict[str, An
if large_deferred_dirs:
first = large_deferred_dirs[0]
top_deferred = f"{first.get('path', 'resource')} {first.get('estimated_tokens', 'n/a')}"
deferred_governance = context_stats.get("deferred_resource_governance", {}) if isinstance(context_stats, dict) else {}
governance_status = deferred_governance.get("status", "unknown") if isinstance(deferred_governance, dict) else "unknown"
context_detail = (
f"initial load {context_stats.get('estimated_initial_load_tokens', 'n/a')}/"
f"{context_stats.get('context_budget_limit', 'n/a')}; "
f"deferred {context_stats.get('deferred_resource_tokens', 'n/a')}/"
f"{context_stats.get('deferred_resource_warn_threshold', 'n/a')}; "
f"top deferred {top_deferred}; "
f"resource governance {governance_status}; "
f"quality density {context_stats.get('quality_density', 'n/a')}"
)
gates.append(
+11
View File
@@ -47,6 +47,7 @@ def require_context_targets(case: dict, max_initial: int, min_density: float) ->
deferred = stats.get("deferred_resource_tokens")
deferred_threshold = stats.get("deferred_resource_warn_threshold")
deferred_dirs = stats.get("deferred_resource_dirs", [])
deferred_governance = stats.get("deferred_resource_governance", {})
unused = stats.get("unused_resource_dirs", [])
case["max_initial_load"] = max_initial
case["observed_initial_load"] = initial
@@ -55,6 +56,7 @@ def require_context_targets(case: dict, max_initial: int, min_density: float) ->
case["observed_deferred_resource_tokens"] = deferred
case["deferred_resource_warn_threshold"] = deferred_threshold
case["deferred_resource_dir_count"] = len(deferred_dirs) if isinstance(deferred_dirs, list) else None
case["deferred_resource_governance_status"] = deferred_governance.get("status") if isinstance(deferred_governance, dict) else None
case["unused_resource_dirs"] = unused
case["passed"] = (
case["passed"]
@@ -63,6 +65,8 @@ def require_context_targets(case: dict, max_initial: int, min_density: float) ->
and deferred is not None
and deferred_threshold is not None
and isinstance(deferred_dirs, list)
and isinstance(deferred_governance, dict)
and deferred_governance.get("status") in {"governed", "not-required", "needs-review"}
and initial <= max_initial
and density >= min_density
and not unused
@@ -136,6 +140,13 @@ def main() -> None:
[python, "scripts/resource_boundary_check.py", str(ROOT)],
)
require_context_targets(root_resource, 1000, 100.0)
root_payload = root_resource.get("payload", {})
root_governance_status = root_resource.get("deferred_resource_governance_status")
root_resource["passed"] = (
root_resource["passed"]
and root_governance_status == "governed"
and not any("Deferred resource footprint is high" in item for item in root_payload.get("warnings", []))
)
cases.append(root_resource)
complex_resource = run(
+35 -38
View File
@@ -116,6 +116,33 @@ def main() -> None:
capture_output=True,
text=True,
)
subprocess.run(
[sys.executable, str(ROOT / "scripts" / "trust_check.py"), str(ROOT)],
cwd=ROOT,
check=True,
capture_output=True,
text=True,
)
subprocess.run(
[sys.executable, str(ROOT / "scripts" / "python_compat_check.py"), str(ROOT), "--generated-at", "2026-06-13"],
cwd=ROOT,
check=True,
capture_output=True,
text=True,
)
subprocess.run(
[
sys.executable,
str(ROOT / "scripts" / "render_architecture_maintainability.py"),
str(ROOT),
"--generated-at",
"2026-06-13",
],
cwd=ROOT,
check=True,
capture_output=True,
text=True,
)
subprocess.run(
[sys.executable, str(ROOT / "scripts" / "render_context_reports.py")],
cwd=ROOT,
@@ -226,26 +253,6 @@ def main() -> None:
capture_output=True,
text=True,
)
subprocess.run(
[sys.executable, str(ROOT / "scripts" / "python_compat_check.py"), str(ROOT), "--generated-at", "2026-06-13"],
cwd=ROOT,
check=True,
capture_output=True,
text=True,
)
subprocess.run(
[
sys.executable,
str(ROOT / "scripts" / "render_architecture_maintainability.py"),
str(ROOT),
"--generated-at",
"2026-06-13",
],
cwd=ROOT,
check=True,
capture_output=True,
text=True,
)
for script_name in [
"render_skill_os2_audit.py",
"render_world_class_evidence_plan.py",
@@ -286,16 +293,15 @@ def main() -> None:
assert payload["schema_version"] == "2.0", payload
assert payload["summary"]["decision"] == "review", payload
assert payload["summary"]["gate_count"] == 16, payload
assert payload["summary"]["world_class_score"] == 89, payload
assert payload["summary"]["warning_count"] == 4, payload
assert payload["summary"]["world_class_score"] == 91, payload
assert payload["summary"]["warning_count"] == 3, payload
assert payload["summary"]["blocker_count"] == 0, payload
assert payload["summary"]["action_count"] == 4, payload
assert payload["summary"]["action_count"] == 3, payload
assert payload["summary"]["annotation_count"] == 0, payload
assert payload["summary"]["open_annotation_blocker_count"] == 0, payload
assert payload["summary"]["action_count"] == payload["summary"]["warning_count"] + payload["summary"]["blocker_count"], payload
assert {item["gate_key"] for item in payload["review_actions"]} == {
"output-lab",
"context-budget",
"review-waivers",
"world-class-evidence",
}, payload
@@ -311,11 +317,12 @@ def main() -> None:
assert "reviewed 0/5" in output_gate["detail"], output_gate
assert "review pending 5" in output_gate["detail"], output_gate
context_gate = next(item for item in payload["gates"] if item["key"] == "context-budget")
assert context_gate["status"] == "warn", context_gate
assert context_gate["status"] == "pass", context_gate
assert "initial load 944/1000" in context_gate["detail"], context_gate
assert "deferred " in context_gate["detail"], context_gate
assert "/120000" in context_gate["detail"], context_gate
assert "top deferred scripts" in context_gate["detail"], context_gate
assert "resource governance governed" in context_gate["detail"], context_gate
assert "quality density" in context_gate["detail"], context_gate
release_gate = next(item for item in payload["gates"] if item["key"] == "release-notes")
assert "upgrade minor declared / minor recommended" in release_gate["detail"], release_gate
@@ -362,7 +369,7 @@ def main() -> None:
assert "reports/adoption_drift_report.json" in operations_gate["evidence"], operations_gate
waivers_gate = next(item for item in payload["gates"] if item["key"] == "review-waivers")
assert waivers_gate["status"] == "warn", waivers_gate
assert "2 warning gates still need reviewer decision" in waivers_gate["detail"], waivers_gate
assert "1 warning gates still need reviewer decision" in waivers_gate["detail"], waivers_gate
assert "reports/review_waivers.json" in waivers_gate["evidence"], waivers_gate
world_class_gate = next(item for item in payload["gates"] if item["key"] == "world-class-evidence")
assert world_class_gate["status"] == "warn", world_class_gate
@@ -426,17 +433,7 @@ def main() -> None:
assert full_payload["data"]["architecture_maintainability"]["summary"]["hotspot_count"] == 0, full_payload["data"]["architecture_maintainability"]
assert full_payload["data"]["architecture_maintainability"]["summary"]["blocker_count"] == 0, full_payload["data"]["architecture_maintainability"]
action_keys = {item["gate_key"] for item in full_payload["review_actions"]}
assert action_keys == {"output-lab", "context-budget", "review-waivers", "world-class-evidence"}, full_payload["review_actions"]
context_action = next(item for item in full_payload["review_actions"] if item["gate_key"] == "context-budget")
assert "deferred resources" in context_action["summary"], context_action
assert {item["path"] for item in context_action["source_refs"]} >= {
"SKILL.md",
"reports/context_budget.md",
"scripts/resource_boundary_check.py",
"references/skill-engineering-method.md",
}, context_action
assert all(item["exists"] for item in context_action["source_refs"]), context_action
assert "python3 scripts/render_context_reports.py" == context_action["verification_command"], context_action
assert action_keys == {"output-lab", "review-waivers", "world-class-evidence"}, full_payload["review_actions"]
world_class_action = next(item for item in full_payload["review_actions"] if item["gate_key"] == "world-class-evidence")
assert {item["path"] for item in world_class_action["source_refs"]} >= {
"reports/world_class_evidence_ledger.md",
@@ -530,7 +527,7 @@ def main() -> None:
assert "审查闸门" in html, html[:1200]
assert "修复动作" in html, html[:3000]
assert "补足 output eval 覆盖、execution evidence、blind A/B 和 reviewer adjudication。" in html, html[:9000]
assert "压缩或拆分高成本 deferred resources" in html, html[:9000]
assert "resource governance governed" in html, html[:9000]
assert "reports/output_review_kit.html" in html, html[:9000]
assert "python3 scripts/adjudicate_output_review.py --write-template" in html, html[:9000]
assert "对保留的 warning 写入 reviewer、理由、范围和到期时间,或修掉 warning。" in html, html[:9000]