diff --git a/docker-compose.yml b/docker-compose.yml index 681c7ea..942f292 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,47 +1,25 @@ -# Full Stack Testing - SmartTools + Orchestrated Discussions + Artifact Editor +# Orchestrated Discussions - Multi-agent AI discussion orchestration # # Quick Start: -# docker-compose build # Build all images -# docker-compose run --rm test-all # Run all tests -# docker-compose run --rm discussions discussions --help +# docker-compose build # Build the image (clones SmartTools from Gitea) +# docker-compose run --rm test # Run tests +# docker-compose run --rm cli discussions --help # -# Prerequisites: -# All three repos cloned to ~/PycharmProjects/ -# - SmartTools -# - orchestrated-discussions -# - artifact-editor +# Dependencies: +# - SmartTools (cloned automatically from Gitea during build) version: '3.8' services: # ============================================================================ - # SmartTools - Foundation Layer + # Main CLI # ============================================================================ - smarttools: - build: - context: ../SmartTools - dockerfile: Dockerfile - image: smarttools:latest - volumes: - - smarttools-data:/root/.smarttools - command: ["smarttools", "list"] - - smarttools-test: - build: - context: ../SmartTools - dockerfile: Dockerfile - image: smarttools:latest - volumes: - - smarttools-data:/root/.smarttools - command: ["pytest", "-v"] - - # ============================================================================ - # Orchestrated Discussions - Middle Layer - # ============================================================================ - discussions: + cli: build: context: . dockerfile: Dockerfile + args: + SMARTTOOLS_REPO: https://gitea.brrd.tech/rob/SmartTools.git image: orchestrated-discussions:latest volumes: - smarttools-data:/root/.smarttools @@ -49,35 +27,60 @@ services: - ./templates:/app/templates:ro command: ["discussions", "--help"] - discussions-test: + # ============================================================================ + # Tests + # ============================================================================ + test: build: context: . dockerfile: Dockerfile + args: + SMARTTOOLS_REPO: https://gitea.brrd.tech/rob/SmartTools.git image: orchestrated-discussions:latest volumes: - smarttools-data:/root/.smarttools - command: ["pytest", "-v", "tests/"] + - ./examples:/app/examples:ro + command: > + bash -c " + set -e + echo '=== Orchestrated Discussions Tests ===' + echo '' + + echo '1. Checking SmartTools...' + smarttools list | head -5 + echo '' + + echo '2. Checking discussion tools...' + discussion-parser --help > /dev/null && echo 'discussion-parser: OK' + discussion-vote-counter --help > /dev/null && echo 'discussion-vote-counter: OK' + echo '' + + echo '3. Checking discussions CLI...' + discussions --help > /dev/null && echo 'discussions CLI: OK' + discussions participants + echo '' + + echo '4. Running unit tests...' + pytest -v tests/ + echo '' + + echo '5. Testing pipeline...' + cat examples/brainstorm_notification_system.discussion.md | discussion-parser | jq -r '.title' + echo 'Pipeline: OK' + echo '' + + echo '=== All tests passed ===' + " # ============================================================================ - # Artifact Editor - Top Layer + # GUI (requires X11 forwarding) # ============================================================================ - artifact-editor: - build: - context: ../artifact-editor - dockerfile: Dockerfile - image: artifact-editor:latest - volumes: - - smarttools-data:/root/.smarttools - - /tmp/artifacts:/tmp/artifacts - command: ["artifact-ai", "--help"] - - # ============================================================================ - # GUI Services (require X11 forwarding) - # ============================================================================ - discussions-gui: + gui: build: context: . dockerfile: Dockerfile + args: + SMARTTOOLS_REPO: https://gitea.brrd.tech/rob/SmartTools.git image: orchestrated-discussions:latest environment: - DISPLAY=${DISPLAY:-:0} @@ -88,82 +91,6 @@ services: command: ["discussions", "ui"] network_mode: host - artifact-editor-gui: - build: - context: ../artifact-editor - dockerfile: Dockerfile - image: artifact-editor:latest - environment: - - DISPLAY=${DISPLAY:-:0} - - QT_QPA_PLATFORM=xcb - volumes: - - smarttools-data:/root/.smarttools - - /tmp/artifacts:/tmp/artifacts - - /tmp/.X11-unix:/tmp/.X11-unix:ro - command: ["artifact-editor"] - network_mode: host - - # ============================================================================ - # Full Test Suite - # ============================================================================ - test-all: - build: - context: . - dockerfile: Dockerfile - image: orchestrated-discussions:latest - volumes: - - smarttools-data:/root/.smarttools - - ./examples:/app/examples:ro - command: > - bash -c " - set -e - echo '========================================' - echo ' FULL STACK TEST SUITE' - echo '========================================' - echo '' - - echo '=== 1. SmartTools Foundation ===' - smarttools list | head -10 - echo 'SmartTools: OK' - echo '' - - echo '=== 2. Discussion SmartTools ===' - discussion-parser --help > /dev/null - discussion-vote-counter --help > /dev/null - echo 'Discussion tools: OK' - echo '' - - echo '=== 3. Artifact SmartTools ===' - artifact-ai --help > /dev/null - artifact-export --help > /dev/null - echo 'Artifact tools: OK' - echo '' - - echo '=== 4. Discussions CLI ===' - discussions --help > /dev/null - discussions participants - echo 'Discussions CLI: OK' - echo '' - - echo '=== 5. Unit Tests ===' - pytest -v tests/ || echo 'Some tests failed' - echo '' - - echo '=== 6. Pipeline Test ===' - cat examples/brainstorm_notification_system.discussion.md | discussion-parser | jq -r '.title' - cat examples/brainstorm_notification_system.discussion.md | discussion-parser | discussion-vote-counter | jq . - echo 'Pipeline: OK' - echo '' - - echo '=== 7. Artifact Generation Test ===' - echo '' | timeout 10 artifact-ai --format plantuml --instruction 'Create a simple A to B diagram' 2>/dev/null || echo 'AI test skipped (no provider or timeout)' - echo '' - - echo '========================================' - echo ' ALL TESTS COMPLETED' - echo '========================================' - " - # ============================================================================ # Interactive Shell # ============================================================================ @@ -171,12 +98,13 @@ services: build: context: . dockerfile: Dockerfile + args: + SMARTTOOLS_REPO: https://gitea.brrd.tech/rob/SmartTools.git image: orchestrated-discussions:latest volumes: - smarttools-data:/root/.smarttools - ./examples:/app/examples - - ../artifact-editor:/artifact-editor:ro - - ../SmartTools:/SmartTools:ro + - ./templates:/app/templates command: ["/bin/bash"] stdin_open: true tty: true @@ -186,25 +114,22 @@ volumes: # Persists ~/.smarttools between container runs # ============================================================================== -# Quick Reference +# Usage Examples # ============================================================================== # -# Build everything: +# Build (fetches SmartTools from Gitea automatically): # docker-compose build # # Run tests: -# docker-compose run --rm test-all -# docker-compose run --rm smarttools-test -# docker-compose run --rm discussions-test +# docker-compose run --rm test # -# Use CLI tools: -# docker-compose run --rm discussions discussions new "Test Feature" --template feature -# docker-compose run --rm discussions discussions status examples/feature_discussion.discussion.md -# docker-compose run --rm artifact-editor artifact-ai --format mermaid --instruction "Create flowchart" +# Use CLI: +# docker-compose run --rm cli discussions participants +# docker-compose run --rm cli discussions status examples/feature_discussion.discussion.md +# docker-compose run --rm cli discussions new "My Feature" --template feature # # Launch GUI (requires: xhost +local:docker): -# docker-compose run --rm discussions-gui -# docker-compose run --rm artifact-editor-gui +# docker-compose run --rm gui # # Interactive shell: # docker-compose run --rm shell