agentleFS
pedropacheco95pedropacheco95/cortex/skills/cortex-remember/SKILL.md

cortex-remember

Skill2 starsChanged 25 days agoMITView on GitHub

File one fact in this project's cortex/ store, in the one place it belongs, and show where. Use when the user says "remember this", "note that", "from now on", "file this bug", "ingest this", or explains what the store doesn't hold.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 5 are distinctive, and 10 are 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.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search first: Run rg -i '<key words>' cortex/ for the fact's subject, and rg '^about:' cortex/ as the index of every file.

    line 15
  2. Very specific:

    When appending to an existing file, add your value to that file's origin list instead of replacing it.

    line 22
  3. Very specific:

    If the harness exposes no session id (Codex, or any other agent without one), use origin: person:user@<today>.

    line 23
  4. Very specific:

    If the fact came from an ingested document, use origin: source:<its history/sources/ digest path>.

    line 24
  5. Distinctive:

    Never write a transcript path or a URL as an origin: this repository may be public.

    line 25
  6. Distinctive:

    When the user hands over a document or transcript to keep:

    line 44
  7. Very specific:

    Write a redacted digest (summary, claims, asks) to history/sources/<YYYY-MM-DD>-<slug>.md, dated today.

    line 46
  8. Very specific:

    If the original is a file, copy it byte for byte to history/sources/raw/<YYYY-MM-DD>-<slug>.<ext> (that folder is gitignored), and add raw: …

    line 47
  9. Distinctive:

    Use this when the thing to keep needs someone's approval: a rule you inferred (never one the user stated), a suggested change, or a gap …

    line 54
  10. Very specific:

    If the file does not exist, create it with the S3 frontmatter (permanence: volatile, about: Proposals waiting for a decision).

    line 60
  11. Very specific:

    Use #### or lower for headings inside the item, so the item stays one item.

    line 61
  12. Very specific:

    Run cortex store validate, then end with exactly one line: Proposed: <proposal> → now/proposals.md#P-<YYYY-MM-DD>-<slug> (origin: <origin>).

    line 62
  13. Distinctive:

    Only a person's word or observed evidence that the fix landed closes a bug.

    line 72
  14. Very specific:

    Never write under history/ except to create a new dated file (history/<kind>/<YYYY-MM-DD>-<slug>.md).

    line 76
  15. Distinctive:

    Never file the same fact in two places, and never skip the readback line.

    line 77

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cortex: remember

File one fact in the 4.0 store (cortex/), by the placement procedure in cortex/MAP.md, and end with one visible readback line so the user can correct it on the spot.

Precondition. This skill works only on a 4.0 store. If cortex/cortex.json does not exist, stop and say: "This project has no 4.0 store (cortex/); nothing filed." Never write into .cortex/. It writes only once the migration is accepted (migration.accepted is set in cortex/cortex.json), or when the project has no .cortex/, in every mode below. If .cortex/ exists and migration.accepted is null, stop and say: "This project's store is migrated but not accepted (cortex migrate --accept); nothing filed."

Steps, in order

  1. Search first. Run rg -i '<key words>' cortex/ for the fact's subject, and rg '^about:' cortex/ as the index of every file.
  2. Append to the existing subject file. If a file for the subject exists, add the fact there. Never restate a fact that already lives elsewhere: one fact lives in exactly one file. If the fact contradicts what the file says, change that file and end with the Updated: line of step 8.
  3. Otherwise use the kind → folder table in cortex/MAP.md to pick the folder, and create one file named by the word a reader would search for (lower-case kebab-case, no ids, no dates outside history/).
  4. Apply the tie-breaker from MAP when the fact fits two subjects: file it where the reader would be working when it bites, and add an alias in the other.
  5. Set verified with a method, and origin.
    • verified: <today> (told) when the user said it; (observed) when you saw it in code or output; (inferred) otherwise.
    • origin: session:<id>, where <id> is the value of $CLAUDE_CODE_SESSION_ID (run echo $CLAUDE_CODE_SESSION_ID).
    • When appending to an existing file, add your value to that file's origin list instead of replacing it.
    • If the harness exposes no session id (Codex, or any other agent without one), use origin: person:user@<today>. This is a stated limit: the link back to the conversation is lost.
    • If the fact came from an ingested document, use origin: source:<its history/sources/ digest path>.
    • Never write a transcript path or a URL as an origin: this repository may be public.
    • A new file also needs about (one line saying what it answers) and permanence (stable, changing or volatile).
  6. For a fact that is only true for now (a sprint, leave, a status, a risk, an open question), write it in now/<topic>.md as a list item or ## heading carrying until: <YYYY-MM-DD>.
  7. Run cortex store validate and fix any error it reports for the file you wrote.
  8. End with the readback, exactly one line:
    • Filing: <fact> → <path> (origin: <origin>) for a new or appended fact (the fact in at most 12 words);
    • Updated: <fact> → <path> (origin: <origin>) when you changed an existing statement.

