Receber por email
← Voltar para o catálogo

feature-spec

Write detailed feature specifications with functional requirements, edge cases, data models, API contracts, and UX flows. Create comprehensive technical specifications that enable clear implementation.

72estrelas
Atualizado há 8 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add w95/awesome-claude-corporate-skills

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/feature-spec/svg)](https://www.skillteca.com.br/skills/feature-spec)

Alerta por categoria

Receba novas skills de Design e Frontend toda segunda

1 email curto, só com as skills novas de Design e Frontend. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Feature Spec

Overview

The Feature Spec skill enables product managers to write detailed, implementation-ready feature specifications that bridge design and engineering. It combines functional requirements, technical specifications, and UX flows into a single source of truth.

When to Use This Skill

  • Defining technical requirements for features
  • Specifying API contracts and data models
  • Documenting edge cases and error handling
  • Creating UX flows and wireframes
  • Ensuring design and engineering alignment
  • Providing engineering with complete specifications
  • Documenting complex interactions and workflows

Feature Specification Template

Executive Summary

Feature Name: [Clear, descriptive name] Feature ID: [Unique identifier] Owner (PM): [Name] Owner (Engineering): [Name] Status: [Draft / Review / Approved / In Development] Last Updated: [Date]

One-sentence description: [What does this feature do in user terms]

Business context: [Why are we building this, customer problem, business goal]

Key metrics: [How success will be measured]

Functional Requirements

Primary Use Cases

Use Case 1: [Name]

  • Actor: [Who]
  • Precondition: [System state before]
  • Main flow:
  • [Step 1]
  • [Step 2]
  • [Step 3]
  • Alternative flows:
  • [If condition], then [steps]
  • Postcondition: [System state after]
  • Error handling: [What goes wrong]

Detailed Functional Specifications

Requirement 1: Real-Time Updates

Description: When a team member updates a task, all other team members viewing that project should see the update within 2 seconds.

Acceptance criteria:

  • Update broadcasts to all connected clients within 2 seconds
  • Update includes: task ID, new status, old status, timestamp, user who made change
  • Broadcast uses WebSocket (not polling)
  • Works across different devices and browsers
  • Offline users receive update upon reconnection

Technical notes:

  • Requires persistent connection management
  • Handle network failures gracefully
  • Broadcast to all except sender (to avoid echo)

Requirement 2: Activity Feed Display

Description: Users can view a timeline of all changes to a project in reverse chronological order.

Acceptance criteria:

  • Feed shows all activities (task updates, comments, assignments, status changes)
  • Sorted by timestamp, newest first
  • Each item shows: actor, action, target object, timestamp, context
  • Feed loads initial 20 items, pagination for more
  • User can filter by: activity type, assignee, task, date range
  • Search activity by keywords

Technical notes:

  • Paginate to prevent massive data loads
  • Create composite activity from multiple sub-events (group updates in same minute)
  • Store in activity table with denormalized fields for performance

Requirement 3: Notification Delivery

Description: Users receive notifications when activities relevant to them occur.

Acceptance criteria:

  • User receives notification within 5 seconds of event
  • Notification includes: who, what action, what object, context link
  • User can configure which activity types trigger notifications
  • User can choose delivery method: in-app, email, Slack, mobile push
  • User can set do-not-disturb hours (no notifications outside hours)
  • Notifications grouped to prevent fatigue (max 1 email per hour)

Technical notes:

  • Different notification channels have different latency (email slower than in-app)
  • Respect user preferences in configuration
  • Implement batching for notifications

Edge Cases and Error Handling

Error Scenarios

Scenario 1: Network Disconnection During Status Update

  • User updates task status on mobile
  • Network drops before confirmation
  • Expected behavior:
  • UI shows "pending" state
  • Auto-retry when connection restored
  • Show error if retry fails after 3 attempts
  • Allow manual retry
  • Technical approach:
  • Queue updates locally (IndexedDB)
  • Sync when connection restored
  • Handle conflicts if status changed during disconnect

Scenario 2: Duplicate Update Event

  • Same update received twice (network retry)
  • Expected behavior:
  • Deduplicate on client and server
  • No duplicate activity feed entry
  • Idempotent update (safe to apply twice)
  • Technical approach:
  • Include event ID with update
  • Check for duplicate on server before processing
  • Return 200 OK even if already processed

Scenario 3: Concurrent Updates to Same Task

  • Two users update same task simultaneously
  • Expected behavior:
  • Both updates apply (not last-write-wins)
  • No data loss
  • Feed shows both updates in order
  • No conflicts or corruption
  • Technical approach:
  • Use operational transformation or conflict-free replicas
  • Timestamp-based ordering for feed
  • Test with load testing

Scenario 4: User Permissions Changed During Viewing

  • User viewing project loses permission (removed from team)
  • Expected behavior:
  • Activity feed disappears or error message
  • User redirected to accessible page
  • No sensitive data leaked
  • Technical approach:
  • Server checks permission before returning data
  • Client handles 403 Forbidden gracefully
  • Show clear error message

Scenario 5: Very Large Activity Feeds (1000+ items)

  • Project with year-long history of activities
  • Expected behavior:
  • Feed still loads quickly
  • Pagination works smoothly
  • Search performance acceptable
  • Technical approach:
  • Index on timestamps and filters
  • Database query optimization
  • Virtual scrolling on client

Data Model Specifications

Database Schema

Table: activities

CREATE TABLE activities (
  id UUID PRIMARY KEY,
  project_id UUID NOT NULL REFERENCES projects(id),
  actor_id UUID NOT NULL REFERENCES users(id),
  action_type VARCHAR(50) NOT NULL,
    -- task_status_changed, task_comment_added, task_assigned, etc.
  target_type VARCHAR(50) NOT NULL,
    -- task, comment, assignment, project
  target_id UUID NOT NULL,
    -- ID of the object being changed
  old_value JSONB,
    -- Previous state (for updates): { "status": "todo" }
  new_value JSONB,
    -- New state: { "status": "done" }
  metadata JSONB,
    -- Extra context: { "duration_hours": 8, "effort_score": 5 }
  created_at TIMESTAMP NOT NULL DEFAULT NOW(),
  updated_at TIMESTAMP NOT NULL DEFAULT NOW(),

  CONSTRAINT check_values CHECK (
    (old_value IS NOT NULL OR new_value IS NOT NULL)
  )
);

CREATE INDEX idx_activities_project_created
  ON activities(project_id, created_at DESC);

CREATE INDEX idx_activities_actor_created
  ON activities(actor_id, created_at DESC);

Table: notification_preferences

CREATE TABLE notification_preferences (
  id UUID PRIMARY KEY,
  user_id UUID NOT NULL UNIQUE REFERENCES users(id),

  -- Activity type toggles
  task_status_changed BOOLEAN DEFAULT true,
  task_comment_added BOOLEAN DEFAULT true,
  task_assigned_to_me BOOLEAN DEFAULT true,

  -- Delivery method (can choose multiple)
  email_enabled BOOLEAN DEFAULT true,
  in_app_enabled BOOLEAN DEFAULT true,
  slack_enabled BOOLEAN DEFAULT false,
  mobile_push_enabled BOOLEAN DEFAULT true,

  -- Do not disturb
  dnd_enabled BOOLEAN DEFAULT false,
  dnd_start TIME,  -- 22:00
  dnd_end TIME,    -- 08:00

  -- Batching
  email_batch_frequency VARCHAR(20) DEFAULT 'hourly',
    -- realtime, daily, weekly, never

  created_at TIMESTAMP NOT NULL DEFAULT NOW(),
  updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);

Table: activity_subscriptions

CREATE TABLE activity_subscriptions (
  id UUID PRIMARY KEY,
  user_id UUID NOT NULL REFERENCES users(id),
  resource_type VARCHAR(50) NOT NULL,  -- task, project
  resource_id UUID NOT NULL,
  subscription_type VARCHAR(50) NOT NULL,
    -- all_activities, mentions_only, assigned_only
  created_at TIMESTAMP NOT NULL DEFAULT NOW()
);

CREATE UNIQUE INDEX idx_user_resource_subscription
  ON activity_subscriptions(user_id, resource_type, resource_id);

Data Dictionary

Field: action_type

  • Type: VARCHAR(50)
Compartilhar X LinkedIn