mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-28 00:04:58 +08:00
roadmap: #254 filed
This commit is contained in:
16
ROADMAP.md
16
ROADMAP.md
@@ -16793,3 +16793,19 @@ Dogfooded 2026-04-26 11:00 KST after cycle #394: the public dogfood loop had acc
|
|||||||
Verified operational surface: the branch already contains #239 for branch leases and #243 for canonical ordering, but those protect write coordination, not cognitive/context coordination. The live dogfood channel currently relies on humans/agents manually deciding when to shorten, pause, or restate. There is no `DogfoodCycleSummary` / `StateVectorCompact` artifact that records `{cycle, head, parent, branch, active_pinpoint, cluster_delta, race_state, next_owner, blockers}` in a bounded token shape; no max-token policy for public nudge payloads; no rolling cluster ledger that can be referenced by id instead of repeated; no continuation token that says “resume from compact #N”; and no warning when a generated update exceeds a peer-agent budget. This is distinct from `/compact` conversation summarization because the missing primitive is branch/project-level coordination state shared across agents, not a single chat-session memory summary.
|
Verified operational surface: the branch already contains #239 for branch leases and #243 for canonical ordering, but those protect write coordination, not cognitive/context coordination. The live dogfood channel currently relies on humans/agents manually deciding when to shorten, pause, or restate. There is no `DogfoodCycleSummary` / `StateVectorCompact` artifact that records `{cycle, head, parent, branch, active_pinpoint, cluster_delta, race_state, next_owner, blockers}` in a bounded token shape; no max-token policy for public nudge payloads; no rolling cluster ledger that can be referenced by id instead of repeated; no continuation token that says “resume from compact #N”; and no warning when a generated update exceeds a peer-agent budget. This is distinct from `/compact` conversation summarization because the missing primitive is branch/project-level coordination state shared across agents, not a single chat-session memory summary.
|
||||||
|
|
||||||
Required fix shape: (a) define a compact dogfood state-vector schema with hard field limits and stable ids for cluster ledgers; (b) emit one canonical compact artifact per cycle, committed or otherwise addressable, so future cycles cite `compact:#394` rather than replaying the full narrative; (c) add a context-budget guard to nudge/report generation that warns or truncates before posting huge state vectors; (d) add a `claw dogfood status --compact` / `claw roadmap compact-state` surface that reconstructs the current branch state from git + ROADMAP markers; (e) teach peer agents to request/reply with compact state by default and expand only on demand. Acceptance: after 10+ consecutive dogfood cycles, a new agent can recover active branch/head/pinpoint/cluster trajectory/blocker state from a bounded compact artifact under a fixed token budget, and the loop does not have to pause cycle spawning just to protect peer-agent context windows. **Status:** Open. No source code changed. Filed as ROADMAP-only dogfood pinpoint from the 2026-04-26 02:00 UTC nudge. Cluster delta: context-budgeting +1, dogfood-state-compaction +1, multi-agent-continuation-token cluster founded, bounded-state-vector-for-branch-coordination cluster founded; linked to #239/#243 as the cognitive coordination complement to write/order coordination.
|
Required fix shape: (a) define a compact dogfood state-vector schema with hard field limits and stable ids for cluster ledgers; (b) emit one canonical compact artifact per cycle, committed or otherwise addressable, so future cycles cite `compact:#394` rather than replaying the full narrative; (c) add a context-budget guard to nudge/report generation that warns or truncates before posting huge state vectors; (d) add a `claw dogfood status --compact` / `claw roadmap compact-state` surface that reconstructs the current branch state from git + ROADMAP markers; (e) teach peer agents to request/reply with compact state by default and expand only on demand. Acceptance: after 10+ consecutive dogfood cycles, a new agent can recover active branch/head/pinpoint/cluster trajectory/blocker state from a bounded compact artifact under a fixed token budget, and the loop does not have to pause cycle spawning just to protect peer-agent context windows. **Status:** Open. No source code changed. Filed as ROADMAP-only dogfood pinpoint from the 2026-04-26 02:00 UTC nudge. Cluster delta: context-budgeting +1, dogfood-state-compaction +1, multi-agent-continuation-token cluster founded, bounded-state-vector-for-branch-coordination cluster founded; linked to #239/#243 as the cognitive coordination complement to write/order coordination.
|
||||||
|
|
||||||
|
## Pinpoint #254 — MCP Resources lifecycle (subscribe / list_changed / updated / session-bound registry) is structurally absent from the runtime
|
||||||
|
|
||||||
|
Dogfooded 2026-04-26 11:02 KST on `feat/jobdori-168c-emission-routing` after #253's context-budget-discipline pivot: claw-code wires `resources/list` and `resources/read` over JSON-RPC stdio (`rust/crates/runtime/src/mcp_stdio.rs:874-981, 1330-1346`) but the MCP Resources lifecycle surface beyond one-shot list+read is structurally absent. Resources read at session start become stale during the session with no detection path, and resources that an MCP server creates/destroys during operation never reach the parent claw session as typed events.
|
||||||
|
|
||||||
|
Verified concrete surface (rg across `rust/crates/`): zero `resources/subscribe` / `resources/unsubscribe` request method, zero `notifications/resources/updated` / `notifications/resources/list_changed` notification handlers, zero `ResourceUpdated` / `ResourceListChanged` / `ResourceCreated` / `ResourceDestroyed` typed lifecycle events, zero `version` / `valid_until` / `etag` / `staleness` field on `McpResource` at `rust/crates/runtime/src/mcp_stdio.rs:175-188`, zero session-bound `ResourceRegistry` primitive that tracks per-session resource handles with create/destroy lifecycle, zero `subscribe` capability advertisement in the initialize handshake at line 1400, zero `/resources` / `/resource-list` / `/resource-refresh` slash command in `SlashCommandSpec`, zero `claw mcp resources` CLI subcommand. The hardened lifecycle phase enum at `mcp_lifecycle_hardened.rs:16-28` enumerates `ResourceDiscovery` once at startup but has no `ResourceRefresh` / `ResourceLifecycleChange` mid-session phase. Server-emitted JSON-RPC notifications between requests are dropped silently at the transport layer because the stdio reader only correlates by `id` and has no notification dispatch table.
|
||||||
|
|
||||||
|
Gap. The MCP spec defines resources as a long-lived discovery-and-subscribe primitive: clients can `resources/subscribe` to a `uri`, receive `notifications/resources/updated { uri }` when content changes, and receive `notifications/resources/list_changed` when the available resource set itself changes (resources created/destroyed by the server). claw-code treats resources as a one-shot snapshot: list once, read on demand, never re-validate. Concrete dogfood friction: an MCP server that exposes a live database table, a watched file, or an LLM-generated artifact has no way to tell claw the row/file/artifact has changed; the agent silently reasons over a stale snapshot until the user notices the divergence.
|
||||||
|
|
||||||
|
Cluster shape novelty. Founds **two** new clusters with #254 as solo founder: (1) **Session-bound-resource-tracking-registry cluster** — typed primitives that track resource handles created/destroyed/updated within a session boundary, distinct from the existing one-shot `list_resources_once` snapshot pattern; (2) **Resource-lifecycle-event-opacity axis** — server→client lifecycle notifications dropped at the transport layer because the JSON-RPC reader has no notification dispatch separate from id-correlated responses, distinct from #229/#238/#244 persistent-WebSocket cluster (those are bidirectional client-driven streams; this is a server-pushed-notification dispatch gap on stdio JSON-RPC).
|
||||||
|
|
||||||
|
Introduces the **FOURTH distinct discovery-pattern** in the audit catalog: **PURE-CLAWABILITY-FRICTION-FROM-DOGFOODING** — pinpoints whose primary novelty is dogfood-observed friction in the agent's own runtime rather than missing API/typed-shape coverage of an external provider surface. Distinct from META-cluster-growth (#244/#247/#248/#249/#250), complementary-pinpoint-pair-bundle (#245+#250), and NEW-SOLO-CLUSTER-FOUNDING-WITH-DAILY-DRIVER-IMPACT (#252). Sibling to #239/#243/#251/#253 which are operational/coordination-layer pinpoints, but #254 is at the **protocol-runtime layer** rather than the dogfood-coordination layer — the agent's own MCP transport silently swallows lifecycle signals it should be surfacing.
|
||||||
|
|
||||||
|
Required fix shape: (a) add `resources/subscribe` + `resources/unsubscribe` request methods on `McpStdioProcess` parallel to `list_resources` / `read_resource`; (b) add a notification dispatch path on the stdio reader that routes `notifications/resources/updated` and `notifications/resources/list_changed` to a per-server channel rather than dropping them; (c) add `pub enum ResourceLifecycleEvent { Created(McpResource) | Updated { uri } | Destroyed { uri } | ListChanged }` typed event surfaced through `LaneEvents`; (d) add a session-bound `ResourceRegistry` in the runtime that tracks active subscriptions, applies updates, and fires staleness warnings; (e) add `version` / `etag` optional fields on `McpResource`; (f) advertise `resources.subscribe = true` in the initialize handshake when the runtime supports it; (g) expose `/resources`, `/resources refresh`, `/resources subscribe <uri>` slash commands and `claw mcp resources [list|read|subscribe]` CLI subcommands. Acceptance: an MCP server that emits `notifications/resources/updated { uri: "db://orders/42" }` mid-session causes claw to update its `ResourceRegistry`, fire a `ResourceUpdated` lane event, and either re-read the resource on next reference or surface a staleness marker — instead of the agent silently reasoning over a stale snapshot.
|
||||||
|
|
||||||
|
**Status:** Open. No source code changed. Filed 2026-04-26 11:04 KST. HEAD: `17efd95` (post-#253 fast-forward verification onto gaebal-gajae's 11:00 KST DogfoodCycleSummary/StateVectorCompact pinpoint at `17efd95` — TENTH consecutive concurrent-dogfood rebase cycle, three-way parity local==origin==fork at `17efd95` confirmed before filing). Branch: feat/jobdori-168c-emission-routing. Cluster delta: session-bound-resource-tracking-registry 0→1 (founder), Resource-lifecycle-event-opacity 0→1 (founder), Pure-clawability-friction-from-dogfooding discovery-pattern 0→1 (founder, FOURTH distinct discovery-pattern after META-cluster-growth + complementary-pinpoint-pair-bundle + NEW-SOLO-CLUSTER-FOUNDING-WITH-DAILY-DRIVER-IMPACT). Smaller-scope by design (matches #253's context-budget-discipline). Distinct from #252's API-shape gap (this is runtime-protocol gap), distinct from #229/#238/#244 persistent-WebSocket cluster (this is stdio JSON-RPC notification dispatch), distinct from #239/#243/#253 dogfood-coordination layer (this is protocol-runtime layer). Linked to #253 as the discipline-pivot enabler that allowed this smaller-scope pinpoint to be foregrounded over the larger META-cluster-growth options.
|
||||||
|
|||||||
Reference in New Issue
Block a user