@polymorphism-tech/morph-spec 4.2.0 → 4.3.1

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.
Files changed (140) hide show
  1. package/CLAUDE.md +108 -946
  2. package/bin/morph-spec.js +284 -9
  3. package/bin/task-manager.cjs +102 -14
  4. package/bin/validate.js +4 -4
  5. package/docs/{v3.0 → next-generation}/AGENTS.md +1 -1
  6. package/docs/next-generation/CONTEXT-OPTIMIZATION.md +267 -0
  7. package/docs/next-generation/EXECUTION-FLOW.md +274 -0
  8. package/docs/next-generation/META-PROMPTS.md +235 -0
  9. package/docs/next-generation/MIGRATION-GUIDE.md +253 -0
  10. package/docs/next-generation/THREAD-MANAGEMENT.md +240 -0
  11. package/package.json +5 -5
  12. package/src/commands/agents/agents-fuse.js +97 -0
  13. package/src/commands/agents/micro-agent.js +112 -0
  14. package/src/commands/agents/spawn-team.js +69 -4
  15. package/src/commands/agents/squad-template.js +146 -0
  16. package/src/commands/analytics/analytics.js +176 -0
  17. package/src/commands/context/context-prime.js +63 -0
  18. package/src/commands/context/core-four.js +54 -0
  19. package/src/commands/mcp/mcp.js +102 -0
  20. package/src/commands/project/detect-agents.js +32 -2
  21. package/src/commands/project/detect.js +11 -1
  22. package/src/commands/project/doctor.js +573 -356
  23. package/src/commands/project/init.js +9 -2
  24. package/src/commands/project/update.js +13 -3
  25. package/src/commands/state/advance-phase.js +448 -416
  26. package/src/commands/state/state.js +14 -12
  27. package/src/commands/tasks/task.js +1 -1
  28. package/src/commands/templates/template-render.js +80 -1
  29. package/src/commands/threads/thread-template.js +103 -0
  30. package/src/commands/threads/threads.js +261 -0
  31. package/src/commands/trust/trust.js +205 -0
  32. package/src/{orchestrator.js → core/orchestrator.js} +8 -8
  33. package/src/core/state/state-manager.js +37 -17
  34. package/src/core/workflows/workflow-detector.js +114 -3
  35. package/src/lib/agents/micro-agent-factory.js +161 -0
  36. package/src/lib/analytics/analytics-engine.js +345 -0
  37. package/src/lib/checkpoints/checkpoint-hooks.js +298 -258
  38. package/src/lib/context/context-bundler.js +240 -0
  39. package/src/lib/context/context-optimizer.js +212 -0
  40. package/src/lib/context/context-tracker.js +273 -0
  41. package/src/lib/context/core-four-tracker.js +201 -0
  42. package/src/lib/context/mcp-optimizer.js +200 -0
  43. package/src/lib/detectors/index.js +1 -1
  44. package/src/lib/detectors/standards-generator.js +77 -17
  45. package/src/lib/detectors/structure-detector.js +67 -39
  46. package/src/lib/execution/fusion-executor.js +304 -0
  47. package/src/lib/execution/parallel-executor.js +270 -0
  48. package/src/lib/generators/context-generator.js +3 -3
  49. package/src/lib/generators/recap-generator.js +32 -12
  50. package/src/lib/hooks/hook-executor.js +169 -0
  51. package/src/lib/hooks/stop-hook-executor.js +286 -0
  52. package/src/lib/hops/hop-composer.js +221 -0
  53. package/src/lib/threads/thread-coordinator.js +238 -0
  54. package/src/lib/threads/thread-manager.js +317 -0
  55. package/src/lib/tracking/artifact-trail.js +202 -0
  56. package/src/lib/trust/trust-manager.js +269 -0
  57. package/src/lib/validators/design-system/design-system-validator.js +2 -2
  58. package/src/lib/validators/validation-runner.js +14 -30
  59. package/src/utils/hooks-installer.js +69 -0
  60. package/stacks/blazor-azure/.morph/config/agents.json +72 -3
  61. package/stacks/nextjs-supabase/.morph/config/agents.json +3 -3
  62. package/docs/llm-interaction-config.md +0 -735
  63. package/docs/v3.0/EXECUTION-FLOW.md +0 -1304
  64. package/src/commands/utils/migrate-state.js +0 -158
  65. package/src/commands/utils/upgrade.js +0 -346
  66. package/src/lib/validators/architecture-validator.js +0 -60
  67. package/src/lib/validators/content-validator.js +0 -164
  68. package/src/lib/validators/package-validator.js +0 -61
  69. package/src/lib/validators/ui-contrast-validator.js +0 -44
  70. package/stacks/blazor-azure/.claude/commands/morph-apply.md +0 -221
  71. package/stacks/blazor-azure/.claude/commands/morph-archive.md +0 -79
  72. package/stacks/blazor-azure/.claude/commands/morph-deploy.md +0 -529
  73. package/stacks/blazor-azure/.claude/commands/morph-infra.md +0 -209
  74. package/stacks/blazor-azure/.claude/commands/morph-preflight.md +0 -227
  75. package/stacks/blazor-azure/.claude/commands/morph-proposal.md +0 -122
  76. package/stacks/blazor-azure/.claude/commands/morph-status.md +0 -86
  77. package/stacks/blazor-azure/.claude/commands/morph-troubleshoot.md +0 -122
  78. package/stacks/blazor-azure/.claude/skills/level-0-meta/README.md +0 -7
  79. package/stacks/blazor-azure/.claude/skills/level-0-meta/code-review.md +0 -226
  80. package/stacks/blazor-azure/.claude/skills/level-0-meta/morph-checklist.md +0 -117
  81. package/stacks/blazor-azure/.claude/skills/level-0-meta/simulation-checklist.md +0 -77
  82. package/stacks/blazor-azure/.claude/skills/level-1-workflows/README.md +0 -7
  83. package/stacks/blazor-azure/.claude/skills/level-1-workflows/morph-replicate.md +0 -213
  84. package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-clarify.md +0 -131
  85. package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-design.md +0 -213
  86. package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-setup.md +0 -106
  87. package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-tasks.md +0 -164
  88. package/stacks/blazor-azure/.claude/skills/level-1-workflows/phase-uiux.md +0 -169
  89. package/stacks/blazor-azure/.claude/skills/level-2-domains/README.md +0 -14
  90. package/stacks/blazor-azure/.claude/skills/level-2-domains/ai-agents/ai-system-architect.md +0 -192
  91. package/stacks/blazor-azure/.claude/skills/level-2-domains/architecture/po-pm-advisor.md +0 -197
  92. package/stacks/blazor-azure/.claude/skills/level-2-domains/architecture/prompt-engineer.md +0 -189
  93. package/stacks/blazor-azure/.claude/skills/level-2-domains/architecture/seo-growth-hacker.md +0 -320
  94. package/stacks/blazor-azure/.claude/skills/level-2-domains/architecture/standards-architect.md +0 -156
  95. package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/api-designer.md +0 -59
  96. package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/dotnet-senior.md +0 -77
  97. package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/ef-modeler.md +0 -58
  98. package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/hangfire-orchestrator.md +0 -126
  99. package/stacks/blazor-azure/.claude/skills/level-2-domains/backend/ms-agent-expert.md +0 -45
  100. package/stacks/blazor-azure/.claude/skills/level-2-domains/frontend/blazor-builder.md +0 -210
  101. package/stacks/blazor-azure/.claude/skills/level-2-domains/frontend/nextjs-expert.md +0 -154
  102. package/stacks/blazor-azure/.claude/skills/level-2-domains/frontend/ui-ux-designer.md +0 -191
  103. package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/azure-architect.md +0 -142
  104. package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/azure-deploy-specialist.md +0 -699
  105. package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/bicep-architect.md +0 -126
  106. package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/container-specialist.md +0 -131
  107. package/stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure/devops-engineer.md +0 -119
  108. package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/asaas-financial.md +0 -130
  109. package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/azure-identity.md +0 -142
  110. package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/clerk-auth.md +0 -108
  111. package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/hangfire-orchestrator.md +0 -64
  112. package/stacks/blazor-azure/.claude/skills/level-2-domains/integrations/resend-email.md +0 -119
  113. package/stacks/blazor-azure/.claude/skills/level-2-domains/quality/code-analyzer.md +0 -235
  114. package/stacks/blazor-azure/.claude/skills/level-2-domains/quality/testing-specialist.md +0 -126
  115. package/stacks/blazor-azure/.claude/skills/level-3-technologies/README.md +0 -7
  116. package/stacks/blazor-azure/.claude/skills/level-4-patterns/README.md +0 -7
  117. package/stacks/blazor-azure/.morph/archive/.gitkeep +0 -25
  118. package/stacks/blazor-azure/.morph/features/.gitkeep +0 -25
  119. package/stacks/blazor-azure/.morph/schemas/agent.schema.json +0 -296
  120. package/stacks/blazor-azure/.morph/schemas/tasks.schema.json +0 -220
  121. package/stacks/blazor-azure/.morph/specs/.gitkeep +0 -20
  122. package/stacks/blazor-azure/.morph/test-infra/example.bicep +0 -59
  123. package/stacks/nextjs-supabase/.claude/commands/morph-apply.md +0 -221
  124. package/stacks/nextjs-supabase/.claude/commands/morph-archive.md +0 -79
  125. package/stacks/nextjs-supabase/.claude/commands/morph-deploy.md +0 -529
  126. package/stacks/nextjs-supabase/.claude/commands/morph-infra.md +0 -209
  127. package/stacks/nextjs-supabase/.claude/commands/morph-preflight.md +0 -227
  128. package/stacks/nextjs-supabase/.claude/commands/morph-proposal.md +0 -122
  129. package/stacks/nextjs-supabase/.claude/commands/morph-status.md +0 -86
  130. package/stacks/nextjs-supabase/.claude/commands/morph-troubleshoot.md +0 -122
  131. package/stacks/nextjs-supabase/.claude/settings.local.json +0 -6
  132. package/stacks/nextjs-supabase/.claude/skills/level-2-domains/backend/dotnet-supabase.md +0 -244
  133. package/stacks/nextjs-supabase/.claude/skills/level-2-domains/frontend/nextjs-supabase.md +0 -335
  134. package/stacks/nextjs-supabase/.claude/skills/level-2-domains/infrastructure/easypanel-deployer.md +0 -189
  135. package/stacks/nextjs-supabase/.claude/skills/level-2-domains/integrations/supabase-expert.md +0 -50
  136. /package/docs/{v3.0 → next-generation}/ANALYSIS.md +0 -0
  137. /package/docs/{v3.0 → next-generation}/ARCHITECTURE.md +0 -0
  138. /package/docs/{v3.0 → next-generation}/FEATURES.md +0 -0
  139. /package/docs/{v3.0 → next-generation}/README.md +0 -0
  140. /package/docs/{v3.0 → next-generation}/ROADMAP.md +0 -0
