scope-guard
Enforce user-defined task boundaries to prevent scope creep and over-implementation. Use after receiving a task with explicit constraints ("only X", "don't do Y", "focus on Z"), before starting each new sub-step during execution, or when tempted to add helpful work not explicitly requested.
- License 许可
- MIT
- 所属仓库
- muratovv/ai-hats
- 最近更新
- 2026-11-05
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- scope-guard
- license
- MIT
- description
- Enforce user-defined task boundaries to prevent scope creep and over-implementation. Use after receiving a task with explicit constraints ("only X", "don't do Y", "focus on Z"), before starting each new sub-step during execution, or when tempted to add helpful work not explicitly requested.
02 资源文件 2
- 许可证LICENSE1.0 KB
- 参考文档metadata.yaml881 B
03 SKILL.md 正文
Scope Guard
Enforce user-defined task boundaries. Prevent scope creep and over-implementation.
When to Use
Execution-time guard against doing more than the user asked. Its sibling at plan stage is design-minimalism, which strips speculative primitives from a plan before any code exists; scope-guard instead holds the line on explicit user constraints ("only X", "don't touch Y") while you execute. If you're weighing whether an abstraction is justified, that's design-minimalism; if you're tempted to bolt on unrequested "helpful" work, that's this skill.
Checklist
Before Starting Execution
- Extract constraints: List every explicit limitation from the user's request (e.g., "signatures only", "no tests", "just the plan")
- Record constraints in plan.md under a
## Scope Constraintssection - Define "done": What is the minimum deliverable that satisfies the request?
Before Each Action
- Scope check: Is this action within the recorded constraints?
- YES → proceed
- NO → go to step 5
- Escalate, don't decide: If you believe a constraint should be violated (e.g., minimal implementation needed to compile), ASK the user first. Never silently expand scope.
Execution Checkpoints
- Checkpoint rule: After every 5 significant tool calls (Edit, Write, Bash that changes state),
pause and deliver a brief status:
- What was done so far (1-2 lines)
- What's next (1-2 lines)
- Any deviations from plan
- Large task threshold: If executing 10+ tool calls in a single response, STOP after 5 and checkpoint. Do not continue silently.
- Plan revision: prefer Write over many Edits. When revising a plan file
(
<ai_hats_dir>/tracker/backlog/tasks/*/plan.md— the one canonical plan home): if more than 2 distinct sections of the plan need to change, use a singleWriteto rewrite the whole file rather than 3+ sequentialEditcalls. Plan files are short enough that a full rewrite costs the same as the diffs but avoids per-edit permission and round-trip overhead for the supervisor. - "discuss before implement" gate: On non-trivial tasks, present the approach before executing. One paragraph, not a wall of text. Wait for confirmation.
After Completing Work
- Scope audit: Compare what you delivered against the original constraints. Did you do more than asked? Flag it.
Completion
- Constraints recorded in plan.md
- Every action within recorded constraints, or user approved the deviation
- No unrequested work delivered without explicit approval
Rationalization red-flags
Scope creep arrives as a thought you tell yourself before the action. Catch the rationalization, not just the regret:
| Rationalization (what you tell yourself) | Why it's wrong |
|---|---|
| "I'll just add this helper while I'm here" | Not requested — the user scopes, your convenience doesn't |
| "Skeleton/infra obviously means wire up everything" | Defaults to only what was named; ask with a concrete enumeration (switched 4 handlers, user rolled back 3) |
| "It won't compile without this extra bit" | Maybe — but that is an escalation ("ASK first"), not a licence to expand silently |
| "Faster to do it all now than to ask" | The ask round-trip is cheaper than the rollback |
Red-flag words in your own reasoning: "while I'm here", "just also", "might as well", "obviously they'd want", "to be safe". Any of these → re-run the scope check (step 4) and escalate (step 5) instead of proceeding.
Forbidden workaround: expanding scope and "flagging it" in the final summary is not consent — flagging after the fact does not substitute for asking before the action. (Rationalization-table discipline adapted from obra/superpowers, MIT.)
Anti-Patterns
- "I'll just add this helper since I'm here" — scope creep
- Justifying scope expansion internally without asking — the user decides, not you
- Writing full implementations when asked for signatures/interfaces
- Writing tests when asked for design only
- 30+ tool calls in a single response without a checkpoint — the user loses visibility
- Skipping "discuss approach" on tasks with multiple implementation options
- "Skeleton / infrastructure / framework" signal misread. When the user says "make a skeleton of X" or "set up the infrastructure for Y" or "wire up the framework call for Z" — interpret as minimum viable demo + ask before expanding, NOT as "wire up all related entry-points". A one-liner answer about scope without an explicit "everything" defaults to "only what was specifically named". Worked example — user said "нужен скелет вызова ai-hats", agent switched 4 CLI handlers via pipeline-presets; user rolled back 3 of them. The correct ask is: "only X, X and Y, or all four?" with a concrete enumeration.
04 同仓库更多 Skills
tool-evaluation-protocol
Time-bounded protocol for evaluating new tools, libraries, or methodologies before adoption. Use when evaluating a candidate dependency for the project, researching a methodology (e.g. ML/LLM frameworks, testing approaches), or following up on a hype-driven recommendation.
systematic-debugging
4-phase bug-fix protocol (evidence, pattern, hypothesis, verify). Use when investigating any error, failure, or unexpected behavior, handling bug reports from users or monitoring, or diagnosing test failures with non-obvious causes.
skill-template
Canonical template and validation guide for ai-hats skills. Use when creating a new skill, reviewing an existing one for structural compliance, or deciding which pattern fits a new behavior.
skill-optimization
Audit and refactor library components to eliminate redundancy and staleness. Use during periodic library maintenance, after adding multiple new skills or rules, when a role's token budget is too high, or after retrospectives identify component issues.
silent-fallback-gate
PreToolUse hook — refuses an Edit or Write that adds an inert broad except. Use when a Python edit was blocked for a silent fallback.
retro-to-framework
Convert an observation about agent behavior — from a retrospective or from a single incident — into a framework-level change (hook, rule, skill, skill update). Use after a retrospective identifies problems that are not project-specific, after an incident where an agent misapplied a component it had read, when CLAUDE.md band-aids accumulate (more than 3 per-project rules that could be generic), or when the same problem recurs across multiple projects.