Skip to content

Commit b33d426

Browse files
committed
feat: publish spec governed coding bundle
1 parent 5ebdeb6 commit b33d426

62 files changed

Lines changed: 3771 additions & 960 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

skills/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Here is a complete list of AI Skills available in this repository.
77
| **Image Generation** | 图片生成 | 通用的 AI 图像生成服务。集成了即梦 (Jimeng)、Nano-banana 和 Midjourney。支持文生图 (T2I)、图生图 (I2I) 和风格迁移。 | [Source](./image-generation/SKILL.md) |
88
| **Long Article Visualization** | 自媒体内容生成 | 将长文章转换为手绘风格的信息图。基于深度阅读、主题规划和视觉设计,最终调用 image-generation skill 生成图片。 | [Source](./long-article-visualization/SKILL.md) |
99
| **Pic Search** | 图片搜索 | Wallhaven 高清壁纸搜索引擎。支持按关键词、颜色、分类搜索高质量图片素材。 | [Source](./pic-search/SKILL.md) |
10+
| **Spec Governed Coding** | 开发工作流 | 面向 spec-first 交付的全量 bundle 入口 skill。负责发现 `spec.md`/`plan.md`/`tasks.md`、治理基线和下游执行路由。 | [Source](./spec-governed-coding/SKILL.md) |
1011
| **Skill Creator** | 技能开发 | Skill 创建向导。通过交互式 SOP 流程,辅助用户从零创建高质量的 AI Skill。 | [Source](./skill-creator/SKILL.md) |
11-
| **Visual Discord Briefing** | 视觉内容生成 | 生成结构化视觉简报(5 模板)并输出 Discord webhook JSON(embed + 可点击按钮)及 IM Markdown companion。 | [Source](./visual-discord-briefing/SKILL.md) |
1212
| **Viral Article Rewriter** | 自媒体内容生成 | 爆款长文改写助手。通过“澄清目标-搭建框架-接地气改写-迭代优化”四步法,将长文转化为爆款文案。 | [Source](./viral-article-rewriter/SKILL.md) |
1313
| **Xianyu Post Gen** | 自媒体内容生成 | 闲鱼帖子生成器。基于产品文档一键生成闲鱼标题、正文、封面提示词、竞品借鉴与发布检查清单。 | [Source](./xianyu-post-gen/SKILL.md) |
1414
| **Xiaohongshu Post Gen** | 自媒体内容生成 | 小红书爆款内容孵化器。基于“种子”创意(Seed)结合平台热点,批量繁衍具有爆款潜质的标题和文案。 | [Source](./xiaohongshu-post-generator/SKILL.md) |

skills/code-reviewer/SKILL.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: code-reviewer
3+
description: |
4+
Use this agent when a major project step has been completed and needs to be reviewed against the original plan and coding standards. Examples: <example>Context: The user is creating a code-review agent that should be called after a logical chunk of code is written. user: "I've finished implementing the user authentication system as outlined in step 3 of our plan" assistant: "Great work! Now let me use the code-reviewer agent to review the implementation against our plan and coding standards" <commentary>Since a major project step has been completed, use the code-reviewer agent to validate the work against the plan and identify any issues.</commentary></example> <example>Context: User has completed a significant feature implementation. user: "The API endpoints for the task management system are now complete - that covers step 2 from our architecture document" assistant: "Excellent! Let me have the code-reviewer agent examine this implementation to ensure it aligns with our plan and follows best practices" <commentary>A numbered step from the planning document has been completed, so the code-reviewer agent should review the work.</commentary></example>
5+
---
6+
7+
You are a Senior Code Reviewer with expertise in software architecture, design patterns, and best practices. Your role is to review completed project steps against original plans and ensure code quality standards are met.
8+
9+
When reviewing completed work, you will:
10+
11+
1. **Plan Alignment Analysis**:
12+
- Compare the implementation against the original planning document or step description
13+
- Identify any deviations from the planned approach, architecture, or requirements
14+
- Assess whether deviations are justified improvements or problematic departures
15+
- Verify that all planned functionality has been implemented
16+
17+
2. **Code Quality Assessment**:
18+
- Review code for adherence to established patterns and conventions
19+
- Check for proper error handling, type safety, and defensive programming
20+
- Evaluate code organization, naming conventions, and maintainability
21+
- Assess test coverage and quality of test implementations
22+
- Look for potential security vulnerabilities or performance issues
23+
24+
3. **Architecture and Design Review**:
25+
- Ensure the implementation follows SOLID principles and established architectural patterns
26+
- Check for proper separation of concerns and loose coupling
27+
- Verify that the code integrates well with existing systems
28+
- Assess scalability and extensibility considerations
29+
30+
4. **Documentation and Standards**:
31+
- Verify that code includes appropriate comments and documentation
32+
- Check that file headers, function documentation, and inline comments are present and accurate
33+
- Ensure adherence to project-specific coding standards and conventions
34+
35+
5. **Issue Identification and Recommendations**:
36+
- Clearly categorize issues as: Critical (must fix), Important (should fix), or Suggestions (nice to have)
37+
- For each issue, provide specific examples and actionable recommendations
38+
- When you identify plan deviations, explain whether they're problematic or beneficial
39+
- Suggest specific improvements with code examples when helpful
40+
41+
6. **Communication Protocol**:
42+
- If you find significant deviations from the plan, ask the coding agent to review and confirm the changes
43+
- If you identify issues with the original plan itself, recommend plan updates
44+
- For implementation problems, provide clear guidance on fixes needed
45+
- Always acknowledge what was done well before highlighting issues
46+
47+
Your output should be structured, actionable, and focused on helping maintain high code quality while ensuring project goals are met. Be thorough but concise, and always provide constructive feedback that helps improve both the current implementation and future development practices.

