/relux:effect-editfrom relux
Modifies existing Relux effect declarations, managing changes to expect sets, expose surfaces, dependency graphs, shell bodies, and cleanup logic with identity and caller-surface discipline.
Ships in relux. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Edit an effect declaration in place. The discipline covers what
breaks at each of the five mutation dimensions -- expect,
expose, start <Dep>, let / shell body, cleanup -- and when
those breaks become caller-visible (surface) or instance-visible
(identity).
Walk the checklist on every Modify, even when you only intend
to touch one dimension. Expect and expose often co-mutate (adding
a port: it goes in expect, and the shell that binds it gets
exposed). A body-only edit can still leak through expose var x
when x is a let value the edit changed.
User phrasings:
<Effect>." / "Drop <var> from <Effect>'s expects."<Effect>." / "Stop exposing
<Effect>.<x> -- nothing reads it."<Effect> to start <Dep> first." / "Change <Effect>'s
dep on <OldDep> to <NewDep>."<Effect>'s service shell."<Effect> -- the config rendering belongs in its own leaf."Agent-task signals:
expose set. The edit is "add the expose" (not
"rewrite the test"), unless the caller's expectation is wrong.relux check reports an identity drift after an expect change
-- two start <E> sites that used to share an instance now fan
out, or vice versa.relux:effect-write.relux check.
The wrapper-transparency rule (from relux:effect-write) is
load-bearing on edits too.Out of scope:
relux:effect-write. If a Modify
splits an effect into two pieces, that skill handles the new
leaf; this skill handles the surviving original.start <E>
site, decide per-site (delete the caller, replace with another
effect, inline the logic), then delete the declaration. The
decisions are case-by-case; no rubric beyond "find the callers
and ask the user."relux:effect-write plus relux:test-edit to swap the inline
ops for a start <NewEffect>. Not this skill.relux:markers. Handoff
after the edit if the modification introduces a need for @skip
/ @flaky / @if.Direct invocation (/relux:effect-edit). Ask the user which
effect, which of the 5 dimensions are changing, and whether the
edit is part of a split (Extract). Without an effect plus at least
one dimension, the checklist has nothing to walk.
../../references/effects-identity.md. Source
of truth for body-section order, expect semantics, overlay
evaluation, identity tuple, and lifecycle. The dedup-delta
analysis under Dimension 1: expect relies on the identity
tuple definition there.../../references/effects-expose.md. Source of
truth for expose forms (expose shell s [as alias],
expose var x), caller access (Alias.shell / Alias.var),
non-exposed shell termination, and the wrapper re-export
rule. The surface-breakage analysis under Dimension 2:
expose relies on it.../../references/cleanup.md if the edit
touches Dimension 5. Covers fresh-shell discipline,
don't-stop-services, don't-set-fail-patterns, idempotency,
and the artifact-preservation rule.../../references/fail-patterns.md if the
edit retunes fail patterns in a shell body. Slot scope is
the shell; fn frames snapshot and restore. The inline-only
rule for service shells (set in the shell body, not in a
called fn) applies on edits too.expect or expose: enumerate call sites
and their surface references.
- rg "start <E>" -- find every test or effect that
instantiates this effect; capture the alias binding from
each start <E> as <Alias> (or default name).
- For each call site, read the containing test/effect body
and list every <Alias>.<shell> / <Alias>.<var>
reference within that body's scope. These are the
surface references that break if the effect's surface
shifts. A flat rg "<Alias>\." is not sufficient: aliases
are scope-local, so the same identifier may legitimately
bind to unrelated effects elsewhere in the suite, and a
bare grep picks up those collisions as false positives.expect on a wrapper: the dep's identity
may also need to propagate. Re-check the dep chain --
changes to a wrapper's expect set commonly require the
same expect change on its dep, per the dedup-propagation
rule from relux:effect-write.The five Modify dimensions are a checklist, not a tree. Walk
each one in order; for dimensions the edit does not touch, the
walk is a one-line confirmation ("not changing -- skip"). Skipping
a dimension entirely risks missing a leak (e.g., a let value
that is expose var-d makes Dimension 4 leak through Dimension
2).
expectThe expect block. Semantics, identity tuple, and the
unique-resource taxonomy: ../../references/effects-identity.md.
Adding a var.
start <E> {...} overlay must now supply it (or
inherit it from the lexical env). Missing overlays surface as
resolve-time errors at relux check.expect brings
whatever per-site differences it carries into the tuple. If
every site happens to evaluate to the same value today, dedup
is preserved -- but the var is now in the tuple, so any future
caller that overrides it will split.expect
must usually grow to include the new var, so the wrapper can
forward it through. Without that propagation the wrapper
silently fixes the new var to its lexical default at every
caller site, defeating the per-caller overlay.Removing a var.
start <E> sites within the same test's
dependency graph that ran against different ports (and got
distinct ephemeral instances) will suddenly share a single
instance with whichever overlay won the dedup race. This is a
within-test effect only -- the registry is per-test
(../../references/effects-identity.md > Scope), so sites in
different tests never interacted before the removal and still
don't after. Surface the within-test delta to the user before
removing.../../references/effects-identity.md
The
expectcontract covers the "contract, not sandbox" rule).
Renaming a var (expect old_name -> expect new_name).
expect, in any let / shell body
references, and in every caller's overlay key.Required actions for any expect change:
let of a literal, interpolation over literals) or
runtime-resolved (uuid(), available_port(), rand(),
which(...), anything reading the effective env or a parent
effect's let that itself depends on runtime values).start <E> site, state whether they now
share one <E> instance or split into separate ones -- e.g.
"in test T, start sites P and Q will share one <E> instance;
sites R and S will split." Sites in different tests never
interact -- each test gets its own registry -- so there is no
cross-test delta to report. The user can confirm or veto on the
spot.<E> from relux/out/<run-id>/<test>/events.json (one span
per shared instance per test). The delta surfaces in span
counts.expect block, then walk
the rest of the checklist (a Dimension 1 change frequently
forces changes in Dimensions 3, 4, 5 too).exposeThe effect's caller-visible surface. Forms, caller access, the
non-exposed-shell termination rule, and the wrapper re-export
rule: ../../references/effects-expose.md.
Adding an expose.
relux:effect-write: the service-running
shell is always useful and always exposed; other shells and
vars are exposed only when a caller has a reason to operate on
them. The "don't expose setup-only shells" pitfall in
../../references/effects-expose.md still applies.Removing an expose.
<Alias>.<shell> / <Alias>.<var>
reference at a call site that named this exposure breaks at
resolve time.relux:effect-write is
load-bearing on edits too). Layer-own additions can be dropped
freely; the transparency baseline -- the dep's surface flowing
through -- cannot.Renaming an expose (expose shell s as new_alias).
expose line, then update every
caller's <OldAlias>.<x> reference to <NewAlias>.<x>. Pure
mechanical rename.Switching which shell is exposed.
start <Dep> (deps)start <Dep> lines and their as <Alias> / overlay blocks.
start syntax and overlay semantics: ../../references/statements.md.
Adding a dep.
expect propagates: this effect
must supply each of <Dep>'s expected vars via overlay (or pass
through from its own expect set, which is the common case for
wrappers).<Alias>.<x>. Use them in subsequent
shells; do not re-expose them unless this effect is meant to be
a transparent wrapper (the wrapper-transparency rule).Removing a dep.
<Alias>.<x> references in this effect's body must
also go (or be replaced). relux check catches this.<Dep>, the dep is now unreferenced. That is not an error
(unused effects are legal), but flag it to the user -- the dep
is dead code if nothing else starts it.Replacing a dep (start <OldDep> -> start <NewDep>).
expect set may differ from the old one. Walk
the overlay: drop forwarded vars <NewDep> does not expect;
add overlays for vars <NewDep> expects that <OldDep> did
not.<NewDep> transitively starts this effect, the
graph cycles. Resolver catches it, but cleanest to notice
before the edit.Reordering deps.
start order determines which span the others nest under in
the structured log and which let / shell statements may
reference which <Alias>.<x>. Reordering can break the body
if it references aliases out of order. Identity is
unaffected.let / shell bodylet bindings, shell <name> { ... } blocks, the send / match
/ sleep statements inside them.
let changes.
relux:function's pure fn). Pure refactors are
safe in isolation.let is expose var-d, the body-only
edit is silently a surface change -- see
../../references/effects-expose.md >
Editing a let silently edits the exposed surface. Surface
the change to the user as if it were an expose edit.Shell body changes.
fn. Frame scope reverts the slot on return; see
../../references/functions.md > fn (per-frame state) and
../../references/fail-patterns.md.relux:effect-write > Composing the service shell
still applies (no & / nohup / docker run -d; containers
use docker run --rm -i).${__RELUX_TEST_ARTIFACTS} are
scanned by the runtime and surfaced in event.html (see
../../references/project-layout.md > Built-in environment
variables). Writes outside that path are invisible to the
viewer.Adding or removing a shell block.
Cleanup semantics -- fresh implicit shell, reverse topological
order, the no-fail-patterns / no-service-kills / idempotency /
artifact-preservation rules -- all live in
../../references/cleanup.md. Read it before touching this dimension.
The skill-level discipline below is when and why to edit, not
how the block behaves.
Adding cleanup.
Removing cleanup.
Editing cleanup body.
../../references/cleanup.md
applies as much on edits as on initial authoring -- do not
delete files under ${__RELUX_TEST_ARTIFACTS}.../../references/cleanup.md > When it runs). Unwind only what
the wrapper added; the dep handles its own teardown.When the Modify is part of a split -- a bundled Service whose shell body inlines config rendering, or a layer that bundles two provisioning steps into one effect -- the operation is Modify + Write, not a separate path.
Recognition shapes (mirror the decompositions in
relux:effect-write):
Bundled Service. The shell body renders a config file
inline (<<HEREDOC, cat > config.toml) and then launches the
service that reads it. Split:
<Svc>Config as a leaf via relux:effect-write
(same expect set, renders the file, exposes
config_path, no cleanup).start <Svc>Config as Cfg in the deps section, and change
the launch line to read ${Cfg.config_path}.Bundled layer. The shell body does two distinct provisioning steps in sequence (launch + migrate, launch + seed, migrate + seed). Split:
relux:effect-write, transparently wrapping the previous
base.start <Dep>
to point at the new lower layer, remove the duplicated
provisioning step from its shell body, keep only the steps
this layer adds.Handoff sequencing. Write the new leaf first (it is
self-contained; relux:effect-write walks its own checklist).
Then Modify here, with start <NewLeaf> already resolvable.
Doing the Modify first leaves the suite in an inconsistent state
where start <NewLeaf> does not resolve -- relux check would
fail and you'd be unable to verify the Modify in isolation.
Surface preservation. The split should be transparent to
callers: the original effect's expose set is the union of what
callers currently see; after the split, the surface must be at
least the same union (additions are fine; subtractions break
callers and re-enter Dimension 2 as a separate edit).
After every Modify, in order:
relux check # parse, resolve, regex compile, identity wiring
relux check catches:
expect vars / expose
surface (Dimensions 1 and 2).expect after let, etc.).relux run # mandatory after every Modify
relux run catches:
relux/out/<run-id>/<test>/events.json
or via the per-test event.html timeline. If the dedup map
changed, the span count changed.relux check cannot catch any of these.starts this effect.A green relux run is the gate. A relux check pass on its own
is necessary but never sufficient for a Modify.
expect change: the dedup delta was surfaced to the
user before the edit, and the user confirmed it.expose removal: every <Alias>.<x> reference in the
grep was edited or the removal was rolled back.relux:effect-write
first; the Modify here happened second; both halves' surfaces
union to at least the original's surface.relux check passes.relux run passes -- including every other test that starts
this effect. Each such test builds its own instance from the
same declaration, so a passing run on the directly-edited tests
alone is not sufficient.relux:effect-write -- for the new-leaf half of any Extract
split. Always called before the Modify here; Modify needs
the new leaf to resolve.relux:function -- when the shell-body edit grows a helper.
Authoring a helper in relux/lib/ is relux:function's
Add path; modifying an existing helper is its Modify path.relux:markers -- when the Modify introduces a guard need
(# skip unless ..., # flaky, # run if ... on the effect
or any of its fns). Handoff after the edit lands.relux:configure -- when the dedup delta from an expect
change interacts with [run].jobs. Splitting one shared
instance into N per-test instances amplifies setup cost; the
user may want to revisit parallelism.relux:test-edit -- when the Modify breaks caller tests'
surface (a <Alias>.<x> reference that no longer resolves
after this edit) and the fix is on the test side rather than
rolling back the edit.../../references/effects-identity.md -- body-section order,
expect semantics, overlay evaluation, identity tuple,
lifecycle. Dimension 1's dedup-delta analysis depends on it.../../references/effects-expose.md -- expose forms, caller
access, non-exposed shell termination, wrapper re-export rule.
Dimension 2's surface-breakage analysis depends on it.../../references/cleanup.md -- fresh-shell discipline, allowed
operations, idempotency, artifact preservation. Dimension 5.../../references/fail-patterns.md -- slot scope, inline-only rule
for service shells. Dimension 4 when retuning patterns.../../references/functions.md -- frame scope, pure vs impure,
arity dispatch. Dimension 4 when the edit touches a helper.The recurring effect-language mistakes -- expose-var leak from
body-only let edits, dropping a wrapper's re-exposed dep
surface, setting fail patterns inside a fn, cleanup that
deletes artifacts under ${__RELUX_TEST_ARTIFACTS} -- live in
../../references/effects-expose.md, ../../references/fail-patterns.md,
../../references/functions.md, and ../../references/cleanup.md with
canonical Don't/Do examples. The pre-flight reads load them;
this section captures only the Modify-specific disciplines that
have no reference home.
expect without simulating the dedup deltaexpect changes do not surface as relux check errors when the
change is identity-shifting (rather than resolve-breaking).
Adding a var that all callers happen to share at the same value
is invisible to check; removing a var that callers held
distinct on silently collapses N instances into one. The dedup
delta is only visible at relux run time, in span counts.
Don't:
// Before: expect (data_dir, port) -- two `start Server` sites in
// the same test's dependency graph, on distinct ports, distinct
// instances.
// After: expect (data_dir) -- the two sites' overlays differ only
// on port; they now share one instance. The second site silently
// runs against the first site's port.
effect Server {
expect data_dir
let port := "8080" // was: expect (data_dir, port)
shell run {
> ./server --data ${data_dir} --port ${port}
}
}
Do: enumerate callers, evaluate overlays under the proposed new tuple, list the merges/splits to the user, get a confirmation before the edit lands.
relux runrelux check catches resolve-time breakage. It catches none
of the identity-dedup deltas (Dimension 1), wrapper-transparency
drift visible only at call sites (Dimension 2), body regressions
(Dimension 4), or cleanup-ordering errors (Dimension 5). A
check-only verification is silently false confidence. After a
Modify, always relux check && relux run; scan setup-span counts
in events.json for dedup deltas when Dimension 1 was touched,
and scan failure annotations across every test that starts this
effect for Dimensions 2 / 5 fallout.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub shizzard/relux --plugin relux11 skills in this plugin
/configurerelux:configureTune `Relux.toml` knobs -- shell command/prompt, match/test/suite timeouts, parallel jobs, flaky retries -- with a strong bias toward shipped defaults. Use when the user asks to change the shell Relux spawns, bump a timeout because something raced, parallelize the suite, enable flaky retries, rename the suite, or otherwise edit `Relux.toml`. Also fires when the agent encounters a `match-timeout` cancellation in `events.json` and the obvious fix is at the manifest level rather than per-test. Insist on keeping defaults unless the user has a concrete, evidenced signal -- a timeout cancellation, a known boot time, a measured wall-clock budget. Static per-test tuning via `test "name" ~30s` is the wrong tool; this skill or CI's `--timeout-multiplier` covers slow environments./editor-pluginrelux:editor-pluginInstall or update the relux editor plugin for VS Code (and Cursor / VSCodium / code-server) or JetBrains-family IDEs (IntelliJ IDEA, RustRover, CLion, PyCharm, GoLand, WebStorm). Use when the user asks for syntax highlighting on .relux files, wants to set up their editor for relux work, or upgrades an outdated plugin. Often invoked as a follow-up by relux:install after the binary is on PATH./effect-writerelux:effect-writeAuthor a new `effect` declaration -- `expect` set, deps, expose surface, shell body, and cleanup -- with discipline about identity (one effect per service, unique-resources rule), config decomposition (Config + Service when the service rejects ENV), and the wrapper-effect re-expose rule. Use when the user asks to write a new effect, add an effect for a service the suite does not yet manage, wrap an existing effect with seed data / migrations / post-init steps, or decompose a file-configured service into Config + Service. Fires on phrasings like "write an effect for X", "add a Postgres effect", "wrap Db with seeded data", "this service needs a config file -- how do I model it". Modifying an existing effect's body or surface is `relux:effect-edit`; moving an effect between modules or removing one are mechanical operations with no skill of their own. Authoring tests that use the effect is `relux:test-write` (which hard-switches here when a required service has no effect yet)./functionrelux:functionAdd, modify, remove, move, or extract `fn` / `pure fn` declarations. Use when the user asks to author a helper function, extract repeated inline code into a function, change a function's body or arity, promote a `fn` to `pure fn` (or demote), move a function between inline modules and `relux/lib/`, or delete a function. Fires on phrasings like "extract this into a helper", "make this a pure function", "move this to lib", "inline this single-caller helper", "add a default-argument version of `http_request`", "delete this function -- nothing uses it". The pure-vs-impure split decides what the function can do; the location decision (inline vs `relux/lib/`) decides who can import it. Marker placement on functions is the `relux:markers` skill's territory; this skill authors the declaration the marker attaches to./initrelux:initBootstrap a Relux test suite in a project that does not yet have one -- create `Relux.toml`, the `relux/{tests,lib,out}` layout, and a smoke test. Use when the user asks to start using Relux in a repo, scaffold a new suite, add Relux to an existing project, set up Relux from scratch, or initialize tests in a directory. Also fires when the agent is about to author a `.relux` file in a project where `Relux.toml` does not exist anywhere on the ancestor chain. Idempotent -- if a suite already exists at or above the current directory, hand off to `relux:configure` for tuning rather than re-scaffolding./installrelux:installInstall or update the relux binary. Use when the user asks to install relux, set up relux on a machine, get relux running for the first time, update relux, or upgrade to a newer published version. Also fires when the agent encounters a Relux.toml in a repository but `relux` is missing from PATH or its `--version` is older than the latest crates.io / GitHub Releases tag.Other plugins' skills for the same job