fix(rules): drop legacy sisyphus rule sources

This commit is contained in:
YeonGyu-Kim
2026-05-19 14:27:48 +09:00
parent 7db3a7f933
commit 3dd414226b
5 changed files with 11 additions and 17 deletions
+1 -1
View File
@@ -269,7 +269,7 @@ bunx oh-my-opencode mcp-oauth login <server-url> # Tier-3 MCP OAuth (PKCE + DCR
- **zauc-mocks pattern:** 9 directories named `zauc-mocks-*` (5 in `src/hooks/`, 2 in `src/tools/`, 1 each in `src/mcp/` and `src/shared/`) hold `mock.module()` setup that must load alphabetically before the tests that consume those mocked modules. The `zauc-` prefix is purely a sort-order hack for `bun:test` discovery; these are NOT hooks/tools.
- **Test discipline meta-audits:** two files (`src/shared/mock-module-lifecycle-audit.test.ts` and `src/shared/prompt-async-route-audit.test.ts`) parse the entire codebase via the TS compiler API and FAIL the suite when an architectural invariant is violated (`mock.module()` without restore, raw `session.promptAsync` outside the gate).
- **Docs:** see [`docs/guide/`](file:///Users/yeongyu/local-workspaces/omo/docs/guide/) for user-facing guides (overview, installation, orchestration, agent-model-matching, team-mode), [`docs/reference/`](file:///Users/yeongyu/local-workspaces/omo/docs/reference/) for CLI/configuration/features reference. v4.2.0+ adds [`CHANGELOG.md`](file:///Users/yeongyu/local-workspaces/omo/CHANGELOG.md), [`docs/reference/known-issues.md`](file:///Users/yeongyu/local-workspaces/omo/docs/reference/known-issues.md), [`docs/reference/prompt-async-gate-rfc.md`](file:///Users/yeongyu/local-workspaces/omo/docs/reference/prompt-async-gate-rfc.md), and [`docs/reference/release-process.md`](file:///Users/yeongyu/local-workspaces/omo/docs/reference/release-process.md).
- **Rules files** (auto-injected by `rules-injector` hook): [`.omo/rules/modular-code-enforcement.md`](file:///Users/yeongyu/local-workspaces/omo/.omo/rules/modular-code-enforcement.md) + [`.omo/rules/test-discipline.md`](file:///Users/yeongyu/local-workspaces/omo/.omo/rules/test-discipline.md) (forbids `setTimeout(resolve, N)` / `await sleep(N)` in tests unless time IS the SUT). Scans `.omo/rules/`, `.sisyphus/rules/`, `.claude/rules/`, `.cursor/rules/`, `.github/instructions/`, plus `.github/copilot-instructions.md` and `.mdc` files.
- **Rules files** (auto-injected by `rules-injector` hook): [`.omo/rules/modular-code-enforcement.md`](file:///Users/yeongyu/local-workspaces/omo/.omo/rules/modular-code-enforcement.md) + [`.omo/rules/test-discipline.md`](file:///Users/yeongyu/local-workspaces/omo/.omo/rules/test-discipline.md) (forbids `setTimeout(resolve, N)` / `await sleep(N)` in tests unless time IS the SUT). Scans `.omo/rules/`, `.claude/rules/`, `.cursor/rules/`, `.github/instructions/`, plus `.github/copilot-instructions.md` and `.mdc` files.
- **Process cleanup:** Background-agent error handlers are now log-only — no force-exit on transient errors. Opt out entirely via `OMO_DISABLE_PROCESS_CLEANUP=1` env var.
- **First-prompt watchdog:** `src/hooks/runtime-fallback/first-prompt-watchdog.ts` (193 LOC) detects subagent sessions producing no progress within 90s and triggers fallback / abort.
- **ParentWakeNotifier:** Background-agent parent-wake state extracted to `src/features/background-agent/parent-wake-notifier.ts` (432 LOC) with dependency-injected client and enqueue callback.
+7 -10
View File
@@ -4,14 +4,13 @@ export const PROJECT_MARKERS = [".git", "pyproject.toml", "package.json", "Cargo
export const PROJECT_RULE_SUBDIRS = [
[".omo", "rules"],
[".sisyphus", "rules"],
[".claude", "rules"],
[".cursor", "rules"],
[".github", "instructions"],
] as const;
export const PROJECT_RULE_FILES = [".github/copilot-instructions.md"] as const;
export const OPENCODE_USER_RULE_DIRS = [".omo/rules", ".sisyphus/rules", ".opencode/rules"] as const;
export const OPENCODE_USER_RULE_DIRS = [".omo/rules", ".opencode/rules"] as const;
export const USER_RULE_DIR = ".claude/rules";
export const RULE_EXTENSIONS = [".md", ".mdc"] as const;
export const GITHUB_INSTRUCTIONS_PATTERN = /\.instructions\.md$/;
@@ -21,13 +20,11 @@ export const EXCLUDED_DIRS = new Set(["node_modules", ".git", "dist", "build", "
export const SOURCE_PRIORITY: ReadonlyMap<RuleSource, number> = new Map([
[".omo/rules", 0],
[".sisyphus/rules", 1],
[".claude/rules", 2],
[".cursor/rules", 3],
[".github/instructions", 4],
[".github/copilot-instructions.md", 5],
[".claude/rules", 1],
[".cursor/rules", 2],
[".github/instructions", 3],
[".github/copilot-instructions.md", 4],
["~/.omo/rules", 100],
["~/.sisyphus/rules", 101],
["~/.opencode/rules", 102],
["~/.claude/rules", 103],
["~/.opencode/rules", 101],
["~/.claude/rules", 102],
]);
+2 -2
View File
@@ -55,11 +55,11 @@ describe("rules-core", () => {
expect(found.map((rule) => rule.relativePath)).toEqual([
".github/copilot-instructions.md",
".omo/rules/omo.md",
".sisyphus/rules/sisyphus.md",
".claude/rules/claude.md",
".cursor/rules/cursor.md",
".github/instructions/github.instructions.md",
]);
expect(found.map((rule) => rule.relativePath)).not.toContain(".sisyphus/rules/sisyphus.md");
});
it("#given frontmatter aliases and negative glob #when matching #then honors applyTo paths and exclusions", () => {
@@ -113,7 +113,7 @@ describe("rules-core", () => {
// then
expect(first).toEqual(second);
expect(cache.stats()).toEqual({ candidateEntries: 1, directoryEntries: 11 });
expect(cache.stats()).toEqual({ candidateEntries: 1, directoryEntries: 9 });
});
it("#given nested project markers #when finding project root #then memoizes ancestor lookups", () => {
-2
View File
@@ -23,13 +23,11 @@ export interface RuleFileCandidate {
export type RuleSource =
| ".omo/rules"
| ".sisyphus/rules"
| ".claude/rules"
| ".cursor/rules"
| ".github/instructions"
| ".github/copilot-instructions.md"
| "~/.omo/rules"
| "~/.sisyphus/rules"
| "~/.opencode/rules"
| "~/.claude/rules";
+1 -2
View File
@@ -16,7 +16,6 @@ export const PROJECT_RULE_SUBDIRS: [string, string][] = [
[".cursor", "rules"],
[".claude", "rules"],
[".omo", "rules"],
[".sisyphus", "rules"],
];
export const PROJECT_RULE_FILES: string[] = [
@@ -27,6 +26,6 @@ export const GITHUB_INSTRUCTIONS_PATTERN = /\.instructions\.md$/;
export const USER_RULE_DIR = ".claude/rules";
export const OPENCODE_USER_RULE_DIRS = [".omo/rules", ".sisyphus/rules", ".opencode/rules"];
export const OPENCODE_USER_RULE_DIRS = [".omo/rules", ".opencode/rules"];
export const RULE_EXTENSIONS = [".md", ".mdc"];