一键导入
memex-writing-plans
Use when you have an approved design (design.md) for a multi-step task — produces the fused technical spec.md + tasks.md, before touching code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when you have an approved design (design.md) for a multi-step task — produces the fused technical spec.md + tasks.md, before touching code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scaffold or audit the memex (vault + AGENTS.md + spec templates + bundled skills) in any repo — an externalized, navigable project memory for agents (Claude Code, Codex, Cursor, OpenCode, etc.). Agent-agnostic. Idempotent — safe to run repeatedly. Use when the user wants to set up, verify, or fix the memex in a project.
Sync an installed memex with upstream — reconcile the scaffolded files against the current upstream memex: auto-apply changes to files you never touched, agent-merge the ones you edited, and never touch living vault content. Use when upstream memex changed scaffolded content (a renamed term, a reworded skill) and you want it pulled in without clobbering local edits.
Sync an installed memex with upstream — reconcile the scaffolded files against the current upstream memex: auto-apply changes to files you never touched, agent-merge the ones you edited, and never touch living vault content. Use when upstream memex changed scaffolded content (a renamed term, a reworded skill) and you want it pulled in without clobbering local edits.
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Use when you have an approved design (design.md) for a multi-step task — produces the fused technical spec.md + tasks.md, before touching code.
| name | memex-writing-plans |
| description | Use when you have an approved design (design.md) for a multi-step task — produces the fused technical spec.md + tasks.md, before touching code. |
Turn the approved design (design.md) into the fused technical spec.md (architecture, file structure, phase ordering, numbered acceptance criteria) plus the tasks.md breakdown (bite-sized tasks, each naming the AC-N it satisfies and whether it is delegable). Assume the implementing engineer has zero context for our codebase and questionable taste: document which files to touch for each task, the code, the docs they might need, and how to test it. DRY. YAGNI. TDD. Frequent commits.
Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
Announce at start: "I'm using the writing-plans skill to write the technical spec and tasks."
Context: This runs after brainstorming wrote design.md and the branch/mode were recorded. Work in the spec's branch.
Save to: .memex/specs/YYYY-MM-DD-<slug>/spec.md (the technical spec) and tasks.md, alongside the design.md brainstorming wrote.
spec.md/tasks.md frontmatter and body, write sibling links with the folder prefix and a display alias: [[YYYY-MM-DD-<slug>/design|design]] and [[YYYY-MM-DD-<slug>/spec|spec]] (not bare [[spec]], which is ambiguous across specs).If the design covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest splitting — one spec per subsystem. Each spec should produce working, testable software on its own.
spec.md)Copy .memex/specs/_template/spec.md into the spec folder and fill it from the approved design.md:
status: draft, feature, created, the recorded branch:/mode:, and scope: — your honest sizing of the work, one of low | medium | high | complex. scope is recorded only; nothing branches on it yet (reserved for a future quick-mode).AC-1, AC-2, …. Each must be binary, observable, verifiable in under a minute, and free of vague verbs ("works", "fast"/"robust" without a number, "gracefully"). These IDs are the contract tasks.md and memex-code-review trace against, so they must be specific enough to check.design.md — don't duplicate it here.tasks.md)Each step is one action (2-5 minutes):
Every tasks.md MUST start with this header:
# [Feature Name] — Tasks
> **For agentic workers:** implement task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. Each task names the `AC:` it satisfies and a `Delegable:` note.
**For this spec:** `[[YYYY-MM-DD-<slug>/spec|spec]]`
---
### Task N: [Component Name]
**AC:** [AC-N it satisfies, e.g. AC-1, AC-3]
**Delegable:** [yes/no + one-line isolated context an isolated subagent would receive]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
- [ ] **Step 1: Write the failing test**
```python
def test_specific_behavior():
result = function(input)
assert result == expected
```
- [ ] **Step 2: Run test to verify it fails**
Run: `pytest tests/path/test.py::test_name -v`
Expected: FAIL with "function not defined"
- [ ] **Step 3: Write minimal implementation**
```python
def function(input):
return expected
```
- [ ] **Step 4: Run test to verify it passes**
Run: `pytest tests/path/test.py::test_name -v`
Expected: PASS
- [ ] **Step 5: Commit**
```bash
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
```
Every AC-N defined in spec.md must be named by at least one task's AC: field — that is the traceability contract the validator and code-review enforce.
Every step must contain the actual content an engineer needs. These are task failures — never write them:
After spec.md + tasks.md are written, review them before implementation. This runs in both autonomous and reviewed. The user is not asked to review — design approval already gated the work.
Author pass (inline, you):
design.md and each spec section. Can you point to a task that implements it? List and close any gaps.AC-N in spec.md is referenced by at least one task's AC: field, and no task cites an AC-N that does not exist.{{}}, "TBD", "TODO", or "No Placeholders"-list red flags survive.clearLayers() in Task 3 but clearFullLayers() in Task 7 is a bug).Fix issues inline.
Gates (run in order):
.memex/scripts/validate-spec.sh <spec-folder>; a non-zero exit names a structural defect (missing frontmatter key, surviving {{placeholder}}, vague-verb AC, or an AC-N no task references). Fix and re-run until it exits 0.spec-document-reviewer-prompt.md) over spec.md + tasks.md. If Issues Found: fix, re-dispatch, repeat until Approved (max 3 iterations, then surface to human)./memex:review-spec — the external evaluator (constitution + vault compliance, vague ACs, duplication). Fix any FAIL.After the spec self-review passes, follow the AGENTS.md ### Spec flow tail:
```txt handoff prompt (a one-paragraph summary + the paths to design/spec/tasks + the mode) and stop. The user runs /compact (or opens a new chat) and pastes it to resume. Never hand off before the artifacts exist.autonomous opens the PR (/memex:new-pr) and runs the memex:code-review cycle to lgtm on its own; reviewed first asks "open the PR and run code-review?", then does the same.