discern
Skill1 starsChanged 4 months agoMITView on GitHub
Product Discernment — run a 4ds spec's Product Discernment & Diligence checklist against a code change — a task's diff, a branch (e.g. from a Coding-type /4ds:delegate worktree run), specific files, or the current uncommitted diff. Works on code you wrote yourself too, not just Claude's output. Distinct from Process Discernment (process-reviewer, runs automatically after coder/writer) and Performance Discernment (delegate's check-in). Explicit-invocation only.
In this repository4 other files it gives its agents.
- brainstormSkill
- codeSkill
- delegateSkill
- refineSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Very specific: line 35
If diff was requested and there turn out to be no uncommitted changes, say so and ask what they actually meant (e.g.
- Distinctive: line 49
If neither exists (e.g. reviewing hand-written code with no prior delegation), that's fine — say so explicitly in the brief below rather …
- Very specific: line 55
Use the Agent tool to invoke the 4ds:code-reviewer subagent with:
- Distinctive: line 77
Ask the user explicitly whether they want the spec's checklist checkboxes updated based on these findings — e.g.
- Distinctive: line 81
If they say yes, work out with them exactly which existing checklist bullets should be checked (their call which findings count as …
- Distinctive: line 88
Never mark the Definition of Done, or the overall Status, based on a review — that stays entirely the user's call.
≈ “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
You are running the 4ds discern workflow. This exists to support the
user's own Discernment — it never renders a verdict on their behalf, and
it works equally well on code the user wrote by hand, not just code
produced via a Coding-type /4ds:delegate run.
Step 1 — Resolve the spec
Find specs/<spec-name>.md (the spec name comes from $ARGUMENTS). If missing, say so and
offer to list specs/*.md. Read it to get the full Discernment &
Diligence Checklist (all 10 categories with whatever bullets already exist)
plus enough Goals/Non-Goals/Approach/Task-Breakdown context to hand to the
code-reviewer.
Step 2 — Resolve the target
The [target] argument, if given, is one of:
diff(or omitted) — the current uncommitted changes.- A branch name — most commonly the branch a Coding-type
/4ds:delegaterun reported back (its coder agent works in its own worktree/branch, so this is the normal way to review that output). Resolve viagit diff <base>...<branch>against the repo's usual base branch. - A task reference from the spec's Task Breakdown table — check its Revision History entry for a branch name recorded by a prior Coding delegation; if none is recorded, ask the user which branch/files/commit range to review for that task rather than guessing.
- A comma-separated file list.
If diff was requested and there turn out to be no uncommitted changes,
say so and ask what they actually meant (e.g. a branch name or commit
range) rather than sending an empty target to the code-reviewer.
Step 3 — Gather an AI self-report to cross-check, if one exists
The checklist's first category (Spec conformance & AI self-report accuracy) needs something to cross-check claims against. Look for:
- A coder-agent report still visible earlier in this same conversation, if
this discern run immediately followed a Coding-type
/4ds:delegaterun — pass it in full. - Otherwise, the Revision History row(s) for the relevant task in the spec itself (recorded by a prior Coding delegation — files changed, blockers, branch name).
- If neither exists (e.g. reviewing hand-written code with no prior delegation), that's fine — say so explicitly in the brief below rather than omitting the field.
Step 4 — Invoke the code-reviewer agent
Use the Agent tool to invoke the 4ds:code-reviewer subagent with:
Spec: specs/<spec-name>.md
Checklist: <the 10 categories and their existing bullets, verbatim>
Context: <relevant Goals/Non-Goals/Approach/Task-description excerpts>
AI self-report to cross-check: <the coder report or Revision History row(s) found in Step 3, or "none available">
Target: <resolved diff / branch / files / commit range>Step 5 — Relay the findings
Show the code-reviewer's full structured report to the user, unedited — all 10 category headings, findings with severity/confidence labels and file/line references, and the neutral summary count. Do not add your own verdict on top of it. Draw the user's attention to the Spec conformance & AI self-report accuracy section specifically if it has findings — that's the category most likely to catch the AI having overclaimed or drifted from what was actually asked.
Step 6 — Offer to update the checklist (confirmed action only)
Ask the user explicitly whether they want the spec's checklist checkboxes updated based on these findings — e.g. "Want me to check off the items these findings addressed?" Never do this automatically or silently.
If they say yes, work out with them exactly which existing checklist
bullets should be checked (their call which findings count as
"addressed" — don't auto-derive this from severity labels). Then use the
Agent tool to invoke 4ds:spec-writer with MODE: cell-update,
listing the specific bullets to check off, plus a Revision History row
noting the review was run and which categories' checkboxes were updated.
Never mark the Definition of Done, or the overall Status, based on a review — that stays entirely the user's call.
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.

