@sayoriqwq/effect-harness 0.2.0 → 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
@@ -7,15 +7,27 @@ import effectHarnessEslintConfig from '@sayoriqwq/effect-harness/eslint'
7
7
  import { harnessModule } from '@sayoriqwq/effect-harness/prelude'
8
8
  ```
9
9
 
10
+ The ESLint export contributes only two composable boundaries: application code
11
+ must not import delivered `repos/effect/**` or `repos/tsgo/**` reference trees.
12
+ tsgo is the sole authority for Effect and TypeScript semantics; Target owners
13
+ choose all other ESLint rules in their own flat config.
14
+
10
15
  `harnessModule` plans a complete Integration-scoped managed knowledge tree,
11
- reference-only pinned source diagnostics, a bounded Control Root routing block,
12
- package-scoped TypeScript policy for each approved Package Root, editor
13
- configuration, requirements, checks, and target-state Issues. Planning is
14
- 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.
15
19
 
16
20
  Integration `feedback/**` is target-owned and never planned as an Output.
17
21
  Pinned Effect and tsgo sources are delivered offline from canonical archive
18
- files in the Artifact with immutable provenance; they
19
- are agent references, never application dependencies. The delivered Target Adaptation skill decides repository-specific
20
- package and TypeScript topology with the Target, then hands ongoing ownership
21
- 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.
28
+
29
+ The reference publication authority chain is [Prelude Contract's normative
30
+ archive protocol](https://github.com/yume-infra/prelude/blob/main/packages/harness-contract/README.md#canonical-tree-archive-protocol)
31
+ → [Partita production](https://github.com/sayoriqwq/partita#pins) → Effect
32
+ Harness composition → [Prelude validation and
33
+ materialization](https://github.com/yume-infra/prelude/blob/main/docs/v2-harness-convergence-contract.md#pinned-reference-trees).
@@ -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
+ }
@@ -5,15 +5,19 @@ Each feedback layer has one job:
5
5
  - tsgo owns TypeScript and Effect semantics, including error/context/layer
6
6
  channels, generators, Schema behavior, v4 API drift, and Effect-native fixes.
7
7
  - tests own behavioral regression.
8
- - ESLint owns import boundaries, package conventions, Effect test entries, and
9
- syntax-only repository rules that tsgo does not represent.
10
- - Harness verification owns policy equality, source provenance, route
11
- reachability, suppression rejection, and packed Artifact completeness.
8
+ - Harness ESLint owns only two architectural import boundaries: application
9
+ code must not import `repos/effect/**` or `repos/tsgo/**`.
10
+ - Target owners compose every other ESLint rule, including package, test,
11
+ syntax, style, and project-specific policy.
12
+ - Harness verification owns policy equality, diagnostic inventory, source
13
+ provenance, route reachability, and packed Artifact completeness.
12
14
 
13
- If tsgo and ESLint prescribe conflicting Effect code, keep the verified tsgo
14
- behavior and narrow ESLint. Both the public Target adapter and Effect Harness's
15
- repository self adapter intentionally permit `Effect.ignore` because the
16
- current tsgo policy can recommend it. They also apply the same canonical
17
- `effect-harness/no-disable-validation` rule and reject
18
- `{ disableValidation: true }`; only delivery and surrounding repository
19
- composition differ.
15
+ The public Target adapter and Effect Harness's repository self adapter consume
16
+ the same two canonical boundaries; only delivery and surrounding configuration
17
+ differ. Harness ESLint does not express Effect API, Schema, test-entry, package
18
+ migration, semantic, or style rules. If tsgo does not yet express an Effect or
19
+ TypeScript constraint, the Harness leaves it unenforced until tsgo does; it does
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,8 +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. When ESLint conflicts with a
19
- supported tsgo rewrite, tsgo wins and the syntax rule must be narrowed.
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` |
@@ -25,10 +30,9 @@ and placement; it does not change these accepted versions or roles.
25
30
  make a signature easier.
26
31
  - Use Effect resource and Scope operators instead of ad hoc cleanup.
27
32
  - Use `NodeRuntime.runMain` for Node entry points.
28
- - Use `effect/unstable/cli`, not the retired `@effect/cli` package.
29
- - Use `it.effect`, `it.live`, or `layer` from `@effect/vitest` for Effect tests.
30
- - Let tsgo own type-aware Effect idioms and quick fixes. Do not duplicate or
31
- contradict them with syntax-only lint rules.
33
+ - Let tsgo own type-aware Effect idioms and quick fixes. Harness ESLint does not
34
+ duplicate them with syntax-only rules; Target owners choose any additional
35
+ package, test, syntax, or style lint policy.
32
36
 
33
37
  For an unfamiliar API or behavior, follow [effect-source.md](./effect-source.md)
34
38
  instead of guessing from memory.
@@ -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'
@@ -27,4 +32,6 @@ export default antfu().append(...effectHarness)
27
32
  ```
28
33
 
29
34
  Antfu v9 returns a `FlatConfigComposer`; do not spread `antfu()` into an array.
30
- ESLint owns syntax and repository boundaries, while tsgo owns Effect semantics.
35
+ Append the Harness export so later host or test overlays cannot replace its two
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.'