@cluesmith/codev 3.3.4 → 3.3.6

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 (290) hide show
  1. package/dashboard-dist/assets/index-BjcqV9Vv.css +32 -0
  2. package/dashboard-dist/assets/index-b7GnZV2i.js +220 -0
  3. package/dashboard-dist/assets/index-b7GnZV2i.js.map +1 -0
  4. package/dashboard-dist/index.html +2 -2
  5. package/dist/agent-farm/cli.d.ts.map +1 -1
  6. package/dist/agent-farm/cli.js +50 -17
  7. package/dist/agent-farm/cli.js.map +1 -1
  8. package/dist/agent-farm/commands/architect.d.ts.map +1 -1
  9. package/dist/agent-farm/commands/architect.js +5 -1
  10. package/dist/agent-farm/commands/architect.js.map +1 -1
  11. package/dist/agent-farm/commands/attach.d.ts +1 -1
  12. package/dist/agent-farm/commands/attach.d.ts.map +1 -1
  13. package/dist/agent-farm/commands/cleanup.d.ts +1 -1
  14. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  15. package/dist/agent-farm/commands/cleanup.js +2 -1
  16. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  17. package/dist/agent-farm/commands/decisions.d.ts +25 -0
  18. package/dist/agent-farm/commands/decisions.d.ts.map +1 -0
  19. package/dist/agent-farm/commands/decisions.js +54 -0
  20. package/dist/agent-farm/commands/decisions.js.map +1 -0
  21. package/dist/agent-farm/commands/ide.d.ts +32 -3
  22. package/dist/agent-farm/commands/ide.d.ts.map +1 -1
  23. package/dist/agent-farm/commands/ide.js +180 -19
  24. package/dist/agent-farm/commands/ide.js.map +1 -1
  25. package/dist/agent-farm/commands/reset/context.d.ts +4 -2
  26. package/dist/agent-farm/commands/reset/context.d.ts.map +1 -1
  27. package/dist/agent-farm/commands/reset/context.js +12 -4
  28. package/dist/agent-farm/commands/reset/context.js.map +1 -1
  29. package/dist/agent-farm/commands/send.d.ts +3 -2
  30. package/dist/agent-farm/commands/send.d.ts.map +1 -1
  31. package/dist/agent-farm/commands/send.js +35 -21
  32. package/dist/agent-farm/commands/send.js.map +1 -1
  33. package/dist/agent-farm/commands/spawn-worktree.d.ts +7 -0
  34. package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
  35. package/dist/agent-farm/commands/spawn-worktree.js +63 -20
  36. package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
  37. package/dist/agent-farm/commands/spawn.d.ts +17 -0
  38. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  39. package/dist/agent-farm/commands/spawn.js +41 -19
  40. package/dist/agent-farm/commands/spawn.js.map +1 -1
  41. package/dist/agent-farm/lib/builder-lookup.d.ts +3 -2
  42. package/dist/agent-farm/lib/builder-lookup.d.ts.map +1 -1
  43. package/dist/agent-farm/lib/builder-lookup.js +24 -9
  44. package/dist/agent-farm/lib/builder-lookup.js.map +1 -1
  45. package/dist/agent-farm/lib/ide-extensions.d.ts +82 -0
  46. package/dist/agent-farm/lib/ide-extensions.d.ts.map +1 -0
  47. package/dist/agent-farm/lib/ide-extensions.js +179 -0
  48. package/dist/agent-farm/lib/ide-extensions.js.map +1 -0
  49. package/dist/agent-farm/lib/ide-record.d.ts +6 -1
  50. package/dist/agent-farm/lib/ide-record.d.ts.map +1 -1
  51. package/dist/agent-farm/lib/ide-record.js +8 -1
  52. package/dist/agent-farm/lib/ide-record.js.map +1 -1
  53. package/dist/agent-farm/lib/ide-version.d.ts +97 -0
  54. package/dist/agent-farm/lib/ide-version.d.ts.map +1 -0
  55. package/dist/agent-farm/lib/ide-version.js +224 -0
  56. package/dist/agent-farm/lib/ide-version.js.map +1 -0
  57. package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
  58. package/dist/agent-farm/lib/tunnel-client.js +7 -3
  59. package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
  60. package/dist/agent-farm/servers/agent-state/broadcast.d.ts +19 -0
  61. package/dist/agent-farm/servers/agent-state/broadcast.d.ts.map +1 -0
  62. package/dist/agent-farm/servers/agent-state/broadcast.js +30 -0
  63. package/dist/agent-farm/servers/agent-state/broadcast.js.map +1 -0
  64. package/dist/agent-farm/servers/agent-state/identity.d.ts +50 -0
  65. package/dist/agent-farm/servers/agent-state/identity.d.ts.map +1 -0
  66. package/dist/agent-farm/servers/agent-state/identity.js +120 -0
  67. package/dist/agent-farm/servers/agent-state/identity.js.map +1 -0
  68. package/dist/agent-farm/servers/agent-state/liveness.d.ts +107 -0
  69. package/dist/agent-farm/servers/agent-state/liveness.d.ts.map +1 -0
  70. package/dist/agent-farm/servers/agent-state/liveness.js +224 -0
  71. package/dist/agent-farm/servers/agent-state/liveness.js.map +1 -0
  72. package/dist/agent-farm/servers/agent-state/route.d.ts +38 -0
  73. package/dist/agent-farm/servers/agent-state/route.d.ts.map +1 -0
  74. package/dist/agent-farm/servers/agent-state/route.js +170 -0
  75. package/dist/agent-farm/servers/agent-state/route.js.map +1 -0
  76. package/dist/agent-farm/servers/agent-state/serve.d.ts +31 -0
  77. package/dist/agent-farm/servers/agent-state/serve.d.ts.map +1 -0
  78. package/dist/agent-farm/servers/agent-state/serve.js +49 -0
  79. package/dist/agent-farm/servers/agent-state/serve.js.map +1 -0
  80. package/dist/agent-farm/servers/agent-state/store.d.ts +76 -0
  81. package/dist/agent-farm/servers/agent-state/store.d.ts.map +1 -0
  82. package/dist/agent-farm/servers/agent-state/store.js +157 -0
  83. package/dist/agent-farm/servers/agent-state/store.js.map +1 -0
  84. package/dist/agent-farm/servers/decisions/file.d.ts +50 -0
  85. package/dist/agent-farm/servers/decisions/file.d.ts.map +1 -0
  86. package/dist/agent-farm/servers/decisions/file.js +146 -0
  87. package/dist/agent-farm/servers/decisions/file.js.map +1 -0
  88. package/dist/agent-farm/servers/decisions/grammar.d.ts +36 -0
  89. package/dist/agent-farm/servers/decisions/grammar.d.ts.map +1 -0
  90. package/dist/agent-farm/servers/decisions/grammar.js +109 -0
  91. package/dist/agent-farm/servers/decisions/grammar.js.map +1 -0
  92. package/dist/agent-farm/servers/decisions/notice.d.ts +11 -0
  93. package/dist/agent-farm/servers/decisions/notice.d.ts.map +1 -0
  94. package/dist/agent-farm/servers/decisions/notice.js +18 -0
  95. package/dist/agent-farm/servers/decisions/notice.js.map +1 -0
  96. package/dist/agent-farm/servers/decisions/parse.d.ts +36 -0
  97. package/dist/agent-farm/servers/decisions/parse.d.ts.map +1 -0
  98. package/dist/agent-farm/servers/decisions/parse.js +338 -0
  99. package/dist/agent-farm/servers/decisions/parse.js.map +1 -0
  100. package/dist/agent-farm/servers/decisions/routes.d.ts +17 -0
  101. package/dist/agent-farm/servers/decisions/routes.d.ts.map +1 -0
  102. package/dist/agent-farm/servers/decisions/routes.js +160 -0
  103. package/dist/agent-farm/servers/decisions/routes.js.map +1 -0
  104. package/dist/agent-farm/servers/decisions/splice.d.ts +26 -0
  105. package/dist/agent-farm/servers/decisions/splice.d.ts.map +1 -0
  106. package/dist/agent-farm/servers/decisions/splice.js +120 -0
  107. package/dist/agent-farm/servers/decisions/splice.js.map +1 -0
  108. package/dist/agent-farm/servers/decisions/stamp.d.ts +8 -0
  109. package/dist/agent-farm/servers/decisions/stamp.d.ts.map +1 -0
  110. package/dist/agent-farm/servers/decisions/stamp.js +195 -0
  111. package/dist/agent-farm/servers/decisions/stamp.js.map +1 -0
  112. package/dist/agent-farm/servers/decisions/template.d.ts +2 -0
  113. package/dist/agent-farm/servers/decisions/template.d.ts.map +1 -0
  114. package/dist/agent-farm/servers/decisions/template.js +15 -0
  115. package/dist/agent-farm/servers/decisions/template.js.map +1 -0
  116. package/dist/agent-farm/servers/ide-server.d.ts +28 -8
  117. package/dist/agent-farm/servers/ide-server.d.ts.map +1 -1
  118. package/dist/agent-farm/servers/ide-server.js +147 -50
  119. package/dist/agent-farm/servers/ide-server.js.map +1 -1
  120. package/dist/agent-farm/servers/overview.d.ts +31 -4
  121. package/dist/agent-farm/servers/overview.d.ts.map +1 -1
  122. package/dist/agent-farm/servers/overview.js +235 -55
  123. package/dist/agent-farm/servers/overview.js.map +1 -1
  124. package/dist/agent-farm/servers/tower-instances.d.ts +14 -1
  125. package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
  126. package/dist/agent-farm/servers/tower-instances.js +51 -9
  127. package/dist/agent-farm/servers/tower-instances.js.map +1 -1
  128. package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
  129. package/dist/agent-farm/servers/tower-routes.js +113 -14
  130. package/dist/agent-farm/servers/tower-routes.js.map +1 -1
  131. package/dist/agent-farm/servers/tower-server.js +35 -1
  132. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  133. package/dist/agent-farm/servers/tower-terminals.d.ts +25 -0
  134. package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
  135. package/dist/agent-farm/servers/tower-terminals.js +128 -4
  136. package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
  137. package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
  138. package/dist/agent-farm/servers/tower-utils.js +18 -5
  139. package/dist/agent-farm/servers/tower-utils.js.map +1 -1
  140. package/dist/agent-farm/utils/builder-worktree-identity.d.ts +39 -0
  141. package/dist/agent-farm/utils/builder-worktree-identity.d.ts.map +1 -0
  142. package/dist/agent-farm/utils/builder-worktree-identity.js +42 -0
  143. package/dist/agent-farm/utils/builder-worktree-identity.js.map +1 -0
  144. package/dist/agent-farm/utils/harness.d.ts +71 -0
  145. package/dist/agent-farm/utils/harness.d.ts.map +1 -1
  146. package/dist/agent-farm/utils/harness.js +153 -0
  147. package/dist/agent-farm/utils/harness.js.map +1 -1
  148. package/dist/agent-farm/utils/lifecycle-reporter.d.ts +79 -0
  149. package/dist/agent-farm/utils/lifecycle-reporter.d.ts.map +1 -0
  150. package/dist/agent-farm/utils/lifecycle-reporter.js +347 -0
  151. package/dist/agent-farm/utils/lifecycle-reporter.js.map +1 -0
  152. package/dist/agent-farm/utils/message-format.d.ts +8 -0
  153. package/dist/agent-farm/utils/message-format.d.ts.map +1 -1
  154. package/dist/agent-farm/utils/message-format.js +16 -0
  155. package/dist/agent-farm/utils/message-format.js.map +1 -1
  156. package/dist/cli.d.ts.map +1 -1
  157. package/dist/cli.js +17 -0
  158. package/dist/cli.js.map +1 -1
  159. package/dist/commands/adopt.d.ts +16 -2
  160. package/dist/commands/adopt.d.ts.map +1 -1
  161. package/dist/commands/adopt.js +67 -23
  162. package/dist/commands/adopt.js.map +1 -1
  163. package/dist/commands/bootstrap-docs.d.ts +132 -0
  164. package/dist/commands/bootstrap-docs.d.ts.map +1 -0
  165. package/dist/commands/bootstrap-docs.js +725 -0
  166. package/dist/commands/bootstrap-docs.js.map +1 -0
  167. package/dist/commands/consult/index.d.ts +20 -1
  168. package/dist/commands/consult/index.d.ts.map +1 -1
  169. package/dist/commands/consult/index.js +70 -3
  170. package/dist/commands/consult/index.js.map +1 -1
  171. package/dist/commands/consult/tree-tripwire.d.ts +2 -75
  172. package/dist/commands/consult/tree-tripwire.d.ts.map +1 -1
  173. package/dist/commands/consult/tree-tripwire.js +7 -184
  174. package/dist/commands/consult/tree-tripwire.js.map +1 -1
  175. package/dist/commands/doctor.d.ts.map +1 -1
  176. package/dist/commands/doctor.js +36 -4
  177. package/dist/commands/doctor.js.map +1 -1
  178. package/dist/commands/porch/checks.d.ts +7 -1
  179. package/dist/commands/porch/checks.d.ts.map +1 -1
  180. package/dist/commands/porch/checks.js +77 -14
  181. package/dist/commands/porch/checks.js.map +1 -1
  182. package/dist/commands/porch/index.d.ts +38 -1
  183. package/dist/commands/porch/index.d.ts.map +1 -1
  184. package/dist/commands/porch/index.js +79 -43
  185. package/dist/commands/porch/index.js.map +1 -1
  186. package/dist/commands/porch/protocol.d.ts +4 -3
  187. package/dist/commands/porch/protocol.d.ts.map +1 -1
  188. package/dist/commands/porch/protocol.js +32 -5
  189. package/dist/commands/porch/protocol.js.map +1 -1
  190. package/dist/commands/porch/state.d.ts +0 -4
  191. package/dist/commands/porch/state.d.ts.map +1 -1
  192. package/dist/commands/porch/state.js +23 -10
  193. package/dist/commands/porch/state.js.map +1 -1
  194. package/dist/commands/porch/types.d.ts +2 -0
  195. package/dist/commands/porch/types.d.ts.map +1 -1
  196. package/dist/commands/update.d.ts +5 -1
  197. package/dist/commands/update.d.ts.map +1 -1
  198. package/dist/commands/update.js +73 -18
  199. package/dist/commands/update.js.map +1 -1
  200. package/dist/lib/agent-env.d.ts +31 -1
  201. package/dist/lib/agent-env.d.ts.map +1 -1
  202. package/dist/lib/agent-env.js +38 -1
  203. package/dist/lib/agent-env.js.map +1 -1
  204. package/dist/lib/agent-process.d.ts +23 -0
  205. package/dist/lib/agent-process.d.ts.map +1 -0
  206. package/dist/lib/agent-process.js +24 -0
  207. package/dist/lib/agent-process.js.map +1 -0
  208. package/dist/lib/config.d.ts +8 -0
  209. package/dist/lib/config.d.ts.map +1 -1
  210. package/dist/lib/config.js.map +1 -1
  211. package/dist/lib/forge-contracts.d.ts +9 -3
  212. package/dist/lib/forge-contracts.d.ts.map +1 -1
  213. package/dist/lib/forge-contracts.js.map +1 -1
  214. package/dist/lib/forge.d.ts +8 -5
  215. package/dist/lib/forge.d.ts.map +1 -1
  216. package/dist/lib/forge.js +57 -1
  217. package/dist/lib/forge.js.map +1 -1
  218. package/dist/lib/github.d.ts.map +1 -1
  219. package/dist/lib/github.js +38 -0
  220. package/dist/lib/github.js.map +1 -1
  221. package/dist/lib/governance-bootstrap.d.ts +155 -0
  222. package/dist/lib/governance-bootstrap.d.ts.map +1 -0
  223. package/dist/lib/governance-bootstrap.js +469 -0
  224. package/dist/lib/governance-bootstrap.js.map +1 -0
  225. package/dist/lib/issue-id.d.ts +34 -0
  226. package/dist/lib/issue-id.d.ts.map +1 -0
  227. package/dist/lib/issue-id.js +61 -0
  228. package/dist/lib/issue-id.js.map +1 -0
  229. package/dist/lib/scaffold.d.ts +4 -0
  230. package/dist/lib/scaffold.d.ts.map +1 -1
  231. package/dist/lib/scaffold.js +29 -5
  232. package/dist/lib/scaffold.js.map +1 -1
  233. package/dist/lib/shipped-skill-hashes.d.ts +10 -0
  234. package/dist/lib/shipped-skill-hashes.d.ts.map +1 -0
  235. package/dist/lib/shipped-skill-hashes.js +197 -0
  236. package/dist/lib/shipped-skill-hashes.js.map +1 -0
  237. package/dist/lib/skill-refresh.d.ts +90 -0
  238. package/dist/lib/skill-refresh.d.ts.map +1 -0
  239. package/dist/lib/skill-refresh.js +267 -0
  240. package/dist/lib/skill-refresh.js.map +1 -0
  241. package/dist/lib/tree-snapshot.d.ts +172 -0
  242. package/dist/lib/tree-snapshot.d.ts.map +1 -0
  243. package/dist/lib/tree-snapshot.js +393 -0
  244. package/dist/lib/tree-snapshot.js.map +1 -0
  245. package/dist/terminal/pty-session.d.ts +5 -0
  246. package/dist/terminal/pty-session.d.ts.map +1 -1
  247. package/dist/terminal/pty-session.js +7 -0
  248. package/dist/terminal/pty-session.js.map +1 -1
  249. package/ide-extension/codev-vscode.vsix +0 -0
  250. package/ide-extension/manifest.json +7 -0
  251. package/package.json +8 -6
  252. package/scripts/forge/jira/_lib.sh +113 -0
  253. package/scripts/forge/jira/auth-status.sh +29 -0
  254. package/scripts/forge/jira/issue-comment.sh +23 -0
  255. package/scripts/forge/jira/issue-list.sh +32 -0
  256. package/scripts/forge/jira/issue-search.sh +40 -0
  257. package/scripts/forge/jira/issue-view.sh +41 -0
  258. package/scripts/forge/jira/recently-closed.sh +81 -0
  259. package/scripts/forge/jira/user-identity.sh +18 -0
  260. package/skeleton/.claude/skills/afx/SKILL.md +51 -0
  261. package/skeleton/.claude/skills/arch-init/SKILL.md +56 -9
  262. package/skeleton/.claude/skills/arch-save/SKILL.md +100 -9
  263. package/skeleton/.claude/skills/codev/SKILL.md +18 -2
  264. package/skeleton/.claude/skills/consult/SKILL.md +9 -0
  265. package/skeleton/.claude/skills/porch/SKILL.md +18 -0
  266. package/skeleton/.claude/skills/update-arch-docs/SKILL.md +28 -2
  267. package/skeleton/.codex/skills/afx/SKILL.md +51 -0
  268. package/skeleton/.codex/skills/arch-init/SKILL.md +56 -9
  269. package/skeleton/.codex/skills/arch-save/SKILL.md +100 -9
  270. package/skeleton/.codex/skills/codev/SKILL.md +18 -2
  271. package/skeleton/.codex/skills/consult/SKILL.md +9 -0
  272. package/skeleton/.codex/skills/porch/SKILL.md +18 -0
  273. package/skeleton/.codex/skills/update-arch-docs/SKILL.md +28 -2
  274. package/skeleton/protocol-schema.json +6 -0
  275. package/skeleton/protocols/maintain/protocol.md +5 -0
  276. package/skeleton/protocols/pir/prompts/review.md +0 -1
  277. package/skeleton/protocols/protocol-schema.json +6 -0
  278. package/skeleton/resources/commands/agent-farm.md +156 -0
  279. package/skeleton/resources/commands/codev.md +47 -0
  280. package/skeleton/resources/commands/consult.md +9 -2
  281. package/skeleton/resources/commands/overview.md +1 -0
  282. package/skeleton/resources/decision-protocol.md +215 -0
  283. package/skeleton/resources/workflow-reference.md +12 -0
  284. package/skeleton/roles/architect.md +6 -0
  285. package/skeleton/templates/bootstrap-docs-prompt.md +16 -0
  286. package/skeleton/templates/bootstrap-docs-review-prompt.md +19 -0
  287. package/skeleton/templates/cheatsheet.md +2 -1
  288. package/dashboard-dist/assets/index-DZf6pNPE.js +0 -199
  289. package/dashboard-dist/assets/index-DZf6pNPE.js.map +0 -1
  290. package/dashboard-dist/assets/index-DnYLy5C_.css +0 -32
