Scope guard

From athola/claude-night-market · View interactive version

Scope guard is an AI agent skill from the GitHub repository athola/claude-night-market. Scores feature worthiness and enforces branch-size limits against overengineering. Use when evaluating whether a feature belongs in the current scope or branch.

How to use this skill

Skill file

The cheapest feature is the one you never build.

Scope-guard weighs each proposed feature against its value,

its cost, and the branch budget, so only what is earned ships.

Scope Guard

Prevents overengineering by both Claude and human during the

brainstorm, plan, and execute workflow. Forces explicit evaluation of

every proposed feature against business value, opportunity cost, and

branch constraints.

Philosophy

Core Belief: Not all features deserve implementation. Most ideas should be deferred to backlog until proven necessary.

Three Pillars:

  1. Worthiness Scoring - Quantify value vs cost before building
  2. Opportunity Cost - Compare against existing backlog
  3. Branch Discipline - Respect size thresholds

When To Use

When NOT To Use

Quick Start

1. Score the Feature

Use the Worthiness formula:

(Business Value + Time Criticality + Risk Reduction) / (Complexity + Token Cost + Scope Drift)

Verification: Run the command with --help flag to verify availability.

See decision-framework.md for details.

Thresholds:

2. Check Against Backlog

Compare against docs/backlog/queue.md:

3. Verify Branch Budget

Default: 3 major features per branch

If at capacity, must drop existing feature, split to new branch, or justify override.

4. Monitor Thresholds

Watch for Yellow/Red zones:

See branch-management.md for monitoring.

Core Workflow

Step 1: Calculate Worthiness (`scope-guard:worthiness-scored`)

Score each factor (1, 2, 3, 5, 8, 13):

Details: decision-framework.md

Step 2: Compare Against Backlog (`scope-guard:backlog-compared`)

  1. Check docs/backlog/queue.md for existing items
  2. Compare Worthiness Scores
  3. New item must beat top queued item OR fit within branch budget

Step 3: Check Branch Budget (`scope-guard:budget-checked`)

Count current features in branch. If at budget (default: 3), new feature requires:

Step 4: Document Decision (`scope-guard:decision-documented`)

Record outcome:

1. Create GitHub issue immediately - See

github-integration.md

Steps 1-3

2. Mark scope-guard:github-issue-created complete

3. Create Discussion - See

github-integration.md

Step 4.

Prompt: "Creating a Discussion with full reasoning context. [Y/n]"

Publishing is the default. If the user explicitly declines,

skip Discussion creation. If publishing fails, continue.

4. Optionally add to docs/backlog/queue.md with issue link

IMPORTANT: Deferral is NOT complete until a GitHub issue exists. This prevents context loss when branches are merged or abandoned.

Anti-Overengineering Rules

Key Principles:

See anti-overengineering.md for full rules and red flags.

Backlog Management

Directory Structure

**Verification:** Run the command with `--help` flag to verify availability.
docs/backlog/
├── queue.md              # Active ranked queue
└── archive/
    ├── ideas.md          # Deferred feature ideas
    ├── optimizations.md  # Deferred performance work
    ├── refactors.md      # Deferred cleanup
    └── abstractions.md   # Deferred patterns

Verification: Run the command with --help flag to verify availability.

Queue Rules

Adding to Queue

When deferring, add to docs/backlog/queue.md:

| Rank | Item | Worthiness | Added | Branch/Epic | Category |
|------|------|------------|-------|-------------|----------|
| 1 | [New item description] | 1.8 | 2025-12-08 | current-branch | idea |

Verification: Run the command with --help flag to verify availability.

Re-rank by Worthiness Score after adding.

Integration Points

With superpowers:brainstorming

At end of brainstorming, before documenting design:

  1. List all proposed features/components
  2. Score each with Worthiness formula
  3. Defer items scoring < 1.0 to backlog
  4. Check branch budget for remaining items

Self-invoke prompt: "Before documenting this design, let me evaluate the proposed features with scope-guard."

With superpowers:writing-plans

Before finalizing implementation plan:

  1. Verify all planned items have Worthiness >= 1.0, and that each in the

Discuss band carries its justification

  1. Compare against backlog queue
  2. Confirm within branch budget
  3. Document any deferrals

Self-invoke prompt: "Before finalizing this plan, let me verify scope with scope-guard."

During superpowers:executing-plans

Periodically during execution:

  1. Run threshold check: lines, files, commits, days
  2. Warn if Yellow zone reached
  3. Require justification if Red zone reached

Self-invoke prompt: "This branch has grown significantly. Let me check scope-guard thresholds."

Required Progress Items

When evaluating a feature, create these todos:

  1. scope-guard:worthiness-scored
  2. scope-guard:backlog-compared
  3. scope-guard:budget-checked
  4. scope-guard:github-issue-created (MANDATORY if deferring - blocks step 5)
  5. scope-guard:decision-documented

Note: Step 4 (github-issue-created) is REQUIRED when deferring items. You cannot mark decision-documented complete without first completing github-issue-created for deferrals.

Related Skills

Module Reference

Exit Criteria

formula `(Business Value + Time Criticality + Risk Reduction) /

(Complexity + Token Cost + Scope Drift)` and a disposition:

implement (>2.0), discuss (1.0-2.0), or defer (<1.0)

scope-guard:decision-documented is marked complete; the issue

URL is recorded in the todo

requires dropping an existing one, splitting to a new branch, or

an explicit written override with justification

15/25/30, days 3/7/7+); Yellow zone triggers a warning, Red zone

blocks without justification

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.