scope-creep-detector

Analyze git diffs against a stated intent to detect scope creep and unrelated changes.

135k|19.9k|Updated Apr 29, 2024
One-click install
npx skills add https://github.com/Shubhamsaboo/awesome-llm-apps --skill scope-creep-detector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scope-creep-detector
Source: https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/agent_skills/scope-creep-detector
Command: npx skills add https://github.com/Shubhamsaboo/awesome-llm-apps --skill scope-creep-detector

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Developers often open pull requests where a small fix has grown to touch unrelated files, dependencies, or subsystems, making reviews slow and risky. This Skill compares a git diff against a one-line intent and surfaces the paths, dependencies, API renames, config edits, oversized hunks, and formatting-only files that drifted away from the stated goal.

Core Features & Use Cases

  • Intent-based diff classification: Tokenizes the stated intent and changed paths to separate in-scope edits from likely creep.
  • Dependency and API rename detection: Parses requirements.txt, package.json, and pyproject.toml for new dependencies, and flags nearby removed and added public function or class declarations as renames.
  • Config, CI, and build awareness: Identifies edits to .github, Dockerfile, Makefile, and YAML or TOML files that often hide cross-cutting changes.
  • Use Case: Before opening a PR titled "fix null deref in parser", run the detector to confirm the diff only touches parser files and not CI config, lockfiles, or unrelated subsystems.

Quick Start

Ask the agent to run the scope creep detector on my staged changes against the intent of fixing the parser crash.

Frequently Asked Questions about scope-creep-detector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect scope creep in a git diff before opening a PR?

Run the scope_creep.py script with --repo pointing at your repository and --intent set to a one-line description of the change. The script returns a JSON report listing in-scope files, likely creep, new dependencies, API renames, and oversized hunks.

What signals does the scope creep detector use to flag unrelated changes?

It uses intent and path keyword overlap, subsystem counts, new dependencies in requirements.txt, package.json, and pyproject.toml, nearby public function or class renames, config and CI edits, oversized hunks above 80 changed lines, and formatting-only files.

Does the scope creep detector work on staged changes and branch diffs?

Yes. Use --staged to analyze the index, --base main to compare the current branch against main, or --diff with a file path or stdin to analyze a saved unified diff. The script never modifies the working tree, index, or commits.

Can the detector analyze diffs without making network calls?

Yes. The script uses only the Python 3.11 standard library, runs git locally, and never makes network requests. It reads diffs from the working tree, index, branch, or a file you provide.

When should I not use the scope creep detector?

Avoid it for formatting or linting tasks, writing commit messages, reviewing correctness or security inside an agreed scope, or measuring historical project growth across many commits. It is triage evidence, not proof of authorial intent.