---
name: goal-verifier
version: 1.0.0
description: 在檢查點驗證目標和方向，避免偏離軌道
author: miles990
tags:
  - verification
  - goal-tracking
  - checkpoint
  - direction
interface:
  input:
    - name: original_goal
      type: string
      description: "原始目標描述"
      required: true
    - name: current_state
      type: object
      description: "當前狀態（已完成的工作）"
      required: true
    - name: plan
      type: object
      description: "原始計劃（來自 plan-master）"
      required: false
  output:
    - name: verification
      type: object
      description: "驗證結果"
    - name: next_action
      type: string
      description: "建議的下一步"
triggers:
  - pattern: "Milestone 完成"
    description: "每個 Milestone 完成後自動觸發"
  - pattern: "用戶說繼續"
    description: "用戶說「繼續」但沒有明確指示"
  - pattern: "範圍蔓延"
    description: "發現工作範圍超出原計劃"
  - pattern: "方向確認"
    description: "主動確認方向是否正確"
title: goal-verifier
canonical_url: https://skilld.dev/gh/miles990/skillpkg/goal-verifier
last_updated: 2026-10-04T16:35:54.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install miles990/skillpkg/goal-verifier`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/goal-verifier`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/miles990/skillpkg/goal-verifier) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/goal-verifier`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/goal-verifier --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/goal-verifier --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Goal Verifier

> 停下來 → 回顧目標 → 檢查方向 → 確認下一步

## 核心理念

```
┌─────────────────────────────────────────────────────────────────┐
│  抬頭看路，避免埋頭苦幹走錯方向                                 │
│                                                                 │
│  傳統模式：一路做下去 → 最後發現方向錯了                         │
│  驗證模式：定期檢查 → 及時調整 → 確保方向正確                    │
└─────────────────────────────────────────────────────────────────┘
```

## 觸發時機

```
┌─────────────────────────────────────────────────────────────────┐
│  何時需要驗證目標？                                             │
│                                                                 │
│  ⏸️  檢查點 (Checkpoint):                                       │
│  ├── 每個 Milestone 完成後                                     │
│  ├── 實作過程中感覺複雜度增加時                                │
│  ├── 用戶說「繼續」但沒有明確指示時                            │
│  └── 發現需要額外工作（非原計劃）時                            │
│                                                                 │
│  ⚠️  警報信號:                                                  │
│  ├── 工作範圍不斷擴大                                          │
│  ├── 「順便」做越來越多事                                      │
│  ├── 忘記原本要做什麼                                          │
│  └── 用戶似乎在等什麼但沒說                                    │
└─────────────────────────────────────────────────────────────────┘
```

## 驗證流程

### Step 1: 回顧原始目標

```markdown
問自己：
1. 原始目標是什麼？
2. 成功標準是什麼？
3. 有沒有偏離？
```

### Step 2: 評估當前狀態

```markdown
檢查清單：
□ 已完成哪些 Milestone？
□ 當前進度百分比？
□ 有沒有計劃外的工作？
□ 有沒有被阻塞的任務？
```

### Step 3: 方向檢查

```markdown
核心問題：
1. 現在做的事，是在往目標前進嗎？
2. 有沒有範圍蔓延（scope creep）？
3. 優先級對嗎？
```

### Step 4: 輸出驗證結果

```yaml
verification:
  # 目標狀態
  original_goal: "原始目標描述"
  current_goal: "當前理解的目標（可能已調整）"
  goal_drift: false  # 目標是否已偏移

  # 進度狀態
  progress:
    completed: ["M1", "M2"]
    in_progress: "M3"
    remaining: ["M4", "M5"]
    percentage: "60%"

  # 方向評估
  on_track: true  # 是否在正軌上
  concerns:
    - "M3 比預期複雜"
    - "發現需要額外處理 X"

  # 範圍評估
  scope_creep:
    detected: false
    additions: []  # 計劃外新增的工作

  # 建議
  next_step: "繼續 M3.2"
  recommendations:
    - "建議先完成 M3 再處理額外需求"
    - "可以考慮將 X 放到 M5 之後"
```

## 驗證範例

### 範例 1: 正常進行

```markdown
原始目標：建立 Todo App
當前狀態：M1、M2 完成，正在 M3

