plugins/orchestrator-discipline/skills/orchestrator-discipline/SKILL.md
Orchestrator context window discipline enforcement. Prevents the orchestrator from reading source files it will not edit, running diagnostic commands that waste context, and rationalizing delegation bypasses. Use when setting up orchestrator guardrails, reviewing delegation discipline, or diagnosing context window waste in multi-agent workflows. Activates PreToolUse hooks that surface decision points before source file reads and diagnostic command execution.
npx skillsauth add jamie-bitflight/claude_skills orchestrator-disciplineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Enforce delegation discipline for the orchestrator role in multi-agent Claude Code workflows. The orchestrator's context window is a shared resource across the entire session — agents get fresh context per task, the orchestrator does not.
Two hooks fire automatically on every tool call:
Source File Read Warning — fires on Read and Grep targeting source/config/test files (.py, .toml, .yaml, .json, etc.). Injects a decision-point reminder asking: "Will you Edit/Write this file this turn?"
Diagnostic Command Gate — fires on Bash calls matching diagnostic commands (ty check, ruff check, mypy, pytest, eslint, cargo check, etc.). Reminds the orchestrator to delegate the command to an Explore agent instead.
Bash Built-In Tool Enforcement Gate — fires on Bash calls that should use built-in Claude Code tools (Read, Grep, Glob). Blocking — exits 2 to prevent the command and redirect to the correct tool. SOURCE: 28 violations in session e3280e97 (2026-03-02).
The Source File Read Warning and Diagnostic Command Gate are non-blocking — they inject additionalContext to surface the decision, not prevent it. The Bash Built-In Tool Enforcement Gate is blocking — it exits 2 to structurally enforce the rule.
The rules/CLAUDE.md file is loaded into every session and provides:
See Investigation Escalation Anti-Pattern for the detailed pattern analysis, root cause diagnosis, and correct workflow alternatives.
This skill auto-loads via the plugin's hooks and rules. Manual activation is useful when:
flowchart TD
Start([Task arrives]) --> Q1{Does orchestrator need<br>current codebase state?}
Q1 -->|Yes| Explore["Delegate to Explore agent<br>with diagnostic command"]
Q1 -->|No| Direct[Delegate implementation<br>to specialist agent]
Explore --> Summary[Receive summary<br>from agent]
Summary --> Q2{Scope changed?}
Q2 -->|Yes| User[Present to user<br>for routing decision]
Q2 -->|No| Direct
User --> Direct
Direct --> PostCheck["Spot-check agent output<br>(read deliverable only)"]
Q1 -.->|WRONG| Self["Read source files yourself<br>Run diagnostics yourself"]
Self -.->|Escalates to| Bypass["'This is simple enough<br>to do myself'"]
Triggers on: Read or Grep where target path matches:
.py, .toml, .yaml, .yml, .js, .ts, .jsx, .tsx, .json, .cfg, .ini, .env, .sh, .bash, .go, .rs, .rb, .java, .c, .cpp, .h, .hpptest/, tests/, spec/, __tests__/, or files matching test_*.pyDoes NOT trigger on: .md, .txt, plan files, backlog items, CLAUDE.md, skill definitions
Triggers on: Bash where command matches Bash-equivalent file operations:
grep at start of command (standalone, not pipeline)find ... -name patternsls at start of command (not ls -la)cat file.ext (file reads, not stdin)head -N, tail -N file.ext, sed -n 'N,Mp'Blocking: YES — exits with code 2 to prevent the command and provide redirect message.
Does NOT trigger on: Pipeline uses (git log | grep, uv run | head), cat /dev/stdin, cat -, ls -la
SOURCE: 28 violations observed in session e3280e97 (2026-03-02); installed as structural enforcement.
Triggers on: Bash where command matches:
ty check, ruff check, mypy, pyright, basedpyright, pylint, pytesteslint, tsc --noEmitcargo check, cargo clippygo vetpre-commit run, prek runDoes NOT trigger on: git status, ls, wc, uv run (without diagnostic subcommand), or any non-diagnostic bash command
development
When an application needs to store config, data, cache, or state files. When designing where user-specific files should live. When code writes to ~/.appname or hardcoded home paths. When implementing cross-platform file storage with platformdirs.
testing
Enforce mandatory pre-action verification checkpoints to prevent pattern-matching from overriding explicit reasoning. Use this skill when about to execute implementation actions (Bash, Write, Edit) to verify hypothesis-action alignment. Blocks execution when hypothesis unverified or action targets different system than hypothesis identified. Critical for preventing cognitive dissonance where correct diagnosis leads to wrong implementation.
tools
Reference guide for the Twelve-Factor App methodology — 15 principles (12 original + 3 modern extensions) for building portable, resilient, cloud-native applications. Use when evaluating application architecture, designing cloud-native services, reviewing codebases for methodology compliance, advising on configuration, scaling, observability, security, and deployment patterns. Incorporates the 2025 open-source community evolution and cloud-native reinterpretations of each factor.
tools
Converts user-facing documentation (how-to guides, tutorials, API references, examples) in any format — Markdown, PDF, DOCX, PPTX, XLSX, AsciiDoc, RST, HTML, Jupyter notebooks, man pages, TOML/YAML/JSON configs, and plain text — into Claude Code skill directories with SKILL.md plus thematically grouped references/*.md files. Use when given a docs directory or mixed-format documentation to transform into an AI skill. Uses MCP file-reader server for binary formats.