@polymorphism-tech/morph-spec 4.16.0 → 4.17.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.
Files changed (98) hide show
  1. package/README.md +2 -2
  2. package/bin/morph-spec.js +3 -0
  3. package/bin/task-manager.js +999 -962
  4. package/claude-plugin.json +1 -1
  5. package/docs/CHEATSHEET.md +1 -1
  6. package/docs/QUICKSTART.md +1 -1
  7. package/framework/agents/ai-agents/vector-search-expert.md +247 -233
  8. package/framework/agents/backend/ms-agent-expert.md +1 -1
  9. package/framework/agents/backend/neon-expert.md +397 -0
  10. package/framework/agents/frontend/gsap-animator.md +131 -0
  11. package/framework/agents.json +1175 -1085
  12. package/framework/commands/morph-preflight.md +200 -192
  13. package/framework/hooks/claude-code/session-start/inject-morph-context.js +1 -1
  14. package/framework/rules/gsap-standards.md +13 -0
  15. package/framework/rules/neon-standards.md +25 -0
  16. package/framework/skills/level-0-meta/mcp-registry.json +1 -1
  17. package/framework/skills/level-0-meta/morph-agent-teams/SKILL.md +472 -472
  18. package/framework/skills/level-0-meta/morph-init/SKILL.md +11 -11
  19. package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +5 -5
  20. package/framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md +5 -5
  21. package/framework/skills/level-0-meta/morph-tool-usage-guide/references/tools-per-phase.md +7 -7
  22. package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +24 -24
  23. package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +12 -12
  24. package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +9 -9
  25. package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +1 -1
  26. package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +1 -1
  27. package/framework/skills/level-1-workflows/morph-phase-tasks/references/task-planning-patterns.md +143 -143
  28. package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +1 -1
  29. package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +1 -1
  30. package/framework/standards/STANDARDS.json +184 -107
  31. package/framework/standards/ai-agents/production.md +1 -0
  32. package/framework/standards/ai-agents/setup.md +3 -2
  33. package/framework/standards/ai-agents/workflows.md +1 -0
  34. package/framework/standards/architecture/vertical-slice/vertical-slice.md +4 -4
  35. package/framework/standards/backend/database/postgresql/database.md +58 -78
  36. package/framework/standards/backend/dotnet/scalar-ui.md +172 -172
  37. package/framework/standards/backend/dotnet/vsa-handler-patterns.md +274 -274
  38. package/framework/standards/backend/integrations/asaas/asaas-api.md +1 -1
  39. package/framework/standards/backend/integrations/clerk/clerk-auth.md +23 -21
  40. package/framework/standards/frontend/design-system/animations.md +9 -0
  41. package/framework/standards/frontend/gsap/gsap-core.md +463 -0
  42. package/framework/standards/frontend/gsap/gsap-plugins.md +294 -0
  43. package/framework/standards/frontend/gsap/gsap-scrolltrigger.md +318 -0
  44. package/framework/standards/frontend/nextjs/motion-patterns.md +1 -0
  45. package/framework/standards/frontend/nextjs/nextjs-patterns.md +47 -37
  46. package/framework/standards/infrastructure/docker/easypanel-deploy.md +4 -8
  47. package/framework/standards/infrastructure/neon/neon-pgrag.md +239 -0
  48. package/framework/standards/infrastructure/neon/neon-pgvector.md +236 -0
  49. package/framework/standards/infrastructure/neon/neon-semantic-kernel.md +310 -0
  50. package/framework/standards/infrastructure/neon/neon-setup.md +186 -0
  51. package/framework/standards/integration/mcp/mcp-tools.md +32 -34
  52. package/framework/templates/README.md +18 -18
  53. package/framework/templates/REGISTRY.json +49 -96
  54. package/framework/templates/code/dotnet/abstractions/api-endpoint.cs +7 -7
  55. package/framework/templates/code/dotnet/backend/repository.cs +148 -148
  56. package/framework/templates/code/dotnet/contracts/contracts-vsa.cs +2 -2
  57. package/framework/templates/code/dotnet/database/vector-entity.cs +93 -0
  58. package/framework/templates/code/dotnet/feature/endpoint.cs.hbs +1 -1
  59. package/framework/templates/code/sql/{supabase-migration.sql → postgresql-migration.sql} +8 -17
  60. package/framework/templates/code/sql/{supabase-migration.template.sql → postgresql-migration.template.sql} +10 -13
  61. package/framework/templates/code/sql/{rls-policy.sql → postgresql-rls-policy.sql} +8 -8
  62. package/framework/templates/code/typescript/contracts.ts +167 -168
  63. package/framework/templates/context/CONTEXT.md +3 -3
  64. package/framework/templates/docs/proposal.md +6 -6
  65. package/framework/templates/docs/ui-components.md +1 -1
  66. package/framework/templates/feature/decisions.md +121 -121
  67. package/framework/templates/feature/recap.md +145 -145
  68. package/framework/templates/feature/tasks.md +199 -199
  69. package/framework/templates/frontend/nextjs/gsap-scroll-section.tsx.hbs +44 -0
  70. package/framework/templates/infrastructure/docker/docker-compose.template.yml +50 -67
  71. package/framework/templates/infrastructure/docker/dockerfile-api.dockerfile +38 -38
  72. package/framework/templates/infrastructure/docker/dockerfile-web.dockerfile +48 -48
  73. package/framework/templates/infrastructure/docker/easypanel.template.json +46 -54
  74. package/framework/templates/infrastructure/github/README.md +56 -56
  75. package/framework/templates/integrations/semantic-kernel-neon.cs +125 -0
  76. package/framework/workflows/README.md +1 -1
  77. package/framework/workflows/docs/full-morph.md +69 -69
  78. package/package.json +1 -1
  79. package/src/commands/agents/dispatch-agents.js +19 -15
  80. package/src/commands/state/advance-phase.js +5 -0
  81. package/src/commands/tasks/task.js +3 -0
  82. package/src/core/state/state-manager.js +45 -1
  83. package/src/core/templates/template-registry.js +1 -66
  84. package/src/lib/detectors/index.js +2 -2
  85. package/src/lib/generators/architecture-scanner.js +640 -640
  86. package/src/lib/installers/mcp-installer.js +1 -1
  87. package/src/lib/tasks/task-classifier.js +15 -1
  88. package/src/lib/tasks/test-runner.js +5 -1
  89. package/src/lib/validators/content/content-validator.js +9 -10
  90. package/src/lib/validators/validation-runner.js +7 -5
  91. package/framework/agents/backend/supabase-expert.md +0 -256
  92. package/framework/rules/supabase-standards.md +0 -29
  93. package/framework/standards/infrastructure/supabase/mcp-setup.md +0 -142
  94. package/framework/standards/infrastructure/supabase/supabase-auth.md +0 -176
  95. package/framework/standards/infrastructure/supabase/supabase-custom-jwt.md +0 -206
  96. package/framework/standards/infrastructure/supabase/supabase-pgvector.md +0 -169
  97. package/framework/standards/infrastructure/supabase/supabase-rls.md +0 -184
  98. package/framework/standards/infrastructure/supabase/supabase-storage.md +0 -153
