Skip to main content

COOKBOOK & REACTOR

Universal Multi-Language Infrastructure Ecosystem

Systems Requirements Specification (SRS)

Version: 1.0.0
Status: ACTIVE
Classification: PUBLIC
Generated: 2025-02-23
Standards: IEEE 830, NASA NPR 2220.1, GCHQ Secure Development Principles

πŸ“‹ TABLE OF CONTENTS

  1. Executive Summary
  2. Document Overview
  3. System Architecture
  4. Functional Requirements
  5. Non-Functional Requirements
  6. Requirements Traceability Matrix
  7. Verification & Validation Plan
  8. MCP & Agent Specifications
  9. Acceptance Criteria
  10. 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

AreaCoverage
Repository ManagementMulti-language GitHub organization with linked COOKBOOK/REACTOR repos
Package DistributionPyPI, npm, crates.io, GitHub Releases, Homebrew
DocumentationMintlify auto-generated docs + Obsidian knowledge vault
Knowledge ManagementAirtable unified metadata + Obsidian wiki
Automationn8n workflows (GitHub→Airtable sync, release publishing)
Pattern DiscoveryCross-language concept indexing and search
Agent IntegrationMCP server + XML schemas + agentic tool specs

Key Objectives

  1. βœ… Establish COOKBOOK.DEV as universal pattern library (5 languages, N concepts)
  2. βœ… Establish REACTOR.DEV as polyglot tool ecosystem (production distribution)
  3. βœ… Enable seamless cross-language pattern discovery (content addressable)
  4. βœ… Support agent/LLM automation (MCP + XML schemas)
  5. βœ… 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 & REACTOR ECOSYSTEM                    β”‚
β”‚                                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚     CENTRAL DISCOVERY & INDEX LAYER                   β”‚ β”‚
β”‚  β”‚  (Airtable: Unified metadata, cross-language tagging) β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                    β”‚                                         β”‚
β”‚      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚      β”‚             β”‚          β”‚             β”‚               β”‚
β”‚  β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β” β”Œβ”€β–Όβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚COOKBOOK β”‚  β”‚ REACTOR  β”‚ β”‚  n8n   β”‚ β”‚ Mintlify   β”‚      β”‚
β”‚  β”‚  .dev   β”‚  β”‚  .dev    β”‚ β”‚WORKFLOWβ”‚ β”‚    DOCS    β”‚      β”‚
β”‚  β”‚         β”‚  β”‚          β”‚ β”‚        β”‚ β”‚            β”‚      β”‚
β”‚  β”‚ Recipes β”‚  β”‚ PyPI     β”‚ β”‚Sync &  β”‚ β”‚  Auto-gen  β”‚      β”‚
β”‚  β”‚Patterns β”‚  β”‚ npm      β”‚ β”‚Publish β”‚ β”‚     API    β”‚      β”‚
β”‚  β”‚Blueprintβ”‚  β”‚ crates   β”‚ β”‚ Notify β”‚ β”‚   Refs     β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β”‚ GitHub   β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚       β”‚       β”‚ Releases β”‚                                   β”‚
β”‚       β”‚       β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”˜                                   β”‚
β”‚       β”‚              β”‚                                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚  β”‚    β”‚                         β”‚              β”‚            β”‚
β”‚ β”Œβ–Όβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”    β”‚
β”‚ β”‚ GitHub   β”‚      β”‚ Blog/Content   β”‚    β”‚ Obsidian   β”‚    β”‚
β”‚ β”‚Org(Multi)β”‚      β”‚ (Reactor brand)β”‚    β”‚ Knowledge  β”‚    β”‚
β”‚ β”‚          β”‚      β”‚                β”‚    β”‚ Vault      β”‚    β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚      AGENT/LLM INTERFACE LAYER                      β”‚   β”‚
β”‚  β”‚                                                     β”‚   β”‚
β”‚  β”‚  β€’ MCP Server (mcp.reactor.dev)                    β”‚   β”‚
β”‚  β”‚  β€’ REST API (api.reactor.dev)                      β”‚   β”‚
β”‚  β”‚  β€’ XML Schemas (api.reactor.dev/schemas/)          β”‚   β”‚
β”‚  β”‚  β€’ Tool Specifications (OpenAPI 3.1.0)             β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

COOKBOOK vs REACTOR

AspectCOOKBOOKREACTOR
PurposeExploration & learningProduction & distribution
StatusExperimental, Proven, Battle-testedProduction-grade, Enterprise
AudienceEngineers learning patternsUsers needing production tools
Code QualityWorking examples100% test coverage, linted
DistributionGitHub reposPackage registries (PyPI, npm, crates.io)
MonetizationFree/content-drivenOSS, Freemium, Commercial, Consulting
EvolutionIdeas β†’ Patterns β†’ ToolsProduction β†’ Enterprise licensing

