signal-first-plan
Skill3 starsChanged 8 days agoMITView on GitHub
Signal-first planning before you build a feature. Lists every exit the feature's data leaves through, puts a countable signal on each, and checks the signals against main. Use when the user asks to build, add or change behaviour that ships to users or other systems. Skip it for questions, explanations, bug hunts, refactors with no behaviour change, and copy or style edits.
In this repository7 other files it gives its agents.
- debugging-by-constraintsSkill
- debug-retroSkill
- deeperSkill
- defendSkill
- higherSkill
- leonardoSkill
- widerSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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 29
Write the expected value for every case the feature splits on: each type of viewer, each input class, each config value.
- Distinctive: line 47
Prefer a test that reaches the exit the way a client does and asserts the signal.
- Distinctive: line 48
When only production can show the signal (latency, call counts at real scale), emit it where the stack already logs or measures.
- Distinctive: line 50
Run the checks on main. A check for new behaviour fails there.
- Distinctive: line 58
After you build, run every check on main and on the branch.
- Distinctive: line 61
Before you commit, list every file in the diff.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Signal-first plan
Before you build, decide how you will see that the feature works and how you will see that it broke. A feature breaks at its exits: the places where its data or behaviour leaves the process. Name every exit, put one signal on each, and make every signal checkable before you write the feature.
A small change can have one exit. Then the plan is one row.
Step 1: List the exits
An exit is any place where the feature's data or behaviour leaves the process:
- responses: rendered pages, page data, API bodies, redirects, status codes
- messages: emails, webhooks, notifications, feeds, sitemaps, badges, embeds
- outbound calls: HTTP, DNS, queues, third-party APIs
- writes: database rows, files, caches, logs
Trace exits from the data, not from the files you plan to change. Start at each table, column, flag or config value the feature reads or changes. Follow every query, controller, route and job that reads it, out to the place where it leaves the process. A reader you did not plan to touch is still an exit.
Done when every reader of the touched data is in the list as an exit, or is marked internal with a reason.
Step 2: Put one signal on each exit
A signal is a number that a broken version changes: DNS lookups per request, rows written per job, payment API calls per checkout, emails sent per signup.
- Write the expected value for every case the feature splits on: each type of viewer, each input class, each config value.
- On a response exit, count over the whole body the client receives (the serialized page data or JSON), not over the one field you expect to carry the data. A leak sits in the field nobody planned for.
- A number that the working and the broken version share is noise. Pick another.
- Aggregates such as p99 and error rate are weak, because many causes move them. Prefer a count tied to one exit.
/debug-retrokeeps the signals that past bugs in this project needed in a store file outside the repo. When the file exists, read it with this block, run as written. Each signal in it that touches an exit of this feature becomes a check in Step 3.key=$(git remote get-url origin 2>/dev/null | sed -E 's#^[a-z+]+://##; s#^[^@/]*@##; s#:[0-9]+/#/#; s#:#/#; s#\.git$##; s#/$##; s#\.\.#_#g' | tr 'A-Z' 'a-z') [ -n "$key" ] || key=$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null | sed 's#/\.git$##') [ -n "$key" ] || key=$(pwd -P) store="$HOME/.sharper-skills/${key#/}" cat "$store/debug-layers.md" 2>/dev/null || echo "No store file yet."
Done when every exit has a signal and an expected value for every case.
Step 3: Make every signal checkable
- Prefer a test that reaches the exit the way a client does and asserts the signal. One test can loop over many exits and cases.
- When only production can show the signal (latency, call counts at real scale), emit it where the stack already logs or measures. A later debug session then finds it at layer 1.
- Emit each signal with the fields that let a later question be asked without a new deploy: the request or job id, the input class, the exit, the count. An aggregate alone answers only the question you planned.
- Run the checks on main. A check for new behaviour fails there. A check for behaviour the feature must keep passes there. If a keep check fails on main, the bug already exists: report it to the user before you build on top of it.
Done when every signal has a test or an emitted metric, and you know which checks pass on main.
Show the user the plan as a table, then build: exit, signal, expected value per case, check (test name or metric), result on main.
Step 4: Compare before merge
- After you build, run every check on main and on the branch.
- List each signal that changed. Every change must be one the plan expected. Fix any other change before merge.
- For a signal that only production or pre-production can show, compare the canary population against the control population at the same time, broken down by population, when the rollout gives you one. A before-and-after comparison of one population against its previous successful run is the fallback; time of day and load move it, so say so in the PR. Check the control against its own baseline too, because a bad canary can hurt the control it is compared with. Never an absolute threshold alone, and not only pass or fail. This applies to every signal in the plan, including the ones taken from the store file. The copyconstruct post's DNS lookup count differed from the previous successful run even at pre-production scale, so this check would have caught that bug before production.
- Before you commit, list every file in the diff. Generated files, such as test screenshots and attachments, stay out unless the plan named them.
- In the PR, give the exit table and the comparison.
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.

