Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:09:26 +08:00
commit 71330f5583
76 changed files with 15081 additions and 0 deletions

34
commands/brainstorm.md Normal file
View File

@@ -0,0 +1,34 @@
# Brainstorm
Interactive design refinement using Socratic method to transform ideas into detailed designs.
<instructions>
## Instructions
## MANDATORY: Skill Activation
**Load skill context:**
@${CLAUDE_PLUGIN_ROOT}skills/brainstorming/SKILL.md
**Step 1 - EVALUATE:** State YES/NO for skill activation:
- Skill: "cipherpowers:brainstorming"
- Applies to this task: YES/NO (reason)
**Step 2 - ACTIVATE:** If YES, use Skill tool NOW:
```
Skill(skill: "cipherpowers:brainstorming")
```
⚠️ Do NOT proceed without completing skill evaluation and activation.
---
**The brainstorming skill provides the methodology:**
- When to use: Before implementing any feature or project idea
- Process: Guided questions to clarify requirements, constraints, and design decisions
**Why this structure?**
- Skill = Universal design refinement methodology
- Command = Thin wrapper (CipherPowers entry point)
- Integration = Seamless workflow in cipherpowers
</instructions>

88
commands/code-review.md Normal file
View File

@@ -0,0 +1,88 @@
# Code Review
Thorough code review with test verification and structured feedback.
## Usage
```
/cipherpowers:code-review [--model=<sonnet|opus|haiku>]
```
**Model guidance:**
- `opus` - Deep analysis, security-critical code, complex architecture
- `sonnet` - Balanced quality/speed (default if not specified)
- `haiku` - Quick reviews, simple changes
## MANDATORY: Skill Activation
**Load skill context:**
@${CLAUDE_PLUGIN_ROOT}skills/conducting-code-review/SKILL.md
**Step 1 - EVALUATE:** State YES/NO for skill activation:
- Skill: "cipherpowers:conducting-code-review"
- Applies to this task: YES/NO (reason)
**Step 2 - ACTIVATE:** If YES, use Skill tool NOW:
```
Skill(skill: "cipherpowers:conducting-code-review")
```
⚠️ Do NOT proceed without completing skill evaluation and activation.
---
## Algorithmic Dispatch
**Decision tree (follow exactly, no interpretation):**
1. Is this a code review request?
- YES → Continue to step 2
- NO → This command was invoked incorrectly
2. Have you already dispatched to code-review-agent agent?
- YES → Wait for agent to complete
- NO → Continue to step 3
3. **DISPATCH TO AGENT NOW:**
```
Use Task tool with:
subagent_type: "cipherpowers:code-review-agent"
model: [from --model arg if provided, otherwise omit to use default]
description: "Code review workflow"
prompt: """
[User's original request or task context]
Follow the conducting-code-review skill exactly as written.
Review the recent changes and provide structured feedback.
"""
```
**Model parameter rules:**
- If user specified `--model=X` → pass `model: X` to Task tool
- If no model specified → omit model parameter (agent default applies)
4. **STOP. Do not proceed in main context.**
## Why Algorithmic Dispatch?
- **100% reliability**: No interpretation, no rationalization
- **Agent enforcement**: Persuasion principles prevent rubber-stamping
- **Consistent quality**: Every review runs tests, checks all severity levels
- **Skill integration**: Agent reads conducting-code-review skill automatically
## What the Agent Does
The code-review-agent agent implements:
- Identify code to review (git commands)
- Review against practice standards (ALL severity levels)
- Save structured feedback to work directory
- No approval without thorough review
**Note:** Tests and checks are assumed to pass. The reviewer focuses on code quality, not test execution.
**References:**
- Agent: `${CLAUDE_PLUGIN_ROOT}agents/code-review-agent.md`
- Skill: `${CLAUDE_PLUGIN_ROOT}skills/conducting-code-review/SKILL.md`
- Standards: `${CLAUDE_PLUGIN_ROOT}standards/code-review.md`

69
commands/commit.md Normal file
View File

