instar 1.3.452 → 1.3.454
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/autonomous/SKILL.md +51 -3
- package/.claude/skills/autonomous/hooks/autonomous-stop-hook.sh +498 -24
- package/.claude/skills/autonomous/scripts/setup-autonomous.sh +17 -0
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +32 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/CompletionEvaluator.d.ts +64 -3
- package/dist/core/CompletionEvaluator.d.ts.map +1 -1
- package/dist/core/CompletionEvaluator.js +170 -30
- package/dist/core/CompletionEvaluator.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +77 -4
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/types.d.ts +25 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +2 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +46 -9
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +64 -64
- package/src/scaffold/templates.ts +2 -0
- package/upgrades/1.3.454.md +84 -0
- package/upgrades/side-effects/autonomous-completion-discipline.md +112 -0
- package/upgrades/side-effects/deferral-detector-time-fatigue.md +67 -0
- /package/upgrades/{1.3.452.md → 1.3.453.md} +0 -0
|
@@ -16,8 +16,15 @@ Before activating the stop hook, you MUST:
|
|
|
16
16
|
|
|
17
17
|
1. **Analyze the goal** and break it into specific, verifiable tasks
|
|
18
18
|
2. **Present the task list** to the user with clear completion criteria
|
|
19
|
-
3. **
|
|
20
|
-
|
|
19
|
+
3. **Propose a measurable `completion_condition`** synthesized from those tasks — an
|
|
20
|
+
artifact-grounded end-state an INDEPENDENT judge can verify from what you SURFACE
|
|
21
|
+
(a commit SHA, a file's content, a CI run id, a test-count delta). This is the
|
|
22
|
+
PRIMARY completion mechanism. Only fall back to a self-declared promise when no
|
|
23
|
+
verifiable condition can be expressed — and then record `completion_mode:
|
|
24
|
+
promise-fallback` + a one-line `promise_fallback_reason:`.
|
|
25
|
+
4. **Wait for user confirmation** before activating the hook
|
|
26
|
+
5. **Define the completion promise** — retained as the fallback token (only TRUE when
|
|
27
|
+
ALL tasks are done)
|
|
21
28
|
|
|
22
29
|
**Example interaction:**
|
|
23
30
|
|
|
@@ -90,6 +97,10 @@ collide on). If you somehow have no `report_topic`, fall back to `.instar/autono
|
|
|
90
97
|
|
|
91
98
|
Write this content:
|
|
92
99
|
|
|
100
|
+
<!-- COMPLETION_CONDITION_DEFAULT — the Write-tool template defaults to a verifiable
|
|
101
|
+
completion_condition (judged by an INDEPENDENT model), NOT the self-declared
|
|
102
|
+
promise. The promise is the recorded fallback. Spec: AUTONOMOUS-COMPLETION-DISCIPLINE.md -->
|
|
103
|
+
|
|
93
104
|
```markdown
|
|
94
105
|
---
|
|
95
106
|
active: true
|
|
@@ -104,7 +115,11 @@ report_topic: "TOPIC_ID"
|
|
|
104
115
|
report_interval: "30m"
|
|
105
116
|
last_report_at: ""
|
|
106
117
|
level_up: true
|
|
107
|
-
|
|
118
|
+
completion_condition: "<measurable, artifact-grounded end-state synthesized from the task list>"
|
|
119
|
+
completion_mode: condition # "condition" (default) | "promise-fallback"
|
|
120
|
+
promise_fallback_reason: "" # one line, REQUIRED iff completion_mode == promise-fallback
|
|
121
|
+
completion_promise: "ALL_TASKS_COMPLETE" # retained as the fallback token
|
|
122
|
+
hard_blocker_nonce: "{a random per-run token — get via: openssl rand -hex 8}"
|
|
108
123
|
---
|
|
109
124
|
|
|
110
125
|
# Autonomous Session
|
|
@@ -119,6 +134,27 @@ completion_promise: "ALL_TASKS_COMPLETE"
|
|
|
119
134
|
{autonomous instructions}
|
|
120
135
|
```
|
|
121
136
|
|
|
137
|
+
**`completion_condition` is the PRIMARY field — the default path.** It is judged each
|
|
138
|
+
turn by an INDEPENDENT model against what you SURFACE in your output (it cannot grade
|
|
139
|
+
its own homework, and it is fail-safe — evaluator-unreachable ⇒ keep working, never a
|
|
140
|
+
false "done"). Synthesize it from the task list, and prefer an **artifact-grounded**
|
|
141
|
+
end-state the judge can verify from the surfaced transcript — a commit SHA you show, a
|
|
142
|
+
file whose content you show, a CI run id, a concrete test-count delta — over an
|
|
143
|
+
unverifiable prose claim like "tests pass". `duration_seconds` is REQUIRED (a bounded
|
|
144
|
+
run; the duration is the hard backstop) — never set a truly-unbounded run.
|
|
145
|
+
|
|
146
|
+
**The self-declared promise is the RECORDED fallback, not the default.** Only fall back
|
|
147
|
+
to it when a verifiable condition genuinely cannot be expressed (rare — a purely
|
|
148
|
+
exploratory run with no testable end-state). When you do, set
|
|
149
|
+
`completion_mode: promise-fallback` and a one-line `promise_fallback_reason:` — so
|
|
150
|
+
"I chose the rationalizable path" is a logged, operator-visible fact, not an invisible
|
|
151
|
+
default.
|
|
152
|
+
|
|
153
|
+
**`hard_blocker_nonce` authenticates an honest `(a)` exit.** Write a fresh random token
|
|
154
|
+
(`openssl rand -hex 8`). The stop hook accepts a `<hard-blocker nonce="...">` terminal
|
|
155
|
+
marker ONLY when its nonce matches this — so incidental `<hard-blocker>` prose (e.g.
|
|
156
|
+
quoting this skill) can never trip an exit. See "Legitimate Stop Conditions" below.
|
|
157
|
+
|
|
122
158
|
**CRITICAL**: To capture the session ID correctly, run this FIRST:
|
|
123
159
|
```bash
|
|
124
160
|
echo $CLAUDE_CODE_SESSION_ID
|
|
@@ -213,6 +249,18 @@ These are the rationalizations that end a pre-approved session early. Every one
|
|
|
213
249
|
|
|
214
250
|
**If you genuinely hit (a):** report the hard blocker clearly (what you tried, why you are stuck, what you'd need), then continue with any *other* in-scope work that the blocker does not gate — a blocker on one task is not a stop for the whole session.
|
|
215
251
|
|
|
252
|
+
**`(a)` reporting prose is DISTINCT from the terminal `<hard-blocker>` marker.** Routine "I'm blocked on this one task but continuing elsewhere" reporting is plain prose — do NOT use the marker tag for it. The nonce'd `<hard-blocker>` marker is emitted ONLY when you actually intend to TERMINATE the WHOLE run because a genuine, agent-unresolvable external blocker gates everything left. To terminate on `(a)`, emit — in your FINAL turn — exactly:
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
<hard-blocker nonce="THE_VALUE_OF_hard_blocker_nonce">
|
|
256
|
+
what I tried: <concrete steps>
|
|
257
|
+
why I am stuck: <the real, external reason>
|
|
258
|
+
what I would need to proceed: <a genuinely external, agent-unresolvable residual>
|
|
259
|
+
</hard-blocker>
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
The hook then asks the independent P13 judge to classify the blocker **external vs buildable**: if "what I would need" is something you could build, derive, or fetch yourself (a derivable standard, a buildable artifact, a credential in your own vault), the judge classifies it **buildable** and you are re-fed to keep working — the honest exit is for a genuinely external residual ONLY (a credential that does not exist, a down service, missing data, a prohibited action). A clean `(a)` exit writes a durable record, raises an /ack-able Attention item, and sends one Telegram so the blocker re-surfaces until you acknowledge it. A malformed/partial/nonce-mismatched marker is ignored (you keep working) — the safe direction.
|
|
263
|
+
|
|
216
264
|
---
|
|
217
265
|
|
|
218
266
|
## Step 4: Completion
|