بنقرة واحدة
plan-before-code
Plans multi-step work before writing code.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Plans multi-step work before writing code.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Flags risky shell commands and unsafe tree ops.
Detects high-confidence security risks in code.
Surfaces the dojo's non-negotiable prime directives.
Activates the dojo framework at the start of a session.
Captures lessons and promotes recurring patterns.
Derives measurable NFRs from a parent business driver.
| name | plan-before-code |
| description | Plans multi-step work before writing code. |
| tier | core |
| category | discipline |
| created_by | human |
| platforms | ["windows","macos","linux"] |
| tags | ["planning","workflow","discipline"] |
| author | Andreas Wasita (@andreaswasita) |
Forces an explicit written plan in tasks/todo.md before the agent edits any file for non-trivial work. Does NOT apply to one-line fixes, typo corrections, or any task the agent can finish in a single edit — over-planning trivial work is its own failure mode.
tasks/todo.md (created by scripts/init.sh if missing).brainstorming skill.powershell with git status).0. Recall prior memory for the topic (memory_recall MCP tool or scripts/memory-recall.sh) and fold it into Context.
1. Assess complexity (the 4 questions in Procedure §1).
2. If non-trivial → write plan to tasks/todo.md using the canonical block.
3. Validate the plan against the gap checklist.
4. Execute one step at a time, checking items off as you go.
| Situation | Action | Tool |
|---|---|---|
| Before writing a plan | Recall prior memory | memory_recall MCP tool, or powershell → scripts/memory-recall.sh |
| Touch ≥3 files | Enter plan mode | view tasks/todo.md then edit |
| Re-plan after wall hit | Append a ## Revision N block | edit tasks/todo.md |
| Check existing plan | Read current state | view tasks/todo.md |
| Mark step done | Flip - [ ] to - [x] | edit tasks/todo.md |
| Resume across sessions | Re-read the plan first | view tasks/todo.md |
Before assessing complexity, surface what the dojo already knows so the plan
compounds past knowledge instead of re-deriving it. Use the memory_recall MCP
tool with the work's topic (and language/fileType when known). If that tool
is unavailable, use powershell to run scripts/memory-recall.sh --topic "<topic>".
Fold the returned active decisions, matching patterns, and recent sessions into the Context block of the plan. This step is advisory: an empty vault or a recall with no hits never blocks planning — just proceed to Step 1.
Answer these four questions in order:
If any answer is "yes" or "maybe," enter plan mode. Otherwise, proceed without a plan (don't pretend a typo fix needs one).
Append to tasks/todo.md using the edit tool with this canonical block:
## Task: <brief description>
### Context
- What: <what we're building or fixing>
- Why: <the motivation>
- Risk: <what could go wrong>
- Prior memory: <decisions/patterns/sessions surfaced in Step 0, or "none">
### Steps
- [ ] Step 1: <specific action>
- [ ] Step 2: <specific action>
- [ ] Step 3: <specific action>
### Verification
- [ ] Tests pass (`scripts/verify.sh tests`)
- [ ] No regressions
- [ ] Diff reviewed
Before executing, walk the plan once and ask:
Follow the plan one step at a time. Mark items complete only after the work for that step is done and locally verified. If something goes sideways:
tasks/lessons.md.### Revision N block to the task in tasks/todo.md.tasks/todo.md, it does not exist.tasks/todo.md.- [x] until its verification in §2 is satisfied.memory_recall or scripts/memory-recall.sh) and its findings folded into Context.tasks/todo.md contains a ## Task: block for the current work.scripts/verify.sh plan passes.