@@ -0,0 +1,69 @@
# Commit
Systematic git commit with atomic commits and conventional messages.
## MANDATORY: Skill Activation
**Load skill context:**
@${CLAUDE_PLUGIN_ROOT}skills/commit-workflow/SKILL.md
**Step 1 - EVALUATE:** State YES/NO for skill activation:
- Skill: "cipherpowers:commit-workflow"
- Applies to this task: YES/NO (reason)
**Step 2 - ACTIVATE:** If YES, use Skill tool NOW:
```
Skill(skill: "cipherpowers:commit-workflow")
```
⚠️ Do NOT proceed without completing skill evaluation and activation.
---
## Algorithmic Dispatch
**Decision tree (follow exactly, no interpretation):**
1. Is this a commit request?
- YES → Continue to step 2
- NO → This command was invoked incorrectly
2. Have you already dispatched to commit-agent agent?
- YES → Wait for agent to complete
- NO → Continue to step 3
3. **DISPATCH TO AGENT NOW:**
```
Use Task tool with:
subagent_type: "cipherpowers:commit-agent"
description: "Commit workflow"
prompt: """
[User's original request or task context]
Follow the commit-workflow skill exactly as written.
"""
```
4. **STOP. Do not proceed in main context.**
## Why Algorithmic Dispatch?
- **100% reliability**: No interpretation, no rationalization
- **Agent enforcement**: Persuasion principles prevent shortcuts
- **Consistent quality**: Every commit follows non-negotiable workflow
- **Skill integration**: Agent reads commit-workflow skill automatically
## What the Agent Does
The commit-agent agent implements:
- Staging status check
- Diff review and understanding
- Atomic commit analysis
- Conventional commit message formatting
- Commit verification
**References:**
- Agent: `${CLAUDE_PLUGIN_ROOT}agents/commit-agent.md`
- Skill: `${CLAUDE_PLUGIN_ROOT}skills/commit-workflow/SKILL.md`
- Standards: `${CLAUDE_PLUGIN_ROOT}standards/conventional-commits.md`

64
commands/execute.md Normal file
View File

@@ -0,0 +1,64 @@
# Execute
Execute implementation plans with automatic agent selection, batch-level code review, and retrospective completion.
## Algorithmic Workflow
**Decision tree (follow exactly, no interpretation):**
1. Is this a plan execution request?
- YES → Continue to step 2
- NO → This command was invoked incorrectly
2. Does a plan exist to execute?
- YES → Continue to step 3
- NO → Run `/cipherpowers:plan` first to create implementation plan, then return here
3. **MANDATORY: Skill Activation**
**Load skill context:**
@${CLAUDE_PLUGIN_ROOT}skills/executing-plans/SKILL.md
**Step 1 - EVALUATE:** State YES/NO for skill activation:
- Skill: "cipherpowers:executing-plans"
- Applies to this task: YES/NO (reason)
**Step 2 - ACTIVATE:** If YES, use Skill tool NOW:
```
Skill(skill: "cipherpowers:executing-plans")
```
⚠️ Do NOT proceed without completing skill evaluation and activation.
4. **FOLLOW THE SKILL EXACTLY:**
- The skill defines the complete execution methodology
- Automatic agent selection (hybrid keyword/LLM analysis)
- Batch execution (3 tasks per batch)
- Code review after each batch
- Retrospective capture when complete
5. **STOP when execution is complete.**
## Why Algorithmic Workflow?
- **100% reliability**: No interpretation, no skipping plan creation
- **Skill integration**: Automatic discovery via Skill tool
- **Agent orchestration**: Skill handles agent selection and dispatch
- **Quality gates**: Code review checkpoints prevent cascading issues
## What the Skill Does
The executing-plans skill provides:
- Load and parse implementation plan
- Automatic agent selection (rust-agent, ultrathink-debugger, etc.)
- Batch execution with review checkpoints
- Code review after each batch (automatic dispatch to code-review-agent)
- Retrospective capture when work completes
- Integration with selecting-agents skill
**References:**
- Skill: `${CLAUDE_PLUGIN_ROOT}skills/executing-plans/SKILL.md`
- Agent Selection: `${CLAUDE_PLUGIN_ROOT}skills/selecting-agents/SKILL.md`
- Code Review: Automatic dispatch to cipherpowers:code-review-agent
- Integration: Seamless workflow → `/cipherpowers:brainstorm``/cipherpowers:plan``/cipherpowers:execute`

