Skip to content

Feature Specification

Purpose

A feature spec is the feature-level authority for behavior and boundaries. It translates PRD requirements into precise feature behavior, functional areas, acceptance criteria, non-functional expectations, edge cases, and feature-specific success measures.

It sits between the PRD (which defines product scope) and user stories (which define vertical slices through the feature). The feature spec owns feature behavior. User stories own user journeys. Solution and technical designs own how the behavior will be built.

Authoring guidance

  • Future state before current pain — describe the desired user-visible outcome before optimizing around today’s broken surface. The problem statement explains why the change is needed; it should not be the only organizing frame.
  • Scope, not solution — describe what the feature must do, not how to build it. Implementation details belong in design docs.
  • Behavior, not journey — specify feature behavior and acceptance criteria. Put end-to-end user flow narrative in user stories.
  • One feature, one spec — if a spec covers two independent capabilities, split it.
  • Functional areas before requirements — when a feature spans multiple surfaces, user modes, workflow stages, or domain objects, name those areas before writing requirements. Group requirements by area instead of producing one flat list.
  • Separate similar domain objects — if readers might confuse two things, define them separately before requirements. For example, “Artifacts” are

Additional guidance continues in the full prompt below.

Quality checklist from the prompt

After drafting, verify every item. If any blocking check fails, revise before committing.

Blocking

  • Overview links to a specific PRD requirement
  • Ideal Future State is present for broad product-surface, workflow, IA, or documentation features
  • Functional Areas is present when the feature spans multiple surfaces, workflows, user modes, or domain objects
  • Similar domain objects are separated before requirements are written
  • Functional requirements are grouped by area when a flat list would mix unrelated scopes
  • Every functional requirement is testable
  • Acceptance criteria cover the highest-risk requirements with observable examples
  • Non-functional requirements have specific numeric targets
  • User stories are referenced by ID (not duplicated inline)
  • Dependencies name specific feature IDs and external systems
  • No [NEEDS CLARIFICATION] markers remain

Warning

  • Problem statement quantifies the pain
  • At least one feature-level edge case documented
  • Success metrics are feature-specific (not product-level)
  • Out of scope excludes something plausible

Example

Show a worked example of this artifact
---
ddx:
  id: example.feature-specification.depositmatch.csv-import
  depends_on:
    - example.product-vision.depositmatch
    - example.prd.depositmatch
    - example.principles.depositmatch
    - example.concerns.depositmatch
---

# Feature Specification: FEAT-001 - CSV Import and Column Mapping

**Feature ID**: FEAT-001
**Status**: Specified
**Priority**: P0
**Owner**: Product and Engineering

## Overview

CSV Import and Column Mapping implements the PRD requirement to import bank
deposit CSV files and invoice export CSV files for a client. The feature gives
reviewers a dependable way to bring source data into DepositMatch while
preserving the source-row identity needed for matching evidence and audit logs.

## Ideal Future State

Maya uploads bank and invoice exports for a client, confirms the saved column
mapping, and sees a clean import summary before matching begins. If a file is
ambiguous or missing required columns, DepositMatch explains the issue before
any rows enter the review queue. Source rows remain traceable through matching,
exceptions, reports, and corrections.

## Problem Statement

- **Current situation**: Reviewers reconcile deposits from bank exports,
  invoice exports, spreadsheets, and email notes.
- **Pain points**: CSV layouts differ by client and system. A silent mapping
  error can make match suggestions look plausible while pointing to the wrong
  source row.
- **Desired outcome**: Reviewers can import valid files quickly and trust that
  invalid files stop before they pollute the matching workflow.

## Functional Areas

