Generate workflow commands based on project structure and PRDs
Generates project-specific workflow commands by detecting stack and test commands from project structure.
/plugin marketplace add laurigates/claude-plugins/plugin install blueprint-plugin@lgates-claude-pluginsGenerate workflow commands customized for this project.
Commands are generated to .claude/commands/ directory.
Prerequisites:
docs/prds/Steps:
Detect project type and stack:
package.json -> Node.js projectpyproject.toml / setup.py -> Python projectCargo.toml -> Rust projectgo.mod -> Go projectMakefile -> Check make targetsDetect test runner and commands:
package.json scripts for test, test:unit, test:integrationcargo testgo testDetect build and dev commands:
package.json scriptsMakefile targetsCheck for existing generated commands:
ls .claude/commands/ 2>/dev/null
Generate /project:continue command:
Create file at .claude/commands/project-continue.md:
---
description: "Continue development on [project-name] (project-specific)"
allowed_tools: [Read, Bash, Grep, Glob, Edit, Write]
---
Continue project development (customized for this project).
**Project-specific configuration**:
- Test command: `[detected_test_command]`
- Build command: `[detected_build_command]`
- Dev command: `[detected_dev_command]`
1. **Check current state**:
- Run `git status` (branch, uncommitted changes)
- Run `git log -5 --oneline` (recent commits)
2. **Read context**:
- All PRDs in `docs/prds/`
- `work-overview.md` (current phase and progress)
- Recent work-orders (completed and pending)
3. **Identify next task**:
- Based on PRD requirements
- Based on work-overview progress
- Based on git status (resume if in progress)
4. **Begin work following TDD**:
- Apply project-specific rules automatically
- Follow RED -> GREEN -> REFACTOR workflow
- Commit incrementally with conventional commits
Report before starting:
- Current project status summary
- Next task identified
- Approach and plan
Generate /project:test-loop command:
Create file at .claude/commands/project-test-loop.md:
---
description: "TDD loop for [project-name] using [test-runner]"
allowed_tools: [Read, Edit, Bash]
---
Run TDD cycle (customized for this project).
**Project-specific configuration**:
- Test command: `[detected_test_command]`
- Watch mode: `[detected_watch_command]` (if available)
1. **Run test suite**: `[detected_test_command]`
2. **If tests fail**:
- Analyze failure output
- Identify root cause
- Make minimal fix to pass the test
- Re-run tests to confirm
3. **If tests pass**:
- Check for refactoring opportunities
- Refactor while keeping tests green
- Re-run tests to confirm still passing
4. **Repeat until**:
- All tests pass
- No obvious refactoring needed
- User intervention required
Report:
- Test results summary
- Fixes applied
- Refactorings performed
- Current status (all pass / needs work / blocked)
Generate project-specific commands (optional):
Update manifest with generation tracking:
{
"project": {
"detected_stack": ["typescript", "bun", "react"]
},
"generated": {
"commands": {
"project-continue": {
"source": "auto-detection",
"detected_stack": "[detected stack]",
"generated_at": "[ISO timestamp]",
"plugin_version": "3.0.0",
"content_hash": "sha256:...",
"status": "current"
},
"project-test-loop": { ... }
}
}
}
Report:
Workflow commands generated!
Created in .claude/commands/:
- project-continue.md -> /project:continue
- project-test-loop.md -> /project:test-loop
[- Additional project-specific commands]
Detected configuration:
- Project type: [Node.js / Python / Rust / etc.]
- Stack: [detected libraries/frameworks]
- Test command: [detected command]
- Build command: [detected command]
- Dev command: [detected command]
Prompt for next action (use AskUserQuestion):
question: "Workflow commands ready. What would you like to do?"
options:
- label: "Start development (Recommended)"
description: "Run /project:continue to begin working on next task"
- label: "Create a work-order"
description: "Package a task for isolated subagent execution"
- label: "Update CLAUDE.md"
description: "Regenerate project overview with new commands"
- label: "I'm done for now"
description: "Exit - commands are ready to use anytime"
Based on selection:
/project:continue/blueprint:work-order/blueprint:claude-mdImportant:
Error Handling: