propose-memory-update
Skill0 starsChanged 3 months agoMITView on GitHub
Contributor flow — write a proposal to `pending/` for the owner to review. Contributors cannot edit `memory/*.md` directly. Use when the user requests a memory change but is not the topic owner (role=contributor). Triggers: "propose update", "建議補上", "我想加進記憶", "/propose-memory-update".
- Reads credentials
- Sends data out
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- approve-proposalSkill
- ingest-sourceSkill
- meeting-notesSkill
- read-memorySkill
- support-threadSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Write the proposed text (exactly as it would land in memory/<section>.md) to pending/.draft.md with the Write tool.
- Distinctive: line 28
Run the script — single line, no chaining (the contributor bash gate rejects chained commands but whitelists this exact invocation):
- Very specific: line 82
Don't write directly to memory/*.md even if the user pushes back
- Distinctive: line 83
Don't accept proposals without at least one source URL
- Distinctive: line 84
Don't squash multiple unrelated changes into one proposal — split per section per topic
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
propose-memory-update
Save a contributor's memory-change proposal to pending/<timestamp>-<author>.md
so the owner can review and approve.
Behavior
The mechanical work (frontmatter, filename, git add/commit, notification text)
is all in propose.py — the LLM only decides what to propose.
- Identify the user (from the
[user=U… role=contributor]prefix on this turn). - Determine which section the proposal targets: one of
background,current_understanding,decisions,open_questions,commitments,people. If ambiguous, ask the user. - Confirm the user has cited at least one source. Refuse if not — proposals without sources are a hard no.
- Write the proposed text (exactly as it would land in
memory/<section>.md) topending/.draft.mdwith the Write tool. Run the script — single line, no chaining (the contributor bash gate rejects chained commands but whitelists this exact invocation):
python3 .claude/skills/propose-memory-update/propose.py --author <id> --section <section> --draft pending/.draft.md --source <url> [--source <url2>] [--why "<rationale>"] [--conflicts "<analysis vs existing memory>"]The script builds the frontmatter, names the file
pending/<ISO>-<author>-<section>.md, consumes the draft, commits, and printsfile:/commit:/notify_owner:lines.It refuses to run outside a topic directory (one with
pending/andmemory/), so a wrong cwd fails with a pointed message rather than a bareFileNotFoundError.- Reply to the user with the filename + commit SHA from the script output, and note that the owner must approve before it becomes memory.
Notify the owner so they don't miss the proposal. How depends on the channel the proposal arrived on:
- Discord / LINE (or TUI): mention the owner in your reply on the same
channel — prefix the script's
notify_owner:line with<@$OWNER_DISCORD_USER_ID>. Neither adapter has a send-to-arbitrary-channel tool, so an in-channel mention is the notification. Slack (only when the external Slack adapter is wired in): DM the owner directly. Env vars are set by the launcher from
bot.env:$SLACK_BOT_TOKEN,$OWNER_SLACK_USER_ID. The contributor's id is in the inbound MCP notification'smeta.user_id.The role hook restricts curl to a fixed JSON template targeting
OWNER_SLACK_USER_ID. Substitute<filename>and<one-line>literally (no shell substitution other than the env vars above):curl -s -X POST https://slack.com/api/chat.postMessage \ -H "Authorization: Bearer $SLACK_BOT_TOKEN" \ -H "Content-Type: application/json; charset=utf-8" \ -d "{\"channel\":\"$OWNER_SLACK_USER_ID\",\"text\":\"📥 新提案 <filename>:<one-line>\\n來自 <@$SLACK_USER_ID>\\n回 '@<bot> approve <filename>' 或 '@<bot> reject <filename> <理由>'\"}"The hook regex requires exactly this shape — chat.postMessage URL, one or more -H headers, a single -d JSON containing
"channel": "<OWNER_ID>". Any deviation (e.g. python3 -c, --url override, second -d) is blocked.
- Discord / LINE (or TUI): mention the owner in your reply on the same
channel — prefix the script's
When to invoke
- User says "幫我加進記憶" / "memorize this" / "propose update" / "/propose"
- User is contributor (not owner)
What NOT to do
- Don't write directly to
memory/*.mdeven if the user pushes back - Don't accept proposals without at least one source URL
- Don't squash multiple unrelated changes into one proposal — split per section per topic
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.

