This is a monorepo containing:
- LexBox - A web application for managing linguistic data (backend in C#/.NET, frontend in Svelte)
- FwLite - A lightweight FieldWorks application (MAUI desktop app)
- FwHeadless - A headless service for FieldWorks data processing
- Backend: .NET 10, C#, Entity Framework Core, GraphQL (Hot Chocolate)
- Frontend: SvelteKit, TypeScript
- Database: PostgreSQL
- Infrastructure: Docker, Kubernetes, Skaffold, Tilt
languageforge-lexbox/
├── backend/
│ ├── LexBoxApi/ # Main API (ASP.NET Core + GraphQL)
│ ├── LexCore/ # Core domain models
│ ├── LexData/ # Data access layer (EF Core)
│ ├── FwLite/ # FwLite MAUI app
│ ├── FwHeadless/ # Headless FW service
│ └── Testing/ # Test projects
├── frontend/ # Lexbox SvelteKit web app
├── frontend/viewer/ # FieldWorks Lite frontend Svelte code
└── deployment/ # K8s/Docker configs
Key documentation for this project:
README.md- Project overview and setupAGENTS.md- You are here! Agent instructions.github/AGENTS.md- CI/CD and deployment guide (workflows, K8s, Docker)docs/DEVELOPER-win.md- Windows development setupdocs/DEVELOPER-linux.md- Linux development setupdocs/DEVELOPER-osx.md- macOS development setupbackend/README.md- Backend architecturebackend/AGENTS.md- General backend guidelinesbackend/LexBoxApi/AGENTS.md- API & GraphQL specific rulesbackend/FwLite/AGENTS.md- FwLite/CRDT (Critical code! Data loss risks!)backend/FwHeadless/AGENTS.md- FwHeadless guide (Critical code! Data loss risks! Mercurial sync, FwData processing)frontend/AGENTS.md- General frontend/SvelteKit rulesfrontend/viewer/AGENTS.md- FwLite Viewer (Specific frontend rules)deployment/README.md- Deployment and infrastructure
- ✅ DO run unit tests via the CLI, filtered to the tests relevant to your changes (e.g.
dotnet test backend/FwLite/FwLiteShared.Tests --filter "FullyQualifiedName~MyTestClass"). Verify tests you wrote or changed actually pass before handing work back. Never run whole suites just to "see if anything broke". - ✅ FwLite integration tests (e.g.
FwLiteProjectSync.Tests) need no infrastructure but are slow. Run a targeted selection (specific tests, not necessarily whole classes) when you touched critical sync code and believe the work is finished — not on every iteration. Waiting on tests burns time; be deliberate about which runs buy real signal. - ✅
backend/Testingcontains unit tests too — only tests markedCategory=Integration|FlakyIntegration|RequiresDb(and theTesting.Browsernamespace) need infrastructure. Its unit tests are fine to run:task test:unit -- <filter>excludes those categories for you. - ✅ FwLite viewer Playwright tests MAY be run — they're cheap:
task playwright-test-standalone -- <test-name-filter>(fromfrontend/viewer/) auto-starts the vite dev server with the in-browser demo project; no lexbox stack, chromium only. Always filter to relevant tests; details infrontend/viewer/AGENTS.md. - ❌ Do NOT run tests that need the lexbox stack unless the user explicitly asks: LexBox integration tests (
Category=Integration/FlakyIntegration,Testing.Browser) and the lexbox frontend Playwright suite (frontend/tests). The local stack is usually down or torn down between sessions and results aren't trustworthy — rely on CI for these.
- Check existing issues:
gh issue list --limit 30 - Look at recent commits:
git log --oneline -20 - Read the docs in
docs/directory - Create a GitHub issue if unsure
- Ask the user to clarify
Before implementing any change that will touch many files or is in a 🔴 Critical area (FwLite sync, FwHeadless) do a "Pre-Flight Check" and list every component in the chain that will be touched (e.g., MiniLcm -> LcmCrdt -> FwDataBridge -> SyncHelper).
- ✅ ALWAYS read local
AGENTS.mdfiles in the directories you are working in (and their parents) before starting. - ✅ ALWAYS review relevant code paths before asking clarification questions.
- ✅ New instructions in AGENTS.md files should be SUCCINCT.
- ✅ Use
ghCLI for GitHub issues/PRs, not browser tools - ✅ When pulling PR comments with
ghuseapi. It's the only thing that returns review comments. - ✅ If the user asks about "the" PR, but does not explicitly name a PR or branch, assume they mean the PR associated with the current branch.
- ✅ Use Mermaid diagrams for flowcharts and architecture (not ASCII art)
- ✅ Prefer IDE diagnostics (compiler/lint errors) over CLI tools for identifying issues. Fixing these diagnostics is part of completing any instruction.
- ✅ When handling a user prompt ALWAYS ask for clarification if there are details to clarify, important decisions that must be made first or the plan sounds unwise
- ❌ Do NOT git commit or git push without explicit user approval
- ❌ NEVER "fix" a failure by removing assertions, commenting out code, or changing data to match a broken implementation.
- ✅ ALWAYS fix the root cause when a test or check fails.
- ✅ ALWAYS double-check that your "fix" hasn't made a check or test meaningless (e.g., asserting
expect(true).toBe(true)). - ✅ Assert that E2E test user actions e.g. (scroll, click, etc.) actually have the expected effect before proceeding further.
If you are struggling, explain the difficulty to the user instead of cheating. Integrity is non-negotiable.