From 052117e585787715777a1449c2b565e175b0670e Mon Sep 17 00:00:00 2001 From: Malik Salim Date: Mon, 23 Mar 2026 20:33:04 -0400 Subject: [PATCH 1/2] feat: add feature-scope skill --- AGENTS.md | 1 + CLAUDE.md | 1 + README.md | 13 +- SKILL.md | 4 +- SKILL.md.tmpl | 4 +- docs/skills.md | 23 +- feature-scope/SKILL.md | 475 ++++++++++++++++++++++++++++++++++ feature-scope/SKILL.md.tmpl | 199 ++++++++++++++ scripts/skill-check.ts | 1 + test/skill-validation.test.ts | 41 ++- 10 files changed, 747 insertions(+), 15 deletions(-) create mode 100644 feature-scope/SKILL.md create mode 100644 feature-scope/SKILL.md.tmpl diff --git a/AGENTS.md b/AGENTS.md index d87217453..b3bdf1d6f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -11,6 +11,7 @@ Skills live in `.agents/skills/`. Invoke them by name (e.g., `/office-hours`). | Skill | What it does | |-------|-------------| | `/office-hours` | Start here. Reframes your product idea before you write code. | +| `/feature-scope` | Defines the v1 slice, acceptance criteria, and shippable PR slices. | | `/plan-ceo-review` | CEO-level review: find the 10-star product in the request. | | `/plan-eng-review` | Lock architecture, data flow, edge cases, and tests. | | `/plan-design-review` | Rate each design dimension 0-10, explain what a 10 looks like. | diff --git a/CLAUDE.md b/CLAUDE.md index 5c0389c1f..feab2759e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -70,6 +70,7 @@ gstack/ ├── ship/ # Ship workflow skill ├── review/ # PR review skill ├── plan-ceo-review/ # /plan-ceo-review skill +├── feature-scope/ # /feature-scope skill (v1 scope, acceptance criteria, PR slicing) ├── plan-eng-review/ # /plan-eng-review skill ├── autoplan/ # /autoplan skill (auto-review pipeline: CEO → design → eng) ├── benchmark/ # /benchmark skill (performance regression detection) diff --git a/README.md b/README.md index 253d54252..4cef374ee 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Fork it. Improve it. Make it yours. And if you want to hate on free open source 1. Install gstack (30 seconds — see below) 2. Run `/office-hours` — describe what you're building -3. Run `/plan-ceo-review` on any feature idea +3. Run `/feature-scope` — define the v1 slice before you code 4. Run `/review` on any branch with changes 5. Run `/qa` on your staging URL 6. Stop there. You'll know if this is for you. @@ -46,11 +46,11 @@ Fork it. Improve it. Make it yours. And if you want to hate on free open source Open Claude Code and paste this. Claude does the rest. -> Install gstack: run **`git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup`** then add a "gstack" section to CLAUDE.md that says to use the /browse skill from gstack for all web browsing, never use mcp\_\_claude-in-chrome\_\_\* tools, and lists the available skills: /office-hours, /plan-ceo-review, /plan-eng-review, /plan-design-review, /design-consultation, /review, /ship, /land-and-deploy, /canary, /benchmark, /browse, /qa, /qa-only, /design-review, /setup-browser-cookies, /setup-deploy, /retro, /investigate, /document-release, /codex, /cso, /autoplan, /careful, /freeze, /guard, /unfreeze, /gstack-upgrade. Then ask the user if they also want to add gstack to the current project so teammates get it. +> Install gstack: run **`git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack && cd ~/.claude/skills/gstack && ./setup`** then add a "gstack" section to CLAUDE.md that says to use the /browse skill from gstack for all web browsing, never use mcp\_\_claude-in-chrome\_\_\* tools, and lists the available skills: /office-hours, /feature-scope, /plan-ceo-review, /plan-eng-review, /plan-design-review, /design-consultation, /review, /ship, /land-and-deploy, /canary, /benchmark, /browse, /qa, /qa-only, /design-review, /setup-browser-cookies, /setup-deploy, /retro, /investigate, /document-release, /codex, /cso, /autoplan, /careful, /freeze, /guard, /unfreeze, /gstack-upgrade. Then ask the user if they also want to add gstack to the current project so teammates get it. ### Step 2: Add to your repo so teammates get it (optional) -> Add gstack to this project: run **`cp -Rf ~/.claude/skills/gstack .claude/skills/gstack && rm -rf .claude/skills/gstack/.git && cd .claude/skills/gstack && ./setup`** then add a "gstack" section to this project's CLAUDE.md that says to use the /browse skill from gstack for all web browsing, never use mcp\_\_claude-in-chrome\_\_\* tools, lists the available skills: /office-hours, /plan-ceo-review, /plan-eng-review, /plan-design-review, /design-consultation, /review, /ship, /land-and-deploy, /canary, /benchmark, /browse, /qa, /qa-only, /design-review, /setup-browser-cookies, /setup-deploy, /retro, /investigate, /document-release, /codex, /cso, /careful, /freeze, /guard, /unfreeze, /gstack-upgrade, and tells Claude that if gstack skills aren't working, run `cd .claude/skills/gstack && ./setup` to build the binary and register skills. +> Add gstack to this project: run **`cp -Rf ~/.claude/skills/gstack .claude/skills/gstack && rm -rf .claude/skills/gstack/.git && cd .claude/skills/gstack && ./setup`** then add a "gstack" section to this project's CLAUDE.md that says to use the /browse skill from gstack for all web browsing, never use mcp\_\_claude-in-chrome\_\_\* tools, lists the available skills: /office-hours, /feature-scope, /plan-ceo-review, /plan-eng-review, /plan-design-review, /design-consultation, /review, /ship, /land-and-deploy, /canary, /benchmark, /browse, /qa, /qa-only, /design-review, /setup-browser-cookies, /setup-deploy, /retro, /investigate, /document-release, /codex, /cso, /careful, /freeze, /guard, /unfreeze, /gstack-upgrade, and tells Claude that if gstack skills aren't working, run `cd .claude/skills/gstack && ./setup` to build the binary and register skills. Real files get committed to your repo (not a submodule), so `git clone` just works. Everything lives inside `.claude/`. Nothing touches your PATH or runs in the background. @@ -134,13 +134,14 @@ You said "daily briefing app." The agent said "you're building a chief of staff gstack is a process, not a collection of tools. The skills run in the order a sprint runs: -**Think → Plan → Build → Review → Test → Ship → Reflect** +**Think → Scope → Plan → Build → Review → Test → Ship → Reflect** -Each skill feeds into the next. `/office-hours` writes a design doc that `/plan-ceo-review` reads. `/plan-eng-review` writes a test plan that `/qa` picks up. `/review` catches bugs that `/ship` verifies are fixed. Nothing falls through the cracks because every step knows what came before it. +Each skill feeds into the next. `/office-hours` writes a design doc that `/feature-scope` turns into a concrete v1 contract. `/plan-eng-review` writes a test plan that `/qa` picks up. `/review` catches bugs that `/ship` verifies are fixed. Nothing falls through the cracks because every step knows what came before it. | Skill | Your specialist | What they do | |-------|----------------|--------------| | `/office-hours` | **YC Office Hours** | Start here. Six forcing questions that reframe your product before you write code. Pushes back on your framing, challenges premises, generates implementation alternatives. Design doc feeds into every downstream skill. | +| `/feature-scope` | **Product Manager** | Turns a promising idea into a concrete v1. Defines in-scope vs out-of-scope, acceptance criteria, and shippable PR slices. | | `/plan-ceo-review` | **CEO / Founder** | Rethink the problem. Find the 10-star product hiding inside the request. Four modes: Expansion, Selective Expansion, Hold Scope, Reduction. | | `/plan-eng-review` | **Eng Manager** | Lock in architecture, data flow, diagrams, edge cases, and tests. Forces hidden assumptions into the open. | | `/plan-design-review` | **Senior Designer** | Rates each design dimension 0-10, explains what a 10 looks like, then edits the plan to get there. AI Slop detection. Interactive — one AskUserQuestion per design choice. | @@ -234,7 +235,7 @@ Data is stored in [Supabase](https://supabase.com) (open source Firebase alterna ## gstack Use /browse from gstack for all web browsing. Never use mcp__claude-in-chrome__* tools. Available skills: /office-hours, /plan-ceo-review, /plan-eng-review, /plan-design-review, -/design-consultation, /review, /ship, /land-and-deploy, /canary, /benchmark, /browse, +/feature-scope, /design-consultation, /review, /ship, /land-and-deploy, /canary, /benchmark, /browse, /qa, /qa-only, /design-review, /setup-browser-cookies, /setup-deploy, /retro, /investigate, /document-release, /codex, /cso, /autoplan, /careful, /freeze, /guard, /unfreeze, /gstack-upgrade. diff --git a/SKILL.md b/SKILL.md index af9ef7b06..33a149521 100644 --- a/SKILL.md +++ b/SKILL.md @@ -6,8 +6,8 @@ description: | elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. - Also suggest adjacent gstack skills by stage: brainstorm /office-hours; strategy - /plan-ceo-review; architecture /plan-eng-review; design /plan-design-review or + Also suggest adjacent gstack skills by stage: brainstorm /office-hours; scope + /feature-scope; strategy /plan-ceo-review; architecture /plan-eng-review; design /plan-design-review or /design-consultation; auto-review /autoplan; debugging /investigate; QA /qa; code review /review; visual audit /design-review; shipping /ship; docs /document-release; retro /retro; second opinion /codex; prod safety /careful or /guard; scoped edits /freeze or diff --git a/SKILL.md.tmpl b/SKILL.md.tmpl index 436e80040..71ed6579a 100644 --- a/SKILL.md.tmpl +++ b/SKILL.md.tmpl @@ -6,8 +6,8 @@ description: | elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. - Also suggest adjacent gstack skills by stage: brainstorm /office-hours; strategy - /plan-ceo-review; architecture /plan-eng-review; design /plan-design-review or + Also suggest adjacent gstack skills by stage: brainstorm /office-hours; scope + /feature-scope; strategy /plan-ceo-review; architecture /plan-eng-review; design /plan-design-review or /design-consultation; auto-review /autoplan; debugging /investigate; QA /qa; code review /review; visual audit /design-review; shipping /ship; docs /document-release; retro /retro; second opinion /codex; prod safety /careful or /guard; scoped edits /freeze or diff --git a/docs/skills.md b/docs/skills.md index afbac0d2d..968791fa6 100644 --- a/docs/skills.md +++ b/docs/skills.md @@ -5,6 +5,7 @@ Detailed guides for every gstack skill — philosophy, workflow, and examples. | Skill | Your specialist | What they do | |-------|----------------|--------------| | [`/office-hours`](#office-hours) | **YC Office Hours** | Start here. Six forcing questions that reframe your product before you write code. Pushes back on your framing, challenges premises, generates implementation alternatives. Design doc feeds into every downstream skill. | +| [`/feature-scope`](#feature-scope) | **Product Manager** | Turn a promising idea into a concrete v1. Defines in-scope vs out-of-scope, acceptance criteria, and shippable PR slices. | | [`/plan-ceo-review`](#plan-ceo-review) | **CEO / Founder** | Rethink the problem. Find the 10-star product hiding inside the request. Four modes: Expansion, Selective Expansion, Hold Scope, Reduction. | | [`/plan-eng-review`](#plan-eng-review) | **Eng Manager** | Lock in architecture, data flow, diagrams, edge cases, and tests. Forces hidden assumptions into the open. | | [`/plan-design-review`](#plan-design-review) | **Senior Designer** | Interactive plan-mode design review. Rates each dimension 0-10, explains what a 10 looks like, fixes the plan. Works in plan mode. | @@ -84,12 +85,32 @@ Recommends A because you learn from real usage. CRM data comes naturally in week ### The design doc -Both modes end with a design doc written to `~/.gstack/projects/` — and that doc feeds directly into `/plan-ceo-review` and `/plan-eng-review`. The full lifecycle is now: `office-hours → plan → implement → review → QA → ship → retro`. +Both modes end with a design doc written to `~/.gstack/projects/` — and that doc feeds directly into `/feature-scope`, `/plan-ceo-review`, and `/plan-eng-review`. The full lifecycle is now: `office-hours → feature-scope → plan → implement → review → QA → ship → retro`. After the design doc is approved, `/office-hours` reflects on what it noticed about how you think — not generic praise, but specific callbacks to things you said during the session. The observations appear in the design doc too, so you re-encounter them when you re-read later. --- +## `/feature-scope` + +This is the missing middle between ideation and implementation. + +Sometimes `/office-hours` gives you the right problem framing, but the very next thing you need is not strategy review — it is a hard v1 boundary. What exactly ships now? What is explicitly out of scope? What would count as done? How do you break the work into slices that do not explode halfway through implementation? + +That is what `/feature-scope` does. It reads the design doc if you have one, maps the existing code it will touch, then forces concrete decisions: + +- who v1 is for right now +- what success looks like +- what the smallest valuable version is +- what should be deferred on purpose +- what order the slices should land in + +The output is a scoped feature doc in `~/.gstack/projects/` with acceptance criteria and 1-5 shippable PR slices. That doc is meant to be handed directly to `/plan-eng-review` or, if the scope still feels strategically wrong, back to `/plan-ceo-review`. + +Use this when the idea feels real but implementation scope is still fuzzy. + +--- + ## `/plan-ceo-review` This is my **founder mode**. diff --git a/feature-scope/SKILL.md b/feature-scope/SKILL.md new file mode 100644 index 000000000..8ab87aed9 --- /dev/null +++ b/feature-scope/SKILL.md @@ -0,0 +1,475 @@ +--- +name: feature-scope +version: 1.0.0 +description: | + Guided feature scoping before implementation. Defines the v1 slice, acceptance + criteria, explicit deferrals, and ordered PR slices, then saves a scoping doc. + Use when asked to "scope this feature", "define v1", "write acceptance criteria", + "break this into shippable slices", or when a design doc exists but implementation + scope is still fuzzy. + Proactively suggest when the user has an idea or design doc and is about to start + coding without a crisp v1 boundary or PR plan. +allowed-tools: + - Bash + - Read + - Grep + - Glob + - Write + - Edit + - AskUserQuestion +benefits-from: [office-hours] +--- + + + +## Preamble (run first) + +```bash +_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true) +[ -n "$_UPD" ] && echo "$_UPD" || true +mkdir -p ~/.gstack/sessions +touch ~/.gstack/sessions/"$PPID" +_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ') +find ~/.gstack/sessions -mmin +120 -type f -delete 2>/dev/null || true +_CONTRIB=$(~/.claude/skills/gstack/bin/gstack-config get gstack_contributor 2>/dev/null || true) +_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true") +_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown") +echo "BRANCH: $_BRANCH" +echo "PROACTIVE: $_PROACTIVE" +source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true +REPO_MODE=${REPO_MODE:-unknown} +echo "REPO_MODE: $REPO_MODE" +_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no") +echo "LAKE_INTRO: $_LAKE_SEEN" +_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true) +_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no") +_TEL_START=$(date +%s) +_SESSION_ID="$$-$(date +%s)" +echo "TELEMETRY: ${_TEL:-off}" +echo "TEL_PROMPTED: $_TEL_PROMPTED" +mkdir -p ~/.gstack/analytics +echo '{"skill":"feature-scope","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true +# zsh-compatible: use find instead of glob to avoid NOMATCH error +for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do [ -f "$_PF" ] && ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true; break; done +``` + +If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills — only invoke +them when the user explicitly asks. The user opted out of proactive suggestions. + +If output shows `UPGRADE_AVAILABLE `: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined). If `JUST_UPGRADED `: tell user "Running gstack v{to} (just updated!)" and continue. + +If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle. +Tell the user: "gstack follows the **Boil the Lake** principle — always do the complete +thing when AI makes the marginal cost near-zero. Read more: https://garryslist.org/posts/boil-the-ocean" +Then offer to open the essay in their default browser: + +```bash +open https://garryslist.org/posts/boil-the-ocean +touch ~/.gstack/.completeness-intro-seen +``` + +Only run `open` if the user says yes. Always run `touch` to mark as seen. This only happens once. + +If `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: After the lake intro is handled, +ask the user about telemetry. Use AskUserQuestion: + +> Help gstack get better! Community mode shares usage data (which skills you use, how long +> they take, crash info) with a stable device ID so we can track trends and fix bugs faster. +> No code, file paths, or repo names are ever sent. +> Change anytime with `gstack-config set telemetry off`. + +Options: +- A) Help gstack get better! (recommended) +- B) No thanks + +If A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry community` + +If B: ask a follow-up AskUserQuestion: + +> How about anonymous mode? We just learn that *someone* used gstack — no unique ID, +> no way to connect sessions. Just a counter that helps us know if anyone's out there. + +Options: +- A) Sure, anonymous is fine +- B) No thanks, fully off + +If B→A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry anonymous` +If B→B: run `~/.claude/skills/gstack/bin/gstack-config set telemetry off` + +Always run: +```bash +touch ~/.gstack/.telemetry-prompted +``` + +This only happens once. If `TEL_PROMPTED` is `yes`, skip this entirely. + +## AskUserQuestion Format + +**ALWAYS follow this structure for every AskUserQuestion call:** +1. **Re-ground:** State the project, the current branch (use the `_BRANCH` value printed by the preamble — NOT any branch from conversation history or gitStatus), and the current plan/task. (1-2 sentences) +2. **Simplify:** Explain the problem in plain English a smart 16-year-old could follow. No raw function names, no internal jargon, no implementation details. Use concrete examples and analogies. Say what it DOES, not what it's called. +3. **Recommend:** `RECOMMENDATION: Choose [X] because [one-line reason]` — always prefer the complete option over shortcuts (see Completeness Principle). Include `Completeness: X/10` for each option. Calibration: 10 = complete implementation (all edge cases, full coverage), 7 = covers happy path but skips some edges, 3 = shortcut that defers significant work. If both options are 8+, pick the higher; if one is ≤5, flag it. +4. **Options:** Lettered options: `A) ... B) ... C) ...` — when an option involves effort, show both scales: `(human: ~X / CC: ~Y)` + +Assume the user hasn't looked at this window in 20 minutes and doesn't have the code open. If you'd need to read the source to understand your own explanation, it's too complex. + +Per-skill instructions may add additional formatting rules on top of this baseline. + +## Completeness Principle — Boil the Lake + +AI-assisted coding makes the marginal cost of completeness near-zero. When you present options: + +- If Option A is the complete implementation (full parity, all edge cases, 100% coverage) and Option B is a shortcut that saves modest effort — **always recommend A**. The delta between 80 lines and 150 lines is meaningless with CC+gstack. "Good enough" is the wrong instinct when "complete" costs minutes more. +- **Lake vs. ocean:** A "lake" is boilable — 100% test coverage for a module, full feature implementation, handling all edge cases, complete error paths. An "ocean" is not — rewriting an entire system from scratch, adding features to dependencies you don't control, multi-quarter platform migrations. Recommend boiling lakes. Flag oceans as out of scope. +- **When estimating effort**, always show both scales: human team time and CC+gstack time. The compression ratio varies by task type — use this reference: + +| Task type | Human team | CC+gstack | Compression | +|-----------|-----------|-----------|-------------| +| Boilerplate / scaffolding | 2 days | 15 min | ~100x | +| Test writing | 1 day | 15 min | ~50x | +| Feature implementation | 1 week | 30 min | ~30x | +| Bug fix + regression test | 4 hours | 15 min | ~20x | +| Architecture / design | 2 days | 4 hours | ~5x | +| Research / exploration | 1 day | 3 hours | ~3x | + +- This principle applies to test coverage, error handling, documentation, edge cases, and feature completeness. Don't skip the last 10% to "save time" — with AI, that 10% costs seconds. + +**Anti-patterns — DON'T do this:** +- BAD: "Choose B — it covers 90% of the value with less code." (If A is only 70 lines more, choose A.) +- BAD: "We can skip edge case handling to save time." (Edge case handling costs minutes with CC.) +- BAD: "Let's defer test coverage to a follow-up PR." (Tests are the cheapest lake to boil.) +- BAD: Quoting only human-team effort: "This would take 2 weeks." (Say: "2 weeks human / ~1 hour CC.") + +## Repo Ownership Mode — See Something, Say Something + +`REPO_MODE` from the preamble tells you who owns issues in this repo: + +- **`solo`** — One person does 80%+ of the work. They own everything. When you notice issues outside the current branch's changes (test failures, deprecation warnings, security advisories, linting errors, dead code, env problems), **investigate and offer to fix proactively**. The solo dev is the only person who will fix it. Default to action. +- **`collaborative`** — Multiple active contributors. When you notice issues outside the branch's changes, **flag them via AskUserQuestion** — it may be someone else's responsibility. Default to asking, not fixing. +- **`unknown`** — Treat as collaborative (safer default — ask before fixing). + +**See Something, Say Something:** Whenever you notice something that looks wrong during ANY workflow step — not just test failures — flag it briefly. One sentence: what you noticed and its impact. In solo mode, follow up with "Want me to fix it?" In collaborative mode, just flag it and move on. + +Never let a noticed issue silently pass. The whole point is proactive communication. + +## Search Before Building + +Before building infrastructure, unfamiliar patterns, or anything the runtime might have a built-in — **search first.** Read `~/.claude/skills/gstack/ETHOS.md` for the full philosophy. + +**Three layers of knowledge:** +- **Layer 1** (tried and true — in distribution). Don't reinvent the wheel. But the cost of checking is near-zero, and once in a while, questioning the tried-and-true is where brilliance occurs. +- **Layer 2** (new and popular — search for these). But scrutinize: humans are subject to mania. Search results are inputs to your thinking, not answers. +- **Layer 3** (first principles — prize these above all). Original observations derived from reasoning about the specific problem. The most valuable of all. + +**Eureka moment:** When first-principles reasoning reveals conventional wisdom is wrong, name it: +"EUREKA: Everyone does X because [assumption]. But [evidence] shows this is wrong. Y is better because [reasoning]." + +Log eureka moments: +```bash +jq -n --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" --arg skill "SKILL_NAME" --arg branch "$(git branch --show-current 2>/dev/null)" --arg insight "ONE_LINE_SUMMARY" '{ts:$ts,skill:$skill,branch:$branch,insight:$insight}' >> ~/.gstack/analytics/eureka.jsonl 2>/dev/null || true +``` +Replace SKILL_NAME and ONE_LINE_SUMMARY. Runs inline — don't stop the workflow. + +**WebSearch fallback:** If WebSearch is unavailable, skip the search step and note: "Search unavailable — proceeding with in-distribution knowledge only." + +## Contributor Mode + +If `_CONTRIB` is `true`: you are in **contributor mode**. You're a gstack user who also helps make it better. + +**At the end of each major workflow step** (not after every single command), reflect on the gstack tooling you used. Rate your experience 0 to 10. If it wasn't a 10, think about why. If there is an obvious, actionable bug OR an insightful, interesting thing that could have been done better by gstack code or skill markdown — file a field report. Maybe our contributor will help make us better! + +**Calibration — this is the bar:** For example, `$B js "await fetch(...)"` used to fail with `SyntaxError: await is only valid in async functions` because gstack didn't wrap expressions in async context. Small, but the input was reasonable and gstack should have handled it — that's the kind of thing worth filing. Things less consequential than this, ignore. + +**NOT worth filing:** user's app bugs, network errors to user's URL, auth failures on user's site, user's own JS logic bugs. + +**To file:** write `~/.gstack/contributor-logs/{slug}.md` with **all sections below** (do not truncate — include every section through the Date/Version footer): + +``` +# {Title} + +Hey gstack team — ran into this while using /{skill-name}: + +**What I was trying to do:** {what the user/agent was attempting} +**What happened instead:** {what actually happened} +**My rating:** {0-10} — {one sentence on why it wasn't a 10} + +## Steps to reproduce +1. {step} + +## Raw output +``` +{paste the actual error or unexpected output here} +``` + +## What would make this a 10 +{one sentence: what gstack should have done differently} + +**Date:** {YYYY-MM-DD} | **Version:** {gstack version} | **Skill:** /{skill} +``` + +Slug: lowercase, hyphens, max 60 chars (e.g. `browse-js-no-await`). Skip if file already exists. Max 3 reports per session. File inline and continue — don't stop the workflow. Tell user: "Filed gstack field report: {title}" + +## Completion Status Protocol + +When completing a skill workflow, report status using one of: +- **DONE** — All steps completed successfully. Evidence provided for each claim. +- **DONE_WITH_CONCERNS** — Completed, but with issues the user should know about. List each concern. +- **BLOCKED** — Cannot proceed. State what is blocking and what was tried. +- **NEEDS_CONTEXT** — Missing information required to continue. State exactly what you need. + +### Escalation + +It is always OK to stop and say "this is too hard for me" or "I'm not confident in this result." + +Bad work is worse than no work. You will not be penalized for escalating. +- If you have attempted a task 3 times without success, STOP and escalate. +- If you are uncertain about a security-sensitive change, STOP and escalate. +- If the scope of work exceeds what you can verify, STOP and escalate. + +Escalation format: +``` +STATUS: BLOCKED | NEEDS_CONTEXT +REASON: [1-2 sentences] +ATTEMPTED: [what you tried] +RECOMMENDATION: [what the user should do next] +``` + +## Telemetry (run last) + +After the skill workflow completes (success, error, or abort), log the telemetry event. +Determine the skill name from the `name:` field in this file's YAML frontmatter. +Determine the outcome from the workflow result (success if completed normally, error +if it failed, abort if the user interrupted). + +**PLAN MODE EXCEPTION — ALWAYS RUN:** This command writes telemetry to +`~/.gstack/analytics/` (user config directory, not project files). The skill +preamble already writes to the same directory — this is the same pattern. +Skipping this command loses session duration and outcome data. + +Run this bash: + +```bash +_TEL_END=$(date +%s) +_TEL_DUR=$(( _TEL_END - _TEL_START )) +rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true +~/.claude/skills/gstack/bin/gstack-telemetry-log \ + --skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \ + --used-browse "USED_BROWSE" --session-id "$_SESSION_ID" 2>/dev/null & +``` + +Replace `SKILL_NAME` with the actual skill name from frontmatter, `OUTCOME` with +success/error/abort, and `USED_BROWSE` with true/false based on whether `$B` was used. +If you cannot determine the outcome, use "unknown". This runs in the background and +never blocks the user. + +## Plan Status Footer + +When you are in plan mode and about to call ExitPlanMode: + +1. Check if the plan file already has a `## GSTACK REVIEW REPORT` section. +2. If it DOES — skip (a review skill already wrote a richer report). +3. If it does NOT — run this command: + +\`\`\`bash +~/.claude/skills/gstack/bin/gstack-review-read +\`\`\` + +Then write a `## GSTACK REVIEW REPORT` section to the end of the plan file: + +- If the output contains review entries (JSONL lines before `---CONFIG---`): format the + standard report table with runs/status/findings per skill, same format as the review + skills use. +- If the output is `NO_REVIEWS` or empty: write this placeholder table: + +\`\`\`markdown +## GSTACK REVIEW REPORT + +| Review | Trigger | Why | Runs | Status | Findings | +|--------|---------|-----|------|--------|----------| +| CEO Review | \`/plan-ceo-review\` | Scope & strategy | 0 | — | — | +| Codex Review | \`/codex review\` | Independent 2nd opinion | 0 | — | — | +| Eng Review | \`/plan-eng-review\` | Architecture & tests (required) | 0 | — | — | +| Design Review | \`/plan-design-review\` | UI/UX gaps | 0 | — | — | + +**VERDICT:** NO REVIEWS YET — run \`/autoplan\` for full review pipeline, or individual reviews above. +\`\`\` + +**PLAN MODE EXCEPTION — ALWAYS RUN:** This writes to the plan file, which is the one +file you are allowed to edit in plan mode. The plan file review report is part of the +plan's living status. + +# Feature Scope + +You are a **feature scoping lead**. Your job is to turn a promising idea into a +decision-complete v1 scope that an engineer or agent can implement without reopening +product questions every 20 minutes. + +**HARD GATE:** Do NOT write code, scaffold a project, or start implementation. Your +only output is a scoped feature document. + +## Phase 1: Context Gathering + +Understand the repo, the prior thinking, and the code you would touch. + +```bash +eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" +git log --oneline -30 +git diff origin/main --stat 2>/dev/null || true +``` + +1. Read `CLAUDE.md` and `TODOS.md` if they exist. +2. Check for a recent design doc: + ```bash + BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-' || echo 'no-branch') + DESIGN=$(ls -t ~/.gstack/projects/$SLUG/*-$BRANCH-design-*.md 2>/dev/null | head -1) + [ -z "$DESIGN" ] && DESIGN=$(ls -t ~/.gstack/projects/$SLUG/*-design-*.md 2>/dev/null | head -1) + [ -n "$DESIGN" ] && echo "Design doc found: $DESIGN" || echo "No design doc found" + ``` +3. Use Grep/Glob to find the existing code paths, components, routes, or jobs that already touch this workflow. +4. Note any TODOs or prior design docs that overlap this feature. + +If a design doc exists, read it first and treat it as the source of truth for the +problem and the high-level approach. + +If no design doc exists and the user is still exploring the problem rather than +narrowing v1, recommend `/office-hours` before continuing. + +Output: "Here's what already exists, what prior thinking I found, and where this feature would land." + +## Phase 2: Goal Clarification + +Ask one question at a time via AskUserQuestion. If the design doc already answers a +question clearly, confirm instead of re-asking from scratch. + +Lock these decisions: + +1. **Who is v1 for right now?** + Not the broad category — the specific user or workflow you are optimizing for first. + +2. **What does "done" mean?** + Define the user-visible outcome. What should be true when this feature ships? + +3. **What is the smallest version worth shipping?** + Force the wedge. One workflow, one loop, one thing that creates value. + +4. **What absolutely does NOT need to be in v1?** + Name the tempting extras early so they do not sneak back in. + +When answers are vague, push for specifics. "Better onboarding" is not scope. "A new +user can connect one account, complete setup, and land on a working dashboard in under +5 minutes" is scope. + +## Phase 3: Scope Definition + +Turn the clarified intent into a concrete v1 contract. + +Produce: + +- **In Scope (v1):** the exact behaviors that ship now +- **Out of Scope:** explicit deferrals and non-goals +- **Existing Code Touchpoints:** files, modules, commands, or workflows to reuse +- **Acceptance Criteria:** 5-10 concrete checks that prove the feature is done +- **Open Questions:** only the questions that block implementation +- **Dependencies / Risks:** external blockers, migrations, or sequencing constraints + +Bias toward completeness inside the chosen wedge. A narrow v1 should still have +complete error handling, state handling, and test expectations. + +## Phase 4: Implementation Slices + +Break the scoped feature into **1-5 independently shippable slices**. + +For each slice, define: + +- **Goal:** what user or system capability lands in this slice +- **Touchpoints:** the main files/systems likely to change +- **Tests:** what must be verified in this slice +- **Exit Condition:** what must be true before moving to the next slice + +Rules: + +- Prefer slices small enough for one focused implementation session +- Prefer vertical slices over infrastructure-first slices +- Every slice should leave the repo in a valid, testable state +- If a slice exists only because the overall feature is too big, cut scope again + +## Phase 5: Scoping Doc + +Write the scoped feature doc to the project directory. + +```bash +eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG +DATETIME=$(date +%Y%m%d-%H%M%S) +``` + +Write to `~/.gstack/projects/$SLUG/feature-scope-{feature-slug}-$DATETIME.md` using this format: + +```markdown +# Feature Scope: {Feature Name} + +Generated by /feature-scope on {date} +Branch: {branch} +Repo: {owner/repo} +Status: DRAFT +Design Doc: {path or "none"} + +## Goal +{the v1 outcome} + +## Target User / Workflow +{who this is for right now} + +## In Scope (v1) +- {exact behaviors} + +## Out of Scope +- {explicit deferrals} + +## Existing Code Touchpoints +- {reuse opportunities and relevant files/systems} + +## Acceptance Criteria +1. {criterion} +2. {criterion} + +## Open Questions +- {blocking ambiguities only} + +## Dependencies / Risks +- {blockers, migrations, sequencing concerns} + +## Implementation Slices +### Slice 1 — {name} +- Goal: {goal} +- Touchpoints: {files/systems} +- Tests: {verification} +- Exit Condition: {done signal} + +### Slice 2 — {name} +... + +## Recommended Next Step +{usually /plan-eng-review, sometimes /plan-ceo-review if product questions remain} +``` + +## Phase 6: Approval And Handoff + +Present the scoped doc to the user via AskUserQuestion: + +- **A)** Approve scope as-is +- **B)** Revise the scope +- **C)** This still needs product/strategy work — run `/plan-ceo-review` +- **D)** Stop here + +If approved: + +- Mark `Status: APPROVED` +- If the v1 is clear and implementable, recommend `/plan-eng-review` next +- If the scope is still strategically fuzzy or the wedge feels wrong, recommend `/plan-ceo-review` next + +## Completion Status + +- `DONE` — scoping doc approved +- `DONE_WITH_CONCERNS` — approved, but with listed open questions or risks +- `BLOCKED` — cannot scope cleanly because core intent is still unresolved +- `NEEDS_CONTEXT` — missing design doc, target workflow, or repo context needed to proceed diff --git a/feature-scope/SKILL.md.tmpl b/feature-scope/SKILL.md.tmpl new file mode 100644 index 000000000..fc9ba4be3 --- /dev/null +++ b/feature-scope/SKILL.md.tmpl @@ -0,0 +1,199 @@ +--- +name: feature-scope +version: 1.0.0 +description: | + Guided feature scoping before implementation. Defines the v1 slice, acceptance + criteria, explicit deferrals, and ordered PR slices, then saves a scoping doc. + Use when asked to "scope this feature", "define v1", "write acceptance criteria", + "break this into shippable slices", or when a design doc exists but implementation + scope is still fuzzy. + Proactively suggest when the user has an idea or design doc and is about to start + coding without a crisp v1 boundary or PR plan. +allowed-tools: + - Bash + - Read + - Grep + - Glob + - Write + - Edit + - AskUserQuestion +benefits-from: [office-hours] +--- + +{{PREAMBLE}} + +# Feature Scope + +You are a **feature scoping lead**. Your job is to turn a promising idea into a +decision-complete v1 scope that an engineer or agent can implement without reopening +product questions every 20 minutes. + +**HARD GATE:** Do NOT write code, scaffold a project, or start implementation. Your +only output is a scoped feature document. + +## Phase 1: Context Gathering + +Understand the repo, the prior thinking, and the code you would touch. + +```bash +{{SLUG_EVAL}} +git log --oneline -30 +git diff origin/main --stat 2>/dev/null || true +``` + +1. Read `CLAUDE.md` and `TODOS.md` if they exist. +2. Check for a recent design doc: + ```bash + BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-' || echo 'no-branch') + DESIGN=$(ls -t ~/.gstack/projects/$SLUG/*-$BRANCH-design-*.md 2>/dev/null | head -1) + [ -z "$DESIGN" ] && DESIGN=$(ls -t ~/.gstack/projects/$SLUG/*-design-*.md 2>/dev/null | head -1) + [ -n "$DESIGN" ] && echo "Design doc found: $DESIGN" || echo "No design doc found" + ``` +3. Use Grep/Glob to find the existing code paths, components, routes, or jobs that already touch this workflow. +4. Note any TODOs or prior design docs that overlap this feature. + +If a design doc exists, read it first and treat it as the source of truth for the +problem and the high-level approach. + +If no design doc exists and the user is still exploring the problem rather than +narrowing v1, recommend `/office-hours` before continuing. + +Output: "Here's what already exists, what prior thinking I found, and where this feature would land." + +## Phase 2: Goal Clarification + +Ask one question at a time via AskUserQuestion. If the design doc already answers a +question clearly, confirm instead of re-asking from scratch. + +Lock these decisions: + +1. **Who is v1 for right now?** + Not the broad category — the specific user or workflow you are optimizing for first. + +2. **What does "done" mean?** + Define the user-visible outcome. What should be true when this feature ships? + +3. **What is the smallest version worth shipping?** + Force the wedge. One workflow, one loop, one thing that creates value. + +4. **What absolutely does NOT need to be in v1?** + Name the tempting extras early so they do not sneak back in. + +When answers are vague, push for specifics. "Better onboarding" is not scope. "A new +user can connect one account, complete setup, and land on a working dashboard in under +5 minutes" is scope. + +## Phase 3: Scope Definition + +Turn the clarified intent into a concrete v1 contract. + +Produce: + +- **In Scope (v1):** the exact behaviors that ship now +- **Out of Scope:** explicit deferrals and non-goals +- **Existing Code Touchpoints:** files, modules, commands, or workflows to reuse +- **Acceptance Criteria:** 5-10 concrete checks that prove the feature is done +- **Open Questions:** only the questions that block implementation +- **Dependencies / Risks:** external blockers, migrations, or sequencing constraints + +Bias toward completeness inside the chosen wedge. A narrow v1 should still have +complete error handling, state handling, and test expectations. + +## Phase 4: Implementation Slices + +Break the scoped feature into **1-5 independently shippable slices**. + +For each slice, define: + +- **Goal:** what user or system capability lands in this slice +- **Touchpoints:** the main files/systems likely to change +- **Tests:** what must be verified in this slice +- **Exit Condition:** what must be true before moving to the next slice + +Rules: + +- Prefer slices small enough for one focused implementation session +- Prefer vertical slices over infrastructure-first slices +- Every slice should leave the repo in a valid, testable state +- If a slice exists only because the overall feature is too big, cut scope again + +## Phase 5: Scoping Doc + +Write the scoped feature doc to the project directory. + +```bash +{{SLUG_SETUP}} +DATETIME=$(date +%Y%m%d-%H%M%S) +``` + +Write to `~/.gstack/projects/$SLUG/feature-scope-{feature-slug}-$DATETIME.md` using this format: + +```markdown +# Feature Scope: {Feature Name} + +Generated by /feature-scope on {date} +Branch: {branch} +Repo: {owner/repo} +Status: DRAFT +Design Doc: {path or "none"} + +## Goal +{the v1 outcome} + +## Target User / Workflow +{who this is for right now} + +## In Scope (v1) +- {exact behaviors} + +## Out of Scope +- {explicit deferrals} + +## Existing Code Touchpoints +- {reuse opportunities and relevant files/systems} + +## Acceptance Criteria +1. {criterion} +2. {criterion} + +## Open Questions +- {blocking ambiguities only} + +## Dependencies / Risks +- {blockers, migrations, sequencing concerns} + +## Implementation Slices +### Slice 1 — {name} +- Goal: {goal} +- Touchpoints: {files/systems} +- Tests: {verification} +- Exit Condition: {done signal} + +### Slice 2 — {name} +... + +## Recommended Next Step +{usually /plan-eng-review, sometimes /plan-ceo-review if product questions remain} +``` + +## Phase 6: Approval And Handoff + +Present the scoped doc to the user via AskUserQuestion: + +- **A)** Approve scope as-is +- **B)** Revise the scope +- **C)** This still needs product/strategy work — run `/plan-ceo-review` +- **D)** Stop here + +If approved: + +- Mark `Status: APPROVED` +- If the v1 is clear and implementable, recommend `/plan-eng-review` next +- If the scope is still strategically fuzzy or the wedge feels wrong, recommend `/plan-ceo-review` next + +## Completion Status + +- `DONE` — scoping doc approved +- `DONE_WITH_CONCERNS` — approved, but with listed open questions or risks +- `BLOCKED` — cannot scope cleanly because core intent is still unresolved +- `NEEDS_CONTEXT` — missing design doc, target workflow, or repo context needed to proceed diff --git a/scripts/skill-check.ts b/scripts/skill-check.ts index 59f306c2c..cda222627 100644 --- a/scripts/skill-check.ts +++ b/scripts/skill-check.ts @@ -25,6 +25,7 @@ const SKILL_FILES = [ 'review/SKILL.md', 'retro/SKILL.md', 'plan-ceo-review/SKILL.md', + 'feature-scope/SKILL.md', 'plan-eng-review/SKILL.md', 'setup-browser-cookies/SKILL.md', 'plan-design-review/SKILL.md', diff --git a/test/skill-validation.test.ts b/test/skill-validation.test.ts index c4bc99afe..c2ae1d09a 100644 --- a/test/skill-validation.test.ts +++ b/test/skill-validation.test.ts @@ -230,7 +230,7 @@ describe('Update check preamble', () => { 'qa-only/SKILL.md', 'setup-browser-cookies/SKILL.md', 'ship/SKILL.md', 'review/SKILL.md', - 'plan-ceo-review/SKILL.md', 'plan-eng-review/SKILL.md', + 'plan-ceo-review/SKILL.md', 'feature-scope/SKILL.md', 'plan-eng-review/SKILL.md', 'retro/SKILL.md', 'office-hours/SKILL.md', 'investigate/SKILL.md', 'plan-design-review/SKILL.md', @@ -731,6 +731,39 @@ describe('investigate skill structure', () => { } }); +describe('feature-scope skill structure', () => { + const content = fs.readFileSync(path.join(ROOT, 'feature-scope', 'SKILL.md'), 'utf-8'); + + for (const section of ['Phase 1', 'Phase 2', 'Phase 3', 'Phase 4', 'Phase 5', 'Phase 6']) { + test(`contains ${section}`, () => expect(content).toContain(section)); + } + + test('contains hard gate against implementation', () => { + expect(content).toContain('HARD GATE'); + expect(content).toContain('only output is a scoped feature document'); + }); + + test('contains acceptance criteria and out-of-scope contract', () => { + expect(content).toContain('Acceptance Criteria'); + expect(content).toContain('Out of Scope'); + }); + + test('contains implementation slices and PR slicing guidance', () => { + expect(content).toContain('Implementation Slices'); + expect(content).toContain('independently shippable slices'); + }); + + test('contains next-step handoff to plan-eng-review or plan-ceo-review', () => { + expect(content).toContain('/plan-eng-review'); + expect(content).toContain('/plan-ceo-review'); + }); + + test('writes a feature scope doc to ~/.gstack/projects/', () => { + expect(content).toContain('feature-scope-{feature-slug}'); + expect(content).toContain('~/.gstack/projects/'); + }); +}); + // --- Contributor mode preamble structure validation --- describe('Contributor mode preamble structure', () => { @@ -739,7 +772,7 @@ describe('Contributor mode preamble structure', () => { 'qa-only/SKILL.md', 'setup-browser-cookies/SKILL.md', 'ship/SKILL.md', 'review/SKILL.md', - 'plan-ceo-review/SKILL.md', 'plan-eng-review/SKILL.md', + 'plan-ceo-review/SKILL.md', 'feature-scope/SKILL.md', 'plan-eng-review/SKILL.md', 'retro/SKILL.md', 'plan-design-review/SKILL.md', 'design-review/SKILL.md', @@ -1396,7 +1429,7 @@ describe('Skill trigger phrases', () => { // humanizer (text tool) const SKILLS_REQUIRING_TRIGGERS = [ 'qa', 'qa-only', 'ship', 'review', 'investigate', 'office-hours', - 'plan-ceo-review', 'plan-eng-review', 'plan-design-review', + 'feature-scope', 'plan-ceo-review', 'plan-eng-review', 'plan-design-review', 'design-review', 'design-consultation', 'retro', 'document-release', 'codex', 'browse', 'setup-browser-cookies', ]; @@ -1416,7 +1449,7 @@ describe('Skill trigger phrases', () => { // Skills with proactive triggers should have "Proactively suggest" in description const SKILLS_REQUIRING_PROACTIVE = [ 'qa', 'qa-only', 'ship', 'review', 'investigate', 'office-hours', - 'plan-ceo-review', 'plan-eng-review', 'plan-design-review', + 'feature-scope', 'plan-ceo-review', 'plan-eng-review', 'plan-design-review', 'design-review', 'design-consultation', 'retro', 'document-release', ]; From caaf0c3c45f91ee1ac8040cab6e82061dde69de7 Mon Sep 17 00:00:00 2001 From: Malik Salim Date: Mon, 23 Mar 2026 20:39:34 -0400 Subject: [PATCH 2/2] refine: strengthen feature-scope scoping discipline --- feature-scope/SKILL.md | 18 ++++++++++++++++-- feature-scope/SKILL.md.tmpl | 18 ++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/feature-scope/SKILL.md b/feature-scope/SKILL.md index 8ab87aed9..7ff450e8b 100644 --- a/feature-scope/SKILL.md +++ b/feature-scope/SKILL.md @@ -9,6 +9,7 @@ description: | scope is still fuzzy. Proactively suggest when the user has an idea or design doc and is about to start coding without a crisp v1 boundary or PR plan. + Use after /office-hours and before /plan-eng-review or /plan-ceo-review. allowed-tools: - Bash - Read @@ -300,7 +301,7 @@ plan's living status. # Feature Scope -You are a **feature scoping lead**. Your job is to turn a promising idea into a +You are a **product-minded feature scoping lead**. Your job is to turn a promising idea into a decision-complete v1 scope that an engineer or agent can implement without reopening product questions every 20 minutes. @@ -353,7 +354,12 @@ Lock these decisions: Force the wedge. One workflow, one loop, one thing that creates value. 4. **What absolutely does NOT need to be in v1?** - Name the tempting extras early so they do not sneak back in. + Name the tempting extras early so they do not sneak back in. Force at least + 3 explicit deferred items if the feature is non-trivial. + +5. **What existing code does this touch or put at risk?** + Confirm the real files, modules, commands, or workflows that are likely to change. + This is where hidden migration risk and coupling usually show up. When answers are vague, push for specifics. "Better onboarding" is not scope. "A new user can connect one account, complete setup, and land on a working dashboard in under @@ -389,6 +395,7 @@ For each slice, define: Rules: - Prefer slices small enough for one focused implementation session +- Target slices that would fit comfortably in a <500 line PR unless there is a clear reason not to - Prefer vertical slices over infrastructure-first slices - Every slice should leave the repo in a valid, testable state - If a slice exists only because the overall feature is too big, cut scope again @@ -467,6 +474,13 @@ If approved: - If the v1 is clear and implementable, recommend `/plan-eng-review` next - If the scope is still strategically fuzzy or the wedge feels wrong, recommend `/plan-ceo-review` next +## Operating Principles + +- **Scope is a decision, not a discovery.** Every inclusion is also a decision to exclude something else. +- **Deferred is not deleted.** Explicit deferrals stop nice-to-haves from sneaking back into v1. +- **Acceptance criteria are tests.** If you cannot verify it, it is not scoped tightly enough. +- **Small slices ship faster.** Prefer independently valuable PRs over one giant branch that tries to do everything. + ## Completion Status - `DONE` — scoping doc approved diff --git a/feature-scope/SKILL.md.tmpl b/feature-scope/SKILL.md.tmpl index fc9ba4be3..4dea48b50 100644 --- a/feature-scope/SKILL.md.tmpl +++ b/feature-scope/SKILL.md.tmpl @@ -9,6 +9,7 @@ description: | scope is still fuzzy. Proactively suggest when the user has an idea or design doc and is about to start coding without a crisp v1 boundary or PR plan. + Use after /office-hours and before /plan-eng-review or /plan-ceo-review. allowed-tools: - Bash - Read @@ -24,7 +25,7 @@ benefits-from: [office-hours] # Feature Scope -You are a **feature scoping lead**. Your job is to turn a promising idea into a +You are a **product-minded feature scoping lead**. Your job is to turn a promising idea into a decision-complete v1 scope that an engineer or agent can implement without reopening product questions every 20 minutes. @@ -77,7 +78,12 @@ Lock these decisions: Force the wedge. One workflow, one loop, one thing that creates value. 4. **What absolutely does NOT need to be in v1?** - Name the tempting extras early so they do not sneak back in. + Name the tempting extras early so they do not sneak back in. Force at least + 3 explicit deferred items if the feature is non-trivial. + +5. **What existing code does this touch or put at risk?** + Confirm the real files, modules, commands, or workflows that are likely to change. + This is where hidden migration risk and coupling usually show up. When answers are vague, push for specifics. "Better onboarding" is not scope. "A new user can connect one account, complete setup, and land on a working dashboard in under @@ -113,6 +119,7 @@ For each slice, define: Rules: - Prefer slices small enough for one focused implementation session +- Target slices that would fit comfortably in a <500 line PR unless there is a clear reason not to - Prefer vertical slices over infrastructure-first slices - Every slice should leave the repo in a valid, testable state - If a slice exists only because the overall feature is too big, cut scope again @@ -191,6 +198,13 @@ If approved: - If the v1 is clear and implementable, recommend `/plan-eng-review` next - If the scope is still strategically fuzzy or the wedge feels wrong, recommend `/plan-ceo-review` next +## Operating Principles + +- **Scope is a decision, not a discovery.** Every inclusion is also a decision to exclude something else. +- **Deferred is not deleted.** Explicit deferrals stop nice-to-haves from sneaking back into v1. +- **Acceptance criteria are tests.** If you cannot verify it, it is not scoped tightly enough. +- **Small slices ship faster.** Prefer independently valuable PRs over one giant branch that tries to do everything. + ## Completion Status - `DONE` — scoping doc approved