cortex-control
Skill1 starsChanged 59 days agoMITView on GitHub
Cortex retention command, coordinator-only. Load only for an explicitly assigned clear command.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- content-safetySkill
- context-compactionSkill
- coordinator-communicationSkill
- design-frontend-designSkill
- design-impeccableSkill
- design-reference-analysisSkill
- design-ui-ux-pro-maxSkill
- design-visual-qaSkill
- design-workflowSkill
- documentation-syncSkill
- knowledge-harvest-scopeSkill
- knowledge-harvestSkill
- orchestratorSkill
- requirements-intakeSkill
- skill-authoringSkill
- skill-managementSkill
- tool-disciplineSkill
- tool-discipline-workerSkill
- worker-accessibility-auditorSkill
- worker-accessibility-fixerSkill
- worker-architectSkill
- worker-backend-devSkill
- worker-build-verificationSkill
- worker-code-reviewerSkill
- worker-database-architectSkill
- worker-data-engineerSkill
- worker-debuggerSkill
- worker-devops-engineerSkill
- worker-explorerSkill
- worker-frontend-devSkill
- worker-fullstack-devSkill
- worker-generalSkill
- worker-mobile-devSkill
- worker-performance-engineerSkill
- worker-plannerSkill
- worker-qa-engineerSkill
- worker-refactorerSkill
- worker-security-auditorSkill
- worker-senior-consultantSkill
- worker-technical-writerSkill
- worker-ux-designerSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read this skill with read_skill only for the coordinator's declared clear-command purpose.
- Distinctive: line 51
Never recommend force for genuinely running work.
- Distinctive: line 76
Use it only when the project runtime is idle and name every thread to keep.
- Distinctive: line 81
No output contains task contents or private reports.
- Distinctive: line 87
Read a relevant declared example only when the assignment asks for one.
- Distinctive: line 92
All worker reports remain complete English Markdown files, either submitted inline or allocated by the live draft creator, filled through …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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 control
Loading boundary
Read this skill with read_skill only for the coordinator's declared clear-command
purpose. Only the coordinator can read this skill; a worker's or the consultant's
read_skill never advertises or accepts this id. A worker or the consultant reaches
the optional report-example catalogue and its named examples through the separate
index id (physically under references/ here), not by reading this skill. Do not
read manifests, databases or server internals, or enumerate the installation.
Explicit retention maintenance
Tell the owner to type /cortex-clear in the current project's ACP chat.
The runtime handles this command itself, without a coordinator turn or model
call. Do not execute deletion through command_run or any other model tool.
/clear is host-reserved; do not offer it as a Cortex alias.
For example, preview tasks with last activity before 1 October 2026 at 00:00 UTC:
/cortex-clear before 2026-10-01The runtime preview reports deletion/protection counts and cutoff. Manual CLI JSON includes deleted_tasks, retention_days, skipped_protected, cutoff (ISO-8601 UTC), force, deleted_orphan_sessions, vacuum_status, and reclaimed_bytes; after actual reclamation it also includes db_bytes_before and db_bytes_after (and vacuum_error on failure). Dry runs add would_delete_tasks and would_delete_orphan_sessions instead of deleting or vacuuming. The runtime also gives the exact command to confirm:
/cortex-clear before 2026-10-01 confirmRetention days are also accepted: /cortex-clear 7, /cortex-clear 7d, or
/cortex-clear days 7; integers must be 0..36500. A bare YYYY-MM-DD works
as an absolute cutoff. Malformed, invalid and future dates are refused.
Without trailing confirm nothing is deleted, even with force. Chat cleanup
normally protects loaded-session tasks, non-terminal tasks and live/ambiguous
coordinator/worker activity. To delete stale protected tasks, the owner can use:
/cortex-clear days 1 force
/cortex-clear days 1 force confirmForce also works with dates and bare days. It always keeps the invoking session and its task/kept threads; it assumes other processes are already dead, marks stale reservation/process rows released/terminated, and never kills OS processes. Never recommend force for genuinely running work. Busy-store access and pending intents conflicting with remaining keeps are still refused.
Cleanup also removes old unbound/orphan host sessions and their transcript/update
rows, excluding the invoking session and (without force) other loaded sessions.
Their last activity includes creation, close and latest transcript/update times.
Preview reports would_delete_orphan_sessions; confirmation reports
deleted_orphan_sessions, reclaimed_bytes, and before/after DB sizes after
SQLite VACUUM. A vacuum failure leaves deletion committed and is stated separately.
The bundled CLI remains an alternative the owner runs manually in their shell from the Cortex installation directory (its path is relative to that directory, not to the target project), not something the coordinator executes:
python3 -B src/cortex_clear.py --project-root <path> --days N [--keep-thread <id>]--project-root is the canonical project directory; --days is 0..36500.
--keep-thread <id> is repeatable and protects the exact known thread.
The CLI retains its manual retention/keep-thread contract: it is not the
chat preview/confirm workflow and does not automatically protect active tasks.
Optional --force explicitly marks stale live-state rows released/terminated;
the CLI already ignores active protection without it. --dry-run previews only.
Use it only when the project runtime is idle and name every thread to keep.
Cleanup removes matching old task records and project task directories, plus only drafts whose stored task relationship and accepted SHA-256 make the association unambiguous. Never remove whole draft directories or unknown files. No output contains task contents or private reports. Committed deletion intents remain recoverable after interrupted filesystem cleanup.
Optional report examples
The report example catalogue routes optional examples. Read a relevant declared example only when the assignment asks for one. Otherwise use the headings and guidance returned by the live draft creator. Examples guide content and never replace the profile's requirements, live writer schema, observable evidence, or honest unrun checks.
All worker reports remain complete English Markdown files, either submitted inline or allocated by the live draft creator, filled through the owned-draft gateway and published through the live writer, per the live tool descriptions. Preserve server-issued registration metadata and complete Markdown. Never edit published documents or the runtime database directly.
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.

