Skip to main content

agent_rules_tool/
spec.rs

1//! Spec citations, URLs, and embedded vendored artifacts from
2//! [agent-rules-spec](https://github.com/rameshsunkara/agent-rules-spec).
3
4/// Upstream specification repository URL.
5pub const SPEC_REPO: &str = "https://github.com/rameshsunkara/agent-rules-spec";
6/// Compile-time mirror of `commit` in [`spec/index.yaml`](../spec/index.yaml).
7pub const SPEC_COMMIT: &str = "f23a86b4df8f2455e121cea88ce0d48a73a8f990";
8/// Relative path to the JSON Schema within the upstream repository.
9pub const SCHEMA_PATH: &str = "schema/agent-rule.schema.json";
10/// Canonical URL for the agent rule JSON Schema document.
11pub const SCHEMA_URL: &str =
12    "https://github.com/rameshsunkara/agent-rules-spec/blob/main/schema/agent-rule.schema.json";
13/// RFC section on frontmatter fields.
14pub const RFC_FRONTMATTER_FIELDS: &str =
15    "https://github.com/rameshsunkara/agent-rules-spec/blob/main/RFC.md#frontmatter-fields";
16/// RFC section on trigger modes (`always`, `auto`, `manual`).
17pub const RFC_TRIGGER_MODES: &str =
18    "https://github.com/rameshsunkara/agent-rules-spec/blob/main/RFC.md#trigger-modes";
19/// RFC section on file naming and layout conventions.
20pub const RFC_FILE_CONVENTIONS: &str =
21    "https://github.com/rameshsunkara/agent-rules-spec/blob/main/RFC.md#file-conventions";
22/// URL for the tool compatibility field mapping document.
23pub const MAPPING_URL: &str =
24    "https://github.com/rameshsunkara/agent-rules-spec/blob/main/compatibility/mapping.md";
25
26/// Embedded JSON Schema text from `spec/agent-rule.schema.json`.
27pub const EMBEDDED_SCHEMA: &str = include_str!("../spec/agent-rule.schema.json");
28/// Embedded `spec/index.yaml` manifest text.
29pub const EMBEDDED_INDEX: &str = include_str!("../spec/index.yaml");
30
31/// Default directory scanned by the CLI `lint` subcommand.
32pub const DEFAULT_LINT_DIR: &str = ".agents/rules";
33/// Default directory written by the CLI `migrate` subcommand.
34pub const DEFAULT_OUTPUT_DIR: &str = ".agents/rules";