build-feature

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Full-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
/plan-feature
and builds all layers with integrated testing.
[!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 run
/review-code
next. Do not proceed to PR creation — that is
/submit-pr
's job.
跨数据库、后端、前端及测试层执行全栈功能实现。本技能遵循
/plan-feature
生成的实现计划,完成各层的开发并集成测试。
[!CAUTION] 范围边界:本技能仅负责实现代码并提交,创建拉取请求(PR)、推送到远程仓库、执行代码评审或提交合并申请。当实现及提交完成后,请停止操作,并建议用户下一步运行
/review-code
。请勿继续创建PR——该工作由
/submit-pr
技能负责。

Step 1: Load Implementation Plan

步骤1:加载实现计划

Check for an implementation plan using the following priority:
[!NOTE] GitHub issues created by
/plan-feature
are 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.
按照以下优先级检查是否存在实现计划:
[!NOTE] 由
/plan-feature
创建的GitHub Issue是面向任务的工作项——决策记录仍是评审评估、决策依据及架构背景的权威来源。从Issue加载计划时,请务必阅读关联的决策记录以获取完整背景信息。

Option A: GitHub Issue (Primary)

选项A:GitHub Issue(优先选择)

If the user provides a GitHub issue number (e.g.,
/build-feature 42
or
/build-feature #42
):
  1. Fetch the issue details:
    bash
    gh issue view <number> --json title,body,labels,state,number
  2. Validate the issue:
    • Confirm it has the
      build-ready
      label (warn if not — it may not have been through
      /plan-feature
      or may need further planning)
    • If the issue is closed, warn the user and ask whether to proceed
  3. 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
  4. Read the referenced decision record from the path specified in the issue for complete council rationale.
  5. 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"
  6. 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 of
    /plan-feature
    or
    /security-audit
    , which are the skills that ensure board membership and field population.
如果用户提供了GitHub Issue编号(例如:
/build-feature 42
/build-feature #42
):
  1. 获取Issue详情:
    bash
    gh issue view <number> --json title,body,labels,state,number
  2. 验证Issue:
    • 确认Issue带有
      build-ready
      标签(如果没有则发出警告——说明该Issue可能未经过
      /plan-feature
      流程,或需要进一步规划)
    • 如果Issue已关闭,向用户发出警告并询问是否继续
  3. 解析Issue正文以提取以下内容:
    • 实现计划:按层(前端、后端、数据库、测试)组织的任务复选框
    • 技术背景:架构决策、API契约、schema变更
    • 决策记录路径:阅读关联的决策记录以获取完整的评审依据
    • 功能标志(Feature Flag):若适用,提取标志名称
    • 成功指标:可衡量成果
  4. 读取Issue中指定路径下的最新决策记录,获取完整的评审决策依据。
  5. 标记工作正在进行(请参考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"
  6. 验证该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
    /security-audit
    流程之外创建的,而这两个技能负责确保Issue被添加到看板并完成字段填充。

Option B: Auto-Pick from Roadmap

选项B:从路线图自动选择

If no issue number or description is given, automatically find the next
build-ready
ticket from the project roadmap:
  1. 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 the
    in-progress
    label, use its milestone instead:
    bash
    gh issue list --state open --label "in-progress" --json number,title,milestone --jq '.[0]'
  2. Fetch
    build-ready
    candidates.
    List open issues in that milestone with the
    build-ready
    label, excluding any already labeled
    in-progress
    :
    bash
    gh issue list --state open --label "build-ready" --milestone "<milestone-title>" \
      --json number,title,labels \
      --jq '[.[] | select(.labels | map(.name) | index("in-progress") | not)]'
  3. Sort by project start date. Fetch project items and match against candidates by issue number, then sort by the
    start
    field ascending:
    bash
    gh 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 (earliest
    start
    date) is the next ticket to work on. Issues without a
    start
    date sort last.
  4. If no candidates found, fall through to Option C (Decision Record).
如果未提供Issue编号或描述,自动从项目路线图中查找下一个
build-ready
工单:
  1. 确定当前阶段:查找活跃里程碑——即状态为开放、截止日期最早且仍有未完成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带有
    in-progress
    标签,则使用该Issue的里程碑:
    bash
    gh issue list --state open --label "in-progress" --json number,title,milestone --jq '.[0]'
  2. 获取
    build-ready
    候选工单
    :列出该里程碑下状态为开放、带有
    build-ready
    标签且未标记为
    in-progress
    的Issue:
    bash
    gh issue list --state open --label "build-ready" --milestone "<milestone-title>" \
      --json number,title,labels \
      --jq '[.[] | select(.labels | map(.name) | index("in-progress") | not)]'
  3. 按项目开始日期排序:获取项目项并通过Issue编号与候选工单匹配,然后按
    start
    字段升序排序:
    bash
    gh 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
    日期最早)即为下一个需处理的工单。未设置
    start
    日期的Issue将排在最后。
  4. 如果未找到候选工单,则 fallback到选项C(决策记录)。

CHECKPOINT: Present the recommended ticket and the full candidate list to the user.

检查点:向用户展示推荐工单及完整候选工单列表

Show a table of all
build-ready
candidates in the current phase, sorted by start date, with the top candidate highlighted as the recommendation:
#IssueTitleStart Date
#NTop candidate titleYYYY-MM-DD
2#NOther candidateYYYY-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
build-ready
, extract plan, set
in-progress
label, etc.).
以表格形式展示当前阶段所有
build-ready
候选工单,按开始日期排序,并高亮推荐的工单:
#Issue标题开始日期
#N推荐工单标题YYYY-MM-DD
2#N其他候选工单YYYY-MM-DD
请用户确认:
  • (a) 处理推荐的工单
  • (b) 从列表中选择其他工单(提供Issue编号)
  • (c) 跳过自动选择,直接描述需要构建的内容
