dark-factory-node-type
Guide for implementing, registering, and testing new pipeline node types and handlers in the Dark Factory DOT runner.
SKILL.md.claude/skills/dark-factory-node-type/SKILL.md
GitHubAdding a New Node Type in Dark Factory
Use this skill when extending the Dark Factory pipeline engine with a new node type, custom execution handler, or graph shape mapping in runner/handlers.py.
When to use
- Adding a new handler function to
runner/handlers.py. - Registering a custom handler in
TYPE_REGISTRYorREGISTRY. - Referencing a new handler in
.dotpipeline graphs viatype="..."or custom node shape. - Writing echo-backend unit tests to exercise custom handler outcomes and state mutations.
Procedure
Implement the handler: Implement
_my_handler(node, ctx) -> Resultinrunner/handlers.py.Register the handler: Register in
TYPE_REGISTRY(preferred — keyed bytype="...") orREGISTRY(keyed by DOT shape).Reference from a pipeline graph: Reference from a
.dotfile withmynode [type="my_handler", ...].Add echo-backend unit tests: Echo-backend tests should drive paths via
ctx.state["<node>.outcome"]— seetests/test_gates.py.