feature-workflow-generation
# Feature Workflow Generation
What this skill does
# Feature Workflow Generation
## Purpose
Generate feature-by-feature implementation workflows that map features from `features.json` to tech-specific commands from the project's tech stack.
## When to Use
- After creating features with `/planning:add-feature`
- When you need a structured workflow for implementing features
- To generate execution roadmaps from specifications
## How It Works
### Data Sources
1. **features.json** - List of features with metadata
2. **specs/{feature-id}/spec.md** - Detailed feature specifications
3. **.claude/project.json** - Tech stack configuration
4. **Airtable** - Available commands for the tech stack
### Workflow
```
features.json → Read features
↓
specs/ → Read specifications
↓
.claude/project.json → Get tech stack
↓
Airtable → Query available commands
↓
generate-feature-workflow.py → Combine data
↓
FEATURE-IMPLEMENTATION-WORKFLOW.md
```
## Script Usage
### Basic Usage
```bash
cd /path/to/project
python3 scripts/generate-feature-workflow.py
```
### Output Format
```json
{
"tech_stack": "AI Tech Stack 1",
"features": [
{
"id": "F001",
"title": "AI chat interface",
"status": "in-progress",
"priority": "P0",
"spec_content": "..."
}
],
"available_commands": [
{
"name": "add-component",
"description": "Add Next.js component",
"plugin": "nextjs-frontend",
"phase": "Implementation"
}
]
}
```
## Feature-to-Command Mapping
### Mapping Strategies
#### 1. Keyword Matching
- "Create chat component" → `/nextjs-frontend:add-component ChatWindow`
- "Add streaming" → `/vercel-ai-sdk:add-streaming`
- "Setup auth" → `/supabase:add-auth`
#### 2. Phase-Based Grouping
- **Foundation** - Infrastructure setup
- **Planning** - Architecture and specs
- **Implementation** - Feature building
- **Quality** - Validation
- **Testing** - Test execution
- **Deployment** - Production deployment
#### 3. Dependency Analysis
- Database commands before backend
- Backend before frontend
- Core components before features
- Integration after all components
## Workflow Document Structure
### Template
```markdown
# Feature Implementation Workflow
Generated from features.json and {TECH_STACK}
## Feature: {FEATURE_ID} - {FEATURE_TITLE}
**Status**: {STATUS}
**Priority**: {PRIORITY}
### Prerequisites
- [ ] Spec complete: specs/{FEATURE_ID}/spec.md
- [ ] Tasks layered: /iterate:tasks {FEATURE_ID}
### Implementation Steps
#### Layer 0: Infrastructure
- [ ] {COMMAND_1}
- [ ] {COMMAND_2}
#### Layer 1: Core Components
- [ ] {COMMAND_3}
- [ ] {COMMAND_4}
#### Layer 2: Feature Components
- [ ] {COMMAND_5}
- [ ] {COMMAND_6}
#### Layer 3: Integration
- [ ] {COMMAND_7}
- [ ] {COMMAND_8}
### Validation
- [ ] /quality:validate-code {FEATURE_ID}
- [ ] /testing:test {FEATURE_ID}
---
## Feature: {NEXT_FEATURE_ID} - {NEXT_FEATURE_TITLE}
...
```
## Filtering Options
### By Feature ID
```bash
--feature F001
```
Only generate workflow for F001
### By Priority
```bash
--priority P0
```
Only generate for P0 features
### By Status
```bash
--status in-progress
```
Only generate for in-progress features
### Split by Feature
```bash
--split
```
Generate separate files:
- `F001-WORKFLOW.md`
- `F002-WORKFLOW.md`
- etc.
## Integration with Other Commands
### Typical Flow
```bash
# 1. Create features
/planning:add-feature "AI chat interface"
/planning:add-feature "User dashboard"
# 2. Generate feature workflow
/planning:generate-feature-workflow
# 3. Execute workflows
/iterate:tasks F001
/implementation:execute F001
/iterate:tasks F002
/implementation:execute F002
# 4. Validate
/quality:validate-code F001
/testing:test F001
```
## Error Handling
### Missing features.json
**Error**: "No features found in features.json"
**Solution**: Run `/planning:add-feature` first
### Missing project.json
**Error**: "Tech stack not found in .claude/project.json"
**Solution**: Run `/foundation:detect` first
### Airtable Access Failure
**Error**: "AIRTABLE_TOKEN environment variable not set"
**Solution**: Export token:
```bash
export MCP_AIRTABLE_TOKEN=your_token_here
```
### Fallback Mode
If Airtable access fails, fall back to filesystem-based command discovery:
```bash
# Read commands from .claude/plugins/**/commands/*.md
ls .claude/plugins/*/commands/*.md
```
## Best Practices
1. **Update features.json regularly** - Keep status current
2. **Maintain spec files** - Complete specs improve matching
3. **Use priority levels** - P0 for critical features
4. **Generate before implementation** - Plan before executing
5. **Re-generate after spec changes** - Keep workflow current
## Differences from Foundation Workflow
| Aspect | Foundation Workflow | Feature Workflow |
|--------|-------------------|------------------|
| **Purpose** | Infrastructure setup | Feature implementation |
| **When** | One-time | Ongoing |
| **Source** | Tech stack only | features.json + specs |
| **Scope** | Foundation → Database | Implementation → Testing |
| **Output** | {PROJECT}-INFRASTRUCTURE-WORKFLOW.md | FEATURE-IMPLEMENTATION-WORKFLOW.md |
| **Commands** | Setup commands | Build commands |
## Examples
### Example 1: AI Chat Application
**features.json**:
```json
{
"features": [
{
"id": "F001",
"title": "AI chat interface",
"priority": "P0",
"status": "in-progress"
}
]
}
```
**Generated Workflow**:
```markdown
## Feature: F001 - AI chat interface
**Status**: in-progress
**Priority**: P0
### Implementation Steps
- [ ] /iterate:tasks F001
- [ ] /nextjs-frontend:add-component ChatWindow
- [ ] /vercel-ai-sdk:add-streaming
- [ ] /fastapi-backend:add-endpoint "POST /api/chat"
- [ ] /supabase:add-auth
- [ ] /mem0:add-conversation-memory
- [ ] /quality:validate-code F001
- [ ] /testing:test F001
```
### Example 2: Multiple Features with Filtering
```bash
# Generate only P0 features
/planning:generate-feature-workflow --priority P0
# Generate only in-progress features
/planning:generate-feature-workflow --status in-progress
# Generate specific feature
/planning:generate-feature-workflow --feature F001
# Generate separate files per feature
/planning:generate-feature-workflow --split
```
## Maintenance
### Keeping Workflow Current
```bash
# After adding new features
/planning:add-feature "New feature"
/planning:generate-feature-workflow
# After updating specs
vim specs/F001/spec.md
/planning:generate-feature-workflow --feature F001
# After changing priority
# Edit features.json
/planning:generate-feature-workflow
```
### Validation
The workflow includes validation warnings:
- Features without specs
- Specs without implementation tasks
- Commands not available in tech stack
- Missing dependencies
## Technical Details
### Script: `generate-feature-workflow.py`
**Dependencies**:
- `requests` - HTTP requests to Airtable
- `json` - JSON parsing
- `os` - File system operations
**Environment Variables**:
- `AIRTABLE_TOKEN` or `MCP_AIRTABLE_TOKEN` - Required for Airtable access
**Exit Codes**:
- `0` - Success
- `1` - Error (missing data, API failure)
### Airtable Schema
**Tables Used**:
- `Tech Stacks` (tblG07GusbRMJ9h1I)
- `Plugins` (tblVEI2x2xArVx9ID)
- `Commands` (tblWKaSceuRJrBFC1)
**Relationships**:
```
Tech Stack → Plugins → Commands
```
## Related Skills
- `workflow-generation` (foundation) - Infrastructure workflows
- `spec-management` (planning) - Spec creation and management
- `task-management` (iterate) - Task layering and execution
- `execution-tracking` (implementation) - Progress tracking
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.