harness-learnings
Skill1 starsChanged 3 months agoMITView on GitHub
Use at the end of a harness-orchestrator run, or on demand, to graduate staged learning candidates from .claude/harness/state.md into the right generated project-* skill's Learnings block — so project-specific corrections accumulate where they're selectively loaded, instead of bloating root CLAUDE.md.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/devsquad-copilottheir own version, first seen Nov 29, 2026
- microsoft/frontiersquad-copilottheir own version, first seen Nov 29, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- microsoft/devsquad-copilot★ 57same name
- microsoft/frontiersquad-copilot★ 57same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- harness-analyzerSkill
- harness-context-loaderSkill
- harness-model-routerSkill
- harness-orchestratorSkill
- harness-verifierSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Read .claude/harness/state.md's ## Learning candidates section.
- Very specific: line 28
Read the target skill's .claude/skills/<project-skill>/SKILL.md.
- Distinctive: line 32
Never write outside these markers, and never touch the rest of the skill file.
- Distinctive: line 50
Dedupe before appending: Don't let the same correction accumulate as five near-identical lines.
- Very specific: line 51
Don't invent routing: If a candidate's area genuinely can't be determined, default to project-architecture rather than guessing a specific …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Harness Learnings
Move staged learnings out of the transient run state and into durable, selectively-loaded grounding. You do this directly with Read, Write, and Grep — there is no external program.
When to run
- Called by
harness-orchestratoronce per run, after the feature-complete spec-conformance and code-review passes, before the final report. A no-op if there's nothing staged. - Invokable on demand mid-session by the user for a forced review.
Procedure
1. Read the staged candidates
Read .claude/harness/state.md's ## Learning candidates section. If it's empty or says "(nothing yet)", report "no learnings to graduate" and stop.
2. Route each candidate
For each candidate line, read .claude/skills/project-index.md and match the candidate's subject matter (which files/area it concerns) to the owning project-* skill — the same area-matching the context loader uses. If no area matches clearly, default to project-architecture.
3. Graduate into the target skill's Learnings block
Read the target skill's .claude/skills/<project-skill>/SKILL.md. If it has no ## Learnings section yet (generated by a harness-analyzer version older than 4.0.0), append one at the end of the file first: ## Learnings followed by an empty <!-- harness:learnings:start --> / <!-- harness:learnings:end --> marker pair. Then, inside those markers:
- Skip the candidate if an existing line already says materially the same thing (dedupe).
- Otherwise append it as one line, date-stamped:
- <YYYY-MM-DD> <the learning, stated as a concrete rule or fact>.
Never write outside these markers, and never touch the rest of the skill file.
4. Clear the staged candidates
Replace .claude/harness/state.md's ## Learning candidates section with - (nothing yet) now that they've been graduated.
5. Report
LEARNINGS GRADUATED
"Auth errors always wrap the original cause" → project-patterns-ts (Learnings)
"Never call the payments webhook from a client component" → project-architecture (Learnings)
RESULT: 2 learnings graduated, 0 duplicates skippedGuardrails
- Only write inside the Learnings markers. This skill must never edit a
project-*skill's generated body, and must never write to rootCLAUDE.md— that's the exact bloat this skill exists to prevent. - Dedupe before appending. Don't let the same correction accumulate as five near-identical lines.
- Don't invent routing. If a candidate's area genuinely can't be determined, default to
project-architecturerather than guessing a specific pattern skill it doesn't belong in.
See also
harness-orchestrator— calls this at end-of-runharness-analyzer— generates the Learnings block this writes into, and prunes it on re-analyzeharness-context-loader— the reason Learnings live per-skill: only loaded when that skill is relevant to the task
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