| Area | User question or job | Feature responsibility |
|------|----------------------|------------------------|
| Upload | Can I provide the bank and invoice files for this client? | Accept CSV files and associate them with one client and import session. |
| Mapping | Does DepositMatch understand the columns in these files? | Require mappings for amount, date, identifier, and source-specific optional fields. |
| Validation | Are these files safe to import? | Detect missing columns, duplicate source identifiers, malformed dates, and invalid amounts before import. |
| Import Summary | What happened during import? | Show accepted rows, rejected rows, warnings, and saved mappings. |
| Traceability | Can every later match point back to source data? | Preserve file identity, row number, source identifier, and normalized values. |

## Requirements

### Functional Requirements by Area

#### Upload

UP-01. The system must accept one bank deposit CSV and one invoice export CSV
for a selected client and import session.

UP-02. The system must reject non-CSV files before parsing.

#### Mapping

MAP-01. The system must require mappings for amount, date, and source
identifier in both bank and invoice files.

MAP-02. The system must save a confirmed mapping for reuse on the next import
for the same client and source type.

MAP-03. The system must let the reviewer adjust a saved mapping before rows
are imported.

#### Validation

VAL-01. The system must reject an import when required mapped columns are
missing from either file.

VAL-02. The system must reject rows with invalid amounts, invalid dates, or
duplicate source identifiers within the same file.

VAL-03. The system must show rejected rows with the source row number and a
plain-language reason.

#### Import Summary

SUM-01. The system must show accepted row count, rejected row count, warning
count, and saved mapping status before the reviewer proceeds to matching.

SUM-02. The system must not create match suggestions until the reviewer
confirms the import summary.

#### Traceability

TRC-01. The system must preserve source file name, import session, row number,
source identifier, normalized amount, and normalized date for every accepted
deposit and invoice row.

TRC-02. The system must make preserved source-row fields available to match
evidence, exception records, and reconciliation exports.

### Acceptance Criteria

| Requirement | Scenario | Given | When | Then |
|-------------|----------|-------|------|------|
| UP-01 | Valid bank and invoice exports | Maya selected Acme Dental and chose two valid CSV files | She uploads both files | DepositMatch opens mapping review for the import session |
| MAP-02 | Reused client mapping | Acme Dental has a saved bank mapping | Maya uploads the same source type next week | The saved mapping is preselected and editable before import |
| VAL-01 | Missing required column | The invoice file lacks a mapped amount column | Maya confirms the mapping | The import is rejected before rows are accepted |
| VAL-03 | Row-level validation error | A bank row has `12OO.00` in the amount column | Maya validates the file | The row is rejected with its source row number and reason |
| SUM-02 | Reviewer has not confirmed summary | Validation completed with accepted and rejected rows | Matching would otherwise begin | No match suggestions are created until Maya confirms the summary |
| TRC-02 | Accepted row appears in evidence | A deposit row was accepted during import | Maya later reviews a suggested match | Match evidence includes the source file, row number, amount, date, and identifier |

### Non-Functional Requirements

- **Performance**: Validate and summarize files totaling 10,000 rows in under
  5 seconds on the supported production environment.
- **Security**: Do not send raw financial row values to analytics or logging
  systems.
- **Reliability**: Import confirmation must be atomic; either all accepted rows
  for the session are recorded with traceability fields or none are.
- **Usability**: All validation errors must identify the file, row number, and
  field in plain language.

## User Stories

- [US-001 - Upload CSV files for a client](../user-stories/US-001-upload-csv-files.md)
- [US-002 - Confirm or adjust column mappings](../user-stories/US-002-confirm-column-mappings.md)
- [US-003 - Review import validation results](../user-stories/US-003-review-import-validation.md)

## Edge Cases and Error Handling

- **Duplicate source identifiers**: Reject duplicate identifiers within the
  same file and show each duplicate row.
- **Locale-specific amounts**: Reject ambiguous amount formats unless the
  mapping defines the decimal and thousands separators.
- **Partial upload**: If only one file is uploaded, keep the import session in
  draft and do not validate matching readiness.
- **Saved mapping drift**: If a saved mapping references a missing column,
  require the reviewer to repair the mapping before import.

