@deslop/coding-standards 0.1.1086 → 0.1.1088

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/dist/install.js CHANGED
@@ -25485,7 +25485,7 @@ const runWith = (command, config) => {
25485
25485
  };
25486
25486
  //#endregion
25487
25487
  //#region package.json
25488
- var version = "0.1.1086";
25488
+ var version = "0.1.1088";
25489
25489
  //#endregion
25490
25490
  //#region src/install.ts
25491
25491
  const cli = pipe(make("deslop-coding-standards", {}, fnUntraced(function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deslop/coding-standards",
3
- "version": "0.1.1086",
3
+ "version": "0.1.1088",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/MP281X/deslop",
@@ -54,7 +54,7 @@ The user chooses by seeing and trying, never by reading a description.
54
54
 
55
55
  ## Pages
56
56
 
57
- An explanatory page reads like a slide: the conclusion in the first view, then one row or card per item with a label under twelve words, one takeaway line per section, no paragraphs. Motion only shows a mechanism, at a pace a viewer follows, and stops on the final state with replay.
57
+ An explanatory page reads like a slide: the conclusion in the first view, then one row per item with a label under twelve words, one takeaway line per section, no paragraphs. Motion only shows a mechanism, at a pace a viewer follows, and stops on the final state with replay.
58
58
 
59
59
  ## Critique
60
60
 
@@ -13,7 +13,15 @@ Oxlint and Oxfmt check every change and stay authoritative; this skill holds wha
13
13
 
14
14
  ## Loop
15
15
 
16
- - **Verify** at the root once the whole change is in, and again after each round of fixes: the repository's fix command (lint fixes, then format), then its check, then its tests, chained in one command so a failure stops the rest; fix what fails and rerun the chain until it passes. Never a package-level or per-edit check: one root run costs fewer steps than many partial ones, and the cache replays unchanged work. Fix the first error in each file first: one broken import turns into hundreds of implicit `any` errors downstream. A read-only reviewer never runs fix.
16
+ - **Verify** at the root once the whole change is in, and again after each round of fixes: the repository's fix command (lint fixes, then format), then its check, then its tests, chained bare in one command so a failure stops the rest; fix what fails and rerun the chain until it passes. Read the failures from that run's whole output, never from a rerun with another filter. Never a package-level or per-edit check. Fix the first error in each file first: one broken import turns into hundreds of implicit `any` errors downstream. A read-only reviewer never runs fix.
17
+
18
+ ```bash
19
+ # good
20
+ vp run -w fix && vp run -w --cache check && vp run -w test
21
+ # bad: each step exits with tail's code, so test runs after a failed check, and the cut diagnostics need a rerun
22
+ vp run -w fix 2>&1 | tail -5 && vp run -w --cache check 2>&1 | tail -20 && vp run -w test 2>&1 | tail -20
23
+ ```
24
+
17
25
  - **First pass.** Write the forms in [Lint rules](#lint-rules) from the start. Fix a diagnostic at its source with the form its message or row names; never a cast, a weakened rule or a rewrite that trades one diagnostic for another.
18
26
  - **Fix the code, not the rule.** A diagnostic whose named form does not fit points at the model upstream: change the model, not the line that trips the rule. A diagnostic on code the rules allow is a rule bug: fix the rule with a rejected and an accepted case.
19
27
 
@@ -31,8 +39,9 @@ Oxlint and Oxfmt check every change and stay authoritative; this skill holds wha
31
39
  Start from a real caller and the outcome, not a pattern. Trace one successful operation and its strongest reachable failure through the existing modules: the authoritative state, write boundary, resource lifetime and completion signal.
32
40
 
33
41
  - **Direct.** The most direct code that meets today's request: extend the canonical example per [Patterns](#patterns), else a function or an existing service method. A new service only for a distinct capability or lifetime; reimplementing a library's job is a new mechanism. Keep the direct version unless a probe proves a concrete contract rules it out.
42
+ - **Process.** A step agents must take, such as loading a skill, verifying before a push or keeping two prompts equal, lives in the instruction that names it, never in a hook, stamp file, generator or sync check: the user rejected each of these.
34
43
  - **Callers.** Every function, parameter, option, export, Layer, check and config value has a caller that varies it. Handle reachable inputs only: no futureproofing or impossible cases. Explicit variants for genuinely different behaviors; no boolean combinations, registries, generic configuration or factories for hypothetical callers.
35
- - **Reuse.** Search existing code, installed modules and Effect's modules by the domain concept, not only the request's words, before you write traversal, state, configuration or platform code; replace dependencies Effect covers. Before a hand-written type, guard, table, wrapper or dependency, list the owning module's exports in its locked source checkout per explore: `Schema.Literals([...]).pick([...])` replaces a second literal list, `Schema.TaggedUnion` a hand-written matcher. Identical logic twice (a computation, a query, an Effect pipeline) is one function in its owner's `lib/utils`. Similar code stays separate: three similar lines beat an abstraction, and a shared function never branches on its caller. Class lists and small expressions stay inline at each use, never in shared constants. Compose with Effect's own combinators, pipelines, Layers and Schema instead of writing a wrapper.
44
+ - **Reuse.** Search existing code, installed modules and Effect's modules by the domain concept, not only the request's words, before you write traversal, state, configuration or platform code; replace dependencies Effect covers. Before a hand-written type, guard, table, wrapper or dependency, list the owning module's exports in its locked source checkout per explore: `Schema.TaggedUnion` replaces a hand-written matcher. Identical logic twice (a computation, a query, an Effect pipeline) is one function in its owner's `lib/utils`. Similar code stays separate: three similar lines beat an abstraction, and a shared function never branches on its caller. Class lists and small expressions stay inline at each use, never in shared constants. Compose with Effect's own combinators, pipelines, Layers and Schema instead of writing a wrapper.
36
45
  - **One owner.** Derive values from their owner; never mirror server state, request state, caches or pending results in another store. A persisted value has one write boundary, a domain enum one schema, a cache key the full identity it caches. No duplicate, subset or superset fields, methods, options or exports; remove states no caller produces.
37
46
  - **Lifetime.** Finite work stays in its request scope; a stream serves progress without a job system. Background ownership only when work must outlive its caller.
38
47
  - **Failure.** Failures flow through the error channel with their cause; never turn one into empty success. No catch, retry, fallback, idempotency or defensive check without a contract that needs it.
@@ -50,7 +59,7 @@ Start from a real caller and the outcome, not a pattern. Trace one successful op
50
59
 
51
60
  ```ts
52
61
  // good
53
- const cycles = Graph.stronglyConnectedComponents(graph)
62
+ const recursion = Graph.findCycle(calls) // stronglyConnectedComponents also lists every node outside a cycle
54
63
  upload({scope: input.scope, type: input.type}) // input also holds the bearer token
55
64
  // bad
56
65
  Schema.decodeEffect(LedgerDraft)(draft) // draft is already a decoded LedgerDraft