Commit Graph

26 Commits

Author SHA1 Message Date
Alexa Louise
a62d44a637 docs: Add comprehensive deployment guide and Railway DNS configuration
## Deployment Guide (DEPLOYMENT_GUIDE.md)
- Complete Railway custom domain setup (17 domains configured)
- Cloudflare DNS configuration instructions (Terraform + manual)
- GitHub secrets configuration for CI/CD
- Service deployment steps and verification checklist
- Architecture overview diagram
- Troubleshooting guide

## Cloudflare DNS (infra/cloudflare/dns-records-railway.tf)
- Updated with actual Railway CNAME targets from custom domains
- 12 subdomains for blackroad.systems
- 5 subdomains for blackroad.io
- All records configured as proxied CNAMEs

## Deploy Keys (infra/secrets/DEPLOY_KEYS.md)
- Generated ed25519 deploy keys for satellite repos
- Setup instructions for enabling deploy keys
- Security notes and key regeneration guide

## Railway Custom Domains Configured
- api.blackroad.systems → wghu19q0.up.railway.app
- core.blackroad.systems → panyy677.up.railway.app
- infra.blackroad.systems → xmky2kqn.up.railway.app
- app.blackroad.io → qydv7efz.up.railway.app
- + 13 more subdomains

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:49:35 -06:00
Alexa Louise
591f64cb60 feat: Add CI/CD workflows and Cloudflare DNS Terraform
## GitHub Actions Workflows

### deploy-railway.yml
- Automated Railway deployments on push to main
- Change detection for AIops, Analytics, Codex, and Infra
- Manual dispatch with service selection
- Deployment summary in GitHub Actions

### sync-satellites.yml
- Automatic sync from monorepo to satellite repos
- Pushes services to BlackRoad-OS organization repos:
  - AIops → blackroad-os-infra
  - Analytics → blackroad-os-core
  - Codex → blackroad-os-operator

## Cloudflare DNS Terraform (infra/cloudflare/dns-records.tf)

### blackroad.systems Subdomains
- api, core, operator, beacon, prism, docs
- console, infra, archive, demo, research
- finance, legal, devops, lab (packs)

### blackroad.io Subdomains
- app, home, api, creator, os

All records configured as proxied CNAMEs to Railway services.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:44:11 -06:00
Alexa Louise
9644737ba7 feat: Add domain architecture and extract core services from Prism Console
## Domain Architecture
- Complete domain-to-service mapping for 16 verified domains
- Subdomain architecture for blackroad.systems and blackroad.io
- GitHub organization mapping (BlackRoad-OS repos)
- Railway service-to-domain configuration
- DNS configuration templates for Cloudflare

## Extracted Services

### AIops Service (services/aiops/)
- Canary analysis for deployment validation
- Config drift detection
- Event correlation engine
- Auto-remediation with runbook mapping
- SLO budget management

### Analytics Service (services/analytics/)
- Rule-based anomaly detection with safe expression evaluation
- Cohort analysis with multi-metric aggregation
- Decision engine with credit budget constraints
- Narrative report generation

### Codex Governance (services/codex/)
- 82+ governance principles (entries)
- Codex Pantheon with 48+ agent archetypes
- Manifesto defining ethical framework

## Integration Points
- AIops → infra.blackroad.systems (blackroad-os-infra)
- Analytics → core.blackroad.systems (blackroad-os-core)
- Codex → operator.blackroad.systems (blackroad-os-operator)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:39:08 -06:00
Alexa Louise
2609eaa3a5 feat: Add Railway infrastructure configuration and documentation
- Add railway.json with complete service registry (22 services)
- Add SERVICES.md documenting all Railway services and endpoints
- Add .env.railway.example template for environment variables
- Document custom domains (operator, beacon, prism)
- Include service-to-service communication patterns
- Add architecture diagram showing Railway network topology

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:26:13 -06:00
Alexa Louise
5830335df9 Add comprehensive infrastructure documentation
- INFRASTRUCTURE_REGISTRY.md: Single source of truth for all infrastructure
  - 16 domains across 5 clusters (OS, Brand, Quantum, Lucidia, QI)
  - 17 GitHub organizations mapped with purposes
  - 25 BlackRoad-OS repos with Railway service mappings
  - Cloudflare DNS configuration for blackroad.systems and blackroad.io
  - 300 agents across 15 tiers
  - Brand colors and deployment checklists

