Upgrade meta skill governance reports
This commit is contained in:
+35
-8
@@ -5,11 +5,15 @@ import re
|
||||
from datetime import date
|
||||
from pathlib import Path
|
||||
|
||||
from compile_skill import render_compile_report
|
||||
from export_skill_ir import build_skill_ir, validate_ir
|
||||
from github_benchmark_scan import run_github_benchmark_scan
|
||||
from render_intent_confidence import render_intent_confidence
|
||||
from render_intent_dialogue import render_intent_dialogue
|
||||
from render_iteration_directions import render_iteration_directions
|
||||
from render_adoption_drift_report import render_report as render_adoption_drift_report
|
||||
from render_review_annotations import render_report as render_review_annotations
|
||||
from render_review_waivers import render_report as render_review_waivers
|
||||
from render_artifact_design_profile import render_artifact_design_profile
|
||||
from render_output_risk_profile import render_output_risk_profile
|
||||
from render_prompt_quality_profile import render_prompt_quality_profile
|
||||
@@ -71,13 +75,17 @@ README_TEMPLATE = """# {title}
|
||||
6. Follow the workflow steps in `SKILL.md`.
|
||||
7. Check `reports/skill-overview.html` for the generated bilingual HTML skill audit report: overview, metrics, capability profile, principle, contract, quality, risk, assets, and iteration roadmap. It defaults to Simplified Chinese and includes an English switch in the top right.
|
||||
8. Open `reports/review-studio.html` for the one-page Review Studio 2.0 gate view.
|
||||
9. Open `reports/review-viewer.html` for a compact visual review of the package.
|
||||
10. Check `reports/output-risk-profile.md` to see likely output mistakes and self-repair checks.
|
||||
11. Check `reports/artifact-design-profile.md` to see the intended artifact direction, layout patterns, visual quality gates, and anti-patterns.
|
||||
12. Check `reports/prompt-quality-profile.md` to see the need model, RTF-to-skill mapping, complexity, and prompt-facing quality matrix.
|
||||
13. Review `reports/skill-ir.json` for the platform-neutral Skill IR contract before platform-specific packaging.
|
||||
14. Review `reports/iteration-directions.md` for the three most valuable next moves.
|
||||
15. Review `reports/system-model.md` to understand the boundary, feedback loops, drift watch, failure map, and highest-leverage next changes.
|
||||
9. Record source-line reviewer comments in `reports/review_annotations.md` when review needs follow-up.
|
||||
10. Open `reports/review-viewer.html` for a compact visual review of the package.
|
||||
11. Check `reports/output-risk-profile.md` to see likely output mistakes and self-repair checks.
|
||||
12. Check `reports/artifact-design-profile.md` to see the intended artifact direction, layout patterns, visual quality gates, and anti-patterns.
|
||||
13. Check `reports/prompt-quality-profile.md` to see the need model, RTF-to-skill mapping, complexity, and prompt-facing quality matrix.
|
||||
14. Review `reports/skill-ir.json` for the platform-neutral Skill IR contract before platform-specific packaging.
|
||||
15. Review `reports/compiled_targets.md` to see how Skill IR compiles into OpenAI, Claude, generic, and Agent Skills compatible target contracts.
|
||||
16. Review `reports/iteration-directions.md` for the three most valuable next moves.
|
||||
17. Review `reports/system-model.md` to understand the boundary, feedback loops, drift watch, failure map, and highest-leverage next changes.
|
||||
18. Review `reports/adoption_drift_report.md` to see local-first metadata-only adoption and drift signals.
|
||||
19. Review `reports/review_waivers.md` to see human reviewer risk approvals and expiry dates.
|
||||
|
||||
## Honest Boundaries
|
||||
|
||||
@@ -100,10 +108,14 @@ README_TEMPLATE = """# {title}
|
||||
- `reports/prompt-quality-profile.md`: prompt-facing need model, RTF mapping, complexity, and quality matrix
|
||||
- `reports/system-model.md`: systems-thinking model for boundary, feedback loops, drift, failure patterns, and leverage points
|
||||
- `reports/skill-ir.json`: platform-neutral 2.0 Skill IR contract for trigger, workflow, resources, evals, risk, and governance
|
||||
- `reports/compiled_targets.md`: target compiler report showing generated contracts, adapter modes, preserved semantics, warnings, and unsupported features
|
||||
- `reports/skill-overview.html`: white-background bilingual HTML skill audit report with sticky four-character Chinese navigation, a top-right language switch, metrics, SVG charts, contract boundary, quality review, risk governance, assets, and iteration roadmap
|
||||
- `reports/review-studio.html`: Review Studio 2.0 gate page for intent, trigger, output eval, context, runtime conformance, trust, atlas, and release readiness
|
||||
- `reports/review-viewer.html`: compact review page for architecture, usage, feedback, and next steps
|
||||
- `reports/iteration-directions.md`: the top three next iteration directions
|
||||
- `reports/adoption_drift_report.md`: local-first metadata-only telemetry summary for adoption, missed triggers, bad outputs, script errors, and review drift
|
||||
- `reports/review_waivers.md`: human reviewer risk approval ledger for warning acceptance and expiry
|
||||
- `reports/review_annotations.md`: source-line reviewer comments linked to Review Studio gates
|
||||
"""
|
||||
|
||||
|
||||
@@ -223,8 +235,10 @@ def build_report_view(artifacts: dict) -> dict:
|
||||
"review_studio": review_studio,
|
||||
"message": (
|
||||
f"Skill 已创建完成。建议先打开总结报告:{html_report}。"
|
||||
"它会展示这个 Skill 的概述、指标、原理、触发边界、输入输出、质量评估、风险治理、包体资产和升级路线;"
|
||||
"它会展示这个 Skill 的概述、指标、原理、触发边界、输入输出、目标编译、质量评估、风险治理、包体资产和升级路线;"
|
||||
f"然后打开 Review Studio 2.0:{review_studio},检查意图、触发、输出评测、运行一致性、信任和发布闸门。"
|
||||
"后续 reviewer 的文件级或行级意见可以记录到 reports/review_annotations.md。"
|
||||
"如需审查平台适配细节,请打开 reports/compiled_targets.md。"
|
||||
"报告默认使用中文简体,右上角可以切换英文版。"
|
||||
),
|
||||
"next_action": "Open reports/skill-overview.html before editing more files.",
|
||||
@@ -336,7 +350,11 @@ def initialize_skill(
|
||||
prompt_quality_profile = render_prompt_quality_profile(root)
|
||||
system_model = render_system_model(root)
|
||||
skill_ir = render_skill_ir(root)
|
||||
compiled_targets = render_compile_report(root)
|
||||
iteration_directions = render_iteration_directions(root)
|
||||
adoption_drift = render_adoption_drift_report(root)
|
||||
review_waivers = render_review_waivers(root)
|
||||
review_annotations = render_review_annotations(root)
|
||||
overview = render_skill_overview(root)
|
||||
review_viewer = render_review_viewer(root)
|
||||
review_studio = render_review_studio(root)
|
||||
@@ -363,8 +381,16 @@ def initialize_skill(
|
||||
"system_model_md": system_model["artifacts"]["markdown"],
|
||||
"system_model_json": system_model["artifacts"]["json"],
|
||||
"skill_ir_json": skill_ir["artifacts"]["json"],
|
||||
"compiled_targets_md": compiled_targets["artifacts"]["markdown"],
|
||||
"compiled_targets_json": compiled_targets["artifacts"]["json"],
|
||||
"iteration_directions_md": iteration_directions["artifacts"]["markdown"],
|
||||
"iteration_directions_json": iteration_directions["artifacts"]["json"],
|
||||
"adoption_drift_md": adoption_drift["artifacts"]["markdown"],
|
||||
"adoption_drift_json": adoption_drift["artifacts"]["json"],
|
||||
"review_waivers_md": review_waivers["artifacts"]["markdown"],
|
||||
"review_waivers_json": review_waivers["artifacts"]["json"],
|
||||
"review_annotations_md": review_annotations["artifacts"]["markdown"],
|
||||
"review_annotations_json": review_annotations["artifacts"]["json"],
|
||||
"review_viewer_html": review_viewer["artifacts"]["html"],
|
||||
"review_viewer_json": review_viewer["artifacts"]["json"],
|
||||
"review_studio_html": absolute_skill_artifact(root, review_studio["artifacts"]["html"]),
|
||||
@@ -384,6 +410,7 @@ def initialize_skill(
|
||||
"reference_synthesis": reference_synthesis["summary"],
|
||||
"system_model": system_model["summary"],
|
||||
"skill_ir": skill_ir["summary"],
|
||||
"compiled_targets": compiled_targets["summary"],
|
||||
"artifacts": artifacts,
|
||||
"report_view": report_view,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user