agentleFS
viksantviksant/swe-skills/skills/battle-tested-patterns/SKILL.md

battle-tested-patterns

Skill4 starsChanged 5 months agoMITView on GitHub

Verifies architectural decisions against battle-tested patterns from AOSA (Architecture of Open Source Applications). Use when: user proposes new architecture, says "design pattern", "best practice", "how is this done in production", "architecture decision", "AOSA". NOT for: simple code changes, bug fixes, or refactoring without architectural impact.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    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. Very specific:

    Read agents/references/aosa-patterns-index.txt and match:

    line 65

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

Battle-Tested Pattern Verification

The Iron Law: Every architectural decision MUST have precedent in production open-source software. "It works in theory" is NEVER sufficient. "It works in [Project] at [Scale]" IS.

Why This Skill Exists

Architectural decisions without production precedent carry hidden risk:

  • "Novel approaches" often rediscover known failure modes
  • Blog posts describe aspirational architecture, not battle-tested reality
  • AOSA documents architecture BY the creators who built and maintained it at scale
  • Known anti-patterns save months of debugging in production

When to Activate

TriggerActivation
Proposing new architectural patternsMANDATORY
Evaluating design alternativesMANDATORY
User asks about architecture best practicesRECOMMENDED
Reviewing existing architecture for improvementRECOMMENDED

Verification Protocol

Step 1: IDENTIFY the Decision

Extract the architectural decision being made:

  • What component or system is being designed?
  • What problem is it solving?
  • What are the constraints (scale, latency, consistency)?

Step 2: CLASSIFY the Domain

Map the decision to one or more domains:

DomainKeywords
Concurrencyasync, workers, threads, event-loop, non-blocking
Storagedatabase, persistence, key-value, btree, WAL
Messagingqueue, pub/sub, broker, message-passing, message-queue
Cachingcache, eviction, TTL, distributed-cache, in-memory-store
Multi-tenantnamespace, isolation, schema, tenant, shared-nothing
Distributedreplication, partitioning, consistency, fault-tolerance
Pipelinefilter-chain, stages, transformation, streaming
Plugin/Extensionmodule, hook, extension-point, registry
Connection Managementpool, connection-limit, keepalive, coalescing

Step 3: SEARCH the AOSA Index

Read agents/references/aosa-patterns-index.txt and match:

  • Domain keywords against chapter keywords
  • Problem description against pattern descriptions
  • At least 2 keyword matches required for a CANDIDATE

Step 4: EVALUATE Matches

For each candidate chapter:

RELEVANCE = (keyword_overlap * domain_match * scale_similarity)

If RELEVANCE >= HIGH:
  -> Invoke battle-tested-architect agent for deep analysis
If RELEVANCE == MEDIUM:
  -> Note as supporting evidence, fetch only if primary is insufficient
If RELEVANCE == LOW:
  -> Mention in references, do not fetch

Step 5: VERIFY or FLAG

Apply the verification checklist (below) and produce a verdict.


Verification Checklist

For each architectural decision, verify:

  • Production precedent: Has this pattern been used in a real AOSA-documented project?
  • Scale validation: What load did the original project handle with this pattern?
  • Failure modes documented: Are known failure scenarios identified?
  • Anti-patterns avoided: Are documented anti-patterns explicitly NOT present?
  • Alternatives considered: Were other AOSA patterns evaluated and rejected with reason?

Verdict Scale

VerdictCriteriaAction
VERIFIEDAll 5 checks pass, AOSA evidence strongProceed with confidence
SUPPORTED3-4 checks pass, some gapsProceed with noted caveats
UNVERIFIED1-2 checks passWarn: limited battle-tested evidence
NO PRECEDENT0 checks passFlag: "novel approach" - recommend extra scrutiny

Red Flags (STOP and Warn)

SignalWarning
"This is a novel approach"No battle-tested evidence exists - HIGH RISK
"I read about this in a blog"Blog != production evidence - INSUFFICIENT
"It should work in theory"Theory != production - REJECT without evidence
"Let's try this pattern""Try" implies unproven - require precedent first
No AOSA chapter matches at allDomain may be too niche - acknowledge gap explicitly

Troubleshooting

ProblemCauseSolution
No AOSA matches foundDomain too niche or wrong keywordsBroaden search terms; acknowledge gap explicitly
Match found but irrelevantKeyword overlap without semantic matchVerify RELEVANCE using domain + scale + problem similarity
Agent returns generic adviceChapter not deeply analyzedEnsure battle-tested-architect agent fetches full chapter
User disagrees with AOSA patternDifferent constraints or scaleDocument user's constraints; AOSA is evidence, not mandate

Example Flow

User: "Design a queue-based document processing pipeline"

Step 1: Decision = queue-based pipeline for document processing
Step 2: Domains = messaging, pipeline, async/concurrency
Step 3: Index matches:
  - ZeroMQ (messaging, push-pull, lock-free) -> HIGH
  - Sendmail (queue processing, retry policies) -> HIGH
  - Twisted (async, reactor, deferred) -> MEDIUM
  - nginx (filter-chain pipeline) -> MEDIUM
Step 4: Invoke battle-tested-architect for ZeroMQ + Sendmail chapters
Step 5: Checklist:
  [x] Production precedent: ZeroMQ + Sendmail both production-proven
  [x] Scale: ZeroMQ handles millions msgs/sec, Sendmail handles internet email
  [x] Failure modes: ZeroMQ documents slow subscriber, Sendmail documents queue storms
  [x] Anti-patterns: Unbounded queues, synchronous processing
  [x] Alternatives: Asterisk (rejected - telephony-specific)

Verdict: VERIFIED - Strong battle-tested evidence from multiple sources

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.