- CECE_SYSTEM_PROMPT.md: Complete system prompt for Cece persona
  - Entity grounding with disambiguation rules
  - The Three Truths principle (GitHub repo + Railway + Cloudflare)
  - Dual-layer domain architecture
  - Decision framework for deployments
  - Prime directives for infrastructure management

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 22:21:05 -06:00
Alexa Louise
cf21aeff96 docs: add blackroad.io DNS configuration
Add blackroad.io as the primary consumer-facing domain:
- Root domain → OS Shell (Railway)
- www → redirect to root
- app → OS Shell alias
- api → Public API gateway
- docs → Documentation site

blackroad.systems remains as the infrastructure domain.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 22:02:07 -06:00
Alexa Amundson
bb6b5676a6 Update cloudflare.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-21 13:31:19 -06:00
Alexa Amundson
b45cb6e78d Update cloudflare.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-21 13:31:14 -06:00
Alexa Amundson
e0ec7a8b67 Update cloudflare.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-21 13:31:09 -06:00
Alexa Amundson
db3719f2e5 Update cloudflare.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-21 13:30:52 -06:00
Alexa Amundson
8f2beb0709 Update cloudflare.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-21 13:30:47 -06:00
Alexa Amundson
3200e8605f Add orchestration specs and control scripts 2025-11-21 00:29:19 -06:00
Alexa Amundson
42de34e4fb Document Railway service settings and Dockerfile options 2025-11-21 00:22:34 -06:00
Alexa Amundson
39cec5cf5a Add deployment orchestration tooling 2025-11-21 00:05:33 -06:00
Claude
f9e1d7234e Fix domain configuration for app.blackroad.systems and blackroad.systems
Updates:
- Add app.blackroad.systems to ALLOWED_ORIGINS in both .env.example and config.py
- Add blackroad-operating-system-production.up.railway.app to ALLOWED_ORIGINS
- Update DNS.md to reflect current domain routing (both root and app subdomains point to same service)
- Ensures CORS works correctly for all production domains

This fixes CORS issues when accessing the application via app.blackroad.systems or blackroad.systems
on the Railway project 'gregarious-wonder' (blackroad-operating-system-production service).
2025-11-20 21:28:34 +00:00
Claude
dbdd8bd148 Add BlackRoad OS Kernel, DNS Infrastructure, and Complete Service Registry
This commit introduces a comprehensive infrastructure overhaul that transforms
BlackRoad OS into a true distributed operating system with unified kernel,
DNS-aware service discovery, and standardized syscall APIs.

## New Infrastructure Components

### 1. Kernel Module (kernel/typescript/)
- Complete TypeScript kernel implementation for all services
- Service registry with production and dev DNS mappings
- RPC client for inter-service communication
- Event bus, job queue, state management
- Structured logging with log levels
- Full type safety with TypeScript

Modules:
- types.ts: Complete type definitions
- serviceRegistry.ts: DNS-aware service discovery
- identity.ts: Service identity and metadata
- config.ts: Environment-aware configuration
- logger.ts: Structured logging
- rpc.ts: Inter-service RPC client
- events.ts: Event bus (pub/sub)
- jobs.ts: Background job queue
- state.ts: Key-value state management
- index.ts: Main exports

### 2. DNS Infrastructure Documentation (infra/DNS.md)
- Complete Cloudflare DNS mapping
- Railway production and dev endpoints
- Email configuration (MX, SPF, DKIM, DMARC)
- SSL/TLS, security, and monitoring settings
- Service-to-domain mapping
- Health check configuration

Production Services:
- operator.blackroad.systems
- core.blackroad.systems
- api.blackroad.systems
- console.blackroad.systems
- docs.blackroad.systems
- web.blackroad.systems
- os.blackroad.systems
- app.blackroad.systems

### 3. Service Registry & Architecture (INFRASTRUCTURE.md)
- Canonical service registry with all endpoints
- Monorepo-to-satellite deployment model
- Service-as-process architecture
- DNS-as-filesystem model
- Inter-service communication patterns
- Service lifecycle management
- Complete environment variable documentation

### 4. Syscall API Specification (SYSCALL_API.md)
- Standard kernel API for all services
- Required syscalls: health, version, identity, RPC
- Optional syscalls: logging, metrics, events, jobs, state
- Complete API documentation with examples
- Express.js implementation guide

