@sayoriqwq/effect-harness 0.2.1 → 0.3.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 CHANGED
@@ -13,17 +13,18 @@ tsgo is the sole authority for Effect and TypeScript semantics; Target owners
13
13
  choose all other ESLint rules in their own flat config.
14
14
 
15
15
  `harnessModule` plans a complete Integration-scoped managed knowledge tree,
16
- reference-only pinned source diagnostics, a bounded Control Root routing block,
17
- package-scoped TypeScript policy for each approved Package Root, editor
18
- configuration, requirements, checks, and target-state Issues. Planning is
19
- read-only; Prelude owns convergence and Target mutation.
16
+ reference-only pinned source diagnostics, and a bounded Control Root routing
17
+ block. Planning is read-only; Prelude owns convergence of those stable
18
+ Harness-owned assets.
20
19
 
21
20
  Integration `feedback/**` is target-owned and never planned as an Output.
22
21
  Pinned Effect and tsgo sources are delivered offline from canonical archive
23
- files in the Artifact with immutable provenance; they
24
- are agent references, never application dependencies. The delivered Target Adaptation skill decides repository-specific
25
- package and TypeScript topology with the Target, then hands ongoing ownership
26
- back to that Target.
22
+ files in the Artifact with immutable provenance; they are agent references,
23
+ never application dependencies. The delivered Target Adaptation skill reads
24
+ immutable managed Baseline and canonical policy data, observes repository-specific
25
+ topology, obtains authorization before changing Target-owned package, lockfile,
26
+ TypeScript, activation, lint, editor, or verification state, proves actual
27
+ Effect-tsgo behavior, then hands ongoing ownership back to that Target.
27
28
 