57
commands/plan.md Normal file
View File

@@ -0,0 +1,57 @@
# Plan
Create detailed implementation plans with bite-sized tasks ready for execution.
## Algorithmic Workflow
**Decision tree (follow exactly, no interpretation):**
1. Is this a planning request?
- YES → Continue to step 2
- NO → This command was invoked incorrectly
2. **MANDATORY: Skill Activation**
**Load skill context:**
@${CLAUDE_PLUGIN_ROOT}skills/writing-plans/SKILL.md
**Step 1 - EVALUATE:** State YES/NO for skill activation:
- Skill: "cipherpowers:writing-plans"
- Applies to this task: YES/NO (reason)
**Step 2 - ACTIVATE:** If YES, use Skill tool NOW:
```
Skill(skill: "cipherpowers:writing-plans")
```
⚠️ Do NOT proceed without completing skill evaluation and activation.
4. **FOLLOW THE SKILL EXACTLY:**
- The skill defines the complete planning methodology
- Create detailed plan file in `.work` directory
- Break work into bite-sized, independent tasks
- Include verification steps and success criteria
5. **STOP when plan is complete and saved.**
## Why Algorithmic Workflow?
- **100% reliability**: No interpretation, no skipping brainstorming
- **Skill integration**: Automatic discovery via Skill tool
- **Consistent structure**: Every plan follows proven template
- **Ready for execution**: Plans integrate with `/cipherpowers:execute` command
## What the Skill Does
The writing-plans skill provides:
- When to use planning vs direct implementation
- How to structure tasks for agent execution
- Task granularity guidelines (bite-sized, independent)
- Verification and success criteria
- Integration with code review checkpoints
**References:**
- Skill: `${CLAUDE_PLUGIN_ROOT}skills/writing-plans/SKILL.md`
- Template: Used by skill for consistent structure
- Integration: Seamless workflow → `/cipherpowers:brainstorm``/cipherpowers:plan``/cipherpowers:execute`

18
commands/summarise.md Normal file
View File

@@ -0,0 +1,18 @@
# Summarise
Create a retrospective summary of completed work, capturing decisions, lessons learned, and insights.
## Instructions
Activate the capturing-learning skill to guide the retrospective:
```
Skill(skill: "cipherpowers:capturing-learning")
```
The skill provides:
- **Step 1**: Review the work (git diff, changes made)
- **Step 2**: Capture learning (decisions, approaches, issues, time)
- **Step 3**: Save and link (to .work/ directory or CLAUDE.md)
**Key Principle:** Exhaustion after completion is when capture matters most. The harder the work, the more valuable the lessons.

39
commands/test-paths.md Normal file
View File

@@ -0,0 +1,39 @@
---
name: test-paths
description: Test file path resolution in plugin agents
---
This command tests whether file references work correctly in plugin agent contexts.
## Test Scenarios
This will test file path resolution in two scenarios:
1. **Direct subagent invocation** - Spawning path-test-agent via Task tool
2. **File reference verification** - Confirming @ syntax resolves correctly
## Execution
You MUST execute this test by spawning the path-test-agent as a subagent.
Use the Task tool:
```
Task(
subagent_type: "cipherpowers:path-test-agent",
description: "Test file path resolution",
prompt: "Execute the path test procedure exactly as specified in your instructions."
)
```
After the agent completes, analyze the results and report:
1. Which files were successfully read
2. Which files failed (if any)
3. Whether relative paths (@skills/..., @standards/...) work in subagent context
4. Recommendation for convention to use
## Expected Outcome
If the test PASSES, relative paths work correctly and we can use `@skills/...` syntax throughout all agents.
If the test FAILS, we need to investigate alternative approaches.

