NS6 slice: Add compact mimctl context output #33

Closed
opened 2026-06-20 23:28:19 +00:00 by tmk241 · 1 comment
Owner

OBJECTIVE: Expose active file, cursor/selection, mode, panel, diagnostics summary, and recent command context in a stable local CLI format.

AUTHORITY: Parent #6 NS6: Pi and local tool bridge; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: session/002; req: session/004; req: governance/002-003).

AGENT AUTHORITY:

  • Delivery authority: local-commit
  • Tracker authority: this issue may be commented and closed when acceptance passes.
  • Handoff state: committed clean, tracker commented/closed.

PARENT: #6 via explicit issue link and parent checklist.

SCOPE: The smallest source/docs/tests needed to make this behavior real and verified.

BOUNDARIES: No huge JSON dump unless a decision requires it.

ACCEPTANCE: mimctl context against a running session returns compact inspectable context and fails clearly without a socket.

VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice.

BLOCKERS: none

GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant req: anchors in code/tests where applicable, and close only after verification passes.

OBJECTIVE: Expose active file, cursor/selection, mode, panel, diagnostics summary, and recent command context in a stable local CLI format. AUTHORITY: Parent #6 `NS6: Pi and local tool bridge`; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: session/002; req: session/004; req: governance/002-003). AGENT AUTHORITY: - Delivery authority: local-commit - Tracker authority: this issue may be commented and closed when acceptance passes. - Handoff state: committed clean, tracker commented/closed. PARENT: #6 via explicit issue link and parent checklist. SCOPE: The smallest source/docs/tests needed to make this behavior real and verified. BOUNDARIES: No huge JSON dump unless a decision requires it. ACCEPTANCE: `mimctl context` against a running session returns compact inspectable context and fails clearly without a socket. VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice. BLOCKERS: none GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant `req:` anchors in code/tests where applicable, and close only after verification passes.
tmk241 added this to the v1 milestone 2026-06-20 23:28:19 +00:00
tmk241 added the sliceready-for-agentgoal labels 2026-06-20 23:28:19 +00:00
Author
Owner

Implemented in commit ffbff6e4b8 (Add compact agent context command).

Verification:

  • zig fmt src/context.zig src/protocol.zig src/socket.zig src/main.zig: pass
  • zig build test: pass
  • zig build: pass
  • zig build run -- --help: pass
  • zig build run -- context fix_bug inspect: pass
  • redgate lint / health: pass

Regular tests: compact context formatter emits line-oriented bounded rows for cwd/task/intent and session state; protocol context [task] [intent] returns active buffer/cursor/panel context; local socket test proves a same-user running session returns compact context over the existing socket; CLI exposes mim context local fallback and mim mimctl context <socket|-> same-user session request.
Adversarial tests: context fields sanitize whitespace/control separators and truncate long values; missing mimctl context socket and missing MIM_SOCKET fail clearly instead of guessing a session.

Boundary: compact context readout only. No plugin host, remote auth, secret exposure, cloud service, write/mutation command, or autonomous agent workflow added.

Implemented in commit ffbff6e4b851 (Add compact agent context command). Verification: - zig fmt src/context.zig src/protocol.zig src/socket.zig src/main.zig: pass - zig build test: pass - zig build: pass - zig build run -- --help: pass - zig build run -- context fix_bug inspect: pass - redgate lint / health: pass Regular tests: compact context formatter emits line-oriented bounded rows for cwd/task/intent and session state; protocol `context [task] [intent]` returns active buffer/cursor/panel context; local socket test proves a same-user running session returns compact context over the existing socket; CLI exposes `mim context` local fallback and `mim mimctl context <socket|->` same-user session request. Adversarial tests: context fields sanitize whitespace/control separators and truncate long values; missing `mimctl context` socket and missing `MIM_SOCKET` fail clearly instead of guessing a session. Boundary: compact context readout only. No plugin host, remote auth, secret exposure, cloud service, write/mutation command, or autonomous agent workflow added.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#33