Component Relationships

COOKBOOK RECIPE (Week 1-2)
  └─ Experimental code, rough docs
  └─ "Does this idea work?"
       ↓
COOKBOOK PATTERN (Week 3-4)
  └─ Cleaned code, comprehensive docs
  └─ "This pattern is solid"
       ↓
REACTOR TOOL (Month 2+)
  └─ Production package, published
  └─ "This solves a real problem"
       ↓
REACTOR ENTERPRISE (Month 6+)
  └─ Commercial licensing, consulting
  └─ "Companies pay for this"

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, /shell directories
  • 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
Verification Method:
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
Verification Method:
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
Acceptance Criteria:
  • 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)
Verification Method:
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
Acceptance Criteria:
  • HTTP endpoints follow pattern: /cookbook/{language}/recipes/{recipe-name}/
    • Example: /cookbook/python/recipes/async-retry/, /cookbook/go/patterns/circuit-breaker/
  • 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)
Verification Method:
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
Verification Method:
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.md or architecture-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)
Verification Method:
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)
Verification Method:
Test (manual publish + verification in each registry, rollback testing)
Priority: P0 (Critical) Example Workflow Trigger:
git tag v1.2.3
git push origin v1.2.3
# β†’ GitHub Actions triggered
# β†’ Publishes to PyPI, npm, crates.io simultaneously

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/search with 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)
Verification Method:
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)
Verification Method:
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
Verification Method:
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) β†’ Recipe
    • get_implementations(pattern: str) β†’ ImplementationMatrix
    • recommend_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
Verification Method:
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
Verification Method:
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
Acceptance Criteria:
  • 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)
Verification Method:
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 publish permission only (no delete)
  • crates.io token with publish permission 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: pylint score >= 9.0
  • Go: golangci-lint run passes
  • Rust: cargo clippy with no warnings
  • TypeScript: eslint with strict config
  • Shell: shellcheck with 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
Target: 80%+ across all dimensions

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
Verification:
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=json returns JSON array
  • XML export: GET /api/v1/recipes?format=xml returns XML
  • CSV export: GET /api/v1/recipes?format=csv returns 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 IDTypeRequirementCategoryVerification MethodStatusPriorityDepends On
FR-1.1FuncMulti-language repo organizationRepositoryInspectionNot StartedP0-
FR-1.2FuncCross-language linkingRepositoryTest (UI)Not StartedP0FR-1.1
FR-2.1FuncUnified metadata catalogKnowledge MgmtTest (API)Not StartedP0-
FR-2.2FuncContent addressabilityKnowledge MgmtTest (HTTP)Not StartedP0FR-2.1
FR-3.1FuncAuto-generated API docsDocumentationTest (Render)Not StartedP0-
FR-3.2FuncArchitecture diagramsDocumentationInspectionNot StartedP1-
FR-4.1FuncMulti-registry publishingDistributionTest (Publish)Not StartedP0-
FR-5.1FuncFull-text searchDiscoveryTest (Load)Not StartedP1FR-2.1
FR-5.2FuncConcept navigationDiscoveryTest (UI)Not StartedP1FR-2.1
FR-6.1Funcn8n automationAutomationTest (Workflow)Not StartedP1FR-2.1
FR-7.1FuncMCP serverAgent SupportTest (MCP client)Not StartedP1FR-2.1, FR-2.2
FR-7.2FuncXML schemasAgent SupportTest (XSD valid)Not StartedP1FR-7.1
FR-7.3FuncOpenAPI specsAgent SupportTest (Swagger)Not StartedP1FR-7.1
NFR-1.1Non-FSearch < 100ms p95PerformanceLoad testNot StartedP0FR-5.1
NFR-1.2Non-FDoc load < 2sPerformanceWebPageTestNot StartedP0-
NFR-1.3Non-FPublish < 5minPerformanceWorkflow testNot StartedP1FR-4.1
NFR-1.4Non-FSync < 1hrPerformanceWorkflow logsNot StartedP1FR-6.1
NFR-2.1Non-F99.5% uptimeAvailabilityMonitoringNot StartedP1-
NFR-2.2Non-FGitHub SSOTAvailabilityArchitecture reviewNot StartedP0-
NFR-2.3Non-FGraceful degradationAvailabilityTest (failure mode)Not StartedP1FR-7.1
NFR-3.1Non-F500+ recipes scaleScalabilityLoad testNot StartedP1FR-5.1
NFR-3.2Non-F50 concurrent usersScalabilityLoad testNot StartedP1FR-5.1
NFR-3.3Non-F100+ repos scaleScalabilityStress testNot StartedP1FR-6.1
NFR-4.1Non-FBranch protectionSecurityInspectionNot StartedP1-
NFR-4.2Non-FToken least privilegeSecurityInspectionNot StartedP1FR-4.1
NFR-4.3Non-FMCP rate limitingSecurityTest (429 response)Not StartedP1FR-7.1
NFR-4.4Non-FLeast privilege overallSecurityArchitecture reviewNot StartedP1-
NFR-5.1Non-F100% test coverageMaintainabilityCI/CD reportNot StartedP0-
NFR-5.2Non-FCode lintingMaintainabilityCI/CD reportNot StartedP0-
NFR-5.3Non-F80%+ docsMaintainabilityCoverage toolNot StartedP1-
NFR-5.4Non-FDependency mgmtMaintainabilityDependabotNot StartedP1-
NFR-6.1Non-FSearch indexingDiscoverabilityTest (search)Not StartedP1FR-5.1
NFR-6.2Non-FSEO optimizationDiscoverabilityPageSpeedNot StartedP1-
NFR-6.3Non-FJSON-LD markupDiscoverabilityStructured Data ToolNot StartedP1-
NFR-7.1Non-FData exportInteroperabilityTest (format)Not StartedP1FR-2.2
NFR-7.2Non-FMCP transportInteroperabilityTest (protocol)Not StartedP1FR-7.1
NFR-7.3Non-FAirtable APIInteroperabilityTest (API)Not StartedP1FR-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

