Skip to content

Enhance scratchpad prompt and add test mode#3

Merged
hev merged 7 commits intomainfrom
fun
Jan 10, 2026
Merged

Enhance scratchpad prompt and add test mode#3
hev merged 7 commits intomainfrom
fun

Conversation

@hev
Copy link
Copy Markdown
Owner

@hev hev commented Jan 10, 2026

Summary

  • Enhanced default scratchpad prompt with structured workflow instructions for agent iterations
  • Added test mode for deterministic testing without Claude API calls
  • Documented scratchpad_prompt config option in README
  • Removed obsolete test coverage plan (all tests now implemented)

Test plan

  • All existing tests pass (go test ./...)
  • New scratchpad prompt follows structured format with sections for task tracking, testing, artifact management
  • README updated to reflect new default behaviors

🤖 Generated with Claude Code

hev and others added 7 commits January 10, 2026 05:57
Implement --test-mode flag that simulates the full Ralph loop without
calling the real Claude CLI. This enables testing of Slack notifications,
log output, and all phases (main loop, code review, cleanup, PR creation)
in a deterministic way.

Features:
- New internal/testmode package with MockClaude that simulates todo progress
- Three scenarios: success (default), error, partial
- Writes real TODO.md files so existing parsing/tracking works unchanged
- Exercises all notification hooks: SessionStart, TodoStarted, TodoCompleted,
  CodeReviewStarted/Complete, CleanupStarted/Complete, PRCreated, SessionEnd
- Demonstrates all log types (standard, verbose, error, success)

Also includes:
- Sound playback support with Ralph Wiggum quotes
- Version injection via ldflags in Makefile
- GitHub Actions CI/CD workflows
- GoReleaser configuration for releases

Slack: https://hevmindworkspace.slack.com/archives/C0A6L0UFU6R/p1768048187219089

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add documentation for the scratchpad_prompt configuration option that
allows customizing the instructions appended to prompts. Includes the
config reference example and explains the {{.AgentDir}} template syntax.

Slack: https://hevmindworkspace.slack.com/archives/C0A6L0UFU6R/p1768050250729429

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive agent workflow instructions including:
- Fresh plan review: validate ordering and dependencies
- Completed plan review: verify implementation, add improvements
- Testing: run before/after changes, no regressions
- Artifact management: keep items under .agent/items/, clean up when done
- Session hygiene: commit after cleanup, keep prompt.md updated

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The test coverage plan has been fully implemented - all packages now
have test files and tests are passing. The prompt.md file is no longer
needed.

Slack: https://hevmindworkspace.slack.com/archives/C0A6L0UFU6R/p1768050346701169

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The pattern `ralph` was too broad and matched both the binary
and the internal/ralph/ directory, causing CI failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
golangci-lint doesn't support Go 1.25 yet.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use atomic.Int64 for currentPending and currentComplete fields
to prevent data races when UpdateTodoCounts is called concurrently
with the observable gauge callbacks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@hev hev merged commit 0be683c into main Jan 10, 2026
6 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.

1 participant