effection AGENTS.md

An agent contract for Effection, a JavaScript and TypeScript library for managing asynchronous work. It explains the difference between lazy operations and eager promises, and how structured concurrency keeps work inside its owning scope.

In plain words
What is it for?
Use it when changing Effection code involving operations, promises, generators, spawning tasks, or scopes.
Why use it?
It prevents an agent from assuming that Effection behaves like other asynchronous libraries or inventing unsupported APIs. This helps preserve the library’s core behavior.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/thefrontside/effection/agents-md
Clone the repo
git clone --depth 1 https://github.com/thefrontside/effection

Made for: Codex, OpenCode.

Per session 3,630 This file is loaded in full into every session.
When invoked 3,630 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03630 $0.03630
Opus 5 $0.01815 $0.01815
Sonnet 5 $0.00726 $0.00726
Haiku 4.5 $0.00363 $0.00363

Measured 2d ago against content hash 8500360c3944, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

effection AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 458 lines

How it starts

The opening of the file, as written. The whole thing — 458 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — Effection agent contract

This file is the behavioral contract for AI agents working with the Effection codebase.

Agents must not invent APIs, must not infer semantics from other ecosystems, and must ground claims in the public API and repository code.

If you are unsure whether something exists, consult the API reference: https://frontside.com/effection/api/

Core invariants (do not violate)

Operations vs Promises

  • Operations are lazy. They execute only when interpreted (e.g. yield*, run(), Scope.run(), spawn()).
  • Promises are eager. Creating a promise (or calling an async function) starts work; await only observes completion.
  • You must not claim that a promise is "inert until awaited".
  • You must not use await inside a generator function (function*). Use yield* with an operation instead (e.g. yield* until(promise)).

Structured concurrency is scope-owned

  • Scope hierarchy is created automatically by the interpreter; application code should not manage scopes manually.
  • "Lexical" in Effection: scope hierarchy follows the lexical structure of operation invocation sites (e.g. yield*, spawn, Scope.run), not where references are stored or later used.
  • Work is owned by Scopes.
  • When a scope exits, all work created in that scope is halted.
  • References do not extend lifetimes. Returning a Task, Scope, Stream, or AbortSignal does not keep it alive.

Effects do not escape scopes

  • Values may escape scopes.
  • Ongoing effects must not escape: tasks, resources, streams/subscriptions, and context mutations must remain scope-bound.

Operations, Futures, Tasks

Operation

  • An Operation<T> is a recipe for work. It does nothing by itself.
  • Operations are typically created by invoking a generator function (function*).

Future

  • A Future<T> is both:
    • an Effection operation (yield* future)
    • a Promise (await future)

Task

  • A Task<T> is a Future<T> representing a concurrently running operation.
  • A task does not own lifetime or context; its scope does.

Read the full file on GitHub · 458 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 458 lines · 3,630 tokens per session scan A 8500360c3944

Subscribe to this mod's changes

effection AGENTS.md is an instructions file published in the GitHub repository thefrontside/effection (848 stars, last pushed 25d ago), licensed MIT. It adds 3,630 tokens to every session, about $0.0181 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

asupersync CLAUDE.md

Claude Code instructions for Dicklesworthstone/asupersync, covering claude.md — asupersync, primary directive, quick reference and full guidelines.

Dicklesworthstone/asupersync · 283 tokens

asupersync AGENTS.md

AGENTS.md instructions for Dicklesworthstone/asupersync, covering agents.md — asupersync, rule 0 - the fundamental override prerogative, rule number 1: no file deletion, git branch: only use main, never master and rule 2: no git branches. no git worktrees. ever.

Dicklesworthstone/asupersync · 19,446 tokens

vera CLAUDE.md

Instructions for aallan/vera, covering claude.md — project orientation for claude code, virtual environment, key commands, project layout and writing vera code.

aallan/vera · 6,084 tokens

vera AGENTS.md

Instructions for aallan/vera, covering agents.md — instructions for ai agents, for agents writing vera code, conformance programs as reference, workflow and commands.

aallan/vera · 4,376 tokens

NeoHaskell AGENTS.md

Instructions for neohaskell/NeoHaskell, covering neohaskell — agent guide, hard rule, style (mandatory), commands (pointers, not a duplicate) and work intake.

neohaskell/NeoHaskell · 3,921 tokens

Swift-Concurrency-Agent-Skill copilot-instructions.md

Instructions for AvdLee/Swift-Concurrency-Agent-Skill, covering github copilot instructions: agent skills expert, core agent skills principles, format compliance, skill content organization and review focus areas.

AvdLee/Swift-Concurrency-Agent-Skill · 1,003 tokens