effect
Work with Effect v4 / effect-smol TypeScript code in this repo
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 8
- Forks
- 0
01 前言 Front Matter
- name
- effect
- description
- Work with Effect v4 / effect-smol TypeScript code in this repo
03 SKILL.md 正文
Effect
This codebase uses Effect for typed, composable TypeScript services, schemas, and workflows.
Source Of Truth
Use the current Effect v4 / effect-smol source, not memory or older Effect v2/v3 examples.
- If
.forge/references/effect-smolis missing, clonehttps://github.com/Effect-TS/effect-smolthere. Do this in the project, not in the skill folder. - Search
.forge/references/effect-smolfor exact APIs, examples, tests, and naming patterns before answering or implementing Effect-specific code. - Also inspect existing repo code for local house style before introducing new patterns.
- Prefer answers and implementations backed by specific source files or nearby repo examples.
Guidelines
- Prefer current Effect v4 APIs and project-local patterns over old blog posts, examples, or package-memory guesses.
- Use
Effect.gen(function* () { ... })for multi-step workflows. - Use
Effect.fn("Name")orEffect.fnUntraced(...)for named effects when adding reusable service methods or important workflows. - Prefer Effect
Schemafor API and domain data shapes. Use branded schemas for IDs andSchema.TaggedErrorClassfor typed domain errors when modeling new error surfaces. - Keep HTTP handlers thin: decode input, read request context, call services, and map transport errors. Put business rules in services.
- In Effect service code, prefer Effect-aware platform abstractions and dependencies over ad hoc promises where the surrounding code already does so.
- Keep layer composition explicit. Avoid broad hidden provisioning that makes missing dependencies hard to see.
- In tests, prefer the repo's existing Effect test helpers and live tests for filesystem, git, child process, locks, or timing behavior.
- Do not introduce
any, non-null assertions, unchecked casts, or older Effect APIs just to satisfy types. - Do not answer from memory. Verify against
.forge/references/effect-smolor nearby code first.
Testing Patterns
- Use
testEffect(...)frompackages/forge/test/lib/effect.tsfor tests that exercise Effect services, layers, runtime context, scoped resources, or platform integrations. - Use
it.live(...)for filesystem, git repositories, HTTP servers, sockets, child processes, locks, real time, and other live platform behavior. - Run tests from package directories such as
packages/forge; never run package tests from the repo root. - Prefer explicit test layers over ad hoc managed runtimes. Keep dependency provisioning visible in the test file.
- Use scoped fixtures and finalizers for resources that must be cleaned up, including temporary directories, flags, databases, fibers, servers, and global state.
04 同仓库更多 Skills
vigil-skill
暂无简介
turen-documentation
Writes, updates, moves or audits TurenOS documentation by reading the code it describes. Every claim on a page (defaults, limits, flags, paths, behavior, failure modes) comes from the implementing source, its registrations and tests, never from memory or another page. Documentation is centralized in docs/ sections (architecture, systems, providers, operations, development, experimental, assets); READMEs are short entry points, AGENTS.md files point into docs/, contracts stay in specs/, prototypes in mockups/, and the systems catalog indexes every system page. Covers TurenOS branding, where a page goes, page conventions, a code-first audit method for wrong claims, contradictions and undocumented systems, a link checker and a link-preserving page mover. Use it whenever a change adds, edits, moves or reorganizes documentation, documents a system, package or feature, follows a code change that docs describe, or audits the docs.
turen-diff-documentation
Checks TurenOS documentation against one branch or pull request diff. A script maps the diff to the Markdown it can make wrong (docs/ pages, specs, READMEs and AGENTS.md files that cite a changed, deleted or renamed file, or name an env var, CLI option, export or constant the diff removed or changed) and lists new env vars and CLI options nothing documents; the agent then reads the diff for behavior changes no name reveals and verifies each affected page, and every docs edit in the diff, against the new code. Use it before opening or merging a PR, when reviewing someone else's PR, or when asked whether a change needs docs. Writing and placing the fixes follows turen-documentation; AGENTS.md fixes follow turen-context.
turen-context
Audits, places and maintains the AGENTS.md files that coding agents load while developing TurenOS, the one-line CLAUDE.md shims beside them that let Claude Code read them, and the frontmatter of repository skills. Every rule is checked by reading the code it describes (symbols, commands, flags, invariants and "not wired"/"only" claims), and a small checker proves what a script can, such as load budget, parent pointers, cited paths and scripts, the CLAUDE.md shims and skill frontmatter. Covers how Codex, Claude Code, OpenCode and TurenOS load instruction files, what belongs in one, and when an area deserves its own. Use it when adding, editing, splitting or moving any AGENTS.md, CLAUDE.md or skill, when an agent keeps missing a repo convention, when a package gains its own commands or gotchas, or for a periodic audit. Not for docs/ (use turen-documentation), and not for how the TurenOS product loads its users' instruction files.