Skip to content

feat: add ralph.* placeholders for name, iteration, and max_iterations#37

Merged
kasperjunge merged 3 commits into
mainfrom
ralph-placeholders
Mar 24, 2026
Merged

feat: add ralph.* placeholders for name, iteration, and max_iterations#37
kasperjunge merged 3 commits into
mainfrom
ralph-placeholders

Conversation

@kasperjunge
Copy link
Copy Markdown
Collaborator

Summary

Closes #14. Supersedes #25.

  • Adds {{ ralph.name }}, {{ ralph.iteration }}, and {{ ralph.max_iterations }} built-in placeholders so ralphs can access runtime metadata in their prompts
  • No frontmatter configuration needed — these are automatically available
  • ralph.name resolves to the ralph directory name, ralph.iteration to the 1-based iteration number, and ralph.max_iterations to the total if -n was set (empty otherwise)

Based on @malpou's work in #25 (original context.* implementation), renamed to ralph.* for clarity — {{ ralph.name }} is immediately self-documenting in a RALPH.md file.

Test plan

  • All 447 tests pass (including new assertions for ralph placeholder resolution, missing keys, mixed namespaces, and engine integration)
  • mkdocs build --strict passes with zero warnings

🤖 Generated with Claude Code

malpou and others added 3 commits March 24, 2026 14:07
… max_iterations

Ralphs can now access runtime metadata via {{ context.name }},
{{ context.iteration }}, and {{ context.max_iterations }} placeholders.
These are resolved alongside existing command and arg placeholders in
a single pass to prevent cross-contamination.

Closes #14

Co-authored-by: Ralphify <noreply@ralphify.co>
…ations

Co-authored-by: Ralphify <noreply@ralphify.co>
{{ ralph.name }}, {{ ralph.iteration }}, and {{ ralph.max_iterations }}
read more naturally in RALPH.md files than the context.* prefix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kasperjunge kasperjunge merged commit d3e8698 into main Mar 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ralph name and iteration access

2 participants