Temper
FORG Temper is a behavioral governance layer that injects the FORG Temper Standardinto your AI coding tool's native rules or instruction surface. It runs in the background and requires no action from you per session — once enabled, it is always active during FORG-monitored sessions.
How injection works
When you run forg temper full (or connect a tool with Temper enabled), the agent writes a bounded text block into the target file:
<!-- forg:temper:begin -->
[FORG Temper Standard — level: full]
... (the full behavioral specification) ...
<!-- forg:temper:end -->The block is bounded by HTML comment markers. Your AI tool reads it as part of its instructions. FORG can remove it cleanly at any time: forg temper off removes the block and restores the file byte-identically.
Injection is text-only. Temper never:
- Executes shell commands or scripts
- Edits your source code files
- Intercepts or modifies API requests
- Stores your prompts, completions, or source content
The Temper Standard
The embedded specification covers four areas:
1. The Restraint Ladder
Six rungs, evaluated top-down. The AI stops at the first rung that solves the problem:
- Does this need to exist at all? (YAGNI)
- Does the standard library solve it?
- Does a native platform feature cover it?
- Does an already-installed dependency solve it?
- Can it be one function or expression?
- Write the minimum code that works.
2. Token-efficiency rules
Six rules that reduce AI output token cost without sacrificing correctness: small files, precise naming, no speculative comments, flat over nested, one thing per unit, delete before adding.
3. Non-Negotiable Carve-Outs
Five categories that are never subject to the Restraint Ladder, regardless of level:
- Input validation at trust boundaries
- Error handling that prevents data loss
- Security controls
- Accessibility basics
- Anything explicitly requested
4. The forg-temper: marker convention
A comment format for deliberate simplifications: // forg-temper: <what was simplified> · ceiling: <known limit> · upgrade: <when/how>. Markers are searchable, named, and never implicit.
Enforcement levels
| Level | Restraint Ladder | Token rules | Carve-Outs | Scope challenges |
|---|---|---|---|---|
| basic | Advisory | — | Mandatory | — |
| full (default) | Enforced | Enforced | Mandatory | — |
| ultra | Extremist | Enforced | Mandatory | Active |
Switch levels with forg temper basic, forg temper full, or forg temper ultra. Use --global to set across all projects; omit it to set only in the current directory (.forg/temper).
Opt-out guarantee
forg temper off is the complete opt-out. It:
- Removes the Temper block from every adapter's instruction surface
- Restores each file byte-identically to its state before Temper
- Deletes any file that was created solely to hold the Temper block
- Clears the persisted level state
No residue remains after opt-out. This is tested by automated boundary tests.
Telemetry — metadata-only contract
When Temper is active, the agent emits temper-restraint signals per task. The signal payload contains only:
- The active enforcement level (a string: basic / full / ultra)
- Files touched — integer count
- Lines added — integer count
- Lines removed — integer count
- New dependency declarations — integer count
forg-temper:markers in changed files — integer count- Estimated output tokens — integer count
No source code, file paths, variable names, user text, prompts, or PII is ever included. Every signal is HMAC-signed before transmission. The payload schema is enforced by boundary tests that fail if any non-count field is present.
Attribution
The FORG Temper Standard is an original work authored by FORG. Its core principle — that the best code is the code that does not need to exist — was conceptually inspired by the ponytail project (Adam Spiers, MIT License). The standard is a complete re-authoring, not a copy or derivative work. Attribution is in the NOTICE file at the root of the FORG repository.