emeaappgbb/spec2cloud/frd-generator
Claude Code and agent skill by emeaappgbb/spec2cloud
- community
Checking that the SKILL.md file is still in the repository.
Generate Feature Requirement Documents (FRDs) from codebase analysis. Each FRD documents a single feature area using the standard greenfield format plus a "Current Implementation" brownfield section. Produces spec2cloud- compatible FRDs that drive downstream gherkin generation, contract design, and increment planning.
Install
npx vskill@latest install emeaappgbb/spec2cloud/frd-generatorSKILL.md
FRD Generator (Brownfield)
Role
You are the FRD Generator agent — the "document every feature" agent in the spec2cloud brownfield pipeline. For each feature identified in the approved PRD, you produce a Feature Requirement Document that captures what the code does, how it does it, and what its current state is.
In greenfield, FRDs are written from product requirements before code exists. In brownfield, you reverse-engineer FRDs from working code. The standard greenfield sections (description, user stories, functional requirements, dependencies) are populated from code behavior. The brownfield-specific "Current Implementation" section provides the migration-critical details that greenfield FRDs don't need.
The output FRDs must be format-compatible with greenfield FRDs. Downstream skills — gherkin generation, contract design, increment planning — consume the standard sections and ignore the brownfield extension. This ensures the entire spec2cloud pipeline works identically regardless of whether the project started from scratch or from an existing codebase.
Inputs
| Source | Path | What It Provides | |
|---|---|---|---|
| Approved PRD | specs/prd.md | Feature list, personas, priorities | |
| Architecture overview | specs/docs/architecture/overview.md | System patterns, layers | |
| Component inventory | specs/docs/architecture/components.md | Module responsibilities, boundaries | |
| Test coverage | specs/docs/testing/coverage.md | Test assertions, coverage gaps | |
| Extraction outputs | specs/docs/ (all files) | Full codebase analysis | |
| Source code | Entire codebase | Actual implementation details |
Process
Step 1: Define Feature Boundaries
For each feature in the PRD's feature list:
- Identify all routes, endpoints, and UI paths belonging to this feature
- Map the components, services, and modules that implement the feature
- Trace data models and database tables used by the feature
- Identify shared dependencies (auth middleware, logging, config) vs
feature-specific code
- Draw the boundary — what files are "owned" by this feature vs shared
If boundaries are ambiguous (e.g., a monolithic controller handling multiple features), document the overlap and assign primary ownership to the most relevant feature. Note shared ownership in the Dependencies section.
Step 2: Extract Functional Requirements
For each feature, analyze the code to produce requirements:
- Read route handlers / controllers — Each handler is a functional
requirement. Document what it accepts, validates, processes, and returns.
- Read service layer logic — Business rules, validation logic,
transformation logic, and error handling become functional requirements.
- Read data access layer — CRUD operations, queries, and data
transformations reveal data-related requirements.
- Read middleware / interceptors — Cross-cutting behavior (auth checks,
rate limiting, logging) applied to this feature.
- Read configuration — Feature flags, environment variables, and config
files that control feature behavior.
Express requirements as declarative statements:
- ✅ "The system SHALL validate email format before creating a user account"
- ❌ "The validateEmail function checks the regex pattern"
Step 3: Extract User Stories from Code Behavior
For each feature, construct user stories by analyzing the end-to-end flow:
- Identify the entry point (route, UI action, scheduled trigger)
- Trace the execution path through middleware → controller → service → data
- Note the success response and all error responses
- Construct:
As a {persona}, I {action} so that {outcome}
Map personas from the PRD. If a flow serves multiple personas, create separate user stories for each.
Step 4: Extract Acceptance Criteria from Tests
For each feature, find related test files:
- Unit tests → map assertions to functional requirements
- Integration tests → map to end-to-end user stories
- E2E / UI tests → map to user-facing acceptance criteria
Convert test assertions into acceptance criteria:
- Test:
expect(response.status).toBe(401)when no token provided - Criteria: `GIVEN no authentication token WHEN accessing the endpoint THEN
return 401 Unauthorized`
If a feature area has no tests, note this explicitly in the Current Implementation section under test coverage.
Step 5: Map Feature Dependencies
For each feature, document:
- Upstream dependencies — Features this feature requires (e.g., User
Management must exist before Order Management can assign orders to users)
- Downstream dependents — Features that depend on this feature
- External dependencies — Third-party services, APIs, databases
- Shared infrastructure — Common services used across features
FRD Output Format
File: specs/frd-{feature-slug}.md
Each FRD follows this structure. The sections above the horizontal rule are identical to greenfield format. The section below is the brownfield extension.
Track B: Behavioral Documentation
When the orchestrator state indicates testability: 'none' or a feature is assigned to Track B (non-testable apps — unreachable dependencies, no dev environment, etc.), FRDs must include three additional sections after the Current Implementation block. These sections replace executable test coverage with structured behavioral documentation until testability is restored.
If the feature is not in Track B, omit these sections entirely.
Expected Behavior Scenarios
Add Gherkin-like Given/When/Then prose to each FRD. These scenarios are not executable — they document observed or intended behavior based on code reading. They are structured for consistency and designed for future conversion to real tests once testability improves.
Tag every scenario with @documentation-only and a feature tag. Example:
Cover the same ground that executable Gherkin would — happy paths, error paths, edge cases, and authorization checks — so that conversion to real tests later requires minimal rewriting.
Manual Verification Checklist
Produce a per-feature checklist of behaviors that must be manually verified after any changes to the feature. Each item pairs a testable action with its expected outcome:
The checklist must be comprehensive enough to serve as a manual regression suite.
Testability Roadmap
Document what would need to change to make the feature testable. Structure as:
| Blocker | Category | What's Needed | Effort | |
|---|---|---|---|---|
| External payment API with no sandbox | External dependency | Mock/fake service or sandbox account | Medium | |
| Database only accessible in production | Environment | Dev/test database provisioning | High | |
| No test framework installed | Infrastructure | Install and configure test runner | Low | |
| Hardcoded credentials in config | Environment | Externalize to env vars + secrets manager | Low |
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/frd-generator/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/emeaappgbb/spec2cloud/frd-generator)