ptbk 0.119.0-16 → 0.119.0-21

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 (330) hide show
  1. package/README.md +27 -9
  2. package/dist/book/commitments.d.ts +38 -10
  3. package/dist/book/commitments.js +61 -17
  4. package/dist/book/commitments.js.map +1 -1
  5. package/dist/book/convert.d.ts +36 -0
  6. package/dist/book/convert.js +156 -0
  7. package/dist/book/convert.js.map +1 -0
  8. package/dist/book/parse.d.ts +50 -13
  9. package/dist/book/parse.js +132 -45
  10. package/dist/book/parse.js.map +1 -1
  11. package/dist/book/references.d.ts +12 -4
  12. package/dist/book/references.js +34 -9
  13. package/dist/book/references.js.map +1 -1
  14. package/dist/book/write.d.ts +42 -0
  15. package/dist/book/write.js +74 -0
  16. package/dist/book/write.js.map +1 -0
  17. package/dist/browser/browser.d.ts +122 -12
  18. package/dist/browser/browser.js +372 -21
  19. package/dist/browser/browser.js.map +1 -1
  20. package/dist/browser/recording.d.ts +3 -3
  21. package/dist/browser/recording.js +5 -5
  22. package/dist/browser/recording.js.map +1 -1
  23. package/dist/chats/chat-book.d.ts +105 -0
  24. package/dist/chats/chat-book.js +180 -0
  25. package/dist/chats/chat-book.js.map +1 -0
  26. package/dist/chats/conversation.d.ts +54 -0
  27. package/dist/chats/conversation.js +188 -0
  28. package/dist/chats/conversation.js.map +1 -0
  29. package/dist/chats/local.d.ts +46 -0
  30. package/dist/chats/local.js +184 -0
  31. package/dist/chats/local.js.map +1 -0
  32. package/dist/chats/migration.d.ts +12 -0
  33. package/dist/chats/migration.js +62 -0
  34. package/dist/chats/migration.js.map +1 -0
  35. package/dist/chats/service.d.ts +81 -0
  36. package/dist/chats/service.js +122 -0
  37. package/dist/chats/service.js.map +1 -0
  38. package/dist/chats/store.d.ts +132 -0
  39. package/dist/chats/store.js +181 -0
  40. package/dist/chats/store.js.map +1 -0
  41. package/dist/chats/task-chats.d.ts +52 -0
  42. package/dist/chats/task-chats.js +96 -0
  43. package/dist/chats/task-chats.js.map +1 -0
  44. package/dist/cli/chats.d.ts +45 -0
  45. package/dist/cli/chats.js +108 -0
  46. package/dist/cli/chats.js.map +1 -0
  47. package/dist/cli/commands/add.js +32 -22
  48. package/dist/cli/commands/add.js.map +1 -1
  49. package/dist/cli/commands/answer.d.ts +2 -1
  50. package/dist/cli/commands/answer.js +35 -41
  51. package/dist/cli/commands/answer.js.map +1 -1
  52. package/dist/cli/commands/ask.d.ts +7 -0
  53. package/dist/cli/commands/ask.js +37 -0
  54. package/dist/cli/commands/ask.js.map +1 -0
  55. package/dist/cli/commands/boilerplates.js +14 -3
  56. package/dist/cli/commands/boilerplates.js.map +1 -1
  57. package/dist/cli/commands/chat.d.ts +9 -0
  58. package/dist/cli/commands/chat.js +89 -0
  59. package/dist/cli/commands/chat.js.map +1 -0
  60. package/dist/cli/commands/dashboard.d.ts +3 -1
  61. package/dist/cli/commands/dashboard.js +41 -3
  62. package/dist/cli/commands/dashboard.js.map +1 -1
  63. package/dist/cli/commands/find.js +6 -8
  64. package/dist/cli/commands/find.js.map +1 -1
  65. package/dist/cli/commands/fix.js +4 -6
  66. package/dist/cli/commands/fix.js.map +1 -1
  67. package/dist/cli/commands/init.d.ts +0 -1
  68. package/dist/cli/commands/init.js +38 -38
  69. package/dist/cli/commands/init.js.map +1 -1
  70. package/dist/cli/commands/lint.js +16 -2
  71. package/dist/cli/commands/lint.js.map +1 -1
  72. package/dist/cli/commands/list.js +21 -13
  73. package/dist/cli/commands/list.js.map +1 -1
  74. package/dist/cli/commands/migrate.d.ts +2 -1
  75. package/dist/cli/commands/migrate.js +70 -24
  76. package/dist/cli/commands/migrate.js.map +1 -1
  77. package/dist/cli/commands/pause.d.ts +8 -0
  78. package/dist/cli/commands/pause.js +40 -0
  79. package/dist/cli/commands/pause.js.map +1 -0
  80. package/dist/cli/commands/plan.js +6 -9
  81. package/dist/cli/commands/plan.js.map +1 -1
  82. package/dist/cli/commands/recover.js +7 -3
  83. package/dist/cli/commands/recover.js.map +1 -1
  84. package/dist/cli/commands/restart.d.ts +3 -1
  85. package/dist/cli/commands/restart.js +74 -18
  86. package/dist/cli/commands/restart.js.map +1 -1
  87. package/dist/cli/commands/resume.d.ts +8 -0
  88. package/dist/cli/commands/resume.js +15 -0
  89. package/dist/cli/commands/resume.js.map +1 -0
  90. package/dist/cli/commands/run.js +6 -9
  91. package/dist/cli/commands/run.js.map +1 -1
  92. package/dist/cli/commands/start.js +40 -36
  93. package/dist/cli/commands/start.js.map +1 -1
  94. package/dist/cli/commands/status.d.ts +2 -1
  95. package/dist/cli/commands/status.js +5 -1
  96. package/dist/cli/commands/status.js.map +1 -1
  97. package/dist/cli/commands/stop.d.ts +3 -1
  98. package/dist/cli/commands/stop.js +18 -8
  99. package/dist/cli/commands/stop.js.map +1 -1
  100. package/dist/cli/commands/verify.js +7 -7
  101. package/dist/cli/commands/verify.js.map +1 -1
  102. package/dist/cli/common.d.ts +13 -0
  103. package/dist/cli/common.js +22 -0
  104. package/dist/cli/common.js.map +1 -1
  105. package/dist/cli/engine-delegation.d.ts +14 -0
  106. package/dist/cli/engine-delegation.js +46 -0
  107. package/dist/cli/engine-delegation.js.map +1 -0
  108. package/dist/cli/lifecycle.d.ts +40 -0
  109. package/dist/cli/lifecycle.js +71 -0
  110. package/dist/cli/lifecycle.js.map +1 -0
  111. package/dist/cli/registry.js +113 -31
  112. package/dist/cli/registry.js.map +1 -1
  113. package/dist/cli/service-view.d.ts +14 -2
  114. package/dist/cli/service-view.js +46 -5
  115. package/dist/cli/service-view.js.map +1 -1
  116. package/dist/cli/sources.js +5 -8
  117. package/dist/cli/sources.js.map +1 -1
  118. package/dist/cli/spec.js +1 -1
  119. package/dist/cli/spec.js.map +1 -1
  120. package/dist/common/app-data.d.ts +9 -0
  121. package/dist/common/app-data.js +20 -0
  122. package/dist/common/app-data.js.map +1 -0
  123. package/dist/common/errors.d.ts +2 -0
  124. package/dist/common/errors.js.map +1 -1
  125. package/dist/common/time.d.ts +6 -0
  126. package/dist/common/time.js +9 -0
  127. package/dist/common/time.js.map +1 -1
  128. package/dist/engine/agenda.d.ts +213 -43
  129. package/dist/engine/agenda.js +846 -260
  130. package/dist/engine/agenda.js.map +1 -1
  131. package/dist/engine/executor.d.ts +23 -7
  132. package/dist/engine/executor.js +131 -84
  133. package/dist/engine/executor.js.map +1 -1
  134. package/dist/engine/generated.d.ts +21 -1
  135. package/dist/engine/generated.js +36 -21
  136. package/dist/engine/generated.js.map +1 -1
  137. package/dist/engine/preview.js +10 -10
  138. package/dist/engine/preview.js.map +1 -1
  139. package/dist/engine/prompt.d.ts +16 -4
  140. package/dist/engine/prompt.js +22 -4
  141. package/dist/engine/prompt.js.map +1 -1
  142. package/dist/engine/routing.js +28 -4
  143. package/dist/engine/routing.js.map +1 -1
  144. package/dist/engine/snapshot.d.ts +178 -29
  145. package/dist/engine/state.d.ts +40 -13
  146. package/dist/engine/state.js +20 -5
  147. package/dist/engine/state.js.map +1 -1
  148. package/dist/engine/task-trace.d.ts +35 -7
  149. package/dist/engine/task-trace.js +74 -15
  150. package/dist/engine/task-trace.js.map +1 -1
  151. package/dist/engine/team.d.ts +20 -7
  152. package/dist/engine/team.js +30 -24
  153. package/dist/engine/team.js.map +1 -1
  154. package/dist/engine/traces.d.ts +1 -1
  155. package/dist/engine/traces.js +1 -1
  156. package/dist/expert/_main.md +67 -52
  157. package/dist/expert/agents/_index.md +11 -13
  158. package/dist/expert/agents/chatter.md +31 -0
  159. package/dist/expert/agents/consistency.md +6 -11
  160. package/dist/expert/agents/core-agents.md +9 -7
  161. package/dist/expert/agents/expert.md +2 -2
  162. package/dist/expert/agents/fixer.md +24 -0
  163. package/dist/expert/agents/learning.md +1 -1
  164. package/dist/expert/agents/non-agents.md +6 -4
  165. package/dist/expert/agents/teacher.md +1 -1
  166. package/dist/expert/agents/visual-identity.md +4 -4
  167. package/dist/expert/book-language/_index.md +9 -8
  168. package/dist/expert/book-language/commitments/_index.md +23 -3
  169. package/dist/expert/book-language/commitments/agent.md +11 -0
  170. package/dist/expert/book-language/commitments/chat-member.md +7 -0
  171. package/dist/expert/book-language/commitments/chat-message.md +11 -0
  172. package/dist/expert/book-language/commitments/chat-status.md +7 -0
  173. package/dist/expert/book-language/commitments/chat.md +11 -0
  174. package/dist/expert/book-language/commitments/entity.md +9 -0
  175. package/dist/expert/book-language/commitments/from.md +1 -1
  176. package/dist/expert/book-language/commitments/goal.md +6 -2
  177. package/dist/expert/book-language/commitments/link.md +9 -0
  178. package/dist/expert/book-language/commitments/task-depends-on.md +1 -1
  179. package/dist/expert/book-language/commitments/task-parent.md +1 -1
  180. package/dist/expert/book-language/commitments/task.md +7 -3
  181. package/dist/expert/book-language/commitments/team.md +1 -1
  182. package/dist/expert/book-language/inheritance.md +2 -2
  183. package/dist/expert/book-language/references.md +20 -24
  184. package/dist/expert/book-language/syntax.md +54 -11
  185. package/dist/expert/cli/acceptance.md +59 -24
  186. package/dist/expert/cli/api.md +23 -9
  187. package/dist/expert/cli/authoring.md +6 -4
  188. package/dist/expert/cli/autonomous-operation.md +3 -3
  189. package/dist/expert/cli/browser.md +29 -18
  190. package/dist/expert/cli/channels.md +5 -7
  191. package/dist/expert/cli/chat-ui.md +32 -0
  192. package/dist/expert/cli/chats.md +59 -0
  193. package/dist/expert/cli/cli.md +44 -26
  194. package/dist/expert/cli/configuration.md +3 -3
  195. package/dist/expert/cli/controls.md +13 -7
  196. package/dist/expert/cli/dashboard-details.md +23 -0
  197. package/dist/expert/cli/dashboard-layout.md +19 -12
  198. package/dist/expert/cli/dashboard.md +12 -8
  199. package/dist/expert/cli/execution.md +8 -6
  200. package/dist/expert/cli/first-task.md +4 -4
  201. package/dist/expert/cli/generated-names.md +44 -0
  202. package/dist/expert/cli/git-persistence.md +19 -17
  203. package/dist/expert/cli/global-dashboard.md +33 -0
  204. package/dist/expert/cli/goal-discovery.md +1 -1
  205. package/dist/expert/cli/help.md +1 -1
  206. package/dist/expert/cli/initialization-ui.md +2 -0
  207. package/dist/expert/cli/initialization.md +9 -7
  208. package/dist/expert/cli/interactive-ui.md +9 -5
  209. package/dist/expert/cli/locking.md +21 -0
  210. package/dist/expert/cli/migration.md +22 -6
  211. package/dist/expert/cli/process-modes.md +21 -13
  212. package/dist/expert/cli/recovery.md +8 -6
  213. package/dist/expert/cli/recurrence.md +1 -1
  214. package/dist/expert/cli/rich-input.md +2 -2
  215. package/dist/expert/cli/service-lifecycle.md +57 -0
  216. package/dist/expert/cli/start.md +2 -2
  217. package/dist/expert/cli/status-view.md +16 -12
  218. package/dist/expert/cli/task-books.md +11 -15
  219. package/dist/expert/cli/task-identity.md +8 -10
  220. package/dist/expert/cli/task-markdown.md +6 -10
  221. package/dist/expert/cli/task-origins.md +3 -1
  222. package/dist/expert/cli/task-relationships.md +5 -9
  223. package/dist/expert/cli/team.md +17 -7
  224. package/dist/expert/cli/terminal.md +20 -12
  225. package/dist/expert/cli/trace-configuration.md +1 -1
  226. package/dist/expert/cli/traces.md +19 -23
  227. package/dist/expert/cli/user-interactions.md +14 -26
  228. package/dist/expert/cli/workspace.md +15 -9
  229. package/dist/expert/concepts/engine-and-project.md +11 -0
  230. package/dist/expert/concepts/project-model.md +39 -0
  231. package/dist/expert/dictionary.md +21 -15
  232. package/dist/harness/plugins/claude-code/index.js +1 -0
  233. package/dist/harness/plugins/claude-code/index.js.map +1 -1
  234. package/dist/harness/plugins/cline/index.js +1 -0
  235. package/dist/harness/plugins/cline/index.js.map +1 -1
  236. package/dist/harness/plugins/openai-codex/index.js +1 -0
  237. package/dist/harness/plugins/openai-codex/index.js.map +1 -1
  238. package/dist/harness/plugins/opencode/index.js +1 -0
  239. package/dist/harness/plugins/opencode/index.js.map +1 -1
  240. package/dist/harness/types.d.ts +3 -1
  241. package/dist/project/agents.d.ts +29 -81
  242. package/dist/project/agents.js +48 -267
  243. package/dist/project/agents.js.map +1 -1
  244. package/dist/project/books.d.ts +150 -0
  245. package/dist/project/books.js +253 -0
  246. package/dist/project/books.js.map +1 -0
  247. package/dist/project/config.js +2 -2
  248. package/dist/project/config.js.map +1 -1
  249. package/dist/project/defaults.d.ts +35 -6
  250. package/dist/project/defaults.js +73 -40
  251. package/dist/project/defaults.js.map +1 -1
  252. package/dist/project/expert.js +18 -10
  253. package/dist/project/expert.js.map +1 -1
  254. package/dist/project/git.d.ts +4 -3
  255. package/dist/project/git.js +16 -5
  256. package/dist/project/git.js.map +1 -1
  257. package/dist/project/setup.d.ts +4 -1
  258. package/dist/project/setup.js +26 -6
  259. package/dist/project/setup.js.map +1 -1
  260. package/dist/service/actions.d.ts +34 -10
  261. package/dist/service/actions.js +51 -19
  262. package/dist/service/actions.js.map +1 -1
  263. package/dist/service/control.d.ts +53 -1
  264. package/dist/service/control.js +64 -4
  265. package/dist/service/control.js.map +1 -1
  266. package/dist/service/discovery.d.ts +133 -0
  267. package/dist/service/discovery.js +138 -0
  268. package/dist/service/discovery.js.map +1 -0
  269. package/dist/service/host.d.ts +8 -1
  270. package/dist/service/host.js +65 -18
  271. package/dist/service/host.js.map +1 -1
  272. package/dist/service/http.d.ts +3 -0
  273. package/dist/service/http.js +26 -6
  274. package/dist/service/http.js.map +1 -1
  275. package/dist/service/launcher.d.ts +66 -13
  276. package/dist/service/launcher.js +78 -18
  277. package/dist/service/launcher.js.map +1 -1
  278. package/dist/service/records.d.ts +12 -2
  279. package/dist/service/records.js +19 -5
  280. package/dist/service/records.js.map +1 -1
  281. package/dist/service/spa/app.css +83 -2
  282. package/dist/service/spa/app.js +393 -72
  283. package/dist/service/supervisor.js +7 -1
  284. package/dist/service/supervisor.js.map +1 -1
  285. package/dist/service/worker.js +14 -5
  286. package/dist/service/worker.js.map +1 -1
  287. package/dist/tasks/authoring.d.ts +3 -5
  288. package/dist/tasks/authoring.js +6 -7
  289. package/dist/tasks/authoring.js.map +1 -1
  290. package/dist/tasks/book-task.d.ts +18 -10
  291. package/dist/tasks/book-task.js +27 -23
  292. package/dist/tasks/book-task.js.map +1 -1
  293. package/dist/tasks/eligibility.d.ts +15 -7
  294. package/dist/tasks/eligibility.js +41 -14
  295. package/dist/tasks/eligibility.js.map +1 -1
  296. package/dist/tasks/identity.d.ts +41 -15
  297. package/dist/tasks/identity.js +100 -31
  298. package/dist/tasks/identity.js.map +1 -1
  299. package/dist/tasks/markdown.d.ts +7 -14
  300. package/dist/tasks/markdown.js +15 -29
  301. package/dist/tasks/markdown.js.map +1 -1
  302. package/dist/tasks/model.d.ts +20 -4
  303. package/dist/tasks/model.js +17 -0
  304. package/dist/tasks/model.js.map +1 -1
  305. package/dist/tasks/sources.d.ts +7 -2
  306. package/dist/tasks/sources.js +46 -35
  307. package/dist/tasks/sources.js.map +1 -1
  308. package/dist/ui/chat-client.d.ts +70 -0
  309. package/dist/ui/chat-client.js +209 -0
  310. package/dist/ui/chat-client.js.map +1 -0
  311. package/dist/ui/dashboard.d.ts +8 -5
  312. package/dist/ui/dashboard.js +227 -86
  313. package/dist/ui/dashboard.js.map +1 -1
  314. package/dist/ui/details.d.ts +64 -0
  315. package/dist/ui/details.js +175 -0
  316. package/dist/ui/details.js.map +1 -0
  317. package/dist/ui/global-dashboard.d.ts +59 -0
  318. package/dist/ui/global-dashboard.js +307 -0
  319. package/dist/ui/global-dashboard.js.map +1 -0
  320. package/dist/ui/status-view.d.ts +7 -0
  321. package/dist/ui/status-view.js +94 -36
  322. package/dist/ui/status-view.js.map +1 -1
  323. package/package.json +1 -1
  324. package/dist/engine/requests.d.ts +0 -111
  325. package/dist/engine/requests.js +0 -173
  326. package/dist/engine/requests.js.map +0 -1
  327. package/dist/expert/book-language/commitments/task-id.md +0 -9
  328. package/dist/tasks/prepare.d.ts +0 -33
  329. package/dist/tasks/prepare.js +0 -90
  330. package/dist/tasks/prepare.js.map +0 -1
