Enable one-shot AI implementation from written specifications.
Target AI: Claude Code | Target Completion: 90-95% production-ready
A system for writing specifications that AI can implement correctly on the first try.
Not documentation. Not planning. Executable architecture as code.
Specifications become compiler input - complete, decided, quantified - that produce working software at 90-95% completion without iteration.
Bad spec: "Use a database. Make it fast. Add caching if needed."
Result: AI asks questions, makes wrong choices, misses requirements.
Good spec: PostgreSQL 16. P99 latency <100ms. Cache with 5min TTL (Redis 7).
Result: AI implements exactly what you need, first time.
The difference is completeness, decision-making, and quantification.
Build a user API.
- Handle authentication
- Store users
- Make it scalable
Problems: What auth? Which database? How scalable?
== Context
Identity: User Authentication API
Paradigm: Stateless JWT authentication
Abstract: REST API for user registration, authentication, and
profile management.
Approach: Issue JWT tokens on login, services validate locally
without round-trip to auth service.
Scope In: Registration, login, token refresh
Scope Out: OAuth/social login, MFA (phase 2)
Stack: Go 1.21, PostgreSQL 16, Redis 7
== Implementation
Types: User struct (id uuid, email string unique, password_hash bcrypt)
Database: users table with indexes on email/username
API: POST /login, GET /users/:id, PUT /users/:id, DELETE /users/:id
Performance: P99 <100ms, support 1000 req/sec
Rate limit: 100 requests/min per IP
Result: AI knows WHAT to build AND WHY it exists. Can make correct judgment calls for unlisted edge cases.
Requirements: Claude Code >= 2.1, Go 1.21+
npm install -g @asciidoctor/cli
go install github.com/emontenegr/ClaudeCodeArchitect/cmd/cca@latestcd your-project
cca skill # Install Claude Code integration
cca validate --quick # Check your spec
cca compile | head -50 # See compiled output- Decided, Not Deciding - Every choice made before writing spec
- Zero Conditionals - No "if/when/maybe", single implementation path
- Complete Types - Every field, every type, all constraints
- Quantified Performance - Numbers, not adjectives (
P99 <100msnot "fast") - Mathematical Derivation - Why every constant has its value
- Modular Structure - File-per-concern using AsciiDoc includes
| Command | Purpose |
|---|---|
cca compile |
Full spec to Markdown |
cca compile --section <name> |
Single section with attributes resolved |
cca validate |
Structural + semantic completeness check |
cca validate --quick |
Structural checks only (fast, no Claude) |
cca diff [commit] |
Compiled output diff between commits |
cca impact <attr> |
Show sections using an attribute |
cca list |
List all sections |
cca skill |
Install Claude Code skill |
- Finds spec via
.spec.yamlor convention (MANIFEST.adoc,spec/MANIFEST.adoc) - Compiles AsciiDoc to HTML via asciidoctor
- Converts HTML to Markdown
- Outputs to stdout
Key: {api-p99-latency} becomes 100ms — Claude sees actual values, not placeholders.
Two-phase validation:
- Structural (Go): Compiles? Has sections? Has key components?
- Semantic (Claude): 18-point completeness checklist
Large specs (>20KB) prompt for confirmation before Claude analysis. Use --quick for structural checks only.
- asciidoctor: AsciiDoc compilation —
npm install -g @asciidoctor/cli - Claude CLI: Semantic validation (optional, skip with
--quick)
Learn the methodology:
- Principles - Decided not deciding, zero conditionals, completeness
- Structure - File organization, types, algorithms, data formats
- Frameworks - When to be explicit vs let AI decide
- Anti-Patterns - Common mistakes to avoid
- Validation - 18-point completeness check
See it in practice: Simple API Example
myproject/
├── MANIFEST.adoc # Entry point, composes all parts
├── core/
│ ├── metadata.adoc # System context
│ └── types.adoc # Complete type definitions
├── concerns/
│ ├── performance.adoc # Quantified requirements
│ └── security.adoc # Security constraints
├── interfaces/
│ └── api.adoc # Complete API spec
├── operations/
│ ├── deployment.adoc # Deployment config
│ └── testing.adoc # Test requirements
└── (implementation files) # AI implements here
- Principles - Core concepts
- Structure - Modular organization
- Frameworks - Decision-making
- Anti-Patterns - What not to do
- Workflow - Git-based evolution
- Testing - Test decision framework
- Validation - Completeness checking
- Implementation - What to specify, what to omit
License: MIT Target AI: Claude Code Completion Rate: 90-95%