## Success Metrics

- 95% of valid pilot-firm CSV import sessions reach the import summary without
  support intervention.
- 100% of accepted rows used in match evidence include file name, row number,
  source identifier, amount, and date.
- Fewer than 1% of import sessions require mapping correction after reviewer
  confirmation.

## Constraints and Assumptions

- CSV import is the only v1 ingestion path.
- Pilot firms can provide sample bank and invoice exports before launch.
- Source files may contain customer financial data and must follow the
  `financial-data-security` concern.

## Dependencies

- **Other features**: FEAT-002 Match Suggestion Review depends on accepted
  deposits and invoices from this feature.
- **External services**: None for v1.
- **PRD requirements**: P0-1 import CSV files; P0-4 preserve match evidence;
  P0-5 create exceptions for unmatched deposits.

## Out of Scope

- Bank feed integration.
- Accounting platform API sync.
- Automatic correction of malformed CSV values.
- Matching deposits to invoices before the reviewer confirms import summary.

Reference

ActivityFrame — Define what the system should do, for whom, and how success will be measured.
Default locationdocs/helix/01-frame/features/
RequiresNone
EnablesNone
InformsUser Stories
Solution Design
Api Contracts
Test Plan
HELIX documentsdocs/helix/01-frame/features/FEAT-002-helix-cli.md
Generation prompt
Show the full generation prompt
# Feature Specification Generation Prompt

Create a feature specification that is precise enough to support design, user story creation, and test planning.

Storage Location

Store at: docs/helix/01-frame/features/FEAT-NNN-<name>.md

Purpose

A feature spec is the feature-level authority for behavior and boundaries. It translates PRD requirements into precise feature behavior, functional areas, acceptance criteria, non-functional expectations, edge cases, and feature-specific success measures.

It sits between the PRD (which defines product scope) and user stories (which define vertical slices through the feature). The feature spec owns feature behavior. User stories own user journeys. Solution and technical designs own how the behavior will be built.

Reference Anchors

Use these local resource summaries as grounding:

  • docs/resources/ibm-requirements-management.md grounds traceable, prioritized, verifiable requirements.
  • docs/resources/cucumber-executable-specifications.md grounds concrete examples as readable acceptance specifications without prescribing implementation or tooling.

Key Principles

  • Future state before current pain — describe the desired user-visible outcome before optimizing around today's broken surface. The problem statement explains why the change is needed; it should not be the only organizing frame.
  • Scope, not solution — describe what the feature must do, not how to build it. Implementation details belong in design docs.
  • Behavior, not journey — specify feature behavior and acceptance criteria. Put end-to-end user flow narrative in user stories.
  • One feature, one spec — if a spec covers two independent capabilities, split it.
  • Functional areas before requirements — when a feature spans multiple surfaces, user modes, workflow stages, or domain objects, name those areas before writing requirements. Group requirements by area instead of producing one flat list.
  • Separate similar domain objects — if readers might confuse two things, define them separately before requirements. For example, "Artifacts" are project-specific instances; "Artifact Types" are reusable methodology definitions.
  • Stories by reference — list user story IDs, don't duplicate story content. Stories are separate files with their own lifecycle.
  • Testable requirements — every functional requirement should be verifiable. If you can't describe how to test it, it's too vague.
  • Concrete acceptance examples — add examples for important rules, permissions, errors, and edge cases. They should show observable behavior, not internal steps.
  • Leave unknowns explicit — use Open Questions at the bottom rather than inventing detail you don't have.

Boundary Test

If you are writing… Put it in…
Product goals, personas, launch priority, or product-level metrics PRD
Feature behavior, boundaries, acceptance criteria, and edge cases Feature Specification
A vertical user journey through one or more feature requirements User Story
Component choices, data model, APIs, or implementation approach Solution/Technical Design
Detailed test cases, fixtures, or automation strategy Test Plan or Story Test Plan
Build sequencing and work slices Implementation Plan

