---
name: requirement-analysis
description: "Analyze user requirements for feasibility, uncover deeper goals via structured questioning, and propose more elegant solutions before executing. Activated when user uses trigger words like '我希望', '我想要', '如果', '假如'."
version: 1.0.0
author: Hermes Agent
tags: [requirements, feasibility, analysis, questioning, scoping, user-preference]
---

# Requirement Analysis & Feasibility Assessment

When the user expresses a desire, wish, or hypothetical using trigger words, do NOT jump to execution. Instead, follow the **TQA methodology**:

## Triggers

### Trigger A — 需求类触发词（需 TQA 全流程）

Activate the full TQA process (Feasibility → Deep Purpose → Elegant Solution) when the user says:
- **我希望** (I hope/wish)
- **我想要** (I want)
- **如果…** (if…)
- **假如…** (suppose/what if…)

These signal an unrefined desire, not a final spec.

### Trigger B — 疑问句（仅回答分析，不执行）

Activate reduced mode when the user's message is a **question** (ends with 吗/呢/吧/？/？ or is structured as an inquiry):

**Behavior:** Only answer and analyze. Do NOT execute any action, make changes, or perform setup. Pure response mode.

This prevents premature execution when the user is just exploring or gathering information.

## TQA Process: Three-Phase Analysis

### Phase 1 — Feasibility Check (可行性分析)

Before anything else, evaluate whether the request is:
- **Technically possible** — does the tooling/access/permission exist?
- **Practically achievable** — within scope, time, and available resources?
- **Risk-aware** — are there side effects, security concerns, or dependencies?

**If feasible:** Move to Phase 2.
**If not feasible:** Explain clearly WHY and propose an alternative that achieves the same intent.

### Phase 2 — Deep Purpose Inquiry (追问深层目的)

The surface request is never the full picture. Ask targeted questions to uncover the real goal:

| Surface Request | Possible Deeper Purpose |
|----------------|------------------------|
| "连接GitHub" | Automate version control, backup, CI/CD pipeline |
| "下发任务到本地" | Build a delivery pipeline: cloud → local → git |
| "装某个工具" | Solve a specific pain point, not just install for install's sake |

Good questions to ask:
- "你最终想达到什么效果？"
- "这个解决了你的什么痛点？"
- "在这个之后你下一步打算做什么？"
- "你希望这件事多久执行一次？手动还是自动？"

### Phase 3 — Elegant Solution Design (给出更优雅的方案)

After understanding the real goal, propose options ordered by elegance:

1. **Do less** — Can the goal be achieved with existing tools? (e.g. Checkpoints instead of full git)
2. **Automate wisely** — Cron job instead of manual every time? One-shot instead of persistent service?
3. **Combine tools** — Can two existing skills solve it together? (e.g. Tailscale + cron + SCP = delivery pipeline)
4. **Build only what's needed** — No over-engineering. Start simple, iterate.

Present 2-3 options clearly, with trade-offs, and let the user choose.

## Example from Session (2026-05-15)

**User said:** "如果连接上github，可以自动git版本吗？"
**Analysis path:**
1. Feasibility: Yes, GitHub is reachable (ping OK, git installed, gh installable)
2. Deep purpose: Not just "connect GitHub" — user wants an automated pipeline where cloud Hermes outputs flow to local and are version-controlled
3. Elegant solution: Don't just install gh — consider Checkpoints (lighter), cron (automated), or full git PR workflow (heavier)

Result: The session revealed a broader automation pipeline goal, not just GitHub auth.

## Pitfalls

- **Don't skip Phase 1** — jumping straight to "sure, let me do that" ignores feasibility
- **Don't over-ask** — one or two well-placed questions is enough; don't interrogate
- **Don't assume** — the surface ask ("装gh") may not match the real need ("自动版本管理")
- **用户偏好** — This user (小天) prefers Chinese communication and values being shown elegant alternatives over getting immediate execution
