@deslop/coding-standards 0.1.1063 → 0.1.1065
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 +1 -1
- package/dist/{MutableRef-CzOzKHjT.mjs → MutableRef-WrqsqeER.mjs} +44 -1
- package/dist/install.js +2 -2
- package/dist/oxlint.d.ts +1 -0
- package/dist/oxlint.js +37 -1
- package/package.json +1 -1
- package/skills/design/EVALS.md +19 -0
- package/skills/design/SKILL.md +2 -2
- package/skills/engineering/EVALS.md +19 -0
- package/skills/engineering/SKILL.md +5 -3
- package/skills/testing/EVALS.md +20 -0
- package/skills/testing/SKILL.md +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Run inside a Git repository, including a linked worktree:
|
|
|
10
10
|
vpx @deslop/coding-standards@latest
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
It copies the three skills into the repository's existing `.agents`, `.claude` and `.codex` directories. It always writes `.claude`, which Claude Code reads, and writes `.agents` when no `.codex` exists. A refresh replaces only those three skills, and destinations outside the repository or inside global agent configuration are rejected. Nothing is added to the manifest, lockfile or lint configuration.
|
|
13
|
+
It copies the three skills into the repository's existing `.agents`, `.claude` and `.codex` directories, including their `EVALS.md`. It always writes `.claude`, which Claude Code reads, and writes `.agents` when no `.codex` exists. A refresh replaces only those three skills, and destinations outside the repository or inside global agent configuration are rejected. Nothing is added to the manifest, lockfile or lint configuration. Edit package sources; refresh installed copies with the CLI.
|
|
14
14
|
|
|
15
15
|
## Use the lint preset
|
|
16
16
|
|
|
@@ -5666,6 +5666,32 @@ const some = /*#__PURE__*/ dual(2, (self, predicate) => self.some(predicate));
|
|
|
5666
5666
|
*/
|
|
5667
5667
|
const makeEquivalence = Array_;
|
|
5668
5668
|
/**
|
|
5669
|
+
* Runs a side-effect for each element. The callback receives `(element, index)`.
|
|
5670
|
+
*
|
|
5671
|
+
* **When to use**
|
|
5672
|
+
*
|
|
5673
|
+
* Use to iterate over an array for side-effects only, when no transformed
|
|
5674
|
+
* result is needed.
|
|
5675
|
+
*
|
|
5676
|
+
* **Example** (Iterating with side-effects)
|
|
5677
|
+
*
|
|
5678
|
+
* ```ts import.meta.vitest
|
|
5679
|
+
* import { Array } from "effect"
|
|
5680
|
+
*
|
|
5681
|
+
* const visited: Array<number> = []
|
|
5682
|
+
* Array.forEach([1, 2, 3], (n) => visited.push(n))
|
|
5683
|
+
*
|
|
5684
|
+
* visited // => [1, 2, 3]
|
|
5685
|
+
* ```
|
|
5686
|
+
*
|
|
5687
|
+
* @see {@link map} for transforming each element into a new array
|
|
5688
|
+
*
|
|
5689
|
+
* @stability stable
|
|
5690
|
+
* @category traversing
|
|
5691
|
+
* @since 2.0.0
|
|
5692
|
+
*/
|
|
5693
|
+
const forEach = /*#__PURE__*/ dual(2, (self, f) => fromIterable(self).forEach((a, i) => f(a, i)));
|
|
5694
|
+
/**
|
|
5669
5695
|
* Removes duplicates using `Equal.equivalence()`, preserving the order of the
|
|
5670
5696
|
* first occurrence.
|
|
5671
5697
|
*
|
|
@@ -5912,6 +5938,23 @@ globalThis.String;
|
|
|
5912
5938
|
*/
|
|
5913
5939
|
const Order = String$2;
|
|
5914
5940
|
/**
|
|
5941
|
+
* Removes whitespace from both ends of a string.
|
|
5942
|
+
*
|
|
5943
|
+
* **Example** (Trimming whitespace)
|
|
5944
|
+
*
|
|
5945
|
+
* ```ts import.meta.vitest
|
|
5946
|
+
* import { String } from "effect"
|
|
5947
|
+
*
|
|
5948
|
+
* String.trim(" a ") // => "a"
|
|
5949
|
+
* String.trim(" hello world ") // => "hello world"
|
|
5950
|
+
* ```
|
|
5951
|
+
*
|
|
5952
|
+
* @stability stable
|
|
5953
|
+
* @category transforming
|
|
5954
|
+
* @since 2.0.0
|
|
5955
|
+
*/
|
|
5956
|
+
const trim = (self) => self.trim();
|
|
5957
|
+
/**
|
|
5915
5958
|
* Removes whitespace from the end of a string.
|
|
5916
5959
|
*
|
|
5917
5960
|
* **Example** (Trimming trailing whitespace)
|
|
@@ -6208,4 +6251,4 @@ const set = /*#__PURE__*/ dual(2, (self, value) => {
|
|
|
6208
6251
|
*/
|
|
6209
6252
|
const update = /*#__PURE__*/ dual(2, (self, f) => set(self, f(get(self))));
|
|
6210
6253
|
//#endregion
|
|
6211
|
-
export {
|
|
6254
|
+
export { values as $, isFunction as $n, causeAnnotate as $t, fromIterable as A, NodeInspectSymbol as An, String$2 as At, makeEquivalence as B, symbol as Bn, CauseImpl as Bt, filterMap as C, makePrimitiveProto as Cn, pipe as Cr, none as Ct, flatMap as D, getStackTraceLimit as Dn, BigInt as Dt, findLast as E, internalCall as En, pipeArguments as Er, zipWith as Et, isArrayNonEmpty as F, formatPath as Fn, make$1 as Ft, reduce as G, optimize as Gn, Fail as Gt, match$1 as H, combine as Hn, Done as Ht, isCanonicalArrayIndex as I, formatPropertyKey as In, mapInput as It, take as J, structure as Jn, ReasonBase as Jt, some as K, random as Kn, InterruptorStackTrace as Kt, isReadonlyArrayNonEmpty as L, currentFiberTypeId as Ln, Tuple as Lt, getSomes as M, format as Mn, isGreaterThanOrEqualTo as Mt, head as N, formatDate as Nn, isLessThan as Nt, flatten as O, setStackTraceLimit as On, Date$1 as Ot, isArrayEmpty as P, formatJson as Pn, isLessThanOrEqualTo as Pt, remove as Q, isError as Qn, args as Qt, join as R, byReferenceUnsafe as Rn, make$2 as Rt, filter as S, makePrimitive as Sn, memoizeIdempotent as Sr, match$3 as St, findFirstIndex as T, assignProperty as Tn, Prototype as Tr, some$1 as Tt, of as U, hash as Un, Error$2 as Ut, map as V, array as Vn, Die as Vt, prepend as W, number as Wn, ExitTypeId as Wt, get$2 as X, hasProperty as Xn, TaggedError$1 as Xt, fromEntries as Y, symbol$1 as Yn, StackTraceKey as Yt, map$1 as Z, isBoolean as Zn, Yield as Zt, dedupe as _, isDone as _n, constVoid as _r, getOrUndefined as _t, includes as a, constEmptyAnnotations as an, isNumber as ar, succeed as at, ensure as b, isFailReason as bn, identity as br, liftThrowable as bt, startsWith as c, contE as cn, isPropertyKey as cr, contains$1 as ct, Error$1 as d, exitDie as dn, isTagged as dr, firstSomeOf as dt, causeCombine as en, isIterable as er, fail as et, TaggedError as f, exitFail as fn, isUndefined as fr, flatMap$1 as ft, contains as g, isDieReason as gn, constUndefined as gr, getOrElse as gt, appendAll as h, isCause as hn, constTrue as hr, fromUndefinedOr as ht, Order as i, causeFromReasons as in, isNullish as ir, match$2 as it, get$1 as j, toStringUnknown as jn, isGreaterThan as jt, forEach as k, BaseProto as kn, Number$1 as kt, trim as l, done as ln, isReadonlyObject as lr, exists as lt, append as m, exitSucceed as mn, constFalse as mr, fromNullishOr as mt, make as n, causeEmpty as nn, isNotNullish as nr, getOrThrow as nt, match as o, contA as on, isObject as or, normalize as ot, taggedEnum as p, exitFailCause as pn, isUnknown as pr, flatten$1 as pt, sort as q, string as qn, PipeInspectableProto as qt, update as r, causeFail as rn, isNotUndefined as rr, isFailure as rt, split as s, contAll as sn, isObjectKeyword as sr, all as st, get as t, causeDie as tn, isNotNull as tr, fromOption as tt, trimEnd as u, evaluate as un, isString as ur, filter$1 as ut, dropRight as v, isEffect as vn, constant as vr, isNone as vt, findFirst as w, withFiber as wn, Class$1 as wr, orElse as wt, every as x, isInterruptReason as xn, memoize as xr, map$2 as xt, empty as y, isExit as yn, dual as yr, isSome as yt, last as z, equals as zn, strictEqual as zt };
|
package/dist/install.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $n as
|
|
2
|
+
import { $n as isFunction, $t as causeAnnotate, A as fromIterable$1, An as NodeInspectSymbol, At as String$6, Bn as symbol, Bt as CauseImpl, Cn as makePrimitiveProto, Cr as pipe, Ct as none, Dn as getStackTraceLimit, E as findLast, En as internalCall, Er as pipeArguments, F as isArrayNonEmpty, Fn as formatPath, G as reduce, Gt as Fail, H as match$5, Hn as combine$1, Ht as Done$1, I as isCanonicalArrayIndex, In as formatPropertyKey, It as mapInput, Jn as structure, Jt as ReasonBase, K as some$1, Kn as random, Kt as InterruptorStackTrace, L as isReadonlyArrayNonEmpty, Ln as currentFiberTypeId, Mn as format$1, On as setStackTraceLimit, Pn as formatJson, Qn as isError, Qt as args, R as join$1, S as filter, Sn as makePrimitive$1, Sr as memoizeIdempotent, St as match$4, T as findFirstIndex, Tn as assignProperty, Tr as Prototype$1, Tt as some, U as of, Un as hash, Ut as Error$3, V as map$9, Vt as Die, Wn as number$1, Wt as ExitTypeId, Xn as hasProperty, Xt as TaggedError$2, Yn as symbol$1, Yt as StackTraceKey, Zn as isBoolean$1, Zt as Yield, _ as dedupe, _n as isDone$2, _r as constVoid, _t as getOrUndefined$1, an as constEmptyAnnotations, ar as isNumber, at as succeed$6, bn as isFailReason$1, br as identity, c as startsWith, cn as contE, d as Error$2, dn as exitDie, dr as isTagged, en as causeCombine, er as isIterable, et as fail$5, f as TaggedError$1, fn as exitFail, fr as isUndefined, ft as flatMap$3, g as contains, gn as isDieReason$1, gr as constUndefined, gt as getOrElse, hn as isCause, hr as constTrue, ht as fromUndefinedOr, in as causeFromReasons, ir as isNullish, it as match$3, jn as toStringUnknown, jt as isGreaterThan$1, kn as BaseProto, kt as Number$6, ln as done$1, lt as exists, m as append$1, mn as exitSucceed, mr as constFalse, mt as fromNullishOr, n as make$29, nn as causeEmpty, nr as isNotNullish, on as contA, or as isObject, ot as normalize$1, p as taggedEnum, pn as exitFailCause, pr as isUnknown, qn as string$1, qt as PipeInspectableProto, rn as causeFail, rr as isNotUndefined, rt as isFailure$1, sn as contAll, sr as isObjectKeyword, tn as causeDie, tr as isNotNull, u as trimEnd, un as evaluate, ur as isString, vn as isEffect$1, vr as constant, vt as isNone, w as findFirst, wn as withFiber$1, wr as Class, xn as isInterruptReason, xr as memoize, xt as map$10, y as empty$3, yn as isExit, yr as dual, yt as isSome, zn as equals$1 } from "./MutableRef-WrqsqeER.mjs";
|
|
3
3
|
import * as NodeChildProcess from "node:child_process";
|
|
4
4
|
import { PassThrough } from "node:stream";
|
|
5
5
|
import * as NodeCrypto from "node:crypto";
|
|
@@ -25233,7 +25233,7 @@ const runWith = (command, config) => {
|
|
|
25233
25233
|
};
|
|
25234
25234
|
//#endregion
|
|
25235
25235
|
//#region package.json
|
|
25236
|
-
var version = "0.1.
|
|
25236
|
+
var version = "0.1.1065";
|
|
25237
25237
|
//#endregion
|
|
25238
25238
|
//#region src/install.ts
|
|
25239
25239
|
const cli = pipe(make("deslop-coding-standards", {}, fnUntraced(function* () {
|
package/dist/oxlint.d.ts
CHANGED
|
@@ -4123,6 +4123,7 @@ export declare const oxlint: {
|
|
|
4123
4123
|
'@deslop/coding-standards/no-fake-ref-state': "error";
|
|
4124
4124
|
'@deslop/coding-standards/no-hand-written-guard': "error";
|
|
4125
4125
|
'@deslop/coding-standards/no-let': "error";
|
|
4126
|
+
'@deslop/coding-standards/no-multiline-comment': "error";
|
|
4126
4127
|
'@deslop/coding-standards/no-native-control': "error";
|
|
4127
4128
|
'@deslop/coding-standards/no-native-emptiness-check': "error";
|
|
4128
4129
|
'@deslop/coding-standards/no-native-method-call': "error";
|
package/dist/oxlint.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as values, An as NodeInspectSymbol, Bn as symbol, C as filterMap, Cr as pipe, Ct as none, D as flatMap$1, Er as pipeArguments, Et as zipWith, F as isArrayNonEmpty, Gn as optimize, Hn as combine, J as take, K as some$1, M as getSomes, N as head, O as flatten, P as isArrayEmpty, Q as remove, R as join, Rn as byReferenceUnsafe, S as filter$1, St as match$1, T as findFirstIndex, Tt as some, U as of, Un as hash, V as map$1, W as prepend, Wn as number, X as get$2, Xn as hasProperty, Y as fromEntries, Yn as symbol$1, Zn as isBoolean, _ as dedupe, a as includes, ar as isNumber, b as ensure, c as startsWith, ct as contains, dt as firstSomeOf, f as TaggedError, ft as flatMap, g as contains$1, gt as getOrElse, h as appendAll, ht as fromUndefinedOr, i as Order, ir as isNullish$1, j as get$1, k as forEach, l as trim, lr as isReadonlyObject, lt as exists, m as append, mt as fromNullishOr, n as make$2, nr as isNotNullish, o as match, pt as flatten$1, q as sort, qn as string, r as update, s as split, st as all, t as get$3, tr as isNotNull, tt as fromOption, ur as isString, ut as filter, v as dropRight, w as findFirst, wt as orElse, x as every, xt as map, y as empty, yr as dual, yt as isSome, z as last, zn as equals } from "./MutableRef-WrqsqeER.mjs";
|
|
2
2
|
//#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/internal/graph.js
|
|
3
3
|
/** @internal */
|
|
4
4
|
const TypeId = "~effect/Graph";
|
|
@@ -1314,6 +1314,30 @@ const noLet = defineRule({
|
|
|
1314
1314
|
meta: { type: "problem" }
|
|
1315
1315
|
});
|
|
1316
1316
|
//#endregion
|
|
1317
|
+
//#region src/rules/no-multiline-comment.ts
|
|
1318
|
+
const directive = /^\s*(?:eslint|oxlint|@effect-diagnostics|@ts-|\/\s*<reference|#region|#endregion)/u;
|
|
1319
|
+
function adjacentLines(pair) {
|
|
1320
|
+
const first = pair.first;
|
|
1321
|
+
const second = pair.second;
|
|
1322
|
+
return first?.type === "Line" && second?.type === "Line" && second.loc.start.line === first.loc.end.line + 1;
|
|
1323
|
+
}
|
|
1324
|
+
const noMultilineComment = defineRule({
|
|
1325
|
+
create: (context) => ({ Program: () => {
|
|
1326
|
+
const comments = pipe(context.sourceCode.getAllComments(), filter$1((comment) => !directive.test(comment.value)));
|
|
1327
|
+
pipe(comments, filter$1((comment, index) => adjacentLines({
|
|
1328
|
+
first: comment,
|
|
1329
|
+
second: comments[index + 1]
|
|
1330
|
+
}) && !adjacentLines({
|
|
1331
|
+
first: comments[index - 1],
|
|
1332
|
+
second: comment
|
|
1333
|
+
}) || comment.type === "Block" && includes("\n")(trim(comment.value))), forEach((comment) => context.report({
|
|
1334
|
+
message: "A comment is one line that states an outside constraint; rename or split the code instead.",
|
|
1335
|
+
node: comment
|
|
1336
|
+
})));
|
|
1337
|
+
} }),
|
|
1338
|
+
meta: { type: "suggestion" }
|
|
1339
|
+
});
|
|
1340
|
+
//#endregion
|
|
1317
1341
|
//#region src/rules/no-native-control.ts
|
|
1318
1342
|
const primitives = {
|
|
1319
1343
|
button: "Button",
|
|
@@ -2142,6 +2166,9 @@ function redundantConstAlias(input) {
|
|
|
2142
2166
|
scope: input.context.sourceCode.getScope(input.node)
|
|
2143
2167
|
}), exists((alias) => filter$1(alias.references, (reference) => reference.isRead()).length === 1));
|
|
2144
2168
|
}
|
|
2169
|
+
function exportedAlias(input) {
|
|
2170
|
+
return input.node.parent.type === "VariableDeclaration" && input.node.parent.kind === "const" && input.node.parent.parent.type === "ExportNamedDeclaration" && input.node.id.type === "Identifier" && input.node.init?.type === "Identifier" && pipe(variableFor(input.context, input.node.init), exists((variable) => some$1(variable.defs, (definition) => definition.type === "ImportBinding" || definition.type === "FunctionName" || definition.type === "ClassName" || definition.node.type === "VariableDeclarator" && definition.node.parent.type === "VariableDeclaration" && definition.node.parent.kind === "const")));
|
|
2171
|
+
}
|
|
2145
2172
|
function singleUseLiteral(input) {
|
|
2146
2173
|
if (input.node.parent.type !== "VariableDeclaration" || input.node.parent.kind !== "const" || isExport(input.node.parent.parent) || input.node.id.type !== "Identifier" || input.node.id.typeAnnotation !== null || !(input.node.init?.type === "Literal" && !hasProperty(input.node.init, "regex") || input.node.init?.type === "TemplateLiteral" && isArrayEmpty(input.node.init.expressions))) return false;
|
|
2147
2174
|
return pipe(variableFromScope({
|
|
@@ -2220,6 +2247,13 @@ const noTrivialIndirection = defineRule({
|
|
|
2220
2247
|
});
|
|
2221
2248
|
},
|
|
2222
2249
|
VariableDeclarator: (node) => {
|
|
2250
|
+
if (exportedAlias({
|
|
2251
|
+
context,
|
|
2252
|
+
node
|
|
2253
|
+
})) context.report({
|
|
2254
|
+
message: "Export the value under one name; this second name is an alias.",
|
|
2255
|
+
node
|
|
2256
|
+
});
|
|
2223
2257
|
if (redundantConstAlias({
|
|
2224
2258
|
context,
|
|
2225
2259
|
node
|
|
@@ -2578,6 +2612,7 @@ const oxlint = defineConfig({
|
|
|
2578
2612
|
"@deslop/coding-standards/no-fake-ref-state": "error",
|
|
2579
2613
|
"@deslop/coding-standards/no-hand-written-guard": "error",
|
|
2580
2614
|
"@deslop/coding-standards/no-let": "error",
|
|
2615
|
+
"@deslop/coding-standards/no-multiline-comment": "error",
|
|
2581
2616
|
"@deslop/coding-standards/no-native-control": "error",
|
|
2582
2617
|
"@deslop/coding-standards/no-native-emptiness-check": "error",
|
|
2583
2618
|
"@deslop/coding-standards/no-native-method-call": "error",
|
|
@@ -3282,6 +3317,7 @@ var oxlint_default = definePlugin({
|
|
|
3282
3317
|
"no-fake-ref-state": noFakeRefState,
|
|
3283
3318
|
"no-hand-written-guard": noHandWrittenGuard,
|
|
3284
3319
|
"no-let": noLet,
|
|
3320
|
+
"no-multiline-comment": noMultilineComment,
|
|
3285
3321
|
"no-native-control": noNativeControl,
|
|
3286
3322
|
"no-native-emptiness-check": noNativeEmptinessCheck,
|
|
3287
3323
|
"no-native-method-call": noNativeMethodCall,
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# design evaluations
|
|
2
|
+
|
|
3
|
+
## design
|
|
4
|
+
|
|
5
|
+
### Task
|
|
6
|
+
|
|
7
|
+
Make importing records clear and comfortable on my iPhone, including progress, stopping and seeing what was kept. Show me the design before changing the service.
|
|
8
|
+
|
|
9
|
+
### Criteria
|
|
10
|
+
|
|
11
|
+
Judge the browser experience, not the amount of UI produced.
|
|
12
|
+
|
|
13
|
+
- Use the existing import workspace and realistic record names.
|
|
14
|
+
- Make idle, active, cancelled, completed and empty states understandable.
|
|
15
|
+
- Keep completed records visible when the import stops; distinguish stop from undo.
|
|
16
|
+
- Establish readable light and dark views at 390-point width, touch targets and keyboard access.
|
|
17
|
+
- Show an interactive design before backend changes; remove redundant controls and status text.
|
|
18
|
+
|
|
19
|
+
Inspect every visible state and transition. Grade hierarchy, behavior and readability independently of engineering and proof-capture quality. The user judges the final variants.
|
package/skills/design/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: 'UI and UX rules for product screens, creative pages and visual exp
|
|
|
5
5
|
|
|
6
6
|
# Design
|
|
7
7
|
|
|
8
|
-
Follow the repository's `CODING_STANDARDS.md`
|
|
8
|
+
Follow the engineering skill and the repository's `CODING_STANDARDS.md` when present; where it sets a style, such as square borders, it wins over this skill.
|
|
9
9
|
|
|
10
10
|
**The bar.** Build what people recommend for its polish and simplicity: Linear, T3 Code, Apple's own apps and apple.com. A person who is not technical uses it without help. The repository's existing screens are the floor, not the target.
|
|
11
11
|
|
|
@@ -124,7 +124,7 @@ Repair in this order: grouping, hierarchy, alignment, copy, then states. Recaptu
|
|
|
124
124
|
| Generic copy such as "seamless" or "Learn more" | Each label names its capability or the outcome |
|
|
125
125
|
| Content that waits for an entrance animation | The first frame is readable and actionable |
|
|
126
126
|
|
|
127
|
-
**Show the design
|
|
127
|
+
**Show the design.** Use screenshots for layout and short videos for behavior. Keep text readable on a phone, match the app's visual style and show the input, action and outcome without unrelated decoration. Evidence must show the real application.
|
|
128
128
|
|
|
129
129
|
## Creative mode
|
|
130
130
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# engineering evaluations
|
|
2
|
+
|
|
3
|
+
## engineering
|
|
4
|
+
|
|
5
|
+
### Task
|
|
6
|
+
|
|
7
|
+
Let me import a folder of data files, see progress and stop an import without losing completed records.
|
|
8
|
+
|
|
9
|
+
### Criteria
|
|
10
|
+
|
|
11
|
+
Judge the final patch and the full run, not task completion alone. Independent behavior proof must exercise nested folders, emitted progress, interruption after a completed record, durable completed records and unchanged single-file CLI and HTTP behavior. Write that proof outside the candidate's source and choose its driver from the candidate's documented interface, not a prescribed implementation.
|
|
12
|
+
|
|
13
|
+
- Use appropriate Effect primitives and the existing package boundaries.
|
|
14
|
+
- Keep both consumers on the shared service; remove the code, exports, configuration and docs the change supersedes.
|
|
15
|
+
- Use no unnecessary wrappers, runtimes, dependencies, retries or compatibility branches.
|
|
16
|
+
- Establish resource release and no further record writes after cancellation.
|
|
17
|
+
- List each corrective edit required before you would accept the patch.
|
|
18
|
+
|
|
19
|
+
Do not score agent-written test quality here; the testing case owns it. Passing behavior checks is a prerequisite, not the quality score. Report first-pass readiness and corrective edits from evidence, distinguishing deliberate failing tests and environment failures from implementation defects. Leave a fact unobserved when the trace cannot establish it.
|
|
@@ -3,15 +3,17 @@ name: engineering
|
|
|
3
3
|
description: 'TypeScript and Effect code conventions paired with shared lint. Use when designing, implementing or reviewing product and test code, including prototypes.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
**Scope.** Apply these rules and the repository's `CODING_STANDARDS.md
|
|
6
|
+
**Scope.** Apply these rules and the repository's `CODING_STANDARDS.md` when present, and write each line right the first time; lint is only the fallback. A refactor or cleanup request applies every rule to every line of the owned files. Scratch code outside the repository follows no style rule. Do not create a standards file just to satisfy this reference.
|
|
7
7
|
|
|
8
8
|
## Simplicity
|
|
9
9
|
|
|
10
10
|
**MVP.** Write the most direct code that meets the request today. Apply YAGNI to every file, function, branch, parameter, option, export, Layer, check, config value, library and abstraction; configure only what callers vary. Write functional, explicit code: pure functions over immutable data, effects only inside Effect, and Effect modules instead of hand-written helpers.
|
|
11
11
|
|
|
12
|
-
**Plan the shape.** Before writing, choose the file tree, entrypoints and the smallest mechanism per feature, checked against
|
|
12
|
+
**Plan the shape.** Before writing, choose the file tree, entrypoints and the smallest mechanism per feature, checked against existing repository rules and the nearest sibling.
|
|
13
13
|
|
|
14
|
-
**Clarity.** Code, names and files read top to bottom. Rename or split code instead of narrating it
|
|
14
|
+
**Clarity.** Code, names and files read top to bottom. Rename or split code instead of narrating it.
|
|
15
|
+
|
|
16
|
+
**Comments.** Default to no comments. Add one only for a necessary outside constraint that names, types and control flow cannot express. Keep it to one line. Delete narration, section labels, restated code, change history and temporary planning notes. Required diagnostic directives retain their reason.
|
|
15
17
|
|
|
16
18
|
**Reuse first.** Check existing code, installed modules and platform capabilities before adding code. Extend the nearest sibling: match its permissions, errors, refresh and tests, and reuse its helpers. Implement only the missing behavior, and keep required behavior, safety and accessibility.
|
|
17
19
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# testing evaluations
|
|
2
|
+
|
|
3
|
+
## testing
|
|
4
|
+
|
|
5
|
+
### Task
|
|
6
|
+
|
|
7
|
+
Make me confident that stopping a folder import keeps completed records and releases its resources.
|
|
8
|
+
|
|
9
|
+
### Criteria
|
|
10
|
+
|
|
11
|
+
This case supplies the folder-import implementation. Judge the agent's tests separately from engineering changes.
|
|
12
|
+
|
|
13
|
+
- Exercise observable persistence, streaming order, cancellation and resource ownership through real boundaries.
|
|
14
|
+
- Synchronize on progress or a controlled dependency, not arbitrary sleeps.
|
|
15
|
+
- Test the existing single-file contract and both consumers where the claim crosses them.
|
|
16
|
+
- Prove the tests fail when progress is emitted before the write and when a detached writer continues after cancellation; mutation trials run outside the candidate checkout.
|
|
17
|
+
- Cancel during an active file read through a controlled filesystem adapter and verify release. Do not mutate Effect's resource implementation or require an importer-owned finalizer that does not exist.
|
|
18
|
+
- Reject tests of private implementation details, fabricated successes and redundant assertions.
|
|
19
|
+
|
|
20
|
+
Report which defects each test detects and which remain uncovered. Do not reward test count or coverage percentage. Record merge readiness and effort separately.
|
package/skills/testing/SKILL.md
CHANGED
|
@@ -59,5 +59,5 @@ assert.strictEqual(Array.flatMap(attioProvider.groups, group => group.actions).l
|
|
|
59
59
|
- **Run.** Use the documented test selectors, and confirm that they collect and run the intended cases. Zero collected tests, setup alone or exit code 0 alone prove nothing.
|
|
60
60
|
- **Inventory.** Collect independent failures in one run instead of stopping at the first, and tell separate cases from repeated observations. Rerun a timed-out test once in isolation; a pass proves that run, not the cause. Never call a bypassed selector or a skipped operation flaky.
|
|
61
61
|
- **Evidence.** Keep the first failure, exact command, execution count and exit status. Separate cause from hypothesis, product defect from setup failure, and a skipped criterion from a passing one. A source read or a green command never replaces a missing behavior check.
|
|
62
|
-
- **Final proof.** A check proves only the source, dependencies and configuration it ran on, so reconcile every required behavior on the final code. Screenshots and video prove visible outcomes; execution through the public interface proves the rest.
|
|
63
|
-
- **Visual proof.**
|
|
62
|
+
- **Final proof.** A check proves only the source, dependencies and configuration it ran on, so reconcile every required behavior on the final code. Release proof uses the production build, not the development server. Screenshots and video prove visible outcomes; execution through the public interface proves the rest.
|
|
63
|
+
- **Visual proof.** Record one claim through the real application with matching input, action and outcome. Keep every meaningful step. A capture is stale once a component it shows changes. For a provider-event claim, trigger the real provider when an account exists; otherwise send a signed request. When only the user can do the provider-side step, prepare a guide.
|