Protocol

LSP and custom methods

Standard LSP supported now

Custom method supported now

stubforge/symbolsStatus
{ "uri": "file:///workspace/src/main.rs", "includeImplemented": false }

uri filters to one open document. includeImplemented defaults to true. The response includes symbol IDs, signatures/hashes, ranges, marker guidance, implementation status, and lifecycle state.

Implementation proposal method

stubforge/implementSymbol accepts symbolName, uri, and optional guidance, containerName, or LSP position for overloaded names. Ambiguous matches are rejected. It returns a versioned WorkspaceEdit and the selected model. The server does not mutate the open document; the client decides whether to apply the edit. Standard code-action clients resolve a marked stub to the same versioned edit. The standalone TUI and dedicated Neovim/VS Code clients preview a diff before applying; generic LSP code-action clients apply when the user selects the action.

Batch, review, and history methods

stubforge/implementBatch accepts mode (all_pending or selected), optional symbolIds, guidance, and a concurrency limit. The server persists one active batch in local SQLite; it schedules ready dependency layers concurrently, locks claimed symbols, and exposes proposals and generation errors through stubforge/activeBatch so the TUI can resume after a restart. Rejected dependencies cancel queued dependents; retries include recent rejected attempts and user guidance.

stubforge/reviewDecision records an accepted, rejected, or retried proposal by proposalId. stubforge/proposalHistory returns attempts for a symbolId, including outcome, model, timestamp, and unified diff. The local TUI uses these methods after review, supports retry with optional user guidance, and provides a per-symbol history view.

Batch scheduling limits

Batch state and current reviews survive local TUI restarts, but the queue currently runs sequentially. Dependency ordering, parallel execution, cancellation, and progress notifications are not implemented. Retry accepts user guidance but does not yet include prior attempts in the generation prompt. Editor-origin proposals also remain pending in local history because those clients do not yet report review decisions.

Protocol source

The versioned Rust schemas are in the stubforge-protocol crate. Standard LSP remains the editor transport; future Worker sync uses a separate contract.