Docs
On-site docs
Read every project doc here.
Start here
Fast path
Reference
Language and CLI
Syntax ReferenceComplete grammar for declarations, metadata, prose, variables, data types, operators, control flow, tasks, and targets.
API ReferenceEvery statement and function with examples of the compiled output.
API IndexThe map of the lower-level API reference and where each concept lives.
CLIcompile, install, add, remove, update, tokens, LSP mode, flags, and examples.
ErrorsHow parse, import, package, and install failures are reported and fixed.
FAQDirect answers about execution, portability, targets, packages, and authoring limits.
Language deep dives
Every construct
CommandsInteractive slash-command workflows that ask, branch, loop, and spawn work.
AgentsStatic personas with description, tools, model, and prose bodies.
HarnessesReusable orchestration templates with param inputs and run bindings.
VariablesStrings, booleans, arrays, scope, and substitution behavior.
Control Flowif, else, while, for, and break in prompt workflows.
OperatorsConcatenation, comparisons, logical operators, and precedence.
Functionsask, confirm, wait_for_response, create_file, and passthrough calls.
Tasksbash, explore, plan, and general subagent tasks.
ParallelStatic concurrent task groups and the constraints inside them.
ImportsShared values, task file references, and circular reference handling.
Orchestrationloop, fanout, gather, route, keep, and synthesize for multi-agent workflows.
Annotationstopology, memory, and error-handling modes for engine-style commands.
OptimizeBehavior-preserving optimization passes and output normalization.
TokensEstimate prompt size before and after optimization.
TargetsClaude, ChatGPT, Cursor, and the adapter contract for new tools.
PackagesManifest format, install flow, publishing guidance, and update behavior.
Tutorial chapters
Learning path
Complete Site TutorialThe expanded tutorial, written directly into this site.
Markdown TutorialThe repository version of the tutorial.
IntroductionWhy Stim exists and what prompt source files solve.
Getting StartedInstall, write a file, compile, and run the result.
AgentsBuild portable personas with metadata and body prose.
VariablesDeclare values and use them across workflows.
Control FlowBranch and loop inside commands.
FunctionsUse the built-in instruction functions.
TasksSpawn subagents from a command.
ParallelCoordinate independent work at the same time.
ImportsCompose larger prompt systems from smaller files.
PackagesInstall, publish, and discover shared definitions.
TargetsCompile one source to multiple AI tools.
EngineAnnotated meta-workflows and topology fragments.
Best PracticesPatterns for writing clean Stim.
Examples, packages, editors
Use real material
Examples GuideThe curated examples overview.
Example Filesbrainstorm, commit, explainer, plan, recall, refactorer, reviewer, security review, and session summary.
Package RegistryThe curated package index.
Reviews PackageSecurity, quality, and documentation review agents.
Planning PackageSpec, scope, and breakdown commands.
Gitflow PackageCommit, PR, and changelog commands.
Writing PackageREADME, docstring, and explainer agents.
Editor PluginsOverview of supported editor integrations.
VS CodeExtension setup, syntax highlighting, snippets, and LSP support.
NeovimSyntax, filetype, compile helpers, and templates.
ZedZed language integration setup.
ContributingProject setup, coding style, tests, and contribution expectations.