Problem
Zeph's system prompt is fully hardcoded in crates/zeph-core/src/context.rs. There is no mechanism to load project-specific instruction files at runtime, and no support for the instruction file conventions used by other AI coding agents.
Different providers and tools use different standard filenames:
| Provider / Tool |
Standard file(s) |
| Claude / Claude Code |
CLAUDE.md, .claude/CLAUDE.md, .claude/rules/*.md |
| OpenAI Codex |
AGENTS.md, AGENTS.override.md |
| Gemini CLI |
GEMINI.md |
| Cursor IDE |
.cursorrules (deprecated), .cursor/rules/*.mdc |
| Aider |
CONVENTIONS.md |
| Open standard |
AGENTS.md (agentsmd.net) |
| Zeph-native |
zeph.md, .zeph/zeph.md |
When developers have these files in their repo (which most do), Zeph ignores them — missing critical project-specific context that other agents receive.
Proposed Solution
1. Auto-detection by active provider
On startup, InstructionLoader scans CWD for provider-standard files based on the active llm.provider and orchestrator providers:
| Provider kind |
Files checked (priority order) |
claude |
CLAUDE.md, .claude/CLAUDE.md, .claude/rules/*.md |
openai |
AGENTS.override.md, AGENTS.md |
gemini |
GEMINI.md |
ollama / candle |
AGENTS.md, zeph.md |
| (always) |
zeph.md, .zeph/zeph.md |
When multiple providers are active (orchestrator), the union of detected files is loaded with deduplication.
2. Config options
[agent]
instruction_auto_detect = true # enable auto-detection (default: true)
instruction_files = [] # explicit list overrides auto-detect
[llm]
instruction_file = "" # per-provider override
[orchestrator.providers.<name>]
instruction_file = "" # per-orchestrator-provider override
3. System prompt injection
Instruction file content is injected between the static preamble and the skills block:
[static preamble]
[instruction file blocks — one per file, with source path header]
[skills XML block]
[tool catalog]
Implementation Plan
zeph-core/src/instructions.rs — new InstructionLoader module
load_instructions(config, provider_kinds) -> Vec<InstructionBlock>
InstructionBlock { source: PathBuf, content: String }
zeph-core/src/context.rs — add instructions: &[InstructionBlock] to build_system_prompt()
zeph-core/src/config/types.rs — extend AgentConfig, LlmConfig, OrchestratorProviderConfig
zeph-core/src/agent/mod.rs — invoke loader on startup
config/default.toml — document new fields
Full research and design: .local/plan/provider-instruction-files.md
References
Out of Scope
- Per-directory recursive scanning (Gemini/Codex style) — deferred
- Hot-reload of instruction files at runtime — separate issue
- TUI panel to display loaded instruction files — separate issue
Problem
Zeph's system prompt is fully hardcoded in
crates/zeph-core/src/context.rs. There is no mechanism to load project-specific instruction files at runtime, and no support for the instruction file conventions used by other AI coding agents.Different providers and tools use different standard filenames:
CLAUDE.md,.claude/CLAUDE.md,.claude/rules/*.mdAGENTS.md,AGENTS.override.mdGEMINI.md.cursorrules(deprecated),.cursor/rules/*.mdcCONVENTIONS.mdAGENTS.md(agentsmd.net)zeph.md,.zeph/zeph.mdWhen developers have these files in their repo (which most do), Zeph ignores them — missing critical project-specific context that other agents receive.
Proposed Solution
1. Auto-detection by active provider
On startup,
InstructionLoaderscans CWD for provider-standard files based on the activellm.providerand orchestrator providers:claudeCLAUDE.md,.claude/CLAUDE.md,.claude/rules/*.mdopenaiAGENTS.override.md,AGENTS.mdgeminiGEMINI.mdollama/candleAGENTS.md,zeph.mdzeph.md,.zeph/zeph.mdWhen multiple providers are active (orchestrator), the union of detected files is loaded with deduplication.
2. Config options
3. System prompt injection
Instruction file content is injected between the static preamble and the skills block:
Implementation Plan
zeph-core/src/instructions.rs— newInstructionLoadermoduleload_instructions(config, provider_kinds) -> Vec<InstructionBlock>InstructionBlock { source: PathBuf, content: String }zeph-core/src/context.rs— addinstructions: &[InstructionBlock]tobuild_system_prompt()zeph-core/src/config/types.rs— extendAgentConfig,LlmConfig,OrchestratorProviderConfigzeph-core/src/agent/mod.rs— invoke loader on startupconfig/default.toml— document new fieldsFull research and design:
.local/plan/provider-instruction-files.mdReferences
Out of Scope