|
| 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 | +} |
0 commit comments