Rules from the user

A rule ("from now on…", "always…", "never…") goes to world/rules/<rule>.md, one rule per file:

  • applies_when: one sentence describing the situation the agent is in, written for a matcher and starting with an actor or a condition ("The agent is about to…", "When the user…"). Never a topic ("anything about deploys"). Use always only for a rule that applies in every session.
  • scope: a non-empty subset of user-message, agent-answer, action, session-end.
  • source: user@<today>.
  • The body is the rule text, imperative and complete.

A document to keep: the source digest

When the user hands over a document or transcript to keep:

  1. Write a redacted digest (summary, claims, asks) to history/sources/<YYYY-MM-DD>-<slug>.md, dated today. Its frontmatter carries the S3 fields, captured: <today>, and origin: external:<who or where, ≤ 120 chars>, with no URL, host or user path.
  2. If the original is a file, copy it byte for byte to history/sources/raw/<YYYY-MM-DD>-<slug>.<ext> (that folder is gitignored), and add raw: history/sources/raw/<YYYY-MM-DD>-<slug>.<ext> to the digest's frontmatter.
  3. File each durable fact taken from it by the steps above, with origin: source:history/sources/<file>.md.

Every ask listed in the digest is filed as one spec request, so no ask rests in a digest unread. For each ask, append one propose-mode item to now/proposals.md (see below): the heading ## P-<YYYY-MM-DD>-<slug>: Spec request: <ask in ≤ 12 words>, then until: <today + 30 days> and status: pending decision, then the line Run specflow-spec on this ask., the ask quoted verbatim from the document, and source: <digest path>. Its origin is source:<digest path>. Do not judge the ask, reconcile it against the specs, or run specflow-spec: that session does. End each with the readback Spec request: <ask> → now/proposals.md#P-<YYYY-MM-DD>-<slug> (origin: source:<digest path>). A digest with no asks files no spec request.

Propose mode: a proposal, not a fact

Use this when the thing to keep needs someone's approval: a rule you inferred (never one the user stated), a suggested change, or a gap found while working.

  1. Append one item to now/proposals.md:
    • the heading ## P-<YYYY-MM-DD>-<slug>: <title>;
    • then the lines until: <today + 30 days> and status: pending decision;
    • then the full text, and where it came from.
  2. If the file does not exist, create it with the S3 frontmatter (permanence: volatile, about: Proposals waiting for a decision). Add your origin to its origin list.
  3. Use #### or lower for headings inside the item, so the item stays one item.
  4. Run cortex store validate, then end with exactly one line: Proposed: <proposal> → now/proposals.md#P-<YYYY-MM-DD>-<slug> (origin: <origin>).

A proposal is approved when a person, or an agent holding that authority, moves its text to its home in the store and removes the item. The skill never approves its own proposal.

A bug

Filing. A bug goes in code/<area>/<slug>.md with the S3 frontmatter and status: open, with no B-NNN id. <area> is the first folder of the affected path, else repo. Its diagnosis (type, severity, owner, fix in flight, the commit it was found at) goes in body lines, as far as they are known. The steps above otherwise apply, and the readback is the Filing: line.

Closing. When the bug is fixed, write history/incidents/<today>-<slug>.md holding the bug's text, aliases and origin list with this session's origin added, drop status, and add the body line Fixed: <today>, <commit or change>. Then remove the code/ file and re-point any link to it found by rg '<old path>' cortex/. Run cortex store validate, and end with Closed: <bug in ≤ 12 words> → <path> (origin: <origin>).

Only a person's word or observed evidence that the fix landed closes a bug; a fix in flight does not.

Never

  • Never write under history/ except to create a new dated file (history/<kind>/<YYYY-MM-DD>-<slug>.md). History is append-only.
  • Never file the same fact in two places, and never skip the readback line.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.