agentsclimarketplace

Harness scaling

Skill mouadja02/skills/skills/agent-design/harness-scaling

A curated collection of agent skills for your AI agents - engineering craft, prompt engineering, design, growth marketing, ...

Install
npx -y skills add mouadja02/skills --skill harness-scaling

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when designing or auditing an agentic AI system holistically. Activates the six-component harness framework (โ„› Reasoning, โ„ณ Memory, ๐’ž Context, ๐’ฎ Skills, ๐’ช Orchestration, ๐’ข Governance) from arXiv:2605.26112. Trigger phrases: "design an agent system", "why is my agent unreliable", "harness architecture", "system-level agent design", "beyond model scaling", "agentic infrastructure", "scale my agent system", "agent performance bottleneck".

SKILL.md

17.2 KB, ~3.7k tokens by cl100k_base, as published. Nobody here has run it

Attribution: Derived from arXiv:2605.26112v1 โ€” From Model Scaling to System Scaling: Scaling the Harness in Agentic AI by Shangding Gu (UC Berkeley), May 2026. Reference implementation: CheetahClaws.

Harness Scaling for Agentic AI

Agent performance emerges from the interaction among multiple components, not from model capability alone. This skill encodes the insight that investing only in stronger foundation models while neglecting the surrounding harness โ€” memory, context assembly, skill routing, and governance โ€” yields unreliable agents regardless of model strength.

When to Activate

Activate this skill when:

  • Designing a new agentic system from scratch and choosing architectural components
  • Debugging persistent agent failures that survive model upgrades
  • Evaluating whether to invest in a stronger model vs. improving harness design
  • Auditing a production agent for reliability, auditability, or safety gaps
  • Implementing multi-agent coordination systems
  • Choosing memory, context, or routing strategies for an agent deployment
  • Answering: "why does my agent confidently do the wrong thing?"

Core Concepts

The Harness Equation

Agent harness performance is a function of six interacting components:

๐’ซ_H = ฮฆ(โ„›, โ„ณ, ๐’ž, ๐’ฎ, ๐’ช, ๐’ข)
SymbolComponentRole
โ„›Reasoning SubstrateThe foundation model; improved via model scaling
โ„ณMemory StorePersistent information with precision, durability, retrievability, verifiability
๐’žContext ConstructorInput assembly: relevance, compactness, traceability, refresh policy
๐’ฎSkill-Routing LayerTool & subagent dispatch: specificity, selectivity, composability, verifiability
๐’ชOrchestration LoopControl flow coordination across all components
๐’ขVerification & GovernanceGates reasoning outputs and external actions

Key insight: Scaling ๐’ฎ (skills) without scaling ๐’ข (governance) produces faster but less reliable progress. Each component must scale together.

The Three Primary Bottlenecks

The paper identifies three failure modes that survive model upgrades:

  1. Exposure without access (context governance failure) โ€” large context windows create signal dilution, not improved access
  2. Stale-but-confident (memory trust failure) โ€” outdated facts remain highly ranked; the agent acts destructively on invalidated assumptions
  3. Confident-but-unchecked (skill routing failure) โ€” specialized subagents return plausible outputs without downstream validation

Why Model Scaling Alone Is Insufficient

Three objections and their rebuttals:

  • "Stronger models will solve system problems" โ†’ Stale memory, over-broad permissions, missing provenance, and unsafe execution are system failures, not prediction failures. Stronger models don't eliminate the need for governance.
  • "End-to-end training will replace modular systems" โ†’ Deployed agents require auditability, permission control, rollback, and provenance โ€” these aren't optional, they're deployment requirements.
  • "System evaluation is too expensive" โ†’ Cost and standardization challenges are precisely why evaluation is needed. Real agents face latency, monetary cost, tool risk, and memory drift.

Detailed Topics

Component 1: Memory Store (โ„ณ)

Memory has four quality axes that must be actively maintained:

AxisDefinitionFailure Mode
PrecisionAccuracy within defined scopeOvergeneralized facts
DurabilityResistance to target driftSilent rewrites
RetrievabilityCost-effective accessImportant facts buried
VerifiabilityAbility to validate against live environmentStale-but-confident

System move: Make trust a runtime decision, not a stored property. Retrieved content is a hypothesis until re-checked.

Retrieval ranking formula (CheetahClaws):

rank = relevance ร— (1 - staleness_penalty) ร— confidence_factor

Implementation pattern:

@dataclass
class MemoryEntry:
    content: str
    confidence: float          # 0.0 โ€“ 1.0
    last_verified: datetime    # When was this last checked against live env?
    valid_until: Optional[datetime]  # None = no expiry
    source: str               # Provenance

