build-feature
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFull-Stack Feature Implementation Workflow
全栈功能实现工作流
Execute a full-stack feature implementation across database, backend, frontend, and testing layers. This skill follows the implementation plan produced by and builds all layers with integrated testing.
/plan-feature[!CAUTION] Scope boundary: This skill implements code and commits it. It does NOT create pull requests, push to remote, run code reviews, or submit anything for merge. When implementation and commits are complete, stop and suggest the user runnext. Do not proceed to PR creation — that is/review-code's job./submit-pr
跨数据库、后端、前端及测试层执行全栈功能实现。本技能遵循生成的实现计划,完成各层的开发并集成测试。
/plan-feature[!CAUTION] 范围边界:本技能仅负责实现代码并提交,不创建拉取请求(PR)、推送到远程仓库、执行代码评审或提交合并申请。当实现及提交完成后,请停止操作,并建议用户下一步运行。请勿继续创建PR——该工作由/review-code技能负责。/submit-pr
Step 1: Load Implementation Plan
步骤1:加载实现计划
Check for an implementation plan using the following priority:
[!NOTE] GitHub issues created byare task-oriented work items — the decision record remains the authoritative source of council evaluations, rationale, and architectural context. When loading from an issue, always read the referenced decision record for full context./plan-feature
按照以下优先级检查是否存在实现计划:
[!NOTE] 由创建的GitHub Issue是面向任务的工作项——决策记录仍是评审评估、决策依据及架构背景的权威来源。从Issue加载计划时,请务必阅读关联的决策记录以获取完整背景信息。/plan-feature
Option A: GitHub Issue (Primary)
选项A:GitHub Issue(优先选择)
If the user provides a GitHub issue number (e.g., or ):
/build-feature 42/build-feature #42-
Fetch the issue details:bash
gh issue view <number> --json title,body,labels,state,number -
Validate the issue:
- Confirm it has the label (warn if not — it may not have been through
build-readyor may need further planning)/plan-feature - If the issue is closed, warn the user and ask whether to proceed
- Confirm it has the
-
Parse the issue body to extract:
- Implementation Plan: Task checkboxes organized by layer (Frontend, Backend, Database, Testing)
- Technical Context: Architecture decisions, API contracts, schema changes
- Decision Record path: Read the referenced decision record for full council context
- Feature Flag: Flag name if applicable
- Success Metrics: Measurable outcomes
-
Read the referenced decision record from the path specified in the issue for complete council rationale.
-
Signal work is in progress (see AGENTS.md "Label Management" for rules):bash
# Single-developer constraint: only one issue should be in-progress at a time. # First, remove in-progress from any other issue that has it: gh issue list --label "in-progress" --state open --json number --jq '.[].number' | while read n; do gh issue edit "$n" --remove-label "in-progress" done gh issue edit <number> --add-label "in-progress" -
Verify the issue is tracked on the Product Roadmap project board. If not, add it:bash
# --limit 200 covers the current board size; increase if the project grows beyond 200 items EXISTING=$(gh project item-list {PROJECT_NUMBER} --owner {OWNER} --format json --limit 200 \ | python3 -c " import json, sys data = json.load(sys.stdin) for item in data.get('items', []): # <number> must be an integer literal, e.g., == 42, not == '42' if item.get('content', {}).get('number') == <number>: print(item['id']) break ") if [ -z "$EXISTING" ]; then ITEM_ID=$(gh project item-add {PROJECT_NUMBER} --owner {OWNER} --url "https://github.com/{OWNER}/{REPO}/issues/<number>" --format json | python3 -c "import json,sys; print(json.load(sys.stdin)['id'])") echo "Warning: Issue #<number> was not on the project board. Added it now (item $ITEM_ID)." fi[!WARNING] If the issue was missing from the project board, it may also be missing phase, size, and date fields. Check the project item and warn the user if fields are unset — this suggests the issue was created outside ofor/plan-feature, which are the skills that ensure board membership and field population./security-audit
如果用户提供了GitHub Issue编号(例如: 或 ):
/build-feature 42/build-feature #42-
获取Issue详情:bash
gh issue view <number> --json title,body,labels,state,number -
验证Issue:
- 确认Issue带有标签(如果没有则发出警告——说明该Issue可能未经过
build-ready流程,或需要进一步规划)/plan-feature - 如果Issue已关闭,向用户发出警告并询问是否继续
- 确认Issue带有
-
解析Issue正文以提取以下内容:
- 实现计划:按层(前端、后端、数据库、测试)组织的任务复选框
- 技术背景:架构决策、API契约、schema变更
- 决策记录路径:阅读关联的决策记录以获取完整的评审依据
- 功能标志(Feature Flag):若适用,提取标志名称
- 成功指标:可衡量成果
-
读取Issue中指定路径下的最新决策记录,获取完整的评审决策依据。
-
标记工作正在进行(请参考AGENTS.md中的「标签管理」规则):bash
# 单人开发约束:同一时间只能有一个Issue处于进行中状态 # 首先,移除其他所有Issue上的in-progress标签: gh issue list --label "in-progress" --state open --json number --jq '.[].number' | while read n; do gh issue edit "$n" --remove-label "in-progress" done gh issue edit <number> --add-label "in-progress" -
验证该Issue是否已添加到产品路线图项目看板中。如果没有,则添加:bash
# --limit 200 覆盖当前看板规模;如果项目规模超过200个项,请增大该值 EXISTING=$(gh project item-list {PROJECT_NUMBER} --owner {OWNER} --format json --limit 200 \ | python3 -c " import json, sys data = json.load(sys.stdin) for item in data.get('items', []): # <number> 必须是整数字面量,例如 == 42,而非 == '42' if item.get('content', {}).get('number') == <number>: print(item['id']) break ") if [ -z "$EXISTING" ]; then ITEM_ID=$(gh project item-add {PROJECT_NUMBER} --owner {OWNER} --url "https://github.com/{OWNER}/{REPO}/issues/<number>" --format json | python3 -c "import json,sys; print(json.load(sys.stdin)['id'])") echo "警告:Issue #<number> 未添加到项目看板中,现已添加(项ID:$ITEM_ID)。" fi[!WARNING] 如果Issue未添加到项目看板中,可能也缺少阶段、规模和日期字段。请检查项目项,如果字段未设置则向用户发出警告——这表明该Issue可能是在或/plan-feature流程之外创建的,而这两个技能负责确保Issue被添加到看板并完成字段填充。/security-audit
Option B: Auto-Pick from Roadmap
选项B:从路线图自动选择
If no issue number or description is given, automatically find the next ticket from the project roadmap:
build-ready-
Determine the current phase. Find the active milestone — the open milestone with the earliest due date that still has open issues:bash
gh api repos/{OWNER}/{REPO}/milestones \ --jq 'sort_by(.due_on) | map(select(.state == "open" and .open_issues > 0)) | .[0] | {title, number, due_on, open_issues}'If an issue already has thelabel, use its milestone instead:in-progressbashgh issue list --state open --label "in-progress" --json number,title,milestone --jq '.[0]' -
Fetchcandidates. List open issues in that milestone with the
build-readylabel, excluding any already labeledbuild-ready:in-progressbashgh issue list --state open --label "build-ready" --milestone "<milestone-title>" \ --json number,title,labels \ --jq '[.[] | select(.labels | map(.name) | index("in-progress") | not)]' -
Sort by project start date. Fetch project items and match against candidates by issue number, then sort by thefield ascending:
startbashgh project item-list {PROJECT_NUMBER} --owner {OWNER} --format json --limit 200 | python3 -c " import json, sys data = json.load(sys.stdin) # <candidates> is a Python set literal of issue numbers, e.g., {22, 23, 10} candidates = <candidates> results = [] for item in data.get('items', []): num = item.get('content', {}).get('number') if num in candidates: # Field is 'start', not 'startDate' start = item.get('start') or '9999-12-31' results.append((start, num, item.get('title', ''))) results.sort() for start, num, title in results: display_start = start if start != '9999-12-31' else 'N/A' print(f'{display_start}\t#{num}\t{title}') "The first candidate (earliestdate) is the next ticket to work on. Issues without astartdate sort last.start -
If no candidates found, fall through to Option C (Decision Record).
如果未提供Issue编号或描述,自动从项目路线图中查找下一个工单:
build-ready-
确定当前阶段:查找活跃里程碑——即状态为开放、截止日期最早且仍有未完成Issue的里程碑:bash
gh api repos/{OWNER}/{REPO}/milestones \ --jq 'sort_by(.due_on) | map(select(.state == "open" and .open_issues > 0)) | .[0] | {title, number, due_on, open_issues}'如果已有Issue带有标签,则使用该Issue的里程碑:in-progressbashgh issue list --state open --label "in-progress" --json number,title,milestone --jq '.[0]' -
获取候选工单:列出该里程碑下状态为开放、带有
build-ready标签且未标记为build-ready的Issue:in-progressbashgh issue list --state open --label "build-ready" --milestone "<milestone-title>" \ --json number,title,labels \ --jq '[.[] | select(.labels | map(.name) | index("in-progress") | not)]' -
按项目开始日期排序:获取项目项并通过Issue编号与候选工单匹配,然后按字段升序排序:
startbashgh project item-list {PROJECT_NUMBER} --owner {OWNER} --format json --limit 200 | python3 -c " import json, sys data = json.load(sys.stdin) # <candidates> 是Python集合字面量形式的Issue编号,例如:{22,23,10} candidates = <candidates> results = [] for item in data.get('items', []): num = item.get('content', {}).get('number') if num in candidates: # 字段为'start',而非'startDate' start = item.get('start') or '9999-12-31' results.append((start, num, item.get('title', ''))) results.sort() for start, num, title in results: display_start = start if start != '9999-12-31' else 'N/A' print(f'{display_start}\t#{num}\t{title}') "第一个候选工单(日期最早)即为下一个需处理的工单。未设置start日期的Issue将排在最后。start -
如果未找到候选工单,则 fallback到选项C(决策记录)。
CHECKPOINT: Present the recommended ticket and the full candidate list to the user.
检查点:向用户展示推荐工单及完整候选工单列表
Show a table of all candidates in the current phase, sorted by start date, with the top candidate highlighted as the recommendation:
build-ready| # | Issue | Title | Start Date |
|---|---|---|---|
| → | #N | Top candidate title | YYYY-MM-DD |
| 2 | #N | Other candidate | YYYY-MM-DD |
Ask the user to confirm:
- (a) Work on the recommended ticket
- (b) Pick a different ticket from the list (provide the issue number)
- (c) Skip auto-pick and describe what to build instead
If the user confirms a ticket, proceed with that issue number using the same flow as Option A (fetch full issue details, validate , extract plan, set label, etc.).
build-readyin-progress以表格形式展示当前阶段所有候选工单,按开始日期排序,并高亮推荐的工单:
build-ready| # | Issue | 标题 | 开始日期 |
|---|---|---|---|
| → | #N | 推荐工单标题 | YYYY-MM-DD |
| 2 | #N | 其他候选工单 | YYYY-MM-DD |
请用户确认:
- (a) 处理推荐的工单
- (b) 从列表中选择其他工单(提供Issue编号)
- (c) 跳过自动选择,直接描述需要构建的内容
如果用户确认某工单,则使用该Issue编号按照选项A的流程继续操作(获取完整Issue详情、验证标签、提取计划、设置标签等)。
build-readyin-progressOption C: Decision Record (Fallback)
选项C:决策记录(备选方案)
If no issue number is given and no tickets are found on the roadmap:
build-ready- Read the most recent decision record from that matches the current feature
docs/decisions/ - If no decision record exists, fall through to Option D
如果未提供Issue编号且路线图上未找到工单:
build-ready- 从目录中读取与当前功能匹配的最新决策记录
docs/decisions/ - 如果不存在决策记录,则 fallback到选项D
Option D: User Description (Last Resort)
选项D:用户描述(最后方案)
If no decision record exists, ask the user what to build.
[!WARNING] No GitHub issue or decision record found. This means the planning pipeline () was skipped — no council evaluation, no documented rationale, no structured task breakdown. Consider running/plan-featurefirst. Proceeding without a plan risks unreviewed architecture decisions./plan-feature
如果不存在决策记录,请询问用户需要构建的内容。
[!WARNING] 未找到GitHub Issue或决策记录。这意味着跳过了规划流程()——未经过评审评估、无文档化的决策依据、无结构化的任务拆分。建议先运行/plan-feature。无计划直接进行开发可能会导致未经过评审的架构决策。/plan-feature
Extract Tasks
提取任务
From the plan (regardless of source), identify:
- Database changes: Schema modifications, migrations, seed data
- Backend tasks: API endpoints, services, business logic
- Frontend tasks: Components, routing, state management, styling
- Testing requirements: Coverage goals, E2E scenarios, edge cases
- Feature flag: Whether to wrap behind a flag
Ensure we are on a feature branch based on the latest . Always fetch first:
mainbash
git fetch origin mainIf on , create a new feature branch from the latest :
mainorigin/mainbash
git checkout -b feature/<feature-slug> origin/mainIf already on an existing feature branch, rebase it onto the latest to pick up any changes:
origin/mainbash
git status --porcelainIf the working tree is dirty, stash changes before rebasing:
bash
git stash push -m "build-feature: stash before rebase"
git rebase origin/main
git stash popIf the working tree is clean, rebase directly:
bash
git rebase origin/main无论计划来源如何,需识别以下内容:
- 数据库变更:Schema修改、迁移、种子数据
- 后端任务:API端点、服务、业务逻辑
- 前端任务:组件、路由、状态管理、样式
- 测试要求:覆盖率目标、端到端(E2E)场景、边缘情况
- 功能标志:是否需要通过功能标志包裹
确保当前分支是基于最新分支的特性分支。请先执行拉取操作:
mainbash
git fetch origin main如果当前在分支,请从最新的创建新的特性分支:
mainorigin/mainbash
git checkout -b feature/<feature-slug> origin/main如果当前已在现有特性分支上,请将其变基到最新的以获取最新变更:
origin/mainbash
git status --porcelain如果工作区有未提交的变更,请在变基前暂存:
bash
git stash push -m "build-feature: stash before rebase"
git rebase origin/main
git stash pop如果工作区已清理,可直接变基:
bash
git rebase origin/mainStep 2: Database Layer
步骤2:数据库层
If database changes are required:
-
Invokefor schema design guidance
/database-design:postgresql -
Design the Prisma schema changes:
- Models with proper field types and defaults
- Relations with referential integrity
- Indexes for query performance
- Constraints and validations
- Enums where appropriate
-
Invokefor migration best practices
/database-migrations:sql-migrations
如果需要进行数据库变更:
-
调用获取Schema设计指导
/database-design:postgresql -
设计Prisma Schema变更:
- 带有正确字段类型及默认值的模型
- 具有引用完整性的关联关系
- 用于查询性能的索引
- 约束与验证规则
- 适当时使用枚举类型
-
调用获取迁移最佳实践
/database-migrations:sql-migrations
CHECKPOINT: Present the schema changes and migration plan to the user. Wait for approval before running.
检查点:向用户展示Schema变更及迁移计划,在执行前等待用户批准
- Generate and apply the migration:
bash
pnpm db:migrate
- 生成并应用迁移:
bash
pnpm db:migrate
Step 3: Backend Implementation
步骤3:后端实现
Invoke for backend scaffolding guidance.
/backend-development:feature-developmentFor each backend task from the plan:
调用获取后端脚手架指导。
/backend-development:feature-development针对计划中的每个后端任务:
Types and Validation
类型与验证
- Define TypeScript interfaces for request/response types
- Create Zod schemas for runtime validation
- Export shared types for frontend consumption
- 为请求/响应类型定义TypeScript接口
- 创建Zod Schema用于运行时验证
- 导出共享类型以供前端使用
Service Layer
服务层
- Implement business logic in NestJS services
- Add proper error handling with typed exceptions
- Validate business rules and enforce invariants
- Keep services testable (dependency injection)
- 在NestJS服务中实现业务逻辑
- 添加带有类型化异常的正确错误处理
- 验证业务规则并强制约束
- 保持服务的可测试性(依赖注入)
API Layer
API层
- Create tRPC procedures or NestJS controllers
- Wire up validation, auth guards, and rate limiting
- Return proper status codes and error formats
- 创建tRPC过程或NestJS控制器
- 配置验证、认证守卫及限流
- 返回正确的状态码及错误格式
Backend Tests
后端测试
- Unit tests for services (mock dependencies)
- Integration tests for API endpoints
- Test validation, auth, and error handling
Run backend tests:
bash
pnpm test- 服务的单元测试(模拟依赖)
- API端点的集成测试
- 测试验证、认证及错误处理逻辑
运行后端测试:
bash
pnpm testCHECKPOINT: Present the API contract (endpoints, request/response types) to the user. Confirm the contract before building the frontend against it.
检查点:向用户展示API契约(端点、请求/响应类型),在基于该契约构建前端前请用户确认
Step 4: Frontend Implementation
步骤4:前端实现
For each frontend task from the plan:
针对计划中的每个前端任务:
Component Creation
组件创建
Invoke for guided component creation with:
/ui-design:create-component- Full TypeScript prop interfaces
- Tailwind CSS + shadcn/ui styling (invoke for patterns)
/frontend-mobile-development:tailwind-design-system - Keyboard navigation and ARIA attributes
- Responsive design
- Dark mode support (if applicable)
[!NOTE] All user-visible text strings (headings, labels, descriptions, empty states, error messages, tooltips) must follow the User-Facing Content Style rules in. No em dashes, no AI-slop vocabulary, no promotional inflation.AGENTS.md
调用获取组件创建指导,包括:
/ui-design:create-component- 完整的TypeScript属性接口
- Tailwind CSS + shadcn/ui样式(调用获取样式模式)
/frontend-mobile-development:tailwind-design-system - 键盘导航及ARIA属性
- 响应式设计
- 暗色模式支持(若适用)
[!NOTE] 所有用户可见的文本字符串(标题、标签、描述、空状态、错误信息、提示框)必须遵循AGENTS.md中的用户可见内容风格规则。禁止使用破折号、AI生成的冗余词汇或夸大的营销用语。
State Management
状态管理
If the feature requires client-side state:
- Invoke for state patterns
/frontend-mobile-development:react-state-management - Use React Query / tRPC hooks for server state
- Use local state (useState/useReducer) for UI state
- Use context or Zustand for shared client state
如果功能需要客户端状态:
- 调用获取状态管理模式
/frontend-mobile-development:react-state-management - 使用React Query / tRPC钩子管理服务端状态
- 使用本地状态(useState/useReducer)管理UI状态
- 使用Context或Zustand管理共享客户端状态
Routing
路由
If new pages or routes are needed:
- Add route definitions
- Create page components
- Add navigation links
如果需要新增页面或路由:
- 添加路由定义
- 创建页面组件
- 添加导航链接
Content and SEO (for marketing or user-facing pages)
内容与SEO(针对营销或用户可见页面)
If this feature involves marketing pages, landing page copy, or product descriptions:
- Invoke for SEO content quality and E-E-A-T optimization
/seo-content-creation:seo-content-writer - Invoke for content strategy guidance
/content-marketing:content-marketer - Invoke alongside
/accessibility-compliance:wcag-audit-patternsfor deeper WCAG compliance/ui-design:accessibility-audit
如果该功能涉及营销页面、落地页文案或产品描述:
- 调用获取SEO内容质量及E-E-A-T优化指导
/seo-content-creation:seo-content-writer - 调用获取内容策略指导
/content-marketing:content-marketer - 结合调用与
/accessibility-compliance:wcag-audit-patterns以获取更深入的WCAG合规性指导/ui-design:accessibility-audit
API Integration
API集成
- Wire components to backend via tRPC client or API hooks
- Handle loading states, error states, and empty states
- Add optimistic updates where appropriate
- 通过tRPC客户端或API钩子将组件与后端连接
- 处理加载状态、错误状态及空状态
- 适当时添加乐观更新
Feature Flag (if applicable)
功能标志(若适用)
If the plan specifies a feature flag:
typescript
const isEnabled = useFeatureFlag('FEATURE_NAME');
if (!isEnabled) return <ExistingComponent />;
return <NewFeature />;如果计划中指定了功能标志:
typescript
const isEnabled = useFeatureFlag('FEATURE_NAME');
if (!isEnabled) return <ExistingComponent />;
return <NewFeature />;Frontend Tests
前端测试
- Component render tests (React Testing Library)
- User interaction tests (click, type, submit)
- Integration tests with mocked API responses
- 组件渲染测试(React Testing Library)
- 用户交互测试(点击、输入、提交)
- 带有模拟API响应的集成测试
CHECKPOINT: Present the frontend implementation to the user. Describe what was built, show the component structure and key interactions.
检查点:向用户展示前端实现内容,描述构建的功能、组件结构及关键交互
Step 5: End-to-End Testing
步骤5:端到端(E2E)测试
Write E2E test outlines for critical user flows:
- Happy path: User completes the main flow successfully
- Error path: User encounters validation errors, API failures
- Edge cases: Empty states, boundary conditions, concurrent actions
If E2E test infrastructure exists, implement the tests.
Run the full test suite:
bash
pnpm testReport coverage and any failures.
为关键用户流程编写E2E测试大纲:
- 正常流程:用户成功完成主流程
- 错误流程:用户遇到验证错误、API失败
- 边缘情况:空状态、边界条件、并发操作
如果已有E2E测试基础设施,请实现这些测试。
运行完整测试套件:
bash
pnpm test报告测试覆盖率及任何失败情况。
Step 6: Self-Review
步骤6:自评审
Before presenting to the user, perform a comprehensive self-review:
bash
pnpm type-check # No TypeScript errors
pnpm lint # No linting violations
pnpm format:check # No Prettier formatting issues
pnpm test # All unit tests pass
pnpm test:smoke # DI wiring and component tree render OKIf fails, run on the reported files before proceeding.
format:checkpnpm exec prettier --writeCheck for:
- No hardcoded secrets or credentials
- Input validation on all user-facing inputs
- Proper error handling (no swallowed errors)
- Accessible components (ARIA, keyboard nav)
- No types in TypeScript
any - Proper loading and error states in UI
在向用户展示成果前,执行全面的自评审:
bash
pnpm type-check # 确保无TypeScript错误
pnpm lint # 确保无代码规范违规
pnpm format:check # 确保无Prettier格式问题
pnpm test # 确保所有单元测试通过
pnpm test:smoke # 确保依赖注入及组件树渲染正常如果失败,请在继续前对报告的文件运行。
format:checkpnpm exec prettier --write检查以下内容:
- 无硬编码的密钥或凭证
- 所有用户输入均已验证
- 正确的错误处理(无吞掉错误的情况)
- 可访问的组件(ARIA属性、键盘导航)
- TypeScript中无类型
any - UI中正确的加载及错误状态
Step 7: Update Documentation
步骤7:更新文档
If this feature changes how the project is set up, built, or run, update the relevant documentation before committing:
- README.md — Update Quick Start, Running the Application, or Project Structure sections if the feature introduces new infrastructure, services, environment variables, or commands
- docs/DEVELOPMENT.md — Update Prerequisites, Local Development Setup, Database Operations, or Troubleshooting sections as needed
- Makefile — Add new targets for common operations (e.g., new Docker services, database commands)
- files — Add new environment variables with clear descriptions and safe defaults
.env.example - — If any new files were added to
docs/INDEX.md, add them to the appropriate table in the master documentation indexdocs/
[!IMPORTANT] A developer cloning the repo fresh must be able to get the project running by following README.md alone. If your feature adds a Docker service, database, new dev server, or environment variable, the docs MUST reflect it.
如果该功能改变了项目的设置、构建或运行方式,请在提交前更新相关文档:
- README.md——如果功能引入了新的基础设施、服务、环境变量或命令,请更新「快速开始」、「运行应用」或「项目结构」章节
- docs/DEVELOPMENT.md——根据需要更新「前置条件」、「本地开发设置」、「数据库操作」或「故障排除」章节
- Makefile——为常见操作添加新的目标(例如:新的Docker服务、数据库命令)
- 文件——添加新的环境变量,并附上清晰的描述及安全的默认值
.env.example - ——如果
docs/INDEX.md目录中添加了新文件,请将其添加到主文档索引的相应表格中docs/
[!IMPORTANT] 新克隆仓库的开发人员必须能够仅遵循README.md的指导即可运行项目。如果你的功能添加了Docker服务、数据库、新的开发服务器或环境变量,文档必须同步更新。
Step 8: Commit
步骤8:提交
CHECKPOINT: Present a complete summary to the user:
检查点:向用户展示完整的总结:
- Files created and modified (organized by layer)
- Database changes (if any)
- API endpoints added (if any)
- Components created (if any)
- Test results and coverage
- Any known limitations or deferred items
Wait for user approval before committing.
Create atomic, conventional commits. If the feature is small enough for one commit:
feat(<scope>): implement <feature-name>If the feature is large, break into logical commits:
feat(db): add <model> schema and migration
feat(api): add <resource> endpoints
feat(web): add <feature> components and pages
test: add tests for <feature>- 创建及修改的文件(按层组织)
- 数据库变更(若有)
- 添加的API端点(若有)
- 创建的组件(若有)
- 测试结果及覆盖率
- 任何已知的限制或延迟处理的项
在提交前等待用户批准。
创建原子化的、符合规范的提交。如果功能较小,可合并为一个提交:
feat(<scope>): implement <feature-name>如果功能较大,请拆分为多个逻辑提交:
feat(db): add <model> schema and migration
feat(api): add <resource> endpoints
feat(web): add <feature> components and pages
test: add tests for <feature>Update GitHub Issue
更新GitHub Issue
If implementation was initiated from a GitHub issue:
-
Comment on it with progress:bash
gh issue comment <number> --body "Implementation committed on branch \`<branch-name>\`. Proceeding to code review via \`/review-code\`."
[!NOTE] Do not remove thelabel here. The label stays on the issue until it is closed (handled automatically byin-progress). This ensures the issue remains visibly in-progress through code review and PR submission..github/workflows/label-cleanup.yml
如果是从GitHub Issue启动的实现:
-
在Issue上评论进度:bash
gh issue comment <number> --body "Implementation committed on branch \`<branch-name>\`. Proceeding to code review via \`/review-code\`."
[!NOTE] 请勿在此处移除标签。该标签将保留在Issue上,直到Issue被关闭(由in-progress自动处理)。这确保Issue在代码评审及PR提交过程中始终显示为进行中状态。.github/workflows/label-cleanup.yml
Step 9: Hand Off — STOP Here
步骤9:交接——在此停止操作
[!CAUTION] This skill's work is done. Do NOT proceed to create a pull request, push to remote, or run a code review. Those are separate skills with their own workflows and checkpoints.
Present the next step to the user:
- Recommended: Run for multi-perspective review before submitting
/review-code - If more work remains: Continue with remaining tasks from the implementation plan, then run
/review-code - If UI-heavy: Consider running before code review
/ui-design:design-review
If working from a GitHub issue, remind the user:
- The PR should reference the issue with so it auto-closes when merged
Closes #<number> - will detect related issues from commit messages
/submit-pr
Do not push the branch, create a PR, or invoke from within this skill.
/submit-pr[!CAUTION] 本技能的工作已完成。请勿继续创建拉取请求、推送到远程仓库或执行代码评审——这些是独立的技能,有各自的工作流及检查点。
向用户展示下一步操作建议:
- 推荐:在提交前运行进行多维度评审
/review-code - 如果仍有未完成工作:继续完成实现计划中的剩余任务,然后运行
/review-code - 如果以UI为主:在代码评审前考虑运行
/ui-design:design-review
如果是从GitHub Issue开始的开发,请提醒用户:
- PR中需使用关联该Issue,以便合并时自动关闭Issue
Closes #<number> - 将从提交信息中检测关联的Issue
/submit-pr
请勿在此技能中推送分支、创建PR或调用。
/submit-pr