Skip to content

Commit 2ce5e5a

Browse files
committed
README up
1 parent 1fbdc95 commit 2ce5e5a

File tree

1 file changed

+68
-230
lines changed

1 file changed

+68
-230
lines changed

README.md

Lines changed: 68 additions & 230 deletions
Original file line numberDiff line numberDiff line change
@@ -1,287 +1,125 @@
11
# Black Box Architecture
22

3-
> Transform any codebase into modular, maintainable "black boxes" using Eskil Steenberg's architecture principles.
3+
> Transform any codebase into modular, maintainable "black boxes".
44
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/CONTRIBUTING.md)
77

8-
AI prompts optimized for **Claude Code**, **Claude** that teach your AI assistant to think in terms of replaceable, modular components.
8+
AI agents for **Claude Code** that enforce replaceable, modular architecture with built-in approval gates, commit discipline, and a self-improvement loop.
99

10-
## 📑 Table of Contents
10+
## What This Is
1111

12-
- [What This Is](#-what-this-is)
13-
- [Quick Start](#-quick-start)
14-
- [Option 1: Agents (Recommended)](#option-1-agents-recommended)
15-
- [Option 2: Legacy Prompts (Skills/Commands)](#option-2-legacy-prompts-skillscommands)
16-
- [Best Daily Workflow](#-best-daily-workflow)
17-
- [Core Philosophy](#-core-philosophy)
18-
- [What's Included](#-whats-included)
19-
- [Agents](#-agents)
20-
- [Legacy Prompts](#-legacy-prompts)
21-
- [Example Usage](#-example-usage)
22-
- [Documentation](#-documentation)
23-
- [Real-World Examples](#-real-world-examples)
24-
- [Learn More](#-learn-more)
25-
- [How It Works](#-how-it-works)
26-
- [Contributing](#-contributing)
27-
- [Next Steps](#-next-steps)
28-
29-
## 🎯 What This Is
30-
31-
Three specialized AI prompts that apply [Eskil Steenberg's](https://www.youtube.com/watch?v=sSpULGNHyoI) battle-tested principles:
12+
Five coordinated agents that apply [Eskil Steenberg's](https://www.youtube.com/watch?v=sSpULGNHyoI) battle-tested principles:
3213

3314
- **Black box interfaces** - Clean APIs between modules
3415
- **Replaceable components** - If you can't understand it, rewrite it
3516
- **Constant velocity** - Write 5 lines today vs. edit 1 line later
3617
- **Single responsibility** - One module, one person
3718

38-
## 🚀 Quick Start
39-
40-
### Option 1: Agents (Recommended)
19+
## Quick Start
4120

4221
```bash
4322
# Clone the repository
4423
git clone https://github.com/gl0bal01/black-box-architecture.git
4524

46-
# Install agents for this project
25+
# Install agents + task files for your project
4726
mkdir -p .claude/agents
4827
cp -r black-box-architecture/agents/* .claude/agents/
28+
mkdir -p tasks
29+
cp -r black-box-architecture/tasks/* tasks/
4930
```
5031

51-
### Option 2: Legacy Prompts (Skills/Commands)
52-
53-
Legacy prompts are still available but no longer the recommended path.
54-
55-
```bash
56-
# Skills (legacy)
57-
mkdir -p .claude/skills
58-
cp -r black-box-architecture/docs/legacy/skills .claude/skills/black-box-architecture
59-
60-
# Commands (legacy)
61-
mkdir -p .claude/commands
62-
cp -r black-box-architecture/docs/legacy/commands/ .claude/commands/
63-
```
64-
65-
## ✅ Best Daily Workflow
66-
67-
1. Use `arch-orchestrator` for most tasks.
68-
2. Ask for concise output by default.
69-
3. Request a full report only for big changes.
70-
4. Approve any dependency, public API, or schema changes explicitly.
71-
72-
## 💡 Core Philosophy
73-
74-
**"It's faster to write 5 lines of code today than to write 1 line today and then have to edit it in the future."**
75-
— Eskil Steenberg
76-
77-
These prompts optimize for:
78-
- **Human cognitive load** over algorithmic efficiency
79-
- **Long-term maintainability** over short-term cleverness
80-
- **Team scalability** (one person per module)
81-
- **Constant developer velocity** regardless of project size
82-
83-
## 📦 What's Included
84-
85-
- **Agents pack** in `agents/` with orchestrator + specialists
86-
- **Shared contract** in `agents/AGENTS_CONTRACT.md`
87-
- **Legacy prompts** in `docs/legacy/skills/` and `docs/legacy/commands/` (deprecated)
88-
- **Examples and docs** in `examples/` and `docs/`
89-
90-
## 🤖 Agents
32+
## Agents
9133

92-
Agents are the primary, recommended path. They enforce:
93-
- scope discipline
94-
- approval gates for risky changes
95-
- evidence-backed findings
96-
- concise, reviewable outputs
34+
The agent system follows black box principles itself — specialized agents with clear responsibilities:
9735

98-
## 🧩 Legacy Prompts
99-
100-
`docs/legacy/skills/` and `docs/legacy/commands/` are legacy prompts kept for compatibility.
101-
They may drift from the contract and are not the best daily path.
102-
103-
## 🤖 Autonomous Agents (Recommended)
104-
105-
For daily architectural work, use the specialized agent system:
106-
107-
### Installation
108-
109-
```bash
110-
# Copy agents to your project
111-
cp -r agents/* .claude/agents/
112-
113-
# The orchestrator coordinates all agents automatically
114-
```
115-
116-
### Agent Architecture
117-
118-
The agent system follows black box principles itself - specialized agents with clear responsibilities:
119-
120-
| Agent | Role | Autonomous Actions |
121-
|-------|------|-------------------|
122-
| **arch-orchestrator** | Coordination | Analyzes requests, delegates to specialists, assembles results |
123-
| **arch-analyzer** | Analysis | Explores codebases, identifies violations, maps dependencies |
124-
| **arch-planner** | Design | Designs architectures, creates roadmaps, assesses risks |
125-
| **arch-implementer** | Implementation | Refactors code, maintains boundaries, verifies changes |
126-
| **arch-debugger** | Debugging | Isolates bugs to modules, proposes fixes, maintains integrity |
36+
| Agent | Role | Model | What it does |
37+
|-------|------|-------|-------------|
38+
| **arch-orchestrator** | Entry point | Opus | Classifies requests, delegates, enforces approval gates, emits PASS/CONCERNS/FAIL/BLOCKED verdict |
39+
| **arch-analyzer** | Analysis | Sonnet | Maps module boundaries, coupling, violations. Read-only. Min 3 `file:line` per claim |
40+
| **arch-planner** | Design | Opus | Designs boundaries, interfaces, phased roadmaps. Simplicity check on non-trivial designs |
41+
| **arch-implementer** | Implementation | Sonnet | Executes approved plans. Atomic commits per changeset. Only agent that modifies code |
42+
| **arch-debugger** | Debugging | Sonnet | Isolates bugs to contract boundaries. Autonomous mode — just fix it. Captures lessons |
12743

12844
### Workflows
12945

130-
**Analysis Only**: arch-analyzer explores codebase and reports findings
131-
132-
**Planning Only**: arch-planner designs architecture from requirements
133-
134-
**Full Refactoring**: arch-analyzer → arch-planner → [USER APPROVAL] → arch-implementer
135-
136-
**Debug & Fix**: arch-debugger → arch-implementer (if fix needed)
137-
138-
**Complete Transformation**: All agents work together for major architectural overhaul
139-
140-
### Why Agents?
141-
142-
- They follow a shared contract for consistent, reviewable outputs.
143-
- They enforce approval gates for dependencies, APIs, and schemas.
144-
- They scale from quick analysis to full refactors without changing tools.
46+
| Request | Flow |
47+
|---------|------|
48+
| Analysis only | Analyzer → synthesize |
49+
| Plan only | Planner → request approval |
50+
| Implement approved plan | Implementer |
51+
| Debug | Debugger → optionally Analyzer if architecture unclear |
52+
| Refactor toward black-box | Analyzer → Planner → **APPROVAL** → Implementer |
53+
| New feature | Planner → **APPROVAL** → Implementer |
14554

146-
**Learn More:**
147-
- 📖 [Complete Agent Documentation](docs/AGENTS.md) - Detailed guide for each agent
148-
- 🔄 [Agent Workflows](docs/WORKFLOWS.md) - Step-by-step examples
149-
- 🔗 [Integration Examples](docs/INTEGRATION_EXAMPLES.md) - How agents coordinate
150-
- ⚙️ [Agent Specifications](agents/agent.json) - Technical specifications
55+
## What's New in v2.0
15156

152-
## 🎬 Example Usage
57+
- **Self-improvement loop** — agents review `tasks/lessons.md` at session start, update it after corrections. Mistakes don't repeat across sessions
58+
- **Task tracking** — persistent progress in `tasks/todo.md`. Resume work after interruptions
59+
- **Commit discipline**`git add -u` before and after each changeset. Atomic, bisectable history. Never `git add -A`
60+
- **Goal-backward verification** — SUCCESS CRITERIA MET WHEN defines what done looks like, separate from HOW TO VERIFY
61+
- **Quality gate verdicts** — PASS / CONCERNS / FAIL / BLOCKED instead of silent self-assessed checklists
62+
- **Approval gates** — hard stops for deps, public API, schema, deletions, permission widening
63+
- **Session start checklists** — every agent loads lessons and context before working
64+
- **Debugger autonomous mode** — given a bug report, just fix it. Escalate only when genuinely blocked
15365

154-
### Refactoring Example
66+
See [CHANGELOG.md](CHANGELOG.md) for full details.
15567

156-
```bash
157-
# Using the orchestrator
158-
Ask arch-orchestrator: Analyze UserService and propose black-box boundaries
159-
```
160-
161-
**What you get:**
162-
- Current architecture analysis with `file:line` references
163-
- Identified primitives and coupling issues
164-
- Proposed black box module design
165-
- Step-by-step refactoring plan
166-
- Risk assessment and mitigation
167-
- Quality validation checklist
168-
169-
### Planning Example
170-
171-
```bash
172-
# Using the orchestrator
173-
Ask arch-orchestrator: Design a module map for a real-time chat app
174-
```
175-
176-
**What you get:**
177-
- System primitives identification
178-
- Module architecture with clear boundaries
179-
- Interface specifications
180-
- Implementation roadmap (phased)
181-
- Risk assessment
182-
- Team organization recommendations
183-
184-
## 📚 Documentation
185-
186-
### Getting Started
187-
- **[Installation Guide](docs/INSTALLATION.md)** - Setup for agents and legacy prompts
188-
- **[Principles Guide](docs/PRINCIPLES.md)** - Eskil Steenberg's methodology explained
189-
190-
### Using the Tools
191-
- **[Usage Guide](docs/USAGE.md)** - Agent workflow and legacy prompts
192-
- **[Agent System Guide](docs/AGENTS.md)** - Complete agent documentation
193-
- **[Workflows Guide](docs/WORKFLOWS.md)** - Step-by-step examples for each agent
194-
- **[Integration Examples](docs/INTEGRATION_EXAMPLES.md)** - How agents coordinate together
195-
196-
### Reference & Examples
197-
- **[Code Examples](docs/EXAMPLES.md)** - Before/after transformations in multiple languages
198-
- **[Real-World Examples](examples/)** - Complete refactoring examples
199-
200-
### Contributing
201-
- **[Contributing Guide](docs/CONTRIBUTING.md)** - How to contribute, report issues, add examples
202-
203-
## 🔍 Real-World Examples
68+
## Best Daily Workflow
20469

205-
See the [`examples/`](examples/) directory for complete before/after refactoring examples in:
206-
- **Python** - Repository pattern, service abstractions
207-
- **TypeScript** - Interface-driven design, dependency injection
208-
- **Go** - Interface composition, struct patterns
209-
- **Rust** - Trait-based black boxes, generic implementations
210-
- **C** - Opaque types, function pointers (Eskil's approach!)
211-
- **PHP** - Service layer, strategy pattern, Laravel integration
70+
1. Use `arch-orchestrator` for most tasks — it picks the right workflow
71+
2. Concise output by default (5-12 lines). Full reports only when needed
72+
3. Approve any dependency, public API, or schema changes explicitly
73+
4. Check `tasks/lessons.md` periodically — it captures what the agents learned
21274

213-
## 🎓 Learn More
75+
## How It Works
21476

215-
### Core Resources
77+
- A [shared contract](agents/AGENTS_CONTRACT.md) governs all agent behavior (13 rules)
78+
- Agents default to concise outputs and switch to full reports when warranted
79+
- Approval gates prevent risky changes without explicit sign-off
80+
- Every architectural claim requires min 3 `file:line` evidence points
81+
- Agents commit before and after each changeset for safe rollback
82+
- Corrections are captured in `tasks/lessons.md` and reviewed next session
21683

217-
**Original Source:**
84+
## Core Philosophy
21885

219-
Watch Eskil Steenberg's complete lecture: [Architecting LARGE Software Projects](https://www.youtube.com/watch?v=sSpULGNHyoI)
220-
221-
This legend has built 3D engines, networked games, and complex systems all in C using these exact principles.
222-
223-
**Complete Documentation:**
224-
- 📖 [Full Documentation Index](#-documentation)
225-
- 🎨 [Skill System Guide](docs/legacy/skills/SKILL.md)
226-
- 🤖 [Agent System Guide](docs/AGENTS.md)
227-
- 📝 [Workflow Examples](docs/WORKFLOWS.md)
228-
229-
### Core Principles
86+
**"It's faster to write 5 lines of code today than to write 1 line today and then have to edit it in the future."**
87+
— Eskil Steenberg
23088

23189
1. **Primitive-First Design** - Identify core data types that flow through your system
23290
2. **Black Box Boundaries** - Modules communicate only through documented interfaces
23391
3. **Replaceable Components** - Any module can be rewritten using only its interface
23492
4. **Single Responsibility** - One module = one person can own it
23593
5. **Wrap Dependencies** - Never depend directly on code you don't control
23694

237-
## 🛠️ How It Works
238-
239-
- A shared contract governs agent behavior and output structure.
240-
- Agents default to concise outputs and switch to full reports when needed.
241-
- Approval gates prevent risky changes without explicit sign-off.
242-
- Evidence and verification are required for non-trivial claims.
243-
244-
## 🤝 Contributing
245-
246-
Contributions welcome! See [CONTRIBUTING.md](docs/CONTRIBUTING.md) for:
247-
- How to report issues
248-
- Suggesting improvements
249-
- Sharing successful patterns
250-
- Adding language examples
251-
252-
## 🔗 Related Resources
95+
## Documentation
25396

254-
- [Original ai-architecture-prompts](https://github.com/Alexanderdunlop/ai-architecture-prompts) - Inspiration and foundation
255-
- [Eskil's Video: Architecting LARGE Software Projects](https://www.youtube.com/watch?v=sSpULGNHyoI)
256-
- [Enhanced Versions](enhanced/) - Legacy reference documentation
97+
- **[Agent System Guide](docs/AGENTS.md)** - Complete agent documentation
98+
- **[Workflows Guide](docs/WORKFLOWS.md)** - Step-by-step examples for each agent
99+
- **[Integration Examples](docs/INTEGRATION_EXAMPLES.md)** - How agents coordinate
100+
- **[Principles Guide](docs/PRINCIPLES.md)** - Eskil Steenberg's methodology explained
101+
- **[Code Examples](docs/EXAMPLES.md)** - Before/after transformations in multiple languages
102+
- **[Agent Specifications](agents/agent.json)** - Technical specs and policies
103+
- **[Contributing Guide](docs/CONTRIBUTING.md)** - How to contribute
257104

258-
## 📄 License
105+
## Real-World Examples
259106

260-
MIT License - see [LICENSE](LICENSE) for details.
107+
See [`examples/`](examples/) for complete before/after refactoring examples in Python, TypeScript, Go, Rust, C, and PHP.
261108

262-
---
109+
## Legacy Prompts
263110

264-
## 🌟 Why This Works
111+
Skills and commands in `docs/legacy/` are kept for compatibility but are no longer the recommended path. Use agents instead.
265112

266-
Traditional software grows complex over time. Developer velocity slows. Features take longer. Bugs multiply.
113+
## Related Resources
267114

268-
**Black box architecture** maintains constant velocity:
269-
- Modules are small enough for one person
270-
- Changes are isolated to single modules
271-
- Components can be completely rewritten
272-
- New developers can contribute immediately
115+
- [Eskil Steenberg: Architecting LARGE Software Projects](https://www.youtube.com/watch?v=sSpULGNHyoI) - The foundation of everything here
273116

274-
**These AI prompts** teach your assistant to think this way automatically.
117+
## Contributing
275118

276-
## 🚀 Next Steps
119+
Contributions welcome! See [CONTRIBUTING.md](docs/CONTRIBUTING.md).
277120

278-
1. Install agents and run a small analysis with `arch-orchestrator`.
279-
2. Use concise output for daily work, request full reports only when needed.
280-
3. Approve dependencies, public API changes, and schemas explicitly.
281-
4. If you must use legacy prompts, keep them aligned with the contract.
121+
## License
282122

283-
Watch Eskil Steenberg's [complete lecture](https://www.youtube.com/watch?v=sSpULGNHyoI) - the foundation of everything here.
123+
MIT License - see [LICENSE](LICENSE) for details.
284124

285125
---
286-
287-
**Not affiliated with Anthropic, Eskil Steenberg, or any tools mentioned. Battle-tested principles from real development work.**

0 commit comments

Comments
 (0)