Section-by-Section Guidance

Overview

Connect this feature to a specific PRD requirement. "This feature implements PRD P0-3" is better than "This feature improves the user experience."

Ideal Future State

Describe the target state in user-visible terms. A good future state answers:

  • What can the user understand, decide, or accomplish?
  • What does the product surface make clear?
  • How should the feature feel when it is working well?

For IA, documentation, onboarding, workflow, or product-surface features, this section is mandatory. It should lead the spec toward the desired experience, not merely away from the current failure mode.

Problem Statement

Same standard as the PRD: describe the failure mode, not the absence of your feature. Quantify where possible. Keep it subordinate to the future state; do not let the spec become a list of current complaints.

Functional Areas

Use this section whenever a feature has more than one surface, reader mode, workflow stage, or domain object. The area map should make clear what belongs where before requirements are written.

Examples:

  • Home, Why, Use, Artifact Types, Artifacts, Concerns, Reference, Navigation
  • Intake, Planning, Execution, Review, Reporting
  • Admin, Operator, End user, Auditor
  • API contract, CLI surface, generated docs, validation

Functional Requirements

Number each requirement for traceability. Group requirements by functional area when the feature spans multiple areas. Use stable prefixes that make the scope clear (NAV-01, TYPE-01, ART-01) or use plain FR-01 for narrow single-area features.

Each requirement should be independently testable. These are what the feature must do — user stories describe how users interact with these capabilities.

If a requirement mentions two areas joined by "and", split it unless the relationship between those areas is itself the requirement.

Acceptance Criteria

Capture observable examples for the highest-risk or most important requirements. Use concise Given/When/Then phrasing if it helps, but do not require Cucumber tooling. Each example should identify the requirement it validates and the expected result.

Non-Functional Requirements

Every NFR needs a specific target. "Must be fast" is not a requirement. "95th percentile response under 200ms" is. Only include NFRs relevant to this specific feature, not product-wide NFRs from the PRD.

User Stories

Reference by ID and title with a relative link. Do not duplicate story content — the story file is the source of truth. If stories haven't been written yet, list placeholders with [TODO: create story] and note it in Open Questions.

Edge Cases and Error Handling

Feature-level edge cases that span multiple stories. If an edge case is specific to one story, it belongs in that story's file.

Success Metrics

Feature-specific metrics, not product-level metrics from the PRD. How do you know this specific feature is working as intended?

Dependencies

Name specific feature IDs, external APIs, and PRD requirement numbers. "Depends on auth" is too vague. "Depends on FEAT-002 (auth middleware) and the OAuth2 provider API" is specific.

Out of Scope

Each item should prevent a plausible scope question during implementation. "Not a replacement for the database" is only useful if someone might think it is.

Quality Checklist

After drafting, verify every item. If any blocking check fails, revise before committing.

Blocking

  • Overview links to a specific PRD requirement
  • Ideal Future State is present for broad product-surface, workflow, IA, or documentation features
  • Functional Areas is present when the feature spans multiple surfaces, workflows, user modes, or domain objects
  • Similar domain objects are separated before requirements are written
  • Functional requirements are grouped by area when a flat list would mix unrelated scopes
  • Every functional requirement is testable
  • Acceptance criteria cover the highest-risk requirements with observable examples
  • Non-functional requirements have specific numeric targets
  • User stories are referenced by ID (not duplicated inline)
  • Dependencies name specific feature IDs and external systems
  • No [NEEDS CLARIFICATION] markers remain

Warning

  • Problem statement quantifies the pain
  • At least one feature-level edge case documented
  • Success metrics are feature-specific (not product-level)
  • Out of scope excludes something plausible
Template
Show the template structure
---
ddx:
  id: FEAT-XXX
---

Feature Specification: FEAT-XXX — [Feature Name]

Feature ID: FEAT-XXX Status: [Draft | Specified | Approved] Priority: [P0 | P1 | P2] Owner: [Team/Person]

