๐ 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.pyalongsideFastAPI. 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 Provisioning | Use agent_type="task" for filesystem writes. Reviewers are strictly read-only! |
| Persona Injection | Inject personas directly into the prompt string. The role kwarg is invalid for agent(). |
| Output Scoring | Enforce JSON schemas when scoring outputs to avoid breaking diff-based exit conditions. |
| Validation Gates | Delegate pipeline validation to gatekeeper agents to halt loops with dummy configs. |
๐ง Codebase Tooling & Commands
| ๐ ๏ธ Tool | โ Action & Command |
|---|---|
| Prettier / ESLint | Ignore quartz/local-plugins in workspace configs to prevent overwrite loops. |
| Quartz UI | Strip emojis from Explorer using regex mapFn: /[\p{Emoji_Presentation}\p{Extended_Pictographic}\uFE0F]/gu. |
| Quartz Mermaids | Always wrap edge labels in double quotes (`โ> |
| WordPress Builds | Edit JS/PHP inside src/. Always run npm run build from the plugin root directory. |
| WP-CLI Execution | Run sudo -u www-data wp in restricted /var/www/ directories to prevent permissions errors. |
| Secure Web Writes | Use sudo -u www-data tee path/to/file > /dev/null << 'EOF' instead of standard bash redirects. |
| OMP CLI | Execute 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.