skills/doc/SKILL.md
需求追蹤文件系統(proposals/spec/usecases)的查詢、建立、導航和管理。Use for: (1) 查詢提案、規格、用例文件, (2) 建立新提案/規格/用例(從模板), (3) 跨文件導航(從 UC 找 spec/ticket), (4) Domain 地圖查詢, (5) 追蹤索引管理, (6) UC 測試對應驗證, (7) 提案評估與審查。Use when: user mentions PROP-, UC-, SPEC-, 功能, 需求, feature, issue, 提案, 用例, 規格, 需求文件, 需求追蹤
npx skillsauth add tarrragon/claude docInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
需求追蹤文件系統 — 管理 proposals/spec/usecases 三種需求文件。
與 doc-flow(管理 CHANGELOG/worklog/ticket/todolist)互補,不重疊。
| 類型 | 目錄 | 核心問題 | 詳細規範 |
|------|------|---------|---------|
| Proposal | docs/proposals/ | 為什麼要做?做什麼不做什麼? | Read references/proposals.md |
| Spec | docs/spec/{domain}/ | 功能規格是什麼? | Read references/spec.md |
| UseCase | docs/usecases/ | 使用場景和驗收標準? | Read references/usecases.md |
| Tracking | docs/proposals-tracking.yaml | 提案進度如何? | Read references/tracking.md |
/doc <subcommand> [options]
CLI 狀態:已實作 Python CLI,使用
doc <subcommand>執行。首次使用需安裝:(cd .claude/skills/doc && uv tool install .)
| 子命令 | 用途 | 範例 |
|--------|------|------|
| query | 查詢文件 | /doc query PROP-001 或 /doc query UC-01 |
| list | 列出文件 | /doc list proposals 或 /doc list specs |
| nav | 跨文件導航 | /doc nav UC-01 → 相關 spec/proposal/ticket |
| domain | Domain 地圖 | /doc domain extraction |
| status | 追蹤狀態 | /doc status |
| test-map | UC 測試對應 | /doc test-map UC-01 |
/doc status 顯示追蹤索引摘要Proposal ──spec_refs──→ Spec
│ │
│ related_usecases
│ │
└──usecase_refs──→ UseCase
│ │
└──ticket_refs──→ Ticket(doc-flow 管理)
| Domain | 目錄 | 說明 |
|--------|------|------|
| core | spec/core/ | 資料模型、錯誤處理、事件系統 |
| extraction | spec/extraction/ | 資料提取 |
| platform | spec/platform/ | 平台管理 |
| data-management | spec/data-management/ | 儲存、匯出、同步 |
| messaging | spec/messaging/ | 跨 context 通訊 |
| page | spec/page/ | 頁面偵測 |
| system | spec/system/ | 生命週期管理 |
| user-experience | spec/user-experience/ | UI、搜尋 |
模板是框架資產,放在 Skill 內。docs/ 只放產物,不放模板。
| 模板 | 位置 | 用途 |
|------|------|------|
| 提案模板 | templates/proposal-template.md | 建立新提案 |
| 規格模板 | templates/spec-template.md | 建立新規格 |
| 用例模板 | templates/usecase-template.md | 建立新用例 |
# 建立提案
cp .claude/skills/doc/templates/proposal-template.md docs/proposals/PROP-{NNN}-{desc}.md
# 建立規格
cp .claude/skills/doc/templates/spec-template.md docs/spec/{domain}/{name}.md
# 建立用例
cp .claude/skills/doc/templates/usecase-template.md docs/usecases/UC-{XX}-{desc}.md
| 資料 | 說明 |
|------|------|
| references/proposals.md | 提案文件規範、流程、範圍界定原則 |
| references/spec.md | 規格文件規範、Domain 組織、FR/NFR 格式 |
| references/usecases.md | 用例規範、UC 測試對應要求、資訊鏈驗證 |
| references/tracking.md | 追蹤索引格式、跨文件導航機制 |
| references/proposal-evaluation-guide.md | 提案評估指南(跨專案通用的三關式審查) |
| references/legacy-code-workflow.md | Legacy Code 接手處理標準化流程(前置 + 步驟 0~6) |
| 系統 | 管理範圍 | 追蹤層級 | |------|---------|---------| | /doc | proposals, spec, usecases | 需求生命週期(提案 → 確認 → 實作) | | doc-flow | CHANGELOG, worklog, ticket, todolist | 任務生命週期(建立 → 執行 → 完成) |
協作觸發點:
| 場景 | /doc 動作 | doc-flow 動作 |
|------|----------|--------------|
| 提案確認 | status → confirmed | 開立 ticket(/ticket create) |
| Ticket 完成 | 更新 tracking.yaml checklist | ticket 標記 complete |
| 提案評估 | 提案 draft → discussing 時,執行 references/proposal-evaluation-guide.md 三關式審查 | - |
| 所有 checklist 完成 | 提案 status → implemented | 版本 worklog 記錄 |
| 項目 | /doc 管理的 spec | /spec Skill 產物 |
|------|-----------------|-----------------|
| 性質 | Domain 知識資產(持久) | Ticket 執行工件(臨時) |
| 位置 | docs/spec/{domain}/ | Ticket 目錄下的 feature-spec |
| 用途 | 擴充/重構時審視 domain 設計 | TDD Phase 1 功能設計 |
| 轉化時機 | Ticket 完成後,設計成果沉澱為 domain spec | - |
以下設計決策經過多次審查確認,記錄理由以避免重複覆議:
| 決策 | 理由 | |------|------| | tracking.yaml 保留 checklist | 需求生命週期(提案確認/撤回/變更)!= 任務生命週期(ticket 建立/完成)。提案可能在 ticket 完成後仍需變更 | | CLI 保留 6 個子命令 | 查詢精確性是長期需求。文件數量增長後 grep 會產生大量不相關結果。nav 是核心功能無法用 grep 替代 | | proposal-evaluation-guide 保持完整 | .claude/ 是跨專案通用框架。資安/UX/效能維度對其他專案類型完全適用 | | proposal frontmatter 保持 12 欄位 | outputs.* 是跨文件導航的核心欄位,source/priority 是分類排程必要欄位。砍掉會讓 /doc nav 無法運作 |
完整審查歷史見
references/review-notes.md
審查歷史和修復記錄見 references/review-notes.md。
Version: 1.5.0 Last Updated: 2026-03-30
重要:本 skill 透過
uv tool install安裝為獨立 CLI,source(本目錄)與 installed(~/.local/share/uv/tools/<package>/)是兩份獨立 Python package。修改 source 後若未 reinstall,CLI 仍使用 stale installed 版本,新增的函式會 AttributeError 或被 hasattr 包裝靜默吞掉(W11-037 根因)。
修復指令:
cd .claude/skills/<本 skill 目錄> && uv tool install . --force --reinstall
自動偵測:每次 SessionStart 由 uv-tool-staleness-check-hook 比對 source vs installed SHA256,偵測 stale 時提示修復指令。對應 ticket-skill 本身另有 ticket-reinstall-hook 自動 reinstall。
development
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
development
Claude Code release notes 框架影響評估工具。比對 last-reviewed 版本篩出新版本,逐項分類(對框架有幫助 / 需評估 / 無影響 / 不適用),對採用項引導建 ANA + WRAP + spawn 落地。Use when: 執行 /release-notes 看到新版本、定期檢查 CC 更新、評估新功能對專案框架的影響時。Triggers: release notes, release-notes, CC 更新, claude code 更新, 版本更新評估, 新功能評估, 框架影響評估。
development
Assertion design judgment framework for flaky and design-quality issues. Use when writing tests, reviewing assertions, diagnosing flaky tests, or deciding if a timing/float/cache assertion is appropriate. Do NOT use for API syntax or refactoring.
tools
Chrome Extension 實機測試與 debug 工作流,以 chrome-devtools-mcp 為核心工具。Use when: (1) 完成功能後實機驗證 / manual test / 試看看 / 跑看看 / verify feature, (2) extension debug / popup 不作動 / content script 不注入 / service worker 報錯 / background 出問題, (3) 安裝 unpacked extension / load unpacked / 載入未封裝, (4) 看 console / 看 network / 看 log / view console / inspect requests, (5) 功能更新後重新載入 extension / rebuild reload / reload extension。涵蓋 Manifest V3 service worker / content script / popup / options page 的 chrome-devtools-mcp 工具呼叫流程。不取代 Puppeteer / Playwright 自動化 E2E(CI 用),定位為開發期手動驗證與 LLM-assisted debug。