start-vibing-stacks 1.0.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/README.md +100 -0
- package/dist/detector.d.ts +16 -0
- package/dist/detector.js +103 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +239 -0
- package/dist/installer.d.ts +30 -0
- package/dist/installer.js +224 -0
- package/dist/setup.d.ts +17 -0
- package/dist/setup.js +161 -0
- package/dist/types.d.ts +88 -0
- package/dist/types.js +4 -0
- package/dist/ui.d.ts +11 -0
- package/dist/ui.js +47 -0
- package/package.json +57 -0
- package/stacks/_shared/agents/claude-md-compactor.md +44 -0
- package/stacks/_shared/agents/commit-manager.md +65 -0
- package/stacks/_shared/agents/documenter.md +82 -0
- package/stacks/_shared/agents/domain-updater.md +51 -0
- package/stacks/_shared/agents/research-web.md +60 -0
- package/stacks/_shared/agents/tester.md +61 -0
- package/stacks/_shared/commands/feature.md +13 -0
- package/stacks/_shared/commands/fix.md +9 -0
- package/stacks/_shared/commands/validate.md +10 -0
- package/stacks/_shared/config/domain-mapping.json +41 -0
- package/stacks/_shared/config/security-rules.json +31 -0
- package/stacks/_shared/hooks/stop-validator.ts +171 -0
- package/stacks/_shared/hooks/user-prompt-submit.ts +77 -0
- package/stacks/_shared/skills/debugging-patterns/SKILL.md +39 -0
- package/stacks/_shared/skills/docker-patterns/SKILL.md +47 -0
- package/stacks/_shared/skills/git-workflow/SKILL.md +35 -0
- package/stacks/nodejs/stack.json +87 -0
- package/stacks/php/config/quality-gates.json +23 -0
- package/stacks/php/skills/composer-workflow/SKILL.md +78 -0
- package/stacks/php/skills/php-patterns/SKILL.md +119 -0
- package/stacks/php/skills/phpstan-analysis/SKILL.md +68 -0
- package/stacks/php/skills/phpunit-testing/SKILL.md +122 -0
- package/stacks/php/skills/security-scan-php/SKILL.md +80 -0
- package/stacks/php/stack.json +95 -0
- package/templates/CLAUDE-default.md +54 -0
- package/templates/CLAUDE-php.md +88 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "php",
|
|
3
|
+
"name": "PHP",
|
|
4
|
+
"icon": "🐘",
|
|
5
|
+
"runtime": "PHP 8.3+",
|
|
6
|
+
"minVersion": "8.3.0",
|
|
7
|
+
"packageManager": "composer",
|
|
8
|
+
"extensions": [".php", ".blade.php", ".twig", ".phtml"],
|
|
9
|
+
"testExtensions": ["*Test.php", "*_test.php"],
|
|
10
|
+
"detectFiles": ["composer.json", "index.php", "artisan", "public/index.php"],
|
|
11
|
+
"commands": {
|
|
12
|
+
"test": "vendor/bin/phpunit",
|
|
13
|
+
"lint": "vendor/bin/phpstan analyse --level=6",
|
|
14
|
+
"format": "vendor/bin/php-cs-fixer fix",
|
|
15
|
+
"serve": "php -S localhost:8000 -t public/",
|
|
16
|
+
"build": null
|
|
17
|
+
},
|
|
18
|
+
"qualityGates": [
|
|
19
|
+
{ "name": "PHPStan", "command": "vendor/bin/phpstan analyse --level=6", "required": true, "order": 1 },
|
|
20
|
+
{ "name": "PHPUnit", "command": "vendor/bin/phpunit", "required": true, "order": 2 },
|
|
21
|
+
{ "name": "CS Fixer", "command": "vendor/bin/php-cs-fixer fix --dry-run --diff", "required": false, "order": 3 }
|
|
22
|
+
],
|
|
23
|
+
"frameworks": [
|
|
24
|
+
{ "id": "laravel", "name": "Laravel", "icon": "🏗️", "detectFiles": ["artisan", "bootstrap/app.php"] },
|
|
25
|
+
{ "id": "laravel-octane", "name": "Laravel + Octane (RoadRunner)", "icon": "🚀", "detectFiles": ["artisan", "rr.yaml"] },
|
|
26
|
+
{ "id": "symfony", "name": "Symfony", "icon": "🎵", "detectFiles": ["symfony.lock"] },
|
|
27
|
+
{ "id": "codeigniter", "name": "CodeIgniter", "icon": "🧩", "detectFiles": ["spark"] },
|
|
28
|
+
{ "id": "vanilla", "name": "Vanilla PHP", "icon": "📄" }
|
|
29
|
+
],
|
|
30
|
+
"databases": [
|
|
31
|
+
{ "id": "mysql", "name": "MySQL / MariaDB", "icon": "🐬" },
|
|
32
|
+
{ "id": "postgresql", "name": "PostgreSQL", "icon": "🐘" },
|
|
33
|
+
{ "id": "mongodb", "name": "MongoDB", "icon": "🍃" },
|
|
34
|
+
{ "id": "sqlite", "name": "SQLite", "icon": "📁" },
|
|
35
|
+
{ "id": "none", "name": "None", "icon": "❌" }
|
|
36
|
+
],
|
|
37
|
+
"frontendOptions": [
|
|
38
|
+
{ "id": "react-tailwind", "name": "ReactJS 19+ / TailwindCSS 4+", "icon": "⚛️" },
|
|
39
|
+
{ "id": "tailwind-vanilla", "name": "TailwindCSS 4+ / Vanilla JS", "icon": "🎨" },
|
|
40
|
+
{ "id": "blade", "name": "Blade Templates (Laravel)", "icon": "🖼️" },
|
|
41
|
+
{ "id": "livewire", "name": "Livewire + Alpine.js", "icon": "⚡" },
|
|
42
|
+
{ "id": "twig", "name": "Twig Templates (Symfony)", "icon": "🌿" },
|
|
43
|
+
{ "id": "none", "name": "API only — no frontend", "icon": "❌" }
|
|
44
|
+
],
|
|
45
|
+
"deployTargets": [
|
|
46
|
+
{ "id": "shared-hosting", "name": "Shared Hosting (FTP)", "icon": "🌐" },
|
|
47
|
+
{ "id": "docker", "name": "Docker", "icon": "🐳" },
|
|
48
|
+
{ "id": "vps-ssh", "name": "VPS (SSH)", "icon": "☁️" },
|
|
49
|
+
{ "id": "cpanel", "name": "cPanel", "icon": "📦" },
|
|
50
|
+
{ "id": "forge", "name": "Laravel Forge", "icon": "🔨" },
|
|
51
|
+
{ "id": "vapor", "name": "Laravel Vapor (AWS)", "icon": "☁️" }
|
|
52
|
+
],
|
|
53
|
+
"skills": [
|
|
54
|
+
"php-patterns",
|
|
55
|
+
"phpunit-testing",
|
|
56
|
+
"phpstan-analysis",
|
|
57
|
+
"composer-workflow",
|
|
58
|
+
"security-scan-php"
|
|
59
|
+
],
|
|
60
|
+
"requirements": [
|
|
61
|
+
{
|
|
62
|
+
"name": "PHP",
|
|
63
|
+
"command": "php",
|
|
64
|
+
"versionFlag": "-v",
|
|
65
|
+
"minVersion": "8.3.0",
|
|
66
|
+
"installCommand": {
|
|
67
|
+
"macos": "brew install php@8.3",
|
|
68
|
+
"linux": "sudo apt install -y php8.3-cli php8.3-mbstring php8.3-xml php8.3-curl php8.3-zip"
|
|
69
|
+
},
|
|
70
|
+
"versionRegex": "PHP\\s+(\\d+\\.\\d+\\.\\d+)"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "Composer",
|
|
74
|
+
"command": "composer",
|
|
75
|
+
"versionFlag": "--version",
|
|
76
|
+
"minVersion": "2.0.0",
|
|
77
|
+
"installCommand": {
|
|
78
|
+
"macos": "brew install composer",
|
|
79
|
+
"linux": "curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer"
|
|
80
|
+
},
|
|
81
|
+
"versionRegex": "(\\d+\\.\\d+\\.\\d+)"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "Node.js",
|
|
85
|
+
"command": "node",
|
|
86
|
+
"versionFlag": "--version",
|
|
87
|
+
"minVersion": "18.0.0",
|
|
88
|
+
"installCommand": {
|
|
89
|
+
"macos": "brew install node",
|
|
90
|
+
"linux": "curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install -y nodejs"
|
|
91
|
+
},
|
|
92
|
+
"versionRegex": "v?(\\d+\\.\\d+\\.\\d+)"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
## Last Change
|
|
4
|
+
|
|
5
|
+
**Branch:** main
|
|
6
|
+
**Date:** {{DATE}}
|
|
7
|
+
**Summary:** Initial project setup with start-vibing-stacks
|
|
8
|
+
|
|
9
|
+
## 30 Seconds Overview
|
|
10
|
+
|
|
11
|
+
{{PROJECT_NAME}} is a {{STACK}} project using {{FRAMEWORK}} framework.
|
|
12
|
+
|
|
13
|
+
## Stack
|
|
14
|
+
|
|
15
|
+
| Component | Technology |
|
|
16
|
+
|-----------|------------|
|
|
17
|
+
| Stack | {{STACK}} |
|
|
18
|
+
| Framework | {{FRAMEWORK}} |
|
|
19
|
+
| Database | {{DATABASE}} |
|
|
20
|
+
|
|
21
|
+
## Architecture
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
project/
|
|
25
|
+
├── src/ # Source code
|
|
26
|
+
├── tests/ # Tests
|
|
27
|
+
├── public/ # Public assets
|
|
28
|
+
├── .claude/ # AI agent configuration
|
|
29
|
+
│ ├── agents/ # Specialized agents
|
|
30
|
+
│ ├── skills/ # Knowledge base
|
|
31
|
+
│ ├── hooks/ # Validation hooks
|
|
32
|
+
│ └── config/ # Project configuration
|
|
33
|
+
└── CLAUDE.md # This file
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Critical Rules
|
|
37
|
+
|
|
38
|
+
- Follow stack-specific patterns in `.claude/skills/`
|
|
39
|
+
- Run quality gates before every commit
|
|
40
|
+
- Document all changes in domain files
|
|
41
|
+
- Use conventional commits
|
|
42
|
+
|
|
43
|
+
## FORBIDDEN
|
|
44
|
+
|
|
45
|
+
| Action | Reason |
|
|
46
|
+
|--------|--------|
|
|
47
|
+
| Skip tests | Quality gate will block |
|
|
48
|
+
| Direct commits to main | Use feature branches |
|
|
49
|
+
| Ignore type errors | PHPStan/TypeScript must pass |
|
|
50
|
+
| Hardcode secrets | Use environment variables |
|
|
51
|
+
|
|
52
|
+
## Quality Gates
|
|
53
|
+
|
|
54
|
+
Read `.claude/config/active-project.json` for stack-specific commands.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
## Last Change
|
|
4
|
+
|
|
5
|
+
**Branch:** main
|
|
6
|
+
**Date:** {{DATE}}
|
|
7
|
+
**Summary:** Initial project setup with start-vibing-stacks (PHP)
|
|
8
|
+
|
|
9
|
+
## 30 Seconds Overview
|
|
10
|
+
|
|
11
|
+
{{PROJECT_NAME}} is a PHP 8.3+ project using {{FRAMEWORK}}.
|
|
12
|
+
|
|
13
|
+
## Stack
|
|
14
|
+
|
|
15
|
+
| Component | Technology |
|
|
16
|
+
|-----------|------------|
|
|
17
|
+
| Language | PHP >= 8.3 |
|
|
18
|
+
| Framework | {{FRAMEWORK}} |
|
|
19
|
+
| Database | {{DATABASE}} |
|
|
20
|
+
| Package Manager | Composer |
|
|
21
|
+
| Static Analysis | PHPStan (level 6) |
|
|
22
|
+
| Testing | PHPUnit |
|
|
23
|
+
| Code Style | PHP-CS-Fixer (PSR-12) |
|
|
24
|
+
|
|
25
|
+
## Architecture
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
project/
|
|
29
|
+
├── src/ # Application source (PSR-4: App\)
|
|
30
|
+
├── public/ # Web root (index.php)
|
|
31
|
+
├── config/ # Configuration files
|
|
32
|
+
├── tests/
|
|
33
|
+
│ ├── Unit/ # PHPUnit unit tests
|
|
34
|
+
│ └── Feature/ # Feature/integration tests
|
|
35
|
+
├── storage/ # Logs, cache, uploads
|
|
36
|
+
├── .claude/ # AI agent configuration
|
|
37
|
+
├── composer.json # Dependencies
|
|
38
|
+
├── phpstan.neon # Static analysis config
|
|
39
|
+
└── CLAUDE.md # This file
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Critical Rules
|
|
43
|
+
|
|
44
|
+
- **PHP >= 8.3** — use modern features (readonly, enums, typed constants)
|
|
45
|
+
- **`declare(strict_types=1)`** in EVERY PHP file
|
|
46
|
+
- **PSR-4 autoloading** — no manual includes
|
|
47
|
+
- **Prepared statements** — NEVER concatenate SQL
|
|
48
|
+
- **Type everything** — properties, params, returns
|
|
49
|
+
- **htmlspecialchars()** — all user output
|
|
50
|
+
- **password_hash/verify** — NEVER md5/sha1
|
|
51
|
+
|
|
52
|
+
## FORBIDDEN
|
|
53
|
+
|
|
54
|
+
| Action | Reason |
|
|
55
|
+
|--------|--------|
|
|
56
|
+
| `eval()` | Remote code execution risk |
|
|
57
|
+
| `mysql_*` functions | Deprecated, use PDO |
|
|
58
|
+
| `extract($_POST)` | Variable injection |
|
|
59
|
+
| `include $_GET[...]` | Local file inclusion |
|
|
60
|
+
| SQL without prepared statements | SQL injection |
|
|
61
|
+
| `echo $userInput` without escape | XSS |
|
|
62
|
+
| `md5($password)` | Weak hashing |
|
|
63
|
+
| PHP < 8.3 syntax | Version requirement |
|
|
64
|
+
|
|
65
|
+
## Quality Gates
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
vendor/bin/phpstan analyse --level=6 # Static analysis
|
|
69
|
+
vendor/bin/phpunit # Tests
|
|
70
|
+
vendor/bin/php-cs-fixer fix --dry-run # Code style
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## HTTP Requests
|
|
74
|
+
|
|
75
|
+
All database queries MUST use prepared statements:
|
|
76
|
+
|
|
77
|
+
```php
|
|
78
|
+
$stmt = $pdo->prepare("SELECT * FROM users WHERE id = :id");
|
|
79
|
+
$stmt->execute([':id' => $userId]);
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Workflow
|
|
83
|
+
|
|
84
|
+
1. Create feature branch
|
|
85
|
+
2. Implement with types, strict mode
|
|
86
|
+
3. Run PHPStan + PHPUnit
|
|
87
|
+
4. Update domains & CLAUDE.md
|
|
88
|
+
5. Commit → merge to main
|