Skip to content

refactor(prompts): remove the inert omit_skills_catalog flag (#5699) - #5815

Open
ntdatt812 wants to merge 2 commits into
tinyhumansai:mainfrom
ntdatt812:fix/5699-drop-inert-skills-catalog-flag
Open

refactor(prompts): remove the inert omit_skills_catalog flag (#5699)#5815
ntdatt812 wants to merge 2 commits into
tinyhumansai:mainfrom
ntdatt812:fix/5699-drop-inert-skills-catalog-flag

Conversation

@ntdatt812

@ntdatt812 ntdatt812 commented Aug 27, 2026

Copy link
Copy Markdown

Closes #5699.

AgentDefinition::omit_skills_catalog was threaded through both sub-agent prompt paths and read by neither. The issue offers two resolutions — honour it or remove it — and says either is fine. This removes it, because the repo has already settled on the design that makes it redundant.

Why removal, not wiring

  • render_helpers.rs records that the catalogue renderer was deliberately deleted: "render_skills and render_connected_integrations helpers are gone — ## Available Skills lives in integrations_agent/prompt.rs". Honouring the flag would rebuild the layering that comment describes tearing down.
  • The one definition that opts in already has its catalogue. The issue states every in-tree definition sets true; that is not quite right — orchestrator/agent.toml:26 sets omit_skills_catalog = false. It loses nothing, because orchestrator/prompt.rs::render_installed_skills emits ## Installed Skills itself. So no definition in the tree changes behaviour.
  • integrations_agent/prompt.rs documents dropping its own ## Available Skills block in the skills→workflows unification, and pins the absence with a test.

The flag is a fossil of a design the repo has already moved past.

A stale comment that had grown around it

config/schema/context.rs credited the flag with fixing recursive dispatch:

Re-enabled at 4000 tokens after the recursive-dispatch root cause was fixed by the omit_skills_catalog = true guard on the summarizer archetype (which prevents it from seeing spawn_subagent and thus cannot recurse).

A flag with no reader cannot gate a tool. The real guard is the summarizer's empty tool allowlist — [tools] named = [] in registry/agents/summarizer/agent.toml. That comment justifies a production default of 4000 tokens, so leaving it pointing at the wrong mechanism was the part of this issue worth fixing carefully: anyone auditing that default would have concluded the recursion guard was being removed by this PR. It now names the allowlist.

Backward compatibility

AgentDefinition does not set #[serde(deny_unknown_fields)], so custom TOML definitions still carrying omit_skills_catalog keep loading — the key is ignored, not rejected. retired_omit_skills_catalog_key_still_deserializes pins that, so a future deny_unknown_fields cannot break those users silently.

Two changes API consumers should know about:

  • agent_cli's JSON dump no longer emits an omit_skills_catalog entry.
  • SystemPromptBuilder::for_subagent and SubagentRenderOptions::from_definition_flags each take one fewer argument, and SubagentRenderOptions::include_skills_catalog is gone.

Verification

  • cargo check --lib --tests — clean.
  • cargo test --lib prompts:: — 68 passed.
  • cargo test --lib — full core suite run; see the note below.
  • cargo fmt --all — clean.

Disclosure: the full cargo test --lib run on this Windows host has 9 failures, all in path/environment tests (resolve_action_dir_*, upsert_materializes_home_*, imports_*_jsonl, require_managed_worktree_path_*, absolute_leaves_absolute_paths_alone, and two others). I am baselining them against a clean main on the same host and will post the comparison; none touch prompts or definitions. Please read CI as the authority over my local run.

Summary by CodeRabbit

  • New Features

    • Skills catalogs are now included in agent and sub-agent context by default.
    • Context Scout gains expanded read-only discovery tools and increased iteration and result limits.
    • Planner gains enhanced planning, research, delegation, and read-only tool capabilities.
  • Bug Fixes

    • Retired skills-catalog settings remain compatible when loading existing agent configurations.
    • Agent listings no longer expose the removed skills-catalog omission property.
  • Documentation

    • Updated prompt and configuration guidance to reflect current skills-catalog behavior.

…ansai#5699)

`AgentDefinition::omit_skills_catalog` was threaded through both sub-agent
prompt paths and read by neither. This removes it rather than wiring it up,
because the repo already settled on the other design.

Why removal is the resolution that matches the code:

- `render_helpers.rs` records that the `render_skills` helper was deliberately
  deleted and that the catalogue "lives in the individual agent's prompt.rs".
  Honouring the flag would resurrect the layering that comment describes
  removing.
- The one definition that opted *in* — `orchestrator/agent.toml`, with
  `omit_skills_catalog = false` — already renders its own catalogue:
  `orchestrator/prompt.rs::render_installed_skills` emits `## Installed
  Skills`. So no definition in the tree loses anything.
- `integrations_agent/prompt.rs` documents dropping its own `## Available
  Skills` block in the skills->workflows unification, and pins the absence
  with a test.

Also corrects a comment this flag had accreted. `config/schema/context.rs`
credited `omit_skills_catalog = true` with fixing recursive dispatch by
"preventing [the summarizer] from seeing `spawn_subagent`", and used that to
justify re-enabling a 4000-token production default. A flag with no reader
cannot gate a tool. The actual guard is the summarizer's empty tool allowlist
(`[tools] named = []` in `registry/agents/summarizer/agent.toml`); the comment
now says so.

Backward compatibility: `AgentDefinition` does not set
`serde(deny_unknown_fields)`, so custom TOML definitions still carrying the
retired key keep loading — the key is ignored, not rejected. Added
`retired_omit_skills_catalog_key_still_deserializes` to pin that, so a future
`deny_unknown_fields` cannot break those users silently.

Note for API consumers: `agent_cli`'s JSON dump no longer emits an
`omit_skills_catalog` entry, and `for_subagent` / `from_definition_flags` each
take one fewer argument.

`cargo test --lib prompts::` 68 passed; `cargo check --lib --tests` clean.
@ntdatt812
ntdatt812 requested a review from a team August 27, 2026 01:30
@ntdatt812

Copy link
Copy Markdown
Author

Baseline done — all 9 local failures are pre-existing on this host, not from this PR.

I ran the same 9 test names on a clean main (same machine, same toolchain):

test result: FAILED. 0 passed; 9 failed; 0 ignored; 11113 filtered out

Identical set, identical names:

test on this branch on clean main
embed::agent::…::absolute_leaves_absolute_paths_alone FAILED FAILED
worktree_schemas::…::require_managed_worktree_path_enforces_absolute_and_managed FAILED FAILED
spawn_parallel_agents::…::invalid_ownership_paths_are_rejected_with_the_host_message FAILED FAILED
config::schema::load::…::resolve_action_dir_blank_env_does_not_pin FAILED FAILED
config::schema::load::…::resolve_action_dir_override_beats_default_when_no_env FAILED FAILED
profiles::ops::…::upsert_materializes_home_and_list_enriches_paths FAILED FAILED
session_import::ops_tests::imports_legacy_date_folder_jsonl FAILED FAILED
session_import::ops_tests::imports_flat_native_jsonl_with_parity FAILED FAILED
artifact_offload::…::offload_failure_keeps_the_inline_payload_for_the_summarizer_fallback FAILED FAILED

They all look like Windows path/env assumptions (absolute-path shapes, $HOME materialisation, action-dir env resolution, JSONL fixture paths). Happy to open a separate issue with the failure output if that is useful — it is unrelated to this PR either way.

I checked the last one specifically before concluding, since its name mentions the summarizer and this PR touches a summarizer comment: it fails on clean main too, and it exercises artifact offload, not prompt flags.

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Aug 27, 2026

@tinysweeper tinysweeper Bot 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.

tinysweeper found nothing blocking. Approving.

$0.0000 · 0 in / 0 out

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d66a003-323b-42c1-84c5-5b20c5abdb00

📥 Commits

Reviewing files that changed from the base of the PR and between 7005141 and 4a46070.

📒 Files selected for processing (2)
  • tests/raw_coverage/agent_prompts_subagent_raw_coverage_e2e.rs
  • tests/raw_coverage/inference_agent_raw_coverage_e2e.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

This change removes the inert omit_skills_catalog option from agent definitions, subagent prompt APIs, agent configurations, and test fixtures. Legacy TOML keys remain accepted during deserialization. The agent list --json output also omits the retired property.

Changes

Skills catalog flag removal

Layer / File(s) Summary
Public contracts and output
src/openhuman/agent/harness/definition.rs, src/openhuman/agent/prompts/builder.rs, src/openhuman/agent/prompts/types.rs, src/core/agent_cli.rs
The agent definition and subagent render APIs no longer expose the inert skills catalog option. JSON agent listings no longer emit the property.
Prompt construction
src/openhuman/agent/harness/session/builder/factory.rs, src/openhuman/agent/harness/subagent_runner/...
Inline, file-based, and typed subagent prompt paths no longer forward the removed option.
Agent configurations and compatibility
src/openhuman/agent/registry/agents/*.toml, src/openhuman/agent/registry/defaults.rs, src/openhuman/agent/registry/agents/loader.rs, src/openhuman/config/schema/context.rs
Agent definitions remove the setting. The vision agent replaces it with omit_safety_preamble = true. Loader coverage confirms legacy TOML keys still deserialize.
Tests and fixtures
src/openhuman/agent/**, src/openhuman/tools/orchestrator_tools.rs, tests/raw_coverage/*
Fixtures, prompt options, constructor calls, and assertions are aligned with the updated contracts.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 4a460

This change removes an unused configuration flag and updates its call sites and documentation without introducing a supported correctness or production risk; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: senamakel

Poem

A rabbit trims a flag from every trail
Prompts now carry only fields that prevail
Old TOML keys pass through the gate
Tests hop neatly into their new state
The catalog rests in its rightful place

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Most changes are in scope, but context_scout and planner include unrelated iteration, result-size, tier, model, delegate, and tool-surface changes. The vision agent also changes omit_safety_preamble b… Remove the unrelated agent configuration changes or link them to separate requirements and issues. Keep this pull request limited to retiring omit_skills_catalog and updating its related APIs, documentation, tests, and configurations.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes removal of the inert omit_skills_catalog flag.
Linked Issues check ✅ Passed The changes satisfy issue #5699 by removing omit_skills_catalog from AgentDefinition, prompt-builder APIs, render options, call sites, fixtures, and in-tree configurations. The regression test preserv…
Docstring Coverage ✅ Passed Docstring coverage is 91.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 7 files.
Full details: Linked Issues check

Explanation

The changes satisfy issue #5699 by removing omit_skills_catalog from AgentDefinition, prompt-builder APIs, render options, call sites, fixtures, and in-tree configurations. The regression test preserves deserialization of legacy TOML keys.

Full details: Out of Scope Changes check

Explanation

Most changes are in scope, but context_scout and planner include unrelated iteration, result-size, tier, model, delegate, and tool-surface changes. The vision agent also changes omit_safety_preamble behavior instead of only removing the retired flag.

  • Fix all pre-merge checks with AI

Warning

Your free Security trial is over. An organization admin can activate billing to continue.


Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 27, 2026
Three positional call sites in `tests/raw_coverage/` still passed the removed
`omit_skills_catalog` argument, so `raw_coverage_all` failed to compile with
E0061 in the Rust Core Coverage lane.

I missed them because `raw_coverage_all` declares
`required-features = ["voice", "inference"]`, and my local `cargo check --lib
--tests` runs the default feature set, which skips the target entirely. Checked
now with the same feature list CI uses:

    cargo check --tests --features channels,media,inference,voice,web3,\
      documents,modules,flows,skills,mcp,crash-reporting,http-server,\
      scheduler-gate,file-logging,contacts,runtime-node,memory-git,hosting

Finished clean. `cargo fmt --all` clean.
@ntdatt812

Copy link
Copy Markdown
Author

The compile break is fixed and the lane now gets past it. What is failing now is a different test, in a domain this PR does not touch:

---- composio_raw_coverage_e2e::composio_controller_registry_and_scope_handlers_cover_validation_edges ----
assertion failed: memory_missing.contains("memory client not initialised")
test result: FAILED. 23 passed; 1 failed; 448 filtered out

Why this PR is what surfaced it. rust-coverage-changed.sh maps src/<a>/<b>/… to the libtest filter <a>::<b>. This PR touches src/openhuman/tools/orchestrator_tools.rs, so openhuman::tools is in the scope set and drags the composio raw-coverage target into the run. Until my last push, the lane never reached that test — it died at the E0061 compile error first.

Why it looks pre-existing rather than caused. The assertion is on process-global state: it requires the memory client to be uninitialised, and raw_coverage_all merges ~76 former test files into one binary. Nothing in this PR initialises a memory client — the diff removes a prompt flag from AgentDefinition and drops one key from agent_cli's JSON dump.

I am not asserting that from reading alone. I have the same command CI runs going against a clean main on my machine:

cargo test --features "$(bash scripts/ci/product-features.sh)" \
  --test raw_coverage_all -- composio_raw_coverage_e2e:: --test-threads=1

I will post the result either way. If it fails on main too, this is a latent order/state dependency that any PR touching openhuman::tools will now hit, and it deserves its own issue rather than a fix smuggled into this one — tell me if you would rather I file it or fix it here.

Everything else on the run is green, including Rust Quality, and both bots have approved.

@ntdatt812

Copy link
Copy Markdown
Author

Baseline result, as promised — and it does not support the conclusion I was leaning toward, so here is what I actually measured.

Like-for-like on my host, same command CI runs:

cargo test --features "$(bash scripts/ci/product-features.sh)" \
  --test raw_coverage_all -- composio_raw_coverage_e2e:: --test-threads=1
result
clean main 21 passed; 3 failed
this branch 21 passed; 3 failed

Identical — same three tests, same three assertions, including the one CI flagged at composio_raw_coverage_e2e.rs:877. On the platform I can test, this PR changes nothing about that outcome.

Two caveats I am not going to paper over.

  1. My host is Windows, and two of those three failures are plainly Windows artifacts — assertion failed: empty.archive_dir.ends_with("state/triggers") is a path-separator mismatch. So my run is contaminated, and I cannot claim from it that the CI failure is pre-existing on Linux.

  2. I also checked whether main's own CI vindicates it, and it does not: the most recent green main run (33019940407) scoped to libtest filter 'openhuman::config' and never compiled the composio target at all. main being green says nothing here either way.

I was also wrong about the mechanism. I suggested this looked like an ordering/global-state dependency inside the merged raw_coverage_all binary. It is not — running that single test with --exact and no siblings fails identically on clean main. So whatever it is, co-running is not the trigger.

What stands: nothing in this diff initialises a memory client or touches composio; the diff removes a prompt flag from AgentDefinition, drops one key from agent_cli's JSON dump, and fixes three positional call sites in tests/raw_coverage/. This PR pulled the composio target into the lane's scope (via src/openhuman/tools/orchestrator_tools.rs → filter openhuman::tools) and, until my last push, the lane died at the compile error before ever reaching it.

I would rather you make the call than have me guess: happy to re-run the lane, to open a separate issue for the composio assertion, or to dig further if you can point me at what memory client not initialised depends on in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omit_skills_catalog is inert: the flag is threaded through both sub-agent prompt paths and read by neither

1 participant