Execute FileOpsREQ protocol requests. Handles autoflow domain ops for .ccb/ state management.
Install
npx skillscat add bfly123/claude-code-bridge/codex-skills-file-op Install via the SkillsCat registry.
FileOps Executor (Codex Side)
You receive FileOpsREQ JSON from Claude and must return FileOpsRES JSON only. No markdown, no prose.
Protocol Reference
See ~/.claude/skills/docs/protocol.md for full FileOpsREQ/FileOpsRES schema.
Execution Rules
- Parse the incoming FileOpsREQ JSON
- Validate against schema (proto, id, purpose, ops, done, report)
- Execute each op in order
- Return FileOpsRES JSON only
AutoFlow Domain Ops Implementation
All state files live under .ccb/ directory relative to repo root.
autoflow_plan_init
Input: plan object with taskName, objective, context, constraints, steps[], finalDone[]
Actions:
- Create
.ccb/directory if not exists - Build
state.jsonfrom plan:{ "taskName": plan.taskName, "objective": plan.objective, "context": plan.context, "constraints": plan.constraints, "current": { "type": "step", "stepIndex": 1, "subIndex": null }, "steps": [ { "index": i+1, "title": title, "status": "todo" (first="doing"), "attempts": 0, "substeps": [] } ], "finalDone": plan.finalDone } - Write
.ccb/state.json - Generate
.ccb/todo.mdfrom state (see formats.md) - Generate
.ccb/plan_log.mdwith initial plan entry
autoflow_state_preflight
Input: path (default .ccb/state.json), maxAttempts (default 2)
Actions:
- Read
.ccb/state.json - If file missing → return fail status with "No plan. Use /tp first."
- Validate
currentpointer - If
current.type == "none"→ return ok with taskComplete flag - Get current step/substep, check attempts < maxAttempts
- If attempts exceeded → return fail with "Max attempts exceeded"
- Increment attempts, write back
.ccb/state.json - Return ok with
data.state(current pointer) anddata.stepContext(step title, objective, relevant info)
autoflow_state_apply_split
Input: stepIndex, substeps (array of 3-7 title strings)
Actions:
- Read
.ccb/state.json - Find step by stepIndex
- Set step.substeps = substeps mapped to
{ index: i+1, title: t, status: "todo" }, first one "doing" - Set
current = { type: "substep", stepIndex: stepIndex, subIndex: 1 } - Write
.ccb/state.json - Regenerate
.ccb/todo.md
autoflow_state_finalize
Input: verification (string), changedFiles (optional array)
Actions:
- Read
.ccb/state.json - Mark current step/substep status = "done"
- Advance
currentto next todo step/substep:- If substeps remain in current step → next substep
- If no substeps remain → next step
- If no steps remain → set
current = { type: "none", stepIndex: null, subIndex: null }
- If next item exists, set its status to "doing"
- Write
.ccb/state.json - Regenerate
.ccb/todo.md - Append completion entry to
.ccb/plan_log.md
autoflow_state_mark_blocked
Input: reason (string)
Actions:
- Read
.ccb/state.json - Mark current step/substep status = "blocked"
- Write
.ccb/state.json - Regenerate
.ccb/todo.md
autoflow_state_append_steps
Input: steps (array of 1-2 title strings), maxAllowed (default 2)
Precondition: current.type == "none" (task completed)
Actions:
- Read
.ccb/state.json - If steps.length > maxAllowed → return fail
- Append new steps to steps array
- Set
currentto first new step, mark it "doing" - Write
.ccb/state.json - Regenerate
.ccb/todo.md - Append to
.ccb/plan_log.md
Output Format
Always return pure JSON matching FileOpsRES schema. Never wrap in markdown code blocks.