[BLOCKING] Execute skill steps in declared order. NEVER skip, reorder, or merge steps without explicit user approval.
[BLOCKING] Before each step or sub-skill call, update task tracking: set in_progress when step starts, set completed when step ends.
[BLOCKING] Every completed/skipped step MUST include brief evidence or explicit skip reason.
[BLOCKING] If Task tools are unavailable, create and maintain an equivalent step-by-step plan tracker with the same status transitions.
Quick Summary
Goal: Transform raw ideas into a Definition-of-Ready PBI using BA best practices, hypothesis validation, and domain research — problem-validated, tech-agnostic, with testable acceptance criteria, estimates, and a Dependencies table — so a team can build it without re-asking what or why.
Summary:
- Purpose: turn a raw idea into a groomable, Definition-of-Ready PBI a team can build without re-asking what or why.
- Main steps — run in order, track EACH (AI keeps forgetting sub-phases): Phase 0 locate active plan → 0.5 applicability and large-idea decomposition gate → 1 idea intake + module detect → 2 domain research → 3 problem-hypothesis validation (GATE) → 4 BABOK elicitation → 5 BDD acceptance criteria → 5.1 AI-SDD M1-M5/M7 gate (BLOCKING) → 5.5 testability assessment → 6 prioritization + draft estimate → 7 validation interview (GATE, 3-5 Qs) → 7.5 RE-DERIVE estimate vs locked scope → 7.6 RELEASABLE OUTCOME gate → 8 PBI artifact generation.
- Two gates are NON-OPTIONAL: validate the problem hypothesis (Phase 3) before building, and run the 3-5 question validation interview (Phase 7) before writing the PBI — the user decides assumptions, scope, and dependencies, never the AI.
- Acceptance criteria are BDD GIVEN/WHEN/THEN (min 3: happy/edge/error) and MUST satisfy the AI-SDD M1-M5 and M7 gate (Phase 5.1): tech-agnostic Business Intent, logical FR-/BR- IDs first, observable single-interpretation ACs, rebuild-from-scratch validity, and every AC demoable as a business outcome (M7).
- Estimate twice: Phase 6 drafts story points/man-days against draft scope, then Phase 7.5 RE-DERIVES them against the locked post-interview scope (per SYNC:estimation-framework) — shipping stale Phase 6 numbers is the cardinal failure.
- The PBI frontmatter MUST carry
story_points, complexity, man_days_traditional, man_days_ai, and every PBI MUST include a complete Dependencies table (must-before/can-parallel/blocked-by/independent).
- Apply
isLargeIdea = multipleIndependentOutcomes || ambiguousOrResearchHeavy || releaseScopeDecomposition || oversizedPbiThatMustSplit before elicitation. When true, the owning PBI MUST carry the complete large_idea_decomposition block (outcome_slices, dependencies_order, non_goals, risks_evidence, and deferred_work_owner) and every slice must be independently releasable. Do not create docs/product-roadmap.md by default; use the standalone roadmap branch only for an explicit roadmap request. All-false ideas omit roadmap/milestone placeholders. An existing roadmap is read-only context.
- Every generated PBI MUST be one independently releasable, actor-facing business outcome with a complete demonstrable journey. Technical-only, foundation-only, migration-only, or setup-only work belongs as enabling tasks/dependencies under a releasable PBI, never as a standalone PBI. Read
.claude/skills/shared/releasable-pbi-contract.md.
- For UI PBIs, the outcome MUST include the page/view inventory, navigation map, component inventory, applicable states, and full-flow demo journey required for a mock app outcome; one isolated screen is insufficient.
Workflow:
| Phase |
Name |
Key Activity |
Output |
| 0 |
Locate Active Plan |
Load plan.md if in workflow |
Plan context |
| 0.5 |
Applicability / Decomposition (GATE) |
Evaluate large-idea signals and capture embedded slices when needed |
Embedded decomposition or ordinary isolated boundary |
| 1 |
Idea Intake |
Load artifact, detect module |
Context loaded |
| 2 |
Domain Research |
WebSearch market/competitors |
Research summary |
| 3 |
Problem Hypothesis (GATE) |
Validate problem exists |
Confirmed hypothesis |
| 4 |
Elicitation |
Apply BABOK techniques |
Requirements extracted |
| 5 |
Acceptance Criteria |
Write BDD scenarios |
GIVEN/WHEN/THEN |
| 5.1 |
AI-SDD Gate (M1-M5/M7) |
Tech-agnostic, FR/BR IDs first, demoable |
Mandate-compliant ACs |
| 5.5 |
Testability |
Test approach + per-AC outlines |
Test seed for /spec |
| 6 |
Prioritization |
RICE/MoSCoW + DRAFT Story Points |
Priority + draft est. |
| 7 |
Validation (GATE) |
Interview user (MANDATORY, 3-5Q) |
Assumptions confirmed |
| 7.5 |
Re-estimate |
RE-DERIVE vs LOCKED scope |
Final estimate |
| 7.6 |
Releasable Outcome (GATE) |
Confirm actor-facing outcome and full-flow surface |
Releasable outcome gate |
| 8 |
PBI Generation |
Create artifact |
PBI file saved |
Key Rules:
- NEVER skip hypothesis validation for new features
- Validation interview NOT optional — always ask 3-5 questions
- Use project domain-specific vocabulary when available
- MUST ATTENTION include
story_points, complexity, man_days_traditional, man_days_ai in PBI frontmatter
- Every PBI MUST ATTENTION include Dependencies table — types:
must-before | can-parallel | blocked-by | independent
- Every generated PBI MUST ATTENTION pass the Releasable Outcome Gate: one actor-facing outcome, complete entry-to-result journey, observable evidence, and no standalone technical/foundation scope.
- UI PBIs MUST ATTENTION define the full-flow surface: all required pages/views, navigation, reusable/domain/page components, applicable states, and a demo journey. A single screen is not a releasable UI PBI.
docs/specs/ — read existing TCs for related features; recommend test spec generation for new PBIs
docs/project-reference/domain-entities-reference.md — read when task involves business entities/models
.claude/skills/shared/product-roadmap-contract.md — read for applicability, the embedded decomposition schema, and the explicit roadmap handoff contract
.claude/skills/shared/releasable-pbi-contract.md — read for the PBI outcome and UI full-flow contract
Frontend/UI Context (if applicable)
- Component patterns:
docs/project-reference/frontend-patterns-reference.md
- Styling/BEM guide:
docs/project-reference/scss-styling-guide.md
- Design system tokens:
docs/project-reference/design-system/README.md
Greenfield Mode
Auto-detected: No discovered source directories and no manifest files found. Planning artifacts (docs/, plans/, .claude/) don't count.
When greenfield detected:
- Skip existing backlog refinement (no backlog exists)
- Enable DDD domain modeling: bounded contexts, aggregates, entities, value objects
- Capture constraints: team skills, expected scale, hosting preferences, budget — as input signals only
- Use WebSearch for market research + competitor analysis
- Output domain model artifact alongside PBI artifact
- Increase AskUserQuestion frequency — validate domain boundaries, entity relationships, business rules
- [CRITICAL] NEVER ask about tech stack during refinement. Tech stack decided after business analysis. Capture team skills + scale expectations as signals only.
Be skeptical. Every claim needs traced proof, confidence >80%.
Phase 0: Locate Active Plan (if in workflow)
If running in workflow (big-feature, greenfield-init, etc.):
- Glob
plans/*/plan.md sorted by modification time, or check TaskList for plan context
- Read
plan.md — project scope, goals, architecture decisions, domain model
- Read existing research —
{plan-dir}/research/*.md for business evaluation, domain analysis
- Read
docs/project-reference/domain-entities-reference.md (if exists) — existing domain entities
- Use plan context — don't re-ask questions answered in prior steps
Phase 0.5: Applicability and Large-Idea Decomposition Gate
Read .claude/skills/shared/product-roadmap-contract.md before eliciting PBI details. Evaluate the shared four-operand isLargeIdea rule:
- If any signal is true, capture the complete
large_idea_decomposition block in the owning PBI handoff. Include stable slice IDs, independently releasable outcomes, dependency order, non-goals with owners, risks/evidence with owners and statuses, and deferred-work owners. Ask the owner about material ambiguity; do not invent boundaries.
- If all signals are false, omit the decomposition block and all roadmap/milestone/scope-brief placeholders. Preserve the actor, outcome, in-scope behavior, non-goals, lifecycle terms, source-of-truth state, persistence expectation, and evidence directly in the PBI.
- If the user explicitly requests a product roadmap, route to
/product-roadmap; only that explicit branch may require docs/product-roadmap.md, a selected milestone, and a scope brief. An existing roadmap supplied by the user is read-only context.
- For a framework/library change, use the shared
FRAMEWORK-LIBRARY technical branch. For an isolated brownfield change, use the explicit EXEMPT branch. Neither branch creates a product roadmap.
- Use
AskUserQuestion for mismatches or material ambiguity. Do not infer whether “ready,” “published,” “delivered,” or equivalent means reviewable, sellable, visible, or accessible.
Phase 1: Idea Intake & Context Loading
- Read idea artifact from path or find by ID in
team-artifacts/ideas/
- Extract: problem statement, value proposition, target users, scope
- Check
module field; if absent, detect via keywords or prompt user
Phase 2: Domain Research
Trigger: New domain, unclear competitors, --research flag.
Skip: Internal tooling, well-understood domain, time-constrained.
Use WebSearch with domain terms. Summarize in max 3 bullets (market context, competitors, best practices).
Phase 3: Problem Hypothesis Validation
Validate hypothesis with user via AskUserQuestion. 42% of startups fail from no market need — validate before building.
Skip: --skip-hypothesis, validated hypothesis exists, bug fix/tech debt.
Problem Hypothesis Template
**We believe** [target users/persona]
**Experience** [specific problem]
**Because** [root cause]
**We'll know this is true when** [validation metric/evidence]
Value Hypothesis Template
**We believe** [feature/solution]
**Will deliver** [value/benefit]
**To** [target users]
**We'll know we're right when** [success metric]
Validation Process
- Draft hypothesis from idea content
- Use AskUserQuestion to validate:
- "Is this the core problem we're solving?"
- "Who exactly experiences this? How often?"
- "What evidence do we have this problem exists?"
- Validated → proceed to elicitation
- Invalidated → return idea for clarification
Phase 4: Requirements Elicitation (BABOK Core 5)
Think: What information gaps exist? Which technique fills them with least effort + highest confidence?
| Technique |
When to Choose |
What to Extract |
| Interviews |
Deep insights needed, stakeholder perspectives vary |
Stakeholder needs, pain points, constraints |
| Workshops |
Group consensus needed, multiple stakeholders |
Prioritized requirements, consensus decisions |
| Document Analysis |
Existing systems/processes, regulatory requirements |
As-is state, compliance requirements, gaps |
| Observation |
Users can't articulate needs, workflow unclear |
Actual vs stated workflow, hidden requirements |
| Prototyping |
Visual validation needed, UI/UX requirements vague |
Validated UI requirements, interaction patterns |
Technique notes:
- Interviews: Open-ended questions (why, how, what-if) → active listening → follow-up on unexpected → document verbatim quotes
- Workshops: Define agenda + 90 min timebox → neutral facilitator → round-robin/silent voting → document decisions AND dissent
- Observation: Shadow users → note workarounds/pain points → don't interrupt → ask clarifying questions afterward
Phase 5: Acceptance Criteria (BDD Format)
Write GIVEN/WHEN/THEN scenarios. Minimum 3: happy path, edge case, error case.
Scenario: {Descriptive title}
Given {precondition/context}
And {additional context}
When {action/trigger}
And {additional action}
Then {expected outcome}
And {additional verification}
| Practice |
Rule |
| Single trigger |
"When" clause has ONE action |
| 3 scenarios minimum |
Happy path, edge case, error case |
| No implementation details |
Behavior, not how |
| Testable outcomes |
"Then" must be verifiable |
| Stakeholder language |
No technical jargon |
Example Scenarios
Scenario: User creates invoice with valid data
Given user has permission to create invoices
And user is on the invoice creation page
When user submits invoice form with all required fields
Then invoice is created with status "Draft"
And invoice appears in user's invoice list
Scenario: Invoice creation fails with missing required field
Given user is on the invoice creation page
When user submits form without title
Then validation error "Title is required" is displayed
And invoice is not created
Scenario: Approver reviews a submitted invoice
Given approver has invoices awaiting approval
And an invoice has been submitted for approval
When approver opens the invoice review page
Then the invoice is visible with "Pending Review" status
Project Test Case Format
- Format:
TC-{FEATURE}-{NNN} (e.g., TC-GM-001)
- Evidence:
[Source: namespace/service/id] abstract-anchor format (never file:line)
- See
business-analyst skill for detailed patterns
Phase 5.1: AI-SDD Mandate Gate (M1-M5 and M7) — BLOCKING
See .claude/skills/shared/sdd-artifact-contract.md → "AI-SDD Mandates (M1-M7)" for BLOCKING criteria. The generated PBI MUST satisfy M1-M5 and M7 or be reworked before Phase 8 writes it:
- Separate intent from implementation (M1/M2): Keep a tech-agnostic Business Intent narrative (Description, Business Value, Acceptance Criteria) free of framework/product/language/design-pattern names and source identifiers. Put any optional implementation hints in a clearly separated Implementation Notes block, and put source references only in evidence carriers (
[Source: namespace/service/id], **Evidence**). Prose stays tech-agnostic per docs/project-reference/spec-principles.md §3.
- Logical Requirement ID first (M3): Assign each requirement a logical ID (
FR-/BR-) as the PRIMARY citation spine; keep [Source: namespace/service/id] abstract-anchor evidence (never physical code coordinates or repository-root paths — those live only in the provenance sidecar) as a SECONDARY carrier in a separate evidence column/section — KEEP it, never remove it.
- Testable, observable acceptance criteria (M4): Every acceptance criterion has ONE valid interpretation, observable completion states, named failure modes, and NO implementation details. Reject vague phrasing ("handle appropriately", "fast", "user-friendly").
- Rebuild-from-scratch validation (M5): Before emitting, confirm a competent team with zero codebase knowledge could re-implement identical business behavior on ANY stack from the PBI alone. If a reader would have to guess a rule, limit, role, or failure mode, add it as a clarification — never guess.
- Business-visibility (M7): Apply the demo test to each acceptance criterion's BODY: "what would a stakeholder SEE change?" — no answer → FAIL as TECHNICAL-ONLY and drop it from the PBI. Every
GIVEN = a state a user could arrange; every WHEN = an action a user could take; every THEN = an outcome a user could see. FAIL a WHEN that is an invocation (a handler runs, a consumer receives, a job fires, data syncs) or a THEN asserting schema/type/nullability/call-count. Judge the BODY, never the AC's title or ID. Never derive the AC count from an architecture inventory (handlers, consumers, jobs) — that count moves when the system is re-architected though no business behavior changed, falsifying M5.
M1 governs vocabulary; M7 governs subject matter. A technical AC in impeccably tech-free prose satisfies M1 while violating M7 — "the system correctly synchronizes the record" names no framework and is still a technical case in a business costume. That gap is the most common way business specs rot. Ask what a user could SEE, not which words were used.
Phase 5.5: Testability Assessment
Use AskUserQuestion with 2-3 questions:
"Which testing approach fits this PBI?"
- TDD-first: Write test specs before implementation (Recommended for complex features)
- Implement-first: Build feature, then create test specs
- Parallel: Spec and implement simultaneously
"What test levels are needed?"
- Integration tests only (Recommended for backend CQRS)
- Integration + E2E
- Unit + Integration + E2E
For EACH acceptance criterion, generate corresponding test case outline:
| AC |
Test Outline |
Priority |
| AC-1 |
TC: Create invoice with valid data → verify persisted |
P0 |
| AC-2 |
TC: Create invoice without title → verify validation error |
P1 |
Seed for /spec [mode=tests] if user chooses TDD-first. Document in PBI under ## Testability Assessment.
Phase 6: Prioritization & Estimation
Apply RICE score or MoSCoW for priority. Estimate using Story Points (Modified Fibonacci 1-21).
Quick RICE Score
Score = (Reach x Impact x Confidence) / Effort
Reach: Users affected per quarter (100, 500, 1000+)
Impact: 0.25 (minimal) | 0.5 (low) | 1 (medium) | 2 (high) | 3 (massive)
Confidence: 0.5 (low) | 0.8 (medium) | 1.0 (high)
Effort: Story points (1, 2, 3, 5, 8, 13, 21)
MoSCoW Categories
| Category |
Meaning |
Action |
| Must Have |
Critical, non-negotiable |
Include in MVP |
| Should Have |
Important but not vital |
Plan for release |
| Could Have |
Nice to have, low effort |
If time permits |
| Won't Have |
Out of scope this cycle |
Document for future |
Phase 7: Validation Interview (MANDATORY)
Generate 3-5 questions covering assumptions, scope, dependencies, edge cases. Use AskUserQuestion. Document in PBI. NOT optional.
| Category |
Example Question |
| Assumptions |
"We assume X is true. Correct?" |
| Scope |
"Should Y be included or explicitly excluded?" |
| Dependencies |
"This requires Z. Is that available?" |
| Edge Cases |
"What happens when data is empty/null?" |
| Business Impact |
"Will this affect existing reports/workflows?" |
| Entities |
"Create new entity or extend existing X?" |
| Prod Readiness |
"Does this feature need linting, error handling, loading, or Docker setup?" |
| Authorization |
"Who can perform this action? What roles/permissions are needed?" |
| Seed Data |
"Does this feature need reference/lookup data to function?" |
| Data Migration |
"Does this change entity schema? Is data transformation needed?" |
- Generate 3-5 questions from assumptions, scope, dependencies
- Use
AskUserQuestion to interview
- Document in PBI under
## Validation Summary
- Update PBI based on answers
Validation Output Format
## Validation Summary
**Validated:** {date}
### Confirmed Decisions
- {decision}: {user choice}
### Assumptions Confirmed
- {assumption}: Confirmed/Modified
### Open Items
- [ ] {follow-up items}
Cross-Cutting & Production Readiness
Capture in PBI template sections: Production Readiness Concerns, Authorization & Access Control, Seed Data, Data Migration.
Phase 7.5: Re-evaluate Estimation (MANDATORY — runs after Validation Interview)
Why this phase exists: Phase 6 estimation runs against a draft scope. Phase 7 (Validation Interview) and Cross-Cutting capture often resolve unknowns, add constraints, or trim/expand scope. The numbers in story_points, complexity, man_days_traditional, man_days_ai MUST be re-derived against the locked scope BEFORE Phase 8 writes them into the PBI frontmatter. Estimating once at draft and forgetting is the #1 source of estimation drift in PBIs.
Inputs (locked by end of Phase 7)
- Confirmed assumptions, scope inclusions/exclusions
- Authorization, seed data, migration, prod-readiness decisions
- Newly discovered dependencies or edge cases
- Any rescoping the user requested during validation
Re-derive (per SYNC:estimation-framework)
- Walk the locked scope acceptance criteria + cross-cutting concerns; assign hours per slice.
bottom_up_hours = Σ slice_hours (use the SP table mapping in Phase 6, not eyeballing).
likely_days = ceil(bottom_up_hours / 6) × productivity factor for the team/AI mode.
- Recompute
risk_margin_pct based on remaining unknowns AFTER Phase 7 (margin should usually shrink because validation removed unknowns; rises only if new risks surfaced).
- Recompute
min-max range from the new likely_days ± margin.
- Re-pick the closest Fibonacci
story_points and complexity bucket from the re-derived likely_days.
Compare against Phase 6 draft estimate
Compute delta_pct = (new_likely_days - draft_likely_days) / draft_likely_days × 100.
| Delta |
Action |
|delta| ≤ 20% |
Keep draft estimate. Note reestimate_delta_pct: <signed> + reestimate_reason: "within tolerance, no change" in PBI frontmatter for transparency. |
|delta| > 20% |
UPDATE story_points, complexity, man_days_traditional, man_days_ai. Add reestimate_delta_pct: <signed> + 1-line reestimate_reason explaining what changed (e.g., "auth scope confirmed wider", "seed data dropped per validation"). |
|delta| > 50% |
UPDATE values AND flag SHOULD-RESCOPE. Surface to user via AskUserQuestion BEFORE Phase 8 writes the PBI: "Re-estimate is +/-X% vs original. Options: (a) accept new estimate as-is, (b) split into 2 PBIs, (c) trim scope back to original estimate, (d) defer." Record the user's decision in ## Validation Summary. |
Output
- Updated estimation values (carry into Phase 8 frontmatter)
- New frontmatter fields:
reestimate_delta_pct, reestimate_reason (always populate even when within tolerance — creates a paper trail for retrospective comparison against actual implementation time)
- If rescoped: updated acceptance criteria/scope sections reflecting the user's choice
Run this re-estimation phase against the locked scope — never skip it. A PBI that ships with stale Phase 6 estimates is the source of unreliable velocity data. The whole point is to make the post-validation numbers — not the pre-validation guesses — the ones the team commits to.
Phase 7.6: Releasable Outcome Gate (BLOCKING)
Read .claude/skills/shared/releasable-pbi-contract.md and evaluate the locked scope before writing the PBI. This gate prevents a technical work package from being disguised as a product backlog item.
The PBI is BLOCKED unless all of the following are true:
- A named primary actor can achieve one observable business outcome independently within the PBI boundary.
- The journey is complete: entry/context → action/input → validation or decision → success/result → resulting visible or persisted truth → exit or next action.
- Applicable authorization, persistence, refresh/duplicate-submit, loading, empty, error, and recovery behavior is explicit; use
N/A only with a reason.
- Technical-only, foundation-only, migration-only, and setup-only work is attached as enabling work to this outcome or explicitly excluded; it is never emitted as the PBI's sole outcome.
- For UI work, the PBI defines every required page/view, navigation path, common/domain/page component, applicable state, and full-flow demo journey. Do not reduce a multi-step outcome to one screen.
- The owner has approved any trade-off that changes the outcome, release boundary, or required surface.
If the scope fails this gate, ask the owner to reframe the outcome or attach the enabling work to a releasable PBI. Do not continue to Phase 8 with a “technical PBI” or an assumed UI flow.
Record the gate in the PBI inputs before generation:
## Releasable Outcome Gate
- Status: PASS | BLOCKED
- Actor and observable outcome: { ... }
- Full-flow journey: {entry → action → result → exit}
- Persistence/access/error/recovery coverage: { ... | N/A with reason}
- Technical-only work: {attached enabling tasks | none}
- UI surface: {page/view inventory + navigation + components + states | N/A — backend-only with reason}
- Evidence: {AC/test/demo/mockup references}
Phase 8: PBI Artifact Generation
Path: team-artifacts/pbis/{YYMMDD}-pbi-{slug}.md | ID Pattern: PBI-{YYMMDD}-{NNN}
Artifact Path (canonical convention) — Command /refine → base path team-artifacts/pbis/, role token ba, type pbi. General filename pattern: {YYMMDD}-{role}-{type}-{slug}.md → e.g. 260119-ba-pbi-invoice-approval.md. Slug = lowercased basename, non-alphanumeric → -, trimmed, max 50 chars.
PBI Template
---
id: PBI-{YYMMDD}-{NNN}
title: '{Brief descriptive title}'
module: '{ModuleName — detect from project-config.json modules[]}'
priority: Must Have | Should Have | Could Have | Won't Have
rank: { numeric 1-999, ascending — populated/updated by /prioritize during cross-PBI ranking; omit until prioritized }
story_points: 1 | 2 | 3 | 5 | 8 | 13 | 21
complexity: Low | Medium | High | Very High
man_days_traditional: '{ Xd (Yd code + Zd test) — from SP table }'
man_days_ai: '{ Xd (Yd code + Zd test) — from SP table with AI }'
status: draft | refined | ready | in_progress | done
rice_score: { calculated }
created: '{YYYY-MM-DD}'
source_idea: '{idea artifact path or ID}'
scope_mode: ORDINARY | DECOMPOSITION-EMBEDDED | EXPLICIT-ROADMAP | EXEMPT | FRAMEWORK-LIBRARY
large_idea_decomposition: {complete block when any isLargeIdea signal is true; omit when all signals are false}
---
# {PBI Title}
> **Business Intent (tech-agnostic — M1/M2):** Description, Business Value, Business Rules, and Acceptance Criteria below describe observable business behavior only — no framework/product/language/design-pattern names, no source identifiers. Keep implementation hints in `## Implementation Notes` and source references in evidence carriers.
## Requirement IDs (M3 — logical-IDs-first)
| Logical ID | Statement (tech-agnostic) | Evidence (secondary, re-anchorable) |
| ---------- | --------------------------- | ------------------------------------------- |
| FR-{MOD}-XXX | {functional requirement} | `[Source: path:line]` or `TBD (pre-impl)` |
| BR-{MOD}-XXX | {business rule} | `[Source: path:line]` or `TBD (pre-impl)` |
## Description
**As a** {user role}
**I want** {capability}
**So that** {business value}
## Business Value
- {Quantified benefit 1}
- {Quantified benefit 2}
## Problem Hypothesis
**We believe** {target users}
**Experience** {specific problem}
**Because** {root cause}
**We'll know this is true when** {validation metric}
## Releasable Outcome
- **Gate status:** PASS | BLOCKED
- **Primary actor:** {role}
- **Observable outcome:** {what the actor can achieve and recognize as complete}
- **Complete journey:** {entry/context → action/input → validation/decision → success/result → visible or persisted truth → exit/next action}
- **Applicable states and recovery:** {access, loading, empty, error, duplicate-submit, refresh, persistence, recovery behavior | N/A with reason}
- **Technical/enabling work:** {attached tasks/dependencies | none}; standalone technical/foundation/migration/setup work is not a PBI
- **Evidence:** {ACs, test outline, demo journey, or linked artifact}
## Full-Flow Coverage
- **Entry/context view:** {role and purpose}
- **Action/input view(s):** {role and purpose}
- **Result/confirmation view:** {role and purpose}
- **Exit/next view:** {role and purpose}
- **Navigation map:** {entry → transitions → outcome → exit}
- **State coverage:** {default/loading/empty/error/success/permission states as applicable}
## UI Surface (UI PBIs only)
| Surface type | Inventory | Purpose in the releasable flow |
| ------------ | --------- | ------------------------------ |
| Page/view | {all required views; add rows as needed} | {why the flow needs it} |
| Common component | {reusable component} | {where it appears} |
| Domain component | {domain-specific component} | {business behavior it conveys} |
| Page component | {page-level composition} | {view responsibility} |
> Backend-only PBI: `N/A — backend-only change; the observable business outcome is {outcome} and no user-facing surface is required.`
## Scope and Large-Idea Decomposition
- Applicability: `ORDINARY | DECOMPOSITION-EMBEDDED | EXPLICIT-ROADMAP | EXEMPT | FRAMEWORK-LIBRARY`
- In scope: {behaviors owned by this PBI}
- Non-goals: {behaviors deliberately deferred}
- Evidence gate: {observable completion proof}
When `isLargeIdea=true`, include the complete shared `large_idea_decomposition` block here. It MUST contain `outcome_slices`, `dependencies_order`, `non_goals`, `risks_evidence`, and `deferred_work_owner`; repeat the owning slice ID in this PBI and link enabling work to that outcome. Do not add `docs/product-roadmap.md` or a fabricated milestone. For `EXPLICIT-ROADMAP`, record the user-supplied roadmap/milestone references in the explicit branch only. For `ORDINARY`, omit the block.
## Business Rules
- BR-{MOD}-XXX: {Rule description}
## Acceptance Criteria
### AC-1: {Title}
Scenario: {Happy path}
Given {context}
When {action}
Then {outcome}
### AC-2: {Title}
Scenario: {Edge case}
Given {edge state}
When {action}
Then {handling}
### AC-3: {Title}
Scenario: {Error case}
Given {context}
When {invalid action}
Then error "{message}"
## Testability Assessment
| AC | Test Outline | Priority |
| ---- | ------------------ | -------- |
| AC-1 | {test description} | P0 |
| AC-2 | {test description} | P1 |
## Out of Scope
- {Explicitly excluded item 1}
- {Explicitly excluded item 2}
## Dependencies
| Dependency | Type | Description |
| --------------------- | ------------ | ------------------------------ |
| {PBI/service/feature} | must-before | {Why this must be done first} |
| {PBI/service/feature} | can-parallel | {Why this can run in parallel} |
| {PBI/service/feature} | blocked-by | {What blocks this PBI} |
| - | independent | {No dependencies — first item} |
## Production Readiness Concerns
| Concern | Required | Notes |
| ---------------------- | --------------- | --------------------------------------- |
| Code linting/analyzers | Yes/No/Existing | {tool preference or "scaffold default"} |
| Error handling setup | Yes/No/Existing | {pattern: toast/inline/error-page} |
| Loading indicators | Yes/No/Existing | {pattern: spinner/skeleton/progress} |
| Docker integration | Yes/No/Existing | {scope: infra-only/full/none} |
| CI/CD quality gates | Yes/No/Existing | {mutation-score gate (line-coverage diagnostic only), lint enforcement} |
| Security scanning | Yes/No/Existing | {dependency audit, SAST} |
## Authorization & Access Control
| Role | Can Create | Can Read | Can Update | Can Delete | Notes |
| ------ | ---------- | -------- | ---------- | ---------- | ------------- |
| {Role} | ✅/❌ | ✅/❌ | ✅/❌ | ✅/❌ | {scope notes} |
**New permissions needed:** {Yes/No — list if yes}
**Multi-tenant isolation:** {Yes/No}
## Seed Data Requirements
| Data Type | Description | Owner | Required |
| ------------------ | ------------------------------------ | ------------ | -------- |
| Reference data | {lookups, statuses, types} | Application | Yes/No |
| Configuration data | {default settings} | Application | Yes/No |
| Test seed data | {entities for integration tests} | Test project | Yes/No |
| Performance data | {large-volume data for load testing} | Test tooling | Yes/No |
> If no seed data needed: `N/A — no seed data required for this feature.`
## Data Migration
| Change | Type | Backward Compatible | Reversible |
| --------------------------- | -------------------------------------- | ------------------- | ---------- |
| {schema change description} | Add field / Remove field / Type change | Yes/No | Yes/No |
> If no schema changes: `N/A — no schema changes required.`
## Domain Context
**Entities:** {Entity1}, {Entity2}
**Related Features:** {feature doc paths}
## Implementation Notes
> Optional, clearly separated from Business Intent. Implementation hints / source identifiers may appear here and in evidence carriers only — never in the tech-agnostic sections above. If none: `N/A — no implementation hints; rebuild from Business Intent + Requirement IDs.`
## UI Layout
**Design Spec:** {link to the `/design-spec` artifact — or inline UI specs ref — that owns this PBI's screen/component design. REQUIRED for any PBI with UI work. Produce it AFTER inventorying existing UI + connected flows (per `SYNC:existing-ui-research`) so it faithfully matches the current UI system. If backend-only: `N/A — Backend-only change. No UI affected.`}
### Wireframe
{ASCII wireframe using box-drawing characters}
**Layout:** {description with approximate proportions/dimensions}
### Components
- **{ComponentName}** — {behavior description} _(tier: common | domain-shared | page/app)_
> Classify per **Component Hierarchy** in UI wireframe protocol — search existing libs before proposing new components.
### States
| State | Behavior |
| ------- | -------------------------- |
| Default | {what user sees initially} |
| Loading | {spinner/skeleton} |
| Empty | {empty state message} |
| Error | {error handling} |
> If backend-only: `## UI Layout` → `N/A — Backend-only change. No UI affected.`
## Validation Summary
**Validated:** {date}
### Confirmed Decisions
- {decision}: {user choice}
### Assumptions Confirmed
- {assumption}: Confirmed/Modified
### Open Items
- [ ] {follow-up items}
Anti-Patterns to Avoid
| Anti-Pattern |
Better Approach |
| Refining vague ideas |
Return to /idea for clarification |
| Skipping hypothesis validation |
Always run Phase 3 for new features |
| Solution-first thinking |
Start with problem, not solution |
| Generic acceptance criteria |
Use GIVEN/WHEN/THEN with specifics |
| Ignoring domain context |
Load project docs if applicable |
| Too large PBI (XL+) |
Break into smaller items |
| Missing "Out of Scope" |
Explicitly list exclusions |
| Assuming instead of asking |
Run validation interview |
Key Rules
- Every PBI MUST ATTENTION include Dependencies table — types:
must-before, can-parallel, blocked-by, independent. Enables /prioritize and /plan to respect ordering.
- No vague dependency descriptions — Each dependency must specify concrete PBI, service, or feature and WHY relationship exists.
- Every generated PBI MUST ATTENTION be a releasable actor-facing outcome with a complete entry-to-result journey and evidence. Technical-only, foundation-only, migration-only, and setup-only work is enabling work under a releasable PBI, never a standalone PBI.
- UI PBIs MUST ATTENTION include the full-flow surface — all required pages/views, navigation, common/domain/page components, applicable states, and the demo journey. One screen or a disconnected screen set is not enough.
- Read and apply
.claude/skills/shared/releasable-pbi-contract.md; if its gate is BLOCKED, do not write a ready/refined PBI.
BA Team Refinement Context (canonical)
Applies to Writes/Edits under team-artifacts/pbis/, .../stories/, team-artifacts/ideas/. Mirrored for Codex via SYNC:ba-team-decision-model / SYNC:refinement-dor-checklist in AGENTS.md (do not hand-edit the mirror).
Decision Model: 2/3 majority vote (UX BA + Designer BA + Dev BA PIC). Dev BA PIC has technical veto.
Disagree-and-Commit: Once decided, everyone commits. No re-litigating.
Grooming Override: BA team decision changes only if >75% remaining team votes to override.
Role Scopes:
- UX BA: UI/UX flows, wireframes, interaction AC, user research
- Designer BA: Design feasibility, product thinking, visual design, equal vote
- Dev BA PIC: Technical feasibility review, AI pre-review, DoR gate, grooming presentation
DoR Gate (ALL must pass before grooming):
…(truncated)
1---2name: refine-23description: "[Project Management] Use when converting ideas to PBIs, validating problem hypotheses, or adding acceptance criteria."4---56<!-- PROMPT-ENHANCE:STEP-TASK-ANCHOR:START -->78> **[BLOCKING]** Execute skill steps in declared order. NEVER skip, reorder, or merge steps without explicit user approval.9> **[BLOCKING]** Before each step or sub-skill call, update task tracking: set `in_progress` when step starts, set `completed` when step ends.10> **[BLOCKING]** Every completed/skipped step MUST include brief evidence or explicit skip reason.11> **[BLOCKING]** If Task tools are unavailable, create and maintain an equivalent step-by-step plan tracker with the same status transitions.1213<!-- PROMPT-ENHANCE:STEP-TASK-ANCHOR:END -->1415## Quick Summary1617**Goal:** Transform raw ideas into a Definition-of-Ready PBI using BA best practices, hypothesis validation, and domain research — problem-validated, tech-agnostic, with testable acceptance criteria, estimates, and a Dependencies table — so a team can build it without re-asking what or why.1819**Summary:**2021- **Purpose:** turn a raw idea into a groomable, Definition-of-Ready PBI a team can build without re-asking what or why.22- **Main steps — run in order, track EACH (AI keeps forgetting sub-phases):** Phase 0 locate active plan → 0.5 applicability and large-idea decomposition gate → 1 idea intake + module detect → 2 domain research → 3 problem-hypothesis validation (GATE) → 4 BABOK elicitation → 5 BDD acceptance criteria → 5.1 AI-SDD M1-M5/M7 gate (BLOCKING) → 5.5 testability assessment → 6 prioritization + draft estimate → 7 validation interview (GATE, 3-5 Qs) → 7.5 RE-DERIVE estimate vs locked scope → 7.6 RELEASABLE OUTCOME gate → 8 PBI artifact generation.23- Two gates are NON-OPTIONAL: validate the problem hypothesis (Phase 3) before building, and run the 3-5 question validation interview (Phase 7) before writing the PBI — the user decides assumptions, scope, and dependencies, never the AI.24- Acceptance criteria are BDD GIVEN/WHEN/THEN (min 3: happy/edge/error) and MUST satisfy the AI-SDD M1-M5 and M7 gate (Phase 5.1): tech-agnostic Business Intent, logical FR-/BR- IDs first, observable single-interpretation ACs, rebuild-from-scratch validity, and every AC demoable as a business outcome (M7).25- Estimate twice: Phase 6 drafts story points/man-days against draft scope, then Phase 7.5 RE-DERIVES them against the locked post-interview scope (per SYNC:estimation-framework) — shipping stale Phase 6 numbers is the cardinal failure.26- The PBI frontmatter MUST carry `story_points`, `complexity`, `man_days_traditional`, `man_days_ai`, and every PBI MUST include a complete Dependencies table (`must-before`/`can-parallel`/`blocked-by`/`independent`).27- Apply `isLargeIdea = multipleIndependentOutcomes || ambiguousOrResearchHeavy || releaseScopeDecomposition || oversizedPbiThatMustSplit` before elicitation. When true, the owning PBI MUST carry the complete `large_idea_decomposition` block (`outcome_slices`, `dependencies_order`, `non_goals`, `risks_evidence`, and `deferred_work_owner`) and every slice must be independently releasable. Do not create `docs/product-roadmap.md` by default; use the standalone roadmap branch only for an explicit roadmap request. All-false ideas omit roadmap/milestone placeholders. An existing roadmap is read-only context.28- Every generated PBI MUST be one independently releasable, actor-facing business outcome with a complete demonstrable journey. Technical-only, foundation-only, migration-only, or setup-only work belongs as enabling tasks/dependencies under a releasable PBI, never as a standalone PBI. Read `.claude/skills/shared/releasable-pbi-contract.md`.29- For UI PBIs, the outcome MUST include the page/view inventory, navigation map, component inventory, applicable states, and full-flow demo journey required for a mock app outcome; one isolated screen is insufficient.3031**Workflow:**3233| Phase | Name | Key Activity | Output |34| ----- | ------------------- | -------------------------------- | ---------------------- |35| 0 | Locate Active Plan | Load `plan.md` if in workflow | Plan context |36| 0.5 | Applicability / Decomposition (GATE) | Evaluate large-idea signals and capture embedded slices when needed | Embedded decomposition or ordinary isolated boundary |37| 1 | Idea Intake | Load artifact, detect module | Context loaded |38| 2 | Domain Research | WebSearch market/competitors | Research summary |39| 3 | Problem Hypothesis (GATE) | Validate problem exists | Confirmed hypothesis |40| 4 | Elicitation | Apply BABOK techniques | Requirements extracted |41| 5 | Acceptance Criteria | Write BDD scenarios | GIVEN/WHEN/THEN |42| 5.1 | AI-SDD Gate (M1-M5/M7) | Tech-agnostic, FR/BR IDs first, demoable | Mandate-compliant ACs |43| 5.5 | Testability | Test approach + per-AC outlines | Test seed for `/spec` |44| 6 | Prioritization | RICE/MoSCoW + DRAFT Story Points | Priority + draft est. |45| 7 | Validation (GATE) | Interview user (MANDATORY, 3-5Q) | Assumptions confirmed |46| 7.5 | Re-estimate | RE-DERIVE vs LOCKED scope | Final estimate |47| 7.6 | Releasable Outcome (GATE) | Confirm actor-facing outcome and full-flow surface | Releasable outcome gate |48| 8 | PBI Generation | Create artifact | PBI file saved |4950**Key Rules:**5152- NEVER skip hypothesis validation for new features53- Validation interview NOT optional — always ask 3-5 questions54- Use project domain-specific vocabulary when available55- MUST ATTENTION include `story_points`, `complexity`, `man_days_traditional`, `man_days_ai` in PBI frontmatter56- Every PBI MUST ATTENTION include Dependencies table — types: `must-before` | `can-parallel` | `blocked-by` | `independent`57- Every generated PBI MUST ATTENTION pass the Releasable Outcome Gate: one actor-facing outcome, complete entry-to-result journey, observable evidence, and no standalone technical/foundation scope.58- UI PBIs MUST ATTENTION define the full-flow surface: all required pages/views, navigation, reusable/domain/page components, applicable states, and a demo journey. A single screen is not a releasable UI PBI.59- `docs/specs/` — read existing TCs for related features; recommend test spec generation for new PBIs60- `docs/project-reference/domain-entities-reference.md` — read when task involves business entities/models61- `.claude/skills/shared/product-roadmap-contract.md` — read for applicability, the embedded decomposition schema, and the explicit roadmap handoff contract62- `.claude/skills/shared/releasable-pbi-contract.md` — read for the PBI outcome and UI full-flow contract6364---6566## Frontend/UI Context (if applicable)6768- Component patterns: `docs/project-reference/frontend-patterns-reference.md`69- Styling/BEM guide: `docs/project-reference/scss-styling-guide.md`70- Design system tokens: `docs/project-reference/design-system/README.md`7172---7374## Greenfield Mode7576> **Auto-detected:** No discovered source directories and no manifest files found. Planning artifacts (docs/, plans/, .claude/) don't count.7778**When greenfield detected:**79801. Skip existing backlog refinement (no backlog exists)812. Enable DDD domain modeling: bounded contexts, aggregates, entities, value objects823. Capture constraints: team skills, expected scale, hosting preferences, budget — as input signals only834. Use WebSearch for market research + competitor analysis845. Output domain model artifact alongside PBI artifact856. Increase AskUserQuestion frequency — validate domain boundaries, entity relationships, business rules867. **[CRITICAL] NEVER ask about tech stack during refinement.** Tech stack decided after business analysis. Capture team skills + scale expectations as signals only.8788**Be skeptical. Every claim needs traced proof, confidence >80%.**8990---9192## Phase 0: Locate Active Plan (if in workflow)9394If running in workflow (big-feature, greenfield-init, etc.):95961. Glob `plans/*/plan.md` sorted by modification time, or check `TaskList` for plan context972. Read `plan.md` — project scope, goals, architecture decisions, domain model983. Read existing research — `{plan-dir}/research/*.md` for business evaluation, domain analysis994. Read `docs/project-reference/domain-entities-reference.md` (if exists) — existing domain entities1005. Use plan context — don't re-ask questions answered in prior steps101102## Phase 0.5: Applicability and Large-Idea Decomposition Gate103104Read `.claude/skills/shared/product-roadmap-contract.md` before eliciting PBI details. Evaluate the shared four-operand `isLargeIdea` rule:1051061. If any signal is true, capture the complete `large_idea_decomposition` block in the owning PBI handoff. Include stable slice IDs, independently releasable outcomes, dependency order, non-goals with owners, risks/evidence with owners and statuses, and deferred-work owners. Ask the owner about material ambiguity; do not invent boundaries.1072. If all signals are false, omit the decomposition block and all roadmap/milestone/scope-brief placeholders. Preserve the actor, outcome, in-scope behavior, non-goals, lifecycle terms, source-of-truth state, persistence expectation, and evidence directly in the PBI.1083. If the user explicitly requests a product roadmap, route to `/product-roadmap`; only that explicit branch may require `docs/product-roadmap.md`, a selected milestone, and a scope brief. An existing roadmap supplied by the user is read-only context.1094. For a framework/library change, use the shared `FRAMEWORK-LIBRARY` technical branch. For an isolated brownfield change, use the explicit EXEMPT branch. Neither branch creates a product roadmap.1105. Use `AskUserQuestion` for mismatches or material ambiguity. Do not infer whether “ready,” “published,” “delivered,” or equivalent means reviewable, sellable, visible, or accessible.111112## Phase 1: Idea Intake & Context Loading1131141. Read idea artifact from path or find by ID in `team-artifacts/ideas/`1152. Extract: problem statement, value proposition, target users, scope1163. Check `module` field; if absent, detect via keywords or prompt user117118---119120## Phase 2: Domain Research121122**Trigger:** New domain, unclear competitors, `--research` flag.123**Skip:** Internal tooling, well-understood domain, time-constrained.124125Use WebSearch with domain terms. Summarize in max 3 bullets (market context, competitors, best practices).126127---128129## Phase 3: Problem Hypothesis Validation130131Validate hypothesis with user via AskUserQuestion. 42% of startups fail from no market need — validate before building.132133**Skip:** `--skip-hypothesis`, validated hypothesis exists, bug fix/tech debt.134135### Problem Hypothesis Template136137```markdown138**We believe** [target users/persona]139**Experience** [specific problem]140**Because** [root cause]141**We'll know this is true when** [validation metric/evidence]142```143144### Value Hypothesis Template145146```markdown147**We believe** [feature/solution]148**Will deliver** [value/benefit]149**To** [target users]150**We'll know we're right when** [success metric]151```152153### Validation Process1541551. Draft hypothesis from idea content1562. Use AskUserQuestion to validate:157 - "Is this the core problem we're solving?"158 - "Who exactly experiences this? How often?"159 - "What evidence do we have this problem exists?"1603. Validated → proceed to elicitation1614. Invalidated → return idea for clarification162163---164165## Phase 4: Requirements Elicitation (BABOK Core 5)166167**Think:** What information gaps exist? Which technique fills them with least effort + highest confidence?168169| Technique | When to Choose | What to Extract |170| --------------------- | --------------------------------------------------- | ----------------------------------------------- |171| **Interviews** | Deep insights needed, stakeholder perspectives vary | Stakeholder needs, pain points, constraints |172| **Workshops** | Group consensus needed, multiple stakeholders | Prioritized requirements, consensus decisions |173| **Document Analysis** | Existing systems/processes, regulatory requirements | As-is state, compliance requirements, gaps |174| **Observation** | Users can't articulate needs, workflow unclear | Actual vs stated workflow, hidden requirements |175| **Prototyping** | Visual validation needed, UI/UX requirements vague | Validated UI requirements, interaction patterns |176177**Technique notes:**178179- Interviews: Open-ended questions (why, how, what-if) → active listening → follow-up on unexpected → document verbatim quotes180- Workshops: Define agenda + 90 min timebox → neutral facilitator → round-robin/silent voting → document decisions AND dissent181- Observation: Shadow users → note workarounds/pain points → don't interrupt → ask clarifying questions afterward182183---184185## Phase 5: Acceptance Criteria (BDD Format)186187Write GIVEN/WHEN/THEN scenarios. Minimum 3: happy path, edge case, error case.188189```gherkin190Scenario: {Descriptive title}191 Given {precondition/context}192 And {additional context}193 When {action/trigger}194 And {additional action}195 Then {expected outcome}196 And {additional verification}197```198199| Practice | Rule |200| ------------------------- | --------------------------------- |201| Single trigger | "When" clause has ONE action |202| 3 scenarios minimum | Happy path, edge case, error case |203| No implementation details | Behavior, not how |204| Testable outcomes | "Then" must be verifiable |205| Stakeholder language | No technical jargon |206207### Example Scenarios208209```gherkin210Scenario: User creates invoice with valid data211 Given user has permission to create invoices212 And user is on the invoice creation page213 When user submits invoice form with all required fields214 Then invoice is created with status "Draft"215 And invoice appears in user's invoice list216217Scenario: Invoice creation fails with missing required field218 Given user is on the invoice creation page219 When user submits form without title220 Then validation error "Title is required" is displayed221 And invoice is not created222223Scenario: Approver reviews a submitted invoice224 Given approver has invoices awaiting approval225 And an invoice has been submitted for approval226 When approver opens the invoice review page227 Then the invoice is visible with "Pending Review" status228```229230### Project Test Case Format231232- **Format:** `TC-{FEATURE}-{NNN}` (e.g., TC-GM-001)233- **Evidence:** `[Source: namespace/service/id]` abstract-anchor format (never `file:line`)234- See `business-analyst` skill for detailed patterns235236---237238### Phase 5.1: AI-SDD Mandate Gate (M1-M5 and M7) — BLOCKING239240See `.claude/skills/shared/sdd-artifact-contract.md` → "AI-SDD Mandates (M1-M7)" for BLOCKING criteria. The generated PBI MUST satisfy M1-M5 and M7 or be reworked before Phase 8 writes it:241242- **Separate intent from implementation (M1/M2):** Keep a tech-agnostic **Business Intent** narrative (Description, Business Value, Acceptance Criteria) free of framework/product/language/design-pattern names and source identifiers. Put any optional implementation hints in a clearly separated **Implementation Notes** block, and put source references only in evidence carriers (`[Source: namespace/service/id]`, `**Evidence**`). Prose stays tech-agnostic per `docs/project-reference/spec-principles.md` §3.243- **Logical Requirement ID first (M3):** Assign each requirement a logical ID (`FR-`/`BR-`) as the PRIMARY citation spine; keep `[Source: namespace/service/id]` abstract-anchor evidence (never physical code coordinates or repository-root paths — those live only in the provenance sidecar) as a SECONDARY carrier in a separate evidence column/section — KEEP it, never remove it.244- **Testable, observable acceptance criteria (M4):** Every acceptance criterion has ONE valid interpretation, observable completion states, named failure modes, and NO implementation details. Reject vague phrasing ("handle appropriately", "fast", "user-friendly").245- **Rebuild-from-scratch validation (M5):** Before emitting, confirm a competent team with zero codebase knowledge could re-implement identical business behavior on ANY stack from the PBI alone. If a reader would have to guess a rule, limit, role, or failure mode, add it as a clarification — never guess.246- **Business-visibility (M7):** Apply the demo test to each acceptance criterion's BODY: _"what would a stakeholder SEE change?"_ — no answer → FAIL as TECHNICAL-ONLY and drop it from the PBI. Every `GIVEN` = a state a user could arrange; every `WHEN` = an action a user could take; every `THEN` = an outcome a user could see. FAIL a `WHEN` that is an invocation (a handler runs, a consumer receives, a job fires, data syncs) or a `THEN` asserting schema/type/nullability/call-count. Judge the BODY, never the AC's title or ID. Never derive the AC count from an architecture inventory (handlers, consumers, jobs) — that count moves when the system is re-architected though no business behavior changed, falsifying M5.247248> **M1 governs vocabulary; M7 governs subject matter.** A technical AC in impeccably tech-free prose satisfies M1 while violating M7 — _"the system correctly synchronizes the record"_ names no framework and is still a technical case in a business costume. That gap is the most common way business specs rot. Ask what a user could SEE, not which words were used.249250---251252### Phase 5.5: Testability Assessment253254Use `AskUserQuestion` with 2-3 questions:2552561. "Which testing approach fits this PBI?"257 - TDD-first: Write test specs before implementation (Recommended for complex features)258 - Implement-first: Build feature, then create test specs259 - Parallel: Spec and implement simultaneously2602612. "What test levels are needed?"262 - Integration tests only (Recommended for backend CQRS)263 - Integration + E2E264 - Unit + Integration + E2E265266For EACH acceptance criterion, generate corresponding test case outline:267268| AC | Test Outline | Priority |269| ---- | ------------------------------------------------------- | -------- |270| AC-1 | TC: Create invoice with valid data → verify persisted | P0 |271| AC-2 | TC: Create invoice without title → verify validation error | P1 |272273Seed for `/spec [mode=tests]` if user chooses TDD-first. Document in PBI under `## Testability Assessment`.274275---276277## Phase 6: Prioritization & Estimation278279Apply RICE score or MoSCoW for priority. Estimate using **Story Points (Modified Fibonacci 1-21)**.280281### Quick RICE Score282283```284Score = (Reach x Impact x Confidence) / Effort285286Reach: Users affected per quarter (100, 500, 1000+)287Impact: 0.25 (minimal) | 0.5 (low) | 1 (medium) | 2 (high) | 3 (massive)288Confidence: 0.5 (low) | 0.8 (medium) | 1.0 (high)289Effort: Story points (1, 2, 3, 5, 8, 13, 21)290```291292### MoSCoW Categories293294| Category | Meaning | Action |295| --------------- | ------------------------ | ------------------- |296| **Must Have** | Critical, non-negotiable | Include in MVP |297| **Should Have** | Important but not vital | Plan for release |298| **Could Have** | Nice to have, low effort | If time permits |299| **Won't Have** | Out of scope this cycle | Document for future |300301---302303## Phase 7: Validation Interview (MANDATORY)304305Generate 3-5 questions covering assumptions, scope, dependencies, edge cases. Use AskUserQuestion. Document in PBI. **NOT optional.**306307| Category | Example Question |308| ------------------- | --------------------------------------------------------------------------- |309| **Assumptions** | "We assume X is true. Correct?" |310| **Scope** | "Should Y be included or explicitly excluded?" |311| **Dependencies** | "This requires Z. Is that available?" |312| **Edge Cases** | "What happens when data is empty/null?" |313| **Business Impact** | "Will this affect existing reports/workflows?" |314| **Entities** | "Create new entity or extend existing X?" |315| **Prod Readiness** | "Does this feature need linting, error handling, loading, or Docker setup?" |316| **Authorization** | "Who can perform this action? What roles/permissions are needed?" |317| **Seed Data** | "Does this feature need reference/lookup data to function?" |318| **Data Migration** | "Does this change entity schema? Is data transformation needed?" |3193201. Generate 3-5 questions from assumptions, scope, dependencies3212. Use `AskUserQuestion` to interview3223. Document in PBI under `## Validation Summary`3234. Update PBI based on answers324325### Validation Output Format326327```markdown328## Validation Summary329330**Validated:** {date}331332### Confirmed Decisions333334- {decision}: {user choice}335336### Assumptions Confirmed337338- {assumption}: Confirmed/Modified339340### Open Items341342- [ ] {follow-up items}343```344345---346347## Cross-Cutting & Production Readiness348349> Capture in PBI template sections: Production Readiness Concerns, Authorization & Access Control, Seed Data, Data Migration.350351---352353## Phase 7.5: Re-evaluate Estimation (MANDATORY — runs after Validation Interview)354355> **Why this phase exists:** Phase 6 estimation runs against a draft scope. Phase 7 (Validation Interview) and Cross-Cutting capture often resolve unknowns, add constraints, or trim/expand scope. The numbers in `story_points`, `complexity`, `man_days_traditional`, `man_days_ai` MUST be re-derived against the locked scope BEFORE Phase 8 writes them into the PBI frontmatter. Estimating once at draft and forgetting is the #1 source of estimation drift in PBIs.356357### Inputs (locked by end of Phase 7)358359- Confirmed assumptions, scope inclusions/exclusions360- Authorization, seed data, migration, prod-readiness decisions361- Newly discovered dependencies or edge cases362- Any rescoping the user requested during validation363364### Re-derive (per `SYNC:estimation-framework`)3653661. Walk the **locked** scope acceptance criteria + cross-cutting concerns; assign hours per slice.3672. `bottom_up_hours = Σ slice_hours` (use the SP table mapping in Phase 6, not eyeballing).3683. `likely_days = ceil(bottom_up_hours / 6)` × productivity factor for the team/AI mode.3694. Recompute `risk_margin_pct` based on remaining unknowns AFTER Phase 7 (margin should usually shrink because validation removed unknowns; rises only if new risks surfaced).3705. Recompute `min-max range` from the new likely_days ± margin.3716. Re-pick the closest Fibonacci `story_points` and `complexity` bucket from the re-derived likely_days.372373### Compare against Phase 6 draft estimate374375Compute `delta_pct = (new_likely_days - draft_likely_days) / draft_likely_days × 100`.376377| Delta | Action |378| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |379| `\|delta\| ≤ 20%` | Keep draft estimate. Note `reestimate_delta_pct: <signed>` + `reestimate_reason: "within tolerance, no change"` in PBI frontmatter for transparency. |380| `\|delta\| > 20%` | UPDATE `story_points`, `complexity`, `man_days_traditional`, `man_days_ai`. Add `reestimate_delta_pct: <signed>` + 1-line `reestimate_reason` explaining what changed (e.g., "auth scope confirmed wider", "seed data dropped per validation"). |381| `\|delta\| > 50%` | UPDATE values AND flag `SHOULD-RESCOPE`. Surface to user via `AskUserQuestion` BEFORE Phase 8 writes the PBI: "Re-estimate is +/-X% vs original. Options: (a) accept new estimate as-is, (b) split into 2 PBIs, (c) trim scope back to original estimate, (d) defer." Record the user's decision in `## Validation Summary`. |382383### Output384385- Updated estimation values (carry into Phase 8 frontmatter)386- New frontmatter fields: `reestimate_delta_pct`, `reestimate_reason` (always populate even when within tolerance — creates a paper trail for retrospective comparison against actual implementation time)387- If rescoped: updated acceptance criteria/scope sections reflecting the user's choice388389> **Run this re-estimation phase against the locked scope — never skip it.** A PBI that ships with stale Phase 6 estimates is the source of unreliable velocity data. The whole point is to make the post-validation numbers — not the pre-validation guesses — the ones the team commits to.390391---392393## Phase 7.6: Releasable Outcome Gate (BLOCKING)394395Read `.claude/skills/shared/releasable-pbi-contract.md` and evaluate the locked scope before writing the PBI. This gate prevents a technical work package from being disguised as a product backlog item.396397The PBI is **BLOCKED** unless all of the following are true:3983991. A named primary actor can achieve one observable business outcome independently within the PBI boundary.4002. The journey is complete: entry/context → action/input → validation or decision → success/result → resulting visible or persisted truth → exit or next action.4013. Applicable authorization, persistence, refresh/duplicate-submit, loading, empty, error, and recovery behavior is explicit; use `N/A` only with a reason.4024. Technical-only, foundation-only, migration-only, and setup-only work is attached as enabling work to this outcome or explicitly excluded; it is never emitted as the PBI's sole outcome.4035. For UI work, the PBI defines every required page/view, navigation path, common/domain/page component, applicable state, and full-flow demo journey. Do not reduce a multi-step outcome to one screen.4046. The owner has approved any trade-off that changes the outcome, release boundary, or required surface.405406If the scope fails this gate, ask the owner to reframe the outcome or attach the enabling work to a releasable PBI. Do not continue to Phase 8 with a “technical PBI” or an assumed UI flow.407408Record the gate in the PBI inputs before generation:409410```markdown411## Releasable Outcome Gate412- Status: PASS | BLOCKED413- Actor and observable outcome: { ... }414- Full-flow journey: {entry → action → result → exit}415- Persistence/access/error/recovery coverage: { ... | N/A with reason}416- Technical-only work: {attached enabling tasks | none}417- UI surface: {page/view inventory + navigation + components + states | N/A — backend-only with reason}418- Evidence: {AC/test/demo/mockup references}419```420421---422423## Phase 8: PBI Artifact Generation424425**Path:** `team-artifacts/pbis/{YYMMDD}-pbi-{slug}.md` | **ID Pattern:** `PBI-{YYMMDD}-{NNN}`426427> **Artifact Path (canonical convention)** — Command `/refine` → base path `team-artifacts/pbis/`, role token `ba`, type `pbi`. General filename pattern: `{YYMMDD}-{role}-{type}-{slug}.md` → e.g. `260119-ba-pbi-invoice-approval.md`. Slug = lowercased basename, non-alphanumeric → `-`, trimmed, max 50 chars.428429### PBI Template430431```markdown432---433id: PBI-{YYMMDD}-{NNN}434title: '{Brief descriptive title}'435module: '{ModuleName — detect from project-config.json modules[]}'436priority: Must Have | Should Have | Could Have | Won't Have437rank: { numeric 1-999, ascending — populated/updated by /prioritize during cross-PBI ranking; omit until prioritized }438story_points: 1 | 2 | 3 | 5 | 8 | 13 | 21439complexity: Low | Medium | High | Very High440man_days_traditional: '{ Xd (Yd code + Zd test) — from SP table }'441man_days_ai: '{ Xd (Yd code + Zd test) — from SP table with AI }'442status: draft | refined | ready | in_progress | done443rice_score: { calculated }444created: '{YYYY-MM-DD}'445source_idea: '{idea artifact path or ID}'446scope_mode: ORDINARY | DECOMPOSITION-EMBEDDED | EXPLICIT-ROADMAP | EXEMPT | FRAMEWORK-LIBRARY447large_idea_decomposition: {complete block when any isLargeIdea signal is true; omit when all signals are false}448---449450# {PBI Title}451452> **Business Intent (tech-agnostic — M1/M2):** Description, Business Value, Business Rules, and Acceptance Criteria below describe observable business behavior only — no framework/product/language/design-pattern names, no source identifiers. Keep implementation hints in `## Implementation Notes` and source references in evidence carriers.453454## Requirement IDs (M3 — logical-IDs-first)455456| Logical ID | Statement (tech-agnostic) | Evidence (secondary, re-anchorable) |457| ---------- | --------------------------- | ------------------------------------------- |458| FR-{MOD}-XXX | {functional requirement} | `[Source: path:line]` or `TBD (pre-impl)` |459| BR-{MOD}-XXX | {business rule} | `[Source: path:line]` or `TBD (pre-impl)` |460461## Description462463**As a** {user role}464**I want** {capability}465**So that** {business value}466467## Business Value468469- {Quantified benefit 1}470- {Quantified benefit 2}471472## Problem Hypothesis473474**We believe** {target users}475**Experience** {specific problem}476**Because** {root cause}477**We'll know this is true when** {validation metric}478479## Releasable Outcome480481- **Gate status:** PASS | BLOCKED482- **Primary actor:** {role}483- **Observable outcome:** {what the actor can achieve and recognize as complete}484- **Complete journey:** {entry/context → action/input → validation/decision → success/result → visible or persisted truth → exit/next action}485- **Applicable states and recovery:** {access, loading, empty, error, duplicate-submit, refresh, persistence, recovery behavior | N/A with reason}486- **Technical/enabling work:** {attached tasks/dependencies | none}; standalone technical/foundation/migration/setup work is not a PBI487- **Evidence:** {ACs, test outline, demo journey, or linked artifact}488489## Full-Flow Coverage490491- **Entry/context view:** {role and purpose}492- **Action/input view(s):** {role and purpose}493- **Result/confirmation view:** {role and purpose}494- **Exit/next view:** {role and purpose}495- **Navigation map:** {entry → transitions → outcome → exit}496- **State coverage:** {default/loading/empty/error/success/permission states as applicable}497498## UI Surface (UI PBIs only)499500| Surface type | Inventory | Purpose in the releasable flow |501| ------------ | --------- | ------------------------------ |502| Page/view | {all required views; add rows as needed} | {why the flow needs it} |503| Common component | {reusable component} | {where it appears} |504| Domain component | {domain-specific component} | {business behavior it conveys} |505| Page component | {page-level composition} | {view responsibility} |506507> Backend-only PBI: `N/A — backend-only change; the observable business outcome is {outcome} and no user-facing surface is required.`508509## Scope and Large-Idea Decomposition510511- Applicability: `ORDINARY | DECOMPOSITION-EMBEDDED | EXPLICIT-ROADMAP | EXEMPT | FRAMEWORK-LIBRARY`512- In scope: {behaviors owned by this PBI}513- Non-goals: {behaviors deliberately deferred}514- Evidence gate: {observable completion proof}515516When `isLargeIdea=true`, include the complete shared `large_idea_decomposition` block here. It MUST contain `outcome_slices`, `dependencies_order`, `non_goals`, `risks_evidence`, and `deferred_work_owner`; repeat the owning slice ID in this PBI and link enabling work to that outcome. Do not add `docs/product-roadmap.md` or a fabricated milestone. For `EXPLICIT-ROADMAP`, record the user-supplied roadmap/milestone references in the explicit branch only. For `ORDINARY`, omit the block.517518## Business Rules519520- BR-{MOD}-XXX: {Rule description}521522## Acceptance Criteria523524### AC-1: {Title}525526Scenario: {Happy path}527Given {context}528When {action}529Then {outcome}530531### AC-2: {Title}532533Scenario: {Edge case}534Given {edge state}535When {action}536Then {handling}537538### AC-3: {Title}539540Scenario: {Error case}541Given {context}542When {invalid action}543Then error "{message}"544545## Testability Assessment546547| AC | Test Outline | Priority |548| ---- | ------------------ | -------- |549| AC-1 | {test description} | P0 |550| AC-2 | {test description} | P1 |551552## Out of Scope553554- {Explicitly excluded item 1}555- {Explicitly excluded item 2}556557## Dependencies558559| Dependency | Type | Description |560| --------------------- | ------------ | ------------------------------ |561| {PBI/service/feature} | must-before | {Why this must be done first} |562| {PBI/service/feature} | can-parallel | {Why this can run in parallel} |563| {PBI/service/feature} | blocked-by | {What blocks this PBI} |564| - | independent | {No dependencies — first item} |565566## Production Readiness Concerns567568| Concern | Required | Notes |569| ---------------------- | --------------- | --------------------------------------- |570| Code linting/analyzers | Yes/No/Existing | {tool preference or "scaffold default"} |571| Error handling setup | Yes/No/Existing | {pattern: toast/inline/error-page} |572| Loading indicators | Yes/No/Existing | {pattern: spinner/skeleton/progress} |573| Docker integration | Yes/No/Existing | {scope: infra-only/full/none} |574| CI/CD quality gates | Yes/No/Existing | {mutation-score gate (line-coverage diagnostic only), lint enforcement} |575| Security scanning | Yes/No/Existing | {dependency audit, SAST} |576577## Authorization & Access Control578579| Role | Can Create | Can Read | Can Update | Can Delete | Notes |580| ------ | ---------- | -------- | ---------- | ---------- | ------------- |581| {Role} | ✅/❌ | ✅/❌ | ✅/❌ | ✅/❌ | {scope notes} |582583**New permissions needed:** {Yes/No — list if yes}584**Multi-tenant isolation:** {Yes/No}585586## Seed Data Requirements587588| Data Type | Description | Owner | Required |589| ------------------ | ------------------------------------ | ------------ | -------- |590| Reference data | {lookups, statuses, types} | Application | Yes/No |591| Configuration data | {default settings} | Application | Yes/No |592| Test seed data | {entities for integration tests} | Test project | Yes/No |593| Performance data | {large-volume data for load testing} | Test tooling | Yes/No |594595> If no seed data needed: `N/A — no seed data required for this feature.`596597## Data Migration598599| Change | Type | Backward Compatible | Reversible |600| --------------------------- | -------------------------------------- | ------------------- | ---------- |601| {schema change description} | Add field / Remove field / Type change | Yes/No | Yes/No |602603> If no schema changes: `N/A — no schema changes required.`604605## Domain Context606607**Entities:** {Entity1}, {Entity2}608**Related Features:** {feature doc paths}609610## Implementation Notes611612> Optional, clearly separated from Business Intent. Implementation hints / source identifiers may appear here and in evidence carriers only — never in the tech-agnostic sections above. If none: `N/A — no implementation hints; rebuild from Business Intent + Requirement IDs.`613614## UI Layout615616**Design Spec:** {link to the `/design-spec` artifact — or inline UI specs ref — that owns this PBI's screen/component design. REQUIRED for any PBI with UI work. Produce it AFTER inventorying existing UI + connected flows (per `SYNC:existing-ui-research`) so it faithfully matches the current UI system. If backend-only: `N/A — Backend-only change. No UI affected.`}617618### Wireframe619620{ASCII wireframe using box-drawing characters}621622**Layout:** {description with approximate proportions/dimensions}623624### Components625626- **{ComponentName}** — {behavior description} _(tier: common | domain-shared | page/app)_627628> Classify per **Component Hierarchy** in UI wireframe protocol — search existing libs before proposing new components.629630### States631632| State | Behavior |633| ------- | -------------------------- |634| Default | {what user sees initially} |635| Loading | {spinner/skeleton} |636| Empty | {empty state message} |637| Error | {error handling} |638639> If backend-only: `## UI Layout` → `N/A — Backend-only change. No UI affected.`640641## Validation Summary642643**Validated:** {date}644645### Confirmed Decisions646647- {decision}: {user choice}648649### Assumptions Confirmed650651- {assumption}: Confirmed/Modified652653### Open Items654655- [ ] {follow-up items}656```657658---659660## Anti-Patterns to Avoid661662| Anti-Pattern | Better Approach |663| ------------------------------ | ----------------------------------- |664| Refining vague ideas | Return to `/idea` for clarification |665| Skipping hypothesis validation | Always run Phase 3 for new features |666| Solution-first thinking | Start with problem, not solution |667| Generic acceptance criteria | Use GIVEN/WHEN/THEN with specifics |668| Ignoring domain context | Load project docs if applicable |669| Too large PBI (XL+) | Break into smaller items |670| Missing "Out of Scope" | Explicitly list exclusions |671| Assuming instead of asking | Run validation interview |672673---674675## Key Rules676677- **Every PBI MUST ATTENTION include Dependencies table** — types: `must-before`, `can-parallel`, `blocked-by`, `independent`. Enables `/prioritize` and `/plan` to respect ordering.678- **No vague dependency descriptions** — Each dependency must specify concrete PBI, service, or feature and WHY relationship exists.679- **Every generated PBI MUST ATTENTION be a releasable actor-facing outcome** with a complete entry-to-result journey and evidence. Technical-only, foundation-only, migration-only, and setup-only work is enabling work under a releasable PBI, never a standalone PBI.680- **UI PBIs MUST ATTENTION include the full-flow surface** — all required pages/views, navigation, common/domain/page components, applicable states, and the demo journey. One screen or a disconnected screen set is not enough.681- **Read and apply** `.claude/skills/shared/releasable-pbi-contract.md`; if its gate is `BLOCKED`, do not write a ready/refined PBI.682683## BA Team Refinement Context (canonical)684685> Applies to Writes/Edits under `team-artifacts/pbis/`, `.../stories/`, `team-artifacts/ideas/`. Mirrored for Codex via `SYNC:ba-team-decision-model` / `SYNC:refinement-dor-checklist` in AGENTS.md (do not hand-edit the mirror).686687**Decision Model:** 2/3 majority vote (UX BA + Designer BA + Dev BA PIC). Dev BA PIC has technical veto.688**Disagree-and-Commit:** Once decided, everyone commits. No re-litigating.689**Grooming Override:** BA team decision changes only if >75% remaining team votes to override.690691**Role Scopes:**692693- **UX BA:** UI/UX flows, wireframes, interaction AC, user research694- **Designer BA:** Design feasibility, product thinking, visual design, equal vote695- **Dev BA PIC:** Technical feasibility review, AI pre-review, DoR gate, grooming presentation696697**DoR Gate (ALL must pass before grooming):**698699- [ ] User story template (As a... I want... So that...)700- [ ] AC testable (GIVEN/WHEN/THEN, no vague language)701- [ ] Wireframes attached (UX BA) + UI design ready (Designer BA)702- [ ] (UI PBIs) Design spec linked — `/design-spec` artifact or inline UI specs present in `## UI Layout`; backend-only PBIs exempt (`N/A — Backend-only`)703- [ ] AI pre-review passed (`/artifact-review --type=pb704705…(truncated)