{
  "schemaVersion": 1,
  "checked": "2026-10-29",
  "scope": "One supplied file. No disk scan, import fetch, execution or network submission. Heuristics require review.",
  "sources": {
    "codex-agents": {
      "url": "https://developers.openai.com/codex/guides/agents-md",
      "quote": "Codex includes at most one file per directory.",
      "notes": "Global CODEX_HOME: first nonempty override or AGENTS.md. Project root to cwd, override then AGENTS then configured fallbacks. Combined project budget defaults to 32768 bytes; ancestors consume it too. Without project root only cwd is checked.",
      "checked": "2026-10-29"
    },
    "codex-config": {
      "url": "https://developers.openai.com/codex/config-reference",
      "quote": "Maximum bytes read from `AGENTS.md` when building project instructions.",
      "notes": "project_doc_max_bytes, project_doc_fallback_filenames; sandbox_mode read-only/workspace-write/danger-full-access; approval_policy on-request/never or granular table; untrusted unsupported as a directly selected policy; on-failure deprecated. Project config requires trust. Never disables prompts, not the sandbox.",
      "checked": "2026-10-29",
      "resolvedUrl": "https://learn.chatgpt.com/docs/config-file/config-reference.md"
    },
    "claude-memory": {
      "url": "https://code.claude.com/docs/en/memory",
      "quote": "with a maximum depth of four hops",
      "notes": "Managed, user ~/.claude/CLAUDE.md, project CLAUDE.md or .claude/CLAUDE.md, local CLAUDE.local.md. Ancestors load at launch; descendants on file access. Local appended after project; instructions concatenate, conflicts need review. Imports relative to importing file; code spans/fences ignored; external imports require approval. Under 200 lines is guidance, not truncation. Current AGENTS support via builtin plugin; version/settings dependent. On-demand files: 40000 character limit with 200K context; 1M context limit 200000 characters on Opus/Sonnet 4.6, 150000 on later models. Before v2.1.309 this on-demand limit did not apply.",
      "checked": "2026-10-29"
    },
    "claude-permissions": {
      "url": "https://code.claude.com/docs/en/permissions",
      "quote": "Rules are evaluated in order: deny, then ask, then allow.",
      "notes": "Tool or Tool(specifier). Bash wildcard * matches text; :* suffix supported. Deny patterns have wrapper/path limits. Bash(command:...) ignored. Unanchored tool glob allows skipped. Write(path), Glob(path), NotebookEdit(path) never match. Settings enforce permissions; Markdown does not.",
      "checked": "2026-10-29"
    },
    "claude-settings": {
      "url": "https://code.claude.com/docs/en/settings",
      "quote": "Settings are the JSON keys that change how Claude Code behaves",
      "notes": "User ~/.claude/settings.json; project .claude/settings.json; local .claude/settings.local.json; managed policy. Settings are JSON; permissions lists merge. Effective settings depend on other layers and session flags.",
      "checked": "2026-10-29"
    },
    "agents": {
      "url": "https://agents.md/",
      "quote": "Build and test commands",
      "notes": "Open Markdown format. Closest guidance takes precedence in the general convention; confirm each tool. Build/test, security and conventions are recommended topics; no mandatory schema.",
      "checked": "2026-10-29"
    }
  },
  "rules": [
    {
      "id": "load.codex",
      "severity": "info",
      "heuristic": false,
      "sources": [
        "codex-agents"
      ],
      "title": "Codex discovery chain",
      "when": "AGENTS.md or AGENTS.override.md",
      "action": "Explain global and root-to-cwd chain; same-directory override replaces base; configured fallback names last."
    },
    {
      "id": "load.claude",
      "severity": "info",
      "heuristic": false,
      "sources": [
        "claude-memory"
      ],
      "title": "Claude instruction scope",
      "when": "CLAUDE.md or CLAUDE.local.md",
      "action": "Explain managed/user/project/local scope, ancestor launch load and descendant on-demand load; concatenation does not reliably resolve conflicts."
    },
    {
      "id": "load.other",
      "severity": "info",
      "heuristic": false,
      "sources": [
        "agents",
        "claude-memory"
      ],
      "title": "AGENTS.md across tools",
      "when": "AGENTS.md",
      "action": "Explain nearest-file convention and current conditional Claude support; never promise all tools load it."
    },
    {
      "id": "load.filename",
      "severity": "warning",
      "heuristic": true,
      "sources": [
        "codex-agents",
        "claude-memory"
      ],
      "title": "Unrecognized filename",
      "when": "Other Markdown filename",
      "action": "Check exact case; rename or configure Codex fallback. One excerpt cannot establish fallback configuration."
    },
    {
      "id": "load.location",
      "severity": "warning",
      "heuristic": true,
      "sources": [
        "codex-agents",
        "claude-memory"
      ],
      "title": "Check discovery location",
      "when": "Known filename in atypical supplied folder",
      "action": "Explain tool-specific discovery without asserting absence from context."
    },
    {
      "id": "size.codex",
      "severity": "warning",
      "heuristic": false,
      "sources": [
        "codex-agents",
        "codex-config"
      ],
      "title": "File exceeds default project budget",
      "when": "AGENTS content UTF-8 bytes > 32768",
      "action": "Shorten content or review project_doc_max_bytes. Ancestors reduce remaining budget; this checker does not know them."
    },
    {
      "id": "size.claude",
      "severity": "warning",
      "heuristic": false,
      "sources": [
        "claude-memory"
      ],
      "title": "Long Claude instructions",
      "when": "CLAUDE content > 200 lines",
      "action": "200 lines is a writing target, not a hard truncation limit."
    },
    {
      "id": "imports.claude",
      "severity": "info",
      "heuristic": false,
      "sources": [
        "claude-memory"
      ],
      "title": "Resolve imports and depth",
      "when": "Non-code @path in CLAUDE content",
      "action": "Resolve relative to importing file; four-hop limit; external approval. Imported files not fetched by this checker."
    },
    {
      "id": "imports.codex",
      "severity": "warning",
      "heuristic": true,
      "sources": [
        "codex-agents",
        "claude-memory"
      ],
      "title": "Import syntax is tool-specific",
      "when": "Non-code @path in AGENTS content",
      "action": "Codex discovery does not specify Claude-style automatic @ expansion. Use an explicit read instruction; confirm target agent."
    },
    {
      "id": "safety.prose",
      "severity": "warning",
      "heuristic": true,
      "sources": [
        "claude-permissions",
        "codex-config"
      ],
      "title": "Prose is guidance",
      "when": "Never/do not safety restriction in Markdown",
      "action": "Move enforceable boundary to settings/sandbox; illustrative deny pattern is not complete command containment."
    },
    {
      "id": "json.syntax",
      "severity": "error",
      "heuristic": false,
      "sources": [
        "claude-settings"
      ],
      "title": "Invalid settings JSON",
      "when": "JSON.parse fails or top-level is not object",
      "action": "Use a complete JSON object; excerpts must still parse independently."
    },
    {
      "id": "permissions.shape",
      "severity": "error",
      "heuristic": false,
      "sources": [
        "claude-settings",
        "claude-permissions"
      ],
      "title": "Invalid permission list",
      "when": "permissions is not object or allow/ask/deny not string array",
      "action": "Use permissions with string-array allow/ask/deny."
    },
    {
      "id": "permissions.syntax",
      "severity": "error",
      "heuristic": true,
      "sources": [
        "claude-permissions"
      ],
      "title": "Malformed or ineffective rule",
      "when": "Unbalanced tool parentheses, plain shell command, primary content field specifier, or nonmatching Write/Glob/NotebookEdit path specifier",
      "action": "Use documented Tool or Tool(specifier) syntax; manual validation remains needed for other tools."
    },
    {
      "id": "permissions.broad",
      "severity": "warning",
      "heuristic": true,
      "sources": [
        "claude-permissions"
      ],
      "title": "Broad automatic permission",
      "when": "Bash, Bash(*), Bash(program *), Edit, Read in allow",
      "action": "Narrow to required command and subcommand; a broad deny still wins."
    },
    {
      "id": "permissions.allow-glob",
      "severity": "warning",
      "heuristic": false,
      "sources": [
        "claude-permissions"
      ],
      "title": "Ignored allow glob",
      "when": "Unanchored tool wildcard in allow",
      "action": "Use literal tool or mcp__literalServer__toolGlob."
    },
    {
      "id": "permissions.precedence",
      "severity": "info",
      "heuristic": false,
      "sources": [
        "claude-permissions"
      ],
      "title": "Deny wins",
      "when": "Nonempty deny list",
      "action": "Deny precedes ask and allow; shell patterns do not cover all wrappers or indirect scripts."
    },
    {
      "id": "toml.syntax",
      "severity": "error",
      "heuristic": false,
      "sources": [
        "codex-config"
      ],
      "title": "Invalid config TOML",
      "when": "TOML parser rejects excerpt",
      "action": "Supply independently valid TOML; full TOML parser bundled locally."
    },
    {
      "id": "config.values",
      "severity": "error",
      "heuristic": false,
      "sources": [
        "codex-config"
      ],
      "title": "Invalid Codex setting",
      "when": "Invalid enum/type for top-level sandbox_mode, approval_policy, project_doc_max_bytes or project_doc_fallback_filenames",
      "action": "Use documented enum values and nonnegative integer byte budget, string-array fallback names."
    },
    {
      "id": "config.access",
      "severity": "warning",
      "heuristic": true,
      "sources": [
        "codex-config"
      ],
      "title": "Full execution access",
      "when": "sandbox_mode danger-full-access",
      "action": "Review whether workspace-write or read-only fits; approval_policy never alone does not disable sandbox."
    },
    {
      "id": "config.discovery",
      "severity": "info",
      "heuristic": false,
      "sources": [
        "codex-config",
        "codex-agents"
      ],
      "title": "Configured discovery options",
      "when": "Valid project_doc fields",
      "action": "Report configured byte budget/fallback names; one config excerpt does not establish effective merged settings."
    },
    {
      "id": "quality.commands",
      "severity": "warning",
      "heuristic": true,
      "sources": [
        "agents",
        "claude-memory"
      ],
      "title": "Missing concrete build or test command",
      "when": "Markdown without recognized build/test command",
      "action": "Add verified repository commands; referenced commands may exist in another file. Heuristic recognizes common tools only."
    },
    {
      "id": "quality.contradiction",
      "severity": "warning",
      "heuristic": true,
      "sources": [
        "claude-memory"
      ],
      "title": "Opposing instructions",
      "when": "Always X and never X for identical normalized short phrase",
      "action": "Resolve literal conflict; conditions/quotations can cause false positives; semantic conflicts may be missed."
    },
    {
      "id": "quality.secrets",
      "severity": "error",
      "heuristic": true,
      "sources": [
        "agents"
      ],
      "title": "Possible credential",
      "when": "Private-key header or recognized credential-like token",
      "action": "Remove and rotate a real credential; report redacts all matched values. Pattern recognition is not a complete secrets scan."
    },
    {
      "id": "quality.paths",
      "severity": "warning",
      "heuristic": true,
      "sources": [
        "agents",
        "claude-memory"
      ],
      "title": "Machine-specific path",
      "when": "/Users/name, /home/name, Windows user path",
      "action": "Prefer repository-relative paths where shared; personal files may intentionally use absolute paths."
    },
    {
      "id": "size.claude-demand",
      "severity": "warning",
      "heuristic": false,
      "sources": [
        "claude-memory"
      ],
      "title": "Check the on-demand character limit",
      "when": "CLAUDE content exceeds 40000 Unicode code points",
      "action": "If loaded on demand in a 200K session, only the first 40000 characters are injected. 1M limits differ by model; verify session context, version and launch directory."
    },
    {
      "id": "config.deprecated",
      "severity": "warning",
      "heuristic": false,
      "sources": [
        "codex-config"
      ],
      "title": "Deprecated approval policy",
      "when": "approval_policy is on-failure",
      "action": "Use on-request for interactive runs or never for noninteractive runs; review sandbox separately."
    }
  ]
}
