Skip to content

Instantly share code, notes, and snippets.

@Darkflib
Created September 29, 2025 00:37
Show Gist options
  • Save Darkflib/befc536809603d46ac214cb952c645ac to your computer and use it in GitHub Desktop.
Save Darkflib/befc536809603d46ac214cb952c645ac to your computer and use it in GitHub Desktop.

Claudex Project Tasks

Granular Tasks (per sub-project)

Each task has:

  • Goal
  • Deliverables
  • Definition of Done (DoD)

1. Hook Relay (claudex-relay)

Goal: CLI invoked by Claude hooks; forwards JSON events to tray app; returns correct exit code/JSON.

  • Tasks:

    • Parse stdin JSON into Rust struct (derive serde).
    • Normalize event with timestamp + project fingerprint.
    • Open IPC connection (UDS/named pipe).
    • Send event; handle retries if tray is offline.
    • Return exit code 0/2 or JSON response depending on config.
  • DoD: Given hook JSON fixture, relay emits correct IPC payload and returns expected exit code.


2. IPC Layer

Goal: Cross-platform socket abstraction for local event streaming.

  • Tasks:

    • Implement UDS server (Linux/macOS).
    • Implement Named Pipe server (Windows).
    • Define internal event schema (JSON lines).
    • Provide client lib for relay and tests.
  • DoD: Test sends JSON → server receives event; works on all 3 OSes.


3. Metrics Sampler

Goal: Poll CPU/memory for Claude processes.

  • Tasks:

    • Integrate sysinfo crate.
    • Map PID → CPU% and RSS memory.
    • Attach to instances discovered via hooks.
    • Adaptive polling interval.
  • DoD: CPU/mem usage shown in mock instance; <5% overhead on idle system.


4. Adapters

Goal: Normalize tool events into common model.

  • Tasks:

    • Define ToolAdapter trait: parse_event, fingerprint, decorate.
    • Implement ClaudeAdapter.
    • Write tests with real hook JSON samples.
  • DoD: Claude hook input → normalized event model with correct type, instance ID, status.


5. Tray Core

Goal: Manage state, rules, notifications.

  • Tasks:

    • State store in-memory (optionally SQLite).
    • Rules engine for notifications.
    • Persistence of instance names in ~/.claudex/config.toml.
  • DoD: On receiving events, state updated correctly; renames survive restart.


6. OS Actions

Goal: Focus, kill, manage processes.

  • Tasks:

    • macOS: NSWorkspace/AppleScript focus.
    • Windows: SetForegroundWindow helper.
    • Linux: xdotool/DBus best-effort.
    • Kill: graceful SIGTERM → force SIGKILL.
  • DoD: Action menu item works for test processes on all OSes.


7. Tray UI (Tauri)

Goal: Minimal tray app with instance list and prefs.

  • Tasks:

    • Implement tray menu with instance submenus.
    • Add actions: Focus, Kill, Rename.
    • Preferences window: poll interval, notifications.
    • Hook up to state store.
  • DoD: User can see instances, rename one, and get a notification when it finishes.


8. Packaging

Goal: Distribute cross-platform builds.

  • Tasks:

    • macOS: dmg build, codesign, notarization workflow.
    • Windows: MSI build, winget manifest.
    • Linux: AppImage, .deb, .rpm.
  • DoD: GitHub release artifacts install/run successfully on each OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment