description: Diagnose whether 1c-rules is installed, connected, configured, and usable by the current agent
userOnly: true
Run a read-only health check for the current project. The goal is to answer one question: **will the current agent actually use this ruleset safely for 1C work?**
Do not modify files, install packages, start containers, or write secrets. If a fix is obvious, report the exact next action instead of applying it.
Return a compact status table with these statuses:
| Status | Meaning | |---|---| | **OK** | Check passed. | | **WARN** | Work can continue, but something is incomplete or degraded. | | **FAIL** | The ruleset or current task environment is not ready. | | **SKIP** | Check is not applicable to this repository or current tool. |
After the table, list only actionable fixes. Do not include secret values from `.dev.env`.
1. Identify the current AI tool when possible: Cursor, Claude Code, Codex, OpenCode, Kilo Code, or `other`. 2. Check that `AGENTS.md` exists at the project root and is readable. 3. Check that `USER-RULES.md` and `memory.md` exist at the project root. Check `LLM-RULES.md` too, but report a missing `LLM-RULES.md` as **WARN**, not FAIL — older installs predate it; it is placed by `install.ps1 update` or created by the first `/evolve` write. 4. If `.ai-rules.json` exists, read it and verify:
- `activeTools` contains the current tool, or explain why the current tool is still supported through `other`;
- managed files listed in the manifest still exist;
- the canonical rules directory referenced by the manifest exists.
5. If `.ai-rules.json` is missing:
- in an installed project, report **FAIL** and recommend `install.ps1 init`;
- in the source repository of `1c-rules`, report **WARN** and continue with source-layout checks.
6. Verify that the current tool has the files it can actually load:
- Cursor: `.cursor/rules/`, `.cursor/commands/`, `.cursor/mcp.json` when installed;
- Claude Code: `.claude/rules-1c/` (on-demand rules referenced through `AGENTS.md` — deliberately **not** `.claude/rules/`, which Claude Code v2.0.64+ auto-loads in full at session start), `.claude/agents/`, `.claude/commands/`, MCP config when installed; managed rule files left in `.claude/rules/` from older installs are **legacy** and the `update` flow removes them (user-authored files there are kept);
- Codex: `.codex/skills/`, `.codex/config.toml` when installed;
- OpenCode: `.opencode/command/`, `.opencode/agent/` (also accept `.opencode/agents/` if present), `.opencode/rules/`, and the user's actual JSON/JSONC config (top-level `mcp` key). Fresh installs default to root `opencode.json`; existing configs at the root or under `.opencode/` are preserved in place, never migrated or removed by rules updates. Check the active client's config sources before diagnosing a path as unused; a missing root config alone is not a failure;
- **OpenCode agent frontmatter hard gate** (when `.opencode/agent/` or `.opencode/agents/` exists): every `*.md` agent file must **not** have a `tools` **array** in its YAML frontmatter (`tools: ["Read", …]`). OpenCode validates `tools` as object | undefined; a Cursor-style array makes it reject the whole config and refuse to start (`Configuration is invalid … Expected object | undefined, got […] tools`). Correct installed shape uses a `permission` object (`read`/`edit`/`grep`/`glob`/`bash`: `allow`|`deny`) and `mode: subagent`|`primary` — produced by `adapters/opencode.yaml → toolsToPermission`. Any file still carrying a `tools` array → **FAIL**. Repair: `install.ps1 update -Source <clone> -AssumeYes -ForcePaths .opencode/agent/*` (or re-apply the adapter transform on the agent channel). Do **not** confuse source `content/agents/*.md` (arrays are correct there) with installed `.opencode/agent/*.md`. Quick check:
Get-ChildItem .opencode\agent, .opencode\agents -Filter *.md -File -ErrorAction SilentlyContinue |
ForEach-Object {
if ((Get-Content $_.FullName -Raw) -match '(?ms)\A---\r?\n.*?^tools:\s*\[') { "FAIL: $($_.Name)" }
}- **Agent tool vocabulary hard gate** (when `.claude/agents/`, `.kimi-code/agents/`, `.qwen/agents/`, `.cursor/agents/`, `.commandcode/agents/`, `.zcode/agents/` or `.mimocode/agents/` exists): no `*.md` agent file there may name an abstract tool (`Shell`, `MCP`) in its `tools` or `disallowedTools` frontmatter. Claude Code / Kimi / Qwen match tool names literally, so an abstract name grants nothing: the subagent launches with no shell and no MCP server at all (`1c-metadata-manager` → `BLOCKED - toolchain cannot be executed in this session`; `1c-explorer` reduced to `Grep` / `Glob`). Cursor ignores the field entirely, so there the array silently leaves the read-only agents unrestricted. Correct installed shape uses native restrictions: a `disallowedTools` string for Claude Code / Kimi / Qwen / ZCode / Command Code, `readonly: true` for Cursor, or `permission.edit: deny` / `permission.bash: deny` for MiMo Code. Command Code also requires `tools: "*"`; the other listed adapters omit `tools`. Apply the adapter's `toolsToDenylist` / `toolsToFlag` / `toolsToPermission` transform. Any file still naming `Shell` / `MCP` → **FAIL**; so is a read-only agent (`explorer`, `code-reviewer`, `arch-reviewer`) that carries none of the applicable restriction fields, since someone deleted the `tools` line by hand. Repair: `install.ps1 update -Source <clone> -AssumeYes -ForcePaths .claude/agents/*` (substitute the affected directory). Do **not** confuse source `content/agents/*.md` (the abstract vocabulary is correct there) with the installed copies. Quick check:
Get-ChildItem .claude\agents, .kimi-code\agents, .qwen\agents, .cursor\agents, .commandcode\agents, .zcode\agents, .mimocode\agents -Filter *.md -File -ErrorAction Silen