bot-instructions
Load to render, check, or adopt a repo's GitHub review-bot instruction files from the shared doctrine and its effective manifest.
vanillagreencom · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add vanillagreencom/kendex --skill bot-instructions技能说明
name: bot-instructions description: "Load to render, check, or adopt a repo's GitHub review-bot instruction files from the shared doctrine and its effective manifest." summary: "Renders every GitHub review bot's native instruction file from one doctrine source plus the [bot-instructions] manifest table, with validators for the surfaces that fail silently." license: MIT user-invocable: true metadata: author: vanillagreen source: kendex repository: "https://github.com/vanillagreencom/kendex" bugs: "https://github.com/vanillagreencom/kendex/issues" version: "2.1.0" tags: [review]
Project Instructions
Problems with a kendex-owned skill go through kendex report; check ownership in the file first.
Bot Instructions
.agents/skills/bot-instructions/scripts/bot-instructions render # write every enabled surface
.agents/skills/bot-instructions/scripts/bot-instructions check # re-render and compare
.agents/skills/bot-instructions/scripts/bot-instructions adopt # take hand-written files over
Flags: --repo, --spec, --staged, --dry-run; bot-instructions --help. Python 3.11+.
Exit codes: 0 clean, 1 findings, 2 could not complete. A pre-commit lane blocks on both nonzero codes; the commit-guards chain runs check --staged itself where this package is installed.
What reads what
| Bot | Reads | Reads from |
|---|---|---|
| Codex | AGENTS.md § Code Review Rules, root plus nearest nested | undocumented |
| Copilot code review | .github/copilot-instructions.md, .github/instructions/**/*.instructions.md, AGENTS.md | the pull request head |
| CodeRabbit | .coderabbit.yaml, whole-file, beneath any organization or workspace global override, plus AGENTS.md through knowledge_base.code_guidelines.filePatterns | the pull request head |
| Qodo | .pr_agent.toml, best_practices.md, REVIEW.md | the default branch root |
| Macroscope | .macroscope/ignore.md, .macroscope/correctness/*.md, plus .macroscope/check-run-agents/** and .macroscope/approvability.md, which this package never writes | the pull request's most recent commit, or the default branch for a fork |
Routing per block and surface: schemas/renders.md § Doctrine routing. Vendor caps: references/limits.md.
The pieces
The effective manifest holds [bot-instructions]. Its child tables configure bots, repo context, cadence, exclusions, path instructions and doctrine overrides. The generator writes the enabled bots' native files. Table selection and precedence: schemas/repo-toml.md.
A [[bot-instructions.surface]] reaches Copilot, CodeRabbit and Macroscope, plus Qodo through best_practices.md when [bot-instructions.bots] qodo_best_practices is on. Only Macroscope honors exclude_globs, so narrow globs where scoping matters. Keys: schemas/repo-toml.md. Validators: schemas/validators.md.
renderwrites every enabled surface after validating it.checkre-renders and diffs, reading the index under--staged.adopttakes a hand-written file orAGENTS.mdregion under management once.
The generator owns only the AGENTS.md § Code Review Rules region and never creates the file. A repo without the heading adds it, sets [bot-instructions.bots] codex, runs adopt, then render. A tracked nested AGENTS.md carrying that heading is a check finding. Retire a surface with delete, then render. render replaces only a file whose canonical marker is present; adopt is the way in. Details: schemas/renders.md § Common rules.
Every rendered config excludes the render trees
A repo enables [bot-instructions.exclusions] derive_render or lists every render tree in [[bot-instructions.exclusions.path]]. Set construction: schemas/repo-toml.md § [bot-instructions.exclusions]. Placement and enforcement: schemas/renders.md § Doctrine routing.
A pull request changing its own review
- Treat every policy path below as invalidating prior review evidence.
- Require trusted human approval on a pull request that touches a policy path.
- Run
checkin CI from the default branch's package copy when the two copies are byte-identical, with--specnaming the pull request tree's copy; when they differ, the pull request upgrades the package and the default-branch checker cannot reproduce the candidate's render, so run the candidate's copy and print a warning naming both versions. The review gate's policy path (REVIEW_GATE_CARRY_FORWARD_EXCLUDEnaming.agents/skills/bot-instructions/*) is what holds the upgrade honest: a push touching the package invalidates earlier review evidence. The package's own source repository runs the pull request's checker always.
The render inputs
kendex.toml, pluskendex-local.tomlwhen the root declaresis_source_catalog = true..kendex-generated.jsonwhen[bot-instructions.exclusions] derive_renderis on.- The spec copy's doctrine source and routing table.
.bot-instructions/coderabbit-schema.jsonwhen CodeRabbit is on.- The existing
AGENTS.mdwhen Codex is on.
Policy set:
- Every render input above.
- This package's installed tree.
- Every generated path.
- Every
AGENTS.mdin the repo. - Every file under
.github/instructions/,.macroscope/correctness/,.macroscope/check-run-agents/, and.macroscope/approvability.md. - Any repo-wide reviewer file kept by hand.
Version and marker semantics: schemas/renders.md § Common rules.
Doctrine
Keep one ## Doctrine section in the spec copy. --spec selects that copy; the default is the running package. End the section at the next level-one or level-two he