一键导入
git-workflow
Enforce structured git workflow with conventional commits, feature branches, semver versioning, and work logging. Use for all code changes to prevent work loss and maintain history.
菜单
Enforce structured git workflow with conventional commits, feature branches, semver versioning, and work logging. Use for all code changes to prevent work loss and maintain history.
Define and use custom HTML elements. Use when creating new components, defining custom tags, or using project-specific elements beyond standard HTML5.
Write vanilla JavaScript for Web Components with functional core, imperative shell. Use when creating JavaScript files, building interactive components, or writing any client-side code.
Modern CSS organization with native @import, @layer cascade control, CSS nesting, design tokens, and element-focused selectors. AUTO-INVOKED when editing .css files.
INVOKE FIRST before any code work. Validates git workflow (branch, issue, worklog) and checks approach. Use at START of every task and END before completing. Prevents skipped steps.
Use consistent Lucide icons with the <icon-wc> component. Use when adding icons to pages, buttons, or UI elements.
Umbrella coordinator for image handling. Coordinates responsive-images, placeholder-images, and automation scripts. Use when adding images to any page, optimizing existing images, or setting up image pipelines.
| name | git-workflow |
| description | Enforce structured git workflow with conventional commits, feature branches, semver versioning, and work logging. Use for all code changes to prevent work loss and maintain history. |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
For the full session workflow, see
.claude/AGENTS.md.
Structured development workflow using git, conventional commits, and semantic versioning.
| Principle | Description |
|---|---|
| Issue-First | All work starts with an issue (bd or GitHub) |
| Feature Branches | One branch per issue/feature |
| Conventional Commits | Structured commit messages |
| Semver Versioning | Semantic version numbers |
| UAT Workflow | Human acceptance testing before merge |
┌─────────────────────────────────────────────────────────────┐
│ 1. Create/claim issue (bd create or bd update --status) │
│ ↓ │
│ 2. Create feature branch (git checkout -b type/issue-id) │
│ ↓ │
│ 3. Make changes, commit with conventional format │
│ ↓ │
│ 4. Request UAT (/uat request <feature>) │
│ ↓ │
│ 5. Human tests and approves (/uat approve) or denies │
│ ↓ │
│ 6. Merge to main, close issue, tag if release │
└─────────────────────────────────────────────────────────────┘
<type>/<issue-id>-<short-description>
| Type | Use Case | Example |
|---|---|---|
feature/ | New functionality | feature/proj-123-dark-mode |
fix/ | Bug fixes | fix/proj-456-form-validation |
chore/ | Maintenance, deps | chore/proj-789-update-deps |
docs/ | Documentation only | docs/proj-101-api-reference |
refactor/ | Code restructuring | refactor/proj-202-simplify-auth |
Format: <type>(<scope>): <description>
| Type | When to Use |
|---|---|
feat | New feature for the user |
fix | Bug fix for the user |
docs | Documentation changes |
style | Formatting, missing semicolons (no code change) |
refactor | Refactoring production code |
test | Adding tests (no production code change) |
chore | Build tasks, package manager configs |
# Feature
git commit -m "feat(auth): add OAuth2 login support"
# Bug fix
git commit -m "fix(forms): correct email validation regex"
# Documentation
git commit -m "docs(readme): add installation instructions"
# Breaking change (add ! after type)
git commit -m "feat(api)!: change response format to JSON:API"
git commit -m "$(cat <<'EOF'
feat(validation): add incremental file validation
- Add git-aware file detection
- Implement MD5-based result caching
- Support staged-only mode for pre-commit hooks
Closes: proj-59l
EOF
)"
Format: MAJOR.MINOR.PATCH
| Version Part | When to Bump | Example |
|---|---|---|
| MAJOR | Breaking changes | 1.0.0 → 2.0.0 |
| MINOR | New features (backward compatible) | 1.0.0 → 1.1.0 |
| PATCH | Bug fixes (backward compatible) | 1.0.0 → 1.0.1 |
# Create annotated tag
git tag -a v1.2.0 -m "Release v1.2.0: Add dark mode support"
# Push tags
git push origin --tags
# Sync with remote
git fetch origin
git checkout main
git pull origin main
# Create feature branch
git checkout -b feature/{issue-id}-description
# Claim the issue
bd update {issue-id} --status in_progress
# Stage changes
git add <files>
# Commit with conventional format
git commit -m "feat(scope): description"
# Push to remote (first time)
git push -u origin feature/{issue-id}-description
# Push subsequent changes
git push
# Ensure all tests pass
npm test
# Request UAT
# /uat request <feature-name>
# After UAT approval, merge to main
git checkout main
git pull origin main
git merge --no-ff feature/{issue-id}-description
git push origin main
# Close the issue
bd close {issue-id} --reason "Implemented and merged"
# Delete feature branch
git branch -d feature/{issue-id}-description
git push origin --delete feature/{issue-id}-description
After completing work, request human testing:
/uat request <feature-name>
This creates a uat-<feature-name>.md file with testing instructions.
Human reviews and responds:
/uat approve <feature-name> # Feature accepted
/uat deny <feature-name> # Feature needs work
If UAT is denied:
When starting an AI assistant session:
bd ready or bd list --status opengit log --oneline -10 for context| Situation | Action |
|---|---|
| Working without an issue | Create issue first with bd create |
| Commits directly to main | Use feature branch |
| Large uncommitted changes | Commit incrementally |
| Merge conflicts | Resolve carefully, test after |
# Start work on issue
bd update <id> --status in_progress
git checkout -b feature/<id>-description
# Commit change
git add . && git commit -m "feat(scope): description"
# Complete work
git push -u origin HEAD
# /uat request <feature>
# After approval: merge, close issue, cleanup