coding-discipline
Skill1 starsChanged 30 days agoMITView on GitHub
Use when writing or modifying code, especially in agentic flows — before composing diffs, generating new modules, or applying suggested fixes
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Dmkdok/product-factorytheir own version, first seen Oct 25, 2026
- ldaume/agentic-engineering-harnesstheir own version, first seen Oct 20, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ldaume/agentic-engineering-harness★ 3same name
- Dmkdok/product-factory★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- addressing-findingsSkill
- analyze-codeSkill
- brainstormSkill
- designing-interfacesSkill
- guiding-manual-testingSkill
- knowledge-baseSkill
- researchSkill
- style-checkerSkill
- test-driven-developmentSkill
- using-software-specialistsSkill
- writing-unit-testsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Parallel solution: Before writing a new helper, pattern, or solution, ask: *does this codebase already solve this problem class?*
- Very specific: line 37
Helper: before writing formatDate/chunk/parseId, grep for similar names and inspect existing utils modules.
- Very specific: line 38
Library: before adding a dependency, check package.json / go.mod / pyproject.toml for an existing equivalent.
≈ “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
Coding Discipline
If you can name the failure mode you're about to commit, you usually won't commit it.
Six failure modes most common in LLM-written code, with the counter for each.
The Six Failure Modes
| Failure mode | Symptom | Counter |
| Silent assumption | Picking one reading of an ambiguous ask | State the assumption, or ask |
| Scope creep | Touching adjacent code "while here" | Every changed line traces to the ask |
| Speculative complexity | Adding config/abstraction nobody asked for | Build the smallest thing |
| Hallucination | Referencing symbols/APIs/paths that don't exist | Verify before writing; run before claiming done |
| Drift | Losing the original goal over a long session | Stop when the verifiable check passes |
| Parallel solution | New helper/pattern for a problem the repo already solves — or a tidier variant of one it already uses | Search first; reuse what exists, and match its shape instead of improving it |
Falsifiable Tests
Silent assumption. Before any non-trivial change, name the load-bearing assumption in one sentence. If you can't, you don't know what you're building. If two readings are reasonable, present both — e.g., "Reading 'cache user lookups' as in-process LRU rather than shared cache — flag if you meant the latter."
Scope creep. A diff answers one question: what did the user ask for? Every other line is contraband. Allowed: orphans your own change created (unused imports, dead branches you rewrote). Not allowed: "while I'm here" reformatting, renaming, dead-code removal, style sweeps — mention them in your reply, don't commit them. Two unrelated chunks → split the diff.
Speculative complexity. Does a second caller exist right now that needs a different value? No → don't add the parameter. The same test kills: "I'll make this configurable", base classes for hypothetical implementations, wrappers for hypothetical callers, and handling structurally impossible errors. If the simplest version is half the size, write that one.
Hallucination. Look it up before writing — prefer serena symbolic tools (find_symbol, get_symbols_overview, find_referencing_symbols) over Read/Grep; context7 for external library docs; grep/Read otherwise. "It should work" ≠ "I ran it and it works". When you couldn't confirm, mark uncertainty: "I think it's obj.foo() but haven't verified."
Drift. Restate the request as one of: a failing test you'll make pass, a specific output you'll produce, a specific observable behavior. For multi-step work: 2–4 steps, each paired with its check. A step is done when its check passes — not before.
Parallel solution. Before writing a new helper, pattern, or solution, ask: does this codebase already solve this problem class?
- Pattern: pagination/validation/auth/error-handling/retries/logging/config — find an existing one and copy its shape.
- Helper: before writing
formatDate/chunk/parseId, grep for similar names and inspect existing utils modules. - Library: before adding a dependency, check
package.json/go.mod/pyproject.tomlfor an existing equivalent.
Parallel solutions double maintenance, split conventions, and confuse future readers about which version is canonical.
Finding the existing solution isn't enough — copy its shape. A tidier variant of a pattern the repo uses everywhere is still a parallel solution: the repo now has two ways to do one job, and yours is the outlier. Match the existing verbosity even when a wrapper would be cleaner. If the tidier version is genuinely better, propose it as its own change — never smuggle it in as a side effect.
Pre-Commit Self-Check
- Assumption — stated, or "n/a"?
- Scope — every changed line traces to the request?
- Simplicity — could a senior cut this in half?
- Verification — confirmed referenced symbols/APIs exist? Ran the code, not just wrote it?
- Goal — can you name the check that proves this is done?
- Reuse — checked the codebase for an existing solution (helpers, patterns, libraries), and matched its shape rather than improving it?
A "no" on any line: stop and revise; don't ship and explain.
Red Flags
| Inner thought | What it means |
| "I'll just guess what they meant" | Surface the assumption |
| "While I'm here, let me also…" | Scope creep — stop |
| "Let me add a flag for flexibility" / "That's real flexibility, not speculation" | No second caller exists → don't add the parameter |
| "I'll handle every conceivable error" | Many are structurally impossible |
| "I'm pretty sure that method exists" / "It should work" | Hallucination — look it up; run before claiming done |
| "I lost track of what they wanted" | Drift — restate the goal |
| "I'll just write a quick helper" / "I'll add a library for this" | Grep first; the repo may already solve it |
| "The repo does this inline everywhere, but a wrapper is cleaner" | Still a parallel solution — copy the inline shape; propose the wrapper separately |
For trivial tasks (typo fix, one-line rename), use judgment — this skill biases toward caution.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

