Community编程与开发github.com

alfathafp/portofolio-web-design

将工作分解为有序的任务。适用于你有明确规格说明或清晰需求,需要将工作分解为可执行任务时。当任务感觉太大而无法启动、需要估算范围或可以并行工作时使用。

portofolio-web-design 是什么?

该技能为AI代理提供了一套结构化的规划和任务分解方法。它指导代理将复杂规格说明分解为小的、可验证的任务,具有明确的验收标准和验证步骤。该技能强调垂直切片而非水平切片,以确保每个增量都交付可工作的功能。它支持多种平台,包括Claude Code、Cursor和Codex,并提供了详细的5步规划流程,包括依赖图映射、垂直切片、任务编写、排序和检查点设置。技能还处理了常见的合理化借口,并提供了明确的任务大小指南(XS到XL),以帮助代理保持专注和高效。最终输出是一个位于`tasks/plan.md`的实施计划和一个位于`tasks/todo.md`(或外部跟踪器)的任务列表,并具有防止覆盖不完整计划的保护措施。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/alfathafp/portofolio-web-design/tree/HEAD/.agents/skills/planning-and-task-breakdown

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

规划与任务分解

概述

将工作分解为小的、可验证的任务,并附带明确的验收标准。良好的任务分解是区分一个能可靠完成工作的代理与一个产出混乱结果的代理的关键。每个任务都应该足够小,以便在一个专注的会话中实现、测试和验证。

何时使用

  • 你有规格说明,需要将其分解为可实现的单元
  • 任务感觉太大或太模糊,无法开始
  • 工作需要跨多个代理或会话并行化
  • 你需要向人类传达范围
  • 实现顺序不明确

何时不使用: 单文件更改且范围明确,或者规格说明已经包含定义良好的任务。

规划过程

步骤 1: 进入规划模式

在编写任何代码之前,以只读模式操作:

  • 阅读规格说明和相关代码库部分
  • 识别现有模式和约定
  • 映射组件之间的依赖关系
  • 注意风险和未知因素

规划期间请勿编写代码。 输出是一个保存到 tasks/plan.md 的计划文档和一个记录在任务列表目标中的任务列表(参见输出文件;默认为 tasks/todo.md),而不是实现。

步骤 2: 识别依赖图

映射依赖关系:

数据库 schema
    │
    ├── API 模型/类型
    │       │
    │       ├── API 端点
    │       │       │
    │       │       └── 前端 API 客户端
    │       │               │
    │       │               └── UI 组件
    │       │
    │       └── 验证逻辑
    │
    └── 种子数据 / 迁移

实现顺序遵循依赖图自下而上:先构建基础。

步骤 3: 垂直切片

不要先构建所有数据库,然后所有 API,最后所有 UI —— 一次构建一个完整的特性路径:

糟糕(水平切片):

任务 1: 构建整个数据库 schema
任务 2: 构建所有 API 端点
任务 3: 构建所有 UI 组件
任务 4: 连接所有内容

良好(垂直切片):

任务 1: 用户可以创建账户(注册的 schema + API + UI)
任务 2: 用户可以登录(认证的 schema + API + UI)
任务 3: 用户可以创建任务(任务的 schema + API + UI)
任务 4: 用户可以查看任务列表(查询 + API + 列表视图的 UI)

每个垂直切片都交付可工作、可测试的功能。

步骤 4: 编写任务

每个任务遵循此结构,无论它是放入 markdown 任务列表还是作为外部跟踪器中的项目(参见输出文件):

## 任务 [N]: [简短描述性标题]

**描述:** 一段解释此任务完成什么的描述。

**验收标准:**
- [ ] [具体的、可测试的条件]
- [ ] [具体的、可测试的条件]

**验证:**
- [ ] 测试通过:[仓库的聚焦测试命令]
- [ ] 构建成功:[仓库的构建命令]
- [ ] 手动检查:[要验证的内容的描述]

