Monorepo root for StyleAgent services and submodules.
backend/— FastAPI API (http://localhost:8000)frontend/— React app (http://localhost:5173)runner/— Python runner CLI (styleagent-runner)docker-compose.yml— local orchestration for backend + frontend + runner + mongodb
Initialize/update submodules from root:
git submodule update --init --recursiveSync submodules to remote main branches:
git submodule update --remote --mergeFrom repository root:
docker compose up --buildRecommended shortcuts:
make up
make down
make ps
make logsOptional frontend env overrides:
FRONTEND_API_BASE_URL=http://localhost:8000 \
FRONTEND_API_TIMEOUT_MS=10000 \
FRONTEND_APP_BASE_PATH=/ \
RUNNER_API_BASE_URL=http://backend:8000 \
RUNNER_POLL_INTERVAL=5 \
RUNNER_API_KEY= \
RUNNER_HTTP_TIMEOUT_SECONDS=10 \
RUNNER_HTTP_RETRIES=2 \
docker compose up --buildMongo is included by default in compose:
mongodb://localhost:27017(host access)- backend internal URL default:
mongodb://mongodb:27017/styleagent
You can also copy the full env template:
cp .env.example .envStop services:
docker compose downRun a full stack integration smoke test (mongodb + backend + frontend + runner):
./scripts/integration_smoke.shShortcut:
make smokeThis same smoke test runs in GitHub Actions on every pull request and push to main.
What it validates:
- backend and frontend are reachable
- AI health is available
- a real browser completes the main guided journey with Playwright
- prompt generation works against the running backend
- preset save and
.costyleexport work through the UI - create style and version via backend API
- compile Capture One artifact and download it
- runner jobs endpoint is reachable
Notes:
- the smoke test forces
STYLEAGENT_AI_PROVIDER=mockso CI and local smoke runs stay deterministic - this is separate from manual/local Ollama validation, which can stay enabled in normal docker usage
- smoke artifacts are written to
.artifacts/integration-smoke/and uploaded by CI
Run the canonical benchmark gates against the deterministic mock provider:
./scripts/integration_benchmark_gate.shShortcut:
make benchmark-gateWhat it validates:
- backend and Mongo boot cleanly in Docker
- the canon prompt families still export full
.costyleartifacts - each canon family keeps all tracked Capture One keys
subtle -> balanced -> boldstays monotonic for the core intensity metrics
Evidence:
- benchmark gate artifacts are written to
.artifacts/benchmark-gate/ - CI uploads the same artifact bundle on every pull request and push to
main
Run the 100-prompt force test against the live local stack and your current Ollama model:
make force-testWhat it validates:
- natural user wording, not only benchmark prompts
- family selection from vague, short, mixed, and Spanish phrasing
subtle / balanced / boldinterpretation from prompt language- full rich preset generation across the tracked Capture One keys
Artifacts:
- results are written to
.artifacts/user-force/<timestamp>/ - each run contains:
summary.jsonREPORT.md- per-case JSON under
cases/
Current validated progression for the live force test:
66%baseline:/Users/josemiguelmangas/PROGRAMACION/styleagent/styleagent-platform/.artifacts/user-force/pass-2026-04-05/summary.json
80%after first planner pass:/Users/josemiguelmangas/PROGRAMACION/styleagent/styleagent-platform/.artifacts/user-force/pass-2026-04-05b/summary.json
89%after second planner pass:/Users/josemiguelmangas/PROGRAMACION/styleagent/styleagent-platform/.artifacts/user-force/pass-2026-04-05c/summary.json
100%final validation:/Users/josemiguelmangas/PROGRAMACION/styleagent/styleagent-platform/.artifacts/user-force/pass-2026-04-05d/summary.json
Run a local host-mode E2E check for Capture One integration:
./scripts/integration_captureone_host.shShortcut:
make host-e2eWhat it validates:
- backend + mongodb are started
- style/version/job can be created with
execution_mode=host - local runner executes host-mode compile job
- job reaches
succeeded - imported
.costylefile exists on local filesystem
Evidence:
- host E2E artifacts are written to
.artifacts/host-captureone-e2e/
Run the full smoke against your real local Ollama instance:
./scripts/integration_smoke_ollama.shShortcut:
make smoke-ollamaOptional overrides:
STYLEAGENT_AI_MODEL=llama3.1:8b \
STYLEAGENT_AI_BASE_URL=http://host.docker.internal:11434 \
./scripts/integration_smoke_ollama.shWhat it validates:
- the same browser/API happy path as the normal smoke
- real provider health via
/ai/health - preset generation through the configured Ollama model
- saved/exported artifact path still completes end to end
Evidence:
- Ollama smoke artifacts are written to
.artifacts/integration-smoke-ollama/
Run the runner local-gated host integration pytest (with backend auto-start):
./scripts/integration_runner_host_local.shShortcut:
make runner-host-localUse the benchmark document to evaluate preset quality, intensity separation, and export fidelity:
/Users/josemiguelmangas/PROGRAMACION/styleagent/styleagent-platform/docs/AI-Preset-Benchmark.md
Recommended first pass:
make up
make smoke-ollamaThen run manual comparisons in the UI or via /ai/debug/prompt-preview using the canon prompts from the benchmark.
Host-mode operations and troubleshooting guide:
docs/runbook-host-mode.md
Optional env overrides:
RUNNER_API_BASE_URL=http://localhost:8000 \
RUNNER_CAPTUREONE_APP_PATH="/Applications/Capture One.app" \
RUNNER_CAPTUREONE_IMPORT_DIR="$HOME/.styleagent/captureone/imports" \
RUNNER_CAPTUREONE_LAUNCH_MODE=auto \
RUNNER_CAPTUREONE_CLI_COMMAND='captureone-cli import --style {costyle_path}' \
./scripts/integration_runner_host_local.shRunner is currently executed directly from the runner submodule:
cd runner
pip install -e .[dev]
styleagent-runner --helpCommon commands:
styleagent-runner poll
styleagent-runner poll --once
styleagent-runner run --job-id <job_id>- Discovery checklist:
/Users/josemiguelmangas/PROGRAMACION/styleagent/styleagent-platform/docs/Host-Integration-Discovery.md - Adapter contract:
/Users/josemiguelmangas/PROGRAMACION/styleagent/styleagent-platform/docs/Runner-Host-Adapter-Contract.md - Local host discovery command:
./scripts/discover_host_integrations.sh