Overview

[What this feature is and why it exists. 2-3 sentences connecting this feature to a specific PRD requirement.]

Ideal Future State

[Describe the future product behavior once this feature is working well. Focus on what users can understand, decide, or accomplish. For broad product-surface, workflow, IA, or documentation features, this section should come before the problem framing so requirements are pulled toward the desired outcome instead of only reacting to current pain.]

Problem Statement

  • Current situation: [What exists now — be specific]
  • Pain points: [What is not working and for whom]
  • Desired outcome: [What success looks like — measurable]

Functional Areas

[For features that span more than one surface, user mode, workflow stage, or domain object, map the areas before writing requirements. This prevents unrelated requirements from collapsing into one list. Omit only when the feature is a single narrow capability.]

Area User question or job Feature responsibility
[Area] [What the user needs to know or do] [What this feature must provide]

Requirements

Functional Requirements by Area

[Each requirement should be testable. Group requirements by functional area when the feature has multiple areas. Use stable prefixes that make the scope clear, such as HOME-01, TYPE-01, NAV-01, or FR-01 for narrow features.]

[Area Name]

[PREFIX-01]. [Requirement] [PREFIX-02]. [Requirement]

Acceptance Criteria

[Capture observable examples for the highest-risk or most important requirements. Given/When/Then phrasing is allowed but not required. Do not describe implementation steps.]

Requirement Scenario Given When Then
[PREFIX-01] [Observable case] [Starting state] [User/system action] [Expected result]

Non-Functional Requirements

  • Performance: [Specific target, e.g., "95th percentile response < 200ms"]
  • Security: [Specific requirement, not "must be secure"]
  • Scalability: [Specific target, e.g., "handles 10k concurrent users"]
  • Reliability: [Specific target, e.g., "99.9% uptime"]

User Stories

[List the user stories that implement this feature. Each story is a separate file in docs/helix/01-frame/user-stories/. Reference by ID — do not duplicate story content here.]

Edge Cases and Error Handling

[Feature-level edge cases that span multiple stories. Story-specific edge cases belong in the story file.]

  • [Condition]: [Expected behavior]

Success Metrics

[How do we know this feature is working? Metrics specific to this feature, not the product-level metrics from the PRD.]

  • [Metric with target]

Constraints and Assumptions

  • [Constraint or assumption specific to this feature]

Dependencies

  • Other features: [FEAT-XXX if this feature depends on another]
  • External services: [APIs, libraries, or systems this feature requires]
  • PRD requirements: [Which P0/P1/P2 requirements this addresses]

Out of Scope

[What this feature explicitly does not cover. Each item should prevent a plausible scope question.]

Review Checklist

Use this checklist when reviewing a feature specification:

  • Overview connects this feature to a specific PRD requirement
  • Ideal future state describes the desired user-visible outcome, not only current problems
  • Problem statement describes what exists now and what is broken — not just what is wanted
  • Functional areas are mapped when the feature spans multiple surfaces, workflows, or domain objects
  • Requirements are grouped by functional area when a flat list would mix unrelated scopes
  • Domain objects that sound similar are explicitly separated (for example, artifact instances vs artifact types)
  • Every functional requirement is testable — you can write an assertion for it
  • Acceptance criteria cover important happy paths, errors, and edge cases with observable outcomes
  • Non-functional requirements have specific numeric targets, not "must be fast"
  • Edge cases cover realistic failure scenarios, not just happy paths
  • Success metrics are specific to this feature, not product-level metrics
  • Dependencies reference real artifact IDs (FEAT-XXX, external APIs)
  • Out of scope excludes things someone might reasonably assume are in scope
  • No implementation details ("use X library", "create Y table") — specify WHAT not HOW
  • Feature is consistent with governing PRD requirements
  • No [NEEDS CLARIFICATION] markers remain unresolved for P0 features