**依赖:** [此任务依赖于哪些任务编号,或“无”]

**可能涉及的文件:**
- `src/path/to/file.ts`
- `tests/path/to/test.ts`

**预估范围:** [小:1-2 个文件 | 中:3-5 个文件 | 大:5+ 个文件]

步骤 5: 排序和设置检查点

安排任务时确保:

  1. 满足依赖关系(先构建基础)
  2. 每个任务都使系统保持在可工作状态
  3. 每完成 2-3 个任务后设置验证检查点
  4. 高风险任务放在前面(快速失败)

向任务列表目标添加明确的检查点:

## 检查点:任务 1-3 完成后
- [ ] 所有测试通过
- [ ] 应用程序构建无错误
- [ ] 核心用户流程端到端工作
- [ ] 继续之前与人类一起审查

任务规模指南

规模文件数范围示例
XS1单个函数或配置更改添加验证规则
S1-2一个组件或端点添加新的 API 端点
M3-5一个特性切片用户注册流程
L5-8多组件特性带过滤和分页的搜索
XL8+太大——需要进一步拆分—

如果任务是 L 或更大,则应分解为更小的任务。代理在执行 S 和 M 任务时表现最佳。

何时进一步分解任务:

  • 需要超过一个专注会话的时间(大约 2 小时以上的代理工作)
  • 你无法在 3 个或更少的要点中描述验收标准
  • 它涉及两个或更多独立的子系统(例如,认证和计费)
  • 你发现自己在任务标题中写了“和”(这是两个任务的标志)

输出文件

  • 计划文档: 将实施计划保存到 tasks/plan.md。这始终是一个 markdown 文件——设计决策、风险和未解决的问题无法干净地映射到单个跟踪器问题上。
  • 任务列表: 将每个任务记录在任务列表目标中(如下定义)。

如果 tasks/ 目录不存在,则创建它。

切勿覆盖不完整的计划。 在写入 tasks/plan.md 或 tasks/todo.md 之前,检查它们是否已存在且仍包含未完成的任务:

  • 相同的工作正在被重新规划(用户要求修改或扩展此计划)→ 就地更新现有文件。
  • 不同的工作 → 停下来询问。 未完成的任务可能正在另一个会话中构建中。不要自行删除、覆盖或重命名现有文件;呈现冲突并让用户决定(先完成旧计划、明确放弃它,或者告诉你新计划应该放在哪里)。

同样的规则适用于外部任务列表目标:永远不要批量关闭或删除另一个计划的开放跟踪器项目来为新计划腾出空间。

任务列表目标

任务列表目标是任务和检查点被记录的地方。它在此处定义一次;此技能中的所有其他引用都遵循它。

  • 默认:位于 tasks/todo.md 的 checklist 样式 markdown 文件。 这是 /build 命令和其他下游工具期望的约定。除非项目另有说明,否则使用它。
  • 外部跟踪器: 如果项目的代理规则(CLAUDE.md、AGENTS.md 等)或用户指定了问题跟踪器(例如 GitHub Issues、Jira、Linear、bd/beads),则每个任务创建一个跟踪器项目,而不是编写 tasks/todo.md。将步骤 4 的结构映射到跟踪器的字段:验收标准和验证步骤放在项目正文中,依赖关系通过跟踪器的链接机制(bd dep add、“blocked by”等)处理。也将步骤 5 的检查点记录为跟踪器项目,或者如果跟踪器没有自然等效物,则记录在计划文档的 checklist 中。

使用外部跟踪器时,在 tasks/plan.md 中注明(例如“任务在 Linear 项目 FOO 中跟踪”),以便下游步骤和后续会话知道去哪里查看,并将计划文档的“任务列表”部分保留为跟踪器项目 ID 或链接的有序索引,而不是重复的 checklist。

计划文档模板

# 实施计划:[特性/项目名称]

## 概述
[一段总结我们要构建的内容]

## 架构决策
- [关键决策 1 及其理由]
- [关键决策 2 及其理由]

