The Atlas MikeAzureDev's documentation, bound to its code
140 documents
CONTRIBUTING.md

The conventional contribution guide: small single-purpose PRs, update docs and env examples, never commit secrets, report vulnerabilities via private advisory. Explicitly forbids proposing local-hosting refactors (local LLMs/DBs/filesystem storage) for the main app — those are reserved for a future fully-local variant. Note: the security-advisory link still points at the upstream willchen96/mike repo, not the Altien fork. Before opening your first PR.

Contributing

Thanks for helping improve Mike. Please keep contributions small, focused, and easy to review.

Guidelines

  • For changes that touch multiple subsystems, the data model, or public API/behavior, open a PRD issue first using the "New PRD" template (docs/templates/PRD.md); for small, well-understood fixes, a plain issue is fine.
  • Prefer targeted edits over broad refactors.
  • Keep each PR focused on one bug, feature, or cleanup.
  • Update docs or env examples when changing setup, config, or user-facing behavior.
  • Keep self-hosting changes compatible with the supported Docker Compose, Entra, private PostgREST, and Azure storage paths. Explain any new local infrastructure or migration requirements in the same PR.
  • Do not commit secrets, API keys, private documents, or local .env files.

Frontend UI Work

Before writing a new component, check whether one already exists. Look first in frontend/src/app/components/ui/ (and frontend/src/shared/ui/ for anything the Word add-in also renders), then in the shadcn/ui registry — the project is configured for it in frontend/components.json, so npx shadcn@latest add <component> lands a component in the right place with the right style and tokens. Write a one-off in the feature directory only when the markup is genuinely specific to that feature; once the same markup shows up in a second feature file, promote it into components/ui/ with a test and replace the copies. Use the documented color, typography, spacing and radius tokens rather than raw hex values, and keep the accessibility baseline (visible focus ring, accessible name on icon-only controls, type="button", ARIA state alongside color). See docs/design-system.md for the tokens, the primitive inventory, and the full baseline.

Before Opening a PR

  • Run the relevant build or test command for the area you changed.
  • Check git diff and remove unrelated changes.
  • Write a concise Markdown PR description with:
    • summary
    • changes
    • why
    • testing

Mike Workflows

System workflows live in the sibling Open-Legal-Products/mike-workflows repository under assistant-workflows/ and tabular-review-workflows/. Put structured metadata in the YAML frontmatter at the top of SKILL.md, put workflow instructions in the body of SKILL.md, and use table-columns.yaml for tabular review columns.

How workflows reach users:

  • Defaults. Five workflows are marked as defaults by the ingestion policy in backend/src/lib/workflowCatalogSource.ts. The workflow sync job stores that classification and the Quick Action settings in mike_workflows; Postgres installs independent, editable copies for each user on first use.
  • Add-ons. Every other workflow in the repository ships in the Add-ons catalog. Users import an add-on as an independent, editable copy of the workflow.
  • Packs. A directory with a pack.yaml groups its child workflow directories into a pack shown together in the catalog. pack.yaml must list exactly the workflow directories that exist under it — the build fails on either a listed-but-missing or an unlisted workflow.
  • The metadata.mike-availability frontmatter key is deprecated and ignored: the default/add-on split comes from DEFAULT_WORKFLOWS, not from the workflow files. Existing files may keep the key; the ingestion parser accepts it but does not use it for classification.

The Azure db-migrate job applies numbered SQL and then ingests the catalogue before the backend revision is activated. The job resolves its configured source ref to a full commit, validates that archive, uploads references through the configured storage provider, and atomically replaces active database rows. History stays available for existing builtin-* links. Backend request handlers read the database and do not run a lazy source sync. The optional scripts/build-workflows.js only generates landing-site assets; it is no longer the backend runtime source.

Security

Do not open a public issue for security vulnerabilities. Use GitHub's private vulnerability reporting instead.

We will aim to respond promptly and coordinate a disclosure timeline with you.

Local Development

Backend:

npm run build --prefix backend

Frontend:

npm run build --prefix frontend

Migrations

Nothing migrates on boot — several replicas can start against one database, so applying them is a deliberate step:

npm run migrate:local --prefix backend   # docker-compose Postgres
npm run migrate:dev   --prefix backend   # any other DATABASE_URL

On startup the server compares the migrations in the build against the pgmigrations table and prints the names of any that are unapplied. It only reports: a schema behind the code otherwise fails later as an unrelated application error.

Backend dev logs

npm run dev --prefix backend tees everything the server prints — including stack traces and unhandled rejections — to backend/.tmp/backend-dev.log, so a failed request can be read after the fact instead of being lost to a scrolled terminal:

tail -f backend/.tmp/backend-dev.log

The file appends across restarts and marks each run with a ===== dev start separator; delete it when it gets long. Set DEV_LOG_FILE to write elsewhere, or use npm run dev:nolog --prefix backend for the previous console-only behaviour.

Testing

npm test --prefix backend            # backend unit + route integration tests (vitest)
npm test --prefix frontend           # frontend component/hook tests (vitest + jsdom)
  • New features and bug fixes should come with a test at the lowest layer that can catch the regression: unit first, then route-level integration.
  • Tests that need a live service or an LLM key are env-gated and skip cleanly when the environment is absent — a plain npm test should always be green.