[P1-01] Make CapabilityBroker authoritative #24

Closed
opened 2026-08-28 20:54:32 +01:00 by conductor · 4 comments
Owner

Plain summary

CapabilityBroker becomes authoritative: the model is exposed only the few capability schemas that fit the current task, not all installed tools. Unused capabilities cost zero prompt tokens, and the model can still request an unexposed one on demand.

Example

100 capabilities installed, but a coding job exposes ~5–10 — the other ~90 add nothing to the prompt.

Technical details

Parent epic: #16

Manifest ID: P1-01

Priority: P1
Problem: top capability matches are displayed but operator exposes all tools.

Action:

  • ContextBroker invokes capability selection;
  • expose only selected full schemas;
  • keep a tiny find_capability escape hatch;
  • validate/auto-regenerate empty or stale capability cards;
  • add preconditions/risk/side-effect metadata.

Acceptance criteria:

  • 100 installed capabilities can exist while a coding job exposes ~5–10;
  • unused capabilities add zero prompt tokens;
  • model can dynamically request an unexposed capability.

Dependencies: P0-03, P0-05.


Resolved dependency references

  • Depends on: #19 (P0-03), #21 (P0-05)
  • Blocks: None.

Relevant source files

Not specified in the handoff. P0-01 must identify authoritative paths before implementation; do not guess by adding another path.

Do not do

  • Do not begin this issue before its dependencies are complete.
  • Do not create a parallel authority path; replace, extend, or remain dormant.
  • Do not add unrelated cognitive subsystems or additive feature growth.
  • Do not treat module/schema existence, background activity, or model self-report as acceptance evidence.

Source directive

Preserved from /home/nick/Desktop/rune_v1_course_correction_handoff.md, Section 14. The handoff is authoritative if this issue summary is ambiguous.

Pipeline requirements

  • TDD: frozen/regression tests written first, red → green
  • ruff check and ruff format --check clean
  • Spec-compliance review gate: PASS
  • Code-quality review gate: Approved
  • Full orchestration suite regression green
  • Canary passes (where applicable)
  • Closed with a properly formatted closing comment + commit/PR references
## Plain summary CapabilityBroker becomes authoritative: the model is exposed only the few capability schemas that fit the current task, not all installed tools. Unused capabilities cost zero prompt tokens, and the model can still request an unexposed one on demand. ## Example 100 capabilities installed, but a coding job exposes ~5–10 — the other ~90 add nothing to the prompt. ## Technical details Parent epic: #16 Manifest ID: **P1-01** **Priority:** P1 **Problem:** top capability matches are displayed but operator exposes all tools. **Action:** - ContextBroker invokes capability selection; - expose only selected full schemas; - keep a tiny `find_capability` escape hatch; - validate/auto-regenerate empty or stale capability cards; - add preconditions/risk/side-effect metadata. **Acceptance criteria:** - 100 installed capabilities can exist while a coding job exposes ~5–10; - unused capabilities add zero prompt tokens; - model can dynamically request an unexposed capability. **Dependencies:** P0-03, P0-05. --- ## Resolved dependency references - Depends on: #19 (P0-03), #21 (P0-05) - Blocks: None. ## Relevant source files Not specified in the handoff. P0-01 must identify authoritative paths before implementation; do not guess by adding another path. ## Do not do - Do not begin this issue before its dependencies are complete. - Do not create a parallel authority path; replace, extend, or remain dormant. - Do not add unrelated cognitive subsystems or additive feature growth. - Do not treat module/schema existence, background activity, or model self-report as acceptance evidence. ## Source directive Preserved from `/home/nick/Desktop/rune_v1_course_correction_handoff.md`, Section 14. The handoff is authoritative if this issue summary is ambiguous. ## Pipeline requirements - [ ] TDD: frozen/regression tests written first, red → green - [ ] `ruff check` and `ruff format --check` clean - [ ] Spec-compliance review gate: PASS - [ ] Code-quality review gate: Approved - [ ] Full orchestration suite regression green - [ ] Canary passes (where applicable) - [ ] Closed with a properly formatted closing comment + commit/PR references
conductor added the P1 — highv1-course-correction labels 2026-08-28 20:54:32 +01:00
gitea-actions Bot added the featuregrowthperception labels 2026-08-28 20:54:53 +01:00
gitea-actions Bot added the custodian label 2026-09-03 22:53:48 +01:00
gitea-actions Bot added the ready label 2026-09-04 13:13:37 +01:00

