@danieljvdm/dev-kit 0.2.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.
- package/README.md +290 -0
- package/bin/dev-kit.mjs +3 -0
- package/dev-kit.example.jsonc +13 -0
- package/package.json +69 -0
- package/schema/dev-kit.schema.json +128 -0
- package/schema/skill-sources.schema.json +83 -0
- package/skill-sources.jsonc +55 -0
- package/skill-sources.lock.json +136 -0
- package/skills/dev-kit/SKILL.md +145 -0
- package/skills/dev-kit/agents/openai.yaml +4 -0
- package/skills/effect-ts/SKILL.md +242 -0
- package/skills/effect-ts/UPSTREAM.md +28 -0
- package/skills/effect-ts/agents/openai.yaml +5 -0
- package/skills/effect-ts/references/audit-services.md +144 -0
- package/skills/effect-ts/references/features.md +525 -0
- package/skills/effect-ts/references/guide-cli.md +106 -0
- package/skills/effect-ts/references/guide-effect.md +453 -0
- package/skills/effect-ts/references/guide-error-handling.md +574 -0
- package/skills/effect-ts/references/guide-http-boundaries.md +55 -0
- package/skills/effect-ts/references/guide-layers.md +1017 -0
- package/skills/effect-ts/references/guide-observability.md +771 -0
- package/skills/effect-ts/references/guide-retries.md +446 -0
- package/skills/effect-ts/references/guide-schedule.md +357 -0
- package/skills/effect-ts/references/guide-schema.md +671 -0
- package/skills/effect-ts/references/guide-sql.md +539 -0
- package/skills/effect-ts/references/guide-testing.md +534 -0
- package/skills/effect-ts/references/guide-type-safety-and-boundaries.md +131 -0
- package/skills/effect-ts/references/version-and-source.md +87 -0
- package/src/bin/dev-kit.ts +372 -0
- package/src/catalog-manager.ts +345 -0
- package/src/catalog.ts +246 -0
- package/src/cli-ui.ts +110 -0
- package/src/effect-source.ts +325 -0
- package/src/effect-tsgo.ts +256 -0
- package/src/gitignore.ts +212 -0
- package/src/index.ts +98 -0
- package/src/manifest.ts +133 -0
- package/src/node-symbolic-link.ts +31 -0
- package/src/path-digest.ts +140 -0
- package/src/project-process-lock.ts +76 -0
- package/src/project-state.ts +67 -0
- package/src/skill-manager.ts +326 -0
- package/src/source-manifest.ts +51 -0
- package/src/sync.ts +900 -0
- package/src/tool-metadata.ts +3 -0
- package/src/typescript-package-name.ts +5 -0
- package/src/vendor.ts +848 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Auditing Effect Services
|
|
2
|
+
|
|
3
|
+
Use this for an audit across a codebase, package, feature slice, or diff. Apply
|
|
4
|
+
the service and test rules from the other references selected by
|
|
5
|
+
`effect-ts`.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
- [Establish Local Rules](#1-establish-local-rules)
|
|
10
|
+
- [Build The Inventory](#2-build-the-inventory)
|
|
11
|
+
- [Trace Authority And Requirements](#3-trace-authority-and-requirements)
|
|
12
|
+
- [Classify Each Candidate](#4-classify-each-candidate)
|
|
13
|
+
- [Audit Test Strategies](#5-audit-test-strategies)
|
|
14
|
+
- [Report Actionable Findings](#6-report-actionable-findings)
|
|
15
|
+
|
|
16
|
+
## 1. Establish Local Rules
|
|
17
|
+
|
|
18
|
+
Read the project architecture guidance, Effect conventions, pinned Effect
|
|
19
|
+
version or source, and relevant version-matched examples. Record the governing
|
|
20
|
+
conventions and APIs that later decisions must follow.
|
|
21
|
+
|
|
22
|
+
Complete this step when the applicable project guidance and pinned source
|
|
23
|
+
examples are named.
|
|
24
|
+
|
|
25
|
+
## 2. Build The Inventory
|
|
26
|
+
|
|
27
|
+
Enumerate source and test files, then find:
|
|
28
|
+
|
|
29
|
+
- Every `Context.Service`, tag, `Layer`, `make`, `provide`, and
|
|
30
|
+
`provideService`.
|
|
31
|
+
- Service-shaped interfaces or classes with effectful methods.
|
|
32
|
+
- Dependencies passed through parameters, properties, constructors, callbacks,
|
|
33
|
+
options bags, or Layers.
|
|
34
|
+
- Direct access to time, randomness, cryptography, IDs, configuration, HTTP,
|
|
35
|
+
persistence, registries, renderers, filesystems, runtime bindings, and
|
|
36
|
+
mutable globals.
|
|
37
|
+
- Test fakes, in-memory implementations, module mocks, and hand-built
|
|
38
|
+
`Layer.succeed` values.
|
|
39
|
+
- Public Effects with `unknown` or `any` error types.
|
|
40
|
+
- Assertions, non-null assertions, custom type predicates, structural probes,
|
|
41
|
+
JSON parsing, Promise catch mappers, and `throw` statements.
|
|
42
|
+
- Local schemas, codecs, JSON types, and runtime helpers that overlap Effect or
|
|
43
|
+
platform APIs.
|
|
44
|
+
|
|
45
|
+
Record one row per discovered service or candidate:
|
|
46
|
+
|
|
47
|
+
| Field | Question |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| Owner | Which module owns the capability's meaning? |
|
|
50
|
+
| Contract | Where are its interface and tag? |
|
|
51
|
+
| Construction | Does construction yield every runtime dependency? |
|
|
52
|
+
| Production | Who owns the concrete implementation and Layer choice? |
|
|
53
|
+
| Tests | Does it have an intentional and honest substitute strategy? |
|
|
54
|
+
| Consumers | Are capabilities yielded or drilled as values? |
|
|
55
|
+
| Requirements | Do requirements remain visible to the composition root? |
|
|
56
|
+
| Type boundary | Who owns decoding, narrowing, and error translation? |
|
|
57
|
+
| Verdict | Keep, deepen, relocate, merge, remove, or create? |
|
|
58
|
+
|
|
59
|
+
Build a companion type-safety inventory using
|
|
60
|
+
[`guide-type-safety-and-boundaries.md`](guide-type-safety-and-boundaries.md).
|
|
61
|
+
Attach each
|
|
62
|
+
occurrence to its owning service or boundary and record its input provenance,
|
|
63
|
+
intended type or error, and target disposition.
|
|
64
|
+
|
|
65
|
+
Complete this step when every discovered service, tag, Layer, service-shaped
|
|
66
|
+
candidate, and type-safety occurrence appears exactly once.
|
|
67
|
+
|
|
68
|
+
## 3. Trace Authority And Requirements
|
|
69
|
+
|
|
70
|
+
For each inventory row:
|
|
71
|
+
|
|
72
|
+
1. Trace one caller-visible operation to every effect it performs.
|
|
73
|
+
2. Mark where each dependency first appears and whether code yields it, passes
|
|
74
|
+
it, captures it, or provides it concretely.
|
|
75
|
+
3. Verify that the module selecting a concrete Layer owns that implementation
|
|
76
|
+
choice.
|
|
77
|
+
4. Check project-compatible Effect capabilities before recommending an
|
|
78
|
+
application wrapper.
|
|
79
|
+
5. Follow every requirement to a composition root or an explicit value
|
|
80
|
+
boundary.
|
|
81
|
+
|
|
82
|
+
Inspect dependency drilling, Layer arguments, dependency bags, handler-builder
|
|
83
|
+
service values, inner `Effect.provide` calls, direct runtime access, and
|
|
84
|
+
contracts or Layers scattered across unrelated owners.
|
|
85
|
+
|
|
86
|
+
Complete this step when every capability has an unbroken path from use to its
|
|
87
|
+
composition root or documented value boundary.
|
|
88
|
+
|
|
89
|
+
## 4. Classify Each Candidate
|
|
90
|
+
|
|
91
|
+
Apply the authority seam and deletion tests, then assign one classification:
|
|
92
|
+
|
|
93
|
+
- **Built-in Effect capability** — yield the existing capability.
|
|
94
|
+
- **Application-owned authority** — define a narrow port beside the operation
|
|
95
|
+
that needs it.
|
|
96
|
+
- **Technology adapter** — implement an application-owned port in the adapter.
|
|
97
|
+
- **Request or domain value** — keep the value explicit.
|
|
98
|
+
- **Framework boundary** — contain the framework-required API in its adapter or
|
|
99
|
+
composition root.
|
|
100
|
+
- **Pass-through abstraction** — fold it into the real owner.
|
|
101
|
+
|
|
102
|
+
Prefer an existing owner or a merge of duplicated capabilities over a generic
|
|
103
|
+
registry or dependency bag.
|
|
104
|
+
|
|
105
|
+
Complete this step when every candidate has one evidence-backed classification
|
|
106
|
+
and each service-or-value decision states why the alternative was rejected.
|
|
107
|
+
|
|
108
|
+
## 5. Audit Test Strategies
|
|
109
|
+
|
|
110
|
+
Record how tests replace or control each production service. Verify that
|
|
111
|
+
exported test and in-memory Layers implement the behavior their names promise,
|
|
112
|
+
and keep focused partial fixtures local to their tests.
|
|
113
|
+
|
|
114
|
+
Complete this step when every production service has an intentional test
|
|
115
|
+
strategy or an explicit production-only rationale.
|
|
116
|
+
|
|
117
|
+
## 6. Report Actionable Findings
|
|
118
|
+
|
|
119
|
+
Prioritize by correctness and requirement visibility:
|
|
120
|
+
|
|
121
|
+
- **P0** — hidden authority, unsafe direct runtime access, broken or duplicated
|
|
122
|
+
capability, wrong Layer ownership, untyped expected failures, or unchecked
|
|
123
|
+
external data.
|
|
124
|
+
- **P1** — repeated dependency drilling, hidden requirements, scattered service
|
|
125
|
+
ownership, manual shape discovery, unjustified assertions, custom substitutes
|
|
126
|
+
for Effect APIs, or a missing intentional test strategy.
|
|
127
|
+
- **P2** — naming or co-location cleanup that should accompany a nearby
|
|
128
|
+
refactor.
|
|
129
|
+
|
|
130
|
+
For each finding include:
|
|
131
|
+
|
|
132
|
+
1. File, line, or symbol evidence.
|
|
133
|
+
2. The hidden requirement or caller burden.
|
|
134
|
+
3. The smallest target shape using the project's Effect conventions.
|
|
135
|
+
4. The composition-root and test impact.
|
|
136
|
+
5. The behavior and modules that should remain unchanged.
|
|
137
|
+
|
|
138
|
+
End with explicit keep decisions for values, pure functions, framework
|
|
139
|
+
boundaries, correctly separated ports and adapters, and request-scoped
|
|
140
|
+
services.
|
|
141
|
+
|
|
142
|
+
Complete the audit when every inventory row and type-safety occurrence has a
|
|
143
|
+
disposition, every proposed change names its owner and target shape, and every
|
|
144
|
+
proposal remains evidence-backed and scoped to observed code.
|