Loading...
Loading...
LOAD THIS SKILL when: gathering requirements for new features, user mentions 'requirements', 'requirements-start', 'requirements-end', 'requirements-status', 'requirements-current', 'requirements-list', 'requirements-remind'. Covers structured Q&A workflow with 5-phase requirements gathering, codebase analysis, and spec generation.
npx skill4agent add blogic-cz/blogic-marketplace requirements`date "+%Y-%m-%d-%H%M"`requirements/[timestamp]-[slug]/00-initial-request.mdmetadata.jsonrequirements/.current-requirementapps/web-app/packages/## Q1: Will this feature be organization-scoped (vs user-scoped)?
**Default if unknown:** Yes (most project features are org-scoped)
## Q2: Will users interact with this through a new page/route?
**Default if unknown:** Yes (most features have dedicated UI)
## Q3: Does this require new database tables?
**Default if unknown:** No (prefer extending existing schema)
## Q4: Will this integrate with external services/APIs?
**Default if unknown:** No (unless explicitly mentioned)
## Q5: Should this be accessible to all org members or only admins?
**Default if unknown:** All members (with appropriate role checks)01-discovery-questions.md02-discovery-answers.mdmetadata.jsonapps/web-app/src/apps/web-app/src/*/trpc/packages/db/src/schema.tsapps/web-app/src/shared/03-context-findings.md## Codebase Analysis
### Similar Features Found
- [Feature name] at [path] - [why relevant]
### Relevant Files to Modify/Extend
- `apps/web-app/src/[module]/trpc/[router].ts` - [what to add]
- `packages/db/src/schema.ts` - [new tables if needed]
### Patterns to Follow
- TRPC router pattern from [example]
- TanStack route pattern from [example]
- Form pattern from [example]
### Technical Constraints
- [Any limitations discovered]
### Integration Points
- [Services/modules this will interact with]## Q1: Should we extend the existing [Router]Router at [path]?
**Default if unknown:** Yes (maintains consistency)
## Q2: For the UI, should we follow the pattern from [similar feature]?
**Default if unknown:** Yes (established pattern)
## Q3: Should this data be cached in TanStack Query or fetched fresh?
**Default if unknown:** Cached (standard for most data)
## Q4: Should we add E2E tests for this flow?
**Default if unknown:** Yes (if user-facing feature)
## Q5: Should validation happen client-side, server-side, or both?
**Default if unknown:** Both (Zod on frontend, TRPC input validation on backend)04-detail-questions.md05-detail-answers.md06-requirements-spec.md# Requirements Specification: [Name]
Generated: [timestamp]
Status: Complete
## Overview
[Problem statement and solution summary]
## Functional Requirements
### User Stories
- As a [role], I want to [action] so that [benefit]
### Acceptance Criteria
- [ ] [Testable criterion]
## Technical Requirements
### Database Changes
- New table: [name] in `packages/db/src/schema.ts`
- Fields: [list with types]
### TRPC Router
- Location: `apps/web-app/src/[module]/trpc/[name].ts`
- Procedures: [list]
- Use `protectedMemberAccessProcedure` for org-scoped operations
### Frontend Routes
- New route: `/app/[path]`
- Components: [list]
- Pattern to follow: [reference]
### Files to Create/Modify
1. `packages/db/src/schema.ts` - Add table
2. `apps/web-app/src/[module]/trpc/[name].ts` - Add router
3. `apps/web-app/src/routes/app/[path]/route.tsx` - Add page
## Implementation Notes
### Patterns to Follow
- TRPC: See `trpc-patterns` skill
- Frontend: See `tanstack-frontend` skill
### Testing
- Unit tests in `packages/services/src/__tests__/`
- E2E tests in `apps/web-app/e2e/`
## Assumptions
[Any defaults used for unanswered questions]{
"id": "feature-slug",
"started": "ISO-8601-timestamp",
"lastUpdated": "ISO-8601-timestamp",
"status": "active",
"phase": "discovery|context|detail|complete",
"progress": {
"discovery": { "answered": 0, "total": 5 },
"detail": { "answered": 0, "total": 5 }
},
"contextFiles": ["paths/of/files/analyzed"],
"relatedFeatures": ["similar features found"]
}/requirements-statusrequirements/.current-requirementNo active requirement to end.
Use /requirements-list to see all requirements.Ending requirement: [name]
Current phase: [phase] ([X/Y] complete)
What would you like to do?
1. Generate spec with current information
2. Mark as incomplete for later
3. Cancel and delete
Choose (1/2/3):06-requirements-spec.mdmetadata.json# Requirements Specification: [Name]
Generated: [timestamp]
Status: Complete with [N] assumptions
## Overview
[Problem statement from initial request]
[Solution summary based on answers]
## Functional Requirements
[Based on answered questions]
### User Stories
- As a [role], I want to [action] so that [benefit]
### Acceptance Criteria
- [ ] [Criterion based on answers]
## Technical Requirements
### Database Changes
[If applicable based on answers]
### TRPC Router
- Location: `apps/web-app/src/[module]/trpc/`
- Procedures needed: [list]
### Frontend Routes
- Path: `/app/[route]`
- Components: [list]
### Files to Create/Modify
[Specific paths in project codebase]
## Implementation Notes
### Patterns to Follow
- TRPC: Load skill `trpc-patterns`
- Frontend: Load skill `tanstack-frontend`
### Validation
- Run `bun run check` after implementation
- Add E2E tests if user-facing
## Assumptions (REVIEW THESE)
[List any defaults used for unanswered questions]
- ASSUMED: [Question] -> [Default used] because [reason]
## Next Steps
1. Review assumptions above
2. Start implementation
3. Run `/code-review` before PRmetadata.json{
"status": "incomplete",
"lastUpdated": "[timestamp]",
"pausedAt": "[phase]",
"remainingQuestions": [N]
}Requirement marked as incomplete.
Progress saved:
- Phase: [current phase]
- Questions answered: [X/Y]
- Last activity: [now]
To resume later: /requirements-statusAre you sure you want to delete this requirement?
All gathered information will be lost.
Type 'yes' to confirm:.current-requirementRequirement cancelled and deleted.
Start fresh: /requirements-start [description].current-requirementRequirements complete!
Spec saved: requirements/[folder]/06-requirements-spec.md
Next steps:
1. Review the spec, especially ASSUMPTIONS section
2. Start implementation
3. Use /code-review before creating PR
View spec: Read @requirements/[folder]/06-requirements-spec.mdrequirements/.current-requirementNo active requirement gathering session.
Options:
- Start new: /requirements-start [description]
- List all: /requirements-listmetadata.jsonActive Requirement: [name]
Started: [time ago]
Phase: [Discovery/Context/Detail/Complete]
Progress: [X/Y] questions answered
--- Recent Progress ---
[Show last 3 answered questions with responses]
--- Next Question ---
[Show next unanswered question with default]
Type 'yes', 'no', or 'idk' (uses default)01-discovery-questions.md04-detail-questions.mdyesynonidkdefaultd02-discovery-answers.md05-detail-answers.mdmetadata.json02-discovery-answers.md03-context-findings.md04-detail-questions.md05-detail-answers.md06-requirements-spec.md.current-requirementContinue: Just respond to the question
Skip phase: /requirements-end (generates spec with current info)
View all: /requirements-current
List all: /requirements-listrequirements/.current-requirementNo active requirement.
Recent completed requirements:
[Show last 3 completed with dates]
Start new: /requirements-start [description]
List all: /requirements-listrequirements/[timestamp]-[slug]/
├── 00-initial-request.md # Original user request
├── 01-discovery-questions.md # Context discovery questions
├── 02-discovery-answers.md # User's answers (after all asked)
├── 03-context-findings.md # AI's codebase analysis
├── 04-detail-questions.md # Expert requirements questions
├── 05-detail-answers.md # User's detailed answers
├── 06-requirements-spec.md # Final requirements document
└── metadata.json # Status tracking===========================================
Current Requirement: [name]
===========================================
Duration: [time since start]
Phase: [Initial Setup/Discovery/Context/Detail/Complete]
Progress: [total answered]/[total questions]
-------------------------------------------
INITIAL REQUEST
-------------------------------------------
[Content from 00-initial-request.md]
-------------------------------------------
CODEBASE OVERVIEW (Phase 1)
-------------------------------------------
Architecture: TanStack Start + TRPC + PostgreSQL + Drizzle
Relevant modules identified:
- [module 1]: [why relevant]
- [module 2]: [why relevant]
-------------------------------------------
DISCOVERY PHASE (5/5 complete)
-------------------------------------------
Q1: Will this be organization-scoped? YES
Q2: Will users interact through a new page? YES
Q3: Does this require new database tables? NO
Q4: Will this integrate with external APIs? NO (default)
Q5: Should this be accessible to all members? YES
-------------------------------------------
CONTEXT FINDINGS
-------------------------------------------
Similar Features Found:
- [Feature] at [path] - [pattern to follow]
Files to Modify:
- apps/web-app/src/[module]/trpc/[router].ts
- packages/db/src/schema.ts (if needed)
Patterns Identified:
- TRPC: [pattern reference]
- Frontend: [pattern reference]
-------------------------------------------
EXPERT QUESTIONS (2/5 answered)
-------------------------------------------
Q1: Extend existing UserRouter? YES
Q2: Follow pattern from ProjectSettings? YES
Q3: Cache data in TanStack Query? [PENDING]
Q4: Add E2E tests? [PENDING]
Q5: Validation on both client and server? [PENDING]
-------------------------------------------
NEXT ACTION
-------------------------------------------
Current: Answering expert question Q3
Options:
- Continue: /requirements-status
- End early: /requirements-end
- View all: /requirements-list/requirements-statusrequirements/.current-requirementrequirements/metadata.jsonRequirements Documentation
--- ACTIVE ---
[name]
Phase: Discovery (3/5) | Started: 30m ago
Request: [first line of 00-initial-request.md]
Next: Continue with /requirements-status
--- COMPLETE ---
2025-01-26-0900-dark-mode-toggle
Status: Ready for implementation
Questions answered: 10
Summary: [first line of spec overview]
Spec: requirements/2025-01-26-0900-dark-mode-toggle/06-requirements-spec.md
2025-01-25-1400-export-reports
Status: Implemented
Questions answered: 10
Summary: PDF/CSV export with filtering
--- INCOMPLETE ---
2025-01-24-1100-notification-system
Status: Paused at Detail phase (2/5)
Last activity: 2 days ago
Resume: /requirements-status
--- STATISTICS ---
Total: 4 requirements
- Complete: 2
- Active: 1
- Incomplete: 12025-01-15-old-feature (STALE - 8 days)
Consider: Resume or cancel with /requirements-endQuick Actions:
- View active detail: /requirements-current
- Resume incomplete: /requirements-status
- Start new: /requirements-start [description]
- End/cancel active: /requirements-endNo requirements found.
Start gathering requirements for a new feature:
/requirements-start [feature description]
Example:
/requirements-start add dark mode toggle to settingsrequirements/.current-requirement🔔 Requirements Gathering Reminder
You are gathering requirements for: [active-requirement]
Current phase: [Initial Setup/Context Discovery/Targeted Context/Expert Requirements]
Progress: [X/Y questions]
📋 PHASE-SPECIFIC RULES:
Phase 2 - Context Discovery:
- ✅ Ask 5 yes/no questions about the problem space
- ✅ Questions for product managers (no code knowledge required)
- ✅ Focus on user workflows, not technical details
- ✅ Write ALL questions before asking any
- ✅ Record answers ONLY after all questions asked
Phase 3 - Targeted Context (Autonomous):
- ✅ Use RepoPrompt tools to search and read code
- ✅ Analyze similar features and patterns
- ✅ Document findings in context file
- ❌ No user interaction during this phase
Phase 4 - Expert Requirements:
- ✅ Ask 5 detailed yes/no questions
- ✅ Questions as if speaking to PM who knows no code
- ✅ Clarify expected system behavior
- ✅ Reference specific files when relevant
- ✅ Record answers ONLY after all questions asked
🚫 GENERAL RULES:
1. ❌ Don't start coding or implementing
2. ❌ Don't ask open-ended questions
3. ❌ Don't record answers until ALL questions in phase are asked
4. ❌ Don't exceed 5 questions per phase
📍 CURRENT STATE:
- Last question: [Show last question]
- User response: [pending/answered]
- Next action: [Continue with question X of 5]
Please continue with the current question or read the next one from the file.apps/web-app/src/[module]/trpc/