Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:54:38 +08:00
commit fffaa45e39
76 changed files with 14220 additions and 0 deletions

1
commands/README.md Normal file
View File

@@ -0,0 +1 @@
TODO - this should be a brief end user documentation explaining what each command is used for

View File

@@ -0,0 +1,5 @@
---
description: Interactive design refinement using Socratic method
---
Use and follow the brainstorming skill exactly as written

106
commands/cc/crispy.md Normal file
View File

@@ -0,0 +1,106 @@
---
description: Run complete CrispyClaude workflow from brainstorm to PR creation
---
Run the complete CrispyClaude workflow from ideation to PR creation.
**Prerequisites:** None (orchestrates entire workflow from start)
**Complete Workflow:**
## Step 1: Brainstorm
Invoke the `brainstorming` skill.
At completion, prompt:
```
Ready to:
A) Write the plan
B) Research first
Choose: (A/B)
```
## Step 2: Research (Optional)
If user selects **B**:
- Invoke `research-orchestration` skill
- Skill analyzes brainstorm and suggests researchers
- User can adjust selection (Codebase, Library docs, Web, GitHub)
- Spawns up to 4 subagents in parallel
- Synthesizes findings
- **Automatically saves:** `YYYY-MM-DD-<feature>-research.md`
## Step 3: Write Plan
Invoke `writing-plans` skill.
- Incorporates research findings if available
- Outputs plan to `docs/plans/YYYY-MM-DD-<feature>.md`
## Step 4: Parse Plan
Invoke `decomposing-plans` skill (ALWAYS decompose in crispy workflow).
- Creates task files in `docs/plans/tasks/YYYY-MM-DD-<feature>/`
- Generates manifest with parallel batches
At completion, prompt:
```
Plan decomposed into X tasks across Y batches.
Ready to:
A) Review the plan
B) Execute immediately
Choose: (A/B)
```
## Step 5: Review Plan (Optional)
If user selects **A**:
- Invoke `plan-review` skill
- Validates completeness, quality, feasibility, scope
- Interactive refinement until approved
- Updates plan if changes made
## Step 6: Execute Plan
Invoke `parallel-subagent-driven-development` skill.
- Executes tasks in parallel batches (up to 2 concurrent)
- Code review gate after each batch
- Handles failures with resilience mechanisms
## Step 7: Save Memory
Invoke `state-persistence` skill with `type=complete`.
- Captures implementation learnings, patterns, gotchas
- **Automatically saves:** `YYYY-MM-DD-<feature>-complete.md`
## Step 8: Create PR
Invoke `pr-creation` skill.
- Verifies on feature branch
- Generates PR description from plan, execution, memory
- Pushes branch to remote
- Creates PR with `gh pr create`
- Outputs PR URL
**Workflow Complete!** 🎉
---
**Throughout Workflow:**
- User can run `/cc:save` at any point to pause
- Creates stage-specific memory file
- Later run `/cc:resume <file>` to continue
**Approval Gates:**
- Step 2: Research? (optional)
- Step 5: Review? (optional)
**Automatic Saves:**
- After Step 2: `-research.md`
- After Step 7: `-complete.md`
**Manual Saves:**
- User can `/cc:save` during Steps 3, 6
- Creates `-planning.md` or `-execution.md`

View File

@@ -0,0 +1,9 @@
---
description: Decompose monolithic plan into parallel task files
argument-hint: "[plan-file]"
allowed-tools: [Bash, Read, Write]
---
Use the decomposing-plans skill exactly as written to break up the monolithic plan into individual task files and identify parallelization opportunities.
If no plan file is provided, find the most recent plan in docs/plans/ directory.

View File

@@ -0,0 +1,5 @@
---
description: Execute plan in batches with review checkpoints
---
Use the executing-plans skill exactly as written

26
commands/cc/parse-plan.md Normal file
View File

@@ -0,0 +1,26 @@
---
description: Decompose monolithic plan into parallel task files
argument-hint: "[plan-file]"
---
Use the decomposing-plans skill to break down a monolithic plan into parallel task files.
**Prerequisites:**
- Plan file exists: `docs/plans/YYYY-MM-DD-<feature>.md`
- Plan has 2+ tasks worth decomposing
**What this does:**
1. Reads the monolithic plan
2. Identifies parallelizable tasks
3. Creates task files in `docs/plans/tasks/YYYY-MM-DD-<feature>/`
4. Generates `manifest.json` with parallel batches
5. Prompts for next step: review or execute
**Output:**
- Task files: One per task
- Manifest: Defines batch execution order
- Enables parallel execution (up to 4 tasks per batch)
**Recommendation:** Always decompose plans with 4+ tasks for parallel execution.
**Next step:** Review plan or execute immediately

52
commands/cc/pr.md Normal file
View File

@@ -0,0 +1,52 @@
---
description: Create pull request with auto-generated description from plan and memory
---
Use the pr-creation skill to create a pull request with auto-generated description.
**Prerequisites:**
- On feature branch (NOT main/master)
- Execution completed
- Changes committed to branch
- `gh` CLI installed and authenticated
**What this does:**
**Pre-flight Checks:**
1. Verify on feature branch (error if main/master)
2. Check for uncommitted changes (offer to commit)
3. Verify remote tracking (set up if needed)
4. Check GitHub CLI installed and authenticated
**Generate PR Description from:**
- Plan file: `docs/plans/YYYY-MM-DD-<feature>.md`
- Complete memory: `YYYY-MM-DD-<feature>-complete.md` (if exists)
- Git diff: Files changed summary
- Commit messages: Timeline context
**Description Structure:**
- Summary (from plan overview)
- What Changed (git diff stat)
- Approach (from plan architecture)
- Testing (from plan + verification results)
- Key Learnings (from complete.md)
- References (plan, tasks, research)
**Execute:**
1. Push branch to remote
2. Create PR using `gh pr create`
3. Output PR URL
4. Update complete.md with PR link
**Title Format:** `feat: ${Feature Name}`
**Example:**
```
✅ Pull request created successfully!
PR: https://github.com/user/repo/pull/42
Branch: feature/user-authentication
Base: main
View PR: https://github.com/user/repo/pull/42
```

