agentleFS
scottwaterscottwater/skills/skills/why/SKILL.md

why

Skill2 starsChanged 2 months agoMITView on GitHub

Investigate why code or a design decision exists. Use for rationale, rejected alternatives, regressions, postmortems, historical constraints, and evidence-backed thresholds; use how for runtime behavior.

112 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use addskill, apply-firmware and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ryanportfolioSkill

    addskill

    Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.

    Also in 6 projects that use this

  • ryanportfolioSkill

    apply-firmware

    Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.

    Also in 6 projects that use this

  • +10 more from ryanportfolio

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 14 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 106 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use open files, recent edits, and conversation context to interpret a vague referent.

    line 22
  2. Distinctive:

    Treat the user's suggested explanation as a hypothesis to test.

    line 24
  3. Distinctive:

    Use an available forge client or API to read review descriptions and discussion.

    line 39
  4. Distinctive:

    Read references/source-playbook.md, then load only the playbook for each available category.

    line 57
  5. Very specific:

    Search every available connector by default, including multiple connectors in one category when they hold distinct records.

    line 59
  6. Distinctive:

    Complete when: every discovered connector has a search plan or a specific status reason, and all seven categories appear in the ledger even …

    line 61
  7. Distinctive:

    Search connectors concurrently when independent read-only agents are available.

    line 65
  8. Distinctive:

    Use references/investigator-prompt.md as the lane contract.

    line 67
  9. Distinctive:

    search broadly, then narrow.

    line 71
  10. Distinctive:

    read complete relevant items and their discussion.

    line 72
  11. Distinctive:

    Complete when: every planned category returns cited evidence, a documented null result, or a named access gap.

    line 79
  12. Distinctive:

    Read references/epistemics.md and references/synthesizer-prompt.md.

    line 83
  13. Distinctive:

    Complete when: every rationale claim has a confidence tier, tier-appropriate phrasing, and adjacent evidence or an explicit gap.

    line 95
  14. Distinctive:

    Use this structure, omitting only sections that truly have no content:

    line 99
  15. Distinctive:

    When the investigation precedes a code change, add a concise constraint set:

    line 112

“Common” is measured: kept by at least 6 in 10 of the 106 edited versions of this file we could read. “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

Why

Recover the forces that shaped code from historical evidence. Separate documented intent from supported inference, plausible hypotheses, and unknowns.

Code is evidence of mechanics, not motivation. Motivation may live in source history, reviews, tickets, documents, team discussions, incidents, telemetry, or product data.

Investigation workflow

1. Frame the question

Identify:

  • the target code, pattern, feature, or decision;
  • the specific rationale the user wants;
  • any hypothesis embedded in the question.

Use open files, recent edits, and conversation context to interpret a vague referent. State the interpretation so the user can redirect it. Ask only when different interpretations would require materially different investigations.

Treat the user's suggested explanation as a hypothesis to test.

Complete when: the target and question are precise enough to define relevant evidence.

2. Build the code anchor

Record the relevant paths and lines, key symbols, last-touch commits, earlier history through renames, and linked reviews or tickets. Useful starting commands include:

git blame -L <start>,<end> <file>
git log --follow -p -- <file>
git log --oneline -20 -- <file>
git log -1 --format=%B <commit>

Use an available forge client or API to read review descriptions and discussion. Do not assume a particular forge or tool is installed.

Capture paths, symbols, commits, review IDs, ticket IDs, dates, authors, and search terms for reuse across sources.

Complete when: an investigator can search another system without rediscovering what code and time window the question concerns.

3. Build the coverage map

Discover the repository and external read-only connectors available in the current runtime. Create one ledger entry per connector, then map each entry to an evidence category:

  1. source control and code review;
  2. issue or ticket tracking;
  3. long-form documents;
  4. real-time team discussion;
  5. infrastructure observability and incidents;
  6. error or exception tracking;
  7. product analytics or warehouse data.

Read references/source-playbook.md, then load only the playbook for each available category. Tool names and schemas come from the runtime, not this skill.

Search every available connector by default, including multiple connectors in one category when they hold distinct records. Mark each ledger entry searched, unavailable, inaccessible, or inapplicable, with a reason and scope. A category may be inapplicable only when the target cannot enter it by construction.

Complete when: every discovered connector has a search plan or a specific status reason, and all seven categories appear in the ledger even when no connector is available.

4. Investigate each source

Search connectors concurrently when independent read-only agents are available; otherwise search them sequentially. Use one bounded lane per connector, combining connectors only when they expose the same records and query vocabulary. The method must not depend on a particular agent provider, model, or runner configuration.

Use references/investigator-prompt.md as the lane contract. Pass the question, code anchor, category playbook, and any cross-cutting incident angle. Investigators gather evidence rather than answer the question.

For each source:

  • search broadly, then narrow;
  • read complete relevant items and their discussion;
  • capture exact quotations with stable citations when wording matters;
  • record queries, time ranges, null results, contradictions, and access limits;
  • pass cross-source leads to the matching category rather than silently changing scope.

A null result becomes useful evidence only when the search that produced it is documented.

Complete when: every planned category returns cited evidence, a documented null result, or a named access gap.

5. Synthesize with calibrated confidence

Read references/epistemics.md and references/synthesizer-prompt.md. Synthesize directly or delegate to one read-only synthesizer with access to all findings and the code anchor.

Classify each claim:

  • Direct: a source explicitly states the rationale.
  • Supported: multiple indirect sources converge.
  • Inferred: a reasonable interpretation with a visible inference chain.
  • Speculative: a plausible hypothesis with thin or competing evidence.
  • Unknown: the search did not answer the question.

Spot-check citations before presenting them. Surface contradictions instead of resolving them for narrative neatness. Preserve confidence language during any final edit.

Complete when: every rationale claim has a confidence tier, tier-appropriate phrasing, and adjacent evidence or an explicit gap.

6. Present the lineage

Use this structure, omitting only sections that truly have no content:

  1. Question
  2. Code anchor
  3. Direct and supported findings
  4. Reasonable inferences
  5. Competing hypotheses
  6. Unknowns and gaps
  7. Sources consulted
  8. Confidence summary

For each source, state what was searched and what was found, including null results and skip reasons. A reader should be able to verify a cited claim quickly and judge the investigation's coverage.

When the investigation precedes a code change, add a concise constraint set:

  • Preserve: behavior or rationale still supported by evidence.
  • Change: assumptions the evidence shows are obsolete.
  • Avoid: rejected paths whose failure still applies.
  • Risk: gaps or uncertainty the plan must protect against.

Complete when: the answer distinguishes knowledge from inference, exposes the search boundary, and leaves the user with verifiable evidence rather than a plausible story.

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.