Core Endpoints:
- GET /health
- GET /version
- GET /v1/sys/identity
- GET /v1/sys/health
- POST /v1/sys/rpc
- POST /v1/sys/event
- POST /v1/sys/job
- GET/PUT /v1/sys/state

### 5. Railway Deployment Guide (docs/RAILWAY_DEPLOYMENT.md)
- Step-by-step deployment instructions
- Environment variable configuration
- Monitoring and health checks
- Troubleshooting guide
- Best practices for Railway deployment

### 6. Atlas Kernel Scaffold Prompt (prompts/atlas/ATLAS_KERNEL_SCAFFOLD.md)
- Complete prompt for generating new services
- Auto-generates full kernel implementation
- Includes all DNS and Railway mappings
- Production-ready output with zero TODOs

### 7. GitHub Workflow Templates (templates/github-workflows/)
- deploy.yml: Railway auto-deployment
- test.yml: Test suite with coverage
- validate-kernel.yml: Kernel validation
- README.md: Template documentation

## Updated Files

### CLAUDE.md
- Added "Kernel Architecture & DNS Infrastructure" section
- Updated Table of Contents
- Added service architecture diagram
- Documented all new infrastructure files
- Updated repository structure with new directories
- Added kernel and infrastructure to critical path files

## Architecture Impact

This update establishes BlackRoad OS as a distributed operating system where:
- Each Railway service = OS process
- Each Cloudflare domain = mount point
- All services communicate via syscalls
- Unified kernel ensures interoperability
- DNS-aware service discovery
- Production and development environments

## Service Discovery

Services can now discover and call each other:
```typescript
import { rpc } from './kernel';
const user = await rpc.call('core', 'getUserById', { id: 123 });
```

## DNS Mappings

Production:
- operator.blackroad.systems → blackroad-os-operator-production-3983.up.railway.app
- core.blackroad.systems → 9gw4d0h2.up.railway.app
- api.blackroad.systems → ac7bx15h.up.railway.app

Internal (Railway):
- blackroad-os-operator.railway.internal:8001
- blackroad-os-core.railway.internal:8000
- blackroad-os-api.railway.internal:8000

## Next Steps

1. Sync kernel to satellite repos
2. Implement syscall endpoints in all services
3. Update services to use RPC for inter-service calls
4. Configure Cloudflare health checks
5. Deploy updated services to Railway

---

