Skill: clarkchenkai/feedback-controller-clarkchenkai (version 1.0.0)

--- name: feedback-controller description: | Feedback Controller — Closed-Loop Agent Skill for Correcting Execution Drift. Use it when the user needs a disciplined protocol and fixed output contract for this kind of task rather than a generic answer. license: MIT metadata: author: clarkchenkai version: "1.0.0" language: en --- # Feedback Controller — Closed-Loop Agent Skill for Correcting Execution Drift Use this skill when the task matches the protocol below. ## Activation Triggers - multi-step execution drift - an output exists but does not meet the brief - tool failures, stale context, or partial retries - quality checks after writing, analysis, or workflow automation - cases where the real question is not 'did it run?' but 'did it converge?' ## Core Protocol ### Step 1: Define the target state Restate what the output needed to accomplish, not just that it needed to exist. ### Step 2: Compare current state against target Inspect the produced output, execution trace, or workflow state and name the deviation explicitly. ### Step 3: Localize the error source Classify the failure as context gap, specification gap, tool failure, reasoning error, policy conflict, or environmental constraint. ### Step 4: Choose the smallest effective control action Prefer local correction over full rewrite when possible. Decide whether to retry, switch tools, narrow scope, rewrite, or escalate. ### Step 5: Set a stop condition Do not permit endless correction loops. State what would count as success, and what triggers human escalation. ## Output Contract Always end with this six-part structure: ```markdown ## Target State [...] ## Current State [...] ## Observed Deviation [...] ## Error Source [...] ## Correction Strategy [...] ## Escalation Decision [...] ``` ## Response Style - Be specific about the deviation, not vague about quality. - Prefer typed error diagnoses over generic 'try again' advice. - Use partial correction when the problem is local. - Escalate early when policy, approval, or ambiguity blocks safe correction. ## Boundaries - It does not replace the original goal definition. It assumes a target already exists. - It does not treat every failure as a reason to fully rewrite from scratch. - It does not allow silent retries in high-risk workflows with material consequences.

path: agents/openai.yaml
content: interface:
  display_name: "Feedback Controller"
  short_description: "Diagnose drift and choose the right correction path."
  default_prompt: "Use $feedback-controller to compare the target state with the current output and decide whether to retry, switch approach, or escalate."

policy:
  allow_implicit_invocation: true


path: references/correction-patterns.md
content: # Correction Patterns

## Retry
Use when the intent is clear and the failure came from transient execution noise.

## Partial rewrite
Use when one section drifted but the rest is sound.

## Tool switch
Use when the current tool cannot produce the needed evidence or fidelity.

## Narrow scope
Use when the task is too broad for a safe correction pass.

## Escalate
Use when approval, policy, or missing evidence blocks correction.


path: references/escalation.md
content: # Escalation Rules

Escalate when:

- the correction would change a high-risk judgment
- the system lacks authority to approve the fix
- the missing context cannot be recovered safely
- repeated correction attempts stop improving quality

Do not let a closed loop hide governance gaps.


path: references/wiener.md
content: # Wiener Reference

Feedback Controller is based on Norbert Wiener's idea that control means measuring deviation and using feedback to reduce it.

## Core implications

- A system should compare target state with current state
- Error signals are useful only if they change the next action
- Blind retries are not control; they are noise with compute attached
- Humans belong in the loop when judgment, policy, or asymmetric risk is involved


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)