@@ -1,91 +1,106 @@
1
1
  # Promptbook (`ptbk`)
2
2
 
3
- Promptbook is one npm package, `ptbk`, providing the `ptbk` command-line utility. It operates agents over a selected project directory in Git. Agents, tasks and project material are readable files; versioned `ptbk.json` holds project configuration, Git-ignored `.ptbk/` holds local runtime state, and root-level `traces/<task-id>/` holds task audit evidence, without a database.
3
+ Promptbook is one npm package, `ptbk`, providing the `ptbk` command-line utility. It operates a Git-backed project of three Book entities: **agents**, **tasks** and **chats**. Every canonical Book starts with `AGENT <name>`, `TASK <name>` or `CHAT <name>`; all share commitment syntax. The normalized opening name content is logical identity, with no separate generated IDs or filename-based logical keys. New system-created task/chat names include readable creation date/time to prevent collisions, without mandatory timestamp grammar. `chats/` holds conversations, versioned `ptbk.json` holds defaults, ignored `.ptbk/` holds runtime state and `traces/<task-file-basename>/` holds evidence under the literal task filename without `.book` or legacy `.md`.
4
4
 
5
- Initialization is finite, attended technical setup. Its first new-project input is the user's intent, preserved verbatim with linked assets in `specs/_initial.md`. Init creates an ordinary Expert task referring to that specification, prepares selected harnesses and real checks, commits setup by default, and automatically starts the agenda as a background service. Project-specific content is created by the normal first task, not by a separate implementation phase inside init. The wizard returns without waiting for task completion or opening a dashboard; `ptbk dashboard` is its primary next-action hint.
5
+ Initialization is finite attended technical setup. Its first new-project input is user intent, preserved verbatim with linked assets in `specs/_initial.md`. Init creates an ordinary Expert bootstrap referring to it, prepares selected harnesses/checks and missing core roles, commits setup by default and automatically starts the background agenda. Project content comes from that ordinary task, not an implementation phase inside init. The wizard returns without waiting for task completion or opening a dashboard; `ptbk dashboard` is its primary next-action hint.
6
6
 
7
- Once started, the agenda is intended to run unattended for extended periods, progressing useful authorized work rather than remaining alive but silently waiting for routine approvals. It fills missing routing through Manager, executes one task at a time, creates and processes follow-ups, and discovers useful goal-driven work when the backlog is empty. Recoverable problems are handled automatically within bounds; human involvement is exceptional and explicit. Versioned changes from authoring and execution commit by default with `PTBK: ` subjects and applicable task IDs. Explicit `--no-commit` is the exception; `ptbk run` is the finite, explicitly configured queue workflow.
7
+ Every engine owns one concrete project directory; exclusive locking prevents two owners even across different installations. It runs with zero or many observing clients. A dashboard is a lightweight view/controller, not an engine or independent scheduler: opening/closing it never starts/stops the service. Shared lifecycle states are **`running`, `pausing`, `pause`, `stopping`**. Pause/ordinary stop drain current work without starting another task; pending requests can be cancelled or changed. Force stop is immediate, with best-effort owner cleanup when handled internally; an external hard kill has no cleanup guarantee. CLI, terminal, browser and API use the same engine operations.
8
8
 
9
- Functional setup and its UX are separate specification aspects. Init/add use finite wizards; init has visible step progress, Expert as a procedural visual guide and a brief success celebration. `ptbk dashboard` attaches a continuous, paneled terminal control view with recognizable agents and no overall completion. Suitable terminals default to rich presentation, with raw output available throughout. Terminal, lightweight browser SPA and independently usable API control the same process. HTTP includes protected remote tunneling by default, so a phone can use the displayed pairing QR from another network; `--no-tunnel` keeps access local. Genuine human requests remain the most prominent information without becoming routine prerequisites for progress.
9
+ `ptbk dashboard --global` is a separate continuously refreshed host-wide table of running project engines, across installation/version boundaries and independent of current directory. It stays open with zero entries, notices later starts and attaches to a selected project dashboard without `cd` or starting a worker. There is no global engine. Ordinary project dashboard entry still reports a missing service actionably.
10
10
 
11
- Every task has a stable ID linking its source, Git commits and trace directory. Traces retain available harness output, event logs and enabled browser recordings. Initialization saves separate trace-commit, video-ignore and video-recording choices in `ptbk.json`; `.ptbk/` and browser sessions remain ignored independently.
11
+ The agenda is intended to progress useful authorized work unattended for extended periods, not remain alive while silently waiting for routine approvals. It fills missing routing through Manager, executes one task at a time, processes follow-ups and discovers useful goal-driven work when no backlog remains, while respecting deliberate pause/stop intent. Recoverable problems are handled automatically within bounds; human involvement is exceptional. Versioned authoring/execution changes commit by default with `PTBK: ` subjects and applicable name correlation. Explicit `--no-commit` is the exception; `ptbk run` is a finite configured queue workflow.
12
+
13
+ Functional contracts and UX are separate aspects. Init/add use finite wizards; init has visible progress, Expert as visual guide and a brief success celebration. The project dashboard has distinct panels and prominent lifecycle controls; detailed effective harness/model/thinking configuration and browser profile/diagnostics are initially collapsed, keyboard-accessible panels. Browser diagnosis/recovery is automatic by default, with safe manual recheck/retry/restart controls. Rich terminals default to pretty presentation with raw alternatives. Terminal, lightweight browser SPA and independently usable API control the same engine. HTTP includes protected remote access by default; `--no-tunnel` keeps it local.
14
+
15
+ **Chatter** is an editable core agent and the default conversational entry for manually discussing/directing a project. New chat first offers Chatter (Enter) or another agent; only the latter expands all valid targets. Its initial TEAM includes the other initialized roles; it handles basic authorized actions and consults/delegates to specialists through ordinary mechanisms. Existing chats and waiting questions retain their real authors. Fixer remains an ordinary OPEN maintenance agent. Human-facing messages commit individually; internal task consultations join their task result, while conversation-scoped consultations use ordinary scoped authoring persistence.
16
+
17
+ Task logical identity, source/Git provenance and evidence storage remain distinct. Trace directories exactly match source basenames, not normalized TASK names or opaque keys; evidence records declared names and source revisions to preserve history across renames. Traces retain actually available harness output, events and enabled browser recordings. Init saves separate trace-commit, video-ignore and video-recording choices; `.ptbk/` and browser sessions stay ignored independently.
12
18
 
13
19
  ## Reading this specification
14
20
 
15
- The [whitepaper](whitepaper.md) explains APT principles and clearly identified long-term directions. The files below define concrete target behavior, not a claim that it has already been implemented. Future capabilities in the whitepaper do not implicitly become product requirements.
21
+ The [whitepaper](whitepaper.md) explains APT principles and clearly identified long-term directions. The files below define concrete target behavior, not a claim of implementation. Future whitepaper capabilities do not implicitly become requirements.
16
22
 
17
- Keep specifications in English, concise and focused on observable behavior, important contracts and invariants. Leave internal representations, algorithms and module organization to implementation unless they are themselves necessary product constraints. Preserve useful behavior, not incidental implementation detail. Keep functional contracts separate from visual presentation, with cross-links rather than duplicating both in a single primary document.
23
+ Keep specifications in English, concise and focused on observable behavior, important contracts and invariants. Leave internal representations, algorithms and module organization to implementation unless they are necessary product constraints. Preserve useful behavior, not incidental implementation detail. Separate functional contracts from visual presentation and cross-link instead of duplicating their full definitions.
18
24
 
19
- [Dictionary](dictionary.md) · [Agents](agents/_index.md) · [Book language](book-language/_index.md) · [References and lookup](book-language/references.md) · [Commitment index](book-language/commitments/_index.md)
25
+ [Project model](concepts/project-model.md) · [Engine/project evolution](concepts/engine-and-project.md) · [Dictionary](dictionary.md) · [Agents](agents/_index.md) · [Book language](book-language/_index.md) · [References and lookup](book-language/references.md) · [Commitment index](book-language/commitments/_index.md)
20
26
 
21
27
  ## Installation and operation
22
28
 
23
29
  - [Installation](cli/installation.md): Global/local package and destination-specific dependency setup.
24
30
  - [Checks and publication on GitHub Actions](cli/releasing.md): Required hosted validation and verified releases.
25
31
  - [Engine updates](cli/updates.md): Update the invoked installation, preserve setup input and rerun.
