Implement “discovery as a capability”
Stub
This How-to is a stub. JARVIS has a Selection Service and uses CandidateSet artifacts, but the “discovery node” authoring surface (treat candidate-set generation as a reusable NodeType) is not yet stabilized.
Goal
You will implement “discovery as a capability”: a reusable workflow that generates a bounded CandidateSet for a subtask and records it as a durable artifact.
When to use this
- You want a reusable “find viable tools” capability you can call from composites.
- You want candidate-set generation to be auditable and replayable (durable artifacts).
Standard vs. implementation
- Normative contract: ARP Standard: Selection
- Reference implementation: JARVIS Selection Service
Prerequisites
- A running
Selectionservice - A
Node Registrywith inventory seeded (at least oneNodeType) - A decision on where the discovery logic lives:
- as a composite “discovery node” executed by
Composite Executor, or - as a dedicated “discovery service” (not planned for v0.x).
- as a composite “discovery node” executed by
Steps
- Define a “discovery node” input schema (subtask goal + optional context/constraints).
- Implement discovery logic that calls
Selectionwith:- subtask spec,
- the current constraint envelope (depth/branch/budget),
- the current policy posture (candidate filtering).
- Emit a durable
CandidateSetartifact (and/orcandidate_set_generatedevent). - Return a reference to the candidate set (
candidate_set_id) to the caller.
Verify
- The discovery node produces a durable
CandidateSetartifact that contains:candidate_set_idsubtask_idcandidates[](each candidate contains at least anode_type_ref)
Troubleshooting
- Empty candidate set → inventory/policy/constraints filtered everything → validate
Node Registryseeding and policy profile. 5xxerrors mentioning LLM → LLM provider misconfigured → verifyARP_LLM_API_KEY+ARP_LLM_CHAT_MODEL(defaultopenaiprofile). For offline testing, opt intodev-mockwithARP_LLM_PROFILE=dev-mock+ fixtures.- Candidate sets too large → enforce strict bounds at
Selectionand fail closed on violations.
Cleanup / Rollback
- None.
Next steps
- Concept: Candidate sets
- Reference: ARP Standard: Selection
- How-to: Implement the mapper