一键导入
memory-entrypoint-with-index-discipline
Keep MEMORY.md terse by capping entries, warning when caps hit, and pointing each memory to its own file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Keep MEMORY.md terse by capping entries, warning when caps hit, and pointing each memory to its own file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Collapse multiple change sources into one caller-facing boolean so headless bootstraps know whether a downstream refresh is necessary.
After awaiting persistence work, update the shared budget state for each `tool_use_id` exactly once so no concurrent reader ever sees a half-committed decision.
Issue continuation nudges while the turn stays under budget, then halt once diminishing returns or the budget cap justify stopping.
Lazily extract referenced files for bundled skills so large prompts stay offline until needed.
Persist a cache-safe stop-hook context snapshot only for main session queries so later helpers can resume from stable state without fork pollution.
Sweep stale extension caches before activation, then fall back to a sticky manual-refresh flag if the live refresh fails.
| name | memory-entrypoint-with-index-discipline |
| description | Keep MEMORY.md terse by capping entries, warning when caps hit, and pointing each memory to its own file. |
| metadata | {"author":"ychampion"} |
Domain: context-management
Trigger: Use whenever you’re writing to MEMORY.md so the index stays readable and never exceeds terminal-safe length budgets.
Source Pattern: Distilled from reviewed context, compaction, and memory-governance patterns.
Treat MEMORY.md as an index rather than a content store: truncate entries when the line cap or byte cap is reached, issue a warning in place of the dropped detail, and point each entry to a dedicated per-topic file that holds the richer memory frontmatter. Keep the truncation routine deterministic by trimming to 200 lines, then to the last newline before 25 000 bytes, so future reads know exactly what the policy will display.
MAX_ENTRYPOINT_LINES; avoid writing new lines beyond the cap and instead move the extra detail into a ${ENTRYPOINT_NAME} entry that links to another file.lines, bytes, or both) and hints to keep entries under ~200 characters per line.MEMORY.md; each entry should be one line in the form - [Title](file.md) — one-line hook referencing a dedicated memory file.If a user asks you to remember their quarterly OKR planning, add a single hook line to MEMORY.md that links to okr.md and let that file carry the context, while the entry keeps MEMORY.md under 200 lines so the prompt cache never truncates the index unexpectedly.
MEMORY.md; doing so triggers truncation every time and loses context visibility.MEMORY.md beyond the caps; once a limit is hit, move future info to a new file instead of letting the file grow uncontrolled.