254
commands/verify.md Normal file
View File

@@ -0,0 +1,254 @@
# Verify
Generic dual-verification dispatcher for high-confidence verification across all verification types.
**Core principle:** Agents cannot be trusted. Two independent agents + systematic collation = confidence.
## Usage
```
/cipherpowers:verify <type> [scope] [--model=<sonnet|opus|haiku>]
```
**Model guidance:**
- `opus` - Deep analysis, security-critical verification, complex codebases
- `sonnet` - Balanced quality/speed (default for most verification types)
- `haiku` - Quick checks, simple verifications, execute adherence checks
## Algorithmic Workflow
**Decision tree (follow exactly, no interpretation):**
1. What verification type is requested?
- code → Dispatch to code verification workflow
- plan → Dispatch to plan verification workflow
- execute → Dispatch to execute verification workflow
- research → Dispatch to research verification workflow
- docs → Dispatch to documentation verification workflow
- OTHER → Error: Unknown verification type. Valid types: code, plan, execute, research, docs
2. **MANDATORY: Skill Activation**
**Load skill context:**
@${CLAUDE_PLUGIN_ROOT}skills/dual-verification/SKILL.md
**Step 1 - EVALUATE:** State YES/NO for skill activation:
- Skill: "cipherpowers:dual-verification"
- Applies to this task: YES/NO (reason)
**Step 2 - ACTIVATE:** If YES, use Skill tool NOW:
```
Skill(skill: "cipherpowers:dual-verification")
```
⚠️ Do NOT proceed without completing skill evaluation and activation.
3. **FOLLOW THE SKILL EXACTLY:**
- Phase 1: Dispatch 2 specialized agents in parallel (see dispatch table)
- Phase 2: Dispatch review-collation-agent to compare findings
- Phase 3: Present collated findings to user with confidence levels
4. **STOP when verification is complete.**
## Dispatch Table
| Type | Agent | Focus | Default Model |
|------|-------|-------|---------------|
| code | cipherpowers:code-review-agent + cipherpowers:code-agent | Heterogeneous review (Standards + Engineering) | sonnet |
| plan | cipherpowers:plan-review-agent + cipherpowers:code-agent | Plan quality + Technical feasibility | sonnet |
| execute | cipherpowers:execute-review-agent ×2 | Plan adherence, implementation match | haiku |
| research | cipherpowers:research-agent ×2 | Information completeness, accuracy | sonnet |
| docs | cipherpowers:technical-writer + cipherpowers:code-agent | Docs structure + Code example accuracy | haiku |
**Model parameter rules:**
- If user specified `--model=X` → pass `model: X` to ALL dispatched agents
- If no model specified → use default model from table above
- Collation agent always uses `haiku` (simple comparison task)
## Verification Types
### Code Verification
**When to use:** Before merging, after significant implementation.
**What it checks:**
- Code quality and standards compliance
- Testing coverage and quality
- Security considerations
- Performance implications
- Maintainability
**Workflow:**
```
/verify code [scope] [--model=<sonnet|opus|haiku>]
→ Dispatches 1 code-review-agent and 1 code-agent in parallel
(with model parameter if specified, otherwise sonnet)
→ Each agent independently reviews:
- Read code changes
- Run tests and checks
- Review against standards
→ Dispatches review-collation-agent (always haiku)
→ Produces collated report with confidence levels
```
### Plan Verification
**When to use:** Before executing implementation plans.
**What it checks:**
- 35 quality criteria (security, testing, architecture, etc.)
- Blocking issues that must be fixed
- Non-blocking improvements to consider
**Workflow:**
```
/verify plan [plan-file] [--model=<sonnet|opus|haiku>]
→ Dispatches 1 plan-review-agent and 1 code-agent in parallel
(with model parameter if specified, otherwise sonnet)
→ Each agent independently evaluates against criteria
→ Dispatches review-collation-agent (always haiku)
→ Produces collated report with confidence levels
```
### Execute Verification
**When to use:** After each batch during /execute workflow.
**What it checks:**
- Each task implemented exactly as plan specified
- No skipped requirements
- No unauthorized deviations
- No incomplete implementations
**What it does NOT check:**
- Code quality (that's code verification)
- Testing strategy (that's code verification)
- Standards compliance (that's code verification)
**Workflow:**
```
/verify execute [batch-number] [plan-file] [--model=<sonnet|opus|haiku>]
→ Dispatches 2 execute-review-agent agents in parallel
(with model parameter if specified, otherwise haiku)
→ Each agent independently verifies:
- Read plan tasks for batch
- Read implementation changes
- Verify each task: COMPLETE / INCOMPLETE / DEVIATED
→ Dispatches review-collation-agent (always haiku)
→ Produces collated report with confidence levels
```
### Research Verification
**When to use:** When exploring unfamiliar topics, APIs, patterns, or codebases.
**What it checks:**
- Information completeness (did we find everything relevant?)
- Accuracy (are findings correct?)
- Multiple perspectives (different angles covered?)
- Gaps identified (what's missing?)
**Examples:**
- "How does authentication work in this codebase?"
- "What are the patterns for Bevy 0.17 picking?"
- "How should we structure the API layer?"
**Workflow:**
```
/verify research [topic] [--model=<sonnet|opus|haiku>]
→ Dispatches 2 research-agent agents in parallel
(with model parameter if specified, otherwise sonnet)
→ Each agent independently explores:
- Different entry points
- Multiple sources (codebase, web, docs)
- Different perspectives
→ Dispatches review-collation-agent (always haiku)
→ Produces collated report:
- Common findings (high confidence)
- Unique insights (worth knowing)
- Divergences (needs clarification)
```
### Documentation Verification
**When to use:** Auditing documentation accuracy.
**What it checks:**
- File paths exist
- Commands work
- Examples accurate
- Structure complete
**Workflow:**
```
/verify docs [files] [--model=<sonnet|opus|haiku>]
→ Dispatches 1 technical-writer and 1 code-agent in parallel
(with model parameter if specified, otherwise haiku)
→ Each agent independently verifies against codebase
→ Dispatches review-collation-agent (always haiku)
→ Produces collated report with confidence levels
```
## Why Dual Verification?
**Problem:** Single agent can miss issues, hallucinate, or confirm biases.
**Solution:** Two independent agents catch what one misses.
**Confidence levels:**
- **VERY HIGH:** Both agents found → Act on this
- **MODERATE:** One agent found → Consider carefully
- **INVESTIGATE:** Agents disagree → User decides
**Example (research):**
```
Agent #1: "Auth uses JWT with 1-hour expiry"
Agent #2: "Auth uses JWT with 24-hour refresh tokens"
→ Collation: Both partially correct (access vs refresh)
→ Higher confidence understanding than single agent
```
## Integration with Other Commands
Execute workflow uses verify for batch verification:
```
/execute workflow:
→ Batch 1 (3 tasks)
→ /verify code (quality/standards)
→ /verify execute (plan adherence)
→ Fix all BLOCKING issues
→ Repeat for next batch
```
## Related Commands
- `/cipherpowers:execute` - Plan execution workflow (uses /cipherpowers:verify for batch verification)
## Related Skills
- `dual-verification` - Core pattern for all dual-verification
- `executing-plans` - Plan execution workflow integrating verification
## Related Agents
- `code-review-agent` & `code-agent` - Code quality verification
- `plan-review-agent` & `code-agent` - Plan quality verification
- `execute-review-agent` - Plan adherence verification
- `research-agent` - Research verification
- `technical-writer` & `code-agent` - Documentation verification
- `review-collation-agent` - Generic collation (works for all types)
## Remember
- All verification types use dual-verification pattern
- Dispatch table determines which agents to use
- Collation agent is always the same (generic)
- Confidence levels guide user decisions
- Agents cannot be trusted - that's why we use two