Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Unreleased
- **Pause for a session or a project**, without touching your orders file: `/orders pause [replies|effort|model|subagents] [project]` and `/orders resume …`, plus a Pause card on the Settings tab that does the same: everything at once, or one part per scope. Before, every off switch for effort, model and subagents rewrote `~/.claude/standing-orders.md`, so it turned them off in every session and project until turned back on. A session pause ends with the session (`/clear` starts a new one); a project pause is kept per folder in the plugin store, and every open session in that folder picks it up within seconds. `/orders on`, draft, auto and the mode click also end a project pause of replies. `/orders` lists what is paused, and paused parts say so on their Settings cards.
- A command typed as a chat's first prompt (`/autopilot`, `/orders pause model`) no longer uses up that chat's model pick; the first real prompt picks it. A `/model` typed first still steps it aside.
- The status line and the Now tab say `(paused)` for a paused effort instead of `(yours)`.
- `/orders subagents auto|off`: subagents had only a Settings button.
- Effort auto comes back when the orders turn it back on (an edited file, or a resume), unless you took effort over with `/effort`. Before, once off it stayed off until `/orders effort auto`.

## 0.13.0
- Savings can now prove it. The table reads Saved, Cost, Bottom line, with a verdict that says "Proven" only when its whole 95% range is on one side of zero.
- New **Savings audit** (`audit: on`, a button on the Savings tab; off by default): about one turn in five whose effort the mod would set runs at your own effort instead, chosen by a hash of the turn id. The difference in output tokens per request between the two groups is the effort effect, measured, with a 95% range. Without it effort stays an assumed estimate and the verdict says "Not proven".
Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Sections are bordered cards that light up under the pointer. Motion is calm: a s

**Settings** (every click saves to your orders file; each card says which lines of the file it writes)

- **Pause**: turn everything off for this session or this project, and back on, without changing your orders file (see Pause below);
- **Effort**: a button cycles auto, each level and off; with auto, buttons step the floor and ceiling or reset them;
- **New chats** and **Subagents**: turn auto model and auto subagents on or off; choose which models a new chat may pick from;
- **Replies**: how many answers auto mode sends in a row, and your always-ask words (click one to remove it, type to add);
Expand All @@ -92,10 +93,13 @@ Commands, few on purpose:
/orders help the whole mod in plain words
/orders init have Claude write this repo's own orders
/orders auto|draft send answers yourself, or leave them for your Enter
/orders on|off resume or pause
/orders on|off resume or pause the replies
/orders pause [parts] [project] turn the autopilot off for a while (see Pause)
/orders resume [parts] [project] turn it back on
/orders effort auto|off|low|medium|high|xhigh|max auto, off, or a fixed level
/orders effort min|max <level> bound what auto may pick
/orders model auto|off pick the model for a brand-new chat
/orders subagents auto|off pick a subagent's model and effort
/orders setup open the Settings tab
/orders savings open the Savings tab
/autopilot the pane (/crew is its old name for now)
Expand Down Expand Up @@ -124,6 +128,19 @@ band: mode, answered, effort, ctx, cache, hint, autopilot

A repo's file can come from any clone, so it may only tighten things: its `always-ask` words add to yours, its `max-auto` can only lower yours, and it may set `effort: off` and `cache-ttl`. Every other setting is read from your own file alone.

## Pause

Every setting in your orders file applies to every session and every project. To turn the autopilot off for a while without editing it:

```
/orders pause everything, this session only
/orders pause effort model only those parts (replies, effort, model, subagents)
/orders pause project everything, in this folder, for every session here
/orders resume [parts] [project] undo it
```

A session pause ends with the session (a `/clear` starts a new one). A project pause is kept in the plugin's store for that folder (not in any file of the repo) until you resume it. `/orders` lists what is paused, the Settings tab has a Pause card (pause everything for the session or the project, or click single parts in either row), and the paused parts read "paused" on their cards. A pause only turns things off: resuming never undoes a `/effort` or `/model` you typed, and a chat that is already on its picked model stays on it.

## Effort

