constraint-then-solve
Skill1 starsChanged 23 days agoMITView on GitHub
Before solving, restate the problem, list unknowns, and catalog every
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .gemini/AGENTS.mdAGENTS.md
- .cursor/rules/agent-foundry-orchestrator.mdcCursor rule
- .cursor/rules/agent-foundry-skills.mdcCursor rule
- web/llms.txtllms.txt
- anti-slopSkill
- api-designSkill
- automation-pickSkill
- bottleneck-gatingSkill
- budget-guardSkill
- cache-identitySkill
- context-optimizationSkill
- cron-troubleshootSkill
- e2e-test-strategySkill
- engram-routingSkill
- execution-observabilitySkill
- fallback-model-routingSkill
- feedback-loopSkill
- judge-integritySkill
- knowledge-extractSkill
- landscape-firstSkill
- measure-firstSkill
- plan-before-codeSkill
- plan-then-actSkill
- prompt-disciplineSkill
- pushback-when-wrongSkill
- quality-protocolSkill
- read-before-buildSkill
- re-verify-findingsSkill
- session-closeoutSkill
- session-distillSkill
- show-your-workSkill
- structured-output-contractSkill
- verify-firstSkill
- workflow-decomposeSkill
- agent-memory-vaultSkill
- agent-team-standardsSkill
- autonomous-briefingSkill
- book-to-skillSkill
- chrome-devtools-mcp-bridgeSkill
- design-languageSkill
- funnel-pr-guardSkill
- persistent-memorySkill
- sql-migration-trioSkill
- token-compressionSkill
The file
Files
Constraint Then Solve
Reasoning fails when the solver answers a different problem than the one asked. Restate the problem, separate hard from soft constraints, then solve.
Procedure
1 - Restate the problem
One short paragraph: goal, known context, unknowns, assumptions. If the request is unambiguous, the restatement can be a sentence.
2 - State the unknowns
Name what you do not have and what you will infer. Example: "I do not have the production schema; I infer the column from the migration." Do not silently fill a gap with a confident guess.
3 - Catalog constraints
Number them and mark each hard or soft:
Hard:
1. Must run on Python 3.10.
2. Must not change the public response shape.
Soft:
3. Prefer fewer dependencies.Hard constraints can fail the solution. Soft constraints trade off against each other and must be named as tradeoffs.
4 - Derive requirements
State what the solution must satisfy, derived from the catalog. This catches a constraint that the obvious solution violates.
5 - Solve
Generate the smallest solution that satisfies the hard constraints. If a soft constraint is violated, say which one and why.
6 - Verify each constraint
Mark every item pass, fail, or unverified, with the evidence. A solution that passes the tests but violates a hard constraint is not done.
When to Use
- Ambiguous requests with costly wrong assumptions
- Compatibility or migration work
- Debugging before choosing a fix
- Any decision where constraints conflict
Anti-patterns
- Solving before listing the constraints.
- Treating a preference as a hard requirement.
- Hiding an unverified assumption inside confident prose.
- Declaring success after checking only the easy constraints.
- Adding style rules about how the reasoning must be phrased.
Verification Checklist
- The problem is restated in one short paragraph.
- Unknowns and inferred assumptions are explicit.
- Constraints are numbered and marked hard or soft.
- Every hard constraint is marked pass, fail, or unverified.
- Any violated soft constraint is named as a tradeoff.
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.

