Skip to content

Commit cb2e12b

Browse files
authored
Add SSL Skill Normalizer and convert reporting, error-messages, jqschema to SSL JSON (#32911)
1 parent 3640111 commit cb2e12b

12 files changed

Lines changed: 1151 additions & 2 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"scheduling": {
3+
"id": "error-messages",
4+
"name": "Error Messages",
5+
"goal": "Write consistent, actionable Go validation error messages following the what-is-wrong + what-is-expected + example template",
6+
"intent_signature": "compose_error_message($error_context, $invalid_input, $validation_rule) -> $error_message",
7+
"inputs": ["$error_context", "$invalid_input", "$validation_rule"],
8+
"outputs": ["$error_message"],
9+
"dependencies": [],
10+
"control_flow_features": ["conditional", "sequential"],
11+
"entry_scene": "scene_reason",
12+
"subscene_refs": []
13+
},
14+
"scenes": [
15+
{
16+
"id": "scene_reason",
17+
"type": "REASON",
18+
"goal": "Determine error category and required message components",
19+
"entry_condition": "$error_context and $validation_rule are available",
20+
"exit_condition": "$error_category and $message_components are selected",
21+
"next_scene_rules": [
22+
{"condition": "category determined", "target": "scene_act"}
23+
],
24+
"inputs": ["$error_context", "$invalid_input", "$validation_rule"],
25+
"outputs": ["$error_category", "$message_components"],
26+
"entry_logic_step": "step_reason_classify"
27+
},
28+
{
29+
"id": "scene_act",
30+
"type": "ACT",
31+
"goal": "Compose error message string using the three-part template",
32+
"entry_condition": "$error_category and $message_components are ready",
33+
"exit_condition": "$error_message is composed",
34+
"next_scene_rules": [
35+
{"condition": "success", "target": "scene_verify"}
36+
],
37+
"inputs": ["$error_category", "$message_components", "$invalid_input"],
38+
"outputs": ["$error_message"],
39+
"entry_logic_step": "step_act_compose"
40+
},
41+
{
42+
"id": "scene_verify",
43+
"type": "VERIFY",
44+
"goal": "Verify that the composed error message is complete and actionable",
45+
"entry_condition": "$error_message is composed",
46+
"exit_condition": "$error_message passes completeness check",
47+
"next_scene_rules": [
48+
{"condition": "message is complete and actionable", "target": "END_SUCCESS"},
49+
{"condition": "message is incomplete", "target": "END_FAIL"}
50+
],
51+
"inputs": ["$error_message"],
52+
"outputs": ["$error_message"],
53+
"entry_logic_step": "step_verify_check"
54+
}
55+
],
56+
"logic_steps": [
57+
{
58+
"id": "step_reason_classify",
59+
"scene_id": "scene_reason",
60+
"action_type": "SELECT",
61+
"resource_scope": "MEMORY",
62+
"description": "Classify the error as format, type, enum, or configuration validation to determine required message components",
63+
"inputs": {"context": "$error_context", "rule": "$validation_rule"},
64+
"outputs": {"category": "$error_category", "components": "$message_components"},
65+
"next": "YIELD_SUCCESS"
66+
},
67+
{
68+
"id": "step_act_compose",
69+
"scene_id": "scene_act",
70+
"action_type": "WRITE",
71+
"resource_scope": "MEMORY",
72+
"description": "Compose the error message string: [what is wrong]. [what is expected]. [example of correct usage]",
73+
"inputs": {"category": "$error_category", "components": "$message_components", "input": "$invalid_input"},
74+
"outputs": {"message": "$error_message"},
75+
"next": "YIELD_SUCCESS"
76+
},
77+
{
78+
"id": "step_verify_check",
79+
"scene_id": "scene_verify",
80+
"action_type": "VALIDATE",
81+
"resource_scope": "MEMORY",
82+
"description": "Check that $error_message contains all three template components: problem statement, expected format or values, and a concrete usage example",
83+
"inputs": {"message": "$error_message"},
84+
"outputs": {"validated": "$error_message"},
85+
"next": "YIELD_SUCCESS"
86+
}
87+
]
88+
}