Files Added:
- INFRASTRUCTURE.md
- SYSCALL_API.md
- infra/DNS.md
- docs/RAILWAY_DEPLOYMENT.md
- kernel/typescript/* (9 modules + README)
- prompts/atlas/ATLAS_KERNEL_SCAFFOLD.md
- templates/github-workflows/* (4 files)

Files Modified:
- CLAUDE.md

Total: 22 new files, 1 updated file
2025-11-20 00:48:41 +00:00
Alexa Amundson
ac5928f1c8 Merge branch 'main' into claude/master-orchestration-prompt-01LDBhHG69usnt61gpq5wAfA 2025-11-19 16:21:55 -06:00
Alexa Amundson
17aa3f03ea Create BlackRoad control plane for repo standardization (#116) 2025-11-19 16:03:11 -06:00
Claude
7755c3bf88 Add master orchestration: health endpoints, Railway configs, deployment guides
This implements the "Big Kahuna" master orchestration plan to get BlackRoad OS
fully online and deployable without manual PR management.

## Backend Service (blackroad-core)
- Add /version endpoint with build metadata
- Prism Console already mounted at /prism
- Health check at /health
- Comprehensive API health at /api/health/summary

## Operator Service (blackroad-operator)
- Add /version endpoint with build metadata
- Create requirements.txt for dependencies
- Create Dockerfile for containerization
- Create railway.toml for Railway deployment
- Health check at /health

## Infrastructure
- Consolidate railway.toml for monorepo multi-service deployment
  - Backend service (Dockerfile-based)
  - Operator service (Nixpacks-based)
- Remove conflicting railway.json

## Documentation
- Add DEPLOYMENT_SMOKE_TEST_GUIDE.md
  - Complete deployment instructions (local + Railway)
  - Automated smoke test suite
  - Troubleshooting guide
  - Monitoring & health check setup
- Add infra/DNS_CLOUDFLARE_PLAN.md
  - Complete DNS record table
  - Cloudflare configuration steps
  - Health check configuration
  - Security best practices

## Testing
- Add scripts/smoke-test.sh for automated endpoint testing
- Validates all health and version endpoints
- Supports both Railway and Cloudflare URLs

## Result
Alexa can now:
1. Push to main → GitHub Actions deploys to Railway
2. Configure Cloudflare DNS (one-time setup)
3. Run smoke tests to verify everything works
4. Visit https://os.blackroad.systems and use the OS

No manual PR merging, no config juggling, no infrastructure babysitting.
2025-11-19 21:52:01 +00:00
Alexa Amundson
ed2083434d Add monorepo sync scaffolding and workflows 2025-11-19 15:37:20 -06:00
Claude
abdbc764e6 Establish BlackRoad OS infrastructure control plane
Add comprehensive infrastructure management system to centralize all service
definitions, deployment configurations, and operational tooling.

## New Infrastructure Components

### 1. Service Manifest (infra/blackroad-manifest.yml)
- Complete catalog of all active and planned services
- Deployment configuration for each service
- Environment variable definitions
- Domain mappings and routing
- Database and cache dependencies
- Health check endpoints
- CI/CD integration specifications

### 2. Operations CLI (scripts/br_ops.py)
- Command-line tool for managing all BlackRoad services
- Commands: list, env, repo, open, status, health
- Reads from service manifest for unified operations
- Colored terminal output for better readability

### 3. Service Analysis Documents (infra/analysis/)
- Detailed technical analysis for each service
- Active services:
  - blackroad-backend.md (FastAPI backend)
  - postgres.md (PostgreSQL database)
  - redis.md (Redis cache)
  - docs-site.md (MkDocs documentation)
- Planned services:
  - blackroad-api.md (API gateway - Phase 2)
  - prism-console.md (Admin console - Phase 2)

### 4. Infrastructure Templates (infra/templates/)
- railway.toml.template - Railway deployment config
- railway.json.template - Alternative Railway config
- Dockerfile.fastapi.template - Multi-stage FastAPI Dockerfile
- github-workflow-railway-deploy.yml.template - CI/CD workflow
- .env.example.template - Comprehensive env var template

### 5. Documentation (infra/README.md)
- Complete guide to infrastructure control plane
- Usage instructions for ops CLI
- Service manifest documentation
- Deployment procedures
- Troubleshooting guide
- Phase 2 migration plan

## Architecture

This establishes BlackRoad-Operating-System as the canonical control plane
for all BlackRoad services, both current and planned:

**Phase 1 (Active)**:
- blackroad-backend (FastAPI + static UI)
- postgres (Railway managed)
- redis (Railway managed)
- docs-site (GitHub Pages)

**Phase 2 (Planned)**:
- blackroad-api (API gateway)
- blackroad-prism-console (Admin UI)
- blackroad-agents (Orchestration)
- blackroad-web (Marketing site)

**Phase 3 (Future)**:
- lucidia (AI orchestration)
- Additional microservices

## Usage

# List all services
python scripts/br_ops.py list

# Show environment variables
python scripts/br_ops.py env blackroad-backend

# Show repository info
python scripts/br_ops.py repo blackroad-backend

# Show service URL
python scripts/br_ops.py open blackroad-backend prod

# Show overall status
python scripts/br_ops.py status

# Show health checks
python scripts/br_ops.py health blackroad-backend

## Benefits

1. **Single Source of Truth**: All service configuration in one manifest
2. **Unified Operations**: One CLI for all services
3. **Documentation**: Comprehensive per-service analysis
4. **Templates**: Reusable infrastructure patterns
5. **Migration Ready**: Clear path to Phase 2 microservices

## References

- MASTER_ORCHESTRATION_PLAN.md - 7-layer architecture
- ORG_STRUCTURE.md - Repository strategy
- PRODUCTION_STACK_AUDIT_2025-11-18.md - Current state

Implemented by: Atlas (AI Infrastructure Orchestrator)
Date: 2025-11-19
2025-11-19 21:04:14 +00:00
Alexa Amundson
12a5704daf Update infra/frontend/LANDING_PAGE_PLAN.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-17 21:22:17 -06:00
Alexa Amundson
39128ecb7a Update infra/cloudflare/cloudflare_dns_sync.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-17 21:21:07 -06:00
Claude
2a8f12d5cb chore: phase 1 infrastructure implementation
Implement Phase 1 infrastructure from master orchestration plan.
This commit delivers production-ready deployment infrastructure,
comprehensive documentation, and workflow automation.

**Cloudflare DNS Infrastructure:**
- Add records.yaml with complete DNS config for all domains
- Add migrate_to_cloudflare.md with step-by-step migration guide
- Add cloudflare_dns_sync.py for automated DNS synchronization
- Update CLOUDFLARE_DNS_BLUEPRINT.md with implementation references

**Environment Variable Documentation:**
- Add ENV_VARS.md with comprehensive variable reference
- Document all services: Railway, GitHub Actions, Cloudflare, local
- Include security best practices and validation scripts
- Add troubleshooting guides and quick-start templates

**GitHub Actions Workflows:**
- Add railway-deploy-template.yml for Railway deployments
- Add frontend-deploy-template.yml for static site deployments
- Add codeql-analysis-template.yml for security scanning
- Add comprehensive-ci-template.yml for complete CI pipeline
- Add .github/dependabot.yml for automated dependency updates

**Frontend Infrastructure:**
- Add infra/frontend/LANDING_PAGE_PLAN.md with detailed implementation plan
- Include page structure, design system, content guidelines
- Document deployment options (GitHub Pages, Railway, Cloudflare Pages)

**Master Orchestration Updates:**
- Update MASTER_ORCHESTRATION_PLAN.md with implementation file references
- Add Phase 1 implementation checklist
- Document immediate, short-term, and medium-term next steps

**Impact:**
This implementation enables:
- Automated DNS management across 10+ domains
- Secure, documented deployment workflows
- Consistent environment configuration
- Automated security scanning and dependency updates
- Clear path to production for landing page

**Next Steps for Operator:**
1. Migrate DNS to Cloudflare using migrate_to_cloudflare.md
2. Configure GitHub and Railway secrets
3. Deploy backend with custom domains
4. Implement landing page using LANDING_PAGE_PLAN.md

Refs: #55 (Master Orchestration Prompt)
2025-11-18 02:51:52 +00:00
Claude
d0979b6c44 Add BlackRoad Master Orchestration Plan and infrastructure blueprints
This commit implements the complete "master orchestration prompt" deliverables:

## New Documentation

### Master Plan
- MASTER_ORCHESTRATION_PLAN.md - Complete infrastructure → product → ecosystem blueprint
  - Full stack architecture (Layer 1-7)
  - Cloudflare → GoDaddy → Railway → GitHub topology
  - Agent orchestration model (Atlas → Operator → Prism → Lucidia)
  - 3-phase execution roadmap
  - Atlas automation commands

### Infrastructure
- infra/cloudflare/CLOUDFLARE_DNS_BLUEPRINT.md - Complete DNS configuration
  - Migration process (GoDaddy → Cloudflare)
  - DNS records for all 10+ domains
  - SSL/TLS configuration
  - Caching rules and security headers
  - Automation scripts
  - Troubleshooting guide

### GitHub Organization
- .github/GITHUB_ENTERPRISE_SETUP.md - Repository organization structure
  - Monorepo vs multi-repo strategy
  - Branch protection rules
  - Required status checks
  - PR/issue templates
  - Project boards and labels
  - Recommended workflow additions (CodeQL, Dependabot)

- .github/CODEOWNERS - Code ownership definitions
  - Global owners
  - Component-specific owners (backend, frontend, infra, docs)

### Next Actions
- NEXT_ACTIONS_ALEXA.md - No-overwhelm execution checklist
  - Immediate priorities (infrastructure setup)
  - Week 1-2 tasks (product polish)
  - Week 3-4 tasks (alpha launch)
  - Success metrics
  - Tools & resources

## Context

These documents synthesize:
- The Big Kahuna Vision (complete OS architecture)
- 3-phase execution roadmap (18-24 months)
- Brand architecture (multi-brand ecosystem)
- Current monorepo structure
- Infrastructure topology

## Purpose

Provide Alexa (Operator) with:
1. Complete infrastructure blueprint
2. Clear execution path
3. No-overwhelm next steps
4. Reference for all future decisions

## Next Steps

See NEXT_ACTIONS_ALEXA.md for immediate priorities:
1. Migrate DNS to Cloudflare
2. Verify Railway deployment
3. Update GitHub secrets
4. Polish OS and add real backend data
5. Launch blackroad.systems and docs sites

---

Ready for the next command, Operator.
2025-11-18 01:57:46 +00:00
Alexa Amundson
71cb4128c7 Add architecture roadmap and environment map docs 2025-11-17 01:20:02 -06:00