Install
openclaw skills install @blueriverlhr/document-ahead-codingWrite documentation first, code second, for any non-trivial change to a codebase. Use when starting a new feature, refactor, bug fix, or migration; when multi-file work needs a reviewable plan; or right after a discuss-before-begin session has reached consensus. Keeps decisions, plans and the "why"
openclaw skills install @blueriverlhr/document-ahead-codingCoding is cheap to write, expensive to redo. A short documentation phase forces the plan to be explicit before it costs time to implement, lets the user review and veto a bad direction when it costs minutes (not days), and leaves a record of why — not just what — for the next reader.
More than a trivial one-file edit:
This skill is the downstream of discuss-before-begin: discuss first until
consensus, then this skill turns the agreed plan into durable documents, then
code.
discuss-before-begin).docs/discussion/.docs/principle/.docs/task/ (one file per
task).docs/manual/ as the shape of the feature becomes
clear.docs/temp/.docs/manual/ matches reality.docs/
discussion/ # conversations & the user's explicit choices
principle/ # reusable rules distilled from discussions
task/ # task + sub-task files
01-do-something.md
01-01-do-something.md
01-02-do-something.md
02-do-something.md
...
manual/
how-to-do-something.md # how to use the codebase
# if there are chapters, make a folder named
# after the chapter
temp/ # "decided not to do now" + why; may be
choose-not-do-something.md # revisited later
why-not-do-something.md
One file per unit of work. Naming: NN-description.md; subtasks use
NN-NN-description.md (decompose when a task is too big to review as one
change).
Each task doc must contain these fields:
| Field | Meaning |
|---|---|
| Goal | what "done" looks like |
| Why | link to the discussion/principle that motivated it |
| Approach | the concrete steps, in order |
| Files touched | expected files/areas, so scope is reviewable |
| Acceptance criteria | how to verify it works |
| Status | todo → doing → done |
temp/.done with stale docs — a task may not be marked done while its doc
is out of date.The docs are "ready to code from" when:
temp/.temp/.