AGENTS.md / CLAUDE.md auto-discovery.
Quick Start
1
Layer one extra source for this run
Pass
--instructions with a file, glob, or URL:2
Declare sources in config
Add a top-level
instructions: list to .praisonai/config.yaml so every run picks them up:3
Layer org-wide + project sources
Set an org list in your global config and extend it per project — the resolver concatenates list values across the hierarchy (global → user → project):
Source Types
Each entry may be a file path, glob, home path, or remote URL.How It Works
Config sources are resolved first, then repeatable--instructions flags are appended on top; the merged text is prepended into the agent’s backstory as # Project Instructions before the run.
Declared instructions load up front, alongside the AGENTS.md / CLAUDE.md walk-up. They are passed to the subtree-context hook as already_loaded, so a nested packages/foo/AGENTS.md named in both places is not re-attached when the agent later touches a file there.
All three run paths honour the merged instructions:
Behaviour Guarantees
Opt-outs
Two switches turn declared instructions off.1
Skip all rules for a run
--no-rules (or PRAISON_NO_RULES=true) suppresses both the auto-discovered AGENTS.md / CLAUDE.md walk-up and these declared instructions:2
Allow internal-host URLs (SSRF opt-in)
Remote URLs resolving to private, loopback, link-local, reserved, multicast, or unspecified addresses are blocked by default. Opt in only for trusted internal setups:
Common Patterns
Org-wide standards + per-project extensions
Declare shared standards in your global config and extend them in each project. List values concat across the hierarchy, so both sets load:CI-only overrides via the command line
Keep the repo config clean and layer CI-specific rules from the pipeline:Language-specific bundles via globs
Load every standard in a folder with one entry:Python API
resolve_instruction_sources() resolves a list of entries into combined text — the same function the CLI uses.
resolve_instruction_sources is a wrapper-only helper — it adds no Agent parameters and does not change the Agent core. The praisonai wrapper re-exports it, so from praisonai.integration.context_files import resolve_instruction_sources also works.Best Practices
Prefer config for durable rules, --instructions for one-offs
Prefer config for durable rules, --instructions for one-offs
Put rules that should always apply in the
instructions: config key so every run and every teammate picks them up. Reach for --instructions when you need an extra source for a single command — a CI-only review checklist, or a temporary spec.Use globs for language bundles
Use globs for language bundles
Group per-language standards under one folder and reference them with a glob (
docs/standards/*.md). Matches expand sorted, so the merged order is stable across machines and CI.Keep remote URLs public and small
Keep remote URLs public and small
Remote sources are fetched best-effort, capped at 256 KB, and time out after 5 seconds. Point at public, stable URLs. For internal hosts, prefer committing the file to the repo over enabling the SSRF opt-out.
Combine --no-rules to replace rather than extend
Combine --no-rules to replace rather than extend
--instructions normally layers on top of auto-discovered rules. Add --no-rules when you want the declared sources to be the only instructions, replacing the AGENTS.md / CLAUDE.md walk-up entirely.Related
Context Files
Auto-discovered AGENTS.md / CLAUDE.md injection
Rules
Auto-discovered instruction files
Run CLI
The praisonai run command reference

