Skip to main content

morph-discovery-pattern

Morph discovery + fallback pattern — discover edit_file and warpgrep at runtime via ToolSearch, prefer them for large edits and intent-based search, silently fall back to Edit/Grep when yellow-morph is missing. Use when authoring agents that edit files or run semantic searches.

설치로 이동

소스 정보

저장소
KingInYellows/yellow-plugins
최근 소스 활동
2026년 9월 6일 22:45
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
morph-discovery-pattern
description
Morph discovery + fallback pattern — discover edit_file and warpgrep at runtime via ToolSearch, prefer them for large edits and intent-based search, silently fall back to Edit/Grep when yellow-morph is missing. Use when authoring agents that edit files or run semantic searches.
user-invocable
false
# Pattern: Morph-Discovery Discover morph tools at runtime via ToolSearch. Prefer morph when available for large file edits and intent-based code search. Fall back to built-in tools silently when morph is not installed. ## What It Does Uses `ToolSearch` keyword queries (`"morph edit"`, `"morph warpgrep"`) to discover morph tools at runtime, prefers them for qualifying operations (large/non-contiguous edits, intent-based searches), and silently uses the built-in `Edit`/`Grep` tools when morph is not installed. ## When to Use When authoring an agent or command that performs file edits or code search and would benefit from morph's efficiency for large/scattered edits or semantic searches — but should also work without yellow-morph installed. Skip for trivial single-line edits or exact-string greps where built-ins are already optimal. ## Usage ### For File Editing ```text 1. Call ToolSearch("morph edit") 2. If found AND (file > 200 lines OR change spans 3+ non-contiguous regions): prefer morph edit_file over built-in Edit 3. If not found OR file is small with contiguous changes: use built-in Edit 4. No warning on fallback. No degradation message. ``` ### For Intent-Based Code Search ```text 1. Call ToolSearch("morph warpgrep") 2. If found AND query is intent-based ("what calls this function?", "find similar patterns", "blast radius of this change"): prefer morph codebase_search (aka WarpGrep) 3. If not found OR query is exact-match (specific string, regex): use built-in Grep 4. No warning on fallback. No degradation message. ``` ### Design Choices - **Keyword-based ToolSearch** (`"morph edit"`, `"morph warpgrep"`) rather than `select:<exact_name>` — resilient to tool renames. - **Per-command discovery** rather than session-level caching — ToolSearch is fast (sub-100ms), avoids coupling to morph package names. - **No hard dependency** — morph tools are never listed in command `allowed-tools`. Discovery happens at runtime. ## Anti-Patterns - **Do not** add morph tools to command `allowed-tools` — use ToolSearch discovery - **Do not** warn or message the user when morph is not available ## Related - `memory-recall-pattern` — query past learnings at workflow start. - `memory-remember-pattern` — store learnings at workflow end.
GitHub에서 보기