UAT: builtin/context skill is never auto-injected into actor skill sets — CRP context requests unavailable during plan execution #2465

Open
opened 2026-04-03 18:31:51 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/m5-builtin-context-skill-auto-injection
  • Commit Message: fix(skills): register and auto-inject builtin/context skill into actor skill sets at startup
  • Milestone: v3.4.0
  • Parent Epic: #396

Background

The spec (docs/specification.md, ACMS > CRP > builtin/context Skill section) states:

"Actors issue context requests through a context skill that is automatically injected into every actor's skill set"

The builtin/context skill (providing request_context, query_history, and get_context_budget tools) is defined in src/cleveragents/skills/builtins/context_ops.py with build_context_skill_definition() and register_skill_context_tools() factory functions. However, there is no code anywhere in the codebase that:

  1. Calls register_skill_context_tools() at startup to register the tools in the global ToolRegistry
  2. Calls build_context_skill_definition() to register the builtin/context skill in the SkillRegistry
  3. Auto-injects the builtin/context skill into actor skill sets during plan execution

Searched locations confirming the gap:

  • src/cleveragents/application/container.py — no reference to register_skill_context_tools or build_context_skill_definition
  • src/cleveragents/application/services/actor_service.py — no auto-injection logic
  • src/cleveragents/application/services/plan_executor.py — no auto-injection logic
  • src/cleveragents/application/services/skill_registry_service.py — no auto-injection logic
  • src/cleveragents/langgraph/nodes.py — no auto-injection logic

Expected behavior: At application startup (in the DI container or skill registry initialization), register_skill_context_tools() should be called to register the three CRP tools, and build_context_skill_definition() should register the builtin/context skill. During plan execution (Strategize and Execute phases), the builtin/context skill should be automatically added to every actor's available skill set so actors can issue request_context, query_history, and get_context_budget calls.

Impact: Actors cannot dynamically request additional context during reasoning. The entire CRP (Context Request Protocol) demand-driven context model is non-functional because the tools are never available to actors.

Code location:

  • src/cleveragents/skills/builtins/context_ops.py — functions exist but are never called
  • src/cleveragents/application/container.py — missing registration calls
  • Actor execution pipeline — missing auto-injection logic

Severity: High — the CRP's core demand-driven context model is completely non-functional.

