From 3dd414226bd55574a4c754d8746eb19b7ec662e5 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 19 May 2026 14:27:48 +0900 Subject: [PATCH] fix(rules): drop legacy sisyphus rule sources --- AGENTS.md | 2 +- packages/rules-core/src/constants.ts | 17 +++++++---------- packages/rules-core/src/index.test.ts | 4 ++-- packages/rules-core/src/types.ts | 2 -- src/hooks/rules-injector/constants.ts | 3 +-- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f6dd44e67..1e8f9cc49 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -269,7 +269,7 @@ bunx oh-my-opencode mcp-oauth login # 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. diff --git a/packages/rules-core/src/constants.ts b/packages/rules-core/src/constants.ts index aafdb0088..e254b1768 100644 --- a/packages/rules-core/src/constants.ts +++ b/packages/rules-core/src/constants.ts @@ -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 = 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], ]); diff --git a/packages/rules-core/src/index.test.ts b/packages/rules-core/src/index.test.ts index bfb069291..30bb05981 100644 --- a/packages/rules-core/src/index.test.ts +++ b/packages/rules-core/src/index.test.ts @@ -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", () => { diff --git a/packages/rules-core/src/types.ts b/packages/rules-core/src/types.ts index 4bea6d989..a6d44c1da 100644 --- a/packages/rules-core/src/types.ts +++ b/packages/rules-core/src/types.ts @@ -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"; diff --git a/src/hooks/rules-injector/constants.ts b/src/hooks/rules-injector/constants.ts index 1d1468460..5d62f49e7 100644 --- a/src/hooks/rules-injector/constants.ts +++ b/src/hooks/rules-injector/constants.ts @@ -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"];