๐Ÿ“ OMP & Testing Master Cheat Sheet

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        ๐Ÿ“ OMP SYNTHESIS CONTROL BOARD                  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ ๐Ÿงผ SWARM & AGENTS  โ”‚ ๐Ÿง  STACK REFLECTION  โ”‚ โšก CONDENSATION & FORMATTING โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1. Python Evals   โ”‚ 1. Core Integrations โ”‚ 1. High-density Tables      โ”‚
โ”‚ 2. Testing Layers โ”‚ 2. Observability     โ”‚ 2. Visual Emojis Landmarks  โ”‚
โ”‚ 3. Naming Rules   โ”‚ 3. CLI & Web Config  โ”‚ 3. Markdown Dashboards      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Architecture & Infrastructure

  • Ompycord Colocation: Run discord.py alongside FastAPI. Disable native signals on Uvicorn (server.install_signal_handlers = lambda: None).
  • Telemetry Context: Carry context via Node/Bun AsyncLocalStorage. Use safe lazy dynamic imports (await import('langfuse').catch(...)).
  • Environment Isolation: Keep a clean codebase. Distinguish test data from production traffic completely.
  • Automated TTL: Automate dummy infrastructure cleanup via TTL (auto_ttl_days: 1).

๐Ÿ“ฆ Swarm Orchestration & Agents

๐Ÿ› ๏ธ Domain๐Ÿ’ก Implementation Standard
Agent ProvisioningUse agent_type="task" for filesystem writes. Reviewers are strictly read-only!
Persona InjectionInject personas directly into the prompt string. The role kwarg is invalid for agent().
Output ScoringEnforce JSON schemas when scoring outputs to avoid breaking diff-based exit conditions.
Validation GatesDelegate pipeline validation to gatekeeper agents to halt loops with dummy configs.

๐Ÿ”ง Codebase Tooling & Commands

๐Ÿ› ๏ธ Toolโœ… Action & Command
Prettier / ESLintIgnore quartz/local-plugins in workspace configs to prevent overwrite loops.
Quartz UIStrip emojis from Explorer using regex mapFn: /[\p{Emoji_Presentation}\p{Extended_Pictographic}\uFE0F]/gu.
Quartz MermaidsAlways wrap edge labels in double quotes (`โ€”>
WordPress BuildsEdit JS/PHP inside src/. Always run npm run build from the plugin root directory.
WP-CLI ExecutionRun sudo -u www-data wp in restricted /var/www/ directories to prevent permissions errors.
Secure Web WritesUse sudo -u www-data tee path/to/file > /dev/null << 'EOF' instead of standard bash redirects.
OMP CLIExecute debugging CLI commands strictly under a real PTY (pty: true).

๐Ÿ’ก Best Practices & Testing

  • Structured Naming: Replace generic placeholders (like test-topic-123) with namespaced formats: [env].[region].[service].[data-type]. Append versions (v1) and use strict lowercase.
  • Local Verification: Use dummy placeholders strictly for rapid local verification, never in shared environments.
  • Test Independence: Assert strictly on behavioral outcomes. Tests must run independently without relying on shared state.
  • Lifecycle Policy: Enforce a strict lifecycle management policy for all test topics to ensure immediate cleanup.

๐Ÿšจ Gotchas / Traps / Warnings

  • Generic Placeholders (test-topic-123): NEVER deploy generic strings in shared/production environments. They obscure observability, pollute metrics, and introduce collision risks.
  • Read-Only Reviewers: Agents tagged agent_type="reviewer" cannot write to the filesystem. NEVER attempt I/O with them.
  • Brittle Tests: Over-reliance on internal implementation details breaks tests during refactoring.
  • Direct Build Edits: Modifying build/ files in WordPress directly is an anti-pattern and will be overwritten by builds.
  • Shared Test State: Designing tests that rely on shared state from previous tests guarantees cascading failures.
  • Signal Overlap: Never allow signal handlers to clash when co-locating asynchronous frameworks like Uvicorn and Discord.py.