Skip to content

Commit 252f5d0

Browse files
Kasper JungeRalphify
authored andcommitted
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>
1 parent 13ad620 commit 252f5d0

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

docs/quick-reference.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,13 @@ Your instructions here. Use {{ args.dir }} for user arguments. <!-- (6) -->
102102
### Command placeholders
103103

104104
```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) -->
107107
```
108108

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+
111112
- Unmatched placeholders resolve to empty string
112113
- Must be `commands` (plural)
113114

@@ -116,25 +117,31 @@ For details on writing effective prompts with placeholders, see [Writing Prompts
116117
### User argument placeholders
117118

118119
```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) -->
121122
```
122123

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+
123127
- Pass via `ralph run my-ralph --dir ./src --focus "perf"` or `--dir=./src` (named flags)
124128
- Or positionally: `ralph run my-ralph ./src "perf"` (requires `args:` in frontmatter)
125129
- Mixed: `ralph run my-ralph --focus "perf" ./src` — positional args skip names already provided via flags
126130
- `--` ends flag parsing: `ralph run my-ralph -- --verbose ./src` treats `--verbose` as a positional value
127-
- Missing args resolve to empty string
128131
- See [CLI reference → User arguments](cli.md#user-arguments) for full details on flag and positional parsing
129132

130133
### ralph placeholders
131134

132135
```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) -->
136139
```
137140

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+
138145
- Automatically available — no frontmatter configuration needed
139146
- Useful for progress tracking, naming logs, or adjusting behavior near the end of a run
140147
- See [How it Works](how-it-works.md) for more on the loop lifecycle

0 commit comments

Comments
 (0)