agentleFS
AbilityaiAbilityai/cornelius/.claude/skills/detect-tensions/SKILL.md

detect-tensions

Skill109 starsChanged 38 days agoMITView on GitHub

Detect productive contradictions between notes - high semantic similarity with opposing conclusions that represent synthesis opportunities

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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
  1. Distinctive:

    Keep only pairs that assert genuinely opposing conclusions about the same question.

    line 51
  2. Very specific:

    Check tension_count for total tracked tensions.

    line 62
  3. Very specific:

    Treat these as candidate tension edges regardless of the detector's similarity score.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Detect Productive Tensions

ℹ️ First, set expectations: before anything else, print one short line with this skill's version and its most recent change - the top entry of metadata.changelog above - e.g. detect-tensions vX.Y - recent: <summary>. Then proceed.

Scans the knowledge base for productive contradictions: note pairs with high semantic similarity but opposing conclusions. These tension zones are where the most valuable articles and frameworks emerge.

State Dependencies

SourceLocationReadWriteDescription
Enrichmentsresources/brain-graph/data/graph_enrichments.json✓✓Tension records saved
FAISS Indexresources/local-brain-search/data/brain.faiss✓Similarity search
Metadataresources/local-brain-search/data/brain_metadata.pkl✓Note content

Process

Step 1: Run tension detection

Default thresholds (similarity > 0.75, divergence > 0.3). These are graph-space (chunk-to-chunk) numbers and are NOT comparable to the scores /recall or /search-vault print - see resources/local-brain-search/SIMILARITY-CALIBRATION.md. Fixed 2026-09-02 (v1.3): the detector now queries with each note's first meaningful chunk instead of its first chunk (bare frontmatter for 83% of notes) - before that it returned nothing usable for 3 in 4 of those notes, and the graph rebuild did not help because tension.py picks its chunk itself. Expect the candidate set to change shape on the first post-fix scan, and treat pairs tracked before 2026-09-02 as suspect (see SIMILARITY-CALIBRATION.md -> Trap 3):

cd $PROJECT_ROOT/resources/brain-graph
../local-brain-search/venv/bin/python cli.py tensions

Broader search (more results, lower quality):

../local-brain-search/venv/bin/python cli.py tensions --similarity 0.70 --divergence 0.2

Step 2: Filter false positives, then present synthesis opportunities

The raw count is dominated by false positives - discard them before presenting:

  • Boilerplate / near-duplicate pairs. The signature is high similarity with maximal divergence (e.g. sim ≈ 1.00, divergence ≈ 1.00), and pairs where both notes are changelogs, registries, or near-identical restatements of one principle. These are detector artifacts, not contradictions.

Keep only pairs that assert genuinely opposing conclusions about the same question. For each surviving tension, explain:

  • What the two notes assert
  • Why they contradict
  • What synthesis opportunity exists (article topic, framework potential)

Step 3: Track existing tensions

../local-brain-search/venv/bin/python cli.py status --json

Check tension_count for total tracked tensions.

Step 4: Probe for cross-vocabulary tensions the detector cannot see

The detector pairs notes by cosine similarity (floor ~0.70, measured note-to-note in graph space - not the query space that /recall reports, see resources/local-brain-search/SIMILARITY-CALIBRATION.md) and scores opposition with a keyword heuristic (negation vs. assertion words). It is therefore structurally blind to the most valuable tensions: genuine contradictions are usually cross-vocabulary - two frameworks reaching opposite conclusions in different language - which fall BELOW the similarity floor and read too assertively for the keyword check. A thin or empty result does NOT mean no tensions exist; this tool surfaces candidates, it does not certify absence.

Compensate by manually checking known opposing-framework pairs even when they score below threshold, e.g.:

  • loss aversion (prospect theory) ↔ ergodicity / Kelly (bias vs. correct policy)
  • Bayesian/Brier "assign a probability" ↔ "There Is No Bayesian Dial" / radical uncertainty
  • heuristics-and-biases ↔ ecological / evolutionary rationality
  • expert failure as psychological ↔ expert failure as structural

Treat these as candidate tension edges regardless of the detector's similarity score.

Root-cause fix (code, out of scope for this playbook): durable precision needs resources/brain-graph/tension.py to replace the keyword stance heuristic with an LLM stance-classifier on a shared proposition, lower the similarity floor with theme/MOC-anchored cross-cluster pairing, and exclude index/changelog-layer nodes from the scan.

Key Principle

Tensions are features, not bugs. The system NEVER auto-resolves tensions. It surfaces them as the most productive intellectual territory in the vault.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.