.github/skills/jqschema/ssl.json

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"scheduling": {
3+
"id": "jqschema",
4+
"name": "jqschema",
5+
"goal": "Infer compact JSON structural schema (keys and types) from JSON input using the jqschema.sh script",
6+
"intent_signature": "discover_schema($json_input) -> $schema_output",
7+
"inputs": ["$json_input"],
8+
"outputs": ["$schema_output"],
9+
"dependencies": ["jq", "jqschema.sh"],
10+
"control_flow_features": ["conditional", "sequential"],
11+
"entry_scene": "scene_prepare",
12+
"subscene_refs": []
13+
},
14+
"scenes": [
15+
{
16+
"id": "scene_prepare",
17+
"type": "PREPARE",
18+
"goal": "Install jqschema.sh script into the /tmp working directory",
19+
"entry_condition": "$GITHUB_WORKSPACE is set and jqschema.sh exists in the skill directory",
20+
"exit_condition": "/tmp/gh-aw/jqschema.sh is executable",
21+
"next_scene_rules": [
22+
{"condition": "setup successful", "target": "scene_acquire"},
23+
{"condition": "setup failed", "target": "END_FAIL"}
24+
],
25+
"inputs": ["$GITHUB_WORKSPACE"],
26+
"outputs": ["$jqschema_bin"],
27+
"entry_logic_step": "step_prepare_mkdir"
28+
},
29+
{
30+
"id": "scene_acquire",
31+
"type": "ACQUIRE",
32+
"goal": "Receive JSON input to analyze",
33+
"entry_condition": "$jqschema_bin is available",
34+
"exit_condition": "$json_input is available as a processable stream",
35+
"next_scene_rules": [
36+
{"condition": "input available", "target": "scene_act"}
37+
],
38+
"inputs": ["$json_input"],
39+
"outputs": ["$json_input"],
40+
"entry_logic_step": "step_acquire_receive"
41+
},
42+
{
43+
"id": "scene_act",
44+
"type": "ACT",
45+
"goal": "Execute jqschema.sh to derive structural schema from $json_input",
46+
"entry_condition": "$json_input and $jqschema_bin are ready",
47+
"exit_condition": "$schema_output is produced",
48+
"next_scene_rules": [
49+
{"condition": "execution successful", "target": "END_SUCCESS"},
50+
{"condition": "jq execution error", "target": "END_FAIL"}
51+
],
52+
"inputs": ["$json_input", "$jqschema_bin"],
53+
"outputs": ["$schema_output"],
54+
"entry_logic_step": "step_act_run"
55+
}
56+
],
57+
"logic_steps": [
58+
{
59+
"id": "step_prepare_mkdir",
60+
"scene_id": "scene_prepare",
61+
"action_type": "CALL_TOOL",
62+
"resource_scope": "LOCAL_FS",
63+
"description": "Create /tmp/gh-aw directory if it does not exist",
64+
"inputs": {"path": "/tmp/gh-aw"},
65+
"outputs": {},
66+
"next": "step_prepare_copy"
67+
},
68+
{
69+
"id": "step_prepare_copy",
70+
"scene_id": "scene_prepare",
71+
"action_type": "CALL_TOOL",
72+
"resource_scope": "LOCAL_FS",
73+
"description": "Copy jqschema.sh from $GITHUB_WORKSPACE/.github/skills/jqschema/ to /tmp/gh-aw/ and set executable permissions",
74+
"inputs": {"source": "$GITHUB_WORKSPACE/.github/skills/jqschema/jqschema.sh", "dest": "/tmp/gh-aw/jqschema.sh"},
75+
"outputs": {"bin": "$jqschema_bin"},
76+
"next": "YIELD_SUCCESS"
77+
},
78+
{
79+
"id": "step_acquire_receive",
80+
"scene_id": "scene_acquire",
81+
"action_type": "READ",
82+
"resource_scope": "PROCESS",
83+
"description": "Receive JSON data as stdin or from a file path, binding the result to $json_input",
84+
"inputs": {"data": "$json_input"},
85+
"outputs": {"data": "$json_input"},
86+
"next": "YIELD_SUCCESS"
87+
},
88+
{
89+
"id": "step_act_run",
90+
"scene_id": "scene_act",
91+
"action_type": "CALL_TOOL",
92+
"resource_scope": "PROCESS",
93+
"description": "Pipe $json_input through $jqschema_bin to produce a compact structural schema that replaces values with type names",
94+
"inputs": {"json": "$json_input", "bin": "$jqschema_bin"},
95+
"outputs": {"schema": "$schema_output"},
96+
"next": "YIELD_SUCCESS"
97+
}
98+
]
99+
}

.github/skills/reporting/ssl.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"scheduling": {
3+
"id": "reporting",
4+
"name": "Reporting",
5+
"goal": "Format agent-generated reports with collapsible HTML details/summary blocks to reduce scrolling and improve readability",
6+
"intent_signature": "format_report($report_content, $report_title) -> $formatted_report",
7+
"inputs": ["$report_content", "$report_title"],
8+
"outputs": ["$formatted_report"],
9+
"dependencies": [],
10+
"control_flow_features": ["sequential"],
11+
"entry_scene": "scene_act",
12+
"subscene_refs": []
13+
},
14+
"scenes": [
15+
{
16+
"id": "scene_act",
17+
"type": "ACT",
18+
"goal": "Wrap report content in HTML details/summary tags",
19+
"entry_condition": "$report_content and $report_title are available",
20+
"exit_condition": "$formatted_report is composed",
21+
"next_scene_rules": [
22+
{"condition": "success", "target": "scene_finalize"}
23+
],
24+
"inputs": ["$report_content", "$report_title"],
25+
"outputs": ["$formatted_report"],
26+
"entry_logic_step": "step_act_compose"
27+
},
28+
{
29+
"id": "scene_finalize",
30+
"type": "FINALIZE",
31+
"goal": "Emit the formatted report as final output",
32+
"entry_condition": "$formatted_report is ready",
33+
"exit_condition": "report emitted to caller",
34+
"next_scene_rules": [
35+
{"condition": "success", "target": "END_SUCCESS"}
36+
],
37+
"inputs": ["$formatted_report"],
38+
"outputs": ["$formatted_report"],
39+
"entry_logic_step": "step_finalize_emit"
40+
}
41+
],
42+
"logic_steps": [
43+
{
44+
"id": "step_act_compose",
45+
"scene_id": "scene_act",
46+
"action_type": "WRITE",
47+
"resource_scope": "MEMORY",
48+
"description": "Compose HTML <details>/<summary> wrapper around $report_content using $report_title as the summary label",
49+
"inputs": {"content": "$report_content", "title": "$report_title"},
50+
"outputs": {"formatted": "$formatted_report"},
51+
"next": "YIELD_SUCCESS"
52+
},
53+
{
54+
"id": "step_finalize_emit",
55+
"scene_id": "scene_finalize",
56+
"action_type": "TERMINATE",
57+
"resource_scope": "MEMORY",
58+
"description": "Emit $formatted_report as the final output to the caller",
59+
"inputs": {"report": "$formatted_report"},
60+
"outputs": {},
61+
"next": "YIELD_SUCCESS"
62+
}
63+
]
64+
}

0 commit comments

Comments
 (0)