`effort:` takes `auto`, `off`, or a fixed level (`low`, `medium`, `high`, `xhigh`, `max`).
Expand Down
8 changes: 7 additions & 1 deletion hooks/judges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ When to use what:
- At the keyboard ............ leave it on draft
- Walking away from a long job /orders auto, then /orders draft when back
- Exploring, want every question /orders off (or Pause), /orders on later
- Autopilot off for a while ... /orders pause (everything, this session only;
your orders file is not changed). Name parts to
pause only those: /orders pause effort model.
Add "project" to keep it paused in this folder
for every session: /orders pause project.
/orders resume [parts] [project] undoes it
- First time in a repo ........ /orders init (Claude writes the repo's orders)
- What is it doing? ........... /autopilot, Now tab (what needs you, what the
orders did and picked, context and limits)
Expand Down Expand Up @@ -275,7 +281,7 @@ Setting /effort yourself turns it off; /orders effort auto turns it back on.

Subagents: with "subagents: auto", each helper subagent gets a model (Haiku
allowed) and effort picked from its task. A model or effort you or Claude named
for it always wins.
for it always wins. /orders subagents auto|off.

Files:
- ~/.claude/standing-orders.md: your rules for every repo, plus the settings
Expand Down
30 changes: 28 additions & 2 deletions hooks/orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,22 @@ export type SettingKey =
| 'band'
export type Settings = Partial<Record<SettingKey, string>>

/** What can be paused for a while without touching the file: the session's or this project's. */
export const PARTS = ['replies', 'effort', 'model', 'subagents'] as const
export type Part = (typeof PARTS)[number]
export type Scope = 'session' | 'project'

// A pause only turns things off, so it is laid over the merged orders like a repo's tightening.
export function withPaused(o: Orders, paused: ReadonlySet<Part>): Orders {
if (!paused.size) return o
return {
...o,
...(paused.has('effort') ? { isEffortAuto: false, effortFixed: null } : {}),
...(paused.has('model') ? { isModelAuto: false } : {}),
...(paused.has('subagents') ? { isSubagentsAuto: false } : {}),
}
}

const attempt = async <T>(job: () => Promise<T>): Promise<T | null> => {
try {
return await job()
Expand All @@ -197,6 +213,9 @@ export function createOrders() {
let merged = parseOrders(DEFAULT_ORDERS)
let own = parseOrders(DEFAULT_ORDERS)
let isFirstRun = false
// Pauses: never written to a file. The session's live in memory, the project's in the plugin store (the caller's).
const paused = { session: new Set<Part>(), project: new Set<Part>() }
const pausedNow = () => new Set([...paused.session, ...paused.project])

// Reads each file once; reloads when asked to or when either differs from the last load.
async function refresh(fs: FileStore, force = false) {
Expand All @@ -220,8 +239,15 @@ export function createOrders() {
}

return {
/** What the mod obeys: the global file plus what the repo's file may tighten. */
get: () => merged,
/** What the mod obeys: the global file, what the repo's file may tighten, and what is paused. */
get: () => withPaused(merged, pausedNow()),
/** What is paused, per scope (replies are only listed here; the caller holds them back). */
paused: (scope?: Scope) => (scope ? new Set(paused[scope]) : pausedNow()),
/** Pauses (`on`) or resumes parts in one scope. Returns that scope's parts after the change. */
pause(scope: Scope, parts: readonly Part[], on: boolean) {
for (const p of parts) on ? paused[scope].add(p) : paused[scope].delete(p)
return [...paused[scope]]
},
/** The person's own file alone. */
mine: () => own,
/** Whether the repo has an orders file. */
Expand Down
14 changes: 12 additions & 2 deletions hooks/picks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ export function createPicks(orders: () => Orders) {
// The session's own level as last seen, and the one we last set: a request that matches neither was changed by the person.
let lastBase: unknown
let lastApplied: unknown
// The person set effort themselves (/effort): auto stays off until they turn it on again, whatever the orders say.
let isTakenOver = false
// The effort judge's context: how the agent's last message ended.
let lastAnswerTail = ''
// model: chosen once, for a chat with no history
Expand Down Expand Up @@ -196,13 +198,20 @@ export function createPicks(orders: () => Orders) {
* isAuto changes in three places only: here, `followOrders` and a request the person changed.
*/
async setAuto(host: Host, isAuto: boolean) {
isTakenOver = !isAuto
await host.show({ isAuto, why: isAuto ? 'auto' : 'yours' })
if (!isAuto) turnEffort = null
},

/** The orders were (re)loaded: if they turn effort off, auto is off. (This one leaves this turn's level standing.) */
/**
* The orders were (re)loaded or a pause changed: off turns auto off; on turns it back on,
* unless the person took effort over. (Off leaves this turn's level standing.)
*/
async followOrders(host: Host) {
if (!orders().isEffortAuto) await host.show({ isAuto: false })
const isAuto = orders().isEffortAuto
const view = await host.view()
if (!isAuto && view.isAuto) await host.show({ isAuto: false })
else if (isAuto && !view.isAuto && !isTakenOver) await host.show({ isAuto: true, why: 'auto' })
},

/** The agent's message ended: its tail is the next effort judge's context. */
Expand Down Expand Up @@ -271,6 +280,7 @@ export function createPicks(orders: () => Orders) {
if (moved && view.isAuto) {
turnEffort = null
effortJob = null
isTakenOver = true
view = await host.show({ isAuto: false, isJudging: false, why: 'yours' })
record.effortTakenOver(host)
}
Expand Down
Loading
Loading