agentleFS
Diviner-DojoDiviner-Dojo/agent_framework_template/.claude/skills/searching-prior-art/SKILL.md

searching-prior-art

Skill4 starsChanged 3 months agoApache-2.0View on GitHub

Grep-before-you-build checklist for finding existing solution paths, known-broken approaches, ADRs, and promoted patterns before implementing. Use during /plan (prior-art lookup) and /build_module (pre-build enrichment), or whenever deciding how to implement something new.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before implementing any non-trivial feature, module, or integration:

    line 13
  2. Distinctive:

    When a developer asks "how should we implement X?"

    line 16
  3. Distinctive:

    Search these locations in order:

    line 20
  4. Very specific:

    Look for ## Solution Paths sections in project profiles.

    line 26
  5. Very specific:

    Check the ## Known-Broken Approaches section.

    line 32
  6. Distinctive:

    Check if an architectural decision already covers this problem space.

    line 38
  7. Distinctive:

    Check if a promoted pattern addresses this need.

    line 44
  8. Distinctive:

    Known-broken approach found: Do not use that approach. Document why you're using an alternative.

    line 91

≈ “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

Pre-Build Search: Grep Before You Build

Before building something new, check if a solution path already exists in the knowledge base. This prevents reinventing approaches that have already been tried, validated, or rejected.

When This Rule Activates

Before implementing any non-trivial feature, module, or integration:

  • During /plan (Step 1.5: Prior Art Lookup)
  • During /build_module (Step 2.5: Pre-Build Enrichment)
  • When a developer asks "how should we implement X?"

What to Search

Search these locations in order:

1. Solution Paths (memory/projects/)

grep -ri "<domain keyword>" memory/projects/

Look for ## Solution Paths sections in project profiles. These document HOW projects solved specific problems — what was tried, what failed, and why the chosen approach won.

2. Known-Broken Approaches (memory/bugs/regression-ledger.md)

grep -i "<approach keyword>" memory/bugs/regression-ledger.md

Check the ## Known-Broken Approaches section. If an approach has been tried and found broken, don't repeat the mistake.

3. ADRs (docs/adr/)

grep -ri "<concept>" docs/adr/

Check if an architectural decision already covers this problem space.

4. Existing Patterns (memory/patterns/)

grep -ri "<pattern keyword>" memory/patterns/

Check if a promoted pattern addresses this need.

5. Captured Findings (metrics/evaluation.db)

Query non-noise findings by category or keyword to surface what prior reviews flagged:

import sqlite3
conn = sqlite3.connect("metrics/evaluation.db")
try:
    rows = conn.execute("""
        SELECT severity, category, summary, discussion_id
        FROM findings
        WHERE is_noise = 0
          AND (category LIKE '%<keyword>%' OR summary LIKE '%<keyword>%')
        ORDER BY created_at DESC
        LIMIT 20
    """).fetchall()
    for r in rows:
        print(f"[{r[0]}] {r[1]}: {r[2]}  ({r[3]})")
except sqlite3.OperationalError:
    # is_noise column absent (pre-migration DB) — retry without filter
    try:
        rows = conn.execute("""
            SELECT severity, category, summary, discussion_id
            FROM findings
            WHERE category LIKE '%<keyword>%' OR summary LIKE '%<keyword>%'
            ORDER BY created_at DESC LIMIT 20
        """).fetchall()
        for r in rows:
            print(f"[{r[0]}] {r[1]}: {r[2]}  ({r[3]})")
    except sqlite3.OperationalError:
        print("[info] findings table not available — skip")
conn.close()

6. Discussion Transcripts (discussions/)

Full-text search across all sealed discussion transcripts:

grep -ril "<keyword>" discussions/*/transcript.md

This surfaces discussions where the topic was debated, even if no finding was extracted.

How to Use Results

  • Solution path found: Reference it in your plan or build. Explain why you're following or diverging from the documented path.
  • Known-broken approach found: Do not use that approach. Document why you're using an alternative.
  • No results found: Proceed normally. After implementation, capture the solution path via the commit protocol (Step 3.5).

What This Rule Does NOT Do

  • It does not block builds if no prior art is found — absence of prior art is normal for novel work.
  • It does not require exhaustive search — a quick grep is sufficient. If the first 2-3 searches yield nothing, move on.
  • It does not replace architectural review — prior art informs decisions, it doesn't make them.

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.