26
- - [Commands](cli/cli.md): Command surface and options.
27
- - [Configuration](cli/configuration.md): `ptbk.json`, defaults and temporary CLI overrides.
28
- - [Workspace](cli/workspace.md): Project, source paths, specifications, traces and `.ptbk/`.
29
- - [Initialization](cli/initialization.md): Technical setup, original input preservation and automatic background start.
30
- - [First runnable task](cli/first-task.md): Ordinary Expert bootstrap from the initial specification, with no duplicate starter.
31
- - [Nested projects](cli/nested-projects.md): Explicit Git boundaries for new child projects.
32
- - [Finite run](cli/run.md): Execute existing work with one configuration.
32
+ - [Commands](cli/cli.md): Command surface and options, including pause/resume, force stop and global dashboard.
33
+ - [Configuration](cli/configuration.md): `ptbk.json`, defaults and temporary overrides.
34
+ - [Workspace](cli/workspace.md): Project/source paths, specifications, traces, runtime and external discovery metadata.
35
+ - [Initialization](cli/initialization.md): Technical setup, original input preservation, core agents and automatic background start.
36
+ - [First runnable task](cli/first-task.md): Ordinary Expert bootstrap without a duplicate starter.
37
+ - [Nested projects](cli/nested-projects.md): Explicit Git boundaries for child projects.
38
+ - [Finite run](cli/run.md): Existing work with one configuration.
33
39
  - [Start](cli/start.md): Automatic work progression, ongoing operation and startup output.
34
- - [Unattended operation](cli/autonomous-operation.md): A primary product invariant: sustained authorized work, automatic recovery and exceptional human involvement.
35
- - [Process modes](cli/process-modes.md): Daemon/foreground placement, attached clients and one-shot lifecycle commands.
40
+ - [Unattended operation](cli/autonomous-operation.md): Sustained authorized work, recovery and exceptional human involvement.
41
+ - [Process modes](cli/process-modes.md): Engine placement and independent observing clients.
42
+ - [Service lifecycle](cli/service-lifecycle.md): Four states, draining, cancellation, restart, force stop and signal semantics.
43
+ - [Project locking](cli/locking.md): One engine per project and owner-only controlled cleanup.
36
44
  - [Startup persistence](cli/persistence.md): Recovery across operating-system restarts.
37
45
 
38
46
  ## Controls and interaction
39
47
 
40
- - [CLI presentation and interaction](cli/interactive-ui.md): Pretty/raw output, finite wizards, live dashboards and one-shot results.
41
- - [Initialization experience](cli/initialization-ui.md): Intent-first flow, step totals, the Expert guide and a finite celebratory finish.
42
- - [Rich terminal composer](cli/rich-input.md): Multiline input, compact pasted blocks, images and preserved attachment payloads.
43
- - [Help, about and version](cli/help.md): Command-scoped pretty/raw help and the actual running engine version.
44
- - [Shared controls](cli/controls.md): One runtime control model with equivalent client capabilities.
45
- - [Project status view](cli/status-view.md): Live/snapshot state, prominent requests and truthful local/remote connection information.
46
- - [Dashboard panel layout](cli/dashboard-layout.md): Separate attention, work, queue, activity and connection regions.
47
- - [Terminal dashboard](cli/terminal.md): Attach with `ptbk dashboard`, observe live state and use keyboard controls.
48
- - [Service API](cli/api.md): Independently usable authenticated status and control endpoints.
49
- - [Browser dashboard](cli/dashboard.md): Lightweight JavaScript SPA at `/`, consuming the service API.
50
- - [Remote access](cli/remote-access.md): Default protected tunnel, mobile pairing, opt-out and lifecycle.
51
- - [Tunnel provider decision](cli/tunnel-options.md): Researched alternatives and development/stable-hostname tradeoffs.
52
- - [User interactions](cli/user-interactions.md): Exceptional, highly visible and actionable human requests and response semantics.
53
- - [Channels](cli/channels.md): Terminal, CLI answers, browser app and API.
54
- - [Browser](cli/browser.md): One independently configured browser/profile per project, with task-linked recordings.
48
+ - [CLI presentation and interaction](cli/interactive-ui.md): Pretty/raw output, finite wizards, live views and one-shot results.
49
+ - [Initialization experience](cli/initialization-ui.md): Intent-first flow, step totals, Expert guide and finite celebration.
50
+ - [Rich terminal composer](cli/rich-input.md): Multiline input, pasted blocks, images and preserved attachments.
51
+ - [Help, about and version](cli/help.md): Scoped help and actual running version.
52
+ - [Shared controls](cli/controls.md): One engine-owned control model across clients.
53
+ - [Project status view](cli/status-view.md): Live/snapshot state, prominent requests and truthful connection data.
54
+ - [Dashboard panel layout](cli/dashboard-layout.md): Attention, work, visible lifecycle controls and supporting panels.
55
+ - [Dashboard details](cli/dashboard-details.md): Collapsible actual execution configuration and browser diagnostics/recovery UI.
56
+ - [Terminal dashboard](cli/terminal.md): Independent project attachment and keyboard controls.
57
+ - [Global dashboard](cli/global-dashboard.md): Host-wide registration/discovery, live table, zero-service state and project attachment.
58
+ - [Service API](cli/api.md): Independently usable authenticated status/control operations.
59
+ - [Browser dashboard](cli/dashboard.md): Lightweight JavaScript SPA consuming the same service API.
60
+ - [Remote access](cli/remote-access.md): Protected tunnel, mobile pairing, opt-out and lifecycle.
61
+ - [Tunnel provider decision](cli/tunnel-options.md): Alternatives and stable-hostname tradeoffs.
62
+ - [Chats](cli/chats.md): Durable named conversations, author attribution and persistence boundaries.
63
+ - [Chat UI](cli/chat-ui.md): Chatter-first entry, explicit alternatives, existing threads and unread/actionable states.
64
+ - [Human interactions](cli/user-interactions.md): Attributed waiting chats and once-only replies.
65
+ - [Channels](cli/channels.md): Terminal, CLI, browser and API.
66
+ - [Browser](cli/browser.md): Four profile sources, effective-profile inspection, safe ownership and automatic/manual recovery.
55
67
 
56
68
  ## Agents and work
57
69
 
58
70
  - [Agent context](cli/agent-context.md): Effective role, task and project instructions.
59
- - [Agent visual identity](agents/visual-identity.md): Coder-inspired mascot badges, stable identity and truthful activity.
60
- - [Harnesses](cli/harnesses.md): Complete selected setup, global installations, authentication and execution.
71
+ - [Agent visual identity](agents/visual-identity.md): Mascot badges, name identity and truthful activity.
72
+ - [Chatter](agents/chatter.md): Default core conversational entry, initialized TEAM and ordinary specialist delegation.
73
+ - [Fixer](agents/fixer.md): OPEN core introspection, repair and human chats.
74
+ - [Harnesses](cli/harnesses.md): Selected setup, global installations, authentication and execution.
61
75
  - [Harness plugins](cli/harness-plugins.md): Common setup/execution/evidence contract and featured/More presentation.
62
- - [Harness updates](cli/harness-updates.md): Selected setup updates and safe ongoing maintenance.
63
- - [TEAM consultations](cli/team.md): Cooperation within one task.
64
- - [Authoring and saving](cli/authoring.md): Commit add and other approved versioned changes before dispatch.
76
+ - [Harness updates](cli/harness-updates.md): Selected setup updates and safe maintenance.
77
+ - [TEAM consultations](cli/team.md): Bounded task- or conversation-scoped specialist advice.
78
+ - [Authoring and saving](cli/authoring.md): Commit authorized versioned changes before dispatch.
79
+ - [Generated names](cli/generated-names.md): Creation date/time, normalized collisions and separate filenames.
65
80
  - [Task Books](cli/task-books.md): Readable bounded work and completion stamps.
66
- - [Markdown tasks](cli/task-markdown.md): Supported checkmark-based task sources.
67
- - [Task identity](cli/task-identity.md): Stable IDs linking source, occurrences, attempts, commits and traces.
81
+ - [Markdown tasks](cli/task-markdown.md): Checkmark-based compatibility sources.
82
+ - [Task identity](cli/task-identity.md): Opening TASK name, collisions and historical provenance, separate from trace filenames.
68
83
  - [Task origins](cli/task-origins.md): Explicit, derived and goal-driven work.
69
84
  - [Task relationships](cli/task-relationships.md): References, subtasks and prerequisites.
70
- - [Eligibility](cli/eligibility.md): Ready work, automatic assignment candidates and real constraints.
71
- - [Goal discovery](cli/goal-discovery.md): Automatic due enquiries when no backlog remains.
85
+ - [Eligibility](cli/eligibility.md): Ready work, assignment candidates and constraints.
86
+ - [Goal discovery](cli/goal-discovery.md): Due enquiries when no backlog remains.
72
87
  - [Earliest start](cli/not-before.md): Time boundaries and timezone.
73
88
  - [Recurrence](cli/recurrence.md): Repeated occurrences and downtime.
74
89
 
75
90
  ## Results, safety and service workflows
76
91
 
77
- - [Execution](cli/execution.md): The common task lifecycle.
92
+ - [Execution](cli/execution.md): Task lifecycle and no new claims during pause/stop draining.
78
93
  - [Checks](cli/checks.md): Real initialized validation and repair.
79
- - [Errors](cli/errors.md): Understandable failures, diagnostic evidence and next actions.
80
- - [Retries](cli/retries.md): Bounded automatic repairs, authentication and provider waiting.
94
+ - [Errors](cli/errors.md): Understandable failures, evidence and next actions.
95
+ - [Retries](cli/retries.md): Bounded automatic repair and provider/authentication waits.
81
96
  - [Git preflight](cli/git-preflight.md): Workspace readiness and safe initialization.
82
- - [Git persistence](cli/git-persistence.md): Default operation commits, task-ID correlation, trace inclusion, explicit opt-out and ownership.
83
- - [Git synchronization](cli/git-synchronization.md): Optional pull/push and pending sync.
84
- - [Recovery](cli/recovery.md): Interrupted work without duplication or data loss.
85
- - [Isolation](cli/isolation.md): Optional worktree execution and integration.
86
- - [Task traces](cli/traces.md): Per-task harness text, event logs, browser replay, Git correlation and sensitive data.
87
- - [Trace configuration](cli/trace-configuration.md): Independent recording and Git/video-inclusion decisions saved during init.
97
+ - [Git persistence](cli/git-persistence.md): Operation commits, name correlation, trace inclusion and ownership.
98
+ - [Git synchronization](cli/git-synchronization.md): Optional pull/push and pending synchronization.
99
+ - [Recovery](cli/recovery.md): Interrupted work without duplicate effects or data loss.
100
+ - [Isolation](cli/isolation.md): Optional worktrees and integration.
101
+ - [Task traces](cli/traces.md): Literal task-file basenames, source/name provenance, harness evidence, video and redaction.
102
+ - [Trace configuration](cli/trace-configuration.md): Independent recording and Git/video-inclusion choices.
88
103
  - [Planning](cli/planning.md): Read-only discussion and approved task saving.
89
- - [Migration](cli/migration.md): Lossless Markdown-to-Book conversion.
104
+ - [Migration](cli/migration.md): Lossless Markdown-to-Book and legacy-header conversion.
90
105
  - [Operational quality](cli/operations.md): Cross-platform, bounded and observable operation.
91
- - [Acceptance scenarios](cli/acceptance.md): Representative verifiable product outcomes; topic-specific contracts add focused acceptance outcomes.
106
+ - [Acceptance scenarios](cli/acceptance.md): Verifiable outcomes, supplemented by focused topic acceptance.
@@ -1,18 +1,16 @@
1
1
  # Agents
2
2
 
3
- [Main specification](../_main.md) · [Book language](../book-language/_index.md)
3
+ [Main specification](../_main.md) · [Project model](../concepts/project-model.md)
4
4
 
5
- An agent is a persistent role, goal, rules and knowledge, not a permanently running model call. A task is a bounded piece of work. Many agents can belong to one project while only one project task executes at a time.
5
+ An agent is a persistent role, goal, instructions and learned project knowledge, not a permanently running model call. Its Book starts with [AGENT](../book-language/commitments/agent.md), for example `AGENT Developer`; `Developer` supplies the name, while later commitments develop the role. Agents, tasks and chats are distinct Book entities sharing syntax and [normalized name references](../book-language/references.md). Only one project task executes at a time; ordinary chats and read-only consultations do not by themselves execute queued work.
6
6
 
7
- Project agents normally live as editable Books under `agents/`. References can also resolve Books elsewhere in the project and, last, in Git-ignored dependencies. Core agents are editable Books that the engine ensures exist under `agents/.core/`. Non-agents are special references supplied by the engine, not project files.
7
+ - [Core agents](core-agents.md): Minimal editable required roles Adam, Manager, Teacher, Fixer and Chatter.
8
+ - [Chatter](chatter.md): Default human-facing project entry, with specialist TEAM consultation and ordinary task creation.
9
+ - [Non-agents](non-agents.md) and [Expert](expert.md): Engine-defined references/behavior, not project-owned Books.
10
+ - [Fixer](fixer.md): Ongoing introspection/repair through ordinary tasks, chats and learning.
11
+ - [Manager](manager.md): Automatic task assignment.
12
+ - [Teacher](teacher.md) and [learning](learning.md): Ordinary open/closed learning.
13
+ - [References](../book-language/references.md): One ordered resolver across all entity kinds.
14
+ - [Visual identity](visual-identity.md) and [consistency](consistency.md): Stable presentation and guarded execution.
8
15
 
9
- - [References](../book-language/references.md): Equivalent @/brace syntax, normalization and four-tier lookup.
10
- - [Core agents](core-agents.md): Adam, Manager and Teacher.
11
- - [Non-agents](non-agents.md): Void/Null, User and Expert.
12
- - [Manager](manager.md): Automatic assignment.
13
- - [Teacher](teacher.md) and [learning](learning.md): Controlled improvements after work.
14
- - [Expert](expert.md): Knowledge of the running Promptbook engine.
15
- - [Visual identity](visual-identity.md): Automatic stable avatars and truthful activity across interfaces.
16
- - [Consistency](consistency.md): Reserved identities and recursion safeguards.
17
-
18
- The first nonempty line of a Book is the agent's name. The normalized name resolves uniquely at the highest matching tier; file organization affects lookup priority, not the declared identity. [FROM](../book-language/commitments/from.md) supplies inheritance; [TEAM](../book-language/commitments/team.md) describes whom to consult and when. They are different relationships.
16
+ Project agents normally live under `agents/`; required core Books are initialized under `agents/.core/`. Location never replaces AGENT. A core is technically an ordinary project agent required by the engine, not a privilege or special learning mechanism. Non-agents Void/Null, User and Expert come from the running engine. Chatter's promoted default [chat picker](../cli/chat-ui.md) is a UI entry policy, not a new agent category or automatic scheduler. See [engine/project evolution](../concepts/engine-and-project.md).
@@ -0,0 +1,31 @@
1
+ # Chatter: the default human-facing project agent
2
+
3
+ [Agents](_index.md) · [Core agents](core-agents.md) · [Chat entry](../cli/chat-ui.md) · [TEAM](../cli/team.md)
4
+
5
+ **Chatter** is the user's ordinary conversational entry point when they want to inspect, discuss or manually direct a project without knowing which specialist to choose. It is a project-owned core agent, not the engine, the automatic scheduler or a replacement for Manager and specialist execution. The user's main conversation stays with Chatter while appropriate teammates advise or perform the actual specialist work.
6
+
7
+ ## Initialization and ownership
8
+
9
+ Materialize a missing `agents/.core/chatter.book` with `AGENT Chatter` during ordinary initialization/readiness setup. Use a small editable boilerplate, normal Adam inheritance and ordinary default OPEN learning. It has the same Book, routing, harness, TEAM, Git and authority rules as other project agents, with no privileged hidden execution mechanism.
10
+
11
+ At creation, include TEAM access to all other agents materialized/selected for that initialization, including the other core roles and specialists; Chatter must not consult itself. It can also consult the built-in Expert for engine-specific questions. Keep these relationships readable and editable. Users may add other teammates or change policy later. Reinitialization or engine upgrade adds a missing Chatter without resetting any existing customized core/specialist Book or rewriting an existing Chatter's team.
12
+
13
+ Core hiding still applies to ordinary automatic discovery, but new human-chat entry explicitly promotes Chatter as its first/default choice. This does not make Chatter a non-agent or grant it broader access.
14
+
15
+ ## Conversation and delegation
16
+
17
+ Chatter answers project questions, clarifies intent, explains status, performs authorized basic scoped actions and proposes or creates ordinary named tasks. For specialist topics it consults appropriate teammates rather than pretending to have performed their work itself. TEAM advice is attributed and bounded. Work requiring task execution goes through the normal queue, ownership, checks and persistence; opening a chat or asking a read-only question does not create a task or start an engine.
18
+
19
+ A specialist consultation in an existing task retains that task's trace and result-commit scope. A consultation serving a conversation without an executing task is a linked two-agent exchange under [chat/TEAM rules](../cli/team.md), not a fabricated task or a human group chat. Chatter remains the human-facing speaker; do not silently switch the user's selected agent. It distinguishes requested, queued, running and completed work and cannot report a proposal as implemented.
20
+
21
+ Normal approval, scope, account, browser, learning and secret-handling rules still apply. Chatter does not bypass a paused/stopping scheduler, commit unrelated edits or take over another task's ownership. Its user messages follow the same per-message persistence contract as every other human-facing chat.
22
+
23
+ ## Entry-point contract
24
+
25
+ For a new chat without an explicit target, first offer exactly two choices: **Chat with Chatter** (initially focused/default) and **Choose another agent**. Enter immediately proceeds with Chatter, without a second specialist picker. The second choice opens the complete available target-agent list, including hidden/core roles and Expert, subject to normal resolution and valid-speaker rules. User, Void and Null are not targets. An explicit target bypasses the picker; a noninteractive new-chat request with no target uses Chatter without prompting.
26
+
27
+ This applies to `ptbk chat`, the dashboard new-chat shortcut and browser/API entry. Existing chats and agent-authored waiting conversations retain their original participants; opening Fixer's question does not redirect it to Chatter. If Chatter is missing or invalid, give an actionable setup/repair diagnostic rather than silently choosing another agent, overwriting a file or initializing a project just by opening a picker.
28
+
29
+ ## Acceptance outcomes
30
+
31
+ Initialize a project and verify one editable Chatter with all other initialized teammates. Enter through direct chat, terminal shortcut and browser: Enter chooses Chatter; the second option reveals every valid alternative; explicit selection is respected. Ask about status without creating work, consult a specialist with attribution, then create authorized linked tasks through the ordinary queue. Reinit preserves customization and adds only missing roles. Reopen another agent's waiting chat and verify that its identity, messages and required answer remain unchanged.
@@ -1,16 +1,11 @@
1
- # Agent and automatic-work consistency
1
+ # Agent and project consistency
2
2
 
3
- [Agents](_index.md)
3
+ [Agents](_index.md) · [Shared resolution](../book-language/references.md)
4
4
 
5
- Validate the following before execution, and again when relevant definitions change:
5
+ Check relevant definitions when the project changes and before work that depends on them. A normalized-name collision within or across Book kinds is **not normally fatal**: use deterministic first-wins resolution, report the effective definition and shadowed sources, and let [Fixer](fixer.md) propose or safely apply remediation. A wrong-kind match in a type-constrained commitment is a real reference error; missing and malformed definitions cannot be guessed away. Reserved built-in non-agent names cannot be replaced by project Books.
6
6
 
7
- - Agent references use the [shared normalization and ordered resolution](../book-language/references.md). At the first matching tier, a normalized name must identify one definition. Same-tier collisions are errors; a higher-tier definition may shadow lower-tier copies. Project agents cannot replace reserved non-agent names Void, Null, `0`, User or Expert.
8
- - Required core agents exist; create only missing defaults. Report malformed or conflicting existing definitions with their source locations. Core Books are distinct from engine-supplied non-agents.
9
- - Inheritance and textual inclusion terminate. An agent without FROM inherits Adam; every chain must reach an explicit empty or engine-defined foundation rather than cycle. Adam may inherit a custom ancestor, provided the full chain terminates. It need not directly inherit Void.
10
- - User cannot be an inheritance parent. Teacher's own Book must end in CLOSED. Report an open Teacher as unsafe configuration, explaining the self-teaching loop; do not run that loop.
7
+ Initialize only missing required core agents. Do not silently erase customized or learned core content. Report invalid syntax with source context. Agent inheritance must terminate; FROM cycles and User as a parent are errors. TEAM cycles/reciprocal consultations are permitted but actual consultations are bounded. Teacher must remain CLOSED; Fixer may be OPEN and learns normally.
11
8
 
12
- TEAM references may be reciprocal or cyclic. That is valid and does not create an inheritance error, but actual consultations have bounded depth, count, time and cancellation.
9
+ Manager assignment, teaching, Fixer maintenance and goal discovery use regular tasks and the same project ownership constraints. Prevent recursive manager assignment, teacher self-teaching, Fixer issue spam and unbounded model or commit loops. Dependency cycles block affected tasks, not the whole supervisor.
13
10
 
14
- Manager assignment, teaching and goal discovery are ordinary generated tasks, yet the engine must prevent automatic-work recursion and duplicate generation. Core dispatch cannot require an infinite chain of dispatch tasks; teaching cannot recursively teach Teacher; empty results cannot cause a busy loop. Cyclic task dependencies block the affected work with an explanation.
15
-
16
- Malformed configuration must never be repaired by erasing custom source. Resolving a Book in ignored/dependency content neither makes it an ordinary discovery candidate nor authorizes modifying the package. A running supervisor exposes the problem and remains controllable. See [recovery](../cli/recovery.md), [TEAM](../cli/team.md) and [goal discovery](../cli/goal-discovery.md).
11
+ Ignored/dependency Book discovery does not grant authority to change third-party packages. A running service stays inspectable when any of these problems blocks work. See [recovery](../cli/recovery.md) and [task relationships](../cli/task-relationships.md).
@@ -1,13 +1,15 @@
1
- # Core agents and hidden definitions
1
+ # Core agents and minimal project-owned defaults
2
2
 
3
- [Agents](_index.md)
3
+ [Agents](_index.md) · [Engine and project evolution](../concepts/engine-and-project.md)
4
4
 
5
- The engine expects three editable core agents: **Adam**, **Manager** and **Teacher**, materialized as `agents/.core/adam.book`, `manager.book` and `teacher.book`.
5
+ The engine expects five editable project roles: **Adam, Manager, Teacher, Fixer and Chatter**, materialized only if missing under `agents/.core/` as `adam.book`, `manager.book`, `teacher.book`, `fixer.book` and `chatter.book`. Their opening commitments are `AGENT <role name>`; core names do not acquire task/chat date-time decoration. A core has ordinary Book, routing, TEAM, learning, Git and runtime behavior. Being required does not grant a special inference mechanism or extra authority.
6
6
 
7
- On initialization and execution setup, create each missing definition from the installed engine's defaults. An incomplete core directory is repaired individually, not replaced wholesale. Existing customized files must not be overwritten, including when the package is updated. An invalid existing definition needs a diagnostic, not silent replacement.
7
+ Initialize each missing role individually with a small comprehensible boilerplate, not an embedded encyclopedia. Existing Books belong to the project: never reset, replace or bulk-regenerate them during reinit/upgrade, including learned/customized versions. Adding a required Chatter preserves all previously present roles. Invalid/colliding sources are diagnosed through the normal resolver and repaired only by authorized work, not silently overwritten.
8
8
 
9
- Adam supplies the default inherited foundation. Its supplied definition ends inheritance with `FROM Void`. Manager inherits Adam by the usual default. Teacher is supplied with `FROM Expert` and ends with `CLOSED`; its parent can be customized, but its closure requirement remains.
9
+ Initial policies: Adam is the common inheritance foundation (`FROM @Void`, initially CLOSED); Manager inherits Adam; Teacher inherits Expert and must remain CLOSED against recursive teaching; Fixer may consult Expert through TEAM and is OPEN. Chatter uses ordinary Adam inheritance/default OPEN learning and focuses on user conversation. These are individual Book policies, not restrictions imposed on every core agent.
10
10
 
11
- Any hidden directory inside `agents/`, not only `.core/`, contains supporting definitions rather than ordinary automatic task candidates. They remain discoverable for inheritance, imports, TEAM and explicit/internal assignments. Adam normally provides shared instructions, Manager handles assignment tasks and Teacher handles learning tasks. Hidden placement is not an access-control boundary.
11
+ At Chatter creation, its readable TEAM relationships include all other initialized/selected agents, both core and specialist, and access to Expert for engine questions. Do not include itself. Users can customize or extend that team later; initializing a missing role does not rewrite existing teams. See [Chatter](chatter.md).
12
12
 
13
- See [inheritance](../book-language/inheritance.md), [non-agents](non-agents.md) and [consistency](consistency.md).
13
+ Core definitions are hidden from ordinary default agent inventories and goal discovery, while remaining explicitly selectable, assignable and referenceable. **New human-chat entry is an explicit exception:** promote Chatter as the default first choice and offer Choose another agent to open the full valid target list, including other cores and Expert. This does not make all core agents ordinary goal-discovery candidates. Hidden status is not access control.
14
+
15
+ Expert is a comprehensive version-matched engine-defined non-agent, never a project core file. See [Fixer](fixer.md), [Chatter](chatter.md), [Teacher](teacher.md), [inheritance](../book-language/inheritance.md) and [non-agents](non-agents.md).
@@ -6,6 +6,6 @@ Expert understands Promptbook, Book syntax, agents, tasks, project operation and
6
6
 
7
7
  Expert is never materialized into `agents/.core/`. Updating or selecting another engine may change Expert while preserving the project's own definitions. The engine must make the relevant introspective context available without requiring the user to maintain or copy it into every project. Do not expose credentials as introspection.
8
8
 
9
- Expert is usable both through `FROM Expert` and `TEAM ... @Expert`. A project can define `Modified Expert` with `FROM Expert` and let Teacher inherit that local specialization. A programmer can consult Expert without any Expert file existing in the project.
9
+ Expert is usable both through `FROM @Expert` and `TEAM ... @Expert`. A project can define `Modified Expert` with `FROM @Expert` and let Teacher inherit that local specialization through `FROM {Modified Expert}`. A programmer can consult Expert without any Expert file existing in the project.
10
10
 
11
- [Initialization](../cli/initialization.md) explicitly assigns the first project-creation task to Expert. [Teacher](teacher.md) inherits Expert by default. Expert's internal implementation may use Book and shared agent mechanisms, but those are not project-owned source or requirements on its implementation.
11
+ [Initialization](../cli/initialization.md) explicitly assigns the first project-creation task to Expert. [Teacher](teacher.md) inherits Expert by default. Expert may internally have a comprehensive Book-like definition embedded in or generated by the engine; no project file or internal encoding is required. Its size is not constrained by the deliberately minimal core-agent boilerplates. This separation lets engine expertise evolve while project agents retain their learning. See [engine/project evolution](../concepts/engine-and-project.md).
@@ -0,0 +1,24 @@
1
+ # Fixer: project self-maintenance
2
+
3
+ [Agents](_index.md) · [Core agents](core-agents.md) · [Learning](learning.md)
4
+
5
+ **Fixer is an ordinary editable, default-OPEN core agent**, initialized as a small `agents/.core/fixer.book`. Its job is to **introspect the particular running project** and improve its health over time: detect malformed Book syntax, normalized-name collisions and shadowing, unresolved references, problematic configuration, recurring failures, broken workflows or maintenance opportunities. It can inspect available logs, traces, actual diagnostics and project context, without inventing evidence or exposing secrets.
6
+
7
+ A deliberately minimal initial example (not a special runtime implementation):
8
+
9
+ ```book
10
+ Fixer
11
+ ENTITY AGENT
12
+ FROM @Adam
13
+ GOAL Keep this Promptbook project healthy by finding and safely fixing real problems.
14
+ TEAM Consult @Expert for current Promptbook syntax and capabilities.
15
+ OPEN Learn verified project-specific repair practices and preferences.
16
+ ```
17
+
18
+ Fixer has `TEAM` access to the built-in **Expert** for current Promptbook syntax, runtime capabilities and version-specific knowledge. Expert is general and engine-owned; Fixer applies that knowledge to the project's own state and retains learned project-specific practices. An engine upgrade refreshes Expert but does not reset Fixer's accumulated local Book.
19
+
20
+ Run Fixer's checks opportunistically and at a bounded, persisted cadence, including after relevant diagnostic changes; do not invent a continuous busy polling loop, new permanent privileged service or thousands of repetitive notifications. The work is ordinary scheduled/derived tasks in the project's **single-task** agenda. Diagnose issues with their source, impact and confidence; ordinary low-risk repairs within existing authority can be done and checked automatically. A risky, ambiguous or human-dependent correction is handled through a **chat initiated by Fixer to @User** with a specific explanation, options when useful and links to affected entities/tasks. Do not silently rewrite ambiguous definitions or unrelated project files.
21
+
22
+ Fixer is not an exceptional learning architecture: it uses precisely the same OPEN/CLOSED and Teacher mechanism as other agents. Corrections and user replies can become teaching evidence in an ordinary task, and authorized useful learning is committed to Fixer's own project Book. This can prevent recurrence of previously explained problems without promising perfect automatic deduplication. Suppress redundant still-unanswered conversations about the *same* condition; an already pending answer is not a reason to send it again.
23
+
24
+ No extra dashboard category is needed for Fixer. Its tasks, ordinary results, diagnostics and chats use the existing agenda and conversation presentation. If no work is justified, it may record or report a bounded no-op; it must not manufacture changes merely to justify its existence.
@@ -6,7 +6,7 @@ Learning improves a maintained agent definition; it does not require training mo
6
6
 
7
7
  When an open project/core agent completes a task, create a follow-up task assigned to Teacher. Save it with the original task's result and completion in that same commit. The learning task identifies the agent and completed work, and follows that work in the shared queue. It is neither an invisible background edit nor a second kind of runner.
8
8
 
9
- Teacher reviews the evidence actually available: outputs, checks, actions, mistakes, corrections and diagnostic/reasoning material exposed by the harness. Unavailable private reasoning must not be invented. Persist useful learning in the allowed parts of the agent's Book, with the teaching task's own checked completion commit.
9
+ Teacher reviews the evidence actually available: task outputs, checks, actions, mistakes, chat exchanges and human corrections linked to the agent, plus diagnostic/reasoning material exposed by the harness. When a committed human↔agent chat contains a substantive correction, explicit preference or verified project-specific guidance relevant to an **open** participating agent, schedule an ordinary Teacher learning task even when no execution task was created by that chat. Associate it with the chat and source agent, deduplicate against unresolved equivalent teaching work and respect OPEN limits; do not learn blindly from arbitrary or untrusted chat content. A chat alone is never a hidden, uncommitted mutation of the agent. Unavailable private reasoning must not be invented. Persist useful learning in the allowed parts of the agent's Book, with the teaching task's own checked completion commit.
10
10
 
11
11
  A closed agent receives no automatic teaching changes. Recheck the current learning policy before applying an update; closing an agent also protects it from an already queued learning task. OPEN does not authorize changing its own limits, expanding tool permissions or weakening project safeguards. An inherited instruction's origin must remain distinguishable from the local definition being taught.
12
12
 
@@ -6,10 +6,12 @@ Non-agents exist as engine-defined references without project files. They must n
6
6
 
7
7
  | Reference | FROM | TEAM |
8
8
  | --- | --- | --- |
9
- | Void, alias Null (also `0`) | Ends inheritance; supplies no instructions. | Valid no-op; no consultation or error. |
10
- | User | Invalid; inheritance must fail with a clear diagnostic. | Consults the user through the general request mechanism. |
11
- | Expert | Supplies Promptbook expertise from the running engine. | Consults that runtime's Promptbook expert. |
9
+ | `@Void`, alias `@Null` (also the legacy `0`) | Ends inheritance; supplies no instructions. | Valid no-op; no consultation or error. |
10
+ | `@User` | Invalid; inheritance must fail with a clear diagnostic. | Starts or continues a durable human-facing chat for the required question or action. |
11
+ | `@Expert` | Supplies Promptbook expertise from the running engine. | Consults that runtime's Promptbook expert. |
12
12
 
13
- Void and User are special semantics, not ordinary model-backed roles. Expert does behave like a knowledgeable agent, but its definition and runtime context belong to the engine. It may internally share Book mechanisms; no internal representation is prescribed.
13
+ The brace forms `{Void}`, `{Null}`, `{User}` and `{Expert}` are the same references. These built-ins are checked before any project file, as the first tier of [resolution](../book-language/references.md#ordered-resolution).
14
+
15
+ Void and User are special semantics, not ordinary model-backed roles. In particular, User is not a selectable conversational agent chatting with itself. Expert does behave like a knowledgeable agent, but its definition and runtime context belong to the engine. It may internally share Book mechanisms; no internal representation is prescribed.
14
16
 
15
17
  See [Expert](expert.md), [references](../book-language/references.md) and [user requests](../cli/user-interactions.md).
@@ -2,7 +2,7 @@
2
2
 
3
3
  [Agents](_index.md)
4
4
 
5
- Teacher is an editable core agent supplied with `FROM Expert` and an explicit final `CLOSED`. The user may customize its teaching instructions or parent, including inheriting a local specialization of Expert. It must remain closed to automatic learning.
5
+ Teacher is an editable core agent supplied with `FROM @Expert` and an explicit final `CLOSED`. The user may customize its teaching instructions or parent, including inheriting a local specialization of Expert. It must remain closed to automatic learning.
6
6
 
7
7
  Teacher executes ordinary learning tasks that improve an eligible agent from completed work. It receives the original assignment, result, available execution evidence, current agent definition and that agent's learning permission. It changes only what that permission allows and must not turn an inference or missing evidence into a learned fact.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  [Agents](_index.md) · [Project status view](../cli/status-view.md)
4
4
 
5
- Every agent has a recognizable visual identity without requiring the user to choose an image or add visual metadata before work can start. Provide it automatically for ordinary project agents, core agents such as Manager/Teacher and the engine-supplied Expert. The default works locally and offline, without an image-generation/model call, external avatar service or extra setup.
5
+ Every agent has a recognizable visual identity without requiring the user to choose an image or add visual metadata before work can start. Provide it automatically for ordinary project agents, core agents such as Manager, Teacher and Fixer and the engine-supplied Expert. The default works locally and offline, without an image-generation/model call, external avatar service or extra setup.
6
6
 
7
7
  ## Visual direction: Promptbook Coder badges
8
8
 
@@ -20,12 +20,12 @@ Inheritance does not give every descendant Adam's appearance. Do not introduce a
20
20
 
21
21
  ## Placement and activity
22
22
 
23
- Show badges in agent/queue views, current-task status, attributed messages and results, including the live dashboard and status snapshot. The [current-work panel](../cli/dashboard-layout.md) makes it immediately clear who is doing what. User requests identify the human as User rather than another autonomous worker; Void/Null never appears to be doing work.
23
+ Show badges in agent/queue views, current-task status, attributed messages and results, including the live dashboard and status snapshot. The [current-work panel](../cli/dashboard-layout.md) makes it immediately clear who is doing what. Agent-authored user-facing chat messages identify the agent speaker, while the human speaker is User rather than another autonomous worker; Void/Null never appears to be doing work.
24
24
 
25
25
  Identity and observed activity are distinct. Use readable labels and restrained expressions for working, idle, waiting for the user/provider, paused, blocked/failed and completed work. Manager assignment and goal enquiries show their actual responsible agents. A quiet blink is decorative, not proof of progress; work gestures reflect actual work and cannot simulate tool calls, checks or completion. No hardcoded alternating coding/painting scenes may pretend the runtime is performing those actions.
26
26
 
27
- Working motion changes or stops while waiting; snapshots are still frames of the observed state. Respect reduced motion, keep layout stable and do not imply parallel independent tasks. A completed task is not a permanently completed agent. Avatars never obscure details, errors or controls, and pending human requests remain the highest visual priority. Repainting cannot steal input or change execution, routing or permissions.
27
+ Working motion changes or stops while waiting; snapshots are still frames of the observed state. Respect reduced motion, keep layout stable and do not imply parallel independent tasks. A completed task is not a permanently completed agent. Avatars never obscure details, errors or controls, and chats awaiting human replies remain the highest visual priority. Repainting cannot steal input or change execution, routing or permissions.
28
28
 
29
29
  ## Acceptance outcomes
30
30
 
31
- Compare the current-agent area with the Coder reference: it is an expressive, polished terminal-style mascot badge, not merely a colored initial or random geometric icon. Several agents remain distinguishable without color. Reconnect, move a Book and edit its rules: appearance remains stable. Equivalent references show one identity. Switching from Manager to its selected agent changes the badge, name and actual activity together. Waiting cannot look like active execution; requests remain more prominent. Raw, narrow and reduced-motion modes preserve names, state and controls.
31
+ Compare the current-agent area with the Coder reference: it is an expressive, polished terminal-style mascot badge, not merely a colored initial or random geometric icon. Several agents remain distinguishable without color. Reconnect, move a Book and edit its rules: appearance remains stable. Equivalent references show one identity. Switching from Manager to its selected agent changes the badge, name and actual activity together. Waiting cannot look like active execution; waiting-for-user chats remain more prominent. Raw, narrow and reduced-motion modes preserve names, state and controls.
@@ -1,14 +1,15 @@
1
1
  # Book language
2
2
 
3
- [Main specification](../_main.md)
3
+ [Main specification](../_main.md) · [Project model](../concepts/project-model.md)
4
4
 
5
- Book is a human-readable language of natural text and commitments. It describes both a persistent agent (who works and why) and a bounded task (what work to do).
5
+ Book is one human-readable language for **agents, tasks and chats**, each in one `.book` source. Its three syntactic building blocks are **commitment keywords**, their **content**, and **references** within nonliteral content. Every canonical Book starts with a type-and-name commitment: `AGENT <name>`, `TASK <name>` or `CHAT <name>`. The name is the commitment's content, not a separate unprefixed header or a filename.
6
6
 
7
- An agent starts with its name on the first nonempty line. A task starts with `TASK <title>` on that line. The two document kinds share notation, not identity, default inheritance or runtime purpose.
7
+ The same syntax and parser apply to every entity kind. The first commitment establishes what is being defined; subsequent commitments build up that entity's instructions, work or conversation. Entity-specific validation and engine behavior are separate from parsing. The commitment vocabulary and supported entity kinds may grow without introducing another document grammar.
8
8
 
9
- - [Syntax](syntax.md): Source structure, text, literal content and commitment boundaries.
10
- - [References](references.md): Normalized agent names and stable task references.
11
- - [Inheritance](inheritance.md): FROM, implicit Adam and termination.
12
- - [Commitments](commitments/_index.md): One file per canonical commitment, with aliases in that same file.
9
+ - [Syntax](syntax.md): Commitment-first documents, uppercase boundaries, content and diagnostics.
10
+ - [References](references.md): One normalized name resolver and graph links across all three kinds.
11
+ - [Inheritance](inheritance.md): Agent-only FROM, implicit Adam and termination.
12
+ - [Commitments](commitments/_index.md): One document per canonical commitment.
13
+ - [Generated names](../cli/generated-names.md): Preventive task/chat naming, separate from language validity and filenames.
13
14
 
14
- [Agents](../agents/_index.md) describes role categories and learning. [Task Books](../cli/task-books.md) describes execution-facing task semantics. The language specifies observable meaning and readable source, not parser classes or an internal representation.
15
+ [Agents](../agents/_index.md), [Task Books](../cli/task-books.md) and [Chats](../cli/chats.md) define distinct semantics; common syntax does not make a chat executable or a task inheritable. Plain name headers and `ENTITY` belong to [explicit legacy conversion](../cli/migration.md), not canonical authoring or folder-based type inference.
@@ -2,7 +2,25 @@
2
2
 
3
3
  [Book language](../_index.md)
4
4
 
5
- Each canonical commitment has one specification file. Listed aliases share its semantics and file; keywords containing spaces remain a single commitment.
5
+ Each canonical commitment has one specification file. Listed aliases share its semantics and file; keywords containing spaces remain a single commitment. All kinds use the same [uppercase boundary and content rules](../syntax.md); semantic validation does not introduce another grammar.
6
+
7
+ ## Foundational type-and-name commitments
8
+
9
+ Exactly one of these starts a Book. Its content is the entity's name; subsequent commitments develop that same entity.
10
+
11
+ - [AGENT](agent.md)
12
+ - [TASK](task.md)
13
+ - [CHAT](chat.md)
14
+
15
+ ## Shared links
16
+
17
+ - [LINK](link.md)
18
+
19
+ ## Chat commitments
20
+
21
+ - [CHAT MEMBER](chat-member.md)
22
+ - [CHAT MESSAGE](chat-message.md)
23
+ - [CHAT STATUS](chat-status.md)
6
24
 
7
25
  ## Agent and shared instructions
8
26
 
@@ -30,8 +48,6 @@ Each canonical commitment has one specification file. Listed aliases share its s
30
48
 
31
49
  ## Task commitments
32
50
 
33
- - [TASK](task.md)
34
- - [TASK ID](task-id.md)
35
51
  - [TASK AGENT](task-agent.md)
36
52
  - [TASK HARNESS](task-harness.md)
37
53
  - [TASK MODEL](task-model.md)
@@ -47,3 +63,7 @@ Each canonical commitment has one specification file. Listed aliases share its s
47
63
  - [TASK RUNNER](task-runner.md)
48
64
  - [TASK NOTE](task-note.md)
49
65
  - [TASK ORIGIN](task-origin.md)
66
+
67
+ ## Historical syntax
68
+
69
+ [Former ENTITY declaration](entity.md) documents conversion of existing sources only. It is not a canonical commitment or an alternative to the opening AGENT, TASK or CHAT.
@@ -0,0 +1,11 @@
1
+ # AGENT
2
+
3
+ [Commitments](_index.md) · [Syntax](../syntax.md) · [Agents](../../agents/_index.md)
4
+
5
+ **Document:** Agent; required first commitment, exactly once.
6
+
7
+ `AGENT <name>` declares an agent whose nonempty, single-line display name is `<name>`. For example, `AGENT Frontend Developer` names the agent `Frontend Developer`. Normalize the name content only, not the keyword or filename. Use the same commitment/content boundary as every other line; there is no special bare-name parser.
8
+
9
+ Subsequent commitments build the agent's role, goals, rules, knowledge, relationships and learning policy. Agent inheritance and OPEN/CLOSED retain their existing semantics. Core project agents use this same declaration; engine-provided non-agents still require no project file.
10
+
11
+ Agent names do not receive the automatic task/chat date-time decoration. Folder placement cannot replace this declaration. Additional AGENT, TASK or CHAT root declarations in the same source are invalid. See [references](../references.md).
@@ -0,0 +1,7 @@
1
+ # CHAT MEMBER
2
+
3
+ [Commitments](_index.md) · [Chats](../../cli/chats.md)
4
+
5
+ **Document:** Chat.
6
+
7
+ `CHAT MEMBER @User` or `CHAT MEMBER @Developer` declares a participant. A normal human-facing chat has exactly User and one chosen agent (including Expert where meaningful); a task-scoped TEAM consultation has two participating agents. Multiple agents with a human are reserved for future support. Void/Null are not speakers and User cannot have a chat with itself. A participant is resolved by the common name resolver.
@@ -0,0 +1,11 @@
1
+ # CHAT MESSAGE
2
+
3
+ [Commitments](_index.md) · [Chats](../../cli/chats.md)
4
+
5
+ **Document:** Chat.
6
+
7
+ A repeated `CHAT MESSAGE <sender-reference> <timestamp>` commitment begins a durable message by a declared participant. It is one multiword commitment in the common grammar, not a new CHAT declaration or another entity. Its natural-language body continues until the next commitment/message, preserving source order, attachments and text.
8
+
9
+ A stored message **must be lossless**: literal quoting/escaping of supplied text that resembles Book controls or fences is required so pasted AGENT, TASK, CHAT, RULE, CHAT MESSAGE, brace references or links never become structural or executable commitments solely by being quoted in a message. Preserve arbitrary text without changing the original message or letting it rename/retype its containing Book.
10
+
11
+ A message timestamp identifies a turn's time, **not** an entity ID or part of the chat's declared name; duplicate timestamps may exist. Appending a message never refreshes the name's creation date/time. A message may ask for a human answer or report an answer, as expressed through chat attention state. In ordinary human-facing chats each newly accepted user/agent message is its own Git operation and commit; task-internal agent consultations join the parent task's result commit.
@@ -0,0 +1,7 @@
1
+ # CHAT STATUS
2
+
3
+ [Commitments](_index.md) · [Chats](../../cli/chats.md)
4
+
5
+ **Document:** Chat.
6
+
7
+ `CHAT STATUS open|waiting-for-user|resolved` describes the conversation's durable action state. `waiting-for-user` requires a concrete unanswered agent message, decision or human-only action; it is not inferred merely from who spoke last. Appending an actual answer updates the state in that message's atomic save/commit. Read/unread presentation per local viewer is separate from durable action state; reading never answers or approves a request.
@@ -0,0 +1,11 @@
1
+ # CHAT
2
+
3
+ [Commitments](_index.md) · [Syntax](../syntax.md) · [Chats](../../cli/chats.md)
4
+
5
+ **Document:** Chat; required first commitment, exactly once.
6
+
7
+ `CHAT <name>` declares a conversation whose nonempty, single-line display name is `<name>`. Normalize the name content only, excluding CHAT. The declaration identifies the conversation independently of its path, participants or linked tasks; it does not create an executable task or a separate chat ID.
8
+
9
+ Subsequent CHAT MEMBER, CHAT MESSAGE, CHAT STATUS and applicable shared commitments build that conversation using the common Book syntax. A new message extends the same Book without another CHAT declaration. References use the full persisted chat name.
10
+
11
+ New system-created threads include readable creation date/time under [generated-name policy](../../cli/generated-names.md), including threads started through CLI/UI and agent-originated conversations. Dates are ordinary name text, not mandatory chat syntax or message timestamps. Reopening, replying or recovering retains the existing name. Additional root declarations are invalid.