workspace/projects/<id>/logs/. Together they tell you what the model did, what you asked for, and what you uploaded — chronological, structured, never overwritten. The logs are how Ralphy reasons across sessions (“we tried this prompt three times and it kept missing the same way”), how the cost rollup gets built, and how the auto-generated postmortem knows what happened. They are also your audit trail when something looks wrong.
The contract is AGENTS invariant #13: append-only. No “tidy up” passes, no in-place rewrites, no silent truncation. Reading or filtering is fine; mutating is not.
The three log files
| File | Written by | Carries |
|---|---|---|
generations.jsonl | ralphy generate (every sub-verb), ralphy render, ffmpeg recipes | Provider, model, slot, input, output, latency, cost, status |
user-prompts.jsonl | ralphy project log-prompt, intake stages, --no-ref-consent override | Stage label, prompt text, timestamp, optional note |
user-assets.jsonl | ralphy project log-asset | Kind (screenshot / photo / video / doc / ref-url), source path or URL, purpose |
fs.appendFile in cli/lib/gen-log.ts.
Reading with project log
--type generations— model calls and renders.--type user-prompts— what you said, when, at which stage of the intake.--type user-assets— what you uploaded as a reference.--type all— all three, merged and sorted chronologically.
-p. The default JSON is what you want for piping to jq.
Chronological view with timeline
Writing to the user logs
Two verbs append touser-prompts.jsonl and user-assets.jsonl from the CLI directly. Use them when the agent isn’t running and you want to record context for the next session.
brief, feedback, decision, no-ref-consent, clarification, etc. The intake protocol uses them to reconstruct the conversation flow.
Cost rollups with jq
generations.jsonl carries cost_usd and model fields on every entry. Roll up by model:
ralphy batch show <id> --json aggregates the same numbers across all projects in the batch.
The auto-generated postmortem
APOSTMORTEM.md lands at the root of any project that the /postmortem skill has been run on. The skill triggers automatically on batch completion and on demand any time the user types /postmortem or asks for a “retro” / “lessons learned” / “debrief”. For non-trivial multi-iteration sessions, the skill writes six structured files under workspace/projects/<id>/postmortem/:
- Chronological chat history extracted from the log files.
- Lessons learned (with project-specific receipts).
- Ralphy CLI bug list — the raw
bunx/ffmpeg/curlworkarounds the agent had to reach for, so the verb gap can be filed. - Model and cost rollup.
- Workflow and playbook fixes.
cli/commands/.
Cost discipline
Three rules from the playbooks worth internalizing:- Always cross-check
MODELS.mdbefore assuming a model’s price. Claude’s training is stale; the canonical numbers live inMODELS.mdand the live OpenRouter catalog (ralphy models list). --dry-runis free. Every paidgeneratesub-verb supports it. Always preview before a 10-second kling call or a long ElevenLabs Music render. Detail: Generating assets.- Budget caps are the lever, not model downgrade. AGENTS invariant bans “use a cheaper draft model” as a cost strategy — Ralphy uses the best model throughout. If you need to control cost, set a budget cap on the batch or generate fewer variants; don’t drop to a worse model.
When a log file looks weird
The append-only contract means the logs should grow monotonically. If you ever see agenerations.jsonl that shrank between sessions, something violated the contract — either a tool wrote to the file outside the CLI, or a backup restore overwrote it. Both are bugs worth reporting. The CLI’s own append path is well-tested; the failure modes are usually outside.
If you suspect drift between the manifest and the files on disk:
Cross-project workspace stats
jq and filter by generatedAt to scope to a date range.
Related
- Generation log concept — the JSONL schema in concept form
- Memory schemas — every field on every log entry
- Reviewing and iterating — what the gen-log lets you reconstruct
- Generating assets —
--dry-runand cost preview MODELS.md— per-model pricing/postmortemskill — the auto-postmortem flow