Carry trusted skill and role provenance through rlm_subagent #204

Merged
lost-rob0t merged 6 commits from rage/203-subagent-skill-role-provenance into main 2026-08-25 10:43:47 +00:00
lost-rob0t commented 2026-08-25 10:32:43 +00:00 (Migrated from github.com)

Closes #203.

Parent: #172.

RAGE state

TDD-first from starting main a79e9c862b74449d73bcadc729d2a38b5163e10d. Full audit record: rage/203-subagent-skill-role-provenance.org.

The test-only head 383cd91e2e89c355a3b32bf1de44338f4a880445 produced the intended deterministic red: 873/875 passed, with only the two new delegation-provenance/invalid-role tests failing. Clean pack, Tree-sitter, Nix, Paid OpenRouter, and REAL OpenRouter remained green.

The first runtime head exposed three integration constraints rather than unrelated defects: nested agent metadata is canonically normalized, the async composition gate preserves the existing subagent_after_options/7 seam, and a non-ground role fixture is rejected earlier by the trusted-handler groundness boundary. Repairs preserve those existing contracts rather than weakening them.

Invariant

Trusted host/compiler policy may select child skills and generic role metadata, but model-visible rlm_subagent arguments remain query-only. Delegation metadata is inert provenance and must not widen capabilities, authority, model selection, handlers, or effects.

Slice

  • preserve existing explicit_skills(...) child compiler path;
  • add host-only subagent_role(Role) metadata;
  • record role + selected-skill provenance on the spawned child and returned envelope;
  • reject invalid ground role data before child creation;
  • strip subagent-only role metadata before generic child completion;
  • preserve exact child capability narrowing and authority-context ownership;
  • preserve the canonical async execute ABI.

Exact-head gate

Final candidate head is c9fbb36003c864884ac6adade5bc0255469cc570. Keep draft until CI, REAL/Paid OpenRouter, Nix flake, Tree-sitter FFI, and Clean SWI pack install are all green on this exact head and review/thread state remains clear.

Closes #203. Parent: #172. ## RAGE state TDD-first from starting `main` `a79e9c862b74449d73bcadc729d2a38b5163e10d`. Full audit record: `rage/203-subagent-skill-role-provenance.org`. The test-only head `383cd91e2e89c355a3b32bf1de44338f4a880445` produced the intended deterministic red: 873/875 passed, with only the two new delegation-provenance/invalid-role tests failing. Clean pack, Tree-sitter, Nix, Paid OpenRouter, and REAL OpenRouter remained green. The first runtime head exposed three integration constraints rather than unrelated defects: nested agent metadata is canonically normalized, the async composition gate preserves the existing `subagent_after_options/7` seam, and a non-ground role fixture is rejected earlier by the trusted-handler groundness boundary. Repairs preserve those existing contracts rather than weakening them. ## Invariant Trusted host/compiler policy may select child skills and generic role metadata, but model-visible `rlm_subagent` arguments remain query-only. Delegation metadata is inert provenance and must not widen capabilities, authority, model selection, handlers, or effects. ## Slice - preserve existing `explicit_skills(...)` child compiler path; - add host-only `subagent_role(Role)` metadata; - record role + selected-skill provenance on the spawned child and returned envelope; - reject invalid ground role data before child creation; - strip subagent-only role metadata before generic child completion; - preserve exact child capability narrowing and authority-context ownership; - preserve the canonical async execute ABI. ## Exact-head gate Final candidate head is `c9fbb36003c864884ac6adade5bc0255469cc570`. Keep draft until CI, REAL/Paid OpenRouter, Nix flake, Tree-sitter FFI, and Clean SWI pack install are all green on this exact head and review/thread state remains clear.
Sign in to join this conversation.
No description provided.