What Worked, Not Just What Happened
Memory tells Wolffish what happened. The feedback loop tells it what worked. Thebasalganglia module records the outcome of every interaction — whether tool calls succeeded, whether you approved or denied flagged operations, and what approaches produced good results. Over time, this builds learned behavioral preferences without explicit programming.
Location
Four Outcome Types
| Outcome | Trigger | Meaning |
|---|---|---|
success | Tool call completed without error | This approach worked |
failure | Tool call threw an error or returned an error state | This approach didn’t work |
approval | User approved a flagged tool call (amygdala confirm level) | User trusts this operation |
denial | User rejected a flagged tool call | User doesn’t want this |
How Feedback Is Recorded
After every turn,basalganglia.recordOutcome() appends an entry:
- Timestamp — when it happened
- Outcome — success, failure, approval, or denial
- Tool name — which capability was invoked
- Truncated args — what was passed (capped at ~200 characters for readability)
- Context — brief description of the surrounding conversation
Example Feedback Entries
How Feedback Influences Behavior
Theprefrontal module reads feedback entries during context assembly. The LLM sees patterns in what worked and what didn’t, and adjusts its approach accordingly.
The Interface
basalganglia exposes two methods to prefrontal:
What the LLM Learns
Over time, patterns emerge from accumulated feedback:Commit style preferences
Commit style preferences
After several
success outcomes on commits with conventional format (feat:, fix:, chore:), the LLM learns to always use this format. If a non-conventional commit was ever denied, that reinforces the preference.Safe operations
Safe operations
If the user consistently
approves git pushes to feature branches, Wolffish learns that these are low-risk. If the user consistently denies force pushes, it learns to avoid suggesting them — or to flag them more prominently.Error recovery
Error recovery
After a
failure from a specific approach (e.g., searching an internal site that isn’t indexed), the LLM learns to try alternative approaches next time (e.g., asking the user for the URL directly).Tool preferences
Tool preferences
If
pnpm commands always succeed but npm commands were denied once, the LLM learns your package manager preference from outcomes — not just from preferences.md.Growing With You
This is the mechanism that makes Wolffish adaptive over time. It’s not just remembering facts (knowledge files do that) — it’s remembering what worked in practice. The combination creates an agent that:- Knows your preferences (knowledge) — what you said you want
- Knows what actually works (feedback) — what produced good outcomes
- Avoids past mistakes (failure records) — what went wrong before
Inspecting and Editing Feedback
The feedback file is plain markdown. You can:- Read it to understand why Wolffish behaves a certain way
- Delete entries to “unlearn” a pattern (e.g., remove old denials that no longer apply)
- Add entries to seed behavior (e.g., add a denial for
rm -rf /even if it never happened)
Feedback vs. Knowledge
| Aspect | Knowledge Files | Feedback Loop |
|---|---|---|
| Stores | Facts and preferences | Outcomes and patterns |
| Written by | LLM promotion + direct writes | Automatic after every turn |
| Answers | ”What does the user want?" | "What actually works?” |
| Example | ”User prefers pnpm" | "pnpm install succeeded 47 times, npm denied once” |
| Editing | Common and encouraged | Rare, mostly for corrections |