@@ -1,154 +0,0 @@
1
- # .NET + Next.js Stack
2
-
3
- > **Layer:** 2 | **Load:** on-keyword | **Keywords:** nextjs, next.js, react, api, frontend, spa, typescript
4
-
5
- | Aspect | Technology |
6
- |--------|------------|
7
- | **Backend** | .NET 10 Web API / C# 14 |
8
- | **Frontend** | Next.js 15+ / React 19 |
9
- | **Database** | EF Core 10 + Azure SQL |
10
- | **API** | REST + OpenAPI |
11
- | **Hosting** | Azure Container Apps |
12
-
13
- ## Project Structure
14
-
15
- ```
16
- /
17
- ├── backend/
18
- │ ├── src/{Api,Application,Domain,Infrastructure}/
19
- │ ├── tests/
20
- │ └── Backend.sln
21
- ├── frontend/
22
- │ ├── src/{app,components,lib,hooks}/
23
- │ ├── package.json
24
- │ └── next.config.js
25
- ├── docker-compose.yml
26
- └── infra/main.bicep
27
- ```
28
-
29
- ---
30
-
31
- ## Backend (.NET Minimal API)
32
-
33
- ```csharp
34
- // Program.cs
35
- var builder = WebApplication.CreateBuilder(args);
36
- builder.Services.AddEndpointsApiExplorer();
37
- builder.Services.AddSwaggerGen();
38
- builder.Services.AddCors(o => o.AddPolicy("Frontend", p =>
39
- p.WithOrigins(builder.Configuration["Frontend:Url"]!)
40
- .AllowAnyHeader().AllowAnyMethod().AllowCredentials()));
41
- builder.Services.AddDbContext<AppDbContext>(o => o.UseSqlServer(connString));
42
-
43
- var app = builder.Build();
44
- if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); }
45
- app.UseCors("Frontend");
46
- app.UseAuthentication();
47
- app.UseAuthorization();
48
- app.MapOrderEndpoints();
49
- app.Run();
50
- ```
51
-
52
- ### Minimal API Endpoints
53
-
54
- ```csharp
55
- public static class OrderEndpoints
56
- {
57
- public static void MapOrderEndpoints(this WebApplication app)
58
- {
59
- var group = app.MapGroup("/api/orders").WithTags("Orders").RequireAuthorization();
60
- group.MapGet("/", GetAll);
61
- group.MapGet("/{id:int}", GetById);
62
- group.MapPost("/", Create);
63
- group.MapPut("/{id:int}", Update);
64
- group.MapDelete("/{id:int}", Delete);
65
- }
66
- // Each handler: inject IService + params → return Results.Ok/NotFound/Created/NoContent
67
- }
68
- ```
69
-
70
- ---
71
-
72
- ## Frontend (Next.js)
73
-
74
- ### API Client
75
-
76
- ```typescript
77
- const API_URL = process.env.NEXT_PUBLIC_API_URL!;
78
-
79
- async function fetchApi<T>(endpoint: string, options?: RequestInit): Promise<T> {
80
- const res = await fetch(`${API_URL}${endpoint}`, {
81
- ...options,
82
- headers: { 'Content-Type': 'application/json', ...options?.headers },
83
- credentials: 'include',
84
- });
85
- if (!res.ok) throw new Error(`API error: ${res.status}`);
86
- return res.json();
87
- }
88
-
89
- export const api = {
90
- orders: {
91
- getAll: (params?) => fetchApi<PaginatedResult<Order>>(`/api/orders?${new URLSearchParams(params)}`),
92
- getById: (id: number) => fetchApi<Order>(`/api/orders/${id}`),
93
- create: (data) => fetchApi<Order>('/api/orders', { method: 'POST', body: JSON.stringify(data) }),
94
- },
95
- };
96
- ```
97
-
98
- ### Types (generated from OpenAPI)
99
-
100
- ```typescript
101
- export interface Order { id: number; orderNumber: string; total: number; status: OrderStatus; }
102
- export type OrderStatus = 'Pending' | 'Processing' | 'Completed' | 'Cancelled';
103
- export interface PaginatedResult<T> { items: T[]; totalCount: number; page: number; totalPages: number; }
104
- ```
105
-
106
- ### Server Component (App Router)
107
- ```tsx
108
- export default async function OrdersPage() {
109
- const orders = await api.orders.getAll();
110
- return <OrderList initialOrders={orders} />;
111
- }
112
- ```
113
-
114
- ### Client Component
115
- ```tsx
116
- 'use client';
117
- // Use useState + api calls for client-side pagination/interaction
118
- ```
119
-
120
- ---
121
-
122
- ## Docker Compose
123
-
124
- ```yaml
125
- services:
126
- backend:
127
- build: { context: ./backend }
128
- ports: ["5000:8080"]
129
- environment:
130
- - ConnectionStrings__Default=Server=db;Database=App;User=sa;Password=Pass!;TrustServerCertificate=true
131
- - Frontend__Url=http://localhost:3000
132
- frontend:
133
- build: { context: ./frontend }
134
- ports: ["3000:3000"]
135
- environment: [NEXT_PUBLIC_API_URL=http://localhost:5000]
136
- db:
137
- image: mcr.microsoft.com/mssql/server:2022-latest
138
- environment: [ACCEPT_EULA=Y, SA_PASSWORD=YourStrong!Passw0rd]
139
- ports: ["1433:1433"]
140
- ```
141
-
142
- ## Checklist
143
- - [ ] Backend with Minimal APIs
144
- - [ ] OpenAPI/Swagger configured
145
- - [ ] CORS configured for frontend
146
- - [ ] Frontend with App Router (Next.js 15+)
147
- - [ ] API client typed
148
- - [ ] Types generated from OpenAPI
149
- - [ ] Docker Compose for dev
150
- - [ ] Environment variables configured
151
-
152
- ---
153
-
154
- *MORPH-SPEC by Polymorphism Tech*
@@ -1,191 +0,0 @@
1
- # UI/UX Designer
2
-
3
- Especialista em design de interfaces, UX e componentes Blazor. Domina **Fluent UI Blazor** e **MudBlazor**.
4
-
5
- > **FASE 1.5: UI/UX DESIGN** - Obrigatória para features com front-end.
6
- > Gera wireframes, specs de componentes e fluxos ANTES do design técnico.
7
- > **Ref:** `framework/standards/fluent-ui-blazor.md` para API details e armadilhas.
8
-
9
- ## Triggers
10
-
11
- Keywords: `blazor`, `component`, `page`, `ui`, `ux`, `design`, `layout`, `wizard`, `dashboard`, `form`, `chart`, `table`, `dialog`, `modal`, `tela`, `interface`, `formulário`
12
-
13
- ---
14
-
15
- ## Design Moderno (2025+)
16
-
17
- ### Visual Trends
18
- - **Glassmorphism**: `backdrop-filter: blur(10px)`, semi-transparent backgrounds
19
- - **Gradients**: Purple (#667eea → #764ba2), Blue-Purple (#4facfe → #00f2fe)
20
- - **Soft Shadows**: `box-shadow: 0 4px 6px rgba(0,0,0,0.1)`
21
- - **Rounded Corners**: `border-radius: 12px-16px`
22
- - **Micro-interactions**: Hover effects, transitions (transform, scale, opacity)
23
-
24
- ### Component Patterns
25
- - Cards with elevation + hover lift
26
- - Skeleton loaders (not just spinners)
27
- - Toast notifications (bottom-right, auto-dismiss)
28
- - Empty states with illustration + CTA
29
- - Dark mode support (always design for both)
30
-
31
- ### Layout Principles
32
- - Whitespace: 32px-48px container padding
33
- - Grid: 12-column, gap 24px-32px
34
- - Typography: xs:12, sm:14, base:16, lg:18, xl:20, 2xl:24
35
- - Contrast: WCAG AA (4.5:1 text, 3:1 UI)
36
-
37
- ### Design References
38
- Linear (linear.app), Vercel (vercel.com), Stripe (stripe.com), Dribbble dashboards
39
-
40
- ---
41
-
42
- ## FASE 1.5 Workflow
43
-
44
- ### Step 1: Collect User Input (ALWAYS ask first)
45
-
46
- 1. Layout ideas or reference sites?
47
- 2. Visual references (screenshots, mockups)?
48
- 3. User flow expectations?
49
- 4. Design system defined (colors, fonts, spacing)?
50
- 5. Image examples to analyze?
51
-
52
- If user provides screenshots → Read tool → extract patterns (layout, components, colors).
53
- If HTML prototype exists → extract patterns automatically, skip wireframes, map HTML → Blazor.
54
-
55
- ### Step 2: Generate Deliverables
56
-
57
- | File | Content |
58
- |------|---------|
59
- | `ui-design-system.md` | Colors, typography, spacing |
60
- | `ui-mockups.md` | ASCII wireframes + descriptions per screen |
61
- | `ui-components.md` | Component specs (library-agnostic first, library choice in FASE 2) |
62
- | `ui-flows.md` | User flow diagrams + edge cases |
63
-
64
- **Important:** Generate specs AGNOSTIC of UI library. Use generic names ("primary button", "card", "table"). Library choice happens in FASE 2: DESIGN.
65
-
66
- ### Step 3: Present for Approval
67
-
68
- Show deliverable summary → **⛔ PAUSE** with 3 options (approve / adjust wireframes / add flows).
69
-
70
- ---
71
-
72
- ## Fluent UI vs MudBlazor Decision Matrix
73
-
74
- | Criterion | Fluent UI Blazor | MudBlazor |
75
- |-----------|------------------|-----------|
76
- | AI-first projects | Ideal (native components) | Requires customization |
77
- | Performance | ~200KB | ~500KB |
78
- | Microsoft Stack | Perfect integration | Works well |
79
- | Complex components | Limited | Very complete |
80
- | Community | Smaller (newer) | Larger |
81
- | Maturity | v4.0 (recent) | v6.x (stable) |
82
-
83
- **Use Fluent UI if:** AI-first, Microsoft stack, modern M365 design, performance critical.
84
- **Use MudBlazor if:** Complex dashboards, Material Design, need TreeView/advanced DataGrid, larger community.
85
- **Hybrid:** Fluent UI (base) + MudBlazor (specific complex components).
86
-
87
- ---
88
-
89
- ## Fluent UI Quick Reference
90
-
91
- > **Full details:** `framework/standards/fluent-ui-blazor.md`
92
-
93
- ### Common Pitfalls
94
-
95
- | Issue | Wrong | Correct |
96
- |-------|-------|---------|
97
- | Icon sizes | `Size16`, `Size14` | `Size20`, `Size24`, `Size28`, `Size32`, `Size48` |
98
- | Icon namespace | `@using ...Icons` | `@using Icons = Microsoft.FluentUI.AspNetCore.Components.Icons` |
99
- | Toast methods | `await ShowSuccessAsync()` | `ToastService.ShowSuccess()` (sync!) |
100
- | Dialog show | `await _dialog.ShowAsync()` | `_dialog.Show()` (sync!) |
101
- | Dialog close | `_dialog.Hide()` | `await _dialog.CloseAsync()` (async!) |
102
- | Dialog init | `<FluentDialog>` | `<FluentDialog Hidden="true">` (must hide initially!) |
103
-
104
- ### Key Components
105
-
106
- | Component | Use Case |
107
- |-----------|----------|
108
- | `FluentCard` + `FluentStack` | Containers, dashboards |
109
- | `FluentDataGrid` | Data tables with sorting |
110
- | `FluentWizard` | Multi-step flows |
111
- | `FluentDialog` | Modals, confirmations |
112
- | `FluentMessageBar` | Chat, notifications |
113
- | `FluentProgress` | Loading, streaming |
114
- | `FluentTextField` | Text inputs |
115
- | `FluentToast` | System feedback |
116
-
117
- ---
118
-
119
- ## MudBlazor Key Components
120
-
121
- | Component | Advantage over Fluent |
122
- |-----------|----------------------|
123
- | `MudDataGrid` | Grouping, advanced filtering |
124
- | `MudTreeView` | More complete hierarchies |
125
- | `MudChart` | Native charts (Fluent has none) |
126
- | `MudFileUpload` | More upload features |
127
- | `MudAutocomplete` | Better performance |
128
-
129
- ---
130
-
131
- ## Design System Defaults
132
-
133
- ```css
134
- /* Colors */
135
- --primary: #3b82f6; --secondary: #6b7280;
136
- --success: #10b981; --warning: #f59e0b;
137
- --danger: #ef4444; --info: #06b6d4;
138
-
139
- /* Spacing (4px system) */
140
- --space-1: 0.25rem; --space-2: 0.5rem; --space-4: 1rem;
141
- --space-6: 1.5rem; --space-8: 2rem;
142
- ```
143
-
144
- ---
145
-
146
- ## Generating Deliverables
147
-
148
- ### ui-mockups.md Structure
149
-
150
- Per screen: ASCII wireframe + description (purpose, components, interactions, states) + responsiveness (desktop/mobile).
151
-
152
- ### ui-components.md Structure
153
-
154
- Per component: Library, component name, main props, events, states (default/loading/error/empty), accessibility (ARIA, keyboard).
155
-
156
- ### ui-flows.md Structure
157
-
158
- Per flow: Trigger, steps, happy path, edge cases, ASCII flowchart diagram.
159
-
160
- ---
161
-
162
- ## Accessibility (A11y)
163
-
164
- - Contrast: 4.5:1 text minimum (WCAG AA)
165
- - Focus visible: Outline on focusable elements
166
- - Labels: Every input with associated label
167
- - ARIA: Roles and labels where needed
168
- - Keyboard nav: Logical tab order
169
-
170
- ---
171
-
172
- ## Checklist
173
-
174
- ### FASE 1.5 Deliverables
175
- - [ ] `ui-mockups.md`: Wireframes for ALL screens + states (loading, error, empty) + responsiveness
176
- - [ ] `ui-components.md`: Library justified + all components mapped with props/events/states
177
- - [ ] `ui-flows.md`: Happy paths + edge cases + ASCII diagrams
178
- - [ ] `decisions.md`: Updated with UI library ADR
179
-
180
- ### UI Quality
181
- - [ ] Visual hierarchy clear
182
- - [ ] Consistent spacing (4px multiples)
183
- - [ ] Responsive (mobile-first)
184
- - [ ] States: hover, focus, disabled, error
185
- - [ ] Loading states (skeleton/spinner)
186
- - [ ] Empty states with CTA
187
- - [ ] WCAG AA accessibility
188
-
189
- ---
190
-
191
- *MORPH-SPEC by Polymorphism Tech*
@@ -1,142 +0,0 @@
1
- # Azure Architect
2
-
3
- Especialista em infraestrutura Azure com foco em Infrastructure as Code (Bicep).
4
-
5
- ## Responsabilidades
6
-
7
- 1. **Desenhar infraestrutura Azure** para projetos
8
- 2. **Criar templates Bicep** para provisionar recursos
9
- 3. **Estimar custos** antes de aprovar recursos
10
- 4. **Garantir zero portal** - tudo via código
11
-
12
- ## Triggers
13
-
14
- Ativado automaticamente em todo projeto MORPH-SPEC (Core Agent).
15
-
16
- Keywords: `azure`, `infrastructure`, `bicep`, `deploy`, `container apps`, `sql`, `storage`, `provision`
17
-
18
- ## Princípio: Zero Portal
19
-
20
- > **NUNCA** criar recursos Azure manualmente no portal. Tudo via Bicep.
21
-
22
- ## Estrutura IaC
23
-
24
- ```
25
- infra/
26
- ├── main.bicep # Entry point
27
- ├── parameters.dev.json # Ambiente dev
28
- ├── parameters.prod.json # Ambiente prod
29
- └── modules/
30
- ├── container-app.bicep # Container Apps
31
- ├── sql-database.bicep # Azure SQL
32
- ├── storage.bicep # Storage Account
33
- ├── key-vault.bicep # Key Vault
34
- ├── app-insights.bicep # Monitoring
35
- └── service-bus.bicep # Mensageria
36
- ```
37
-
38
- ## Template Bicep Base
39
-
40
- ```bicep
41
- // infra/main.bicep
42
- targetScope = 'resourceGroup'
43
-
44
- @description('Environment name')
45
- param environment string = 'dev'
46
-
47
- @description('Location for resources')
48
- param location string = resourceGroup().location
49
-
50
- @description('Application name')
51
- param appName string
52
-
53
- // Variables
54
- var resourcePrefix = '${appName}-${environment}'
55
-
56
- // Container App Environment
57
- module containerAppEnv 'modules/container-app-env.bicep' = {
58
- name: 'containerAppEnv'
59
- params: {
60
- name: '${resourcePrefix}-env'
61
- location: location
62
- }
63
- }
64
-
65
- // Container App
66
- module containerApp 'modules/container-app.bicep' = {
67
- name: 'containerApp'
68
- params: {
69
- name: resourcePrefix
70
- location: location
71
- environmentId: containerAppEnv.outputs.id
72
- }
73
- }
74
- ```
75
-
76
- ## Recursos Recomendados por Tier
77
-
78
- ### Free Tier (Sem aprovação)
79
-
80
- | Recurso | Config | Custo |
81
- |---------|--------|-------|
82
- | Azure SQL | Free 32GB | $0 |
83
- | Container Apps | Scale to zero | ~$0 |
84
- | Storage | LRS 5GB | ~$0 |
85
- | App Insights | Free tier | $0 |
86
-
87
- ### Basic Tier (Até $10/mês)
88
-
89
- | Recurso | Config | Custo |
90
- |---------|--------|-------|
91
- | Azure SQL | Basic DTU | ~$5 |
92
- | Service Bus | Basic | ~$0.05 |
93
- | Key Vault | Standard | ~$0.03 |
94
-
95
- ## Comandos de Deploy
96
-
97
- ```powershell
98
- # Criar resource group
99
- az group create --name rg-{app}-{env} --location brazilsouth
100
-
101
- # Deploy com Bicep
102
- az deployment group create \
103
- --resource-group rg-{app}-{env} \
104
- --template-file infra/main.bicep \
105
- --parameters @infra/parameters.{env}.json
106
-
107
- # Validar antes de deploy
108
- az deployment group what-if \
109
- --resource-group rg-{app}-{env} \
110
- --template-file infra/main.bicep \
111
- --parameters @infra/parameters.{env}.json
112
- ```
113
-
114
- ## Quando usar SDK .NET vs Bicep
115
-
116
- | Recurso | Abordagem | Motivo |
117
- |---------|-----------|--------|
118
- | SQL, Storage, Container Apps | Bicep | Infra estática, declarativa |
119
- | Azure AI, Fabric | SDK .NET | Recursos dinâmicos, runtime |
120
- | Secrets | Key Vault + Bicep | Segurança |
121
-
122
- ## Documentação de Referência
123
-
124
- - [Azure Bicep](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/)
125
- - [Container Apps](https://learn.microsoft.com/en-us/azure/container-apps/)
126
- - [Azure SQL](https://learn.microsoft.com/en-us/azure/azure-sql/)
127
- - [Azure SDK for .NET](https://learn.microsoft.com/en-us/dotnet/azure/)
128
- - [Pricing Calculator](https://azure.microsoft.com/en-us/pricing/calculator/)
129
-
130
- ## Checklist de Infraestrutura
131
-
132
- - [ ] Bicep válido (`az bicep build`)
133
- - [ ] Parâmetros para dev e prod
134
- - [ ] Custos estimados e documentados
135
- - [ ] Secrets no Key Vault (não hardcoded)
136
- - [ ] Logs configurados (App Insights)
137
- - [ ] Scale-to-zero onde possível
138
- - [ ] Naming convention consistente
139
-
140
- ---
141
-
142
- *MORPH-SPEC by Polymorphism Tech*