@polymorphism-tech/morph-spec 4.16.0 → 4.18.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 (107) hide show
  1. package/CLAUDE.md +36 -0
  2. package/README.md +2 -2
  3. package/bin/morph-spec.js +3 -0
  4. package/bin/task-manager.js +999 -962
  5. package/claude-plugin.json +1 -1
  6. package/docs/CHEATSHEET.md +1 -1
  7. package/docs/QUICKSTART.md +1 -1
  8. package/framework/agents/ai-agents/vector-search-expert.md +247 -233
  9. package/framework/agents/backend/ms-agent-expert.md +1 -1
  10. package/framework/agents/backend/neon-expert.md +379 -0
  11. package/framework/agents/frontend/gsap-animator.md +131 -0
  12. package/framework/agents/integrations/neon-auth.md +151 -0
  13. package/framework/agents.json +1183 -1085
  14. package/framework/commands/morph-preflight.md +200 -192
  15. package/framework/hooks/claude-code/session-start/inject-morph-context.js +1 -1
  16. package/framework/rules/gsap-standards.md +13 -0
  17. package/framework/rules/neon-auth-standards.md +13 -0
  18. package/framework/rules/neon-standards.md +26 -0
  19. package/framework/skills/level-0-meta/mcp-registry.json +1 -1
  20. package/framework/skills/level-0-meta/morph-agent-teams/SKILL.md +472 -472
  21. package/framework/skills/level-0-meta/morph-frontend-review/SKILL.md +1 -1
  22. package/framework/skills/level-0-meta/morph-init/SKILL.md +12 -12
  23. package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +5 -5
  24. package/framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md +5 -5
  25. package/framework/skills/level-0-meta/morph-tool-usage-guide/references/tools-per-phase.md +7 -7
  26. package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +24 -24
  27. package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +12 -12
  28. package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +9 -9
  29. package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +1 -1
  30. package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +1 -1
  31. package/framework/skills/level-1-workflows/morph-phase-tasks/references/task-planning-patterns.md +143 -143
  32. package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +1 -1
  33. package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +1 -1
  34. package/framework/standards/STANDARDS.json +197 -116
  35. package/framework/standards/ai-agents/production.md +1 -0
  36. package/framework/standards/ai-agents/setup.md +3 -2
  37. package/framework/standards/ai-agents/workflows.md +1 -0
  38. package/framework/standards/architecture/vertical-slice/vertical-slice.md +4 -4
  39. package/framework/standards/backend/database/postgresql/database.md +63 -83
  40. package/framework/standards/backend/dotnet/scalar-ui.md +172 -172
  41. package/framework/standards/backend/dotnet/vsa-handler-patterns.md +274 -274
  42. package/framework/standards/backend/integrations/asaas/asaas-api.md +2 -2
  43. package/framework/standards/backend/integrations/neon-auth/neon-auth.md +364 -0
  44. package/framework/standards/frontend/design-system/animations.md +9 -0
  45. package/framework/standards/frontend/gsap/gsap-core.md +463 -0
  46. package/framework/standards/frontend/gsap/gsap-plugins.md +294 -0
  47. package/framework/standards/frontend/gsap/gsap-scrolltrigger.md +318 -0
  48. package/framework/standards/frontend/nextjs/motion-patterns.md +1 -0
  49. package/framework/standards/frontend/nextjs/nextjs-patterns.md +47 -37
  50. package/framework/standards/infrastructure/docker/easypanel-deploy.md +4 -8
  51. package/framework/standards/infrastructure/neon/neon-pgrag.md +239 -0
  52. package/framework/standards/infrastructure/neon/neon-pgvector.md +236 -0
  53. package/framework/standards/infrastructure/neon/neon-semantic-kernel.md +310 -0
  54. package/framework/standards/infrastructure/neon/neon-setup.md +186 -0
  55. package/framework/standards/integration/mcp/mcp-tools.md +32 -34
  56. package/framework/templates/README.md +20 -20
  57. package/framework/templates/REGISTRY.json +54 -101
  58. package/framework/templates/code/dotnet/abstractions/api-endpoint.cs +7 -7
  59. package/framework/templates/code/dotnet/backend/repository.cs +148 -148
  60. package/framework/templates/code/dotnet/contracts/contracts-vsa.cs +2 -2
  61. package/framework/templates/code/dotnet/database/vector-entity.cs +93 -0
  62. package/framework/templates/code/dotnet/feature/endpoint.cs.hbs +1 -1
  63. package/framework/templates/code/sql/{supabase-migration.sql → postgresql-migration.sql} +12 -21
  64. package/framework/templates/code/sql/{supabase-migration.template.sql → postgresql-migration.template.sql} +13 -18
  65. package/framework/templates/code/sql/{rls-policy.sql → postgresql-rls-policy.sql} +6 -9
  66. package/framework/templates/code/typescript/contracts.ts +167 -168
  67. package/framework/templates/context/CONTEXT.md +3 -3
  68. package/framework/templates/docs/proposal.md +6 -6
  69. package/framework/templates/docs/ui-components.md +1 -1
  70. package/framework/templates/feature/decisions.md +122 -121
  71. package/framework/templates/feature/recap.md +145 -145
  72. package/framework/templates/feature/tasks.md +199 -199
  73. package/framework/templates/frontend/nextjs/gsap-scroll-section.tsx.hbs +44 -0
  74. package/framework/templates/infrastructure/docker/docker-compose.template.yml +50 -67
  75. package/framework/templates/infrastructure/docker/dockerfile-api.dockerfile +38 -38
  76. package/framework/templates/infrastructure/docker/dockerfile-web.dockerfile +48 -48
  77. package/framework/templates/infrastructure/docker/easypanel.template.json +46 -54
  78. package/framework/templates/infrastructure/github/README.md +56 -56
  79. package/framework/templates/integrations/neon-auth-config.cs +133 -0
  80. package/framework/templates/integrations/semantic-kernel-neon.cs +125 -0
  81. package/framework/workflows/README.md +1 -1
  82. package/framework/workflows/docs/full-morph.md +69 -69
  83. package/package.json +1 -1
  84. package/src/commands/agents/dispatch-agents.js +19 -15
  85. package/src/commands/state/advance-phase.js +5 -0
  86. package/src/commands/tasks/task.js +3 -0
  87. package/src/core/state/state-manager.js +45 -1
  88. package/src/core/templates/template-registry.js +1 -66
  89. package/src/lib/detectors/index.js +4 -4
  90. package/src/lib/generators/architecture-scanner.js +639 -640
  91. package/src/lib/installers/mcp-installer.js +1 -1
  92. package/src/lib/tasks/task-classifier.js +15 -1
  93. package/src/lib/tasks/test-runner.js +5 -1
  94. package/src/lib/validators/content/content-validator.js +9 -10
  95. package/src/lib/validators/validation-runner.js +7 -5
  96. package/framework/agents/backend/supabase-expert.md +0 -256
  97. package/framework/agents/integrations/clerk-auth.md +0 -109
  98. package/framework/rules/clerk-standards.md +0 -13
  99. package/framework/rules/supabase-standards.md +0 -29
  100. package/framework/standards/backend/integrations/clerk/clerk-auth.md +0 -290
  101. package/framework/standards/infrastructure/supabase/mcp-setup.md +0 -142
  102. package/framework/standards/infrastructure/supabase/supabase-auth.md +0 -176
  103. package/framework/standards/infrastructure/supabase/supabase-custom-jwt.md +0 -206
  104. package/framework/standards/infrastructure/supabase/supabase-pgvector.md +0 -169
  105. package/framework/standards/infrastructure/supabase/supabase-rls.md +0 -184
  106. package/framework/standards/infrastructure/supabase/supabase-storage.md +0 -153
  107. package/framework/templates/integrations/clerk-config.cs +0 -217
@@ -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.18.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.18.0"
8
8
  ---
9
9
 
10
10
  # Scope Escalation Workflow