🎓 NEXT: #24 — [P1-01] Make CapabilityBroker authoritative — dependencies satisfied (closed: #114); Rune may start.

🎓 **NEXT: #24 — [P1-01] Make CapabilityBroker authoritative** — dependencies satisfied (closed: #114); Rune may start.
conductor added the blocked label 2026-09-04 16:41:05 +01:00
Author
Owner

⛔ Order-gate correction (2026-09-04): this issue was labeled ready in error — the teacher's issue fetch was silently truncated (Gitea per_page cap), so open dependency #19 (P0-03 ContextBroker) looked closed. ready → blocked until #19 merges. The teacher is fixed (paginated fetch + live dependency verification); re-announcing will happen automatically when #19 closes.

⛔ **Order-gate correction (2026-09-04):** this issue was labeled `ready` in error — the teacher's issue fetch was silently truncated (Gitea per_page cap), so open dependency #19 (P0-03 ContextBroker) looked closed. `ready` → `blocked` until #19 merges. The teacher is fixed (paginated fetch + live dependency verification); re-announcing will happen automatically when #19 closes.

⛔ Blocked — dependencies still open: #19. The ready label was removed; re-apply it once the blockers close.

⛔ **Blocked** — dependencies still open: #19. The `ready` label was removed; re-apply it once the blockers close.
Author
Owner

Completed - PR #193 merged

  • CapabilityBroker is the single authoritative tool-schema selector (composition-registered): select_for_job returns the verified floor (T1 file tools + find_capability) plus task-matched tools, capped at 10.
  • Zero-token guarantee: only selected schemas reach LocalRuntime; canary asserts byte-size reduction vs full set.
  • find_capability escape hatch: always exposed, bounded summaries, dynamic in-run exposure via _expose_tools, unknown-tool errors name the hatch; validated dispatch; exposed-set embedded in pending state (real resume test).
  • Per-tool metadata (risk/preconditions/side_effects) on all 19 TOOLS; cards synthesized + rebuilt on missing/empty/stale; atomic writes.
  • Trace v3 additive: selected_tools/capability_reason/find_capability_calls.
  • Pipeline: TDD red->green (43 frozen tests incl. 7 quality discharges); suite 588+84 (baseline 545); spec gate PASS (9/9); quality gate Approved with 7 findings, ALL discharged red-first; pyright ratchet errors 117<120 warnings 407<465; canary same-commit; henxels 0; CI all-8-jobs success on rune-ci-desktop; protected check success on da79ca7.
## Completed - PR #193 merged - CapabilityBroker is the single authoritative tool-schema selector (composition-registered): select_for_job returns the verified floor (T1 file tools + find_capability) plus task-matched tools, capped at 10. - Zero-token guarantee: only selected schemas reach LocalRuntime; canary asserts byte-size reduction vs full set. - find_capability escape hatch: always exposed, bounded summaries, dynamic in-run exposure via _expose_tools, unknown-tool errors name the hatch; validated dispatch; exposed-set embedded in pending state (real resume test). - Per-tool metadata (risk/preconditions/side_effects) on all 19 TOOLS; cards synthesized + rebuilt on missing/empty/stale; atomic writes. - Trace v3 additive: selected_tools/capability_reason/find_capability_calls. - Pipeline: TDD red->green (43 frozen tests incl. 7 quality discharges); suite 588+84 (baseline 545); spec gate PASS (9/9); quality gate Approved with 7 findings, ALL discharged red-first; pyright ratchet errors 117<120 warnings 407<465; canary same-commit; henxels 0; CI all-8-jobs success on rune-ci-desktop; protected check success on da79ca7.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: conductor/rune#24