memstack-product-feature-spec
Skill425 starsChanged 5 months agoMITView on GitHub
Use this skill when the user says 'feature spec', 'spec this feature', 'write a spec', 'functional requirements', or needs a detailed specification for one feature with user flows, edge cases, API definitions, and acceptance criteria. Do NOT use for full PRDs or user story generation.
In this repository87 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- memstack-automation-api-integrationSkill
- memstack-automation-content-pipelineSkill
- memstack-automation-cron-schedulerSkill
- memstack-automation-hosted-mcp-catalogSkill
- memstack-automation-n8n-workflow-builderSkill
- memstack-automation-webhook-designerSkill
- memstack-business-client-onboardingSkill
- memstack-business-contract-templateSkill
- memstack-business-financial-modelSkill
- memstack-business-freelancer-toolkitSkill
- memstack-business-gdprSkill
- memstack-business-invoice-generatorSkill
- memstack-business-licensingSkill
- memstack-business-proposal-writerSkill
- memstack-business-scope-of-workSkill
- memstack-business-sop-builderSkill
- compressSkill
- memstack-content-blog-postSkill
- memstack-content-email-sequenceSkill
- memstack-content-landing-page-copySkill
- memstack-content-newsletterSkill
- memstack-content-product-descriptionSkill
- memstack-content-tiktok-scriptSkill
- memstack-content-twitter-threadSkill
- memstack-content-youtube-scriptSkill
- memstack-deployment-ci-cd-pipelineSkill
- memstack-deployment-docker-setupSkill
- memstack-deployment-domain-sslSkill
- memstack-deployment-hetzner-setupSkill
- memstack-deployment-netlify-deploySkill
- memstack-deployment-railway-deploySkill
- memstack-development-api-designerSkill
- memstack-development-changelog-generatorSkill
- memstack-development-code-reviewerSkill
- memstack-development-mentorSkill
- memstack-development-migration-plannerSkill
- memstack-development-performance-auditSkill
- memstack-development-refactor-plannerSkill
- memstack-development-test-writerSkill
- memstack-development-webapp-testingSkill
- diarySkill
- echoSkill
- familiarSkill
- forgeSkill
- goalSkill
- governorSkill
- grimoireSkill
- humanizeSkill
- memstack-marketing-competitor-analysisSkill
- memstack-marketing-facebook-adSkill
- memstack-marketing-google-adSkill
- memstack-marketing-launch-planSkill
- memstack-marketing-lead-magnetSkill
- memstack-marketing-marketplace-submitSkill
- memstack-marketing-pricing-strategySkill
- memstack-marketing-sales-funnelSkill
- memstack-marketing-webinar-scriptSkill
- memstack-product-feedback-analyzerSkill
- memstack-product-mvp-scoperSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
When this skill activates, output:
- Distinctive: line 43
If the user hasn't provided details, ask:
- Very specific: line 176
Use Given/When/Then format for each criterion:
- Distinctive: line 206
Write criteria for EVERY in-scope item (not just the happy path)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Feature Spec: Writing feature specification...
Creates a detailed specification for a single feature including user story, acceptance criteria, user flows, edge cases, API definitions, dependencies, and effort estimate.
Activation
When this skill activates, output:
Feature Spec: Writing feature specification...
Then execute the protocol below.
Context Guard
| Context | Status |
| User says "feature spec", "spec this feature", "write a spec" | ACTIVE |
| User says "functional requirements" for a specific feature | ACTIVE |
| User needs a detailed breakdown of ONE feature for engineering | ACTIVE |
| User wants a full product requirements document | DORMANT: use PRD Writer |
| User wants multiple user stories for sprint planning | DORMANT: use User Story Generator |
Common Mistakes
| Mistake | Why It's Wrong |
| "Spec the happy path only" | Edge cases cause 80% of bugs. Spec them upfront or pay for them in QA. |
| "Skip the API contract" | Frontend and backend need to agree on the contract before building in parallel. |
| "No acceptance criteria" | Without testable criteria, "done" is subjective. Define done before starting. |
| "Spec the UI, not the behavior" | UIs change. Behavior specs survive redesigns. Focus on what happens, not what it looks like. |
| "Forget to list what's out of scope" | Ambiguity invites scope creep. Explicitly list what this feature does NOT include. |
Protocol
Step 1: Gather Feature Context
If the user hasn't provided details, ask:
- Feature name: what are you building?
- User problem: what problem does this feature solve?
- Target user: which persona uses this feature?
- Context: is this part of a larger project? What already exists?
- Constraints: timeline, tech stack, or design constraints?
Step 2: Write Feature Brief
## Feature Brief
**Feature:** [Feature name]
**Owner:** [Product owner / author]
**Date:** [Date]
**Status:** [Draft / In Review / Approved]
### Summary
[2-3 sentences: what this feature does and why it matters]
### User Story
As a [persona], I want to [action] so that [outcome].
### Business Value
- [Why this matters for the business: revenue, retention, efficiency]
- [Metric this feature is expected to move]
### Scope
**In scope:**
- [Specific capability 1]
- [Specific capability 2]
- [Specific capability 3]
**Out of scope:**
- [Explicitly excluded capability 1]
- [Explicitly excluded capability 2]Step 3: Define User Flows
Primary flow (happy path):
### Primary Flow: [Action Name]
**Entry point:** [Where/how the user accesses this feature]
**Preconditions:** [What must be true: logged in, has permission, etc.]
1. User [action: clicks, enters, selects]
→ System [response: shows, loads, validates]
2. User [action]
→ System [response]
3. User [action: confirms, submits]
→ System [response: saves, sends, updates]
4. User sees [confirmation: success message, updated state, redirect]
**Exit state:** [What the system looks like after completion]Alternative flows:
### Alternative Flow: [Variation Name]
**Trigger:** [When this flow happens instead of the primary]
1. [Step that diverges from primary flow]
2. [How the system handles the variation]
3. [Where it rejoins the primary flow, or how it terminates]Step 4: Document Edge Cases & Error States
| # | Scenario | Expected Behavior | Priority |
| E1 | User submits empty form | Show inline validation errors on required fields | Must handle |
| E2 | Network request fails | Show error toast, preserve form state, offer retry | Must handle |
| E3 | User double-clicks submit | Disable button after first click, prevent duplicate submission | Must handle |
| E4 | Session expires during flow | Save draft state, redirect to login, restore after auth | Should handle |
| E5 | Concurrent edit by another user | Show conflict notification, offer merge or overwrite | Should handle |
| E6 | Input exceeds character limit | Enforce limit in UI, validate server-side, show remaining count | Must handle |
| E7 | User navigates away with unsaved changes | Show "Unsaved changes" confirmation dialog | Should handle |
Edge case discovery checklist:
- What happens with empty/null input?
- What happens with maximum-length input?
- What happens with special characters or Unicode?
- What happens if the user has no permission?
- What happens offline or with slow network?
- What happens with concurrent actions?
- What happens if a dependency (API, service) is down?
Step 5: Define API Contract (if applicable)
### API Endpoints
#### POST /api/[resource]
**Purpose:** [What this endpoint does]
**Auth:** Required, [Bearer token / API key / session]
**Rate limit:** [X requests per minute]
**Request:**
```json
{
"field1": "string (required): [description]",
"field2": "number (optional): [description, default: X]",
"field3": "enum (required): [allowed values: a, b, c]"
}Response (200):
{
"id": "string: [description]",
"field1": "string",
"createdAt": "ISO 8601 datetime"
}Error responses:
| Status | Code | Message | When |
| 400 | VALIDATION_ERROR | "field1 is required" | Missing required field |
| 401 | UNAUTHORIZED | "Authentication required" | No/invalid token |
| 403 | FORBIDDEN | "Insufficient permissions" | User lacks permission |
| 409 | CONFLICT | "Resource already exists" | Duplicate creation |
| 429 | RATE_LIMITED | "Too many requests" | Rate limit exceeded |
### Step 6: Write Acceptance Criteria
Use Given/When/Then format for each criterion:
```markdown
### Acceptance Criteria
**AC-1: [Primary happy path]**
Given [precondition]
When [user action]
Then [expected outcome]
And [additional verification]
**AC-2: [Validation]**
Given [precondition]
When [user submits invalid input]
Then [error message] is displayed
And [form state is preserved]
**AC-3: [Permission check]**
Given [user without permission]
When [user attempts action]
Then [access denied response]
And [appropriate error shown]
**AC-4: [Edge case]**
Given [edge condition]
When [action]
Then [graceful handling]Acceptance criteria rules:
- Write criteria for EVERY in-scope item (not just the happy path)
- Each criterion must be independently testable
- Include at least one criterion for: happy path, validation, error, and permission
- QA should be able to write test cases directly from these criteria
Step 7: Estimate Effort & Dependencies
Effort estimate:
| Component | Effort | Confidence | Notes |
| Frontend UI | [X days] | High/Med/Low | [Notes] |
| Backend API | [X days] | High/Med/Low | [Notes] |
| Database changes | [X days] | High/Med/Low | [Notes] |
| Testing (unit + integration) | [X days] | High/Med/Low | [Notes] |
| Code review + QA | [X days] | High/Med/Low | [Notes] |
| Total | [X days] |
Dependencies:
| Dependency | Owner | Status | Blocking? |
| [Design mockups for X] | Design | [Done/In Progress/Not Started] | Yes/No |
| [API from service Y] | Backend team | [Done/In Progress/Not Started] | Yes/No |
| [Third-party SDK setup] | DevOps | [Done/In Progress/Not Started] | Yes/No |
Technical considerations:
- [Any architectural decisions needed]
- [Migration requirements]
- [Performance implications]
- [Security considerations]
Output Format
# Feature Spec: [Feature Name]
**Owner:** [Name]
**Date:** [Date]
**Status:** [Draft / In Review / Approved]
**Estimated effort:** [X days]
## 1. Feature Brief
[From Step 2: summary, user story, scope]
## 2. User Flows
### Primary Flow
[From Step 3]
### Alternative Flows
[From Step 3]
## 3. Edge Cases & Error States
[Table from Step 4]
## 4. API Contract
[From Step 5]
## 5. Acceptance Criteria
[From Step 6]
## 6. Effort & Dependencies
[From Step 7]
## 7. Open Questions
[Anything that needs design, engineering, or stakeholder input]Completion
Feature Spec: Complete!
Feature: [Name]
User story: As a [persona], I want to [action] so that [outcome]
Acceptance criteria: [Count]
Edge cases documented: [Count]
API endpoints: [Count]
Estimated effort: [X days]
Next steps:
1. Review with engineering for technical feasibility
2. Review with design for UX validation
3. Get stakeholder approval on scope
4. Break into tasks/subtasks for sprint planning
5. Write unit tests based on acceptance criteriaLevel History
- Lv.1: Base: Feature brief template (summary, user story, scope), primary + alternative user flow documentation, edge case table with discovery checklist, API contract template (request, response, errors), Given/When/Then acceptance criteria, effort estimation table with confidence levels, dependency tracking. (Origin: MemStack Pro v3.2, Mar 2026)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

