2026-01-03 05:07:45 +01:00
# Journaling Workflow
## Why Journal
1. Becomes searchable knowledge for future agents
2. Helps with task handoffs
3. Documents decisions and learnings
4. Required before key transitions
2026-06-05 17:20:36 +02:00
## The Tool
2026-01-03 05:07:45 +01:00
2026-06-16 23:18:55 +02:00
Journaling is a single content tool: `note(text, scope, ...)` on the `roboco-do` MCP server. There is **no** separate `roboco_journal_*` tool — the `scope` argument selects the kind of entry.
2026-06-05 17:20:36 +02:00
| `scope` | Use For |
|---------|---------|
| `note` (default) | General observation |
| `reflect` | End-of-task summary (what done / learned / struggled) |
| `decision` | Architectural decision (context / options / chosen / rationale) |
2026-01-03 05:07:45 +01:00
| `learning` | New knowledge gained |
| `struggle` | Problems and solutions |
## Creating Entries
```python
# General entry
2026-06-05 17:20:36 +02:00
note (
text = "SCAN is better than KEYS for large Redis datasets" ,
scope = "learning" ,
task_id = task_id ,
)
2026-01-03 05:07:45 +01:00
2026-06-05 17:20:36 +02:00
# Decision log — `decision` scope uses the structured fields
note (
text = "Chose Redis for session storage" ,
scope = "decision" ,
task_id = task_id ,
context = "Need fast session lookups, ephemeral data" ,
options = [
{ "name" : "PostgreSQL" , "pros" : "durable" , "cons" : "slower" },
{ "name" : "Redis" , "pros" : "sub-ms reads" , "cons" : "ephemeral" },
{ "name" : "In-memory" , "pros" : "fastest" , "cons" : "lost on restart" },
],
chosen = "Redis" ,
rationale = "Sub-millisecond reads; data is ephemeral by design" ,
consequences = [ "Adds Redis as a session dependency" ],
)
2026-01-03 05:07:45 +01:00
# Struggle (problem and solution)
2026-06-05 17:20:36 +02:00
note (
text = "Tests failing intermittently; root cause was a setup race condition" ,
scope = "struggle" ,
task_id = task_id ,
)
2026-01-03 05:07:45 +01:00
```
2026-06-16 23:18:55 +02:00
`options` , `consequences` , and `next_steps` accept either a list or a single value. For `decision` and `reflect` scopes the structured fields are recommended; the note is always recorded even if some are omitted.
2026-06-05 17:20:36 +02:00
2026-01-03 05:07:45 +01:00
## Required Reflections
2026-06-05 17:20:36 +02:00
Before submitting for QA or completing, write a `reflect` entry:
2026-01-03 05:07:45 +01:00
```python
2026-06-05 17:20:36 +02:00
note (
text = "Implemented rate limiting with Redis" ,
scope = "reflect" ,
task_id = task_id ,
what_done = "Redis-backed token bucket on the API edge" ,
what_learned = "Lua scripts give atomic check-and-decrement" ,
what_struggled = "Testing concurrent requests deterministically" ,
next_steps = [ "Add a regression test for the boundary case" ],
)
2026-01-03 05:07:45 +01:00
```
## Searching Journals
2026-06-16 23:18:55 +02:00
Journal entries are indexed into the knowledge base. Search them through the `roboco-optimal` RAG tools (there is no dedicated journal-search verb):
2026-01-03 05:07:45 +01:00
2026-06-05 17:20:36 +02:00
```python
# Semantic search across the KB, filtered to journal entries
roboco_kb_search ( query = "rate limiting patterns" , index_types = [ "journals" ])
# Or ask the mentor, which searches all sources including journals
roboco_ask_mentor ( question = "What did we decide about rate limiting?" )
2026-01-03 05:07:45 +01:00
```
## Best Practices
1. **Journal as you go** - Don't wait until end
2. **Be specific** - Generic entries are less searchable
2026-06-05 17:20:36 +02:00
3. **Record failures** - They're valuable learning (`scope="struggle"` )
4. **Use the right scope** - `decision` / `reflect` light up the panel views
2026-01-03 05:07:45 +01:00
5. **Include context** - Future searchers need it