Setting the file. One moment.
SSL · SSL Skill Normalizer · github/gh-aw · Skills Docs
ContentsBack to the top of the page
Raw file
ssl.json
JSON · 186 lines · 8 KB
],
9 "dependencies" : [ "read_file" , "write_file" , "json_validate" ],
10 "control_flow_features" : [ "sequential" , "conditional" , "loop" ],
11 "entry_scene" : "scene_prepare" ,
12 "subscene_refs" : []
13 },
14 "scenes" : [
15 {
16 "id" : "scene_prepare" ,
17 "type" : "PREPARE" ,
18 "goal" : "Read and parse the source SKILL.md into raw text and frontmatter" ,
19 "entry_condition" : "$skill_path is provided and the file exists" ,
20 "exit_condition" : "$raw_text and $frontmatter are available in memory" ,
21 "next_scene_rules" : [
22 { "condition" : "parse succeeded" , "target" : "scene_reason" },
23 { "condition" : "file not found or parse error" , "target" : "END_FAIL" }
24 ],
25 "inputs" : [ "$skill_path" ],
26 "outputs" : [ "$raw_text" , "$frontmatter" ],
27 "entry_logic_step" : "step_prepare_read"
28 },
29 {
30 "id" : "scene_reason" ,
31 "type" : "REASON" ,
32 "goal" : "Run Passes 1–3: extract scheduling metadata, decompose scenes, and expand logic steps into a draft SSL JSON" ,
33 "entry_condition" : "$raw_text and $frontmatter are available" ,
34 "exit_condition" : "$draft_ssl is produced as an in-memory JSON object" ,
35 "next_scene_rules" : [{ "condition" : "draft produced" , "target" : "scene_verify" }],
36 "inputs" : [ "$raw_text" , "$frontmatter" ],
37 "outputs" : [ "$draft_ssl" ],
38 "entry_logic_step" : "step_reason_pass1"
39 },
40 {
41 "id" : "scene_verify" ,
42 "type" : "VERIFY" ,
43 "goal" : "Run Pass 4: validate $draft_ssl against all SSL schema, enum, graph, and pointer rules" ,
44 "entry_condition" : "$draft_ssl is available" ,
45 "exit_condition" : "$draft_ssl passes all Pass-4 validation rules, or retry budget is exhausted" ,
46 "next_scene_rules" : [
47 { "condition" : "all validation rules pass" , "target" : "scene_finalize" },
48 { "condition" : "validation failures detected and retry budget remains" , "target" : "scene_recover" },
49 { "condition" : "validation failures detected and retry budget exhausted" , "target" : "END_FAIL" }
50 ],
51 "inputs" : [ "$draft_ssl" ],
52 "outputs" : [ "$validation_failures" ],
53 "entry_logic_step" : "step_verify_validate"
54 },
55 {
56 "id" : "scene_recover" ,
57 "type" : "RECOVER" ,
58 "goal" : "Record validation failures, decrement retry budget, and re-enter reasoning to regenerate the draft" ,
59 "entry_condition" : "$validation_failures is non-empty and $retry_count < retry_budget" ,
60 "exit_condition" : "$retry_count is incremented and $draft_ssl is cleared for regeneration" ,
61 "next_scene_rules" : [
62 { "condition" : "retry budget not exhausted" , "target" : "scene_reason" },
63 { "condition" : "retry budget exhausted" , "target" : "END_FAIL" }
64 ],
65 "inputs" : [ "$validation_failures" , "$retry_count" ],
66 "outputs" : [ "$retry_count" , "$failure_log" ],
67 "entry_logic_step" : "step_recover_log"
68 },
69 {
70 "id" : "scene_finalize" ,
71 "type" : "FINALIZE" ,
72 "goal" : "Write the validated ssl.json alongside the source SKILL.md and emit the validation report" ,
73 "entry_condition" : "$draft_ssl passed all validation rules" ,
74 "exit_condition" : "ssl.json is written to disk and $validation_report is emitted" ,
75 "next_scene_rules" : [
76 { "condition" : "write succeeded" , "target" : "END_SUCCESS" },
77 { "condition" : "write failed" , "target" : "END_FAIL" }
78 ],
79 "inputs" : [ "$draft_ssl" , "$failure_log" ],
80 "outputs" : [ "$ssl_json" , "$validation_report" ],
81 "entry_logic_step" : "step_finalize_write"
82 }
83 ],
84 "logic_steps" : [
85 {
86 "id" : "step_prepare_read" ,
87 "scene_id" : "scene_prepare" ,
88 "action_type" : "READ" ,
89 "resource_scope" : "LOCAL_FS" ,
90 "description" : "Read the SKILL.md file at $skill_path into $raw_text" ,
91 "inputs" : { "path" : "$skill_path" },
92 "outputs" : { "text" : "$raw_text" },
93 "next" : "step_prepare_parse"
94 },
95 {
96 "id" : "step_prepare_parse" ,
97 "scene_id" : "scene_prepare" ,
98 "action_type" : "INFER" ,
99 "resource_scope" : "MEMORY" ,
100 "description" : "Parse YAML frontmatter and markdown body from $raw_text into $frontmatter and $body" ,
101 "inputs" : { "text" : "$raw_text" },
102 "outputs" : { "frontmatter" : "$frontmatter" , "body" : "$body" },
103 "next" : "YIELD_SUCCESS"
104 },
105 {
106 "id" : "step_reason_pass1" ,
107 "scene_id" : "scene_reason" ,
108 "action_type" : "INFER" ,
109 "resource_scope" : "MEMORY" ,
110 "description" : "Pass 1 – Extract scheduling layer: id, name, goal, intent_signature, inputs, outputs, dependencies, control_flow_features, entry_scene, subscene_refs from $frontmatter and $body" ,
111 "inputs" : { "frontmatter" : "$frontmatter" , "body" : "$body" },
112 "outputs" : { "scheduling" : "$scheduling" },
113 "next" : "step_reason_pass2"
114 },
115 {
116 "id" : "step_reason_pass2" ,
117 "scene_id" : "scene_reason" ,
118 "action_type" : "INFER" ,
119 "resource_scope" : "MEMORY" ,
120 "description" : "Pass 2 – Decompose skill execution flow into 2–5 macro-level scenes with allowed types, entry/exit conditions, transition rules, and input/output bindings" ,
121 "inputs" : { "body" : "$body" , "scheduling" : "$scheduling" },
122 "outputs" : { "scenes" : "$scenes" },
123 "next" : "step_reason_pass3"
124 },
125 {
126 "id" : "step_reason_pass3" ,
127 "scene_id" : "scene_reason" ,
128 "action_type" : "INFER" ,
129 "resource_scope" : "MEMORY" ,
130 "description" : "Pass 3 – Expand each scene into atomic logic steps with allowed action types, resource scopes, and $-prefixed variable bindings" ,
131 "inputs" : { "body" : "$body" , "scenes" : "$scenes" },
132 "outputs" : { "logic_steps" : "$logic_steps" },
133 "next" : "step_reason_compose"
134 },
135 {
136 "id" : "step_reason_compose" ,
137 "scene_id" : "scene_reason" ,
138 "action_type" : "WRITE" ,
139 "resource_scope" : "MEMORY" ,
140 "description" : "Assemble $scheduling, $scenes, and $logic_steps into the $draft_ssl JSON object" ,
141 "inputs" : { "scheduling" : "$scheduling" , "scenes" : "$scenes" , "logic_steps" : "$logic_steps" },
142 "outputs" : { "draft" : "$draft_ssl" },
143 "next" : "YIELD_SUCCESS"
144 },
145 {
146 "id" : "step_verify_validate" ,
147 "scene_id" : "scene_verify" ,
148 "action_type" : "VALIDATE" ,
149 "resource_scope" : "MEMORY" ,
150 "description" : "Run all Pass-4 validation rules against $draft_ssl: JSON syntax, required fields, enum membership, unique IDs, entry pointers, transition targets, graph integrity" ,
151 "inputs" : { "draft" : "$draft_ssl" },
152 "outputs" : { "failures" : "$validation_failures" },
153 "next" : "YIELD_SUCCESS"
154 },
155 {
156 "id" : "step_recover_log" ,
157 "scene_id" : "scene_recover" ,
158 "action_type" : "UPDATE_STATE" ,
159 "resource_scope" : "MEMORY" ,
160 "description" : "Append $validation_failures to $failure_log and increment $retry_count" ,
161 "inputs" : { "failures" : "$validation_failures" , "retry_count" : "$retry_count" },
162 "outputs" : { "retry_count" : "$retry_count" , "failure_log" : "$failure_log" },
163 "next" : "YIELD_SUCCESS"
164 },
165 {
166 "id" : "step_finalize_write" ,
167 "scene_id" : "scene_finalize" ,
168 "action_type" : "WRITE" ,
169 "resource_scope" : "LOCAL_FS" ,
170 "description" : "Write $draft_ssl as ssl.json into the same directory as the source SKILL.md" ,
171 "inputs" : { "draft" : "$draft_ssl" , "skill_path" : "$skill_path" },
172 "outputs" : { "ssl_json" : "$ssl_json" },
173 "next" : "step_finalize_report"
174 },
175 {
176 "id" : "step_finalize_report" ,
177 "scene_id" : "scene_finalize" ,
178 "action_type" : "NOTIFY" ,
179 "resource_scope" : "MEMORY" ,
180 "description" : "Compose and emit the validation report containing processed count, valid/rejected counts, and per-artifact diagnostics from $failure_log" ,
181 "inputs" : { "ssl_json" : "$ssl_json" , "failure_log" : "$failure_log" },
182 "outputs" : { "report" : "$validation_report" },
183 "next" : "YIELD_SUCCESS"
184 }
185 ]
186 }