如果用户确认某工单,则使用该Issue编号按照选项A的流程继续操作(获取完整Issue详情、验证
build-ready
标签、提取计划、设置
in-progress
标签等)。

Option C: Decision Record (Fallback)

选项C:决策记录(备选方案)

If no issue number is given and no
build-ready
tickets are found on the roadmap:
  1. Read the most recent decision record from
    docs/decisions/
    that matches the current feature
  2. If no decision record exists, fall through to Option D
如果未提供Issue编号且路线图上未找到
build-ready
工单:
  1. docs/decisions/
    目录中读取与当前功能匹配的最新决策记录
  2. 如果不存在决策记录,则 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 (
/plan-feature
) was skipped — no council evaluation, no documented rationale, no structured task breakdown. Consider running
/plan-feature
first. Proceeding without a plan risks unreviewed architecture decisions.
如果不存在决策记录,请询问用户需要构建的内容。
[!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
main
. Always fetch first:
bash
git fetch origin main
If on
main
, create a new feature branch from the latest
origin/main
:
bash
git checkout -b feature/<feature-slug> origin/main
If already on an existing feature branch, rebase it onto the latest
origin/main
to pick up any changes:
bash
git status --porcelain
If 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 pop
If the working tree is clean, rebase directly:
bash
git rebase origin/main
无论计划来源如何,需识别以下内容:
  • 数据库变更:Schema修改、迁移、种子数据
  • 后端任务:API端点、服务、业务逻辑
  • 前端任务:组件、路由、状态管理、样式
  • 测试要求:覆盖率目标、端到端(E2E)场景、边缘情况
  • 功能标志:是否需要通过功能标志包裹
确保当前分支是基于最新
main
分支的特性分支。请先执行拉取操作:
bash
git fetch origin main
如果当前在
main
分支,请从最新的
origin/main
创建新的特性分支:
bash
git checkout -b feature/<feature-slug> origin/main
如果当前已在现有特性分支上,请将其变基到最新的
origin/main
以获取最新变更:
bash
git status --porcelain
如果工作区有未提交的变更,请在变基前暂存:
bash
git stash push -m "build-feature: stash before rebase"
git rebase origin/main
git stash pop
如果工作区已清理,可直接变基:
bash
git rebase origin/main

Step 2: Database Layer

步骤2:数据库层

If database changes are required:
  1. Invoke
    /database-design:postgresql
    for schema design guidance
  2. 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
  3. Invoke
    /database-migrations:sql-migrations
    for migration best practices
如果需要进行数据库变更:
  1. 调用
    /database-design:postgresql
    获取Schema设计指导
  2. 设计Prisma Schema变更:
    • 带有正确字段类型及默认值的模型
    • 具有引用完整性的关联关系
    • 用于查询性能的索引
    • 约束与验证规则
    • 适当时使用枚举类型
  3. 调用
    /database-migrations:sql-migrations
    获取迁移最佳实践

CHECKPOINT: Present the schema changes and migration plan to the user. Wait for approval before running.

检查点:向用户展示Schema变更及迁移计划,在执行前等待用户批准

  1. Generate and apply the migration:
    bash
    pnpm db:migrate
  1. 生成并应用迁移:
    bash
    pnpm db:migrate

Step 3: Backend Implementation

步骤3:后端实现

Invoke
/backend-development:feature-development
for backend scaffolding guidance.
For 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 test

CHECKPOINT: 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
/ui-design:create-component
for guided component creation with:
  • Full TypeScript prop interfaces
  • Tailwind CSS + shadcn/ui styling (invoke
    /frontend-mobile-development:tailwind-design-system
    for patterns)
  • 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
AGENTS.md
. No em dashes, no AI-slop vocabulary, no promotional inflation.
调用
/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
    /frontend-mobile-development:react-state-management
    for state patterns
  • 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
    /seo-content-creation:seo-content-writer
    for SEO content quality and E-E-A-T optimization
  • Invoke
    /content-marketing:content-marketer
    for content strategy guidance
  • Invoke
    /accessibility-compliance:wcag-audit-patterns
    alongside
    /ui-design:accessibility-audit
    for deeper WCAG compliance
如果该功能涉及营销页面、落地页文案或产品描述:
  • 调用
    /seo-content-creation:seo-content-writer
    获取SEO内容质量及E-E-A-T优化指导
  • 调用
    /content-marketing:content-marketer
    获取内容策略指导
  • 结合调用
    /accessibility-compliance:wcag-audit-patterns
    /ui-design:accessibility-audit
    以获取更深入的WCAG合规性指导

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 test
Report 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 OK
If
format:check
fails, run
pnpm exec prettier --write
on the reported files before proceeding.
Check 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
    any
    types in TypeScript
  • Proper loading and error states in UI
在向用户展示成果前,执行全面的自评审:
bash
pnpm type-check      # 确保无TypeScript错误
pnpm lint            # 确保无代码规范违规
pnpm format:check    # 确保无Prettier格式问题
pnpm test            # 确保所有单元测试通过
pnpm test:smoke      # 确保依赖注入及组件树渲染正常
如果
format:check
失败,请在继续前对报告的文件运行
pnpm 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:
  1. README.md — Update Quick Start, Running the Application, or Project Structure sections if the feature introduces new infrastructure, services, environment variables, or commands
  2. docs/DEVELOPMENT.md — Update Prerequisites, Local Development Setup, Database Operations, or Troubleshooting sections as needed
  3. Makefile — Add new targets for common operations (e.g., new Docker services, database commands)
  4. .env.example
    files
    — Add new environment variables with clear descriptions and safe defaults
  5. docs/INDEX.md
    — If any new files were added to
    docs/
    , add them to the appropriate table in the master documentation index
[!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.
如果该功能改变了项目的设置、构建或运行方式,请在提交前更新相关文档:
  1. README.md——如果功能引入了新的基础设施、服务、环境变量或命令,请更新「快速开始」、「运行应用」或「项目结构」章节
  2. docs/DEVELOPMENT.md——根据需要更新「前置条件」、「本地开发设置」、「数据库操作」或「故障排除」章节
  3. Makefile——为常见操作添加新的目标(例如:新的Docker服务、数据库命令)
  4. .env.example
    文件
    ——添加新的环境变量,并附上清晰的描述及安全的默认值
  5. 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:
  1. 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 the
in-progress
label here. The label stays on the issue until it is closed (handled automatically by
.github/workflows/label-cleanup.yml
). This ensures the issue remains visibly in-progress through code review and PR submission.
如果是从GitHub Issue启动的实现:
  1. 在Issue上评论进度:
    bash
    gh issue comment <number> --body "Implementation committed on branch \`<branch-name>\`. Proceeding to code review via \`/review-code\`."
[!NOTE] 请勿在此处移除
in-progress
标签。该标签将保留在Issue上,直到Issue被关闭(由
.github/workflows/label-cleanup.yml
自动处理)。这确保Issue在代码评审及PR提交过程中始终显示为进行中状态。

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
    /review-code
    for multi-perspective review before submitting
  • If more work remains: Continue with remaining tasks from the implementation plan, then run
    /review-code
  • If UI-heavy: Consider running
    /ui-design:design-review
    before code review
If working from a GitHub issue, remind the user:
  • The PR should reference the issue with
    Closes #<number>
    so it auto-closes when merged
  • /submit-pr
    will detect related issues from commit messages
Do not push the branch, create a PR, or invoke
/submit-pr
from within this skill.
[!CAUTION] 本技能的工作已完成。请勿继续创建拉取请求、推送到远程仓库或执行代码评审——这些是独立的技能,有各自的工作流及检查点。
向用户展示下一步操作建议:
  • 推荐:在提交前运行
    /review-code
    进行多维度评审
  • 如果仍有未完成工作:继续完成实现计划中的剩余任务,然后运行
    /review-code
  • 如果以UI为主:在代码评审前考虑运行
    /ui-design:design-review
如果是从GitHub Issue开始的开发,请提醒用户:
  • PR中需使用
    Closes #<number>
    关联该Issue,以便合并时自动关闭Issue
  • /submit-pr
    将从提交信息中检测关联的Issue
请勿在此技能中推送分支、创建PR或调用
/submit-pr