#!/bin/bash # Demo script showing swarm-provenance in action echo "🐝 Swarm Provenance Tracker Demo" echo "================================" echo "" # Initialize swarm echo "1️⃣ Initializing swarm workspace..." python swarm.py init --name "ai-code-generator" echo "" # Add agents echo "2️⃣ Registering agents..." python swarm.py agent add --name "architect" --role "system-design" python swarm.py agent add --name "coder" --role "implementation" python swarm.py agent add --name "reviewer" --role "code-review" echo "" # Record contributions echo "3️⃣ Recording contributions..." python swarm.py contribute \ --agent "architect" \ --file "design.md" \ --message "Created system architecture with microservices pattern" \ --sign python swarm.py contribute \ --agent "coder" \ --file "api/auth.py" \ --message "Implemented JWT authentication endpoint" \ --sign python swarm.py contribute \ --agent "coder" \ --file "api/users.py" \ --message "Added user CRUD operations with validation" \ --sign python swarm.py contribute \ --agent "reviewer" \ --file "api/auth.py" \ --message "Security review: Added rate limiting to auth endpoint" \ --sign echo "" # Show history echo "4️⃣ Provenance chain:" python swarm.py history echo "" # Export echo "5️⃣ Export to JSON:" echo "(Run: python swarm.py export > audit.json)" echo "" echo "✨ Demo complete! Check .swarm/ directory for artifacts."