def retrieve(query: str, entries: list[MemoryEntry]) -> list[MemoryEntry]:
    now = datetime.utcnow()
    ranked = []
    for e in entries:
        staleness = (now - e.last_verified).total_seconds() / 86400  # days
        staleness_penalty = min(staleness / 30, 0.9)  # cap at 90% penalty
        score = semantic_similarity(query, e.content) \
                * (1 - staleness_penalty) \
                * e.confidence
        ranked.append((score, e))
    ranked.sort(reverse=True)
    # Treat top results as hypotheses โ€” re-verify before acting
    return [e for _, e in ranked[:5]]

Component 2: Context Constructor (๐’ž)

Context has four quality axes:

AxisDefinitionFailure Mode
RelevancePertinence to current taskNoise displaces signal
CompactnessMinimal sufficient token setToken waste, attention dilution
TraceabilitySource provenance per tokenNo audit trail
Refresh PolicyAdaptation to environmental changesStale indices

System move: Treat each turn's context as output of a selection policy, not a fixed buffer.

Context assembly policy:

def assemble_context(task: str, budget: int) -> Context:
    # Layer 1: Persistent priors (loaded at session start)
    persistent = load_persistent_priors()  # e.g., CLAUDE.md equivalent

    # Layer 2: Just-in-time retrieval (not static index)
    jit_facts = retrieve_verified_memory(task)

    # Layer 3: Live environment search (always fresh)
    live_state = search_live_env(task)  # glob/grep/tool calls

    # Assemble with token budget enforcement
    context = pack_by_relevance(
        sources=[persistent, jit_facts, live_state],
        budget=budget,
        weight_fn=lambda x: semantic_score(task, x) * recency_weight(x)
    )
    return context  # Every token has a source ID and timestamp

The "lost in the middle" problem: Attention degrades for content in the middle of the context window. Place most critical facts at the start or end.

Component 3: Skill-Routing Layer (๐’ฎ)

Skill routing has four quality axes:

AxisDefinitionFailure Mode
SpecificityClear capability scope per skillAmbiguous routing
SelectivityCorrect skill invocationWrong tool chosen
ComposabilitySequential integration across skillsBroken pipelines
VerifiabilityExplicit post-condition validationConfident-but-unchecked

System move: Couple learned routing policy with verification at every step.

Routing with post-condition verification:

async def route_and_verify(task: SubTask) -> Result:
    # Estimate task type from available context
    task_type = classify_task(task)
    confidence = task_type.confidence

    # Confidence-aware escalation
    if confidence < 0.7:
        skill = FALLBACK_SKILL  # more capable / general
    else:
        skill = SKILL_REGISTRY[task_type.label]

    result = await skill.execute(task)

    # Post-condition check โ€” mandatory, not optional
    if not skill.verify_postcondition(task, result):
        result = await VERIFICATION_AGENT.recheck(task, result)

    return result

Component 4: Orchestration (๐’ช) and Governance (๐’ข)

The orchestration loop coordinates all components. Governance gates:

  • Intermediate reasoning outputs (before accepting a plan step)
  • External action effects (before committing a file write, API call, etc.)
  • Memory write-backs (traced and auditable)

Governance checklist before any external action:

โ–ก Has the relevant memory been re-verified against live state?
โ–ก Does the skill's post-condition check pass?
โ–ก Is there an audit trace for this action?
โ–ก Is rollback available if the action has side effects?
โ–ก Is the permission scope appropriate (principle of least privilege)?

Practical Guidance

Three Production Harness Comparisons

The paper compares three reference harnesses with similar frontier models but different harness designs:

HarnessMemoryContext GovernanceDistinctive Design
Claude CodePersistent text + auto-extractionUser/project/session layers (CLAUDE.md + JIT tools)Subagent specialization with per-agent context windows and permissions
OpenClawConversation history + vector retrievalUser/channel/sessionMulti-channel gateway (Discord, Slack, iMessage)
CheetahClawsStructured entries with explicit confidence + recency fieldsUser/project/sessionTransparency-first; confidence/recency as first-class queryable fields

Key insight: Similar frontier models yield radically different agents based on harness design alone.

Temporal Lever Framework

Three levers operating at different timescales:

LeverTimescalePrimary RoleFailure Mode
PromptLocal/immediateSpecify goal, constraints, styleBrittle over long horizons; poor transfer
SkillTask-levelReusable procedure or workflowWrong routing; poor composition
MemoryLongitudinalPreserve durable facts, experienceDrift, over-generalization, pollution

Design all three levers together. Prompt tuning without memory governance leads to tasks succeeding in isolation but failing across sessions.

Multi-Agent Performance Data

From Anthropic research cited in the paper:

  • Multi-agent (Opus 4 lead + Sonnet 4 subagents) outperformed single-agent Opus 4 by 90.2% on internal research tasks
  • Token usage explained 80% of performance variance; adding tool-call count and model choice raised it to 95%
  • Breadth-first tasks show strongest gains through parallel context windows

