dev-recap-docs
Skill0 starsChanged 3 months agoMITView on GitHub
After a dev phase (feature / milestone / bug fix), review code and process to produce 'understanding + self-check' docs: a data-flow walkthrough, a logic checklist, and a measured pitfalls list. For programmers who didn't build it or for the author's own review. Use when the user says 'dev done, generate docs to help understand it', 'write onboarding for what I just built', 'review and self-check this code'.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skill-recapSkill
- comm-link-debuggingSkill
- deep-comparison-analysisSkill
- industry-practice-surveySkill
- tech-selection-convergenceSkill
- guide-and-manualSkill
- readme-syncSkill
- change-recapSkill
- code-reviewSkill
- error-handlingSkill
- legacy-code-dispositionSkill
- phase-trackingSkill
- repo-hygieneSkill
- workspace-consistencySkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Do not use for prospective guidance: When the user is at a decision point and wants a guide + manual that teaches how to implement …
- Very specific: line 31
Do not use for software-engineering diagrams from source: When the user only wants flow / sequence / class diagrams extracted from code, …
- Very specific: line 32
Do not use to fix bugs surfaced during self-check: If self-checking exposes a real code bug, hand off to error-handling for the fix flow.
- Very specific: line 60
When material is missing, mark it ⚠️ to fill in rather than fabricating — invented detail is the fastest way to make these docs actively …
- Distinctive: line 87
Stall analysis: if this step stalls, the likely causes and how to locate them (this is the highest-value part in practice)
- Distinctive: line 118
When you find a contradiction between doc (including your own earlier docs) and code, fix the doc, not the code (unless the code is itself …
- Distinctive: line 128
Tell the user what material was found and what is missing: before writing
- Distinctive: line 196
Do not write from impression: Every description (API signature, field, state, constant) comes from code or measured log.
- Distinctive: line 199
Do not let docs drift behind code: When you find a contradiction, fix the doc (and flag the difference) — treating stale docs as …
- Very specific: line 213
Run the readme-sync skill to check whether the project's onboarding / getting-started docs need syncing
- Very specific: line 214
If self-check surfaces a code bug, run the error-handling skill to drive the fix flow
- Very specific: line 215
If a pitfall is important, consider sinking it into CLAUDE.md or the relevant decision doc (via the change-recap skill)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
After a code phase wraps up, review the completed code plus the development process and produce documentation that helps readers understand the runtime flow or self-check the logic. This skill provides a general methodology — applicable to any feature, milestone, or bug fix once development concludes. Stack-specific practice cases may sit in an appendix as "practice references," but they are not the methodology itself.
When to use
| User intent | Skill to use |
| "I've decided to implement Y using X; give me a guide + manual that teaches me how to write it" | guide-and-manual (prospective, at decision time, teaches implementation) |
| "Generate flow / sequence / class diagrams from the source" | code-to-doc (software-engineering diagrams) |
| "Dev is done / wrapped up; generate docs so others can understand it / for new joiners / to review and self-check the logic" | this skill (retrospective, after implementation, understanding + self-check) |
Trigger this skill when:
- A feature or phase just finished and a teammate who was not involved needs to understand how the code runs
- You want to review and self-check the logic before forgetting it — verifying correctness and looking for missed edge cases
- Integration hit a series of pitfalls and you want to capture "symptom → root cause → fix" so they are not hit again
- The code no longer matches the old docs and you need to regenerate, treating the code as the source of truth
When NOT to use
- Do not use for prospective guidance. When the user is at a decision point and wants a guide + manual that teaches how to implement something, that is
guide-and-manual(prospective, teaches writing). This skill is retrospective — it produces understanding and self-check docs after the code exists. - Do not use for software-engineering diagrams from source. When the user only wants flow / sequence / class diagrams extracted from code, use
code-to-docinstead. - Do not use to fix bugs surfaced during self-check. If self-checking exposes a real code bug, hand off to
error-handlingfor the fix flow; this skill documents, it does not modify code.
The essential contrast with guide-and-manual: that one is before — at decision time it produces a guide + manual that teaches others how to implement. This skill is after — once implementation is complete it reviews code plus process to produce docs that aid understanding of the runtime, self-check the logic, and record measured pitfalls. The two are complementary: prospective teaches writing, retrospective teaches checking.
Outputs (3 types — pick as needed or produce the full set)
| Document | Audience | Core question | Form |
| Data-flow self-check doc | Non-authors (understand) + author (self-check) | For one complete run, entry to exit: how does data flow, where does each step live in code, what is the expected behavior, and how do you locate a stall | Step-by-step breakdown (code location + data + expected log + checkpoint + stall analysis) |
| Logic self-check list | Author (self-check) | Is the code logic correct; are boundaries / exceptions / timing / resources covered | Categorized checklist (item-by-item ✓/✗) |
| Measured pitfalls list | Everyone (understand + prevent) | Which pitfalls were actually hit during development, what the symptom was, where the root cause is, and how it was fixed | Numbered table (# / symptom / root cause / fix / code location), with numbers threaded across the doc |
Produce any of the three independently or as a set. The data-flow doc is the core (it teaches understanding and supports self-check at the same time).
Methodology (6 principles, general)
1. Survey the current state — gather enough material before writing, do not rely on impressions
Documentation quality is bounded by its inputs. Before writing, collect:
- Code: entry points (which method / button / event triggers), core classes, the main data-flow spine, state machines, key branches
- Change records:
git log/git diff(which files this phase touched and why) - Dev-process traces: debug logs, pitfall notes, decision discussions
- Existing docs: related decision docs and design docs (cross-check, flag differences)
When material is missing, mark it ⚠️ to fill in rather than fabricating — invented detail is the fastest way to make these docs actively misleading.
2. Dual-audience perspective — write for "understanding" and "self-check" at the same time
For each passage, ask two questions:
- Can a newcomer follow it? (runtime flow clear, design rationale explained, concepts sharp)
- Can the author self-check against it? (logic correct, boundaries covered, nothing missed)
The data-flow doc naturally serves both: the step-by-step breakdown teaches understanding (how it runs) and supports self-check (is each step right) at the same time.
3. Break the data flow down step by step — the core method
Pick one end-to-end complete path (e.g. "user taps connect → connection succeeds") and break it down from entry to exit:
trigger → step ① → step ② → ... → doneEach step carries 5 elements (omitting any of them leaves a gap a reader can fall through):
- Code location:
file:lineorclass.method(clickable so the reader can jump and verify) - Action: what this step does (one sentence)
- Data flow: what comes in, what goes out, sent where / received from where
- Expected behavior: what logcat / terminal / UI should show (concrete — writing "should succeed" gives the reader nothing to match against)
- Checkpoint: what counts as right for this step, what counts as wrong
Append at the end:
- Overview diagram (ASCII / Mermaid, marking each step plus data-flow direction)
- Stall analysis: if this step stalls, the likely causes and how to locate them (this is the highest-value part in practice)
- Peer / external dependencies: what external conditions this step relies on (other systems / teams / configs)
4. Categorize the self-check list — do not skip dimensions
Categorize the logic self-check by dimension, with each item independently verifiable (✓ pass / ✗ problem / ⚠️ to verify):
| Dimension | What to check |
| Correctness | Is the main-flow logic right; are there errors in algorithms / state transitions |
| Boundaries | Null / extremes / first-and-last / concurrency / repeated triggers |
| Exceptions | Failure paths, error propagation, resource cleanup (try / finally), timeouts |
| Timing | Order dependencies, callback threads, races, precedence constraints (e.g. A must run after B) |
| Resources | Memory / connection / file-handle release, lifecycle, leaks |
| Constraint alignment | Whether the code follows existing project conventions (architecture / DI / error handling / logging / serialization) |
5. Measured pitfalls — record only what was actually hit, thread the numbers across the doc
The pitfalls list collects only pitfalls actually hit during development (with symptom / log evidence). Do not invent "theoretically possible" pitfalls — they crowd out the real ones and erode the reader's trust in the rest of the list. Each entry carries:
- Number (#1, #2...; consistent across the doc; code comments can cite
pitfall #N) - Symptom: the error or abnormal behavior (paste the measured log fragment)
- Root cause: why this happens (the underlying reason, not the surface symptom)
- Fix: how it was resolved (what was changed in code)
- Code location / phase: which file / phase it corresponds to
A measured pitfall is far more valuable than a theoretical one — it is "an error someone actually made," not "an error someone imagined might be made."
6. Treat code as the single source of truth — when doc and code disagree, code wins
The worst failure mode of retrospective docs is "the doc says A but the code is B." While generating:
- Make every description traceable to specific code (
file:line) - When you find a contradiction between doc (including your own earlier docs) and code, fix the doc, not the code (unless the code is itself a bug), and flag the difference
- Extract facts like state, fields, and signatures from the code rather than from memory — memory drifts and silently corrupts the doc
Step one: pick a path and survey the current state
- Confirm with the user which path / feature to document (e.g. "connection establishment flow", "network provisioning flow", "the fix for bug X")
- Read the code to map the main spine: entry → core classes → data flow → state → output
- Read git log / session memory to find pitfalls and decisions
- Tell the user what material was found and what is missing before writing
Templates
Template A: data-flow self-check doc
# {Feature} data flow (debug checklist)
> Helps understand the runtime flow and self-check the logic. Cross-check step by step against logcat.
## 1. Overview diagram
[ASCII / Mermaid data-flow diagram: trigger → each step → done, with data-flow direction marked]
## 2. Step-by-step breakdown (code + data + expected + checkpoint)
### ① {Step name}
- **Code**: `file:line` / `class.method`
- **Action**: what it does
- **Data**: input / output / send-receive direction
- **Expected log**: concrete output
- **Checkpoint**: what counts as right
### ② ... (repeat)
## 3. Stall analysis
For each step, the likely causes if it stalls + how to locate them (this is the highest-value part in practice)
## 4. Peer / external dependencies
What external conditions this flow relies on (other systems / teams / configs / protocol alignment)
## 5. Current status (measured)
Which steps now pass and which still stall (attach a measured logcat summary)Template B: logic self-check list
# {Feature} logic self-check list
| Dimension | Check item | Status | Notes |
|-----------|-----------|--------|-------|
| Correctness | Main-flow XX logic | ✓ / ✗ / ⚠️ | |
| Boundaries | Null / concurrency / repeats | | |
| Exceptions | Failure paths / resource cleanup / timeout | | |
| Timing | A after B / callback thread / race | | |
| Resources | Connection / handle release | | |
| Constraints | Follows project DI / error / logging conventions | | |Template C: measured pitfalls list
# {Feature} measured pitfalls list
| # | Symptom (log) | Root cause | Fix | Code location |
|---|---------------|------------|-----|---------------|
| 1 | `Unresolved reference 'X'` | Legacy DTO missing field | Add field to DTO + import | SignalingMessage.kt |
| 2 | `password empty` | PKCS12 password empty | Non-empty password + openssl -legacy | MqttTlsConfig.kt |
| ... | | | | |Constraints and red lines
- Do not write from impression. Every description (API signature, field, state, constant) comes from code or measured log; do not fill gaps with generic knowledge — fabricated detail is what makes retrospective docs actively harmful.
- Do not write only the happy path. The data flow has to include failure / timeout / exception branches; the stall analysis is the core value of the doc, not an afterthought.
- Do not invent pitfalls. The pitfalls list collects only ones actually hit (with symptom evidence); theoretical pitfalls dilute the list and mislead readers about real risk.
- Do not let docs drift behind code. When you find a contradiction, fix the doc (and flag the difference) — treating stale docs as authoritative is how code and docs silently diverge.
- Do not break existing abstractions. The doc describes the code as it is; do not modify the code through documentation (unless the user confirms the discrepancy is a bug).
- Code locations are clickable.
file:lineorclass.method, so the reader can jump and verify each claim.
Practice references (optional, as appendix)
The methodology itself is fully general. If the project already has a successful "dev-wrap-up documentation" practice, you may cite it as an appendix example — but the methodology does not depend on any specific tech stack or scenario. When generating docs for another feature or scenario, apply the same methodology and templates.
Follow-up actions after completion (suggest to the user; do not run automatically)
- Run the
readme-syncskill to check whether the project's onboarding / getting-started docs need syncing - If self-check surfaces a code bug, run the
error-handlingskill to drive the fix flow - If a pitfall is important, consider sinking it into CLAUDE.md or the relevant decision doc (via the
change-recapskill)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