@@ -0,0 +1,215 @@
1
+ # Owner decisions: one file, one hub
2
+
3
+ How a workspace's owner and its architects make decisions through one markdown file,
4
+ `codev/state/pending-decisions.md`. The dashboard's **Decisions** tab is a view of that file:
5
+ see the Decisions tab section of [`commands/agent-farm.md`](commands/agent-farm.md). This is a
6
+ working agreement between people and agents, not a porch protocol; nothing is spawned from it.
7
+
8
+ - **The owner** is the human whose word clears a gate, a merge, a spend or a product choice.
9
+ - **The hub** is one architect, named `main`. It is the only agent that edits the file.
10
+ - **Every other architect** sends its asks to the hub and acts on the ruling the hub relays.
11
+
12
+ Anything that needs the owner's word goes through the file, one item per question. Status
13
+ reports and FYIs do not.
14
+
15
+ ## 1. The intake message (architect → hub)
16
+
17
+ An architect sends the item as one message:
18
+
19
+ ```bash
20
+ afx send architect:main 'DECISION <name>-<n>: <question>
21
+ <the item, exactly as it should appear>'
22
+ ```
23
+
24
+ The first line is `DECISION <name>-<n>: <question>`; append ` [urgent]` only when a live user
25
+ or running work is blocked. Single-quote the message, because inside double quotes the shell
26
+ runs the item's backticks; write an apostrophe inside it as `'\''`. Ids are
27
+ `<architect name>-<running number>` (`web-4`, `main-12`): each architect keeps its own counter
28
+ and never reuses a number.
29
+
30
+ ## 2. The item
31
+
32
+ ```markdown
33
+ ### <name>-<n> · <YYYY-MM-DD HH:mm UTC> · <The question the owner answers, naming the thing by what it does>
34
+
35
+ - **Problem:** (or **Context:**) what is wrong or undecided, as the owner would see it. One to three sentences.
36
+ - **Root cause:** why, for a fix.
37
+ - **Options:** for a choice, (a) `<word>` = what it does (b) `<word>` = what it does.
38
+ - **Fix:** what the change does, in product terms.
39
+ - **Testing:** the receipt: tests before and after, a live check, checks green on the exact head.
40
+ - **Cost:** money or time, only when a budget is involved.
41
+ - **Recommendation (<name>):** one line, owned by the architect.
42
+ - **Links:** pull request and issue URLs; spec, plan and receipt paths.
43
+
44
+ **Your word:** `<first word, recommended>` / `<second word>` / `hold`
45
+ ```
46
+
47
+ The stamp is when the item was written, in UTC on the 24-hour clock, as
48
+ `date -u '+%Y-%m-%d %H:%M UTC'` prints it; the tab shows it in each viewer's own time. Delete
49
+ labels that do not apply; never rename them. The hub bounces a malformed item back, naming
50
+ what is missing, and does not post it.
51
+
52
+ ### What the tab reads
53
+
54
+ The Decisions tab parses the file by these rules. An item that follows them gets a click box
55
+ per option and a comment box.
56
+
57
+ - **Items are the `###` headings under `## Open`.** An item runs to the next `#`, `##` or `###`
58
+ heading, so inside an item use `####` or bold labels, never a higher heading. The file has
59
+ exactly one `## Open`.
60
+ - **The heading is id · stamp · question.** The first word is the id; ` · ` (space, middle dot,
61
+ space) separates the id, the stamp and the question. A heading without a stamp is id ·
62
+ question, and a first part the tab cannot read as a stamp stays in the question, shown as
63
+ written. Open items that share an id are read-only until the ids differ.
64
+ - **The stamp carries its zone; nothing assumes one.** Agents write it as `YYYY-MM-DD HH:mm UTC`,
65
+ 24-hour and in UTC (section 2). The tab converts the stamp using only the zone written in it
66
+ and shows its date and time in the viewer's local time. For anything a person types it also
67
+ reads `YYYY-MM-DD h:mm am` (or `pm`), or 24-hour `YYYY-MM-DD HH:mm`, then the zone the time
68
+ was read in: the North-American generic zones `PT`, `MT`, `CT`, `ET`, `AKT` and `HT`
69
+ (daylight saving follows the stamp's date), fixed abbreviations such as `UTC`, `GMT`,
70
+ `EST`/`EDT`, `CET`/`CEST`, `JST` and `AEST`/`AEDT` (`CST` is North-American Central), offsets
71
+ such as `+05:30`, `UTC+5:30` or `GMT-3`, and IANA names such as `Europe/Berlin`. Any other
72
+ zone, including ambiguous abbreviations such as `IST`, `BST` and `AST`, is shown as written
73
+ and marked not converted, as is a time the clocks skipped or repeated that day.
74
+ - **A file may name its zone once.** A line `_Zone: <zone>_` above `## Open`, from the same
75
+ list of zones, is the zone of every stamp that names none; the file template's is
76
+ `_Zone: UTC_` (section 4). A bare time, `h:mm am` or `HH:mm`, is read as today in that zone
77
+ when the tab reads the file, and shown as the time alone: as written, converted to your
78
+ clock, with no date because none was written. Without a file zone, a stamp that names no
79
+ zone is shown as written. A bare time is always read as today, so one written before
80
+ midnight and read after it lands on the wrong day: the full form stays the one to write.
81
+ - **Exactly one `**Your word:**` line**, starting a line, outside a code block. The options are
82
+ the backticked words on it, separated by ` / `. The first is the recommended one, and the tab
83
+ marks it. A description follows a word after ` = ` and runs to the next ` / ` before a
84
+ backtick: `` `retry` = keep the page / `signout` = sign out / `hold` ``. Other text on the
85
+ line is ignored.
86
+ - **A bare word takes its description from `**Options:**`.** A word written without ` = …` on
87
+ the word line is described by the body's `**Options:**` entry for the same word: ``(a) `word` = …``
88
+ or ``(a) `word`: …`` after the label, or ``- `word` = …`` list items under it. A
89
+ description on the word line wins; a word with neither (`hold`) shows bare.
90
+ - **Questions and answers** are body lines above the word line, `- **You asked (<time>):** …`
91
+ and `- **<Name>'s answer (<time>):** …`, continued on lines indented two spaces. The tab shows
92
+ them on the card as a thread (section 3c).
93
+ - **Whatever follows the `**Your word:**` line is the ruling.** While nothing follows it, the
94
+ card takes a submit, which writes the chosen word on the next line and then the comment after
95
+ a blank line, exactly as the owner would type them. Once any text follows the line, typed by
96
+ hand or written by the tab, the card shows it as the current ruling and takes no new submit.
97
+ - **`## Ruled`** is shown read-only, as written.
98
+
99
+ In a file that names its zone, a bare time converts, and a heading without a stamp is an id
100
+ and a question (the item bodies are left out here):
101
+
102
+ ```markdown
103
+ _Zone: UTC_
104
+
105
+ ## Open
106
+
107
+ ### web-6 · 01:40 · Should the export keep the old column names?
108
+
109
+ ### web-5 · Should the nightly report move to the morning?
110
+ ```
111
+
112
+ A worked example, a choice with bare words on the word line:
113
+
114
+ ```markdown
115
+ ### web-4 · 2026-10-18 01:40 UTC · When a session expires mid-edit, should the login fix keep the page or sign the user out?
116
+
117
+ - **Context:** users whose session expires while they edit lose their draft when the page reloads.
118
+ - **Options:** (a) `retry` = refresh the sign-in in the background and keep the page (b) `signout` = sign the user out and keep the draft on this device
119
+ - **Testing:** unit tests cover both paths; a live check with a forced expiry kept the draft.
120
+ - **Recommendation (web):** `retry`, the smaller change for the user.
121
+ - **Links:** https://github.com/example/app/pull/412 (the login fix), `codev/specs/412-session-expiry.md`
122
+
123
+ **Your word:** `retry` / `signout` / `hold`
124
+ ```
125
+
126
+ ## 3. What the hub does
127
+
128
+ 1. **Post.** The hub puts the item at the top of `## Open`, updates the status line
129
+ (`N open — <ids>`), and tells the owner in one chat line:
130
+ `New decision from <name>: <id> — <question>`, plus `[urgent]` if marked. The item's
131
+ stamp is in UTC (section 2), and the file's `_Zone: UTC_` line stays UTC (section 4).
132
+ 2. **Learn of rulings.** The owner rules in the tab, by typing in the file, or in chat. A ruling
133
+ made in the tab reaches the hub as a message from Tower: `RULED <id>: <word>`, or
134
+ `QUESTION <id>:` when no word was chosen, with the comment on the lines after it. The notice
135
+ goes only to an architect named `main`, and waits for it to come back if it is not running;
136
+ a workspace without one gets no notice, so its hub must scan the file. A ruling typed
137
+ into the file reaches the hub when the owner says so in chat (a short agreed word, such as
138
+ `ddu` for "decisions doc updated") or when the hub's own watch on the file sees the change.
139
+ Either way the hub scans every open item for text on the lines under its `**Your word:**`
140
+ line and replies with one line per ruling found. A word in chat counts the same.
141
+ 3. **Relay and record.** For each ruling the hub relays at once,
142
+ `afx send architect:<name> 'RULING <id>: <word> (owner, <time> UTC)'`, with the owner's
143
+ comment verbatim on the lines after it when there is one, and moves the item out of
144
+ `## Open` into `## Ruled` as one line, the comment quoted after the word when there is one:
145
+ ``- **<id>** · <time> UTC · <question> → `<word>` — "<comment>"``.
146
+ A ruling that carries a question goes through 3b first.
147
+ 4. **Done.** The architect acts and replies `DONE <id>: <one line of what happened>`; the hub
148
+ appends ` → DONE <time> UTC: <what happened>` to the item's line in `## Ruled`.
149
+ 5. If the owner rules in chat to another architect directly, that architect sends the hub
150
+ `RULED <id>: <word> (owner, <time> UTC, in chat)`, and the hub records it the same way.
151
+ 6. The hub's own asks use the same format, under `main-<n>`.
152
+
153
+ The hub writes the file as little as possible: one write per scan, recording every ruling
154
+ found, and new items in batches. It re-reads the file immediately before each write. Every
155
+ time it writes, in the file or in a message, is UTC on the 24-hour clock, read from the clock
156
+ with `date -u '+%H:%M UTC'`: that is the `<time> UTC` above, and the Q&A times in 3c. A stamp
157
+ adds the date (section 2).
158
+
159
+ ### 3b. A ruling that carries a question comes back as an item
160
+
161
+ When the owner's word carries a question or a choice ("retry, but could this sign people out
162
+ twice?"), the hub does not answer it in the relay and move on. It posts a new item with the
163
+ options and its recommendation before directing anyone, unless the answer is a plain fact with
164
+ no design behind it. The same holds for a gap the hub finds after a ruling (a receipt that did
165
+ not cover what was ruled on, a step the ruling implied but did not say): it goes into the file,
166
+ as an item or as a line under the ruled item, not into chat alone. Chat tells the owner the
167
+ file changed; the file is where the decision lives.
168
+
169
+ ### 3c. The owner's question gets the architect's answer, in the item
170
+
171
+ When the owner writes a question instead of a word (in the tab's comment box, under the word
172
+ line, or in chat), the hub, in order:
173
+
174
+ 1. Relays it verbatim to the owning architect:
175
+ `afx send architect:<name> '<id>: no word yet. The owner asks: "<question>". Answer in one short plain-words message.'`
176
+ 2. Pastes the answer into the item, above the `**Your word:**` line, as two labelled lines,
177
+ adding its own check where it can make one:
178
+
179
+ ```markdown
180
+ - **You asked (02:05 UTC):** "Could retry hide a real sign-out from the user?"
181
+ - **Web's answer (02:12 UTC):** No. A refresh that fails still signs the user out and says why.
182
+ Main checked the test that forces a failed refresh: it signs out and shows the message.
183
+ ```
184
+
185
+ 3. Lifts the question out from under the word line, so that nothing follows the
186
+ `**Your word:**` line. The scan no longer reads the question as a ruling, and the tab takes
187
+ a submit again. The item stays open, and the owner rules after reading the answer. If the
188
+ answer changes the choice, the hub updates the options.
189
+
190
+ A second question gets a second pair of lines under the first.
191
+
192
+ ## 4. The file
193
+
194
+ Create it with `afx decisions init`, which writes the template below to
195
+ `codev/state/pending-decisions.md`, or to the path `dashboard.decisionsFile` names, and never
196
+ replaces a file that is already there. The Decisions tab appears once the file exists.
197
+
198
+ ```markdown
199
+ # Pending owner decisions — all architects (hub: main)
200
+
201
+ Rule inline: one word on the line under an item's **Your word:** line, or in the Decisions tab.
202
+ Newest first. Only main edits this file; architects send items with `afx send architect:main 'DECISION …'`.
203
+
204
+ _Status: 0 open._
205
+ _Zone: UTC_
206
+
207
+ ## Open
208
+
209
+ ## Ruled
210
+ ```
211
+
212
+ The `_Zone: UTC_` line stays UTC. Agents write every stamp in UTC, and the line is the zone of
213
+ any stamp that names none, bare times included; a person who types a time in another zone
214
+ writes the zone after it. Newest first in both sections.
215
+ `## Open` holds only what still needs a word; `## Ruled` keeps one line per item.
@@ -231,6 +231,18 @@ afx cleanup -p XXXX # Clean up builder worktree
231
231
  3. Builder: Rebase or merge main into branch
232
232
  4. Builder: Force push if needed
233
233
 
234
+ ### Claude Agent Exits With "Settings file not found"
235
+
236
+ A Claude builder or architect that exits at once with `Settings file not found` (exit 1),
237
+ with its builder loop relaunching every 2 seconds, means the attention-state reporter
238
+ files under `~/.agent-farm/hooks/` were deleted. Any Tower launch reinstalls them:
239
+
240
+ ```bash
241
+ afx spawn XXXX --resume
242
+ # or, for a whole workspace
243
+ afx workspace recover
244
+ ```
245
+
234
246
  ### Builder Worktree Broken
235
247
 
236
248
  ```bash
@@ -67,6 +67,12 @@ dev-approval — lead with **Problem · Root Cause · Fix · Testing**, unprompt
67
67
  tier. Verify the root cause yourself: a builder's summary is evidence, not ground truth. The
68
68
  human should be able to answer from your message without opening the diff.
69
69
 
70
+ ### The owner decisions file
71
+
72
+ A workspace may collect every ask for the human's word in `codev/state/pending-decisions.md`,
73
+ the dashboard's **Decisions** tab, with the architect `main` as hub and only editor. When the
74
+ owner asks to use decisions, run `afx decisions init` and follow `codev/resources/decision-protocol.md`.
75
+
70
76
  ## UX verification
71
77
 
72
78
  Before approving anything with UX requirements, exercise the actual user path. A spec that says
@@ -0,0 +1,16 @@
1
+ You are drafting the first version of the Codev governance docs for the project **{{PROJECT_NAME}}**, an existing codebase that uses Codev but whose governance docs are still the starter placeholders. Work in **bootstrap-mode** of the `update-arch-docs` skill. {{SKILL_SOURCE}}
2
+
3
+ ## Your files
4
+
5
+ Write these files (they still hold the Codev starter placeholders):
6
+
7
+ {{ELIGIBLE_FILES}}
8
+
9
+ Read these files as input, but do **not** edit them (they already hold curated content):
10
+
11
+ {{CURATED_FILES}}
12
+
13
+ ## This session
14
+
15
+ Bootstrap-mode's rules apply in full, including exploring the git history yourself with read-only commands. When you exit, Codev validates the drafts against those rules and reports any change outside the files above. Nothing is reverted; the human reviews everything before committing.
16
+ {{SKILL_TEXT}}
@@ -0,0 +1,19 @@
1
+ You are reviewing a first draft of the Codev governance docs for the project **{{PROJECT_NAME}}**. An agent drafted them from this repository's code and git history; a human will read your review before committing anything. Do not edit any file. Report only.
2
+
3
+ The governance docs come in two tiers. The cold docs (`arch.md`, `lessons-learned.md`) are on-demand reference. The hot docs (`arch-critical.md`, `lessons-critical.md`) are injected into every agent prompt, so each one is capped (at most 10 entries, at most 12 map entries, at most 35 lines outside HTML comments) and carries a "consult when…" map whose entries name real top-level sections of its cold doc.
4
+
5
+ ## The drafts
6
+
7
+ {{DRAFTS}}
8
+
9
+ ## What to check
10
+
11
+ Check the drafts against the repository itself (read the code and run read-only git commands as needed), and report:
12
+
13
+ 1. **System-shape accuracy.** Statements in `arch.md` or `arch-critical.md` that the code contradicts, or major parts of the system (processes, persistence, transports, build wiring) the drafts leave out.
14
+ 2. **Invented or unevidenced lessons.** Lessons with no trace in the code, comments or git history. A thin lessons file is acceptable; an invented lesson is not.
15
+ 3. **Content the docs must not hold.** Per-file enumerations, per-commit or per-spec changelog narration, and aspirational or planned state described as current.
16
+ 4. **Hot-tier problems.** An entry that is not load-bearing enough to be always-on, a load-bearing fact left only in the cold doc, a map entry that does not match a cold section, or a cap that is exceeded.
17
+ 5. **Sensitive material.** Credentials, tokens, keys, internal hostnames or endpoints, connection strings, or customer data, even as examples. Name the file and line; this is the most important check.
18
+
19
+ For each finding, name the file, quote the text, and say what should change. End with a one-line overall judgement of whether the drafts are ready for the human to review and commit.
@@ -61,7 +61,7 @@ A **protocol** is a structured workflow that defines how work progresses from id
61
61
  | Protocol | Use For | Phases |
62
62
  |----------|---------|--------|
63
63
  | **SPIR** | New features | Specify → Plan → Implement → Review |
64
- | **MAINTAIN** | Codebase hygiene | Dead code removal, documentation sync |
64
+ | **MAINTAIN** | Scheduled codebase hygiene | Whole-repo audit → clean → sync run since the last one, on the human's call. Not for a single targeted cleanup or doc fix (that is a BUGFIX) |
65
65
  | **EXPERIMENT** | Research & prototyping | Hypothesis → Experiment → Conclude |
66
66
  | **RESEARCH** | Multi-agent research | Scope → Investigate (3-way) → Synthesize → Critique (3-way) |
67
67
 
@@ -101,6 +101,7 @@ Project management commands. Typically used by **humans** to set up and maintain
101
101
  |---------|-------------|
102
102
  | `codev init <dirname>` | Create a new Codev project |
103
103
  | `codev adopt` | Add Codev to an existing project |
104
+ | `codev bootstrap-docs` | Draft the governance docs from an existing codebase |
104
105
  | `codev doctor` | Check dependencies and configuration |
105
106
  | `codev update` | Update Codev framework |
106
107
  | `codev import` | Import specs from another project |