开发

SkillProductivity

Development workflow: pick up TODO tasks, write tests first, and run lint, type checks, and tests before wrapping up.

Then ask your AI: use the 开发 skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add it as a step in a pipeline you build on Ahel, or connect Ahel to Claude, ChatGPT, Cursor, Claude Code or Codex and ask your AI to use it.

What this skill tells your AI

The instructions your AI receives, as published by setwhite/pi-setup in skills/coding/SKILL.md and read by Ahel’s review.

通用约束(工程原则、需要确认才能做的操作)见 agent 的 AGENTS.md;这里写开发流程与 Python 代码风格。前提:docs/TODO.md 存在;没有就先跑 plan。

Step 1 — 领任务

  • 按顺序取 docs/TODO.md 里第一条「未开始」或「打回」且前置任务已完成的任务
  • 取到后把状态改为「进行中」(状态词表见 ../plan/SKILL.md)

完成标准:任务、验收、接口都已明确;任一不明确就停下问用户,不猜。

Step 2 — 红/绿 TDD

  • 一次一条垂直切片:先写失败测试(红),再写刚好让它通过的实现(绿),循环
  • 测试只覆盖用户要求、已有契约和高风险逻辑
  • 测试贴在公开接口上,不测私有函数
  • 重构不混进循环,留到收工统一做

完成标准:任务涉及的用户要求、已有契约与高风险逻辑都有对应测试,且全部通过。

Step 3 — 收工

  • 跑 lint、类型检查与测试,全绿
  • 接口有变化时更新对应模块 README
  • 把任务状态改为「待审」

完成标准:检查全绿、TODO 状态更新,然后停下等 review。提交走 commit-style skill。

代码风格

Python

  • 函数体 ≤ 50 行、嵌套 ≤ 3 层、单文件 ≤ 300 行
  • 位置参数 ≤ 3 个,超出改对象/数据类传参
  • 魔法数字用命名常量(0、1、-1 等公认语义除外)
  • 函数签名、类属性、数据类字段完整类型标注

Signals

GitHub stars
36
Last commit
Oct 2026
Advanced
Item type
skill
Key
coding-setwhite
Source
github.com/setwhite/pi-setup