pub const AGENT_PLUGIN_OPERATING_GUIDE: &str = "# Code System Graph operating guide\n\nUse this reference only for graph maintenance, repository onboarding,\nconfiguration, freshness diagnosis, or scan-limit failures.\n\nInspect the installed `csgraph` and `codegraph` versions rather than assuming a\nspecific release is active. Use the official documentation for those versions\nand their live CLI help when behavior differs.\n\n## Inspect and refresh\n\nRun commands from the workspace root or pass explicit manifest and database\npaths:\n\n```bash\ncsgraph --version\ncodegraph --version\ncsgraph config show --config <manifest>\ncsgraph status --config <manifest> --database <database> <workspace>\ncsgraph doctor --config <manifest> --database <database>\ncodegraph status <repository>\n```\n\nUse an incremental refresh for normal maintenance explicitly requested by the\nuser:\n\n```bash\ncsgraph sync --config <manifest> --database <database> <workspace>\n```\n\nThat command synchronizes initialized CodeGraph indexes by default. Do not add\n`--no-codegraph` when validating an enabled integration. For an intentional full\ngraph recomputation, use:\n\n```bash\ncsgraph scan --config <manifest> --database <database> --codegraph --force <workspace>\n```\n\nRun `status` and `doctor` again after either operation. Inspect structured JSON\nwhen exact counts or diagnostics matter.\n\n## Exclusions and limits\n\nSet `useGitignore: true` on a repository entry or in local configuration when\ntracked `.gitignore` rules should apply. Use explicit `excludes` for protected\nor workspace-specific exclusions, which continue to win over `.gitignore`\nnegations. Confirm the effective policy and its origin with `csgraph config show\n--repo <alias>` and the next scan\'s discovered-input counts.\n\nExclude generated and non-source content such as build output, virtual\nenvironments, caches, rendered documentation, binary media, test reports, and\nsecret-bearing local environment files. Keep graph databases and tool indexes\nout of source discovery.\n\nFor a scan-limit failure:\n\n1. Capture the exact resource, repository, file, and reported limit.\n2. Decide whether the artifact is generated, irrelevant, malformed, or valid\n source evidence.\n3. Exclude generated or irrelevant artifacts at the narrowest stable pattern.\n4. Split or correct malformed source data when that preserves its contract.\n5. Increase only the documented matching budget when the valid artifact must\n remain indexed.\n6. Use the smallest sufficient value, rescan, and record the residual risk.\n\nDo not increase global limits merely to hide an unknown input. Do not bypass a\nfixed tool cap; report it as an evidence limitation.\n\n## Repository onboarding\n\nWhen adding a repository to the bound workspace:\n\n1. Confirm it is the intended Git repository and read its instructions.\n2. Initialize CodeGraph only if repository indexing is desired and supported:\n `codegraph init <repository>`.\n3. Add one stable alias and path to the workspace manifest.\n4. Decide explicitly whether to enable `useGitignore`; add narrower explicit\n exclusions when workspace policy requires them.\n5. Run `csgraph config show --repo <alias>` before scanning.\n6. Run an incremental sync, or a first `scan --codegraph` when no snapshot\n exists.\n7. Validate Code System Graph status, CodeGraph status, repository counts, and\n at least one meaningful query.\n8. Exercise one trace, impact, or contract check if the repository has an\n expected connection to another repository.\n\nAn index with zero supported source files can be legitimate. Record the\nlanguage or content limitation instead of claiming missing files were indexed.\n\n## Freshness interpretation\n\nKeep these states separate:\n\n- A Code System Graph snapshot can be structurally healthy but stale relative\n to Git or filesystem changes.\n- A CodeGraph index can have zero pending indexed-language files while the Git\n worktree is still dirty because of unsupported or excluded files.\n- A repository can be registered but contribute no nodes or evidence.\n- Repository source coverage can be bounded or capped without invalidating the\n workspace snapshot.\n\nReport the exact layer and evidence. Avoid collapsing all four into one\n\"synchronized\" result.\n";Expand description
Extended operating guide referenced by the canonical skill.