Type to search the docs and updates.

Browse documentation

Inspect and preview

explain

List every output file and section one spec contributes to, the reverse of the <!-- source: ... --> markers in merged documents. With --file, list the instructions configured for one source file instead.

agnostic-ai explain rules/conventional-commits.md --json
FlagDescription
--jsonStable schema for editor extensions and scripts.
--globalExplain a spec in $AGNOSTIC_AI_HOME (default ~/.agnostic-ai) or its local/ layer. A relative path resolves against that root.

Contributions are grouped by configured target, plus a "would emit if enabled" list for inactive adapters, tagged (full file) or (section "<name>"). With --global, an agent or skill is a whole file, a rule is a section of the instructions file, a hook is its event in the hooks file, an MCP server is its key in the user MCP file, and a settings spec lists each key it sets, tagged (key "<key>").

{"version": "1", "command": "explain", "spec": {"kind": "rule", "name": "...", "path": "..."},
 "contributions": [{"target": "...", "path": "...", "section": "...", "mode": "full|section|key"}],
 "would_emit_if_enabled": []}

Explain a source file

Start from a project file instead of a spec. The report lists every instruction the target would read from the planned sync output, with its source, output path, selector, and reason. Cursor is the only supported target.

agnostic-ai explain --file services/payments/handler.go --target cursor
FlagDescription
--file <path>Project file to inspect. The file does not have to exist. Cannot be combined with a spec or error code argument.
--target <name>Required with --file. Must be a configured target. Other targets fail with an unsupported-target error.
StatusMeaning
alwaysNo file condition: alwaysApply: true, or the root AGENTS.md.
matchA globs pattern or a nested AGENTS.md directory covers the file.
no-matchA selector exists and misses the file.
model-selectedalwaysApply: false with a description and no globs. Cursor's agent decides.
manualalwaysApply: false with neither. Loads only when @-mentioned.
unknownUndocumented glob syntax (braces, classes, negation), or unreadable frontmatter.
excludedTarget selection (target, targets, target-exclude) leaves the target out.
not-emittedThe rule targets Cursor but sync writes nothing for it.

A root AGENTS.md written for a peer target such as Codex reaches Cursor too. The report shows configured applicability, not the model's active context.

{"version": "1", "command": "explain", "file": "...", "target": "cursor", "note": "...",
 "instructions": [{"status": "match", "source": "...", "output": "...", "selector": "...", "reason": "..."}]}

compare

Compare how two built-in targets represent the project's agents and rule activation, before you switch or add a tool.

agnostic-ai compare claude cursor
FlagDescription
--jsonStable schema for scripts.

Coverage is agent fields plus rule scope, paths, globs, and alwaysApply. Other rules and spec kinds are left out. Each field gets one result per target:

ResultMeaning
preservedWritten under the same key with the same values.
translatedWritten under another key or file, with rewritten values, or only in part.
unsupportedThe target has no home for the field or the kind.
excludedThe spec never reaches the target: a target filter, an opt-in output, or an inexpressible scope.
unknownThe emission gives no evidence either way.

preserved describes the written file, not runtime behavior. (differs) marks a field with a different result per target. Each result names the output paths or reason, plus a next: step when known. Unknown targets, the same target twice, invalid specs or config, and external adapters fail the command.

{"version": "1", "command": "compare", "targets": ["claude", "cursor"], "coverage": "...", "caveat": "...",
 "specs": [{"kind": "agent", "name": "...", "path": "...", "fields": [{"field": "tools", "differs": true,
   "results": [{"target": "cursor", "status": "unsupported", "reason": "...", "next": "..."}]}]}],
 "fields": 6, "differences": 3}

render

Print what each target emits for one spec, without writing files.

agnostic-ai render rules/no-console-log.md --target claude,codex
FlagDescription
-t, --target <list>Targets to render, repeated or comma-separated. Default: all in agnostic-ai.yaml.

Each file prints as # target: <name>: <output path> and its body. Targets that emit nothing for the kind print a note.

graph

Render the spec → target → file dependency graph. Read-only. Full guide in graph.

agnostic-ai graph --format mermaid --target claude
FlagDescription
--formattext (default, aligned matrix), mermaid, dot, json.
--targetRestrict to one target.
--specRestrict to one spec name.
--kindRestrict to one kind: agent, skill, rule, hook, mcp, command.

why

Show an emitted file's adapter, source spec(s), outputs.<target>.* keys, and last sync time. Full guide in why.

agnostic-ai why .claude/rules/no-console-log.md --format json
FlagDescription
--formattext (default) or json.