@@ -1,143 +1,143 @@
1
- # Task Planning Patterns — VSA
2
-
3
- > Padrões detalhados de task planning para Vertical Slice Architecture.
4
- > Referenciado pelos Passos 0.5 e 0.6 de `phase-tasks/SKILL.md`.
5
-
6
- ---
7
-
8
- ## Padrão VSA (Vertical Slice Architecture)
9
-
10
- **Ref:** `framework/standards/architecture/vertical-slice/vertical-slice.md`
11
-
12
- ### Categorias de tasks VSA
13
-
14
- Uma task por slice — Handler + Validator + Endpoint juntos:
15
-
16
- | Categoria | Descrição | Arquivo(s) |
17
- |-----------|-----------|------------|
18
- | **entity** | Entity class + DbSet no ApplicationDbContext | `Entities/{Entity}.cs`, `Database/ApplicationDbContext.cs` |
19
- | **errors** | `{Entity}Errors` static class com factory methods | `Features/{Entity}Feature/{Entity}Errors.cs` |
20
- | **tags** | Constante em ApiTags (se tag nova) | `Constants/ApiTags.cs` |
21
- | **migration** | `dotnet ef migrations add` + `database update` | `Migrations/...` |
22
- | **slice** | Slice completo: Handler (+ Request + Response records) + Validator + Endpoint | `Features/{Entity}Feature/{Op}/{Op}Handler.cs`, `...Validator.cs`, `...Endpoint.cs` |
23
- | **tests** | Unit tests dos handlers | `Tests/Features/{Entity}Feature/...` |
24
- | **docs** | README, Swagger, comentários | — |
25
-
26
- ### Ordem obrigatória (bottom-up VSA)
27
-
28
- ```
29
- T001: Entity + DbContext DbSet
30
- ↓
31
- T002: {Entity}Errors (factory methods)
32
- ↓
33
- T003: ApiTags constant (se tag ainda não existe)
34
- ↓
35
- T004: Migration (Add{Entity} + database update)
36
- ↓
37
- T005: Slice Create{Entity} ← Handler+Validator+Endpoint = 1 task
38
- T006: Slice GetAll{Entity}s ← Handler+Endpoint = 1 task (sem Validator)
39
- T007: Slice Get{Entity}ById ← Handler+Validator+Endpoint = 1 task
40
- T008: Slice Update{Entity} ← Handler+Validator+Endpoint = 1 task
41
- T009: Slice Delete{Entity} ← Handler+Validator+Endpoint = 1 task
42
- ↓
43
- T010+: Slices customizados (operações extra do VSA Blueprint)
44
- ↓
45
- T0NN: Tests
46
- ```
47
-
48
- ### Regras VSA para tasks
49
-
50
- - 1 task = 1 slice completo (Handler + Validator + Endpoint num único task)
51
- - `GetAll` NÃO tem Validator — mencionar explicitamente no task
52
- - Cada task de slice lista os 3 arquivos que devem ser criados no campo `files`
53
- - Entity task deve incluir a linha `DbSet<{Entity}>` no `ApplicationDbContext`
54
- - Migration task é separada da entity task (pode rodar em paralelo com errors + tags)
55
-
56
- ### Exemplos de tasks VSA
57
-
58
- ```json
59
- { "id": "T001", "title": "Criar Entity Book + registrar DbSet no ApplicationDbContext",
60
- "category": "entity", "dependencies": [], "estimatedMinutes": 20,
61
- "files": ["Entities/Book.cs", "Database/ApplicationDbContext.cs"] }
62
-
63
- { "id": "T002", "title": "Criar BookErrors (NotFound + outros factory methods)",
64
- "category": "errors", "dependencies": ["T001"], "estimatedMinutes": 10,
65
- "files": ["Features/BookFeature/BookErrors.cs"] }
66
-
67
- { "id": "T003", "title": "Adicionar ApiTags.Books em Constants/ApiTags.cs",
68
- "category": "tags", "dependencies": [], "estimatedMinutes": 5,
69
- "files": ["Constants/ApiTags.cs"] }
70
-
71
- { "id": "T004", "title": "Criar migration AddBook + aplicar ao banco",
72
- "category": "migration", "dependencies": ["T001"], "estimatedMinutes": 10,
73
- "files": ["Migrations/...AddBook.cs"] }
74
-
75
- { "id": "T005", "title": "Implementar slice CreateBook (Handler + Validator + Endpoint)",
76
- "category": "slice", "dependencies": ["T001", "T002", "T003", "T004"],
77
- "estimatedMinutes": 45,
78
- "files": [
79
- "Features/BookFeature/CreateBook/CreateBookHandler.cs",
80
- "Features/BookFeature/CreateBook/CreateBookValidator.cs",
81
- "Features/BookFeature/CreateBook/CreateBookEndpoint.cs"
82
- ] }
83
-
84
- { "id": "T006", "title": "Implementar slice GetAllBooks (Handler + Endpoint, sem Validator)",
85
- "category": "slice", "dependencies": ["T001", "T004"], "estimatedMinutes": 25,
86
- "files": [
87
- "Features/BookFeature/GetAllBooks/GetAllBooksHandler.cs",
88
- "Features/BookFeature/GetAllBooks/GetAllBooksEndpoint.cs"
89
- ] }
90
- ```
91
-
92
- ---
93
-
94
- ## Estrutura de Task (formato JSON)
95
-
96
- ```json
97
- {
98
- "id": "T001",
99
- "title": "Criar Entity {Nome}",
100
- "description": "Implementar entity {Nome} com propriedades X, Y, Z seguindo padrões EF Core",
101
- "category": "entity",
102
- "dependencies": [],
103
- "estimatedMinutes": 30,
104
- "status": "pending",
105
- "specSections": ["## Domain Model", "## Business Rules"],
106
- "contractInterfaces": ["I{Nome}Repository"],
107
- "files": [
108
- "Entities/{Nome}.cs",
109
- "Database/ApplicationDbContext.cs"
110
- ]
111
- }
112
- ```
113
-
114
- ## Categorias de Tasks (VSA)
115
-
116
- | Categoria | Descrição | Exemplos |
117
- |-----------|-----------|----------|
118
- | **entity** | Entities, Enums | Entity class, DbSet registration |
119
- | **errors** | Error factory classes | `{Entity}Errors.cs` |
120
- | **tags** | API endpoint tags | `ApiTags.cs` constants |
121
- | **migration** | DB migrations | EF migrations |
122
- | **slice** | Complete VSA slice | Handler + Validator + Endpoint |
123
- | **tests** | Unit tests, Integration tests | Handler tests, API tests |
124
- | **infra** | Docker, Migrations, Scripts | docker-compose, Supabase migrations |
125
- | **docs** | README, API docs | OpenAPI spec, README update |
126
-
127
- ## Ordem de Implementação Bottom-Up (VSA)
128
-
129
- ```
130
- 1. Entity + DbContext registration
131
- ↓
132
- 2. Errors + ApiTags
133
- ↓
134
- 3. Migrations
135
- ↓
136
- 4. Slices (Handler + Validator + Endpoint per operation)
137
- ↓
138
- 5. Tests (Unit → Integration)
139
- ↓
140
- 6. Infra (Docker, Supabase migrations)
141
- ↓
142
- 7. Docs (README, Swagger)
143
- ```
1
+ # Task Planning Patterns — VSA
2
+
3
+ > Padrões detalhados de task planning para Vertical Slice Architecture.
4
+ > Referenciado pelos Passos 0.5 e 0.6 de `phase-tasks/SKILL.md`.
5
+
6
+ ---
7
+
8
+ ## Padrão VSA (Vertical Slice Architecture)
9
+
10
+ **Ref:** `framework/standards/architecture/vertical-slice/vertical-slice.md`
11
+
12
+ ### Categorias de tasks VSA
13
+
14
+ Uma task por slice — Handler + Validator + Endpoint juntos:
15
+
16
+ | Categoria | Descrição | Arquivo(s) |
17
+ |-----------|-----------|------------|
18
+ | **entity** | Entity class + DbSet no ApplicationDbContext | `Entities/{Entity}.cs`, `Database/ApplicationDbContext.cs` |
19
+ | **errors** | `{Entity}Errors` static class com factory methods | `Features/{Entity}Feature/{Entity}Errors.cs` |
20
+ | **tags** | Constante em ApiTags (se tag nova) | `Constants/ApiTags.cs` |
21
+ | **migration** | `dotnet ef migrations add` + `database update` | `Migrations/...` |
22
+ | **slice** | Slice completo: Handler (+ Request + Response records) + Validator + Endpoint | `Features/{Entity}Feature/{Op}/{Op}Handler.cs`, `...Validator.cs`, `...Endpoint.cs` |
23
+ | **tests** | Unit tests dos handlers | `Tests/Features/{Entity}Feature/...` |
24
+ | **docs** | README, Swagger, comentários | — |
25
+
26
+ ### Ordem obrigatória (bottom-up VSA)
27
+
28
+ ```
29
+ T001: Entity + DbContext DbSet
30
+ ↓
31
+ T002: {Entity}Errors (factory methods)
32
+ ↓
33
+ T003: ApiTags constant (se tag ainda não existe)
34
+ ↓
35
+ T004: Migration (Add{Entity} + database update)
36
+ ↓
37
+ T005: Slice Create{Entity} ← Handler+Validator+Endpoint = 1 task
38
+ T006: Slice GetAll{Entity}s ← Handler+Endpoint = 1 task (sem Validator)
39
+ T007: Slice Get{Entity}ById ← Handler+Validator+Endpoint = 1 task
40
+ T008: Slice Update{Entity} ← Handler+Validator+Endpoint = 1 task
41
+ T009: Slice Delete{Entity} ← Handler+Validator+Endpoint = 1 task
42
+ ↓
43
+ T010+: Slices customizados (operações extra do VSA Blueprint)
44
+ ↓
45
+ T0NN: Tests
46
+ ```
47
+
48
+ ### Regras VSA para tasks
49
+
50
+ - 1 task = 1 slice completo (Handler + Validator + Endpoint num único task)
51
+ - `GetAll` NÃO tem Validator — mencionar explicitamente no task
52
+ - Cada task de slice lista os 3 arquivos que devem ser criados no campo `files`
53
+ - Entity task deve incluir a linha `DbSet<{Entity}>` no `ApplicationDbContext`
54
+ - Migration task é separada da entity task (pode rodar em paralelo com errors + tags)
55
+
56
+ ### Exemplos de tasks VSA
57
+
58
+ ```json
59
+ { "id": "T001", "title": "Criar Entity Book + registrar DbSet no ApplicationDbContext",
60
+ "category": "entity", "dependencies": [], "estimatedMinutes": 20,
61
+ "files": ["Entities/Book.cs", "Database/ApplicationDbContext.cs"] }
62
+
63
+ { "id": "T002", "title": "Criar BookErrors (NotFound + outros factory methods)",
64
+ "category": "errors", "dependencies": ["T001"], "estimatedMinutes": 10,
65
+ "files": ["Features/BookFeature/BookErrors.cs"] }
66
+
67
+ { "id": "T003", "title": "Adicionar ApiTags.Books em Constants/ApiTags.cs",
68
+ "category": "tags", "dependencies": [], "estimatedMinutes": 5,
69
+ "files": ["Constants/ApiTags.cs"] }
70
+
71
+ { "id": "T004", "title": "Criar migration AddBook + aplicar ao banco",
72
+ "category": "migration", "dependencies": ["T001"], "estimatedMinutes": 10,
73
+ "files": ["Migrations/...AddBook.cs"] }
74
+
75
+ { "id": "T005", "title": "Implementar slice CreateBook (Handler + Validator + Endpoint)",
76
+ "category": "slice", "dependencies": ["T001", "T002", "T003", "T004"],
77
+ "estimatedMinutes": 45,
78
+ "files": [
79
+ "Features/BookFeature/CreateBook/CreateBookHandler.cs",
80
+ "Features/BookFeature/CreateBook/CreateBookValidator.cs",
81
+ "Features/BookFeature/CreateBook/CreateBookEndpoint.cs"
82
+ ] }
83
+
84
+ { "id": "T006", "title": "Implementar slice GetAllBooks (Handler + Endpoint, sem Validator)",
85
+ "category": "slice", "dependencies": ["T001", "T004"], "estimatedMinutes": 25,
86
+ "files": [
87
+ "Features/BookFeature/GetAllBooks/GetAllBooksHandler.cs",
88
+ "Features/BookFeature/GetAllBooks/GetAllBooksEndpoint.cs"
89
+ ] }
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Estrutura de Task (formato JSON)
95
+
96
+ ```json
97
+ {
98
+ "id": "T001",
99
+ "title": "Criar Entity {Nome}",
100
+ "description": "Implementar entity {Nome} com propriedades X, Y, Z seguindo padrões EF Core",
101
+ "category": "entity",
102
+ "dependencies": [],
103
+ "estimatedMinutes": 30,
104
+ "status": "pending",
105
+ "specSections": ["## Domain Model", "## Business Rules"],
106
+ "contractInterfaces": ["I{Nome}Repository"],
107
+ "files": [
108
+ "Entities/{Nome}.cs",
109
+ "Database/ApplicationDbContext.cs"
110
+ ]
111
+ }
112
+ ```
113
+
114
+ ## Categorias de Tasks (VSA)
115
+
116
+ | Categoria | Descrição | Exemplos |
117
+ |-----------|-----------|----------|
118
+ | **entity** | Entities, Enums | Entity class, DbSet registration |
119
+ | **errors** | Error factory classes | `{Entity}Errors.cs` |
120
+ | **tags** | API endpoint tags | `ApiTags.cs` constants |
121
+ | **migration** | DB migrations | EF migrations |
122
+ | **slice** | Complete VSA slice | Handler + Validator + Endpoint |
123
+ | **tests** | Unit tests, Integration tests | Handler tests, API tests |
124
+ | **infra** | Docker, Migrations, Scripts | docker-compose, PostgreSQL migrations |
125
+ | **docs** | README, API docs | OpenAPI spec, README update |
126
+
127
+ ## Ordem de Implementação Bottom-Up (VSA)
128
+
129
+ ```
130
+ 1. Entity + DbContext registration
131
+ ↓
132
+ 2. Errors + ApiTags
133
+ ↓
134
+ 3. Migrations
135
+ ↓
136
+ 4. Slices (Handler + Validator + Endpoint per operation)
137
+ ↓
138
+ 5. Tests (Unit → Integration)
139
+ ↓
140
+ 6. Infra (Docker, PostgreSQL migrations)
141
+ ↓
142
+ 7. Docs (README, Swagger)
143
+ ```
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 2 (UI/UX). Creates design-system.md, mockups.md, c
4
4
  argument-hint: "[feature-name]"
5
5
  user-invocable: false
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
7
- cliVersion: "4.16.0"
7
+ cliVersion: "4.17.0"
8
8
  ---
9
9
 
10
10
  # MORPH UI/UX Design - Phase 2
@@ -4,7 +4,7 @@ description: Guided workflow for mid-implementation scope escalation — analyze
4
4
  user-invocable: true
5
5
  argument-hint: "[feature-name]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
7
- cliVersion: "4.16.0"
7
+ cliVersion: "4.17.0"
8
8
  ---
9
9
 
10
10
  # Scope Escalation Workflow