task-analyzer
Classifies task intent, change risk, and execution scale, then selects skills from the project skills index. Use when starting work, routing a task, estimating scope, or selecting skills.
shinpr · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add shinpr/ai-coding-project-boilerplate --skill task-analyzer技能说明
name: task-analyzer description: Classifies task intent, change risk, and execution scale, then selects skills from the project skills index. Use when starting work, routing a task, estimating scope, or selecting skills.
Task Analyzer
Provides metacognitive task analysis and skill selection guidance.
Skills Index
See skills-index.yaml for available skills metadata.
Task Analysis Process
1. Understand Task Essence
Identify the fundamental purpose beyond surface-level work:
| Surface Work | Fundamental Purpose |
|---|---|
| "Fix this bug" | Problem solving, root cause analysis |
| "Implement this feature" | Feature addition, value delivery |
| "Refactor this code" | Quality improvement, maintainability |
| "Update this file" | Change management, consistency |
Key Questions:
- What problem are we really solving?
- What is the expected outcome?
- What could go wrong if we approach this superficially?
2. Estimate Structural Scale
Classify decision burden from the intended outcomes and responsibility boundaries. File count is supporting evidence only.
| Scale | Decision burden |
|---|---|
| Small | One coherent outcome, one evident repository-supported implementation within one responsibility boundary, and no unresolved durable choice |
| Medium | One coherent outcome that coordinates a boundary or contains a potentially durable choice |
| Large | Multiple independently valuable outcomes that require separate design decisions |
A cross-layer implementation can remain Medium when it serves one coherent outcome. A decision point passing both documentation-criteria ADR filters raises the scale to Medium at minimum. Record the evidence that established the outcome and boundary classification in scaleRationale.
Scale affects skill priority:
- Larger scale → process/documentation skills more important
- Smaller scale → implementation skills more focused
3. Identify Task Type
| Type | Characteristics | Key Skills |
|---|---|---|
| implementation | New code or user-visible behavior | coding-standards, typescript-testing |
| fix | Defect or regression resolution | coding-standards, typescript-testing |
| refactoring | Behavior-preserving structure improvement | coding-standards, implementation-approach |
| design | Architecture or contract decisions | documentation-criteria, implementation-approach |
| quality | Testing, review, verification | typescript-testing, integration-e2e-testing |
| documentation | PRD, ADR, Design Doc, UI Spec, plan, or instruction content | documentation-criteria |
| investigation | Evidence gathering without implementation | project-context plus the domain skill selected from the index |
| migration | Data, schema, API, dependency, or runtime transition | implementation-approach, documentation-criteria |
| operations | Environment, deployment, or runtime operation | technical-spec plus the domain skill selected from the index |
| security | Security design or review | coding-standards plus the implementation-domain skill |
| skill | Skill creation, prompt-quality review, or skill metadata change | skill-optimization, llm-friendly-context |
When multiple types apply, return the primary type that owns the requested outcome and list the remaining values in secondaryTypes.
4. Tag-Based Skill Matching
Extract relevant tags from task description and match against skills-index.yaml:
Task: "Implement user authentication with tests"
Extracted tags: [implementation, testing, security]
Matched skills:
- coding-standards (implementation, security)
- typescript-testing (testing)
- typescript-rules (implementation)
5. Implicit Relationships
Consider hidden dependencies:
| Task Involves | Also Include |
|---|---|
| Error handling | debugging, testing |
| New features | design, implementation, documentation |
| Performance | profiling, optimization, testing |
| Frontend | typescript-rules, typescript-testing |
| API/Integration | integration-e2e-testing |
Output Format
Return structured analysis with skill metadata from skills-index.yaml:
taskAnalysis:
essence: <string> # Fundamental purpose identified
type: <implementation|fix|refactoring|design|quality|documentation|investigation|migration|operations|security|skill>
secondaryTypes: [<task-type>, ...]
scale: <small|medium|large>
estimatedFiles: <number or unknown> # Supporting evidence only
scaleRationale:
decidingAxis: <outcomes|responsibility-boundaries|durable-choice>
evidence: <string>
tags: [<string>, ...] # Extracted from task description
selectedSkills:
- skill: <skill-name> # From skills-index.yaml
priority: <high|medium|low>
reason: <string> # Why this skill was selected
# Pass through metadata from skills-index.yaml
tags: [...]
typical-use: <string>
size: <small|medium|large>
sections: [...] # All sections from yaml, unfiltered
Note: Section selection (choosing which sections are relevant) is done separately after reading the actual SKILL.md files.
Process Gates
- Intent gate: Proceed to scale estimation when
essence, primarytype, and anysecondaryTypesare recorded. If the requested outcome is ambiguous, record the exact outcome decision required. - Scale gate: Proceed to skill matching when the outcome and responsibility-boundary evidence is sufficient for Structural Scale and
scaleRationalenames the deciding axis. - Selection gate: Finalize when every selected skill exists in
skills-index.yaml, has a reason tied to the task, and its metadata is copied without invention.
When an unknown can change the outcome boundary, ADR qualification, or required workflow, request the exact repository evidence or user decision needed. An unknown file count alone does not block Structural Scale judgment.