# Technical Documentation: nibzard/awesome-agentic-patterns

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/nibzard/awesome-agentic-patterns)

### Overview (`README.md`)

# Awesome Agentic Patterns



A curated catalogue of **agentic AI patterns** — real‑world tricks, workflows, and mini‑architectures that help autonomous or semi‑autonomous AI agents get useful work done in production.

> **Why?**
> Tutorials show toy demos. Real products hide the messy bits. This list surfaces the repeatable patterns that bridge the gap so we can all ship smarter, faster agents.

---

## What counts as a pattern?

* **Repeatable** – more than one team is using it.
* **Agent‑centric** – improves how an AI agent senses, reasons, or acts.
* **Traceable** – backed by a public reference: blog post, talk, repo, or paper.

If your link ticks those boxes, it belongs here. Broader product strategy, team habits, and engineering-mindset essays live separately in [`principles/`](principles/README.md) so the pattern catalogue stays strictly technical.

---

## 🌐 Explore the Website

**Visit:** [https://agentic-patterns.com](https://agentic-patterns.com)

The website offers powerful discovery tools beyond this README:

- **Pattern Explorer**: Browse, filter, and search all patterns by category, status, complexity, and more
- **Compare Tool**: Side-by-side comparison of multiple patterns with shared attributes
- **Decision Explorer**: Interactive guide to find the right pattern for your use case
- **Graph Visualization**: Visual map of pattern relationships and connections
- **Pattern Packs**: Curated collections of patterns for common agent architectures
- **Developer Guides**: In-depth documentation on pattern selection and usage
- **Dark Mode**: Full theme support for comfortable reading in any environment

Built with [Astro](https://astro.build), deployed on [Vercel](https://vercel.com), source code in [`apps/web/`](./apps/web/).

---

## Quick Tour of Categories


|  Category                                              |  What you'll find                                         |
| ------------------------------------------------------ | --------------------------------------------------------- |
| [**Context & Memory**](#context-memory)               | Sliding-window curation, vector cache, episodic memory    |
| [**Feedback Loops**](#feedback-loops)                 | Compilers, CI, human review, self-healing retries         |
| [**Learning & Adaptation**](#learning-adaptation)     | Agent RFT, skill libraries, variance-based RL             |
| [**Orchestration & Control**](#orchestration-control) | Task decomposition, sub-agent spawning, tool routing      |
| [**Reliability & Eval**](#reliability-eval)           | Guardrails, eval harnesses, logging, reproducibility      |
| [**Security & Safety**](#security-safety)             | Isolated VMs, PII tokenization, security scanning         |
| [**Tool Use & Environment**](#tool-use-environment)   | Shell, browser, DB, Playwright, sandbox tricks            |
| [**UX & Collaboration**](#ux-collaboration)           | Prompt hand-offs, staged commits, async background agents |


*Categories are fluid — open a PR if you see a better slice!*
The tables below are auto‑generated from the `patterns/` folder.

---





### <a name="context-memory"></a>Context & Memory

- [Agent-Powered Codebase Q&A / Onboarding](patterns/agent-powered-codebase-qa-onboarding.md)
- [Anchored Structured Context Compaction](patterns/anchored-structured-context-compaction.md)
- [Context Budget as a Governed Resource](patterns/context-budget-as-a-governed-resource.md)
- [Context Window Anxiety Management](patterns/context-window-anxiety-management.md)
- [Context Window Auto-Compaction](patterns/context-window-auto-compaction.md)
- [Context-Minimization Pattern](patterns/context-minimization-pattern.md)
- [Cross-Agent Lesson Sharing via Git](patterns/cross-agent-lesson-sharing.md)
- [Curated Code Context Window](patterns/curated-code-context-window.md)
- [Dynamic Context Injection](patterns/dynamic-context-injection.md)
- [Episodic Memory Retrieval & Injection](patterns/episodic-memory-retrieval-injection.md)
- [Filesystem-Based Agent State](patterns/filesystem-based-agent-state.md)
- [Layered Configuration Context](patterns/layered-configuration-context.md)
- [Memory Consolidation, Decay & Contradiction Resolution](patterns/memory-consolidation-decay-contradiction.md)
- [Memory Synthesis from Execution Logs](patterns/memory-synthesis-from-execution-logs.md)
- [Proactive Agent State Externalization](patterns/proactive-agent-state-externalization.md)
- [Progressive Disclosure for Large Files](patterns/progressive-disclosure-large-files.md)
- [Prompt Caching via Exact Prefix Preservation](patterns/prompt-caching-via-exact-prefix-preservation.md)
- [Schema-Guided Graph Retrieval for Multi-Hop Reasoning](patterns/schema-guided-graph-retrieval.md)
- [Self-Identity Accumulation](patterns/self-identity-accumulation.md)
- [Semantic Context Filtering Pattern](patterns/semantic-context-filtering.md)
- [Session-Scoped Context Runtime for Agent Tools](patterns/session-scoped-context-runtime-for-agent-tools.md)
- [Surface-Scoped System Prompt](patterns/surface-scoped-system-prompt.md)
- [Working Memory via Task Tracking](patterns/working-memory-via-todos.md)

### <a name="feedback-loops"></a>Feedback Loops

- [AI-Assisted Code Review / Verification](patterns/ai-assisted-code-review-verification.md)
- [Background Agent with CI Feedback](patterns/background-agent-ci.md)
- [Deterministic Grader in the Loop](patterns/deterministic-grader-in-the-loop.md)
- [Graph of Thoughts (GoT)](patterns/graph-of-thoughts.md)
- [Incident-to-Eval Synthesis](patterns/incident-to-eval-synthesis.md)
- [Inference-Healed Code Review Reward](patterns/inference-healed-code-review-reward.md)
- [Iterative Prompt & Skill Refinement](patterns/iterative-prompt-skill-refinement.md)
- [Reflection Loop](patterns/reflection.md)
- [Rendered UI Finish Gate](patterns/rendered-ui-finish-gate.md)
- [Rich Feedback Loops > Perfect Prompts](patterns/rich-feedback-loops.md)
- [Self-Critique Evaluator Loop](patterns/self-critique-evaluator-loop.md)
- [Tool Use Incentivization via Reward Shaping](patterns/tool-use-incentivization-via-reward-shaping.md)

### <a name="learning-adaptation"></a>Learning & Adaptation

- [Agent Reinforcement Fine-Tuning (Agent RFT)](patterns/agent-reinforcement-fine-tuning.md)
- [Commitment Ledger with Reality-Gated Credit](patterns/commitment-ledger-reality-gated-credit.md)
- [Compounding Engineering Pattern](patterns/compounding-engineering-pattern.md)
- [Isolated VM per RL Rollout](patterns/isolated-vm-per-rl-rollout.md)
- [Memory Reinforcement Learning (MemRL)](patterns/memory-reinforcement-learning-memrl.md)
- [Merged Code + Language Skill Model](patterns/merged-code-language-skill-model.md)
- [Persistent Test Memory Feedback Loop](patterns/persistent-test-memory-feedback-loop.md)
- [Self-Discover: LLM Self-Composed Reasoning Structures](patterns/self-discover-reasoning-structures.md)
- [Skill Library Evolution](patterns/skill-library-evolution.md)
- [Variance-Based RL Sample Selection](patterns/variance-based-rl-sample-selection.md)

### <a name="orchestration-control"></a>Orchestration & Control

- [402-First Machine Payments (Price-Before-Work Tool Purchases)](patterns/402-first-machine-payments.md)
- [Action-Selector Pattern](patterns/action-selector-pattern.md)
- [Agent Modes by Model Personality](patterns/agent-modes-by-model-personality.md)
- [Agent-Driven Research](patterns/agent-driven-research.md)
- [Artifact-Driven Analysis Pipeline Orchestration](patterns/multi-step-analysis-pipeline-orchestration.md)
- [Autonomous Workflow Agent Architecture](patterns/autonomous-workflow-agent-architecture.md)
- [Board-Mediated Async Inter-Agent Coordination](patterns/board-mediated-inter-agent-coordination.md)
- [Budget-Aware Model Routing with Hard Cost Caps](patterns/budget-aware-model-routing-with-hard-cost-caps.md)
- [Capability-Escrow-Receipt](patterns/capability-escrow-receipt.md)
- [Classify-Then-Act for Background Agents](patterns/classify-then-act-for-background-agents.md)
- [Conditional Parallel Tool Execution](patterns/parallel-tool-execution.md)
- [Continuous Autonomous Task Loop Pattern](patterns/continuous-autonomous-task-loop-pattern.md)
- [Cross-Cycle Consensus Relay](patterns/cross-cycle-consensus-relay.md)
- [Cross-Domain Agent Conflict Resolution](patterns/cross-domain-agent-conflict-resolution.md)
- [Custom Sandboxed Background Agent](patterns/custom-sandboxed-background-agent.md)
- [Declarative Multi-Agent Topology Definition](patterns/declarative-multi-agent-topology-definition.md)
- [Design-Time File Partition as Concurrency Control](patterns/design-time-file-partition.md)
- [Deterministic Zero-LLM Orchestration](patterns/deterministic-zero-llm-orchestration.md)
- [Discrete Phase Separation](patterns/discrete-phase-separation.md)
- [Distributed Execution with Cloud Workers](patterns/distributed-execution-cloud-workers.md)
- [Dual LLM Pattern](patterns/dual-llm-pattern.md)
- [Dual-Rail Message Delivery](patterns/dual-rail-message-delivery.md)
- [Dual-Speed Realtime Architecture (Talker-Reasoner)](patterns/dual-speed-talker-reasoner-architecture.md)
- [Durable Execution & Step Checkpointing](patterns/durable-execution-step-checkpointing.md)
- [Explicit Posterior-Sampling Planner](patterns/explicit-posterior-sampling-planner.md)
- [Factory over Assistant](patterns/factory-over-assistant.md)
- [Fair-Share Task Queues with Heartbeat Leases](patterns/fair-share-task-queues-with-heartbeat-leases.md)
- [Feature List as Immutable Contract](patterns/feature-list-as-immutable-contract.md)
- [Hybrid LLM/Code Workflow Coordinator](patterns/hybrid-llm-code-workflow-coordinator.md)
- [Inference-Time Scaling](patterns/inference-time-scaling.md)
- [Initializer-Maintainer Dual Agent Architecture](patterns/initializer-maintainer-dual-agent.md)
- [Inversion of Control](patterns/inversion-of-control.md)
- [Iterative Multi-Agent Brainstorming](patterns/iterative-multi-agent-brainstorming.md)
- [Judge-Gated Finding Exchange Between Parallel Sub-Agents](patterns/judge-gated-finding-exchange-between-sub-agents.md)
- [Lane-Based Execution Queueing](patterns/lane-based-execution-queueing.md)
- [Language Agent Tree Search (LATS)](patterns/language-agent-tree-search-lats.md)
- [LLM Map-Reduce Pattern](patterns/llm-map-reduce-pattern.md)
- [Markdown Polis — Multi-Vendor Agent Coordination via Filesystem Constitution](patterns/markdown-polis-coordination.md)
- [Multi-Model Orchestration for Complex Edits](patterns/multi-model-orchestration-for-complex-edits.md)
- [Non-Generative Judgment Routing with Typed Escalation](patterns/non-generative-judgment-routing.md)
- [Opponent Processor / Multi-Agent Debate Pattern](patterns/opponent-processor-multi-agent-debate.md)
- [Oracle and Worker Multi-Model Approach](patterns/oracle-and-worker-multi-model.md)
- [Parallel Tool Call Learning](patterns/parallel-tool-call-learning.md)
- [Plan-Then-Execute Pattern](patterns/plan-then-execute-pattern.md)
- [Planner-Worker Separation for Long-Running Agents](patterns/planner-worker-separation-for-long-running-agents.md)
- [Progressive Autonomy with Model Evolution](patterns/progressive-autonomy-with-model-evolution.md)
- [Progressive Complexity Escalation](patterns/progressive-complexity-escalation.md)
- [Recursive Best-of-N Delegation](patterns/recursive-best-of-n-delegation.md)
- [Self-Rewriting Meta-Prompt Loop](patterns/self-rewriting-meta-prompt-loop.md)
- [Signal-Driven Agent Activation](patterns/signal-driven-agent-activation.md)
- [Specification-Driven Agent Development](patterns/specification-driven-agent-development.md)
- [Stop Hook Auto-Continue Pattern](patterns/stop-hook-auto-continue-pattern.md)
- [Sub-Agent Spawning](patterns/sub-agent-spawning.md)
- [Subject Hygiene for Task Delegation](patterns/subject-hygiene.md)
- [Swarm Migration Pattern](patterns/swarm-migration-pattern.md)
- [Three-Stage Perception Architecture](patterns/three-stage-perception-architecture.md)
- [Tool Capability Compartmentalization](patterns/tool-capability-compartmentalization.md)
- [Tracker-as-Desired-State Reconciliation](patterns/tracker-as-desired-state-reconciliation.md)
- [Tree-of-Thought Reasoning](patterns/tree-of-thought-reasoning.md)
- [Workspace-Native Multi-Agent Orchestration](patterns/workspace-native-multi-agent-orchestration.md)

### <a name="reliability-eval"></a>Reliability & Eval

- [Action Caching & Replay Pattern](patterns/action-caching-replay.md)
- [Adaptive Sandbox Fan-Out Controller](patterns/adaptive-sandbox-fanout-controller.md)
- [Agent Circuit Breaker](patterns/agent-circuit-breaker.md)
- [Anti-Reward-Hacking Grader Design](patterns/anti-reward-hacking-grader-design.md)
- [Asynchronous Coding Agent Pipeline](patterns/asynchronous-coding-agent-pipeline.md)
- [Canary Rollout and Automatic Rollback for Agent Policy Changes](patterns/canary-rollout-and-automatic-rollback-for-agent-policy-changes.md)
- [CriticGPT-Style Code Review](patterns/criticgpt-style-evaluation.md)
- [Dead-Man's Switch for Scheduled Agent Jobs](patterns/dead-mans-switch-for-scheduled-agent-jobs.md)
- [Debiased LLM-as-a-Judge Evaluation](patterns/debiased-llm-as-a-judge-evaluation.md)
- [Evidence-Layered Evaluation for Interactive Agents](patterns/evidence-layered-evaluation-for-interactive-agents.md)
- [Extended Coherence Work Sessions](patterns/extended-coherence-work-sessions.md)
- [Failover-Aware Model Fallback](patterns/failover-aware-model-fallback.md)
- [Fleet Cost Simulation Before Dispatch](patterns/fleet-cost-simulation-before-dispatch.md)
- [Intent-Level Cost Attribution](patterns/intent-level-cost-attribution.md)
- [LLM Observability](patterns/llm-observability.md)
- [Orchestration Prompt-Writing Benchmark](patterns/orchestration-prompt-writing-benchmark.md)
- [Out-of-Process Provider-Boundary Replay](patterns/out-of-process-provider-boundary-replay.md)
- [Output Verification Loop](patterns/output-verification-loop.md)
- [Own-Check Fault Injection](patterns/own-check-fault-injection.md)
- [Reasoning-Token Firewall](patterns/reasoning-token-firewall.md)
- [Reliability Problem Map Checklist for RAG and Agents](patterns/wfgy-reliability-problem-map.md)
- [RLAIF (Reinforcement Learning from AI Feedback)](patterns/rlaif-reinforcement-learning-from-ai-feedback.md)
- [Schema Validation Retry with Cross-Step Learning](patterns/schema-validation-retry-cross-step-learning.md)
- [Skill Activation as a Precision/Recall Measurement](patterns/skill-activation-as-precision-recall.md)
- [Structured Output Specification](patterns/structured-output-specification.md)
- [Subagent Compilation Checker](patterns/subagent-compilation-checker.md)
- [Tier Auto-Apply by Mechanical Impact](patterns/tier-auto-apply-by-mechanical-impact.md)
- [Trajectory & State-Invariant Evaluation](patterns/trajectory-and-state-invariant-evaluation.md)
- [Versioned Constitution Governance](patterns/versioned-constitution-governance.md)
- [Workflow Evals with Mocked Tools](patterns/workflow-evals-with-mocked-tools.md)

### <a name="security-safety"></a>Security & Safety

- [Authenticated Authority Channel](patterns/authenticated-authority-channel.md)
- [Black-Box Skill Invocation](patterns/black-box-skill-invocation.md)
- [Code-Then-Execute Pattern](patterns/code-then-execute-pattern.md)
- [Consequence-Family Coverage Audit](patterns/consequence-family-coverage-audit.md)
- [Credential-Free Outbox](patterns/credential-free-outbox.md)
- [Cryptographic Governance Audit Trail](patterns/cryptographic-governance-audit-trail.md)
- [Delegated User Authorization (OAuth Token Exchange)](patterns/delegated-user-auth-token-exchange.md)
- [Denial Tracking & Permission Escalation](patterns/denial-tracking-permission-escalation.md)
- [Deterministic Security Scanning Build Loop](patterns/deterministic-security-scanning-build-loop.md)
- [Deterministic Threat Rule Scanning](patterns/deterministic-threat-rule-scanning.md)
- [Egress Lockdown (No-Exfiltration Channel)](patterns/egress-lockdown-no-exfiltration-channel.md)
- [Evidence Questions, Not Verdict Questions](patterns/evidence-questions-not-verdict-questions.md)
- [Exact-Action Authorization Binding](patterns/exact-action-authorization-binding.md)
- [Hook-Based Safety Guard Rails for Autonomous Code Agents](patterns/hook-based-safety-guard-rails.md)
- [Lethal Trifecta Threat Model](patterns/lethal-trifecta-threat-model.md)
- [Local-First Credential Broker](patterns/local-first-credential-broker.md)
- [Multi-Tenant Agent & Memory Isolation](patterns/multi-tenant-agent-isolation.md)
- [Non-Custodial Spending Controls](patterns/non-custodial-spending-controls.md)
- [One OS User per Agent](patterns/one-os-user-per-agent.md)
- [PII Tokenization](patterns/pii-tokenization.md)
- [Policy-Gated Tool Proxy](patterns/policy-gated-tool-proxy.md)
- [Sandboxed Tool Authorization](patterns/sandboxed-tool-authorization.md)
- [Soulbound Identity Verification](patterns/soulbound-identity-verification.md)
- [Transitive Vouch-Chain Trust](patterns/transitive-vouch-chain-trust.md)
- [Zero-Knowledge Verified Agent Egress](patterns/zero-knowledge-verified-agent-egress.md)
- [Zero-Trust Agent Mesh](patterns/zero-trust-agent-mesh.md)

### <a name="tool-use-environment"></a>Tool Use & Environment

- [Agent SDK for Programmatic Control](patterns/agent-sdk-for-programmatic-control.md)
- [Agent-First Tool Discovery](patterns/agent-first-tool-discovery.md)
- [Agent-First Tooling and Logging](patterns/agent-first-tooling-and-logging.md)
- [Agentic Search Over Vector Embeddings](patterns/agentic-search-over-vector-embeddings.md)
- [CLI-Native Agent Orchestration](patterns/cli-native-agent-orchestration.md)
- [Code-Over-API (Code Mode)](patterns/code-over-api-pattern.md)
- [Dual-Use Tool Design](patterns/dual-use-tool-design.md)
- [External Credential Sync](patterns/external-credential-sync.md)
- [Filesystem-Mediated Host Delegation](patterns/filesystem-mediated-host-delegation.md)
- [Hybrid GUI & Visual Grounding](patterns/hybrid-gui-visual-grounding.md)
- [Intelligent Bash Tool Execution](patterns/intelligent-bash-tool-execution.md)
- [LLM-Friendly API Design](patterns/llm-friendly-api-design.md)
- [MCP Pattern Injection](patterns/mcp-pattern-injection.md)
- [Multi-Platform Communication Aggregation](patterns/multi-platform-communication-aggregation.md)
- [Multi-Platform Webhook Triggers](patterns/multi-platform-webhook-triggers.md)
- [Precomputed Code Graph Lookup](patterns/precomputed-code-graph-lookup.md)
- [Progressive Tool Discovery (Lazy Tool Loading)](patterns/progressive-tool-discovery.md)
- [Static Service Manifest for Agents](patterns/static-service-manifest-for-agents.md)
- [Tool Use Steering via Prompting](patterns/tool-use-steering-via-prompting.md)
- [Unified Tool Gateway](patterns/unified-tool-gateway.md)
- [Virtual Machine Operator Agent](patterns/virtual-machine-operator-agent.md)
- [Visual AI Multimodal Integration](patterns/visual-ai-multimodal-integration.md)

### <a name="ux-collaboration"></a>UX & Collaboration

- [Abstracted Code Representation for Review](patterns/abstracted-code-representation-for-review.md)
- [Agent-Assisted Scaffolding](patterns/agent-assisted-scaffolding.md)
- [Agent-Friendly Workflow Design](patterns/agent-friendly-workflow-design.md)
- [Chain-of-Thought Monitoring & Interruption](patterns/chain-of-thought-monitoring-interruption.md)
- [Codebase Optimization for Agents](patterns/codebase-optimization-for-agents.md)
- [Human-in-the-Loop Approval Framework](patterns/human-in-loop-approval-framework.md)
- [Milestone Escrow for Agent Resource Funding](patterns/milestone-escrow-agent-funding.md)
- [Proactive Trigger Vocabulary](patterns/proactive-trigger-vocabulary.md)
- [Seamless Background-to-Foreground Handoff](patterns/seamless-background-to-foreground-handoff.md)
- [Shell Command Contextualization](patterns/shell-command-contextualization.md)
- [Spectrum of Control / Blended Initiative](patterns/spectrum-of-control-blended-initiative.md)
- [Team-Shared Agent Configuration as Code](patterns/team-shared-agent-configuration.md)
- [Verbose Reasoning Transparency](patterns/verbose-reasoning-transparency.md)
- [Voice Agent Turn-Taking & Barge-In Handling](patterns/voice-agent-turn-taking-barge-in.md)





---

## For AI Assistants (llms.txt)

This project includes [`llms.txt`](https://agentic-patterns.com/llms.txt), a machine-readable documentation file designed to help AI assistants and LLMs understand and recommend appropriate patterns.

**What's included:**
- Pattern categories and their purposes
- Key patterns with concise descriptions
- Usage guidelines for AI assistants
- Pattern selection strategies based on use case requirements

**For developers building AI assistants:**
The `llms.txt` file can be provided to LLMs as context to improve pattern recommendations. It's optimized for:
- RAG systems indexing this catalogue
- AI coding assistants suggesting patterns
- LLM-powered tools that recommend agentic patterns

**Access:** https://agentic-patterns.com/llms.txt (also available in [`apps/web/public/llms.txt`](./apps/web/public/llms.txt))

---

## Contributing in 3 steps

1. **Fork & branch** → `git checkout -b add-my-pattern`
2. **Add a pattern file** under `patterns/` using the template above.
3. **Run** `bun run build:data` to refresh the generated README sections and site data.
4. **Open a PR** titled `Add: my-pattern-name`.
5. This repository is pattern-first: proposals that are primarily product announcements or promotions will be rejected, even if technically valid.

See [`CONTRIBUTING.md`](https://github.com/nibzard/awesome-agentic-patterns/blob/main/CONTRIBUTING.md) for the fine print.

---

## Inspiration

This project started after the write‑up [**"What Sourcegraph learned building AI coding agents"**](https://www.nibzard.com/ampcode) (28 May 2025) and the ongoing *Raising an Agent* video diary. Many first patterns come straight from those lessons — thanks to everyone sharing their journey in the open!

---

## License

Apache‑2.0. See [`LICENSE`](https://github.com/nibzard/awesome-agentic-patterns/blob/main/LICENSE).

---

## Star History

[](https://star-history.dera.page/#nibzard/awesome-agentic-patterns&type=date&legend=top-left)

---

### Overview (`principles/README.md`)

# Principles

Lessons from teams that build agent products: product strategy, team habits, developer learning, and general software architecture. They are not agent patterns.

## Why this directory exists

`patterns/` is for repeatable, agent-centric technical architectures and control loops. A pattern tells you how an AI agent senses, reasons, remembers, uses tools, or stays safe. The root [README](../README.md) sets that bar: repeatable, agent-centric, traceable.

The entries here are valuable, and they came from building agent products, but they do not meet that bar. They describe how teams decide and work, or how to structure software in general. If they sat in `patterns/`, they would dilute the technical catalog, the Decision Explorer, and `llms.txt`.

Each entry keeps the front-matter and section structure of a pattern, so you can read it the same way. Where an entry depends on a technical pattern, it links to `../patterns/`. Add an entry here only when it fails the pattern bar but is still worth keeping.

## Product & strategy

| Principle | Summary |
|---|---|
| [Burn the Boats](burn-the-boats.md) | Removes working but obsolete features on a hard, announced deadline so the team and users move to the new approach |
| [Frontier-Focused Development](frontier-focused-development.md) | Targets only state-of-the-art models, picks the best model per use case with no user model selector, and expects to rework the product every few months |
| [Latent Demand Product Discovery](latent-demand-product-discovery.md) | Builds hackable, extensible products, watches how power users repurpose them, and turns the most frequent workarounds into supported features |
| [Shipping as Research](shipping-as-research.md) | Releases reversible, instrumented features to learn whether they work, then doubles down or removes them based on usage data and feedback |

## Team & workflow habits

| Principle | Summary |
|---|---|
| [Dev Tooling Assumptions Reset](dev-tooling-assumptions-reset.md) | Audits dev tools for human-effort assumptions and replaces tickets, PR ceremony, and sprints with immediate agent dispatch, variations, and automated tests |
| [Dogfooding with Rapid Iteration for Agent Improvement](dogfooding-with-rapid-iteration-for-agent-improvement.md) | The agent team uses its own agent for daily work, collects feedback in low-friction channels, and ships features internally first to validate or discard them |
| [No-Token-Limit Magic](no-token-limit-magic.md) | Removes hard token limits during prototyping to learn what good behavior needs, then compresses context only after quality is stable and measured |

## Industry & learning

| Principle | Summary |
|---|---|
| [AI-Accelerated Learning and Skill Development](ai-accelerated-learning-and-skill-development.md) | Uses AI assistants as tutors that explain errors and concepts, offer alternatives, and fade support as the developer gains skill |
| [Democratization of Tooling via Agents](democratization-of-tooling-via-agents.md) | Non-programmers describe a tool in natural language and iterate with an AI agent that generates and fixes the code for dashboards, scripts, or small apps |

## General software architecture

| Principle | Summary |
|---|---|
| [Shared Core with Native Shells](shared-core-native-shells.md) | Keeps application state and behavior in a shared core, uses native front ends for each platform, and checks that shells and the CLI expose the core consistently |

## See also

- [Awesome Agentic Patterns](../README.md): the technical pattern catalog that these principles complement.

---

### Overview (`research/README.md`)

# Research

This directory holds long-form research artifacts that support the pattern catalogue in [`patterns/`](../patterns/). The pattern files are the source of truth for pattern content. This directory is for the verified work behind them.

## What belongs here

Add a file to this directory only if it is one of these two types:

- **A verified catalogue audit.** A complete examination of `patterns/` that documents its method and gives a verdict for each pattern.
- **A synthesis of primary research.** A document that synthesizes primary sources (papers, engineering write-ups, postmortems) for one topic that spans many patterns.

A maintainer must examine and approve each file. Each citation must resolve to a real source. Each statistic must have a source that you can link.

Do not add these files here:

- Per-pattern reports that an AI agent generates without source verification.
- Raw verification output, such as API response dumps, run trackers, and logs.

`scripts/claude-research-loop.sh` writes its output to this directory. Do not commit that output unless a maintainer has verified it.

## Contents

- [`pattern-catalogue-audit-2026-10-report.md`](./pattern-catalogue-audit-2026-10-report.md) — the full catalogue audit of October 2026. It examined 203 patterns on 2026-10-12 and 2026-10-13.

## Why the earlier reports were deleted

In February and March 2026, an automated research loop generated approximately 230 per-pattern research files in this directory (`*-report.md`, `*-analysis.md`, `*-summary.md`, `*-relationships.md`, and related JSON verification files). We deleted these files in November 2026.

The October 2026 audit found these defects in the generated reports:

- Fabricated citations.
- Misattributed arXiv identifiers.
- Statistics with no source.

For example, `reflection-report.md` attributed *Self-Refine* to Shinn et al. 2023 (`arXiv:2303.11366`, which is the identifier of *Reflexion*) and reported a "100x" RLAIF cost reduction that no source supports.

The follow-up pull requests corrected the pattern entries in `patterns/`. The old reports did not change, so each report continued to contradict the audited catalogue and could supply incorrect data to readers and to tools that ingest the repository.

## How to read a deleted report

Git history before November 2026 contains each deleted report. To find the commit that removed them, run:

```bash
git log --diff-filter=D --summary -- research/
```

To read one report at the commit before that deletion, run `git show <commit>^:research/<file>`. Treat the content as unverified.

---

### Overview (`scripts/README.md`)

# Claude Research Loop

Run from repo root:

```bash
make research_loop
scripts/claude-research-loop.sh --bootstrap-only
scripts/claude-research-loop.sh --once
scripts/claude-research-loop.sh
scripts/claude-research-loop.sh --pattern plan-then-execute-pattern
make research_loop PROJECT_PINNED_CLAUDE_BIN="$HOME/.local/share/claude/versions/2.1.34"
PROJECT_PINNED_CLAUDE_BIN="$HOME/.local/share/claude/versions/2.1.34" scripts/claude-research-loop.sh --once

# Update pattern files from existing research
make update_patterns_from_research
make update_patterns_from_research PATTERN=action-selector-pattern
scripts/update-patterns-from-research.sh
scripts/update-patterns-from-research.sh --pattern action-selector-pattern
TEMPLATE_LINK="https://github.com/nibzard/awesome-agentic-patterns/blob/main/TEMPLATE.md" \
  scripts/update-patterns-from-research.sh --pattern action-selector-pattern
```

`scripts/update-patterns-from-research.sh` now injects a template reference URL into the Claude prompt.
Override it with `TEMPLATE_LINK=...` if you want a different template source.

Requirements:

```bash
jq
rg
claude (in PATH) -- latest global is preferred
```

Optional pinned fallback for this project (used when `claude` is unavailable):

```bash
PROJECT_PINNED_CLAUDE_BIN="$HOME/.local/share/claude/versions/2.1.34" scripts/claude-research-loop.sh --once
```

## Pinning Note

This loop now prefers the global `claude` binary by default.

`PROJECT_PINNED_CLAUDE_BIN` can be used as a fallback path if needed.

Project-only pin:
- `make research_loop` uses global `claude` when available.
- You can still force a specific binary with `CLAUDE_BIN=...`.
- You can force the project pin fallback with `PROJECT_PINNED_CLAUDE_BIN=...`.

Revert your global `claude` to the latest published build:

```bash
latest="$(npm dist-tag ls @anthropic-ai/claude-code | awk '/^latest:/ {print $2}')"
~/.local/bin/claude install "$latest" --force
ln -sf "$HOME/.local/share/claude/versions/$latest" "$HOME/.local/bin/claude"
```

Verify:

```bash
readlink -f ~/.local/bin/claude
~/.local/bin/claude --version
```

---

--- METRICS ---
- Files Extracted: 4
- Estimated Token Budget: ~7674 tokens
- Canonical Reference: https://codewiki.google/github.com/nibzard/awesome-agentic-patterns
