Skip to content

feat: goal badge, subagent attribution, connectors, Windsurf — Build 6 - #60

Merged
PDgit12 merged 1 commit into
mainfrom
feat/breadth-visibility
Jul 7, 2026
Merged

feat: goal badge, subagent attribution, connectors, Windsurf — Build 6#60
PDgit12 merged 1 commit into
mainfrom
feat/breadth-visibility

Conversation

@PDgit12

@PDgit12 PDgit12 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

What (Build 6 — breadth + visibility)

  • Goal badge: knitbrain statusline + dashboard show ◎ <goal> iter N/M from live loop state — loop enforcement visible on every platform; clears on met/caps.
  • Subagent attribution: SubagentStart injects the goal frame; SubagentStop records the subagent's real transcript tokens into the ledger (Claude Code/Codex/VS Code). The biggest invisible sink now appears in receipts. Attribution only — never blocks.
  • Connector inventory: other MCP servers (names + command/origin only, secrets never read) surface in the workflow TOOLKIT for routing.
  • Windsurf: deny-only enforcement via exit-2 (its documented ceiling) — .windsurf/hooks.json emitter + adapter dialect. README/ledger updated honestly.

Verification

rm -rf dist && npm run verify EXIT=0 (610 tests). Live: badge render/clear, windsurf exit=2 + stderr, subagent ledger event with real fixture-transcript tokens, frame injection.

No new MCP tools, no bump.

… Windsurf deny-only

- statusline + dashboard show the live goal badge (◎ <goal> iter N/M) from
  loop-state.json — the loop is visible on every platform, not just hosts
  with native goal UIs; clears when run_loop clears state. LoopState
  persists maxIters for the badge.
- SubagentStart/SubagentStop hooks (Claude Code + Codex via KNITBRAIN_HOOKS;
  VS Code rides .claude settings free): Start injects the goal frame into
  every spawned agent; Stop attributes the subagent's REAL transcript tokens
  (readTranscriptUsage) into the activity ledger — the largest previously
  invisible sink now shows up in receipts. Never blocks (attribution only).
  Cursor/Gemini correctly absent (no such events).
- connector inventory: host-scan reads mcpServers from project/global MCP
  configs — names + command/origin ONLY (env/headers/tokens never read);
  knitbrain excluded; project wins dedupe. Surfaces in the workflow TOOLKIT
  line so orchestration can route to the user's other servers.
- Windsurf: .windsurf/hooks.json emitter (pre_* -> knitbrain-hook) +
  adapter dialect (trajectory_id detection, tool_info normalize, deny ->
  exit code 2 + stderr — Windsurf's documented ceiling, the binary's only
  non-zero exit path; all other platforms keep the exit-0 contract).

Live-verified: badge renders/clears · windsurf payload exits 2 with reason ·
SubagentStop ledger event carries raw 10000/stored 2000 from a fixture
transcript · frame injected on SubagentStart. verify EXIT=0 (610 tests).
Copilot AI review requested due to automatic review settings July 7, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@PDgit12
PDgit12 merged commit 8cafe75 into main Jul 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants