@stravica-ai/digital-operator-pa 0.1.0

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 (372) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +170 -0
  3. package/bin/desk +9 -0
  4. package/bin/distill +2 -0
  5. package/bin/estate-sync +2 -0
  6. package/bin/launch +2 -0
  7. package/bin/memory-sync +2 -0
  8. package/bin/migrate-inspect +2 -0
  9. package/bin/pa +2 -0
  10. package/bin/pa-coordinator-hook +2 -0
  11. package/bin/pa-init +2 -0
  12. package/bin/research +2 -0
  13. package/bin/scheduler +2 -0
  14. package/bin/secrets +2 -0
  15. package/bin/slice +2 -0
  16. package/bin/smoke +9 -0
  17. package/bin/sync +2 -0
  18. package/dist/engineering-pa-cli/README.md +205 -0
  19. package/dist/engineering-pa-cli/bin/estate-sync +2 -0
  20. package/dist/engineering-pa-cli/bin/launch +2 -0
  21. package/dist/engineering-pa-cli/bin/pa +2 -0
  22. package/dist/engineering-pa-cli/bin/pa-coordinator-hook +12 -0
  23. package/dist/engineering-pa-cli/bin/research +2 -0
  24. package/dist/engineering-pa-cli/bin/scheduler +2 -0
  25. package/dist/engineering-pa-cli/bin/secrets +2 -0
  26. package/dist/engineering-pa-cli/bin/smoke +9 -0
  27. package/dist/engineering-pa-cli/bin/sync +2 -0
  28. package/dist/engineering-pa-cli/config/coordinator-allowlist.json +118 -0
  29. package/dist/engineering-pa-cli/docs/coordinator-hook.md +211 -0
  30. package/dist/engineering-pa-cli/docs/estate-sync.md +412 -0
  31. package/dist/engineering-pa-cli/docs/gsc.md +175 -0
  32. package/dist/engineering-pa-cli/docs/lint-linkedin.md +139 -0
  33. package/dist/engineering-pa-cli/docs/secrets.md +221 -0
  34. package/dist/engineering-pa-cli/docs/smoke.md +113 -0
  35. package/dist/engineering-pa-cli/docs/staging-alias.md +114 -0
  36. package/dist/engineering-pa-cli/index.mjs +17 -0
  37. package/dist/engineering-pa-cli/package.json +37 -0
  38. package/dist/engineering-pa-cli/src/autonomy/cli.mjs +329 -0
  39. package/dist/engineering-pa-cli/src/autonomy/envelope.mjs +301 -0
  40. package/dist/engineering-pa-cli/src/coordinator-hook/cli.mjs +140 -0
  41. package/dist/engineering-pa-cli/src/coordinator-hook/config.mjs +134 -0
  42. package/dist/engineering-pa-cli/src/coordinator-hook/message.mjs +47 -0
  43. package/dist/engineering-pa-cli/src/coordinator-hook/policy.mjs +211 -0
  44. package/dist/engineering-pa-cli/src/coordinator-hook/repo-root.mjs +44 -0
  45. package/dist/engineering-pa-cli/src/coordinator-hook/self.mjs +30 -0
  46. package/dist/engineering-pa-cli/src/environment/cli.mjs +287 -0
  47. package/dist/engineering-pa-cli/src/environment/probes.mjs +302 -0
  48. package/dist/engineering-pa-cli/src/gsc/auth.mjs +148 -0
  49. package/dist/engineering-pa-cli/src/gsc/cli.mjs +93 -0
  50. package/dist/engineering-pa-cli/src/gsc/cloudflare.mjs +318 -0
  51. package/dist/engineering-pa-cli/src/gsc/commands/add-property.mjs +70 -0
  52. package/dist/engineering-pa-cli/src/gsc/commands/list-properties.mjs +33 -0
  53. package/dist/engineering-pa-cli/src/gsc/commands/pull-analytics.mjs +130 -0
  54. package/dist/engineering-pa-cli/src/gsc/commands/submit-sitemap.mjs +41 -0
  55. package/dist/engineering-pa-cli/src/gsc/commands/verify-via-cf-dns.mjs +189 -0
  56. package/dist/engineering-pa-cli/src/knowledge/call-log.mjs +59 -0
  57. package/dist/engineering-pa-cli/src/knowledge/cli.mjs +242 -0
  58. package/dist/engineering-pa-cli/src/knowledge/eval.mjs +446 -0
  59. package/dist/engineering-pa-cli/src/knowledge/formatters.mjs +331 -0
  60. package/dist/engineering-pa-cli/src/knowledge/graph.mjs +710 -0
  61. package/dist/engineering-pa-cli/src/launch/README.md +214 -0
  62. package/dist/engineering-pa-cli/src/launch/cli.mjs +51 -0
  63. package/dist/engineering-pa-cli/src/launch/commands/launch.mjs +106 -0
  64. package/dist/engineering-pa-cli/src/launch/identity.mjs +43 -0
  65. package/dist/engineering-pa-cli/src/launch/planner.mjs +44 -0
  66. package/dist/engineering-pa-cli/src/launch/repo-root.mjs +53 -0
  67. package/dist/engineering-pa-cli/src/launch/runner.mjs +147 -0
  68. package/dist/engineering-pa-cli/src/launch/task-loader.mjs +85 -0
  69. package/dist/engineering-pa-cli/src/lint/cli.mjs +61 -0
  70. package/dist/engineering-pa-cli/src/lint/commands/linkedin.mjs +133 -0
  71. package/dist/engineering-pa-cli/src/lint/detectors.mjs +90 -0
  72. package/dist/engineering-pa-cli/src/lint/linter.mjs +69 -0
  73. package/dist/engineering-pa-cli/src/lint/reporter.mjs +32 -0
  74. package/dist/engineering-pa-cli/src/lint/rules.mjs +132 -0
  75. package/dist/engineering-pa-cli/src/pa/cli.mjs +369 -0
  76. package/dist/engineering-pa-cli/src/pa/doc-groups.mjs +164 -0
  77. package/dist/engineering-pa-cli/src/pa/io.mjs +80 -0
  78. package/dist/engineering-pa-cli/src/pa/project-cli.mjs +385 -0
  79. package/dist/engineering-pa-cli/src/pa/projects.mjs +352 -0
  80. package/dist/engineering-pa-cli/src/pa/repo-root.mjs +64 -0
  81. package/dist/engineering-pa-cli/src/pa/session.mjs +254 -0
  82. package/dist/engineering-pa-cli/src/pa/work-cli.mjs +164 -0
  83. package/dist/engineering-pa-cli/src/pa/work.mjs +196 -0
  84. package/dist/engineering-pa-cli/src/pa/workstreams.mjs +201 -0
  85. package/dist/engineering-pa-cli/src/research/README.md +360 -0
  86. package/dist/engineering-pa-cli/src/research/briefs/extractor.md +103 -0
  87. package/dist/engineering-pa-cli/src/research/briefs/searcher.md +113 -0
  88. package/dist/engineering-pa-cli/src/research/briefs/synthesizer.md +124 -0
  89. package/dist/engineering-pa-cli/src/research/briefs/verifier.md +86 -0
  90. package/dist/engineering-pa-cli/src/research/cli.mjs +141 -0
  91. package/dist/engineering-pa-cli/src/research/commands/gates.mjs +176 -0
  92. package/dist/engineering-pa-cli/src/research/commands/list.mjs +56 -0
  93. package/dist/engineering-pa-cli/src/research/commands/mark.mjs +97 -0
  94. package/dist/engineering-pa-cli/src/research/commands/paths.mjs +69 -0
  95. package/dist/engineering-pa-cli/src/research/commands/prune.mjs +86 -0
  96. package/dist/engineering-pa-cli/src/research/commands/run.mjs +94 -0
  97. package/dist/engineering-pa-cli/src/research/commands/show.mjs +43 -0
  98. package/dist/engineering-pa-cli/src/research/docs/operator-present-flow.md +120 -0
  99. package/dist/engineering-pa-cli/src/research/format.mjs +59 -0
  100. package/dist/engineering-pa-cli/src/research/promote.mjs +260 -0
  101. package/dist/engineering-pa-cli/src/research/schema/finding.schema.json +55 -0
  102. package/dist/engineering-pa-cli/src/research/schema/gates.schema.json +34 -0
  103. package/dist/engineering-pa-cli/src/research/schema/manifest.schema.json +59 -0
  104. package/dist/engineering-pa-cli/src/research/schema/plan.schema.json +41 -0
  105. package/dist/engineering-pa-cli/src/research/schema/sources.schema.json +31 -0
  106. package/dist/engineering-pa-cli/src/research/store/findings.mjs +61 -0
  107. package/dist/engineering-pa-cli/src/research/store/gates.mjs +73 -0
  108. package/dist/engineering-pa-cli/src/research/store/index.mjs +312 -0
  109. package/dist/engineering-pa-cli/src/research/store/manifest.mjs +56 -0
  110. package/dist/engineering-pa-cli/src/research/store/plan.mjs +59 -0
  111. package/dist/engineering-pa-cli/src/research/store/sources.mjs +44 -0
  112. package/dist/engineering-pa-cli/src/research/store/validate.mjs +92 -0
  113. package/dist/engineering-pa-cli/src/research/workflows/research-normal.js +573 -0
  114. package/dist/engineering-pa-cli/src/scheduler/cli.mjs +197 -0
  115. package/dist/engineering-pa-cli/src/secrets/cli.mjs +254 -0
  116. package/dist/engineering-pa-cli/src/secrets/commands/backup-template.mjs +67 -0
  117. package/dist/engineering-pa-cli/src/secrets/commands/backup.mjs +85 -0
  118. package/dist/engineering-pa-cli/src/secrets/commands/delete.mjs +58 -0
  119. package/dist/engineering-pa-cli/src/secrets/commands/find.mjs +36 -0
  120. package/dist/engineering-pa-cli/src/secrets/commands/get.mjs +49 -0
  121. package/dist/engineering-pa-cli/src/secrets/commands/init.mjs +69 -0
  122. package/dist/engineering-pa-cli/src/secrets/commands/list.mjs +37 -0
  123. package/dist/engineering-pa-cli/src/secrets/commands/rotate.mjs +46 -0
  124. package/dist/engineering-pa-cli/src/secrets/commands/set.mjs +123 -0
  125. package/dist/engineering-pa-cli/src/secrets/commands/status.mjs +146 -0
  126. package/dist/engineering-pa-cli/src/secrets/commands/vaults.mjs +57 -0
  127. package/dist/engineering-pa-cli/src/secrets/commands/verify.mjs +143 -0
  128. package/dist/engineering-pa-cli/src/secrets/vault.mjs +766 -0
  129. package/dist/engineering-pa-cli/src/smoke/checks.mjs +199 -0
  130. package/dist/engineering-pa-cli/src/smoke/cli.mjs +108 -0
  131. package/dist/engineering-pa-cli/src/smoke/commands/run.mjs +237 -0
  132. package/dist/engineering-pa-cli/src/smoke/runner.mjs +191 -0
  133. package/dist/engineering-pa-cli/src/staging-alias/cli.mjs +91 -0
  134. package/dist/engineering-pa-cli/src/staging-alias/cloudflare.mjs +380 -0
  135. package/dist/engineering-pa-cli/src/staging-alias/commands/list.mjs +36 -0
  136. package/dist/engineering-pa-cli/src/staging-alias/commands/set.mjs +188 -0
  137. package/dist/engineering-pa-cli/src/staging-alias/commands/status.mjs +113 -0
  138. package/dist/engineering-pa-cli/src/staging-alias/commands/unset.mjs +95 -0
  139. package/dist/engineering-pa-cli/src/staging-alias/sites.mjs +105 -0
  140. package/dist/engineering-pa-cli/src/sync/cli.mjs +151 -0
  141. package/dist/engineering-pa-cli/src/sync/git.mjs +149 -0
  142. package/dist/engineering-pa-cli/src/sync/lock.mjs +30 -0
  143. package/dist/engineering-pa-cli/src/sync/regenerated-artifacts.mjs +114 -0
  144. package/dist/engineering-pa-cli/src/sync/registry-scope.mjs +260 -0
  145. package/dist/engineering-pa-cli/src/sync/run.mjs +531 -0
  146. package/dist/engineering-pa-cli/src/sync/runner.mjs +62 -0
  147. package/dist/engineering-pa-cli/src/sync/runs-digest.mjs +138 -0
  148. package/dist/engineering-pa-core/README.md +60 -0
  149. package/dist/engineering-pa-core/bin/desk +9 -0
  150. package/dist/engineering-pa-core/bin/distill +2 -0
  151. package/dist/engineering-pa-core/bin/memory-sync +2 -0
  152. package/dist/engineering-pa-core/bin/slice +2 -0
  153. package/dist/engineering-pa-core/docs/autonomy-envelope-tracker.md +111 -0
  154. package/dist/engineering-pa-core/docs/blueprints/README.md +45 -0
  155. package/dist/engineering-pa-core/docs/blueprints/docker-services/blueprint.md +168 -0
  156. package/dist/engineering-pa-core/docs/blueprints/git-identity/blueprint.md +116 -0
  157. package/dist/engineering-pa-core/docs/blueprints/ideas/custom-workspace-views.md +9 -0
  158. package/dist/engineering-pa-core/docs/blueprints/ideas/knowledge-domain-patterns.md +15 -0
  159. package/dist/engineering-pa-core/docs/blueprints/ideas/office-integration.md +11 -0
  160. package/dist/engineering-pa-core/docs/blueprints/ideas/team-scaling.md +9 -0
  161. package/dist/engineering-pa-core/docs/blueprints/ideas/work-personal-separation.md +9 -0
  162. package/dist/engineering-pa-core/docs/blueprints/scheduled-distillation/blueprint.md +129 -0
  163. package/dist/engineering-pa-core/docs/blueprints/tool-integration/blueprint.md +110 -0
  164. package/dist/engineering-pa-core/docs/commands/init.md +159 -0
  165. package/dist/engineering-pa-core/docs/commands/schedule.md +98 -0
  166. package/dist/engineering-pa-core/docs/commands/upgrade.md +67 -0
  167. package/dist/engineering-pa-core/docs/entity-location-map.md +93 -0
  168. package/dist/engineering-pa-core/docs/knowledge-scaffold.md +121 -0
  169. package/dist/engineering-pa-core/docs/lock.md +155 -0
  170. package/dist/engineering-pa-core/docs/memory-sync.md +28 -0
  171. package/dist/engineering-pa-core/docs/pa-operating-model.md +457 -0
  172. package/dist/engineering-pa-core/docs/scheduling.md +35 -0
  173. package/dist/engineering-pa-core/docs/standards/README.md +24 -0
  174. package/dist/engineering-pa-core/docs/standards/briefing-contract.md +161 -0
  175. package/dist/engineering-pa-core/docs/standards/tooling.md +240 -0
  176. package/dist/engineering-pa-core/docs/tools/distill.md +230 -0
  177. package/dist/engineering-pa-core/docs/tools/memory-sync.md +98 -0
  178. package/dist/engineering-pa-core/docs/tools/scheduler.md +243 -0
  179. package/dist/engineering-pa-core/docs/tools/slice.md +150 -0
  180. package/dist/engineering-pa-core/docs/upstream-issue-filing.md +88 -0
  181. package/dist/engineering-pa-core/docs/working-directory.md +29 -0
  182. package/dist/engineering-pa-core/docs/workspace-operations.md +46 -0
  183. package/dist/engineering-pa-core/index.mjs +21 -0
  184. package/dist/engineering-pa-core/knowledge/README.md +53 -0
  185. package/dist/engineering-pa-core/knowledge/canonical/.gitkeep +0 -0
  186. package/dist/engineering-pa-core/knowledge/content-voice/README.md +64 -0
  187. package/dist/engineering-pa-core/knowledge/content-voice/banned-ai-tells-baseline.md +133 -0
  188. package/dist/engineering-pa-core/knowledge/content-voice/banned-ai-tells-shape.md +58 -0
  189. package/dist/engineering-pa-core/knowledge/content-voice/banned-ai-tells-taxonomy.md +33 -0
  190. package/dist/engineering-pa-core/knowledge/content-voice/content-pipeline-routing.md +58 -0
  191. package/dist/engineering-pa-core/knowledge/content-voice/new-tell-capture-procedure.md +40 -0
  192. package/dist/engineering-pa-core/knowledge/content-voice/voice-guide-shape.md +43 -0
  193. package/dist/engineering-pa-core/knowledge/delegation-dispatch/README.md +34 -0
  194. package/dist/engineering-pa-core/knowledge/delegation-dispatch/briefing-contract.md +77 -0
  195. package/dist/engineering-pa-core/knowledge/delegation-dispatch/delegation-modes.md +84 -0
  196. package/dist/engineering-pa-core/knowledge/delegation-dispatch/dispatch-envelope.md +238 -0
  197. package/dist/engineering-pa-core/knowledge/delegation-dispatch/task-groups-and-orchestrators.md +62 -0
  198. package/dist/engineering-pa-core/knowledge/delegation-dispatch/team-improvement-loop.md +48 -0
  199. package/dist/engineering-pa-core/knowledge/delegation-dispatch/tool-development-policy.md +48 -0
  200. package/dist/engineering-pa-core/knowledge/engineering-discipline/README.md +33 -0
  201. package/dist/engineering-pa-core/knowledge/engineering-discipline/blast-radius-and-safety.md +50 -0
  202. package/dist/engineering-pa-core/knowledge/engineering-discipline/investigate-root-causes.md +48 -0
  203. package/dist/engineering-pa-core/knowledge/engineering-discipline/role-ladder.md +57 -0
  204. package/dist/engineering-pa-core/knowledge/engineering-discipline/verify-runtime-behaviour.md +53 -0
  205. package/dist/engineering-pa-core/knowledge/engineering-discipline/worktree-isolation.md +50 -0
  206. package/dist/engineering-pa-core/knowledge/knowledge-memory/README.md +33 -0
  207. package/dist/engineering-pa-core/knowledge/knowledge-memory/claude-md-hygiene.md +47 -0
  208. package/dist/engineering-pa-core/knowledge/knowledge-memory/journal-and-self-improvement.md +53 -0
  209. package/dist/engineering-pa-core/knowledge/knowledge-memory/knowledge-retrieval-discipline.md +62 -0
  210. package/dist/engineering-pa-core/knowledge/knowledge-memory/librarian-synthesis-mandate.md +56 -0
  211. package/dist/engineering-pa-core/knowledge/knowledge-memory/staging-and-observations.md +58 -0
  212. package/dist/engineering-pa-core/knowledge/operator-interface/README.md +32 -0
  213. package/dist/engineering-pa-core/knowledge/operator-interface/communication-style.md +33 -0
  214. package/dist/engineering-pa-core/knowledge/operator-interface/escalation-and-correction.md +45 -0
  215. package/dist/engineering-pa-core/knowledge/operator-interface/push-back-discipline.md +42 -0
  216. package/dist/engineering-pa-core/knowledge/operator-interface/session-boot-and-end.md +56 -0
  217. package/dist/engineering-pa-core/knowledge/platform-tooling/README.md +37 -0
  218. package/dist/engineering-pa-core/knowledge/platform-tooling/desk-cli-reference.md +52 -0
  219. package/dist/engineering-pa-core/knowledge/platform-tooling/environment-awareness.md +91 -0
  220. package/dist/engineering-pa-core/knowledge/platform-tooling/mcp-servers-catalogue.md +52 -0
  221. package/dist/engineering-pa-core/knowledge/platform-tooling/pa-cli-reference.md +55 -0
  222. package/dist/engineering-pa-core/knowledge/platform-tooling/scheduling-and-launchd.md +56 -0
  223. package/dist/engineering-pa-core/knowledge/platform-tooling/tool-discovery-discipline.md +49 -0
  224. package/dist/engineering-pa-core/knowledge/platform-tooling/working-directory-vs-project-root.md +43 -0
  225. package/dist/engineering-pa-core/knowledge/platform-tooling/workspace-server.md +51 -0
  226. package/dist/engineering-pa-core/knowledge/raw/.gitkeep +0 -0
  227. package/dist/engineering-pa-core/knowledge/scaffold/domains.json +5 -0
  228. package/dist/engineering-pa-core/knowledge/schema/.gitkeep +0 -0
  229. package/dist/engineering-pa-core/knowledge/work-management/README.md +33 -0
  230. package/dist/engineering-pa-core/knowledge/work-management/desk-cli.md +84 -0
  231. package/dist/engineering-pa-core/knowledge/work-management/progress-md.md +48 -0
  232. package/dist/engineering-pa-core/knowledge/work-management/projects.md +64 -0
  233. package/dist/engineering-pa-core/knowledge/work-management/spawn-log.md +48 -0
  234. package/dist/engineering-pa-core/knowledge/work-management/work-items.md +67 -0
  235. package/dist/engineering-pa-core/package.json +26 -0
  236. package/dist/engineering-pa-core/roles/agent-ops/definition.md +79 -0
  237. package/dist/engineering-pa-core/roles/dispatch-briefer/definition.md +195 -0
  238. package/dist/engineering-pa-core/roles/librarian/definition.md +176 -0
  239. package/dist/engineering-pa-core/roles/pa/definition.md +93 -0
  240. package/dist/engineering-pa-core/roles/system-admin/definition.md +106 -0
  241. package/dist/engineering-pa-core/roles/tool-developer/definition.md +116 -0
  242. package/dist/engineering-pa-core/roles/writer/definition.md +130 -0
  243. package/dist/engineering-pa-core/schema/autonomy-envelope.schema.json +61 -0
  244. package/dist/engineering-pa-core/schema/project.json +114 -0
  245. package/dist/engineering-pa-core/schema/schedule.json +63 -0
  246. package/dist/engineering-pa-core/schema/work-item.json +92 -0
  247. package/dist/engineering-pa-core/src/config/pa-package-name.mjs +30 -0
  248. package/dist/engineering-pa-core/src/desk/cli.mjs +95 -0
  249. package/dist/engineering-pa-core/src/desk/commands.mjs +398 -0
  250. package/dist/engineering-pa-core/src/desk/format.mjs +84 -0
  251. package/dist/engineering-pa-core/src/desk/repo.mjs +172 -0
  252. package/dist/engineering-pa-core/src/desk/team-scope.mjs +142 -0
  253. package/dist/engineering-pa-core/src/distill/cli.mjs +112 -0
  254. package/dist/engineering-pa-core/src/distill/prereqs.mjs +171 -0
  255. package/dist/engineering-pa-core/src/distill/prompt.mjs +74 -0
  256. package/dist/engineering-pa-core/src/distill/run.mjs +230 -0
  257. package/dist/engineering-pa-core/src/distill/runner.mjs +86 -0
  258. package/dist/engineering-pa-core/src/distill/staging.mjs +59 -0
  259. package/dist/engineering-pa-core/src/knowledge/retrieval/backlink-indexer.mjs +154 -0
  260. package/dist/engineering-pa-core/src/knowledge/retrieval/graph-builder.mjs +186 -0
  261. package/dist/engineering-pa-core/src/knowledge/retrieval/index-builder.mjs +225 -0
  262. package/dist/engineering-pa-core/src/knowledge/retrieval/query.mjs +263 -0
  263. package/dist/engineering-pa-core/src/lock/lock.mjs +202 -0
  264. package/dist/engineering-pa-core/src/memory-sync/cli-support.mjs +12 -0
  265. package/dist/engineering-pa-core/src/memory-sync/cli.mjs +56 -0
  266. package/dist/engineering-pa-core/src/memory-sync/commands/pull.mjs +44 -0
  267. package/dist/engineering-pa-core/src/memory-sync/commands/push.mjs +46 -0
  268. package/dist/engineering-pa-core/src/memory-sync/mirror.mjs +114 -0
  269. package/dist/engineering-pa-core/src/memory-sync/repo.mjs +65 -0
  270. package/dist/engineering-pa-core/src/scheduler/detect.mjs +111 -0
  271. package/dist/engineering-pa-core/src/scheduler/host.mjs +38 -0
  272. package/dist/engineering-pa-core/src/scheduler/index.mjs +13 -0
  273. package/dist/engineering-pa-core/src/scheduler/install.mjs +854 -0
  274. package/dist/engineering-pa-core/src/scheduler/list.mjs +168 -0
  275. package/dist/engineering-pa-core/src/scheduler/remove.mjs +176 -0
  276. package/dist/engineering-pa-core/src/scheduler/verify.mjs +435 -0
  277. package/dist/engineering-pa-core/src/session-boot/autonomy-injection.mjs +84 -0
  278. package/dist/engineering-pa-core/src/slice/cli.mjs +139 -0
  279. package/dist/engineering-pa-core/src/slice/inputs.mjs +174 -0
  280. package/dist/engineering-pa-core/src/slice/prompt.mjs +94 -0
  281. package/dist/engineering-pa-core/src/slice/prompts/dave-boot.md +91 -0
  282. package/dist/engineering-pa-core/src/slice/run.mjs +334 -0
  283. package/dist/engineering-pa-core-extensions-atlassian/README.md +31 -0
  284. package/dist/engineering-pa-core-extensions-atlassian/index.mjs +9 -0
  285. package/dist/engineering-pa-core-extensions-atlassian/package.json +19 -0
  286. package/dist/engineering-pa-core-extensions-n8n/README.md +29 -0
  287. package/dist/engineering-pa-core-extensions-n8n/index.mjs +8 -0
  288. package/dist/engineering-pa-core-extensions-n8n/package.json +19 -0
  289. package/dist/engineering-pa-librarian/README.md +38 -0
  290. package/dist/engineering-pa-librarian/index.mjs +12 -0
  291. package/dist/engineering-pa-librarian/package.json +19 -0
  292. package/dist/engineering-pa-migrate-inspect/README.md +131 -0
  293. package/dist/engineering-pa-migrate-inspect/bin/migrate-inspect +2 -0
  294. package/dist/engineering-pa-migrate-inspect/package.json +21 -0
  295. package/dist/engineering-pa-migrate-inspect/src/age-key-migrate.mjs +83 -0
  296. package/dist/engineering-pa-migrate-inspect/src/cli.mjs +97 -0
  297. package/dist/engineering-pa-migrate-inspect/src/inspector.mjs +237 -0
  298. package/dist/engineering-pa-migrate-inspect/src/platforms/linux.mjs +87 -0
  299. package/dist/engineering-pa-migrate-inspect/src/platforms/macos.mjs +105 -0
  300. package/dist/engineering-pa-migrate-inspect/src/runner.mjs +87 -0
  301. package/dist/engineering-pa-runbook/README.md +103 -0
  302. package/dist/engineering-pa-runbook/package.json +18 -0
  303. package/dist/engineering-pa-runbook/reference/dex-template.runbook.json +66 -0
  304. package/dist/engineering-pa-runbook/reference/hq-dave.runbook.json +69 -0
  305. package/dist/engineering-pa-runbook/reference/smarthome01.runbook.json +92 -0
  306. package/dist/engineering-pa-runbook/schema/inspection.schema.json +113 -0
  307. package/dist/engineering-pa-runbook/schema/runbook.schema.json +67 -0
  308. package/dist/engineering-pa-runbook/src/validator.mjs +167 -0
  309. package/dist/engineering-pa-scaffold/README.md +164 -0
  310. package/dist/engineering-pa-scaffold/bin/pa-init +2 -0
  311. package/dist/engineering-pa-scaffold/index.mjs +42 -0
  312. package/dist/engineering-pa-scaffold/package.json +22 -0
  313. package/dist/engineering-pa-scaffold/src/cli.mjs +115 -0
  314. package/dist/engineering-pa-scaffold/src/commands/init.mjs +169 -0
  315. package/dist/engineering-pa-scaffold/src/generator.mjs +354 -0
  316. package/dist/engineering-pa-scaffold/src/prompts.mjs +125 -0
  317. package/dist/engineering-pa-scaffold/src/runner.mjs +142 -0
  318. package/dist/engineering-pa-scaffold/templates/CLAUDE.md.template +196 -0
  319. package/dist/engineering-pa-scaffold/templates/operator-README.md.template +44 -0
  320. package/dist/engineering-pa-types-engineering/README.md +35 -0
  321. package/dist/engineering-pa-types-engineering/docs/commands/product-build.md +120 -0
  322. package/dist/engineering-pa-types-engineering/index.mjs +9 -0
  323. package/dist/engineering-pa-types-engineering/package.json +19 -0
  324. package/dist/engineering-pa-types-engineering/roles/product-engineer/definition.md +650 -0
  325. package/dist/engineering-pa-types-engineering/roles/product-engineer/templates/build-spec.md +82 -0
  326. package/dist/engineering-pa-types-engineering/roles/product-engineer/templates/preflight-checklist.md +158 -0
  327. package/dist/engineering-pa-types-engineering/roles/product-engineer/templates/worker-brief.md +130 -0
  328. package/dist/engineering-pa-workspace/README.md +197 -0
  329. package/dist/engineering-pa-workspace/app/assets/md.js +187 -0
  330. package/dist/engineering-pa-workspace/app/assets/modal.js +120 -0
  331. package/dist/engineering-pa-workspace/app/assets/theme.css +132 -0
  332. package/dist/engineering-pa-workspace/app/assets/theme.js +159 -0
  333. package/dist/engineering-pa-workspace/app/banner.js +320 -0
  334. package/dist/engineering-pa-workspace/app/delegations.html +345 -0
  335. package/dist/engineering-pa-workspace/app/home.html +1060 -0
  336. package/dist/engineering-pa-workspace/app/index.html +361 -0
  337. package/dist/engineering-pa-workspace/app/knowledge-map.html +163 -0
  338. package/dist/engineering-pa-workspace/app/knowledge.html +304 -0
  339. package/dist/engineering-pa-workspace/app/nav.json +75 -0
  340. package/dist/engineering-pa-workspace/app/notes.html +199 -0
  341. package/dist/engineering-pa-workspace/app/onboarding.html +592 -0
  342. package/dist/engineering-pa-workspace/app/profile.html +243 -0
  343. package/dist/engineering-pa-workspace/app/project-detail.html +432 -0
  344. package/dist/engineering-pa-workspace/app/projects.html +297 -0
  345. package/dist/engineering-pa-workspace/app/repos.html +598 -0
  346. package/dist/engineering-pa-workspace/app/schedules.html +486 -0
  347. package/dist/engineering-pa-workspace/app/secrets.html +164 -0
  348. package/dist/engineering-pa-workspace/app/staging.html +319 -0
  349. package/dist/engineering-pa-workspace/app/tasks.html +465 -0
  350. package/dist/engineering-pa-workspace/app/vendor/chart.umd.min.js +21 -0
  351. package/dist/engineering-pa-workspace/app/viewer.html +116 -0
  352. package/dist/engineering-pa-workspace/docs/DAEMON.md +104 -0
  353. package/dist/engineering-pa-workspace/docs/page-blueprint.md +286 -0
  354. package/dist/engineering-pa-workspace/docs/status-mon.md +168 -0
  355. package/dist/engineering-pa-workspace/index.mjs +12 -0
  356. package/dist/engineering-pa-workspace/nav.json.example +8 -0
  357. package/dist/engineering-pa-workspace/package.json +27 -0
  358. package/dist/engineering-pa-workspace/src/api.mjs +2086 -0
  359. package/dist/engineering-pa-workspace/src/install-daemon.mjs +573 -0
  360. package/dist/engineering-pa-workspace/src/nav.mjs +190 -0
  361. package/dist/engineering-pa-workspace/src/secrets-api.mjs +175 -0
  362. package/dist/engineering-pa-workspace/src/server.mjs +516 -0
  363. package/dist/engineering-pa-workspace/src/status-mon/poll.mjs +220 -0
  364. package/dist/engineering-pa-workspace/src/status-mon/poller.mjs +113 -0
  365. package/dist/engineering-pa-workspace/src/status-mon/run.mjs +133 -0
  366. package/dist/engineering-pa-workspace/src/supervisor.mjs +264 -0
  367. package/dist/engineering-pa-workspace/src/ws.mjs +633 -0
  368. package/index.mjs +60 -0
  369. package/package.json +58 -0
  370. package/templates/banned-ai-tells.md +102 -0
  371. package/templates/purpose.md +105 -0
  372. package/templates/voice-guide.md +98 -0