Multi-agent failure modes to design against:

  • Decomposition is easier than collaboration
  • Inter-agent misalignment (no shared state)
  • Inadequate task verification between agents
  • Missing: uncertainty communication, contradiction detection, task de-duplication, conflict resolution

Examples

Example: Diagnosing a failing agent with the harness framework

Agent symptom: Confidently deletes files based on outdated assumptions.

Diagnosis checklist:
  โ„ณ Memory: Was the file-existence assumption re-verified before action?
             โ†’ NO. Stale-but-confident failure.
  ๐’ž Context: Was the file listing freshly retrieved (JIT) or from a stale index?
              โ†’ STALE INDEX. Exposure-without-access failure.
  ๐’ฎ Skills: Did the delete skill have a post-condition check?
             โ†’ NO. Confident-but-unchecked failure.
  ๐’ข Governance: Was rollback available for the delete action?
                 โ†’ NO.

Fix:
  โ„ณ: Add staleness check โ€” re-verify file existence via tool call before destructive action
  ๐’ž: Replace static file index with JIT glob/ls tool call
  ๐’ฎ: Add post-condition: verify file is gone after delete AND previous state was as expected
  ๐’ข: Require user confirmation for irreversible actions OR implement soft-delete

Example: Harness design review checklist

## Harness Review: [System Name]

### โ„ณ Memory
- [ ] Confidence and recency tracked as first-class fields?
- [ ] Retrieval ranking penalizes staleness?
- [ ] Retrieved content treated as hypothesis until re-verified?
- [ ] Periodic re-verification against live environment?

### ๐’ž Context
- [ ] Context assembled by selection policy (not fixed buffer)?
- [ ] Persistent priors + JIT retrieval + live search (three layers)?
- [ ] Every token has source provenance?
- [ ] Token budget enforced with relevance ranking?

### ๐’ฎ Skill Routing
- [ ] Each skill has documented capability scope?
- [ ] Post-condition checks defined per skill?
- [ ] Confidence-aware escalation to more capable models?
- [ ] Composition verification between chained skills?

### ๐’ข Governance
- [ ] Audit trace for memory writes?
- [ ] Audit trace for routing decisions?
- [ ] Audit trace for tool permissions?
- [ ] Rollback available for side-effecting actions?

Guidelines

  1. Design all six components together โ€” a strong โ„› model with weak โ„ณ/๐’ž/๐’ฎ/๐’ข produces unreliable agents
  2. Make memory trust a runtime decision โ€” retrieved content is a hypothesis until re-verified against live environment
  3. Assemble context as a selection policy โ€” weight semantic relevance + compactness + recency
  4. Couple every skill invocation with a post-condition check โ€” fluent output โ‰  correct output
  5. Scale ๐’ฎ (skills) and ๐’ข (governance) together โ€” adding capabilities without governance adds speed but reduces reliability
  6. Use three context layers โ€” persistent priors (loaded upfront) + JIT retrieval + live environment search
  7. Propagate provenance โ€” every token in context should have a traceable source and timestamp
  8. Design for audit โ€” inspectable traces for memory writes, routing changes, tool permissions, agent failures

Gotchas

  1. Model upgrades masking system problems โ€” a stronger model can paper over a bad harness temporarily, until edge cases expose the underlying failure. Audit the harness, don't just upgrade the model.
  2. Stale-but-confident is silent โ€” outdated memory entries that remain highly ranked via semantic similarity are the most dangerous failure: the agent acts with high confidence on wrong assumptions. Add explicit staleness penalties.
  3. Context exposure โ‰  context access โ€” longer context windows do not improve retrieval; they dilute signal. Treat context as output of a ranking policy, not a dump buffer.
  4. Governance debt โ€” adding skills/tools without corresponding governance (audit traces, rollback, permission scoping) creates compounding risk. Each new capability needs a governance counterpart.
  5. Pass-k collapse โ€” agents that score well on single-shot benchmarks collapse under repeated rollouts (pass^k). Design for consistency, not just peak performance.
  6. Decomposition โ‰  collaboration โ€” multi-agent systems easily decompose tasks but struggle to collaborate (shared state, uncertainty communication, contradiction detection). Decomposition is a solved problem; collaboration is not.
  7. Reward hacking in longitudinal evaluation โ€” optimizing for benchmark proxy metrics instead of actual task quality. Track regression and earlier-failure recurrence alongside rolling success rates.

Integration

This skill provides the architectural foundation for:

References

Internal references:

External resources:


Skill Metadata

Created: 2026-05-26 Source Paper: arXiv:2605.26112v1 โ€” Shangding Gu, UC Berkeley Version: 1.0.0

What ships with it: 5 files

68.5 KB alongside SKILL.md

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.