| name | feature-dev |
| description | Comprehensive feature development workflow management with branching strategies, code reviews, testing automation, and deployment coordination. |
| license | MIT |
Feature Development Workflow
Overview
Complete feature development toolkit providing structured workflows, branching strategies, automated testing, code review processes, and deployment coordination for modern software development teams.
Quick Start
Installation
npm install -g @feature-dev/cli
npx @feature-dev/cli init
Initialize Feature Development
feature-dev init
feature-dev create my-project --template=feature-driven
Feature Workflow Management
Feature Creation
feature-dev start user-authentication
feature-dev start user-authentication --type=feature --epic=EPIC-123
feature-dev start user-authentication --template=api-endpoint
feature-dev list --status=active
Feature Configuration
module.exports = {
name: 'user-authentication',
type: 'feature',
epic: 'EPIC-123',
assignee: 'john.doe@company.com',
branches: {
main: 'main',
develop: 'develop',
feature: 'feature/user-authentication',
release: 'release/user-authentication'
},
tasks: [
{
id: 'TASK-001',
title: 'Design authentication flow',
type: 'design',
status: 'todo'
},
{
id: 'TASK-002',
title: 'Implement login endpoint',
type: 'development',
status: 'todo'
},
{
id: 'TASK-003',
title: 'Write authentication tests',
type: 'testing',
status: 'todo'
}
],
definition: {
acceptanceCriteria: [
'User can login with valid credentials',
'User receives error for invalid credentials',
'Session management works correctly',
'Password reset functionality available'
],
technicalRequirements: [
'JWT token authentication',
'Password hashing with bcrypt',
'Rate limiting on login attempts',
'Session timeout after 1 hour'
]
}
};
Branch Management
feature-dev branch create user-authentication --from=develop
feature-dev branch switch user-authentication
feature-dev branch sync user-authentication --with=main
feature-dev branch merge user-authentication --into=develop --strategy= squash
Branch Strategy Configuration
module.exports = {
strategy: 'gitflow',
branches: {
main: {
name: 'main',
protection: {
requireReviews: true,
requiredReviewers: 2,
requireUpToDate: true,
requireStatusChecks: ['ci/ci', 'security/scan']
}
},
develop: {
name: 'develop',
protection: {
requireReviews: true,
requiredReviewers: 1,
requireUpToDate: true
}
},
feature: {
prefix: 'feature/',
from: 'develop',
autoDelete: true
},
release: {
prefix: 'release/',
from: 'develop',
into: ['main', 'develop']
},
hotfix: {
prefix: 'hotfix/',
from: 'main',
into: ['main', 'develop']
}
},
mergeStrategies: {
feature: 'squash',
release: 'merge-commit',
hotfix: 'merge-commit'
}
};
Code Development
Task Management
feature-dev task create "Implement login endpoint" --type=development --assignee=john
feature-dev task update TASK-002 --status=in-progress
feature-dev task link TASK-002 --commit=abc123
feature-dev board --sprint=current
Task Templates
module.exports = {
templates: {
'api-endpoint': {
title: 'Implement {endpoint} endpoint',
description: 'Create REST API endpoint for {feature}',
checklist: [
'Define API contract',
'Implement endpoint logic',
'Add input validation',
'Write unit tests',
'Update API documentation'
],
estimatedHours: 8,
labels: ['backend', 'api']
},
'ui-component': {
title: 'Create {component} component',
description: 'Build React component for {feature}',
checklist: [
'Design component structure',
'Implement component logic',
'Add styling',
'Write component tests',
'Add accessibility features'
],
estimatedHours: 6,
labels: ['frontend', 'react']
},
'test-coverage': {
title: 'Add tests for {module}',
description: 'Write comprehensive tests for {module}',
checklist: [
'Unit tests',
'Integration tests',
'Edge case testing',
'Performance tests',
'Coverage report'
],
estimatedHours: 4,
labels: ['testing', 'quality']
}
}
};
Code Quality Gates
feature-dev quality check
feature-dev quality check --lint --test --security
feature-dev quality gate --coverage=80 --complexity=10 --duplicates=5
Quality Configuration
module.exports = {
gates: {
coverage: {
minimum: 80,
exclude: ['**/*.test.js', '**/*.spec.js'],
reportFormats: ['html', 'lcov']
},
complexity: {
maximum: 10,
ignorePatterns: ['**/node_modules/**', '**/dist/**']
},
duplicates: {
maximum: 5,
minTokens: 50,
ignoreAnnotations: true
},
security: {
enabled: true,
rules: ['owasp-top-ten', 'bandit'],
failOnHigh: true
},
performance: {
enabled: true,
budgets: {
javascript: 250,
css: 50,
images: 500
}
}
},
tools: {
linter: 'eslint',
formatter: 'prettier',
testRunner: 'jest',
coverageTool: 'istanbul',
securityScanner: 'snyk'
}
};
Testing Automation
Test Strategy
feature-dev test plan --feature=user-authentication
feature-dev test run --suite=all
feature-dev test run --unit --integration --e2e
feature-dev test report --format=html --output=./reports
Test Configuration
module.exports = {
strategy: 'pyramid',
suites: {
unit: {
framework: 'jest',
coverage: {
minimum: 80,
thresholds: {
statements: 80,
branches: 75,
functions: 80,
lines: 80
}
},
timeout: 5000,
parallel: true
},
integration: {
framework: 'jest',
setup: './test/integration/setup.js',
teardown: './test/integration/teardown.js',
timeout: 30000,
parallel: false
},
e2e: {
framework: 'playwright',
browsers: ['chromium', 'firefox', 'webkit'],
timeout: 60000,
retries: 2,
video: true,
screenshots: 'on-failure'
},
performance: {
framework: 'lighthouse',
budgets: {
performance: 90,
accessibility: 95,
bestPractices: 90,
seo: 85
},
urls: ['/', '/login', '/dashboard']
}
},
data: {
fixtures: './test/fixtures',
mocks: './test/mocks',
factories: './test/factories'
}
};
Test Data Management
feature-dev test data generate --model=user --count=100
feature-dev test db reset --env=test
feature-dev test db seed --fixtures=users,posts
Test Data Factory
const { Factory } = require('@feature-dev/testing');
class UserFactory extends Factory {
static definition() {
return {
id: this.sequence(),
name: this.faker.name.findName(),
email: this.faker.internet.email(),
password: this.crypt('password123'),
role: this.choice(['user', 'admin'], [0.9, 0.1]),
createdAt: this.past(),
updatedAt: this.now()
};
}
static admin() {
return this.state({
role: 'admin',
permissions: ['read', 'write', 'delete']
});
}
static withPosts(count = 3) {
return this.afterCreate(async (user) => {
const posts = await PostFactory.createMany(count, { userId: user.id });
user.posts = posts;
return user;
});
}
}
module.exports = UserFactory;
Code Review Process
Review Workflow
feature-dev pr create --title="Add user authentication" --draft=false
feature-dev pr review request --reviewers=jane.doe,bob.smith --team=backend
feature-dev pr review ai --focus=security,performance
feature-dev pr merge --strategy=squash --delete-branch
Review Configuration
module.exports = {
autoAssign: {
enabled: true,
rules: [
{
when: { files: ['**/*.js'] },
assign: ['backend-team']
},
{
when: { files: ['**/*.css', '**/*.scss'] },
assign: ['frontend-team']
},
{
when: { labels: ['security'] },
assign: ['security-team']
}
]
},
requiredReviewers: {
minimum: 2,
maximum: 4,
excludeAuthor: true,
excludeCommitters: false
},
checks: {
required: [
'ci/ci',
'security/scan',
'coverage/coverage',
'lint/lint'
],
optional: [
'performance/lighthouse',
'accessibility/a11y',
'docs/docs'
]
},
aiReview: {
enabled: true,
model: 'gpt-4',
focus: ['security', 'performance', 'maintainability'],
maxSuggestions: 10,
autoComment: true
},
mergeMethods: {
default: 'squash',
allowRebase: false,
allowMergeCommit: false,
autoDelete: true
}
};
Review Templates
module.exports = {
templates: {
'feature-review': {
title: 'Feature Review: {feature}',
description: `
## Overview
{description}
## Changes Made
{changes}
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
- [ ] Performance impact assessed
## Security
- [ ] Security review completed
- [ ] No sensitive data exposed
- [ ] Authentication/authorization verified
## Documentation
- [ ] API documentation updated
- [ ] User documentation updated
- [ ] Code comments added where needed
## Deployment
- [ ] Migration scripts tested
- [ ] Rollback plan documented
- [ ] Monitoring configured
`
},
'bugfix-review': {
title: 'Bugfix: {issue}',
description: `
## Issue
{issueDescription}
## Root Cause
{rootCause}
## Fix
{fixDescription}
## Testing
- [ ] Bug reproduction verified
- [ ] Fix resolves issue
- [ ] Regression tests pass
- [ ] Edge cases covered
## Impact Assessment
- [ ] Breaking changes identified
- [ ] Migration requirements documented
- [ ] Performance impact measured
`
}
}
};
Deployment Management
Deployment Pipeline
feature-dev deploy staging --feature=user-authentication
feature-dev deploy production --version=v1.2.0 --confirm
feature-dev deploy rollback --environment=production --to=v1.1.0
feature-dev deploy monitor --environment=production --duration=30m
Deployment Configuration
module.exports = {
environments: {
development: {
type: 'local',
autoDeploy: true,
healthCheck: '/health',
rollbackOnFailure: false
},
staging: {
type: 'kubernetes',
namespace: 'staging',
autoDeploy: true,
healthCheck: '/health',
rollbackOnFailure: true,
approvalRequired: false
},
production: {
type: 'kubernetes',
namespace: 'production',
autoDeploy: false,
healthCheck: '/health',
rollbackOnFailure: true,
approvalRequired: true,
approvers: ['tech-lead', 'product-manager'],
deploymentWindow: {
start: '22:00',
end: '06:00',
timezone: 'UTC',
weekends: false
}
}
},
pipeline: {
stages: [
{
name: 'build',
parallel: false,
steps: ['install', 'test', 'lint', 'security-scan']
},
{
name: 'package',
parallel: false,
steps: ['build-image', 'push-registry']
},
{
name: 'deploy-staging',
parallel: false,
steps: ['deploy-staging', 'health-check', 'integration-tests']
},
{
name: 'approve-production',
parallel: false,
steps: ['manual-approval']
},
{
name: 'deploy-production',
parallel: false,
steps: ['deploy-production', 'health-check', 'smoke-tests']
}
]
},
monitoring: {
metrics: ['response-time', 'error-rate', 'throughput'],
alerts: [
{
metric: 'error-rate',
threshold: 5,
duration: '5m',
action: 'rollback'
},
{
metric: 'response-time',
threshold: 2000,
duration: '10m',
action: 'alert'
}
]
}
};
Feature Flags
feature-dev flag create user-authentication --type=boolean --default=false
feature-dev flag update user-authentication --enabled=true --percentage=50
feature-dev flag target user-authentication --users=john.doe,jane.smith
feature-dev flag rollout user-authentication --strategy=gradual --duration=7d
Feature Flag Configuration
module.exports = {
provider: 'launchdarkly',
flags: {
'user-authentication': {
type: 'boolean',
defaultValue: false,
description: 'Enable new user authentication system',
targeting: {
rules: [
{
name: 'beta-users',
condition: {
attribute: 'email',
operator: 'endsWith',
value: '@beta.company.com'
},
variation: true
},
{
name: 'percentage-rollout',
condition: {
attribute: 'random',
operator: 'lessThan',
value: 0.1
},
variation: true
}
]
},
rollout: {
strategy: 'gradual',
schedule: {
start: '2024-01-15T00:00:00Z',
duration: '7d',
steps: [
{ percentage: 10, duration: '1d' },
{ percentage: 25, duration: '2d' },
{ percentage: 50, duration: '2d' },
{ percentage: 100, duration: '2d' }
]
}
}
}
},
analytics: {
trackEvents: true,
trackExposures: true,
trackGoals: ['conversion-rate', 'user-satisfaction']
}
};
Monitoring & Analytics
Feature Analytics
feature-dev analytics track --feature=user-authentication --event=login
feature-dev analytics report --feature=user-authentication --period=30d
feature-dev analytics compare --features=old-auth,new-auth --metrics=conversion,time-to-complete
Analytics Configuration
module.exports = {
provider: 'mixpanel',
tracking: {
events: [
{
name: 'feature_used',
properties: ['feature_name', 'user_id', 'timestamp', 'context']
},
{
name: 'feature_completed',
properties: ['feature_name', 'user_id', 'completion_time', 'success']
},
{
name: 'feature_error',
properties: ['feature_name', 'user_id', 'error_type', 'error_message']
}
],
goals: [
{
name: 'user-authentication-success',
event: 'feature_completed',
filters: { feature_name: 'user-authentication', success: true }
},
{
name: 'user-authentication-failure',
event: 'feature_error',
filters: { feature_name: 'user-authentication' }
}
]
},
reporting: {
dashboards: [
{
name: 'Feature Performance',
widgets: [
{
type: 'line-chart',
metric: 'feature_usage',
groupBy: 'feature_name',
timeRange: '30d'
},
{
type: 'funnel',
steps: ['feature_started', 'feature_completed'],
filter: { feature_name: 'user-authentication' }
}
]
}
],
alerts: [
{
name: 'High Error Rate',
condition: {
metric: 'feature_error_rate',
operator: '>',
value: 0.05
},
notification: ['slack', 'email']
}
]
}
};
Integration
CI/CD Integration
name: Feature Development
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
quality-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Feature Dev
run: |
npm install -g @feature-dev/cli
feature-dev init --ci
- name: Quality Gates
run: |
feature-dev quality check --coverage --security --performance
- name: Test Suite
run: |
feature-dev test run --unit --integration
- name: AI Review
run: |
feature-dev pr review ai --focus=security,performance
IDE Integration
code --install-extension feature-dev.vscode
git clone https://github.com/feature-dev/vim-plugin ~/.vim/pack/feature/start/
API Reference
Core Classes
FeatureManager
const { FeatureManager } = require('@feature-dev/core');
const featureManager = new FeatureManager({
repository: './',
branchStrategy: 'gitflow'
});
const feature = await featureManager.start('user-authentication');
await featureManager.complete(feature.id);
TaskManager
const { TaskManager } = require('@feature-dev/tasks');
const taskManager = new TaskManager();
const task = await taskManager.create({
title: 'Implement login endpoint',
type: 'development',
assignee: 'john.doe'
});
DeploymentManager
const { DeploymentManager } = require('@feature-dev/deploy');
const deployManager = new DeploymentManager();
const deployment = await deployManager.deploy('staging', {
version: 'v1.2.0',
feature: 'user-authentication'
});
Contributing
- Fork repository
- Create feature branch
- Follow development workflow
- Add comprehensive tests
- Submit pull request
License
MIT License - see LICENSE file for details.