28
29
  The reference publication authority chain is [Prelude Contract's normative
29
30
  archive protocol](https://github.com/yume-infra/prelude/blob/main/packages/harness-contract/README.md#canonical-tree-archive-protocol)
@@ -0,0 +1,83 @@
1
+ {
2
+ "versions": {
3
+ "effect": "4.0.0-beta.97",
4
+ "tsgo": "0.19.0",
5
+ "typescript": "6.0.2",
6
+ "nativeTypescript": "7.0.2"
7
+ },
8
+ "typescriptTopology": {
9
+ "primaryCompiler": "nativeTypescript",
10
+ "effectSemanticAuthority": "tsgo",
11
+ "compilerApiCompatibility": "typescript"
12
+ },
13
+ "packages": {
14
+ "effect": {
15
+ "id": "runtime",
16
+ "packageName": "effect",
17
+ "range": "4.0.0-beta.97",
18
+ "installedIdentity": { "name": "effect", "version": "4.0.0-beta.97" },
19
+ "role": "runtime",
20
+ "target": { "presence": "required", "defaultSection": "dependencies", "peerFallbackSection": "devDependencies" },
21
+ "sourcePin": "effect"
22
+ },
23
+ "platformNode": {
24
+ "id": "platform-node",
25
+ "packageName": "@effect/platform-node",
26
+ "range": "4.0.0-beta.97",
27
+ "installedIdentity": { "name": "@effect/platform-node", "version": "4.0.0-beta.97" },
28
+ "role": "optional-platform",
29
+ "target": { "presence": "declared-or-manifest-unavailable", "defaultSection": "dependencies", "peerFallbackSection": "devDependencies" },
30
+ "sourcePin": "effect"
31
+ },
32
+ "effectVitest": {
33
+ "id": "vitest",
34
+ "packageName": "@effect/vitest",
35
+ "range": "4.0.0-beta.97",
36
+ "installedIdentity": { "name": "@effect/vitest", "version": "4.0.0-beta.97" },
37
+ "role": "effect-test-integration",
38
+ "target": { "presence": "required", "defaultSection": "devDependencies", "peerFallbackSection": "devDependencies" },
39
+ "sourcePin": "effect"
40
+ },
41
+ "tsgo": {
42
+ "id": "tsgo",
43
+ "packageName": "@effect/tsgo",
44
+ "range": "0.19.0",
45
+ "installedIdentity": { "name": "@effect/tsgo", "version": "0.19.0" },
46
+ "role": "effect-compiler-patch",
47
+ "target": { "presence": "required", "defaultSection": "devDependencies", "peerFallbackSection": "devDependencies" },
48
+ "sourcePin": "tsgo"
49
+ },
50
+ "typescript": {
51
+ "id": "typescript",
52
+ "packageName": "typescript",
53
+ "range": "npm:@typescript/typescript6@6.0.2",
54
+ "installedIdentity": { "name": "@typescript/typescript6", "version": "6.0.2" },
55
+ "role": "typescript-api",
56
+ "target": { "presence": "required", "defaultSection": "devDependencies", "peerFallbackSection": "devDependencies" },
57
+ "sourcePin": null
58
+ },
59
+ "nativeTypescript": {
60
+ "id": "native-typescript",
61
+ "packageName": "@typescript/native",
62
+ "range": "npm:typescript@7.0.2",
63
+ "installedIdentity": { "name": "typescript", "version": "7.0.2" },
64
+ "role": "native-compiler",
65
+ "target": { "presence": "required", "defaultSection": "devDependencies", "peerFallbackSection": "devDependencies" },
66
+ "sourcePin": null
67
+ }
68
+ },
69
+ "sourcePins": {
70
+ "effect": {
71
+ "publicationName": "effect",
72
+ "outputId": "effect.reference.effect",
73
+ "targetPath": "repos/effect",
74
+ "sourceUrl": "https://github.com/Effect-TS/effect-smol"
75
+ },
76
+ "tsgo": {
77
+ "publicationName": "tsgo",
78
+ "outputId": "effect.reference.tsgo",
79
+ "targetPath": "repos/tsgo",
80
+ "sourceUrl": "https://github.com/Effect-TS/tsgo"
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "name": "@effect/language-service",
3
+ "diagnostics": true,
4
+ "includeSuggestionsInTsc": true,
5
+ "ignoreEffectSuggestionsInTscExitCode": false,
6
+ "ignoreEffectWarningsInTscExitCode": false,
7
+ "ignoreEffectErrorsInTscExitCode": false,
8
+ "diagnosticSeverity": {
9
+ "anyUnknownInErrorContext": "error",
10
+ "asyncFunction": "warning",
11
+ "catchAllToMapError": "suggestion",
12
+ "catchToIgnore": "suggestion",
13
+ "catchToOrElseSucceed": "suggestion",
14
+ "catchUnfailableEffect": "suggestion",
15
+ "classSelfMismatch": "error",
16
+ "cryptoRandomUUID": "warning",
17
+ "cryptoRandomUUIDInEffect": "warning",
18
+ "deterministicKeys": "warning",
19
+ "duplicatePackage": "warning",
20
+ "effectDoNotation": "warning",
21
+ "effectFnIife": "warning",
22
+ "effectFnImplicitAny": "error",
23
+ "effectFnOpportunity": "suggestion",
24
+ "effectGenUsesAdapter": "warning",
25
+ "effectInFailure": "warning",
26
+ "effectInVoidSuccess": "warning",
27
+ "effectMapFlatten": "suggestion",
28
+ "effectMapVoid": "suggestion",
29
+ "effectSucceedWithVoid": "suggestion",
30
+ "extendsNativeError": "warning",
31
+ "flatMapToMap": "suggestion",
32
+ "floatingEffect": "error",
33
+ "genericEffectServices": "warning",
34
+ "globalConsole": "warning",
35
+ "globalConsoleInEffect": "warning",
36
+ "globalDate": "warning",
37
+ "globalDateInEffect": "warning",
38
+ "globalErrorInEffectCatch": "warning",
39
+ "globalErrorInEffectFailure": "warning",
40
+ "globalFetch": "warning",
41
+ "globalFetchInEffect": "warning",
42
+ "globalRandom": "warning",
43
+ "globalRandomInEffect": "warning",
44
+ "globalTimers": "warning",
45
+ "globalTimersInEffect": "warning",
46
+ "instanceOfSchema": "warning",
47
+ "layerMergeAllWithDependencies": "warning",
48
+ "lazyEffect": "suggestion",
49
+ "lazyPromiseInEffectSync": "warning",
50
+ "leakingRequirements": "suggestion",
51
+ "missedPipeableOpportunity": "warning",
52
+ "missingEffectContext": "error",
53
+ "missingEffectError": "error",
54
+ "missingLayerContext": "error",
55
+ "missingReturnYieldStar": "error",
56
+ "missingStarInYieldEffectGen": "error",
57
+ "multipleCatchTag": "suggestion",
58
+ "multipleEffectProvide": "warning",
59
+ "nestedEffectGenYield": "warning",
60
+ "newPromise": "warning",
61
+ "newSchemaClass": "warning",
62
+ "nodeBuiltinImport": "warning",
63
+ "outdatedApi": "warning",
64
+ "overriddenSchemaConstructor": "error",
65
+ "preferSchemaOverJson": "warning",
66
+ "processEnv": "warning",
67
+ "processEnvInEffect": "warning",
68
+ "redundantMapError": "suggestion",
69
+ "redundantOrDie": "suggestion",
70
+ "redundantSchemaTagIdentifier": "suggestion",
71
+ "returnEffectInGen": "suggestion",
72
+ "runEffectInsideEffect": "suggestion",
73
+ "schemaNumber": "suggestion",
74
+ "schemaStructWithTag": "suggestion",
75
+ "serviceNotAsClass": "warning",
76
+ "strictBooleanExpressions": "warning",
77
+ "strictEffectProvide": "warning",
78
+ "tryCatchInEffectGen": "suggestion",
79
+ "unknownInEffectCatch": "warning",
80
+ "unnecessaryArrowBlock": "warning",
81
+ "unnecessaryEffectGen": "suggestion",
82
+ "unnecessaryFailYieldableError": "suggestion",
83
+ "unnecessaryPipe": "suggestion",
84
+ "unnecessaryPipeChain": "suggestion",
85
+ "unnecessaryTypeofType": "suggestion",
86
+ "unsafeEffectTypeAssertion": "warning"
87
+ },
88
+ "barrelImportPackages": ["effect"],
89
+ "topLevelNamedReexports": "follow",
90
+ "effectFn": ["span"],
91
+ "keyPatterns": [
92
+ { "target": "service", "pattern": "default", "skipLeadingPath": ["src/"] },
93
+ { "target": "error", "pattern": "default", "skipLeadingPath": ["src/"] },
94
+ { "target": "custom", "pattern": "default", "skipLeadingPath": ["src/"] }
95
+ ],
96
+ "extendedKeyDetection": true,
97
+ "layerGraphFollowDepth": 1,
98
+ "noExternal": true,
99
+ "inlays": true,
100
+ "allowedDuplicatedPackages": [],
101
+ "pipeableMinArgCount": 2
102
+ }
@@ -9,8 +9,8 @@ Each feedback layer has one job:
9
9
  code must not import `repos/effect/**` or `repos/tsgo/**`.
10
10
  - Target owners compose every other ESLint rule, including package, test,
11
11
  syntax, style, and project-specific policy.
12
- - Harness verification owns policy equality, source provenance, route
13
- reachability, suppression rejection, and packed Artifact completeness.
12
+ - Harness verification owns policy equality, diagnostic inventory, source
13
+ provenance, route reachability, and packed Artifact completeness.
14
14
 
15
15
  The public Target adapter and Effect Harness's repository self adapter consume
16
16
  the same two canonical boundaries; only delivery and surrounding configuration
@@ -18,3 +18,6 @@ differ. Harness ESLint does not express Effect API, Schema, test-entry, package
18
18
  migration, semantic, or style rules. If tsgo does not yet express an Effect or
19
19
  TypeScript constraint, the Harness leaves it unenforced until tsgo does; it does
20
20
  not add a syntax-only substitute.
21
+
22
+ Suppression syntax and semantics belong to tsgo. Permission and rationale are
23
+ Target-owned exceptions; Harness ESLint neither detects nor rejects them.
@@ -12,9 +12,12 @@ severity all matter to completion.
12
12
  `repos/tsgo/_packages/tsgo/src/metadata.json`.
13
13
  4. Follow [tsgo-source.md](./tsgo-source.md) to its implementation, quick fix,
14
14
  and fixture.
15
- 5. Re-run the package-scoped Check that failed.
15
+ 5. Re-run the Target's real typecheck path that failed.
16
16
 
17
- Do not use Effect diagnostic suppression comments, local severity overrides, or
18
- weaker compiler settings to make the gate green. tsgo is the sole Harness
19
- authority for Effect and TypeScript semantics; Harness ESLint only protects the
20
- two delivered pinned-reference import boundaries.
17
+ Fix diagnostics without weakening the canonical policy. Preserve existing
18
+ Target-owned suppression decisions unless an audit was requested. Never add a
19
+ suppression merely to make verification green; a new exception requires the
20
+ smallest practical scope, an explained diagnostic and alternative, explicit
21
+ authorization, and durable Target-owned rationale. tsgo owns suppression
22
+ semantics and remains the sole Effect/TypeScript semantic authority; Harness
23
+ ESLint only protects the two delivered pinned-reference import boundaries.
@@ -4,8 +4,9 @@ Delivered `.prelude/**/repos/**` source is searchable evidence, not application
4
4
  source. Keep it out of TypeScript compilation, auto-import candidates, file
5
5
  watching, and ordinary editor indexing.
6
6
 
7
- Prelude can safely materialize declared structured editor settings. The
8
- [adapt-effect-target skill](../skills/adapt-effect-target/SKILL.md) must inspect
9
- the real tsconfig inheritance and broad include globs, then propose any
10
- additional Target-owned exclusions. Do not assume one repository-wide setting
11
- covers every editor or project topology.
7
+ The [adapt-effect-target skill](../skills/adapt-effect-target/SKILL.md) inspects
8
+ which editors the Target actually uses, the real tsconfig inheritance, and broad
9
+ include globs before proposing Target-owned exclusions or language-server
10
+ settings. Verify that editor tooling resolves the same patched TypeScript 7
11
+ backend as the command line. Do not create irrelevant editor state or assume one
12
+ repository-wide setting covers every project topology.
@@ -3,6 +3,11 @@
3
3
  Use installed `effect`, `@effect/platform-node`, and `@effect/vitest` packages.
4
4
  Never import the delivered `repos/**` reference trees.
5
5
 
6
+ [`../data/baseline.json`](../data/baseline.json) is the machine-readable
7
+ authority for package identities and roles. Formal TypeScript 7 is the primary
8
+ compiler patched by Effect-tsgo; TypeScript 6 supplies compiler-API compatibility
9
+ for tools that still require it and is not a second semantic authority.
10
+
6
11
  | Role | Package | Accepted range | Presence | Default section | Peer fallback |
7
12
  | --- | --- | --- | --- | --- | --- |
8
13
  | `runtime` | `effect` | `4.0.0-beta.97` | `required` | `dependencies` | `devDependencies` |
@@ -2,14 +2,15 @@
2
2
 
3
3
  Use one small change and one named failure route at a time:
4
4
 
5
- 1. Identify the selected package root and the failing Plan declaration or
6
- Check.
7
- 2. Read the route from [index.md](./index.md).
8
- 3. Inspect delivered source only when managed guidance is insufficient.
5
+ 1. Converge the stable Harness-owned managed, routing, and reference Outputs.
6
+ 2. Enter [Control Handoff](../skills/adapt-effect-target/SKILL.md) and observe the
7
+ actual Target before proposing adaptation.
8
+ 3. Obtain authorization before any Target mutation.
9
9
  4. Make the smallest approved Target-owned change.
10
- 5. Replan before Apply; after Apply, replan again before Checks.
11
- 6. Run all declared Checks and review the resulting diff.
10
+ 5. Verify actual compiler activation and a representative unsuppressed
11
+ diagnostic through the Target's real typecheck path.
12
+ 6. Run the Target's own checks and review the resulting diff and durable evidence.
12
13
 
13
- An Output can converge atomically while a later Output or install fails. That
14
- state is incomplete: preserve the failure evidence, do not run Checks, do not
15
- claim convergence, and continue from a fresh Plan.
14
+ Stable Output convergence does not prove Target Adaptation. If installation,
15
+ activation, or a Target command fails, preserve the evidence and do not claim
16
+ completion.
@@ -5,6 +5,10 @@ editor, lint, or diagnostic work in this Integration.
5
5
 
6
6
  ## Start here
7
7
 
8
+ - Baseline package, compiler-role, or Source Pin data:
9
+ [`../data/baseline.json`](../data/baseline.json).
10
+ - Complete canonical Effect-tsgo policy data:
11
+ [`../data/tsgo-policy.json`](../data/tsgo-policy.json).
8
12
  - First integration, upgrade, package selection, or tsconfig placement:
9
13
  [adapt-effect-target](../skills/adapt-effect-target/SKILL.md).
10
14
  - Effect implementation or tests: [effect-code.md](./effect-code.md), then
@@ -20,7 +24,7 @@ editor, lint, or diagnostic work in this Integration.
20
24
 
21
25
  ## Evidence order
22
26
 
23
- Use this order: the failing diagnostic or Check, managed policy, the delivered
27
+ Use this order: the failing Target command, managed policy data, the delivered
24
28
  Effect source, then the delivered tsgo source for diagnostic internals. Do not
25
29
  scan large reference trees before the managed route identifies the relevant
26
30
  package, module, rule, or fixture.
@@ -9,6 +9,7 @@ One Integration Workspace contains three sibling zones:
9
9
  - `feedback/**`: Target-owned evidence and notes, never an Output and preserved
10
10
  across Apply and upgrade.
11
11
 
12
- The root routing block is Harness-owned inside `AGENTS.md`. Target package and
13
- executable configuration remain Target-owned except for the exact structured
14
- items declared as Prelude Outputs.
12
+ The root routing block is Harness-owned inside `AGENTS.md`. Target package
13
+ manifests, lockfiles, tsconfig files, compiler activation, executable lint
14
+ configuration, editor state, verification scripts, and suppression rationale
15
+ remain Target-owned and are adapted only after authorization.
@@ -1,23 +1,28 @@
1
- # Package, TypeScript, and ESLint configuration
2
-
3
- Run [adapt-effect-target](../skills/adapt-effect-target/SKILL.md) when selecting
4
- package roots or repairing TypeScript inheritance. The Harness declares the
5
- complete named language-service item at each approved root; the skill decides
6
- which roots actually author Effect and how secondary projects inherit it.
7
- The projected item is the same canonical policy that Effect Harness verifies
8
- for itself: diagnostics and tsc suggestions are enabled, every Effect
9
- diagnostic severity is explicit, and no warning, suggestion, or error is
10
- removed from the tsc exit code. Target placement and inheritance differ from
11
- Harness self-hosting, but the policy values do not. Do not replace the item
12
- with a partial plugin entry or local severity overrides.
13
-
14
- Dependencies are resolved before Apply. Review exact manifest and workspace
15
- lock changes, then replan. Apply performs only the approved frozen install and
16
- must not resolve a range again.
1
+ # Package, TypeScript, activation, and ESLint configuration
2
+
3
+ Run [adapt-effect-target](../skills/adapt-effect-target/SKILL.md) after Prelude
4
+ delivers the stable Harness-owned Outputs. The skill reads the immutable
5
+ [`../data/baseline.json`](../data/baseline.json) and
6
+ [`../data/tsgo-policy.json`](../data/tsgo-policy.json), observes the repository,
7
+ and proposes one reviewable Target-owned landing before mutation.
8
+
9
+ The proposal selects Effect-authoring package roots, one toolchain root and
10
+ Effect-tsgo activation owner, package-manager and lockfile changes, TypeScript 6
11
+ compatibility needs, the tsconfig inheritance landing for the complete canonical
12
+ policy, relevant editors, and actual verification commands. Folder names,
13
+ package presence, or a plugin item alone are not convergence evidence.
14
+
15
+ Formal TypeScript 7 is the primary compiler. Effect-tsgo running on that backend
16
+ is the sole Effect/TypeScript semantic authority. TypeScript 6 remains an
17
+ explicit compiler-API compatibility package where current tooling requires it.
18
+ After authorization, use the Target's own package manager and lifecycle, then
19
+ prove actual compiler identity, patch activation, and representative diagnostic
20
+ exit behavior.
17
21
 
18
22
  ## ESLint composition
19
23
 
20
- Executable ESLint configuration is Target-owned. Compose the stable export:
24
+ Executable ESLint configuration is Target-owned. Adapt its established
25
+ composition framework to include the stable export:
21
26
 
22
27
  ```js
23
28
  import antfu from '@antfu/eslint-config'
@@ -28,6 +33,5 @@ export default antfu().append(...effectHarness)
28
33
 
29
34
  Antfu v9 returns a `FlatConfigComposer`; do not spread `antfu()` into an array.
30
35
  Append the Harness export so later host or test overlays cannot replace its two
31
- pinned-reference import boundaries. Those two boundaries are the complete
32
- Harness-owned ESLint policy. tsgo owns Effect and TypeScript semantics; the
33
- Target owns and customizes every other ESLint rule.
36
+ pinned-reference import boundaries. Those boundaries are the complete
37
+ Harness-owned ESLint policy. The Target owns every other lint rule.
@@ -1,18 +1,16 @@
1
1
  # Quality and completion policy
2
2
 
3
- An Integration is complete only after a fresh Plan is converged and every
4
- declared package-scoped Check passes. The standard Checks are strict Effect
5
- type checking, lint with zero warnings, and the Target's verification command.
3
+ Stable Prelude Output convergence is the prerequisite for Control Handoff, not
4
+ proof that a Target toolchain works. Target Adaptation is complete only when:
6
5
 
7
- Failure routes:
6
+ - the authorized package, lockfile, tsconfig, activation, ESLint, editor, and
7
+ verification changes match the actual repository topology;
8
+ - the selected TypeScript 7 and Effect-tsgo identities and patch activation are
9
+ proven through real tools;
10
+ - a representative unsuppressed Effect diagnostic reaches the Target's real
11
+ typecheck path and affects its exit code under the canonical policy;
12
+ - the Target's own lint, test, and verification commands pass; and
13
+ - durable Target-owned rationale and verification evidence are reviewed.
8
14
 
9
- - Effect or TypeScript diagnostic: [diagnostics.md](./diagnostics.md).
10
- - Test behavior: [effect-code.md](./effect-code.md) and
11
- [effect-source.md](./effect-source.md).
12
- - ESLint conflict or composition: [diagnostic-layers.md](./diagnostic-layers.md)
13
- and [package-config.md](./package-config.md).
14
- - Source provenance or route: [source-identity.md](./source-identity.md).
15
- - Package selection or tsconfig landing: run the Target Adaptation skill.
16
-
17
- Never replace a named stage with a weaker proxy command and never claim Gate
18
- completion from schema validity alone.
15
+ Schema validity, installed packages, or the presence of a plugin item are not
16
+ substitutes for actual execution.
@@ -1,63 +1,73 @@
1
1
  ---
2
2
  name: adapt-effect-target
3
- description: Inspect a real repository, select the packages that author or compose Effect, and prepare reviewable Prelude V2 and TypeScript configuration changes. Use when first integrating or upgrading Effect Harness, when a monorepo package selection changes, or when the declared Effect tsconfig Output lands at the wrong project boundary.
3
+ description: Adapt a delivered Effect Harness integration to a real Target repository through Control Handoff. Use for first integration, upgrades, package or project topology changes, compiler activation repair, or verification of Effect-tsgo behavior.
4
4
  ---
5
5
 
6
6
  # Adapt Effect Target
7
7
 
8
- Map the delivered Effect policy onto the Target's actual package and TypeScript
9
- topology, then hand control back through committed configuration and checks.
10
-
11
- ## Workflow
12
-
13
- 1. Read `../../docs/index.md`, `../../docs/package-config.md`, and the Target's
14
- root `AGENTS.md` before proposing changes.
15
- 2. Inspect workspace manifests, package manifests, direct Effect imports,
16
- Layer and Service composition, runnable entries, and the `extends` graph of
17
- relevant tsconfig files. Do not infer selection from folder names alone.
18
- 3. Select a package root when that package directly authors or composes Effect
19
- programs. Leave a consumer unselected only when its boundary is genuinely
20
- Effect-opaque, such as a Promise or plain domain interface.
21
- 4. Present the proposed nonempty `packageRoots` and every Target-owned config
22
- repair before editing. Explain why each selected root owns an Effect policy
23
- landing and how secondary build, test, or runtime projects inherit it.
24
- 5. After user approval, record the selection in `.prelude/config.jsonc` and
25
- make only the approved Target-owned tsconfig or executable-config repairs.
26
- Never edit delivered `managed/**` or `repos/**` content.
27
- 6. Run the installed Prelude plan flow. Verify that the Plan contains one
28
- Integration-scoped managed tree and pinned reference set, plus one complete
29
- language-service policy Output and package-scoped Requirements and Checks
30
- for every selected root. Resolve locator or ownership surprises before
31
- Apply.
32
- 7. Apply only the approved Plan, replan, then run the declared Target Checks.
33
- Inspect the resulting plugin item for local `overrides` or lowered
34
- `diagnosticSeverity` entries, and inspect relevant source changes for
35
- `@effect-diagnostics` suppression directives. Do not claim convergence when
36
- policy was weakened, Apply is incomplete, or a Check is skipped.
37
- 8. Leave durable reasoning in committed config, reviewable diffs, and, when
38
- useful, Target-owned `feedback/**`; do not leave the selection rationale
39
- only in chat. Hand ongoing ownership back to the Target.
40
-
41
- ## Selection example
42
-
43
- For `packages/domain`, `packages/effect-runtime`, `apps/api`, and `apps/jobs`:
44
-
45
- - Select `packages/effect-runtime` when it defines shared Layers and Services.
46
- - Select `apps/jobs` when it directly composes and runs Effect workflows.
47
- - Select `apps/api` if it builds Effect routes itself; otherwise leave it out
48
- only when it consumes an Effect-opaque interface from `effect-runtime`.
49
- - Leave `packages/domain` out when it contains plain domain types and logic.
50
-
51
- The package layout is evidence, not the answer. Confirm the actual imports,
52
- composition, execution, and tsconfig inheritance.
8
+ Perform Target Adaptation only after Prelude delivers the stable Harness-owned
9
+ managed tree, routing block, and pinned reference trees. The Target owns every
10
+ repository-specific change.
11
+
12
+ ## Authority
13
+
14
+ Read `../../data/baseline.json` and `../../data/tsgo-policy.json`; never copy
15
+ versions or policy values from prose or memory. The Baseline names formal
16
+ TypeScript 7 as the primary compiler, Effect-tsgo as the sole Effect/TypeScript
17
+ semantic authority, and TypeScript 6 as compiler-API compatibility. Preserve
18
+ TypeScript 6 wherever current Target tooling still requires it.
19
+
20
+ Read `../../docs/index.md`, `../../docs/package-config.md`, and the Target's
21
+ root instructions before acting. Treat delivered `managed/**` and `repos/**`
22
+ as read-only evidence.
23
+
24
+ ## Control Handoff
25
+
26
+ 1. **Observe.** Inspect the package manager, workspace manifests and lockfile,
27
+ direct Effect authoring and Effect-opaque boundaries, tsconfig inheritance,
28
+ build/test/editor projects, existing compiler and patch lifecycle, executable
29
+ ESLint composition, editors actually used, verification commands and CI, and
30
+ existing suppression decisions. Do not infer ownership from folder names.
31
+ 2. **Propose.** Present one reviewable adaptation covering selected package
32
+ roots, one toolchain root and activation owner, TypeScript 6 compatibility,
33
+ the complete policy landing and inheritance, package and lockfile changes,
34
+ Effect-tsgo activation, ESLint composition, relevant editor changes,
35
+ verification scripts and commands, intended suppression changes, and the
36
+ location of durable evidence.
37
+ 3. **Authorize.** Obtain explicit authorization for that proposal before any
38
+ mutation. If discovery changes the proposal materially, stop and authorize
39
+ the revised proposal.
40
+ 4. **Mutate.** Make only authorized Target-owned changes to manifests, lockfiles,
41
+ tsconfig files, activation or prepare scripts, executable ESLint config,
42
+ relevant editor config, verification scripts, and durable configuration or
43
+ `feedback/**` evidence. Install with the Target's package manager and preserve
44
+ the complete canonical policy item and severity values.
45
+ 5. **Verify.** Run the actual compiler and prove the selected TypeScript 7 and
46
+ pinned Effect-tsgo identities and activation. Exercise a representative
47
+ unsuppressed Effect diagnostic through the Target's real typecheck path and
48
+ confirm its exit code, then run the Target's own lint, tests, and verification
49
+ commands. Package presence or a plugin item alone is not proof.
50
+ 6. **Hand back.** Review the diff, record the toolchain and project-selection
51
+ rationale in committed Target-owned state, report exact verification evidence,
52
+ and return ongoing control to the Target.
53
+
54
+ ## Suppression exceptions
55
+
56
+ Suppression syntax and semantics belong to Effect-tsgo; permission and rationale
57
+ belong to the Target. Preserve existing suppression decisions unless the Target
58
+ requests an audit. Never add suppression merely to make verification pass.
59
+
60
+ A new exception requires the explained diagnostic, the smallest practical
61
+ scope, alternatives considered, explicit authorization, and durable
62
+ Target-owned rationale. It must not lower the canonical policy for unsuppressed
63
+ diagnostics.
53
64
 
54
65
  ## Guardrails
55
66
 
56
- - Never discover and silently claim every workspace package.
57
- - Never run Git fetch, clone, subtree, or `$pin` in the Target. Delivered
58
- `repos/**` trees are read-only reference evidence owned by Effect Harness.
59
- - Never import delivered reference trees from application or test code.
60
- - Never weaken or suppress the canonical diagnostic policy to make a Check
61
- pass; route failures through the managed diagnostic guidance.
62
- - Never describe Prelude core as proving business-topology coverage. This skill
63
- owns selection correctness; Prelude owns safe materialization correctness.
67
+ - Never mutate during observation or before authorization.
68
+ - Never weaken, partially reproduce, or locally override the canonical policy.
69
+ - Never patch once per package in a monorepo; use the authorized activation owner.
70
+ - Never add package-manager, tsconfig, editor, executable-config, or activation
71
+ semantics to Prelude core or the Harness Module Plan.
72
+ - Never import or edit delivered reference trees, and never run pin maintenance
73
+ commands in the Target.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: Adapt Effect Target
3
- short_description: Map Effect policy onto a real target repository
4
- default_prompt: Use $adapt-effect-target to select the Effect package roots and prepare their TypeScript configuration.
3
+ short_description: Authorize and verify Target-owned Effect adaptation
4
+ default_prompt: 'Use $adapt-effect-target to propose, authorize, apply, and verify this repository''s Effect toolchain adaptation.'
package/dist/prelude.d.ts CHANGED
@@ -1,22 +1,13 @@
1
1
  import * as _$_sayoriqwq_prelude_contract0 from "@sayoriqwq/prelude-contract";
2
- import * as _$effect_Schema0 from "effect/Schema";
3
2
 
4
3
  //#region src/prelude.d.ts
5
- declare const harnessModule: _$_sayoriqwq_prelude_contract0.HarnessModule<_$effect_Schema0.Struct.ReadonlySide<{
6
- readonly _tag: _$effect_Schema0.tag<"TargetObservationError">;
7
- readonly operation: _$effect_Schema0.Literals<readonly ["readBytes", "readText", "readDirectory", "readPackageManifest"]>;
8
- readonly locator: _$effect_Schema0.Union<readonly [_$effect_Schema0.Struct<{
9
- readonly root: _$effect_Schema0.Literal<"ControlRoot">;
10
- readonly path: _$effect_Schema0.String;
11
- }>, _$effect_Schema0.Struct<{
12
- readonly root: _$effect_Schema0.Literal<"IntegrationWorkspace">;
13
- readonly path: _$effect_Schema0.String;
14
- }>, _$effect_Schema0.Struct<{
15
- readonly root: _$effect_Schema0.Literal<"PackageRoot">;
16
- readonly packageRoot: _$effect_Schema0.String;
17
- readonly path: _$effect_Schema0.String;
18
- }>]>;
19
- readonly message: _$effect_Schema0.String;
20
- }, "Type">>;
4
+ /**
5
+ * Read-only Effect Harness Module.
6
+ *
7
+ * Prelude converges only stable Harness-owned assets. Repository-specific
8
+ * package, TypeScript, editor, lint, activation, and verification adaptation
9
+ * begins after delivery through the managed Target Adaptation skill.
10
+ */
11
+ declare const harnessModule: _$_sayoriqwq_prelude_contract0.HarnessModule<never>;
21
12
  //#endregion
22
13
  export { harnessModule };
package/dist/prelude.js CHANGED
@@ -1,7 +1,29 @@
1
- import { Buffer } from "node:buffer";
2
1
  import { CANONICAL_TREE_ARCHIVE_FORMAT, MODULE_PROTOCOL_V2, PRELUDE_V2_SUPPORTED_FEATURES, defineHarnessModule } from "@sayoriqwq/prelude-contract";
3
2
  import { Effect } from "effect";
4
- import * as TypeScript from "typescript";
3
+ //#region artifact-assets/effect/reference-archives/effect.json
4
+ var effect_default = {
5
+ archive: { "format": "prelude-canonical-tree-archive-v1" },
6
+ name: "effect",
7
+ provenance: {
8
+ "sourceUrl": "https://github.com/Effect-TS/effect-smol",
9
+ "revision": "f643dbb265093065dc0a61ca6133693dc2401678",
10
+ "treeDigest": "d797515e8ecb2e164deef65b6b7abde6445201ce9d1e9e584f39d634c2469e95"
11
+ },
12
+ schemaVersion: 1
13
+ };
14
+ //#endregion
15
+ //#region artifact-assets/effect/reference-archives/tsgo.json
16
+ var tsgo_default = {
17
+ archive: { "format": "prelude-canonical-tree-archive-v1" },
18
+ name: "tsgo",
19
+ provenance: {
20
+ "sourceUrl": "https://github.com/Effect-TS/tsgo",
21
+ "revision": "f0d48a67515048d277feb2c184c41cd7cffa51a4",
22
+ "treeDigest": "f76adab084de0de584e0a565679b3afca2b48674a28e36c7dd6398846fd2bd9d"
23
+ },
24
+ schemaVersion: 1
25
+ };
26
+ //#endregion
5
27
  //#region src/harness/Baseline.ts
6
28
  const versions = {
7
29
  effect: "4.0.0-beta.97",
@@ -33,6 +55,11 @@ const requiredDevToolTarget = {
33
55
  */
34
56
  const acceptedEffectBaseline = {
35
57
  versions,
58
+ typescriptTopology: {
59
+ primaryCompiler: "nativeTypescript",
60
+ effectSemanticAuthority: "tsgo",
61
+ compilerApiCompatibility: "typescript"
62
+ },
36
63
  packages: {
37
64
  effect: {
38
65
  id: "runtime",
@@ -122,145 +149,6 @@ const acceptedEffectBaseline = {
122
149
  }
123
150
  }
124
151
  };
125
- /** Policy item projected into each approved Target Package Root by Prelude. */
126
- const effectTsgoTargetProjection = { languageServicePlugin: {
127
- name: "@effect/language-service",
128
- diagnostics: true,
129
- includeSuggestionsInTsc: true,
130
- ignoreEffectSuggestionsInTscExitCode: false,
131
- ignoreEffectWarningsInTscExitCode: false,
132
- ignoreEffectErrorsInTscExitCode: false,
133
- diagnosticSeverity: {
134
- anyUnknownInErrorContext: "error",
135
- asyncFunction: "warning",
136
- catchAllToMapError: "suggestion",
137
- catchToIgnore: "suggestion",
138
- catchToOrElseSucceed: "suggestion",
139
- catchUnfailableEffect: "suggestion",
140
- classSelfMismatch: "error",
141
- cryptoRandomUUID: "warning",
142
- cryptoRandomUUIDInEffect: "warning",
143
- deterministicKeys: "warning",
144
- duplicatePackage: "warning",
145
- effectDoNotation: "warning",
146
- effectFnIife: "warning",
147
- effectFnImplicitAny: "error",
148
- effectFnOpportunity: "suggestion",
149
- effectGenUsesAdapter: "warning",
150
- effectInFailure: "warning",
151
- effectInVoidSuccess: "warning",
152
- effectMapFlatten: "suggestion",
153
- effectMapVoid: "suggestion",
154
- effectSucceedWithVoid: "suggestion",
155
- extendsNativeError: "warning",
156
- flatMapToMap: "suggestion",
157
- floatingEffect: "error",
158
- genericEffectServices: "warning",
159
- globalConsole: "warning",
160
- globalConsoleInEffect: "warning",
161
- globalDate: "warning",
162
- globalDateInEffect: "warning",
163
- globalErrorInEffectCatch: "warning",
164
- globalErrorInEffectFailure: "warning",
165
- globalFetch: "warning",
166
- globalFetchInEffect: "warning",
167
- globalRandom: "warning",
168
- globalRandomInEffect: "warning",
169
- globalTimers: "warning",
170
- globalTimersInEffect: "warning",
171
- instanceOfSchema: "warning",
172
- layerMergeAllWithDependencies: "warning",
173
- lazyEffect: "suggestion",
174
- lazyPromiseInEffectSync: "warning",
175
- leakingRequirements: "suggestion",
176
- missedPipeableOpportunity: "warning",
177
- missingEffectContext: "error",
178
- missingEffectError: "error",
179
- missingLayerContext: "error",
180
- missingReturnYieldStar: "error",
181
- missingStarInYieldEffectGen: "error",
182
- multipleCatchTag: "suggestion",
183
- multipleEffectProvide: "warning",
184
- nestedEffectGenYield: "warning",
185
- newPromise: "warning",
186
- newSchemaClass: "warning",
187
- nodeBuiltinImport: "warning",
188
- outdatedApi: "warning",
189
- overriddenSchemaConstructor: "error",
190
- preferSchemaOverJson: "warning",
191
- processEnv: "warning",
192
- processEnvInEffect: "warning",
193
- redundantMapError: "suggestion",
194
- redundantOrDie: "suggestion",
195
- redundantSchemaTagIdentifier: "suggestion",
196
- returnEffectInGen: "suggestion",
197
- runEffectInsideEffect: "suggestion",
198
- schemaNumber: "suggestion",
199
- schemaStructWithTag: "suggestion",
200
- serviceNotAsClass: "warning",
201
- strictBooleanExpressions: "warning",
202
- strictEffectProvide: "warning",
203
- tryCatchInEffectGen: "suggestion",
204
- unknownInEffectCatch: "warning",
205
- unnecessaryArrowBlock: "warning",
206
- unnecessaryEffectGen: "suggestion",
207
- unnecessaryFailYieldableError: "suggestion",
208
- unnecessaryPipe: "suggestion",
209
- unnecessaryPipeChain: "suggestion",
210
- unnecessaryTypeofType: "suggestion",
211
- unsafeEffectTypeAssertion: "warning"
212
- },
213
- barrelImportPackages: ["effect"],
214
- topLevelNamedReexports: "follow",
215
- effectFn: ["span"],
216
- keyPatterns: [
217
- {
218
- target: "service",
219
- pattern: "default",
220
- skipLeadingPath: ["src/"]
221
- },
222
- {
223
- target: "error",
224
- pattern: "default",
225
- skipLeadingPath: ["src/"]
226
- },
227
- {
228
- target: "custom",
229
- pattern: "default",
230
- skipLeadingPath: ["src/"]
231
- }
232
- ],
233
- extendedKeyDetection: true,
234
- layerGraphFollowDepth: 1,
235
- noExternal: true,
236
- inlays: true,
237
- allowedDuplicatedPackages: [],
238
- pipeableMinArgCount: 2
239
- } };
240
- //#endregion
241
- //#region artifact-assets/effect/reference-archives/effect.json
242
- var effect_default = {
243
- archive: { "format": "prelude-canonical-tree-archive-v1" },
244
- name: "effect",
245
- provenance: {
246
- "sourceUrl": "https://github.com/Effect-TS/effect-smol",
247
- "revision": "f643dbb265093065dc0a61ca6133693dc2401678",
248
- "treeDigest": "d797515e8ecb2e164deef65b6b7abde6445201ce9d1e9e584f39d634c2469e95"
249
- },
250
- schemaVersion: 1
251
- };
252
- //#endregion
253
- //#region artifact-assets/effect/reference-archives/tsgo.json
254
- var tsgo_default = {
255
- archive: { "format": "prelude-canonical-tree-archive-v1" },
256
- name: "tsgo",
257
- provenance: {
258
- "sourceUrl": "https://github.com/Effect-TS/tsgo",
259
- "revision": "f0d48a67515048d277feb2c184c41cd7cffa51a4",
260
- "treeDigest": "f76adab084de0de584e0a565679b3afca2b48674a28e36c7dd6398846fd2bd9d"
261
- },
262
- schemaVersion: 1
263
- };
264
152
  //#endregion
265
153
  //#region src/harness/SourcePins.ts
266
154
  const effectPin = acceptedEffectBaseline.sourcePins.effect;
@@ -269,281 +157,74 @@ function verifiedProvenance(publication, identity) {
269
157
  if (publication.name !== identity.publicationName || publication.provenance.sourceUrl !== identity.sourceUrl) throw new Error(`Source Pin publication does not match accepted Baseline identity: ${identity.publicationName}`);
270
158
  return publication.provenance;
271
159
  }
272
- /**
273
- * Immutable declarations derived from the Source Pin publications.
274
- *
275
- * Partita publishes each archive and its generic provenance. Effect Harness
276
- * adds only its concrete pin identity and Target delivery policy.
277
- */
278
- const pinnedReferenceOutputs = [{
279
- kind: "PinnedReferenceTree",
280
- id: effectPin.outputId,
281
- archive: {
282
- path: `artifact-assets/effect/reference-archives/${effectPin.publicationName}.pta`,
283
- format: CANONICAL_TREE_ARCHIVE_FORMAT
284
- },
285
- locator: {
286
- root: "IntegrationWorkspace",
287
- path: effectPin.targetPath
288
- },
289
- provenance: verifiedProvenance(effect_default, effectPin),
290
- referenceOnly: true
291
- }, {
292
- kind: "PinnedReferenceTree",
293
- id: tsgoPin.outputId,
294
- archive: {
295
- path: `artifact-assets/effect/reference-archives/${tsgoPin.publicationName}.pta`,
296
- format: CANONICAL_TREE_ARCHIVE_FORMAT
297
- },
298
- locator: {
299
- root: "IntegrationWorkspace",
300
- path: tsgoPin.targetPath
301
- },
302
- provenance: verifiedProvenance(tsgo_default, tsgoPin),
303
- referenceOnly: true
304
- }];
305
160
  //#endregion
306
161
  //#region src/prelude.ts
307
- const routingBlock = `## Effect Harness\n\nFor Effect application, test, package, TypeScript, editor, or lint changes, read the current Effect integration's \`.prelude/**/managed/docs/index.md\` first. Use \`.prelude/**/managed/skills/adapt-effect-target/SKILL.md\` when package selection or target-owned TypeScript topology needs adaptation. Keep \`.prelude/**/feedback/**\` target-owned. Treat \`.prelude/**/repos/**\` as read-only source diagnostics: consult it when installed declarations and managed guidance are insufficient, but never import or edit it.\n`;
308
- const managedTreeOutput = {
309
- kind: "ManagedTree",
310
- id: "effect.managed",
311
- sourceRoot: "artifact-assets/effect/managed",
312
- locator: {
313
- root: "IntegrationWorkspace",
314
- path: "managed"
315
- }
316
- };
317
- const routingOutput = {
318
- kind: "ManagedBlock",
319
- id: "effect.agent-routing",
320
- locator: {
321
- root: "ControlRoot",
322
- path: "AGENTS.md"
323
- },
324
- blockId: "effect-harness-routing",
325
- content: routingBlock
326
- };
327
- const editorPolicyOutputs = [
162
+ const stableHarnessOutputs = [
328
163
  {
329
- kind: "JsonValue",
330
- id: "effect.vscode.auto-import-exclude",
164
+ kind: "ManagedTree",
165
+ id: "effect.managed",
166
+ sourceRoot: "artifact-assets/effect/managed",
331
167
  locator: {
332
- root: "ControlRoot",
333
- path: ".vscode/settings.json"
334
- },
335
- pointer: "/typescript.preferences.autoImportFileExcludePatterns",
336
- value: [".prelude/**/repos/**"]
168
+ root: "IntegrationWorkspace",
169
+ path: "managed"
170
+ }
337
171
  },
338
172
  {
339
- kind: "JsonValue",
340
- id: "effect.vscode.javascript-auto-import-exclude",
173
+ kind: "ManagedBlock",
174
+ id: "effect.agent-routing",
341
175
  locator: {
342
176
  root: "ControlRoot",
343
- path: ".vscode/settings.json"
177
+ path: "AGENTS.md"
344
178
  },
345
- pointer: "/javascript.preferences.autoImportFileExcludePatterns",
346
- value: [".prelude/**/repos/**"]
179
+ blockId: "effect-harness-routing",
180
+ content: `## Effect Harness\n\nFor Effect application, test, package, TypeScript, editor, or lint changes, read the current Effect integration's \`.prelude/**/managed/docs/index.md\` first. Use \`.prelude/**/managed/skills/adapt-effect-target/SKILL.md\` when package selection or target-owned TypeScript topology needs adaptation. Keep \`.prelude/**/feedback/**\` target-owned. Treat \`.prelude/**/repos/**\` as read-only source diagnostics: consult it when installed declarations and managed guidance are insufficient, but never import or edit it.\n`
347
181
  },
348
- {
349
- kind: "JsonValue",
350
- id: "effect.zed.auto-import-exclude",
351
- locator: {
352
- root: "ControlRoot",
353
- path: ".zed/settings.json"
182
+ ...[{
183
+ kind: "PinnedReferenceTree",
184
+ id: effectPin.outputId,
185
+ archive: {
186
+ path: `artifact-assets/effect/reference-archives/${effectPin.publicationName}.pta`,
187
+ format: CANONICAL_TREE_ARCHIVE_FORMAT
354
188
  },
355
- pointer: "/lsp/typescript-language-server/initialization_options/preferences/autoImportFileExcludePatterns",
356
- value: [".prelude/**/repos/**"]
357
- }
358
- ];
359
- const baselineDevRequirements = [
360
- acceptedEffectBaseline.packages.effectVitest,
361
- acceptedEffectBaseline.packages.tsgo,
362
- acceptedEffectBaseline.packages.nativeTypescript,
363
- acceptedEffectBaseline.packages.typescript
364
- ].map((entry) => ({
365
- id: entry.id,
366
- packageName: entry.packageName,
367
- range: entry.range,
368
- section: entry.target.defaultSection
369
- }));
370
- const deliveryToolRequirements = [
371
- {
372
- id: "eslint",
373
- packageName: "eslint",
374
- range: "^10.3.0",
375
- section: "devDependencies"
376
- },
377
- {
378
- id: "antfu-eslint-config",
379
- packageName: "@antfu/eslint-config",
380
- range: "^9.0.0",
381
- section: "devDependencies"
382
- },
383
- {
384
- id: "vitest-runner",
385
- packageName: "vitest",
386
- range: "^4.1.8",
387
- section: "devDependencies"
388
- }
389
- ];
390
- function packageRootKey(packageRoot) {
391
- return Buffer.from(packageRoot, "utf8").toString("hex");
392
- }
393
- function packageOutputs(packageRoot) {
394
- return [{
395
- kind: "JsonKeyedItem",
396
- id: `effect.tsconfig.language-service.${packageRootKey(packageRoot)}`,
397
189
  locator: {
398
- root: "PackageRoot",
399
- packageRoot,
400
- path: "tsconfig.json"
190
+ root: "IntegrationWorkspace",
191
+ path: effectPin.targetPath
401
192
  },
402
- collectionPointer: "/compilerOptions/plugins",
403
- keyField: "name",
404
- keyValue: "@effect/language-service",
405
- item: effectTsgoTargetProjection.languageServicePlugin
406
- }];
407
- }
408
- function hasManifestDependency(manifest, section, packageName) {
409
- const entries = manifest?.[section];
410
- return typeof entries === "object" && entries !== null && !Array.isArray(entries) && typeof entries[packageName] === "string";
411
- }
412
- function selectedSection(manifest, packageName, fallback, peerFallback) {
413
- if (hasManifestDependency(manifest, "dependencies", packageName)) return "dependencies";
414
- if (hasManifestDependency(manifest, "devDependencies", packageName)) return "devDependencies";
415
- if (hasManifestDependency(manifest, "peerDependencies", packageName)) return peerFallback;
416
- return fallback;
417
- }
418
- function hasDeclaredDependency(manifest, packageName) {
419
- return hasManifestDependency(manifest, "dependencies", packageName) || hasManifestDependency(manifest, "devDependencies", packageName) || hasManifestDependency(manifest, "peerDependencies", packageName);
420
- }
421
- function shouldPlanBaselinePackage(manifest, entry) {
422
- return entry.target.presence === "required" || manifest === void 0 || hasDeclaredDependency(manifest, entry.packageName);
423
- }
424
- function requirementsFor(packageRoot, manifest) {
425
- const rootKey = packageRootKey(packageRoot);
426
- const runtime = acceptedEffectBaseline.packages.effect;
427
- const platform = acceptedEffectBaseline.packages.platformNode;
428
- const runtimeRequirements = [{
429
- id: runtime.id,
430
- packageName: runtime.packageName,
431
- range: runtime.range,
432
- section: selectedSection(manifest, runtime.packageName, runtime.target.defaultSection, runtime.target.peerFallbackSection)
433
- }];
434
- const platformSection = selectedSection(manifest, platform.packageName, platform.target.defaultSection, platform.target.peerFallbackSection);
435
- const platformRequirements = shouldPlanBaselinePackage(manifest, platform) ? [{
436
- id: platform.id,
437
- packageName: platform.packageName,
438
- range: platform.range,
439
- section: platformSection
440
- }] : [];
441
- return [
442
- ...runtimeRequirements,
443
- ...platformRequirements,
444
- ...baselineDevRequirements,
445
- ...deliveryToolRequirements
446
- ].map((requirement) => ({
447
- ...requirement,
448
- id: `effect.${requirement.id}.${rootKey}`,
449
- packageRoot
450
- }));
451
- }
452
- function checksFor(packageRoot) {
453
- const rootKey = packageRootKey(packageRoot);
454
- return [
455
- {
456
- id: `effect.typecheck.${rootKey}`,
457
- summary: "Run strict Effect diagnostics",
458
- packageRoot,
459
- argv: ["pnpm", "typecheck"]
193
+ provenance: verifiedProvenance(effect_default, effectPin),
194
+ referenceOnly: true
195
+ }, {
196
+ kind: "PinnedReferenceTree",
197
+ id: tsgoPin.outputId,
198
+ archive: {
199
+ path: `artifact-assets/effect/reference-archives/${tsgoPin.publicationName}.pta`,
200
+ format: CANONICAL_TREE_ARCHIVE_FORMAT
460
201
  },
461
- {
462
- id: `effect.lint.${rootKey}`,
463
- summary: "Run Effect lint guardrails",
464
- packageRoot,
465
- argv: [
466
- "pnpm",
467
- "lint",
468
- "--max-warnings",
469
- "0"
470
- ]
202
+ locator: {
203
+ root: "IntegrationWorkspace",
204
+ path: tsgoPin.targetPath
471
205
  },
472
- {
473
- id: `effect.verify.${rootKey}`,
474
- summary: "Run Effect domain verification",
475
- packageRoot,
476
- argv: ["pnpm", "verify"]
477
- }
478
- ];
479
- }
480
- function eslintIntegrationIssue(content) {
481
- if (typeof content === "string") {
482
- if (hasEffectHarnessEslintComposition(content)) return [];
483
- }
484
- return [{
485
- id: "effect.eslint.integration",
486
- summary: "Target ESLint config does not compose Effect Harness guardrails",
487
- detail: "The target-owned eslint.config.mjs must import and include @sayoriqwq/effect-harness/eslint.",
488
- evidence: content === void 0 ? "eslint.config.mjs is absent." : "eslint.config.mjs does not reference the stable Effect Harness ESLint export.",
489
- guidance: "artifact-assets/effect/managed/docs/package-config.md"
490
- }];
491
- }
492
- function hasEffectHarnessEslintComposition(content) {
493
- const source = TypeScript.createSourceFile("eslint.config.mjs", content, TypeScript.ScriptTarget.Latest, false, TypeScript.ScriptKind.JS);
494
- let antfuBinding = "";
495
- for (const statement of source.statements) if (TypeScript.isImportDeclaration(statement) && TypeScript.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === "@antfu/eslint-config") antfuBinding = statement.importClause?.name?.text ?? "";
496
- for (const statement of source.statements) {
497
- if (!TypeScript.isImportDeclaration(statement) || !TypeScript.isStringLiteral(statement.moduleSpecifier) || statement.moduleSpecifier.text !== "@sayoriqwq/effect-harness/eslint") continue;
498
- const binding = statement.importClause?.name?.text ?? "";
499
- if (binding.length > 0 && composesEslintBinding(source, binding, antfuBinding)) return true;
500
- }
501
- return false;
502
- }
503
- function composesEslintBinding(source, binding, antfuBinding) {
504
- return source.statements.some((statement) => {
505
- if (TypeScript.isExportAssignment(statement) === false) return false;
506
- if (statement.isExportEquals === true) return false;
507
- if (TypeScript.isArrayLiteralExpression(statement.expression)) return statement.expression.elements.some((element) => TypeScript.isSpreadElement(element) && TypeScript.isIdentifier(element.expression) && element.expression.text === binding) && !spreadsAntfuCall(statement.expression, antfuBinding);
508
- return appendsEffectConfigToAntfu(statement.expression, binding, antfuBinding);
509
- });
510
- }
511
- function spreadsAntfuCall(expression, antfuBinding) {
512
- return antfuBinding.length > 0 && expression.elements.some((element) => TypeScript.isSpreadElement(element) && TypeScript.isCallExpression(element.expression) && TypeScript.isIdentifier(element.expression.expression) && element.expression.expression.text === antfuBinding);
513
- }
514
- function appendsEffectConfigToAntfu(expression, effectBinding, antfuBinding) {
515
- if (antfuBinding.length === 0 || !TypeScript.isCallExpression(expression)) return false;
516
- const append = expression.expression;
517
- if (!TypeScript.isPropertyAccessExpression(append) || append.name.text !== "append") return false;
518
- if (!TypeScript.isCallExpression(append.expression) || !TypeScript.isIdentifier(append.expression.expression) || append.expression.expression.text !== antfuBinding) return false;
519
- return expression.arguments.some((argument) => TypeScript.isSpreadElement(argument) && TypeScript.isIdentifier(argument.expression) && argument.expression.text === effectBinding);
520
- }
206
+ provenance: verifiedProvenance(tsgo_default, tsgoPin),
207
+ referenceOnly: true
208
+ }]
209
+ ];
210
+ /**
211
+ * Read-only Effect Harness Module.
212
+ *
213
+ * Prelude converges only stable Harness-owned assets. Repository-specific
214
+ * package, TypeScript, editor, lint, activation, and verification adaptation
215
+ * begins after delivery through the managed Target Adaptation skill.
216
+ */
521
217
  const harnessModule = defineHarnessModule({
522
218
  descriptor: {
523
219
  harnessId: "effect-harness",
524
220
  protocolVersion: MODULE_PROTOCOL_V2,
525
221
  requiredFeatures: PRELUDE_V2_SUPPORTED_FEATURES
526
222
  },
527
- plan: (context) => Effect.gen(function* () {
528
- const eslintConfig = yield* context.target.readText({
529
- root: "ControlRoot",
530
- path: "eslint.config.mjs"
531
- });
532
- const outputs = context.integration.packageRoots.flatMap(packageOutputs);
533
- const requirements = (yield* Effect.forEach(context.integration.packageRoots, (packageRoot) => context.target.readPackageManifest(packageRoot).pipe(Effect.map((manifest) => requirementsFor(packageRoot, manifest))))).flat();
534
- const checks = context.integration.packageRoots.flatMap(checksFor);
535
- return {
536
- outputs: [
537
- managedTreeOutput,
538
- routingOutput,
539
- ...pinnedReferenceOutputs,
540
- ...outputs,
541
- ...editorPolicyOutputs
542
- ],
543
- requirements,
544
- checks,
545
- issues: eslintIntegrationIssue(eslintConfig)
546
- };
223
+ plan: () => Effect.succeed({
224
+ outputs: stableHarnessOutputs,
225
+ requirements: [],
226
+ checks: [],
227
+ issues: []
547
228
  })
548
229
  });
549
230
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sayoriqwq/effect-harness",
3
3
  "type": "module",
4
- "version": "0.2.1",
4
+ "version": "0.3.0",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "scripts": {
58
58
  "build": "pnpm source-pins:publish && tsdown --config tsdown.config.ts",
59
- "acceptance:cross-repo": "node --experimental-strip-types scripts/cross-repo-acceptance.ts",
59
+ "acceptance:cross-repo": "node --experimental-strip-types tests/acceptance/cross-repo.ts",
60
60
  "dev": "pnpm build",
61
61
  "knip": "knip",
62
62
  "lint": "eslint",