| name | promote |
| description | This skill should be used when the user asks to "promote this note", "make this global", "this applies everywhere", "move this to global memory", or invokes /tm:promote [[note]]. Promotes one project note into the global scope as a standalone reference. Trigger only on an explicit user request for global promotion — never on inference that something merely seems broadly useful. |
| argument-hint | [[note]] |
tm — promote a project note to global
Guard (run first, always)
Run ${CLAUDE_PLUGIN_ROOT}/scripts/tm-guard.sh "$PWD" and read its KEY=VALUE output.
If TM_STATUS is not OK, stop and follow the repair flows in <MEMORY_DIR>/references/bootstrap.md
(if the store does not exist yet, the same file ships in the plugin at
${CLAUDE_PLUGIN_ROOT}/references/bootstrap.md). Do not continue until the guard prints
TM_STATUS=OK. Keep MEMORY_DIR, PROJECT_ID, and PROJECT_PATH for the steps below.
If PROJECT_EXISTS=false, there is no project note to promote — follow the project-creation
flow in bootstrap.md first.
Trigger contract
Promotion is explicit-only. Proceed when the user invokes /tm:promote or explicitly says the
knowledge is global ("this applies everywhere", "make this global"). Never promote because
content merely looks reusable — that judgment belongs to the /tm:consolidate and /tm:retro
reports, whose candidates also end in this confirm-gated flow. Global memory is never
written without explicit user confirmation (step 4).
Steps
-
Locate the source note. Resolve the argument (a [[wikilink]] or slug) against
<MEMORY_DIR>/<PROJECT_PATH>/notes/. With no argument, infer the note from the current
conversation; if more than one note plausibly matches, ask which one. If the knowledge has
no durable note yet (it only exists in chat or a log/ checkpoint), first capture it with
the /tm:remember durable flow, then promote the resulting note. Read the source note.
-
Rewrite as a standalone reference. Draft the global version so it stands on its own,
untied to this project:
- Generalize the title; strip project-specific paths, repo names, and context (or compress
them into one brief example).
- Keep an appropriate
type (usually reference or learning).
- Write a fresh
**Gist:** line, ≤100 chars — it becomes the global index row verbatim.
- Drop or rewrite wikilinks that only resolve inside the project scope.
-
Prepare the target file. Path: <MEMORY_DIR>/global/notes/YYYY-MM-DD-<slug>.md
(today's date). Frontmatter:
type, updated (now, ISO-8601), status: active
promoted-from: "[[projects/<PROJECT_ID>/notes/<source-file-sans-ext>]]"
tags carried over as still relevant.
Format spec: <MEMORY_DIR>/references/note-format.md.
-
Confirm — the hard gate. Show the user the destination path, title, and Gist (plus the
rewritten body when it changed materially) and confirm via AskUserQuestion with options
promote / edit first / cancel. On "edit first", revise and re-confirm. Do not write anything
under global/ unless the user explicitly confirms here — no exceptions.
-
On confirmation, write all three artifacts:
- Write the global note from step 3.
- Edit the source project note: add
promoted-to: "[[global/notes/<file-sans-ext>]]" to its
frontmatter and bump updated. Its status and project index row stay as they are.
- Prepend a row to
<MEMORY_DIR>/global/INDEX.md under ## Notes (newest-first):
- YYYY-MM-DD · <type> · [[notes/<file-sans-ext>]] — <Gist verbatim> #tag1 #tag2
- If the store is its own git repo (its git toplevel is
MEMORY_DIR itself), commit:
git add -A && git commit -m "mem(<PROJECT_ID>): <gist>" (run in MEMORY_DIR).
If the store is nested inside a larger repo, skip the commit — the parent repo owns it.
-
Report in one line: promoted [[<source>]] → global/notes/<file>.md.
Codex fallback
- No AskUserQuestion → print the draft (destination, title, Gist) as plain text and wait for an
explicit "yes" before performing step 5.
- No background agents are needed — promote runs inline in the main thread on both harnesses.
Additional resources
<MEMORY_DIR>/references/note-format.md — frontmatter fields and Gist convention.
<MEMORY_DIR>/references/index-format.md — index row format for the global INDEX.md.