COOKBOOK & REACTOR
Universal Multi-Language Infrastructure Ecosystem
Systems Requirements Specification (SRS)
Version: 1.0.0Status: ACTIVE
Classification: PUBLIC
Generated: 2025-02-23
Standards: IEEE 830, NASA NPR 2220.1, GCHQ Secure Development Principles
π TABLE OF CONTENTS
- Executive Summary
- Document Overview
- System Architecture
- Functional Requirements
- Non-Functional Requirements
- Requirements Traceability Matrix
- Verification & Validation Plan
- MCP & Agent Specifications
- Acceptance Criteria
- Glossary & Definitions
EXECUTIVE SUMMARY
Vision
Establish a language-agnostic, event-driven architecture pattern system that enables rapid prototyping (COOKBOOK) and production-grade tool distribution (REACTOR) across a complete polyglot technical stack spanning Python, Go, Rust, TypeScript, and Shell.Scope
| Area | Coverage |
|---|---|
| Repository Management | Multi-language GitHub organization with linked COOKBOOK/REACTOR repos |
| Package Distribution | PyPI, npm, crates.io, GitHub Releases, Homebrew |
| Documentation | Mintlify auto-generated docs + Obsidian knowledge vault |
| Knowledge Management | Airtable unified metadata + Obsidian wiki |
| Automation | n8n workflows (GitHubβAirtable sync, release publishing) |
| Pattern Discovery | Cross-language concept indexing and search |
| Agent Integration | MCP server + XML schemas + agentic tool specs |
Key Objectives
- β Establish COOKBOOK.DEV as universal pattern library (5 languages, N concepts)
- β Establish REACTOR.DEV as polyglot tool ecosystem (production distribution)
- β Enable seamless cross-language pattern discovery (content addressable)
- β Support agent/LLM automation (MCP + XML schemas)
- β Maintain 100% code coverage for all recipes (working examples required)
DOCUMENT OVERVIEW
Document Type
Systems Requirements Specification (SRS) per IEEE 830 standard, adapted to include AI/agent automation specifications per NIST guidelines.Classification
PUBLIC - This specification is intended for open-source distribution and community collaboration.Standards Compliance
- IEEE 830-1998: Software Requirements Specifications
- NIST SP 800-53: Control Objectives for Security
- ISO/IEC 25010: Software Quality Model
- NASA NPR 2220.1: Software Engineering Standards
- GCHQ: Secure Development Principles
Audience
- Implementers: Engineers building the system
- Validators: QA teams verifying requirements
- Agents: LLM/Claude querying via MCP
- Community: Open-source contributors
SYSTEM ARCHITECTURE
High-Level System Diagram
COOKBOOK vs REACTOR
| Aspect | COOKBOOK | REACTOR |
|---|---|---|
| Purpose | Exploration & learning | Production & distribution |
| Status | Experimental, Proven, Battle-tested | Production-grade, Enterprise |
| Audience | Engineers learning patterns | Users needing production tools |
| Code Quality | Working examples | 100% test coverage, linted |
| Distribution | GitHub repos | Package registries (PyPI, npm, crates.io) |
| Monetization | Free/content-driven | OSS, Freemium, Commercial, Consulting |
| Evolution | Ideas β Patterns β Tools | Production β Enterprise licensing |
Component Relationships
FUNCTIONAL REQUIREMENTS
FR-1: Multi-Language Repository Organization
FR-1.1: Language-Segregated Directory Structure
Requirement:The system SHALL maintain separate but linked repositories for COOKBOOK and REACTOR, each organized by language and pattern type. Rationale:
Language-specific organization enables developers to quickly locate implementations in their preferred language and discover cross-language variants. This addresses the core need for polyglot pattern library organization. Acceptance Criteria:
-
github.com/your-name/cookbook/exists with/python,/go,/rust,/typescript,/shelldirectories -
github.com/reactor-python/(or-polyglot) exists with tool repos organized by language - Each recipe/tool has standard file structure:
README.md,src/,tests/,examples/, language-specific manifest (pyproject.toml/Cargo.toml/package.json) - Language-specific metadata declares runtime requirements (Python version, Go version, etc.)
- Directory structure validates against schema in CI/CD
Inspection + Automated validation Priority: P0 (Critical) Related Requirements:
- FR-2.1 (Unified metadata catalog)
- NFR-3 (Scalability)
FR-1.2: Cross-Language Linking & Discovery
Requirement:The system SHALL enable discovery of the same pattern implemented in multiple languages through unified cross-references. Rationale:
Cross-language linking transforms COOKBOOK from language-specific reference into universal pattern library. Engineers can compare implementations across languages without switching contexts. Acceptance Criteria:
- Each recipe/pattern metadata includes list of all language implementations
- Documentation site (cookbook.dev) provides language selector for each recipe
- Search results include language filter and language indicators
- Recipe detail pages show parallel code examples (Python | Go | Rust | TypeScript | Shell)
- Navigation enables browsing recipes by concept across all languages
- Backlinks from each implementation point to other language variants
Test (UI testing, link validation) Priority: P0 (Critical) Traceability:
- Links to: User story βAs an engineer, I want to see how a pattern looks in all 5 languagesβ
FR-2: Knowledge Management & Cataloging
FR-2.1: Unified Metadata Catalog (Airtable)
Requirement:Airtable base SHALL serve as single source of truth for all recipes, patterns, blueprints, and tools across all languages, enabling automated discovery and synchronization. Rationale:
Centralized metadata enables:
- Automated syncing of GitHub metrics (stars, forks, last commit)
- Unified search across all content
- Agentic querying (MCP server reads from Airtable)
- Content discoverability
- Airtable base βReactor Portfolioβ exists with table βKnowledge Indexβ
- Schema includes all required fields (see Section C.1 of Technical Specifications)
- All 50+ Python tools + new recipes indexed with cross-language references
- n8n syncs GitHub metrics hourly (stars, forks, last commit, issues)
- Airtable views enable filtering by Status, Language, Concept, Difficulty, Monetization
- Airtable API accessible to MCP server (read-only for agents)
Test (Airtable API audit, n8n workflow execution) Priority: P0 (Critical) Dependencies:
- n8n instance configured
- GitHub API access
- Airtable API key secured
FR-2.2: Content Addressability & Versioning
Requirement:Each recipe SHALL be uniquely addressable by pattern name, language, and version, enabling programmatic access and deep linking. Rationale:
Content addressability enables:
- Persistent URLs for bookmarking/sharing
- Agent discovery (βGet recipe-async-retry-001 in Pythonβ)
- Semantic versioning for recipe evolution
- API-first access
- HTTP endpoints follow pattern:
/cookbook/{language}/recipes/{recipe-name}/- Example:
/cookbook/python/recipes/async-retry/,/cookbook/go/patterns/circuit-breaker/
- Example:
- Each recipe has persistent semantic ID and version (recipe-async-retry-001 v1.2.3)
- JSON API endpoint:
/api/v1/recipes?language=python&concept=concurrency&difficulty=intermediate - URL routing enables both concept-based and language-based navigation
- Redirect handling for moved/renamed recipes (301 redirect with deprecation notice)
Test (HTTP endpoint testing, link validation) Priority: P0 (Critical) Example URLs:
cookbook.dev/python/recipes/async-retry/cookbook.dev/go/patterns/circuit-breaker/cookbook.dev/concepts/concurrency/(shows all implementations)api.reactor.dev/v1/recipes/recipe-async-retry-001?language=python
FR-3: Documentation Generation & Architecture Diagrams
FR-3.1: Auto-Generated API Documentation
Requirement:API documentation SHALL be automatically generated from source code docstrings/comments for all recipes and tools, maintaining consistency across languages. Rationale:
Auto-generation ensures documentation stays synchronized with code. Language-specific formatters handle idiomatic documentation patterns (pydoc, GoDoc, rustdoc, TSDoc). Acceptance Criteria:
- Mintlify integration reads from GitHub repos and auto-generates docs
- Generated docs include: function signatures, parameter descriptions, return types, exceptions, examples
- Language-specific formatters: Python (pydoc), Go (GoDoc), Rust (rustdoc), TypeScript (TSDoc), Shell (ShellDoc)
- Docstring style validation in CI (all functions/methods must have docs)
- docs.reactor.dev and cookbook.reactor.dev render correctly on desktop/tablet/mobile
- Search indexes generated docs for full-text search
Test (Mintlify rendering, mobile responsiveness, search indexing) Priority: P0 (Critical) Related NFR:
- NFR-6 (Discoverability)
FR-3.2: Architecture Diagrams & System Context
Requirement:Each recipe/pattern SHALL include architecture diagrams (boxes & arrows) in standardized format, showing system components, data flows, and interaction patterns. Rationale:
Architecture diagrams provide visual system understanding, enabling quick pattern comprehension. Standardized format (Mermaid/PlantUML) enables version control and programmatic processing. Acceptance Criteria:
- Each recipe includes
architecture-diagram.mdorarchitecture-diagram.mmd(Mermaid format) - Diagrams render in documentation site via Mermaid interpreter
- Mermaid/PlantUML source included (not just images) for version control
- Diagram shows: major components, data flows, interaction patterns, state machines
- Style guide defines standard shapes/colors for boxes & arrows (consistency)
- Diagram validation in CI (valid Mermaid syntax)
Inspection + Automated validation (Mermaid syntax checker) Priority: P1 (Important) Example Diagram (Mermaid):
FR-4: Distribution & Package Management
FR-4.1: Multi-Registry Publishing
Requirement:Reactor tools SHALL be automatically published to language-appropriate registries upon release tag creation, with zero manual intervention. Rationale:
Automated publishing reduces manual errors, ensures consistency, and enables users to install tools via standard package managers. Each language has conventions (PyPI for Python, npm for TypeScript, crates.io for Rust). Acceptance Criteria:
- Python tools: GitHub Actions publishes to PyPI on git tag (workflow:
publish-pypi.yml) - Go tools: Published to GitHub releases with go-gettable import paths (e.g.,
github.com/reactor-python/tool/v1.0.0) - Rust tools: Published to crates.io on cargo release via GitHub Actions
- TypeScript tools: Published to npm on version bump with GitHub Actions
- Shell tools: Distributed as scripts via GitHub releases + Homebrew formula
- All tools include checksum verification (SHA-256)
- Publish workflow includes smoke tests (verify tool can be installed + runs)
Test (manual publish + verification in each registry, rollback testing) Priority: P0 (Critical) Example Workflow Trigger:
FR-5: Search & Discovery
FR-5.1: Full-Text Search with Language & Concept Filtering
Requirement:Users SHALL be able to search recipes/patterns by name, concept, language, difficulty, and tags, with response time under 100ms. Rationale:
Multi-dimensional search enables engineers to find patterns relevant to their specific context (language, problem domain, skill level). Fast response time ensures responsive user experience. Acceptance Criteria:
- Search page at
cookbook.dev/searchwith filter UI - Filters: language (dropdown), concept (multi-select), difficulty (slider), status (checkbox)
- Results return recipes in all matching languages with language badges
- Response time < 100ms p95 (measured with load testing)
- Search index updated within 5 minutes of new recipe push
- Typo tolerance enabled (fuzzy matching for common misspellings)
- Relevance ranking considers match position, recency, popularity (stars)
Test (load testing, search accuracy validation) Priority: P1 (Important) NFR Requirement:
- NFR-1 (Performance: < 100ms)
FR-5.2: Concept-Based Navigation
Requirement:Users SHALL be able to navigate by concept (e.g., βconcurrencyβ) and see all implementations across languages without language-specific filtering. Rationale:
Concept-based navigation shows pattern universality. Engineers realize βcircuit breakerβ problem exists in every language, then find language-specific implementations. Acceptance Criteria:
-
cookbook.dev/concepts/lists all concepts with recipe counts -
cookbook.dev/concepts/concurrency/shows all concurrency recipes/patterns across languages - Each concept page groups implementations by language
- Concept pages linked from recipe detail pages (reciprocal linking)
- Concepts themselves versioned/updated (add new concepts as recipes added)
Test (concept page rendering, linking) Priority: P1 (Important)
FR-6: Automation & Workflow Integration
FR-6.1: n8n Workflow Automation
Requirement:System SHALL automatically sync metadata, trigger builds, publish releases, and send notifications via n8n workflows, requiring no manual intervention. Rationale:
Automation reduces manual effort, ensures consistency, and enables reliable scaling to 50+ recipes. n8n provides visual workflow editor for easy maintenance. Acceptance Criteria:
- Workflow 1: GitHub β Airtable (hourly metadata sync)
- Queries all tool repos, extracts stars/forks/last-commit
- Updates Airtable records (Last Updated, GitHub Stars fields)
- Posts summary to Slack
- Workflow 2: Release tag β PyPI/npm/crates (automated publishing)
- Triggered by GitHub webhook (release created)
- Extracts version, calls package registry APIs
- Verifies install succeeds
- Posts announcement to Slack/Twitter
- Workflow 3: New recipe added β Documentation updated
- Triggered by Airtable webhook (record created)
- Generates doc template in Mintlify
- Creates GitHub issue if docs incomplete
- Workflow 4: Weekly summary β Email + Slack
- Aggregates metrics (production tools, avg stars, docs coverage)
- Calculates week-over-week growth
- Sends formatted report
Test (n8n workflow execution, webhook delivery) Priority: P1 (Important) Dependencies:
- n8n instance (cloud or self-hosted)
- GitHub API tokens
- Airtable API key
- Slack webhook
FR-7: Agent & LLM Support
FR-7.1: MCP Server Interface
Requirement:System SHALL expose Cookbook and Reactor data via Model Context Protocol (MCP) server, enabling LLM agents to autonomously query and recommend recipes. Rationale:
MCP enables Claude/agents to be embedded into engineering workflows. Engineers can ask agents βshow me async retry patterns in all languagesβ and get structured responses with runnable code. Acceptance Criteria:
- MCP server deployed at
mcp.reactor.dev:8080(HTTP SSE transport) - Resources exposed:
/recipes,/patterns,/blueprints,/tools,/concepts - Tools exposed:
search_recipe(query: str, language?: str) β Recipe[]get_recipe(recipe_id: str, language?: str) β Recipeget_implementations(pattern: str) β ImplementationMatrixrecommend_recipe(problem: str, language: str) β Recipe[]validate_recipe(recipe: Recipe) β ValidationResult
- Authentication via Bearer token (API key)
- Rate limiting: 10 req/sec per token
- Agents can execute recipes by parsing JSON response
Test (MCP client connects, tools respond with correct schema) Priority: P1 (Important) MCP Spec Reference:
See Section 8.2 of Technical Specifications (OpenAPI 3.1.0 definition)
FR-7.2: Structured XML Schemas
Requirement:All recipe/pattern/tool data SHALL be available in structured XML format for agent processing, validated against XSD schemas. Rationale:
XML schemas provide strict validation, enabling agents to rely on consistent data structure. Agents can deserialize XML into typed objects for safe processing. Acceptance Criteria:
- XSD schema file at
api.reactor.dev/schemas/recipe.xsd - API endpoints return JSON + XML formats (
?format=json|xml) - Recipes serialized to XML must validate against XSD (automated in CI)
- Schema enforces: required fields, enumerated types, data types, cardinality
- Schema versioning:
/schemas/recipe.xsd(v1) allows future/schemas/recipe-v2.xsd
Test (XML validation against XSD, round-trip serialization) Priority: P1 (Important) Related to:
- FR-7.1 (MCP Server)
FR-7.3: Agentic Tool Specifications (OpenAPI)
Requirement:System SHALL define machine-readable tool specifications in OpenAPI 3.1.0 format, enabling agents to understand inputs/outputs and call tools safely. Rationale:
OpenAPI specs enable agents to:
- Understand what tools exist and what they do
- Call tools with correct parameters
- Parse responses reliably
- Generate code that uses tools
- OpenAPI spec at
api.reactor.dev/openapi/reactor-tools.yaml(v3.1.0) - Each tool defined with operationId, parameters, response schema, errors
- Parameter validation (required, types, constraints)
- Error responses documented (400, 404, 422, 429)
- Security scheme defined (Bearer token)
- Rate limit headers documented
- Spec validates against OpenAPI 3.1.0 schema (in CI)
Test (Swagger/OpenAPI validator passes, agents can parse spec) Priority: P1 (Important)
NON-FUNCTIONAL REQUIREMENTS
NFR-1: Performance Requirements
NFR-1.1: Search Response Time
Requirement:Search queries SHALL respond within 100ms at p95 latency with typical workload. Measurement:
p95 = 95th percentile (i.e., 95% of requests faster than this) Verification:
Load test with 50 concurrent users, 10,000 recipes indexed. Target: 100ms p95
NFR-1.2: Documentation Site Load Time
Requirement:Documentation sites (cookbook.dev, reactor.dev) SHALL load completely within 2 seconds on 4G connection. Measurement:
Page load time (start navigation β paint ready) measured via Lighthouse Verification:
WebPageTest with 4G throttling, multiple page templates Target: 2 seconds p95
NFR-1.3: Package Publishing Latency
Requirement:Packages (PyPI, npm, crates.io) SHALL receive publishes within 5 minutes of git tag creation. Measurement:
Time from
git push tag to package appears in registry
Verification:Automated publish test workflow Target: 5 minutes p95
NFR-1.4: Metadata Synchronization
Requirement:Airtable sync via n8n SHALL complete within 1 hour (hourly cadence). Measurement:
Time from GitHub API query start to Airtable update completion Verification:
n8n execution logs Target: < 30 minutes per sync (1-hour cadence allows for delays)
NFR-2: Availability Requirements
NFR-2.1: Documentation Site Uptime
Requirement:Documentation sites SHALL maintain 99.5% uptime (average measured monthly). Rationale:
99.5% uptime = ~3.5 hours downtime/month (acceptable for non-critical content) Measurement:
Uptime monitoring via Pingdom/UptimeRobot Verification:
Monthly uptime reports Target: 99.5% (max 3.5 hours/month downtime)
NFR-2.2: Source of Truth
Requirement:GitHub repositories SHALL remain the canonical source of truth with no single point of failure. Rationale:
If Airtable, Mintlify, or MCP server fails, all data still exists in GitHub. Users can still clone repos and use tools offline. Verification:
Architecture review, backup testing
NFR-2.3: Graceful Degradation
Requirement:MCP server SHALL support graceful degradation (fallback to cached data if external APIs unreachable). Acceptance Criteria:
- MCP server has local cache of recipes (updated daily)
- If Airtable API fails, cached data served with staleness warning
- If GitHub API fails, use previously cached metrics
- Degraded mode logged and alerted
NFR-3: Scalability Requirements
NFR-3.1: Recipe Scaling
Requirement:System architecture SHALL scale to 500+ recipes across all languages without performance degradation. Measurement:
Search time, page load time measured with 500 recipes indexed Verification:
Load test with 500 recipes Target:
- Search < 100ms (still holds at 500 recipes)
- Page load < 2s (still holds)
- Airtable sync < 30 minutes
NFR-3.2: Concurrent User Load
Requirement:Search index SHALL support 50+ concurrent users without response time degradation. Measurement:
Response time distribution with 50 concurrent search requests Verification:
Load test:
wrk -t 8 -c 50 -d 60s https://cookbook.dev/search
Target: p95 response time < 100ms under load
NFR-3.3: Repository Management
Requirement:n8n workflows SHALL handle 100+ repositories with hourly sync cadence. Measurement:
n8n execution time with 100 repos Verification:
n8n stress test Target: < 30 minutes for full sync of 100 repos
NFR-4: Security Requirements
NFR-4.1: Branch Protection
Requirement:All repositories SHALL use branch protection rules requiring status checks and code review. Acceptance Criteria:
- Master/main branch requires 1 approval before merge
- Require status checks pass (CI/CD)
- Dismiss stale reviews on new commits
- Require up-to-date branches before merge
NFR-4.2: Package Publishing Security
Requirement:Package publishing to PyPI/npm/crates SHALL use API tokens with minimal permissions (publish only). Acceptance Criteria:
- PyPI API token limited to specific package(s)
- npm token with
publishpermission only (no delete) - crates.io token with
publishpermission only - Tokens rotated quarterly
- Tokens stored in GitHub Secrets (encrypted)
- Tokens never logged
NFR-4.3: MCP Authentication & Rate Limiting
Requirement:MCP server SHALL authenticate clients and enforce rate limiting. Acceptance Criteria:
- Bearer token authentication required
- Rate limit: 10 req/sec per token
- Rate limit headers in responses:
X-RateLimit-Remaining,X-RateLimit-Reset - 429 (Too Many Requests) response on limit exceeded
- Token revocation/rotation possible
NFR-4.4: Principle of Least Privilege
Requirement:All infrastructure code SHALL follow principle of least privilege. Acceptance Criteria:
- GitHub Actions workflows use minimal scopes (
contents: read,pull-requests: read) - n8n workflows use separate API keys per integration
- Airtable API key has read-only scope for agents
- No hardcoded secrets (use GitHub Secrets)
NFR-5: Maintainability Requirements
NFR-5.1: Test Coverage
Requirement:All recipes SHALL have 100% test coverage (unit + integration). Measurement:
Code coverage percentage measured by language-specific tools Verification:
CI/CD reports coverage, blocks merge if < 100% Tools:
- Python:
pytest --cov - Go:
go test -cover - Rust:
cargo tarpaulin - TypeScript:
jest --coverage - Shell:
bats+ statement coverage
NFR-5.2: Code Linting
Requirement:Code SHALL follow language-specific linters with no violations. Acceptance Criteria:
- Python:
pylintscore >= 9.0 - Go:
golangci-lint runpasses - Rust:
cargo clippywith no warnings - TypeScript:
eslintwith strict config - Shell:
shellcheckwith no violations
NFR-5.3: Documentation Completeness
Requirement:Documentation SHALL be maintained at 80%+ coverage for all recipes. Measurement:
Percentage of code with docstrings + README + examples + API docs Verification:
- Docstring coverage tool (pydocstyle, etc.)
- README exists and has minimum 500 characters
- At least 1 working example per recipe
- API docs auto-generated and rendering
NFR-5.4: Dependency Management
Requirement:All dependencies SHALL be pinned and regularly updated. Acceptance Criteria:
- Dependency versions pinned in
pyproject.toml,Cargo.toml,package.json, etc. - Automated dependency updates (Dependabot) create PRs weekly
- Security scanning enabled (Trivy, snyk)
- Outdated dependencies flagged and updated quarterly
NFR-6: Discoverability Requirements
NFR-6.1: Search Indexing
Requirement:Each recipe SHALL be indexable via search endpoint with multiple query dimensions. Acceptance Criteria:
- Search endpoint:
cookbook.dev/search?q={query}&language={lang}&concept={concept}&difficulty={difficulty} - All fields indexed: name, description, code, examples, concepts, languages
- Search returns results in < 100ms
NFR-6.2: SEO Optimization
Requirement:SEO optimization SHALL target long-tail keywords for organic discovery. Acceptance Criteria:
- Meta tags on all recipe pages (title, description, og:image)
- Target keywords in content: βcircuit breaker pattern python asyncβ, βerror handling rust tokioβ, etc.
- Sitemap.xml generated and submitted to Google Search Console
- Mobile-first responsive design
- Core Web Vitals: LCP < 2.5s, FID < 100ms, CLS < 0.1
Google PageSpeed Insights, Lighthouse scores >= 90
NFR-6.3: Structured Data Markup
Requirement:JSON-LD structured data SHALL be included for all recipes to enable Google rich results. Acceptance Criteria:
- JSON-LD markup for Article schema (recipe pages)
- Includes: headline, description, author, datePublished, keywords
- Validates with Google Structured Data Testing Tool
NFR-7: Interoperability Requirements
NFR-7.1: Data Export Formats
Requirement:Recipe metadata SHALL be importable/exportable in standard formats. Acceptance Criteria:
- JSON export:
GET /api/v1/recipes?format=jsonreturns JSON array - XML export:
GET /api/v1/recipes?format=xmlreturns XML - CSV export:
GET /api/v1/recipes?format=csvreturns spreadsheet - All formats include complete metadata (no truncation)
NFR-7.2: MCP Transport Flexibility
Requirement:MCP server SHALL support multiple transport protocols. Acceptance Criteria:
- HTTP/SSE transport (for browser clients)
- stdio transport (for subprocess integration)
- Both transports authenticated and rate-limited
NFR-7.3: Airtable API Access
Requirement:Airtable base SHALL be readable from external tools via REST API. Acceptance Criteria:
- Airtable API key configured for MCP server
- Read-only access (no create/update/delete)
- Queries return consistent schema
- Pagination supported for large result sets
REQUIREMENTS TRACEABILITY MATRIX
Overview
The RTM below links each requirement to its verification method and status.| Req ID | Type | Requirement | Category | Verification Method | Status | Priority | Depends On |
|---|---|---|---|---|---|---|---|
| FR-1.1 | Func | Multi-language repo organization | Repository | Inspection | Not Started | P0 | - |
| FR-1.2 | Func | Cross-language linking | Repository | Test (UI) | Not Started | P0 | FR-1.1 |
| FR-2.1 | Func | Unified metadata catalog | Knowledge Mgmt | Test (API) | Not Started | P0 | - |
| FR-2.2 | Func | Content addressability | Knowledge Mgmt | Test (HTTP) | Not Started | P0 | FR-2.1 |
| FR-3.1 | Func | Auto-generated API docs | Documentation | Test (Render) | Not Started | P0 | - |
| FR-3.2 | Func | Architecture diagrams | Documentation | Inspection | Not Started | P1 | - |
| FR-4.1 | Func | Multi-registry publishing | Distribution | Test (Publish) | Not Started | P0 | - |
| FR-5.1 | Func | Full-text search | Discovery | Test (Load) | Not Started | P1 | FR-2.1 |
| FR-5.2 | Func | Concept navigation | Discovery | Test (UI) | Not Started | P1 | FR-2.1 |
| FR-6.1 | Func | n8n automation | Automation | Test (Workflow) | Not Started | P1 | FR-2.1 |
| FR-7.1 | Func | MCP server | Agent Support | Test (MCP client) | Not Started | P1 | FR-2.1, FR-2.2 |
| FR-7.2 | Func | XML schemas | Agent Support | Test (XSD valid) | Not Started | P1 | FR-7.1 |
| FR-7.3 | Func | OpenAPI specs | Agent Support | Test (Swagger) | Not Started | P1 | FR-7.1 |
| NFR-1.1 | Non-F | Search < 100ms p95 | Performance | Load test | Not Started | P0 | FR-5.1 |
| NFR-1.2 | Non-F | Doc load < 2s | Performance | WebPageTest | Not Started | P0 | - |
| NFR-1.3 | Non-F | Publish < 5min | Performance | Workflow test | Not Started | P1 | FR-4.1 |
| NFR-1.4 | Non-F | Sync < 1hr | Performance | Workflow logs | Not Started | P1 | FR-6.1 |
| NFR-2.1 | Non-F | 99.5% uptime | Availability | Monitoring | Not Started | P1 | - |
| NFR-2.2 | Non-F | GitHub SSOT | Availability | Architecture review | Not Started | P0 | - |
| NFR-2.3 | Non-F | Graceful degradation | Availability | Test (failure mode) | Not Started | P1 | FR-7.1 |
| NFR-3.1 | Non-F | 500+ recipes scale | Scalability | Load test | Not Started | P1 | FR-5.1 |
| NFR-3.2 | Non-F | 50 concurrent users | Scalability | Load test | Not Started | P1 | FR-5.1 |
| NFR-3.3 | Non-F | 100+ repos scale | Scalability | Stress test | Not Started | P1 | FR-6.1 |
| NFR-4.1 | Non-F | Branch protection | Security | Inspection | Not Started | P1 | - |
| NFR-4.2 | Non-F | Token least privilege | Security | Inspection | Not Started | P1 | FR-4.1 |
| NFR-4.3 | Non-F | MCP rate limiting | Security | Test (429 response) | Not Started | P1 | FR-7.1 |
| NFR-4.4 | Non-F | Least privilege overall | Security | Architecture review | Not Started | P1 | - |
| NFR-5.1 | Non-F | 100% test coverage | Maintainability | CI/CD report | Not Started | P0 | - |
| NFR-5.2 | Non-F | Code linting | Maintainability | CI/CD report | Not Started | P0 | - |
| NFR-5.3 | Non-F | 80%+ docs | Maintainability | Coverage tool | Not Started | P1 | - |
| NFR-5.4 | Non-F | Dependency mgmt | Maintainability | Dependabot | Not Started | P1 | - |
| NFR-6.1 | Non-F | Search indexing | Discoverability | Test (search) | Not Started | P1 | FR-5.1 |
| NFR-6.2 | Non-F | SEO optimization | Discoverability | PageSpeed | Not Started | P1 | - |
| NFR-6.3 | Non-F | JSON-LD markup | Discoverability | Structured Data Tool | Not Started | P1 | - |
| NFR-7.1 | Non-F | Data export | Interoperability | Test (format) | Not Started | P1 | FR-2.2 |
| NFR-7.2 | Non-F | MCP transport | Interoperability | Test (protocol) | Not Started | P1 | FR-7.1 |
| NFR-7.3 | Non-F | Airtable API | Interoperability | Test (API) | Not Started | P1 | FR-2.1 |
VERIFICATION & VALIDATION PLAN
V&V Strategy Overview
Verification: Confirms system is built right (does it meet requirements?) Validation: Confirms right system is built (does it solve the problem?)Phase 1: Static Verification
Code Linting
- Tools: pylint, golangci-lint, clippy, eslint, shellcheck
- Criteria: No violations, pass on every commit
- Execution: CI/CD (GitHub Actions)
Schema Validation
- Targets: Recipe metadata, XML schemas, Airtable structure
- Tools: JSON Schema validator, XSD validator, custom validators
- Execution: CI/CD
Diagram Syntax
- Targets: Mermaid/PlantUML diagrams
- Tools: Mermaid validator, PlantUML compiler
- Execution: CI/CD
Phase 2: Unit Testing
Coverage Requirement
- Target: 100% code coverage per recipe
- Tools: pytest, go test, cargo tarpaulin, jest, bats
- Acceptance: All lines executed at least once
Test Execution Time
- Target: < 30 seconds per recipe
- Measurement: CI/CD logs
- Acceptance: p95 < 30s
Phase 3: Integration Testing
Multi-Language Composition
- Scenario: Python calls Go service via HTTP
- Verification: Service responds correctly, error handling works
- Tools: Integration test framework (pytest, go test)
CI/CD Pipeline
- Scenario: Push code β test β lint β publish
- Verification: Pipeline executes without manual intervention
- Tools: GitHub Actions logs
Package Publishing
- Scenario: Git tag v1.0.0 β appears on PyPI/npm/crates
- Verification: Smoke test (install + run tool)
- Tools: Custom verification script
Phase 4: API Testing
MCP Compliance
- Tools: Anthropic MCP test suite
- Criteria: All tools callable, responses match schema, error handling correct
REST API
- Tools: Postman, curl, automated testing
- Scenarios: GET recipes, search, filter, paginate
XML Schema Validation
- Tools: XSD validator
- Criteria: All recipe XML validates against schema
Phase 5: Performance Testing
Search Latency
- Test: 10,000 recipes indexed, 50 concurrent users, 1000 search requests
- Tool:
wrk,vegeta, or similar load tester - Success Criterion: p95 < 100ms
Page Load Time
- Test: WebPageTest with 4G throttle, multiple page types
- Tool: WebPageTest, Lighthouse
- Success Criterion: < 2s load time
Airtable Sync
- Test: Sync 100 repos hourly
- Tool: n8n execution logs
- Success Criterion: Completes within 30 minutes
Phase 6: User Acceptance Testing (UAT)
Discoverability
- Scenario: New engineer lands on cookbook.dev, finds async-retry pattern in Python
- Success: Finds recipe within 2 minutes, understands purpose/usage
Forking & Adaptation
- Scenario: Engineer forks recipe, modifies for their project
- Success: Recipe code runs with minimal changes, examples work
Cross-Language Comparison
- Scenario: Engineer views circuit-breaker in Python, Go, Rust, TypeScript
- Success: Can compare implementations and understand tradeoffs
Phase 7: Agent Testing (New)
MCP Server Connectivity
- Scenario: Claude connects to MCP server, queries recipes
- Tool: Anthropic Claude + MCP test client
- Success: Agent receives recipes, can parse and use them
Autonomous Recipe Finding
- Scenario: Agent asked βShow me async patterns for Pythonβ
- Tool: Claude with MCP integration
- Success: Agent finds relevant recipes, provides code samples
Schema Validation
- Scenario: Agent receives XML recipe, parses into typed object
- Tool: Agent test harness
- Success: Deserialization succeeds, types correct
MCP & AGENT SPECIFICATIONS
MCP Server Definition
Location:mcp.reactor.dev (HTTP SSE transport)Spec: OpenAPI 3.1.0
Authentication: Bearer token
Rate Limit: 10 req/sec per token
Available Resources
Available Tools
Agent Example
ACCEPTANCE CRITERIA
Phase 1 Acceptance (Week 1-2)
Foundation Criteria
-
cookbook.devandreactor.devdomains registered and resolving - GitHub organizations created
-
github.com/your-name/cookbook -
github.com/reactor-python(or-polyglot)
-
- Airtable base created with schema
- 5 initial recipes added (1 per language: Python, Go, Rust, TypeScript, Shell)
- Each has:
README.md,src/,tests/,examples/,architecture-diagram.mmd
- Each has:
Phase 2 Acceptance (Week 3-4)
Infrastructure Criteria
- Mintlify documentation site live and rendering recipes
- n8n workflows deployed:
- GitHub β Airtable sync (hourly)
- Release β publish to package registries
- GitHub Actions CI/CD pipelines green for all recipes
- Search functionality working (filter by language, concept, difficulty)
Phase 3 Acceptance (Week 5-6)
Agent & Testing Criteria
- MCP server deployed and responding to tool calls
- Claude successfully queries Cookbook recipes via MCP
- JSON API at
api.reactor.devreturning data - XML schemas at
api.reactor.dev/schemas/validating recipes - All 40+ requirements traced in RTM
- V&V report generated (100% requirements tested)
Phase 4 Acceptance (Week 7-8)
Production Readiness Criteria
- 20+ recipes indexed in Airtable
- 5+ patterns with implementations in 3+ languages
- 100% test coverage for all recipes (CI enforced)
- 80%+ documentation completeness
- Performance benchmarks passed:
- Search < 100ms p95
- Page load < 2s
- Publish < 5min latency
- Security audit completed (branch protection, secrets management)
- Dependency scan clean (Trivy)
GLOSSARY & DEFINITIONS
| Term | Definition |
|---|---|
| COOKBOOK | R&D layer for recipes (experimental to production-proven patterns) across all languages |
| REACTOR | Production layer for polished, published tools (PyPI, npm, crates.io) |
| Recipe | Early-stage exploration of a pattern (POC status, working code) |
| Pattern | Proven approach, battle-tested, safe for production use |
| Blueprint | Complete working system architecture (reference implementation) |
| Tool | Graduated pattern published to package registries (production-grade) |
| MCP | Model Context Protocol - interface for agent/LLM integration |
| RTM | Requirements Traceability Matrix - links requirements to tests |
| V&V | Verification & Validation - confirms system meets requirements |
| SRS | Systems Requirements Specification - this document |
| CI/CD | Continuous Integration/Deployment - automated testing & publishing |
| p95 | 95th percentile - 95% of measurements below this value |
| SSOT | Single Source of Truth - canonical data location |
DOCUMENT CONTROL
| Aspect | Value |
|---|---|
| Document ID | COOKBOOK-SRS-001 |
| Version | 1.0.0 |
| Status | ACTIVE |
| Classification | PUBLIC |
| Last Updated | 2025-02-23 |
| Next Review | 2025-03-23 |
| Approval | [Pending signature] |
Change Log
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0.0 | 2025-02-23 | Your Name | Initial specification release |
END OF DOCUMENT
Classification: PUBLICDistribution: Open-source community
License: CC-BY-4.0 (Creative Commons Attribution)