Work Monorepo - Agent Guide
User: Ben Sima (ben.sima@parasail.io)
This directory contains multiple work repositories. When making changes, always specify which repo you’re targeting.
IMPORTANT: Always review code carefully after it has been written.
IMPORTANT: Always include a testing strategy for code.
Pre-Implementation Planning (REQUIRED)
Before writing ANY implementation code for a feature or significant change:
-
Identify code owners. Run
git log --oneline -10 <file>on the files you plan to change. If someone other than Ben has been actively working on them, the feature MUST go through planning first. -
Write a design brief. Create a short document (or Linear comment) covering:
- What the feature does and why
- Which files/modules it touches
- The proposed approach
- Any alternative approaches considered
-
Get sign-off before implementing. Post the design brief for review by the relevant code owner(s). Do NOT proceed to implementation until there is explicit agreement on the approach.
-
Only then implement. Once the approach is agreed upon, proceed with coding.
This applies to all PRs that touch code owned by other team members. Small bug fixes, doc changes, and changes to Ben’s own code are exempt.
Repository Overview
| Repo | Language | Description |
|---|---|---|
app/ |
TypeScript (Next.js 15) | Next.js Enterprise Boilerplate - production web app |
dev1-sakura/ |
YAML | Flux GitOps cluster config (dev) |
oai_TTS_sidecar/ |
Python | OpenAI-compatible TTS sidecar service |
ocr_pipeline/ |
Python (FastAPI) | Contract OCR pipeline with Azure integration |
parasail/ |
Go (Bazel) | Main Parasail monorepo - sparse checkout |
resemble_inference/ |
Python | Resemble AI TTS inference server |
saas-sakura/ |
YAML | Flux GitOps cluster config (prod) |
sales/ |
Python + TypeScript | Parasales monorepo - demos deployed via Vercel |
tts-workflow-demo/ |
Python (FastAPI) | LLM → TTS workflow demo |
Quick Commands by Repo
app/ (Next.js)
pnpm dev # Dev server
pnpm build # Build
pnpm lint:fix # Lint + fix
pnpm test # Run tests
ocr_pipeline/ (Python/FastAPI)
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload
parasail/ (Go/Bazel)
bazel run //:gazelle # Update BUILD files
bazel build //... # Build all
# Proto changes: $(git rev-parse --show-toplevel)/opt/bin/compile_protos
NOTE: Bazel is only used for some projects (Go/Java). For Python we use uv.
sales/ (Monorepo)
task do # Run all checks
task format # Format code
task build # Build api + ui
tts-workflow-demo/ (Python)
uv sync
uv run uvicorn main:app --reload
resemble_inference/ (Docker)
docker build -f docker/Dockerfile -t resm-serve .
docker run --gpus 0 --env RESEMBLE_TOKEN=xxx -p 4999:4999 -t resm-serve
Cross-Repo Patterns
- TTS Services:
oai_TTS_sidecar/,resemble_inference/,tts-workflow-demo/share similar API patterns - GitOps:
dev1-sakura/andsaas-sakura/are Flux-managed K8s configs - Bazel repos:
parasail/andvoice-workflow/use same tooling conventions
Conventions
- Always check repo-specific AGENTS.md files for detailed guidance
- Use absolute paths when referencing files across repos
- When modifying infrastructure (sakura repos), consider both dev and prod
- Always use a patch-based workflow with git-brancheless, prefer 1 commit per PR
- Always use git-branchless commands like
git sync,git submit -Fgithuband so on, over standard git commands - Use the GitHub CLI
ghwhen looking up PRs or comments.
Debugging Production Issues
When a service works locally but fails in production, follow this order:
-
Application logs first. Always check the service’s own logs before investigating infrastructure. Most issues are visible in startup logs, error logs, or framework diagnostic output (e.g., Spring Boot condition evaluation reports, Python tracebacks). Use
kubectl logs,docker logs, or equivalent. -
Verify the running artifact. Confirm the deployed image/version matches what you expect. Stale pods, failed rollouts, and cached images are common. Check
kubectl get deploy -o jsonpath='{.spec.template.spec.containers[0].image}'. -
Reproduce with the same artifact. If it works locally with source but fails in prod, try running the actual Docker image locally. Differences in base images, native dependencies, and environment variables are common root causes.
-
Don’t chase infrastructure until you’ve ruled out the application. Traefik routes, Helm values, secrets, and DNS are important but are rarely the cause when the service itself is returning application-level errors (e.g., Spring “No static resource”, Python 500s). An application-level 404 means the request reached the app — the problem is inside it.
-
Know your framework’s diagnostic tools. Spring Boot:
--debugflag orCONDITIONS_EVALUATION_REPORTshows which beans and conditions failed. FastAPI/Uvicorn: startup logs show registered routes. Next.js: build output shows compiled routes. -
Flag known anti-patterns when you see them in code. Don’t just note them — call them out as likely root causes. Examples: Spring
@ConditionalOnBeanon component-scanned classes (ordering not guaranteed), Python circular imports, missing native dependencies in minimal Docker images.
Task Management
- Use the
linearCLI for issue/project tracking and updates - Run
linear --helpto discover subcommands
Example: locate the livekit-parasail plugin issue and open it:
linear issue list --all-states --limit 0 --no-pager | rg -i "livekit|parasail"
linear issue view ENG-177
Multi-Agent / Subagent Usage
Use subagents for context-consuming tasks: researching a codebase, implementing well-specified tasks, reviewing code.
Pi supports RPC mode (pi --mode rpc --no-session) for programmatic orchestration via JSON-lines over stdin/stdout. See pi --help for details.
Available Parasail Models:
| Model ID | Best For |
|---|---|
parasail-glm47 |
Coding (best quality, vision) |
parasail-deepseek-v32 |
General coding |
parasail-qwen3-235b-a22b-instruct-2507 |
Complex reasoning |
parasail-kimi-k2-instruct |
Long context (262k) |
parasail-kimi-k2-thinking |
Reasoning mode |
parasail-mistral-small-32-24b |
Fastest, cheapest |