feat: Also support GEMINI.md workspace instructions
This commit is contained in:
@@ -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.
|
* [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.
|
* [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]`.
|
* [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.
|
* [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.
|
* [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.
|
* [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.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Use IWE tools when the task involves a corpus of markdown documents: plan reposi
|
|||||||
Do NOT use IWE tools for:
|
Do NOT use IWE tools for:
|
||||||
|
|
||||||
- **Agent memory** (`.coyote/memory/`) — use the `memory__*` tools; they own the index conventions there.
|
- **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.
|
- **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.
|
- **Source code** — IWE only understands markdown.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -208,7 +208,7 @@ memory_cap_without_tools: null # Char cap when function calling is unavailable
|
|||||||
# repeatable --workspace-instructions-file flags.
|
# repeatable --workspace-instructions-file flags.
|
||||||
workspace_instructions: null # null/true = inject when an instructions file exists; false = never inject
|
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.
|
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.:
|
# Set to a custom list to reorder or drop fallbacks, e.g.:
|
||||||
# workspace_instructions_files: [COYOTE.md]
|
# workspace_instructions_files: [COYOTE.md]
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,12 @@ use std::path::{Path, PathBuf};
|
|||||||
use log::warn;
|
use log::warn;
|
||||||
|
|
||||||
pub const WORKSPACE_INSTRUCTIONS_FILE_NAME: &str = "COYOTE.md";
|
pub const WORKSPACE_INSTRUCTIONS_FILE_NAME: &str = "COYOTE.md";
|
||||||
pub const DEFAULT_WORKSPACE_INSTRUCTIONS_FILES: [&str; 3] =
|
pub const DEFAULT_WORKSPACE_INSTRUCTIONS_FILES: [&str; 4] = [
|
||||||
[WORKSPACE_INSTRUCTIONS_FILE_NAME, "AGENTS.md", "CLAUDE.md"];
|
WORKSPACE_INSTRUCTIONS_FILE_NAME,
|
||||||
|
"AGENTS.md",
|
||||||
|
"CLAUDE.md",
|
||||||
|
"GEMINI.md",
|
||||||
|
];
|
||||||
const INSTRUCTIONS_SIZE_WARN_THRESHOLD: usize = 24_000;
|
const INSTRUCTIONS_SIZE_WARN_THRESHOLD: usize = 24_000;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
@@ -108,10 +112,14 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn discovery_falls_back_to_agents_md_then_claude_md() {
|
fn discovery_falls_back_through_chain_in_order() {
|
||||||
let root = temp_root("fallback");
|
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();
|
let found = discover_workspace_instructions(&root, &defaults()).unwrap();
|
||||||
assert_eq!(found.path, root.join("CLAUDE.md"));
|
assert_eq!(found.path, root.join("CLAUDE.md"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user