From majestic-engineer
Creates a numbered feature branch, prompt.md, and blueprint.md files for a Linked Decision Record from a short description argument, then stages them with git add.
npx claudepluginhub majesticlabs-dev/majestic-marketplace --plugin majestic-engineer[short description of the feature or fix]haikugit/## Context
- Current branch: !`git branch --show-current`
- Default branch: !`git remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}' || echo "main"`
- Git user: !`git config user.name 2>/dev/null || echo "unknown"`
- Today: !`date +%Y-%m-%d`
- Existing prompts: !`ls docs/prompts/*.md 2>/dev/null | sort -t/ -k3 | tail -5 || echo "(none yet)"`
## Workflow
### Step 1: Parse Arguments
### Step 2: Generate Sequence Number
### Step 3: Generate Slug
### Step 4: Create Directories
### Step 5: Create Branch
If branch already exists: checkout existing, warn user.../create-branchCreates a new feature branch with optimized short naming and auto-incrementing numbers, from a description or auto-generated from uncommitted changes.
/feature-flowOrchestrates complete git workflow: analyzes staged changes or issue number, creates branches/issues/commits, runs lints/tests, creates merge requests.
Share bugs, ideas, or general feedback.
git branch --show-currentgit remote show origin 2>/dev/null | grep 'HEAD branch' | awk '{print $NF}' || echo "main"git config user.name 2>/dev/null || echo "unknown"date +%Y-%m-%dls docs/prompts/*.md 2>/dev/null | sort -t/ -k3 | tail -5 || echo "(none yet)"DESCRIPTION = $ARGUMENTS
If DESCRIPTION is empty:
AskUserQuestion: "What feature or fix are you starting?"
EXISTING = Glob("docs/prompts/*.md")
If EXISTING is empty:
NNN = "001"
Else:
LAST = extract highest number from filenames (pattern: NNN-*.md)
NNN = zero-pad(LAST + 1, 3)
SLUG = DESCRIPTION
→ lowercase
→ replace spaces/special chars with hyphens
→ remove consecutive hyphens
→ truncate to 50 chars
→ trim trailing hyphens
Bash: mkdir -p docs/prompts docs/blueprints
DEFAULT_BRANCH = from Context above
Bash: git checkout <DEFAULT_BRANCH> && git pull origin <DEFAULT_BRANCH> 2>/dev/null; git checkout -b feature/{NNN}-{SLUG}
If branch already exists: checkout existing, warn user, continue.
Read template from resources/ldr-start/prompt-template.txt.
Replace placeholders:
{NNN} → sequence number{SLUG} → generated slug{DATE} → today's date{AUTHOR} → git user nameWrite to docs/prompts/{NNN}-{SLUG}.md.
Read template from resources/ldr-start/blueprint-template.txt.
Replace same placeholders.
Write to docs/blueprints/{NNN}-{SLUG}.md.
Bash: git add docs/prompts/{NNN}-{SLUG}.md docs/blueprints/{NNN}-{SLUG}.md
## LDR Created
**Number:** {NNN}
**Branch:** `feature/{NNN}-{SLUG}`
**Prompt:** `docs/prompts/{NNN}-{SLUG}.md`
**Blueprint:** `docs/blueprints/{NNN}-{SLUG}.md`
Next steps:
1. Fill in the prompt file with your problem statement
2. Fill in the blueprint with your implementation plan
3. Implement, commit with `feat:`/`fix:` prefix
4. `/create-pr` when ready
| Prefix | Use |
|---|---|
feat: | New feature |
fix: | Bug fix |
refactor: | Code restructuring |
docs: | Documentation only |
test: | Test additions/changes |
chore: | Maintenance tasks |