Initial commit
This commit is contained in:
11
.claude-plugin/plugin.json
Normal file
11
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "rules-boilerplate",
|
||||||
|
"description": "Bootstrap .claude/rules/ structure for Laravel/Vue projects. Creates starter rule templates for backend, frontend, and data class conventions. Works perfectly with the engineering-roles plugin.",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": {
|
||||||
|
"name": "RasmusGodske"
|
||||||
|
},
|
||||||
|
"commands": [
|
||||||
|
"./commands"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# rules-boilerplate
|
||||||
|
|
||||||
|
Bootstrap .claude/rules/ structure for Laravel/Vue projects. Creates starter rule templates for backend, frontend, and data class conventions. Works perfectly with the engineering-roles plugin.
|
||||||
184
commands/setup-rules.md
Normal file
184
commands/setup-rules.md
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
---
|
||||||
|
description: Clone Laravel/Vue convention rules into .claude/rules/
|
||||||
|
---
|
||||||
|
|
||||||
|
# Setup Rules Command
|
||||||
|
|
||||||
|
Clone the Laravel/Vue convention rules repository into your project's `.claude/rules/` directory.
|
||||||
|
|
||||||
|
## What This Command Does
|
||||||
|
|
||||||
|
This command will:
|
||||||
|
1. Check if `.claude/rules/` already exists (won't overwrite)
|
||||||
|
2. Clone the rules repository: `https://github.com/RasmusGodske/laravel-vue-rules`
|
||||||
|
3. Set up as git submodule (recommended) or regular clone
|
||||||
|
4. Provide guidance on customizing and updating rules
|
||||||
|
|
||||||
|
## What Gets Cloned
|
||||||
|
|
||||||
|
```
|
||||||
|
.claude/rules/ # Cloned from laravel-vue-rules repo
|
||||||
|
├── backend/
|
||||||
|
│ └── form-data-classes.md
|
||||||
|
├── frontend/
|
||||||
|
│ ├── vue-conventions.md
|
||||||
|
│ └── component-composition.md
|
||||||
|
├── dataclasses/
|
||||||
|
│ └── laravel-data.md
|
||||||
|
└── README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## Workflow
|
||||||
|
|
||||||
|
### Step 1: Check Existing Rules
|
||||||
|
|
||||||
|
First, check if `.claude/rules/` already exists:
|
||||||
|
|
||||||
|
Use Bash: `ls -la .claude/rules/ 2>/dev/null || echo "No rules directory found"`
|
||||||
|
|
||||||
|
If the directory exists:
|
||||||
|
- Ask: "I see you already have a `.claude/rules/` directory. Would you like me to:
|
||||||
|
1. Skip setup (keep existing rules)
|
||||||
|
2. Backup existing and clone fresh rules
|
||||||
|
3. Cancel"
|
||||||
|
|
||||||
|
Wait for user choice. If user wants to skip or cancel, stop here.
|
||||||
|
|
||||||
|
### Step 2: Ask About Git Submodule
|
||||||
|
|
||||||
|
Ask user: "Would you like to set up the rules as a git submodule (recommended) or a regular clone?
|
||||||
|
|
||||||
|
**Git Submodule (Recommended):**
|
||||||
|
- ✅ Easy to update (git pull in submodule)
|
||||||
|
- ✅ Can track specific version
|
||||||
|
- ✅ Clear separation from your code
|
||||||
|
- ⚠️ Requires git repository
|
||||||
|
|
||||||
|
**Regular Clone:**
|
||||||
|
- ✅ Simpler setup
|
||||||
|
- ✅ No git dependencies
|
||||||
|
- ❌ Harder to update
|
||||||
|
- ❌ Becomes part of your project"
|
||||||
|
|
||||||
|
Wait for user choice.
|
||||||
|
|
||||||
|
### Step 3: Clone the Rules
|
||||||
|
|
||||||
|
#### Option A: Git Submodule (Recommended)
|
||||||
|
|
||||||
|
If user chose submodule:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Ensure .claude directory exists
|
||||||
|
mkdir -p .claude
|
||||||
|
|
||||||
|
# Check if project is a git repo
|
||||||
|
if [ -d .git ]; then
|
||||||
|
git submodule add https://github.com/RasmusGodske/laravel-vue-rules .claude/rules
|
||||||
|
git submodule update --init --recursive
|
||||||
|
echo "✅ Added as git submodule"
|
||||||
|
else
|
||||||
|
echo "⚠️ Not a git repository. Using regular clone instead."
|
||||||
|
git clone https://github.com/RasmusGodske/laravel-vue-rules .claude/rules
|
||||||
|
fi
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Option B: Regular Clone
|
||||||
|
|
||||||
|
If user chose regular clone:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Ensure .claude directory exists
|
||||||
|
mkdir -p .claude
|
||||||
|
|
||||||
|
# Clone the rules
|
||||||
|
git clone https://github.com/RasmusGodske/laravel-vue-rules .claude/rules
|
||||||
|
|
||||||
|
# Remove git history to make it part of your project
|
||||||
|
cd .claude/rules
|
||||||
|
rm -rf .git
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
echo "✅ Cloned rules (non-submodule)"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 4: Confirm and Guide
|
||||||
|
|
||||||
|
After cloning:
|
||||||
|
|
||||||
|
**Show summary:**
|
||||||
|
```
|
||||||
|
✅ Cloned laravel-vue-rules into .claude/rules/
|
||||||
|
|
||||||
|
Files included:
|
||||||
|
- backend/form-data-classes.md
|
||||||
|
- frontend/vue-conventions.md
|
||||||
|
- frontend/component-composition.md
|
||||||
|
- dataclasses/laravel-data.md
|
||||||
|
- README.md
|
||||||
|
|
||||||
|
Next steps:
|
||||||
|
1. Review each file and customize for your project
|
||||||
|
2. Add project-specific patterns and examples
|
||||||
|
3. Remove sections that don't apply to your stack
|
||||||
|
|
||||||
|
Updating rules (if using submodule):
|
||||||
|
cd .claude/rules
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
|
Forking for your team:
|
||||||
|
1. Fork https://github.com/RasmusGodske/laravel-vue-rules
|
||||||
|
2. Customize rules in your fork
|
||||||
|
3. Update submodule URL:
|
||||||
|
git submodule set-url .claude/rules https://github.com/your-org/laravel-vue-rules
|
||||||
|
|
||||||
|
These rules will be automatically loaded by project-roles plugin when you activate roles like /roles/backend-engineer or /roles/frontend-engineer.
|
||||||
|
```
|
||||||
|
|
||||||
|
**Provide customization guidance:**
|
||||||
|
- "These are starter templates based on common Laravel/Vue best practices"
|
||||||
|
- "You should customize them to match your team's specific patterns"
|
||||||
|
- "Add real examples from your codebase"
|
||||||
|
- "Consider forking the repo for your organization to maintain custom rules"
|
||||||
|
|
||||||
|
## Important Notes
|
||||||
|
|
||||||
|
- **Never overwrite existing rules without explicit confirmation**
|
||||||
|
- **Templates are starting points** - customize for your team
|
||||||
|
- **Git submodule recommended** - easier to update and track changes
|
||||||
|
- **Fork for team use** - maintain your own version with team conventions
|
||||||
|
|
||||||
|
## Integration with project-roles Plugin
|
||||||
|
|
||||||
|
These rules work seamlessly with the `project-roles` plugin:
|
||||||
|
|
||||||
|
- When you run `/roles/backend-engineer`, it loads `backend/` rules
|
||||||
|
- When you run `/roles/frontend-engineer`, it loads `frontend/` rules
|
||||||
|
- When you run `/roles/fullstack-engineer`, it loads both
|
||||||
|
|
||||||
|
The rules become the "source of truth" for your project conventions.
|
||||||
|
|
||||||
|
## Updating Rules
|
||||||
|
|
||||||
|
### If Using Git Submodule
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd .claude/rules
|
||||||
|
git pull origin main
|
||||||
|
cd ../..
|
||||||
|
git add .claude/rules
|
||||||
|
git commit -m "Update convention rules"
|
||||||
|
```
|
||||||
|
|
||||||
|
### If Using Regular Clone
|
||||||
|
|
||||||
|
You'll need to manually pull changes or re-clone:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd .claude/rules
|
||||||
|
git pull https://github.com/RasmusGodske/laravel-vue-rules main
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Execute this command to clone convention rules into your project.
|
||||||
45
plugin.lock.json
Normal file
45
plugin.lock.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:RasmusGodske/dev-agent-workflow:rules-boilerplate",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "212ff2485e32fa408cfcc97167567441bb371e08",
|
||||||
|
"treeHash": "67b17d58067219aae955cc42c8039714ca18cdbf7f823f059103facb11411a70",
|
||||||
|
"generatedAt": "2025-11-28T10:12:41.461271Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "rules-boilerplate",
|
||||||
|
"description": "Bootstrap .claude/rules/ structure for Laravel/Vue projects. Creates starter rule templates for backend, frontend, and data class conventions. Works perfectly with the engineering-roles plugin.",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "5148a1959fc5de07a43778884509810bbf249d3e8307bafd9cb16075ba764a97"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "0d6cba3745ebfd4c85cfaa5840d03e4c309f624d474fded5564e5287dce04010"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/setup-rules.md",
|
||||||
|
"sha256": "f3dec0a5b4cd56152263fd51ab81c1f8ee30e47539f38e6b145db562ea96f531"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "67b17d58067219aae955cc42c8039714ca18cdbf7f823f059103facb11411a70"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user