opencode-effect-enforcer 0.2.2 → 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.
- package/README.md +38 -10
- package/docs/effect-4.0.0-rc.112.md +316 -0
- package/guidance/effect-first-development.md +30 -17
- package/guidance/progressive-disclosure-guidance.md +13 -0
- package/package.json +3 -2
- package/patterns/avoid-direct-tag-checks.md +8 -2
- package/patterns/avoid-react-hooks.md +18 -37
- package/patterns/effect-run-in-body.md +1 -1
- package/patterns/require-effect-concurrency.md +11 -0
- package/patterns/use-console-service.md +6 -1
- package/skills/effect-ai-language-model/SKILL.md +10 -16
- package/skills/effect-ai-prompt/SKILL.md +36 -2
- package/skills/effect-ai-provider/SKILL.md +13 -0
- package/skills/effect-ai-streaming/SKILL.md +81 -108
- package/skills/effect-ai-tool/SKILL.md +50 -87
- package/skills/effect-atom-rpc/SKILL.md +9 -2
- package/skills/effect-atom-state/SKILL.md +5 -0
- package/skills/effect-cache/SKILL.md +32 -0
- package/skills/effect-cli/SKILL.md +22 -3
- package/skills/effect-concurrency-testing/SKILL.md +7 -9
- package/skills/effect-domain-modeling/SKILL.md +208 -1169
- package/skills/effect-domain-predicates/SKILL.md +5 -6
- package/skills/effect-error-handling/SKILL.md +5 -4
- package/skills/effect-http-api/SKILL.md +12 -1
- package/skills/effect-http-client/SKILL.md +1 -1
- package/skills/effect-http-server/SKILL.md +14 -3
- package/skills/effect-layer-design/SKILL.md +22 -56
- package/skills/effect-mcp-server/SKILL.md +1 -1
- package/skills/effect-pattern-matching/SKILL.md +44 -11
- package/skills/effect-platform-abstraction/SKILL.md +1 -1
- package/skills/effect-platform-layers/SKILL.md +1 -1
- package/skills/effect-rpc-api/SKILL.md +8 -1
- package/skills/effect-rpc-client/SKILL.md +20 -6
- package/skills/effect-rpc-cluster/SKILL.md +44 -14
- package/skills/effect-rpc-server/SKILL.md +32 -5
- package/skills/effect-scheduling/SKILL.md +1 -1
- package/skills/effect-schema-composition/SKILL.md +69 -15
- package/skills/effect-schema-v4/SKILL.md +43 -1
- package/skills/effect-scope/SKILL.md +30 -0
- package/skills/effect-service-implementation/SKILL.md +10 -4
- package/skills/effect-socket/SKILL.md +5 -5
- package/skills/effect-sql/SKILL.md +22 -0
- package/skills/effect-stream/SKILL.md +32 -1
- package/skills/effect-testing/SKILL.md +39 -31
- package/skills/effect-workflow/SKILL.md +6 -0
- package/patterns/vm-in-wrong-file.md +0 -51
- 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.
|