--- name: scope-knife description: Forces a KEEP, CUT, or DEFER decision on every feature when scope is too large, no MVP consensus exists, or time is running out. Use for producing the minimum demo path and a next-steps task list. when_to_use: | Trigger when the user has too many ideas, the feature list is long, the team has no MVP consensus, time is running out, or any skill invocation fails because scope is undefined. Apply before any other skill if scope is ambiguous. Do not invoke when scope is already agreed and stable. version: 1.0 category: scoping tags: ['keep-cut-defer', 'mvp', 'demo-path'] dependencies: [] side_effects: ['plan'] triggers: ['scope is too big', 'too many features', 'no MVP consensus', 'time is running out', 'trim the scope', 'force a keep cut or defer decision', 'classify the features'] --- # scope-knife ## Input contract Required: - `repo_root`: path to current project root - `time_remaining_minutes`: integer (>= 0) - `demo_goal`: one-sentence string ("what should judges see at the end?") Optional: - `.hackathon/state/plan.json` (load if exists) - `features`: array (else inferred from repo scan) ## Execution ### 1. Scan repo Run `scripts/scan_repo.py ` to produce a feature inventory: | Status | Meaning | | ------------------ | ------------------------------------------- | | `implemented` | Code present, tests pass | | `half-implemented` | Code exists but incomplete or tests failing | | `unimplemented` | In README/plan only | | `broken` | Was working, now failing | ### 2. Compute pressure Based on `time_remaining_minutes`: | Time left | Minimum CUT rate | | --------- | --------------------------------- | | `> 6h` | warn if `< 30%` | | `3–6h` | enforce `>= 50%` | | `1–3h` | enforce `>= 70%` | | `< 1h` | enforce `>= 90%` (demo path only) | ### 3. Force classification For every feature: KEEP / CUT / DEFER. Hard rules: - Cannot mark all features as KEEP. - Features off the demo path default to CUT or DEFER. - If user insists all-KEEP, refuse, output pressure calc, ask again. ### 4. Demo path Linear sequence: `open URL → trigger core action → see result → understand value`. Every feature is written to `plan.json` with `passes: false`, `acceptance_criteria`, and an empty `evidence` array. This is the **default-FAIL contract**: no feature is considered done until an evaluator flips `passes` to `true` with machine-checkable evidence. Scope-knife itself never marks a feature passing. Acceptance criteria must describe **user-visible end-to-end behavior**, not an implementation detail. Example: "A user can open the app, sign up, save a note, and see it in the list." If a criterion can be checked only by reading source code, rewrite it as a behavior a judge could reproduce. ### 5. Task list Priorities: 1. **P0**: critical path (cannot demo without) 2. **P1**: demo polish 3. **P2**: nice-to-haves (skip if time runs out) ## Helper The skill ships scripts/classify.py (Python stdlib only). It reads a features inventory, applies the pressure table, and emits .hackathon/state/plan.json. The CLI now supports WSJF tie-breaking: python3 skills/scope-knife/scripts/classify.py --inventory features.json --demo-goal user_signup --time-remaining 180 --enable-wsjf When --enable-wsjf is set, every feature should carry WSJF inputs: - user_business_value (1-10, what it earns you in the demo) - time_criticality (1-10, will it hurt to ship without it?) - risk_reduction (1-10, does it de-risk the demo?) - job_size (1-10, person-hours to build) wsjf_score = (user_business_value + time_criticality + risk_reduction) / job_size Off-demo-path features are sorted by WSJF before KEEP vs CUT vs DEFER is decided, so high-WSJF non-path features can be DEFERred rather than CUT when time pressure lets you. ## Output contract Files written: - `.hackathon/state/plan.json` (matches `src/state/schemas/plan.schema.json`) - `.hackathon/artifacts/scope-knife-output.md` (human-readable) ## Acceptance criteria - [ ] Outputs KEEP/CUT/DEFER classification for every input feature. - [ ] Outputs a demo path with at most 5 steps. - [ ] Outputs a next-steps task list with priorities. - [ ] Refuses to mark all features as KEEP. - [ ] CUT rate at least meets the pressure threshold for `time_remaining_minutes`. - [ ] `plan.json` validates against `plan.schema.json`. - [ ] Every KEEP feature starts `passes: false` with at least one acceptance criterion. ## Failure modes | Mode | Behavior | | --------------------- | ------------------------------------------- | | Empty repo | Suggest running `idea-clarify` first | | Missing `demo_goal` | Ask once, refuse to guess | | User rejects all cuts | Output pressure calc, ask once more | | Schema mismatch | Fail loud with diff, do not silently coerce | ## Trigger phrases (for agent intent matching) - "I have too many ideas" - "the feature list is huge" - "no MVP consensus" - "what should we cut" - "running out of time" - "what should judges see"