一键导入
speckit-memory-md-capture
Propose human-approved durable lessons and matching index updates from completed work.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Propose human-approved durable lessons and matching index updates from completed work.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Prioritize official @wordpress packages over external dependencies. Detect React conflicts, use aliasing, and validate package usage.
Apply approved architecture refactors by updating plan and task artifacts directly.
Perform a framework-agnostic architecture review validating implementation against spec.md, plan.md, tasks.md, and the governance and architecture constitutions.
Perform an architecture-aware verification gate validating implementation against spec.md, plan.md, tasks.md, and the Architecture Constitution.
Run a single architecture workflow that prefers memory-first context and can incorporate security review when available.
Run implementation with memory context, then review the produced implementation against security and architecture constraints.
| name | speckit-memory-md-capture |
| description | Propose human-approved durable lessons and matching index updates from completed work. |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"memory-md:commands/speckit.memory-md.capture.md"} |
Reflect on completed work and update durable memory only if needed.
Resolve configuration first. Use .specify/extensions/memory-md/config.yml when present; otherwise default to memory_root: docs/memory and specs_root: specs.
Capture is manual and human-approved. Do not write durable memory unless the user explicitly ran this command and approves the proposed updates.
Inputs to review:
Before proposing new entries, check the existing memory to avoid duplicates.
When .specify/extensions/memory-md/config.yml has optimizer.enabled: true:
cd .specify/extensions/memory-md && npx speckit-memory refresh-memory (or npx . refresh-memory if in the extension repo).cd .specify/extensions/memory-md && npx speckit-memory search-memory "architecture constraints boundaries decisions <topic>" for the candidate lesson topics.DECISIONS.md, ARCHITECTURE.md, BUGS.md, WORKLOG.md). When the optimizer is enabled, the search-memory results are the authoritative dedup source.When the optimizer is disabled, you MUST read {memory_root}/INDEX.md and the relevant source sections to check for existing entries.
For each candidate lesson, require all of these:
Every new entry must answer:
Candidate files:
{memory_root}/DECISIONS.md{memory_root}/ARCHITECTURE.md{memory_root}/BUGS.md{memory_root}/WORKLOG.md{memory_root}/INDEX.mdRules:
DECISIONS.md for still-active cross-feature choices and tradeoffs.ARCHITECTURE.md for durable boundaries or constraints.BUGS.md for repeatable failure modes and prevention guidance.WORKLOG.md for concise, high-value project milestones and durable lessons that do not belong in decisions, architecture, or bugs.DECISIONS.md, ARCHITECTURE.md, BUGS.md, or WORKLOG.md, you MUST register the update in INDEX.md.--content flag delegates the file write entirely to Node.js:
cd .specify/extensions/memory-md && npx speckit-memory register-memory \
--id <ID> --title "<Short title>" --tags "<tag1,tag2>" \
--file "<SourceFile.md>" --status "active" \
--content "### YYYY-MM-DD - <Title>
Status Active
Why this is durable
Decision
Tradeoffs
For `WORKLOG.md` only, add `--prepend` to insert at the top (newest-first order).
This single command: (1) writes the entry to `<SourceFile.md>` behind a `---` separator, (2) updates `INDEX.md`, and (3) syncs the SQLite cache. No further file edits are needed.
### YYYY-MM-DD - Title format used in the template, then update INDEX.md.INDEX.md short (20-50 rows target). It points to source entries; it does not duplicate full lessons.The --id value uses a letter prefix + sequential number:
| Prefix | File | INDEX.md section |
|---|---|---|
A | ARCHITECTURE.md | ## Architecture |
B | BUGS.md | ## Bugs |
D | DECISIONS.md | ## Decisions |
W | WORKLOG.md | ## Workflow |
To pick the next number: count existing entries with that prefix in INDEX.md and add 1. Example: if D3 is the last decision entry, use D4.
This command is proactively triggered by spec-kit-architecture-guard as the final step of its governed-* workflows when new lessons are identified. Manual execution is supported but optional since it is managed by the governance layer.
Approval flow:
register-memory --content command first.register-memory --content command — it handles all file writes, index synchronization, and cache refresh in one step.