cortex-fresh
Skill2 starsChanged 25 days agoMITView on GitHub
Keep the store from going stale.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- coordinate-sessionsSkill
- cortex-freshSkill
- cortex-learnSkill
- cortex-migrateSkill
- cortex-qualitySkill
- cortex-register-tasksSkill
- cortex-rememberSkill
- specflow-onboardSkill
- specflow-reviewSkill
- specflow-specSkill
- verification-before-completionSkill
- cortex-learnSkill
- cortex-migrateSkill
- cortex-qualitySkill
- cortex-register-tasksSkill
- cortex-rememberSkill
- specflow-onboardSkill
- specflow-reviewSkill
- specflow-specSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Run cortex store expire --apply and keep its output.
- Very specific: line 22
Write the record history/changes/<today>-fresh.md.
- Very specific: line 23
Run cortex store validate and fix any error in a file this run wrote.
- Very specific: line 28
Every edit follows the MAP filing rules.
- Very specific: line 33
Never edit a file under history/.
- Very specific: line 43
nearDuplicates: read the pair and merge only if the two files hold one subject. - Very specific: line 62
Write nothing outside cortex/, never a spec, and do not stage or commit: no git rm, no git add.
≈ “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
cortex-fresh
When to use
This skill is callable-only — it carries no trigger surface in the skill listing and is not routed into by a matching sentence.
Run by the weekly fresh task, or typed as /cortex-fresh. Core detects what may have rotted; you read it and say whether it still holds, and you fix what you find. You may edit, merge and retire any file in cortex/, following the MAP filing rules. Never write a spec: anything that would change one is a proposal. You write no code, and you neither stage nor commit.
Never spawn a nested claude process. Every cortex command here runs in the background and is polled with a 10-minute limit. macOS has no timeout command, so start it with &, poll, and kill it at the limit; a command past its limit is killed, named in your final message and skipped.
Steps, in order
- The write gate. Apply the write gate of
cortex-remember. On an unaccepted store, print its refusal line and stop. - Run
cortex store expire --applyand keep its output. - Run
cortex tasks collect fresh --json. - Act on each finding by Changing a store file, Stale code files, Aged, dead and duplicate and Proposals.
- Write the record
history/changes/<today>-fresh.md. - Run
cortex store validateand fix any error in a file this run wrote. - Run
cortex tasks heartbeat fresh.
Changing a store file
Every edit follows the MAP filing rules. Set verified to <today> (observed) only after reading the evidence. Add this run's session:<id> to the file's origin list. Keep one fact in one file.
- Retiring a file removes it and repoints or removes links to it. The record names it with its
aboutline; git keeps the text. - Merging two files keeps one, adds the other's name and aliases to its
aliases, joins theoriginlists, repoints links, and removes the other.
Never edit a file under history/.
Stale code files
For each stale file, read the file and the code its depends_on names. If the file still holds, update verified. If not, correct the text. If the subject is gone, retire the file.
Aged, dead and duplicate
aged: update the file when the repository, the store or a session shows it still holds, and correct it when they show otherwise. When nothing you can read confirms it, leave the file alone, count it asunconfirmed, and write one proposal asking a person. The proposal namescitedBy, and a file nobody cites says so.deadRules: retire the rule when the code its globs named is gone, and correct it when the code moved. Its dead globs go in the record.nearDuplicates: read the pair and merge only if the two files hold one subject. Otherwise count it asnot a duplicate.scaffolding: fix it withcortex store map.validate: fix each error.openPitfalls.aged: read each file against the code. Close a pitfall, bycortex-remember's bug section, only on observed evidence that the fix landed: a commit or a change that shows it. A missing file or symbol is not evidence, because the code may have moved. Without that evidence, write one proposal asking a person, and name the file in the record.
Proposals
A finding that would change a spec, or that needs a person, is one item appended to now/proposals.md by cortex-remember's propose mode, with the id P-<today>-fresh-<slug of the file's path> and its evidence: the commit, the age, the dead glob. If a pending item already names the same file, write no new item and count the finding as already proposed. now/proposals.md is only ever appended to: never rewrite or reorder it.
The record
Each run writes one new history/changes/<today>-fresh.md (first free name: -2, -3), also when nothing was found, with kind: other, status: done, origin: session:<id>, and one body line each with a count, followed by the paths:
expired, re-verified, corrected, retired, merged, not a duplicate, unconfirmed, scaffolding, open pitfalls, open pitfalls aged, proposed, already proposed.
A quiet run says Nothing went stale this cycle. as the last line.
Limits
Write nothing outside cortex/, never a spec, and do not stage or commit: no git rm, no git add.
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.

