RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/code-yeongyu/oh-my-openagent

AGENTS.md

packages/omo-opencode/src/hooks/todo-continuation-enforcer/AGENTS.md
AGENTS.md

Quality

66/100

Scores the file, not the repository.

Length

521 words

8 headings · 3 code blocks

Repository

67k

— · pushed 0 days ago

Last changed

2 days ago

First indexed 2 days ago.
code-yeongyu/oh-my-openagent/packages/omo-opencode/src/hooks/todo-continuation-enforcer/AGENTS.mdRawGitHub
1# src/hooks/todo-continuation-enforcer/ (Boulder Continuation Mechanism)
2 
3**Generated:** 2026-07-17 (7d664b96b)
4 
5## OVERVIEW
6 
717 source files (~1690 LOC). The "boulder" Continuation Tier hook: forces Sisyphus to keep rolling when incomplete todos remain. Fires on `session.idle`, injects a continuation prompt after a 2s countdown toast.
8 
9## HOW IT WORKS
10 
11```
12session.idle
13 → Is main session (not prometheus/compaction/plan)? (DEFAULT_SKIP_AGENTS)
14 → No abort detected recently? (ABORT_WINDOW_MS = 3s)
15 → Todos still incomplete? (todo.ts)
16 → No background tasks running?
17 → Cooldown passed? (CONTINUATION_COOLDOWN_MS = 5s, exponential backoff)
18 → Failure count < max? (MAX_CONSECUTIVE_FAILURES = 5)
19 → Not paused at turn boundary? (continuationBlockReason)
20 → Start 2s countdown toast → inject CONTINUATION_PROMPT
21```
22 
23## TURN-BOUNDARY PAUSE
24 
25After injecting `CONTINUATION_PROMPT` the hook watches the next turn before
26rearming. `awaitingPostInjectionProgressCheck` is set on injection; assistant
27activity (`message.updated` / `message.part.updated` / `message.part.delta` with
28role=assistant, or `tool.execute.before/after`) marks `continuationResponseObserved`.
29 
30On the next `session.idle`, `trackContinuationProgress` resolves the pause:
31 
32- No progress + `continuationResponseObserved` set: `continuationBlockReason = "directive-response"`. The assistant answered without advancing todos, so rearming stops.
33- Genuine user message inside the accepted-continuation window: `continuationBlockReason = "user-interruption"`. Synthetic/internal split messages (continuation echo, system directives) are filtered out. When the user `message.updated` event lacks parts, classification is deferred to `message.part.updated` by stashing `pendingUserMessageID`.
34 
35While `continuationBlockReason` is set, `handleSessionIdle` and `continuation-injection.ts` skip. It is cleared on real todo progress, abort, or a fresh injection.
36 
37## KEY FILES
38 
39| File | Purpose |
40|------|---------|
41| `handler.ts` | `createTodoContinuationHandler()`: event router. Handles `session.error` (abort + token-limit detection) and `session.compacted`; delegates `session.idle` and the message lifecycle to idle/non-idle handlers |
42| `idle-event.ts` | `handleSessionIdle()`: main decision gate for `session.idle` |
43| `non-idle-events.ts` | `handleNonIdleEvent()`: `message.updated` / `message.part.updated` / `message.part.delta` and `tool.execute` handlers; classifies user interruptions vs assistant turns for the turn-boundary pause |
44| `session-state.ts` | `SessionStateStore`: per-session failure/abort/cooldown/progress state |
45| `todo.ts` | Check todo completion status via session store |
46| `countdown.ts` | 2s countdown toast before injection |
47| `abort-detection.ts` | Detect MessageAbortedError / AbortError |
48| `continuation-injection.ts` | Build + inject CONTINUATION_PROMPT into session |
49| `message-directory.ts` | Temp dir for message injection exchange |
50| `constants.ts` | Timing constants, CONTINUATION_PROMPT, skip agents |
51| `types.ts` | `SessionState`, handler argument types |
52 
53## CONSTANTS
54 
55```typescript
56DEFAULT_SKIP_AGENTS = ["prometheus", "compaction", "plan"]
57CONTINUATION_COOLDOWN_MS = 5_000 // 5s base, exponential backoff per failure
58MAX_CONSECUTIVE_FAILURES = 5 // Then 5min pause (exponential backoff)
59FAILURE_RESET_WINDOW_MS = 5 * 60_000 // 5min window for failure reset
60COUNTDOWN_SECONDS = 2
61ABORT_WINDOW_MS = 3000 // Grace after abort signal
62```
63 
64## STATE PER SESSION
65 
66```typescript
67interface SessionState {
68 stagnationCount: number // Turns without todo progress
69 consecutiveFailures: number // Resets after FAILURE_RESET_WINDOW_MS
70 lastInjectedAt?: number // Cooldown base (exponential backoff)
71 abortDetectedAt?: number // Cleared after ABORT_WINDOW_MS
72 wasCancelled?: boolean // Abort/cancel flag
73 tokenLimitDetected?: boolean // Skip retry on context overflow
74 awaitingPostInjectionProgressCheck?: boolean // Injected, awaiting next turn
75 continuationResponseObserved?: boolean // Assistant replied to injection
76 continuationBlockReason?: "directive-response" | "user-interruption"
77 pendingUserMessageID?: string // Deferred user msg pending part classification
78 countdownStartedAt?: number
79 inFlight?: boolean // Injection in progress
80 allTodosCompletedAt?: number
81}
82```
83 
84## RELATIONSHIP TO ATLAS
85 
86`todoContinuationEnforcer` handles **main Sisyphus sessions** only.
87`atlasHook` handles **boulder/ralph/subagent sessions** with a different decision gate.
88Both fire on `session.idle` but check session type first.
89 

