Closed-Loop Agent Skill for Correcting Execution Drift
Observe deviation. Correct fast.
English · 中文 · Philosophy · 哲学说明 · Install Guide · 安装指南 · Examples · 案例
An open-source Agent Skill that treats the gap between target state and current output as the real work. Instead of celebrating that something was generated, it inspects deviation, localizes the error source, and chooses the right control action: retry, rewrite, switch tools, narrow scope, or escalate to a human.
Built on Norbert Wiener's control-theory insight that systems improve through feedback loops, not one-shot commands. In AI work, that means execution quality depends on how well the system senses deviation and corrects it before error compounds.
|
🤖 Agent Builders
|
🛠️ Workflow Operators
|
|
📣 GTM & Ops Teams
|
|
graph TD
A["Task has a target state"] --> B["Observe current output"]
B --> C["Measure deviation"]
C --> D["Localize error source"]
D --> E["Choose correction path"]
E --> F["Next loop or escalate"]
style A fill:#fef3cd,stroke:#d4a843
style C fill:#e8f4f8,stroke:#5ba4c9
style E fill:#e8f7ec,stroke:#28a745
style F fill:#eef2ff,stroke:#4f46e5
The key move: shape the problem the right way before spending more execution on it.
Every valid Feedback Controller response ends with the same six-part control diagnosis:
## Target State
## Current State
## Observed Deviation
## Error Source
## Correction Strategy
## Escalation DecisionSales email drifted from the account brief
The output exists, but it is commercially unsafe.
Compare the draft against the account brief, name the specific drift, and correct only the affected sections.
Market update used stale sources
The system produced a report, but the loop failed on recency control.
Inspect source recency, name the retrieval failure, and rerun only the evidence-gathering and conclusion steps.
Support reply became defensive
The failure is not factual. It is relational.
Hold the factual core constant, identify the tone drift, and rewrite only the opening and apology logic.
Automation kept retrying after a permission error
The system is moving, but not learning.
Stop the loop, classify the failure as a non-retriable permission issue, and route it to the owner who can unblock access.
| Typical Response | Feedback Controller |
|---|---|
| Treats output existence as success | Treats deviation from target as the real signal |
| Retries blindly | Chooses a typed correction path |
| Rewrites everything | Prefers the smallest effective correction |
| Hides failure behind confidence | Names the failure mode explicitly |
| Lets loops run indefinitely | Defines stop conditions and escalation |
- Feedback matters more than one-shot command quality.
- Control is the process of shrinking deviation, not showing off complexity.
- Useful memory is feedback that changes the next action.
- Humans matter most when they provide high-quality corrective signal.
→ Read the full philosophical foundation
curl -fsSL https://raw.githubusercontent.com/clarkchenkai/feedback-controller/main/install/install.sh | bashgit clone https://github.com/clarkchenkai/feedback-controller.git
cp -r feedback-controller/feedback-controller ~/.your-platform/skills/feedback-controller| Platform | Install Method | Status |
|---|---|---|
| Claude Code | ~/.claude/skills/feedback-controller |
✅ |
| Cursor | Remote rule or local skills folder | ✅ |
| OpenAI Codex | ~/.codex/skills/feedback-controller or .agents/skills/feedback-controller |
✅ |
| Gemini CLI | ~/.gemini/skills/feedback-controller |
✅ |
| Google Antigravity | ~/.gemini/antigravity/skills/feedback-controller |
✅ |
| Amp / Goose / Cline | ~/.agents/skills/feedback-controller |
✅ |
feedback-controller/
├── feedback-controller/
│ ├── SKILL.md
│ ├── agents/
│ │ └── openai.yaml
│ └── references/
├── docs/
│ ├── philosophy.md
│ └── philosophy-zh.md
├── install/
│ ├── install.sh
│ ├── README-install.md
│ └── README-install-zh.md
├── examples/
├── examples-zh/
├── scripts/
│ └── validate-docs.sh
├── README.md
├── README-zh.md
└── LICENSE
Contributions are welcome, especially when they improve:
- sharper protocols and examples
- stronger mirrored Chinese documentation
- better platform compatibility
- clearer high-risk boundaries
Released under the MIT License.