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,43 @@
|
|
|
1
|
+
# require-existing-relative-instructions-links
|
|
2
|
+
|
|
3
|
+
Require relative Markdown links in path-specific Copilot instructions files to resolve to existing workspace targets.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R032
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/instructions/**/*.instructions.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- relative instructions links whose resolved workspace target does not exist
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
Path-specific instructions commonly link to package-specific conventions or local examples. Broken links weaken those instructions by pointing reviewers and coding agents at context that is no longer there.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
---
|
|
23
|
+
description: Frontend guidance
|
|
24
|
+
applyTo: src/**/*.ts
|
|
25
|
+
---
|
|
26
|
+
See [frontend standards](../../docs/frontend.md).
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
when `../../docs/frontend.md` does not exist from the instructions file.
|
|
30
|
+
|
|
31
|
+
## ✅ Correct
|
|
32
|
+
|
|
33
|
+
```md
|
|
34
|
+
---
|
|
35
|
+
description: Frontend guidance
|
|
36
|
+
applyTo: src/**/*.ts
|
|
37
|
+
---
|
|
38
|
+
See [frontend standards](../../docs/standards/frontend.md).
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Further reading
|
|
42
|
+
|
|
43
|
+
- [VS Code Docs: Custom instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# require-existing-relative-prompt-links
|
|
2
|
+
|
|
3
|
+
Require relative Markdown links in Copilot prompt files to resolve to existing workspace targets.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R030
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/prompts/**/*.prompt.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- relative links whose resolved workspace target does not exist
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
Relative links are only useful when they actually resolve. Broken prompt links can hide important context, examples, or runbooks from the people and tools invoking the prompt.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
---
|
|
23
|
+
description: Review a pull request
|
|
24
|
+
---
|
|
25
|
+
See [review guide](../docs/review-guide.md).
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
when `../docs/review-guide.md` does not exist from the prompt file.
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```md
|
|
33
|
+
---
|
|
34
|
+
description: Review a pull request
|
|
35
|
+
---
|
|
36
|
+
See [review guide](../../docs/review-guide.md).
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Further reading
|
|
40
|
+
|
|
41
|
+
- [VS Code Docs: Prompt files](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# require-existing-relative-skill-links
|
|
2
|
+
|
|
3
|
+
Require relative Markdown links in Copilot skill definition files to resolve to existing workspace resources.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R053
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/skills/**/SKILL.md`
|
|
10
|
+
- `.claude/skills/**/SKILL.md`
|
|
11
|
+
|
|
12
|
+
## What this rule reports
|
|
13
|
+
|
|
14
|
+
- relative skill links whose resolved workspace target does not exist
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
Skills often depend on linked guides, examples, and scripts stored alongside the definition. Broken relative links make the skill incomplete even though its frontmatter and body appear structurally valid.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
name: review
|
|
25
|
+
description: Review code changes.
|
|
26
|
+
---
|
|
27
|
+
See [guide](guide.md).
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
when `guide.md` does not exist next to the skill definition.
|
|
31
|
+
|
|
32
|
+
## ✅ Correct
|
|
33
|
+
|
|
34
|
+
```md
|
|
35
|
+
---
|
|
36
|
+
name: review
|
|
37
|
+
description: Review code changes.
|
|
38
|
+
---
|
|
39
|
+
See [guide](reference/guide.md).
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Further reading
|
|
43
|
+
|
|
44
|
+
- [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,45 @@
|
|
|
1
|
+
# require-existing-repository-hook-cwd
|
|
2
|
+
|
|
3
|
+
Require repository hook `cwd` values to resolve to existing repository paths.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R063
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/hooks/**/*.json`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- relative hook `cwd` values that do not exist in the repository
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
A repository-relative working directory still needs to point somewhere real. Validating the path on disk catches stale or misspelled hook working directories before the hook runs.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"version": 1,
|
|
24
|
+
"hooks": {
|
|
25
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready", "cwd": "scripts/hooks" }]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
when `scripts/hooks` does not exist in the repository.
|
|
31
|
+
|
|
32
|
+
## ✅ Correct
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"version": 1,
|
|
37
|
+
"hooks": {
|
|
38
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready", "cwd": "scripts" }]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Further reading
|
|
44
|
+
|
|
45
|
+
- [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,46 @@
|
|
|
1
|
+
# require-github-copilot-target-for-mcp-servers
|
|
2
|
+
|
|
3
|
+
Require Copilot custom agents that declare `mcp-servers` to set `target: github-copilot`.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R010
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- custom agent files that declare `mcp-servers` without any `target`
|
|
14
|
+
- custom agent files that declare `mcp-servers` with an empty `target`
|
|
15
|
+
- custom agent files that declare `mcp-servers` with a non-`github-copilot` target
|
|
16
|
+
|
|
17
|
+
## Why this rule exists
|
|
18
|
+
|
|
19
|
+
The `mcp-servers` frontmatter is specific to GitHub Copilot-targeted custom agents. If a custom agent opts into `mcp-servers` but omits `target: github-copilot`, the file drifts away from the current VS Code contract and can miscommunicate how that agent is meant to run.
|
|
20
|
+
|
|
21
|
+
## ❌ Incorrect
|
|
22
|
+
|
|
23
|
+
```md
|
|
24
|
+
---
|
|
25
|
+
description: Coordinate release automation through MCP servers
|
|
26
|
+
target: vscode
|
|
27
|
+
mcp-servers: [release-coordinator.json]
|
|
28
|
+
---
|
|
29
|
+
Coordinate release automation tasks.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## ✅ Correct
|
|
33
|
+
|
|
34
|
+
```md
|
|
35
|
+
---
|
|
36
|
+
description: Coordinate release automation through MCP servers
|
|
37
|
+
target: github-copilot
|
|
38
|
+
mcp-servers: [release-coordinator.json]
|
|
39
|
+
---
|
|
40
|
+
Coordinate release automation tasks.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Further reading
|
|
44
|
+
|
|
45
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
46
|
+
- [VS Code January 2026 update notes: Agent extensibility](https://code.visualstudio.com/updates/v1_109)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# require-instructions-apply-to
|
|
2
|
+
|
|
3
|
+
Require path-specific Copilot instructions files to define a non-empty `applyTo` frontmatter glob.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R001
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/instructions/**/*.instructions.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- instructions files with missing or blank `applyTo` frontmatter
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
Path-specific instructions are only useful when Copilot can tell which files they target. Without `applyTo`, the instructions file cannot participate in automatic attachment for matching files.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
---
|
|
23
|
+
description: TypeScript style guidance
|
|
24
|
+
---
|
|
25
|
+
Use `satisfies` for stable object literals.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## ✅ Correct
|
|
29
|
+
|
|
30
|
+
```md
|
|
31
|
+
---
|
|
32
|
+
description: TypeScript style guidance
|
|
33
|
+
applyTo: "src/**/*.ts"
|
|
34
|
+
---
|
|
35
|
+
Use `satisfies` for stable object literals.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Further reading
|
|
39
|
+
|
|
40
|
+
- [VS Code Docs: Reusable instruction files](https://code.visualstudio.com/docs/copilot/copilot-customization#_reusable-instruction-files)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# require-json-agent-mcp-servers
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent `mcp-servers` entries to reference JSON config files.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R034
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- `mcp-servers` entries that do not end in `.json`
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
In practice, custom-agent `mcp-servers` entries are repository file references to MCP server configuration documents. Requiring `.json` targets makes those references more explicit and catches obvious misconfigurations early.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
---
|
|
23
|
+
description: Release coordinator
|
|
24
|
+
mcp-servers: ['release-server']
|
|
25
|
+
---
|
|
26
|
+
Coordinate the release.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## ✅ Correct
|
|
30
|
+
|
|
31
|
+
```md
|
|
32
|
+
---
|
|
33
|
+
description: Release coordinator
|
|
34
|
+
mcp-servers: ['release-server.json']
|
|
35
|
+
---
|
|
36
|
+
Coordinate the release.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Further reading
|
|
40
|
+
|
|
41
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# require-prompt-file-metadata
|
|
2
|
+
|
|
3
|
+
Require reusable Copilot prompt files to declare `description`, `agent`, and built-in agent-mode `tools` metadata.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R002
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/prompts/**/*.prompt.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- prompt files with missing or blank `description`
|
|
14
|
+
- prompt files with missing or blank `agent`
|
|
15
|
+
- prompt files that still use deprecated `mode`
|
|
16
|
+
- built-in `agent` prompt files without `tools`
|
|
17
|
+
|
|
18
|
+
## Why this rule exists
|
|
19
|
+
|
|
20
|
+
Prompt files are reusable requests. Explicit metadata makes them easier to understand, safer to run, and more consistent across repositories. Current VS Code prompt files use `agent` instead of the older `mode` key.
|
|
21
|
+
|
|
22
|
+
## ❌ Incorrect
|
|
23
|
+
|
|
24
|
+
```md
|
|
25
|
+
---
|
|
26
|
+
description: Review this repository
|
|
27
|
+
agent: agent
|
|
28
|
+
---
|
|
29
|
+
Audit the repository for stale branding and broken docs links.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## ✅ Correct
|
|
33
|
+
|
|
34
|
+
```md
|
|
35
|
+
---
|
|
36
|
+
description: Review this repository
|
|
37
|
+
agent: agent
|
|
38
|
+
tools: [search/file_search, search/read_file]
|
|
39
|
+
---
|
|
40
|
+
Audit the repository for stale branding and broken docs links.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Further reading
|
|
44
|
+
|
|
45
|
+
- [VS Code Docs: Reusable prompt files](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# require-qualified-agent-handoff-models
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent handoff models to use qualified `Model Name (vendor)` names.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R013
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- handoff entries whose `model` value is present but not written in a qualified format such as `GPT-5 (copilot)`
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
VS Code custom-agent docs specify that `handoffs.model` should use a qualified model name in the format `Model Name (vendor)`. That keeps handoff execution explicit and avoids ambiguous shorthand model names in multi-vendor Copilot environments.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
---
|
|
23
|
+
description: Plan work carefully
|
|
24
|
+
handoffs:
|
|
25
|
+
- label: Start Implementation
|
|
26
|
+
agent: Implementer
|
|
27
|
+
model: GPT-5
|
|
28
|
+
---
|
|
29
|
+
Plan the requested change before implementation.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## ✅ Correct
|
|
33
|
+
|
|
34
|
+
```md
|
|
35
|
+
---
|
|
36
|
+
description: Plan work carefully
|
|
37
|
+
handoffs:
|
|
38
|
+
- label: Start Implementation
|
|
39
|
+
agent: Implementer
|
|
40
|
+
model: GPT-5 (copilot)
|
|
41
|
+
---
|
|
42
|
+
Plan the requested change before implementation.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Further reading
|
|
46
|
+
|
|
47
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# require-relative-agent-hook-cwd
|
|
2
|
+
|
|
3
|
+
Require Copilot custom-agent hook `cwd` values to stay relative to the repository root.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R018
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- agent-scoped hook entries whose `cwd` value is empty
|
|
14
|
+
- agent-scoped hook entries whose `cwd` value is absolute, home-relative, or otherwise not repository-relative
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
VS Code documents hook `cwd` as a working directory path relative to the repository root. Absolute paths and empty values make hook execution less portable across developers and environments, and they drift away from the documented hook configuration format.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
description: Format files after editing
|
|
25
|
+
hooks:
|
|
26
|
+
PostToolUse:
|
|
27
|
+
- type: command
|
|
28
|
+
command: ./scripts/format.sh
|
|
29
|
+
cwd: C:\hooks
|
|
30
|
+
---
|
|
31
|
+
Format edited files after tool usage.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## ✅ Correct
|
|
35
|
+
|
|
36
|
+
```md
|
|
37
|
+
---
|
|
38
|
+
description: Format files after editing
|
|
39
|
+
hooks:
|
|
40
|
+
PostToolUse:
|
|
41
|
+
- type: command
|
|
42
|
+
command: ./scripts/format.sh
|
|
43
|
+
cwd: scripts/hooks
|
|
44
|
+
---
|
|
45
|
+
Format edited files after tool usage.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Further reading
|
|
49
|
+
|
|
50
|
+
- [VS Code Docs: Agent hooks](https://code.visualstudio.com/docs/copilot/customization/hooks)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# require-relative-agent-links
|
|
2
|
+
|
|
3
|
+
Require Copilot custom agents to use relative Markdown links for workspace files.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R028
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/agents/**/*.agent.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- root-relative links such as `/docs/runbook.md`
|
|
14
|
+
- file links that use other non-relative workspace-style paths instead of paths relative to the current agent file
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
Relative links make custom-agent instructions portable across forks, local clones, and different workspace roots. They also match how Copilot customization content typically references repository resources.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
description: Release coordinator
|
|
25
|
+
---
|
|
26
|
+
See [runbook](/docs/release-runbook.md).
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## ✅ Correct
|
|
30
|
+
|
|
31
|
+
```md
|
|
32
|
+
---
|
|
33
|
+
description: Release coordinator
|
|
34
|
+
---
|
|
35
|
+
See [runbook](../../docs/release-runbook.md).
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Further reading
|
|
39
|
+
|
|
40
|
+
- [VS Code Docs: Custom agents](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# require-relative-instructions-links
|
|
2
|
+
|
|
3
|
+
Require path-specific Copilot instructions files to use relative Markdown links for workspace files.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R029
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/instructions/**/*.instructions.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- root-relative links such as `/docs/frontend.md`
|
|
14
|
+
- file links that use other non-relative workspace-style paths instead of paths relative to the current instructions file
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
Path-specific instructions often link to coding standards, examples, or package documentation in the repository. Relative links keep those references portable and make it clearer how the linked resource relates to the current instructions file.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
description: Frontend guidance
|
|
25
|
+
applyTo: src/**/*.ts
|
|
26
|
+
---
|
|
27
|
+
See [frontend standards](/docs/frontend.md).
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```md
|
|
33
|
+
---
|
|
34
|
+
description: Frontend guidance
|
|
35
|
+
applyTo: src/**/*.ts
|
|
36
|
+
---
|
|
37
|
+
See [frontend standards](../../docs/frontend.md).
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Further reading
|
|
41
|
+
|
|
42
|
+
- [VS Code Docs: Custom instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# require-relative-prompt-links
|
|
2
|
+
|
|
3
|
+
Require Copilot prompt files to use relative Markdown links for workspace files.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R024
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/prompts/**/*.prompt.md`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- root-relative Markdown links to workspace files inside prompt bodies
|
|
14
|
+
- filesystem-style absolute paths in prompt Markdown links
|
|
15
|
+
- `file:` links used instead of repository-relative workspace links
|
|
16
|
+
|
|
17
|
+
## Why this rule exists
|
|
18
|
+
|
|
19
|
+
VS Code prompt-file documentation says to reference workspace files with Markdown links that use relative paths based on the prompt file location. Enforcing relative workspace links keeps prompt files portable across machines, folders, and repositories.
|
|
20
|
+
|
|
21
|
+
## ❌ Incorrect
|
|
22
|
+
|
|
23
|
+
```md
|
|
24
|
+
---
|
|
25
|
+
description: Review changes with repository guidance
|
|
26
|
+
agent: agent
|
|
27
|
+
---
|
|
28
|
+
Review the proposed changes using [security guidance](/.github/instructions/security.instructions.md).
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## ✅ Correct
|
|
32
|
+
|
|
33
|
+
```md
|
|
34
|
+
---
|
|
35
|
+
description: Review changes with repository guidance
|
|
36
|
+
agent: agent
|
|
37
|
+
---
|
|
38
|
+
Review the proposed changes using [security guidance](../instructions/security.instructions.md).
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Further reading
|
|
42
|
+
|
|
43
|
+
- [VS Code Docs: Prompt files](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# require-relative-repository-hook-cwd
|
|
2
|
+
|
|
3
|
+
Require repository hook `cwd` values to use repository-relative paths.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R062
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/hooks/**/*.json`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- absolute or otherwise non-relative `cwd` values in hook definitions
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
Repository hooks are meant to run against the checked-out repository. Repository-relative working directories are more portable than absolute paths and avoid machine-specific configuration.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"version": 1,
|
|
24
|
+
"hooks": {
|
|
25
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready", "cwd": "/tmp" }]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"version": 1,
|
|
35
|
+
"hooks": {
|
|
36
|
+
"sessionStart": [{ "type": "command", "bash": "echo ready", "cwd": "scripts" }]
|
|
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-relative-skill-links
|
|
2
|
+
|
|
3
|
+
Require Copilot skill definition files to use relative Markdown links for workspace resources.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R052
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/skills/**/SKILL.md`
|
|
10
|
+
- `.claude/skills/**/SKILL.md`
|
|
11
|
+
|
|
12
|
+
## What this rule reports
|
|
13
|
+
|
|
14
|
+
- root-relative or otherwise non-relative workspace file links in a skill body
|
|
15
|
+
|
|
16
|
+
## Why this rule exists
|
|
17
|
+
|
|
18
|
+
Skills frequently reference supplementary Markdown files, scripts, and local resources. Relative links keep those references portable and aligned with the repository-local nature of project skills.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
name: review
|
|
25
|
+
description: Review code changes.
|
|
26
|
+
---
|
|
27
|
+
See [guide](/docs/review.md).
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## ✅ Correct
|
|
31
|
+
|
|
32
|
+
```md
|
|
33
|
+
---
|
|
34
|
+
name: review
|
|
35
|
+
description: Review code changes.
|
|
36
|
+
---
|
|
37
|
+
See [guide](guide.md).
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Further reading
|
|
41
|
+
|
|
42
|
+
- [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,33 @@
|
|
|
1
|
+
# require-repository-hook-arrays
|
|
2
|
+
|
|
3
|
+
Require each repository hook event entry in `hooks` to be an array.
|
|
4
|
+
|
|
5
|
+
> **Rule catalog ID:** R058
|
|
6
|
+
|
|
7
|
+
## Targeted pattern scope
|
|
8
|
+
|
|
9
|
+
- `.github/hooks/**/*.json`
|
|
10
|
+
|
|
11
|
+
## What this rule reports
|
|
12
|
+
|
|
13
|
+
- hook event values that are objects, strings, numbers, or other non-array JSON values
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
Each hook event is documented as an array of hook definitions. Enforcing that array shape keeps the JSON structure consistent and makes it possible to reason about multiple hooks on the same event.
|
|
18
|
+
|
|
19
|
+
## ❌ Incorrect
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{ "version": 1, "hooks": { "sessionStart": {} } }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## ✅ Correct
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{ "version": 1, "hooks": { "sessionStart": [] } }
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Further reading
|
|
32
|
+
|
|
33
|
+
- [GitHub Docs: Using hooks with GitHub Copilot agents](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/use-hooks)
|