skills/executing-plans/SKILL.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
name: executing-plans
3+
description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
4+
---
5+
6+
# Executing Plans
7+
8+
## Overview
9+
10+
Load plan, review critically, execute tasks in batches, report for review between batches.
11+
12+
**Core principle:** Batch execution with checkpoints for architect review.
13+
14+
**Announce at start:** "I'm using the executing-plans skill to implement this plan."
15+
16+
## The Process
17+
18+
### Step 1: Load and Review Plan
19+
1. Read plan file
20+
2. Review critically - identify any questions or concerns about the plan
21+
3. If concerns: Raise them with your human partner before starting
22+
4. If no concerns: Create TodoWrite and proceed
23+
24+
### Step 2: Execute Batch
25+
**Default: First 3 tasks**
26+
27+
For each task:
28+
1. Mark as in_progress
29+
2. Follow each step exactly (plan has bite-sized steps)
30+
3. Run verifications as specified
31+
4. Mark as completed
32+
33+
### Step 3: Report
34+
When batch complete:
35+
- Show what was implemented
36+
- Show verification output
37+
- Say: "Ready for feedback."
38+
39+
### Step 4: Continue
40+
Based on feedback:
41+
- Apply changes if needed
42+
- Execute next batch
43+
- Repeat until complete
44+
45+
### Step 5: Complete Development
46+
47+
After all tasks complete and verified:
48+
- Announce: "I'm using the finishing-a-development-branch skill to complete this work."
49+
- **REQUIRED SUB-SKILL:** Use `finishing-a-development-branch`
50+
- Follow that skill to verify tests, present options, execute choice
51+
52+
## When to Stop and Ask for Help
53+
54+
**STOP executing immediately when:**
55+
- Hit a blocker mid-batch (missing dependency, test fails, instruction unclear)
56+
- Plan has critical gaps preventing starting
57+
- You don't understand an instruction
58+
- Verification fails repeatedly
59+
60+
**Ask for clarification rather than guessing.**
61+
62+
## When to Revisit Earlier Steps
63+
64+
**Return to Review (Step 1) when:**
65+
- Partner updates the plan based on your feedback
66+
- Fundamental approach needs rethinking
67+
68+
**Don't force through blockers** - stop and ask.
69+
70+
## Remember
71+
- Review plan critically first
72+
- Follow plan steps exactly
73+
- Don't skip verifications
74+
- Reference skills when plan says to
75+
- Between batches: just report and wait
76+
- Stop when blocked, don't guess
77+
- Never start implementation on main/master branch without explicit user consent
78+
79+
## Integration
80+
81+
**Required workflow skills:**
82+
- **using-git-worktrees** - REQUIRED: Set up isolated workspace before starting
83+
- **writing-plans** - Creates the plan this skill executes
84+
- **finishing-a-development-branch** - Complete development after all tasks
Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
---
2+
name: finishing-a-development-branch
3+
description: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
4+
---
5+
6+
# Finishing a Development Branch
7+
8+
## Overview
9+
10+
Guide completion of development work by presenting clear options and handling chosen workflow.
11+
12+
**Core principle:** Verify tests → Present options → Execute choice → Clean up.
13+
14+
**Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work."
15+
16+
## The Process
17+
18+
### Step 1: Verify Tests
19+
20+
**Before presenting options, verify tests pass:**
21+
22+
```bash
23+
# Run project's test suite
24+
npm test / cargo test / pytest / go test ./...
25+
```
26+
27+
**If tests fail:**
28+
```
29+
Tests failing (<N> failures). Must fix before completing:
30+
31+
[Show failures]
32+
33+
Cannot proceed with merge/PR until tests pass.
34+
```
35+
36+
Stop. Don't proceed to Step 2.
37+
38+
**If tests pass:** Continue to Step 2.
39+
40+
### Step 2: Determine Base Branch
41+
42+
```bash
43+
# Try common base branches
44+
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
45+
```
46+
47+
Or ask: "This branch split from main - is that correct?"
48+
49+
### Step 3: Present Options
50+
51+
Present exactly these 4 options:
52+
53+
```
54+
Implementation complete. What would you like to do?
55+
56+
1. Merge back to <base-branch> locally
57+
2. Push and create a Pull Request
58+
3. Keep the branch as-is (I'll handle it later)
59+
4. Discard this work
60+
61+
Which option?
62+
```
63+
64+
**Don't add explanation** - keep options concise.
65+
66+
### Step 4: Execute Choice
67+
68+
#### Option 1: Merge Locally
69+
70+
```bash
71+
# Switch to base branch
72+
git checkout <base-branch>
73+
74+
# Pull latest
75+
git pull
76+
77+
# Merge feature branch
78+
git merge <feature-branch>
79+
80+
# Verify tests on merged result
81+
<test command>
82+
83+
# If tests pass
84+
git branch -d <feature-branch>
85+
```
86+
87+
Then: Cleanup worktree (Step 5)
88+
89+
#### Option 2: Push and Create PR
90+
91+
```bash
92+
# Push branch
93+
git push -u origin <feature-branch>
94+
95+
# Create PR
96+
gh pr create --title "<title>" --body "$(cat <<'EOF'
97+
## Summary
98+
<2-3 bullets of what changed>
99+
100+
## Test Plan
101+
- [ ] <verification steps>
102+
EOF
103+
)"
104+
```
105+
106+
Then: Cleanup worktree (Step 5)
107+
108+
#### Option 3: Keep As-Is
109+
110+
Report: "Keeping branch <name>. Worktree preserved at <path>."
111+
112+
**Don't cleanup worktree.**
113+
114+
#### Option 4: Discard
115+
116+
**Confirm first:**
117+
```
118+
This will permanently delete:
119+
- Branch <name>
120+
- All commits: <commit-list>
121+
- Worktree at <path>
122+
123+
Type 'discard' to confirm.
124+
```
125+
126+
Wait for exact confirmation.
127+
128+
If confirmed:
129+
```bash
130+
git checkout <base-branch>
131+
git branch -D <feature-branch>
132+
```
133+
134+
Then: Cleanup worktree (Step 5)
135+
136+
### Step 5: Cleanup Worktree
137+
138+
**For Options 1, 2, 4:**
139+
140+
Check if in worktree:
141+
```bash
142+
git worktree list | grep $(git branch --show-current)
143+
```
144+
145+
If yes:
146+
```bash
147+
git worktree remove <worktree-path>
148+
```
149+
150+
**For Option 3:** Keep worktree.
151+
152+
## Quick Reference
153+
154+
| Option | Merge | Push | Keep Worktree | Cleanup Branch |
155+
|--------|-------|------|---------------|----------------|
156+
| 1. Merge locally || - | - ||
157+
| 2. Create PR | - ||| - |
158+
| 3. Keep as-is | - | - || - |
159+
| 4. Discard | - | - | - | ✓ (force) |
160+
161+
## Common Mistakes
162+
163+
**Skipping test verification**
164+
- **Problem:** Merge broken code, create failing PR
165+
- **Fix:** Always verify tests before offering options
166+
167+
**Open-ended questions**
168+
- **Problem:** "What should I do next?" → ambiguous
169+
- **Fix:** Present exactly 4 structured options
170+
171+
**Automatic worktree cleanup**
172+
- **Problem:** Remove worktree when might need it (Option 2, 3)
173+
- **Fix:** Only cleanup for Options 1 and 4
174+
175+
**No confirmation for discard**
176+
- **Problem:** Accidentally delete work
177+
- **Fix:** Require typed "discard" confirmation
178+
179+
## Red Flags
180+
181+
**Never:**
182+
- Proceed with failing tests
183+
- Merge without verifying tests on result
184+
- Delete work without confirmation
185+
- Force-push without explicit request
186+
187+
**Always:**
188+
- Verify tests before offering options
189+
- Present exactly 4 options
190+
- Get typed confirmation for Option 4
191+
- Clean up worktree for Options 1 & 4 only
192+
193+
## Integration
194+
195+
**Called by:**
196+
- **subagent-driven-development** (Step 7) - After all tasks complete
197+
- **executing-plans** (Step 5) - After all batches complete
198+
199+
**Pairs with:**
200+
- **using-git-worktrees** - Cleans up worktree created by that skill

0 commit comments

Comments
 (0)