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
docs: replace inline # comments with code annotations in quick-reference placeholders (category 6)
The placeholder code blocks used bare # comments that would appear as
literal text in a RALPH.md file. Replace with MkDocs Material code
annotations for consistency with the RALPH.md format section on the
same page.
Co-authored-by: Ralphify <noreply@ralphify.co>
Copy file name to clipboardExpand all lines: docs/quick-reference.md
+17-10Lines changed: 17 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,12 +102,13 @@ Your instructions here. Use {{ args.dir }} for user arguments. <!-- (6) -->
102
102
### Command placeholders
103
103
104
104
```markdown
105
-
{{ commands.tests }} # Replaced with test command output
106
-
{{ commands.git-log }} # Replaced with git-log command output
105
+
{{ commands.tests }} <!-- (1) -->
106
+
{{ commands.git-log }} <!-- (2) -->
107
107
```
108
108
109
-
- Output includes stdout + stderr regardless of exit code
110
-
- Only commands referenced by a placeholder appear in the prompt — unreferenced commands still run but their output is excluded
109
+
1. Replaced with the `tests` command's stdout + stderr, regardless of exit code.
110
+
2. Replaced with the `git-log` command's output. Only commands referenced by a placeholder appear in the assembled prompt — unreferenced commands still run but their output is excluded.
111
+
111
112
- Unmatched placeholders resolve to empty string
112
113
- Must be `commands` (plural)
113
114
@@ -116,25 +117,31 @@ For details on writing effective prompts with placeholders, see [Writing Prompts
116
117
### User argument placeholders
117
118
118
119
```markdown
119
-
{{ args.dir }} # Replaced with --dir value from CLI
120
-
{{ args.focus }} # Replaced with --focus value from CLI
120
+
{{ args.dir }} <!-- (1) -->
121
+
{{ args.focus }} <!-- (2) -->
121
122
```
122
123
124
+
1. Replaced with the `--dir` value from the CLI. Missing args resolve to empty string.
125
+
2. Replaced with the `--focus` value from the CLI.
126
+
123
127
- Pass via `ralph run my-ralph --dir ./src --focus "perf"` or `--dir=./src` (named flags)
124
128
- Or positionally: `ralph run my-ralph ./src "perf"` (requires `args:` in frontmatter)
125
129
- Mixed: `ralph run my-ralph --focus "perf" ./src` — positional args skip names already provided via flags
126
130
-`--` ends flag parsing: `ralph run my-ralph -- --verbose ./src` treats `--verbose` as a positional value
127
-
- Missing args resolve to empty string
128
131
- See [CLI reference → User arguments](cli.md#user-arguments) for full details on flag and positional parsing
129
132
130
133
### ralph placeholders
131
134
132
135
```markdown
133
-
{{ ralph.name }} # ralph directory name (e.g. "my-ralph")
134
-
{{ ralph.iteration }} # Current iteration number (1-based)
135
-
{{ ralph.max_iterations }} # Total iterations if -n was set, empty otherwise
136
+
{{ ralph.name }} <!-- (1) -->
137
+
{{ ralph.iteration }} <!-- (2) -->
138
+
{{ ralph.max_iterations }} <!-- (3) -->
136
139
```
137
140
141
+
1. Ralph directory name (e.g. `my-ralph`).
142
+
2. Current iteration number (1-based).
143
+
3. Total iterations if `-n` was set, empty otherwise.
144
+
138
145
- Automatically available — no frontmatter configuration needed
139
146
- Useful for progress tracking, naming logs, or adjusting behavior near the end of a run
140
147
- See [How it Works](how-it-works.md) for more on the loop lifecycle
0 commit comments