You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
├── _templates.py # Scaffold templates for init and new commands
@@ -118,10 +119,11 @@ The CLI uses a `ConsoleEmitter` (defined in `_console_emitter.py`) that renders
118
119
119
120
## Key files to understand first
120
121
121
-
1.**`engine.py`** — The core run loop. Understands `RunConfig`, `RunState`, and `EventEmitter`. This is where iteration logic lives.
122
-
2.**`cli.py`** — All CLI commands and prompt resolution. Delegates to `engine.run_loop()` for the actual loop. Scaffold templates live in `_templates.py`. Terminal event rendering lives in `_console_emitter.py`.
123
-
3.**`_frontmatter.py`** — The primitive discovery system. Understanding `discover_primitives()` and `parse_frontmatter()` is essential for working on checks/contexts/instructions/prompts.
124
-
4.**`resolver.py`** — Template placeholder logic shared by contexts and instructions. Small file but critical — changes here affect both.
122
+
1.**`engine.py`** — The core run loop. Uses `RunConfig` and `RunState` (from `_run_types.py`) and `EventEmitter`. This is where iteration logic lives.
123
+
2.**`_run_types.py`** — `RunConfig`, `RunState`, and `RunStatus`. These are the shared data types used by the engine, CLI, manager, and UI. Separated so modules that only need the types don't pull in execution logic.
124
+
3.**`cli.py`** — All CLI commands and prompt resolution. Delegates to `engine.run_loop()` for the actual loop. Scaffold templates live in `_templates.py`. Terminal event rendering lives in `_console_emitter.py`.
125
+
4.**`_frontmatter.py`** — The primitive discovery system. Understanding `discover_primitives()` and `parse_frontmatter()` is essential for working on checks/contexts/instructions/prompts.
126
+
5.**`resolver.py`** — Template placeholder logic shared by contexts and instructions. Small file but critical — changes here affect both.
0 commit comments