Bug
The incoherence skill crashes on invocation at step 1 with a TypeError:
TypeError: StepHeaderNode.__init__() got an unexpected keyword argument 'agent_type'
Root Cause
In skills/scripts/skills/incoherence/incoherence.py, line 166-172, format_incoherence_output() passes agent_type to StepHeaderNode, but StepHeaderNode (defined in skills/scripts/skills/lib/workflow/ast/nodes.py:70) does not accept that field.
Current code:
parts.append(render_step_header(StepHeaderNode(
title=title,
script="incoherence",
step=str(step), # also note: step should be int, not str
phase=phase,
agent_type=agent_type # <-- not a valid field
)))
StepHeaderNode fields:
@dataclass(frozen=True)
class StepHeaderNode:
title: str
script: str
step: int
category: str | None = None
mode: str | None = None
phase: str | None = None
total: int | None = None
Two issues:
agent_type is not a valid StepHeaderNode field — should be removed from the constructor call (it's already embedded in the title string)
step=str(step) passes a string, but the field is typed as int — should pass the raw integer
Suggested Fix
parts.append(render_step_header(StepHeaderNode(
title=title,
script="incoherence",
step=step,
phase=phase,
)))
Reproduction
cd .claude/skills/scripts
python3 -m skills.incoherence.incoherence --step-number 1
Bug
The incoherence skill crashes on invocation at step 1 with a
TypeError:Root Cause
In
skills/scripts/skills/incoherence/incoherence.py, line 166-172,format_incoherence_output()passesagent_typetoStepHeaderNode, butStepHeaderNode(defined inskills/scripts/skills/lib/workflow/ast/nodes.py:70) does not accept that field.Current code:
StepHeaderNodefields:Two issues:
agent_typeis not a validStepHeaderNodefield — should be removed from the constructor call (it's already embedded in thetitlestring)step=str(step)passes a string, but the field is typed asint— should pass the raw integerSuggested Fix
Reproduction
cd .claude/skills/scripts python3 -m skills.incoherence.incoherence --step-number 1