Subtasks

  • Write a failing BDD scenario in features/ that verifies builtin/context skill tools are available to actors during plan execution (TDD — failing test first)
  • Call register_skill_context_tools() in src/cleveragents/application/container.py (or the appropriate startup/bootstrap location) to register request_context, query_history, and get_context_budget in the global ToolRegistry
  • Call build_context_skill_definition() in the startup/bootstrap path to register the builtin/context skill in the SkillRegistry
  • Implement auto-injection logic in the actor execution pipeline (Strategize and Execute phases) to add the builtin/context skill to every actor's skill set before execution begins
  • Verify the auto-injection occurs in both the Strategize and Execute phases as required by the spec
  • Ensure the injection is idempotent (calling it twice does not duplicate the skill in the actor's skill set)
  • Add/update unit tests (Behave scenarios) covering: skill registered at startup, skill present in actor skill set during Strategize, skill present in actor skill set during Execute
  • Add/update Robot Framework integration test asserting that an actor can successfully call request_context during plan execution
  • Run nox -e typecheck — confirm no Pyright errors
  • Run nox -e lint — confirm no lint errors
  • Run nox -e unit_tests — all scenarios pass
  • Run nox -e coverage_report — coverage remains ≥ 97%

Definition of Done

  • All subtasks above are checked off
  • register_skill_context_tools() is called at application startup and registers all three CRP tools in the ToolRegistry
  • build_context_skill_definition() is called at application startup and registers builtin/context in the SkillRegistry
  • The builtin/context skill is automatically present in every actor's skill set during both Strategize and Execute phases
  • Auto-injection is idempotent — no duplicate skill entries
  • BDD scenarios cover startup registration and actor-level skill availability
  • Robot integration test confirms an actor can call request_context end-to-end
  • All nox stages pass
  • Coverage >= 97%
  • Commit fix(skills): register and auto-inject builtin/context skill into actor skill sets at startup pushed to branch fix/m5-builtin-context-skill-auto-injection
  • PR merged and this issue closed

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-uat-tester

## Metadata - **Branch**: `fix/m5-builtin-context-skill-auto-injection` - **Commit Message**: `fix(skills): register and auto-inject builtin/context skill into actor skill sets at startup` - **Milestone**: v3.4.0 - **Parent Epic**: #396 ## Background The spec (`docs/specification.md`, ACMS > CRP > `builtin/context` Skill section) states: > "Actors issue context requests through a **context skill** that is automatically injected into every actor's skill set" The `builtin/context` skill (providing `request_context`, `query_history`, and `get_context_budget` tools) is defined in `src/cleveragents/skills/builtins/context_ops.py` with `build_context_skill_definition()` and `register_skill_context_tools()` factory functions. However, there is no code anywhere in the codebase that: 1. Calls `register_skill_context_tools()` at startup to register the tools in the global `ToolRegistry` 2. Calls `build_context_skill_definition()` to register the `builtin/context` skill in the `SkillRegistry` 3. Auto-injects the `builtin/context` skill into actor skill sets during plan execution **Searched locations confirming the gap**: - `src/cleveragents/application/container.py` — no reference to `register_skill_context_tools` or `build_context_skill_definition` - `src/cleveragents/application/services/actor_service.py` — no auto-injection logic - `src/cleveragents/application/services/plan_executor.py` — no auto-injection logic - `src/cleveragents/application/services/skill_registry_service.py` — no auto-injection logic - `src/cleveragents/langgraph/nodes.py` — no auto-injection logic **Expected behavior**: At application startup (in the DI container or skill registry initialization), `register_skill_context_tools()` should be called to register the three CRP tools, and `build_context_skill_definition()` should register the `builtin/context` skill. During plan execution (Strategize and Execute phases), the `builtin/context` skill should be automatically added to every actor's available skill set so actors can issue `request_context`, `query_history`, and `get_context_budget` calls. **Impact**: Actors cannot dynamically request additional context during reasoning. The entire CRP (Context Request Protocol) demand-driven context model is non-functional because the tools are never available to actors. **Code location**: - `src/cleveragents/skills/builtins/context_ops.py` — functions exist but are never called - `src/cleveragents/application/container.py` — missing registration calls - Actor execution pipeline — missing auto-injection logic **Severity**: High — the CRP's core demand-driven context model is completely non-functional. ## Subtasks - [ ] Write a failing BDD scenario in `features/` that verifies `builtin/context` skill tools are available to actors during plan execution (TDD — failing test first) - [ ] Call `register_skill_context_tools()` in `src/cleveragents/application/container.py` (or the appropriate startup/bootstrap location) to register `request_context`, `query_history`, and `get_context_budget` in the global `ToolRegistry` - [ ] Call `build_context_skill_definition()` in the startup/bootstrap path to register the `builtin/context` skill in the `SkillRegistry` - [ ] Implement auto-injection logic in the actor execution pipeline (Strategize and Execute phases) to add the `builtin/context` skill to every actor's skill set before execution begins - [ ] Verify the auto-injection occurs in both the Strategize and Execute phases as required by the spec - [ ] Ensure the injection is idempotent (calling it twice does not duplicate the skill in the actor's skill set) - [ ] Add/update unit tests (Behave scenarios) covering: skill registered at startup, skill present in actor skill set during Strategize, skill present in actor skill set during Execute - [ ] Add/update Robot Framework integration test asserting that an actor can successfully call `request_context` during plan execution - [ ] Run `nox -e typecheck` — confirm no Pyright errors - [ ] Run `nox -e lint` — confirm no lint errors - [ ] Run `nox -e unit_tests` — all scenarios pass - [ ] Run `nox -e coverage_report` — coverage remains ≥ 97% ## Definition of Done - [ ] All subtasks above are checked off - [ ] `register_skill_context_tools()` is called at application startup and registers all three CRP tools in the `ToolRegistry` - [ ] `build_context_skill_definition()` is called at application startup and registers `builtin/context` in the `SkillRegistry` - [ ] The `builtin/context` skill is automatically present in every actor's skill set during both Strategize and Execute phases - [ ] Auto-injection is idempotent — no duplicate skill entries - [ ] BDD scenarios cover startup registration and actor-level skill availability - [ ] Robot integration test confirms an actor can call `request_context` end-to-end - [ ] All nox stages pass - [ ] Coverage >= 97% - [ ] Commit `fix(skills): register and auto-inject builtin/context skill into actor skill sets at startup` pushed to branch `fix/m5-builtin-context-skill-auto-injection` - [ ] PR merged and this issue closed --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.4.0 milestone 2026-04-03 18:32:00 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — builtin/context skill not auto-injected means CRP context requests are unavailable to actors. This breaks the context request pipeline.
  • MoSCoW: Must Have — The builtin/context skill is essential for the ACMS context pipeline to function. Without auto-injection, actors cannot request context.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — `builtin/context` skill not auto-injected means CRP context requests are unavailable to actors. This breaks the context request pipeline. - **MoSCoW**: Must Have — The builtin/context skill is essential for the ACMS context pipeline to function. Without auto-injection, actors cannot request context. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.4.0 milestone 2026-04-06 21:01:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#396 Epic: ACMS Context Pipeline
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2465
No description provided.