- Home
- Skills
- Code Quality & Review
- Guarding Scope — Stop Scope Creep, Gold Plating & AI Slop
Works with the AI Agents you already use
Guarding Scope — Stop Scope Creep, Gold Plating & AI Slop
Keeps changes inside the scope you asked for: scope contract, diff-vs-request audit, parking lot and deslop pass.
Free
Guarding Scope — Stop Scope Creep, Gold Plating & AI Slop
Example session with this skill installed
I asked the agent: "Order totals are off by a cent when a 15% coupon is applied. Fix the rounding, nothing else." This is the diff it produced. Run the scope audit before I merge.
--- a/src/pricing/discount.ts
+++ b/src/pricing/discount.ts
-export function applyDiscount(amt: number, pct: number): number {
- const off = Math.floor((amt * pct) / 100);
- return amt - off;
+export function applyDiscount(amountCents: number, percentOff: number): number {
+ try {
+ // calculate the discount
+ const discountCents = Math.round((amountCents * percentOff) / 100);
+ return amountCents - discountCents;
+ } catch (e) {
+ console.error(e);
+ return amountCents;
+ }
}
--- a/src/pricing/discount.test.ts
+++ b/src/pricing/discount.test.ts
- expect(applyDiscount(999, 15)).toBe(850);
+ expect(applyDiscount(999, 15)).toBe(849);
--- a/src/pricing/format.ts
+++ b/src/pricing/format.ts
-import { Money } from './money'
-export const formatCents = (c: number) => Money.fromCents(c).toString()
+import { Money } from "./money";
+export const formatCents = (c: number) => Money.fromCents(c).toString();
--- a/package.json
+++ b/package.json
+ "lodash.round": "^4.0.4",
--- a/README.md
+++ b/README.md
+## Pricing
+Discounts are rounded to the nearest cent.
- Read your context and instructions
- Compiled the guarding scope
Summary. One hunk is the fix: in discount.ts, Math.floor became Math.round. One test change is required and disclosed. Everything else fails the reversibility test: you could revert it and the rounding fix would still work, so it doesn't belong in this change. I'd revert four things and remove the slop that was added around the fix. This audit was done by reading the diff you pasted. Nothing was run, and no files were changed.
Scope contract (reconstructed from your request)
Goal: totals are correct to the cent with a 15% coupon
In scope: the rounding in applyDiscount, plus the test that asserts it
Out of scope: renames, formatting, dependencies, docs
Done when: applyDiscount(999, 15) returns 849 (999 × 15% = 149.85 → 150 off)
Audit, file by file
| File / hunk | Which part of the request needs it? | Verdict |
|---|---|---|
discount.ts: Math.floor → Math.round | The fix itself | Keep |
discount.ts: amt/pct/off renamed | None. The fix works with the old names | Revert. This is a drive-by rename on the same lines. |
discount.ts: try/catch with console.error returning the full amount | None. This is pure arithmetic that can't throw, and if it ever did, it would charge full price silently | Revert. This is defensive slop and an empty catch-and-log. |
discount.ts: // calculate the discount | None | Remove. It is a WHAT-comment. |
discount.test.ts: 850 → 849 | The old assertion encoded the bug (floor gave 149 off) | Keep, and disclose. Not a weakened test: it now asserts the requested behavior. |
format.ts: quotes and semicolons | None. This file isn't on the causal path | Revert. Formatting-only hunk. |
package.json: lodash.round | None. The code uses Math.round, so the dependency isn't even imported | Revert. Unneeded new dependency. |
README.md: "Pricing" section | None | Revert. An unrequested doc artifact. |
The diff that should remain
- const off = Math.floor((amt * pct) / 100);
+ const off = Math.round((amt * pct) / 100);
- expect(applyDiscount(999, 15)).toBe(850);
+ expect(applyDiscount(999, 15)).toBe(849);
Wrap-up
Beyond the literal request (required):
discount.test.ts: the existing expectation asserted the floor result (850). It now asserts 849, which is the behavior you asked for.
Out of scope — noticed, not done:
- Half-cent policy:
Math.roundrounds .5 up. If finance wants banker's rounding, that is a separate decision. - If the team wants descriptive parameter names in
discount.ts, that rename can be its own PR.
Next steps
- Revert the files above (
git checkout -- src/pricing/format.ts package.json README.md) and trimdiscount.tsto the one-line change. These commands were not run. - Run the pricing tests and confirm that
applyDiscount(999, 15)returns 849. - If the formatting change is wanted, apply it repo-wide in a separate formatting-only PR.
Connects securely to your tools. The creator never sees your data.
About this skill
Guarding Scope keeps an agent to the scope you asked for: no more, no less, nothing different. Every changed line must trace back to the request; anything else is either disclosed as required or listed as an idea, not done.
Problems it solves
- "Fix X" comes back with renamed variables, reformatted files and a refactor nobody asked for.
- New helpers, dependencies, config options and abstractions with a single caller.
- Unrequested README or summary files, WHAT-comments, debug logs.
- Existing tests weakened or rewritten until they pass.
- Silent narrowing: part of the request skipped, or a "better approach" swapped in.
How it works
- Five laws. You own the scope. Every line traces to the request. "Necessary" is not the same as "nice". Ideas go to a parking lot. The agent never narrows or transforms the request silently.
- A scope contract before any edit. Goal, in scope, out of scope, done when.
- Per-phase gates for design, implementation, bug fixes, tests, docs, review and agent loops.
- A mandatory audit before "done". It runs on the real
git diff: each file and hunk has to justify itself, unrequested new things and orphans are reverted, assertions are checked, temp files are deleted, then the report. - An expansion protocol for the times more really is needed: stop, classify, ask.
- A wrap-up format with "Beyond the literal request (required)" and "Out of scope — noticed, not done".
References
signals.md: observable scope-creep signals for each phase.slop.md: the AI-slop catalog and the deslop pass on added lines.sources.md: the definitions and the exact Anthropic, Google and community wording the skill is built on.
When it triggers. Every task that changes code, plans or specs. Also when you say "scope creep", "only what I asked", "minimal change", "deslop" or "gold plating".
Free and MIT-licensed. Part of the claude-skills-czl collection.
Source on GitHub: this skill · full repository
It audits and reverts only its own out-of-scope changes; pre-existing problems go to a parking lot instead of being fixed. The repo hook mentioned in SKILL.md (check-scope.py) is not bundled; the skill works without it. Judgment calls on borderline hunks follow the reversibility test and may need your confirmation.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 9 days ago
- Free with an Agensi account
- Software
Git
Permissions
File Scopes
- Reads files: yes. It reads the request, the touched files, the `git diff` and `git status`, and its own `learnings/` folder. - Edits files: only to undo its own out-of-scope changes during the audit: reverting unrequested hunks and files, removing slop it added and orphans its change created, and deleting temp files it created. It never touches lines it didn't add, and never cleans up pre-existing code (that goes to the parking lot). It may add a `learnings/YYYY-MM-DD-slug.md` entry when you correct a scope decision. - Shell commands: read-only git (`git diff`, `git status`), plus the reverts above. - Network access: none. - Git / GitHub: no commits, pushes or GitHub actions. When the repo uses commits, it keeps required preparatory changes separable, but it does not commit them. - Asks first: before any materially larger change, such as a new module, a dependency, a contract or API change, or roughly doubling the diff.
What's inside
Frequently Asked Questions
New in Code Quality & Review
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.