reference / standards

Living engineering standards

The shared baseline every MeshKore project inherits: how to audit code, what each layer should look like, how to deploy safely, how to test. This catalog is the source of truth — agents in .meshkore/-shaped repos fetch these URLs directly instead of carrying stale copies. We update them regularly; agents should re-check on a weekly cadence.

manifest.json (machine-readable) How agents should use this Versioning

audit Audit protocols per stack

Step-by-step audit checklists an agent or human runs against an existing codebase. Each protocol has a quality target (typically 90–95%) and concrete pass/fail rules. Run before merging, before deploys, and on a regular cadence.

backend-rust.md
Axum · SQLx · Tokio
backend-rust-worker.md
Long-running workers
frontend-languages.md
i18n & locale rules
frontend-nextjs.md
App Router · RSC
frontend-solidjs.md
Signals · stores

stack Layer-by-layer conventions

Per-layer engineering standards — what we use, how we use it, what to avoid. Read the relevant file before writing code in that layer.

overview.md
Lean code philosophy
frontends.md
SolidJS · Next.js · Tailwind
apis.md
Versioning · auth · errors
workers.md
Rust binaries · health
databases.md
PostgreSQL · pools
cloudflare-pages.md
Pages caveats & limits

database DB conventions

Schema, migrations, and operational rules for the database layer. LOCAL is the source of truth.

overview.md
Schema-as-code
migrations.md
YYYYMMDD_*.sql workflow

deploy Deploy playbooks

Safe-deploy patterns and known-issue catalogs. Use these before a risky deploy and during incident triage.

fly-safe-deploy.md
Zero-downtime Fly.io
fly-issues.md
Known Fly.io issues
cloudflare-issues.md
CF Pages/Workers gotchas
cloudflare-troubleshooting.md
CF triage flowchart

testing Testing strategy

How we test what matters — behavior over implementation, real integrations over mocks.

README.md
Overview & quick-start

monitor Observability

What to log, what to alert on, how to debug across the stack.

frontend-languages.md
i18n monitoring

tools Tooling reference

How to use common services and tools we standardize on across projects.

image-services/overview.md
Image pipeline
image-services/ai-generator.md
Generation service
image-services/classic-editor.md
Editor service
image-services/health-check.md
Health endpoints

How agents should use this catalog

An agent (Claude Code, Cursor, etc.) working inside a .meshkore/-shaped repo should treat this catalog as read-on-demand, refresh-on-cadence:

1. At session start, refresh the manifest

# manifest.json declares which standards exist, their version, last-updated
curl -fsSL https://meshkore.com/reference/manifest.json -o .meshkore/.runtime/standards-manifest.json

Cache the manifest for ~24 hours. Re-fetch if older than that or on explicit user request.

2. Before writing code in a layer, fetch the relevant standard

# About to write Rust API code? Pull the stack guide + audit protocol.
curl -fsSL https://meshkore.com/reference/standards/stack/apis.md
curl -fsSL https://meshkore.com/reference/standards/audit/backend-rust.md

Read it inline, do not copy into the repo. If a copy is needed (e.g. offline work), drop it under .meshkore/cache/standards/ with a stamped header noting the version + fetch date.

3. Audit on a schedule

Run the matching audit protocol against the codebase every N commits or before any merge that touches the layer. The protocol returns a score; fix until ≥90% before considering the layer "production-ready".

4. Treat divergence between local context and the online standard as a bug

If .meshkore/docs/governance.md or any local doc contradicts a standard, surface the diff to the operator and ask. Online is canonical for the universal pieces.

The minimal install-time payload

meshcore init drops a tiny stub at .meshkore/STANDARDS.md that names the catalog root URL, the manifest URL, and the refresh cadence. Agents in the repo see this file and know exactly where to go. Nothing else is cached locally by default.

# .meshkore/STANDARDS.md (auto-generated stub)
catalog:  https://meshkore.com/reference/standards/
manifest: https://meshkore.com/reference/manifest.json
version:  <tracked in /standard.json>
refresh:  weekly (manifest), on-demand (per standard)

Spotted something that should belong in this catalog (a stack you use, a known issue you keep hitting, an audit protocol you've refined)? Open an issue at github.com/meshkore. The catalog grows with the community.