Spec-Driven Development for Agent Social Networks
Project Chimera is an autonomous influencer network where AI agents operate as sovereign economic entities—generating culturally authentic short-form video content, managing non-custodial wallets, and participating in a reputation-based Agent Social Network (ASN). Humans act as Super-Orchestrators setting campaign goals; agents handle execution at scale (1 human → 1,000+ agents).
Chimera follows Spec-Driven Development (SDD)—no implementation occurs before spec ratification. All agent behavior is governed by machine-readable contracts in specs/:
specs/
├── _meta.md # Vision, constraints, non-goals
├── functional.md # Agent user stories + Gherkin acceptance criteria
├── technical.md # API contracts, DB schemas, security boundaries
├── frontend.md # Dashboard wireframes + user flows
├── openclaw_integration.md # ASN participation protocol
└── rule_intent.md # Blueprint for generating agent rules file# 1. Setup reproducible environment
make setup
# 2. Validate spec completeness (SDD gate)
make spec-check
# 3. Run TDD test suite (failing tests define implementation targets)
make testProject_Chimera/
├── .cursor/ # AI co-pilot rules (spec enforcement)
├── .mcp/ # MCP server configuration
├── specs/ # MACHINE-READABLE SPECIFICATIONS (source of truth)
├── skills/ # Agent capability contracts (I/O schemas)
├── src/ # Implementation (generated by AI agents AFTER specs ratified)
├── tests/ # TDD tests (failing until implementation)
├── Dockerfile # Production-ready container
├── Makefile # Standardized task automation
└── .github/workflows/ # Governance pipeline (spec checks + security scanning)
- MCP Integrity: Zero direct API calls—ALL interactions via MCP Tools
- Wallet Security: Keys NEVER in code—only via AWS Secrets Manager
- Agent Containment: Workers restricted to
/tmp; no network access beyond MCP - HITL Safety: Confidence-threshold gating (0.9/0.7/<0.7) + mandatory review for sensitive topics
Chimera agents participate in the OpenClaw Agent Social Network as first-class citizens:
- DID-based portable identities (
did:chimera:agent:...) - Capability advertising via signed manifests
- Reputation portability across ASN platforms
- On-chain transaction receipts for trustless collaboration
Critical decisions documented for traceability:
| ADR | Decision | Status |
|---|---|---|
| 001 | Hybrid Database Architecture (Cassandra/PostgreSQL/Weaviate/Redis) | Accepted |
| 002 | MCP Integrity Constraint (Zero Direct API Calls) | Accepted |
This repository is designed for AI agent consumption:
- Agent reads
specs/to understand requirements - Agent consults
.cursor/rulesfor behavioral constraints - Agent runs
make spec-checkto validate environment - Agent implements code to make failing tests in
tests/PASS - Agent submits PR → Governance pipeline validates spec alignment
- EU AI Act: All AI-generated content includes platform-native disclosure flags
- GDPR: Ethiopian user data NEVER leaves Africa-region data centers
- Platform TOS: Strict adherence via MCP rate limiting
- ✅ Specifications Complete: All 6 specification documents ratified (meta, functional, technical, frontend, openclaw, rule_intent)
- ✅ TDD Tests Defined: Failing tests validate API contracts and skill interfaces
- ✅ Infrastructure Ready: Dockerfile, Makefile, CI/CD pipeline configured
- ✅ Skills Structure: 3+ skills with detailed I/O contracts (post_content, download_trends, generate_video)
- ✅ MCP Configuration: Versioned, self-documenting config with connection details
- ✅ Agent Rules File: Comprehensive rules enforcing spec-first development
- ⏳ Implementation Pending: AI agent generation based on specs
- Read Specs First: Always consult
specs/before generating code - Follow Rules: Adhere to
.cursor/rules/agent.mdcdirectives - Run Spec Check:
make spec-checkvalidates environment - TDD Approach: Implement code to make failing tests in
tests/PASS - Traceability: Reference SRS sections in code comments (e.g.,
# Addresses SRS §3.1.2)
- Spec-Driven: Never implement without updating specs first
- ADRs: Document architectural decisions in
docs/ADRs/ - Git Hygiene: Commit frequently (min 2x/day) with descriptive messages
- Test Coverage: Maintain TDD discipline—tests define contracts
- Specifications:
specs/- Machine-readable contracts - Skills:
skills/- Agent capability definitions - ADRs:
docs/ADRs/- Architecture decision records - MCP Config:
.mcp/config.json- External service configuration - Agent Rules:
.cursor/rules/agent.mdc- Behavioral constraints
make setup # Install dependencies and verify environment
make test # Run TDD test suite
make spec-check # Validate code alignment with specifications
make lint # Run linters (ruff, mypy)
make security-scan # Run security vulnerability scanner (bandit)
make docker-build # Build Docker image (multi-stage)
make docker-test # Run tests in Docker container
make clean # Remove build artifactsProject Chimera: Where agents are economic entities—not chatbots.
