/athena:learn <lesson or session summary>from athena
Preserve a Mnemosyne lesson that the source supports. Discovery compares merged skills and open pull requests, is best effort, and can use a stale checkout. Specificity is not a rejection reason when a case adds a reusable decision branch. A durable write uses an isolated worktree and pull request.
Ships in athena. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Purpose: Preserve one concise reusable rule. Do not preserve many copies that have the same intent.
First, determine if the source contains an evidence-backed change that can help future work. Then
put current guidance and supporting notes in their specified artifacts. Use Git for prior versions
and provenance. A direct $athena:learn invocation is a durable-learning request: after discovery,
deliver an eligible
create, amend, or consolidate disposition through a pull request (PR) from an isolated
worktree. Do not require a second write-confirmation message.
Apply the ASD-STE100 technical-English policy to this skill and to all prose that it produces.
Use the autonomous workflow policy for authority, recovery, resources, validation, and delivery.
Use the canonical engineering-principles catalog for these workflow-specific rules:
Use the read-only path in the
dependency-resolution contract. Resolve the installed
advise skill directory. Then run
python3 "<installed-advise-skill-directory>/scripts/resolve_knowledge_checkout.py" --mode read-only --knowledge-root "$HOME/.agent_brain/knowledge" --json
before you classify the corpus. Inspect Mnemosyne at the reported checkout path. If the checkout
has a readable HEAD, bind discovery to that commit. If the helper reports a freshness limit, keep
that limit in the lesson.
Report these items when they are available:
If the checkout is missing or inspection fails, continue to classify the source lesson. Report that
corpus comparison is not available. Do not substitute a different repository. For a read-only
request, return an undelivered candidate when a reusable change exists. Do not report a duplicate
decision that you could not check.
Before remote publication, resolve dependencies and refresh the checkout when the delivery path can
do it. This step can create or update the checkout. Then repeat duplicate and open-PR discovery
against the resolved delivery revision. Run
python3 "<installed-advise-skill-directory>/scripts/resolve_knowledge_checkout.py" --mode write --knowledge-root "$HOME/.agent_brain/knowledge" --json
and record the result. Prefer the synchronized canonical default branch for a new PR. If remote
access fails, prepare the local change from the recorded revision and list the pending duplicate
checks. Supply exact publication commands. Do not claim remote delivery succeeded.
This phase is read-only.
Run advise with the proposed lesson. Treat no-local-guidance as a limit, not a blocker.
Define retrieval intent by the trigger, context, desired outcome, constraints, and failure mode.
Do not use a title, issue number, or session wording as identity.
Run python3 "<installed-advise-skill-directory>/scripts/resolve_knowledge_checkout.py" --mode read-only --knowledge-root "$HOME/.agent_brain/knowledge" --json.
Resolve the installed advise/scripts/list_retrievable_skills.py helper.
Run the helper by its absolute path against the reported knowledge checkout.
If the helper is missing or fails, report the selector limit. Use the bounded fallback from
advise: direct regular *.md children of skills/, with notes and history companions excluded.
Do not recurse.
If neither selector can list the corpus, continue source classification without a duplicate decision. Before publication, run the selector again when the delivery path can; otherwise report the limit and list the unverified checks.
Group only the selected main-skill paths by intent.
Inspect each selected candidate, its applicable .notes.md, and available Git history.
Read legacy .history files only when they help establish provenance. Their absence or
incomplete snapshots do not block a lesson.
Use this inspection to find provenance and prior consolidation.
Discover open PRs as the second candidate source. Do not treat merged skills/ as the only
corpus. A lesson can be in review before it reaches the default branch.
List each open PR in the resolved Mnemosyne repository. Use
gh pr list --state open --json number,title,files,headRefName --limit 200 when GitHub CLI
access is available.
Enumerate the changed flat skills/*.md artifacts in each open PR. Exclude .notes.md and
.history companions from the candidate list; inspect them only after a main file is selected.
Derive intent from changed content. Do not use a title or path as sufficient duplicate evidence. A title or path can identify a candidate. A candidate that exists only in an open PR is still a duplicate for disposition purposes.
Apply these disposition rules to the combined merged and open-PR candidate set:
| Candidate state | Disposition rule |
|---|---|
| Merged entry already covers the intent | Use the normal rule. |
| Exactly one open PR changes the target | Use Existing-PR mode. Do not create a new PR. |
| More than one open PR changes the target | Select blocked. |
| A new intent exists only in an open PR | Amend that PR instead of creating a near-duplicate. |
Report each open-PR candidate that you inspected: number, head commit identifier, target artifact, and whether it was the selected target.
If remote discovery is unavailable, report the limit. Record which duplicate and open-PR checks remain unverified. Give those checks another attempt before publication when access allows; if they remain unverified, say so and do not claim a duplicate-free result that you could not check.
Before a write, record exactly one disposition.
Use available corpus and remote evidence to select a provisional disposition. Give missing duplicate checks another attempt before publication when access allows. Remote failure does not prevent safe local preparation, and it is reported.
Do not reject a lesson only because it starts with one repository, session, error, or example. First, extract its trigger, context, desired outcome, constraint, and failure mode. Then compare that rule with the canonical candidates.
Treat a specific case as a material change when it adds at least one of these items:
Amend the applicable general entry when it has the same intent but does not contain that decision value. Create a new entry only when the intent is materially different. Reject the case as already covered only when the general rule and its current examples cause the same decision and no item in the list above remains. State which rule and example cover it.
Prefer zero through three concise examples. Add more only when each changes a decision. Show materially different decision branches. Do not add another example only because a new project produced the same branch.
The available dispositions are:
| Disposition | Use when | Action |
|---|---|---|
amend | One canonical entry has the same intent, and the source adds material decision value. | Update that canonical artifact set only. |
consolidate | Two or more current entries share intent. | Select one canonical artifact set. Merge all rules that were not superseded. Retire duplicates in the same PR. |
create | Intent is materially distinct. | Add one precisely named artifact set. |
reject | No safe reusable change remains, or the canonical rule and its examples already produce the same decision. | Report no learnable change; leave Mnemosyne unchanged. |
blocked | A blocking condition applies. | Leave Mnemosyne unchanged and request direction. |
Use blocked only for the affected action when a material conflict or missing authority remains
after recovery. Prepare safe work independently of that action. Do not create a near-duplicate to
avoid consolidation.
Select blocked if one of these conditions applies:
If the provenance of prior content remains uncertain, say so and keep the lesson general. Do not invent history. Proceed with an otherwise-safe write and name the limit in the delivery.
Protected material does not block preparation of a safe generalized lesson. Withhold only actions that would copy, expose, or require unauthorized alteration of that material.
Use repo-review for repository audits. Use pr-review for PR audits. Select the review depth for
the active mode.
Store current guidance in the main skill and optional supporting notes. Use Git commits for prior versions and provenance. Do not use the main skill as an append-only record.
| Artifact | Contains | Excludes |
|---|---|---|
skills/<name>.md | Current reusable triggers, decision rules, workflow, failures, parameters, and zero to three short examples. Each example must materially change a decision. | Prior versions, changelog text, session history, transcripts, and repeated project cases. |
| Git history | Prior versions, change summaries, and provenance from the reviewed commits. | New copies of sensitive source material. |
skills/<name>.notes.md | Source details that pass privacy checks, long examples, commands, measurements, verification reports, and useful supporting evidence. | Rules that the skill requires for operation. |
Rewrite the main entry around the smallest reusable change. Merge overlapping rules and remove superseded guidance. Use examples only when they show different decision branches. Keep the current schema-required version in frontmatter. Treat 30,000 bytes as an editorial guideline, not a write blocker. If a lesson grows, improve its structure without splitting one retrieval intent merely to pass a byte count.
Before you replace a main entry, inspect its complete current content against the private and
proprietary information rules, and also screen the complete prior content you retrieve from Git
history for the same rules. Note the commit the prior content came from. Inspect relevant Git
commits to understand prior consolidation. If a shallow checkout lacks the necessary history, use
the bounded, trusted knowledge-checkout helper as a read-only check and report the evidence limit
when it reports one. Do not run an unqualified git fetch from the writable checkout. Do not
invent provenance.
Do not create, repair, or require companion .history files, snapshots, or privacy-redaction
records. A legacy archive repair is not a prerequisite for a learning amendment.
Keep existing legacy files unchanged unless their migration or removal is separately in scope.
Record the change and its privacy-safe rationale in the commit and PR. Put useful supporting
evidence in .notes.md. Do not copy sensitive prior content or publish retrieval pointers to it.
The incident stop condition below still applies. Git provenance does not authorize a history
rewrite, purge, or disclosure.
Keep only the schema-required current version identifier in the main-file frontmatter. Use Git for prior versions, change summaries, provenance, and other version-control information. Obey the main-skill size limit of the resolved repository. For Mnemosyne, a new or changed retrievable main file must not be more than 30,000 bytes. Keep notes and history outside normal retrieval.
Assume that the session, its repositories, and all discovery output are sensitive. Store only the general pattern, decision rule, and evidence that is safe to share. Do not store the following items in a main skill, notes, history, filename, frontmatter, example, commit, or PR description:
If the selected canonical artifact set, or any prior version bound to the delivery base commit,
contains a secret, credential, regulated record, or material that is subject to an erasure request,
select blocked before a durable write. Do not copy it into guidance, notes, provenance, commits, or
delivery text. Report only a safe summary and route the material to an authorized
incident-remediation process. learn does not authorize a Git-history rewrite or purge.
Replace sensitive details with a correct general pattern. For example, use "an isolated checkout"
instead of a local path. If public information gives an equivalent example, cite or describe it. Do
not copy internal evidence. Do not invent an equivalent public example, a result, or verification
evidence. If the lesson is not useful without sensitive or proprietary information, select reject.
Leave Mnemosyne unchanged. Report that no safe learnable change exists.
If a lesson requires Athena implementation, complete the normal development first. Follow
development.md. Keep helpers in skills/<name>/scripts/. Add
behavior-based executable tests under tests/unit/. Do not add inline executable Markdown, wording
tests, or artifacts that have no consumer only to support a lesson.
Read-only discovery does not increase the requested scope. If the task requests durable learning,
you can use the resolved repository and full delivery path. Use a new PR or the single Existing-PR
target that discovery selected. Only an explicitly read-only request is read-only. A direct
$athena:learn invocation without that qualifier must complete the durable PR workflow when an
eligible lesson exists. For explicitly read-only work, return the candidate rule, the likely
disposition if known, and each corpus or remote limit.
Use this mode if discovery identifies exactly one open PR that changes the selected canonical entry. Before you edit, fetch these identity fields again. Bind the work to these values:
OPEN state;Create an isolated worktree on that source ref at the bound head OID. Verify its HEAD. Do not
change the shared checkout or default branch.
Immediately before publication, fetch the same identity and head again. Push only to the bound PR source ref. Use lease protection that binds the push to the expected head. If the ref moves, the source repository is not writable, or a binding changed, preserve the worktree. Refresh the binding and integrate compatible edits. Use an owned dependent branch when necessary; preserve the original PR and document the stack. Use the disposition-specific write allowlist below.
If the host supports parallel work, divide independent discovery, overlap analysis, draft work, and verification into bounded work items. Otherwise, do the work in sequence. Use the same evidence requirements. New-PR writers must use isolated worktrees from the same resolved default-branch commit identifier. Existing-PR writers must use only the bound PR head. Give writers ownership that does not overlap. Read-only work items must not edit. The coordinator must do these tasks:
Only the coordinator can commit, push, and open a new PR when applicable.
If ownership overlaps or the base changes, reconcile ownership and refresh affected evidence. Continue compatible work. Ask only about unresolved conflicts or scope changes.
If native isolation is not available, use the installed
../git-worktrees/scripts/prepare_worktree.py by its absolute path only for new-PR work. Keep the
resolved checkout as the current directory. Use these exact values:
skill/<slug>;--path <primary-project>/.worktrees/knowledge-<slug>;--path-root <primary-project>/.worktrees; and--start-point <resolved-default-SHA>.Do not use this fallback to reconstruct an Existing-PR worktree.
Do not change the shared checkout.
For a new PR, resolve dependencies and refresh the checkout before you create the worktree.
Bind the worktree to the exact current default-branch commit identifier.
Derive slug and name from lowercase letters a through z, digits, and single hyphens with
the pattern [a-z0-9][a-z0-9-]*.
Keep these values out of slug and name:
/;..; or-.If necessary, add a suffix that prevents a collision.
For new-PR work, before creation, resolve <primary-project>/.worktrees/knowledge-<slug>.
Create the path directly below <primary-project>/.worktrees.
Prefer a path whose parents and destination are not symbolic links. If the available candidates are symbolic links, report the conflict instead of writing through them.
For new-PR work, create skill/<slug> at
<primary-project>/.worktrees/knowledge-<slug> from the resolved default-branch commit
identifier.
Use this path for new-PR create and consolidate work.
Do not use this path for Existing-PR mode.
Before you edit, make a complete list of exact repository-relative paths that this operation can write.
Include only the paths that the selected disposition permits:
| Disposition | Allowed paths |
|---|---|
amend | The canonical .md and its .notes.md if supporting detail exists. |
create | One new .md and its .notes.md if supporting detail exists. |
consolidate | The canonical .md, its .notes.md, each named duplicate .md and .notes.md for retirement, and each verified active consumer that must migrate. |
Name each companion and retirement in the list.
Update the path allowlist when a necessary in-scope dependency is found. Record the reason.
For create, read the resolved Mnemosyne template, schema, and validation rules before you make a
draft.
Use the contract in the resolved delivery revision. Do not require its version to agree with the
installed Athena version.
For create, use each required frontmatter field. These fields include name, description,
category, date, and the current version.
For create, use the required section structure.
For create, keep searchable intent, generalized use, workflow, applicable failed approaches,
and parameters in the main entry.
For create, record the initial change and privacy-safe provenance in the commit and PR.
For create, put useful supporting details in .notes.md.
Apply the selected disposition only to paths in its allowlist.
For amend or consolidate, inspect the prior content and relevant Git history before you
rewrite the main entry. Apply the privacy and incident rules. Do not require an archive repair.
Do not duplicate content between artifact types or copy prohibited content into provenance.
Give current rules, Git provenance, and notes evidence one owner each.
During consolidation, migrate verified active consumers.
After the consumer migration, retire each named duplicate.
Before you commit, review each proposed artifact and delivery text against the private and proprietary information rules.
Remove or generalize sensitive details.
Use a correct public equivalent only if one exists.
If safe generalization is not possible, reject the lesson.
Run all applicable Mnemosyne validation.
Check these items and report each one:
Fix what fails. If an item cannot be checked, say so in the delivery.
Create a signed commit. Use DCO sign-off when the delivery repository or its policy requires
it (git commit -s).
For a new PR, push the feature branch.
For a new PR, open a PR against the resolved default branch.
For Existing-PR mode, push only to the bound source ref.
For Existing-PR mode, do not open another PR.
Do not merge automatically.
Report these items:
A published disposition means the PR exists and you can open it. If validation, push, or PR creation fails, preserve completed local work. Attempt recovery, then provide exact remaining commands and prepared artifacts. Report local preparation separately from remote delivery. Do not use Athena, a default branch, or a different repository as a fallback. Preserve delegated worktrees until their unique work is integrated or explicitly rejected. Preserve a delivery worktree until remote delivery is done.
After successful remote delivery, remove the delivery worktree in the same invocation when all of these conditions apply:
Use a non-forced removal. Do not delete branches. Do not discard changes. Do not force removal. Do not change a pre-existing or foreign worktree. If any condition is not satisfied, leave the worktree intact. For each retained worktree, report its path, owner, revision, cleanliness, and integration state. When delivery fails, preserve the worktree and provide the exact remaining commands. An explicit cleanup request can authorize more removal.
.history files. Use Git
provenance. Do not block a lesson only because a legacy snapshot is missing or incomplete.skills/ as the only candidate corpus. A lesson can be in review in an open
PR before it merges.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub homericintelligence/athena --plugin athena20 skills in this plugin
/address-reviewAddress every review thread on a pull request. Use this skill when a PR has review comments. For each thread, fix the concern in code, reply on the thread, and resolve it. Handle a dirty worktree, a stale branch, and conflicts yourself./adviseRetrieve relevant Mnemosyne guidance from the available local checkout and open pull requests before unfamiliar planning or implementation. Stale, missing, or unverifiable knowledge limits the advice but does not stop the primary task./babysitCoordinate a set of long-lived agent sessions and automation loops to a completion boundary. Use this skill when the user asks you to watch, track, revive, babysit, or guide many agent sessions, when sessions or hephaestus-automation-loop runs do work that does not appear in commits or pull requests, or when supervision must continue until an external event such as a new product release. The coordinator keeps authority, instructs the owning agents, arms an event-driven monitor, answers agent questions, and escalates non-simple blockers to the user. The required session store and session-resume capabilities are host-specific; when the host does not have them, supervise loop processes by their operating-system evidence only and do each coordination step manually with the same contracts.Other plugins' skills for the same job