cohesive
Skill1 starsChanged 5 months agoMITView on GitHub
Reconstruct user intent, reconcile new requirements with existing architecture, and prevent additive or symptom-level patches. Use for ambiguous/high-level feature requests, structural changes, recurring bugs, or any change where the literal request may not be the real objective.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- recrsn/agent-skillstheir own version, first seen Mar 6, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- recrsn/agent-skills★ 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 repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-homeSkill
- delegate-minimalSkill
- deploy-nsitesSkill
- ferry-search-greeceSkill
- hash-outSkill
- high-levelSkill
- meta-feedbackSkill
- nip60Skill
- prime-contextSkill
- repo-marketingSkill
- runbookSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
44 rules. About 0 are common, 44 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈44
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Treat both the user's prompt and the current codebase as evidence, not ground truth.
- Distinctive: line 14
Use the full workflow when any of these are true:
- Distinctive: line 24
Use the fast path for truly mechanical changes: explicit outcome, no meaningful ambiguity, no domain/ownership change, and an …
- Distinctive: line 36
Do not silently preserve obsolete paths: When a new design supersedes an old path, identify its retirement explicitly.
- Distinctive: line 37
When new evidence invalidates the plan, re-plan: Never patch around a now-wrong plan merely because implementation has started.
- Distinctive: line 45
Do a read-only reconnaissance first.
- Distinctive: line 47
Read the relevant project instructions, architecture/domain docs, tests, and the 5–15 source files most likely to define the affected …
- Distinctive: line 57
Do not edit during this step.
- Distinctive: line 63
Before planning implementation, build an internal Intent Map from the user's request.
- Distinctive: line 95
If interpretation is materially uncertain, reflect before interrogating:
- Distinctive: line 101
Ask the user to correct the read.
- Distinctive: line 103
Do not combine this with a long questionnaire.
- Distinctive: line 105
If the request is already clear, this gate can remain internal.
- Distinctive: line 118
Read more before settling for low confidence.
- Distinctive: line 120
Ask the user only when:
- Distinctive: line 125
When asking, lead with your recommended interpretation and why, then give the real alternatives.
- Distinctive: line 129
Run this gate before proposing implementation for any non-mechanical change.
- Distinctive: line 141
If no, explain briefly why the current abstraction naturally accommodates it.
- Distinctive: line 143
If yes, describe what the subsystem should look like given what is now known before deciding how to modify the current code.
- Distinctive: line 151
Subtractive/replacement: delete or replace an abstraction/path that no longer represents the domain correctly.
- Distinctive: line 153
Do not manufacture three options when only one is sensible, but do not accept the first plausible patch without considering a structural …
- Distinctive: line 157
Before choosing, explicitly check whether the proposed approach would create any of these:
- Distinctive: line 170
If yes, treat that as evidence in favor of reconciliation rather than accepting the complexity automatically.
- Distinctive: line 184
If you choose the additive approach, say why it is genuinely coherent rather than merely cheaper.
- Distinctive: line 188
Before changing production behavior, write a compact reasoning checkpoint:
- Distinctive: line 216
Do not proceed with a production fix until the mechanism is understood well enough to explain why the fix works.
- Distinctive: line 218
Prefer a failing regression test that captures the defect before fixing it when practical.
- Distinctive: line 251
If yes because of an unresolved product judgment, clarify it.
- Distinctive: line 271
Follow the contract, not the original wording of the prompt.
- Distinctive: line 273
Prefer modifying the owning abstraction over creating a neighboring workaround.
- Distinctive: line 274
Remove superseded code as part of the same coherent change when safe.
- Distinctive: line 275
Keep temporary compatibility paths explicit and bounded.
- Distinctive: line 276
Keep tests close to changed behavior and invariants.
- Distinctive: line 280
Stop implementation and return to the Architecture Reconciliation Gate if you discover:
- Distinctive: line 289
Do not solve these discoveries by adding another patch to preserve the current plan.
- Distinctive: line 293
After behavior works, run a separate review pass.
- Distinctive: line 307
If we had known this requirement from day one, would this resulting architecture look reasonable?
- Distinctive: line 312
Do not reward deletion for its own sake.
- Distinctive: line 314
If the review finds architectural accretion, fix it before declaring the task complete.
- Distinctive: line 325
no unexpected side effects beyond the contract
- Distinctive: line 350
All five have clean answers -> implement and verify without ceremony.
- Distinctive: line 362
ask the user how the codebase works before reading it
- Distinctive: line 364
create a compatibility wrapper with no removal condition
- Distinctive: line 373
When choosing between two valid implementations, prefer the one for which this statement is most true:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Cohesive
Treat both the user's prompt and the current codebase as evidence, not ground truth.
The goal is not the smallest diff. The goal is the smallest coherent change: a change that satisfies the user's underlying intent, preserves explicit constraints, and leaves the system conceptually cleaner or at least no less coherent than before.
When to activate
Use the full workflow when any of these are true:
- The request is high-level, exploratory, ambiguous, or dictated/thought aloud.
- The user mixes desired outcomes with suggested mechanisms ("maybe", "ideally", "could", "e.g.", "use X").
- A new feature crosses subsystem boundaries or changes the domain model.
- The obvious implementation would add a parallel path, guard, flag, adapter, wrapper, helper, or special case.
- A bug has already been patched before, is intermittent, or suggests an invalid state/ownership problem.
- The requested change makes an existing abstraction feel strained.
- The user explicitly asks for a proper fix, root-cause fix, refactor, cleanup, rethink, or architectural work.
Use the fast path for truly mechanical changes: explicit outcome, no meaningful ambiguity, no domain/ownership change, and an implementation that follows a clearly healthy existing pattern. Still perform the Coherence Gate internally. If the fast path uncovers structural tension, switch to the full workflow.
Hard rules
- User wording is not automatically a specification. Infer the underlying goal before treating implementation suggestions as requirements.
- Candidate mechanisms are non-binding by default. Examples, ideas, and phrases such as "maybe", "ideally", "could", and "for example" are evidence about intent unless the user explicitly locks them.
- Existing architecture is not automatically a constraint. It is evidence about prior decisions. Reuse it only when it still fits the new reality.
- Optimize for the smallest coherent change, not the smallest diff. A larger refactor can be smaller conceptually than another special case.
- Deletion, consolidation, generalization, and replacement are first-class options. Do not default to additive code.
- Do not fix a bug before explaining its mechanism. Diagnostic instrumentation is allowed before root cause is known; production fixes are not.
- Do not refactor unrelated code. Structural work must be causally connected to the goal, invariant, or failure being addressed.
- Do not ask the user questions the codebase can answer. Investigate facts; ask only for human-owned product judgments or material ambiguity.
- Do not silently preserve obsolete paths. When a new design supersedes an old path, identify its retirement explicitly.
- When new evidence invalidates the plan, re-plan. Never patch around a now-wrong plan merely because implementation has started.
Workflow
1. Learn before asking or editing
Do a read-only reconnaissance first.
Read the relevant project instructions, architecture/domain docs, tests, and the 5–15 source files most likely to define the affected behavior. Trace enough of the data/control flow to answer:
- What concept owns this behavior today?
- What are the current invariants?
- Where does state originate and who may mutate it?
- Which public/user-visible behavior must remain stable?
- Which existing abstractions and paths would the requested change touch?
- Are there already parallel concepts, compatibility layers, special cases, or deprecated paths nearby?
- What existing tests characterize current behavior?
Do not edit during this step.
Existing patterns are inputs to judgment, not templates to copy automatically.
2. Reconstruct intent
Before planning implementation, build an internal Intent Map from the user's request.
GOAL
The underlying outcome the user is trying to achieve.
OBSERVATIONS / PAIN
What prompted the request; what currently feels wrong.
OBSERVABLE OUTCOMES
What should become true from the user's or system consumer's perspective.
CONSTRAINTS / INVARIANTS
Things that must remain true.
PREFERENCES
Desired qualities or trade-offs that are not hard constraints.
CANDIDATE MECHANISMS
Solutions the user mentioned. NON-BINDING unless explicitly locked.
NON-GOALS / EXCLUSIONS
Things explicitly or implicitly outside this change.
UNKNOWNS
Questions whose answers could materially change product behavior or architecture.Preserve the user's terminology when it carries meaning. Do not flatten nuanced language into generic requirements jargon.
Reflection gate
If interpretation is materially uncertain, reflect before interrogating:
- State the underlying goal in your own words.
- Separate outcomes from mechanisms you think the user merely suggested.
- State the important constraints/non-goals you inferred.
- Name the one or two uncertainties that could change the solution.
- Ask the user to correct the read.
Do not combine this with a long questionnaire. Wait for correction when the ambiguity is consequential.
If the request is already clear, this gate can remain internal.
3. Surface assumptions instead of outsourcing archaeology to the user
For each material uncertainty that code inspection can partially resolve, create an assumption:
ASSUMPTION: <specific claim>
EVIDENCE: <files/tests/docs/behavior that support it>
IF WRONG: <concrete consequence for the design>
CONFIDENCE: high | medium | lowRead more before settling for low confidence.
Ask the user only when:
- the decision is genuinely product-owned rather than codebase-owned, and
- getting it wrong would materially change behavior, scope, data semantics, or architecture.
When asking, lead with your recommended interpretation and why, then give the real alternatives. Do not ask generic checklist questions.
4. Architecture Reconciliation Gate
Run this gate before proposing implementation for any non-mechanical change.
A. State the new information
What did this request, requirement, or bug teach us about the domain/system that the existing design may not have represented?
B. Counterfactual design test
Ask:
If this requirement had existed when this subsystem was originally designed, would we have designed it differently?
If no, explain briefly why the current abstraction naturally accommodates it.
If yes, describe what the subsystem should look like given what is now known before deciding how to modify the current code.
C. Generate alternatives before anchoring
For structural changes, consider at least two materially different approaches. When useful, include:
- Local/additive: preserve the current model and add the behavior.
- Reconciled/refactor: reshape the existing abstraction so old and new behavior share one coherent model.
- Subtractive/replacement: delete or replace an abstraction/path that no longer represents the domain correctly.
Do not manufacture three options when only one is sensible, but do not accept the first plausible patch without considering a structural alternative.
D. Accretion audit
Before choosing, explicitly check whether the proposed approach would create any of these:
- another path for the same concept
- duplicated state or source of truth
- a guard that merely prevents an invalid state from surfacing
- a boolean/enum branch that records a historical exception rather than a domain concept
- an adapter around an abstraction that should instead change
- a second helper/service/model for an existing responsibility
- compatibility code with no retirement condition
- an old implementation that becomes obsolete but remains reachable
- ownership split across layers
- a new abstraction whose only purpose is to avoid touching existing code
If yes, treat that as evidence in favor of reconciliation rather than accepting the complexity automatically.
E. Select the smallest coherent design
Choose the design that best represents the domain after this change, not the design requiring the fewest edited lines.
State explicitly:
- what remains
- what changes responsibility
- what is generalized or merged
- what becomes obsolete and should be deleted
- what compatibility behavior, if any, temporarily remains and its retirement condition
If you choose the additive approach, say why it is genuinely coherent rather than merely cheaper.
5. For bugs: Root-Cause Gate
Before changing production behavior, write a compact reasoning checkpoint:
SYMPTOM
Exact observed failure.
HYPOTHESIS
X causes Y because Z. Must be falsifiable.
MECHANISM
The causal path from root condition to symptom.
CONFIRMING EVIDENCE
Direct observations, not inference alone.
FALSIFICATION TEST
What observation would prove this hypothesis wrong?
COMPETING CAUSES
At least one plausible alternative when the evidence is not decisive.
FIX RATIONALE
Why the proposed change removes/prevents the cause rather than hiding the symptom.
BLIND SPOTS
What remains untested or uncertain?Do not proceed with a production fix until the mechanism is understood well enough to explain why the fix works. If evidence is insufficient, reproduce, instrument, bisect, minimize, compare working/failing cases, or trace backwards first.
Prefer a failing regression test that captures the defect before fixing it when practical.
6. Define the change contract
Turn the reconstructed intent and architecture decision into a small contract.
WHY
The underlying problem/outcome.
OUTCOMES
O-1 ... observable result
O-2 ... observable result
INVARIANTS
I-1 ... behavior/data/ownership property that must remain true
EXCLUSIONS
X-1 ... work or behavior intentionally not changed
STRUCTURAL CONSEQUENCES
Files/concepts/paths to move, merge, generalize, retire, or delete because of this change.
PROOF
Tests, reproductions, walkthroughs, or measurements that demonstrate the outcomes and invariants.A refactor required to make the new model coherent belongs in STRUCTURAL CONSEQUENCES and is therefore inside scope. This avoids the false choice between "no drive-by refactors" and "bolt another path on."
Before implementation, check:
Could two competent engineers implement this contract independently and produce materially different behavior or architecture?
If yes because of an unresolved product judgment, clarify it. If yes only because of implementation details that do not matter, leave those to engineering judgment.
7. Plan goal-backward
Work backwards from the contract:
- What must be true for each outcome?
- What artifacts/state must exist for those truths?
- What wiring/ownership relationships must connect them?
- What existing artifacts become unnecessary?
- Where is the design most likely to fail or fork into parallel behavior?
For cross-layer work, prefer a thin production-quality end-to-end tracer that proves the architecture before expanding it. Functionality can be incomplete in the tracer; the architectural path must be real.
For risky refactors, characterize existing behavior first. Preserve externally required behavior with tests/fixtures while changing internals.
8. Implement without plan-preservation bias
During implementation:
- Follow the contract, not the original wording of the prompt.
- Reuse healthy existing concepts; do not clone patterns merely because they exist.
- Prefer modifying the owning abstraction over creating a neighboring workaround.
- Remove superseded code as part of the same coherent change when safe.
- Keep temporary compatibility paths explicit and bounded.
- Keep tests close to changed behavior and invariants.
Re-plan trigger
Stop implementation and return to the Architecture Reconciliation Gate if you discover:
- the chosen abstraction needs repeated exceptions
- you need a second source of truth
- a supposedly local change spreads unexpectedly
- a new wrapper exists only to avoid changing ownership
- a test can pass only by preserving contradictory behavior
- code inspection disproves a material assumption
Do not solve these discoveries by adding another patch to preserve the current plan.
9. Independent coherence review
After behavior works, run a separate review pass. Use a fresh subagent/context when the harness supports it; otherwise deliberately switch roles and reread the diff plus affected surrounding code.
The review is not "does it compile?" It asks whether the system now tells one coherent story.
Check:
- Does the implementation satisfy the underlying GOAL, not merely the literal prompt?
- Did any candidate mechanism accidentally become a requirement?
- Is there now more than one representation/path/source of truth for the same concept?
- Did we add a guard where an invariant should make the bad state impossible?
- Did we introduce an abstraction that mainly protects old architecture from change?
- What existing code became obsolete?
- Can any new code be deleted by changing/generalizing existing code instead?
- Are responsibilities and ownership clearer after the change?
- If we had known this requirement from day one, would this resulting architecture look reasonable?
- Can a future agent safely modify this area without knowing the historical sequence of patches?
- Are all structural consequences in the contract actually completed?
- Are there unrelated changes that should be reverted?
Do not reward deletion for its own sake. The criterion is conceptual simplicity and one coherent model.
If the review finds architectural accretion, fix it before declaring the task complete.
10. Verify and report
Verify:
- each O-N outcome
- each I-N invariant
- original bug reproduction, when applicable
- adjacent behavior affected by changed ownership/wiring
- regression suite/typecheck/lint/build as appropriate
- no unexpected side effects beyond the contract
- obsolete paths identified for deletion are actually gone, or have an explicit evidence-based retirement condition
Report completion in terms of:
- Intent satisfied — what underlying goal is now true.
- Architecture decision — why this model was chosen.
- Subtractive work — what was removed/merged/simplified, or why none was appropriate.
- Evidence — tests/reproductions/verification performed.
- Residual uncertainty/debt — only concrete remaining items, not speculative cleanup.
Fast path
For an explicit mechanical task, do this internally before editing:
1. Intent: What observable outcome is actually requested?
2. Fit: Does the existing owning abstraction naturally support it?
3. Cause: If bug, do I know the mechanism rather than only the symptom?
4. Accretion: Am I about to add a parallel path/guard/helper instead of changing the owner?
5. Obsolescence: Will this make any existing code unnecessary?All five have clean answers -> implement and verify without ceremony.
Any uncomfortable answer -> switch to the full workflow.
Anti-patterns
Never:
- translate the user's brainstorming directly into a task list
- lock a solution merely because the user mentioned it first
- ask the user how the codebase works before reading it
- make "follow existing patterns" an unconditional rule
- create a compatibility wrapper with no removal condition
- accept passing tests as proof of correct architecture
- fix repeated symptoms with escalating guards
- preserve dead code "just in case"
- perform broad unrelated cleanup under the banner of coherence
- continue implementing after discovering the plan's model is wrong
Core heuristic
When choosing between two valid implementations, prefer the one for which this statement is most true:
After the change, a new engineer can understand the system from its present domain model without needing to know the historical sequence of feature requests and bug reports that produced it.
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.

