Claude Code ships with 5 architectural layers most engineers never open.
Not features. Not settings. Layers — each solving a distinct problem that LLMs alone can't solve. And four of them have nothing to do with prompting.
Here's the full Agent Development Kit:
Layer 1 — CLAUDE.md → The Memory Layer
Architecture rules, naming conventions, test expectations, repo map. Always loaded. Always active.
Two scopes:
• ~/.claude/CLAUDE.md → global
• .claude/CLAUDE.md → project
This isn't context you paste in before every session. It's context that never needs repeating. The agent's constitution.
Layer 2 — Skills → The Knowledge Layer
Each SKILL.md carries a description. Claude matches it at runtime and forks the skill into an isolated subagent. On-demand, never always-on.
Task-specific knowledge without inflating your main context window. Modular by design.
Layer 3 — Hooks → The Guardrail Layer
PreToolUse → PostToolUse → SessionStart → Stop → SubagentStop
This is the layer most teams skip. And the one they regret skipping first.
Hooks are NOT AI. They're deterministic event-driven shell commands.
• Auto-lint on every Write
• Hard-block on rm -rf
• Slack notification on Stop
Event fires → Matcher checks → Command runs
Quality enforced at the infrastructure level. Not the prompt level.
Layer 4 — Subagents → The Delegation Layer
Each subagent gets its own context window, model, tools, and permissions.
Main agent delegates down. Receives results up. That's it.
No infinite recursion — subagents can't spawn subagents. Main context stays clean. Hard boundaries by design.
Layer 5 — Plugins → The Distribution Layer
Bundle your skills + agents + hooks + commands into a plugin. One install. Whole team inherits the behavior.
Think npm packages — but for what your agent knows how to do.
Wrapping everything:
→ MCP Servers on the left (GitHub, databases, APIs, custom integrations)
→ Agent Teams on the right (parallel execution, message passing, shared permissions)
The 5-layer stack in one line:
CLAUDE.md sets rules → Skills provide expertise → Hooks enforce quality → Subagents delegate work → Plugins distribute to the team
Most production failures in agentic systems trace back to one missing layer.
Which one is the gap in your current setup?
How to set up your Claude code project?
A proper Claude Code project lives inside a .𝗰𝗹𝗮𝘂𝗱𝗲/ folder.
- Start with 𝗖𝗟𝗔𝗨𝗗𝗘.𝗺𝗱 as Claude's instruction manual.
- Split it into a 𝗿𝘂𝗹𝗲𝘀/ folder as it grows.
- Add 𝗰𝗼𝗺𝗺𝗮𝗻𝗱𝘀/ for repeatable workflows
- 𝘀𝗸𝗶𝗹𝗹𝘀/ for context-triggered automation
- and 𝗮𝗴𝗲𝗻𝘁𝘀/ for isolated subagents.
- Lock down permissions in 𝘀𝗲𝘁𝘁𝗶𝗻𝗴𝘀.𝗷𝘀𝗼𝗻.
There are two .𝗰𝗹𝗮𝘂𝗱𝗲/ folders:
- one committed with your repo
- one global at ~/.𝗰𝗹𝗮𝘂𝗱𝗲/ for personal preferences and auto-memory across projects.
The .𝗰𝗹𝗮𝘂𝗱𝗲/ folder is infrastructure. Treat it like one.
The article below was written by my co-founder some time back, and it is still very much relevant.
It is a complete guide to 𝗖𝗟𝗔𝗨𝗗𝗘.𝗺𝗱, custom commands, skills, agents, and permissions, along with how to set them up properly.
Read it below.
You are in an AI engineer interview at Google.
The interviewer asks:
"Our data is spread across many sources (Salesforce, Gmail, etc.)
How would you build a unified query engine over it?"
You: "Embed them in a vector DB and do RAG."
Interview over!
Here's what you missed:
Many devs still think context retrieval is a linear pipeline:
Chunk → Embed → Retrieve → Generate
This works great for simple demos, but production systems need something fundamentally different.
To understand better, consider this query:
"Compare our Q4 sales performance in the Chicago region against last year's projections formulated in a meeting with stakeholders."
This single query requires:
- Sales data from your SQL database
- Graph relationships (organizational hierarchy)
- Vector search over projection reports
- Time-based filtering (Q4 this year vs last year)
- Permission checks (for user authorization)
No single embedding lookup can handle this complexity!
To actually solve this problem, you'd need to build an Agentic context retrieval system with five critical layers (as described in the graphic below):
> Indexing layer:
Different content needs different indexing:
- Semantic chunking for docs
- Hierarchical indexing for nested content
- Special indexing for sources like Calendar, Slack, etc.
> Routing layer:
Before retrieval, you need intelligent routing that decides:
- Should the query hit a graph DB?
- Does it need a structured SQL query?
- Or semantic search for conceptual matching?
> Query construction layer:
The original query might need to be:
- Decomposed into sub-queries
- Translated into different query languages (SQL, Cypher, vector similarity)
> Retrieval layer:
- Apply permissions and access checks
- Run multiple retrievals in parallel
- Rerank based on relevance/recency
> Generation layer:
- Synthesize a citation-backed response
The diagram below depicts this whole process.
That said, four of these five layers run after a query arrives. Indexing runs before, which caps what the other four can do.
Even with perfect routing, query decomposition, and reranking, the system returns only what the chunks preserved.
My co-founder wrote about a better unit for that indexing step. The technique:
- cuts corpus size by 40x.
- reduces tokens per query by 3x.
- improves vector search relevance by 2.3x.
And it doesn't change the retrieval algorithm, the reranker, or the embedding model.
Read it below.
I created this .net core console app template with autofac DI configured, save your time for repetitive job setting up a new project. Install via nuget, if you like the work please share with your mates. #dotnetcore#nuget#autofac#projecttemplate
https://t.co/rhg0NHd9Zb
I created Redis cluster + Docker + .Net Core 3.1 API for distributed caching, grab the source code from github and kick start your project easily #dotnetcore#Docker#Redis#DistributedCaching
https://t.co/VdiDncwS6j
I have issues with outdated nuget packages and inconsistent versions across the whole project solution, especially when numbers of the projects are increasing and it is getting out of control.
https://t.co/fb5dPPu7Ei