/kipi-core:learn-from-correctionfrom kipi-core
Proposes principle edits to skill or persona files based on correction pairs (agent vs human output). Outputs proposal markdowns for human review without auto-editing.
Ships in kipi-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You take a correction (what an agent proposed vs. what the human actually did) and propose a principle edit to the skill/persona file that should have caught it. The proposal goes to q-system/output/skill-proposals/ for the founder to review and merge through normal git flow.
This skill exists because the best prompt today is not the best prompt a month from now. Corrections the founder is already making (rewrites of agent drafts, anti-pattern additions to Skeptic, copy edits) carry the signal needed to keep skills sharp - but only if something captures that signal as a durable principle.
Before writing anything, read references/principle-vs-rule.md. The guardrails there are load-bearing: principles transfer, rules overfit. A correction turned into a rule produces a brittle decision tree. The same correction turned into a principle reshapes how the agent reasons.
q-system/output/skill-proposals/. The founder reviews, edits, and merges via normal git flow so Codex review fires on the diff (same gate as any other code change).The founder provides three pieces of information. They can come inline in the conversation, as file paths, or as a Phase A proposal markdown (which already has the correction shape built in).
Follow these 7 steps in order. Each step has an "if you cannot answer" exit ramp; use it instead of guessing.
Diff the agent output against the human output. State the concrete difference. Quote both sides. If the diff is purely cosmetic (whitespace, ordering with no semantic change), exit with "no principle change recommended."
Name the underlying cause, not the symptom. "Founder shortened the comment" is a symptom. "Agent draft included a CTA the founder removed because the post was venting, not a sales opportunity" is a cause. If you cannot name the cause without speculation, ask the founder one direct question and wait.
Would this apply beyond this one case? Run the test: imagine 5 future situations the agent might face. Would this correction shape the right behavior in 3+ of them? If not, exit with "context-specific, no principle change recommended."
Read the target skill file. Does an existing principle cover this case? Three possible verdicts:
If multiple principles overlap and the new correction touches the seam, propose a merge.
A rule says "what to do." A principle says "how to think." See references/principle-vs-rule.md for the test. If your proposed text reads like a switch-case ("if X then Y"), rewrite it as a heuristic ("when X, the question is Y").
Skills have structure. Anti-patterns go in the anti-patterns section. Workflow steps go in the workflow section. Read the target skill's table of contents first. If the right section does not exist, propose adding it - and explain why an existing section was not the right home.
Write the proposal to q-system/output/skill-proposals/{target_skill_name}-{ISO-date}.md. The format is below. Print the path to the founder so they can open it.
# Principle proposal - {target_skill_name}
Generated: {ISO timestamp}
Target skill: {path to SKILL.md}
## Source correction
**Agent output:**
{quote}
**Human output:**
{quote}
**Inferred diff:**
{concrete description}
## Inferred cause
{one or two sentences naming why the human diverged}
## Pattern test
Five future situations this might apply to:
1. ...
2. ...
3. ...
4. ...
5. ...
Verdict: {applies to N/5}. {one sentence}
## Existing principles touched
{list relevant existing bullets from the target skill, with line refs}
## Proposed edit
**Action:** {add | sharpen | delete | merge}
**Target section:** {section heading in the target skill}
**Proposed text:**
{the new principle, written as a heuristic}
**Why a principle and not a rule:**
{one sentence connecting to references/principle-vs-rule.md}
## How to merge
1. Open {target skill path}
2. Apply the proposed edit in the named section
3. Commit through normal git flow
It is honest to refuse. The four refusal reasons, in priority order:
Write the refusal as a short proposal file (1-2 paragraphs) so the founder can see the analysis ran. Refusing silently looks like the skill never executed.
corrected outcomeRETIRED 2026-10-30 (ASK-3400): nothing writes
.session-recall.jsonany more (memory_autocapture, memory-scores-surface and knowledge-supply's recall write are removed), so no memory is ever "surfaced" for this step to match. Skip it. The script stays on disk only until the outcome files are retired too.
Separate from the principle-proposal flow above, one narrow case also feeds the
memory earned-trust log. When the correction is the founder contradicting a
surfaced memory (one recalled this session, listed in
q-system/memory/.session-recall.json) rather than an agent draft, the recall is
also an outcome signal: that memory was corrected.
The recording is deterministic, not a judgment for prose to hold. The single
step here is interpretive: pick which surfaced memory_id the contradiction
refers to. Only pick one when the map is confident; an uncertain map is left
unrecorded (a missed corrected is safe, a wrong one is a spurious signal). Then
hand that id to the script that owns the write:
python3 q-system/.q-system/scripts/correction_outcome.py <memory_id> <session_id>
The script (correction_outcome.py) re-checks that the id was actually surfaced
this session and no-ops otherwise, routes the write through the single-writer
record_outcome, and dedups on replay. Nothing is recorded when the map is not
confident. This does not replace the principle proposal; a correction can produce
both a proposal and a corrected outcome.
plugins/prd-os/scripts/propose_skeptic_antipatterns.py - Phase A consumer of this pattern, specialized to PRD findings.plugins/prd-os/personas/skeptic.md - one target this skill commonly proposes edits to.plugins/kipi-core/skills/founder-voice/SKILL.md - another common target (anything written for human readers).What SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/architecture-reviewSurfaces architectural friction in real code — shallow modules, tight coupling, untested seams — and proposes deepening refactors using Ousterhout's deep-module principle (small interface hiding a large implementation). Use when the founder says 'architecture review', 'find shallow modules', 'architectural friction', 'deep module analysis', or asks for refactor recommendations on a directory of code. Scope it to actual code (plugins/, q-system/.q-system/scripts/) — not markdown rules, canonical files, or prose./audhd-executive-functionAUDHD executive function accommodations. Apply to all output the founder will act on./deck-aiGenerate modern presentation decks (PDF) from markdown content. Local open-source alternative to Gamma — uses Slidev for layouts and Unsplash for imagery. Invoke when the user asks to "make a deck", "build slides from this", or "turn this into a presentation"./founder-voiceFounder voice enforcement for all written output. Apply to any text another person will read./headline-engineeringPlatform-optimized headline and hook engineering for X (Twitter), Reddit, LinkedIn, Medium, Substack. Apply when writing or reviewing any title, tweet, thread opener, Reddit post title, or social hook intended for public publication. Triggers on "write a headline", "draft a tweet", "X thread", "Reddit post", "LinkedIn post", "Medium article", "make this hook stronger", "shorter title", "more clickable", "the title is too long", or any time a draft has a title that will be seen by people outside the company./improveCritique an outside idea (a pasted tip, post, transcript or video summary) against what this system already has. Use when the founder pastes something and asks whether to adopt it, or says 'improve', 'should we do this', 'compare this to what we have'. Grounded by scripts/improve_ground.py in the lessons corpora and named files; returns adopt, skip, or already-built, and NEVER decides what to build, sell or publish.npx claudepluginhub assafkip/kipi-system --plugin kipi-coreOther plugins' skills for the same job