Community程式設計與開發github.com

alfathafp/portofolio-web-design

將工作拆解為有序的任務。當您有規格或明確需求,需要將工作分解為可執行的任務時使用。當任務感覺太大而難以開始、需要估算範圍或可以平行工作時使用。

portofolio-web-design 是什麼?

這是一個 AI 代理技能,旨在幫助開發者和 AI 代理(例如 Claude Code、Cursor 或 Codex)系統性地將複雜的工作分解為較小、可驗證的任務。它提供了一個結構化的規劃流程,強調在編碼之前先制定計劃、識別依賴關係圖、採用垂直切片(而非水平切片)來逐步構建完整功能,以及定義每個任務的驗收標準與驗證步驟。該技能支援將任務清單輸出為 Markdown 檔案(預設為 `tasks/todo.md`)或外部問題追蹤器(如 GitHub Issues、Jira),並包含嚴格的防護規則以防止覆蓋進行中的計劃。透過遵循此流程,使用者可以避免代理工作混亂、提高平行化效率,並確保每個建置階段都處於可工作的狀態。

相容平台✓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:識別依賴關係圖

繪製項目之間的依賴關係:

資料庫架構
    │
    ├── API 模型/類型
    │       │
    │       ├── API 端點
    │       │       │
    │       │       └── 前端 API 客戶端
    │       │               │
    │       │               └── UI 元件
    │       │
    │       └── 驗證邏輯
    │
    └── 種子資料 / 遷移

實作順序遵循依賴關係圖由下而上:先建立基礎。

步驟 3:垂直切片

與其一次建立所有資料庫、所有 API、所有 UI——不如一次構建一條完整的功能路徑:

不佳(水平切片):

任務 1:建立整個資料庫架構
任務 2:建立所有 API 端點
任務 3:建立所有 UI 元件
任務 4:連接所有部分

**良好(垂直切片):

任務 1:使用者可以建立帳戶(註冊的架構 + API + UI)
任務 2:使用者可以登入(登入的驗證架構 + API + UI)
任務 3:使用者可以建立任務(任務架構 + 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 的核取清單樣式 Markdown 檔案。 這是 /build 命令和其他下游工具所預期的慣例。除非專案另有說明,否則請使用它。
  • 外部追蹤器: 如果專案的代理規則(CLAUDE.md、AGENTS.md 等)或使用者指定了問題追蹤器(例如 GitHub Issues、Jira、Linear、bd/beads),則每個任務建立一個追蹤器項目,而不是撰寫 tasks/todo.md。將步驟 4 的結構對應到追蹤器的欄位:驗收標準和驗證步驟放在項目主體中,依賴關係則透過追蹤器的連結機制(bd dep add、「被封鎖」等)處理。如果追蹤器沒有自然的對應方式,則將步驟 5 的檢查點也記錄為追蹤器項目,或作為計劃文件中的核取清單。

使用外部追蹤器時,請在 tasks/plan.md 中註明(例如「任務在 Linear 專案 FOO 中追蹤」),以便後續步驟和未來的工作階段知道在哪裡尋找,並將計劃文件的「任務清單」章節保留為追蹤器項目 ID 或連結的有序索引,而不是重複的核取清單。

計劃文件範本

# 實作計劃:[功能/專案名稱]

## 總覽
[一個段落摘要我們要建置的內容]

## 架構決策
- [關鍵決策 1 及其理由]
- [關鍵決策 2 及其理由]

## 任務清單

### 階段 1:基礎
- [ ] 任務 1:...
- [ ] 任務 2:...

### 檢查點:基礎
- [ ] 測試通過,建置乾淨

### 階段 2:核心功能
- [ ] 任務 3:...
- [ ] 任務 4:...

### 檢查點:核心功能
- [ ] 端到端流程運作

### 階段 3:打磨
- [ ] 任務 5:...
- [ ] 任務 6:...

### 檢查點:完成
- [ ] 所有驗收標準達成
- [ ] 準備好進行審查

## 風險與緩解措施
| 風險 | 影響 | 緩解措施 |
|------|------|----------|
| [風險] | [高/中/低] | [策略] |

## 開放性問題
- [需要人類輸入的問題]

當任務位於外部追蹤器時,將上述「任務清單」章節保留為追蹤器項目 ID 或連結的有序索引,而不是重複的核取清單。

平行化機會

當有多個代理或工作階段可用時:

  • 可安全平行化: 獨立的功能切片、已實作功能的測試、文件
  • 必須循序進行: 資料庫遷移、共享狀態變更、依賴鏈
  • 需要協調: 共享 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.

相關技能