ptbk 0.119.0-21 → 0.119.0-26

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.
Files changed (223) hide show
  1. package/README.md +16 -9
  2. package/dist/browser/browser.d.ts +50 -36
  3. package/dist/browser/browser.js +162 -118
  4. package/dist/browser/browser.js.map +1 -1
  5. package/dist/browser/fleet.d.ts +59 -0
  6. package/dist/browser/fleet.js +148 -0
  7. package/dist/browser/fleet.js.map +1 -0
  8. package/dist/browser/recording.js +2 -2
  9. package/dist/browser/recording.js.map +1 -1
  10. package/dist/chats/conversation.d.ts +1 -1
  11. package/dist/chats/conversation.js +8 -6
  12. package/dist/chats/conversation.js.map +1 -1
  13. package/dist/chats/local.js +5 -5
  14. package/dist/chats/local.js.map +1 -1
  15. package/dist/cli/commands/add.js +1 -1
  16. package/dist/cli/commands/add.js.map +1 -1
  17. package/dist/cli/commands/boilerplates.js +1 -1
  18. package/dist/cli/commands/boilerplates.js.map +1 -1
  19. package/dist/cli/commands/find.js +1 -1
  20. package/dist/cli/commands/find.js.map +1 -1
  21. package/dist/cli/commands/fix.js +9 -4
  22. package/dist/cli/commands/fix.js.map +1 -1
  23. package/dist/cli/commands/init.d.ts +5 -0
  24. package/dist/cli/commands/init.js +279 -118
  25. package/dist/cli/commands/init.js.map +1 -1
  26. package/dist/cli/commands/migrate.js +1 -1
  27. package/dist/cli/commands/migrate.js.map +1 -1
  28. package/dist/cli/commands/ping.js +20 -12
  29. package/dist/cli/commands/ping.js.map +1 -1
  30. package/dist/cli/commands/plan.js +20 -12
  31. package/dist/cli/commands/plan.js.map +1 -1
  32. package/dist/cli/commands/recover.js +1 -1
  33. package/dist/cli/commands/recover.js.map +1 -1
  34. package/dist/cli/commands/restart.js +6 -5
  35. package/dist/cli/commands/restart.js.map +1 -1
  36. package/dist/cli/commands/run.js +26 -15
  37. package/dist/cli/commands/run.js.map +1 -1
  38. package/dist/cli/commands/start.js +11 -7
  39. package/dist/cli/commands/start.js.map +1 -1
  40. package/dist/cli/commands/tool.d.ts +19 -0
  41. package/dist/cli/commands/tool.js +320 -0
  42. package/dist/cli/commands/tool.js.map +1 -0
  43. package/dist/cli/commands/verify.js +1 -1
  44. package/dist/cli/commands/verify.js.map +1 -1
  45. package/dist/cli/common.d.ts +7 -1
  46. package/dist/cli/common.js +37 -20
  47. package/dist/cli/common.js.map +1 -1
  48. package/dist/cli/compatibility.d.ts +8 -0
  49. package/dist/cli/compatibility.js +32 -0
  50. package/dist/cli/compatibility.js.map +1 -0
  51. package/dist/cli/parser.js +7 -3
  52. package/dist/cli/parser.js.map +1 -1
  53. package/dist/cli/registry.js +182 -7
  54. package/dist/cli/registry.js.map +1 -1
  55. package/dist/cli/service-view.js +1 -1
  56. package/dist/cli/service-view.js.map +1 -1
  57. package/dist/cli/sources.js +2 -0
  58. package/dist/cli/sources.js.map +1 -1
  59. package/dist/cli/spec.js +8 -6
  60. package/dist/cli/spec.js.map +1 -1
  61. package/dist/common/naming.d.ts +53 -0
  62. package/dist/common/naming.js +90 -0
  63. package/dist/common/naming.js.map +1 -0
  64. package/dist/engine/agenda.d.ts +70 -9
  65. package/dist/engine/agenda.js +294 -61
  66. package/dist/engine/agenda.js.map +1 -1
  67. package/dist/engine/executor.d.ts +5 -0
  68. package/dist/engine/executor.js +24 -11
  69. package/dist/engine/executor.js.map +1 -1
  70. package/dist/engine/harnesses.d.ts +82 -18
  71. package/dist/engine/harnesses.js +191 -39
  72. package/dist/engine/harnesses.js.map +1 -1
  73. package/dist/engine/preview.js +2 -2
  74. package/dist/engine/preview.js.map +1 -1
  75. package/dist/engine/routing.d.ts +10 -0
  76. package/dist/engine/routing.js +67 -28
  77. package/dist/engine/routing.js.map +1 -1
  78. package/dist/engine/snapshot.d.ts +107 -7
  79. package/dist/engine/state.d.ts +4 -2
  80. package/dist/engine/state.js.map +1 -1
  81. package/dist/engine/sync.d.ts +96 -0
  82. package/dist/engine/sync.js +199 -0
  83. package/dist/engine/sync.js.map +1 -0
  84. package/dist/engine/team.d.ts +1 -0
  85. package/dist/engine/team.js +12 -8
  86. package/dist/engine/team.js.map +1 -1
  87. package/dist/expert/_main.md +96 -67
  88. package/dist/expert/agents/_index.md +10 -7
  89. package/dist/expert/agents/core-agents.md +4 -2
  90. package/dist/expert/agents/fixer.md +15 -12
  91. package/dist/expert/cli/acceptance.md +96 -78
  92. package/dist/expert/cli/api.md +26 -14
  93. package/dist/expert/cli/autonomous-operation.md +17 -19
  94. package/dist/expert/cli/browser.md +24 -24
  95. package/dist/expert/cli/checks.md +18 -10
  96. package/dist/expert/cli/cli.md +48 -41
  97. package/dist/expert/cli/configuration-migrations.md +43 -0
  98. package/dist/expert/cli/configuration.md +24 -14
  99. package/dist/expert/cli/controls.md +23 -11
  100. package/dist/expert/cli/dashboard-details.md +28 -10
  101. package/dist/expert/cli/dashboard-layout.md +15 -15
  102. package/dist/expert/cli/dashboard.md +8 -10
  103. package/dist/expert/cli/environment.md +33 -0
  104. package/dist/expert/cli/execution.md +10 -8
  105. package/dist/expert/cli/git-persistence.md +27 -21
  106. package/dist/expert/cli/git-preflight.md +8 -4
  107. package/dist/expert/cli/git-synchronization.md +32 -6
  108. package/dist/expert/cli/harness-plugins.md +12 -12
  109. package/dist/expert/cli/harnesses.md +22 -16
  110. package/dist/expert/cli/initialization-ui.md +14 -14
  111. package/dist/expert/cli/initialization.md +31 -21
  112. package/dist/expert/cli/installation.md +6 -0
  113. package/dist/expert/cli/isolation.md +5 -3
  114. package/dist/expert/cli/releasing.md +17 -3
  115. package/dist/expert/cli/retries.md +10 -8
  116. package/dist/expert/cli/run.md +7 -5
  117. package/dist/expert/cli/start.md +21 -15
  118. package/dist/expert/cli/status-view.md +15 -17
  119. package/dist/expert/cli/synchronization-setup.md +24 -0
  120. package/dist/expert/cli/terminal.md +14 -16
  121. package/dist/expert/cli/tool-management.md +60 -0
  122. package/dist/expert/cli/tool-runtime.md +35 -0
  123. package/dist/expert/cli/tools-migration.md +50 -0
  124. package/dist/expert/cli/tools.md +73 -0
  125. package/dist/expert/cli/trace-configuration.md +9 -11
  126. package/dist/expert/cli/updates.md +7 -7
  127. package/dist/expert/cli/windows-installer.md +67 -0
  128. package/dist/expert/cli/workspace.md +2 -0
  129. package/dist/expert/coding-standards/_index.md +11 -0
  130. package/dist/expert/coding-standards/naming.md +30 -0
  131. package/dist/expert/coding-standards/shared-logic.md +27 -0
  132. package/dist/expert/concepts/automatic-repair.md +33 -0
  133. package/dist/expert/concepts/engine-and-project.md +7 -5
  134. package/dist/expert/dictionary.md +18 -18
  135. package/dist/harness/plugins/claude-code/index.js +4 -2
  136. package/dist/harness/plugins/claude-code/index.js.map +1 -1
  137. package/dist/harness/plugins/cline/index.js +1 -0
  138. package/dist/harness/plugins/cline/index.js.map +1 -1
  139. package/dist/harness/plugins/gemini/index.js +2 -0
  140. package/dist/harness/plugins/gemini/index.js.map +1 -1
  141. package/dist/harness/plugins/github-copilot/index.js +1 -0
  142. package/dist/harness/plugins/github-copilot/index.js.map +1 -1
  143. package/dist/harness/plugins/openai-codex/index.js +13 -9
  144. package/dist/harness/plugins/openai-codex/index.js.map +1 -1
  145. package/dist/harness/plugins/opencode/index.js +1 -0
  146. package/dist/harness/plugins/opencode/index.js.map +1 -1
  147. package/dist/harness/plugins/qwen-code/index.js +1 -0
  148. package/dist/harness/plugins/qwen-code/index.js.map +1 -1
  149. package/dist/harness/types.d.ts +16 -5
  150. package/dist/project/config.d.ts +135 -48
  151. package/dist/project/config.js +331 -119
  152. package/dist/project/config.js.map +1 -1
  153. package/dist/project/configuration.d.ts +43 -0
  154. package/dist/project/configuration.js +165 -0
  155. package/dist/project/configuration.js.map +1 -0
  156. package/dist/project/defaults.d.ts +4 -2
  157. package/dist/project/defaults.js +10 -5
  158. package/dist/project/defaults.js.map +1 -1
  159. package/dist/project/git.d.ts +28 -0
  160. package/dist/project/git.js +81 -0
  161. package/dist/project/git.js.map +1 -1
  162. package/dist/project/migrations.d.ts +96 -0
  163. package/dist/project/migrations.js +301 -0
  164. package/dist/project/migrations.js.map +1 -0
  165. package/dist/project/publication.d.ts +57 -0
  166. package/dist/project/publication.js +117 -0
  167. package/dist/project/publication.js.map +1 -0
  168. package/dist/project/readiness.d.ts +14 -5
  169. package/dist/project/readiness.js +23 -22
  170. package/dist/project/readiness.js.map +1 -1
  171. package/dist/project/setup.js +2 -0
  172. package/dist/project/setup.js.map +1 -1
  173. package/dist/service/actions.d.ts +12 -4
  174. package/dist/service/actions.js +32 -2
  175. package/dist/service/actions.js.map +1 -1
  176. package/dist/service/control.d.ts +1 -1
  177. package/dist/service/control.js +1 -1
  178. package/dist/service/host.d.ts +5 -2
  179. package/dist/service/host.js +26 -16
  180. package/dist/service/host.js.map +1 -1
  181. package/dist/service/http.js +7 -2
  182. package/dist/service/http.js.map +1 -1
  183. package/dist/service/launcher.d.ts +2 -1
  184. package/dist/service/launcher.js +1 -0
  185. package/dist/service/launcher.js.map +1 -1
  186. package/dist/service/records.d.ts +3 -0
  187. package/dist/service/records.js +1 -1
  188. package/dist/service/records.js.map +1 -1
  189. package/dist/service/spa/app.css +39 -0
  190. package/dist/service/spa/app.js +242 -39
  191. package/dist/service/worker.js +1 -0
  192. package/dist/service/worker.js.map +1 -1
  193. package/dist/tools/environment.d.ts +122 -0
  194. package/dist/tools/environment.js +199 -0
  195. package/dist/tools/environment.js.map +1 -0
  196. package/dist/tools/model.d.ts +180 -0
  197. package/dist/tools/model.js +111 -0
  198. package/dist/tools/model.js.map +1 -0
  199. package/dist/tools/normalize.d.ts +51 -0
  200. package/dist/tools/normalize.js +321 -0
  201. package/dist/tools/normalize.js.map +1 -0
  202. package/dist/tools/operations.d.ts +198 -0
  203. package/dist/tools/operations.js +378 -0
  204. package/dist/tools/operations.js.map +1 -0
  205. package/dist/tools/readiness.d.ts +72 -0
  206. package/dist/tools/readiness.js +160 -0
  207. package/dist/tools/readiness.js.map +1 -0
  208. package/dist/ui/dashboard.d.ts +3 -0
  209. package/dist/ui/dashboard.js +173 -2
  210. package/dist/ui/dashboard.js.map +1 -1
  211. package/dist/ui/details.d.ts +35 -1
  212. package/dist/ui/details.js +103 -2
  213. package/dist/ui/details.js.map +1 -1
  214. package/dist/ui/secret.d.ts +8 -0
  215. package/dist/ui/secret.js +41 -0
  216. package/dist/ui/secret.js.map +1 -0
  217. package/dist/ui/status-view.d.ts +1 -0
  218. package/dist/ui/status-view.js +33 -8
  219. package/dist/ui/status-view.js.map +1 -1
  220. package/dist/ui/tool-forms.d.ts +24 -0
  221. package/dist/ui/tool-forms.js +133 -0
  222. package/dist/ui/tool-forms.js.map +1 -0
  223. package/package.json +1 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  [Main specification](../_main.md)
4
4
 
5
- These are verifiable product outcomes, not an implementation plan or evidence of completed tests. Exercise common behavior with local fixture projects and deterministic substitutes; paid provider checks are separate and explicit. Topic-specific specifications also define focused acceptance outcomes. Unless an explicit exception is being exercised, scenarios use default automatic commits; [uncommitted mode](git-persistence.md#explicit-uncommitted-mode) is tested separately.
5
+ These are verifiable product outcomes, not an implementation plan or evidence of completed tests. Exercise common behavior with local fixture projects and deterministic substitutes; paid provider checks are separate and explicit. Topic specifications add focused acceptance outcomes. Unless explicitly testing an exception, use automatic commits; [uncommitted workflows](git-persistence.md#explicit-uncommitted-workflows) are tested separately. Configuration/tool identifiers follow their [naming contract](../coding-standards/naming.md), independently of free-form Book names.
6
6
 
7
7
  ## Installation and startup
8
8
 
@@ -11,109 +11,127 @@ These are verifiable product outcomes, not an implementation plan or evidence of
11
11
  - **S03:** Plain start creates one daemon with persistence and a free loopback HTTP port, attempts the default protected remote tunnel, renders one status snapshot and exits without attaching a dashboard. With remote access ready, the primary URL/pairing QR works from another network; a failed tunnel is visibly degraded rather than a false localhost mobile-access claim. No-server/no-tunnel/no-QR and an explicit port behave as advertised; a port conflict is not reported as success. Bare `ptbk` shows help/version without starting or prompting.
12
12
  - **S04:** Start/pause/resume/stop/restart/status/show target the correct project and report once, distinguishing an accepted pending request from completion. Repeated/concurrent starts do not duplicate it, attach a dashboard, cancel deliberate pause/stop intent or control an unrelated PID. Status/show never start work; an intentional completed stop remains stopped after reboot until an authorized start, including a subsequent explicit init's start operation.
13
13
  - **S05:** Verify daemon reboot/crash recovery on Linux, macOS and Windows. No-persist disables automatic restart but retains state. `start --raw` remains a one-shot daemon launch; `start --foreground --raw` stays foreground with plain events. Explicit foreground execution never silently becomes a daemon; unsupported persistence prerequisites are reported.
14
- - **S06:** Successful init begins real work automatically without a separate start, setup prompt, manual assignment, open dashboard or Run action. A later plain start reuses that service. After an intentional stop, explicit start resumes ordinary processing. An assigned task executes; an unassigned task runs Manager then its target. An empty backlog with due discovery produces and executes useful work without an observing client.
14
+ - **S06:** Successful init begins eligible work automatically without a separate start, setup prompt, manual assignment, open dashboard or Run action. A later plain start reuses that service. After intentional stop, explicit start resumes processing. Assigned work executes, unassigned work runs Manager then its target, and due discovery produces useful tasks when prerequisites exist. Later missing tools keep the engine running with a resource wait rather than requiring a restart or another setup wizard.
15
15
  - **S07:** The official **Check ptbk** workflow passes on Node 22/24 across Linux, macOS and Windows for the accepted source. An authorized **Publish ptbk** release validates its exact tag through that matrix, publishes and verifies the package, and finishes successfully. Both workflows must pass for release acceptance; a failed required platform job or skipped publication is unsuccessful. Failed validation blocks publication and remains visible; code/test fixes use a new immutable release tag. See [GitHub Actions checks and publication](releasing.md).
16
16
 
17
17
  ## Initialization, configuration and maintenance
18
18
 
19
- - **I01:** With dependencies available and no newer engine update, the first input is project intent. Blank input, a current empty destination and at least one usable harness produce a useful skeleton with real validation, a preserved blank `specs/_initial.md` and one unfinished Expert readiness task. Technical setup installs the running version locally in dependencies and commits without model work; its automatic start executes the task normally. Repeating satisfied setup is a file no-op, including after task completion or archiving.
20
- - **I02:** Existing files, Git history/current branch, staging, customized agents/settings and a declared devDependency survive init. Reinitialization reuses recorded intent without reauthoring the project's purpose. Partially initialized projects and newer-engine additions receive only missing required setup; unrelated changes never enter a setup commit, and existing initial specifications/assets are not overwritten.
21
- - **I03:** Start over partial setup offers the same initializer for that selected folder and rechecks readiness before execution. Ready projects bypass it. Its handoff creates only one service, without recursive init/start. Raw/noninteractive use never launches hidden setup/login prompts and identifies missing decisions or prerequisites.
19
+ - **I01:** With dependencies available and no update selected, intent is the first input. Blank intent, an empty destination and usable selected browser/harness tools produce a useful skeleton, preserved blank `specs/_initial.md` and one ordinary Expert readiness task. No check-command question appears; absent real validation receives the explicitly labelled informational placeholder, which does not block start or claim tests passed. Setup installs the running version locally, saves its `promptbookVersion` and commits without model work; the daemon executes bootstrap normally. Repeating satisfied setup is a file no-op, including after task completion/archiving.
20
+ - **I02:** Existing files, Git history/current branch, staging, customized agents/settings and a declared devDependency survive init. Reinitialization reuses recorded intent without reauthoring the project's purpose. Partial setup/new required roles receive only missing support; required configuration evolution uses its separate migration pass. Unrelated changes never enter setup commits, and original specifications/assets and real checks are not overwritten. A newly created repository uses main; an existing branch is preserved.
21
+ - **I03:** Start over genuinely missing structural setup offers the same initializer for the selected folder and rechecks readiness. Initialized projects bypass it, including those waiting for deliberately disabled/missing tools. One handoff creates one service without recursive init/start. Raw/noninteractive use never launches hidden setup/login prompts and identifies genuinely missing decisions/prerequisites.
22
22
  - **I04:** Creating a child inside Git offers back, an ignored independent repository or a real submodule. Back changes neither project; ignored-child and submodule metadata are correct and repeatable. Child commits and parent changes stay separate; no invented remote, accidental parent commit or unrelated index changes occur.
23
23
  - **I05:** Both global invocations and parent-local invocations creating a child offer destination-local dependencies by default. They install the exact running version, not latest. Existing local dependencies/devDependencies are preserved; selecting global does not silently add a local copy or claim a parent-local executable is global.
24
- - **I06:** An outdated invoked engine offers an early self-update after the new-project intent field, defaulting to yes. No retains the running version; yes updates the correct local/global installation and exits before target setup with a rerun instruction and recoverable intent/attachments. Offline checks and update failures are honest; noninteractive use never silently accepts an update. Rerun does not require repasting the draft.
25
- - **I07:** Built-in defaults, legacy environment fallbacks, partial `ptbk.json` and explicit flags resolve in the documented order, including explicit false/empty values and relative paths. Flags/live temporary changes do not rewrite saved defaults; credentials and runtime state never enter the JSON. Trace settings and init-to-service overrides follow the same precedence.
26
- - **I08:** A catalog of hundreds initially shows only featured names and More, with all integrations reachable. Selecting one harness configures only that harness; an existing authenticated global installation is reused. A supported/installed but unselected harness is not routed to or updated. Core wizard/runtime/update behavior works through the same plugin contract.
27
- - **I09:** One outdated selected harness offers yes/no; several offer keep, update all outdated selected, or choose individually. Current/unselected harnesses are untouched. Start automatically maintains enabled harnesses by default, honors disabling overrides and avoids updating an active shared invocation. Failures preserve a usable compatible version or visibly block affected work.
28
- - **I10:** Select two harnesses, one already healthy and one requiring login/setup. Init proceeds to automatic start only after both are usable and the saved check and prerequisites are configured. An opened login window is not completion. Cancelled login, no usable harness, deferred validation, unresolved dependencies or failed setup commit yields explicit incomplete setup without starting work. Failed service launch after setup is separately labeled and preserves the queued task; resume reuses completed work.
29
- - **I11:** The first task is explicitly assigned to Expert and links to the initial specification from its actual task-source location. It transforms project content rather than generating a replacement for the user's original input. The daemon applies ordinary execution, checks, task traces, completion and result commit, with normal follow-ups. Failing checks cannot be stamped done. Init neither executes project checks itself nor claims they passed; existing validation and user tasks remain intact.
30
- - **I12:** With a globally installed Codex reporting `Logged in using ChatGPT`, valid saved defaults and other prerequisites satisfied, technical init accepts readiness without another login, API key, `--allow-credits` or model probe, even when exec/app-server lacks credit-control flags. Subsequent automatic execution, TEAM and planning reuse that account. Present API keys do not override it; signed-out API execution still needs explicit API opt-in. Native quota/credit failures remain quota outcomes without a paid fallback or a false claim that ptbk disabled provider-side credits.
31
- - **I13:** Launch a project with a healthy globally installed Codex on a custom/version-manager PATH and native login store. Resume its saved worker under an OS-manager environment lacking those locations: it still detects that same account without a login or model probe. Missing-harness and recovery blockers remain labeled as such throughout recheck delays, even after answering their action request. Their actual reason, next action and recheck time are visible in terminal/browser/API; Skip wait cannot bypass them. Older saved workers remain compatible through the pinned Node global bin fallback.
32
- - **I14:** A genuine User clarification starts one named agent-authored chat linked to its waiting task, ends the provider turn promptly and checkpoints without retries or another model call. Restart preserves the exact chat/question and task context. Independent work can run only after safe ownership release and while the engine permits new claims. One real committed human reply resumes the task without replaying effects; finite run reports incomplete while waiting.
33
- - **I15:** Compose arbitrary intent using typed prose, long multiline pasted blocks and several images/files. Compact tokens can be inspected, edited or removed without accidental submission. Resize/back-navigation preserves the draft. Saved `specs/_initial.md` retains original text exactly and ordered relative attachment links, without summaries, placeholder labels or temporary-machine paths. It is versioned with the ordinary Expert task before dispatch. Customized task-source paths still resolve the link.
34
- - **I16:** The dedicated Traces screen asks all three choices and saves their explicit values in `ptbk.json`. Defaults are local-only traces, ignored videos and enabled browser recording. Effective parent/video exclusion is visible; resume reuses answers. Noninteractive equivalents preserve false values and fail actionably for genuinely missing required decisions rather than prompt invisibly.
35
- - **I17:** Initialization creates a missing editable `agents/.core/chatter.book` with `AGENT Chatter` and TEAM access to all other initialized core/specialist roles, without self-consultation. Reinitialization preserves an existing customized Chatter, its team and all older core Books. An upgrade adds only a missing required role; invalid or colliding definitions are diagnosed, not overwritten. See [Chatter acceptance](../agents/chatter.md#acceptance-outcomes).
24
+ - **I06:** An outdated invoked engine offers an early optional self-update after intent, defaulting to yes. No keeps the current version only when compatible with the saved project version. Yes updates the correct installation and exits before setup with a rerun instruction and recoverable intent/assets. Offline lookup and failure are honest; unattended use never silently accepts an update. A known newer project configuration still requires the compatibility gate, and rerun does not require repasting the draft.
25
+ - **I07:** Defaults, legacy environment fallbacks, project settings and explicit overrides resolve in documented order, preserving false/empty values and path bases. Temporary flags/controls do not rewrite defaults; explicit saved tool management does commit its own changes. Secrets and runtime state never enter JSON. Trace and init-to-service settings use the same precedence, canonical naming and live-refresh rules.
26
+ - **I08:** A catalog of hundreds initially shows only featured names and More, with all integrations reachable. Selecting one configures only that integration; an authenticated global installation is reused. Supported/installed but unconfigured or disabled tools are not implicit routing/update candidates. Init, runtime, CLI and dashboard use the same typed tool/plugin contracts, not separate implementations.
27
+ - **I09:** One outdated selected harness offers yes/no; several offer keep, update all outdated selected, or choose individually. Current/unselected harnesses are untouched. Start automatically maintains enabled harnesses by default, honors disabling overrides and avoids updating an active shared invocation. Several account instances sharing an executable do not cause duplicate competing updates. Failure preserves a usable compatible version or visibly blocks only affected work.
28
+ - **I10:** Select two initial harness integrations, one healthy and one needing login/setup. Init verifies both selected integrations and the initial browser, unless the user explicitly removes a selection; an opened login window is not completion. The placeholder check is accepted without a check setup question or validation-deferral blocker. Cancelled essential login, unresolved dependencies or failed local setup commit is incomplete. Failed remote publication does not block otherwise ready local launch. Failed service launch preserves saved setup and queued work; resume reuses completed steps.
29
+ - **I11:** The first task is assigned to Expert and links to the original specification from its actual task-source location. It adapts project content, agents, checks and follow-ups without replacing original input. Ordinary execution/traces/completion/result commits apply. A placeholder is not real verification evidence; genuinely configured failing checks cannot be stamped passed or replaced with a fake success. Init does not run project checks or claim they passed; existing validation and tasks remain intact.
30
+ - **I12:** A native globally installed Codex reporting `Logged in using ChatGPT` is ready without another login, API key, `--allow-credits` or model probe, even without credit-control flags. Native execution/TEAM/planning retain that context and ambient keys do not override it. An explicitly configured API_KEY tool is a distinct authorized route/fallback with a symbolic key reference. Quota/credit failures remain real outcomes; no unconfigured paid fallback, fabricated provider control or shared-login overwrite is permitted.
31
+ - **I13:** Launch a project with a healthy globally installed Codex on a custom/version-manager PATH and native login store. Resume its saved worker under an OS-manager environment lacking those locations: it still detects that same account without a login or model probe. Missing-harness and recovery blockers remain labeled throughout recheck delays, even after their action request is answered. Actual cause, next action and recheck are visible in terminal/browser/API; Skip wait cannot bypass them. Older saved workers retain the pinned Node global bin fallback.
32
+ - **I14:** A genuine User clarification starts one named agent-authored chat linked to its waiting task, ends the provider turn promptly and checkpoints without retries or another model call. Restart preserves the exact chat/question and task context. Independent work runs only after safe ownership release and when lifecycle permits new claims. One real committed reply resumes without replaying effects; finite run reports incomplete while waiting.
33
+ - **I15:** Compose arbitrary intent with prose, long pasted blocks and several images/files. Compact tokens can be inspected/edited/removed without accidental submission; resize/back navigation preserves the draft. `specs/_initial.md` retains original text exactly and ordered relative attachment links, without summaries, placeholders or temporary-machine paths. Save it with the ordinary Expert task before dispatch, including customized source paths.
34
+ - **I16:** The Traces screen saves explicit `traces.isCommitted`, `traces.isVideoIgnored` and `traces.isVideoRecordingEnabled`. Defaults are local-only traces, ignored videos and enabled recording. Effective parent/video exclusion is visible; resume reuses answers. Noninteractive equivalents preserve false and never prompt invisibly for missing decisions.
35
+ - **I17:** Init creates a missing editable `agents/.core/chatter.book` with `AGENT Chatter` and TEAM access to all other initialized core/specialist roles, without self-consultation. Reinit preserves customized Chatter/team and older core Books. Upgrades add only missing required roles; invalid/colliding definitions use repair rather than replacement. See [Chatter acceptance](../agents/chatter.md#acceptance-outcomes).
36
36
 
37
37
  ## Agents, language and assignment
38
38
 
39
- - **A01:** `@Adam` and `{{Adam}}` are identical; existing `{Adam}` is a readable compatibility alias. Case/diacritics/separators are normalized before lookup for agents, tasks and chats. One shared deterministic resolver orders built-ins, nonignored common folders (shallow first; root order agents/tasks/chats), remaining nonignored Books and eligible ignored Books such as node_modules. The first matching named Book wins; colliding definitions are shadowed and diagnosed, not merged or intrinsically fatal. FROM/TEAM/TASK AGENT and other typed commitments require the correct winning kind; hidden/dependency Books are referenceable without automatic ordinary task discovery or edit authority. See [reference acceptance](../book-language/references.md#acceptance-outcomes).
39
+ - **A01:** `@Adam` and `{{Adam}}` are identical; existing `{Adam}` is a readable compatibility alias. Case/diacritics/separators are normalized for agents/tasks/chats. One shared resolver orders built-ins, nonignored common folders shallow-first (agents/tasks/chats root order), other nonignored Books and eligible ignored Books such as node_modules. First matching named Book wins; collisions are shadowed/diagnosed, not merged or intrinsically fatal. Typed references require the winning kind; hidden/dependency Books are referenceable without automatic discovery/edit authority. See [reference acceptance](../book-language/references.md#acceptance-outcomes).
40
40
  - **A02:** Default inheritance reaches Adam; custom ancestors are allowed when the chain terminates. FROM cycles fail. Void/Null/0 ends inheritance and is a TEAM no-op; User fails in FROM and creates a request in TEAM; Expert works in both.
41
- - **A03:** Reciprocal TEAM relationships are valid, consultations are bounded and the project still has at most one executing task. Advisors receive their own instructions and cannot exceed the originating task/conversation authority. Conversation-only advice does not manufacture a task or bypass the queue for actual specialist execution.
42
- - **A04:** Start discovers enabled harnesses' global installations, authentication and models. Missing all usable enabled harnesses invokes setup or gives an unattended diagnostic. An otherwise actionable unassigned task automatically creates one checked Manager prerequisite before target execution, with a visible relationship and direct authorized bootstrap. It neither needs manual assignment nor recursively assigns itself. Explicit requirements and paid-account restrictions remain intact; retries/restart do not duplicate assignment work.
41
+ - **A03:** Reciprocal TEAM relationships are valid, consultations are bounded and at most one project task executes. Advisors receive their own instructions and cannot exceed task/conversation authority. Conversation-only advice neither invents a task nor bypasses the queue for actual specialist execution.
42
+ - **A04:** Before every task and during waits, discover current enabled tools, global harness executables, authentication/models and browser readiness. Missing resources in an initialized project produce a running resource wait, not automatic reinitialization or service exit. Otherwise actionable unassigned work creates one checked Manager prerequisite with a direct authorized bootstrap and visible relation, without recursive assignment. Explicit requirements/paid restrictions and retry deduplication remain intact.
43
43
  - **A05:** Implicit/explicit OPEN produces one Teacher follow-up; limited OPEN is respected. CLOSED prevents learning, including pending learning work. Teacher is customizable but must be CLOSED, and non-agents are not rewritten as local Books.
44
- - **A06:** Canonical Books begin with AGENT, TASK or CHAT plus their name content, using one grammar and parser. Standalone Books need no folder hint to determine kind; moving one cannot change its kind. Multiline commitment content and fenced control-looking examples survive edits. Every documented commitment and alias has its declared meaning; malformed controls never silently activate work. Task GOAL describes bounded work, not an agent's ongoing discovery goal.
45
- - **A07:** Verify complete multiword uppercase keywords, numeric/reference content and the three-letter minimum: a standalone A/I/AI in prose does not begin a commitment. Unknown full keywords are not shortened to known prefixes. TASK AGENT and CHAT MESSAGE are not root declarations; a missing, empty, repeated or unsupported root declaration receives a diagnostic. Legacy plain-name/ENTITY sources are explicitly converted with preserved identity, never silently rewritten during discovery. See [syntax acceptance](../book-language/syntax.md#acceptance-outcomes).
44
+ - **A06:** Canonical Books begin with AGENT, TASK or CHAT and their name content, using one grammar/parser. Standalone Books need no folder hint and moving one does not change kind. Multiline content/fenced control-looking examples survive. Documented commitments/aliases retain meaning; malformed controls do not activate work. Task GOAL is bounded assignment, not an agent's ongoing discovery goal.
45
+ - **A07:** Verify full multiword uppercase keywords, numeric/reference content and the three-letter minimum: standalone A/I/AI in prose is not a commitment. Unknown full keywords are not shortened into known prefixes. TASK AGENT/CHAT MESSAGE are not roots; missing/empty/repeated/unsupported roots are diagnosed. Legacy plain-name/ENTITY sources are explicitly converted preserving identity, not silently rewritten during discovery. See [syntax acceptance](../book-language/syntax.md#acceptance-outcomes).
46
46
 
47
47
  ## Tasks and persistence
48
48
 
49
- - **T01:** Agent, Task and Chat identities are the normalized name contents of their opening AGENT/TASK/CHAT commitments, excluding keywords, never generated IDs or filenames. Type does not introduce a separate name namespace. A same-name duplicate may exist: deterministic first-wins lookup selects one Book without merging; Fixer diagnoses shadowing. Moving a file preserves identity, renaming its declared name requires explicit link/history reconciliation. Eligibility, relationships and task routing use the selected name. The source-filename-based trace directory is storage, not a second logical identity.
50
- - **T02:** Each accepted task result/occurrence has one commit containing checked changes, TASK DONE, follow-ups, task-internal agent↔agent conversation and eligible traces/video. Subject is `PTBK: <task name>`, body includes assignment and `Task-Name: <name>`, not Task-ID. Creation/assignment/repair remain distinct scoped operations with name correlation.
51
- - **T03:** Run is finite and uses one configuration; start operates indefinitely. At most one project task executes across interfaces and service commands. Future high-priority work does not block ready work or trigger goal enquiry.
52
- - **T04:** On start or queue completion with no unfinished present or future tasks and no active cooldown, a `running` engine begins goal enquiry automatically as ordinary checked work. Useful generated tasks run without a new start or manual Run action. An enquiry may create future work or no work. Cooldowns survive restart; supporting agents, unavailable goals and empty results do not cause an unbounded generation loop. Legitimate waits have visible reasons, not invented progress. Pausing, pause and stopping prohibit new discovery/assignment/follow-up task claims as well as ordinary backlog claims.
53
- - **T05:** Earliest-start boundaries, explicit offsets and ambiguous local times are respected. Recurrence preserves anchors, task identity and occurrence history, coalesces downtime, never overlaps and runs at most one occurrence per finite invocation.
54
- - **T06:** Interrupt during work, checks, a conversation, completion, commit or push. Safe recovery resumes the correct phase without duplicate execution/messages/commits, preserving source revisions, normalized names and historical trace evidence. Unrelated staged edits, hooks, signing and external effects are respected.
55
- - **T07:** Commit/push failure never reruns successful model work. Full/partial reverts and changed dependencies are reconciled, including recorded external effects. Worktree integration preserves the single task commit and its identity or keeps an unintegrated result safely.
56
- - **T08:** Legacy Markdown states, priorities, sections and selectors remain supported. Old ptbk-task-id comments are non-authoritative historical metadata and are never generated. Conversion preserves named work, assets, meaning, timestamps and provenance without creating two runnable copies.
57
- - **T09:** Default add commits one unfinished `TASK <name>` Book before dispatch, with a creation-time-decorated name and its bounded description under GOAL, enabling Manager and start without manual Git. Other authorized versioned project changes commit by default. Each accepted human-facing message has a separate chat commit; task-internal TEAM messages join the task result. Read-only/no-op changes create no commits; unrelated edits and Git ownership remain protected.
58
- - **T10:** Explicit `--no-commit` on init, add, run or start creates no automatic commits and visibly reports uncommitted state, preserving names, local traces, checks, ownership and recovery without rerunning accepted work. The opt-out propagates through init's automatic service start but does not silently change another process or later invocation. It conflicts with isolation and auto-pull/push; its own writes do not require ignoring unrelated changes. Reentering default mode requires safe reconciliation, not a surprise aggregate commit.
59
- - **T11:** All new task/chat generators include readable date/time before any collision: add, chat entry points, approved plans, bootstrap, automatic assignment/discovery/learning/repair, follow-ups and consultations. Repeated descriptions, a fixed clock, batches and concurrent writers still produce distinct final normalized names without overwriting paths or shadowing another entity kind. Links and outcomes use the saved names, not title-only guesses. See [generated-name acceptance](generated-names.md#acceptance-outcomes).
60
- - **T12:** Valid names with no date or a differently formatted date remain valid ordinary text. The parser never extracts or requires a timestamp from a name. Existing-source conversion, pending-save retry, recovery and recurring execution retain the name and its trace/history association. Filenames remain separate date-leading storage names; a file move does not change kind or logical identity.
49
+ - **T01:** Agent/Task/Chat identity is normalized opening-name content, not generated ID or filename; kind does not create separate name namespaces. First-wins duplicate lookup selects one without merging; Fixer diagnoses shadowing. Moving preserves identity; declared rename requires link/history reconciliation. Routing/relationships use the selected name, while source-filename trace storage remains separate.
50
+ - **T02:** Each accepted task/occurrence has one result commit containing accepted/check-generated changes, TASK DONE, follow-ups, task-internal conversation and eligible traces/video. Subject is `PTBK: <task name>`, with assignment and `Task-Name`, not Task-ID. Creation, assignment, repair and later integration remain separately scoped operations with provenance.
51
+ - **T03:** Run is finite with selected execution constraints; start is indefinite. Neither freezes the live tool inventory for the entire task/session. At most one task executes across interfaces; future high-priority work does not block ready work or trigger premature goal enquiry.
52
+ - **T04:** With no unfinished present/future work and no active cooldown, a running engine with usable resources performs ordinary goal enquiry automatically. Useful tasks execute without another command; enquiry can create future work or no work. Cooldowns survive restart; unavailable goals/supporting agents/empty results do not busy-loop. Pausing/pause/stopping prohibit new discovery, assignment and follow-up claims as well as ordinary claims.
53
+ - **T05:** Earliest-start boundaries, explicit offsets and ambiguous local times are respected. Recurrence preserves anchors, identity/history, coalesces downtime, never overlaps and executes at most once per finite invocation.
54
+ - **T06:** Interrupt during work, checks, conversation, completion, commit or push. Resume the correct safe phase without duplicate execution/messages/commits, preserving revisions, names, traces, staging, hooks/signing and external effects.
55
+ - **T07:** Commit/push failure does not rerun successful model work. Reconcile reverts/changed dependencies with effect evidence. Worktree integration preserves the original result commit and intervening project commits using a visible non-fast-forward merge, or keeps unintegrated work recoverable. No rebase/amend/force reset replaces history to make integration succeed.
56
+ - **T08:** Legacy Markdown states/priorities/sections/selectors remain supported. Old ptbk-task-id comments are historical non-authoritative metadata and not generated. Conversion preserves named work, assets, meaning, timestamps and provenance without two runnable copies.
57
+ - **T09:** Add normally commits one unfinished typed/date-decorated task with bounded GOAL before dispatch, enabling Manager/start without manual Git. Other authorized versioned changes commit by operation. Human-facing messages commit separately, task-internal TEAM with the result. Read/no-op creates no commit; unrelated edits remain protected.
58
+ - **T10:** Ordinary `--no-commit` init/add/run/start visibly preserves uncommitted work without invented SHAs or rerunning accepted effects, and propagates through init's service only. It conflicts with isolation/autosync and cannot silently disable mandatory configuration-migration or explicit tool-management commits: incompatible requests fail before those writes. Owned writes do not require ignoring unrelated dirt. Reentering default mode reconciles safely rather than creating a surprise aggregate commit.
59
+ - **T11:** New task/chat generators include readable date/time before collision: add/chat/plans/bootstrap/assignment/discovery/learning/repair/follow-ups/consultations. Repeated text, fixed clocks, batches and concurrent writers still produce distinct normalized names and paths without shadowing another kind. Links use final names. See [generated-name acceptance](generated-names.md#acceptance-outcomes).
60
+ - **T12:** Undated/differently dated existing names remain ordinary valid text. Parser never requires/extracts a name timestamp. Conversion, pending-save retry, recovery and recurrence retain existing name/history. Filenames are separate date-leading storage; moves do not change logical identity/kind.
61
61
 
62
62
  ## Controls, access and evidence
63
63
 
64
- - **U01:** Attached/foreground terminal views, browser SPA and direct API clients show and control one engine and its actual version. Lifecycle controls, wait skipping, settings and answers synchronize; startup-only settings and deferred changes are explicit. Multiple attached clients do not create queues or own service state. Closing an attached terminal/browser client never stops the engine; an explicit shared stop operation does.
65
- - **U02:** TEAM User, system confirmations and browser logins all create agent-authored chats (not a separate persistent Request entity). A waiting question is conversational and attributed; terminal/browser/API/CLI can answer once. `ptbk answer` is a compatibility chat reply, even without HTTP; raw output never prompts invisibly.
66
- - **U03:** New projects default to a dedicated OS-user-global Promptbook-managed Chrome-compatible profile reused across projects without touching personal Chrome. Alternative choices remain isolated project profile, user's existing Chrome profile and custom profile path; headless/headful is independent. Concurrent owners cannot corrupt a shared profile and existing selections survive reinit.
67
- - **U04:** Harness native authentication and browser website sessions remain independent: changing a browser profile does not log out/reinitialize a harness. No password database, key or session data appears in Git, traces or ordinary API state. Protect browser video against sensitive authentication material too. External content cannot become authority to change rules; localhost or a public tunnel hostname does not bypass authorization.
68
- - **U05:** Read-only services work offline without mutation, initialization, updates, tunnel startup or paid calls. Plan cannot implement or delegate writes; fix does not run backlog work; verify remains human review.
69
- - **U06:** Logs, usage and status describe observed outcomes, with unknown data and truncation explicit. Teacher uses only exposed evidence. Low disk, unavailable login, quota and repeated failures preserve work and keep a running daemon controllable. Optional evidence-capture failure does not unnecessarily stop safe work.
70
- - **U07:** Init remains finite with Step X of Y, Expert guide and brief celebration only after confirmed setup/start; it neither opens dashboard nor waits for bootstrap. Dashboard is an indefinite operational view. `ptbk chat` is a separate persistent conversation experience, while `add` is finite model-free task authoring. Rich input, resize and navigation preserve drafts.
71
- - **U08:** Bare/help/about, wizard headers and runtime dashboards show the invoked/running engine version, including when another installed version or a newer release exists. Help remains structured and readable in a narrow terminal or redirected output, without harness configuration dumps or setup side effects.
72
- - **U09:** Failures before, during and after task execution explain the failed phase, effect and next action, with actual redacted diagnostic evidence and versions. Trace-storage failure is explicit, with available stderr diagnostics, not a fictitious saved path. Commit/push failures do not repeat successful model work.
73
- - **U10:** All predefined choices are keyboard-selectable, including four browser profiles, harnesses, traces and chat answers, with Enter for focused default and Esc for cancellation. New chat first offers Chatter (focused default) or Choose another agent. Only the second opens the full valid target list including hidden/core and Expert; User/Void/Null are not speakers. Freeform chat uses the rich composer.
74
- - **U11:** Suitable terminal/browser views use distinct labeled attention, work, visible service-controls, queue, activity/results and connection panels rather than one large rectangle. Execution and browser technical details are initially collapsed, with discoverable shortcuts; lifecycle actions are not hidden in them. Agent mascots retain stable identity/truthful activity. Narrow/reduced-motion views preserve names, state, controls and request priority. Lifecycle commands render one grouped outcome/snapshot; raw output has no decoration, QR art, hidden prompts or automatic pairing-secret disclosure. See [layout](dashboard-layout.md) and [visual acceptance](../agents/visual-identity.md#acceptance-outcomes).
75
- - **U12:** Dashboard attaches to an existing engine with no second worker. Q/Ctrl+C leaves only client; C starts a new Chatter-first chat, A opens the highest-priority existing waiting conversation, and all-chats exposes the other threads. Direct chat also uses the shared picker; Ctrl+C there closes chat only. Disconnection never drops stored messages or releases the engine lock.
76
- - **U13:** The lightweight SPA consumes authenticated service API, including lists/history/authoring/answers for chats and task links, without server-rendered runtime HTML. Messages commit exactly once, reflect across terminal/browser/API and reject stale duplicate responses. Refresh/tunnel failure cannot create tasks, duplicate chats or stop the daemon.
77
- - **U14:** Bare `ptbk`, `ptbk help` and `ptbk --help` show the top-level overview. `ptbk init --help`, `ptbk init help` and `ptbk help init` show only init; start/dashboard/add and aliases follow the same rule, as do supported nested subcommands. Pretty and raw retain the same relevant options/defaults/examples without unrelated command dumps. Scoped help works offline without setup, required command inputs or a running service and never executes the command; invalid paths and usage errors identify the relevant scope instead of silently falling back to global help. Pause/resume, stop --force/-F and dashboard --global are documented in their appropriate command scopes.
78
- - **U15:** Default startup on a connected supported system supplies protected remote access: scan the local pairing QR on a phone using mobile data, authenticate, inspect state and answer a request visible locally. Bare public URLs reveal no project content or authority. Pairing is short-lived/single-use, explicitly renewable locally and devices are revocable. Read-only status/refresh does not mint or rotate capabilities; credentials stay out of ordinary API output, redirected output, logs and Git. Cross-origin and stale/reused pairing attempts fail safely.
79
- - **U16:** No-tunnel makes no provider connection while preserving local HTTP; no-server disables both and conflicts with explicit tunnel enablement. No-QR/raw changes no exposure policy. Repeated start and additional clients create no extra tunnel. Provider/network failure is visibly degraded without indefinitely stopping local safe work or falling back to unprotected exposure. Stop/restart/finite-run completion manage the owned tunnel, and changed ephemeral addresses invalidate stale connection claims. See [remote-access acceptance](remote-access.md#acceptance-outcomes).
80
- - **U17:** Expand execution details and read the actual agent, harness, concrete model and thinking level together, including overrides and distinct attempt/consultation contexts. Automatic/unreported/unsupported metadata is distinguished without guessed equivalents. Switching tasks clears stale current-run claims. Raw/API and browser retain the same information; closing the panel does not mutate engine state.
81
- - **U18:** Expand browser details for each profile source and inspect the effective resolved path, browser/mode, ownership and launch/connection health. Inject launch failure and verify real redacted diagnostics and bounded automatic repair with no viewer open. Manual recheck, startup retry and browser restart use the same engine recovery, with deferred safe-boundary outcomes visible. They preserve sessions, active-work evidence and unrelated browsers, and do not restart the engine. Significant blockers remain visible when details are collapsed.
64
+ - **U01:** Terminal, foreground, browser and direct API show/control one engine with actual version. Shared lifecycle, settings, tool management and replies propagate, while startup-only/deferred choices are labelled. Closing attached viewers does not stop the engine; explicit shared stop does.
65
+ - **U02:** Agent-issued TEAM User requests and human-action needs use ordinary attributed chats, not a new persistent Request entity or Fixer channel. A durable answer is accepted once through existing interfaces; `ptbk answer` remains a compatibility reply even without HTTP. Direct management confirmations use the shared operation's input policy, not hidden noninteractive prompts.
66
+ - **U03:** New projects create one named browser defaulting to the dedicated OS-user-global Promptbook profile, not personal Chrome. Project/personal/custom alternatives remain available and independent of headless mode. Additional named browsers can represent separate site/accounts, preserving sessions and safe shared-profile ownership. Reinit retains existing choices.
67
+ - **U04:** Browser website sessions and harness native/API authentication are independent. No password/key/session data enters Git, ordinary status or traces, including sensitive video frames. External content is not authority to change policy; localhost/opaque public hostname does not bypass authorization.
68
+ - **U05:** Read-only operations work offline without mutation, initialization, updates, normalization/migrations, tunnel startup or paid calls. Plan does not implement/delegate writes, fix does not consume backlog, and verify remains human review.
69
+ - **U06:** Logs/usage/status describe observed outcomes with unknown/truncation explicit. Teacher uses actual evidence. Low disk, unavailable login/quota and repeat failures retain work and a controllable daemon. Optional capture failure does not unnecessarily halt safe work.
70
+ - **U07:** Init is finite with Step X of Y, Expert guide and brief celebration after confirmed local setup/start, no dashboard opening or bootstrap wait. Remote failure is a separate honest pending outcome. Dashboard is indefinite; chat is persistent conversation and add finite model-free authoring. Rich input/navigation/resize preserve drafts.
71
+ - **U08:** Bare/help/about, wizard and dashboard show actual invoked/running versions, not installed latest or another client's version. Narrow/raw help remains scoped/readable without provider dumps or setup effects.
72
+ - **U09:** Failures explain actual phase/effect/next action, redacted evidence and versions. Trace-storage failure does not invent saved files. Commit/push failures never rerun already successful model work.
73
+ - **U10:** Predefined choices use keyboard selectors, including browser sources, harnesses, traces, sync opt-in/provider/visibility and applicable confirmations. Enter selects focused default and Esc cancels. New chat remains Chatter-first; alternatives include valid hidden/core/Expert, not User/Void/Null. Free-form chat uses the rich composer; secret entry remains concealed.
74
+ - **U11:** Cockpit panels distinguish attention, work, main lifecycle controls, tools, enabled sync, queue, activity/results and connection. Execution/tool/browser/sync details use discoverable collapsed navigation, not hidden lifecycle actions. Narrow/raw/reduced-motion modes retain truthful names/state/actions and priority. Raw output has no decorative QR or secret disclosure. See [layout](dashboard-layout.md) and [visual acceptance](../agents/visual-identity.md#acceptance-outcomes).
75
+ - **U12:** Dashboard attaches without a second worker. Q/Ctrl+C leave client only; C starts Chatter-first chat, A opens the highest-priority existing request, all-chats exposes others. Direct chat uses the same picker and Ctrl+C closes it only. Disconnect does not lose messages or release engine ownership.
76
+ - **U13:** Lightweight SPA consumes authenticated API for state, tool management, enabled synchronization and durable chats, without server-rendered runtime HTML. Revision/idempotency rules prevent duplicate actions/messages across clients. Refresh/tunnel failure never creates work or stops the daemon. No frontend duplicates domain logic.
77
+ - **U14:** Bare/help/--help show top-level scope; init/start/dashboard/add/tool and aliases/nested subcommands support equivalent scoped help. Pretty/raw keep relevant defaults/examples without unrelated dumps. Help is offline, requires no service or command inputs and never executes the operation. Errors identify the correct scope. Document pause/resume, separate stop --force/-F, tool --force and last-type confirmation, global dashboard and autosync in their proper scopes.
78
+ - **U15:** Scan default protected pairing QR outside the local network, authenticate and inspect/answer the same project. Bare public URL has no project authority. Pairing is short-lived/single-use, locally renewable and revocable. Read-only status does not mint/rotate credentials. Secrets stay out of ordinary API, logs, redirected output and Git; cross-origin/stale/reused requests fail safely.
79
+ - **U16:** No-tunnel contacts no provider while keeping local HTTP; no-server disables both and conflicts with explicit tunnel. No-QR/raw do not change exposure. Repeated start/clients create no extra worker/tunnel. Remote tunnel outage is degraded without unnecessary local blocking or unprotected fallback. Stop/restart/run completion manage owned tunnel; changed URLs invalidate stale ready claims. See [remote acceptance](remote-access.md#acceptance-outcomes).
80
+ - **U17:** Execution details show actual agent, named harness instance/variant, model and thinking level with overrides and separate attempt/consultation contexts. Unknown/default/unsupported data is distinguished, not guessed. Task changes clear stale activity; raw/browser/API agree. Opening/closing detail does not mutate state.
81
+ - **U18:** For each named browser/profile source, inspect effective path/mode/ownership/health. Inject failure and observe bounded automatic recovery without a viewer, then manual recheck/retry/restart via the same engine operations. Safe-boundary deferrals are visible. Preserve sessions, active evidence and unrelated browsers; do not restart the engine. Important blockers remain visible with details closed.
82
82
 
83
83
  ## Conversations, resolver and project maintenance
84
84
 
85
- - **C01:** Open two independent named User→agent threads with the same agent using `ptbk chat`; both receive creation date/time and remain distinct after normalization even with an identical supplied title or clock tick. Direct entry requires no dashboard or task. Ctrl+C closes chat only. Enter at the first picker selects Chatter; Choose another agent reveals all valid alternatives, including hidden/core and Expert. Explicit agent selection bypasses the picker; noninteractive default is Chatter.
86
- - **C02:** Ask a read-only project-status question in a chat without making a task, then create two distinct tasks from another chat. Link tasks and chats M:N with directed LINKs; incoming and outgoing references navigate correctly using the final full names.
87
- - **C03:** An agent-originated question produces a named chat waiting-for-user and an attributed dashboard notification, separate from unread-only threads. A opens that exact full conversation for multi-turn clarification; a committed answer resumes linked work exactly once when scheduling permits it. All chats remain browsable. Chatter's default never replaces an existing request's author or participant.
88
- - **C04:** Every accepted human-facing message from User or agent receives its own scoped PTBK chat commit and Chat-Name correlation. Agent↔agent consultations inside a task are recorded in Chat Books but saved with the owning task's single result commit. Viewing/reading alone never creates a commit.
89
- - **C05:** Normalize case, accents and separators before one shared lookup for agents/tasks/chats; built-ins win, then nonignored agents/tasks/chats shallow-first, other nonignored content and ignored content last. Exact surface spelling has no priority. Same-name duplicates shadow without merging; Fixer can safely repair or ask the user.
90
- - **C06:** Fixer is an ordinary minimal OPEN core agent with TEAM access to Expert; scheduled diagnostics and fixes are regular tasks. It learns from validated project work and user replies through the ordinary Teacher mechanism. An engine update refreshes Expert but does not replace learned core agent Books.
91
- - **C07:** Reopen, append messages, reconnect and recover a waiting thread without renaming it, refreshing its date or adding another CHAT declaration. Literal message content that resembles AGENT/TASK/CHAT or other controls survives losslessly without becoming structural declarations. Existing undated chats remain valid; message timestamps and name text have distinct meanings.
92
- - **C08:** Ask Chatter a specialist question and verify bounded, attributed TEAM advice linked to the original human chat, without inventing a task or silently adding a specialist to its participants. With no owning task, that internal exchange uses scoped authoring persistence; human-facing messages still commit individually. A request for specialist execution creates ordinary authorized tasks rather than bypassing pause, checks, routing or ownership. Missing/invalid Chatter is diagnosed, not silently replaced or reinitialized from the picker.
85
+ - **C01:** Two independent User-to-agent threads with identical titles/clock ticks receive distinct date-decorated normalized names. Direct chat needs no task/dashboard. Chatter is Enter default; full valid alternative list includes hidden/core/Expert. Explicit target skips picker; noninteractive default is Chatter. Ctrl+C closes only the client.
86
+ - **C02:** A read-only status chat need not create a task; another chat can create several tasks. Directed M:N LINKs between chats/tasks preserve final names and navigate incoming/outgoing relations correctly.
87
+ - **C03:** An agent-originated question creates a named waiting-for-user chat and attributed notification, distinct from unread-only. A opens its full conversation; one committed reply resumes linked work once when permitted. Chatter never replaces existing author/participant and other chats remain browsable.
88
+ - **C04:** Each accepted human-facing User/agent message has a scoped PTBK chat commit with Chat-Name. Task-internal agent consultations are recorded in Chat Books and commit with the task result. Viewing alone does not commit.
89
+ - **C05:** One ordered Book resolver normalizes case/accents/separators; built-ins then nonignored common shallow-first, other nonignored and eligible ignored sources. Exact spelling has no priority. Duplicates shadow, not merge; Fixer may repair or consult under its normal policy. Tool-name collision rules do not change this existing Book lookup behavior.
90
+ - **C06:** Fixer is an ordinary required minimal OPEN core with initial TEAM User and Expert. Its general goal is problem-solving and offloading decisions; other agents can consult it and it can consult them. Automatic repair is separately specified and prominently linked. Learning uses normal Teacher evidence. Custom all/some/no-User consultation, including removing User, survives upgrades; Expert alone refreshes with engine version. No special Fixer channel/worker is introduced.
91
+ - **C07:** Reopen/append/reconnect/recover a chat without refreshing its name date, adding another CHAT root or damaging literal control-looking text. Existing undated names remain valid; message timestamps and name content are distinct.
92
+ - **C08:** Chatter specialist advice is bounded, attributed and linked to the original conversation without inventing a task or changing its participants. Conversation-only consultation uses scoped authoring, human-facing messages individual commits. Specialist execution becomes ordinary authorized tasks, never bypassing pause/checks/routing/ownership. Invalid/missing Chatter is diagnosed, not replaced from the picker.
93
93
 
94
94
  ## Service lifecycle and exclusive ownership
95
95
 
96
- - **L01:** Observe exactly running, pausing, pause and stopping as live engine states through CLI, two terminal dashboards, browser and API. Running can be idle; task phases and blockers are separate. An exited service is an observed absence, not a live stopped state. Force stop is an immediate action and no hard-pause operation exists.
97
- - **L02:** Request pause during an active task: no next task is claimed, current work settles once, then the engine remains alive in pause. Request graceful stop during active work: the same drain ends in owned cleanup and exit. Cover checks, pending result persistence and safely checkpointable human waiting. No implicit force escalation or routine human response is needed merely to finish a safely checkpointed shutdown. Pause with no active task is immediate.
98
- - **L03:** Cancel pausing or stopping via resume and observe running without replaying the current task. Switch pausing to stopping and stopping to pausing without task interruption; stop-to-pause explicitly confirms cancellation of shutdown. Noninteractive conflict handling never waits on a hidden prompt. Repeated requests are idempotent, stale confirmations cannot overwrite newer intent, and cancellation after irreversible shutdown is reported too late rather than falsely successful.
99
- - **L04:** From pause, resume normal work, stop immediately and orderly, or restart into one running replacement. Force stop from pause also uses the quick orderly shutdown because no task needs interruption. Main dashboard controls and commands invoke identical operations, including cancellation and pending-intent changes; another viewer immediately reflects the resulting state.
100
- - **L05:** `ptbk stop --force` and `ptbk stop -F` immediately stop only the selected owned execution without claiming completion of unfinished work. The owning service makes a bounded cleanup attempt, including its own lock; controlled graceful shutdown also cleans up. An external uncatchable kill has no cleanup guarantee or new next-start lock-deletion requirement. A signal to an attached dashboard closes only that viewer. Never terminate unrelated processes or remove a replacement owner's lock.
101
- - **L06:** Restart drains through stopping with visible restart intent, releases the old owner and starts exactly one replacement using the same project, effective configuration and selected installation. It never overlaps workers or silently changes foreground placement into a daemon. Cancelling pending restart cancels its replacement start. Lost replies, startup failure and unconfirmed stop outcomes are truthful; no blind mutation replay targets a successor. A completed intentional stop suppresses persistence, but cancelling pending stop leaves no accidental permanent-stop setting.
102
- - **L07:** Start one project concurrently through global/local installations, different supported versions and equivalent paths. Exactly one engine owns its project lock. Attach three dashboards from the same project, change state in one and observe it in all, then close all viewers: the engine continues. Paused ownership still excludes another engine. Dashboard attachment, global registration and navigation never acquire or release the project lock. Preserve recovery data, sessions and evidence during owned cleanup.
96
+ - **L01:** CLI, terminals, browser and API observe exactly running, pausing, pause, stopping as live states. Running can wait for tools/tasks/sync; blockers/phases are separate. Exited is observed absence, not fifth live state. Force stop is immediate; no hard-pause operation exists.
97
+ - **L02:** Pause prevents next claim, lets current work settle once and remains alive. Graceful stop uses the same drain then cleanup/exit, covering checks, pending commit and safe human-wait checkpoints. No implicit force or routine human reply is required merely to checkpoint shutdown. Pause without current work is immediate.
98
+ - **L03:** Resume cancels pending pause/stop without replay. Changing pausing to stopping or stopping to pausing preserves current work; cancelling shutdown for pause is confirmed. Noninteractive choices are explicit, repeated requests idempotent, stale confirmations cannot overwrite newer intent, and cancellation after irreversible shutdown reports too late.
99
+ - **L04:** From pause, resume work, stop orderly or restart into one replacement. Force stop while idle still performs quick orderly cleanup. All clients invoke the same operations, including cancellation/intent changes, and immediately see the same state.
100
+ - **L05:** `ptbk stop --force`/`-F` terminates only selected owned execution without false task completion or deleting tools. Owner cleanup is bounded/best-effort; external uncatchable kill has no cleanup guarantee/new lock-removal requirement. Viewer signals close only viewer. Never kill unrelated processes or remove a replacement owner's lock.
101
+ - **L06:** Restart drains visibly, releases old owner and launches one replacement with the same project/effective installation and placement, without overlap. Cancelling pending restart cancels replacement start. Lost replies/start failure/unconfirmed stop are truthful; no blind replay targets a successor. Completed deliberate stop suppresses persistence, while cancelled stop does not leave permanent stop intent.
102
+ - **L07:** Concurrent starts across global/local versions and equivalent paths produce one project owner. Several dashboards share state, but none acquires/releases the lock; closing all leaves engine active. Pause still excludes another owner. Preserve recovery/session/evidence during controlled cleanup.
103
103
 
104
104
  ## Global dashboard
105
105
 
106
- - **G01:** Run `ptbk dashboard --global` from an arbitrary directory outside Git with no running engines. It opens successfully, shows zero and keeps refreshing. Start a project later and observe its appearance without reopening. Ordinary per-project dashboard entry with no service still gives an actionable error/start instruction, never implicit startup.
107
- - **G02:** Start different projects via different binaries/global and local installations/versions. Host discovery includes all accessible registered engines, not only the invoked package's processes. The table shows actual project paths, versions, process identities/modes, four-state lifecycle and observed work/freshness. State changes and exits update continuously; the viewer never invents a global engine or adopts CWD as a project.
108
- - **G03:** Select a table row and attach to that engine's ordinary project dashboard without changing CWD, starting another service or acquiring its lock. Return to the overview and close any/all viewers without stopping engines. If a selected service disappears, changes owner or is unreachable/incompatible, show a truthful diagnostic rather than attach to an unrelated process.
109
- - **G04:** Verify zero entries versus failed/permission-limited discovery, stale registrations, reused PIDs, long paths, resize, continuous raw output, foreground owners, disabled HTTP and offline local use. Do not bypass OS permissions or reveal credentials. Dead discovery records are not permission to delete project locks. Stable selection must not jump to another live row when its previous target exits. See [global-dashboard acceptance](global-dashboard.md#acceptance-outcomes).
106
+ - **G01:** Global dashboard from outside Git with zero engines opens and keeps refreshing. A later start appears without reopening. Per-project no-service remains an actionable error, not implicit startup.
107
+ - **G02:** Global/local installations and versions all appear in accessible host discovery. Actual path/version/process/mode/lifecycle/work/freshness update across exits. No CWD-derived project or global worker is invented.
108
+ - **G03:** Select a row to attach without cd, worker creation or lock acquisition. Return/close without stopping. A vanished/replaced/unreachable/incompatible owner is diagnosed rather than accidentally controlling another process.
109
+ - **G04:** Verify empty versus failed/permission-limited discovery, stale records/reused PIDs, long paths, resizing/raw/foreground/no-HTTP/offline use. Do not bypass OS permissions/expose credentials/delete locks from stale registry entries. Stable selection never jumps to another live engine. See [global acceptance](global-dashboard.md#acceptance-outcomes).
110
110
 
111
111
  ## Unattended operation and audit trails
112
112
 
113
- - **O01:** On an awake supported host with available dependencies and a selected authenticated browser, configure an authorized recurring AI-news publishing agenda and simulate a month with no dashboard client or operator. Scheduled work and follow-ups continue without routine per-post approval; the user can inspect results and retained task-linked evidence on return. Respect explicit pauses, schedules and scope; do not invent activity when legitimately idle.
114
- - **O02:** Inject temporary network/provider failures, a restart and an unexpected harness input wait. Detect and classify the conditions, recover within budgets and resume the correct phase without duplicated publication or unlimited paid polling. An alive but avoidably stalled service fails this scenario. Required login, genuinely missing authority or irreconcilable ownership creates one clear exceptional request; safe independent work can continue when lifecycle state permits it.
115
- - **E01:** Each canonical task has a `traces/<task-file-basename>/` root audit directory matching the actual source filename literally without its final `.book` extension, not its normalized TASK name or a generated ID. Verify with deliberately different source filename and declared name, preserving date/case/other supported filename characters and custom task-source locations. Consolidated available harness text and events retain attempts, occurrences, declared names, source revisions, linked chats and Git evidence without invented private reasoning.
116
- - **E02:** Browser work in headless/headful can be followed from the named task through Git history to exposed harness text and playable attributed video. Record actual transitions/gaps, exclude secret/authentication entry and unrelated desktop activity; unsupported/failed capture is honestly disclosed.
117
- - **E03:** Exercise all combinations of trace commit, video ignore and recording settings. Whole-tree exclusion takes precedence; recording remains independent. Selected traces and finalized eligible video share the result commit with completion and accepted changes. Excluded artifacts remain local and are not force-added. `.ptbk/` remains ignored. Changing policy preserves historical/local evidence and unrelated ignore rules.
118
- - **E04:** Interrupt capture and result persistence, then recover. Evidence remains linked to the same task and distinct attempts. No self-referential commit-SHA bookkeeping loop appears; post-commit events are retained honestly. Retention/truncation is visible and preserves pending-work evidence; missing storage produces truthful diagnostics rather than fictional paths or a repeated external action.
119
- - **E05:** Rename a TASK declaration and its source basename independently: logical identity follows the former, trace destination the latter. Preserve/reconcile historical evidence and verified links without merging occupied destinations or rerunning work. Legacy `.md` sources use the literal filename without `.md`; multiple sections have separately attributed records inside that source directory. Conflicting basenames and ambiguous old name-derived traces produce diagnostics, not hashes, silent reassignment or lost evidence. See [trace acceptance](traces.md#acceptance-outcomes).
113
+ - **O01:** On an awake supported host with usable tools and an authorized recurring AI-news publishing agenda, simulate a month without dashboard/operator. Work and follow-ups continue without routine per-post approval; results and task-linked evidence remain inspectable. Respect pauses, schedules, target accounts and scope; do not invent activity during legitimate idle.
114
+ - **O02:** Inject network/provider failure, restart and hidden harness prompts. Recover/classify within bounded budgets without duplicate external effects or paid idle loops. Deterministic corrections precede ordinary Fixer judgment; genuine missing authority/login/unsafe ownership uses current agent consultation policy. Safe independent work continues when possible. An alive avoidably stalled service fails this scenario.
115
+ - **E01:** Each canonical task has `traces/<task-file-basename>/` copied literally from its source filename without final .book, not normalized TASK name or generated ID. Test different declaration/path, preserved date/case/characters and custom source locations. Available output/events retain attempts/occurrences/names/revisions/chats/Git without fabricated private reasoning.
116
+ - **E02:** Follow task/Git history to actual harness output and playable browser video in either display mode. Attribute each named tool/account/attempt and label gaps; exclude authentication data and unrelated desktop/project activity. Unsupported/failed capture is honest.
117
+ - **E03:** Exercise all trace-commit/video-ignore/recording combinations. Whole-tree exclusion wins, recording independent. Eligible finalized evidence shares the task result; excluded data remains local and is not force-added. `.ptbk/`, profiles and `.env` remain excluded. Preference changes preserve history/evidence and unrelated ignore rules.
118
+ - **E04:** Interrupt capture/result persistence and recover without mixed attempts, self-SHA commit loops or duplicated effects. Retention/truncation protects pending-work evidence; storage failure reports actual diagnostics, not fictional paths.
119
+ - **E05:** Rename declaration and filename independently: logical identity follows the former, new trace location the latter. Preserve verified old evidence without occupied-destination merging/re-execution. Legacy .md sections have distinct attributed records under the literal filename. Basename conflicts/ambiguous old traces are diagnosed, not resolved by opaque hashes or lost evidence. See [trace acceptance](traces.md#acceptance-outcomes).
120
+
121
+ ## Configuration migration, tools and synchronization
122
+
123
+ - **M01:** Compare numeric major/minor/patch and prereleases, including 9 versus 10 and prerelease versus stable, without lexicographic mistakes. Equal versions create no version commit; an older engine offers update without project downgrade. Missing `promptbookVersion` always implies the fixed documented legacy baseline, with no age/shape analysis or immediate Fixer invocation merely for absence.
124
+ - **M02:** Apply exactly the ordered migration targets between saved/running versions, allowing gaps and zero steps. Coordinator alone stamps the final engine version. One isolated commit records the entire pass, even a version-only change, with no tasks/unrelated staged content. Repeated loading is a no-op. Failure/crash/signing rejection preserves original/prepared recoverable state without partial success, duplicate tools/commits or replayed work.
125
+ - **M03:** First conversion preserves all existing harness options/enabled states and browser profile/executable/sessions while producing canonical named tools and symbolic secret references. Preserve unrelated config and real checks. Migrate known boolean/enum spellings without losing false. Autosync defaults off even with an origin; migration itself does not install tools, log in, publish or run tasks. Existing conflicting new/legacy fields go to repair, not silent overwrite.
126
+ - **M04:** Canonical JSON keys/boolean prefixes, user kebab identifiers and uppercase fixed enums round-trip. Unambiguous mistakes correct once with a scoped commit and preserved references. Unknown variants or post-normalization collisions use ordinary Fixer and do not silently redirect accounts. Read-only inspection never saves corrections. Free-form Book names, provider IDs, environment names and paths are not renamed as configuration identifiers.
127
+ - **P01:** Configure multiple browser profiles for separate sites/accounts and dedicated plus explicitly allowed personal use. Appropriate authorized fallback works without pretending two records sharing one profile are different identities or publishing/paying from the wrong account.
128
+ - **P02:** Choose different harness variants for suitability while both are healthy. Within one variant, use the first eligible usable instance and fall back in list order only when needed. Exercise two isolated native contexts, subscription-to-explicit-API and ordered company/second-company/personal API accounts. No ambient key authorization, global-login overwrite, cross-instance leakage or replayed effects occurs; earlier recovered instances regain future priority.
129
+ - **P03:** Resolve only `${{ env.NAME }}` from declared process environment/.env precedence, without arbitrary expression execution. Missing keys make the instance unavailable. New/rotated/retired `.env` lines retain history and timestamp/reason comments; secret values never enter Git, diagnostics, shell arguments or API output. A shared, disabled-tool, script or uncertain consumer keeps the variable active. Disable never retires credentials.
130
+ - **P04:** Init, CLI and dashboard use the same management types/operations, with equivalent validation, canonicalization, environment edits and commits. Normal init stays simple; advanced accounts/browsers are managed later. Enable/disable are primary and delete secondary. Real add/modify/reorder/enable/disable/remove commits immediately; read/no-op/cancel does not. Failed persistence is not success.
131
+ - **P05:** In-use CLI modify/disable/remove refuses with no writes unless acknowledged by `--force`/`-F`. Print the repeated command and the distinct `ptbk stop --force` alternative. Force on the tool saves but preserves active acquired use; force on stop terminates the whole engine and removes no configuration. Then original modification can be retried. No `--force-stop` tool flag exists. Dashboard offers precisely equivalent choices.
132
+ - **P06:** Disabling/removing the last enabled browser or harness requires its specific warning/confirmation, independently of in-use acknowledgement. Noninteractive `--yes` does not imply force. Confirmed action leaves engine running/controllable but waiting for resources. Add/enable restores eligibility automatically; intentional pause and disable are not undone by Fixer.
133
+ - **P07:** Refresh config/.env and readiness before every task, during work and while idle. A second-terminal add/enable promptly becomes available even to the current task. Commit that tool operation while task edits remain uncommitted, then commit the task result later without absorbing/reverting/duplicating the tool change. Test same-file races, manual edits and secret rotation with truthful retained-current-use state and safe reconciliation.
134
+ - **Y01:** New init asks autosync, default off; no asks no provider questions. Yes supports real private-default GitHub publication with explicit public choice, or custom origin. New repo uses main; existing branch/remote remain unless explicitly changed. Git metadata, not duplicated JSON, holds destination. Failed publication/auth/network remains separate from successful local setup/start; retry does not create duplicate repositories or leak ignored data.
135
+ - **Y02:** Enabled sync attempts pull every 60 seconds and additionally before new logical mutating work/task and before its commit, then pushes committed work. Coalesce concurrent timer/boundary/manual requests without recursive merge-commit pulls. A remote task becomes eligible after integration. Failed remote attempts back off while safe local tasks/commits continue, with pending publication eventually retried even without new work.
136
+ - **Y03:** Preserve dirty/staged/active work during pull: fetch may succeed while integration is deferred, and status distinguishes them. Integrate with visible non-fast-forward merge commits even when fast-forward was possible, but none for already-up-to-date input. No rebase/amend/squash/reset/force-push rewrites history. Conflicts use ordinary Fixer and current consultation policy without leaving the sole tree unnecessarily half-merged; duplicate task results from two clones retain provenance without claiming distributed exactly-once effects.
137
+ - **Y04:** Sync panel exists only while enabled. Compact status drills into redacted destination, real phases/attempts/successes/pending/errors and next retry, using existing cockpit navigation. Synchronize now requests the shared safe coordinator and reports queued/deferred/failure truthfully. Disabled mode performs no automatic remote operations and has no dedicated panel; generic settings may still show false. Client refresh does not create a scheduler, commit or extra sync request.
@@ -2,32 +2,44 @@
2
2
 
3
3
  [Main specification](../_main.md) · [Shared controls](controls.md) · [Remote access](remote-access.md)
4
4
 
5
- The active project engine exposes an independently usable HTTP API for inspecting and controlling its runtime. It works without a browser app or terminal dashboard; zero, one or many clients can use it. The engine owns all scheduling, lifecycle and recovery logic. Neither a client nor server-side page rendering starts a separate queue or owns the service.
5
+ The active engine exposes an independently usable authenticated HTTP API for project inspection/control. It requires neither browser app nor terminal dashboard. Zero, one or many clients use the same scheduling, lifecycle, management and recovery operations; neither clients nor page rendering create another worker.
6
6
 
7
- Start enables local HTTP in either process mode, binding to loopback on a free port or explicit `--port`; report actual address/conflicts. Protected remote tunnelling is enabled by default under [remote policy](remote-access.md), without changing local binding. No-tunnel leaves local HTTP; no-server disables HTTP, browser app and tunnel, but not local engine control/discovery. For finite run, enabled server/tunnel belong to that invocation and do not keep it alive after completion.
7
+ Start enables loopback HTTP in either process mode on a free or explicitly selected port and reports actual address/conflicts. Protected remote tunnelling follows its separate default policy. No-tunnel keeps local HTTP; no-server disables HTTP/SPA/tunnel but not local engine control/discovery. Finite run owns any enabled HTTP/tunnel only for its finite lifetime.
8
8
 
9
- ## State and controls
9
+ ## Observed state and shared operations
10
10
 
11
- Expose authenticated structured project identity, actual engine version, instance/freshness information, the four live [service states](service-lifecycle.md), pending intent, current agent/task, phase, queue/details, results/statistics, waits, blockers, errors, links, effective settings and commit mode. An exited/unreachable engine is not an invented live `stopped` state. Clients cannot infer successful shutdown from a broken connection alone.
11
+ Expose project identity, actual engine version, instance/freshness, four live [service states](service-lifecycle.md), pending intent, task/agent/phase, queue/details, results, waits/errors, links, configuration revision/effective sources and commit mode. Resource waits and failed synchronization are not new lifecycle states. An unreachable engine is not proof of a completed stop.
12
12
 
13
- Supply actual effective harness, model and thinking level per relevant execution/consultation context, with unknown/default/not-applicable distinctions. Supply authorized browser inspection data: effective profile source/resolved path, mode, ownership/health, redacted failure and recovery status. This supports [collapsed diagnostic panels](dashboard-details.md) without forcing verbose default UI. Include verified local/remote address/provider/health; clients never guess ports. Ordinary state excludes pairing secrets, device/API credentials and browser-profile contents.
13
+ Execution data includes actual named tool, harness variant, model/thinking level and attempt/consultation attribution, with unknown/unsupported distinctions. Tool inventory includes canonical saved records, enabled/usability/in-use state and retained old uses distinct from new defaults. Authorized browser diagnostics identify each named instance's profile source/resolved path, mode, ownership/health and redacted recovery outcome. Ordinary state never exposes cookies, profile contents, resolved API keys or pairing/device credentials.
14
14
 
15
- Expose pause, resume/cancel pending pause/stop, changing drain intent, graceful stop, explicit force stop and restart through the same engine operations as CLI/dashboard. Apply the state-machine confirmation and stale-request rules, including stop-to-pause replacement. A request accepted as `stopping` is not a completed shutdown. Never independently implement task scheduling or force termination in each client.
15
+ Expose lifecycle controls, real pacing wait skipping, per-browser diagnosis/recheck/retry/restart, chat operations and supported settings changes. Apply shared stale-request/confirmation rules, including replacing pending stop with pause. Distinguish accepted, pending safe boundary, applied, committed, failed, unconfirmed and restart-required outcomes. No save is complete before its required commit.
16
16
 
17
- Also expose real pacing/backoff wait skipping, browser diagnostic recheck/startup retry/restart, chat operations and allowed settings changes. Browser repair shares automatic recovery's ownership/session-safety contract. Report active, pending-safe-boundary, restart-required, completed, failed and unconfirmed outcomes accurately. Saving versioned defaults uses [operation persistence](git-persistence.md); runtime-only mutations create no commits. No save/action is complete before application and any required commit.
17
+ ## Shared saved tool management
18
+
19
+ Expose the same list/show/add/modify/reorder/enable/disable/remove operations as [tool CLI/dashboard management](tool-management.md), using the [single typed domain contract](../coding-standards/shared-logic.md), not API-specific validators or Git writes. Saved tool changes commit their authorized versioned configuration immediately and notify live consumers; a running task may use a newly added resource. Preserve other clients' edits, task ownership and operation isolation.
20
+
21
+ In-use and last-enabled-type protections return explicit decision requirements and revalidate them when applying an acknowledgement. An acknowledgement to retain active work is not a kill request. The emergency route invokes the existing whole-engine force-stop operation; removing a tool remains a separate operation after confirmed stop. Do not add a tool-specific force-stop mechanism.
22
+
23
+ Credential references are readable, actual credentials are not. Where adding a secret is authorized, use a protected write-only input that calls the shared [environment editor](environment.md), with timestamped non-destructive audit and no echoed value in response/error/logs. Do not treat general configuration field writes as permission to read arbitrary environment variables or edit files outside project authority.
24
+
25
+ ## Synchronization
26
+
27
+ Expose effective autosync enablement and, when enabled, redacted origin/tracking destination, real attempt/integration/publication status, pending/deferred work, errors and next retry. Provide one-cycle manual synchronization through the shared [coordinator](git-synchronization.md). Coalesce overlapping requests, preserve active work and report actual outcomes rather than pretending an accepted request has completed. A disabled policy does not silently become enabled by a stale manual-cycle request. Clients omit the dedicated panel while off.
28
+
29
+ Network/rejected-push failures do not stop safe local execution or create duplicate result commits. The API observes this policy; it does not implement its own pull loop or merge strategy.
18
30
 
19
31
  ## Chat and creation
20
32
 
21
- Chats expose their full name, participants, actual authors, status, timestamps, history and task/conversation links. Provide authenticated list/new/open/append/answer actions using durable Book sources and normalized names, not chat IDs. A new human-chat request without a target selects [Chatter](../agents/chatter.md); explicit targets and existing-thread participants remain unchanged. Invalid/missing Chatter is diagnosed rather than silently replaced. A human answer is a committed message, not runtime-only request resolution.
33
+ Chats expose full names, participants/authors, status/timestamps, history and task/conversation links. Authenticated list/new/open/append/answer use durable Books and normalized names, not new chat IDs. A new human-chat request with no target selects [Chatter](../agents/chatter.md); existing-thread participants and explicit targets remain unchanged. Missing/invalid Chatter is diagnosed, not silently replaced. Human answers are committed messages.
22
34
 
23
- Use idempotent mutation/revision checks to prevent duplicate accepted messages or actions from stale/reconnecting clients. Expose canonical agent identity/observed activity for [visual presentation](../agents/visual-identity.md), without inventing execution. Distinguish user-waiting threads from automatic work and internal specialist consultations.
35
+ Use revision/idempotency checks against stale/reconnecting duplicate writes. Expose canonical agent identity/observed activity for [visual presentation](../agents/visual-identity.md). Distinguish actionable human waits from ordinary internal specialist consultations; Fixer uses these normal agent mechanisms, not a special transport.
24
36
 
25
- New task/chat creation follows [generated-name policy](generated-names.md): typed opening commitment, readable creation date/time and normalized collision prevention. Return the final full name and actual reference/path; clients do not append timestamps or address preliminary titles. A retried creation reconciles its original prepared entity rather than creating another. Existing names remain unchanged on reads/appends/recovery, including valid undated Books. Task trace paths are returned from the [source-filename mapping](traces.md), not reconstructed from entity-name normalization by clients.
37
+ Task/chat creation follows [generated names](generated-names.md): opening kind/name, readable creation date/time and normalized collision prevention. Return the final name and actual reference/path rather than asking clients to append timestamps. Retry reconciles the prepared entity instead of creating another. Existing undated names remain unchanged by append/read/recovery. Task trace paths come from [source-filename mapping](traces.md), not client guesses from names.
26
38
 
27
- ## Client independence and security
39
+ ## Independence and security
28
40
 
29
- Clients obtain fresh engine state and observe mutations from every other channel. Inspection is read-only. All writes obey ownership, source revision, task, configuration and recovery contracts. Serve SPA/assets and API through the same local/public origin, using compatible live updates; SSE alone is insufficient for a provider that does not support it. Runtime API responses require neither HTML forms nor server-rendered fragments.
41
+ Clients observe fresh changes from every channel. Inspection is read-only, including normalization/migration previews. Writes obey authority, source revisions, configuration/ownership and recovery contracts. Serve SPA/assets and API at the same origin with compatible live updates; SSE alone is insufficient where a tunnel provider does not support it. Responses do not depend on server-rendered runtime HTML or form actions.
30
42
 
31
- Protect inspection as well as mutations before tunnelling. Unauthenticated clients receive only minimal pairing/app-shell information, not project content or control. Use project-scoped session/direct-client authorization under remote access. Reject unauthorized cross-origin requests, stale edits, invalid input and access outside the project. Hostname opacity, forwarded headers or apparent localhost origin are not authorization. Prevent shared caching of authenticated data/credentials. Never expose tokens, cookies, profile contents or unredacted diagnostics; a profile path is not permission to read its contents.
43
+ Authenticate inspection and mutation before tunnelling. Unauthenticated clients get only a minimal pairing/app shell. Use project-scoped session/direct-client authority, reject invalid/stale/cross-origin requests and access outside scope, and prevent public caching of private responses. Hostname opacity, forwarded headers and apparent localhost origin are not authorization. Never expose unredacted diagnostics, tokens or profile contents.
32
44
 
33
- Client/tunnel failures do not stop a daemon, duplicate tasks or reset state. The lightweight [browser dashboard](dashboard.md) remains a consumer at `/`. Host-wide [discovery](global-dashboard.md) is a separate local inventory contract, not a project API that silently gains authority over every engine.
45
+ Client/tunnel failure cannot stop a daemon, reset state or duplicate tasks. The lightweight [SPA](dashboard.md) is a consumer at `/`; host-wide [global discovery](global-dashboard.md) is a separate local inventory, not silently extended project API authority.