Skip to content

refactor: the platform no longer discovers agent skills and presets - #139

Merged
endrix merged 2 commits into
mainfrom
refactor/no-agent-discovery
Nov 9, 2026
Merged

endrix merged 2 commits into
mainfrom
refactor/no-agent-discovery

Conversation

@endrix

@endrix endrix commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Stage 3, last step for the agent stack (P5e). wfpy-ide now holds the agent workflow UI and asks its own host for skills and presets (endrix/wfpy-ide#24, #26, #27, all merged). This deletes the platform's copies, including the original reason for the whole move: every product's diagram load scanned the skill and agent directories and could rebuild the model a second time.

Removed

  • Server:
    • The per-load agent enrichment in WorkflowSourceModelStorage, about 400 lines:
      • the warm-or-defer scan of .wf/skills, .claude/skills, ~/.claude/skills and the .claude/agents directories, run on every diagram load of every product;
      • the wf:agentSkillsSnapshot / wf:claudeAgentsSnapshot snapshots on the root, and the skill status on @agent nodes;
      • its cache, and the second model refresh it dispatched when the scan found something.
    • The two discovery operation handlers (request-agent-skills-handler.ts, request-claude-agents-handler.ts), their registrations and their tests.
    • The refresh-agent-enrichment- polling prefix.
  • Client:
    • the discovery requests, their answers and the answer handlers' caches in editing-action-handlers.ts;
    • src/agent-ui/ (agentUiModule), its 32 tests, which moved to wfpy-ide, and its path-import fixture.
  • Toolkit tests: the enrichment-deferral test, and the applyAgentEnrichment stub seven other tests carried.

54 files changed: 178 lines added, 6,856 deleted.

Kept

  • The contribution points (AnnotationEditor, NodeSectionContribution, AnnotationTemplate). Their tests now use a neutral panel harness (test/panel-harness/) and their own probes instead of the agent UI. The template tests' quoting cases moved to wfpy-ide with the templates.
  • The cal:agentSkillStatus metadata key, because wfpy-ide's Skill row still writes it.

Review (/code-review medium), addressed

The review found no correctness bug in the deletions, and nothing left in the tree references the removed handlers, action kinds, caches or agentUiModule. Fixed:

  • The load breadcrumb loses its agent-enrichment phases: the skillStatus/skills/agents buckets, setEnrichment and the enrichment= field, which would only have read 0 or n/a. Its test pins that they are gone.
  • Docs that described the deleted scan: both READMEs' debugging note (including the one shipped in the VSIX), the caller-redelivery guard's comment, and a toolkit test's comment.
  • CHANGELOG:
  • Tests:
    • The neutral harness drops the viewer-editor bridge defaults, which only the @viewer template used.
    • A node-section test that now passed trivially is gone.
    • A new test pins that a redraw a contribution asks for tells the annotation editors not to request discovery again. Only wfpy-ide's tests checked this after the agent UI left.
  • Noted, wfpy-ide follow-up: its snapshot seeding is now dead, and its Skill row reads "not discovered" until the host answers.

Release

This is breaking for the API: the discovery actions and agentUiModule go, though agentUiModule was never released. It belongs to the 0.9 release, whose note [Unreleased] already carries.

Tests

  • Local results:
    • typecheck: 5/5
    • neutrality: 5/5
    • build: OK
    • diagram-client: 410/410
    • diagram-server: 443/443
    • extension-core: 335/335
    • sidecar-toolkit: 357/358, the one failure being the known local timeout in variant-node-create-wizard, which passes in CI
  • wfpy-ide main against this tree: 138/138, bundle build included.

https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv

wfpy-ide asks its own host for an @agent task's skills and agent presets
(endrix/wfpy-ide#26, #27) and holds the agent workflow UI itself, so the
platform's copies go:

- Server: the per-load agent enrichment in WorkflowSourceModelStorage
  (about 400 lines: the warm-or-defer scan of .wf/skills, .claude/skills,
  ~/.claude/skills and the .claude/agents directories on every diagram
  load of every product, the skills and presets snapshots on the root,
  the skill status on @agent nodes, the cache, and the second model
  refresh it dispatched when the scan found something); the two discovery
  operation handlers (request-agent-skills-handler.ts,
  request-claude-agents-handler.ts) and their tests; the
  refresh-agent-enrichment- polling prefix.
- Client: the discovery requests, answers and their handlers' caches in
  editing-action-handlers.ts; src/agent-ui/ (agentUiModule), its tests and
  its path-import fixture. The contribution-point tests keep a neutral
  panel harness (test/panel-harness/) and exercise the points with their
  own probes.
- Toolkit tests: the enrichment deferral test, and the stub of
  applyAgentEnrichment the others carried.

The cal:agentSkillStatus key stays in the shared metadata for now:
wfpy-ide's Skill row still writes it. The load breadcrumb keeps its
skillStatus/skills/agents phases, which now read 0.

wfpy-ide main passes its 138 tests and builds its bundle against this
tree.

Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
- The load breadcrumb no longer has agent-enrichment phases: the
  skillStatus/skills/agents buckets, setEnrichment and the enrichment=
  field always read 0 or n/a. Its test pins that they are gone.
- Docs that described the deleted scan: both READMEs' debugging note
  (the one in the VSIX too), the caller-redelivery guard's comment and a
  toolkit test's comment.
- The CHANGELOG's release note names #137 and #139 among what needs the
  0.9 bump; the contribution-points entry no longer credits the platform
  with fixes to code that has left it.
- Tests: the neutral panel harness drops the viewer-editor bridge
  defaults only the @viewer template used; the node-section test that
  passed trivially (the platform has nothing that could draw agent
  sections) is gone; a new one pins that a redraw a contribution asks for
  tells the annotation editors not to request discovery again, which only
  wfpy-ide's tests checked after the agent UI left.

Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
@endrix
endrix merged commit 579dc94 into main Nov 9, 2026
1 check 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.

1 participant