Skip to content

Commit 0d7d5f9

Browse files
Kasper Jungeclaude
authored andcommitted
docs: remove stale references to instructions primitive and ad-hoc prompts
The instructions primitive and the -p ad-hoc prompt flag were removed but several docs still referenced them. A new user following the README would hit errors trying to use `ralph new instruction` or `ralph run -p`. - README: remove instructions section, fix "four primitives" → "three", remove -p examples, add named ralph example - index.md: remove ad-hoc prompt example - changelog.md: document instructions and -p removal in 0.1.7 breaking changes, fix stale "four primitive types" reference - codebase-map.md: remove stale "inline text" and "ad-hoc text" refs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a5e459b commit 0d7d5f9

4 files changed

Lines changed: 8 additions & 28 deletions

File tree

README.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ ralph run # Starts the loop (Ctrl+C to stop)
4444

4545
That's it. Two commands.
4646

47-
Or skip setup entirely with an ad-hoc prompt:
48-
49-
```bash
50-
ralph run -n 1 -p "Add type hints to all public functions in src/"
51-
```
52-
5347
### What `ralph init` creates
5448

5549
**`ralph.toml`** — tells ralphify what command to run:
@@ -70,7 +64,7 @@ Reads the prompt, pipes it to the agent, waits for it to finish, then does it ag
7064
```bash
7165
ralph run # Run forever
7266
ralph run -n 10 # Run 10 iterations then stop
73-
ralph run -p "Fix the login bug" # Ad-hoc prompt, no RALPH.md needed
67+
ralph run docs # Use a named ralph from .ralphify/ralphs/
7468
```
7569

7670
### What it looks like
@@ -114,7 +108,7 @@ Read the full writeup: [Ralph Wiggum as a "software engineer"](https://ghuntley.
114108

115109
## Beyond the basic loop
116110

117-
The simple loop works, but ralphify's real power comes from four primitives that live in the `.ralphify/` directory.
111+
The simple loop works, but ralphify's real power comes from three primitives that live in the `.ralphify/` directory.
118112

119113
### Checks — the self-healing loop
120114

@@ -163,16 +157,6 @@ command: git log --oneline -10
163157

164158
The command runs before each iteration. Use `{{ contexts.git-log }}` in your `RALPH.md` to control where the output appears.
165159

166-
### Instructions — reusable rules
167-
168-
Instructions are static text blocks (coding standards, commit conventions) you can toggle on and off without editing the prompt.
169-
170-
```bash
171-
ralph new instruction code-style
172-
```
173-
174-
Drop `{{ instructions }}` into `RALPH.md` to inject all enabled instructions.
175-
176160
### Ralphs — named task switcher
177161

178162
Keep multiple ralphs for different jobs and switch between them at run time:

docs/changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Simplified the CLI, added a spinner during iterations, and removed the experimen
1414

1515
- **Removed `ralph ui` subcommand and web dashboard** — the experimental web dashboard introduced in 0.1.6 has been removed. The dashboard depended on FastAPI, React, and SQLite, adding significant complexity for a feature that wasn't ready for production use. All dashboard-related API endpoints, persistent history, and WebSocket streaming have been removed. The core agent streaming (Claude Code auto-detection with `--output-format stream-json`) remains — it's used by the CLI for live activity tracking.
1616
- **Removed `ralph ralphs` subcommand**`ralph new <name>` is now shorthand for `ralph new ralph <name>`.
17+
- **Removed instructions primitive** — the `instructions` primitive type introduced in 0.1.3 has been removed. Use contexts for injecting reusable rules into prompts instead. The `{{ instructions }}` and `{{ instructions.name }}` placeholders no longer resolve.
18+
- **Removed ad-hoc prompts (`-p` flag)** — the `--prompt` / `-p` flag on `ralph run` has been removed. The positional `[PROMPT]` argument now exclusively accepts a named ralph from `.ralphify/ralphs/`. To run a quick one-off task, create a named ralph with `ralph new`.
1719

1820
### Added
1921

@@ -26,7 +28,7 @@ Simplified the CLI, added a spinner during iterations, and removed the experimen
2628

2729
### Improved
2830

29-
- Introduced `Primitive` protocol in `_discovery.py` so all four primitive types (`Check`, `Context`, `Instruction`, `Ralph`) share a typed interface for discovery, filtering, merging, and display.
31+
- Introduced `Primitive` protocol in `_discovery.py` so all three primitive types (`Check`, `Context`, `Ralph`) share a typed interface for discovery, filtering, merging, and display.
3032
- Added generic `_discover_and_filter_enabled()` in the engine, replacing per-type boilerplate with a single code path bounded by the `Primitive` protocol.
3133
- Moved check result serialization into `CheckResult.to_event_data()` so event data formatting has a single source of truth.
3234
- Added missing event data fields (`result_text`, `detail`, `duration_formatted`) to API docs so library users see what the engine actually emits.

docs/contributing/codebase-map.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ ralph run
5353
5454
├── cli.py:run() — parse options, print banner
5555
│ ├── Load config from ralph.toml
56-
│ ├── Resolve prompt via ralphs.resolve_ralph_source() (name > file path > inline text > toml)
56+
│ ├── Resolve prompt via ralphs.resolve_ralph_source() (name > file path > toml)
5757
│ └── Build RunConfig and call engine.run_loop()
5858
5959
└── engine.py:run_loop(config, state, emitter)
6060
├── Discover checks, contexts from .ralphify/
6161
└── Loop:
62-
├── Read RALPH.md (or use ad-hoc text)
62+
├── Read RALPH.md
6363
├── Run contexts → resolve {{ contexts.* }} placeholders
6464
├── Append check failures from previous iteration (if any)
6565
├── Pipe assembled prompt to agent command via subprocess
@@ -112,7 +112,7 @@ The CLI uses a `ConsoleEmitter` (defined in `_console_emitter.py`) that renders
112112

113113
1. **`engine.py`** — The core run loop. Uses `RunConfig` and `RunState` (from `_run_types.py`) and `EventEmitter`. This is where iteration logic lives.
114114
2. **`_run_types.py`**`RunConfig`, `RunState`, and `RunStatus`. These are the shared data types used by the engine, CLI, and manager. Separated so modules that only need the types don't pull in execution logic.
115-
3. **`cli.py`** — All CLI commands. Delegates to `engine.run_loop()` for the actual loop. Prompt source resolution (name vs. file path vs. inline) lives in `ralphs.py:resolve_ralph_source()`. Scaffold templates live in `_templates.py`. Terminal event rendering lives in `_console_emitter.py`.
115+
3. **`cli.py`** — All CLI commands. Delegates to `engine.run_loop()` for the actual loop. Prompt source resolution (name vs. file path) lives in `ralphs.py:resolve_ralph_source()`. Scaffold templates live in `_templates.py`. Terminal event rendering lives in `_console_emitter.py`.
116116
4. **`_frontmatter.py`** + **`_discovery.py`** — Frontmatter parsing and primitive discovery. `_frontmatter.py` handles YAML parsing and defines marker constants. `_discovery.py` defines the `Primitive` protocol, scans `.ralphify/` directories, and provides `merge_by_name()` for overlaying ralph-scoped primitives on globals. Understanding both is essential for working on checks/contexts/ralphs.
117117
5. **`resolver.py`** — Template placeholder logic used by contexts. Small file but critical.
118118

docs/index.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ ralph run # Starts the loop (Ctrl+C to stop)
4848

4949
`ralph init` creates a config file and a starter prompt. `ralph run` reads the prompt, pipes it to the agent, waits for it to finish, and does it again. Edit `RALPH.md` while the loop is running — changes take effect on the next iteration.
5050

51-
Or skip setup and pass a prompt directly:
52-
53-
```bash
54-
ralph run "Add type hints to all public functions in src/" -n 1
55-
```
56-
5751
### What it looks like
5852

5953
```

0 commit comments

Comments
 (0)