驗證結果：
{
  original_goal: "建立 Todo App",
  progress: { percentage: "60%" },
  on_track: true,
  concerns: [],
  next_step: "繼續 M3.2 - 實作刪除功能"
}
```

### 範例 2: 發現偏離

```markdown
原始目標：建立 Todo App
當前狀態：正在做用戶認證系統

驗證結果：
{
  original_goal: "建立 Todo App",
  current_goal: "建立有用戶系統的 Todo App",
  goal_drift: true,
  on_track: false,
  concerns: ["用戶認證不在原始需求中"],
  scope_creep: {
    detected: true,
    additions: ["用戶認證", "登入頁面"]
  },
  next_step: "與用戶確認是否需要用戶認證功能",
  recommendations: [
    "如果不需要：回到原計劃",
    "如果需要：更新計劃，加入認證 Milestone"
  ]
}
```

### 範例 3: 用戶說「繼續」

```markdown
用戶：繼續
當前狀態：剛完成 M3

AI 執行 goal-verifier：
"M3 已完成。目前進度：
- ✅ M1-M3 已完成
- ⏳ M4-M5 待執行

我建議下一步：
A. 繼續 M4（持久化功能）
B. 先測試 M1-M3 功能
C. 其他

您希望怎麼進行？"
```

## 與其他 Skill 的協作

```
┌─────────────────────────────────────────────────────────────────┐
│  協作流程                                                       │
│                                                                 │
│  [plan-master] → [執行 M1] → [goal-verifier] → [執行 M2] → ... │
│                       │              │                          │
│                       ↓              ↓                          │
│                   完成 M1        確認方向                        │
│                                      │                          │
│                        ┌─────────────┴─────────────┐            │
│                        ↓                           ↓            │
│                    on_track=true              on_track=false    │
│                    繼續下一步                  調整計劃           │
└─────────────────────────────────────────────────────────────────┘
```

## 對話範例

### Milestone 完成後

```markdown
Claude: M2 已完成！

目標驗證：
┌─────────────────────────────────────────────────────┐
│  📊 進度更新                                        │
│                                                     │
│  目標：建立 Todo App                                │
│  進度：███████░░░ 40%                               │
│                                                     │
│  ✅ 已完成：M1（初始化）、M2（核心 UI）             │
│  🔄 下一步：M3（互動功能）                          │
│                                                     │
│  ✓ 方向正確，繼續執行                               │
└─────────────────────────────────────────────────────┘

要繼續 M3 嗎？
```

### 發現範圍蔓延

```markdown
Claude: ⚠️ 發現範圍變更

目標驗證：
┌─────────────────────────────────────────────────────┐
│  ⚠️ 需要確認                                        │
│                                                     │
│  原始目標：建立 Todo App                            │
│  發現：您剛才提到需要「多用戶支援」                  │
│                                                     │
│  這不在原始計劃中，您想要：                          │
│  A. 加入計劃（會增加 2 個 Milestone）               │
│  B. 先完成基本版，之後再擴展                        │
│  C. 取消，維持原計劃                                │
└─────────────────────────────────────────────────────┘
```

## 設計原則

1. **定期檢查** - 不是做完才檢查，而是過程中檢查
2. **主動提醒** - 發現問題主動告知用戶
3. **不替用戶決定** - 發現偏離時詢問用戶意見
4. **結構化輸出** - 方便追蹤和記錄
5. **輕量執行** - 快速檢查，不阻塞執行流程

## 檢查清單

每次驗證都回答這三個問題：

```
┌─────────────────────────────────────────────────────────────────┐
│  1. 現在的目標是什麼？                                          │
│     → 重新確認當前要達成的目標                                  │
│                                                                 │
│  2. 方向有沒有偏離目標？                                        │
│     → 檢視已完成的工作是否朝向目標前進                          │
│                                                                 │
│  3. 下一步是什麼？                                              │
│     → 明確下一個行動，而非盲目繼續                              │
└─────────────────────────────────────────────────────────────────┘
```

## 限制與邊界

- 這是「驗證」不是「執行」，不會產出程式碼
- 需要足夠的上下文才能準確判斷
- 依賴用戶提供原始目標資訊
- 無法預測所有可能的偏離情況
