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
feat: add prompts as a first-class primitive so users can save, switch between, and reuse task-focused prompts
- Create src/ralphify/prompts.py with discover_prompts(), resolve_prompt_name(), is_prompt_name()
- Add `ralph new prompt <name>` scaffold command
- Add `ralph prompts list` to show available prompts
- Add positional `prompt_name` arg to `ralph run` with priority chain:
inline text > positional name > --prompt-file > ralph.toml > root PROMPT.md
- Strip frontmatter when reading prompt files in engine
- Add prompt_name to RunConfig and RUN_STARTED event
- Register prompts in UI primitives API for automatic CRUD
- Add prompt_name to RunCreate model and resolve in create_run()
- Update CLAUDE.md with prompts.py and PROMPT.md marker reference
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-`checks.py`, `contexts.py`, `instructions.py` — The three primitive types
28
+
-`prompts.py` — Named prompt discovery and resolution
29
+
-`checks.py`, `contexts.py`, `instructions.py` — The other three primitive types
29
30
30
31
Tests are in `tests/` with one file per module. Docs are in `docs/` using MkDocs with Material theme.
31
32
@@ -38,7 +39,7 @@ Tests are in `tests/` with one file per module. Docs are in `docs/` using MkDocs
38
39
39
40
## Traps
40
41
41
-
- Primitive marker filenames (`CHECK.md`, `CONTEXT.md`, `INSTRUCTION.md`) are hardcoded in each module's `discover_*()` function AND in scaffold templates in `cli.py`. Change one → update both.
42
+
- Primitive marker filenames (`CHECK.md`, `CONTEXT.md`, `INSTRUCTION.md`, `PROMPT.md`) are hardcoded in each module's `discover_*()` function AND in scaffold templates in `cli.py`. Change one → update both.
42
43
-`timeout` and `enabled` frontmatter fields have special type coercion in `_frontmatter.py:parse_frontmatter()`. New typed fields need coercion logic added there.
43
44
- Both contexts and instructions share `resolver.py:resolve_placeholders()`. Changes affect both.
44
45
- Output is truncated to 5000 chars in `_output.py`. This is intentional.
0 commit comments