terraphim / terraphim/terraphim-ai

Epic: Leverage Paperclip features into AI Dark Factory

Open
#637 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rust
Stars
62
Forks
5
Avg merge
2h 27m
Merged PRs (30d)
1

Description

Overview

Phased plan to bring key Paperclip (paperclipai/paperclip) control-plane features into ADF (terraphim_orchestrator), adapted for Rust and file-based state (no database).

Research document: cto-executive-system/plans/research-paperclip-leverage-into-adf.md

Phases

  • Phase 1: Cost Tracking + Output Parsing #638
  • Phase 2: Session Persistence #639
  • Phase 3: Config Revisions with Rollback #640
  • Phase 4: Structured Activity Log #641
  • Phase 5: Approval Gates #642

Context

ADF is a Rust-based agent orchestrator running on bigbox that spawns CLI agents (Claude Code, Codex) using a reconciliation loop with Safety/Core/Growth layer hierarchy. Paperclip is a Node.js/React control plane for AI agent companies with cost tracking, session persistence, config versioning, approval gates, and audit logging.

Architecture Decision

All features implemented in Rust with file-based JSON/JSONL state. No PostgreSQL dependency. Each phase is independently shippable and testable.

ADF Strengths to Preserve

  • Rust performance (single binary orchestrator)
  • NightwatchMonitor drift detection
  • CompoundReview cross-agent synthesis
  • RoutingEngine keyword-based model selection
  • Safety/Core/Growth layer hierarchy

Key Design Decisions

  • No database: File-based JSON/JSONL state (atomic writes with .tmp+rename)
  • Backward-compatible: All new config fields use #[serde(default)]
  • Incremental: Each phase ships independently with its own tests
  • Claude-first: Cost tracking and session persistence leverage Claude Code's --output-format stream-json and --resume flags; Codex agents gracefully degrade

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cto-executive-system/plans/research-paperclip-leverage-into-adf.md and review phase issues #638–#642. Confirm how each Paperclip feature maps to Rust and file-based JSON/JSONL state without PostgreSQL. Done means the five phases are independently shippable, backward-compatible, and covered by their own tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.