

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# src/testing/ — Plugin Module Factory + Test Infrastructure23**Generated:** 2026-07-0345## OVERVIEW67Naming gotcha: despite the directory name, this is PRODUCTION init code. `create-plugin-module.ts` hosts `createPluginModule()` whose inner `serverPlugin` runs the real staged plugin init (installAgentSortShim → initConfigContext → … → dispose; full sequence documented in root AGENTS.md INITIALIZATION FLOW). `src/index.ts`, the build entry, is a thin re-export of `createPluginModule()`. It lives here because the factory takes a `Partial<PluginModuleDeps>` overrides bag (~30 injectable dependencies), letting tests swap any init stage without `mock.module()`. The other resident, `module-mock-lifecycle.ts`, is the repo-wide `bun:test` mock hygiene layer preloaded by root `test-setup.ts`. No barrel `index.ts`; consumers import file paths directly.89## KEY FILES1011| File | Role |12|------|------|13| `create-plugin-module.ts` | `createPluginModule(overrides)` → `PluginModule { id: "oh-my-openagent", server }`. Real init sequence + `PluginModuleDeps` DI record (defaults bound to the real implementations) |14| `module-mock-lifecycle.ts` | Wraps `mock.module`/`mock.restore`: snapshots original exports per resolved specifier, tracks active mocks per owning test file, restores/replays on `mock.restore()`. Exports `installModuleMockLifecycle()` (called from root `test-setup.ts`) + `preserveModuleMocksForTestFile()`/`restoreModuleMocksForTestFile()` global hooks |15| `create-plugin-module.test.ts` | DI-based init tests: i18n locale, server auth injection, runtime security-skill source (enabled/disabled), duplicate-plugin early exit |16| `create-plugin-module-live-route.test.ts` | Live-server-route wiring: `initLiveServerRoute` args, `warmLiveServerProbe` fire-and-forget (never-resolving probe must not block init), `experimental.disable_live_parent_wake_routing` flag, duplicate-plugin skip |17| `module-mock-lifecycle.test.ts` | Lifecycle behavior: snapshot/restore ordering, per-file ownership, Windows stack-path normalization (`getCallerUrlFromStack`, `normalizeStackPath`) |1819## WHAT IS WIRED ONLY HERE (not in plugin-interface.ts)2021- `experimental.session.compacting` + `experimental.compaction.autocontinue` — the 2 hook handlers beyond the 12 in `src/plugin-interface.ts`, built via `createSessionCompactingHandler(hooks)` / `createCompactionAutocontinueHandler(hooks)` from `src/plugin/session-compacting`.22- `dispose` — stops the runtime skill-source server, then `createPluginDispose()` (backgroundManager shutdown + skillMcpManager disconnect + disposeHooks).23- `recordPluginTelemetry({ configEnabled })` — try/catch-wrapped PostHog call right after `loadPluginConfig()`.24- `ensureTuiPluginEntry()` — tui.json self-heal unless `tui.sidebar.enabled === false`.25- `initLiveServerRoute` / `setLiveParentWakeRoutingDisabled` / `warmLiveServerProbe` — live-listener wake routing (`src/shared/live-server-route`); disable via `experimental.disable_live_parent_wake_routing`.26- Duplicate-plugin guard: `detectDuplicateOmoPlugin()` detected → warn + return `{}` (plugin no-ops).27- Team-mode init via dynamic imports (`checkTeamModeDependencies` + `ensureBaseDirs`), warn-only on failure.28- `disabled_hooks` → `isHookEnabled`; `experimental.safe_hook_creation` defaults true.2930## WHERE TO LOOK3132| Task | Location |33|------|----------|34| Change plugin init order / add an init stage | `serverPlugin` in `create-plugin-module.ts`; keep root AGENTS.md INITIALIZATION FLOW in sync |35| Test an init stage without module mocks | Pass the stage's key in `createPluginModule({ ...overrides })`; see both `create-plugin-module*.test.ts` |36| Add a new injectable init dependency | Extend `PluginModuleDeps` + `defaultPluginModuleDeps` in lockstep |37| `mock.module()` leaking across test files | `module-mock-lifecycle.ts`; audit enforced by `src/shared/mock-module-lifecycle-audit.test.ts` |38| Compaction handlers' logic (not wiring) | `src/plugin/session-compacting.ts` |3940## NOTES4142- The `PluginModuleDeps` overrides bag is the sanctioned way to unit-test init; the zauc-mocks sort-order hack is for modules without DI seams.43- `module-mock-lifecycle.ts` preserve semantics: mocks owned by `zauc-mocks-*`-style long-lived owners survive `test-setup.ts`-driven restores via `preserveModuleMocksForTestFile()`; everything else is rolled back to the snapshotted original exports.44- Caller attribution uses stack parsing (`getCallerUrlFromStack`), skipping frames from `test-setup.ts` and this file; Windows drive paths are normalized to `file://` URLs.45
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/look-at/AGENTS.md · 68k | AGENTS.md | arch | 68/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentassets/AGENTS.md · 68k | AGENTS.md | buildteststylearch | 88/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatstyle+3 | 83/100 | today | |
| code-yeongyu/oh-my-openagentpackages/omo-codex/plugin/components/ultrawork/AGENTS.md · 68k | AGENTS.md | buildteststylearch+1 | 77/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/background-task/AGENTS.md · 68k | AGENTS.md | arch | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/agents/sisyphus/AGENTS.md · 68k | AGENTS.md | arch | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/ralph-loop/AGENTS.md · 68k | AGENTS.md | arch | 62/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/rules-injector/AGENTS.md · 68k | AGENTS.md | archdo-not | 69/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/omo-opencode/src/hooks/runtime-fallback/AGENTS.md · 68k | AGENTS.md | stylearchtypes | 70/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.agents/AGENTS.md · 68k | AGENTS.md | stylearchtesting-strategydatabase | 64/100 | 13 days ago | |
| code-yeongyu/oh-my-openagent.opencode/AGENTS.md · 68k | AGENTS.md | stylearchdo-not | 71/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentAGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+11 | 84/100 | today | |
| code-yeongyu/oh-my-openagentpackages/agents-md-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/ast-grep-mcp/AGENTS.md · 68k | AGENTS.md | buildstylearchdependencies+1 | 78/100 | 7 days ago | |
| code-yeongyu/oh-my-openagentpackages/boulder-state/AGENTS.md · 68k | AGENTS.md | archapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/claude-code-compat-core/AGENTS.md · 68k | AGENTS.md | archagent-behaviour | 56/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/comment-checker-core/AGENTS.md · 68k | AGENTS.md | archdependenciesapi | 48/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/delegate-core/AGENTS.md · 68k | AGENTS.md | stylearchdependenciesapi | 60/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/git-bash-mcp/AGENTS.md · 68k | AGENTS.md | buildtestlint-formatarch+1 | 82/100 | 13 days ago | |
| code-yeongyu/oh-my-openagentpackages/hashline-core/AGENTS.md · 68k | AGENTS.md | archtypesdependenciesapi | 48/100 | 13 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/code-yeongyu-oh-my-openagent-packages-omo-opencode-src-testing-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.