@polymorphism-tech/morph-spec 2.3.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +446 -1730
- package/README.md +515 -516
- package/bin/morph-spec.js +366 -294
- package/bin/task-manager.js +429 -368
- package/bin/validate.js +369 -268
- package/content/.claude/commands/morph-apply.md +221 -158
- package/content/.claude/commands/morph-deploy.md +529 -0
- package/content/.claude/commands/morph-preflight.md +227 -0
- package/content/.claude/commands/morph-proposal.md +122 -101
- package/content/.claude/commands/morph-status.md +86 -86
- package/content/.claude/commands/morph-troubleshoot.md +122 -0
- package/content/.claude/skills/infra/azure-deploy-specialist.md +699 -0
- package/content/.claude/skills/level-0-meta/README.md +7 -0
- package/content/.claude/skills/level-0-meta/code-review.md +226 -0
- package/content/.claude/skills/level-0-meta/morph-checklist.md +117 -0
- package/content/.claude/skills/level-0-meta/simulation-checklist.md +77 -0
- package/content/.claude/skills/level-1-workflows/README.md +7 -0
- package/content/.claude/skills/level-1-workflows/morph-replicate.md +213 -0
- package/content/.claude/{commands/morph-clarify.md → skills/level-1-workflows/phase-clarify.md} +131 -184
- package/content/.claude/{commands/morph-design.md → skills/level-1-workflows/phase-design.md} +213 -275
- package/content/.claude/skills/level-1-workflows/phase-setup.md +106 -0
- package/content/.claude/skills/level-1-workflows/phase-tasks.md +164 -0
- package/content/.claude/{commands/morph-uiux.md → skills/level-1-workflows/phase-uiux.md} +169 -211
- package/content/.claude/skills/level-2-domains/README.md +14 -0
- package/content/.claude/skills/level-2-domains/ai-agents/ai-system-architect.md +192 -0
- package/content/.claude/skills/{specialists → level-2-domains/architecture}/po-pm-advisor.md +197 -197
- package/content/.claude/skills/level-2-domains/architecture/standards-architect.md +156 -0
- package/content/.claude/skills/level-2-domains/backend/dotnet-senior.md +287 -0
- package/content/.claude/skills/level-2-domains/backend/ef-modeler.md +113 -0
- package/content/.claude/skills/level-2-domains/backend/hangfire-orchestrator.md +126 -0
- package/content/.claude/skills/level-2-domains/backend/ms-agent-expert.md +109 -0
- package/content/.claude/skills/level-2-domains/frontend/blazor-builder.md +210 -0
- package/content/.claude/skills/level-2-domains/frontend/nextjs-expert.md +154 -0
- package/content/.claude/skills/level-2-domains/frontend/ui-ux-designer.md +191 -0
- package/content/.claude/skills/{specialists → level-2-domains/infrastructure}/azure-architect.md +142 -142
- package/content/.claude/skills/level-2-domains/infrastructure/bicep-architect.md +126 -0
- package/content/.claude/skills/level-2-domains/infrastructure/container-specialist.md +131 -0
- package/content/.claude/skills/level-2-domains/infrastructure/devops-engineer.md +119 -0
- package/content/.claude/skills/level-2-domains/integrations/asaas-financial.md +130 -0
- package/content/.claude/skills/level-2-domains/integrations/azure-identity.md +142 -0
- package/content/.claude/skills/level-2-domains/integrations/clerk-auth.md +108 -0
- package/content/.claude/skills/level-2-domains/integrations/resend-email.md +119 -0
- package/content/.claude/skills/level-2-domains/quality/code-analyzer.md +235 -0
- package/content/.claude/skills/level-2-domains/quality/testing-specialist.md +126 -0
- package/content/.claude/skills/level-3-technologies/README.md +7 -0
- package/content/.claude/skills/level-4-patterns/README.md +7 -0
- package/content/.claude/skills/specialists/prompt-engineer.md +189 -0
- package/content/.claude/skills/specialists/seo-growth-hacker.md +320 -0
- package/content/.morph/config/agents.json +762 -242
- package/content/.morph/config/config.template.json +122 -108
- package/content/.morph/docs/workflows/design-impl.md +37 -0
- package/content/.morph/docs/workflows/enforcement-pipeline.md +668 -0
- package/content/.morph/docs/workflows/fast-track.md +29 -0
- package/content/.morph/docs/workflows/full-morph.md +76 -0
- package/content/.morph/docs/workflows/standard.md +44 -0
- package/content/.morph/docs/workflows/ui-refresh.md +39 -0
- package/content/.morph/examples/scheduled-reports/decisions.md +158 -0
- package/content/.morph/examples/scheduled-reports/proposal.md +95 -0
- package/content/.morph/examples/scheduled-reports/spec.md +267 -0
- package/content/.morph/hooks/README.md +348 -239
- package/content/.morph/hooks/pre-commit-agents.sh +24 -24
- package/content/.morph/hooks/task-completed.js +73 -0
- package/content/.morph/hooks/teammate-idle.js +68 -0
- package/content/.morph/schemas/tasks.schema.json +220 -0
- package/content/.morph/standards/agent-framework-blazor-ui.md +359 -0
- package/content/.morph/standards/agent-framework-production.md +410 -0
- package/content/.morph/standards/agent-framework-setup.md +413 -453
- package/content/.morph/standards/agent-framework-workflows.md +349 -0
- package/content/.morph/standards/agent-teams-workflow.md +474 -0
- package/content/.morph/standards/architecture.md +325 -325
- package/content/.morph/standards/azure.md +605 -379
- package/content/.morph/standards/dotnet10-migration.md +520 -494
- package/content/.morph/templates/CONTEXT-FEATURE.md +276 -0
- package/content/.morph/templates/CONTEXT.md +170 -0
- package/content/.morph/templates/agent.cs +163 -172
- package/content/.morph/templates/clarify-questions.md +159 -0
- package/content/.morph/templates/contracts/Commands.cs +74 -0
- package/content/.morph/templates/contracts/Entities.cs +25 -0
- package/content/.morph/templates/contracts/Queries.cs +74 -0
- package/content/.morph/templates/contracts/README.md +74 -0
- package/content/.morph/templates/decisions.md +123 -106
- package/content/.morph/templates/infra/azure-pipelines-deploy.yml +480 -0
- package/content/.morph/templates/infra/deploy-checklist.md +426 -0
- package/content/.morph/templates/proposal.md +141 -155
- package/content/.morph/templates/recap.md +94 -105
- package/content/.morph/templates/simulation.md +353 -0
- package/content/.morph/templates/spec.md +149 -148
- package/content/.morph/templates/state.template.json +222 -222
- package/content/.morph/templates/tasks.md +257 -235
- package/content/.morph/templates/ui-components.md +362 -276
- package/content/CLAUDE.md +150 -442
- package/detectors/structure-detector.js +245 -250
- package/docs/README.md +144 -149
- package/docs/getting-started.md +301 -302
- package/docs/installation.md +361 -361
- package/docs/validation-checklist.md +265 -266
- package/package.json +80 -80
- package/src/commands/advance-phase.js +266 -0
- package/src/commands/analyze-blazor-concurrency.js +193 -0
- package/src/commands/deploy.js +780 -0
- package/src/commands/detect-agents.js +167 -0
- package/src/commands/doctor.js +356 -280
- package/src/commands/generate-context.js +40 -0
- package/src/commands/init.js +258 -245
- package/src/commands/lint-fluent.js +352 -0
- package/src/commands/rollback-phase.js +185 -0
- package/src/commands/session-summary.js +291 -0
- package/src/commands/task.js +78 -75
- package/src/commands/troubleshoot.js +222 -0
- package/src/commands/update.js +192 -159
- package/src/commands/validate-blazor-state.js +210 -0
- package/src/commands/validate-blazor.js +156 -0
- package/src/commands/validate-css.js +84 -0
- package/src/commands/validate-phase.js +221 -0
- package/src/lib/blazor-concurrency-analyzer.js +288 -0
- package/src/lib/blazor-state-validator.js +291 -0
- package/src/lib/blazor-validator.js +374 -0
- package/src/lib/complexity-analyzer.js +441 -292
- package/src/lib/context-generator.js +513 -0
- package/src/lib/continuous-validator.js +421 -440
- package/src/lib/css-validator.js +352 -0
- package/src/lib/decision-constraint-loader.js +109 -0
- package/src/lib/design-system-detector.js +187 -0
- package/src/lib/design-system-scaffolder.js +299 -0
- package/src/lib/hook-executor.js +256 -0
- package/src/lib/recap-generator.js +205 -0
- package/src/lib/spec-validator.js +258 -0
- package/src/lib/standards-context-injector.js +287 -0
- package/src/lib/state-manager.js +397 -340
- package/src/lib/team-orchestrator.js +322 -0
- package/src/lib/troubleshoot-grep.js +194 -0
- package/src/lib/troubleshoot-index.js +144 -0
- package/src/lib/validation-runner.js +283 -0
- package/src/lib/validators/contract-compliance-validator.js +273 -0
- package/src/lib/validators/design-system-validator.js +231 -0
- package/src/utils/file-copier.js +187 -139
- package/content/.claude/commands/morph-costs.md +0 -206
- package/content/.claude/commands/morph-setup.md +0 -100
- package/content/.claude/commands/morph-tasks.md +0 -319
- package/content/.claude/skills/infra/bicep-architect.md +0 -419
- package/content/.claude/skills/infra/container-specialist.md +0 -437
- package/content/.claude/skills/infra/devops-engineer.md +0 -405
- package/content/.claude/skills/integrations/asaas-financial.md +0 -333
- package/content/.claude/skills/integrations/azure-identity.md +0 -309
- package/content/.claude/skills/integrations/clerk-auth.md +0 -290
- package/content/.claude/skills/specialists/ai-system-architect.md +0 -604
- package/content/.claude/skills/specialists/cost-guardian.md +0 -110
- package/content/.claude/skills/specialists/ef-modeler.md +0 -211
- package/content/.claude/skills/specialists/hangfire-orchestrator.md +0 -255
- package/content/.claude/skills/specialists/ms-agent-expert.md +0 -263
- package/content/.claude/skills/specialists/standards-architect.md +0 -78
- package/content/.claude/skills/specialists/ui-ux-designer.md +0 -1100
- package/content/.claude/skills/stacks/dotnet-blazor.md +0 -606
- package/content/.claude/skills/stacks/dotnet-nextjs.md +0 -402
- package/content/.claude/skills/stacks/shopify.md +0 -445
- package/content/.morph/config/azure-pricing.json +0 -70
- package/content/.morph/config/azure-pricing.schema.json +0 -50
- package/content/.morph/hooks/pre-commit-costs.sh +0 -91
- package/docs/api/cost-calculator.js.html +0 -513
- package/docs/api/design-system-generator.js.html +0 -382
- package/docs/api/global.html +0 -5263
- package/docs/api/index.html +0 -96
- package/docs/api/state-manager.js.html +0 -423
- package/src/commands/cost.js +0 -181
- package/src/commands/update-pricing.js +0 -206
- package/src/lib/cost-calculator.js +0 -429
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# AI System Architect
|
|
2
|
+
|
|
3
|
+
Expert in agentic system architecture, multi-agent orchestration, and RAG pipelines.
|
|
4
|
+
|
|
5
|
+
> **Layer:** 2 | **Load:** on-keyword | **Keywords:** orchestration, multi-agent, rag, vector search, embedding, agentic, memory, reasoning
|
|
6
|
+
|
|
7
|
+
> **Ref:** `agent-framework-workflows.md` — Workflow patterns with AgentWorkflowBuilder
|
|
8
|
+
> **Ref:** `agent-framework-production.md` — Middleware, A2A, MCP, caching
|
|
9
|
+
> **Ref:** `vector-search-rag.md` — Vector Search + RAG with EF Core 10
|
|
10
|
+
|
|
11
|
+
## Responsibilities
|
|
12
|
+
|
|
13
|
+
1. Design scalable agentic architectures
|
|
14
|
+
2. Define orchestration patterns (workflows, inter-agent communication)
|
|
15
|
+
3. Implement RAG pipelines (chunking, embedding, retrieval)
|
|
16
|
+
4. Select patterns from 20 agentic design patterns
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 20 Agentic Design Patterns
|
|
21
|
+
|
|
22
|
+
| # | Pattern | Use Case | When to Use | Key Trade-off |
|
|
23
|
+
|---|---------|----------|-------------|---------------|
|
|
24
|
+
| 1 | **Prompt Chaining** | Multi-step processing | Data transformation, pipelines | Modular vs context explosion |
|
|
25
|
+
| 2 | **Routing** | Direct to specialist | Multiple domains | Specialization vs misrouting |
|
|
26
|
+
| 3 | **Parallelization** | Independent chunks | Large-scale processing | Speed vs coordination complexity |
|
|
27
|
+
| 4 | **Reflection** | Draft → critique → refine | Quality control, creative tasks | Quality vs cost (limit 3 iterations) |
|
|
28
|
+
| 5 | **Tool Use** | External tool calls | Multi-step workflows | Quality vs misfire propagation |
|
|
29
|
+
| 6 | **Planning** | Step-by-step before execute | Goal-oriented workflows | Strategic vs setup complexity |
|
|
30
|
+
| 7 | **Multi-Agent Collaboration** | Specialized agents + manager | Iterative refinement, dev | Specialization vs extensive testing |
|
|
31
|
+
| 8 | **Memory Management** | Short/episodic/long-term | Continuity, personalization | Context preservation vs privacy risk |
|
|
32
|
+
| 9 | **Learning & Adaptation** | Feedback → update prompts | Continuous improvement | Improvement vs learning wrong things |
|
|
33
|
+
| 10 | **Goal Setting & Monitoring** | SMART goals + metrics | Complex projects, autonomous ops | Efficiency vs goal conflicts |
|
|
34
|
+
| 11 | **Exception Handling** | Retry + exponential backoff | Production systems | Visibility vs infra complexity |
|
|
35
|
+
| 12 | **Human-in-the-Loop** | Human review for high-risk | Compliance, edge cases | Trust vs latency |
|
|
36
|
+
| 13 | **Knowledge Retrieval (RAG)** | Chunk + embed + search | Private/proprietary data | Accuracy vs infra to maintain |
|
|
37
|
+
| 14 | **Inter-Agent Communication** | Structured messaging (A2A) | Enterprise, distributed | Fault isolation vs extreme complexity |
|
|
38
|
+
| 15 | **Resource-Aware Optimization** | Route by complexity/cost | Cost-sensitive, high volume | Cost reduction vs tuning effort |
|
|
39
|
+
| 16 | **Reasoning Techniques** | CoT, ToT, Self-Consistency | Complex problems, math | Robust vs token-heavy (rarely needed) |
|
|
40
|
+
| 17 | **Evaluation & Monitoring** | Quality gates, drift detection | Production, enterprise | Reliability vs alert fatigue |
|
|
41
|
+
| 18 | **Guardrails & Safety** | PII, injection, malicious check | Public-facing systems | Risk mitigation vs false positives |
|
|
42
|
+
| 19 | **Prioritization** | Score by value/risk/effort | Dynamic environments, task mgmt | Adaptability vs context switching |
|
|
43
|
+
| 20 | **Exploration & Discovery** | Broad knowledge exploration | Research, competitive analysis | Innovation vs resource-heavy |
|
|
44
|
+
|
|
45
|
+
### Common Pattern Combinations
|
|
46
|
+
|
|
47
|
+
| Combination | Use Case |
|
|
48
|
+
|------------|----------|
|
|
49
|
+
| Prompt Chaining + Reflection | Content generation with quality control |
|
|
50
|
+
| Routing + Tool Use | Customer service with integrations |
|
|
51
|
+
| Planning + Multi-Agent | Complex development projects |
|
|
52
|
+
| Memory + Learning | Personalized assistants that evolve |
|
|
53
|
+
| Parallelization + Exception Handling | Data processing at scale |
|
|
54
|
+
| Human-in-Loop + Guardrails | Critical systems with compliance |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Microsoft Agent Framework Orchestration
|
|
59
|
+
|
|
60
|
+
### Workflow Patterns
|
|
61
|
+
|
|
62
|
+
```csharp
|
|
63
|
+
// Sequential — pipeline processing
|
|
64
|
+
Workflow sequential = AgentWorkflowBuilder.BuildSequential(researcher, analyst, writer);
|
|
65
|
+
AIAgent seqAgent = await sequential.AsAgentAsync();
|
|
66
|
+
|
|
67
|
+
// GroupChat — iterative refinement with manager
|
|
68
|
+
Workflow groupChat = AgentWorkflowBuilder
|
|
69
|
+
.CreateGroupChatBuilderWith(agents =>
|
|
70
|
+
new AgentWorkflowBuilder.RoundRobinGroupChatManager(agents)
|
|
71
|
+
{ MaximumIterationCount = 3 })
|
|
72
|
+
.AddParticipants(writer, editor, reviewer)
|
|
73
|
+
.Build();
|
|
74
|
+
|
|
75
|
+
// Handoff — dynamic routing
|
|
76
|
+
var handoff = AgentWorkflowBuilder.StartHandoffWith(triageAgent)
|
|
77
|
+
.WithHandoffs(triageAgent, [specialistA, specialistB])
|
|
78
|
+
.WithHandoff(specialistA, triageAgent)
|
|
79
|
+
.WithHandoff(specialistB, triageAgent)
|
|
80
|
+
.Build();
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### A2A Protocol
|
|
84
|
+
|
|
85
|
+
```csharp
|
|
86
|
+
app.MapA2A(agent, "/a2a/agent-name", agentCard: new()
|
|
87
|
+
{
|
|
88
|
+
Name = "Agent Name",
|
|
89
|
+
Description = "What this agent does.",
|
|
90
|
+
Version = "1.0"
|
|
91
|
+
});
|
|
92
|
+
// Discovery: GET /a2a/agent-name/v1/card
|
|
93
|
+
// Message: POST /a2a/agent-name/v1/message:stream
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Small Specialized Agents > Monolithic Agent
|
|
97
|
+
|
|
98
|
+
Design principle: each agent has one clear responsibility, composed via workflows.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## RAG Pipeline with Microsoft Stack
|
|
103
|
+
|
|
104
|
+
### Architecture
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Extraction → Staging (Blob) → Chunking → Embedding → Indexing (AI Search) → Retrieval
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Chunking Strategies
|
|
111
|
+
|
|
112
|
+
| Strategy | Method | Best For |
|
|
113
|
+
|----------|--------|----------|
|
|
114
|
+
| Paragraph Splitter | By paragraphs | General text |
|
|
115
|
+
| Markdown Header Splitter | By headers (#, ##) | Documentation |
|
|
116
|
+
| Token-based Splitter | By token count | Fixed-size chunks |
|
|
117
|
+
| Semantic Splitter | By semantic similarity | Highest quality |
|
|
118
|
+
|
|
119
|
+
**Principle:** Test ALL strategies and rank by metrics (avg similarity score, token count, relevance).
|
|
120
|
+
|
|
121
|
+
### Agent Framework Integration
|
|
122
|
+
|
|
123
|
+
```csharp
|
|
124
|
+
[Description("Searches knowledge base")]
|
|
125
|
+
public async Task<SearchResult[]> SearchKnowledgeAsync(
|
|
126
|
+
[Description("Search query")] string query, CancellationToken ct = default)
|
|
127
|
+
{
|
|
128
|
+
var embedding = await _embeddings.GenerateAsync(query, ct);
|
|
129
|
+
var results = await _searchClient.SearchAsync<KnowledgeChunk>(query,
|
|
130
|
+
new SearchOptions { VectorSearch = new() {
|
|
131
|
+
Queries = { new VectorizedQuery(embedding) { KNearestNeighborsCount = 5 } }
|
|
132
|
+
}}, ct);
|
|
133
|
+
return results.Value.GetResults().ToArray();
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Why Staging in Blob Storage?
|
|
138
|
+
|
|
139
|
+
Immutability, versioning, low cost, fallback on processing bugs, audit trail.
|
|
140
|
+
|
|
141
|
+
### Key Insight
|
|
142
|
+
|
|
143
|
+
**LLM comes LAST.** 80% of RAG work happens before the model is called (extraction, chunking, embedding, evaluation).
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## When NOT to Use Agent Framework
|
|
148
|
+
|
|
149
|
+
| Scenario | Use Instead |
|
|
150
|
+
|----------|------------|
|
|
151
|
+
| Single LLM call resolves | `IChatClient` directly |
|
|
152
|
+
| No tools needed | `ChatClient.GetResponseAsync()` |
|
|
153
|
+
| Model < 3B params | Tool calling unreliable |
|
|
154
|
+
| Just summarization/translation | No agent needed |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Checklist
|
|
159
|
+
|
|
160
|
+
### System Design
|
|
161
|
+
- [ ] Patterns selected and justified
|
|
162
|
+
- [ ] Orchestration pattern chosen (Sequential/Concurrent/GroupChat/Handoff/Magentic)
|
|
163
|
+
- [ ] Specialized agents mapped with clear responsibilities
|
|
164
|
+
|
|
165
|
+
### RAG Pipeline (if applicable)
|
|
166
|
+
- [ ] Data source identified and accessible
|
|
167
|
+
- [ ] Staging in Blob Storage configured
|
|
168
|
+
- [ ] Multiple chunking strategies tested and ranked
|
|
169
|
+
- [ ] Azure AI Search index configured (vector + hybrid)
|
|
170
|
+
|
|
171
|
+
### Orchestration
|
|
172
|
+
- [ ] Workflow built with `AgentWorkflowBuilder`
|
|
173
|
+
- [ ] Error handling via middleware
|
|
174
|
+
- [ ] OpenTelemetry monitoring enabled
|
|
175
|
+
|
|
176
|
+
### Security & Cost
|
|
177
|
+
- [ ] Guardrails implemented (PII, injection, malicious content)
|
|
178
|
+
- [ ] Resource-Aware Optimization (model selection by complexity)
|
|
179
|
+
- [ ] Token usage monitored and costs documented
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## References
|
|
184
|
+
|
|
185
|
+
- [Microsoft Agent Framework](https://learn.microsoft.com/agent-framework/)
|
|
186
|
+
- [Azure AI Search](https://learn.microsoft.com/azure/search/)
|
|
187
|
+
- [GitHub: microsoft/agent-framework](https://github.com/microsoft/agent-framework)
|
|
188
|
+
- `.wiki/ai/20-agentic-design-patterns.md` — Full 20 patterns reference
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
*MORPH-SPEC by Polymorphism Tech*
|
package/content/.claude/skills/{specialists → level-2-domains/architecture}/po-pm-advisor.md
RENAMED
|
@@ -1,197 +1,197 @@
|
|
|
1
|
-
# PO/PM Advisor
|
|
2
|
-
|
|
3
|
-
Especialista em requisitos, priorização e gestão de produto para clarificar features e ROI.
|
|
4
|
-
|
|
5
|
-
## Responsabilidades
|
|
6
|
-
|
|
7
|
-
1. **Clarificar requisitos** ambíguos ou incompletos
|
|
8
|
-
2. **Priorizar features** por valor de negócio
|
|
9
|
-
3. **Calcular ROI** e esforço estimado
|
|
10
|
-
4. **Definir critérios** de aceitação
|
|
11
|
-
|
|
12
|
-
## Triggers
|
|
13
|
-
|
|
14
|
-
Keywords: `unclear`, `requirements`, `priority`, `ROI`, `mvp`, `scope`, `acceptance criteria`, `user story`
|
|
15
|
-
|
|
16
|
-
## Framework de Clarificação
|
|
17
|
-
|
|
18
|
-
### Perguntas Essenciais
|
|
19
|
-
|
|
20
|
-
Quando receber uma feature request ambígua, faça estas perguntas:
|
|
21
|
-
|
|
22
|
-
1. **Quem?** - Qual o usuário/persona principal?
|
|
23
|
-
2. **O quê?** - O que exatamente deve acontecer?
|
|
24
|
-
3. **Por quê?** - Qual problema resolve? Qual o valor?
|
|
25
|
-
4. **Quando?** - Urgência? Deadline externo?
|
|
26
|
-
5. **Como medir?** - Como saberemos que funcionou?
|
|
27
|
-
|
|
28
|
-
### Template de User Story
|
|
29
|
-
|
|
30
|
-
```markdown
|
|
31
|
-
## User Story: {Nome da Feature}
|
|
32
|
-
|
|
33
|
-
**Como** {persona/usuário},
|
|
34
|
-
**Eu quero** {ação/funcionalidade},
|
|
35
|
-
**Para que** {benefício/valor}.
|
|
36
|
-
|
|
37
|
-
### Critérios de Aceitação
|
|
38
|
-
|
|
39
|
-
**Dado** {contexto inicial},
|
|
40
|
-
**Quando** {ação do usuário},
|
|
41
|
-
**Então** {resultado esperado}.
|
|
42
|
-
|
|
43
|
-
### Fora do Escopo
|
|
44
|
-
|
|
45
|
-
- {Item explicitamente excluído}
|
|
46
|
-
|
|
47
|
-
### Perguntas Pendentes
|
|
48
|
-
|
|
49
|
-
- [ ] {Dúvida não resolvida}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Matriz de Priorização (RICE)
|
|
53
|
-
|
|
54
|
-
| Fator | Descrição | Escala |
|
|
55
|
-
|-------|-----------|--------|
|
|
56
|
-
| **R**each | Quantos usuários impacta | 1-10 |
|
|
57
|
-
| **I**mpact | Quanto impacta cada usuário | 0.25, 0.5, 1, 2, 3 |
|
|
58
|
-
| **C**onfidence | Confiança nas estimativas | 0-100% |
|
|
59
|
-
| **E**ffort | Pessoa-semanas de trabalho | 1+ |
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
RICE Score = (Reach × Impact × Confidence) / Effort
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Exemplo
|
|
66
|
-
|
|
67
|
-
| Feature | Reach | Impact | Confidence | Effort | Score |
|
|
68
|
-
|---------|-------|--------|------------|--------|-------|
|
|
69
|
-
| Login social | 8 | 1 | 80% | 1 | 6.4 |
|
|
70
|
-
| Dashboard | 5 | 2 | 90% | 3 | 3.0 |
|
|
71
|
-
| Export PDF | 3 | 0.5 | 100% | 0.5 | 3.0 |
|
|
72
|
-
| Dark mode | 4 | 0.25 | 100% | 1 | 1.0 |
|
|
73
|
-
|
|
74
|
-
## MVP vs Nice-to-Have
|
|
75
|
-
|
|
76
|
-
### Critérios para MVP
|
|
77
|
-
|
|
78
|
-
1. **Resolve o problema core** do usuário
|
|
79
|
-
2. **Diferencia** da concorrência
|
|
80
|
-
3. **Validável** em 2-4 semanas
|
|
81
|
-
4. **Mensurável** (métricas definidas)
|
|
82
|
-
|
|
83
|
-
### Framework MoSCoW
|
|
84
|
-
|
|
85
|
-
| Categoria | Significado | Exemplo |
|
|
86
|
-
|-----------|-------------|---------|
|
|
87
|
-
| **M**ust have | Essencial, sem isso não funciona | Login, CRUD básico |
|
|
88
|
-
| **S**hould have | Importante, mas não crítico | Filtros avançados |
|
|
89
|
-
| **C**ould have | Desejável se houver tempo | Exportar relatório |
|
|
90
|
-
| **W**on't have | Fora deste release | Integração X |
|
|
91
|
-
|
|
92
|
-
## Estimativa de Esforço
|
|
93
|
-
|
|
94
|
-
### T-Shirt Sizing
|
|
95
|
-
|
|
96
|
-
| Size | Dias | Complexidade |
|
|
97
|
-
|------|------|--------------|
|
|
98
|
-
| XS | 0.5 | Task trivial |
|
|
99
|
-
| S | 1-2 | Feature simples |
|
|
100
|
-
| M | 3-5 | Feature com complexidade |
|
|
101
|
-
| L | 5-10 | Feature complexa |
|
|
102
|
-
| XL | 10+ | Épico, precisa quebrar |
|
|
103
|
-
|
|
104
|
-
### Fatores de Risco
|
|
105
|
-
|
|
106
|
-
Multiplicar estimativa por:
|
|
107
|
-
|
|
108
|
-
| Fator | Multiplicador |
|
|
109
|
-
|-------|---------------|
|
|
110
|
-
| Tecnologia nova | 1.5x |
|
|
111
|
-
| Integração externa | 1.3x |
|
|
112
|
-
| Requisitos vagos | 1.5x |
|
|
113
|
-
| Primeiro da equipe | 1.3x |
|
|
114
|
-
|
|
115
|
-
## Template de ADR (Architecture Decision Record)
|
|
116
|
-
|
|
117
|
-
```markdown
|
|
118
|
-
# ADR-{XXX}: {Título da Decisão}
|
|
119
|
-
|
|
120
|
-
## Status
|
|
121
|
-
{PROPOSED | ACCEPTED | DEPRECATED | SUPERSEDED}
|
|
122
|
-
|
|
123
|
-
## Contexto
|
|
124
|
-
{Situação que requer decisão}
|
|
125
|
-
|
|
126
|
-
## Opções Consideradas
|
|
127
|
-
|
|
128
|
-
### Opção 1: {Nome}
|
|
129
|
-
- Prós: ...
|
|
130
|
-
- Contras: ...
|
|
131
|
-
- Custo: ...
|
|
132
|
-
|
|
133
|
-
### Opção 2: {Nome}
|
|
134
|
-
- Prós: ...
|
|
135
|
-
- Contras: ...
|
|
136
|
-
- Custo: ...
|
|
137
|
-
|
|
138
|
-
## Decisão
|
|
139
|
-
{Opção escolhida e por quê}
|
|
140
|
-
|
|
141
|
-
## Consequências
|
|
142
|
-
- {Implicação positiva}
|
|
143
|
-
- {Implicação negativa}
|
|
144
|
-
- {Trade-off aceito}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Cálculo de ROI
|
|
148
|
-
|
|
149
|
-
```markdown
|
|
150
|
-
## ROI Estimado: {Feature}
|
|
151
|
-
|
|
152
|
-
### Benefícios (anual)
|
|
153
|
-
- Aumento de conversão: R$ X
|
|
154
|
-
- Redução de suporte: R$ Y
|
|
155
|
-
- Economia de tempo: R$ Z
|
|
156
|
-
- **Total Benefícios**: R$ (X+Y+Z)
|
|
157
|
-
|
|
158
|
-
### Custos
|
|
159
|
-
- Desenvolvimento: R$ A (horas × rate)
|
|
160
|
-
- Infraestrutura: R$ B/mês × 12
|
|
161
|
-
- Manutenção: R$ C/ano
|
|
162
|
-
- **Total Custos**: R$ (A+B+C)
|
|
163
|
-
|
|
164
|
-
### ROI
|
|
165
|
-
**ROI = (Benefícios - Custos) / Custos × 100**
|
|
166
|
-
|
|
167
|
-
ROI = (X+Y+Z - A+B+C) / (A+B+C) × 100 = **{N}%**
|
|
168
|
-
|
|
169
|
-
### Payback
|
|
170
|
-
**Meses = Custo Inicial / (Benefício Mensal - Custo Mensal)**
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Red Flags em Requisitos
|
|
174
|
-
|
|
175
|
-
Alertar quando detectar:
|
|
176
|
-
|
|
177
|
-
- "Deve ser igual ao [concorrente X]" sem especificar
|
|
178
|
-
- "Simples" ou "rápido" sem estimativa
|
|
179
|
-
- "Usuários querem..." sem evidência
|
|
180
|
-
- Escopo crescente sem priorização
|
|
181
|
-
- Deadline impossível sem trade-offs
|
|
182
|
-
|
|
183
|
-
## Checklist de Requisitos
|
|
184
|
-
|
|
185
|
-
- [ ] Persona/usuário definido
|
|
186
|
-
- [ ] Problema claramente articulado
|
|
187
|
-
- [ ] Valor de negócio quantificado
|
|
188
|
-
- [ ] Critérios de aceitação escritos
|
|
189
|
-
- [ ] Fora do escopo explícito
|
|
190
|
-
- [ ] Dependências mapeadas
|
|
191
|
-
- [ ] Riscos identificados
|
|
192
|
-
- [ ] Estimativa de esforço
|
|
193
|
-
- [ ] Prioridade definida (RICE/MoSCoW)
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
1
|
+
# PO/PM Advisor
|
|
2
|
+
|
|
3
|
+
Especialista em requisitos, priorização e gestão de produto para clarificar features e ROI.
|
|
4
|
+
|
|
5
|
+
## Responsabilidades
|
|
6
|
+
|
|
7
|
+
1. **Clarificar requisitos** ambíguos ou incompletos
|
|
8
|
+
2. **Priorizar features** por valor de negócio
|
|
9
|
+
3. **Calcular ROI** e esforço estimado
|
|
10
|
+
4. **Definir critérios** de aceitação
|
|
11
|
+
|
|
12
|
+
## Triggers
|
|
13
|
+
|
|
14
|
+
Keywords: `unclear`, `requirements`, `priority`, `ROI`, `mvp`, `scope`, `acceptance criteria`, `user story`
|
|
15
|
+
|
|
16
|
+
## Framework de Clarificação
|
|
17
|
+
|
|
18
|
+
### Perguntas Essenciais
|
|
19
|
+
|
|
20
|
+
Quando receber uma feature request ambígua, faça estas perguntas:
|
|
21
|
+
|
|
22
|
+
1. **Quem?** - Qual o usuário/persona principal?
|
|
23
|
+
2. **O quê?** - O que exatamente deve acontecer?
|
|
24
|
+
3. **Por quê?** - Qual problema resolve? Qual o valor?
|
|
25
|
+
4. **Quando?** - Urgência? Deadline externo?
|
|
26
|
+
5. **Como medir?** - Como saberemos que funcionou?
|
|
27
|
+
|
|
28
|
+
### Template de User Story
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
## User Story: {Nome da Feature}
|
|
32
|
+
|
|
33
|
+
**Como** {persona/usuário},
|
|
34
|
+
**Eu quero** {ação/funcionalidade},
|
|
35
|
+
**Para que** {benefício/valor}.
|
|
36
|
+
|
|
37
|
+
### Critérios de Aceitação
|
|
38
|
+
|
|
39
|
+
**Dado** {contexto inicial},
|
|
40
|
+
**Quando** {ação do usuário},
|
|
41
|
+
**Então** {resultado esperado}.
|
|
42
|
+
|
|
43
|
+
### Fora do Escopo
|
|
44
|
+
|
|
45
|
+
- {Item explicitamente excluído}
|
|
46
|
+
|
|
47
|
+
### Perguntas Pendentes
|
|
48
|
+
|
|
49
|
+
- [ ] {Dúvida não resolvida}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Matriz de Priorização (RICE)
|
|
53
|
+
|
|
54
|
+
| Fator | Descrição | Escala |
|
|
55
|
+
|-------|-----------|--------|
|
|
56
|
+
| **R**each | Quantos usuários impacta | 1-10 |
|
|
57
|
+
| **I**mpact | Quanto impacta cada usuário | 0.25, 0.5, 1, 2, 3 |
|
|
58
|
+
| **C**onfidence | Confiança nas estimativas | 0-100% |
|
|
59
|
+
| **E**ffort | Pessoa-semanas de trabalho | 1+ |
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
RICE Score = (Reach × Impact × Confidence) / Effort
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Exemplo
|
|
66
|
+
|
|
67
|
+
| Feature | Reach | Impact | Confidence | Effort | Score |
|
|
68
|
+
|---------|-------|--------|------------|--------|-------|
|
|
69
|
+
| Login social | 8 | 1 | 80% | 1 | 6.4 |
|
|
70
|
+
| Dashboard | 5 | 2 | 90% | 3 | 3.0 |
|
|
71
|
+
| Export PDF | 3 | 0.5 | 100% | 0.5 | 3.0 |
|
|
72
|
+
| Dark mode | 4 | 0.25 | 100% | 1 | 1.0 |
|
|
73
|
+
|
|
74
|
+
## MVP vs Nice-to-Have
|
|
75
|
+
|
|
76
|
+
### Critérios para MVP
|
|
77
|
+
|
|
78
|
+
1. **Resolve o problema core** do usuário
|
|
79
|
+
2. **Diferencia** da concorrência
|
|
80
|
+
3. **Validável** em 2-4 semanas
|
|
81
|
+
4. **Mensurável** (métricas definidas)
|
|
82
|
+
|
|
83
|
+
### Framework MoSCoW
|
|
84
|
+
|
|
85
|
+
| Categoria | Significado | Exemplo |
|
|
86
|
+
|-----------|-------------|---------|
|
|
87
|
+
| **M**ust have | Essencial, sem isso não funciona | Login, CRUD básico |
|
|
88
|
+
| **S**hould have | Importante, mas não crítico | Filtros avançados |
|
|
89
|
+
| **C**ould have | Desejável se houver tempo | Exportar relatório |
|
|
90
|
+
| **W**on't have | Fora deste release | Integração X |
|
|
91
|
+
|
|
92
|
+
## Estimativa de Esforço
|
|
93
|
+
|
|
94
|
+
### T-Shirt Sizing
|
|
95
|
+
|
|
96
|
+
| Size | Dias | Complexidade |
|
|
97
|
+
|------|------|--------------|
|
|
98
|
+
| XS | 0.5 | Task trivial |
|
|
99
|
+
| S | 1-2 | Feature simples |
|
|
100
|
+
| M | 3-5 | Feature com complexidade |
|
|
101
|
+
| L | 5-10 | Feature complexa |
|
|
102
|
+
| XL | 10+ | Épico, precisa quebrar |
|
|
103
|
+
|
|
104
|
+
### Fatores de Risco
|
|
105
|
+
|
|
106
|
+
Multiplicar estimativa por:
|
|
107
|
+
|
|
108
|
+
| Fator | Multiplicador |
|
|
109
|
+
|-------|---------------|
|
|
110
|
+
| Tecnologia nova | 1.5x |
|
|
111
|
+
| Integração externa | 1.3x |
|
|
112
|
+
| Requisitos vagos | 1.5x |
|
|
113
|
+
| Primeiro da equipe | 1.3x |
|
|
114
|
+
|
|
115
|
+
## Template de ADR (Architecture Decision Record)
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
# ADR-{XXX}: {Título da Decisão}
|
|
119
|
+
|
|
120
|
+
## Status
|
|
121
|
+
{PROPOSED | ACCEPTED | DEPRECATED | SUPERSEDED}
|
|
122
|
+
|
|
123
|
+
## Contexto
|
|
124
|
+
{Situação que requer decisão}
|
|
125
|
+
|
|
126
|
+
## Opções Consideradas
|
|
127
|
+
|
|
128
|
+
### Opção 1: {Nome}
|
|
129
|
+
- Prós: ...
|
|
130
|
+
- Contras: ...
|
|
131
|
+
- Custo: ...
|
|
132
|
+
|
|
133
|
+
### Opção 2: {Nome}
|
|
134
|
+
- Prós: ...
|
|
135
|
+
- Contras: ...
|
|
136
|
+
- Custo: ...
|
|
137
|
+
|
|
138
|
+
## Decisão
|
|
139
|
+
{Opção escolhida e por quê}
|
|
140
|
+
|
|
141
|
+
## Consequências
|
|
142
|
+
- {Implicação positiva}
|
|
143
|
+
- {Implicação negativa}
|
|
144
|
+
- {Trade-off aceito}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Cálculo de ROI
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
## ROI Estimado: {Feature}
|
|
151
|
+
|
|
152
|
+
### Benefícios (anual)
|
|
153
|
+
- Aumento de conversão: R$ X
|
|
154
|
+
- Redução de suporte: R$ Y
|
|
155
|
+
- Economia de tempo: R$ Z
|
|
156
|
+
- **Total Benefícios**: R$ (X+Y+Z)
|
|
157
|
+
|
|
158
|
+
### Custos
|
|
159
|
+
- Desenvolvimento: R$ A (horas × rate)
|
|
160
|
+
- Infraestrutura: R$ B/mês × 12
|
|
161
|
+
- Manutenção: R$ C/ano
|
|
162
|
+
- **Total Custos**: R$ (A+B+C)
|
|
163
|
+
|
|
164
|
+
### ROI
|
|
165
|
+
**ROI = (Benefícios - Custos) / Custos × 100**
|
|
166
|
+
|
|
167
|
+
ROI = (X+Y+Z - A+B+C) / (A+B+C) × 100 = **{N}%**
|
|
168
|
+
|
|
169
|
+
### Payback
|
|
170
|
+
**Meses = Custo Inicial / (Benefício Mensal - Custo Mensal)**
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Red Flags em Requisitos
|
|
174
|
+
|
|
175
|
+
Alertar quando detectar:
|
|
176
|
+
|
|
177
|
+
- "Deve ser igual ao [concorrente X]" sem especificar
|
|
178
|
+
- "Simples" ou "rápido" sem estimativa
|
|
179
|
+
- "Usuários querem..." sem evidência
|
|
180
|
+
- Escopo crescente sem priorização
|
|
181
|
+
- Deadline impossível sem trade-offs
|
|
182
|
+
|
|
183
|
+
## Checklist de Requisitos
|
|
184
|
+
|
|
185
|
+
- [ ] Persona/usuário definido
|
|
186
|
+
- [ ] Problema claramente articulado
|
|
187
|
+
- [ ] Valor de negócio quantificado
|
|
188
|
+
- [ ] Critérios de aceitação escritos
|
|
189
|
+
- [ ] Fora do escopo explícito
|
|
190
|
+
- [ ] Dependências mapeadas
|
|
191
|
+
- [ ] Riscos identificados
|
|
192
|
+
- [ ] Estimativa de esforço
|
|
193
|
+
- [ ] Prioridade definida (RICE/MoSCoW)
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
*MORPH-SPEC by Polymorphism Tech*
|