System Weaver: A cognitive framework that forces LLMs to reason through trade-offs, CAP theorem, and failure domains.
Teaching AI to think like a Principal Engineer.
Let me let you in on a little secret... I built this entire project in just 17 days. My original goal was to finish it for the October contest, but honestly? It was incredibly hard to build.
Every time I made progress, a better, crazier idea to improve it popped into my head. Looking at the final result now, I'm genuinely so happy and incredibly proud of myself.
So, what exactly does System Weaver do? Usually, we just memorize finished architecture diagrams for interviews. But the moment a real-world constraint shifts (like 10x traffic), those memorized blueprints shatter. System Weaver is an AI-native plugin for tools like Claude Code that forces the AI to reason instead of memorize.It forces the AI to clarify requirements, do the hard math, and weigh trade-offs before composing a living, hyper-scale architecture.
About the video, it is a summary of System Weaver's art. The AI actually only provided the code for it, and the final MP4 was rendered using Videogen tool.
You might think that because I used AI extensively to build this, it was all just automated. Not at all. Alongside the heavy AI usage, I did a massive amount of manual tweaking, organizing, and manual adjustments to get it to this level of polish.If you have any suggestions, criticism, or questions, feel free to drop them below. Your warm words and feedback genuinely make my day.
So, what are these 22 Cognitive Primitives?
Instead of one giant prompt, the plugin uses 22 specific skills grouped into 8 layers, which the AI routes to based on your prompt:
L0 Frame (Scoping & Math):
requirements-scoping: Defining the exact boundaries of what needs to be built.
back-of-the-envelope: Doing the raw math (calculating QPS, bandwidth, and server counts).
L1 Edge (Traffic Ingress):
dns: Domain routing.
load-balancing: Distributing traffic across servers.
content-delivery: Using CDNs to serve static assets globally.
L2 Services (Interfaces):
api-design: Designing REST or gRPC interfaces.
service-decomposition: Splitting the system into microservices.
L3 State (Databases & Storage):
data-storage: Choosing between SQL and NoSQL.
caching: Implementing in-memory fast-read layers like Redis.
blob-store: Storing large files like images and videos.
sequencer: Generating globally unique IDs.
sharded-counters: Handling high-traffic counters (like likes/views) without crashing.
distributed-search: Implementing large-scale search engines like Elasticsearch.
L4 Async (Decoupling):
messaging-streaming: Using queues and Kafka to decouple services.
task-scheduling: Handling background jobs and delayed tasks.
L5 Correctness (Consistency):
consistency-coordination: Handling CAP theorem and distributed locking.
L6 Ops (Survivability):
resilience-failure: Designing graceful degradation and fault tolerance.
observability: Monitoring and metrics.
distributed-logging: Centralized logging across microservices.
L7 Growth (Scaling):
scaling-evolution: How the architecture must pivot when scaling from 1 million to 100 million users.
Render (Visualization):
architecture-diagram: Generating interactive HTML/SVG diagrams of the final design.
How to Access and Use System Weaver?
1. View the Repository
2. Install (For Claude Code)
Run these commands in your terminal:
/plugin marketplace add anselm1234-eng/system-weaver
/plugin install system-weaver
(Or use the CLI: npx skills add anselm1234-eng/system-weaver). 3. Use It
Open your AI agent (like Claude Code) and use the /design command, or ask a direct architecture question. Examples:
/design a distributed URL shortener handling 10k writes/sec
"Should I use SQL or NoSQL for a chat app, and how do I shard it?"
"Draw an architecture diagram for the system we just designed."
Tech stack
- ChatGPT (GPT-5.6 Sol)
- Codex
- GitHub Copilot
Links
Prompt steps
Step 1
This is merely a high-level summary of the extensive conversations and prompts I have utilized with AI over the course of these 17 days. Role: You are an elite AI Agent Architect and Systems Engineer. Task: Build a complete, production-ready Agent Plugin from scratch called "System Weaver" (Repo: anselm1234-eng/system-weaver). Objective: Create a 22-skill toolkit that forces AI to reason through system design (Clarify -> Estimate -> Compose -> Trade-offs -> Stress-Test) rather than memorizing static diagrams. Phase 1: Scaffolding & Manifests Create the root folder structure: /skills, /agents, /commands, /meta, /evals, /.claude-plugin, /.codex-plugin. Create the plugin.json manifests for Claude Code, Codex, and Cursor. Ensure they all have the name system-weaver, version 1.0.0, and MIT license. Create a strict meta/SKILL-CONTRACT.md. Every skill must follow this exact template: When to reach for it · Clarify first · Options · Trade-offs (solves/worsens/when-to-change) · Behavior under stress · How to apply · Dos & Don'ts · Numbers that matter · Choosing a provider · Related blocks. Phase 2: The 22 Cognitive Primitives Generate the SKILL.md and necessary reference files for the following building blocks (using the contract defined above). Ensure they are vendor-neutral by default but include AWS, Azure, and GCP references: L0 Frame: requirements-scoping, back-of-the-envelope L1 Edge: dns, load-balancing, content-delivery L2 Services: api-design, service-decomposition L3 State: data-storage, caching, blob-store, sequencer, sharded-counters, distributed-search L4 Async: messaging-streaming, task-scheduling L5 Correctness: consistency-coordination L6 Ops: resilience-failure, observability, distributed-logging L7 Growth: scaling-evolution Render: architecture-diagram (generate a self-contained HTML+SVG template) Phase 3: The Orchestrator & Workflow Create skills/system-weaver/SKILL.md. This is the orchestrator. It must define the reasoning loop and instruct the AI to route to the specific building blocks based on user prompts. Create commands/design.md to allow the /design <system> slash command. Create agents/system-weaver-orchestrator.md to define an autonomous sub-agent. Phase 4: The Python Calculator Write a standard-library Python script at skills/back-of-the-envelope/scripts/botec.py. It must calculate QPS, storage, bandwidth, and server counts. Also, write test_botec.py with golden fixtures to assert the math is correct. Phase 5: Evaluations & Testing Create an eval suite in meta/evals/. Create evals.json with 6 test prompts (URL shortener, rate limiter, etc.). Score them on 6 GUIDE behaviors (Clarify, Quantify, Trade-offs, Failure, Pivot, Concrete-API). Write run_checks.py to ensure all JSON manifests have the correct schema and matching names. Phase 6: The Web Assets Generate the initial README.md explaining the project. Scaffold a Vite+React website in the /site folder that uses Framer Motion to render an animated reasoning loop and architecture diagrams. Execution Rules: Do not skip any of the 22 skills. When generating the skill files, fill them with actual, dense technical knowledge (e.g., mention Redis for caching, Kafka for streaming, PostgreSQL for storage). Do not leave placeholders like "TODO" or "write code here". Generate the actual code. After generating each phase, wait for my command to proceed to the next phase to preserve context.Step 2
for the video: Video Style: Make a simple but cool looking 2D explainer video. The background should be a light cream color with a faint grid of tiny dots. Use a fancy, classy font for the big titles, and a typewriter-style font for the smaller tech text. The main accent color should be a nice orange-red. Make everything fade or slide in smoothly—nothing too crazy or flashing. Part 1: The Search Bar Start with a white, rounded search bar in the middle of the screen. Above it, put small spaced-out text: "SYSTEM DESIGN • ONE PART AT A TIME". Inside the bar, show a blinking cursor. Have it type out "Design a system with Claude..." then delete it. Then have it type "/design WhatsApp for 1B users". Part 2: The Broken Diagram Fade to a big title: "Memorized diagrams break." (Make the word "break." orange-red and italic). Below the title, show a basic flow chart with three beige boxes connected by arrows: "Client" -> "App server" -> "Database". Then, pop up a little orange-red tag above the database that says "100B messages / day". When the tag shows up, make the Database box tilt sideways and get a red dashed outline like it just broke. Fade the other two boxes to gray. At the bottom, add tiny text: "A CONSTRAINT CHANGED — NOTHING UNDERNEATH TO REBUILD IT". Part 3: The Step-by-Step Circle New screen. Big title: "So reason it out loud." (Make "out loud" orange-red and italic). Show a circle made of 5 pill-shaped boxes popping up one by one: 01 Clarify, 02 Estimate, 03 Compose, 04 Trade-offs, 05 Stress-test (make this last one light orange). In the middle of the circle, show big text "1.16M" and tiny text below it "MSG / SEC • 100B ÷ 86,400 S". Part 4: The Building Blocks Big title: "20 building blocks. Composed, not copied." Show a grid of 20 beige boxes with system design words in them (like dns, caching, api-design, data-storage, etc.). Then, have all those boxes fly around and change into solid orange boxes, connecting together into a specific flow chart: dns -> load-balancing -> api-design. Then api-design splits into three: caching, messaging-streaming, and sequencer. Finally, caching and messaging-streaming connect to data-storage, and sequencer connects to blob-store. Use thin lines to connect them all. Part 5: The End Show a little orange sparkle at the top. Big text: "Design systems by reasoning, not by memorizing diagrams." (Make "reasoning," orange-red and italic). Below that, add small text: "22 SKILLS • CLAUDE CODE • CODEX • AGENT PLUGINS". Hold on this screen for a few seconds and then fade out.
3 likes · 6 comments · 7 views
Comments (3)
This is really awesome man. Even if you couldn’t get it in for the October challenge, I’m glad you could for Novemeber. This looks really really cool. Any chance you can use it with Codex? I know there’s a lot of people here who love systems, thanks for sharing. Great work
<span style="color: rgb(160, 160, 160)">thank you ser, i really appreciate your comment. it can be used with a wide range of AI coding tools, I forgot to write it in the caption. i will do a repost about that, with guide.</span>
<p>This is insane! I'm definitely gonna give it a try. 🔥</p>
thank you very much bro<div><br></div>
<span style="color: rgb(249, 250, 251)">Huge respect! Pushing past the deadline because you kept getting better ideas is a true builder's mindset. You should definitely be proud.</span>
thanks you ser, i learned a lot from you guys.<div><br></div>