@looplia/looplia-cli 0.7.4 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,217 +0,0 @@
1
- ---
2
- name: workflow-executor-inline
3
- description: |
4
- Inline workflow executor for proxy providers (ZenMux, custom API providers).
5
- Executes workflow steps directly in the main context WITHOUT spawning Task subagents.
6
-
7
- Use this skill when:
8
- - Running looplia workflows via ZenMux or other proxy providers
9
- - Task subagents fail with "invalid_model" errors
10
- - You need inline execution without context isolation
11
-
12
- Architecture: Each workflow step is executed INLINE (no Task tool) - read skill, execute
13
- mission, write output, then proceed to next step. All steps share the main context.
14
-
15
- v0.6.6: Created for cross-provider compatibility with ZenMux.
16
- ---
17
-
18
- # Workflow Executor Inline (v0.6.6)
19
-
20
- Execute looplia workflows **without Task subagents**. This skill is specifically designed for proxy providers (ZenMux, custom) where the Claude Agent SDK's subagent spawning doesn't work due to model name incompatibility.
21
-
22
- ## When to Use
23
-
24
- Use this skill when:
25
- - The system has injected a hint to use inline execution
26
- - Running workflows via ZenMux or other proxy providers
27
- - Task subagents fail with "invalid_model" errors
28
-
29
- ## CRITICAL: Inline Execution (No Subagents)
30
-
31
- **DO NOT spawn Task subagents.** Execute all workflow steps directly in the main context.
32
-
33
- For each workflow step:
34
-
35
- 1. **Read the skill definition** using Skill tool: `Skill("{step.skill}")`
36
- 2. **Read input file(s)** if specified using Read tool
37
- 3. **Execute the mission** following skill instructions
38
- 4. **Write JSON output** to specified path using Write tool
39
- 5. **Validate output** (if validation rules defined)
40
- 6. **Proceed to next step**
41
-
42
- ---
43
-
44
- ## Execution Protocol
45
-
46
- ### Phase 1: Sandbox Setup
47
-
48
- Same as standard workflow-executor:
49
-
50
- 1. Generate sandbox ID:
51
- ```
52
- {first-input-name}-{YYYY-MM-DD}-{random4chars}
53
- Example: video-transcript-2025-12-18-xk7m
54
- ```
55
-
56
- 2. Create folder structure:
57
- ```
58
- sandbox/{sandbox-id}/
59
- ├── inputs/
60
- │ └── {input-files}.md
61
- ├── outputs/
62
- ├── logs/
63
- └── validation.json
64
- ```
65
-
66
- 3. Copy input files to `inputs/`
67
-
68
- ### Phase 2: Workflow Parsing
69
-
70
- 1. Read workflow file: `workflows/{workflow-id}.md`
71
- 2. Parse YAML frontmatter for steps
72
- 3. Validate each step has `skill:` and `mission:` fields
73
- 4. Build dependency graph from `needs:` fields
74
-
75
- ### Phase 3: Inline Step Execution
76
-
77
- **Execute steps ONE AT A TIME, INLINE (no Task tool):**
78
-
79
- ```
80
- FOR EACH step in dependency order:
81
-
82
-
83
- ┌─────────────────────────────────────────┐
84
- │ 1. INVOKE skill: Skill("{step.skill}") │
85
- │ → This loads skill context │
86
- │ │
87
- │ 2. READ input file (if provided) │
88
- │ → Use Read tool │
89
- │ │
90
- │ 3. EXECUTE mission │
91
- │ → Follow skill instructions │
92
- │ → Generate JSON output │
93
- │ │
94
- │ 4. WRITE output file │
95
- │ → Use Write tool │
96
- │ → Output to step.output path │
97
- │ │
98
- │ 5. VALIDATE output │
99
- │ → Check required_fields │
100
- │ → Retry if failed (max 2x) │
101
- │ │
102
- │ 6. UPDATE validation.json │
103
- │ → Mark step as validated: true │
104
- └─────────────────────────────────────────┘
105
-
106
-
107
- NEXT STEP
108
- ```
109
-
110
- ### Example: Inline Execution
111
-
112
- For step:
113
- ```yaml
114
- - id: analyze-content
115
- skill: media-reviewer
116
- mission: |
117
- Deep analysis of video transcript. Extract key themes,
118
- important quotes, and narrative structure.
119
- input: ${{ sandbox }}/inputs/content.md
120
- output: ${{ sandbox }}/outputs/analysis.json
121
- validate:
122
- required_fields: [contentId, headline, keyThemes]
123
- ```
124
-
125
- **Inline execution sequence:**
126
-
127
- 1. **Invoke skill:**
128
- ```
129
- Skill("media-reviewer")
130
- ```
131
-
132
- 2. **Read input:**
133
- ```
134
- Read("sandbox/video-2025-12-18-xk7m/inputs/content.md")
135
- ```
136
-
137
- 3. **Execute mission:**
138
- - Follow media-reviewer skill instructions
139
- - Analyze the content
140
- - Generate structured JSON output
141
-
142
- 4. **Write output:**
143
- ```
144
- Write("sandbox/video-2025-12-18-xk7m/outputs/analysis.json", jsonContent)
145
- ```
146
-
147
- 5. **Validate:**
148
- - Check contentId, headline, keyThemes exist
149
- - Update validation.json
150
-
151
- 6. **Proceed to next step**
152
-
153
- ---
154
-
155
- ## Anti-Patterns
156
-
157
- ❌ **WRONG - Spawning Task subagents:**
158
- ```json
159
- {
160
- "subagent_type": "workflow-step",
161
- "description": "Execute step...",
162
- "prompt": "..."
163
- }
164
- ```
165
- Task subagents don't work with proxy providers.
166
-
167
- ❌ **WRONG - Batching all steps:**
168
- Execute all steps at once without validation between them.
169
-
170
- ✅ **CORRECT - Inline step-by-step:**
171
- 1. Skill("media-reviewer")
172
- 2. Read input
173
- 3. Execute mission
174
- 4. Write output
175
- 5. Validate
176
- 6. Proceed to next
177
-
178
- ---
179
-
180
- ## Variable Substitution
181
-
182
- Same as standard workflow-executor:
183
-
184
- | Variable | Resolution |
185
- |----------|------------|
186
- | `${{ sandbox }}` | `sandbox/{sandbox-id}` |
187
- | `${{ inputs.{name} }}` | `sandbox/{id}/inputs/{name}.md` |
188
- | `${{ steps.{id}.output }}` | Output path of step `{id}` |
189
-
190
- ---
191
-
192
- ## Error Handling
193
-
194
- | Scenario | Action |
195
- |----------|--------|
196
- | Workflow not found | Error with available workflows |
197
- | Step missing `skill:` | Error: "Step missing required 'skill' field" |
198
- | Step missing `mission:` | Error: "Step missing required 'mission' field" |
199
- | Validation fails | Retry inline with feedback (max 2 retries) |
200
- | Max retries exceeded | Report failure with details |
201
-
202
- ---
203
-
204
- ## Key Differences from Standard workflow-executor
205
-
206
- | Aspect | workflow-executor | workflow-executor-inline |
207
- |--------|------------------|--------------------------|
208
- | Execution | Task subagent per step | Inline in main context |
209
- | Context | Isolated per step | Shared main context |
210
- | Provider Support | Anthropic Direct only | All providers |
211
- | Use Case | Production (Anthropic) | Proxy providers (ZenMux) |
212
-
213
- ---
214
-
215
- ## Version History
216
-
217
- - **v0.6.6**: Created for ZenMux cross-provider compatibility