@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,56 @@
1
+ <!--
2
+ scaffold: session-boot-and-end.md
3
+ bucket: operator-interface (Bucket 1)
4
+ what belongs here: the SOP for session boot and session end.
5
+ - The order of files to read on boot (CLAUDE.md startup routine references this).
6
+ - The state-adapted briefing pattern (light / busy / post-gap).
7
+ - The session-end checklist (mandatory-not-optional).
8
+ - Operator-side overlays specific to how this operator boots and ends sessions.
9
+ -->
10
+
11
+ # Session boot and end SOP
12
+
13
+ ## Session boot
14
+
15
+ ### Files to read (in order)
16
+
17
+ 1. Run `pnpm exec pa environment` before responding. Read `.session/environment.json`.
18
+ 2. Operator profile.
19
+ 3. Operator preferences.
20
+ 4. PA autonomy envelope.
21
+ 5. Learned rules (Librarian-maintained).
22
+ 6. Next-session notes.
23
+ 7. Spawn-log tail (last few dispatches).
24
+
25
+ ### Briefing the operator on boot
26
+
27
+ Greet naturally. Quick status: X projects active, Y work items in-flight, Z on operator, W on you. Surface blocked / overdue. Note unprocessed observations if any. Name next-session action items if any.
28
+
29
+ **Adapt to state:**
30
+
31
+ - **Light session** (few items, nothing urgent). Brief status, ask what the operator wants to focus on.
32
+ - **Busy session** (many items, blocked work). Lead with what needs attention, suggest priorities.
33
+ - **Returning after a gap** (stale next-session notes). Recap what was happening, ask if priorities have changed.
34
+
35
+ **Do not:**
36
+ - Say just "Ready." — passive and unhelpful.
37
+ - Over-brief every detail — summarise; let the operator drill into specifics.
38
+ - List every work item — surface the ones that matter.
39
+
40
+ <!-- OPERATOR: add operator-specific boot steps here (extra config to read, services to launch, domain-state to check). -->
41
+
42
+ ## Session end
43
+
44
+ Mandatory checklist — every session must leave a clean trail:
45
+
46
+ 1. Stage all observations to `agents/<paName>/staging/`.
47
+ 2. Update journal at `agents/<paName>/journal.md`.
48
+ 3. Update work items — statuses reflect current state.
49
+ 4. Update spawn-log — outcomes recorded for every dispatch that returned.
50
+ 5. Update workspace / next-session notes so the next session boots into an accurate state.
51
+ 6. Distillation health check (per operator's distillation cadence).
52
+ 7. Commit and push to git.
53
+
54
+ This is not optional. Never let user-facing artefacts (workspace, work items, next-session) go stale.
55
+
56
+ <!-- OPERATOR: add operator-specific session-end steps here (a heartbeat write, a metrics sync, a domain-specific sign-off). -->
@@ -0,0 +1,37 @@
1
+ # platform-tooling — bucket knowledge scaffold
2
+
3
+ **Bucket:** 7 of 7. Referenced from CLAUDE.md.template Bucket 7.
4
+
5
+ ## What this bucket carries
6
+
7
+ Use the estate's own tooling first. Consistent, dogfooded, learnable. Tool-discovery discipline, environment awareness (`pa environment`), platform CLI reference, workspace server, scheduling, MCP servers, working-directory resolution, proactive tool proposal.
8
+
9
+ ## Scope — core vs operator overlay
10
+
11
+ **In core.** Universal tooling mechanism: tool-discovery-every-session pattern, `pa environment` CLI (verbs + cache + performance constraint), `pa` / `desk` CLI references, workspace server (`pa workspace`), scheduling primitives (`schedules/<id>.json`), MCP server catalogue (discover via `--help`), working-directory resolution, proactive-tool-proposal pattern.
12
+
13
+ **In operator overlay** (`operator/knowledge/platform-tooling/`). Operator extensions listed under `operator/extensions/tools/`, operator-specific workspace port, operator's default scheduling target host, MCP servers the operator relies on.
14
+
15
+ ## Canonical entries in this scaffold
16
+
17
+ | File | Purpose |
18
+ |---|---|
19
+ | `tool-discovery-discipline.md` | Every-session-boot rediscover-surface pattern. `pa --help`, `desk --help`, `ls operator/extensions/tools/`. |
20
+ | `environment-awareness.md` | `.session/environment.json` semantics + `pa environment` CLI + performance constraint + boot-instruction design choice. |
21
+ | `pa-cli-reference.md` | The `pa` bin verb overview. Points at `pa --help` as source of truth. |
22
+ | `desk-cli-reference.md` | The `desk` bin — read-only. Points at `desk --help`. |
23
+ | `workspace-server.md` | Workspace server operations. |
24
+ | `scheduling-and-launchd.md` | `schedules/<id>.json` conventions; target host is an operator-configured field. |
25
+ | `working-directory-vs-project-root.md` | cwd vs project root; how to resolve. |
26
+ | `mcp-servers-catalogue.md` | Available MCP servers, use-when-fits guidance. |
27
+
28
+ ## How operators adopt this
29
+
30
+ Copy the shape into `operator/knowledge/platform-tooling/`. Populate operator extensions list, workspace port, scheduling default host, and MCP-dependency notes in the marked hooks.
31
+
32
+ ## Related
33
+
34
+ - CLAUDE.md.template Bucket 7 — the rule list that references this deeper doc.
35
+ - `packages/core/docs/workspace-operations.md` — workspace reference.
36
+ - `packages/core/docs/working-directory.md` — cwd vs project root.
37
+ - `packages/core/docs/scheduling.md` — scheduling primitives.
@@ -0,0 +1,52 @@
1
+ <!--
2
+ scaffold: desk-cli-reference.md
3
+ bucket: platform-tooling (Bucket 7)
4
+ what belongs here: `desk` bin reference. Read-only complement to `pa work` / `pa project`.
5
+ -->
6
+
7
+ # `desk` CLI — read-only reference
8
+
9
+ The `desk` bin is a read-only overview surface for work items and projects. Never edit through desk — writes go through `pa work` and `pa project`.
10
+
11
+ ## Verbs
12
+
13
+ | Verb | Purpose |
14
+ |---|---|
15
+ | `desk overview` | Summary of all projects and in-flight work. |
16
+ | `desk today` | What is active and needs attention today. |
17
+ | `desk work` | List active work items. Filters: `--mine`, `--theirs`, `--status`, `--project`, `--category`. |
18
+ | `desk projects` | List active projects. `--all` includes done/archived. `--all-teams` / `--team <identity>` control team scoping. |
19
+
20
+ Run `desk --help` for the current authoritative list.
21
+
22
+ ## Team scoping
23
+
24
+ `desk projects`, `desk overview`, and `desk today` scope projects to the
25
+ local team-identity set (`executor`, falling back to `assignee`, matched
26
+ against `teamIdentities` — string[], mixed agent + role names — else
27
+ `[paName]`; `paName` is always a member) when
28
+ `operator/config/preferences.json` sets `"scopeProjectsToTeam": true`.
29
+ Unset — the historical default — everything shows, unchanged. Projects
30
+ missing both fields always show (fail open). `--all-teams` bypasses
31
+ scoping; `--team <identity>` narrows to one identity.
32
+ Full rationale: `packages/core/knowledge/work-management/desk-cli.md`.
33
+
34
+ ## When to reach for `desk`
35
+
36
+ - **Session boot briefing.** `desk overview` is the summary source.
37
+ - **State check.** `desk work --status in-progress` before dispatching new work.
38
+ - **Operator ask "what's in flight".** `desk work` or `desk overview` depending on granularity.
39
+
40
+ ## When NOT to reach for `desk`
41
+
42
+ - **Reading actual JSON.** Use `Read` on the file.
43
+ - **Writing state.** Use `pa work` / `pa project`.
44
+
45
+ ## Cache behaviour
46
+
47
+ None. `desk` reads from disk on every invocation.
48
+
49
+ ## Related
50
+
51
+ - `pa-cli-reference.md` — write-side complement.
52
+ - `packages/core/knowledge/work-management/desk-cli.md` — the discipline this bin supports.
@@ -0,0 +1,91 @@
1
+ <!--
2
+ scaffold: environment-awareness.md
3
+ bucket: platform-tooling (Bucket 7)
4
+ what belongs here: `.session/environment.json` semantics + `pa environment` CLI.
5
+ - Three verbs (default cache-read, refresh, extended).
6
+ - Cache write shape.
7
+ - Performance constraint (<2s cache-read, <5s refresh).
8
+ - Design choice: on-boot INSTRUCTION rendered into CLAUDE.md, NOT a platform hook.
9
+ -->
10
+
11
+ # Environment awareness
12
+
13
+ ## The mechanism
14
+
15
+ `pa environment` populates `.session/environment.json` — a slow-changing snapshot of the current environment (OS, tools, network reachability, workspace state, working directory). The PA reads this on session boot to factor environment into decisions (dispatch target, tool availability, network access, mounted volumes).
16
+
17
+ ## Verbs
18
+
19
+ | Verb | Purpose |
20
+ |---|---|
21
+ | `pa environment` (default) | Read cache; auto-refresh if missing or stale; print human-readable summary. |
22
+ | `pa environment refresh` | Force rebuild. Re-probe environment, write new cache, print summary. |
23
+ | `pa environment extended` | RESERVED verb. Core errors with a clear message pointing at the operator overlay extension. If the operator has installed the extension, core dispatches to it. |
24
+
25
+ Global flags:
26
+
27
+ - `--format json` — machine-readable output.
28
+ - `--quiet` — suppress human summary; the file write is the payload.
29
+ - `--skip-network` — skip network probes (fallback for slow CI or offline dev).
30
+
31
+ ## Cache write shape
32
+
33
+ `.session/environment.json`. All fields camelCase.
34
+
35
+ - `capturedAt` — ISO datetime.
36
+ - `capturedBy` — `"pa environment@<version>"`.
37
+ - `platform` — `{ os, arch, kernel, shell }`.
38
+ - `runtimes` — `{ node, pnpm, git }` — each `{ version, path }`.
39
+ - `platformCli` — introspected from `pnpm exec pa --help` parse + package.json bin list.
40
+ - `customTools` — array of `{ name, path }` for each subdir under `operator/extensions/tools/`.
41
+ - `network` — `{ dns: { target, resolved, elapsedMs }, http: { target, statusCode, elapsedMs } }`. Failures record `error` field; file still writes.
42
+ - `workspace` — `{ port, running, url }`.
43
+ - `workingDirectory` — `{ cwd, projectRoot, resolvedVia }`.
44
+
45
+ Operator-extended verb populates additional top-level fields (`devices`, `scheduledTasks`, `mcpAuthState`, `vpn`, `routeQuality`).
46
+
47
+ ## Performance constraint (hard)
48
+
49
+ - **Cache-read path: <2s** on a warm cache.
50
+ - **Refresh path: <5s** for a full probe on a healthy machine.
51
+
52
+ Rationale: runs at every session boot. Slower and the operator waits.
53
+
54
+ Implementation guidance:
55
+ - Cache-read: single `fs.readFile` + JSON parse + stdout format. Well under 200ms.
56
+ - Full refresh: parallelise probes. `Promise.all` DNS + HTTP + workspace port + version probes.
57
+ - Timeout every network probe at 3s. Failed probe records `error` and continues.
58
+
59
+ ## Session-boot invocation — INSTRUCTION, not hook
60
+
61
+ **Design choice:** session-boot invocation is an on-boot INSTRUCTION rendered into the CLAUDE.md template's Startup routine, NOT a platform hook.
62
+
63
+ Reasoning:
64
+ - Hooks add mandatory Claude Code startup latency; latency compounds across sessions.
65
+ - An on-boot CLI invocation resolves synchronously before the first user response, gives the same context freshness, and stays inside the `pa` command surface.
66
+ - The autonomy-envelope session-boot integration (see `packages/core/docs/autonomy-envelope-tracker.md`) is different — it INJECTS context via `additionalContext`; `pa environment` writes a file the PA reads. Different mechanisms; both correct for their purpose.
67
+
68
+ **Template rendering.** CLAUDE.md.template's Startup routine section carries:
69
+
70
+ ```
71
+ On session boot, run `pnpm exec pa environment` before responding. Read
72
+ `.session/environment.json` for current environment state. Refresh only if
73
+ the environment may have shifted since last cache (machine switch, network
74
+ change, service uncertainty).
75
+ ```
76
+
77
+ ## Cache staleness threshold
78
+
79
+ Default: 60 minutes. Configurable via `operator/config/preferences.json:environment.cacheStalenessMinutes`. Rationale: short enough to catch machine switches and network state changes on same-day sessions; long enough that returning mid-day doesn't cost a probe roundtrip.
80
+
81
+ ## Extension-loader contract for `pa environment extended`
82
+
83
+ Core looks for `operator/extensions/tools/environment-extended/` in the project root. Expects an `index.mjs` exporting `default async function extended({ core, cwd })` that returns extended fields dict.
84
+
85
+ Absent or misshapen → exit 2 with operator-facing error message. Present → dynamic `import()`; errors from the extension surfaced verbatim.
86
+
87
+ ## Related
88
+
89
+ - CLAUDE.md.template Bucket 7 rule 2 + Startup routine.
90
+ - `packages/cli/src/environment/` — CLI implementation.
91
+ - `packages/core/docs/autonomy-envelope-tracker.md` — the autonomy-envelope companion mechanism.
@@ -0,0 +1,52 @@
1
+ <!--
2
+ scaffold: mcp-servers-catalogue.md
3
+ bucket: platform-tooling (Bucket 7)
4
+ what belongs here: available MCP servers + use-when-fits guidance.
5
+ - Discover current inventory via the harness's Available agent types + deferred tool list.
6
+ - MCP inherits into subagents (see dispatch-envelope.md).
7
+ - Shared session state — Playwright, OAuth-gated tools serialise.
8
+ -->
9
+
10
+ # MCP servers — catalogue
11
+
12
+ ## Discovery
13
+
14
+ The current MCP server inventory changes as the operator's estate evolves. **Discover via the harness's `Available agent types` + deferred-tool list**, not from memory. `ToolSearch` loads schemas for specific tools before invocation.
15
+
16
+ Common categories:
17
+
18
+ - **Read/write knowledge tools** — rcf-tools for RCF-enabled projects.
19
+ - **Browser automation** — Playwright.
20
+ - **OAuth-gated services** — Gmail, Google Drive, Google Calendar, Atlassian, Canva.
21
+
22
+ ## Use when the task fits
23
+
24
+ - Playwright when the task is web-driven AND a headless-Node approach won't do.
25
+ - Gmail / Calendar / Drive when the task genuinely needs the operator's authenticated context.
26
+ - rcf-tools when the operator's project is RCF-enabled.
27
+
28
+ ## Don't force
29
+
30
+ - Don't reach for Playwright when a Node HTTP client would work.
31
+ - Don't reach for Google Drive when a `Read` of an operator-repo file would work.
32
+ - Don't reach for an MCP tool because it's "cool" — reach for it when it's the right shape.
33
+
34
+ ## Shared session state — critical constraint
35
+
36
+ **From `dispatch-envelope.md § MCP Tool Availability`:**
37
+
38
+ - Playwright browser sessions are parent-scoped, not per-subagent. Two parallel Playwright workers WILL clobber each other's tabs.
39
+ - OAuth-gated tool auth is inherited from parent — child does not re-authenticate, but the parent's auth state is what the child uses.
40
+
41
+ **Serialisation rule.** Only one agent at a time should drive a session-stateful MCP tool. Brief the shared-state hazard explicitly in any dispatch that uses one.
42
+
43
+ ## Subagent-type restrictions
44
+
45
+ Only `general-purpose` and `claude` subagent types inherit the full MCP inventory. `Explore`, `Plan`, `claude-code-guide`, `statusline-setup` all have restricted inventories that exclude MCP tools.
46
+
47
+ If a dispatched worker needs an MCP tool, it MUST be dispatched as `general-purpose` or `claude`.
48
+
49
+ ## Related
50
+
51
+ - CLAUDE.md.template Bucket 7 rule 7.
52
+ - `dispatch-envelope.md § MCP Tool Availability` — the full findings.
@@ -0,0 +1,55 @@
1
+ <!--
2
+ scaffold: pa-cli-reference.md
3
+ bucket: platform-tooling (Bucket 7)
4
+ what belongs here: top-level `pa` bin overview. Point at `pa --help` as source of truth.
5
+ -->
6
+
7
+ # `pa` CLI — top-level reference
8
+
9
+ The `pa` bin is the operator-facing top-level CLI. Every verb here is a subcommand routed by the top-level dispatcher.
10
+
11
+ ## Verbs (subject to change — `pa --help` is source of truth)
12
+
13
+ | Verb | Purpose |
14
+ |---|---|
15
+ | `pa session` | Start a PA session (chdir to agent dir, exec `claude`). |
16
+ | `pa status` | Probe operator content, installed package, workspace reachability, then desk overview. |
17
+ | `pa workspace <verb>` | Workspace server lifecycle (start / stop / status / restart / open). |
18
+ | `pa project <verb>` | Project state writes (create / status / doc add/rm/status / list). |
19
+ | `pa work <verb>` | Work-item state writes (create / status / list). |
20
+ | `pa knowledge <verb>` | Query the operator's knowledge graph (related / search / domain / orphans / path). |
21
+ | `pa autonomy <verb>` | Autonomy envelope get / set / list / init. |
22
+ | `pa environment [verb]` | Environment cache read / refresh / extended. |
23
+ | `pa lint <verb>` | Lint operator text against voice rules. |
24
+ | `pa gsc <verb>` | Google Search Console automation. |
25
+ | `pa staging-alias <verb>` | Canonical staging.<site> alias for CF Workers sites. |
26
+ | `pa migrate-inspect [options]` | Host inspection for migration planning. |
27
+ | `pa launch --agent=<n> --task=<id>` | Boot a scoped agent instance bound to an identity and task. |
28
+
29
+ Run `pa --help` for the current authoritative list. Verbs land as the operating model evolves; the docs here rot fast.
30
+
31
+ ## Exit codes
32
+
33
+ Tooling standard § 6:
34
+
35
+ - `0` ok
36
+ - `1` usage error
37
+ - `2` operational failure
38
+ - `3` transport / IO failure
39
+
40
+ ## When to reach for a specific verb
41
+
42
+ - **Session start** — `pa session`.
43
+ - **Status check on session boot** — `pa status` (then part of the greeting).
44
+ - **Managing work** — `pa work` (write) + `desk work` (read).
45
+ - **Managing projects** — `pa project` (write) + `desk projects` (read).
46
+ - **Looking up knowledge** — `pa knowledge`.
47
+ - **Managing autonomy state** — `pa autonomy`.
48
+ - **Environment refresh** — `pa environment refresh` (only when the env may have shifted; default `pa environment` reads cache).
49
+
50
+ ## Related
51
+
52
+ - `desk-cli-reference.md` — read-only complement.
53
+ - `packages/cli/src/pa/cli.mjs` — source of truth for the verb dispatcher.
54
+ - `packages/core/docs/autonomy-envelope-tracker.md` — the `pa autonomy` mechanism.
55
+ - `environment-awareness.md` — the `pa environment` mechanism.
@@ -0,0 +1,56 @@
1
+ <!--
2
+ scaffold: scheduling-and-launchd.md
3
+ bucket: platform-tooling (Bucket 7)
4
+ what belongs here: `schedules/<id>.json` conventions.
5
+ - Target-host is an operator-configured field. Core describes mechanism; operator names host.
6
+ -->
7
+
8
+ # Scheduling
9
+
10
+ ## Location and shape
11
+
12
+ Scheduled tasks live at `schedules/<id>.json`. JSON manifest per task.
13
+
14
+ ## The mechanism
15
+
16
+ The core scheduler primitives handle:
17
+
18
+ - `schedules/<id>.json` manifest parsing.
19
+ - cron-style triggers.
20
+ - Task dispatch via the platform's task-runner (launchd on macOS, systemd on Linux).
21
+
22
+ Verbs (via `scheduler` bin):
23
+
24
+ - `scheduler install` — install a scheduled task.
25
+ - `scheduler verify` — check it's registered.
26
+ - `scheduler list` — list installed schedules.
27
+ - `scheduler remove` — remove.
28
+
29
+ Full reference: `packages/core/docs/scheduling.md`.
30
+
31
+ ## Target host
32
+
33
+ **Core describes the MECHANISM; operator names the default HOST.** Target host is an operator-configured field in the schedule manifest.
34
+
35
+ Manifest shape (subset):
36
+
37
+ ```json
38
+ {
39
+ "id": "distill-4-hourly",
40
+ "cron": "0 */4 * * *",
41
+ "targetHost": "<operator-named-host>",
42
+ "command": "pnpm exec distill"
43
+ }
44
+ ```
45
+
46
+ <!-- OPERATOR: name your default scheduling target host here. Core does NOT prescribe a host name — it's operator-specific. -->
47
+
48
+ ## Why the split
49
+
50
+ Host names are operator-specific by definition — every operator's machine estate is different. Core prescribing a specific host name would restrict every future operator adopting the platform.
51
+
52
+ ## Related
53
+
54
+ - CLAUDE.md.template Bucket 7 rule 6.
55
+ - `packages/core/docs/scheduling.md`.
56
+ - `packages/core/schema/schedule.json` — canonical manifest schema.
@@ -0,0 +1,49 @@
1
+ <!--
2
+ scaffold: tool-discovery-discipline.md
3
+ bucket: platform-tooling (Bucket 7)
4
+ what belongs here: the discover-tools-every-session pattern.
5
+ - Named lists here would rot.
6
+ - Sources of discovery: pa --help, desk --help, ls operator/extensions/tools/.
7
+ - Reach for external tools only when nothing local fits.
8
+ -->
9
+
10
+ # Tool discovery discipline
11
+
12
+ ## The rule
13
+
14
+ **Discover the current tool surface every session.** Don't rely on memory. Local tools evolve; a named list in this doc would rot.
15
+
16
+ ## Sources of discovery
17
+
18
+ Three canonical sources:
19
+
20
+ 1. **`pnpm exec pa --help`** — platform-shipped CLI surface. Every verb the PA can use directly.
21
+ 2. **`pnpm exec desk --help`** — read-only task management surface.
22
+ 3. **`ls operator/extensions/tools/`** — custom operator-side tools. Each subdir has its own bin + README.
23
+
24
+ For MCP tools, discover via the harness's `Available agent types` and deferred-tool inventory — `ToolSearch` loads schemas for specific tools.
25
+
26
+ ## When to reach for external tools
27
+
28
+ **Local first.** External tools only when nothing local fits. Reasoning: local tools are dogfooded, consistent, learnable across sessions, and evolve with the operator's needs. External tools are one-off dependencies.
29
+
30
+ **External is fine when:**
31
+
32
+ - No local tool covers the surface (e.g. a specific third-party service the operator hasn't wrapped).
33
+ - The one-off use doesn't justify building a local tool.
34
+ - The external tool is the acknowledged standard (e.g. `gh` for GitHub — no need to reinvent).
35
+
36
+ **External is wrong when:**
37
+
38
+ - A local tool covers the surface but the PA reached for external out of habit.
39
+ - The one-off use is actually a recurring pattern that should have been a local tool.
40
+
41
+ ## Proactive tool proposal — the follow-on
42
+
43
+ Bucket 7 rule 9: when a task pattern repeats or manual execution is error-prone, propose a tool to the operator. On approval, dispatch tool-developer at next convenient point. This is estate improvement work you own; don't wait for the operator to suggest.
44
+
45
+ ## Related
46
+
47
+ - CLAUDE.md.template Bucket 7 rules 1, 9.
48
+ - `pa-cli-reference.md`, `desk-cli-reference.md` — canonical CLI references.
49
+ - `packages/core/docs/standards/tooling.md` — the tooling standard.
@@ -0,0 +1,43 @@
1
+ <!--
2
+ scaffold: working-directory-vs-project-root.md
3
+ bucket: platform-tooling (Bucket 7)
4
+ what belongs here: cwd vs project root.
5
+ - cwd is agents/<paName>/; project root is 2 levels up.
6
+ - Resolve via `.session/environment.json:workingDirectory.projectRoot` or a `*_ROOT` env var.
7
+ - Never hard-code paths.
8
+ -->
9
+
10
+ # Working directory vs project root
11
+
12
+ ## The distinction
13
+
14
+ The PA's shell **cwd** is its run folder — `agents/<paName>/`. The **project root** is two levels up — the operator repo's root.
15
+
16
+ Every tool and command runs in the run folder by default. Anything that references the operator's estate (`operator/`, `work/`, `projects/`, `schedules/`) must resolve the project root first.
17
+
18
+ ## Resolution order
19
+
20
+ Preferred (in order of reliability):
21
+
22
+ 1. **`.session/environment.json:workingDirectory.projectRoot`** — populated by `pa environment`. Deterministic; refreshed on session boot.
23
+ 2. **`$<PA_NAME>_ROOT` env var** — e.g. `$DAVE_ROOT`. Operator-set on machines where this is more convenient.
24
+ 3. **Walk upward from cwd** — search for a marker file (e.g. `agents/*/CLAUDE.md`, `.git/`) as a fallback.
25
+ 4. **`cd "$(pwd)/../.." && pwd`** — hard-coded relative walk. Only when everything else has failed.
26
+
27
+ **Never hard-code an absolute path.** Absolute paths break the moment the PA runs on a different machine or the operator's repo moves.
28
+
29
+ ## Common failure modes
30
+
31
+ - **Assuming cwd IS the project root.** cwd is `agents/<paName>/`; `work/w-...json` doesn't exist at that level.
32
+ - **Hard-coding a `/Users/...` or `/home/...` path.** Breaks cross-machine.
33
+ - **Relying on `process.cwd()` inside a subagent worktree.** Worktrees are at `.claude/worktrees/agent-<id>/`; cwd inside a worktree is not the operator repo root.
34
+
35
+ ## In bash calls
36
+
37
+ Prefer absolute paths derived from a resolved project root, not relative paths that assume cwd. This makes commands portable across the worker's shell state.
38
+
39
+ ## Related
40
+
41
+ - CLAUDE.md.template Bucket 7 rule 8.
42
+ - `packages/core/docs/working-directory.md` — canonical detail.
43
+ - `environment-awareness.md` — `.session/environment.json:workingDirectory` field.
@@ -0,0 +1,51 @@
1
+ <!--
2
+ scaffold: workspace-server.md
3
+ bucket: platform-tooling (Bucket 7)
4
+ what belongs here: workspace server operations.
5
+ - Default port (4200).
6
+ - viewer.html for long content.
7
+ - `pa workspace start / stop / status / restart / open`.
8
+ - Supervisor-aware lifecycle (launchd / systemd).
9
+ - Point at packages/core/docs/workspace-operations.md.
10
+ -->
11
+
12
+ # Workspace server
13
+
14
+ ## Purpose
15
+
16
+ The workspace server hosts `viewer.html` — the PA's canonical surface for long-form content, structured data, tables, and reports. Direct the operator to `http://localhost:<port>/viewer.html?file=path/to/file.md` instead of pasting long output into chat.
17
+
18
+ ## Verbs
19
+
20
+ | Verb | Purpose |
21
+ |---|---|
22
+ | `pa workspace start [--port N] [--no-open]` | Start the workspace server. |
23
+ | `pa workspace stop` | Stop the server (refuses if supervised — see below). |
24
+ | `pa workspace status` | Show server status (supervisor-aware). |
25
+ | `pa workspace restart [--port N] [--no-open]` | Restart. Supervisor-aware — launchctl kickstart / systemctl restart. |
26
+ | `pa workspace open` | Open the workspace URL in a browser. |
27
+
28
+ ## Default port
29
+
30
+ `4200`. Configurable via `operator/config/preferences.json:workspacePort`.
31
+
32
+ <!-- OPERATOR: name your workspace port here if it's not 4200. -->
33
+
34
+ ## Supervisor-aware lifecycle
35
+
36
+ When the workspace is supervised by launchd (`~/Library/LaunchAgents/com.dave.workspace.plist`) or systemd (`~/.config/systemd/user/dave-workspace.service`), `stop` is refused and `restart` delegates to the supervisor. This is the in-place version-pickup path after `pnpm update @stravica-ai/digital-operator-pa`.
37
+
38
+ ## When to use the workspace
39
+
40
+ - **Long-form content** — anything more than a few paragraphs.
41
+ - **Structured data / tables** — anything that renders better in HTML than in a chat line-wrap.
42
+ - **Reports** — session reports, dispatch outcomes, project progress trackers.
43
+
44
+ ## Full operations reference
45
+
46
+ `packages/core/docs/workspace-operations.md`.
47
+
48
+ ## Related
49
+
50
+ - CLAUDE.md.template Bucket 7 rule 5.
51
+ - `packages/core/docs/workspace-operations.md`.
@@ -0,0 +1,5 @@
1
+ {
2
+ "version": "1.0",
3
+ "domains": [],
4
+ "note": "Domains are populated as you add knowledge. Each domain has: id, name, path, description, fileCount, lastUpdated."
5
+ }
@@ -0,0 +1,33 @@
1
+ # work-management — bucket knowledge scaffold
2
+
3
+ **Bucket:** 2 of 7. Referenced from CLAUDE.md.template Bucket 2.
4
+
5
+ ## What this bucket carries
6
+
7
+ How the PA tracks work so the operator sees what's in flight without asking. Work items, projects, spawn-log, progress trackers, the desk read-side overview.
8
+
9
+ ## Scope — core vs operator overlay
10
+
11
+ **In core.** Universal work-tracking mechanism: work-item schema, project schema, status/category/priority conventions, opening-before-work discipline, updating-at-material-change discipline, progress.md pattern, spawn-log-at-dispatch-time discipline, camelCase JSON discipline, desk CLI reference.
12
+
13
+ **In operator overlay** (`operator/knowledge/work-management/`). Operator-specific extensions: content-scheduling tools bolted on top of `pa work`, operator-specific priority mappings, special work-item categories the operator uses, cross-project rollup patterns.
14
+
15
+ ## Canonical entries in this scaffold
16
+
17
+ | File | Purpose |
18
+ |---|---|
19
+ | `work-items.md` | Schema reference, status/category/priority, opening-before-work rule, updating discipline. |
20
+ | `projects.md` | Schema reference, project lifecycle, project-vs-work-item choice, `pa project doc` interface. |
21
+ | `progress-md.md` | Progress-tracker discipline — newest top, references not duplicates, concurrent-work has a home. |
22
+ | `desk-cli.md` | Read-only overview surface. Structure of `desk overview`, `desk today`, `desk work`, `desk projects`. |
23
+ | `spawn-log.md` | Spawn-log discipline — updated at dispatch time, not at session end. |
24
+
25
+ ## How operators adopt this
26
+
27
+ Copy the shape into `operator/knowledge/work-management/`. Populate operator-side extensions in the marked hooks; do not modify the core conventions.
28
+
29
+ ## Related
30
+
31
+ - CLAUDE.md.template Bucket 2 — the rule list that references this deeper doc.
32
+ - `@stravica-ai/engineering-pa-core/schema/work-item.json` and `project.json` — canonical schemas.
33
+ - `pa work --help`, `pa project --help`, `desk --help` — CLI reference.