Skip to content

Latest commit

 

History

History
90 lines (59 loc) · 3.41 KB

AGENTS.md

File metadata and controls

90 lines (59 loc) · 3.41 KB

AGENTS

Project

cinder-link is a Go tunnel service and CLI for exposing local HTTP and WebSocket services over a secure WebSocket session.

Current repo shape:

  • cmd/tunneld: hosted service entrypoint for gateway, edge, and control-plane wiring
  • cmd/tunnel: local CLI / agent entrypoint
  • internal/gateway: WebSocket session handling and protocol logic
  • internal/edge: public HTTP/WebSocket ingress
  • internal/client: local agent session management and localhost forwarding
  • internal/controlplane: sessions, routes, quotas, and ownership logic
  • plans/: design and implementation plans
  • todos/: canonical backlog and execution-tracking files

Current Architecture Direction

  • One long-lived client session over WebSocket is the transport model.
  • Public HTTP requests and proxied WebSocket connections are multiplexed as yamux streams inside that session.
  • The custom control plane and routing model is preserved.
  • Near-term priority is the yamux transport migration (todo-88).
  • API/SPA/dashboard work is currently deferred product scope.

Current Priority

The protocol-hardening and production-polish work is complete. All 8 items from the original execution order have landed and are in completed/ under their respective todo folders.

Current focus is the yamux transport migration tracked in todos/transport-migration-yamux/:

  • todo-88: Migrate to yamux transport (single step, replaces the previous two-step binary-framing + yamux plan)
  • PRD: prd-yamux-transport.md -- full design, stream protocols, user stories, and migration boundary

The previous binary framing todos (87, 86) and their PRDs are superseded and deleted. yamux provides binary framing, flow control, and stream lifecycle in one step, making the intermediate binary envelope format unnecessary.

API/SPA/dashboard work remains deferred product scope.

Todo Workflow

Use todos/ as the source of truth.

Status meaning:

  • planning-: not yet approved for implementation or still decision-heavy
  • todo-: ready for implementation
  • review-: implemented, waiting for human validation
  • completed/: finished and verified

Recommended loop:

  1. implement from PRD / active todo- items
  2. review code and run verification
  3. update todo state to review- or completed
  4. sync relevant docs and plans

Subagents

Preferred lightweight subagents:

  • review: check for duplicated logic, unjustified complexity, and real bugs
  • docs: keep plans, todos, and docs aligned with implemented behavior

Use them sparingly to keep token usage down.

RTK

This repo uses rtk as a command-output compression layer to reduce token usage.

rtk project reference:

  • GitHub: https://github.com/rtk-ai/rtk
  • Purpose: CLI proxy that reduces LLM token consumption on common development commands by filtering, grouping, truncating, and deduplicating output

Practical guidance:

  • Shell commands are normally rewritten automatically via the OpenCode rtk plugin, so manual rtk prefixes are usually not needed.
  • Expect common commands such as git status, git diff, git log, and go test to be filtered automatically.
  • If you need the direct raw command output instead of the filtered rtk output, prefix the command with time to bypass the rewrite hook.

Examples:

git status
go test ./...
time git status
time go test ./...

Use the raw time ... form only when the exact unfiltered command output matters for debugging.