@jjchill/probity-rules 0.4.16 → 0.4.17
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/CHANGELOG.md +91 -0
- package/dist/presets/driving-adapter.d.ts +39 -0
- package/dist/presets/driving-adapter.d.ts.map +1 -0
- package/dist/presets/driving-adapter.js +33 -0
- package/dist/presets/driving-adapter.js.map +1 -0
- package/dist/presets/js.d.ts +1 -1
- package/dist/presets/js.d.ts.map +1 -1
- package/dist/presets/js.js +19 -32
- package/dist/presets/js.js.map +1 -1
- package/dist/presets/kmp.d.ts +31 -0
- package/dist/presets/kmp.d.ts.map +1 -1
- package/dist/presets/kmp.js +19 -1
- package/dist/presets/kmp.js.map +1 -1
- package/dist/presets/kotlin.d.ts +32 -0
- package/dist/presets/kotlin.d.ts.map +1 -1
- package/dist/presets/kotlin.js +19 -1
- package/dist/presets/kotlin.js.map +1 -1
- package/dist/rules/kotlin.d.ts +39 -0
- package/dist/rules/kotlin.d.ts.map +1 -1
- package/dist/rules/kotlin.js +169 -0
- package/dist/rules/kotlin.js.map +1 -1
- package/dist/rules/ports-and-adapters.d.ts +53 -0
- package/dist/rules/ports-and-adapters.d.ts.map +1 -1
- package/dist/rules/ports-and-adapters.js +112 -20
- package/dist/rules/ports-and-adapters.js.map +1 -1
- package/package.json +1 -1
- package/probity.config.kmp.ts +5 -0
- package/probity.config.kotlin.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,96 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.17
|
|
4
|
+
|
|
5
|
+
The Kotlin and KMP presets can now keep driving adapters thin (#76):
|
|
6
|
+
Compose screens and CLI commands, in the same repo as the core or in a
|
|
7
|
+
separate app that consumes it as a library. Opt-in.
|
|
8
|
+
|
|
9
|
+
- **What was missing.** 0.4.16 wired `enforceThinDrivingAdapter` and
|
|
10
|
+
`forbidNewDomainDiscriminantChecks` into the JS preset only. Kotlin
|
|
11
|
+
had three more gaps:
|
|
12
|
+
- Its discriminant screen matched only string literals, but Kotlin
|
|
13
|
+
compares to enum entries (`role == Role.SUPER_USER`).
|
|
14
|
+
- The export list only read JS/TS `export` declarations.
|
|
15
|
+
- A UI-only app depending on the core as a library has no core
|
|
16
|
+
source to scan at all.
|
|
17
|
+
- **Opt-in, unlike JS.** `kotlinRuleEntries` and `kmpRuleEntries` get
|
|
18
|
+
a `drivingAdapterGlobs` option with **no default**. A core-only repo
|
|
19
|
+
(mysudo-core has no `@Composable` files) has no UI, so a default glob
|
|
20
|
+
would only show up as `DEAD SCOPE`. Upgrading changes nothing until
|
|
21
|
+
the option is set. When set, the block is listed before the TDD
|
|
22
|
+
judge, and `coreGlobs` are excluded from it (in KMP, that keeps
|
|
23
|
+
`presentation/` ViewModels core). Starting globs per layout are in
|
|
24
|
+
hooks/PROBITY.md, "Driving adapters by project layout".
|
|
25
|
+
- **New options** (both presets):
|
|
26
|
+
- `domainDiscriminants`: turns on the free screen with Kotlin
|
|
27
|
+
patterns. It blocks net-new `role == Role.X` (either order) or
|
|
28
|
+
string-literal comparisons, `when (viewer.role)` subjects, and
|
|
29
|
+
`status is Status.Draft`.
|
|
30
|
+
- `domainHint`: appended to the screen's deny.
|
|
31
|
+
- `coreExportsInJudge`: the judge gets the public names declared in
|
|
32
|
+
`coreGlobs` sources. Capped at `coreExportsMaxChars`, default
|
|
33
|
+
16,000.
|
|
34
|
+
- `coreApiPaths`: for a UI-only app. The judge gets the core's public
|
|
35
|
+
API read from binary-compatibility-validator dumps (`.api` and
|
|
36
|
+
`.klib.api`, as files or directories). Generated members (getters,
|
|
37
|
+
`component1`, `copy`, `equals`…) are dropped; on kotlinx.coroutines'
|
|
38
|
+
real dumps this cuts 125 KB to about 10 KB.
|
|
39
|
+
- **Kotlin judge addendum** (`KOTLIN_DRIVING_ADAPTER_ADDENDUM`). A CLI
|
|
40
|
+
command's options, help text, precondition checks and exhaustive
|
|
41
|
+
`when` over its use case's sealed outcome (to exit code, error code,
|
|
42
|
+
message and JSON) are translation. Branching on domain state,
|
|
43
|
+
retrying, or chaining use cases is not. It also lists Compose view
|
|
44
|
+
state and wiring (`remember`, `collectAsState`, `LaunchedEffect`
|
|
45
|
+
forwarding one intent, `@Preview`) as allowed.
|
|
46
|
+
- **Export scanning (all presets).** Nested worktrees and submodules
|
|
47
|
+
(a directory with a `.git` file, such as `.claude/worktrees/*`) are
|
|
48
|
+
skipped, as the parity rule already does (#55). Paths are printed
|
|
49
|
+
relative to the directory the modules share. On mysudo-core, the
|
|
50
|
+
worktree copies would otherwise have filled the cap several times
|
|
51
|
+
over. Kotlin nested types (mostly sealed-outcome cases) are left out,
|
|
52
|
+
which takes mysudo-core's core list from 29,000 to 13,000 characters.
|
|
53
|
+
- **Shared block.** `presets/driving-adapter.ts` (`drivingAdapterBlock`)
|
|
54
|
+
builds the block for all three presets. The JS preset's wiring is
|
|
55
|
+
unchanged.
|
|
56
|
+
- **Measured** with Probity's real Claude Code judge, wired as the KMP
|
|
57
|
+
preset wires it, 5 runs per case.
|
|
58
|
+
- **mysudo-core's CLI** (`cli/src/main/**/commands/**`, its real
|
|
59
|
+
`coreGlobs`, `coreExportsInJudge: true`):
|
|
60
|
+
- Allowed: four real writes (adding the real `sudos delete`
|
|
61
|
+
command, the real `RegisterCommand` with its extra read for
|
|
62
|
+
display, the real 432-line `PhoneCallsCommand`, and a help-text
|
|
63
|
+
change).
|
|
64
|
+
- Blocked: four splices into real commands (label validation the
|
|
65
|
+
`CreateSudo` use case already does; a last-Sudo rule plus a retry
|
|
66
|
+
in `delete`; a role/status filter in `list`; a locked-account
|
|
67
|
+
sign-out-and-deregister policy in `register`).
|
|
68
|
+
- Result: 40/40 correct. The free screen caught the two enum cases
|
|
69
|
+
before any AI call.
|
|
70
|
+
- **Synthetic Compose versions** of the #72 cases (blocked) and
|
|
71
|
+
controls (allowed: a pure render change, calling `canApprove()`,
|
|
72
|
+
one ViewModel intent, local `remember` state): 40/40 correct.
|
|
73
|
+
- **Addendum check.** Without the Kotlin addendum, the CLI set was
|
|
74
|
+
also correct (39/39 verdicts, 1 run failed on the judge's login).
|
|
75
|
+
So the addendum is guidance these cases didn't need, not a measured
|
|
76
|
+
fix.
|
|
77
|
+
- **Scope.** `probity-scope-report` was run on mysudo-core's tree from
|
|
78
|
+
a scratch copy of its config. Relative globs are anchored to the
|
|
79
|
+
config's own directory, so that copy used the unanchored
|
|
80
|
+
`**/cli/src/main/**/commands/**`. It reported the block with no
|
|
81
|
+
warning but also matched `.claude/worktrees/` copies (123 files). In
|
|
82
|
+
mysudo-core's own config, the anchored `cli/src/main/**/commands/**`
|
|
83
|
+
matches the 31 command files. A scope-report test confirms the block
|
|
84
|
+
leaves out `Composition.kt`.
|
|
85
|
+
- New exports: `drivingAdapterBlock` (`presets/driving-adapter`).
|
|
86
|
+
`ExportLanguage`, `JS_EXPORTS`, `ApiDumpFormat` and
|
|
87
|
+
`listPublishedApi` (`rules/ports-and-adapters`). `kotlinExportedNames`,
|
|
88
|
+
`KOTLIN_EXPORTS`, `readKotlinApiDump`, `KOTLIN_API_DUMP`,
|
|
89
|
+
`kotlinDomainDiscriminantPatterns` and `KOTLIN_DRIVING_ADAPTER_ADDENDUM`
|
|
90
|
+
(`rules/kotlin`). `forbidNewDomainDiscriminantChecks` takes
|
|
91
|
+
`patternsFor`; `enforceThinDrivingAdapter` takes `publishedApi` and a
|
|
92
|
+
`coreExports.language`.
|
|
93
|
+
|
|
3
94
|
## 0.4.16
|
|
4
95
|
|
|
5
96
|
The JS preset now keeps driving adapters (UI components, pages, route
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The thin-driving-adapter block (issues #72, #76), built once for
|
|
3
|
+
* every preset: the free discriminant screen when discriminants are
|
|
4
|
+
* configured, then the AI judge, wrapped in the same failure
|
|
5
|
+
* diagnostics and contradiction retry as the presets' TDD judges.
|
|
6
|
+
* Presets list it before their TDD block, so a denial costs one AI
|
|
7
|
+
* call, not two.
|
|
8
|
+
*/
|
|
9
|
+
import type { RuleEntry } from '@nizos/probity';
|
|
10
|
+
import type { NamedPattern } from '../rules/gates.js';
|
|
11
|
+
import { type ApiDumpFormat, type ExportLanguage } from '../rules/ports-and-adapters.js';
|
|
12
|
+
export type DrivingAdapterBlockOptions = {
|
|
13
|
+
/** Driving-adapter files. No include glob → no block. */
|
|
14
|
+
globs: readonly string[];
|
|
15
|
+
/** Core scope, excluded: core code is never a driving adapter. */
|
|
16
|
+
coreGlobs: readonly string[];
|
|
17
|
+
/** Fields whose literal comparison is a domain decision. */
|
|
18
|
+
domainDiscriminants?: readonly string[];
|
|
19
|
+
/** Appended to the discriminant screen's deny. */
|
|
20
|
+
domainHint?: string;
|
|
21
|
+
/** Builds the discriminant patterns (default: JS/TS literals). */
|
|
22
|
+
patternsFor?: (discriminants: readonly string[]) => NamedPattern[];
|
|
23
|
+
/** Give the judge the export names of `coreGlobs` sources. */
|
|
24
|
+
coreExports?: {
|
|
25
|
+
root?: string;
|
|
26
|
+
language?: ExportLanguage;
|
|
27
|
+
maxChars?: number;
|
|
28
|
+
};
|
|
29
|
+
/** Give the judge the public API read from published dumps. */
|
|
30
|
+
publishedApi?: {
|
|
31
|
+
paths: readonly string[];
|
|
32
|
+
format: ApiDumpFormat;
|
|
33
|
+
root?: string;
|
|
34
|
+
};
|
|
35
|
+
/** Extends or replaces the judge's rules text. */
|
|
36
|
+
instructions?: string | ((defaults: string) => string);
|
|
37
|
+
};
|
|
38
|
+
export declare function drivingAdapterBlock(options: DrivingAdapterBlockOptions): RuleEntry | undefined;
|
|
39
|
+
//# sourceMappingURL=driving-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driving-adapter.d.ts","sourceRoot":"","sources":["../../presets/driving-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAA;AAEvC,MAAM,MAAM,0BAA0B,GAAG;IACvC,yDAAyD;IACzD,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,kEAAkE;IAClE,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;IAC5B,4DAA4D;IAC5D,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kEAAkE;IAClE,WAAW,CAAC,EAAE,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,KAAK,YAAY,EAAE,CAAA;IAClE,8DAA8D;IAC9D,WAAW,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC7E,+DAA+D;IAC/D,YAAY,CAAC,EAAE;QAAE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,aAAa,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACjF,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;CACvD,CAAA;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,SAAS,GAAG,SAAS,CAgC9F"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { withContradictionRetry, withJudgeFailureDiagnostics } from '../rules/gates.js';
|
|
2
|
+
import { enforceThinDrivingAdapter, forbidNewDomainDiscriminantChecks, } from '../rules/ports-and-adapters.js';
|
|
3
|
+
export function drivingAdapterBlock(options) {
|
|
4
|
+
if (!options.globs.some((glob) => !glob.startsWith('!')))
|
|
5
|
+
return undefined;
|
|
6
|
+
const [first, ...rest] = [
|
|
7
|
+
...options.globs,
|
|
8
|
+
...options.coreGlobs.filter((glob) => !glob.startsWith('!')).map((glob) => `!${glob}`),
|
|
9
|
+
];
|
|
10
|
+
return {
|
|
11
|
+
files: [first, ...rest],
|
|
12
|
+
rules: [
|
|
13
|
+
...(options.domainDiscriminants?.length
|
|
14
|
+
? [
|
|
15
|
+
forbidNewDomainDiscriminantChecks({
|
|
16
|
+
discriminants: options.domainDiscriminants,
|
|
17
|
+
domainHint: options.domainHint,
|
|
18
|
+
patternsFor: options.patternsFor,
|
|
19
|
+
}),
|
|
20
|
+
]
|
|
21
|
+
: []),
|
|
22
|
+
withJudgeFailureDiagnostics(withContradictionRetry(enforceThinDrivingAdapter({
|
|
23
|
+
coreExports: options.coreExports && {
|
|
24
|
+
globs: options.coreGlobs,
|
|
25
|
+
...options.coreExports,
|
|
26
|
+
},
|
|
27
|
+
publishedApi: options.publishedApi,
|
|
28
|
+
instructions: options.instructions,
|
|
29
|
+
}))),
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=driving-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driving-adapter.js","sourceRoot":"","sources":["../../presets/driving-adapter.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AACvF,OAAO,EACL,yBAAyB,EACzB,iCAAiC,GAGlC,MAAM,gCAAgC,CAAA;AAqBvC,MAAM,UAAU,mBAAmB,CAAC,OAAmC;IACrE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,SAAS,CAAA;IAC1E,MAAM,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG;QACvB,GAAG,OAAO,CAAC,KAAK;QAChB,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;KACvF,CAAA;IACD,OAAO;QACL,KAAK,EAAE,CAAC,KAAM,EAAE,GAAG,IAAI,CAAC;QACxB,KAAK,EAAE;YACL,GAAG,CAAC,OAAO,CAAC,mBAAmB,EAAE,MAAM;gBACrC,CAAC,CAAC;oBACE,iCAAiC,CAAC;wBAChC,aAAa,EAAE,OAAO,CAAC,mBAAmB;wBAC1C,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,WAAW,EAAE,OAAO,CAAC,WAAW;qBACjC,CAAC;iBACH;gBACH,CAAC,CAAC,EAAE,CAAC;YACP,2BAA2B,CACzB,sBAAsB,CACpB,yBAAyB,CAAC;gBACxB,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI;oBAClC,KAAK,EAAE,OAAO,CAAC,SAAS;oBACxB,GAAG,OAAO,CAAC,WAAW;iBACvB;gBACD,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,YAAY,EAAE,OAAO,CAAC,YAAY;aACnC,CAAC,CACH,CACF;SACF;KACF,CAAA;AACH,CAAC"}
|
package/dist/presets/js.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type JsPresetOptions = {
|
|
|
23
23
|
* `src/components/**` and every `.tsx` under `src/`, minus tests
|
|
24
24
|
* and stories. Pass `[]` to switch
|
|
25
25
|
* the thinness rules off. */
|
|
26
|
-
drivingAdapterGlobs?:
|
|
26
|
+
drivingAdapterGlobs?: readonly string[];
|
|
27
27
|
/** Field names whose comparison to a literal in a driving adapter is
|
|
28
28
|
* a domain decision (e.g. `['role', 'plan']`). OFF by default —
|
|
29
29
|
* `status === 'loading'` is ordinary view state, so only your model
|
package/dist/presets/js.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../presets/js.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"js.d.ts","sourceRoot":"","sources":["../../presets/js.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAerE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAGhD,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAA;AAGrC;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,QAC2O,CAAA;AAEpR,MAAM,MAAM,eAAe,GAAG;IAC5B;qDACiD;IACjD,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,oEAAoE;IACpE,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B;+CAC2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;kCAK8B;IAC9B,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC;;;;gDAI4C;IAC5C,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B;oDACgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;iBAGa;IACb,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;2BACuB;IACvB,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB;wDACoD;IACpD,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB;sDACkD;IAClD,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB;oBACgB;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,wCAAwC;IACxC,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,0CAA0C;IAC1C,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,KAAK,CAAA;IAC3B;;wCAEoC;IACpC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB;qEACiE;IACjE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;mCAG+B;IAC/B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5B,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;oEACgE;IAChE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,eAAoB,GAAG,SAAS,EAAE,CAwLxE"}
|
package/dist/presets/js.js
CHANGED
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
import { basename } from 'node:path';
|
|
21
21
|
import { forbidContentPattern } from '@nizos/probity';
|
|
22
22
|
import { enforceAcceptanceLanguage } from '../rules/acceptance-language.js';
|
|
23
|
-
import { forbidNewAmbientEffects, JS_AMBIENT_EFFECT_PATTERNS, requireGreenTestRun,
|
|
23
|
+
import { forbidNewAmbientEffects, JS_AMBIENT_EFFECT_PATTERNS, requireGreenTestRun, } from '../rules/gates.js';
|
|
24
24
|
import { enforceJsTdd } from '../rules/js-tdd.js';
|
|
25
|
-
import { enforcePortsBoundary,
|
|
25
|
+
import { enforcePortsBoundary, forbidInternalModuleMocks, } from '../rules/ports-and-adapters.js';
|
|
26
26
|
import { withExcludeGlobs } from '../rules/scoping.js';
|
|
27
|
+
import { drivingAdapterBlock } from './driving-adapter.js';
|
|
27
28
|
import { enforceSpecTestParity, JS_TEST_DECLARATION, requireSpecBackedAcceptanceTest, surfaceScenarioLinkBreakage, } from '../rules/spec-test-parity.js';
|
|
28
29
|
import { surfaceGlossaryTermBreakage } from '../rules/ubiquitous-language.js';
|
|
29
30
|
/**
|
|
@@ -46,17 +47,13 @@ export function jsRuleEntries(options = {}) {
|
|
|
46
47
|
const tddGlobs = options.tddGlobs ?? ['src/**', 'test/**', 'tests/**'];
|
|
47
48
|
const specGlobs = options.specGlobs ?? ['specs/**', 'acceptance/**', '**/*.feature'];
|
|
48
49
|
const excludeGlobs = options.excludeGlobs ?? ['spikes/**', '**/build/**'];
|
|
49
|
-
const drivingAdapterGlobs = [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
'!**/*.stories.*',
|
|
57
|
-
]),
|
|
58
|
-
// Core code is never a driving adapter, even as .tsx.
|
|
59
|
-
...coreGlobs.filter((glob) => !glob.startsWith('!')).map((glob) => `!${glob}`),
|
|
50
|
+
const drivingAdapterGlobs = options.drivingAdapterGlobs ?? [
|
|
51
|
+
'src/ui/**',
|
|
52
|
+
'src/components/**',
|
|
53
|
+
'src/**/*.tsx',
|
|
54
|
+
'!**/*.test.*',
|
|
55
|
+
'!**/*.spec.*',
|
|
56
|
+
'!**/*.stories.*',
|
|
60
57
|
];
|
|
61
58
|
const entries = [
|
|
62
59
|
// ── Boundaries: ports-and-adapters ──────────────────────────────
|
|
@@ -99,25 +96,15 @@ export function jsRuleEntries(options = {}) {
|
|
|
99
96
|
// "tested"). The free discriminant screen runs first when
|
|
100
97
|
// configured; the judge runs before the TDD judge, so a denial here
|
|
101
98
|
// costs one AI call, not two.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
domainHint: options.domainHint,
|
|
112
|
-
}),
|
|
113
|
-
]
|
|
114
|
-
: []),
|
|
115
|
-
withJudgeFailureDiagnostics(withContradictionRetry(enforceThinDrivingAdapter({
|
|
116
|
-
coreExports: options.coreExportsInJudge ? { globs: coreGlobs } : undefined,
|
|
117
|
-
}))),
|
|
118
|
-
],
|
|
119
|
-
});
|
|
120
|
-
}
|
|
99
|
+
const drivingAdapter = drivingAdapterBlock({
|
|
100
|
+
globs: drivingAdapterGlobs,
|
|
101
|
+
coreGlobs,
|
|
102
|
+
domainDiscriminants: options.domainDiscriminants,
|
|
103
|
+
domainHint: options.domainHint,
|
|
104
|
+
coreExports: options.coreExportsInJudge ? {} : undefined,
|
|
105
|
+
});
|
|
106
|
+
if (drivingAdapter)
|
|
107
|
+
entries.push(drivingAdapter);
|
|
121
108
|
// Spec-to-test traceability (issue #18): OFF by default, so a
|
|
122
109
|
// project that hasn't opted in sees no behavior change. Setting
|
|
123
110
|
// `specsDir` wires the same set the KMP preset wires — deterministic
|
package/dist/presets/js.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../presets/js.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAE,oBAAoB,EAAkB,MAAM,gBAAgB,CAAA;AAErE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../presets/js.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAE,oBAAoB,EAAkB,MAAM,gBAAgB,CAAA;AAErE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,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en's deny text (default: function-typed
|
|
49
49
|
* providers such as `nowEpochMillis: () -> Long`). */
|
|
50
50
|
seamHint?: string;
|
|
51
|
+
/** Driving (inbound) adapter files held thin by
|
|
52
|
+
* `enforceThinDrivingAdapter`: Compose screens, CLI commands, route
|
|
53
|
+
* handlers. OFF unless set — a core-only module has none, so a
|
|
54
|
+
* default glob would only be a dead scope. `coreGlobs` are always
|
|
55
|
+
* excluded (so `presentation/` ViewModels stay core). Starting
|
|
56
|
+
* points:
|
|
57
|
+
* - UI in this repo: `['**\/composeApp/src/**', '**\/src/*Main/**\/ui/**', '!**\/*Preview*.kt']`
|
|
58
|
+
* - a CLI module: `['cli/src/main/**\/commands/**']`
|
|
59
|
+
* - a UI-only app on a core SDK: its `ui/` packages, plus `coreApiPaths`.
|
|
60
|
+
* Every matching write costs an AI call, before the TDD judge. */
|
|
61
|
+
drivingAdapterGlobs?: readonly string[];
|
|
62
|
+
/** Fields whose comparison to a domain value in a driving adapter is
|
|
63
|
+
* a domain decision (e.g. `['role', 'status']`): net-new
|
|
64
|
+
* `role == Role.ADMIN`, `when (viewer.role)` or `status is
|
|
65
|
+
* Status.Draft` block free, before the AI call. No default. */
|
|
66
|
+
domainDiscriminants?: string[];
|
|
67
|
+
/** Appended to the discriminant block message, e.g. where permission
|
|
68
|
+
* rules live. */
|
|
69
|
+
domainHint?: string;
|
|
70
|
+
/** Give the thin-driving-adapter judge the public names declared in
|
|
71
|
+
* `coreGlobs` sources, so it can name the existing function a copy
|
|
72
|
+
* duplicates. Scans the tree on each judged write. */
|
|
73
|
+
coreExportsInJudge?: boolean;
|
|
74
|
+
/** Cap on the export list the judge is given (default 16000
|
|
75
|
+
* characters; the list is truncated beyond it). */
|
|
76
|
+
coreExportsMaxChars?: number;
|
|
77
|
+
/** For a repo that consumes the core as a library: binary-
|
|
78
|
+
* compatibility-validator dumps (`.api`, `.klib.api`), as files or
|
|
79
|
+
* directories relative to the root, whose public API the
|
|
80
|
+
* thin-driving-adapter judge is given. */
|
|
81
|
+
coreApiPaths?: string[];
|
|
51
82
|
/** Names your telemetry convention for the adapter-observability
|
|
52
83
|
* judge — how a boundary event is recorded in this codebase
|
|
53
84
|
* (default: a :foundation `Logger.event` or port-tap convention). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kmp.d.ts","sourceRoot":"","sources":["../../presets/kmp.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAKrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"kmp.d.ts","sourceRoot":"","sources":["../../presets/kmp.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAKrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAQhD,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAA;AA4BrC;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;uEACmE;IACnE,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;6CAEyC;IACzC,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,KAAK,CAAA;IAC3B,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB;qEACiE;IACjE,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;gEAC4D;IAC5D,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5B,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;oEACgE;IAChE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;;6BAGyB;IACzB,uBAAuB,CAAC,EAAE,KAAK,CAAA;IAC/B;;2DAEuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;;uEASmE;IACnE,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC;;;oEAGgE;IAChE,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B;sBACkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;2DAEuD;IACvD,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;wDACoD;IACpD,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;+CAG2C;IAC3C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;0EAEsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,SAAS,EAAE,CAySxF"}
|
package/dist/presets/kmp.js
CHANGED
|
@@ -22,9 +22,10 @@ import { enforceKotlinTdd } from '../internal/kotlin-tdd.js';
|
|
|
22
22
|
import { withExtractionUnderGreen } from '../rules/gates.js';
|
|
23
23
|
import { enforceAcceptanceLanguage, withAcceptanceLanguageFastPath, } from '../rules/acceptance-language.js';
|
|
24
24
|
import { withExcludeGlobs } from '../rules/scoping.js';
|
|
25
|
+
import { drivingAdapterBlock } from './driving-adapter.js';
|
|
25
26
|
import { enforceSpecTestParity, requireSpecBackedAcceptanceTest, surfaceScenarioLinkBreakage, } from '../rules/spec-test-parity.js';
|
|
26
27
|
import { surfaceGlossaryTermBreakage } from '../rules/ubiquitous-language.js';
|
|
27
|
-
import { enforceCharacterizationResolution, enforceProbeReversion, forbidNewAmbientEffects, GRADLE_TEST_COMMAND, KOTLIN_BOUNDARY_ADDENDUM, KOTLIN_INFRASTRUCTURE_IMPORTS, KOTLIN_PRODUCTION_SOURCE_PATTERN, KOTLIN_TEST_SOURCE_PATTERN, kotlinGreenRunOptions, MOCKING_LIBRARY_IMPORTS, requireGreenTestRun, withCharacterizationTest, withKotlinFastPath, withMutationProbe, withTelemetryFastPath, } from '../rules/kotlin.js';
|
|
28
|
+
import { enforceCharacterizationResolution, enforceProbeReversion, forbidNewAmbientEffects, GRADLE_TEST_COMMAND, KOTLIN_API_DUMP, KOTLIN_BOUNDARY_ADDENDUM, KOTLIN_DRIVING_ADAPTER_ADDENDUM, KOTLIN_EXPORTS, kotlinDomainDiscriminantPatterns, KOTLIN_INFRASTRUCTURE_IMPORTS, KOTLIN_PRODUCTION_SOURCE_PATTERN, KOTLIN_TEST_SOURCE_PATTERN, kotlinGreenRunOptions, MOCKING_LIBRARY_IMPORTS, requireGreenTestRun, withCharacterizationTest, withKotlinFastPath, withMutationProbe, withTelemetryFastPath, } from '../rules/kotlin.js';
|
|
28
29
|
import { enforceAdapterObservability, enforcePortsBoundary, } from '../rules/ports-and-adapters.js';
|
|
29
30
|
/**
|
|
30
31
|
* The rule entries, as a factory over the project root. Probity only
|
|
@@ -77,6 +78,22 @@ export function kmpRuleEntries(root, options = {}) {
|
|
|
77
78
|
// listed before any AI-validated rule (a model call per matching
|
|
78
79
|
// write). A write with a vendor import in core code must be
|
|
79
80
|
// rejected by the free import screen, not after a TDD model call.
|
|
81
|
+
// Driving adapters must be thin (issues #72, #76). Opt-in: listed
|
|
82
|
+
// before the TDD block, so a denial costs one AI call, not two.
|
|
83
|
+
const drivingAdapter = drivingAdapterBlock({
|
|
84
|
+
globs: options.drivingAdapterGlobs ?? [],
|
|
85
|
+
coreGlobs,
|
|
86
|
+
domainDiscriminants: options.domainDiscriminants,
|
|
87
|
+
domainHint: options.domainHint,
|
|
88
|
+
patternsFor: kotlinDomainDiscriminantPatterns,
|
|
89
|
+
coreExports: options.coreExportsInJudge
|
|
90
|
+
? { root, language: KOTLIN_EXPORTS, maxChars: options.coreExportsMaxChars ?? 16000 }
|
|
91
|
+
: undefined,
|
|
92
|
+
publishedApi: options.coreApiPaths?.length
|
|
93
|
+
? { paths: options.coreApiPaths, format: KOTLIN_API_DUMP, root }
|
|
94
|
+
: undefined,
|
|
95
|
+
instructions: (defaults) => defaults + KOTLIN_DRIVING_ADAPTER_ADDENDUM,
|
|
96
|
+
});
|
|
80
97
|
const entries = [
|
|
81
98
|
// ── Deterministic wall ───────────────────────────────────────────
|
|
82
99
|
// Core import/effect screens. The import screen also catches Koin
|
|
@@ -162,6 +179,7 @@ export function kmpRuleEntries(root, options = {}) {
|
|
|
162
179
|
// marked `// probity: characterization` passes, and
|
|
163
180
|
// enforceCharacterizationResolution below blocks commits until the
|
|
164
181
|
// marker comes off through a recorded red under a mutation probe.
|
|
182
|
+
...(drivingAdapter ? [drivingAdapter] : []),
|
|
165
183
|
{
|
|
166
184
|
files: [
|
|
167
185
|
'**/src/*Main/kotlin/**',
|
package/dist/presets/kmp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kmp.js","sourceRoot":"","sources":["../../presets/kmp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAE/C,OAAO,EAAE,oBAAoB,EAAkB,MAAM,gBAAgB,CAAA;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAI5D,OAAO,EACL,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,2BAA2B,GAE5B,MAAM,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adapter/data packages that must carry boundary observability. */
|
|
32
32
|
adapterGlobs?: Globs;
|
|
33
|
+
/** Driving (inbound) adapter files held thin by
|
|
34
|
+
* `enforceThinDrivingAdapter`: Compose screens, CLI commands, route
|
|
35
|
+
* handlers. OFF unless set — a core-only module has none, so a
|
|
36
|
+
* default glob would only be a dead scope. `coreGlobs` are always
|
|
37
|
+
* excluded, so whether a ViewModel is an adapter or a presenter in
|
|
38
|
+
* the core is decided by which of the two scopes its package
|
|
39
|
+
* matches. Starting points:
|
|
40
|
+
* - UI in this repo: `['**\/composeApp/src/**', '**\/src/*Main/**\/ui/**', '!**\/*Preview*.kt']`
|
|
41
|
+
* - a CLI module: `['cli/src/main/**\/commands/**']`
|
|
42
|
+
* - a UI-only app on a core SDK: its `ui/` packages, plus `coreApiPaths`.
|
|
43
|
+
* Every matching write costs an AI call, before the TDD judge. */
|
|
44
|
+
drivingAdapterGlobs?: readonly string[];
|
|
45
|
+
/** Fields whose comparison to a domain value in a driving adapter is
|
|
46
|
+
* a domain decision (e.g. `['role', 'status']`): net-new
|
|
47
|
+
* `role == Role.ADMIN`, `when (viewer.role)` or `status is
|
|
48
|
+
* Status.Draft` block free, before the AI call. No default. */
|
|
49
|
+
domainDiscriminants?: string[];
|
|
50
|
+
/** Appended to the discriminant block message, e.g. where permission
|
|
51
|
+
* rules live. */
|
|
52
|
+
domainHint?: string;
|
|
53
|
+
/** Give the thin-driving-adapter judge the public names declared in
|
|
54
|
+
* `coreGlobs` sources, so it can name the existing function a copy
|
|
55
|
+
* duplicates. Scans the tree on each judged write. */
|
|
56
|
+
coreExportsInJudge?: boolean;
|
|
57
|
+
/** Cap on the export list the judge is given (default 16000
|
|
58
|
+
* characters; the list is truncated beyond it). */
|
|
59
|
+
coreExportsMaxChars?: number;
|
|
60
|
+
/** For a repo that consumes the core as a library: binary-
|
|
61
|
+
* compatibility-validator dumps (`.api`, `.klib.api`), as files or
|
|
62
|
+
* directories relative to the root, whose public API the
|
|
63
|
+
* thin-driving-adapter judge is given. */
|
|
64
|
+
coreApiPaths?: string[];
|
|
33
65
|
/** The real Gradle test task your commit gate should look for. */
|
|
34
66
|
commitCommand?: RegExp;
|
|
35
67
|
/** Globs excluded (as `!`-negations) from every files-scoped block —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kotlin.d.ts","sourceRoot":"","sources":["../../presets/kotlin.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"kotlin.d.ts","sourceRoot":"","sources":["../../presets/kotlin.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAmCrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAKhD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;iDAE6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;kEAE8D;IAC9D,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,uEAAuE;IACvE,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;qBAGiB;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;oDACgD;IAChD,eAAe,CAAC,EAAE,KAAK,CAAA;IACvB,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,KAAK,CAAA;IAC3B;sCACkC;IAClC,uBAAuB,CAAC,EAAE,KAAK,CAAA;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,oEAAoE;IACpE,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB;;;;;;;;;;uEAUmE;IACnE,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC;;;oEAGgE;IAChE,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B;sBACkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;2DAEuD;IACvD,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;wDACoD;IACpD,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;+CAG2C;IAC3C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;oEACgE;IAChE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,SAAS,EAAE,CA8M9F"}
|
package/dist/presets/kotlin.js
CHANGED
|
@@ -18,10 +18,11 @@ import { forbidContentPattern } from '@nizos/probity';
|
|
|
18
18
|
import { enforceKotlinTdd } from '../internal/kotlin-tdd.js';
|
|
19
19
|
import { withExtractionUnderGreen } from '../rules/gates.js';
|
|
20
20
|
import { enforceAcceptanceLanguage, withAcceptanceLanguageFastPath, } from '../rules/acceptance-language.js';
|
|
21
|
-
import { enforceCharacterizationResolution, enforceProbeReversion, forbidNewAmbientEffects, forbidStaticMocks, GRADLE_TEST_COMMAND, KOTLIN_BOUNDARY_ADDENDUM, KOTLIN_INFRASTRUCTURE_IMPORTS, KOTLIN_PRODUCTION_SOURCE_PATTERN, KOTLIN_TEST_SOURCE_PATTERN, kotlinGreenRunOptions, requireGreenTestRun, withCharacterizationTest, withKotlinFastPath, withMutationProbe, withTelemetryFastPath, } from '../rules/kotlin.js';
|
|
21
|
+
import { enforceCharacterizationResolution, enforceProbeReversion, forbidNewAmbientEffects, forbidStaticMocks, GRADLE_TEST_COMMAND, KOTLIN_API_DUMP, KOTLIN_BOUNDARY_ADDENDUM, KOTLIN_DRIVING_ADAPTER_ADDENDUM, KOTLIN_EXPORTS, kotlinDomainDiscriminantPatterns, KOTLIN_INFRASTRUCTURE_IMPORTS, KOTLIN_PRODUCTION_SOURCE_PATTERN, KOTLIN_TEST_SOURCE_PATTERN, kotlinGreenRunOptions, requireGreenTestRun, withCharacterizationTest, withKotlinFastPath, withMutationProbe, withTelemetryFastPath, } from '../rules/kotlin.js';
|
|
22
22
|
import { enforceAdapterObservability, enforcePortsBoundary, } from '../rules/ports-and-adapters.js';
|
|
23
23
|
import { requireSpecBackedAcceptanceTest } from '../rules/spec-test-parity.js';
|
|
24
24
|
import { withExcludeGlobs } from '../rules/scoping.js';
|
|
25
|
+
import { drivingAdapterBlock } from './driving-adapter.js';
|
|
25
26
|
import { surfaceGlossaryTermBreakage } from '../rules/ubiquitous-language.js';
|
|
26
27
|
/**
|
|
27
28
|
* Rule entries for a Kotlin/JVM/Android project, as a factory over the
|
|
@@ -63,6 +64,22 @@ export function kotlinRuleEntries(root, options = {}) {
|
|
|
63
64
|
'**/src/main/**/data/**',
|
|
64
65
|
];
|
|
65
66
|
const excludeGlobs = options.excludeGlobs ?? ['spikes/**', '**/build/**'];
|
|
67
|
+
// Driving adapters must be thin (issues #72, #76). Opt-in: listed
|
|
68
|
+
// before the TDD block, so a denial costs one AI call, not two.
|
|
69
|
+
const drivingAdapter = drivingAdapterBlock({
|
|
70
|
+
globs: options.drivingAdapterGlobs ?? [],
|
|
71
|
+
coreGlobs,
|
|
72
|
+
domainDiscriminants: options.domainDiscriminants,
|
|
73
|
+
domainHint: options.domainHint,
|
|
74
|
+
patternsFor: kotlinDomainDiscriminantPatterns,
|
|
75
|
+
coreExports: options.coreExportsInJudge
|
|
76
|
+
? { root, language: KOTLIN_EXPORTS, maxChars: options.coreExportsMaxChars ?? 16000 }
|
|
77
|
+
: undefined,
|
|
78
|
+
publishedApi: options.coreApiPaths?.length
|
|
79
|
+
? { paths: options.coreApiPaths, format: KOTLIN_API_DUMP, root }
|
|
80
|
+
: undefined,
|
|
81
|
+
instructions: (defaults) => defaults + KOTLIN_DRIVING_ADAPTER_ADDENDUM,
|
|
82
|
+
});
|
|
66
83
|
const entries = [
|
|
67
84
|
// ── Deterministic wall ───────────────────────────────────────────
|
|
68
85
|
// Core import/effect screens.
|
|
@@ -125,6 +142,7 @@ export function kotlinRuleEntries(root, options = {}) {
|
|
|
125
142
|
// production already has (born green): a test-source write marked
|
|
126
143
|
// `// probity: characterization` passes, and the commit gate below
|
|
127
144
|
// holds the marker until a mutation probe shows that test failing.
|
|
145
|
+
...(drivingAdapter ? [drivingAdapter] : []),
|
|
128
146
|
{
|
|
129
147
|
files: tddGlobs,
|
|
130
148
|
// Telemetry-only additions pass deterministically — see the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kotlin.js","sourceRoot":"","sources":["../../presets/kotlin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,oBAAoB,EAAkB,MAAM,gBAAgB,CAAA;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,OAAO,EACL,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACL,iCAAiC,EACjC,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,6BAA6B,EAC7B,gCAAgC,EAChC,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAA;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|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AE,CAAC;QAExC,gEAAgE;QAChE,gEAAgE;QAChE,4DAA4D;QAC5D,8CAA8C;QAC9C,iCAAiC,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAEpD,6DAA6D;QAC7D,6DAA6D;QAC7D,mEAAmE;QACnE,iEAAiE;QACjE,mBAAmB,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,aAAa,IAAI,mBAAmB,EAAE,CAAC;KAC/E,CAAA;IAED,OAAO,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;AAChD,CAAC"}
|
package/dist/rules/kotlin.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Rule } from '@nizos/probity';
|
|
2
2
|
import { type GreenRunOptions, type NamedPattern } from './gates.js';
|
|
3
|
+
import type { ApiDumpFormat, ExportLanguage } from './ports-and-adapters.js';
|
|
3
4
|
/**
|
|
4
5
|
* Kotlin/JVM/Android preset for the ports-and-adapters rules. The
|
|
5
6
|
* JS-ecosystem screens in `ports-and-adapters.ts` (ESM imports,
|
|
@@ -350,4 +351,42 @@ export declare function enforceCharacterizationResolution(options: {
|
|
|
350
351
|
* conventions.
|
|
351
352
|
*/
|
|
352
353
|
export declare const KOTLIN_BOUNDARY_ADDENDUM = "\n\n### Kotlin/Android specifics\n\n - Ambient OS access in core code is a violation: `Instant.now()`\n and friends, `System.currentTimeMillis()`, `Date()`,\n `UUID.randomUUID()`, `Random()`, `System.getenv` \u2014 clock,\n randomness, and environment are ports.\n - Vendor/infrastructure packages (AWS SDK, Amplify, Apollo,\n Firebase, OkHttp, Retrofit, Room, WorkManager, JDBC) belong in\n adapter modules only. In core code, their types in signatures are\n leaked boundaries.\n - Dagger/DI modules, `@Component` definitions, and `\u2026di` packages\n are composition roots: they import both core and adapters by\n design \u2014 always allowed.\n - In tests, `mockStatic`/`mockkStatic`/`mockkObject`/\n `mockkConstructor`/PowerMock are always violations. A\n mockito-kotlin `mock<T>()` where T is a port interface is an\n acceptable seam (though a shared fake is preferred); `mock<T>()`\n of a concrete internal class is a violation \u2014 the substitute\n belongs at a port.\n - Robolectric in a test signals Android-framework coupling; that is\n an adapter concern, fine in adapter/UI tests, a smell in tests of\n core logic.\n - A port need not be an interface. A function-typed constructor\n parameter injected at the composition root (e.g.\n `nowEpochMillis: () -> Long`, `randomIv: () -> ByteArray`) is a\n valid seam \u2014 but a default value that calls the real OS\n (`= { System.currentTimeMillis() }`) inside core/common code\n defeats it; real defaults belong in platform adapters or DI\n wiring.\n - Kotlin Multiplatform: `commonMain` core code is the inside of\n the hexagon; `expect`/`actual` pairs and per-platform source\n sets (`androidMain`, `iosMain`, `desktopMain`) implementing a\n common declaration are adapters and may touch platform APIs.";
|
|
354
|
+
/**
|
|
355
|
+
* Names a Kotlin file exposes to other modules: non-private,
|
|
356
|
+
* non-internal `fun`s at any depth (extension functions as
|
|
357
|
+
* `Receiver.name`), and top-level types, objects, typealiases and
|
|
358
|
+
* `val`/`var`s. Overrides are skipped (they name the supertype's
|
|
359
|
+
* member, not a new one).
|
|
360
|
+
*/
|
|
361
|
+
export declare function kotlinExportedNames(content: string): string[];
|
|
362
|
+
/** Kotlin exports, for `enforceThinDrivingAdapter`'s `coreExports`. */
|
|
363
|
+
export declare const KOTLIN_EXPORTS: ExportLanguage;
|
|
364
|
+
/**
|
|
365
|
+
* Public API, one `Owner: name, name` line per class, from a
|
|
366
|
+
* binary-compatibility-validator dump: a JVM `.api` file
|
|
367
|
+
* (`public final class com/x/Permissions {` with `fun canApprove (…)Z`
|
|
368
|
+
* members) or a Kotlin/Native `.klib.api` file (`final class
|
|
369
|
+
* com.x/Permissions {`, top-level `final fun (com.x/Viewer).com.x/canApprove()`).
|
|
370
|
+
* JVM getters become property names; setters and generated members
|
|
371
|
+
* are dropped. Top-level declarations are grouped under `(top level)`
|
|
372
|
+
* (`…Kt` facade classes in a JVM dump).
|
|
373
|
+
*/
|
|
374
|
+
export declare function readKotlinApiDump(content: string): string[];
|
|
375
|
+
/** binary-compatibility-validator dumps: `*.api`, including `*.klib.api`. */
|
|
376
|
+
export declare const KOTLIN_API_DUMP: ApiDumpFormat;
|
|
377
|
+
/**
|
|
378
|
+
* Kotlin forms of a domain discriminant check, one pattern per field:
|
|
379
|
+
* comparison to a string literal or to an enum entry / object
|
|
380
|
+
* (`role == Role.SUPER_USER`, `Role.SUPER_USER != viewer.role`), a
|
|
381
|
+
* `when (viewer.role)` subject, and an `is`/`!is` type check
|
|
382
|
+
* (`status is Status.Draft`). For `forbidNewDomainDiscriminantChecks`'
|
|
383
|
+
* `patternsFor`.
|
|
384
|
+
*/
|
|
385
|
+
export declare function kotlinDomainDiscriminantPatterns(discriminants: readonly string[]): NamedPattern[];
|
|
386
|
+
/**
|
|
387
|
+
* Kotlin addendum for `enforceThinDrivingAdapter`: what thin means for
|
|
388
|
+
* a CLI command and a Compose screen. Pass as
|
|
389
|
+
* `instructions: (defaults) => defaults + KOTLIN_DRIVING_ADAPTER_ADDENDUM`.
|
|
390
|
+
*/
|
|
391
|
+
export declare const KOTLIN_DRIVING_ADAPTER_ADDENDUM = "\n\n### Kotlin specifics: CLI commands and Compose screens\n\n - A CLI command (a Clikt `CliktCommand`, picocli, kotlinx-cli) is a\n driving adapter. Always allowed: declaring options and arguments,\n help text, finding the selected configuration or session, calling\n one use case, and mapping its outcome to output. Mapping is\n translation even with many branches: an exhaustive `when` over\n the use case's sealed outcome type that turns each case into an\n exit code, an error code, a message, a hint or JSON is one branch\n per outcome the core already decided. A precondition the command\n itself needs (no configuration selected \u2192 a usage error) is\n translation too.\n - Block a command that decides something its use case's outcome\n doesn't already say: branching on domain state or a role to choose\n what happens, retrying or falling back, or calling several use\n cases where one's result decides whether or how the next runs.\n Reading one more value only to display it beside the result (e.g.\n whether the account is signed in after registering) is not\n coordination.\n - Composables: `remember { mutableStateOf(\u2026) }`, `rememberSaveable`,\n `collectAsState()`/`collectAsStateWithLifecycle()`, a\n `LaunchedEffect` that forwards one intent, navigation callbacks,\n modifiers, theming and `@Preview` functions are view state or\n wiring \u2014 always allowed. Sending one intent to a ViewModel, or\n calling one use case per user action, is the intended pattern.\n - Composition roots \u2014 Koin modules, a `Composition` that builds the\n client, DI wiring \u2014 are always allowed.";
|
|
353
392
|
//# sourceMappingURL=kotlin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kotlin.d.ts","sourceRoot":"","sources":["../../rules/kotlin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,IAAI,EAA2B,MAAM,gBAAgB,CAAA;AAE3E,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"kotlin.d.ts","sourceRoot":"","sources":["../../rules/kotlin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,IAAI,EAA2B,MAAM,gBAAgB,CAAA;AAE3E,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE5E;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,QACoV,CAAA;AAE9X;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QACoB,CAAA;AAExD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,QAC+D,CAAA;AAsB/F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAsBxC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;CAAO,GAC7D,IAAI,CAON;AAwCD;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,QACc,CAAA;AAkYrD;;;;;;;;;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