## 任务列表

### 阶段 1: 基础
- [ ] 任务 1: ...
- [ ] 任务 2: ...

### 检查点:基础
- [ ] 测试通过,构建干净

### 阶段 2: 核心特性
- [ ] 任务 3: ...
- [ ] 任务 4: ...

### 检查点:核心特性
- [ ] 端到端流程工作

### 阶段 3: 打磨
- [ ] 任务 5: ...
- [ ] 任务 6: ...

### 检查点:完成
- [ ] 所有验收标准已满足
- [ ] 准备审查

## 风险与缓解措施
| 风险 | 影响 | 缓解措施 |
|------|------|----------|
| [风险] | [高/中/低] | [策略] |

## 未解决问题
- [需要人工输入的问题]

当任务存在于外部跟踪器时,将上面的“任务列表”部分保留为跟踪器项目 ID 或链接的有序索引,而不是重复的 checklist。

并行化机会

当有多个代理或会话可用时:

  • 可以安全并行化: 独立的特性切片、已实现特性的测试、文档
  • 必须顺序执行: 数据库迁移、共享状态更改、依赖链
  • 需要协调: 共享 API 契约的特性(先定义契约,然后并行化)

常见的合理化借口

合理化借口现实
“我会一边做一边弄清楚”这是你最终得到混乱结果和返工的方式。花 10 分钟计划节省数小时。
“任务显而易见”无论如何都要写下来。明确的任务会暴露出隐藏的依赖关系和被遗忘的边界情况。
“规划是开销”规划本身就是任务。没有计划的实现只是打字。
“我都能记在脑子里”上下文窗口是有限的。书面计划可以跨越会话边界和压缩而存活。
“旧的 tasks/plan.md 过时了,我直接替换掉它”未完成的任务可能正在另一个会话中构建中。覆盖它们会破坏其他地方不存在的工。

警示信号

  • 在没有书面任务列表的情况下开始实现
  • 在未询问的情况下,覆盖仍包含不同工作未完成任务的 tasks/plan.md 或 tasks/todo.md
  • 当项目已指定外部跟踪器时,编写 tasks/todo.md(或将任务分散在两者中)
  • 任务说“实现特性”而没有验收标准
  • 计划中没有验证步骤
  • 所有任务都是 XL 规模
  • 任务之间没有检查点
  • 未考虑依赖顺序

验证

在开始实现之前,确认:

  • 每个任务都有验收标准
  • 每个任务都有验证步骤
  • 任务依赖关系已正确识别和排序
  • 任务已记录在任务列表目标中(默认为 tasks/todo.md)
  • 没有在未获得明确用户确认的情况下覆盖预先存在的不完整计划
  • 没有任务涉及超过 ~5 个文件
  • 主要阶段之间存在检查点
  • 人类已审查并批准了计划

请参阅

验收标准是针对每个任务的,回答的是“我们构建了正确的东西吗?”的问题。它们建立在项目范围的“完成定义”之上,这是每个任务在算作完成之前必须达到的标准门槛。请参见 ../../references/definition-of-done.md。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

alfathafp/portofolio-web-design

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

alfathafp/portofolio-web-design

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

alfathafp/portofolio-web-design

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

alfathafp/portofolio-web-design

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.

alfathafp/portofolio-web-design

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

alfathafp/portofolio-web-design

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

alfathafp/portofolio-web-design

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

alfathafp/portofolio-web-design

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

alfathafp/portofolio-web-design

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

alfathafp/portofolio-web-design

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

alfathafp/portofolio-web-design

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

alfathafp/portofolio-web-design

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

alfathafp/portofolio-web-design

Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

alfathafp/portofolio-web-design

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.

alfathafp/portofolio-web-design

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

alfathafp/portofolio-web-design

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

alfathafp/portofolio-web-design

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

alfathafp/portofolio-web-design

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.

alfathafp/portofolio-web-design

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

alfathafp/portofolio-web-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

相关技能