Skip to content

Create a capture-feedback skill #871

Description

@williamthorsen

Create a capture-feedback skill

Problem

When the user gives the agent feedback — correcting a misapplied rule, or specifying a new desired behavior — that feedback is the raw material for refining agent guidance (a skill, subagent, rulebook, general guidance, or helper) so it isn't needed again. Today the signal is lost unless the agent remembers to capture a mistake event, and even then only the error is recorded — not the corrected behavior or the net-new desired behavior, which are the parts that tell a later refinement what to enforce.

Context

  • capture-event is the append primitive: immutable, write-once records to a named KB store, with auto-filled context and an existing mistake tag (+ --skill) for guidance-preventable errors. It does no implementation, recall, or triage.
  • The collaborate skill already tells the agent to call capture-event --tags mistake --skill <skill> for skill-caused mistakes — but that path is error-only, skill-only, and relies on the agent remembering.
  • Agent-guidance feedback routes to the codeassembly KB store. The registry default_kb is personal, so @default is the wrong destination.
  • Refining guidance from a single data point risks over-fitting; feedback is captured now and refined later in a recall-driven pass over these events (kb-retrieve-events).

Proposed solution

Add a user-invocable capture-feedback skill that records agent-behavior feedback as a guidance-refinement candidate, applying the immediate fix when there's something concrete. It delegates the append to the capture-event skill; it does not refine the guidance itself.

Two modes, decided by one question — did relevant guidance already exist? (the agent assesses best-effort and records uncertainty when unclear):

  • Misapplied existing guidance — the agent broke a rule that already exists. Apply the fix, then capture. Tags: feedback, mistake.
  • No such guidance — the user specifies a net-new desired behavior. Usually nothing to apply; capture. Tag: feedback.

Flow:

  1. The user invokes /capture-feedback and describes a correction or a desired behavior.
  2. If a concrete artifact is involved, apply the fix directly — pausing to confirm the intended fix only when the feedback is genuinely ambiguous (more than one reasonable reading) or risky/large/hard to reverse. Purely behavioral feedback skips straight to capture.
  3. Capture an event via the capture-event skill, then report the fix and the record.

Captured content — only to the extent needed to generalize a refinement:

  • The generalized lesson: the error→correction pair (misapplied-guidance mode) or the desired behavior (no-guidance mode) — not the raw artifact or diff.
  • A best-effort candidate refinement target (guidance artifact + type: skill / subagent / rulebook / general guidance / helper) — --skill when it's a skill, a body note otherwise, "undetermined" when unclear.
  • Routed to the codeassembly store as a literal default in the skill (the project's conventional KB); --store overrides the rare off-store case.

Delivery: a declared skill, deployed verbatim via the recommended collection — so it delegates to capture-event rather than invoking a helper by an injected path.

Tags: feedback on every record (the refinement pass's recall handle); mistake when existing guidance was misapplied; --skill when the target is a skill.

Acceptance criteria

Must have

  • /capture-feedback <description> is a user-invocable skill.
  • The skill distinguishes the two modes by whether relevant guidance already existed, recording uncertainty when unclear.
  • When a concrete artifact is involved, the agent applies the fix; purely behavioral feedback applies no fix.
  • The fix is applied directly with no approval prompt, except when the feedback is ambiguous or risky/large — then the agent confirms the intended fix first.
  • After the fix (or immediately, for behavioral feedback), the skill captures an event via the capture-event skill carrying the generalized lesson, and reports the record.
  • The event records a best-effort candidate refinement target (artifact + type), via --skill for skills and a body note otherwise, and "undetermined" when unclear.
  • Every event is tagged feedback; mistake is added when existing guidance was misapplied.
  • The event defaults to the codeassembly store with no per-invocation prompt; --store overrides.
  • The skill is declared (deploy: declared) and joins the recommended collection so it deploys with that collection's closure.
  • New and modified behavior is covered by tests.

Should have

  • The collaborate skill's "Skill improvement" instruction points to capture-feedback for user-driven feedback.

Metadata

Metadata

Labels

featureAdded or improved external functionalityscope:agents

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions