From 595f4b6dd5a0915f2fea3deb2223dd1eb04ce9c8 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 11 Dec 2025 14:15:07 +0900 Subject: [PATCH] docs(readme): document Rules Injector feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit πŸ€– GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) --- README.ko.md | 14 ++++++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/README.ko.md b/README.ko.md index e349c62..25ff496 100644 --- a/README.ko.md +++ b/README.ko.md @@ -167,6 +167,20 @@ OpenCode λŠ” μ•„μ£Ό ν™•μž₯κ°€λŠ₯ν•˜κ³  μ•„μ£Ό μ»€μŠ€ν„°λ§ˆμ΄μ €λΈ”ν•©λ‹ˆλ‹€. ``` `Button.tsx`λ₯Ό 읽으면 μˆœμ„œλŒ€λ‘œ μ£Όμž…λ©λ‹ˆλ‹€: `project/AGENTS.md` β†’ `src/AGENTS.md` β†’ `components/AGENTS.md`. 각 λ””λ ‰ν† λ¦¬μ˜ μ»¨ν…μŠ€νŠΈλŠ” μ„Έμ…˜λ‹Ή ν•œ 번만 μ£Όμž…λ©λ‹ˆλ‹€. Claude Code의 CLAUDE.md κΈ°λŠ₯μ—μ„œ μ˜κ°μ„ λ°›μ•˜μŠ΅λ‹ˆλ‹€. - **Directory README.md Injector**: νŒŒμΌμ„ 읽을 λ•Œ `README.md` λ‚΄μš©μ„ μžλ™μœΌλ‘œ μ£Όμž…ν•©λ‹ˆλ‹€. AGENTS.md Injector와 λ™μΌν•˜κ²Œ λ™μž‘ν•˜λ©°, 파일 디렉토리뢀터 ν”„λ‘œμ νŠΈ λ£¨νŠΈκΉŒμ§€ νƒμƒ‰ν•©λ‹ˆλ‹€. LLM μ—μ΄μ „νŠΈμ—κ²Œ ν”„λ‘œμ νŠΈ λ¬Έμ„œ μ»¨ν…μŠ€νŠΈλ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€. 각 λ””λ ‰ν† λ¦¬μ˜ READMEλŠ” μ„Έμ…˜λ‹Ή ν•œ 번만 μ£Όμž…λ©λ‹ˆλ‹€. +- **Rules Injector**: νŒŒμΌμ„ 읽을 λ•Œ `.claude/rules/` λ””λ ‰ν† λ¦¬μ˜ κ·œμΉ™μ„ μžλ™μœΌλ‘œ μ£Όμž…ν•©λ‹ˆλ‹€. + - 파일 디렉토리뢀터 ν”„λ‘œμ νŠΈ λ£¨νŠΈκΉŒμ§€ 상ν–₯ νƒμƒ‰ν•˜λ©°, `~/.claude/rules/` (μ‚¬μš©μž) κ²½λ‘œλ„ ν¬ν•¨ν•©λ‹ˆλ‹€. + - `.md` 및 `.mdc` νŒŒμΌμ„ μ§€μ›ν•©λ‹ˆλ‹€. + - Frontmatter의 `globs` ν•„λ“œ(glob νŒ¨ν„΄)λ₯Ό 기반으둜 λ§€μΉ­ν•©λ‹ˆλ‹€. + - 항상 μ μš©λ˜μ–΄μ•Ό ν•˜λŠ” κ·œμΉ™μ„ μœ„ν•œ `alwaysApply: true` μ˜΅μ…˜μ„ μ§€μ›ν•©λ‹ˆλ‹€. + - κ·œμΉ™ 파일 ꡬ쑰 μ˜ˆμ‹œ: + ```markdown + --- + globs: ["*.ts", "src/**/*.js"] + description: "TypeScript/JavaScript coding rules" + --- + - Use PascalCase for interface names + - Use camelCase for function names + ``` - **Think Mode**: ν™•μž₯된 사고(Extended Thinking)κ°€ ν•„μš”ν•œ 상황을 μžλ™μœΌλ‘œ κ°μ§€ν•˜κ³  λͺ¨λ“œλ₯Ό μ „ν™˜ν•©λ‹ˆλ‹€. μ‚¬μš©μžκ°€ κΉŠμ€ 사고λ₯Ό μš”μ²­ν•˜λŠ” ν‘œν˜„(예: "think deeply", "ultrathink")을 κ°μ§€ν•˜λ©΄, μΆ”λ‘  λŠ₯λ ₯을 κ·ΉλŒ€ν™”ν•˜λ„λ‘ λͺ¨λΈ 섀정을 λ™μ μœΌλ‘œ μ‘°μ •ν•©λ‹ˆλ‹€. - **Anthropic Auto Compact**: Anthropic λͺ¨λΈ μ‚¬μš© μ‹œ μ»¨ν…μŠ€νŠΈ ν•œκ³„μ— λ„λ‹¬ν•˜λ©΄ λŒ€ν™” 기둝을 μžλ™μœΌλ‘œ μ••μΆ•ν•˜μ—¬ 효율적으둜 κ΄€λ¦¬ν•©λ‹ˆλ‹€. - **Empty Task Response Detector**: μ„œλΈŒ μ—μ΄μ „νŠΈκ°€ μˆ˜ν–‰ν•œ μž‘μ—…μ΄ λΉ„μ–΄μžˆκ±°λ‚˜ λ¬΄μ˜λ―Έν•œ 응닡을 λ°˜ν™˜ν•˜λŠ” 경우λ₯Ό κ°μ§€ν•˜μ—¬, 였λ₯˜ 없이 μš°μ•„ν•˜κ²Œ μ²˜λ¦¬ν•©λ‹ˆλ‹€. diff --git a/README.md b/README.md index 73d2ec6..097d8df 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,20 @@ I believe in the right tool for the job. For your wallet's sake, use CLIProxyAPI ``` When reading `Button.tsx`, the hook injects contexts in order: `project/AGENTS.md` β†’ `src/AGENTS.md` β†’ `components/AGENTS.md`. Each directory's context is injected only once per session. Inspired by Claude Code's CLAUDE.md feature. - **Directory README.md Injector**: Automatically injects `README.md` contents when reading files. Works identically to the AGENTS.md Injector, searching upward from the file's directory to project root. Provides project documentation context to the LLM agent. Each directory's README is injected only once per session. +- **Rules Injector**: Automatically injects rules from `.claude/rules/` directory when reading files. + - Searches upward from the file's directory to project root, plus `~/.claude/rules/` (user). + - Supports `.md` and `.mdc` files. + - Frontmatter-based matching with `globs` field (glob patterns). + - `alwaysApply: true` option for rules that should always apply. + - Example rule file structure: + ```markdown + --- + globs: ["*.ts", "src/**/*.js"] + description: "TypeScript/JavaScript coding rules" + --- + - Use PascalCase for interface names + - Use camelCase for function names + ``` - **Think Mode**: Automatic extended thinking detection and mode switching. Detects when user requests deep thinking (e.g., "think deeply", "ultrathink") and dynamically adjusts model settings for enhanced reasoning. - **Anthropic Auto Compact**: Automatically compacts conversation history when approaching context limits for Anthropic models. - **Empty Task Response Detector**: Detects when subagent tasks return empty or meaningless responses and handles gracefully.