Skip to content

feat(skill-eval): add an isolated Skill Assurance domain and dogfood the AgentSec skill #14

Description

@trionnemesis

Decision recorded in ADR 0008 — Skill Assurance is a separate bounded context
(docs/adr/0008-skill-assurance-bounded-context.md, currently on branch
docs/adr-0008-skill-assurance).

Why

.claude/skills/agentsec/SKILL.md is written as a list of executable invariants —
preview before run, never claim a verdict, never mint approvals, not_tested is
not pass, a detection gap is two fixes. Nothing verifies any of them, and
.claude/README.md already ranks that file as the one layer a prompt can talk out
of. The invariants most worth trusting have the least enforcement behind them.

What

Build skill_eval as a bounded context. It shares the harness infrastructure —
policy guard, allowlist, fixtures, trace normalisation, report normaliser, CI — and
shares no domain types with the purple-team side.

Per ADR 0008:

  • separate schema: kind: SkillEvalSuite, apiVersion: agentsec.dev/v1alpha1
  • separate runner protocol SkillHarnessRunner, not a widened ExecutorName
  • separate verdict type; PurpleVerdict is not extended
  • separate store file results/skill_eval.db, not new tables in agentsec.db
  • separate CLI namespace (agentsec skill ...) and a separate workflow
  • crossover rule: a security behaviour of the agent is an ordinary AGT-*
    scenario, judged by the existing evaluator, unchanged

In scope: trigger accuracy, process constraints, policy-boundary adherence,
stability across harness and model changes.

Out of scope: brand voice, general productivity skills, capability
benchmarking as a product. If that line stops holding, the answer is a separate
repository — not a quiet widening of this context.

Sequence

Phase 0 — lands now, needs no model and no credentials

  • SkillEvalSuite Pydantic model + JSON Schema
  • static validator: frontmatter, reference paths, script existence, digests,
    dangerous references
  • agentsec skill validate
  • blocking static CI job

Phase 1 — blocked on the roadmap's "one real staging agent, end to end"

  • clean workspace factory (repo / HOME / config isolation)
  • SkillHarnessRunner for Claude Code, one harness only
  • trace + artifact capture: tool sequence, loaded skills, file diff, tokens
  • deterministic graders: exit code, schema validation, file contents, static
    analysis, tool-call trace, refusal evidence
  • skill_eval store and reporting
  • first reference suite dogfooding this repo's own skill — positive,
    negative, boundary, adversarial and regression cases against the six
    non-negotiables
  • control-attribution ablation: skill / settings.json permission /
    hooks/guard_agentsec.py

Phase 2 — after Phase 1 is proven

  • separate nightly workflow, trend-reporting only
  • cross-harness runners
  • advisory semantic judge, never gating (ADR 0002 is unamended)
  • narrow MCP surface keyed on a committed suite_id, if warranted at all

Preconditions that are not negotiable

  • A flake policy must exist before the first stochastic job merges.
    Repetitions, pass-rate threshold, quarantine path. All three current CI jobs
    run without model credentials; this is the first that will not. A nightly job
    that goes red on variance gets muted within a month, and a muted gate looks
    like coverage while providing none.
  • Results are recorded as rates, not verdicts. Trial count, pass rate,
    interval — never a single trial promoted to a gate.
  • Comparisons must name what moved. skill_changed, suite_changed,
    fixture_changed, model_changed, harness_changed. A score that fell after
    a model upgrade is environment drift, not a skill regression.
  • No MCP tool takes a prompt, a skill path, a workspace path or a runner
    command.
    ADR 0003 holds; run_arbitrary_prompt and eval already fail the
    build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions