Specialize the base harness only through a substitutable contract. Dispatch to the intended subtype at the declared boundary, and keep base behavior legal for every override.Inheritance and polymorphic routing
Specialize related harnesses.
harness_specialization_via_subtypeRECORD STATUSCandidate · v0.1.0UML class view
The proposed contract drawn as participant roles, received calls, and numbered dependencies.
Object interactions
The same roles and calls as a class collaboration and a numbered message sequence.
Pointcut
Where the mechanism applies. All four dimensions belong to the proposed match, not just its vocabulary.
- Context
- Harness variants share a base abstraction.
- Trigger
- A base-typed slot dispatches to a concrete implementation.
- Structure
- Base interface, overridden behavior, subtype registry, and invariant clauses.
- Effect
- Any accepted subtype honors the base contract at the dispatch boundary.
Protected contract
The obligation that clients, operators, and auditors should be able to rely on.
- Requires
- The base interface declares substitutable behavior.
- Ensures
- Runtime dispatch reaches the intended specialized implementation.
- Invariant
- Subtype overrides do not narrow required capabilities or violate base obligations.
- Violation
- Unsupported subtype behavior raises or is excluded from the slot.
Negative control
A class hierarchy with no harness dispatch does not count.
Variation & lifecycle
The hot spot is admitted only where the protected semantics survive.
Permitted variation
Class inheritance, interfaces, protocols, and plugin subclasses.
Test obligation
Test substitutability, dispatch, override errors, and invalid subtype.
Evolution question
Did inheritance replace ad hoc branching or move toward composition?
Prompt + code design
An illustrative prompt and a small design sketch for the proposed contract. Names and APIs are invented; this is not a repository excerpt.
class Harness(Protocol):
def step(self, state: State) -> State: ...
class ToolHarness:
def step(self, state):
return state.with_action(self.tools.choose(state))
class WorkflowHarness:
def step(self, state):
return state.with_workflow(self.workflows.advance(state))
def run(harness: Harness, state):
return harness.step(state)Illustrative design sketch. Inheritance is only a pattern when the base contract survives substitution. This example is a teaching aid, not implementation evidence or a conformance claim.
Detection & matching
The frozen rule that retrieves this record, the canonical source exemplar, and the control that should stay unmatched.
- Join point
harness_specialization_via_subtype- Source locator
- See the source record.
- Lexical cue
(?i)\bclass\s+\w*Agent\w*|\bextends\s+\w*Agent\w*|\binherits?\s+from\s+\w*Agent\w*Frozen expression, v0.1.0. A match is a retrieval cue, not a confirmed implementation.- Aliases
- None
- Canonical exemplar
- crewAIInc/crewAI
lib/crewai/src/crewai/agent/core.py:223Support: lib/crewai/tests/test_crew.py:4770 - Negative control
- A class hierarchy with no harness dispatch does not count.
Scope-anchored review. pohe-agent analyze <repo> --pattern E01 anchors the cue to its enclosing declaration and checks a separate operational signature for all four pointcut dimensions. Missing roles and negative-control risks remain visible; a structural match is not E2/E3. Calibration report ↗
Repository files
Up to five public files retrieved by the frozen cue and pinned to the audited commit. A match is a place to inspect, not a confirmed implementation.
lib/crewai/src/crewai/agent/core.py:223CANONICAL SOURCE02affaan-m/ECCsrc/llm/tools/executor.py:123RETRIEVAL CUE03agno-agi/agnolibs/agno/agno/agent/agent.py:82RETRIEVAL CUE04anomalyco/opencodepackages/cli/src/acp/agent.ts:59RETRIEVAL CUE05browser-use/browser-usebrowser_use/agent/cloud_events.py:18RETRIEVAL CUEEvidence & provenance
Each layer answers a different question. Do not substitute retrieval for review.
Source-located exemplar
A concrete source anchor is available for this proposed record. It is one exemplar, not evidence that all repositories—or every contract field—conform.
Review boundary: this candidate and its specification come from an AI-assisted study. Independent human validation remains open.
91.7% of repository families in the frozen panel have at least one current cue, historical cue, or canonical source layer. This is not confirmed prevalence.
Current lexical-cue repositories: 37 / 417abc196a176alib/crewai/src/crewai/agent/core.py:223lib/crewai/tests/test_crew.py:4770Concrete Agent specializes BaseAgent.
Exploratory retrieval cue Regex / v0.1.0
(?i)\bclass\s+\w*Agent\w*|\bextends\s+\w*Agent\w*|\binherits?\s+from\s+\w*Agent\w*This expression is a discovery instrument only. A match is a retrieval cue—not a confirmed implementation, pointcut match, or contract proof.