@patricio0312rev/skillset 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/LICENSE +21 -0
- package/README.md +176 -0
- package/bin/cli.js +37 -0
- package/package.json +55 -0
- package/src/commands/init.js +301 -0
- package/src/index.js +168 -0
- package/src/lib/config.js +200 -0
- package/src/lib/generator.js +166 -0
- package/src/utils/display.js +95 -0
- package/src/utils/readme.js +196 -0
- package/src/utils/tool-specific.js +233 -0
- package/templates/ai-engineering/agent-orchestration-planner/ SKILL.md +266 -0
- package/templates/ai-engineering/cost-latency-optimizer/ SKILL.md +270 -0
- package/templates/ai-engineering/doc-to-vector-dataset-generator/ SKILL.md +239 -0
- package/templates/ai-engineering/evaluation-harness/ SKILL.md +219 -0
- package/templates/ai-engineering/guardrails-safety-filter-builder/ SKILL.md +226 -0
- package/templates/ai-engineering/llm-debugger/ SKILL.md +283 -0
- package/templates/ai-engineering/prompt-regression-tester/ SKILL.md +216 -0
- package/templates/ai-engineering/prompt-template-builder/ SKILL.md +393 -0
- package/templates/ai-engineering/rag-pipeline-builder/ SKILL.md +244 -0
- package/templates/ai-engineering/tool-function-schema-designer/ SKILL.md +219 -0
- package/templates/architecture/adr-writer/ SKILL.md +250 -0
- package/templates/architecture/api-versioning-deprecation-planner/ SKILL.md +331 -0
- package/templates/architecture/domain-model-boundaries-mapper/ SKILL.md +300 -0
- package/templates/architecture/migration-planner/ SKILL.md +376 -0
- package/templates/architecture/performance-budget-setter/ SKILL.md +318 -0
- package/templates/architecture/reliability-strategy-builder/ SKILL.md +286 -0
- package/templates/architecture/rfc-generator/ SKILL.md +362 -0
- package/templates/architecture/scalability-playbook/ SKILL.md +279 -0
- package/templates/architecture/system-design-generator/ SKILL.md +339 -0
- package/templates/architecture/tech-debt-prioritizer/ SKILL.md +329 -0
- package/templates/backend/api-contract-normalizer/ SKILL.md +487 -0
- package/templates/backend/api-endpoint-generator/ SKILL.md +415 -0
- package/templates/backend/auth-module-builder/ SKILL.md +99 -0
- package/templates/backend/background-jobs-designer/ SKILL.md +166 -0
- package/templates/backend/caching-strategist/ SKILL.md +190 -0
- package/templates/backend/error-handling-standardizer/ SKILL.md +174 -0
- package/templates/backend/rate-limiting-abuse-protection/ SKILL.md +147 -0
- package/templates/backend/rbac-permissions-builder/ SKILL.md +158 -0
- package/templates/backend/service-layer-extractor/ SKILL.md +269 -0
- package/templates/backend/webhook-receiver-hardener/ SKILL.md +211 -0
- package/templates/ci-cd/artifact-sbom-publisher/ SKILL.md +236 -0
- package/templates/ci-cd/caching-strategy-optimizer/ SKILL.md +195 -0
- package/templates/ci-cd/deployment-checklist-generator/ SKILL.md +381 -0
- package/templates/ci-cd/github-actions-pipeline-creator/ SKILL.md +348 -0
- package/templates/ci-cd/monorepo-ci-optimizer/ SKILL.md +298 -0
- package/templates/ci-cd/preview-environments-builder/ SKILL.md +187 -0
- package/templates/ci-cd/quality-gates-enforcer/ SKILL.md +342 -0
- package/templates/ci-cd/release-automation-builder/ SKILL.md +281 -0
- package/templates/ci-cd/rollback-workflow-builder/ SKILL.md +372 -0
- package/templates/ci-cd/secrets-env-manager/ SKILL.md +242 -0
- package/templates/db-management/backup-restore-runbook-generator/ SKILL.md +505 -0
- package/templates/db-management/data-integrity-auditor/ SKILL.md +505 -0
- package/templates/db-management/data-retention-archiving-planner/ SKILL.md +430 -0
- package/templates/db-management/data-seeding-fixtures-builder/ SKILL.md +375 -0
- package/templates/db-management/db-performance-watchlist/ SKILL.md +425 -0
- package/templates/db-management/etl-sync-job-builder/ SKILL.md +457 -0
- package/templates/db-management/multi-tenant-safety-checker/ SKILL.md +398 -0
- package/templates/db-management/prisma-migration-assistant/ SKILL.md +379 -0
- package/templates/db-management/schema-consistency-checker/ SKILL.md +440 -0
- package/templates/db-management/sql-query-optimizer/ SKILL.md +324 -0
- package/templates/foundation/changelog-writer/ SKILL.md +431 -0
- package/templates/foundation/code-formatter-installer/ SKILL.md +320 -0
- package/templates/foundation/codebase-summarizer/ SKILL.md +360 -0
- package/templates/foundation/dependency-doctor/ SKILL.md +163 -0
- package/templates/foundation/dev-environment-bootstrapper/ SKILL.md +259 -0
- package/templates/foundation/dev-onboarding-builder/ SKILL.md +556 -0
- package/templates/foundation/docs-starter-kit/ SKILL.md +574 -0
- package/templates/foundation/explaining-code/SKILL.md +13 -0
- package/templates/foundation/git-hygiene-enforcer/ SKILL.md +455 -0
- package/templates/foundation/project-scaffolder/ SKILL.md +65 -0
- package/templates/foundation/project-scaffolder/references/templates.md +126 -0
- package/templates/foundation/repo-structure-linter/ SKILL.md +0 -0
- package/templates/foundation/repo-structure-linter/references/conventions.md +98 -0
- package/templates/frontend/animation-micro-interaction-pack/ SKILL.md +41 -0
- package/templates/frontend/component-scaffold-generator/ SKILL.md +562 -0
- package/templates/frontend/design-to-component-translator/ SKILL.md +547 -0
- package/templates/frontend/form-wizard-builder/ SKILL.md +553 -0
- package/templates/frontend/frontend-refactor-planner/ SKILL.md +37 -0
- package/templates/frontend/i18n-frontend-implementer/ SKILL.md +44 -0
- package/templates/frontend/modal-drawer-system/ SKILL.md +377 -0
- package/templates/frontend/page-layout-builder/ SKILL.md +630 -0
- package/templates/frontend/state-ux-flow-builder/ SKILL.md +23 -0
- package/templates/frontend/table-builder/ SKILL.md +350 -0
- package/templates/performance/alerting-dashboard-builder/ SKILL.md +162 -0
- package/templates/performance/backend-latency-profiler-helper/ SKILL.md +108 -0
- package/templates/performance/caching-cdn-strategy-planner/ SKILL.md +150 -0
- package/templates/performance/capacity-planning-helper/ SKILL.md +242 -0
- package/templates/performance/core-web-vitals-tuner/ SKILL.md +126 -0
- package/templates/performance/incident-runbook-generator/ SKILL.md +162 -0
- package/templates/performance/load-test-scenario-builder/ SKILL.md +256 -0
- package/templates/performance/observability-setup/ SKILL.md +232 -0
- package/templates/performance/postmortem-writer/ SKILL.md +203 -0
- package/templates/performance/structured-logging-standardizer/ SKILL.md +122 -0
- package/templates/security/auth-security-reviewer/ SKILL.md +428 -0
- package/templates/security/dependency-vulnerability-triage/ SKILL.md +495 -0
- package/templates/security/input-validation-sanitization-auditor/ SKILL.md +76 -0
- package/templates/security/pii-redaction-logging-policy-builder/ SKILL.md +65 -0
- package/templates/security/rbac-policy-tester/ SKILL.md +80 -0
- package/templates/security/secrets-scanner/ SKILL.md +462 -0
- package/templates/security/secure-headers-csp-builder/ SKILL.md +404 -0
- package/templates/security/security-incident-playbook-generator/ SKILL.md +76 -0
- package/templates/security/security-pr-checklist-skill/ SKILL.md +62 -0
- package/templates/security/threat-model-generator/ SKILL.md +394 -0
- package/templates/testing/contract-testing-builder/ SKILL.md +492 -0
- package/templates/testing/coverage-strategist/ SKILL.md +436 -0
- package/templates/testing/e2e-test-builder/ SKILL.md +382 -0
- package/templates/testing/flaky-test-detective/ SKILL.md +416 -0
- package/templates/testing/integration-test-builder/ SKILL.md +525 -0
- package/templates/testing/mocking-assistant/ SKILL.md +383 -0
- package/templates/testing/snapshot-test-refactorer/ SKILL.md +375 -0
- package/templates/testing/test-data-factory-builder/ SKILL.md +449 -0
- package/templates/testing/test-reporting-triage-skill/ SKILL.md +469 -0
- package/templates/testing/unit-test-generator/ SKILL.md +548 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dependency-doctor
|
|
3
|
+
description: Audits project dependencies for outdated packages, duplicates, heavy/problematic libraries, security vulnerabilities, and risky version combinations. Generates prioritized reports with security, performance, and maintainability insights, upgrade paths, and safe pinning recommendations. Use when users request dependency audits, package updates, security checks, or dependency optimization.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dependency Doctor
|
|
7
|
+
|
|
8
|
+
Comprehensive dependency health analysis and upgrade planning.
|
|
9
|
+
|
|
10
|
+
## Core Workflow
|
|
11
|
+
|
|
12
|
+
1. **Scan manifests**: Analyze package.json, requirements.txt, Cargo.toml, go.mod, etc.
|
|
13
|
+
2. **Check versions**: Identify outdated packages against latest stable versions
|
|
14
|
+
3. **Detect issues**: Find duplicates, security vulnerabilities, deprecated packages, heavy bundles
|
|
15
|
+
4. **Assess risk**: Evaluate breaking changes and version compatibility
|
|
16
|
+
5. **Prioritize**: Rank issues by severity (security > performance > maintenance)
|
|
17
|
+
6. **Generate upgrade path**: Create safe, incremental update plan
|
|
18
|
+
7. **Recommend pins**: Suggest version constraints to avoid future issues
|
|
19
|
+
|
|
20
|
+
## Analysis Categories
|
|
21
|
+
|
|
22
|
+
### Security Issues (Critical)
|
|
23
|
+
|
|
24
|
+
- Known CVEs in dependencies
|
|
25
|
+
- Unmaintained packages (no updates >2 years)
|
|
26
|
+
- Packages with security advisories
|
|
27
|
+
- Transitive dependency vulnerabilities
|
|
28
|
+
|
|
29
|
+
### Outdated Packages (High)
|
|
30
|
+
|
|
31
|
+
- Major versions behind (breaking changes)
|
|
32
|
+
- Minor versions behind (new features)
|
|
33
|
+
- Patch versions behind (bug fixes)
|
|
34
|
+
|
|
35
|
+
### Duplicate Dependencies (Medium)
|
|
36
|
+
|
|
37
|
+
- Multiple versions of same package
|
|
38
|
+
- Overlapping functionality (lodash + underscore)
|
|
39
|
+
- Can be deduplicated
|
|
40
|
+
|
|
41
|
+
### Heavy Dependencies (Medium)
|
|
42
|
+
|
|
43
|
+
- Large bundle sizes (>500KB)
|
|
44
|
+
- Unnecessary peer dependencies
|
|
45
|
+
- Better alternatives available
|
|
46
|
+
|
|
47
|
+
### Risky Combinations (Medium)
|
|
48
|
+
|
|
49
|
+
- Known incompatible version pairs
|
|
50
|
+
- Conflicting peer dependencies
|
|
51
|
+
- Framework version mismatches
|
|
52
|
+
|
|
53
|
+
## Report Structure
|
|
54
|
+
|
|
55
|
+
````markdown
|
|
56
|
+
# Dependency Audit Report
|
|
57
|
+
|
|
58
|
+
## 🔴 Critical Security Issues (2)
|
|
59
|
+
|
|
60
|
+
- axios@0.21.0 → CVE-2021-3749 → Upgrade to 1.6.0+
|
|
61
|
+
- lodash@4.17.15 → Prototype pollution → Upgrade to 4.17.21+
|
|
62
|
+
|
|
63
|
+
## 🟡 High Priority Updates (5)
|
|
64
|
+
|
|
65
|
+
- react@17.0.2 → 18.2.0 (major, breaking changes)
|
|
66
|
+
- next@12.0.0 → 14.1.0 (major, new features)
|
|
67
|
+
|
|
68
|
+
## 🟢 Maintenance Updates (8)
|
|
69
|
+
|
|
70
|
+
- typescript@4.9.0 → 5.3.3 (patch improvements)
|
|
71
|
+
|
|
72
|
+
## 📦 Duplicates Found (3)
|
|
73
|
+
|
|
74
|
+
- moment: 2.29.1, 2.30.0 → Deduplicate to 2.30.0
|
|
75
|
+
- @types/node: 18.0.0, 20.0.0 → Align to 20.0.0
|
|
76
|
+
|
|
77
|
+
## 🏋️ Heavy Dependencies (2)
|
|
78
|
+
|
|
79
|
+
- moment (232KB) → Consider date-fns (12KB)
|
|
80
|
+
- lodash (full) → Consider lodash-es or specific imports
|
|
81
|
+
|
|
82
|
+
## Upgrade Path
|
|
83
|
+
|
|
84
|
+
### Phase 1: Security (Do First)
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm update axios lodash
|
|
88
|
+
npm audit fix
|
|
89
|
+
```
|
|
90
|
+
````
|
|
91
|
+
|
|
92
|
+
### Phase 2: Major Frameworks (Test Thoroughly)
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm install react@18 react-dom@18
|
|
96
|
+
npm install next@14
|
|
97
|
+
# Run full test suite
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Phase 3: Minor Updates (Low Risk)
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npm update
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Safe Pin Recommendations
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"axios": "^1.6.0",
|
|
111
|
+
"react": "^18.2.0",
|
|
112
|
+
"typescript": "~5.3.0"
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Package Manager Commands
|
|
119
|
+
|
|
120
|
+
### npm
|
|
121
|
+
- Audit: `npm audit`
|
|
122
|
+
- Outdated: `npm outdated`
|
|
123
|
+
- Dedupe: `npm dedupe`
|
|
124
|
+
- Update: `npm update [package]`
|
|
125
|
+
|
|
126
|
+
### yarn
|
|
127
|
+
- Audit: `yarn audit`
|
|
128
|
+
- Outdated: `yarn outdated`
|
|
129
|
+
- Dedupe: `yarn dedupe`
|
|
130
|
+
- Upgrade: `yarn upgrade [package]`
|
|
131
|
+
|
|
132
|
+
### pnpm
|
|
133
|
+
- Audit: `pnpm audit`
|
|
134
|
+
- Outdated: `pnpm outdated`
|
|
135
|
+
- Dedupe: `pnpm dedupe`
|
|
136
|
+
- Update: `pnpm update [package]`
|
|
137
|
+
|
|
138
|
+
### pip
|
|
139
|
+
- Outdated: `pip list --outdated`
|
|
140
|
+
- Update: `pip install --upgrade [package]`
|
|
141
|
+
- Security: `pip-audit` or `safety check`
|
|
142
|
+
|
|
143
|
+
## Upgrade Best Practices
|
|
144
|
+
|
|
145
|
+
1. **Backup first**: Commit current state or create branch
|
|
146
|
+
2. **Read changelogs**: Check for breaking changes
|
|
147
|
+
3. **Update incrementally**: One major version at a time
|
|
148
|
+
4. **Test thoroughly**: Run full test suite after each update
|
|
149
|
+
5. **Check peer deps**: Ensure compatibility
|
|
150
|
+
6. **Lock files**: Commit updated lock files
|
|
151
|
+
7. **Monitor**: Watch for runtime issues after deployment
|
|
152
|
+
|
|
153
|
+
## Version Pinning Strategy
|
|
154
|
+
|
|
155
|
+
- **Exact**: `1.2.3` - Only for problematic packages
|
|
156
|
+
- **Patch**: `~1.2.3` - Safe updates (1.2.x)
|
|
157
|
+
- **Minor**: `^1.2.3` - Most common (1.x.x)
|
|
158
|
+
- **Range**: `>=1.2.3 <2.0.0` - Explicit bounds
|
|
159
|
+
|
|
160
|
+
## References
|
|
161
|
+
|
|
162
|
+
See `references/common-issues.md` for known problematic package combinations and migration guides.
|
|
163
|
+
```
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dev-environment-bootstrapper
|
|
3
|
+
description: Standardizes development environment setup across machines by generating tool version configs (Node, Python, Ruby), package manager configs (pnpm, Volta, asdf, mise), environment variable templates, and setup scripts with onboarding documentation. Use when users need to "setup dev environment", "standardize tooling", "configure version managers", or "create onboarding scripts".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dev Environment Bootstrapper
|
|
7
|
+
|
|
8
|
+
Create consistent, reproducible development environments across all machines.
|
|
9
|
+
|
|
10
|
+
## Core Workflow
|
|
11
|
+
|
|
12
|
+
1. **Detect stack**: Identify languages and tools used in project
|
|
13
|
+
2. **Choose version manager**: Select appropriate tool (Volta, asdf, mise, nvm, pyenv)
|
|
14
|
+
3. **Generate configs**: Create .tool-versions, .nvmrc, package.json volta fields, etc.
|
|
15
|
+
4. **Setup environment vars**: Create .env.example with all required variables
|
|
16
|
+
5. **Write setup script**: Generate bootstrap script for automated setup
|
|
17
|
+
6. **Create onboarding doc**: Write SETUP.md with step-by-step instructions
|
|
18
|
+
|
|
19
|
+
## Version Management Strategies
|
|
20
|
+
|
|
21
|
+
### Volta (Recommended for Node.js)
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
// package.json
|
|
25
|
+
{
|
|
26
|
+
"volta": {
|
|
27
|
+
"node": "20.11.0",
|
|
28
|
+
"pnpm": "8.15.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### asdf (Multi-language)
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
# .tool-versions
|
|
37
|
+
nodejs 20.11.0
|
|
38
|
+
python 3.11.7
|
|
39
|
+
ruby 3.2.2
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### mise (Modern alternative to asdf)
|
|
43
|
+
|
|
44
|
+
```toml
|
|
45
|
+
# .mise.toml
|
|
46
|
+
[tools]
|
|
47
|
+
node = "20.11.0"
|
|
48
|
+
python = "3.11"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### nvm (Node.js only)
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
# .nvmrc
|
|
55
|
+
20.11.0
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Environment Variables Template
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# .env.example
|
|
62
|
+
|
|
63
|
+
# Application
|
|
64
|
+
NODE_ENV=development
|
|
65
|
+
PORT=3000
|
|
66
|
+
|
|
67
|
+
# Database
|
|
68
|
+
DATABASE_URL=postgresql://user:password@localhost:5432/dbname
|
|
69
|
+
|
|
70
|
+
# External APIs
|
|
71
|
+
OPENAI_API_KEY=sk-...
|
|
72
|
+
STRIPE_SECRET_KEY=sk_test_...
|
|
73
|
+
|
|
74
|
+
# Feature Flags
|
|
75
|
+
ENABLE_FEATURE_X=false
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Setup Script Structure
|
|
79
|
+
|
|
80
|
+
### For Node.js Projects
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
#!/bin/bash
|
|
84
|
+
set -e
|
|
85
|
+
|
|
86
|
+
echo "🚀 Setting up development environment..."
|
|
87
|
+
|
|
88
|
+
# Check prerequisites
|
|
89
|
+
command -v pnpm >/dev/null 2>&1 || { echo "Installing pnpm..."; npm install -g pnpm; }
|
|
90
|
+
|
|
91
|
+
# Install dependencies
|
|
92
|
+
echo "📦 Installing dependencies..."
|
|
93
|
+
pnpm install
|
|
94
|
+
|
|
95
|
+
# Setup environment
|
|
96
|
+
echo "⚙️ Setting up environment variables..."
|
|
97
|
+
cp .env.example .env
|
|
98
|
+
echo "Edit .env file with your values"
|
|
99
|
+
|
|
100
|
+
# Setup database (if needed)
|
|
101
|
+
if [ -f "prisma/schema.prisma" ]; then
|
|
102
|
+
echo "🗄️ Setting up database..."
|
|
103
|
+
pnpm prisma generate
|
|
104
|
+
pnpm prisma migrate dev
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
echo "✅ Setup complete! Run 'pnpm dev' to start"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### For Python Projects
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
#!/bin/bash
|
|
114
|
+
set -e
|
|
115
|
+
|
|
116
|
+
echo "🚀 Setting up development environment..."
|
|
117
|
+
|
|
118
|
+
# Create virtual environment
|
|
119
|
+
python -m venv venv
|
|
120
|
+
source venv/bin/activate
|
|
121
|
+
|
|
122
|
+
# Install dependencies
|
|
123
|
+
pip install -r requirements.txt
|
|
124
|
+
pip install -r requirements-dev.txt
|
|
125
|
+
|
|
126
|
+
# Setup environment
|
|
127
|
+
cp .env.example .env
|
|
128
|
+
|
|
129
|
+
# Run migrations
|
|
130
|
+
python manage.py migrate
|
|
131
|
+
|
|
132
|
+
echo "✅ Setup complete! Run 'source venv/bin/activate && python manage.py runserver'"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Onboarding Documentation Template
|
|
136
|
+
|
|
137
|
+
````markdown
|
|
138
|
+
# Development Setup
|
|
139
|
+
|
|
140
|
+
## Prerequisites
|
|
141
|
+
|
|
142
|
+
- Node.js 20.11+ (managed via Volta)
|
|
143
|
+
- pnpm 8.15+
|
|
144
|
+
- PostgreSQL 15+
|
|
145
|
+
- Redis 7+ (optional)
|
|
146
|
+
|
|
147
|
+
## Quick Start
|
|
148
|
+
|
|
149
|
+
1. **Clone repository**
|
|
150
|
+
```bash
|
|
151
|
+
git clone <repo-url>
|
|
152
|
+
cd <repo-name>
|
|
153
|
+
```
|
|
154
|
+
````
|
|
155
|
+
|
|
156
|
+
2. **Install tools** (if using Volta)
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
curl https://get.volta.sh | bash
|
|
160
|
+
# Volta will automatically use versions from package.json
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
3. **Run setup script**
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
./scripts/setup.sh
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
4. **Configure environment**
|
|
170
|
+
|
|
171
|
+
- Copy `.env.example` to `.env`
|
|
172
|
+
- Fill in required values
|
|
173
|
+
- See ENVIRONMENT_VARIABLES.md for details
|
|
174
|
+
|
|
175
|
+
5. **Start development server**
|
|
176
|
+
```bash
|
|
177
|
+
pnpm dev
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Troubleshooting
|
|
181
|
+
|
|
182
|
+
**Port already in use**
|
|
183
|
+
|
|
184
|
+
- Kill process: `lsof -ti:3000 | xargs kill`
|
|
185
|
+
|
|
186
|
+
**Database connection failed**
|
|
187
|
+
|
|
188
|
+
- Check PostgreSQL is running: `pg_isready`
|
|
189
|
+
- Verify DATABASE_URL in .env
|
|
190
|
+
|
|
191
|
+
**Node version mismatch**
|
|
192
|
+
|
|
193
|
+
- Install Volta: See step 2
|
|
194
|
+
- Or use nvm: `nvm use`
|
|
195
|
+
|
|
196
|
+
## Common Commands
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
pnpm dev # Start dev server
|
|
200
|
+
pnpm build # Build for production
|
|
201
|
+
pnpm test # Run tests
|
|
202
|
+
pnpm lint # Check code quality
|
|
203
|
+
pnpm format # Format code
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Cross-Platform Considerations
|
|
209
|
+
|
|
210
|
+
### Shell Scripts
|
|
211
|
+
- Provide both .sh (Unix) and .ps1 (Windows) versions
|
|
212
|
+
- Or use Node.js scripts for true cross-platform
|
|
213
|
+
|
|
214
|
+
### Path Separators
|
|
215
|
+
- Use Node's `path.join()` in scripts
|
|
216
|
+
- Avoid hardcoded `/` or `\`
|
|
217
|
+
|
|
218
|
+
### Line Endings
|
|
219
|
+
- Configure .gitattributes:
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
- text=auto
|
|
223
|
+
\*.sh text eol=lf
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Version Manager Comparison
|
|
228
|
+
|
|
229
|
+
| Tool | Languages | Auto-switching | Config File |
|
|
230
|
+
|------|-----------|----------------|-------------|
|
|
231
|
+
| Volta | Node, Yarn, pnpm | Yes | package.json |
|
|
232
|
+
| asdf | Multi | Yes | .tool-versions |
|
|
233
|
+
| mise | Multi | Yes | .mise.toml |
|
|
234
|
+
| nvm | Node only | Manual | .nvmrc |
|
|
235
|
+
| pyenv | Python only | Yes | .python-version |
|
|
236
|
+
|
|
237
|
+
## Best Practices
|
|
238
|
+
|
|
239
|
+
1. **Pin exact versions** in configs to avoid surprises
|
|
240
|
+
2. **Document all requirements** in onboarding guide
|
|
241
|
+
3. **Test setup script** on clean machine
|
|
242
|
+
4. **Keep .env.example updated** with all variables
|
|
243
|
+
5. **Provide troubleshooting** for common issues
|
|
244
|
+
6. **Use tool version managers** over manual installs
|
|
245
|
+
7. **Make setup idempotent** (safe to run multiple times)
|
|
246
|
+
|
|
247
|
+
## Output Checklist
|
|
248
|
+
|
|
249
|
+
Every dev environment bootstrap should include:
|
|
250
|
+
|
|
251
|
+
- [ ] Version manager config (.tool-versions, package.json volta, etc.)
|
|
252
|
+
- [ ] Package manager choice documented
|
|
253
|
+
- [ ] .env.example with all variables
|
|
254
|
+
- [ ] Setup script (setup.sh or setup.js)
|
|
255
|
+
- [ ] SETUP.md or DEVELOPMENT.md onboarding guide
|
|
256
|
+
- [ ] Troubleshooting section
|
|
257
|
+
- [ ] Common commands reference
|
|
258
|
+
- [ ] Prerequisites listed
|
|
259
|
+
```
|