feat: improve generated agent prompts

This commit is contained in:
2026-06-02 12:49:55 +01:00
parent 318b9471ae
commit 7a1d36c03c
4 changed files with 281 additions and 18 deletions
+50 -12
View File
@@ -116,7 +116,7 @@ Acceptance Criteria:
## TASK-007 — Improve generated agent prompts
Status: Todo
Status: Done
Goal:
Make `rdb prompt` produce smaller, more direct prompts for Claude Code/local LLM agents.
@@ -130,21 +130,59 @@ Acceptance Criteria:
- Prompt limits scope to one small implementation step
- Add/update tests
## TASK-012 — Agent telemetry
## TASK-012 — Agent telemetry foundation
Status: Todo
Goal:
Capture actual agent actions rather than inferring behaviour
from documentation and run logs.
Create a minimal telemetry writer for future agent activity tracking.
Examples:
Implementation Gap:
There is currently no persistent session log for recording agent activity. Guardrails infer behaviour from markdown and RUN_LOG.md instead of structured telemetry.
- file reads
- file writes
- command execution
- test execution
- git activity
Acceptance Criteria:
Output:
.rdb/session-log.jsonl
- Add a telemetry module
- Create `.rdb/session-log.jsonl` when recording an event
- Record JSONL events with:
- timestamp
- event_type
- target
- details
- Add tests for writing and appending telemetry events
- Do not integrate telemetry into every CLI command yet
## TASK-013 — Log CLI command execution
Status: Todo
Goal:
Record rdb CLI command execution into telemetry.
Implementation Gap:
Telemetry writer exists, but CLI commands do not yet record command execution events.
Acceptance Criteria:
- Record command execution events
- Include command name
- Include success/failure where practical
- Add/update tests
## TASK-014 — Use telemetry in guardrails
Status: Todo
Goal:
Make `rdb guardrails` use structured telemetry when available.
Implementation Gap:
Guardrails currently rely on markdown and file mtimes rather than `.rdb/session-log.jsonl`.
Acceptance Criteria:
- Read telemetry events when present
- Detect repeated reads from telemetry
- Detect repeated commands from telemetry
- Fall back gracefully if telemetry is missing
- Add/update tests