scaffold_component
Scaffolds a strategy component stub for entry, exit, risk, sizer, or strategy, giving coding agents a framework-correct template to add trading logic.
Instructions
Write a framework-correct scaffold for a strategy component file.
Produces a minimal stub that matches echolon's loader contract —
class name + method signature + return schema — but contains no
trading logic. Coding agents refine the stub into real pathways.
Args:
kind: One of ``"entry"``, ``"exit"``, ``"risk"``, ``"sizer"``, ``"strategy"``.
strategy_dir: Absolute path to the directory where the file is written.
force: If True, overwrite an existing file. If False (default), refuse
and return ``success=False`` with ``error="file_exists"``.
Returns:
{
"success": bool,
"output_path": str (path to the scaffolded file, if success),
"kind": str (echoes the input),
"error": str | None (one of: "unknown_kind", "file_exists", None),
"message": str (human-readable summary),
}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| strategy_dir | Yes | ||
| force | No |