opencode-effect-enforcer 0.2.3 → 0.2.4

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 (47) hide show
  1. package/README.md +12 -10
  2. package/docs/effect-4.0.0-rc.112.md +316 -0
  3. package/guidance/effect-first-development.md +30 -17
  4. package/guidance/progressive-disclosure-guidance.md +13 -0
  5. package/package.json +3 -2
  6. package/patterns/avoid-direct-tag-checks.md +8 -2
  7. package/patterns/avoid-react-hooks.md +18 -37
  8. package/patterns/effect-run-in-body.md +1 -1
  9. package/patterns/require-effect-concurrency.md +11 -0
  10. package/patterns/use-console-service.md +6 -1
  11. package/skills/effect-ai-language-model/SKILL.md +10 -16
  12. package/skills/effect-ai-prompt/SKILL.md +36 -2
  13. package/skills/effect-ai-provider/SKILL.md +13 -0
  14. package/skills/effect-ai-streaming/SKILL.md +81 -108
  15. package/skills/effect-ai-tool/SKILL.md +50 -87
  16. package/skills/effect-atom-rpc/SKILL.md +9 -2
  17. package/skills/effect-atom-state/SKILL.md +5 -0
  18. package/skills/effect-cache/SKILL.md +32 -0
  19. package/skills/effect-cli/SKILL.md +22 -3
  20. package/skills/effect-concurrency-testing/SKILL.md +7 -9
  21. package/skills/effect-domain-modeling/SKILL.md +208 -1169
  22. package/skills/effect-domain-predicates/SKILL.md +5 -6
  23. package/skills/effect-error-handling/SKILL.md +5 -4
  24. package/skills/effect-http-api/SKILL.md +12 -1
  25. package/skills/effect-http-client/SKILL.md +1 -1
  26. package/skills/effect-http-server/SKILL.md +14 -3
  27. package/skills/effect-layer-design/SKILL.md +22 -56
  28. package/skills/effect-mcp-server/SKILL.md +1 -1
  29. package/skills/effect-pattern-matching/SKILL.md +44 -11
  30. package/skills/effect-platform-abstraction/SKILL.md +1 -1
  31. package/skills/effect-platform-layers/SKILL.md +1 -1
  32. package/skills/effect-rpc-api/SKILL.md +8 -1
  33. package/skills/effect-rpc-client/SKILL.md +20 -6
  34. package/skills/effect-rpc-cluster/SKILL.md +44 -14
  35. package/skills/effect-rpc-server/SKILL.md +32 -5
  36. package/skills/effect-scheduling/SKILL.md +1 -1
  37. package/skills/effect-schema-composition/SKILL.md +69 -15
  38. package/skills/effect-schema-v4/SKILL.md +43 -1
  39. package/skills/effect-scope/SKILL.md +30 -0
  40. package/skills/effect-service-implementation/SKILL.md +10 -4
  41. package/skills/effect-socket/SKILL.md +5 -5
  42. package/skills/effect-sql/SKILL.md +22 -0
  43. package/skills/effect-stream/SKILL.md +32 -1
  44. package/skills/effect-testing/SKILL.md +39 -31
  45. package/skills/effect-workflow/SKILL.md +6 -0
  46. package/patterns/vm-in-wrong-file.md +0 -51
  47. package/skills/effect-react-vm/SKILL.md +0 -675
@@ -1,51 +0,0 @@
1
- ---
2
- action: context
3
- tool: (edit|write)
4
- event: after
5
- name: vm-in-wrong-file
6
- description: View Model definitions must be in .vm.ts files - detected VM pattern outside of proper location
7
- glob: '**/!(*.vm).{ts,tsx}'
8
- pattern: (interface\s+\w+VM\s*\{|Context\.(Service|GenericTag)<\w*VM>|Layer\.(effect|scoped)\(\s*\w+VM)
9
- level: critical
10
- suggestSkills:
11
- - effect-react-vm
12
- ---
13
-
14
- # VM Code in Wrong File
15
-
16
- ```haskell
17
- -- File structure convention
18
- data ComponentFiles = ComponentFiles
19
- { component :: "Component.tsx" -- pure renderer
20
- , viewModel :: "Component.vm.ts" -- VM definition
21
- , index :: "index.ts" -- re-exports
22
- }
23
-
24
- -- VM file structure
25
- data VMFile a = VMFile
26
- { interface :: Interface a -- type contract
27
- , tag :: GenericTag a -- DI tag
28
- , layer :: Layer a -- implementation
29
- }
30
- ```
31
-
32
- ```haskell
33
- -- Anti-pattern: VM in component file
34
- bad :: "Component.tsx"
35
- bad = do
36
- interface ComponentVM { ... } -- ✗ wrong file
37
- ComponentVM = Context.Service -- ✗ wrong file
38
- layer = Layer.effect(...) -- ✗ wrong file
39
-
40
- -- Correct: VM in dedicated file
41
- good :: "Component.vm.ts"
42
- good = do
43
- ComponentVM = Context.Service -- ✓ correct file (Effect v4 beta.46)
44
- layer = Layer.effect(...) -- ✓ correct file
45
- export default { service, layer } -- ✓ clean export
46
-
47
- -- Import in component
48
- import ComponentVM from "./Component.vm"
49
- ```
50
-
51
- VMs must be in `.vm.ts` files. Mixing rendering and state management breaks organization. Invoke `react-vm` skill for guidance.