一键导入
learning-quality
Structured format for capturing high-quality learnings during ClosedLoop runs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Structured format for capturing high-quality learnings during ClosedLoop runs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Dispatch and collect the finding-verifier fleet at stage_23_verify_findings (PLN-722). Reads verify_manifest.json (written by stage_22b_verify_prepare), spawns one falsify-oriented verifier Task per to_verify[] entry with mode-specific Task scheduling (GitHub mode dispatches verifiers synchronously; local mode uses parallel background + blocking TaskOutput), skips cache_hits[], and collects outputs without retry — missing outputs degrade to pending_verification[] (and, in GitHub mode, a missing BLOCKING/HIGH verifier raises a coverage-gap signal). Invoke when the walker reaches stage_23_verify_findings. Do NOT use for the reviewer fleet (stage_20 — see the spawn-reviewers skill) or the PLN-725 singletons (stage_11/stage_15 — see the singleton-dispatch skill).
Spawn and collect the reviewer fleet at stage_20_spawn_reviewers. Consumes spawn.json.spec (the authoritative spawn spec from derive-spawn-spec / derive-static-spec), resolves GRAPH_PROJECT, builds per-agent prompts from the per-agent template + role suffixes (Bug Hunter A/B, Unified Auditor, Domain Critics, Impact Analyzer), handles the standard, fast-path, all-cached-BHA, and gated-by-verify cases, and runs the spawn/collection contract and agent-failure recovery. Falls back to the static reviewer table when spawn.json marks arbitrate_status:"fallback". Invoke when stage_20_spawn_reviewers is reached (both MODE=local and MODE=github). Do NOT use for the verifier fleet (stage_23 — see the verify-findings skill) or the PLN-725 singletons (stage_11/stage_15 — see the singleton-dispatch skill).
PLN-725 single-agent dispatch for stage_11_extract_signals and stage_15_coverage_critic. After each prepare stage writes its manifest, this skill reads the status field (cache_hit / skipped / needs_agent) and, only on needs_agent, spawns one synchronous singleton Task that writes the by-convention pln725_*.json output the sibling consolidate stage consumes. Invoke from walker-contract step 6 immediately after stage_11_extract_signals or stage_15_coverage_critic finishes. Do NOT use for the reviewer fleet (stage_20 — see the spawn-reviewers skill) or the verifier fleet (stage_23 — see the verify-findings skill).
Verify and fix BLOCKING/HIGH code review findings from a prior review session via category-dispatch, then run project verification.
Render the operator-facing local-mode code review results at stage_29_present. Covers BLOCKING/HIGH/MEDIUM section templates, Justified Findings (PLN-721), Dismissed Findings (PLN-722), Verifier Stats footer (PLN-773), operator-flag descriptions, override precedence rule for stage_22b, Validation Summary, and final Summary. Invoke when MODE=local AND stage_29_present is reached. Do NOT use for GitHub mode — see prompts/github-review.md. Do NOT use for Gate A hygiene-only early-exit — that path is mode-agnostic and remains in start.md alongside the Gate A definition.
Use when the user wants a code-grounded decision table for current behavior, wants to compare current behavior against a plan or work item, or needs a control-flow artifact for recovery, retry, finalization, validation, state-machine, or review-heavy edge cases.
| name | learning-quality |
| description | Structured format for capturing high-quality learnings during ClosedLoop runs |
This skill defines when and how to capture learnings during ClosedLoop runs.
Before writing a learning, run through this decision tree in order:
1. Did I make a mistake and correct it, or discover something non-obvious?
NO → Don't capture (no learnings event)
YES → Continue
2. Is it a config value? (specific URL, file path, project command, type name)
YES → Write to CLAUDE.md (project scope), not org-patterns
NO → Continue
3. Is it tied to a single feature/bug with no generalizable principle?
YES → SKIP
NO → Continue
4. Will it still be true in 6 months?
NO → SKIP (or generalize the principle)
YES → Continue
5. Does it already exist in org-patterns.toon or CLAUDE.md?
YES → SKIP (or note "Supersedes: [old pattern]" if correcting)
NO → CAPTURE IT
Note: Even "basic" knowledge is worth capturing if you actually made that mistake. These learnings exist because LLM agents struggle with certain patterns that humans might consider obvious. The goal is to help future agent runs avoid the same mistakes.
SKIP if ANY of these apply:
| Criterion | Example | Why |
|---|---|---|
| Specific URL/path/config | "Use https://github.com/org/repo" | Config, not principle → CLAUDE.md |
| Project-specific names | "Use MyProjectType not OtherType" | Belongs in CLAUDE.md |
| One-off bug fix | "Field X was null in row 123" | Not reusable |
| Already captured | (check pending/, CLAUDE.md, org-patterns.toon) | Avoid duplicates |
Note: Even patterns that seem like "basic knowledge" are worth capturing if you actually made that mistake. These learnings exist because LLM agents struggle with certain patterns. The goal is to help future agent runs avoid the same mistakes.
When you have a learning worth capturing:
| Scope | Destination | Heuristic |
|---|---|---|
| Project | CLAUDE.md | Mentions specific file paths, package names, or project-unique features |
| Global | org-patterns.toon | Applies to any project using the same language/framework/tool |
Extract the underlying principle, not the specific instance.
GitHubActionStatus uses SUCCESS not COMPLETED When using Prisma enums, verify valid values in schema.prisma - don't assume names adm-zip is already installed for webhooks Check existing dependencies before adding new packages for common functionality The workstream query checks parentId before title Implementation detail with no generalizable principle ARTIFACT_SECTIONS has ISSUE in two places Specific bug, not a patternTest: Would this help someone working on a different feature?
Formula: [When/Where] + [specific action] + [context]
Before writing:
$CLOSEDLOOP_WORKDIR/.learnings/pending/ for learnings in this run~/.closedloop-ai/learnings/org-patterns.toonIf contradiction exists (existing says "do X", new says "don't do X"):
Output location:
$CLOSEDLOOP_WORKDIR/.learnings/pending/{agent-name}-$CLOSEDLOOP_AGENT_ID.json
Format:
{
"what_happened": "Brief description of what occurred",
"why": "Root cause or reason this matters",
"fix_applied": "What you did to resolve it (if applicable)",
"pattern_to_remember": "The actionable takeaway (minimum 20 chars)",
"applies_to": ["agent-name"],
"context": {
"file": "relative/path/to/file.ext",
"line": 42,
"function": "function_name"
}
}
Use ["*"] for applies_to if the pattern applies to all agents.
If you completed work without learnings to capture:
{
"no_learnings": true,
"reason": "Task was straightforward with no new patterns discovered"
}
This is valid—not every task produces learnings.
| Category | Examples |
|---|---|
| Common knowledge | TS strict mode, git basics, debugging 101 |
| Config values | URLs, file paths, project commands |
| Implementation details | Query order, field names, styling choices |
| Temporary | Bug workarounds, feature-specific decisions |
Mentions specific paths/packages/features? → Project (CLAUDE.md)
Applies to any project with same tech? → Global (org-patterns.toon)
Your agent definition may reference a domain-specific learning prompt (e.g., prompts/plan-writer-learning.md). If so, read it before capturing learnings.