Catalog/E family/E01
Proposed specificationSource-located exemplarH1H3

Inheritance and polymorphic routing

Specialize related harnesses.

JOIN POINTharness_specialization_via_subtypeRECORD STATUSCandidate · v0.1.0
UML class view for Inheritance and polymorphic routing, showing participant roles, received calls, and analytical dependencies
FIG. E01 / UML CLASS VIEW
Object interaction diagram for Inheritance and polymorphic routing, showing role collaboration and a numbered message sequence
FIG. E01 / OBJECT INTERACTIONS
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.
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.

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 SKETCH
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.
CODE DESIGN / PYTHON
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.

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/crewAIlib/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 ↗

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.

ANY-EVIDENCE FAMILY COVERAGE33/36

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 / 41
Canonical source anchorcrewAIInc/crewAI 7abc196a176alib/crewai/src/crewai/agent/core.py:223

Concrete 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.