Skip to content

feat(hooks): add directory README.md injector#15

Merged
code-yeongyu merged 1 commit into
masterfrom
add-readme-injection
Dec 11, 2025
Merged

feat(hooks): add directory README.md injector#15
code-yeongyu merged 1 commit into
masterfrom
add-readme-injection

Conversation

@code-yeongyu

Copy link
Copy Markdown
Owner

Summary

  • Add directory-readme-injector hook that automatically injects README.md contents when reading files
  • Works identically to the existing directory-agents-injector, searching upward from the file's directory to project root
  • Each directory's README is injected only once per session

Changes

  • New hook: src/hooks/directory-readme-injector/
  • Updated: src/hooks/index.ts, src/index.ts
  • Documentation: README.md, README.ko.md

Closes #14


🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode

Implements README.md injection similar to existing AGENTS.md injector.
Automatically injects README.md contents when reading files, searching
upward from file directory to project root.

Closes #14

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
@code-yeongyu code-yeongyu merged commit 9e00be9 into master Dec 11, 2025
1 check passed
@code-yeongyu code-yeongyu deleted the add-readme-injection branch December 21, 2025 09:13
codewithkenzo referenced this pull request in codewithkenzo/oh-my-opencode Jan 9, 2026
Implements README.md injection similar to existing AGENTS.md injector.
Automatically injects README.md contents when reading files, searching
upward from file directory to project root.

Closes #14

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
luobosibing2 pushed a commit to luobosibing2/oh-my-opencode that referenced this pull request Feb 23, 2026
Implemented full Claude Code plugin format support allowing installation
via `/plugin install` command. This restructures the project to be a
valid Claude Code plugin.

Changes:
- Added .claude-plugin/plugin.json manifest with metadata
- Created agents/ directory with 11 specialized subagent markdown files
- Created commands/ directory with 12 slash command markdown files
- Created skills/ directory with 3 skills (ultrawork, git-master, frontend-ui-ux)
- Added hooks/hooks.json for UserPromptSubmit and Stop hooks
- Added scripts/keyword-detector.sh for magic keyword detection
- Added scripts/stop-continuation.sh for todo continuation enforcement
- Updated README.md with plugin installation instructions

Plugin structure:
- .claude-plugin/plugin.json (manifest)
- agents/*.md (11 agents: oracle, librarian, explore, etc.)
- commands/*.md (12 commands: sisyphus, ultrawork, plan, etc.)
- skills/*/SKILL.md (3 skills)
- hooks/hooks.json (hook configuration)

Users can now install via:
- /plugin install oh-my-claude-sisyphus
- /plugin marketplace add Yeachan-Heo/oh-my-claude-sisyphus

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
luobosibing2 pushed a commit to luobosibing2/oh-my-opencode that referenced this pull request Feb 23, 2026
…-yeongyu#309)

Critical fixes:
- Bug #1: SubagentStop hook defaulted all agents to 'failed' because SDK
  doesn't provide `success` field. Now defaults to 'completed' when undefined.
- Bug code-yeongyu#4: Token stats lost across TokenTracker instances. Constructor now
  restores session stats from global state for the same session ID.
- Bug code-yeongyu#5: Ultrawork session isolation bypassed when both session IDs were
  undefined (undefined === undefined). Now rejects all falsy session IDs.

High priority fixes:
- Bug code-yeongyu#6: Cancel skill force-clear missed 12+ state files (boulder,
  hud-state, subagent-tracking, checkpoints, etc). Added comprehensive list.
- Bug code-yeongyu#7: HUD semverCompare() returned NaN on pre-release versions like
  "3.9.5-beta". Fixed to use parseInt and handle pre-release ordering.
- Bug code-yeongyu#8: Silent JSON parse failures in critical state readers. Added
  error logging to ralph and ultrawork state readers.
- Bug code-yeongyu#9: Stale task detection had no default behavior when onStaleSession
  callback was not configured. Now auto-cleans after 2x threshold.
- Bug code-yeongyu#10: Hardcoded 3-architect assumption in validation. Extracted to
  REQUIRED_ARCHITECTS constant.

Medium priority fixes:
- Bug code-yeongyu#11: Auto-invoke history used non-atomic writes. Now uses
  atomicWriteJson to prevent corruption from concurrent sessions.
- Bug code-yeongyu#12: Ecomode docs said "all tasks" use Haiku, contradicting the
  escalation paths. Clarified to "most tasks" with upgrade criteria.
- Bug code-yeongyu#13: Added safeUnlinkSync/safeRmSync utilities to prevent ENOENT
  crashes during cleanup operations.
- Bug code-yeongyu#14: State files containing user prompts written with 0644
  permissions. Now writes with 0600 (owner-only read/write).
- Bug code-yeongyu#15: Model names recorded inconsistently (e.g., 'claude-3-5-haiku'
  vs 'claude-haiku-4'). Now normalizes at recording time via exported
  normalizeModelName().

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Vacbo referenced this pull request in Vacbo/oh-my-opencode Apr 17, 2026
…sistence

Three real failures surfaced in the first end-to-end run against
v3.17.0 -> v3.17.4 (116 commits). Addressing all three:

1. Rate limiting on pass 1
   Copilot Student / Pro tier caps low-tier models at 15 req/min. The
   first run blew through the limit at request #15 and returned instant
   429 fallbacks ("NEEDS_REVIEW" with no reasoning) for commits 16-116.
   Add a RateLimiter (requests-per-minute, simple interval throttle) and
   wire it through classifyCommitsSequentially. Default 12 rpm stays
   comfortably under the ceiling.

2. Dirty working tree blocked batch-builder checkout
   `bun install` without --frozen-lockfile modifies bun.lock, then
   createBranchFromTag calls `git checkout -b` which refuses to proceed
   with:
     error: Your local changes to the following files would be overwritten
            by checkout: bun.lock
   Add resetWorkingTree() (git reset --hard HEAD + git clean -fdx except
   .analyzer-output) and call it before batch-building. Safe because the
   CI clone is ephemeral and never pushed.

3. Crashes lost all partial progress
   When pass 1 or later steps failed, the workflow uploaded nothing
   useful since artifacts were only written at the end. Rewrite
   runPipeline to writeArtifact after each pass:
     classifications.initial.json (after pass 1)
     verifications.json + classifications.json (after pass 2)
     synthesis.json (after pass 3)
     batches.json (after batch-builder)
     pipeline-result.json (combined, at the end)
   Combined with `if: always()` on the upload step, this guarantees
   post-mortem data even on crash.

classifyCommitsSequentially signature changed from positional to an
options object to make the new requestsPerMinute parameter optional
without threading boilerplate through callers.
Vacbo referenced this pull request in Vacbo/oh-my-opencode Apr 17, 2026
…sistence (#4)

Three real failures surfaced in the first end-to-end run against
v3.17.0 -> v3.17.4 (116 commits). Addressing all three:

1. Rate limiting on pass 1
   Copilot Student / Pro tier caps low-tier models at 15 req/min. The
   first run blew through the limit at request #15 and returned instant
   429 fallbacks ("NEEDS_REVIEW" with no reasoning) for commits 16-116.
   Add a RateLimiter (requests-per-minute, simple interval throttle) and
   wire it through classifyCommitsSequentially. Default 12 rpm stays
   comfortably under the ceiling.

2. Dirty working tree blocked batch-builder checkout
   `bun install` without --frozen-lockfile modifies bun.lock, then
   createBranchFromTag calls `git checkout -b` which refuses to proceed
   with:
     error: Your local changes to the following files would be overwritten
            by checkout: bun.lock
   Add resetWorkingTree() (git reset --hard HEAD + git clean -fdx except
   .analyzer-output) and call it before batch-building. Safe because the
   CI clone is ephemeral and never pushed.

3. Crashes lost all partial progress
   When pass 1 or later steps failed, the workflow uploaded nothing
   useful since artifacts were only written at the end. Rewrite
   runPipeline to writeArtifact after each pass:
     classifications.initial.json (after pass 1)
     verifications.json + classifications.json (after pass 2)
     synthesis.json (after pass 3)
     batches.json (after batch-builder)
     pipeline-result.json (combined, at the end)
   Combined with `if: always()` on the upload step, this guarantees
   post-mortem data even on crash.

classifyCommitsSequentially signature changed from positional to an
options object to make the new requestsPerMinute parameter optional
without threading boilerplate through callers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README Injection Like Agents.md Injection

1 participant