19
commands/cc/research.md Normal file
View File

@@ -0,0 +1,19 @@
---
description: Spawn parallel research subagents and synthesize findings
---
Use the research-orchestration skill to spawn parallel research subagents and synthesize findings.
**Prerequisites:**
- Brainstorm completed
- Feature concept defined
**What this does:**
1. Analyzes brainstorm context
2. Suggests researchers (Codebase, Library docs, Web, GitHub)
3. Allows user to adjust selection
4. Spawns up to 4 subagents in parallel
5. Synthesizes findings
6. Automatically saves to `YYYY-MM-DD-<feature>-research.md`
**Next step:** Writing implementation plan with research context

72
commands/cc/resume.md Normal file
View File

@@ -0,0 +1,72 @@
---
description: Load saved workflow state from memory and continue from checkpoint
argument-hint: "[memory-file]"
---
Load saved workflow state from Serena MCP memory and continue from checkpoint.
**Usage:** `/cc:resume <memory-file>`
**Example:** `/cc:resume 2025-11-20-user-auth-execution.md`
**Prerequisites:**
- Valid memory file exists: `YYYY-MM-DD-<feature>-<stage>.md`
- Memory has required frontmatter metadata
**What this does:**
**Load & Parse:**
1. Read memory file from Serena MCP
2. Parse frontmatter (status, type, branch)
3. Load full content into conversation context
**Analyze Progress:**
- Based on type (research, planning, execution, complete)
- Check status (in-progress, complete, blocked)
- Determine what's done vs. remaining
**Present Assessment:**
```
Loaded: ${filename}
Status: ${status}
Branch: ${branch}
Last updated: ${date}
${stage-specific-summary}
Next step in crispy workflow: ${recommended-next-step}
Options:
A) ${primary-next-action}
B) ${alternative-action}
C) ${another-alternative}
D) Skip to different workflow step
```
**Stage-Specific Options:**
**From research.md:**
- A) Write plan with research context
- B) Re-run specific research subagent
- C) Do additional research
**From planning.md:**
- A) Continue writing plan
- B) Review draft with plan-review
- C) Start over with new brainstorm
**From execution.md:**
- A) Continue execution from current task
- B) Review completed work
- C) Adjust remaining tasks
**From complete.md:**
- A) Create PR
- B) Make additional changes
- C) Review implementation
**Flexible Continuation:**
- User can continue crispy workflow
- Or run any individual command
- Context fully restored

View File

@@ -0,0 +1,33 @@
---
description: Validate implementation plans for completeness, quality, feasibility, and scope
---
Use the plan-review skill to validate implementation plans for completeness, quality, feasibility, and scope.
**Prerequisites:**
- Plan file exists: `docs/plans/YYYY-MM-DD-<feature>.md`
- Optional: Plan decomposed (can review before or after)
**What this does:**
**Phase 1:** Initial assessment across 4 dimensions
- Completeness: Success criteria, rollback, edge cases
- Quality: File paths, specific references, measurable criteria
- Feasibility: Prerequisites exist, assumptions valid
- Scope: Aligned with brainstorm, no gold-plating
**Phase 2:** If any dimension fails, spawns specialized validators
- completeness-checker
- feasibility-analyzer (uses Serena to verify codebase)
- scope-creep-detector (compares to brainstorm/research)
- quality-validator
**Phase 3:** Interactive refinement
- Ask questions one at a time
- Offer concrete options
- Update plan with agreed changes
- Re-check until all pass or user approves warnings
**Exit:** Plan approved and ready for execution
**Next step:** Execute plan

51
commands/cc/save.md Normal file
View File

@@ -0,0 +1,51 @@
---
description: Save workflow state to Serena MCP memory for later resume
---
Use the state-persistence skill to save workflow state to Serena MCP memory.
**Prerequisites:** At least one of:
- Brainstorm + research completed
- Plan file exists
- Execution in progress
- Execution complete
**What this does:**
**Stage Detection (automatic):**
- Analyzes current workflow state
- Determines stage: research, planning, execution, or complete
- Extracts feature name from plan or brainstorm
- Collects git metadata (commit, branch)
**Saves to:** `YYYY-MM-DD-<feature-name>-<stage>.md`
**Stage-specific content:**
**research.md** - After research completes
- Brainstorm summary
- Codebase findings (Serena)
- Library docs (Context7)
- Web research
- GitHub research
**planning.md** - During plan writing
- Design decisions
- Alternatives considered
- Plan draft
- Open questions
**execution.md** - During implementation
- Progress summary (X/Y tasks complete)
- Completed tasks
- Current task state
- Blockers/issues
**complete.md** - After workflow completion
- What was built
- Key learnings and gotchas
- Files modified
- Patterns introduced
- Recommendations
**Resume later with:** `/cc:resume <filename>`

View File

@@ -0,0 +1,7 @@
---
description: Create project-specific agents and skills by analyzing codebase architecture, patterns, and conventions
---
Use the project-agent-creator skill first to create project-specific agents, then use the project-skill-creator skill to create project-specific skills.
Report what was created and where they are located.

View File

@@ -0,0 +1,5 @@
---
description: Create detailed implementation plan with bite-sized tasks
---
Use the writing-plans skill exactly as written