eslint-plugin-copilot 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5316 -0
- package/LICENSE +21 -0
- package/README.md +192 -0
- package/dist/_internal/copilot-config-references.d.ts +34 -0
- package/dist/_internal/copilot-config-references.d.ts.map +1 -0
- package/dist/_internal/copilot-config-references.js +55 -0
- package/dist/_internal/copilot-config-references.js.map +1 -0
- package/dist/_internal/copilot-customization-names.d.ts +21 -0
- package/dist/_internal/copilot-customization-names.d.ts.map +1 -0
- package/dist/_internal/copilot-customization-names.js +56 -0
- package/dist/_internal/copilot-customization-names.js.map +1 -0
- package/dist/_internal/copilot-file-kind.d.ts +19 -0
- package/dist/_internal/copilot-file-kind.d.ts.map +1 -0
- package/dist/_internal/copilot-file-kind.js +111 -0
- package/dist/_internal/copilot-file-kind.js.map +1 -0
- package/dist/_internal/create-copilot-rule.d.ts +39 -0
- package/dist/_internal/create-copilot-rule.d.ts.map +1 -0
- package/dist/_internal/create-copilot-rule.js +56 -0
- package/dist/_internal/create-copilot-rule.js.map +1 -0
- package/dist/_internal/customization-body.d.ts +6 -0
- package/dist/_internal/customization-body.d.ts.map +1 -0
- package/dist/_internal/customization-body.js +15 -0
- package/dist/_internal/customization-body.js.map +1 -0
- package/dist/_internal/duplicate-names.d.ts +12 -0
- package/dist/_internal/duplicate-names.d.ts.map +1 -0
- package/dist/_internal/duplicate-names.js +24 -0
- package/dist/_internal/duplicate-names.js.map +1 -0
- package/dist/_internal/file-system.d.ts +21 -0
- package/dist/_internal/file-system.d.ts.map +1 -0
- package/dist/_internal/file-system.js +86 -0
- package/dist/_internal/file-system.js.map +1 -0
- package/dist/_internal/frontmatter.d.ts +37 -0
- package/dist/_internal/frontmatter.d.ts.map +1 -0
- package/dist/_internal/frontmatter.js +398 -0
- package/dist/_internal/frontmatter.js.map +1 -0
- package/dist/_internal/markdown-links.d.ts +21 -0
- package/dist/_internal/markdown-links.d.ts.map +1 -0
- package/dist/_internal/markdown-links.js +81 -0
- package/dist/_internal/markdown-links.js.map +1 -0
- package/dist/_internal/markdown-rule.d.ts +13 -0
- package/dist/_internal/markdown-rule.d.ts.map +1 -0
- package/dist/_internal/markdown-rule.js +19 -0
- package/dist/_internal/markdown-rule.js.map +1 -0
- package/dist/_internal/repository-hooks-json.d.ts +55 -0
- package/dist/_internal/repository-hooks-json.d.ts.map +1 -0
- package/dist/_internal/repository-hooks-json.js +80 -0
- package/dist/_internal/repository-hooks-json.js.map +1 -0
- package/dist/_internal/rule-catalog.d.ts +20 -0
- package/dist/_internal/rule-catalog.d.ts.map +1 -0
- package/dist/_internal/rule-catalog.js +97 -0
- package/dist/_internal/rule-catalog.js.map +1 -0
- package/dist/_internal/rule-docs-url.d.ts +9 -0
- package/dist/_internal/rule-docs-url.d.ts.map +1 -0
- package/dist/_internal/rule-docs-url.js +9 -0
- package/dist/_internal/rule-docs-url.js.map +1 -0
- package/dist/_internal/rules-registry.d.ts +83 -0
- package/dist/_internal/rules-registry.d.ts.map +1 -0
- package/dist/_internal/rules-registry.js +145 -0
- package/dist/_internal/rules-registry.js.map +1 -0
- package/dist/_internal/skill-files.d.ts +8 -0
- package/dist/_internal/skill-files.d.ts.map +1 -0
- package/dist/_internal/skill-files.js +18 -0
- package/dist/_internal/skill-files.js.map +1 -0
- package/dist/plugin.cjs +5312 -0
- package/dist/plugin.cjs.map +7 -0
- package/dist/plugin.d.cts +34 -0
- package/dist/plugin.d.ts +34 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +142 -0
- package/dist/plugin.js.map +1 -0
- package/dist/rules/no-blank-customization-body.d.ts +4 -0
- package/dist/rules/no-blank-customization-body.d.ts.map +1 -0
- package/dist/rules/no-blank-customization-body.js +49 -0
- package/dist/rules/no-blank-customization-body.js.map +1 -0
- package/dist/rules/no-blank-repository-instructions.d.ts +4 -0
- package/dist/rules/no-blank-repository-instructions.d.ts.map +1 -0
- package/dist/rules/no-blank-repository-instructions.js +49 -0
- package/dist/rules/no-blank-repository-instructions.js.map +1 -0
- package/dist/rules/no-blank-skill-body.d.ts +4 -0
- package/dist/rules/no-blank-skill-body.d.ts.map +1 -0
- package/dist/rules/no-blank-skill-body.js +48 -0
- package/dist/rules/no-blank-skill-body.js.map +1 -0
- package/dist/rules/no-deprecated-agent-infer.d.ts +4 -0
- package/dist/rules/no-deprecated-agent-infer.d.ts.map +1 -0
- package/dist/rules/no-deprecated-agent-infer.js +48 -0
- package/dist/rules/no-deprecated-agent-infer.js.map +1 -0
- package/dist/rules/no-duplicate-agent-names.d.ts +4 -0
- package/dist/rules/no-duplicate-agent-names.d.ts.map +1 -0
- package/dist/rules/no-duplicate-agent-names.js +72 -0
- package/dist/rules/no-duplicate-agent-names.js.map +1 -0
- package/dist/rules/no-duplicate-prompt-names.d.ts +4 -0
- package/dist/rules/no-duplicate-prompt-names.d.ts.map +1 -0
- package/dist/rules/no-duplicate-prompt-names.js +72 -0
- package/dist/rules/no-duplicate-prompt-names.js.map +1 -0
- package/dist/rules/no-duplicate-skill-names.d.ts +4 -0
- package/dist/rules/no-duplicate-skill-names.d.ts.map +1 -0
- package/dist/rules/no-duplicate-skill-names.js +74 -0
- package/dist/rules/no-duplicate-skill-names.js.map +1 -0
- package/dist/rules/no-duplicate-slash-command-names.d.ts +4 -0
- package/dist/rules/no-duplicate-slash-command-names.d.ts.map +1 -0
- package/dist/rules/no-duplicate-slash-command-names.js +82 -0
- package/dist/rules/no-duplicate-slash-command-names.js.map +1 -0
- package/dist/rules/no-empty-repository-hook-arrays.d.ts +4 -0
- package/dist/rules/no-empty-repository-hook-arrays.d.ts.map +1 -0
- package/dist/rules/no-empty-repository-hook-arrays.js +49 -0
- package/dist/rules/no-empty-repository-hook-arrays.js.map +1 -0
- package/dist/rules/no-legacy-chatmode-files.d.ts +4 -0
- package/dist/rules/no-legacy-chatmode-files.d.ts.map +1 -0
- package/dist/rules/no-legacy-chatmode-files.js +42 -0
- package/dist/rules/no-legacy-chatmode-files.js.map +1 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.d.ts +4 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.d.ts.map +1 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.js +52 -0
- package/dist/rules/prefer-custom-instructions-under-code-review-limit.js.map +1 -0
- package/dist/rules/prefer-fast-repository-hooks.d.ts +4 -0
- package/dist/rules/prefer-fast-repository-hooks.d.ts.map +1 -0
- package/dist/rules/prefer-fast-repository-hooks.js +58 -0
- package/dist/rules/prefer-fast-repository-hooks.js.map +1 -0
- package/dist/rules/prefer-qualified-tools.d.ts +4 -0
- package/dist/rules/prefer-qualified-tools.d.ts.map +1 -0
- package/dist/rules/prefer-qualified-tools.js +56 -0
- package/dist/rules/prefer-qualified-tools.js.map +1 -0
- package/dist/rules/require-agent-tool-for-subagents.d.ts +4 -0
- package/dist/rules/require-agent-tool-for-subagents.d.ts.map +1 -0
- package/dist/rules/require-agent-tool-for-subagents.js +64 -0
- package/dist/rules/require-agent-tool-for-subagents.js.map +1 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.d.ts +4 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.d.ts.map +1 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.js +50 -0
- package/dist/rules/require-agents-md-for-cross-surface-agent-instructions.js.map +1 -0
- package/dist/rules/require-chatmode-file-metadata.d.ts +4 -0
- package/dist/rules/require-chatmode-file-metadata.d.ts.map +1 -0
- package/dist/rules/require-chatmode-file-metadata.js +59 -0
- package/dist/rules/require-chatmode-file-metadata.js.map +1 -0
- package/dist/rules/require-existing-agent-hook-cwd.d.ts +4 -0
- package/dist/rules/require-existing-agent-hook-cwd.d.ts.map +1 -0
- package/dist/rules/require-existing-agent-hook-cwd.js +64 -0
- package/dist/rules/require-existing-agent-hook-cwd.js.map +1 -0
- package/dist/rules/require-existing-agent-mcp-servers.d.ts +4 -0
- package/dist/rules/require-existing-agent-mcp-servers.d.ts.map +1 -0
- package/dist/rules/require-existing-agent-mcp-servers.js +58 -0
- package/dist/rules/require-existing-agent-mcp-servers.js.map +1 -0
- package/dist/rules/require-existing-relative-agent-links.d.ts +4 -0
- package/dist/rules/require-existing-relative-agent-links.d.ts.map +1 -0
- package/dist/rules/require-existing-relative-agent-links.js +61 -0
- package/dist/rules/require-existing-relative-agent-links.js.map +1 -0
- package/dist/rules/require-existing-relative-instructions-links.d.ts +4 -0
- package/dist/rules/require-existing-relative-instructions-links.d.ts.map +1 -0
- package/dist/rules/require-existing-relative-instructions-links.js +61 -0
- package/dist/rules/require-existing-relative-instructions-links.js.map +1 -0
- package/dist/rules/require-existing-relative-prompt-links.d.ts +4 -0
- package/dist/rules/require-existing-relative-prompt-links.d.ts.map +1 -0
- package/dist/rules/require-existing-relative-prompt-links.js +61 -0
- package/dist/rules/require-existing-relative-prompt-links.js.map +1 -0
- package/dist/rules/require-existing-relative-skill-links.d.ts +4 -0
- package/dist/rules/require-existing-relative-skill-links.d.ts.map +1 -0
- package/dist/rules/require-existing-relative-skill-links.js +61 -0
- package/dist/rules/require-existing-relative-skill-links.js.map +1 -0
- package/dist/rules/require-existing-repository-hook-cwd.d.ts +4 -0
- package/dist/rules/require-existing-repository-hook-cwd.d.ts.map +1 -0
- package/dist/rules/require-existing-repository-hook-cwd.js +65 -0
- package/dist/rules/require-existing-repository-hook-cwd.js.map +1 -0
- package/dist/rules/require-github-copilot-target-for-mcp-servers.d.ts +4 -0
- package/dist/rules/require-github-copilot-target-for-mcp-servers.d.ts.map +1 -0
- package/dist/rules/require-github-copilot-target-for-mcp-servers.js +63 -0
- package/dist/rules/require-github-copilot-target-for-mcp-servers.js.map +1 -0
- package/dist/rules/require-instructions-apply-to.d.ts +4 -0
- package/dist/rules/require-instructions-apply-to.d.ts.map +1 -0
- package/dist/rules/require-instructions-apply-to.js +60 -0
- package/dist/rules/require-instructions-apply-to.js.map +1 -0
- package/dist/rules/require-json-agent-mcp-servers.d.ts +4 -0
- package/dist/rules/require-json-agent-mcp-servers.d.ts.map +1 -0
- package/dist/rules/require-json-agent-mcp-servers.js +58 -0
- package/dist/rules/require-json-agent-mcp-servers.js.map +1 -0
- package/dist/rules/require-prompt-file-metadata.d.ts +4 -0
- package/dist/rules/require-prompt-file-metadata.d.ts.map +1 -0
- package/dist/rules/require-prompt-file-metadata.js +104 -0
- package/dist/rules/require-prompt-file-metadata.js.map +1 -0
- package/dist/rules/require-qualified-agent-handoff-models.d.ts +4 -0
- package/dist/rules/require-qualified-agent-handoff-models.d.ts.map +1 -0
- package/dist/rules/require-qualified-agent-handoff-models.js +78 -0
- package/dist/rules/require-qualified-agent-handoff-models.js.map +1 -0
- package/dist/rules/require-relative-agent-hook-cwd.d.ts +4 -0
- package/dist/rules/require-relative-agent-hook-cwd.d.ts.map +1 -0
- package/dist/rules/require-relative-agent-hook-cwd.js +70 -0
- package/dist/rules/require-relative-agent-hook-cwd.js.map +1 -0
- package/dist/rules/require-relative-agent-links.d.ts +4 -0
- package/dist/rules/require-relative-agent-links.d.ts.map +1 -0
- package/dist/rules/require-relative-agent-links.js +58 -0
- package/dist/rules/require-relative-agent-links.js.map +1 -0
- package/dist/rules/require-relative-instructions-links.d.ts +4 -0
- package/dist/rules/require-relative-instructions-links.d.ts.map +1 -0
- package/dist/rules/require-relative-instructions-links.js +58 -0
- package/dist/rules/require-relative-instructions-links.js.map +1 -0
- package/dist/rules/require-relative-prompt-links.d.ts +4 -0
- package/dist/rules/require-relative-prompt-links.d.ts.map +1 -0
- package/dist/rules/require-relative-prompt-links.js +82 -0
- package/dist/rules/require-relative-prompt-links.js.map +1 -0
- package/dist/rules/require-relative-repository-hook-cwd.d.ts +4 -0
- package/dist/rules/require-relative-repository-hook-cwd.d.ts.map +1 -0
- package/dist/rules/require-relative-repository-hook-cwd.js +63 -0
- package/dist/rules/require-relative-repository-hook-cwd.js.map +1 -0
- package/dist/rules/require-relative-skill-links.d.ts +4 -0
- package/dist/rules/require-relative-skill-links.d.ts.map +1 -0
- package/dist/rules/require-relative-skill-links.js +58 -0
- package/dist/rules/require-relative-skill-links.js.map +1 -0
- package/dist/rules/require-repository-hook-arrays.d.ts +4 -0
- package/dist/rules/require-repository-hook-arrays.d.ts.map +1 -0
- package/dist/rules/require-repository-hook-arrays.js +54 -0
- package/dist/rules/require-repository-hook-arrays.js.map +1 -0
- package/dist/rules/require-repository-hook-command-shell.d.ts +4 -0
- package/dist/rules/require-repository-hook-command-shell.d.ts.map +1 -0
- package/dist/rules/require-repository-hook-command-shell.js +57 -0
- package/dist/rules/require-repository-hook-command-shell.js.map +1 -0
- package/dist/rules/require-repository-hooks-object.d.ts +4 -0
- package/dist/rules/require-repository-hooks-object.d.ts.map +1 -0
- package/dist/rules/require-repository-hooks-object.js +50 -0
- package/dist/rules/require-repository-hooks-object.js.map +1 -0
- package/dist/rules/require-repository-instructions-file.d.ts +4 -0
- package/dist/rules/require-repository-instructions-file.d.ts.map +1 -0
- package/dist/rules/require-repository-instructions-file.js +50 -0
- package/dist/rules/require-repository-instructions-file.js.map +1 -0
- package/dist/rules/require-skill-file-location.d.ts +4 -0
- package/dist/rules/require-skill-file-location.d.ts.map +1 -0
- package/dist/rules/require-skill-file-location.js +46 -0
- package/dist/rules/require-skill-file-location.js.map +1 -0
- package/dist/rules/require-skill-file-metadata.d.ts +4 -0
- package/dist/rules/require-skill-file-metadata.d.ts.map +1 -0
- package/dist/rules/require-skill-file-metadata.js +60 -0
- package/dist/rules/require-skill-file-metadata.js.map +1 -0
- package/dist/rules/require-skill-md-filename.d.ts +4 -0
- package/dist/rules/require-skill-md-filename.d.ts.map +1 -0
- package/dist/rules/require-skill-md-filename.js +55 -0
- package/dist/rules/require-skill-md-filename.js.map +1 -0
- package/dist/rules/require-skill-name-match-directory.d.ts +4 -0
- package/dist/rules/require-skill-name-match-directory.d.ts.map +1 -0
- package/dist/rules/require-skill-name-match-directory.js +59 -0
- package/dist/rules/require-skill-name-match-directory.js.map +1 -0
- package/dist/rules/require-string-repository-hook-env-values.d.ts +4 -0
- package/dist/rules/require-string-repository-hook-env-values.d.ts.map +1 -0
- package/dist/rules/require-string-repository-hook-env-values.js +59 -0
- package/dist/rules/require-string-repository-hook-env-values.js.map +1 -0
- package/dist/rules/require-valid-agent-argument-hint.d.ts +4 -0
- package/dist/rules/require-valid-agent-argument-hint.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-argument-hint.js +51 -0
- package/dist/rules/require-valid-agent-argument-hint.js.map +1 -0
- package/dist/rules/require-valid-agent-handoff-send.d.ts +4 -0
- package/dist/rules/require-valid-agent-handoff-send.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-handoff-send.js +67 -0
- package/dist/rules/require-valid-agent-handoff-send.js.map +1 -0
- package/dist/rules/require-valid-agent-handoffs.d.ts +4 -0
- package/dist/rules/require-valid-agent-handoffs.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-handoffs.js +78 -0
- package/dist/rules/require-valid-agent-handoffs.js.map +1 -0
- package/dist/rules/require-valid-agent-hook-events.d.ts +4 -0
- package/dist/rules/require-valid-agent-hook-events.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-hook-events.js +68 -0
- package/dist/rules/require-valid-agent-hook-events.js.map +1 -0
- package/dist/rules/require-valid-agent-hook-timeouts.d.ts +4 -0
- package/dist/rules/require-valid-agent-hook-timeouts.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-hook-timeouts.js +83 -0
- package/dist/rules/require-valid-agent-hook-timeouts.js.map +1 -0
- package/dist/rules/require-valid-agent-hooks.d.ts +4 -0
- package/dist/rules/require-valid-agent-hooks.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-hooks.js +86 -0
- package/dist/rules/require-valid-agent-hooks.js.map +1 -0
- package/dist/rules/require-valid-agent-invocation-controls.d.ts +4 -0
- package/dist/rules/require-valid-agent-invocation-controls.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-invocation-controls.js +71 -0
- package/dist/rules/require-valid-agent-invocation-controls.js.map +1 -0
- package/dist/rules/require-valid-agent-mcp-servers.d.ts +4 -0
- package/dist/rules/require-valid-agent-mcp-servers.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-mcp-servers.js +64 -0
- package/dist/rules/require-valid-agent-mcp-servers.js.map +1 -0
- package/dist/rules/require-valid-agent-model.d.ts +4 -0
- package/dist/rules/require-valid-agent-model.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-model.js +64 -0
- package/dist/rules/require-valid-agent-model.js.map +1 -0
- package/dist/rules/require-valid-agent-name.d.ts +4 -0
- package/dist/rules/require-valid-agent-name.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-name.js +51 -0
- package/dist/rules/require-valid-agent-name.js.map +1 -0
- package/dist/rules/require-valid-agent-subagents.d.ts +4 -0
- package/dist/rules/require-valid-agent-subagents.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-subagents.js +79 -0
- package/dist/rules/require-valid-agent-subagents.js.map +1 -0
- package/dist/rules/require-valid-agent-target.d.ts +4 -0
- package/dist/rules/require-valid-agent-target.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-target.js +62 -0
- package/dist/rules/require-valid-agent-target.js.map +1 -0
- package/dist/rules/require-valid-agent-tools.d.ts +4 -0
- package/dist/rules/require-valid-agent-tools.d.ts.map +1 -0
- package/dist/rules/require-valid-agent-tools.js +64 -0
- package/dist/rules/require-valid-agent-tools.js.map +1 -0
- package/dist/rules/require-valid-instructions-apply-to-globs.d.ts +4 -0
- package/dist/rules/require-valid-instructions-apply-to-globs.d.ts.map +1 -0
- package/dist/rules/require-valid-instructions-apply-to-globs.js +79 -0
- package/dist/rules/require-valid-instructions-apply-to-globs.js.map +1 -0
- package/dist/rules/require-valid-prompt-argument-hint.d.ts +4 -0
- package/dist/rules/require-valid-prompt-argument-hint.d.ts.map +1 -0
- package/dist/rules/require-valid-prompt-argument-hint.js +52 -0
- package/dist/rules/require-valid-prompt-argument-hint.js.map +1 -0
- package/dist/rules/require-valid-prompt-model.d.ts +4 -0
- package/dist/rules/require-valid-prompt-model.d.ts.map +1 -0
- package/dist/rules/require-valid-prompt-model.js +77 -0
- package/dist/rules/require-valid-prompt-model.js.map +1 -0
- package/dist/rules/require-valid-prompt-name.d.ts +4 -0
- package/dist/rules/require-valid-prompt-name.d.ts.map +1 -0
- package/dist/rules/require-valid-prompt-name.js +51 -0
- package/dist/rules/require-valid-prompt-name.js.map +1 -0
- package/dist/rules/require-valid-prompt-tools.d.ts +4 -0
- package/dist/rules/require-valid-prompt-tools.d.ts.map +1 -0
- package/dist/rules/require-valid-prompt-tools.js +64 -0
- package/dist/rules/require-valid-prompt-tools.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-command-type.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-command-type.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-command-type.js +58 -0
- package/dist/rules/require-valid-repository-hook-command-type.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-env.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-env.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-env.js +57 -0
- package/dist/rules/require-valid-repository-hook-env.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-events.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-events.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-events.js +55 -0
- package/dist/rules/require-valid-repository-hook-events.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-timeouts.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-timeouts.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-timeouts.js +59 -0
- package/dist/rules/require-valid-repository-hook-timeouts.js.map +1 -0
- package/dist/rules/require-valid-repository-hook-version.d.ts +4 -0
- package/dist/rules/require-valid-repository-hook-version.d.ts.map +1 -0
- package/dist/rules/require-valid-repository-hook-version.js +53 -0
- package/dist/rules/require-valid-repository-hook-version.js.map +1 -0
- package/dist/rules/require-valid-skill-directory-name.d.ts +4 -0
- package/dist/rules/require-valid-skill-directory-name.d.ts.map +1 -0
- package/dist/rules/require-valid-skill-directory-name.js +50 -0
- package/dist/rules/require-valid-skill-directory-name.js.map +1 -0
- package/dist/rules/require-valid-skill-license.d.ts +4 -0
- package/dist/rules/require-valid-skill-license.d.ts.map +1 -0
- package/dist/rules/require-valid-skill-license.js +47 -0
- package/dist/rules/require-valid-skill-license.js.map +1 -0
- package/dist/rules/require-valid-skill-name.d.ts +4 -0
- package/dist/rules/require-valid-skill-name.d.ts.map +1 -0
- package/dist/rules/require-valid-skill-name.js +57 -0
- package/dist/rules/require-valid-skill-name.js.map +1 -0
- package/docs/rules/getting-started.md +24 -0
- package/docs/rules/guides/copilot-customization-files.md +17 -0
- package/docs/rules/no-blank-customization-body.md +52 -0
- package/docs/rules/no-blank-repository-instructions.md +37 -0
- package/docs/rules/no-blank-skill-body.md +41 -0
- package/docs/rules/no-deprecated-agent-infer.md +42 -0
- package/docs/rules/no-duplicate-agent-names.md +36 -0
- package/docs/rules/no-duplicate-prompt-names.md +36 -0
- package/docs/rules/no-duplicate-skill-names.md +37 -0
- package/docs/rules/no-duplicate-slash-command-names.md +40 -0
- package/docs/rules/no-empty-repository-hook-arrays.md +44 -0
- package/docs/rules/no-legacy-chatmode-files.md +53 -0
- package/docs/rules/overview.md +27 -0
- package/docs/rules/prefer-custom-instructions-under-code-review-limit.md +39 -0
- package/docs/rules/prefer-fast-repository-hooks.md +43 -0
- package/docs/rules/prefer-qualified-tools.md +49 -0
- package/docs/rules/presets/all.md +82 -0
- package/docs/rules/presets/index.md +78 -0
- package/docs/rules/presets/minimal.md +16 -0
- package/docs/rules/presets/recommended.md +67 -0
- package/docs/rules/presets/strict.md +81 -0
- package/docs/rules/require-agent-tool-for-subagents.md +44 -0
- package/docs/rules/require-agents-md-for-cross-surface-agent-instructions.md +39 -0
- package/docs/rules/require-chatmode-file-metadata.md +41 -0
- package/docs/rules/require-existing-agent-hook-cwd.md +51 -0
- package/docs/rules/require-existing-agent-mcp-servers.md +43 -0
- package/docs/rules/require-existing-relative-agent-links.md +41 -0
- package/docs/rules/require-existing-relative-instructions-links.md +43 -0
- package/docs/rules/require-existing-relative-prompt-links.md +41 -0
- package/docs/rules/require-existing-relative-skill-links.md +44 -0
- package/docs/rules/require-existing-repository-hook-cwd.md +45 -0
- package/docs/rules/require-github-copilot-target-for-mcp-servers.md +46 -0
- package/docs/rules/require-instructions-apply-to.md +40 -0
- package/docs/rules/require-json-agent-mcp-servers.md +41 -0
- package/docs/rules/require-prompt-file-metadata.md +45 -0
- package/docs/rules/require-qualified-agent-handoff-models.md +47 -0
- package/docs/rules/require-relative-agent-hook-cwd.md +50 -0
- package/docs/rules/require-relative-agent-links.md +40 -0
- package/docs/rules/require-relative-instructions-links.md +42 -0
- package/docs/rules/require-relative-prompt-links.md +43 -0
- package/docs/rules/require-relative-repository-hook-cwd.md +43 -0
- package/docs/rules/require-relative-skill-links.md +42 -0
- package/docs/rules/require-repository-hook-arrays.md +33 -0
- package/docs/rules/require-repository-hook-command-shell.md +44 -0
- package/docs/rules/require-repository-hooks-object.md +34 -0
- package/docs/rules/require-repository-instructions-file.md +42 -0
- package/docs/rules/require-skill-file-location.md +33 -0
- package/docs/rules/require-skill-file-metadata.md +40 -0
- package/docs/rules/require-skill-md-filename.md +43 -0
- package/docs/rules/require-skill-name-match-directory.md +46 -0
- package/docs/rules/require-string-repository-hook-env-values.md +43 -0
- package/docs/rules/require-valid-agent-argument-hint.md +42 -0
- package/docs/rules/require-valid-agent-handoff-send.md +49 -0
- package/docs/rules/require-valid-agent-handoffs.md +51 -0
- package/docs/rules/require-valid-agent-hook-events.md +47 -0
- package/docs/rules/require-valid-agent-hook-timeouts.md +49 -0
- package/docs/rules/require-valid-agent-hooks.md +49 -0
- package/docs/rules/require-valid-agent-invocation-controls.md +45 -0
- package/docs/rules/require-valid-agent-mcp-servers.md +45 -0
- package/docs/rules/require-valid-agent-model.md +43 -0
- package/docs/rules/require-valid-agent-name.md +42 -0
- package/docs/rules/require-valid-agent-subagents.md +52 -0
- package/docs/rules/require-valid-agent-target.md +44 -0
- package/docs/rules/require-valid-agent-tools.md +43 -0
- package/docs/rules/require-valid-instructions-apply-to-globs.md +45 -0
- package/docs/rules/require-valid-prompt-argument-hint.md +42 -0
- package/docs/rules/require-valid-prompt-model.md +45 -0
- package/docs/rules/require-valid-prompt-name.md +42 -0
- package/docs/rules/require-valid-prompt-tools.md +43 -0
- package/docs/rules/require-valid-repository-hook-command-type.md +45 -0
- package/docs/rules/require-valid-repository-hook-env.md +43 -0
- package/docs/rules/require-valid-repository-hook-events.md +34 -0
- package/docs/rules/require-valid-repository-hook-timeouts.md +43 -0
- package/docs/rules/require-valid-repository-hook-version.md +34 -0
- package/docs/rules/require-valid-skill-directory-name.md +34 -0
- package/docs/rules/require-valid-skill-license.md +45 -0
- package/docs/rules/require-valid-skill-name.md +43 -0
- package/package.json +562 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# require-repository-hook-command-shell
|
|
2
|
+
|
|
3
|
+
Require repository `command` hook definitions to declare at least one shell command under `bash` or `powershell`.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R061
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/hooks/**/*.json`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- `type: "command"` hook objects that omit both `bash` and `powershell`
|
|
14
|
+
- `command` hook objects whose shell command fields are blank
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
A command hook without an executable shell command cannot do anything useful. Requiring at least one non-empty shell command catches incomplete hook definitions before they reach runtime.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"version": 1,
|
|
25
|
+
"hooks": {
|
|
26
|
+
"sessionStart": [{ "type": "command" }]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## ✅ Correct
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"version": 1,
|
|
36
|
+
"hooks": {
|
|
37
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready" }]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Further reading
|
|
43
|
+
|
|
44
|
+
- [GitHub Docs: Using hooks with GitHub Copilot agents](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/use-hooks)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# require-repository-hooks-object
|
|
2
|
+
|
|
3
|
+
Require repository hook configuration files to declare a top-level `hooks` object.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R057
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/hooks/**/*.json`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- hook configuration files with a missing top-level `hooks` object
|
|
14
|
+
- hook configuration files whose `hooks` value is not a JSON object
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
The hook schema centers on a top-level `hooks` object keyed by event name. Without that object, the file cannot declare event-specific hook arrays in the documented structure.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{ "version": 1 }
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## ✅ Correct
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{ "version": 1, "hooks": {} }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Further reading
|
|
33
|
+
|
|
34
|
+
- [GitHub Docs: Using hooks with GitHub Copilot agents](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/use-hooks)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# require-repository-instructions-file
|
|
2
|
+
|
|
3
|
+
Require repositories that define Copilot customization assets to also provide `.github/copilot-instructions.md`.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R005
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/instructions/**/*.instructions.md`
|
|
10
|
+
- `.github/prompts/**/*.prompt.md`
|
|
11
|
+
- `.github/agents/**/*.agent.md`
|
|
12
|
+
- `.github/chatmodes/**/*.chatmode.md`
|
|
13
|
+
- `AGENTS.md`
|
|
14
|
+
- `CLAUDE.md`
|
|
15
|
+
- `GEMINI.md`
|
|
16
|
+
|
|
17
|
+
## What this rule reports
|
|
18
|
+
|
|
19
|
+
- Copilot customization assets in repositories that do not also include `.github/copilot-instructions.md`
|
|
20
|
+
|
|
21
|
+
## Why this rule exists
|
|
22
|
+
|
|
23
|
+
Repository-wide instructions provide the broadest Copilot customization surface and are widely supported. When a repository already defines prompts, custom agents, legacy chat modes, agent instructions, or path-specific instructions, a baseline repository instructions file keeps the overall guidance coherent.
|
|
24
|
+
|
|
25
|
+
## ❌ Incorrect
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
.github/prompts/review.prompt.md
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
with no `.github/copilot-instructions.md` in the repository.
|
|
32
|
+
|
|
33
|
+
## ✅ Correct
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
.github/copilot-instructions.md
|
|
37
|
+
.github/prompts/review.prompt.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Further reading
|
|
41
|
+
|
|
42
|
+
- [GitHub Docs: Add repository custom instructions for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# require-skill-file-location
|
|
2
|
+
|
|
3
|
+
Require project skill definition files to live at a documented `.github/skills/<skill>/SKILL.md` or `.claude/skills/<skill>/SKILL.md` path.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R045
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `**/SKILL.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- `SKILL.md` files that are not inside a documented project skill directory
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
GitHub and compatible skill consumers expect project skills to live in a predictable directory structure. Keeping skill definitions in those documented locations makes discovery and portability much more reliable.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
docs/SKILL.md
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ✅ Correct
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
.github/skills/review-checklist/SKILL.md
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Further reading
|
|
32
|
+
|
|
33
|
+
- [GitHub Docs: Creating agent skills for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/create-skills)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# require-skill-file-metadata
|
|
2
|
+
|
|
3
|
+
Require Copilot skill definition files to declare `name` and `description` frontmatter.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R046
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/skills/**/SKILL.md`
|
|
10
|
+
- `.claude/skills/**/SKILL.md`
|
|
11
|
+
|
|
12
|
+
## What this rule reports
|
|
13
|
+
|
|
14
|
+
- skill files with no YAML frontmatter
|
|
15
|
+
- missing or blank `name` values
|
|
16
|
+
- missing or blank `description` values
|
|
17
|
+
|
|
18
|
+
## Why this rule exists
|
|
19
|
+
|
|
20
|
+
A skill definition without basic identifying metadata is hard for both humans and tools to understand. `name` and `description` provide the minimal contract that explains what the skill is and when it should be used.
|
|
21
|
+
|
|
22
|
+
## ❌ Incorrect
|
|
23
|
+
|
|
24
|
+
```md
|
|
25
|
+
Review code carefully and use the security checklist.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## ✅ Correct
|
|
29
|
+
|
|
30
|
+
```md
|
|
31
|
+
---
|
|
32
|
+
name: review-checklist
|
|
33
|
+
description: Review code changes with the repository checklist.
|
|
34
|
+
---
|
|
35
|
+
Review code carefully and use the security checklist.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Further reading
|
|
39
|
+
|
|
40
|
+
- [GitHub Docs: Creating agent skills for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/create-skills)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# require-skill-md-filename
|
|
2
|
+
|
|
3
|
+
Require markdown files that declare skill-definition frontmatter to use the documented `SKILL.md` filename.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R055
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/skills/**/*.md`
|
|
10
|
+
- `.claude/skills/**/*.md`
|
|
11
|
+
|
|
12
|
+
## What this rule reports
|
|
13
|
+
|
|
14
|
+
- markdown files inside skill directories that look like skill definitions but are not named `SKILL.md`
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
Supplementary Markdown files are allowed inside a skill directory, but the actual skill definition file has a special documented filename. Enforcing that distinction keeps discovery predictable while still allowing supporting docs next to the skill.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
.github/skills/review/README.md
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
with frontmatter such as:
|
|
27
|
+
|
|
28
|
+
```md
|
|
29
|
+
---
|
|
30
|
+
name: review
|
|
31
|
+
description: Review code changes.
|
|
32
|
+
---
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## ✅ Correct
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
.github/skills/review/SKILL.md
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Further reading
|
|
42
|
+
|
|
43
|
+
- [GitHub Docs: Creating agent skills for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/create-skills)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# require-skill-name-match-directory
|
|
2
|
+
|
|
3
|
+
Require Copilot skill `name` metadata to match the skill directory name.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R050
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/skills/**/SKILL.md`
|
|
10
|
+
- `.claude/skills/**/SKILL.md`
|
|
11
|
+
|
|
12
|
+
## What this rule reports
|
|
13
|
+
|
|
14
|
+
- explicit skill `name` values that do not match the parent skill directory name
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
A mismatch between the skill directory and the declared skill name makes repositories harder to navigate and increases the chance that links, docs, or user expectations refer to the wrong identifier.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
.github/skills/review/SKILL.md
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
with frontmatter:
|
|
27
|
+
|
|
28
|
+
```md
|
|
29
|
+
---
|
|
30
|
+
name: review-security
|
|
31
|
+
description: Review code changes.
|
|
32
|
+
---
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## ✅ Correct
|
|
36
|
+
|
|
37
|
+
```md
|
|
38
|
+
---
|
|
39
|
+
name: review
|
|
40
|
+
description: Review code changes.
|
|
41
|
+
---
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Further reading
|
|
45
|
+
|
|
46
|
+
- [GitHub Docs: Creating agent skills for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/create-skills)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# require-string-repository-hook-env-values
|
|
2
|
+
|
|
3
|
+
Require repository hook `env` objects to use string values.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R066
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/hooks/**/*.json`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- `env` objects that contain non-string values such as numbers, arrays, or nested objects
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
Environment variables are string-based in practice. Requiring string values avoids surprising serialization behavior and keeps hook environment configuration aligned with how shells consume variables.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"version": 1,
|
|
24
|
+
"hooks": {
|
|
25
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready", "env": { "RETRIES": 3 } }]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"version": 1,
|
|
35
|
+
"hooks": {
|
|
36
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready", "env": { "RETRIES": "3" } }]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Further reading
|
|
42
|
+
|
|
43
|
+
- [GitHub Docs: Using hooks with GitHub Copilot agents](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/use-hooks)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# require-valid-agent-argument-hint
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent `argument-hint` metadata to be a non-empty scalar when present.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R043
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- blank custom-agent `argument-hint` values
|
|
14
|
+
- malformed non-scalar `argument-hint` values in supported frontmatter
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
A custom agent's `argument-hint` is supposed to help callers understand what to pass when invoking the agent. If that field is present, it should contain usable guidance rather than an empty placeholder.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
description: Investigate a bug
|
|
25
|
+
argument-hint:
|
|
26
|
+
---
|
|
27
|
+
Investigate the supplied issue.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```md
|
|
33
|
+
---
|
|
34
|
+
description: Investigate a bug
|
|
35
|
+
argument-hint: <issue-url-or-stack-trace>
|
|
36
|
+
---
|
|
37
|
+
Investigate the supplied issue.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Further reading
|
|
41
|
+
|
|
42
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# require-valid-agent-handoff-send
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent handoff `send` values to use documented boolean metadata when present.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R021
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- custom-agent handoff entries whose `send` value is present but not `true` or `false`
|
|
14
|
+
- empty `send` fields in handoff metadata
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
VS Code documents `handoffs.send` as an optional boolean flag that controls whether the handoff prompt is auto-submitted. Restricting `send` to boolean values keeps guided handoff behavior explicit and aligned with the documented custom-agent frontmatter format.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
description: Generate an implementation plan
|
|
25
|
+
handoffs:
|
|
26
|
+
- label: Start Implementation
|
|
27
|
+
agent: implementation
|
|
28
|
+
send: later
|
|
29
|
+
---
|
|
30
|
+
Create a reviewable implementation plan.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## ✅ Correct
|
|
34
|
+
|
|
35
|
+
```md
|
|
36
|
+
---
|
|
37
|
+
description: Generate an implementation plan
|
|
38
|
+
handoffs:
|
|
39
|
+
- label: Start Implementation
|
|
40
|
+
agent: implementation
|
|
41
|
+
prompt: Implement the approved plan.
|
|
42
|
+
send: true
|
|
43
|
+
---
|
|
44
|
+
Create a reviewable implementation plan.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Further reading
|
|
48
|
+
|
|
49
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# require-valid-agent-handoffs
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent handoffs to define the metadata needed for usable guided transitions.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R012
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- handoff entries that omit a non-empty `label`
|
|
14
|
+
- handoff entries that omit a non-empty `agent`
|
|
15
|
+
- handoff entries that set `send: true` without also defining a non-empty `prompt`
|
|
16
|
+
|
|
17
|
+
## Why this rule exists
|
|
18
|
+
|
|
19
|
+
VS Code custom-agent handoffs are meant to create guided transitions between agents. The documentation describes each handoff as specifying a button label and a target agent, with an optional prompt to send. If a repository defines incomplete handoff entries, the workflow becomes ambiguous or unusable.
|
|
20
|
+
|
|
21
|
+
When `send: true` is set, the prompt is auto-submitted as the next step. Requiring a prompt in that case keeps the handoff explicit instead of auto-submitting an empty request.
|
|
22
|
+
|
|
23
|
+
## ❌ Incorrect
|
|
24
|
+
|
|
25
|
+
```md
|
|
26
|
+
---
|
|
27
|
+
description: Plan work carefully
|
|
28
|
+
handoffs:
|
|
29
|
+
- label: Start Implementation
|
|
30
|
+
send: true
|
|
31
|
+
---
|
|
32
|
+
Plan the requested change before implementation.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## ✅ Correct
|
|
36
|
+
|
|
37
|
+
```md
|
|
38
|
+
---
|
|
39
|
+
description: Plan work carefully
|
|
40
|
+
handoffs:
|
|
41
|
+
- label: Start Implementation
|
|
42
|
+
agent: Implementer
|
|
43
|
+
prompt: Implement the approved plan.
|
|
44
|
+
send: true
|
|
45
|
+
---
|
|
46
|
+
Plan the requested change before implementation.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Further reading
|
|
50
|
+
|
|
51
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# require-valid-agent-hook-events
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent hooks to use supported VS Code hook event names.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R015
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- agent-scoped hook event names that are not one of the supported VS Code lifecycle events
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
VS Code agent hooks only support a defined set of lifecycle event names: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PreCompact`, `SubagentStart`, `SubagentStop`, and `Stop`. Using a different event name makes the hook configuration drift away from the documented contract.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
---
|
|
23
|
+
description: Format files after editing
|
|
24
|
+
hooks:
|
|
25
|
+
AfterEdit:
|
|
26
|
+
- type: command
|
|
27
|
+
command: ./scripts/format.sh
|
|
28
|
+
---
|
|
29
|
+
Format edited files after tool usage.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## ✅ Correct
|
|
33
|
+
|
|
34
|
+
```md
|
|
35
|
+
---
|
|
36
|
+
description: Format files after editing
|
|
37
|
+
hooks:
|
|
38
|
+
PostToolUse:
|
|
39
|
+
- type: command
|
|
40
|
+
command: ./scripts/format.sh
|
|
41
|
+
---
|
|
42
|
+
Format edited files after tool usage.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Further reading
|
|
46
|
+
|
|
47
|
+
- [VS Code Docs: Agent hooks](https://code.visualstudio.com/docs/copilot/customization/hooks)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# require-valid-agent-hook-timeouts
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent hook `timeout` values to be numeric seconds when present.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R016
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- agent-scoped hook entries whose `timeout` value is present but not numeric
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
VS Code hook documentation defines `timeout` as a numeric value in seconds. Keeping hook timeout metadata numeric avoids ambiguous strings and keeps custom-agent hook frontmatter aligned with the documented hook command format.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
---
|
|
23
|
+
description: Format files after editing
|
|
24
|
+
hooks:
|
|
25
|
+
PostToolUse:
|
|
26
|
+
- type: command
|
|
27
|
+
command: ./scripts/format.sh
|
|
28
|
+
timeout: soon
|
|
29
|
+
---
|
|
30
|
+
Format edited files after tool usage.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## ✅ Correct
|
|
34
|
+
|
|
35
|
+
```md
|
|
36
|
+
---
|
|
37
|
+
description: Format files after editing
|
|
38
|
+
hooks:
|
|
39
|
+
PostToolUse:
|
|
40
|
+
- type: command
|
|
41
|
+
command: ./scripts/format.sh
|
|
42
|
+
timeout: 15
|
|
43
|
+
---
|
|
44
|
+
Format edited files after tool usage.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Further reading
|
|
48
|
+
|
|
49
|
+
- [VS Code Docs: Agent hooks](https://code.visualstudio.com/docs/copilot/customization/hooks)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# require-valid-agent-hooks
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent hooks to use `type: command` and define at least one command property.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R014
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- hook entries whose `type` is missing or not `command`
|
|
14
|
+
- hook entries that do not define any of `command`, `windows`, `linux`, or `osx`
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
Agent-scoped hooks in VS Code use the same structure as hook configuration files. The hook documentation states that each hook entry must have `type: "command"` and at least one command property. This rule catches incomplete agent-scoped hook entries before they silently fail or miscommunicate behavior.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
description: Format files after editing
|
|
25
|
+
hooks:
|
|
26
|
+
PostToolUse:
|
|
27
|
+
- type: command
|
|
28
|
+
cwd: scripts
|
|
29
|
+
---
|
|
30
|
+
Format edited files after tool usage.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## ✅ Correct
|
|
34
|
+
|
|
35
|
+
```md
|
|
36
|
+
---
|
|
37
|
+
description: Format files after editing
|
|
38
|
+
hooks:
|
|
39
|
+
PostToolUse:
|
|
40
|
+
- type: command
|
|
41
|
+
command: ./scripts/format.sh
|
|
42
|
+
---
|
|
43
|
+
Format edited files after tool usage.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Further reading
|
|
47
|
+
|
|
48
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
49
|
+
- [VS Code Docs: Agent hooks](https://code.visualstudio.com/docs/copilot/customization/hooks)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# require-valid-agent-invocation-controls
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent invocation-control flags to use documented boolean values when present.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R020
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- invalid `user-invocable` values
|
|
14
|
+
- invalid `disable-model-invocation` values
|
|
15
|
+
- empty invocation-control fields when those fields are present
|
|
16
|
+
|
|
17
|
+
## Why this rule exists
|
|
18
|
+
|
|
19
|
+
VS Code documents `user-invocable` and `disable-model-invocation` as boolean control flags for how a custom agent appears in the agent picker and whether it can be invoked as a subagent. Restricting these fields to boolean values keeps custom-agent invocation behavior explicit and predictable.
|
|
20
|
+
|
|
21
|
+
## ❌ Incorrect
|
|
22
|
+
|
|
23
|
+
```md
|
|
24
|
+
---
|
|
25
|
+
description: Internal helper agent
|
|
26
|
+
user-invocable: sometimes
|
|
27
|
+
---
|
|
28
|
+
Use this agent for internal helper work.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## ✅ Correct
|
|
32
|
+
|
|
33
|
+
```md
|
|
34
|
+
---
|
|
35
|
+
description: Internal helper agent
|
|
36
|
+
user-invocable: false
|
|
37
|
+
disable-model-invocation: true
|
|
38
|
+
---
|
|
39
|
+
Use this agent for internal helper work.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Further reading
|
|
43
|
+
|
|
44
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
45
|
+
- [VS Code Docs: Subagents](https://code.visualstudio.com/docs/copilot/agents/subagents)
|