### Run Simple Producer Consumer Example (Bash) Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/kafka-getting-started.md These commands navigate to a simple producer-consumer example, install its dependencies, and start the application. It's a basic example to demonstrate Kafka message flow. ```bash cd simple-producer-consumer npm install npm start ``` -------------------------------- ### Setup Kafka Locally with Docker Compose Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-kafka/examples/simple-producer-consumer/README.md This bash script demonstrates how to set up a local Kafka cluster using Docker Compose. It installs dependencies, copies an example environment file, and starts the Kafka services. Ensure Docker and Docker Compose are installed. ```bash # Install dependencies npm install # Configure environment cp .env.example .env # Edit .env with your Kafka broker addresses # Start Kafka locally (if needed) docker-compose up -d ``` -------------------------------- ### Quick Exercise: Verify Installation Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/academy/specweave-essentials/01-getting-started.md A set of commands to quickly verify that SpecWeave is installed and functioning correctly within your project. ```bash # 1. Check status /sw:status # 2. Explore the structure ls .specweave/ # 3. View config cat .specweave/config.json ``` -------------------------------- ### Install and Run Kafka Streams App (Bash) Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-kafka/examples/kafka-streams-app/README.md Installs the necessary Node.js dependencies and starts the Kafka Streams application. Assumes Node.js and npm are installed and configured. ```bash npm install npm run streams ``` -------------------------------- ### Bash Vite Project Setup Example Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-docs/skills/technical-writing/SKILL.md A sequence of bash commands to set up a new project using Vite, navigate into the project directory, and install dependencies. This is typical for the setup step in tutorials. ```bash npm create vite@latest my-project cd my-project npm install ``` -------------------------------- ### SpecWeave CLI Installation and Project Initialization Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/getting-started/quickstart.md Installs the SpecWeave CLI globally and initializes a new project. This includes setting up a project directory, running an initial setup command, and then using an AI tool like Claude Code to define project requirements for autonomous development. ```bash # Install npm install -g specweave # Create project mkdir eventmgmt && cd eventmgmt specweave init . # Open Claude Code and describe: "Build an event management SaaS with Next.js 14, Prisma, NextAuth.js, Stripe payments, deployed on Hetzner Cloud" # SpecWeave autonomously creates: # - PRD with market research # - Architecture with C4 diagrams # - Database schema (Prisma) # - Auth system (NextAuth.js) # - Payment integration (Stripe) # - Infrastructure (Terraform for Hetzner) # - Deployment pipeline ([GitHub Actions](/docs/glossary/terms/github-actions)) # - Tests ([Playwright](/docs/glossary/terms/playwright) [E2E](/docs/glossary/terms/e2e) + Jest) # - Living documentation (auto-updates) # Then say: "Implement the MVP" # SpecWeave builds the entire application! ``` -------------------------------- ### Bash Command for Development Setup Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/academy/fundamentals/enterprise-app-development.md Provides a bash command to automate the setup of a development environment. This includes installing dependencies, seeding the database, and starting necessary services with a single command, improving developer onboarding. ```bash make dev-setup # Installs all dependencies, seeds database, starts services ``` -------------------------------- ### Install and Initialize SpecWeave Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/intro.md These commands demonstrate how to install SpecWeave globally using npm and then initialize it within a project directory. This is the initial setup required to start using SpecWeave's features. ```bash # Install globally npm install -g specweave # Initialize in your project cd your-project specweave init . ``` -------------------------------- ### Explore Kafka Examples (Bash) Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/kafka-getting-started.md This command lists the available working code examples for Kafka within the SpecWeave plugins directory. It helps users discover and learn from pre-built implementations. ```bash ls plugins/sw-kafka/examples/ ``` -------------------------------- ### SpecWeave Configuration File Example Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/getting-started/quickstart.md An example of the `.specweave/config.yaml` file, demonstrating optional configuration settings for project type, hooks, testing, and integrations with external services like GitHub and JIRA. ```yaml project: name: "your-project" type: "greenfield" # or "brownfield" hooks: enabled: true post_task_completion: enabled: true testing: e2e_playwright_mandatory_for_ui: true min_coverage: 80 integrations: github: enabled: true jira: enabled: false ``` -------------------------------- ### Setup Project Dependencies and Configuration Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-kafka/examples/avro-schema-registry/README.md Installs project dependencies using npm and copies an example environment configuration file. Users need to configure Kafka brokers and Schema Registry URL in the .env file. ```bash npm install cp .env.example .env # Configure KAFKA_BROKERS and SCHEMA_REGISTRY_URL ``` -------------------------------- ### Example AI Conversation and Problem Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/academy/specweave-essentials/01-getting-started.md Illustrates a typical AI conversation scenario and highlights the problem of lost context and evaporated knowledge when the session ends. ```text Monday morning: You: "Claude, help me design the user profile feature" Claude: "Sure! Let's use a flexible schema with avatar uploads..." → Great conversation, smart decisions made → Session ends Thursday: Teammate: "Why did we use that schema for profiles?" You: "Uh... let me check Slack? Maybe there's a doc somewhere?" → Decision lost → Context missing → Knowledge evaporated ``` -------------------------------- ### Create Getting Started Section Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/DOCUMENTATION-RESTRUCTURE-PLAN.md This section details the creation of a new 'getting-started/' directory and its main index file. It involves creating the directory and then defining the content for `docs-site/docs/getting-started/index.md` using markdown, including a table to guide users through different learning paths. ```bash mkdir -p docs-site/docs/getting-started/ ``` -------------------------------- ### Developer Onboarding Example (Bash) Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/glossary/terms/specs.md Demonstrates how a new developer can use living documentation to quickly understand a project's scope, decisions, and usage. ```bash # New developer joins team # Reads: .specweave/docs/internal/specs/spec-001-authentication.md # Learns: # - What was built (35 user stories) # - Why decisions were made (3 ADRs) # - How to use the system (architecture docs) # - What tests exist (test coverage: 90%) # Result: Productive in hours, not weeks ``` -------------------------------- ### Bash: Fresh Jira Setup with Project and Board Creation Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-jira/skills/jira-resource-validator/SKILL.md This example details the process of setting up a new Jira project and its associated boards from scratch using the `/sw-jira:sync` command. It covers user interaction for project creation and automatic board generation. ```bash # From TypeScript npx tsx src/utils/external-resource-validator.ts # Or via skill activation "Can you validate my Jira configuration?" ``` -------------------------------- ### Install and Initialize Specweave Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/getting-started/quickstart.md Installs Specweave globally using npm and initializes a new project in the current directory. This is a common starting point for new Specweave projects. ```bash npm install -g specweave && specweave init . ``` -------------------------------- ### Verify Node.js and npm Installation Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/mobile/react-native-setup-guide.md Checks if Node.js and npm are installed and displays their versions. Requires Node.js to be installed on the system. ```bash node --version npm --version ``` -------------------------------- ### Verify SpecWeave Installation Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/academy/specweave-essentials/01-getting-started.md Checks if the SpecWeave CLI has been installed correctly by displaying its version. This command should output the installed version number. ```bash specweave --version ``` -------------------------------- ### Project-Specific Release Strategy File Structure Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-release/commands/init.md Shows an example of how release strategy documentation can be organized on a per-project basis within a multi-project setup. This allows for tailored release strategies for different components like frontend, backend, or mobile. ```text .specweave/docs/internal/projects/frontend/delivery/release-strategy.md .specweave/docs/internal/projects/backend/delivery/release-strategy.md .specweave/docs/internal/projects/mobile/delivery/release-strategy.md ``` -------------------------------- ### Install SpecWeave CLI Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/academy/specweave-essentials/01-getting-started.md Installs the SpecWeave command-line interface globally using npm. This command requires Node.js and npm to be installed on your system. ```bash npm install -g specweave ``` -------------------------------- ### SpecWeave Solution Example Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/academy/specweave-essentials/01-getting-started.md Demonstrates how SpecWeave preserves decisions by creating permanent specification files (spec.md, plan.md, tasks.md) from AI conversations, making context easily retrievable. ```text Monday: /sw:increment "user profile feature" → Creates spec.md (requirements) → Creates plan.md (technical design) → Creates tasks.md (implementation steps) Thursday: Teammate: "Why did we use that schema?" → cat .specweave/increments/0001-user-profile/plan.md → Complete context in 2 minutes ``` -------------------------------- ### Install Argo CD (Standard) Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-kubernetes/skills/gitops-workflow/references/argocd-setup.md Installs Argo CD using the standard Kubernetes manifest. This method is suitable for basic deployments. ```bash kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml ``` -------------------------------- ### Serverless Architecture Recommendation Example Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/strategic-init.md Presents a concrete example of architecture recommendation based on specific inputs, including viral potential, compliance, budget, and scale. It details the recommended services and estimated costs. ```text Inputs: - Viral Potential: 9/10 - Compliance: None - Budget: Bootstrapped - Scale: 100K users target Recommendation: Serverless ✅ AWS Lambda (compute) ✅ API Gateway (REST API) ✅ Supabase (PostgreSQL + Auth + Storage) ✅ CloudFront (CDN) Estimated Cost at 100K users: $500/month ``` -------------------------------- ### Gradual Rollout Strategy Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-release/IMPLEMENTATION.md This example details a progressive deployment strategy, showing how a release is gradually rolled out to increasing percentages of users. Each stage includes a time duration and specific monitoring metrics to ensure stability before proceeding to the next wave. ```text Canary 5% (1 hour, monitor error rate) Wave 1 10% (1 hour, monitor latency) Wave 2 25% (2 hours, monitor throughput) Wave 3 50% (4 hours, final validation) Wave 4 100% (full rollout) ``` -------------------------------- ### Install Stripe Dependencies Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-payments/commands/stripe-setup.md Installs the necessary Stripe libraries and dotenv for environment variable management across different programming languages. Ensure you have the respective language runtime installed. ```bash # Node.js npm install stripe @stripe/stripe-js dotenv # Python pip install stripe python-dotenv # Ruby gem install stripe dotenv # PHP composer require stripe/stripe-php vlucas/phpdotenv ``` -------------------------------- ### Initialize SpecWeave in Projects Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/getting-started/installation.md Installs SpecWeave into individual projects, ensuring each has its own independent setup. This can be done for multiple projects at once or using a loop for a list of projects. ```bash npx specweave init project-a npx specweave init project-b npx specweave init project-c # Or using a loop for project in project-a project-b project-c; do npx specweave init $project done ``` -------------------------------- ### SpecWeave Init Command Examples Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/academy/specweave-essentials/12-init-deep-dive.md Demonstrates various ways to initialize a SpecWeave project using the `specweave init` command. Includes basic initialization, strategic initialization, and re-initialization options. ```bash # Basic initialization for a solo developer specweave init . # Answers: # Git provider: GitHub # External tracker: No (keep local) # Documentation: Simple # WIP limit: 1 # Testing: Vitest # Initialization for a startup team with GitHub integration specweave init . # Answers: # Git provider: GitHub # External tracker: GitHub Issues # Team strategy: Repository-per-team # Documentation: Living docs # WIP limit: 2 # Testing: Vitest + Playwright # Strategic initialization for enterprise environments specweave init . --strategic # Strategic Init phases: # Phase 0: Vision analysis # Phase 1: Compliance detection (finds HIPAA, SOC 2) # Phase 2: Team recommendations (suggests Security Engineer) # Phase 3: Repository selection # Phase 4-5: Architecture (recommends traditional, not serverless) # Phase 6: Project generation # Regular Init continues: # Git provider: Azure DevOps # External tracker: JIRA # Team strategy: Project-per-team # Documentation: Multi-project # WIP limit: 3 # Re-initialize existing project, updating config without losing data specweave init . --reconfigure # Full re-initialization, preserving increments specweave init . --force # Dangerous: Fresh start, deletes everything (requires confirmation) specweave init . --fresh ``` -------------------------------- ### Browse Kafka Example Code (Bash) Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/kafka-getting-started.md This command changes the directory to the Kafka examples within the SpecWeave plugins. It allows users to explore and run various Kafka-related code examples. ```bash cd plugins/sw-kafka/examples/ ``` -------------------------------- ### Bash Installation Command Example Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-docs/skills/technical-writing/SKILL.md A simple bash command example for installing a project package using npm. This is a common snippet found in README installation sections. ```bash npm install project-name ``` -------------------------------- ### Install Project Dependencies and iOS Pods Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/mobile/react-native-setup-guide.md Installs npm dependencies for the React Native project and then installs iOS-specific dependencies using CocoaPods. Assumes project is already cloned. ```bash # Navigate to your project directory cd /path/to/your-react-native-project # Install npm dependencies npm install # Install iOS pods (macOS only) cd ios && pod install && cd .. ``` -------------------------------- ### SpecWeave Configuration for Remote Setup Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/multi-project-setup.md Example JSON configuration for SpecWeave's umbrella setup, demonstrating how to specify child repositories and their corresponding GitHub URLs for seamless remote operations. ```json { "umbrella": { "childRepos": [ { "id": "myapp-frontend", "path": "./myapp-frontend", "githubUrl": "https://github.com/myorg/myapp-frontend" } ] } } ``` -------------------------------- ### Installing Language Servers via rustup, brew, apt, and gem Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/lsp-integration.md Lists commands for installing language servers for Rust, C/C++, Java, and Ruby using their respective package managers or system tools. This ensures broad language support for LSP. ```bash # Rust rustup component add rust-analyzer # C/C++ (macOS) brew install llvm # macOS # OR (Ubuntu/Debian) apt install clangd # Ubuntu/Debian # Java (macOS) brew install jdtls # macOS # Ruby gem install solargraph ``` -------------------------------- ### Install MCP Kafka Server (tuannvm) Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/kafka-getting-started.md Installs the tuannvm MCP Kafka server, which offers more features for AI-powered Kafka operations. Requires Go. ```bash # Or use tuannvm (more features) go install github.com/tuannvm/kafka-mcp-server@latest ``` -------------------------------- ### Install Argo CD (Helm) Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-kubernetes/skills/gitops-workflow/references/argocd-setup.md Installs Argo CD using Helm, a package manager for Kubernetes. This simplifies the deployment and management of Argo CD. ```bash helm repo add argo https://argoproj.github.io/argo-helm helm install argocd argo/argo-cd -n argocd --create-namespace ``` -------------------------------- ### Run Example Tests Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-kafka/examples/README.md Shows how to execute tests for the provided Kafka examples. This is typically done within the specific example's directory using npm. ```bash cd simple-producer-consumer npm test ``` -------------------------------- ### Testing Sync Configuration with Node.js Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave/skills/sync-setup/SKILL.md Provides an example of how to perform a dry run of the sync configuration using Node.js. This involves importing the SyncEngine and relevant adapters to test connections for each enabled provider before finalizing the setup. ```bash # Test each enabled provider node -e " import { SyncEngine } from './src/sync/engine.js'; import { GitHubAdapter } from './src/sync/providers/github.js'; // ... test connection for each provider " ``` -------------------------------- ### Start Development Server Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/mobile/react-native-setup-guide.md Starts the React Native development server using npm. This command is essential for live reloading and debugging during development. ```bash npm start ``` -------------------------------- ### Install and Run EOS Pipeline (Bash) Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-kafka/examples/exactly-once-semantics/README.md Installs project dependencies and executes the Exactly-Once Semantics (EOS) pipeline. This script is essential for setting up and running the demonstration. ```bash npm install npm run eos-pipeline ``` -------------------------------- ### GET /api/payments/config Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-payments/commands/stripe-setup.md Retrieves the public configuration for Stripe, typically including the publishable key. ```APIDOC ## GET /api/payments/config ### Description Retrieves the public configuration for Stripe, typically including the publishable key. ### Method GET ### Endpoint /api/payments/config ### Parameters None ### Response #### Success Response (200) - **publishableKey** (string) - The Stripe publishable key. #### Response Example ```json { "publishableKey": "pk_test_12345" } ``` ``` -------------------------------- ### Run Quick Init for New Projects Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/academy/specweave-essentials/12-init-deep-dive.md Initiates a new SpecWeave project with default settings. This is the recommended path for greenfield projects, asking essential questions to set up the project efficiently. ```bash specweave init . ``` -------------------------------- ### Install MCP Kafka Server (kanapuli) Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/kafka-getting-started.md Installs the kanapuli MCP Kafka server, a simple option for enabling AI-powered Kafka operations. Requires npm. ```bash # Install kanapuli MCP server (simplest option) npm install -g @kanapuli/mcp-kafka ``` -------------------------------- ### Getting Started Index Markdown Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/DOCUMENTATION-RESTRUCTURE-PLAN.md This markdown content defines the 'Getting Started' page for the SpecWeave documentation. It includes frontmatter for sidebar position and title, and a main heading with a table outlining different learning paths, their estimated time, and target audience. ```markdown --- sidebar_position: 1 title: "Getting Started" --- # Getting Started with SpecWeave Choose your path: | Path | Time | For | |------|------|-----| | [Quickstart](./quickstart) | 5 min | Experienced devs | | [First Increment](./first-increment) | 15 min | Hands-on tutorial | | [Full Academy](../academy/) | Hours | Complete learning | ``` -------------------------------- ### Start Android Emulator from Command Line Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/mobile/react-native-setup-guide.md Commands to manage and start Android emulators. `emulator -list-avds` shows available virtual devices, and `emulator -avd ` starts a specific one. ```bash # List available emulators emulator -list-avds # Start specific emulator emulator -avd Pixel_6_API_34 ``` -------------------------------- ### Usage Examples for /sw:plan Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave/skills/plan/SKILL.md Demonstrates various ways to use the `/sw:plan` command, including auto-detection, specifying an increment ID, forcing regeneration, and enabling verbose output. ```bash /sw:plan # Auto-detect PLANNING increment /sw:plan 0039 # Explicit increment ID /sw:plan --force # Overwrite existing plan/tasks /sw:plan 0039 --verbose # Verbose output ``` -------------------------------- ### Install Watchman on macOS Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/guides/mobile/react-native-setup-guide.md Installs Watchman using Homebrew, a tool that watches file changes and triggers actions, improving React Native's fast refresh capabilities. Requires Homebrew to be installed. ```bash brew install watchman ``` -------------------------------- ### Express API Route: Get Stripe Config (TypeScript) Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-payments/commands/stripe-setup.md Handles GET requests to `/api/payments/config` to retrieve public Stripe configuration details, likely for frontend initialization. ```typescript router.get('/config', (req: Request, res: Response) => { res.json({ ``` -------------------------------- ### Set Up JIRA Integration and Test Connection Source: https://github.com/anton-abyzov/specweave/blob/develop/docs-site/docs/academy/specweave-essentials/15-jira-integration.md A step-by-step guide to setting up SpecWeave's JIRA integration, including creating an API token, configuring credentials in a `.env` file, reconfiguring SpecWeave, and testing the connection. ```bash # 1. Create API token at id.atlassian.com # 2. Configure credentials cat >> .env << EOF # JIRA_EMAIL=your-email@company.com # JIRA_API_TOKEN=your-token # JIRA_BASE_URL=https://your-company.atlassian.net # EOF # 3. Reconfigure SpecWeave specweave init . --reconfigure # 4. Test connection /sw-jira:status # 5. Create test increment /sw:increment "Test JIRA sync" # 6. Verify in JIRA # Check your project for new Epic ``` -------------------------------- ### Install Argo CD (High Availability) Source: https://github.com/anton-abyzov/specweave/blob/develop/plugins/specweave-kubernetes/skills/gitops-workflow/references/argocd-setup.md Installs Argo CD in a high availability configuration using Kubernetes manifests. This ensures resilience and uptime for critical deployments. ```bash kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-argo-cd/stable/manifests/ha/install.yaml ```