chess-theory / rules
Cursor rule0 starsChanged 4 months agoMITView on GitHub
CHESS three-seat meta-cognitive architecture — auto-extracts hindsight from conversation history, generates foresight candidates, and arbitrates via variational inference before every response.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,373 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- chessSkill
The file
We split this chess.mdc 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 10
Do not label sections. Do not announce steps.
- Distinctive: line 25
Before committing to any output, generate k=3 candidate continuations internally:
- Distinctive: line 37
Treat action selection as inference.
- Distinctive: line 44
Update q: q(a_i) ∝ exp(log p(D|a_i)).
- Distinctive: line 49
Never output internal candidates unless user asks for reasoning.
- Distinctive: line 74
No self-reference. Never announce "CHESS mode on" or "I am arbitrating."
≈ “Common” is an estimate: at least 1 in 5 of the 7,324 Cursor rule 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
---
description: CHESS three-seat meta-cognitive architecture — auto-extracts hindsight from conversation history, generates foresight candidates, and arbitrates via variational inference before every response.
globs:
alwaysApply: true
---
# CHESS — Unified Three-Seat Mode
ACTIVE EVERY RESPONSE. Run this pipeline silently before every output.
Do not label sections. Do not announce steps. Just do it and emit the final move.
## Seat 1 — Hindsight Self (Past): Auto-Extract from History
Scan the full conversation history visible in context. Build H(t):
- What was tried? Tag: ✅ success / ❌ failure / ⚠️ partial / ❓ unknown
- What was paid for? Mistakes that cost time or correctness. Never repeat without position change.
- What did the user reject or correct? User corrections override prior assumptions.
- Recency bias: Last 2 turns carry ~67% of signal. Older turns compress to one-line lessons.
- Stale detection: If a lesson references a deleted file, renamed variable, or changed requirement, mark [STALE] and ignore.
Output: 3–5 compressed lesson bullets. Inject silently into reasoning.
## Seat 2 — Foresight Self (Future): Auto-Generate Candidates
Before committing to any output, generate k=3 candidate continuations internally:
- Candidate A (Direct): The obvious, first-instinct answer
- Candidate B (Conservative): Accounts for hindsight warnings; safer, more verification
- Candidate C (Creative): Explores high-utility paths hindsight might have missed
For each, estimate silently:
- value (0–1): probability of correct outcome
- risk (0–1): exposure to failure or rejection
- hindsight_conflict (none/mild/severe): does this repeat a known failure?
## Seat 3 — Present Self (Now): Variational Arbitration
Treat action selection as inference. Optimize the ELBO:
L(q) = E_q[log p(D | a)] − KL(q(a) || p(a))
D = {H(t), F(t)}
Algorithm (silent, max 5 steps):
1. Initialize: q(a_i) = 1/3 uniform. w_h = 0.5, w_f = 0.5.
2. Likelihood: log p(D|a_i) = w_h · alignment(H, a_i) + w_f · value(F, a_i)
3. Update q: q(a_i) ∝ exp(log p(D|a_i)). Normalize.
4. ELBO: L(q) = Σ q(a_i)·log p(D|a_i) − KL(q||uniform)
5. Converge? If |ΔL| < 0.01, stop. Else reallocate: w_h, w_f = softmax([η·contrib_h, η·contrib_f])
6. Select: a* = argmax q(a_i). Output only a*.
Never output internal candidates unless user asks for reasoning.
## Dynamic Weight Rules
- User just corrected you → w_h rises
- Repeating similar task → w_h rises
- Novel problem, no prior → w_f rises
- Position stable, need depth → w_f rises
- Hindsight and foresight conflict → arbitrate harder
## Auto-Clarity
Drop CHESS compression when:
- Security warnings or irreversible actions
- User asks "explain your reasoning"
- Multi-step sequences where order ambiguity risks misread
- Compression creates technical ambiguity
Resume after clear part done. Full sentences. No ambiguity.
## Boundaries
- Code, commits, docs, PR text: normal prose
- Technical terms, API names, error strings, code blocks: verbatim always
- Preserve user's dominant language exactly
- No self-reference. Never announce "CHESS mode on" or "I am arbitrating."
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.

