terraphim / terraphim/terraphim-ai
Phase 4: Structured activity log for ADF
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 62
- Forks
- 5
- Avg merge
- 2h 27m
- Merged PRs (30d)
- 1
Description
Parent Epic
#637
Summary
Extend telemetry JSONL with structured activity events for all orchestrator mutations and agent lifecycle events.
Changes Required
terraphim_orchestrator
- New
activity.rsmodule withActivityEventenum and JSONL writer - Events to log:
ConfigChanged {before_hash, after_hash, changed_keys}BudgetWarning {agent, spent_cents, budget_cents, percentage}BudgetPaused {agent, spent_cents, budget_cents}AgentDriftDetected {agent, score, level, action_taken}AgentRestarted {agent, reason, restart_count, session_resumed}CompoundReviewCompleted {findings_count, pr_created, duration}ApprovalRequested {id, type, agent}ApprovalDecided {id, decision, actor}
- Schema:
{timestamp, event_type, agent_name, details: {}, actor: "system"|"human"|agent_name} - Write to
activity.jsonlin logs directory
Integration
- Replace ad-hoc
telemetry.jsonlwrites with structuredActivityEventemissions - Activity log is append-only, rotatable by external logrotate
Reference
- Paperclip activity log:
packages/db/src/schema/activity_log.ts - Paperclip activity service:
server/src/services/activity.ts
Acceptance Criteria
- All orchestrator mutations emit structured activity events
- Events written to
activity.jsonlwith consistent schema - Events include timestamp, event_type, agent_name, details
- Backward compatible with existing telemetry (can coexist)
-
adf activityCLI command to tail/query recent events
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed terraphim_orchestrator/activity.rs module and review the Paperclip activity log references at packages/db/src/schema/activity_log.ts and server/src/services/activity.ts. Trace existing telemetry.jsonl writes before defining the structured event integration. Done means orchestrator mutations emit consistent append-only activity.jsonl events, existing telemetry remains compatible, and the adf activity CLI command can tail or query recent events.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100