/recipes
  β†’ List all recipes with filtering

/recipes/{recipe_id}
  β†’ Get single recipe details + implementations

/search
  β†’ Full-text search with AI ranking

/recipes/{recipe_id}/implementations
  β†’ Get recipe across all languages

/concepts
  β†’ Browse all concepts

/validate
  β†’ Validate recipe against schema

Available Tools

search_recipe(query: str, language?: str) β†’ Recipe[]
  Search recipes by full-text query

get_recipe(recipe_id: str, language?: str) β†’ Recipe
  Retrieve complete recipe including code, tests, examples

get_implementations(pattern: str) β†’ ImplementationMatrix
  Get all implementations of a pattern across languages

recommend_recipe(problem: str, language: str) β†’ Recipe[]
  Get AI-powered recipe recommendations (Claude-powered)

validate_recipe(recipe: Recipe) β†’ ValidationResult
  Validate recipe against schema, return warnings/errors

Agent Example

# Agent (Claude with MCP integration)
Agent: "Show me how to implement async retry in Python"

Claude: [calls MCP tool]
  search_recipe(
    query="async retry exponential backoff",
    language="python"
  )

MCP Response:
{
  "recipes": [
    {
      "id": "recipe-async-retry-001",
      "name": "Async Retry with Exponential Backoff",
      "language": "python",
      "code": "...",
      "examples": ["basic_usage.py", "with_timeout.py"],
      "tests": ["test_retry.py"]
    }
  ]
}

Claude: [renders response to user with code examples]

ACCEPTANCE CRITERIA

Phase 1 Acceptance (Week 1-2)

Foundation Criteria

  • cookbook.dev and reactor.dev domains 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
Sign-Off: Technical lead verifies structure

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)
Sign-Off: Tech lead + QA team

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.dev returning data
  • XML schemas at api.reactor.dev/schemas/ validating recipes
  • All 40+ requirements traced in RTM
  • V&V report generated (100% requirements tested)
Sign-Off: Tech lead + Security lead

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)
Sign-Off: Tech lead + Security lead + Project lead

GLOSSARY & DEFINITIONS

TermDefinition
COOKBOOKR&D layer for recipes (experimental to production-proven patterns) across all languages
REACTORProduction layer for polished, published tools (PyPI, npm, crates.io)
RecipeEarly-stage exploration of a pattern (POC status, working code)
PatternProven approach, battle-tested, safe for production use
BlueprintComplete working system architecture (reference implementation)
ToolGraduated pattern published to package registries (production-grade)
MCPModel Context Protocol - interface for agent/LLM integration
RTMRequirements Traceability Matrix - links requirements to tests
V&VVerification & Validation - confirms system meets requirements
SRSSystems Requirements Specification - this document
CI/CDContinuous Integration/Deployment - automated testing & publishing
p9595th percentile - 95% of measurements below this value
SSOTSingle Source of Truth - canonical data location

DOCUMENT CONTROL

AspectValue
Document IDCOOKBOOK-SRS-001
Version1.0.0
StatusACTIVE
ClassificationPUBLIC
Last Updated2025-02-23
Next Review2025-03-23
Approval[Pending signature]

Change Log

VersionDateAuthorChanges
1.0.02025-02-23Your NameInitial specification release

END OF DOCUMENT

Classification: PUBLIC
Distribution: Open-source community
License: CC-BY-4.0 (Creative Commons Attribution)

Quick Navigation