Agent skill

5w1h-decision

5W1H Decision Framework Tool. Use for: (1) Systematic decision-making before creating todos, (2) Preventing duplicate implementation, (3) Detecting avoidance behavior, (4) Ensuring agile refactor compliance with executor/dispatcher separation

Stars 1
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/tarrragon/claude/tree/main/skills/5w1h-decision

SKILL.md

5W1H Decision Framework - Systematic Decision Making

Core Principles

Principle Description Validation
Systematic Thinking Every decision requires 5W1H analysis All 6 questions answered
No Duplication Check existing implementation first Who analysis complete
No Avoidance Reject escape language Why validation passed
Agile Compliance Executor/Dispatcher separation How task type matched
TDD Integration Test-first strategy required How includes TDD steps

5W1H Framework Quick Reference

Who (Responsibility Attribution)

markdown
Who: {Executor Agent} (executor) | rosemary-project-manager (dispatcher)
- Domain: {Responsible class/module}
- Existing: {Search result for duplicates}

Valid Patterns: parsley-flutter-developer (executor) | rosemary-project-manager (dispatcher)


What (Function Definition)

markdown
What: {Function Name}
- Description: {One sentence description}
- Input: {Explicit input types}
- Output: {Explicit output types}
- Exception: {Error handling}

When (Trigger Timing)

markdown
When: {Event Name}
- Trigger: {User action / System event}
- Side Effects: {List all side effects}
- Integration: {Event system integration point}

Where (Execution Location)

markdown
Where: {Layer} / {Component}
- Architecture: {Domain/Application/Infrastructure/Presentation}
- Component: {Specific class or module}
- UseCase: {UseCase call chain}

Why (Motivation Validation)

markdown
Why: {Requirement Reference}
- Requirement ID: {UC-XXX}
- Business Value: {User benefit}
- User Scenario: {Specific use case}

Avoidance Language Detection (BLOCKED):

  • Quality compromise: "too complex", "workaround", "temporary fix", "quick fix"
  • Simplification: "simpler approach", "easier way", "simplify"
  • Problem ignoring: "ignore for now", "skip for now", "deal with later"
  • Test compromise: "simplify test", "lower test standard", "basic test only"
  • Code escape: "comment out", "disable", "temporarily disable"

How (Implementation Strategy)

markdown
How: [Task Type: {TYPE}] {Strategy Description}

Task Type vs Executor Mapping:

Task Type Valid Executor Invalid Executor
Implementation parsley, sage, pepper rosemary (BLOCKED)
Dispatch rosemary Any agent (BLOCKED)
Review rosemary Any agent (BLOCKED)
Documentation thyme, rosemary -
Analysis lavender, rosemary -
Planning rosemary, lavender -

Checklist Before Todo Creation

Completeness Check

  • Who: Executor/Dispatcher clearly identified, no duplicate implementation
  • What: Single responsibility, clear I/O definition
  • When: Trigger timing explicit, side effects identified
  • Where: Correct architecture layer, UseCase path clear
  • Why: Requirement reference, no avoidance language
  • How: Task Type present, TDD strategy, matches executor

Agile Refactor Compliance Check

  • Who has (executor) | (dispatcher) format
  • How has [Task Type: XXX] prefix
  • Implementation tasks assigned to agents (not main thread)
  • Dispatch/Review tasks assigned to main thread

Quality Gate

ALL items must be checked before creating todo.

Missing any item = BLOCKED


Key References

Reference Purpose
Complete Template Full template format and token generation
Common Violations Violation patterns and fixes
Integration Details Hook/Output Style/Token validation engine
5W1H Methodology Complete methodology
Agile Refactor Methodology Executor/Dispatcher separation rules

Quick Reference Card

Required Format

text
5W1H-{TOKEN}

Who: {agent} (executor) | rosemary-project-manager (dispatcher)
What: {Single responsibility function}
When: {Event trigger with side effects}
Where: {Architecture layer / Component}
Why: {Requirement ID + Business value}
How: [Task Type: {TYPE}] {TDD strategy steps}

System-Level Enforcement

5W1H format is automatically enforced via:

  • Output Style (system prompt injection) - Always active
  • PreToolUse Hook - Validates todo creation
  • UserPromptSubmit Hook - Generates session token

Expand your agent's capabilities with these related and highly-rated skills.

tarrragon/claude

skill-design-guide

Use this skill when creating a new skill, updating an existing skill's YAML frontmatter, or reviewing skill quality. Provides the official Anthropic skill specification, frontmatter rules, description writing best practices, progressive disclosure architecture, and common pitfalls to avoid. Triggers include: creating skills, skill review, frontmatter validation, SKILL.md writing.

1 0
Explore
tarrragon/claude

test-async-guardian

Flutter/Dart 測試異步資源管理守護者。用於:(1) 診斷測試卡住問題,(2) 審查測試程式碼中的異步資源清理,(3) 提供 tearDown 最佳實踐,(4) 掃描潛在的資源洩漏風險。觸發場景:測試卡住、撰寫新測試、Code Review 測試程式碼、執行 flutter test 前自動掃描。

1 0
Explore
tarrragon/claude

agent-team

Agent Teams 協作派發指南。Use when: (1) Agent A 的發現會改變 Agent B 正在進行的工作, (2) 用戶要求使用 team/swarm, (3) 多代理人需即時協商共用介面或 API 契約。涵蓋 team 建立、Ticket-Task 橋接、teammate 入職、生命週期管理。

1 0
Explore
tarrragon/claude

tdd

TDD 全流程指導工具。Use for: (1) 開始新功能的 TDD 流程(Phase 0-4), (2) 推進到下一個 TDD 階段, (3) Phase 1 SOLID 原則驅動功能拆分分析, (4) 查看當前 TDD 進度和階段狀態, (5) 評估是否需要 Phase 4 重構以及 3b 拆分評估。Use when: 開始新功能開發、進入任何 TDD Phase、需要 SOLID 拆分指導、需要確認當前所在 TDD 階段、需要做 Phase 4 豁免判斷時。

1 0
Explore
tarrragon/claude

branch-worktree-guardian

Branch Worktree Guardian - Git 分支和 Worktree 管理工具。Use for: (1) 新開發需求時建立隔離分支, (2) 使用 worktree 機制避免分支衝突, (3) 驗證當前工作分支正確性, (4) 預防在錯誤分支上開發

1 0
Explore
tarrragon/claude

design-decision-framework

多方案評估決策框架。用於面臨 3+ 技術方案時的結構化評估、架構決策時的系統化分析,防止衝動決策和技術債務累積。Use for: 技術方案選擇、重大架構決策、高風險技術選型

1 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results