/prometheus-skill-pack:feynman-loopfrom prometheus-skill-pack
The core Feynman learning cycle for prometheus-skill-pack. Maps Feynman's explain-grade-gap-relearn cycle to the PMPO lifecycle. Supports vertical recursion (child loops on gap concepts), horizontal escalation (novice→peer→skeptic audiences), recursion floor guards, and all three mastery closure criteria.
Ships in prometheus-skill-pack. 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; scripts run unread.
feynman-loop is the core Feynman learning cycle. It maps the Feynman Technique — pick a concept, explain it plainly, identify gaps, re-learn, re-explain — onto the PMPO lifecycle (Spec / Plan / Execute / Reflect). Each iteration produces a graded explanation artifact, drives gap-targeted recursion, and gates closure on three mastery criteria.
The loop is called by /learn-plan after a curriculum.json is produced, and
can also be invoked manually against any single concept.
/feynman-loop --concept-id <id> --goal-id <id> --depth <N> [--audience novice|peer|skeptic]
| Argument | Required | Default | Description |
|---|---|---|---|
--concept-id | yes | — | The concept to learn |
--goal-id | yes | — | Parent learning goal |
--depth | yes | — | Recursion depth (0 = top-level call) |
--audience | no | novice | Target explanation level for this iteration |
The Feynman loop is a PMPO cycle instantiation:
| PMPO Phase | Feynman Step | What happens |
|---|---|---|
| Spec | Pick concept + target depth | Load concept from learner model, set target depth and audience |
| Plan | Structure the explanation | Agent outlines: what to explain, what analogies to use, what the skeptic will challenge |
| Execute | Produce the explanation | Write a plain-language explanation, analogies, and a teach-the-skeptic pass |
| Reflect | Grade and identify gaps | Call learn-grade; identify gap concepts; decide: close loop or recurse |
jq -nc \
--arg learner_id "${LEARNER_ID:-$GOAL_ID}" \
--arg concept_id "$CONCEPT_ID" \
'{method:"get_concept",params:{learner_id:$learner_id,concept_id:$concept_id}}' \
| learner-model
recursion_floor from ~/.prometheus/learn/goals/<goal-id>/survey-result.json--audience (default: novice on the first iteration)Starting feynman-loop — <concept-id> (depth <N>, audience <level>)Produce an explanation outline before writing the full explanation:
novice: everyday comparisons, no assumed domain knowledgepeer: technical comparisons, domain vocabulary allowedskeptic: steel-man the strongest objection, then refute itpeer and skeptic audiences, list 2–3 things
a knowledgeable reader would push back onPresent the outline to the user via ui-surface for early steering. Resolve
UI_SURFACE_DIR as the directory containing the installed ui-surface/SKILL.md
and wrap the outline as a valid UiIntent object:
bash "${UI_SURFACE_DIR}/scripts/render.sh" \
--tier "${SURFACE_TIER:-tier0_text}" \
--intent-json "${OUTLINE_INTENT_JSON}"
Write the full explanation in plain language. The explanation must:
peer/skeptic: end with a "Teach the skeptic" section that addresses
anticipated objections and confirms they are resolvedPresent the completed explanation to the user via ui-surface:
bash "${UI_SURFACE_DIR}/scripts/render.sh" \
--tier "${SURFACE_TIER:-tier0_text}" \
--intent-json "${EXPLANATION_INTENT_JSON}"
Wait for the user to confirm, correct, or extend the explanation before grading.
Call learn-grade with the final explanation text:
/learn-grade \
--concept-id "${CONCEPT_ID}" \
--learner-id "${LEARNER_ID:-default}" \
--corpus-path "${CORPUS_PATH}" \
--explanation "${EXPLANATION_TEXT}" \
--goal-id "${GOAL_ID}"
Receive the grade result (passed, overall_score, gaps, transfer_problems, grade_id)
Apply the recursion logic (see below) to any gaps
If all gaps are resolved or noted, present the transfer problems to the learner
Evaluate transfer problem responses (score >= 0.7 to pass)
If mastery closure criteria are all met, write the artifact and emit the handoff
When learn-grade returns gaps, for each gap concept:
if concept_id in recursion_floor:
log "[feynman-loop] concept is on recursion floor — not recursing"
record gap in learner model as "noted for review"
continue
if current_depth >= 3:
log "[feynman-loop] max recursion depth reached — gap noted for review"
record gap in learner model as "noted for review"
continue
# Spawn child loop
/feynman-loop \
--concept-id <gap.concept_id> \
--goal-id "${GOAL_ID}" \
--depth $((current_depth + 1)) \
--audience novice
After all child loops complete:
Check this before any recursion:
SURVEY_PATH="${HOME}/.prometheus/learn/goals/${GOAL_ID}/survey-result.json"
FLOOR=$(jq -r '.recursion_floor[]?' "$SURVEY_PATH" 2>/dev/null)
if echo "$FLOOR" | grep -qx "${GAP_CONCEPT_ID}"; then
echo "[feynman-loop] concept ${GAP_CONCEPT_ID} is on recursion floor — not recursing"
fi
After a concept loop closes at the novice audience level, the plan may specify
escalation to peer and skeptic:
--audience peer (same concept, same depth)peer closes, re-invoke with --audience skepticHorizontal escalation does NOT increase --depth. It runs at the same depth as
the original call.
When the mastery closure criteria are met and the artifact is written, persist what was learned so the next prompt on this topic is
answered from the knowledge base instead of triggering another
[prometheus-gap] suggestion (emitted by karpathy-hook-dispatch.sh, design
docs/design/team-aware-learning-memory.md §4).
Ingest the final explanation as a Lesson. Use project scope by default; use
shared scope (with --yes) only when the topic is generic and not specific to
this project:
# project scope (default)
printf '%s' "$EXPLANATION_TEXT" | pk ingest --type Lesson --source "feynman-loop:${GOAL_ID:-manual}" --tag learn
# generic topic -> shared scope
printf '%s' "$EXPLANATION_TEXT" | pk ingest --type Lesson --scope shared --yes --source "feynman-loop:${GOAL_ID:-manual}" --tag learn
Mark the matching knowledge gap resolved in
~/.prometheus/knowledge-gaps/gaps.jsonl:
python3 "${CLAUDE_PLUGIN_ROOT:-$PROMETHEUS_PLUGIN_ROOT}/shared/scripts/lib/prompt_gap.py" \
resolve --topic "$CONCEPT_ID" --by feynman-loop --scope project
This appends one record per matching open gap (same topic key, or at least two shared keywords with the subject):
{"ts":"<utc>","status":"resolved","topicKey":"<16 hex>","topic":"<gap topic>","resolvedBy":"feynman-loop","scope":"project"}
The latest record per topicKey wins; an open record is any gap whose
latest record has status:"open". The step never fails the flow: with no
pk on PATH, skip step 1 and tell the user the explanation was not persisted;
with no matching gap, step 2 prints nothing.
A concept loop closes ONLY when all three criteria are met:
| # | Criterion | How it is checked |
|---|---|---|
| 1 | Grade passes | overall_score >= 0.7 AND misconceptions_absent == 1.0 from learn-grade |
| 2 | Transfer problems solved | User solves both novel transfer problems with score >= 0.7 each |
| 3 | Retention scheduled | Loop records retention_scheduled: true; learn-retain performs the check at >= 24h |
Self-reported fluency ("I feel like I understand this") never closes a loop.
When criteria 1 and 2 are met, the loop closes and marks retention as scheduled.
The actual retention check is deferred to /learn-retain.
After a loop closes, resolve FEYNMAN_LOOP_DIR as the directory containing this
SKILL.md, then write the artifact using its bundled script:
bash "${FEYNMAN_LOOP_DIR}/scripts/write-artifact.sh" \
--goal-id "${GOAL_ID}" \
--artifact-json "${ARTIFACT_JSON}"
Artifact schema written to
~/.prometheus/learn/goals/<goal-id>/artifacts/<concept-id>/<artifact-id>.json
(the one artifact path: learn-retain globs artifacts/<concept-id>/*.json for
the most recent artifact and learn-certify reads the artifacts/<concept-id>/
directory, so all three skills resolve the same file; PROMETHEUS_LEARN_HOME
overrides ~/.prometheus/learn for tests):
{
"artifact_id": "string",
"goal_id": "string",
"concept_id": "string",
"depth": 0,
"audience": "novice|peer|skeptic",
"explanation_text": "string",
"grade_id": "string",
"overall_score": 0.0,
"transfer_scores": [0.85, 0.7],
"verification": [
{ "label": "verified", "evidence": "grade-<id>.json transfer_problems[0], scored 0.85 against corpus_ref <ref>" },
{ "label": "inferred", "evidence": "grade-<id>.json transfer_problems[1], scored 0.7; grader inferred correctness without a corpus_ref" }
],
"provenance": {
"grade_file": "/absolute/path/to/goals/<goal-id>/grades/grade-<id>.json",
"corpus_path": "/absolute/path/to/corpus.json",
"grader": "learn-grade",
"graded_at": "ISO datetime"
},
"retention_scheduled": true,
"child_loops": ["artifact_id"],
"closed_at": "ISO datetime"
}
artifact_id is generated as artifact-<concept-id>-<audience>-<depth>-<unix-timestamp>.
verification has exactly one entry per transfer score. Its label uses the
four-value vocabulary shared with deep-research
(skills/research/deep-research/references/okf-research-format.md):
verified when the grader scored the answer against a corpus key_point or
corpus_ref it read, inferred when the grader judged correctness without a
corpus reference, blocked when grading could not complete (grader
unavailable, corpus missing), unverified when the score was recorded without
grading. provenance names the grade file and corpus the scores came from.
write-artifact.sh refuses an artifact that lacks either block, so a loop
cannot close on an unexplained score; a self-reported score is unverified
and never satisfies mastery criterion 2.
When all required audience levels for a concept close:
Concept mastered: <concept-id> (depth <N>, <audience> level)
Transfer problems: <score1>, <score2>
Retention check scheduled: yes
Next: /feynman-loop --concept-id <next-concept> or /learn-certify <goal-id>
The calling skill or user decides whether to proceed to the next concept in the
curriculum or invoke /learn-certify to close the goal.
| Condition | Behavior |
|---|---|
learner-model missing or returns an error | Log warning, continue; use empty concept state |
| Corpus path missing | Abort with error: corpus not found at <path> |
survey-result.json missing | Treat recursion floor as empty; log warning |
ui-surface unavailable | Print explanation directly to stdout |
learn-grade fails | Retry once; on second failure, surface error to user |
skills/learn/feynman-loop/
├── SKILL.md — this file
└── scripts/
└── write-artifact.sh — writes artifact JSON to ~/.prometheus/learn/goals/<goal-id>/artifacts/<concept-id>/
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub prometheus-ags/prometheus-skill-system --plugin prometheus-skill-pack218 skills in this plugin
/actor-modelTokio-native actor model pattern for Prometheus AGS projects. Implements actors as tokio tasks communicating via mpsc channels with a typed message enum, enabling safe concurrent state management without shared locks. Used in UAR session management, pk-librarian event broadcasting, and parking-lot scheduler design. Use when a component needs to own state exclusively while serving concurrent callers.
/adversarial-reviewIsolated, cross-model adversarial review of KBD artifacts and change diffs. Dispatches a fresh-context LLM judge over an OpenAI-compatible REST gateway (openai-proxy or `liter-llm api`) with an explicit mandate to find problems — the model that produced an artifact or change is never the model that reviews it. Runs as a pipeline stage inside kbd-assess/analyze/plan (artifact mode) and kbd-execute's single phase-boundary QA step (diff mode, once over the whole phase diff). Findings are severity-bucketed (CRITICAL/WARNING/SUGGESTION) and the judge's own report is screened by sycophancy-correction before it is surfaced.
/agent-team-creatorCreate, revise, package, and deploy agent-team definitions with staged questions and native exports for UAR, Codex, Claude Code, Copilot, Kimi Code, MiniMax CLI, OpenCode and DeepSeek. Use for team definition and catalog lifecycle; use agent-team-manage for active runtime task state.Other plugins' skills for the same job