bully
Interprets bully PostToolUse hook output after Edit/Write -- fixes blocked-stderr violations or dispatches the bully-evaluator subagent for semantic payloads.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Interprets bully PostToolUse hook output after Edit/Write -- fixes blocked-stderr violations or dispatches the bully-evaluator subagent for semantic payloads.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use when cutting a new bully release — bumping the plugin version so Claude Code users get an update notification. Triggers include "cut a release", "ship a new version", "release vX.Y.Z", "bump the version", or "publish an update to bully".
Authors, modifies, or removes rules in `.bully.yml`. Use when the user says "add a lint rule for X", "ban Y", "tighten <rule-id>", "make <rule-id> a warning", "convert <rule-id> to semantic", "remove <rule-id>", "change the scope of <rule-id>", or asks to apply recommendations from `/bully-review`. Always tests a rule against a fixture before writing it to the config.
Bootstraps a project's .bully.yml by detecting the tech stack from manifest files, migrating rules from existing linting tools, and generating a baseline config. Use when user says "init agentic lint", "set up agentic lint", "bootstrap lint config", "create lint rules", "bully init", "initialize agentic lint", or asks to create or generate an agentic lint configuration.
Reviews bully rule health from the telemetry log. Use when the user says "review my lint rules", "check rule health", "which lint rules are noisy", "find dead lint rules", "bully review", or asks for an audit of `.bully.yml`. Surfaces noisy, dead, and slow rules and suggests which to adjust, remove, or promote.
| name | bully |
| description | Interprets bully PostToolUse hook output after Edit/Write -- fixes blocked-stderr violations or dispatches the bully-evaluator subagent for semantic payloads. |
| metadata | {"author":"dynamik-dev","version":"2.0.0","category":"workflow-automation","tags":["linting","hooks","code-quality","post-tool-use"]} |
Interpret and act on bully PostToolUse hook output. Not user-invocable.
Tool result stderr begins with AGENTIC LINT -- blocked. Format:
AGENTIC LINT -- blocked. Fix these before proceeding:
- [no-compact] line 42: return compact('result');
- [no-db-facade] line 58: $users = DB::table('users')->get();
Passed checks: rule-a, rule-b
Fix every listed violation in the affected file before any other tool call. The hook re-fires on the next Edit and re-checks. Repeat until clear.
hookSpecificOutput.additionalContext begins with AGENTIC LINT SEMANTIC EVALUATION REQUIRED and carries a JSON payload:
AGENTIC LINT SEMANTIC EVALUATION REQUIRED:
{
"file": "src/Evaluators/CachedEvaluator.php",
"diff": "--- ...before\n+++ ...after\n@@ -28,6 +28,11 @@ ...",
"passed_checks": ["no-compact", "no-db-facade"],
"evaluate": [
{"id": "no-inline-single-use", "description": "...", "severity": "error"},
{"id": "full-type-hints", "description": "...", "severity": "warning"}
],
"_evaluator_input": "SEMANTIC EVALUATION REQUIRED\n\n<TRUSTED_POLICY>\n...rule policy...\n</TRUSTED_POLICY>\n\n<UNTRUSTED_EVIDENCE>\n...file + diff...\n</UNTRUSTED_EVIDENCE>\n"
}
If evaluate is empty, proceed with no dispatch and no inline eval.
If the diff is short (roughly under 15 lines) AND there is only one rule in evaluate, judge it yourself inline against the diff and produce the same VIOLATIONS / NO_VIOLATIONS format below -- skip the subagent. Otherwise dispatch the bully-evaluator subagent.
Parse the additionalContext JSON. If it contains a top-level _evaluator_input field, pass that field's value DIRECTLY as the subagent prompt -- it's already formatted as a string with <TRUSTED_POLICY> and <UNTRUSTED_EVIDENCE> boundaries. Do NOT re-serialize it as JSON. If _evaluator_input is missing (older harness), fall back to re-serializing the full payload as JSON. This keeps passed_checks out of the subagent's context while preserving it for your own use.
Call the Agent tool with subagent_type: bully-evaluator and a 3-5 word description (e.g. "Evaluate lint rules"). The agent returns:
VIOLATIONS:
- [rule-id] line N: <what's wrong>
fix: <suggestion>
NO_VIOLATIONS:
- rule-id-a
If the response is malformed, re-dispatch once. If still malformed, evaluate inline against the diff using the same output format.
For each entry in VIOLATIONS:, look up severity in the original evaluate array:
fix: as a starting point, before any other tool call.After parsing VIOLATIONS / NO_VIOLATIONS (whether from the subagent or from inline eval), record each rule's verdict. For every rule id in the original evaluate array, invoke the Bash tool once with:
bully --log-verdict --rule <rule-id> --verdict <pass|violation> --file <file-path>
Use violation if the rule appears in VIOLATIONS, pass if it appears in NO_VIOLATIONS. This is a no-op when telemetry is disabled, so always invoke. The bully command is shipped on $PATH by the plugin (bin/bully wrapper). If you see command not found: bully, the plugin install is corrupt or pre-0.8.5; skip the verdict log rather than chasing fallbacks.
Rules already verified by deterministic script checks. Do not re-investigate their concerns. Use them to catch cross-rule interactions (e.g. a semantic rule that overlaps a passed script rule on an indirect code path).