Repository navigation
refactor(agent): separate tool surface from operation registry - #17
Merged
avabbbb merged 8 commits intoSep 22, 2026
Merged
Conversation
This was referenced Sep 22, 2026
avabbbb
marked this pull request as ready for review
September 22, 2026 07:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
OfferU currently has a large Operation Registry because the Registry is the governed control plane for more than external Agents:
On the current assisted-apply branch the raw Registry contains 263 Operations.
That number was easy to misread as "the Agent has 263 tools".
It does not.
Static Skill projection shows:
The real defect is that some discovery paths — especially
ops --group/manifest --group— still treated route-level CRUD, diagnostics and legacy compatibility Operations as peers of model-facing tools.This PR creates an explicit Tool Surface V2 boundary and performs the first evidence-backed registry cleanup.
Architecture
The Registry stays the authority.
Discovery is only a projection.
Main change: Agent-filtered discovery
Adds
agent_operation_names()to the Skill Registry.ops --group <group>now means:rather than:
The explicit developer/audit escape hatch remains:
which still exposes the complete Registry.
Example reduction
Before this PR:
The goal is not an arbitrary low number. The goal is to keep route-level CRUD and maintenance tools out of normal Agent choice.
Registry cleanup: 263 → 260
Three Operations are removed with direct evidence.
1. Remove
get_agent_provider_healthThe single-provider Operation had no product route or Skill caller.
The actual product/Agent path uses
list_agent_provider_health.The underlying provider-health service remains available to implementation code.
2. Remove
get_synthetic_email_test_data_statusThis was synthetic-fixture/test infrastructure published as a Registry Operation.
Its service function remains available to privacy-hygiene tests. It is no longer a product/Agent Operation.
3. Merge
generate_legacy_cover_letterinto canonicalgenerate_cover_letterBoth accepted the same business input:
and produced the same class of draft.
The legacy
/applications/generateHTTP route now calls the canonical Operation, which reads the current structured Resume/ResumeSection model.The duplicate legacy Operation, input model and implementation are removed.
After this slice:
CLI clarity
Manifest / ops output now exposes separate metrics:
operation_registry_countagent_tool_countfeatured_tool_countinternal_operation_countThe old
operation_countremains a backwards-compatible alias for Registry count.This prevents future docs/Evals from treating Registry size as the model-facing tool count.
What is intentionally NOT deleted
This PR does not delete the old 28-operation legacy family wholesale.
Static review shows many still back current HTTP/UI surfaces.
For example:
create_legacy_applicationand canonicalcreate_applicationwrite different state models (Applicationvs currentApplicationRecord);get_legacy_profilestill backs current Profile routes.Those require data/route migration, not aliases or blind deletion.
Deferred consolidation
The architecture note records Phase-2 candidates such as:
follow_up,company_research,tailor_resume,application_assistant, andreply_watch.Those should be accepted only after before/after real-Agent Eval, not from line-count intuition.
Tests added
backend/tests/test_agent_tool_surface.pylocks:--allstill exactly exposes the full RegistrySafety
Unchanged:
A tool being hidden from Agent discovery does not change authorization for existing product routes.
External design basis
Current tool-design guidance points in the same direction:
See
docs/architecture/2026-09-22-tool-surface-v2.md.Review note
This is stacked on #14 because #14 adds one assisted-apply Operation and is the current tool inventory baseline.
It is intentionally independent of #16's OMP RPC Harness implementation. #16 is the appropriate before/after evaluator for the deferred Skill-level consolidation work.
Verification state
Focused regression tests are included, but this PR does not claim a local test run from this GitHub-only editing session.
Keep Draft until local/CI verification is available.