skill-system-gate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill System Gate
Skill 系统门控
Enforce a fail-closed gate before experiment registration and provide read-only registry safety/status checks.
在实验注册前强制执行故障关闭型门控,并提供只读的注册表安全/状态检查。
Decision Matrix
决策矩阵
| Task Intent | Operation | Primary Backend | Use When |
|---|---|---|---|
| Validate repository artifacts against configurable gate rules | | | Before close-gate decisions or deterministic policy checks |
| Validate experiment implementation and logs against gate rules | | | Legacy GNN/FraudDetect pipeline checks |
| Check whether registry state is safe for rerun/reset | | | Before any manual reset/rerun action |
| View queue health and state counts | | | Need a quick dashboard of current experiment states |
| 任务意图 | 操作 | 主要后端 | 适用场景 |
|---|---|---|---|
| 根据可配置门控规则验证仓库制品 | | | 在做出关闸决策或执行确定性策略检查前 |
| 根据门控规则验证实验实现与日志 | | | 旧版GNN/FraudDetect流水线检查 |
| 检查注册表状态是否可安全重跑/重置 | | | 在执行任何手动重置/重跑操作前 |
| 查看队列健康状态与状态统计 | | | 需要快速查看当前实验状态的仪表盘时 |
Core Patterns
核心模式
Pattern 1: Validate repository gate compliance
模式1:验证仓库门控合规性
bash
python3 scripts/gate_validate.py --rules config/gate_rules.yaml --artifact-root .- Load configurable .
gate_rules.yaml - Support rule types: ,
command,structural.eda-contract - Emit markdown verdict and JSON summary on the last line.
bash
python3 scripts/gate_validate.py --rules config/gate_rules.yaml --artifact-root .- 加载可配置的文件。
gate_rules.yaml - 支持的规则类型:、
command、structural。eda-contract - 输出markdown格式的判定结果,最后一行是JSON格式的汇总信息。
Pattern 2: Validate legacy experiment gate compliance
模式2:验证旧版实验门控合规性
bash
scripts/validate_exp.sh <exp_name> [phase_root]- Load rules.
gate_bank.json - Run all rule classes (,
source_contains,source_not_contains,stderr_scan,file_exists).file_min_size - Emit markdown verdict and JSON summary on the last line.
bash
scripts/validate_exp.sh <exp_name> [phase_root]- 加载规则。
gate_bank.json - 运行所有规则类(、
source_contains、source_not_contains、stderr_scan、file_exists)。file_min_size - 输出markdown格式的判定结果,最后一行是JSON格式的汇总信息。
Pattern 3: Verify registry safety before reset decisions
模式3:重置决策前验证注册表安全性
bash
scripts/check_registry.sh <exp_name> [phase_root]- Read registry entry for the experiment.
- Block reset recommendation for experiments.
RUNNING - Return status details and decision JSON.
safe_to_reset
bash
scripts/check_registry.sh <exp_name> [phase_root]- 读取实验对应的注册表条目。
- 对处于状态的实验,禁止重置操作建议。
RUNNING - 返回状态详情与决策的JSON数据。
safe_to_reset
Pattern 4: Show current registry health dashboard
模式4:查看当前注册表健康仪表盘
bash
scripts/status.sh [phase_root]- Aggregate counts across active/completed sets.
- Show running experiments and execution location.
- Return compact JSON counters on the last line.
bash
scripts/status.sh [phase_root]- 汇总活跃/已完成实验的统计数量。
- 展示运行中的实验及其执行位置。
- 最后一行返回紧凑的JSON格式统计计数器。
Guidelines
指导原则
- Always treat validation as fail-closed: any error-severity rule violation means gate failure.
- Always run before registry-facing actions.
validate-experiment - Never modify experiment source/config files during checks.
- Never execute reset/rerun from this skill; only report recommendations.
- Never override experiments as safe to reset.
RUNNING - Keep all operations read-only with respect to registry and experiment artifacts.
skill
{
"schema_version": "2.0",
"id": "skill-system-gate",
"version": "1.0.0",
"capabilities": ["configurable-gate", "experiment-gate", "registry-safety", "experiment-status"],
"effects": ["fs.read", "db.read", "proc.exec"],
"operations": {
"validate-experiment": {
"description": "Validate experiment source artifacts and logs against gate_bank rules and return a pass/fail verdict.",
"input": {
"exp_name": { "type": "string", "required": true, "description": "Experiment directory name under experiments/" },
"phase_root": { "type": "string", "required": false, "description": "Phase directory path", "default": "/datas/store162/arthur0824hao/Study/GNN/FraudDetect/SubProject/Phase3" }
},
"output": {
"description": "Gate validation markdown plus machine-readable verdict.",
"fields": { "passed": "boolean", "errors": "number", "warnings": "number" }
},
"entrypoints": {
"unix": ["bash", "scripts/validate_exp.sh", "{exp_name}", "{phase_root}"]
}
},
"validate": {
"description": "Run configurable gate_rules.yaml checks and emit pass/fail with per-rule results.",
"input": {
"rules": { "type": "string", "required": false, "description": "Path to gate rules file", "default": "config/gate_rules.yaml" },
"artifact_root": { "type": "string", "required": false, "description": "Working directory for rule execution", "default": "." }
},
"output": {
"description": "Gate verdict with per-rule details.",
"fields": { "passed": "boolean", "errors": "number", "warnings": "number" }
},
"entrypoints": {
"unix": ["python3", "scripts/gate_validate.py", "--rules", "{rules}", "--artifact-root", "{artifact_root}"]
}
},
"verify-registry": {
"description": "Check registry state safety and recommend whether reset/rerun is safe without mutating state.",
"input": {
"exp_name": { "type": "string", "required": true, "description": "Experiment name in registry" },
"phase_root": { "type": "string", "required": false, "description": "Phase directory path", "default": "/datas/store162/arthur0824hao/Study/GNN/FraudDetect/SubProject/Phase3" }
},
"output": {
"description": "Registry safety markdown plus recommendation payload.",
"fields": { "found": "boolean", "status": "string", "safe_to_reset": "boolean" }
},
"entrypoints": {
"unix": ["bash", "scripts/check_registry.sh", "{exp_name}", "{phase_root}"]
}
},
"status": {
"description": "Show current registry dashboard with counts by status and running experiment details.",
"input": {
"phase_root": { "type": "string", "required": false, "description": "Phase directory path", "default": "/datas/store162/arthur0824hao/Study/GNN/FraudDetect/SubProject/Phase3" }
},
"output": {
"description": "Registry status dashboard and aggregate counters.",
"fields": { "running": "number", "needs_rerun": "number", "completed": "number", "total": "number" }
},
"entrypoints": {
"unix": ["bash", "scripts/status.sh", "{phase_root}"]
}
}
},
"stdout_contract": {
"last_line_json": true
}
}- 始终将验证视为故障关闭型:任何错误级别的规则违反都意味着门控失败。
- 在执行任何面向注册表的操作前,务必运行。
validate-experiment - 检查过程中切勿修改实验源码/配置文件。
- 切勿通过该Skill执行重置/重跑操作;仅可输出操作建议。
- 切勿将处于状态的实验标记为可安全重置。
RUNNING - 所有操作对注册表与实验制品均保持只读权限。
skill
{
"schema_version": "2.0",
"id": "skill-system-gate",
"version": "1.0.0",
"capabilities": ["configurable-gate", "experiment-gate", "registry-safety", "experiment-status"],
"effects": ["fs.read", "db.read", "proc.exec"],
"operations": {
"validate-experiment": {
"description": "Validate experiment source artifacts and logs against gate_bank rules and return a pass/fail verdict.",
"input": {
"exp_name": { "type": "string", "required": true, "description": "Experiment directory name under experiments/" },
"phase_root": { "type": "string", "required": false, "description": "Phase directory path", "default": "/datas/store162/arthur0824hao/Study/GNN/FraudDetect/SubProject/Phase3" }
},
"output": {
"description": "Gate validation markdown plus machine-readable verdict.",
"fields": { "passed": "boolean", "errors": "number", "warnings": "number" }
},
"entrypoints": {
"unix": ["bash", "scripts/validate_exp.sh", "{exp_name}", "{phase_root}"]
}
},
"validate": {
"description": "Run configurable gate_rules.yaml checks and emit pass/fail with per-rule results.",
"input": {
"rules": { "type": "string", "required": false, "description": "Path to gate rules file", "default": "config/gate_rules.yaml" },
"artifact_root": { "type": "string", "required": false, "description": "Working directory for rule execution", "default": "." }
},
"output": {
"description": "Gate verdict with per-rule details.",
"fields": { "passed": "boolean", "errors": "number", "warnings": "number" }
},
"entrypoints": {
"unix": ["python3", "scripts/gate_validate.py", "--rules", "{rules}", "--artifact-root", "{artifact_root}"]
}
},
"verify-registry": {
"description": "Check registry state safety and recommend whether reset/rerun is safe without mutating state.",
"input": {
"exp_name": { "type": "string", "required": true, "description": "Experiment name in registry" },
"phase_root": { "type": "string", "required": false, "description": "Phase directory path", "default": "/datas/store162/arthur0824hao/Study/GNN/FraudDetect/SubProject/Phase3" }
},
"output": {
"description": "Registry safety markdown plus recommendation payload.",
"fields": { "found": "boolean", "status": "string", "safe_to_reset": "boolean" }
},
"entrypoints": {
"unix": ["bash", "scripts/check_registry.sh", "{exp_name}", "{phase_root}"]
}
},
"status": {
"description": "Show current registry dashboard with counts by status and running experiment details.",
"input": {
"phase_root": { "type": "string", "required": false, "description": "Phase directory path", "default": "/datas/store162/arthur0824hao/Study/GNN/FraudDetect/SubProject/Phase3" }
},
"output": {
"description": "Registry status dashboard and aggregate counters.",
"fields": { "running": "number", "needs_rerun": "number", "completed": "number", "total": "number" }
},
"entrypoints": {
"unix": ["bash", "scripts/status.sh", "{phase_root}"]
}
}
},
"stdout_contract": {
"last_line_json": true
}
}