@@ -0,0 +1,15 @@
1
+ # Knowledge Domain Patterns
2
+
3
+ Common domain structures that work well for different types of knowledge. These patterns can be used as templates when setting up new knowledge domains.
4
+
5
+ **Recipes/Cooking**: ingredient index, technique notes, meal plans, shopping list generation. The PA can cross-reference ingredients across recipes and suggest substitutions based on what is available.
6
+
7
+ **Project Notes**: per-project directories with decision logs, meeting notes, architecture documents, and TODO lists. The PA indexes decisions and can recall why something was decided months later.
8
+
9
+ **Meeting Notes**: timestamped entries with attendees, action items, and key decisions. The PA extracts action items and creates work items automatically.
10
+
11
+ **Reading Notes**: book/article summaries with key takeaways, quotes, and connections to other reading. The PA can surface relevant past reading when you encounter related topics.
12
+
13
+ **Health/Fitness**: workout logs, measurements, meal tracking. Time-series data that the PA can analyse for trends and suggest adjustments.
14
+
15
+ Each pattern would include a sample directory structure, example documents, and suggested distillation rules for the librarian.
@@ -0,0 +1,11 @@
1
+ # Office Integration
2
+
3
+ Connect your PA to calendar, email, and document services so it can manage scheduling, draft communications, and access shared documents.
4
+
5
+ **Calendar**: read upcoming events, create new events, check availability, suggest meeting times. The PA could proactively prepare briefing notes before meetings by pulling relevant knowledge.
6
+
7
+ **Email**: draft replies, summarise inbox, flag important messages, create work items from email threads. Requires careful access controls -- the PA should draft but not send without confirmation.
8
+
9
+ **Documents**: read and summarise Google Docs, Notion pages, or SharePoint documents. Pull content into the knowledge system for indexing. Create new documents from templates.
10
+
11
+ Implementation would use MCP servers for each service (Google Calendar MCP, Gmail MCP, etc.) combined with custom logic in the PA's role definition for when and how to use each integration. The key challenge is permission boundaries -- the PA needs enough access to be useful but not so much that a hallucination sends an embarrassing email.
@@ -0,0 +1,9 @@
1
+ # Team Scaling
2
+
3
+ Run multiple PA instances for a team, each with their own identity and knowledge domain but sharing common team knowledge.
4
+
5
+ The architecture would involve a shared git repository with team-level knowledge (standards, processes, shared decisions) and per-person branches or directories for individual knowledge. Each PA instance runs independently but can reference team knowledge when needed.
6
+
7
+ Challenges to solve: merge conflicts when multiple PAs commit simultaneously, knowledge deduplication across team members, consistent tool configurations, and shared vs private observation boundaries. A "team lead" PA pattern could coordinate across instances, similar to a task group orchestrator but persistent.
8
+
9
+ Use cases: engineering teams where each developer has their own PA but the team shares coding standards, architecture decisions, and project context. The team lead PA could run standups by collecting status from each individual PA.
@@ -0,0 +1,9 @@
1
+ # Work/Personal Separation
2
+
3
+ Separate work and personal knowledge domains so they can be managed, backed up, and accessed independently.
4
+
5
+ The core idea is to define domain boundaries in the knowledge configuration -- a `work` domain and a `personal` domain, each with their own directory trees, distillation rules, and access controls. Your PA would route observations to the correct domain based on context clues (project names, time of day, explicit tags).
6
+
7
+ This matters when you want to back up personal notes without including work IP, or share work knowledge with a team without exposing personal data. It also helps the PA avoid cross-contaminating contexts -- your meal planning knowledge should not surface during code review sessions.
8
+
9
+ Open questions: how to handle items that span both domains, whether to use separate git branches or separate directories, and how distillation should merge or keep separate.
@@ -0,0 +1,129 @@
1
+ # Scheduled Distillation
2
+
3
+ Set up automated knowledge distillation that runs on a schedule, triggering the librarian role to sweep staging areas and promote observations into structured knowledge.
4
+
5
+
6
+ ## What it does
7
+
8
+ The distillation process reads unprocessed observations from agent staging directories, evaluates them for value, and promotes useful content into the knowledge system. Running this on a schedule ensures knowledge stays current without manual intervention.
9
+
10
+
11
+ ## Prerequisites
12
+
13
+ - A working Dave installation with at least one agent that produces staging observations
14
+ - The `core/tools/distill/` scripts must be present and executable
15
+ - The Dave scheduler (`core/tools/scheduler/`) -- handles backend detection and installation
16
+
17
+
18
+ ## Setup using the scheduler
19
+
20
+ The recommended approach uses Dave's built-in scheduling system, which auto-detects your OS and available backends (launchd on macOS, systemd on Linux, cron, or Windows schtasks).
21
+
22
+ ### 1. Create the schedule definition
23
+
24
+ Create `schedules/distillation-sweep.json`:
25
+
26
+ ```json
27
+ {
28
+ "id": "distillation-sweep",
29
+ "name": "Daily Distillation Sweep",
30
+ "schedule": "0 3 * * *",
31
+ "command": "bash core/tools/distill/run.sh",
32
+ "workingDirectory": "${DAVE_ROOT}",
33
+ "enabled": true,
34
+ "backend": null,
35
+ "description": "Run the librarian distillation sweep daily at 3am",
36
+ "environment": {
37
+ "DAVE_ROOT": "${DAVE_ROOT}"
38
+ }
39
+ }
40
+ ```
41
+
42
+ On macOS/launchd, the installer auto-injects `PATH` (captured from the
43
+ install-time shell), `HOME`, and `DAVE_ROOT` into the generated plist,
44
+ so Homebrew-installed tools (`node`, `claude`, `git`) work out of the
45
+ box. Any key you list under `environment` overrides the auto-injected
46
+ default. On cron/systemd/schtasks, only the keys you declare are set —
47
+ no auto-defaults — because those backends do not have launchd's
48
+ minimal-environment footgun. Values support `${DAVE_ROOT}`, `${HOME}`,
49
+ and `${USER}` substitution at install time.
50
+
51
+ Adjust the `schedule` field (cron syntax) as needed:
52
+ - `0 3 * * *` -- daily at 3am
53
+ - `0 */6 * * *` -- every 6 hours
54
+ - `0 * * * *` -- hourly (for active development)
55
+
56
+ ### 2. Detect available backends
57
+
58
+ ```bash
59
+ node core/tools/scheduler/detect.mjs
60
+ ```
61
+
62
+ This outputs a JSON report showing which scheduling facilities are available on your system.
63
+
64
+ ### 3. Install the schedule
65
+
66
+ ```bash
67
+ node core/tools/scheduler/install.mjs schedules/distillation-sweep.json <backend>
68
+ ```
69
+
70
+ Replace `<backend>` with one from the detect output (e.g. `launchd`, `cron`, `systemd`, `schtasks`).
71
+
72
+ ### 4. Verify installation
73
+
74
+ ```bash
75
+ node core/tools/scheduler/list.mjs <backend>
76
+ ```
77
+
78
+ ### Using the /schedule command
79
+
80
+ If you prefer, use the `/schedule` slash command in a PA session. It walks you through detection, creation, and installation interactively.
81
+
82
+ ### Removing the schedule
83
+
84
+ ```bash
85
+ node core/tools/scheduler/remove.mjs distillation-sweep <backend>
86
+ ```
87
+
88
+
89
+ ## Manual setup (alternative)
90
+
91
+ If you prefer not to use the scheduler abstraction, you can set up scheduling directly.
92
+
93
+ ### Wrapper script
94
+
95
+ Create a shell script that the scheduler will invoke:
96
+
97
+ ```bash
98
+ #!/usr/bin/env bash
99
+ # distill-cron.sh -- wrapper for scheduled distillation
100
+ set -euo pipefail
101
+
102
+ REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
103
+ cd "$REPO_ROOT"
104
+
105
+ # Run distillation
106
+ node core/tools/distill/distill.mjs --auto 2>&1 | tee -a /tmp/dave-distill.log
107
+
108
+ # Commit if there are changes
109
+ if [ -n "$(git status --porcelain)" ]; then
110
+ git add -A
111
+ git commit -m "Distillation sweep $(date -u +%Y-%m-%dT%H-%M-%SZ)"
112
+ fi
113
+ ```
114
+
115
+ Save as `scripts/distill-cron.sh` and make it executable. Then add it to your OS scheduler manually (crontab, launchd plist, systemd timer, etc.).
116
+
117
+
118
+ ## Tuning
119
+
120
+ - **Frequency**: Start with every 6 hours. Reduce to daily if staging volume is low, or increase to hourly during active development sprints.
121
+ - **Log rotation**: Logs go to `/tmp/dave-{id}-*.log`. Set up logrotate or periodically truncate.
122
+ - **Notification**: Add a notification step (e.g. webhook, email) after the git commit line if you want to be alerted when distillation produces changes.
123
+
124
+
125
+ ## Further reading
126
+
127
+ - Scheduler system: `core/tools/scheduler/README.md`
128
+ - Schedule JSON schema: `core/tools/desk/schema/schedule.json`
129
+ - `/schedule` slash command: `core/commands/schedule.md`
@@ -0,0 +1,110 @@
1
+ # Tool Integration
2
+
3
+ Connect external tools and APIs to your PA via MCP (Model Context Protocol) servers. This gives your PA the ability to interact with services like GitHub, Slack, Google Drive, Jira, and more.
4
+
5
+
6
+ ## What it does
7
+
8
+ MCP servers expose external tool capabilities to Claude Code. Once configured, your PA can use these tools naturally during conversations -- creating GitHub issues, sending Slack messages, reading Google Drive documents, etc.
9
+
10
+
11
+ ## Prerequisites
12
+
13
+ - Node.js 18+ or the runtime required by the specific MCP server
14
+ - An account and API credentials for the service you want to integrate
15
+ - Claude Code installed and running
16
+
17
+
18
+ ## Steps
19
+
20
+ ### 1. Choose an MCP server
21
+
22
+ Popular MCP servers and where to find them:
23
+
24
+ | Service | Package | Source |
25
+ |---------|---------|--------|
26
+ | GitHub | `@modelcontextprotocol/server-github` | npmjs.com |
27
+ | Slack | `@modelcontextprotocol/server-slack` | npmjs.com |
28
+ | Google Drive | `@anthropic-ai/google-drive-mcp` | Anthropic |
29
+ | Jira | `@anthropic-ai/jira-mcp` | Anthropic |
30
+ | Filesystem | `@modelcontextprotocol/server-filesystem` | npmjs.com |
31
+ | PostgreSQL | `@modelcontextprotocol/server-postgres` | npmjs.com |
32
+
33
+ For a full list, see the [MCP server directory](https://github.com/modelcontextprotocol/servers).
34
+
35
+ ### 2. Install the MCP server
36
+
37
+ ```bash
38
+ npm install -g @modelcontextprotocol/server-github
39
+ ```
40
+
41
+ Or install locally in your project:
42
+
43
+ ```bash
44
+ npm install @modelcontextprotocol/server-github
45
+ ```
46
+
47
+ ### 3. Configure in Claude Code settings
48
+
49
+ Add the MCP server to your Claude Code configuration. Edit `.claude/settings.json` in your project root (or `~/.claude/settings.json` for global config):
50
+
51
+ ```json
52
+ {
53
+ "mcpServers": {
54
+ "github": {
55
+ "command": "npx",
56
+ "args": ["-y", "@modelcontextprotocol/server-github"],
57
+ "env": {
58
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
59
+ }
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ Store the actual token in your secrets vault:
66
+
67
+ ```bash
68
+ node core/tools/secrets/bin/secrets set GITHUB_TOKEN ghp_your_token_here
69
+ ```
70
+
71
+ ### 4. Verify the integration
72
+
73
+ Start a new Claude Code session and ask your PA to use the tool:
74
+
75
+ - GitHub: "List my open pull requests"
76
+ - Slack: "Send a message to #general"
77
+ - Google Drive: "Find documents about project X"
78
+
79
+ If the PA reports the tool is unavailable, check:
80
+ - The MCP server is installed correctly
81
+ - Environment variables are set
82
+ - The settings.json path is correct
83
+
84
+
85
+ ## Adding multiple integrations
86
+
87
+ Repeat steps 1-4 for each service. Each gets its own entry in the `mcpServers` block:
88
+
89
+ ```json
90
+ {
91
+ "mcpServers": {
92
+ "github": { "..." : "..." },
93
+ "slack": {
94
+ "command": "npx",
95
+ "args": ["-y", "@modelcontextprotocol/server-slack"],
96
+ "env": {
97
+ "SLACK_BOT_TOKEN": "${SLACK_TOKEN}"
98
+ }
99
+ }
100
+ }
101
+ }
102
+ ```
103
+
104
+
105
+ ## Security notes
106
+
107
+ - Store all API tokens in the secrets vault, not in plaintext config files
108
+ - Use the minimum required permissions when creating API tokens
109
+ - Rotate tokens periodically using the secrets vault rotate function
110
+ - Review which tools your PA has access to -- more tools means a larger action surface
@@ -0,0 +1,159 @@
1
+ # /init -- Environment Discovery
2
+
3
+ Discover the current environment and write a session snapshot to `.session/environment.json`. This gives you situational awareness of the machine, network, available tools, running services, and current work state.
4
+
5
+ Run this command on first boot if `.session/environment.json` does not exist or is older than 1 hour.
6
+
7
+ ## Behaviour
8
+
9
+ Execute all discovery steps below using shell commands, then assemble the results into a single JSON object and write it to `.session/environment.json` at the project root.
10
+
11
+ **Important:** The `.session/` directory should already exist (created by `dave.sh`). If it does not, create it with `mkdir -p .session`.
12
+
13
+ ### 1. Machine identity
14
+
15
+ ```bash
16
+ hostname
17
+ uname -s
18
+ uname -m
19
+
20
+ # Resolve project root: trust $DAVE_ROOT if exported, otherwise walk two parents up from cwd.
21
+ # cwd when /init runs is the PA run folder (<project-root>/agents/<paName>/).
22
+ if [ -n "$DAVE_ROOT" ]; then
23
+ echo "$DAVE_ROOT"
24
+ else
25
+ cd "$(pwd)/../.." && pwd
26
+ fi
27
+ ```
28
+
29
+ Capture as:
30
+ ```json
31
+ {
32
+ "hostname": "<hostname output>",
33
+ "os": "<uname -s output>",
34
+ "arch": "<uname -m output>",
35
+ "daveRoot": "<resolved project root — absolute path>"
36
+ }
37
+ ```
38
+
39
+ ### 2. Network
40
+
41
+ ```bash
42
+ # Local IP (portable across macOS and Linux)
43
+ if command -v ip >/dev/null 2>&1; then
44
+ ip route get 1.1.1.1 2>/dev/null | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}'
45
+ else
46
+ ipconfig getifaddr en0 2>/dev/null || echo "unknown"
47
+ fi
48
+
49
+ # Internet connectivity
50
+ curl -sf --max-time 3 https://httpbin.org/status/200 >/dev/null 2>&1 && echo "true" || echo "false"
51
+ ```
52
+
53
+ Capture as:
54
+ ```json
55
+ {
56
+ "localIp": "<detected IP or 'unknown'>",
57
+ "internet": true
58
+ }
59
+ ```
60
+
61
+ ### 3. Available tools
62
+
63
+ Check each tool's availability and version. Use `command -v <tool>` to test presence, then capture the version string.
64
+
65
+ | Tool | Version command |
66
+ |---|---|
67
+ | git | `git --version` |
68
+ | node | `node --version` |
69
+ | python | `python3 --version` |
70
+ | docker | `docker --version` |
71
+ | claude | `claude --version` |
72
+
73
+ Capture as:
74
+ ```json
75
+ {
76
+ "git": "2.x.x" or false,
77
+ "node": "v22.x.x" or false,
78
+ "python": "3.x.x" or false,
79
+ "docker": "27.x.x" or false,
80
+ "claude": "1.x.x" or false
81
+ }
82
+ ```
83
+
84
+ Use `false` (boolean) if the tool is not installed. Use the version string if it is.
85
+
86
+ ### 4. Services
87
+
88
+ Check if the workspace server is running by testing the configured port:
89
+
90
+ ```bash
91
+ # Read port from preferences or default to 4200
92
+ curl -sf --max-time 2 http://127.0.0.1:${PORT:-4200}/health >/dev/null 2>&1 || \
93
+ curl -sf --max-time 2 http://127.0.0.1:${PORT:-4200}/ >/dev/null 2>&1
94
+ ```
95
+
96
+ Capture as:
97
+ ```json
98
+ {
99
+ "workspace": {
100
+ "url": "http://127.0.0.1:<port>",
101
+ "running": true
102
+ }
103
+ }
104
+ ```
105
+
106
+ ### 5. Work state
107
+
108
+ Run the HQ CLI overview and read next-session notes:
109
+
110
+ ```bash
111
+ # Overview
112
+ node core/tools/desk/bin/desk overview 2>/dev/null || echo "(desk overview not available)"
113
+
114
+ # Next-session notes -- read the PA's own file
115
+ # The PA name comes from operator/config/preferences.json
116
+ cat agents/<paName>/next-session.md 2>/dev/null || echo ""
117
+ ```
118
+
119
+ Read the PA name from `operator/config/preferences.json` (the `paName` field).
120
+
121
+ Capture as:
122
+ ```json
123
+ {
124
+ "overview": "<desk overview stdout>",
125
+ "nextSession": "<contents of next-session.md or null>",
126
+ "capturedAt": "<ISO8601>"
127
+ }
128
+ ```
129
+
130
+ Use `null` (not the string "null") if next-session.md does not exist.
131
+
132
+ ### 6. Assemble and write
133
+
134
+ Combine all sections into the final JSON structure:
135
+
136
+ ```json
137
+ {
138
+ "capturedAt": "<ISO8601 timestamp>",
139
+ "machine": { "hostname": "...", "os": "...", "arch": "...", "daveRoot": "..." },
140
+ "network": { "localIp": "...", "internet": true },
141
+ "tools": { "git": "...", "node": "...", "python": "...", "docker": false, "claude": "..." },
142
+ "services": { "workspace": { "url": "...", "running": true } },
143
+ "workState": {
144
+ "overview": "...",
145
+ "nextSession": "..." or null,
146
+ "capturedAt": "<ISO8601>"
147
+ }
148
+ }
149
+ ```
150
+
151
+ Write this to `.session/environment.json` at the project root. Use camelCase for all property names. Ensure the output is valid JSON (no trailing commas, proper quoting).
152
+
153
+ ### 7. Report
154
+
155
+ After writing, give a brief one-line summary of what was discovered. Example:
156
+
157
+ > Environment captured: macbook-pro / macOS arm64, internet up, 4/5 tools available, workspace running on :4200.
158
+
159
+ Do not dump the full JSON back to the user.
@@ -0,0 +1,98 @@
1
+ # /schedule -- Manage recurring scheduled tasks
2
+
3
+ Manage Dave's scheduled tasks: list, create, enable, disable, and remove recurring jobs that run via OS-native scheduling facilities.
4
+
5
+ ## Behaviour
6
+
7
+ ### First use / no backend configured
8
+
9
+ If `.dave/config.json` does not have a `scheduler.backend` key, run detection first:
10
+
11
+ ```bash
12
+ node core/tools/scheduler/detect.mjs
13
+ ```
14
+
15
+ Present the available backends to the user with the recommendation noted. Ask which backend to use. Store the choice in `.dave/config.json`:
16
+
17
+ ```json
18
+ {
19
+ "scheduler": {
20
+ "backend": "<chosen>",
21
+ "detectedAt": "<ISO timestamp>",
22
+ "available": ["<list>"]
23
+ }
24
+ }
25
+ ```
26
+
27
+ ### List schedules
28
+
29
+ Show all installed Dave schedules for the configured backend:
30
+
31
+ ```bash
32
+ node core/tools/scheduler/list.mjs <backend>
33
+ ```
34
+
35
+ Also list any schedule JSON files in `schedules/` that are not yet installed (enabled but no matching backend entry).
36
+
37
+ ### Create a new schedule
38
+
39
+ 1. Ask the user for: id, name, cron expression, command, and description
40
+ 2. Write the schedule JSON to `schedules/<id>.json`
41
+ 3. Run install:
42
+
43
+ ```bash
44
+ node core/tools/scheduler/install.mjs schedules/<id>.json <backend>
45
+ ```
46
+
47
+ 4. Confirm installation
48
+
49
+ ### Enable / disable a schedule
50
+
51
+ To disable: set `enabled: false` in the schedule JSON and run remove.mjs for the backend.
52
+
53
+ To enable: set `enabled: true` and run install.mjs.
54
+
55
+ ### Remove a schedule
56
+
57
+ ```bash
58
+ node core/tools/scheduler/remove.mjs <id> <backend> --delete-file
59
+ ```
60
+
61
+ ### Run a schedule now (manual trigger)
62
+
63
+ Execute the command from the schedule JSON directly:
64
+
65
+ ```bash
66
+ cd <workingDirectory> && <command>
67
+ ```
68
+
69
+ ## Schedule format
70
+
71
+ See `core/tools/desk/schema/schedule.json` for the full JSON schema. Quick reference:
72
+
73
+ | Field | Required | Example |
74
+ |---|---|---|
75
+ | `id` | Yes | `distillation-sweep` |
76
+ | `name` | No | `Daily Distillation Sweep` |
77
+ | `schedule` | Yes | `0 3 * * *` (cron syntax) |
78
+ | `command` | Yes | `bash core/tools/distill/run.sh` |
79
+ | `workingDirectory` | No | `${DAVE_ROOT}` |
80
+ | `enabled` | No | `true` |
81
+ | `description` | No | `Run distillation daily at 3am` |
82
+
83
+ ## Common schedules
84
+
85
+ | Task | Suggested cron | Command |
86
+ |---|---|---|
87
+ | Distillation sweep | `0 3 * * *` | `bash core/tools/distill/run.sh` |
88
+ | Knowledge reindex | `0 */6 * * *` | `node core/knowledge/retrieval/index-builder.mjs` |
89
+ | Health check | `*/30 * * * *` | `node core/tools/scheduler/detect.mjs` |
90
+
91
+ ## Backend reference
92
+
93
+ | Backend | OS | How it works |
94
+ |---|---|---|
95
+ | launchd | macOS | Plist in `~/Library/LaunchAgents/com.dave.{id}.plist` |
96
+ | cron | macOS/Linux | Crontab entries tagged with `# dave-{id}` |
97
+ | systemd | Linux | User timer + service in `~/.config/systemd/user/dave-{id}.{timer,service}` |
98
+ | schtasks | Windows | Windows Task Scheduler entries named `dave-{id}` |
@@ -0,0 +1,67 @@
1
+ # /upgrade -- Pull the latest platform release
2
+
3
+ You are running the upgrade command. Follow these steps exactly.
4
+
5
+ In v2 the platform is distributed as the npm package `@stravica-ai/digital-operator-pa`. There is no fork-and-merge step; updates happen via `pnpm update`.
6
+
7
+ ## Step 1: Check current version
8
+
9
+ Run:
10
+
11
+ ```bash
12
+ pnpm list @stravica-ai/digital-operator-pa --depth=0
13
+ ```
14
+
15
+ Note the currently-installed version. If the package is missing from the lockfile, surface the error and stop — the operator's repo is not initialised against the platform.
16
+
17
+ ## Step 2: Check for a newer release
18
+
19
+ Run:
20
+
21
+ ```bash
22
+ pnpm outdated @stravica-ai/digital-operator-pa
23
+ ```
24
+
25
+ If there is no newer version available, tell the operator they are already up to date and stop.
26
+
27
+ If a newer version is available, show the operator the version delta and the published release notes URL (the package's repository field points to the canonical changelog).
28
+
29
+ ## Step 3: Ask for confirmation
30
+
31
+ Tell the operator what will happen: `pnpm update @stravica-ai/digital-operator-pa` will update the package and refresh the lockfile. Remind them that operator content (`operator/`, `work/`, `projects/`, `agents/`, `schedules/`, `.vault/`) is never touched by `pnpm update` — only `node_modules/` and `pnpm-lock.yaml` change.
32
+
33
+ **Wait for the operator to confirm before proceeding.** Do not update without explicit confirmation.
34
+
35
+ ## Step 4: Update
36
+
37
+ Run:
38
+
39
+ ```bash
40
+ pnpm update @stravica-ai/digital-operator-pa
41
+ ```
42
+
43
+ Then:
44
+
45
+ ```bash
46
+ pa status
47
+ ```
48
+
49
+ The status command verifies the new version boots cleanly against the operator's existing content. If `pa status` reports problems, surface them and stop — do not declare the upgrade successful.
50
+
51
+ If `pa status` is healthy, report success and show a summary of what changed (release notes link is the primary reference).
52
+
53
+ ## Step 5: Commit the lockfile
54
+
55
+ The lockfile change is the operator-visible record of which platform version is in use.
56
+
57
+ ```bash
58
+ git add pnpm-lock.yaml package.json
59
+ git commit -m "chore: upgrade @stravica-ai/digital-operator-pa to vX.Y.Z"
60
+ ```
61
+
62
+ ## Important notes
63
+
64
+ - Operator content is never touched by the upgrade. If a release ships breaking changes that need operator-side adjustment, the release notes will list them and you'll surface them to the operator after Step 4.
65
+ - This command only updates and verifies. It does not push.
66
+ - If `pnpm update` fails (lockfile conflicts, registry auth, network), report the error verbatim. Do not retry blindly.
67
+ - Major-version bumps are reviewed manually — for a major bump, route to the system-architect rather than running this command.