Sections

  • src/hooks/todo-continuation-enforcer/ (Boulder Continuation Mechanism)
  • OVERVIEW
  • HOW IT WORKS
  • TURN-BOUNDARY PAUSE
  • KEY FILES
  • CONSTANTS
  • STATE PER SESSION
  • RELATIONSHIP TO ATLAS

What it covers

architecture

Stack — with the evidence

typescript

(1.00)

bun

(1.00)

node

(0.70)

vitest

(0.70)

biome

(0.70)

javascript

(0.60)

github-actions

(0.60)

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
code-yeongyu
Language
—
License
—
Archived
no

All configs in this repo

Also in code-yeongyu/oh-my-openagent

Diff this repo’s formats

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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
code-yeongyu/oh-my-openagentpackages/omo-opencode/src/features/claude-code-agent-loader/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archdeploymentagent-behaviour62/1002 days ago
code-yeongyu/oh-my-openagentpackages/omo-opencode/src/features/claude-code-mcp-loader/AGENTS.md · 67kAGENTS.mdtypescriptbun+5lint-formatarchsecuritydeployment+166/1002 days ago
code-yeongyu/oh-my-openagentpackages/omo-opencode/src/tools/background-task/AGENTS.md · 67kAGENTS.mdtypescriptbun+5arch70/1002 days ago
code-yeongyu/oh-my-openagentscript/AGENTS.md · 67kAGENTS.mdtypescriptbun+5buildtestarchdeployment80/1002 days ago
code-yeongyu/oh-my-openagentpackages/omo-opencode/src/features/claude-code-plugin-loader/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archdeploymentagent-behaviour70/1002 days ago
code-yeongyu/oh-my-openagent.agents/AGENTS.md · 67kAGENTS.mdtypescriptbun+5stylearchtesting-strategydatabase64/1002 days ago
code-yeongyu/oh-my-openagent.opencode/AGENTS.md · 67kAGENTS.mdtypescriptbun+5stylearchdo-not71/1002 days ago
code-yeongyu/oh-my-openagentAGENTS.md · 67kAGENTS.mdtypescriptbun+5setupbuildtestlint-format+1184/1002 days ago
code-yeongyu/oh-my-openagentassets/AGENTS.md · 67kAGENTS.mdtypescriptbun+5buildteststylearch88/1002 days ago
code-yeongyu/oh-my-openagentbin/AGENTS.md · 67kAGENTS.mdtypescriptbun+5teststylearch64/1002 days ago
code-yeongyu/oh-my-openagentpackages/AGENTS.md · 67kAGENTS.mdtypescriptnode+5buildtestlint-formatstyle+383/1002 days ago
code-yeongyu/oh-my-openagentpackages/agents-md-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archdependenciesapi48/1002 days ago
code-yeongyu/oh-my-openagentpackages/boulder-state/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archapi48/1002 days ago
code-yeongyu/oh-my-openagentpackages/claude-code-compat-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archagent-behaviour56/1002 days ago
code-yeongyu/oh-my-openagentpackages/comment-checker-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archdependenciesapi48/1002 days ago
code-yeongyu/oh-my-openagentpackages/delegate-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5stylearchdependenciesapi60/1002 days ago
code-yeongyu/oh-my-openagentpackages/git-bash-mcp/AGENTS.md · 67kAGENTS.mdtypescriptbun+5buildtestlint-formatarch+182/1002 days ago
code-yeongyu/oh-my-openagentpackages/hashline-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archtypesdependenciesapi48/1002 days ago
code-yeongyu/oh-my-openagentpackages/lsp-core/AGENTS.md · 67kAGENTS.mdtypescriptbun+5archmonorepo43/1002 days ago
code-yeongyu/oh-my-openagentpackages/lsp-daemon/AGENTS.md · 67kAGENTS.mdtypescriptnode+5buildtestlint-formatarch+189/100today
Diff against packages/omo-opencode/src/features/claude-code-agent-loader/AGENTS.md Diff against packages/omo-opencode/src/features/claude-code-mcp-loader/AGENTS.md Diff against packages/omo-opencode/src/tools/background-task/AGENTS.md Diff against script/AGENTS.md Diff against packages/omo-opencode/src/features/claude-code-plugin-loader/AGENTS.md Diff against .agents/AGENTS.md Diff against .opencode/AGENTS.md Diff against AGENTS.md Diff against assets/AGENTS.md Diff against bin/AGENTS.md Diff against packages/AGENTS.md Diff against packages/agents-md-core/AGENTS.md Diff against packages/boulder-state/AGENTS.md Diff against packages/claude-code-compat-core/AGENTS.md Diff against packages/comment-checker-core/AGENTS.md Diff against packages/delegate-core/AGENTS.md Diff against packages/git-bash-mcp/AGENTS.md Diff against packages/hashline-core/AGENTS.md Diff against packages/lsp-core/AGENTS.md Diff against packages/lsp-daemon/AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
aaif-goose/gooseAGENTS.md · 52kAGENTS.mdrusttypescript+2setupbuildtestlint-format+6100/1003 days ago
TryGhost/Ghoste2e/AGENTS.md · 55kAGENTS.mdtypescriptjavascript+12setupteststylearch+2100/1003 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
mui/material-uiAGENTS.md · 99kAGENTS.mdtypescriptjavascript+13setupbuildtestlint-format+9100/1003 days ago
SkeneTechnologies/skene-cookbookAGENTS.md · 51AGENTS.mdpythoneslint+4setupbuildtestlint-format+7100/1002 days ago
trick77/agents-md-syncAGENTS.md · 2AGENTS.mdtypescriptnode+4setupbuildteststyle+5100/1003 days ago
code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67kAGENTS.mdtypescriptbun+10setupbuildtestlint-format+6100/1002 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack