@xingular/harness 1.4.0-unstable → 1.5.0-unstable
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/CHANGELOG.md +41 -1
- package/NOTICE.md +9 -7
- package/dist/cli.js +160 -456
- package/dist/sdk/prompt/compile.d.ts +4 -2
- package/dist/sdk/prompt/compile.js +10 -8
- package/dist/sdk/prompt/reporting.d.ts +2 -2
- package/dist/sdk/prompt/reporting.js +40 -250
- package/dist/sdk/prompt/standard.d.ts +4 -1
- package/dist/sdk/prompt/standard.js +6 -2
- package/dist/sdk/sessions/completionCheck.d.ts +4 -2
- package/dist/sdk/sessions/completionCheck.js +19 -1
- package/dist/sdk/sessions/contracts.js +2 -2
- package/dist/sdk/sessions/goalStop.d.ts +27 -0
- package/dist/sdk/sessions/goalStop.js +41 -0
- package/dist/sdk/sessions/runner.d.ts +0 -3
- package/dist/sdk/sessions/runner.js +16 -9
- package/dist/sdk/sessions/sessions.js +6 -36
- package/dist/sdk/sessions/workSlice.js +1 -1
- package/dist/sdk/terminal/piExtension.js +18 -31
- package/dist/sdk/terminal/terminals.js +1 -1
- package/dist/sdk/tools/askUser.js +1 -1
- package/dist/sdk/tools/todo.js +4 -3
- package/dist/terminal-opentui.js +108 -200
- package/dist/terminal-pi.js +262 -338
- package/docs/architecture/02-sessions-and-runs.md +13 -15
- package/docs/architecture/04-prompt.md +41 -35
- package/docs/architecture/07-tools-and-gate.md +2 -2
- package/docs/architecture/10-server-protocol.md +6 -5
- package/docs/architecture/11-terminal.md +7 -7
- package/docs/decisions/ADR-0008-flexible-reporting-guidance.md +2 -2
- package/docs/decisions/ADR-0069-stop-gate-and-finish.md +8 -2
- package/docs/decisions/ADR-0070-terminal-slice-continuation.md +4 -1
- package/docs/decisions/ADR-0072-codex-prompts-and-goal.md +3 -0
- package/docs/decisions/ADR-0073-large-reporting-prompt.md +6 -1
- package/docs/decisions/ADR-0074-report-content-not-report-blocks.md +90 -0
- package/docs/decisions/ADR-0075-no-todo-gate.md +84 -0
- package/docs/decisions/ADR-0076-codex-final-answer-verbatim.md +93 -0
- package/docs/releases/1.4.0-unstable.md +9 -2
- package/docs/releases/1.5.0-unstable.md +23 -0
- package/docs/study/STUDY-0004-turn-end-controls.md +7 -0
- package/docs/study/STUDY-0006-reporting-prompts.md +48 -10
- package/package.json +1 -1
- package/dist/sdk/sessions/stopGate.d.ts +0 -78
- package/dist/sdk/sessions/stopGate.js +0 -143
|
@@ -330,7 +330,7 @@ is approved but remains in progress; no completed cross-surface catalog is impli
|
|
|
330
330
|
budget-ended reply is `interrupted` with terminal reason `slice_complete` (ADR-0053), unless it
|
|
331
331
|
continues: a headless run as a new run (`continueSlice`), a terminal reply in place as its next
|
|
332
332
|
slice (ADR-0070), both up to `maxSlices` and never after a fruitless or blocked slice. The budget
|
|
333
|
-
covers the whole reply: Pi emits `agent_start` for every continuation (a
|
|
333
|
+
covers the whole reply: Pi emits `agent_start` for every continuation (a slice continuation, delivered
|
|
334
334
|
subagent results, a plan repair), so the guard starts a new slice only on a person's message.
|
|
335
335
|
No call is refused for repeating: identical calls, a Bash check that keeps failing and repeated
|
|
336
336
|
`edit`/`write` results on one path are allowed as often as the work needs, because a distinct read
|
|
@@ -342,20 +342,18 @@ is approved but remains in progress; no completed cross-surface catalog is impli
|
|
|
342
342
|
check or recorded a finished item, and never after a checkpoint that is `blocked`. A run may turn
|
|
343
343
|
the guard off with `workSlice.enabled: false`, and a launch may set `XINGULAR_WORK_SLICE=off` for
|
|
344
344
|
every run in that process; with it off a reply has no boundary — no checkpoint, no continuation —
|
|
345
|
-
and ends only when the model stops or a person interrupts. A reply the model ends on its own
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
(ADR-0072 removed ADR-0071's every-reply completion check); completion pressure there is the prompt
|
|
358
|
-
(`04-prompt.md`). `XINGULAR_STOP_GATE=off` at launch switches the gate off.
|
|
345
|
+
and ends only when the model stops or a person interrupts. A reply the model ends on its own
|
|
346
|
+
settles as it ends (INV-RUN-15); in a goal, the goal loop (INV-RUN-16) continues it. A
|
|
347
|
+
continuation carries the todo it left (`continuation.ts`).
|
|
348
|
+
- **INV-RUN-15** A reply the model ends settles as it ends (ADR-0075): the harness never sends it
|
|
349
|
+
back and never overwrites its status from the todo list. The todo list is progress, not a gate.
|
|
350
|
+
Only three things settle a reply otherwise: a person's interrupt (`interrupted`), the work-slice
|
|
351
|
+
guard (INV-RUN-13), and a goal's stop (INV-RUN-16) — a goal that ends blocked settles
|
|
352
|
+
`needs_person`, and one that ends on a limit, a pause or a stall settles `unfinished`, each with a
|
|
353
|
+
harness-written checkpoint. **No model judges an ordinary reply** (ADR-0072 removed ADR-0071's
|
|
354
|
+
every-reply completion check); only a goal's completion claim is checked (INV-RUN-16). Carrying
|
|
355
|
+
the request to completion is the prompt's job (`04-prompt.md`). There is no stop gate, no nudge
|
|
356
|
+
and no `XINGULAR_STOP_GATE` switch.
|
|
359
357
|
- **INV-RUN-16** A goal is the person's opt-in long run (ADR-0072). Only a person's own top-level run
|
|
360
358
|
carries one (`sessions.run` `goal`, or `/goal` in the terminal); never a plan, command, unattended
|
|
361
359
|
or child run. While its status is `active`, a reply that would end continues in place (the goal
|
|
@@ -68,51 +68,55 @@ or permission. Structured sessions deliver it through `sessionLaunch`; the termi
|
|
|
68
68
|
text with `requiredSkillsText` from Pi's loaded skills and appends it as a hidden request-time custom
|
|
69
69
|
message. The section belongs to the request, so an identical one is delivered again.
|
|
70
70
|
|
|
71
|
-
The fixed `harness-identity` section says `You are an AI agent running in <productName
|
|
72
|
-
|
|
71
|
+
The fixed `harness-identity` section says `You are an AI agent running in <productName>[, based on
|
|
72
|
+
<model>]. You and the user share one workspace, and your job is to collaborate with them until their
|
|
73
|
+
intended goal is completely handled.` It uses `env.productName` (default `Xingular Agent`) and
|
|
74
|
+
`Launch.model` when the host knows the model. `Launch.standard: { cwd, project?: { name } | null }` requests shared role, personality and working-folder
|
|
73
75
|
sections from `prompt/standard.ts`; the compiler supplies common connections, file and annotation
|
|
74
76
|
guidance for the effective tools. Terminal preparation defaults to standard sections (explicit
|
|
75
77
|
`standard: null` opts out); the host interactive path requests the same sections. Hosts may add
|
|
76
78
|
attributed add-on and task context, not a duplicate standard role or connection policy (PROP-0040).
|
|
77
79
|
|
|
78
80
|
Budgets (characters): variant sections 30,000 each (already capped at save, so never cut here);
|
|
79
|
-
references 12,000; Wiki pointer 2,500; tools 8,000; reporting
|
|
80
|
-
standard session's sections: role 1,400, autonomy 2,600,
|
|
81
|
-
1,900 (ADR-0072); application sections their own `budget`.
|
|
81
|
+
references 12,000; Wiki pointer 2,500; tools 8,000; reporting 12,000 (ADR-0076); the
|
|
82
|
+
standard session's sections: role 1,400, autonomy 2,600, personality 1,200, permission 1,800,
|
|
83
|
+
steering 2,000, writing 1,900 (ADR-0072); application sections their own `budget`.
|
|
82
84
|
|
|
83
85
|
## Reporting
|
|
84
86
|
|
|
85
87
|
Every pack ends with the harness's `reporting` section ("Reporting your work",
|
|
86
88
|
`REPORTING_GUIDANCE` in `prompt/reporting.ts`, imported by `prompt/compile.ts`). It is fixed text
|
|
87
|
-
that shapes the final reply
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
that shapes the final reply. ADR-0076 adopts Codex's final-answer guidance (`gpt-6.1-sol`): the
|
|
90
|
+
final answer is fully self-contained and focuses on the most important information, leads with the
|
|
91
|
+
outcome, and explains what changed, why, how it was tested, and the material risks and limits, with
|
|
92
|
+
the evidence needed to assess the conclusion and its practical limits. Routine verification is
|
|
93
|
+
summarized instead of listed check by check; reasoning and evidence are ordered for assessment, not
|
|
94
|
+
chronologically; and progress updates say what was learned, what remains uncertain and what the next
|
|
95
|
+
step will resolve. Tables are used for mappings and comparisons. Headings are the model's: there is
|
|
96
|
+
no required heading and no preferred set, and a shape-by-work table shows what different kinds of
|
|
97
|
+
work need. Length follows complexity: a simple change is one or two sentences plus the validation, a
|
|
98
|
+
larger one carries the reasoning, evidence and risks. Prose comes first; lists only when the
|
|
99
|
+
information is genuinely parallel, sequential or easier to compare. The section ships two examples
|
|
100
|
+
(a screen change and a blocked publish), the shape-by-work table and a four-line pre-send list; the
|
|
101
|
+
exact command for a blocked login is in `autonomy`. A person, application or mode format takes
|
|
102
|
+
precedence. The section names no application, is never dynamic, and is never cut; its budget is
|
|
103
|
+
12,000 characters (ADR-0076), and the text it carries is about 3.7k characters, about 0.8k tokens
|
|
104
|
+
measured with o200k.
|
|
102
105
|
|
|
103
106
|
## When a reply may end
|
|
104
107
|
|
|
105
108
|
A reply ends when the request is done, when the work-slice guard ends it (INV-RUN-13), when a person
|
|
106
109
|
interrupts, or when the work cannot continue without the person. An open todo item, a passing check,
|
|
107
|
-
a partial result or a long task is not such a reason
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
completion claim is the one thing a model checks
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
a partial result or a long task is not such a reason: the words below ask the model to carry the
|
|
111
|
+
request to completion, and they are the only layer (ADR-0075). The harness does not send a reply
|
|
112
|
+
back and does not mark it unfinished from the todo list; a reply the model ends settles `completed`.
|
|
113
|
+
**No model judges an ordinary reply**; a goal's completion claim is the one thing a model checks
|
|
114
|
+
(INV-RUN-16). A goal that ends blocked settles `needs_person`; a goal that ends on a limit, a pause
|
|
115
|
+
or a stall settles `unfinished`.
|
|
116
|
+
|
|
117
|
+
The words are what asks the model to carry on, and none of them may read as permission to stop with
|
|
118
|
+
work left. A person's own session (`launch.standard`, `prompt/standard.ts`)
|
|
119
|
+
reads six stable sections adapted from OpenAI Codex's gpt-6.1-sol instructions (Apache-2.0, see
|
|
116
120
|
`NOTICE.md`), the same for every model so the terminal and a host read the same text (INV-PAR-1):
|
|
117
121
|
|
|
118
122
|
- `role` — the assistant's job, and the extra work it does without asking (the obvious adjacent
|
|
@@ -126,6 +130,8 @@ reads five stable sections adapted from OpenAI Codex's gpt-6.1-sol instructions
|
|
|
126
130
|
points to is the request; a question the request or files already answer is not a question for the
|
|
127
131
|
person; the only reasons to stop, one of them a fix to a test or error that does not come from
|
|
128
132
|
this session's work (and then say exactly what is needed).
|
|
133
|
+
- `personality` — curious, thoughtful and candid; keeps its own judgment, disagrees when it has
|
|
134
|
+
reason and reconsiders when the evidence warrants it, without flattery or forced enthusiasm.
|
|
129
135
|
- `permission` — authorisation persists; finish the authorised work first so that approval is the
|
|
130
136
|
last step; no permission for reversible, read-only or already authorised work; a test or error
|
|
131
137
|
that does not come from this session's work is reported, not fixed, unless the person asks (a
|
|
@@ -143,12 +149,12 @@ Other fixed text that shapes the end of a reply:
|
|
|
143
149
|
it points to, is the scope; add steps as the work shows them; list a handoff's steps instead of one
|
|
144
150
|
"remaining work" item; before ending, compare the request, not the list, with what is done and
|
|
145
151
|
checked. An open step is work to do in this reply, not something to report.
|
|
146
|
-
- `reporting` (`REPORTING_GUIDANCE`):
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
+
- `reporting` (`REPORTING_GUIDANCE`): the final answer is fully self-contained and focuses on the
|
|
153
|
+
most important information; it leads with the outcome and explains what changed, why, how it was
|
|
154
|
+
tested, and the risks and limits, with the evidence needed to assess the conclusion. Verification
|
|
155
|
+
is summarized, not listed check by check. Headings and length follow the content; a simple change
|
|
156
|
+
is one or two sentences plus the validation. A login the work needs is named with its exact
|
|
157
|
+
command.
|
|
152
158
|
- `ask_user` (`tools/askUser.ts`): for a decision the request and files do not answer, never for
|
|
153
159
|
permission to do work inside the request; no answer means continue with best judgment (Codex's
|
|
154
160
|
Default-mode rule).
|
|
@@ -152,8 +152,8 @@ beside the choices (INV-RC-3, INV-RC-4).
|
|
|
152
152
|
ADR-0071) exists. The one exception is `update_goal` in a goal the person started: it is offered
|
|
153
153
|
only while a goal exists, its `complete` is only a claim that the harness checks (INV-RUN-16), and
|
|
154
154
|
its `paused` needs the person's word. The model cannot create, resume or limit a goal. When a
|
|
155
|
-
reply stops,
|
|
156
|
-
run's evidence.
|
|
155
|
+
reply stops, it settles as it ends unless a person interrupted it, the slice guard ended it, or a
|
|
156
|
+
goal stopped it (INV-RUN-15); a slice or goal stop writes the checkpoint from the run's evidence.
|
|
157
157
|
- **INV-TOOL-10** Bash keeps one command budget on every surface: 120 seconds when the call says
|
|
158
158
|
nothing, 300 seconds as the ceiling without a `reason`, 900 seconds as the maximum, and a timeout
|
|
159
159
|
returns the partial output with a narrowing instruction instead of blocking the reply.
|
|
@@ -79,11 +79,12 @@ harness → host { v: 1, id, call, params } host → harness { v: 1
|
|
|
79
79
|
- The run-event stream adds `checkpoint` (the bounded handoff) and `heartbeat` (steps, elapsed time,
|
|
80
80
|
last tool, compactions, slice, call budget). Hosts must accept both; an unknown event type is still
|
|
81
81
|
relayed in order (INV-RUN-3).
|
|
82
|
-
- `terminalCode` gains `needs_person` and `unfinished` (ADR-
|
|
83
|
-
work left — `needs_person` when
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
- `terminalCode` gains `needs_person` and `unfinished` (ADR-0072, ADR-0075): a goal that settled with
|
|
83
|
+
work left — `needs_person` when it ended `blocked`, `unfinished` when it was paused, stalled or
|
|
84
|
+
limited. Both are `interrupted`, carry a `checkpoint`, and are not auto-continued; a host should
|
|
85
|
+
offer the person Continue, as it does for `slice_complete`. An ordinary reply with open todo items
|
|
86
|
+
settles `completed`. Extension notices arrive as `extension.notice` events (for example
|
|
87
|
+
`work-slice` and `goal`).
|
|
87
88
|
- `sessions.run` accepts `goal { objective, rounds?, hours? }` (ADR-0072, INV-RUN-16) for a person's
|
|
88
89
|
own top-level run; it is refused with `invalid_request` for a plan, command, unattended or child
|
|
89
90
|
run, or an empty or over-long (4,000 character) objective. The objective is the request, and the
|
|
@@ -378,11 +378,11 @@ Terminal tool-gate and work-slice refusals are relayed as `tool.refused` events
|
|
|
378
378
|
|
|
379
379
|
Terminal replies carry the same work-slice guard as structured runs: 320 tool calls or 60 minutes,
|
|
380
380
|
with no new-token limit by default (PROP-0044), then a refusal that asks the model to stop and report
|
|
381
|
-
where it is.
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
`needs_person` or `unfinished` code, which the controller records on the active
|
|
385
|
-
reading the same session sees the handoff. No model judges an ordinary reply.
|
|
381
|
+
where it is. An ordinary terminal reply settles as it ends (INV-RUN-15, ADR-0075): the terminal
|
|
382
|
+
never sends it back and never marks it unfinished from the todo list. A `/goal` is the only layer
|
|
383
|
+
that continues a reply; a goal that stops blocked, paused or at a limit sends a harness-written
|
|
384
|
+
`checkpoint` and the `needs_person` or `unfinished` code, which the controller records on the active
|
|
385
|
+
run, so an App reading the same session sees the handoff. No model judges an ordinary reply. A reply that
|
|
386
386
|
reaches its budget after doing work continues in place as its next slice (ADR-0070): a
|
|
387
387
|
`xingular-slice-continue` message in the same run, a checkpoint and a notice per boundary, up to
|
|
388
388
|
`maxSlices` (8). A fruitless, blocked, failed, aborted or plan slice, or one whose todo items are all
|
|
@@ -406,8 +406,8 @@ resume)`, `Goal unmet (...)` or `Goal achieved (...)`.
|
|
|
406
406
|
|
|
407
407
|
The goal lives in the Pi session as a `xingular-goal-state` entry, so a reopened conversation shows
|
|
408
408
|
it, as `paused`: nothing resumes by itself. The model gets `get_goal` and `update_goal` only while a
|
|
409
|
-
goal exists (INV-TOOL-9). The goal loop
|
|
410
|
-
|
|
409
|
+
goal exists (INV-TOOL-9). The goal loop runs before slice continuation; a goal's slices continue even
|
|
410
|
+
when every todo item is done. `/goal` is a `session`
|
|
411
411
|
command that uses `sessions.run` with `goal` (page 10); in plan mode the loop stays silent.
|
|
412
412
|
|
|
413
413
|
## Liveness and a reply that stops working (INV-RUN-14, ADR-0054)
|
|
@@ -5,11 +5,11 @@ status: accepted
|
|
|
5
5
|
created: 2026-10-21
|
|
6
6
|
updated: 2026-10-21
|
|
7
7
|
supersedes: ADR-0007
|
|
8
|
-
amended_by: ADR-0073
|
|
8
|
+
amended_by: ADR-0073, ADR-0074
|
|
9
9
|
---
|
|
10
10
|
# ADR-0008 — Flexible reporting guidance with optional human inspection
|
|
11
11
|
|
|
12
|
-
> **Amended by [ADR-0073](ADR-0073-large-reporting-prompt.md):** flexible headings stand; the `reporting` section now names required content blocks and ships worked examples, and the later fixed headings (ADR-0068) are gone.
|
|
12
|
+
> **Amended by [ADR-0073](ADR-0073-large-reporting-prompt.md):** flexible headings stand; the `reporting` section now names required content blocks and ships worked examples, and the later fixed headings (ADR-0068) are gone. **Amended again by [ADR-0074](ADR-0074-report-content-not-report-blocks.md):** the required blocks are gone too, and human inspection is once more the only optional by-hand block.
|
|
13
13
|
|
|
14
14
|
## Context and decision
|
|
15
15
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: ADR-0069
|
|
3
3
|
title: A stop gate and a finish tool; the model's checkpoint tool is removed
|
|
4
|
-
status:
|
|
4
|
+
status: superseded
|
|
5
5
|
created: 2026-10-31
|
|
6
|
-
updated: 2026-
|
|
6
|
+
updated: 2026-11-01
|
|
7
|
+
superseded_by: ADR-0075
|
|
7
8
|
supersedes: partial — PROP-0041 (the model-written checkpoint), ADR-0068 (when the completion heading applies), ADR-0063 (scope of the unfinished-work guidance)
|
|
8
9
|
related:
|
|
9
10
|
- STUDY-0004
|
|
@@ -11,6 +12,11 @@ related:
|
|
|
11
12
|
---
|
|
12
13
|
# ADR-0069 — A stop gate and a finish tool; the model's checkpoint tool is removed
|
|
13
14
|
|
|
15
|
+
> **Superseded by [ADR-0075](ADR-0075-no-todo-gate.md):** the stop gate and the `unfinished` status
|
|
16
|
+
> that open todo items produced are removed. A reply the model ends settles `completed`; the goal
|
|
17
|
+
> loop and the work-slice guard keep their statuses. The `finish` tool was already removed by
|
|
18
|
+
> ADR-0071.
|
|
19
|
+
|
|
14
20
|
> **Amended by [ADR-0071](ADR-0071-completion-check.md):** `finish` is removed; a completion check (the run's own model, fresh context) now decides `continue` / `needs_person` / `done` when a reply that did work ends with its list closed.
|
|
15
21
|
|
|
16
22
|
## Context
|
|
@@ -11,6 +11,9 @@ related:
|
|
|
11
11
|
---
|
|
12
12
|
# ADR-0070 — A terminal reply continues across work slices in place
|
|
13
13
|
|
|
14
|
+
> **Amended by [ADR-0075](ADR-0075-no-todo-gate.md):** the stop gate is removed; the slice guard
|
|
15
|
+
> still resumes a reply at its slice boundary.
|
|
16
|
+
|
|
14
17
|
## Context
|
|
15
18
|
|
|
16
19
|
A headless run that stops at its work-slice budget already continues on its own (`continueSlice`,
|
|
@@ -43,4 +46,4 @@ next slice continues from it", which was false in the terminal.
|
|
|
43
46
|
- A long terminal task runs up to eight slices without a person, and Esc still stops it at once.
|
|
44
47
|
- A continued terminal reply is one run record with several checkpoints, where a headless one is a
|
|
45
48
|
chain of runs; `sliceOf` keeps counting the headless chain.
|
|
46
|
-
-
|
|
49
|
+
- A reply at its slice boundary continues in the next slice; there is no todo gate (ADR-0075).
|
|
@@ -13,6 +13,9 @@ related:
|
|
|
13
13
|
---
|
|
14
14
|
# ADR-0072 — Codex's prompts and `/goal`; the completion check moves behind `/goal`
|
|
15
15
|
|
|
16
|
+
> **Amended by [ADR-0075](ADR-0075-no-todo-gate.md):** the todo gate is removed, so ordinary replies
|
|
17
|
+
> rely on the prompt alone. The goal loop and its completion claim check stay.
|
|
18
|
+
|
|
16
19
|
## Context
|
|
17
20
|
|
|
18
21
|
ADR-0071 asked a model to judge, at the end of **every** reply that did work, whether the request was
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: ADR-0073
|
|
3
3
|
title: A large, content-block reporting prompt
|
|
4
|
-
status:
|
|
4
|
+
status: superseded
|
|
5
5
|
created: 2026-11-01
|
|
6
6
|
updated: 2026-11-01
|
|
7
|
+
superseded_by: ADR-0074
|
|
7
8
|
supersedes: partial — ADR-0068 (its required headings and fixed-label rule)
|
|
8
9
|
amends: ADR-0008 (flexible headings stand; required content blocks are added)
|
|
9
10
|
related:
|
|
@@ -14,6 +15,10 @@ related:
|
|
|
14
15
|
---
|
|
15
16
|
# ADR-0073 — A large, content-block reporting prompt
|
|
16
17
|
|
|
18
|
+
> **Superseded by [ADR-0074](ADR-0074-report-content-not-report-blocks.md):** the four required
|
|
19
|
+
> blocks, the "Nothing needed" ending, the five examples and the 18,000-character budget are
|
|
20
|
+
> replaced by content questions, an evidence line, an optional by-hand block and free headings.
|
|
21
|
+
|
|
17
22
|
## Context
|
|
18
23
|
|
|
19
24
|
The person reading final replies asked for three things the 3,400-character `reporting` section did
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ADR-0074
|
|
3
|
+
title: Report content, not report blocks
|
|
4
|
+
status: superseded
|
|
5
|
+
created: 2026-11-01
|
|
6
|
+
updated: 2026-11-01
|
|
7
|
+
superseded_by: ADR-0076
|
|
8
|
+
supersedes: ADR-0073 (its four required blocks, five examples and 18,000-character budget)
|
|
9
|
+
amends: ADR-0008 (human inspection is the only by-hand block)
|
|
10
|
+
related:
|
|
11
|
+
- ADR-0008
|
|
12
|
+
- ADR-0073
|
|
13
|
+
- STUDY-0006
|
|
14
|
+
---
|
|
15
|
+
# ADR-0074 — Report content, not report blocks
|
|
16
|
+
|
|
17
|
+
> **Superseded by [ADR-0076](ADR-0076-codex-final-answer-verbatim.md):** the four content
|
|
18
|
+
> questions, the human-check and next-step blocks, the evidence table, the anti-pattern table and
|
|
19
|
+
> the three examples are replaced by Codex's final-answer and technical-communication text.
|
|
20
|
+
|
|
21
|
+
> **Supersedes [ADR-0073](ADR-0073-large-reporting-prompt.md):** the four required blocks, the
|
|
22
|
+
> "Nothing needed" ending and the 18,000-character budget are replaced.
|
|
23
|
+
|
|
24
|
+
## Context
|
|
25
|
+
|
|
26
|
+
ADR-0073 made a change carry four required blocks — outcome, what changed, how to test, what to do
|
|
27
|
+
next — and put both the agent's own runs and the person's steps inside "how to test". In real
|
|
28
|
+
replies the two merged: a section headed for the person's testing listed `npm run typecheck —
|
|
29
|
+
passed` and `npm test — 212 test files passed`, checks the person was never going to repeat. The
|
|
30
|
+
same guidance required "or say 'Nothing needed'", and replies ended with "Nothing needed next"
|
|
31
|
+
even when the work was complete and visible.
|
|
32
|
+
|
|
33
|
+
Headings also collapsed. The four block names and their synonyms ("How to test", "Test it", "Try
|
|
34
|
+
it", "Verify") gave the model one vocabulary, so unrelated work — a document, a diagnosis, a
|
|
35
|
+
publish — arrived under "What changed / How to check / Next step".
|
|
36
|
+
|
|
37
|
+
The person asked for three things: a by-hand section for checks only a person can make (a screen,
|
|
38
|
+
a sign-in, a diff or PR, a publish), no filler ending, and headings that follow the content. The
|
|
39
|
+
earlier design already had the principle: ADR-0008 made **Need human inspection** optional and said
|
|
40
|
+
not to use it "for checks already performed or generic risks". ADR-0073 folded that block into the
|
|
41
|
+
required set and lost the distinction.
|
|
42
|
+
|
|
43
|
+
## Decision
|
|
44
|
+
|
|
45
|
+
Replace `REPORTING_GUIDANCE` in [`src/prompt/reporting.ts`](../../src/prompt/reporting.ts) with a
|
|
46
|
+
~8.9k-character text (about 2.1k o200k tokens) that defines content questions rather than blocks:
|
|
47
|
+
|
|
48
|
+
- The reply answers what happened, what changed or was decided, what only a person can check, and
|
|
49
|
+
what they do next — in any words and any order. Most replies answer two or three.
|
|
50
|
+
- The checks the agent ran are evidence: one line each, command and result. They are never steps
|
|
51
|
+
for the person, and never appear in a section headed for the person's testing.
|
|
52
|
+
- A by-hand check is optional and covers only what the agent could not do: open a screen, sign in,
|
|
53
|
+
read a document for tone, review or merge a diff, publish, deploy, use a device. It gives the
|
|
54
|
+
shortest sequence, what to look at, and the result that means it works. When nothing needs a
|
|
55
|
+
person, the block is absent — no "no manual check" line.
|
|
56
|
+
- A finished reply with nothing left ends on its last real point. "Nothing needed", "Nothing needed
|
|
57
|
+
next" and "No action required" are banned.
|
|
58
|
+
- There is no required heading and no preferred set; the section gives cross-domain examples and a
|
|
59
|
+
shape-by-work table, not a vocabulary, and says not to repeat one heading set.
|
|
60
|
+
- Three worked examples: a screen change, a backend change, a publish. The old examples' "Nothing
|
|
61
|
+
needed next" endings are gone.
|
|
62
|
+
|
|
63
|
+
`REPORTING_BUDGET` falls from 18,000 to 12,000 characters. The section stays last in the stable
|
|
64
|
+
prefix and is never cut.
|
|
65
|
+
|
|
66
|
+
## Consequences
|
|
67
|
+
|
|
68
|
+
- The stable prefix shrinks by about 6.9k characters (15,809 → 8,921) and about 1.6k o200k tokens
|
|
69
|
+
(3,736 → 2,108). Existing sessions miss the provider cache once after the upgrade; the price of a
|
|
70
|
+
request is measured only with real application requests under INV-PRM-8.
|
|
71
|
+
- [`src/prompt/compile.test.ts`](../../src/prompt/compile.test.ts) checks the content questions, the
|
|
72
|
+
evidence rule, the by-hand rule, the ending ban, the heading freedom, three examples, the size
|
|
73
|
+
range and the 12,000 budget.
|
|
74
|
+
- No data, storage or server-protocol change; the App needs a rebuilt harness only.
|
|
75
|
+
- Risk: without four required blocks, a reply could go thin. The four content questions and the
|
|
76
|
+
"before you send" list are the guard; whether replies keep the shape is checked on real work, not
|
|
77
|
+
by a test.
|
|
78
|
+
|
|
79
|
+
## Alternatives
|
|
80
|
+
|
|
81
|
+
- **Keep the four blocks and only ban "Nothing needed".** Rejected: the merge of the agent's runs
|
|
82
|
+
with the person's checks is the defect, and it comes from the block's own text.
|
|
83
|
+
- **Give the agent a separate "what I ran" block.** Rejected: one line of evidence is enough, and a
|
|
84
|
+
block invites the ceremony the person objected to.
|
|
85
|
+
- **Ban headings entirely.** Rejected: short replies drift into prose, and a report still needs
|
|
86
|
+
names for its parts.
|
|
87
|
+
- **Keep ~15.8k characters and rewrite the rules in place.** Rejected: the person chose a leaner
|
|
88
|
+
text, and the five examples restated rules already in prose.
|
|
89
|
+
- **Require the by-hand block on every change.** Rejected: most backend work has nothing a person
|
|
90
|
+
can check, and an always-present block produces filler.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ADR-0075
|
|
3
|
+
title: No todo gate; a reply ends when the model ends it
|
|
4
|
+
status: accepted
|
|
5
|
+
created: 2026-11-01
|
|
6
|
+
updated: 2026-11-01
|
|
7
|
+
supersedes: ADR-0069 (its stop gate), ADR-0072 (its "the todo gate stays")
|
|
8
|
+
related:
|
|
9
|
+
- ADR-0069
|
|
10
|
+
- ADR-0072
|
|
11
|
+
- STUDY-0004
|
|
12
|
+
---
|
|
13
|
+
# ADR-0075 — No todo gate; a reply ends when the model ends it
|
|
14
|
+
|
|
15
|
+
> **Supersedes the todo gate of [ADR-0069](ADR-0069-stop-gate-and-finish.md)** and the line in
|
|
16
|
+
> [ADR-0072](ADR-0072-codex-prompts-and-goal.md) that kept it. The goal loop and its claim check
|
|
17
|
+
> stay.
|
|
18
|
+
|
|
19
|
+
## Context
|
|
20
|
+
|
|
21
|
+
ADR-0069 added the stop gate: in an attended top-level reply, an item still `pending` or
|
|
22
|
+
`in_progress` at Pi's `agent_before_settle` boundary sent the reply back with a displayed
|
|
23
|
+
`xingular-stop-gate` message, up to three nudges, and then settled the run
|
|
24
|
+
`interrupted{unfinished}` with a harness-written checkpoint.
|
|
25
|
+
|
|
26
|
+
In use the messages read as noise. "Harness stop gate (1/3): your reply ended with 2 open todo
|
|
27
|
+
items…" appears in the transcript of a person's own session, and a stale item the model forgot to
|
|
28
|
+
close marks the run unfinished even when the work is done. The person asked for the nudges and the
|
|
29
|
+
unfinished status to go, and for the prompt to relax instead.
|
|
30
|
+
|
|
31
|
+
The peer check on 2026-11-01 does not make this an obvious outlier either way:
|
|
32
|
+
|
|
33
|
+
| Harness | Todo nudge at the end of a turn | Evidence |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| omp | **Yes.** `TodoTracker.checkCompletion()` appends "You stopped with N incomplete todo item(s)… Please continue" as a developer message and schedules a continuation, up to `todo.remindersMax` (default 3); it skips a reply awaiting the person and also nudges mid-run after 12 mutating tools | `external/omp/packages/coding-agent/src/session/todo-tracker.ts:221`, `src/tools/settings.ts:360-380` |
|
|
36
|
+
| Claude Code | No bounce. A gentle reminder to use TodoWrite ("This is just a gentle reminder - ignore if not applicable"); a `Stop` hook is user configuration | Extracted prompt `system-reminder-todowrite-reminder.md`, `ccVersion` 2.1.139 |
|
|
37
|
+
| Codex | No bounce. `update_plan` is opt-in since 0.152 and enforces nothing at the end of a turn | STUDY-0004; 0.152 release notes |
|
|
38
|
+
| Kimi CLI | No bounce. A todo tool and instructions only | `external/kimi-cli/src/kimi_cli/tools/todo/set_todo_list.md` |
|
|
39
|
+
| OpenHands, SWE-agent, smolagents | No todo gate | No todo tool or no end-of-turn enforcement |
|
|
40
|
+
|
|
41
|
+
So this harness had copied a real design, but it is the minority design among the studied peers,
|
|
42
|
+
and its messages are the thing the person objected to.
|
|
43
|
+
|
|
44
|
+
## Decision
|
|
45
|
+
|
|
46
|
+
Remove the gate:
|
|
47
|
+
|
|
48
|
+
- Delete the nudge extension, its state, `nudgeText`, `stopGateNotice`, `MAX_STOP_GATE_NUDGES`, and
|
|
49
|
+
the `XINGULAR_STOP_GATE` switch.
|
|
50
|
+
- A reply the model ends settles `completed`. The harness does not send it back and does not
|
|
51
|
+
overwrite its status from the todo list.
|
|
52
|
+
- A person's interrupt, the work-slice guard (INV-RUN-13) and a goal's stop (INV-RUN-16) keep their
|
|
53
|
+
statuses and checkpoints. A blocked goal settles `needs_person`; a goal on a limit, a pause or a
|
|
54
|
+
stall settles `unfinished`.
|
|
55
|
+
- The goal/checkpoint helpers move to `sessions/goalStop.ts`; the goal check's model helper moves to
|
|
56
|
+
`completionCheck.ts`.
|
|
57
|
+
- The prompt keeps the work-slice sentence as `WORK_SLICE_GUIDANCE`, and `TODO_GUIDANCE` is relaxed:
|
|
58
|
+
the list is a progress aid, the request is the scope, and a step left open is explained in the
|
|
59
|
+
reply. No text says a reply is sent back.
|
|
60
|
+
- A login that blocks the work is answered with the exact command the person must run (see
|
|
61
|
+
`04-prompt.md` § Reporting).
|
|
62
|
+
|
|
63
|
+
## Consequences
|
|
64
|
+
|
|
65
|
+
- An early stop is no longer caught by the harness. The prompt is the only layer that asks the model
|
|
66
|
+
to finish the request, and a person reading the reply has to notice a stop with work left.
|
|
67
|
+
- The App no longer shows an interrupted-run notice for open todo items; it still does for a slice,
|
|
68
|
+
a goal and a person's interrupt.
|
|
69
|
+
- The stable prefix loses the old `STOP_GATE_GUIDANCE` sentence and gains the credential rule in the
|
|
70
|
+
reporting section; existing sessions miss the provider cache once after the upgrade.
|
|
71
|
+
- `XINGULAR_STOP_GATE` is retired and ignored if set. No data or protocol change; run records
|
|
72
|
+
written before this change keep their statuses.
|
|
73
|
+
|
|
74
|
+
## Alternatives
|
|
75
|
+
|
|
76
|
+
- **Keep the gate and only make it opt-in, off by default.** Rejected: the machinery and its
|
|
77
|
+
messages would still exist for the default path people read, and the harness would carry a
|
|
78
|
+
capability nobody turns on.
|
|
79
|
+
- **Keep one reminder.** Rejected: the person asked for the nudges to go, and one reminder still
|
|
80
|
+
writes a harness message into their reply.
|
|
81
|
+
- **Remove the message but keep the `unfinished` status.** Rejected: the status comes from a list the
|
|
82
|
+
model may not maintain, so a stale item would mark finished work unfinished with no way to fix it.
|
|
83
|
+
- **Keep the gate.** Rejected: it is the thing the person objected to, and the majority of the
|
|
84
|
+
studied peers leave the end of a turn to the prompt.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ADR-0076
|
|
3
|
+
title: Codex's final-answer guidance, adopted verbatim
|
|
4
|
+
status: accepted
|
|
5
|
+
created: 2026-11-01
|
|
6
|
+
updated: 2026-11-01
|
|
7
|
+
supersedes: ADR-0074 (its four content questions, human-check block, next-step block and examples)
|
|
8
|
+
related:
|
|
9
|
+
- ADR-0074
|
|
10
|
+
- ADR-0075
|
|
11
|
+
- STUDY-0006
|
|
12
|
+
---
|
|
13
|
+
# ADR-0076 — Codex's final-answer guidance, adopted verbatim
|
|
14
|
+
|
|
15
|
+
> **Supersedes [ADR-0074](ADR-0074-report-content-not-report-blocks.md):** the four content
|
|
16
|
+
> questions, the human-check block, the next-step block, the evidence table, the anti-pattern table
|
|
17
|
+
> and the three examples are replaced by Codex's final-answer and technical-communication text.
|
|
18
|
+
|
|
19
|
+
## Context
|
|
20
|
+
|
|
21
|
+
ADR-0074 replaced four required blocks with four content questions, a one-line evidence rule, an
|
|
22
|
+
optional human-check block, a next-step rule and three examples. It removed the filler ending and
|
|
23
|
+
brought the section to 9,235 characters (2,188 o200k tokens).
|
|
24
|
+
|
|
25
|
+
A rule-by-rule comparison with Codex's `gpt-6.1-sol` prompt found that most of the autonomy and
|
|
26
|
+
permission text was already Codex's, word for word, while the report section carried the strictness:
|
|
27
|
+
18 prohibition phrases, 19 obligation words, a pre-send checklist and an anti-pattern table, against
|
|
28
|
+
Codex's 454-token `## Final answer` block, which mostly describes qualities and rendering.
|
|
29
|
+
|
|
30
|
+
The person chose Codex's wording for the report: self-contained final, technical communication,
|
|
31
|
+
evidence and limits, table guidance and length by complexity. They also added the model name to the
|
|
32
|
+
identity, adopted Codex's personality paragraph and unclear-scope sentence (with `ask_user`), and
|
|
33
|
+
adopted Codex's tool hygiene, test restraint and skill rules.
|
|
34
|
+
|
|
35
|
+
## Decision
|
|
36
|
+
|
|
37
|
+
- **Identity.** `harness-identity` carries the product name, `Launch.model` when the host knows it,
|
|
38
|
+
and Codex's goal sentence: "You and the user share one workspace, and your job is to collaborate
|
|
39
|
+
with them until their intended goal is completely handled." The model name is a stable-prefix
|
|
40
|
+
line; a `/model` switch after the pack is compiled leaves it naming the model the session started
|
|
41
|
+
with.
|
|
42
|
+
- **Personality.** A new standard section (`prompt/standard.ts`, order 22) carries Codex's
|
|
43
|
+
personality paragraph, with "As Codex" changed to "As an AI agent" so the harness names no other
|
|
44
|
+
product.
|
|
45
|
+
- **Unclear scope.** Codex's sentence replaces the harness wording: "If the user's intent or task
|
|
46
|
+
scope is unclear, progress towards the user's goal with the information available and then ask the
|
|
47
|
+
user for clarification while continuing independent work." A following sentence names `ask_user`
|
|
48
|
+
for the question.
|
|
49
|
+
- **Reporting.** `REPORTING_GUIDANCE` becomes Codex's final-answer block and technical-communication
|
|
50
|
+
paragraphs: self-contained, most important information, outcome first, what changed and why, how
|
|
51
|
+
it was tested, material risks and limits, the evidence needed and its limits, verification
|
|
52
|
+
summarized rather than listed, progress updates as learned/uncertain/next. Tables for mappings and
|
|
53
|
+
comparisons. Headings stay free. A shape-by-work table says what different work needs. Length
|
|
54
|
+
scales with complexity. Prose first, lists when the information is parallel or sequential. Two
|
|
55
|
+
examples (a screen change, a blocked publish) and a four-line pre-send list replace the old
|
|
56
|
+
blocks, the anti-pattern table and the three examples.
|
|
57
|
+
- **Removed from reporting.** The four content questions, "Your checks are evidence", "What only a
|
|
58
|
+
person can check", "What the person does next", "What to leave out", "Tone", "Claims carry
|
|
59
|
+
evidence" and the anti-pattern table. The exact command for a blocked login remains in
|
|
60
|
+
`autonomy` and in the blocked-publish example.
|
|
61
|
+
- **Tools.** Codex's work rules join the Native guidance: `rg` first, no decorative command
|
|
62
|
+
separators, shell text treated as code, no reused `$HOME`, no long blocking sleeps, no tests for
|
|
63
|
+
reversible changes or tests that mirror the implementation, and broadening tests only when
|
|
64
|
+
justified. Codex's skill rules (SKILL.md, user precedence, announce the first use, `$name`,
|
|
65
|
+
missing skill) and its plugin principle join the Wiki guidance.
|
|
66
|
+
- `REPORTING_BUDGET` stays 12,000; the text is 3,697 characters (about 800 o200k tokens) and is
|
|
67
|
+
never cut.
|
|
68
|
+
|
|
69
|
+
## Consequences
|
|
70
|
+
|
|
71
|
+
- The stable prefix shrinks by about 5.5k characters and 1.3k tokens. Existing sessions miss the
|
|
72
|
+
provider cache once after the upgrade.
|
|
73
|
+
- The report no longer has a by-hand check block or a next-step block. A person reading a reply gets
|
|
74
|
+
the outcome, the change, the evidence and the risks, and must notice when the reply leaves
|
|
75
|
+
something undone; ADR-0075's removal of the todo gate already accepted that.
|
|
76
|
+
- The personality section adds a sixth standard section; the terminal and every host read the same
|
|
77
|
+
text (INV-PAR-1).
|
|
78
|
+
- `Launch.model` is a new optional launch field; hosts that do not know the model get the identity
|
|
79
|
+
without "based on".
|
|
80
|
+
- No data, storage or server-protocol change.
|
|
81
|
+
|
|
82
|
+
## Alternatives
|
|
83
|
+
|
|
84
|
+
- **Keep ADR-0074 and only trim the anti-patterns.** Rejected: the comparison showed the strictness
|
|
85
|
+
was in the block structure itself, and the person chose Codex's wording.
|
|
86
|
+
- **Copy Codex's whole prompt.** Rejected: its channels, `update_plan`, `functions.exec`, apps and
|
|
87
|
+
plugin mechanics do not exist in this harness; only the report, personality, permission and work
|
|
88
|
+
rules apply.
|
|
89
|
+
- **Keep the human-check and next-step blocks alongside Codex's text.** Rejected: they were the two
|
|
90
|
+
blocks the person asked to remove, and Codex's technical communication covers what remains.
|
|
91
|
+
- **Make the model name dynamic.** Deferred: a `/model` switch would need the identity in a dynamic
|
|
92
|
+
section or a recompile, and both change the cache contract; the stable line is the simpler
|
|
93
|
+
starting point.
|
|
@@ -14,5 +14,12 @@ Unstable preview of the current Harness work. Install with `npm install @xingula
|
|
|
14
14
|
- **Terminal and session fixes.** Terminal behavior now accounts for the goal lifecycle, retains the
|
|
15
15
|
right completion behavior, and includes related prompt, status and lifecycle updates.
|
|
16
16
|
|
|
17
|
-
Test suites were not run for this candidate, at the request to bypass tests.
|
|
18
|
-
|
|
17
|
+
Test suites were not run for this candidate, at the request to bypass tests.
|
|
18
|
+
|
|
19
|
+
Published from commit `5f4c907` with a manual `npm publish --access public --tag unstable`, after the
|
|
20
|
+
reviewed candidate was built from the same commit (SHA-256
|
|
21
|
+
`2b1c12ddcd4c63a57714ab3538ff5198dec88d408230a0ef42bb8ece22cffe00`). The published tarball has that
|
|
22
|
+
relation recorded by its npm integrity, `sha512-zlPE8HB3X0iR7AqELgYMVJzWjZMlEFdOKCjBJHyxQreWaDwyGnZ5M83rcA4Op/+CgGpl8BuYwFOcjcXa6Fayeg==`.
|
|
23
|
+
Because the suites and the exact-tarball smoke checks did not run, and the workflow's OIDC publish path
|
|
24
|
+
was not used, this version carries no provenance attestation and `scripts/release-verify.mjs` cannot
|
|
25
|
+
verify it. The release workflow's gates are unchanged for the next release.
|