diff --git a/README.md b/README.md index c6598da..f7c9856 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Coming from [AIChat](https://github.com/sigoden/aichat)? Follow the [migration g * [RAG](https://github.com/Dark-Alex-17/coyote/wiki/RAG): Retrieval-Augmented Generation for enhanced information retrieval and generation. * [Sessions](https://github.com/Dark-Alex-17/coyote/wiki/Sessions): Manage and persist conversational contexts and settings across multiple interactions. * [Memory](https://github.com/Dark-Alex-17/coyote/wiki/Memory): Persistent file-based memory that survives across sessions. Bootstrap with `coyote --init-memory [global|workspace]`. -* [Workspace Instructions](https://github.com/Dark-Alex-17/coyote/wiki/Workspace-Instructions): Human-curated project instructions (`COYOTE.md`) injected into every prompt, with `AGENTS.md`/`CLAUDE.md` fallbacks for cross-tool compatibility. Scaffold with `coyote --init-instructions`. +* [Workspace Instructions](https://github.com/Dark-Alex-17/coyote/wiki/Workspace-Instructions): Human-curated project instructions (`COYOTE.md`) injected into every prompt, with `AGENTS.md`/`CLAUDE.md`/`GEMINI.md` fallbacks for cross-tool compatibility. Scaffold with `coyote --init-instructions`. * [Roles](https://github.com/Dark-Alex-17/coyote/wiki/Roles): Customize model behavior for specific tasks or domains. * [Skills](https://github.com/Dark-Alex-17/coyote/wiki/Skills): Modular knowledge or capability packs the LLM can load and unload mid-conversation. Multiple skills compose; instructions stack, tools and MCPs union. * [Agents](https://github.com/Dark-Alex-17/coyote/wiki/Agents): Leverage AI agents to perform complex tasks and workflows, including sub-agent spawning, teammate messaging, and user interaction tools. diff --git a/assets/skills/iwe-knowledge-base/SKILL.md b/assets/skills/iwe-knowledge-base/SKILL.md index 71e7e50..0090e8d 100644 --- a/assets/skills/iwe-knowledge-base/SKILL.md +++ b/assets/skills/iwe-knowledge-base/SKILL.md @@ -11,7 +11,7 @@ Use IWE tools when the task involves a corpus of markdown documents: plan reposi Do NOT use IWE tools for: - **Agent memory** (`.coyote/memory/`) — use the `memory__*` tools; they own the index conventions there. -- **Workspace instructions** (`COYOTE.md`, `AGENTS.md`, `CLAUDE.md`) — human-curated and read-only; never edit them with IWE write tools. +- **Workspace instructions** (`COYOTE.md`, `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`) — human-curated and read-only; never edit them with IWE write tools. - **Semantic/similarity search over documents** — that is RAG's job. IWE search is fuzzy title/key matching plus structural traversal, not embeddings. - **Source code** — IWE only understands markdown. diff --git a/config.example.yaml b/config.example.yaml index 5f1cb3f..7a29ea9 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -208,7 +208,7 @@ memory_cap_without_tools: null # Char cap when function calling is unavailable # repeatable --workspace-instructions-file flags. workspace_instructions: null # null/true = inject when an instructions file exists; false = never inject workspace_instructions_files: null # File name chain to search, in priority order. - # Default: [COYOTE.md, AGENTS.md, CLAUDE.md] + # Default: [COYOTE.md, AGENTS.md, CLAUDE.md, GEMINI.md] # Set to a custom list to reorder or drop fallbacks, e.g.: # workspace_instructions_files: [COYOTE.md] diff --git a/src/config/instructions.rs b/src/config/instructions.rs index 94fe566..4541dff 100644 --- a/src/config/instructions.rs +++ b/src/config/instructions.rs @@ -4,8 +4,12 @@ use std::path::{Path, PathBuf}; use log::warn; pub const WORKSPACE_INSTRUCTIONS_FILE_NAME: &str = "COYOTE.md"; -pub const DEFAULT_WORKSPACE_INSTRUCTIONS_FILES: [&str; 3] = - [WORKSPACE_INSTRUCTIONS_FILE_NAME, "AGENTS.md", "CLAUDE.md"]; +pub const DEFAULT_WORKSPACE_INSTRUCTIONS_FILES: [&str; 4] = [ + WORKSPACE_INSTRUCTIONS_FILE_NAME, + "AGENTS.md", + "CLAUDE.md", + "GEMINI.md", +]; const INSTRUCTIONS_SIZE_WARN_THRESHOLD: usize = 24_000; #[derive(Debug, Clone)] @@ -108,10 +112,14 @@ mod tests { } #[test] - fn discovery_falls_back_to_agents_md_then_claude_md() { + fn discovery_falls_back_through_chain_in_order() { let root = temp_root("fallback"); - fs::write(root.join("CLAUDE.md"), "claude instructions").unwrap(); + fs::write(root.join("GEMINI.md"), "gemini instructions").unwrap(); + let found = discover_workspace_instructions(&root, &defaults()).unwrap(); + assert_eq!(found.path, root.join("GEMINI.md")); + + fs::write(root.join("CLAUDE.md"), "claude instructions").unwrap(); let found = discover_workspace_instructions(&root, &defaults()).unwrap(); assert_eq!(found.path, root.join("CLAUDE.md"));