workbay-system 0.1.0__tar.gz

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 (230) hide show
  1. workbay_system-0.1.0/.gitignore +4 -0
  2. workbay_system-0.1.0/PKG-INFO +72 -0
  3. workbay_system-0.1.0/README.md +57 -0
  4. workbay_system-0.1.0/_scrub_core.py +51 -0
  5. workbay_system-0.1.0/hatch_build.py +288 -0
  6. workbay_system-0.1.0/pyproject.toml +71 -0
  7. workbay_system-0.1.0/workbay_system/__init__.py +25 -0
  8. workbay_system-0.1.0/workbay_system/payload/.claude/hooks/ensure-agent-surfaces.sh +44 -0
  9. workbay_system-0.1.0/workbay_system/payload/.claude/settings.hooks.json +162 -0
  10. workbay_system-0.1.0/workbay_system/payload/.codex/hooks.json +127 -0
  11. workbay_system-0.1.0/workbay_system/payload/.github/hooks/guard-main-branch.py +239 -0
  12. workbay_system-0.1.0/workbay_system/payload/.github/hooks/guard-worktree-drift.py +18 -0
  13. workbay_system-0.1.0/workbay_system/payload/.github/hooks/terminal-guard.json +113 -0
  14. workbay_system-0.1.0/workbay_system/payload/.github/hooks/test_guard_main_branch.py +382 -0
  15. workbay_system-0.1.0/workbay_system/payload/.github/hooks/test_guard_worktree_drift.py +559 -0
  16. workbay_system-0.1.0/workbay_system/payload/.github/hooks/token_budget.py +72 -0
  17. workbay_system-0.1.0/workbay_system/payload/.github/prompts/auto-fix.prompt.md +155 -0
  18. workbay_system-0.1.0/workbay_system/payload/.github/prompts/branch-lifecycle.prompt.md +150 -0
  19. workbay_system-0.1.0/workbay_system/payload/.github/prompts/branch-review.prompt.md +123 -0
  20. workbay_system-0.1.0/workbay_system/payload/.github/prompts/handoff-lifecycle.prompt.md +50 -0
  21. workbay_system-0.1.0/workbay_system/payload/.github/prompts/incremental-implementation.prompt.md +112 -0
  22. workbay_system-0.1.0/workbay_system/payload/.github/prompts/investigate.prompt.md +143 -0
  23. workbay_system-0.1.0/workbay_system/payload/.github/prompts/plan-analyze.prompt.md +101 -0
  24. workbay_system-0.1.0/workbay_system/payload/.github/prompts/planning-review.prompt.md +120 -0
  25. workbay_system-0.1.0/workbay_system/payload/.github/prompts/review-parallel.prompt.md +133 -0
  26. workbay_system-0.1.0/workbay_system/payload/.github/prompts/scope.prompt.md +99 -0
  27. workbay_system-0.1.0/workbay_system/payload/.github/prompts/tdd.prompt.md +109 -0
  28. workbay_system-0.1.0/workbay_system/payload/Makefile.d/ace.mk +43 -0
  29. workbay_system-0.1.0/workbay_system/payload/Makefile.d/compaction.mk +39 -0
  30. workbay_system-0.1.0/workbay_system/payload/Makefile.d/lifecycle.mk +174 -0
  31. workbay_system-0.1.0/workbay_system/payload/Makefile.d/plans.mk +66 -0
  32. workbay_system-0.1.0/workbay_system/payload/Makefile.d/plugins.mk +55 -0
  33. workbay_system-0.1.0/workbay_system/payload/Makefile.d/update.mk +11 -0
  34. workbay_system-0.1.0/workbay_system/payload/Makefile.d/workflows.mk +70 -0
  35. workbay_system-0.1.0/workbay_system/payload/config/agent-workflows/mcp_servers.yaml +53 -0
  36. workbay_system-0.1.0/workbay_system/payload/config/agent-workflows/portable_commands.json +442 -0
  37. workbay_system-0.1.0/workbay_system/payload/config/agent-workflows/prompts/review-parallel/default.md +51 -0
  38. workbay_system-0.1.0/workbay_system/payload/docs/workbay/contracts/harness-protocol.yaml +559 -0
  39. workbay_system-0.1.0/workbay_system/payload/docs/workbay/contracts/overlay-manifest.yaml +150 -0
  40. workbay_system-0.1.0/workbay_system/payload/docs/workbay/contracts/repo-intel-mcp-candidates.md +39 -0
  41. workbay_system-0.1.0/workbay_system/payload/docs/workbay/contracts/subagent-bridge-interface-note.md +74 -0
  42. workbay_system-0.1.0/workbay_system/payload/docs/workbay/contracts/workbay-handoff-mcp.md +840 -0
  43. workbay_system-0.1.0/workbay_system/payload/docs/workbay/contracts/workbay-orchestrator-mcp.md +375 -0
  44. workbay_system-0.1.0/workbay_system/payload/docs/workbay/in-session-skills.md +26 -0
  45. workbay_system-0.1.0/workbay_system/payload/docs/workbay/maps/mcp-tool-routing.yaml +109 -0
  46. workbay_system-0.1.0/workbay_system/payload/docs/workbay/rules/branch-review-guide.md +601 -0
  47. workbay_system-0.1.0/workbay_system/payload/docs/workbay/rules/branch-review-php.md +81 -0
  48. workbay_system-0.1.0/workbay_system/payload/docs/workbay/rules/branch-review-python.md +116 -0
  49. workbay_system-0.1.0/workbay_system/payload/docs/workbay/rules/branch-review-typescript.md +76 -0
  50. workbay_system-0.1.0/workbay_system/payload/docs/workbay/rules/contract-change-checklist.md +76 -0
  51. workbay_system-0.1.0/workbay_system/payload/docs/workbay/rules/development-workflow.md +732 -0
  52. workbay_system-0.1.0/workbay_system/payload/docs/workbay/rules/lifecycle-recovery.md +147 -0
  53. workbay_system-0.1.0/workbay_system/payload/docs/workbay/rules/planning-artifact-home.md +215 -0
  54. workbay_system-0.1.0/workbay_system/payload/docs/workbay/rules/planning-review-guide.md +233 -0
  55. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/ADR.template.md +139 -0
  56. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/ASSESSMENT.template.md +124 -0
  57. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/CURRENT_TASK.template.md +89 -0
  58. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/DECISION_BREAKING_CHANGE.template.md +41 -0
  59. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/DECISION_CONTRACT_CHANGE.template.md +41 -0
  60. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/DECISION_CROSS_LANE.template.md +41 -0
  61. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/EPIC.template.md +130 -0
  62. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/ROADMAP.template.md +132 -0
  63. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/SKILL_ANATOMY.template.md +65 -0
  64. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/SPEC.template.md +166 -0
  65. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/TASK_PLAN.template.md +245 -0
  66. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/WORKTREE_LANE_BRIEF.template.md +42 -0
  67. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/WORKTREE_LANE_REPORT.template.md +33 -0
  68. workbay_system-0.1.0/workbay_system/payload/docs/workbay/templates/slice-complete-template.md +52 -0
  69. workbay_system-0.1.0/workbay_system/payload/scripts/_guard_wrap.py +71 -0
  70. workbay_system-0.1.0/workbay_system/payload/scripts/check_workflow_facade.py +358 -0
  71. workbay_system-0.1.0/workbay_system/payload/scripts/generate_agent_workflows.py +2231 -0
  72. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_active_task_context.py +154 -0
  73. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_bash_isolation_guard.py +558 -0
  74. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_branch_isolation_guard.py +469 -0
  75. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_guard_main_branch_inline.py +178 -0
  76. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_harness_protocol.py +393 -0
  77. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_interp.py +174 -0
  78. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_post_commit_refresh_sha.py +83 -0
  79. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_post_merge_reap_tasks.py +186 -0
  80. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_protocol.py +105 -0
  81. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_run_guard.py +189 -0
  82. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/_worktree_drift.py +455 -0
  83. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/ace-detect.py +108 -0
  84. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/advise-worktree-cd.py +140 -0
  85. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/capture-agent-errors.py +252 -0
  86. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/check_branch_naming.py +588 -0
  87. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/check_main_clean.py +205 -0
  88. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/check_root_on_main.py +69 -0
  89. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/coherence-self-check.py +123 -0
  90. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/compact-session.py +472 -0
  91. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/filter-test-output.py +316 -0
  92. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/git/post-checkout +41 -0
  93. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/git/post-commit +25 -0
  94. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/git/post-merge +32 -0
  95. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/git/post-rewrite +21 -0
  96. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/git/pre-commit +22 -0
  97. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/git/pre-push +37 -0
  98. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/guard-bash-main-branch.py +246 -0
  99. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/guard-main-branch.sh +80 -0
  100. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/guard-rationale-size.py +143 -0
  101. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/guard-task-plan-findings.py +658 -0
  102. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/guard-worktree-drift.sh +6 -0
  103. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/lint-dashboard-txt.py +124 -0
  104. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/lint-expected-revision.py +175 -0
  105. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/lint-no-inline-python-heredoc.py +179 -0
  106. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/mcp_launch.py +184 -0
  107. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/record-file-touch.py +157 -0
  108. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/regenerate-task-views.sh +78 -0
  109. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/reinject-context.py +773 -0
  110. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/resolve_handoff_src.py +64 -0
  111. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/slim-handoff-response.py +281 -0
  112. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_ace_detect.py +146 -0
  113. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_active_task_context.py +214 -0
  114. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_advise_worktree_cd.py +219 -0
  115. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_bash_isolation_guard_cwd.py +346 -0
  116. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_bash_isolation_guard_formatters.py +162 -0
  117. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_branch_grammar_fallback_drift.py +96 -0
  118. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_branch_isolation_policy_split.py +180 -0
  119. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_capture_agent_errors.py +298 -0
  120. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_check_branch_naming.py +937 -0
  121. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_check_main_clean.py +437 -0
  122. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_check_root_on_main.py +48 -0
  123. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_coherence_self_check.py +114 -0
  124. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_compact_session_hook.py +1466 -0
  125. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_compaction_failed_capture.py +192 -0
  126. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_dev_workflow_compaction_docs.py +157 -0
  127. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_dirty_permitted_carveout.py +90 -0
  128. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_doc_references.py +128 -0
  129. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_filter_test_output.py +410 -0
  130. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_guard_bash_main_branch_env_alias.py +61 -0
  131. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_guard_bash_main_branch_lightweight.py +164 -0
  132. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_guard_rationale_size.py +193 -0
  133. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_guard_task_plan_findings.py +805 -0
  134. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_harness_contract_missing_policy.py +131 -0
  135. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_harness_hook_configs.py +124 -0
  136. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_interp.py +331 -0
  137. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_lint_dashboard_txt.py +106 -0
  138. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_protocol_validation_wiring.py +103 -0
  139. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_record_file_touch.py +243 -0
  140. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_regenerate_task_views.py +135 -0
  141. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_reinject_context_hook.py +1300 -0
  142. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_resolve_handoff_src.py +73 -0
  143. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_run_guard.py +426 -0
  144. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_slim_handoff_response.py +312 -0
  145. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_validate_mcp_dict_params.py +154 -0
  146. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_worktree_branch_resolution.py +165 -0
  147. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/test_worktree_drift_unchanged.py +178 -0
  148. workbay_system-0.1.0/workbay_system/payload/scripts/hooks/validate-mcp-dict-params.py +110 -0
  149. workbay_system-0.1.0/workbay_system/payload/scripts/measure_reinject_ab.py +539 -0
  150. workbay_system-0.1.0/workbay_system/payload/scripts/plugin_override_compose.py +817 -0
  151. workbay_system-0.1.0/workbay_system/payload/scripts/test_measure_reinject_ab.py +442 -0
  152. workbay_system-0.1.0/workbay_system/payload/scripts/validate_claude_settings_pin.py +174 -0
  153. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/git-plan-cat.sh +27 -0
  154. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/__init__.py +12 -0
  155. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/__main__.py +15 -0
  156. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/cli.py +169 -0
  157. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/__init__.py +11 -0
  158. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/_common.py +662 -0
  159. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/backfill_plan_acceptance.py +254 -0
  160. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/close_check.py +171 -0
  161. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/context.py +345 -0
  162. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/doctor.py +968 -0
  163. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/finalize_plan.py +136 -0
  164. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/plan_accept.py +446 -0
  165. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/plan_baseline.py +620 -0
  166. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/plan_done.py +234 -0
  167. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/project_events_replay.py +235 -0
  168. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/provision_env.py +95 -0
  169. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/review_ready.py +635 -0
  170. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/shell_out.py +275 -0
  171. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/skill_broadcast.py +149 -0
  172. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/slice_commit.py +275 -0
  173. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/slice_start.py +198 -0
  174. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/status.py +669 -0
  175. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/sync_task_plan_checklist.py +923 -0
  176. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/task_finish.py +596 -0
  177. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/task_plan_checklist_audit.py +340 -0
  178. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/task_plan_checklist_backfill.py +268 -0
  179. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/task_reap.py +117 -0
  180. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/task_start.py +1068 -0
  181. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/handlers/tasks.py +296 -0
  182. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/projection.py +307 -0
  183. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/receipts.py +328 -0
  184. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/resolver.py +299 -0
  185. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/lifecycle/uv_provisioning.py +440 -0
  186. workbay_system-0.1.0/workbay_system/payload/scripts/workbay/update.sh +182 -0
  187. workbay_system-0.1.0/workbay_system/payload/skills/auto-fix/body.md +122 -0
  188. workbay_system-0.1.0/workbay_system/payload/skills/auto-fix/skill.yaml +20 -0
  189. workbay_system-0.1.0/workbay_system/payload/skills/branch-lifecycle/body.md +114 -0
  190. workbay_system-0.1.0/workbay_system/payload/skills/branch-lifecycle/skill.yaml +20 -0
  191. workbay_system-0.1.0/workbay_system/payload/skills/branch-review/body.md +89 -0
  192. workbay_system-0.1.0/workbay_system/payload/skills/branch-review/skill.yaml +20 -0
  193. workbay_system-0.1.0/workbay_system/payload/skills/commit2git/body.md +125 -0
  194. workbay_system-0.1.0/workbay_system/payload/skills/commit2git/skill.yaml +12 -0
  195. workbay_system-0.1.0/workbay_system/payload/skills/daemon-lifecycle/body.md +113 -0
  196. workbay_system-0.1.0/workbay_system/payload/skills/daemon-lifecycle/skill.yaml +16 -0
  197. workbay_system-0.1.0/workbay_system/payload/skills/document-sync/body.md +205 -0
  198. workbay_system-0.1.0/workbay_system/payload/skills/document-sync/skill.yaml +16 -0
  199. workbay_system-0.1.0/workbay_system/payload/skills/handoff-lifecycle/body.md +98 -0
  200. workbay_system-0.1.0/workbay_system/payload/skills/handoff-lifecycle/skill.yaml +27 -0
  201. workbay_system-0.1.0/workbay_system/payload/skills/incremental-implementation/body.md +79 -0
  202. workbay_system-0.1.0/workbay_system/payload/skills/incremental-implementation/skill.yaml +17 -0
  203. workbay_system-0.1.0/workbay_system/payload/skills/investigate/body.md +110 -0
  204. workbay_system-0.1.0/workbay_system/payload/skills/investigate/skill.yaml +17 -0
  205. workbay_system-0.1.0/workbay_system/payload/skills/plan-analyze/body.md +71 -0
  206. workbay_system-0.1.0/workbay_system/payload/skills/plan-analyze/skill.yaml +15 -0
  207. workbay_system-0.1.0/workbay_system/payload/skills/planning-review/body.md +87 -0
  208. workbay_system-0.1.0/workbay_system/payload/skills/planning-review/skill.yaml +16 -0
  209. workbay_system-0.1.0/workbay_system/payload/skills/refactor/body.md +309 -0
  210. workbay_system-0.1.0/workbay_system/payload/skills/refactor/skill.yaml +15 -0
  211. workbay_system-0.1.0/workbay_system/payload/skills/rescue-lane/body.md +77 -0
  212. workbay_system-0.1.0/workbay_system/payload/skills/rescue-lane/skill.yaml +16 -0
  213. workbay_system-0.1.0/workbay_system/payload/skills/review/body.md +132 -0
  214. workbay_system-0.1.0/workbay_system/payload/skills/review/skill.yaml +20 -0
  215. workbay_system-0.1.0/workbay_system/payload/skills/review-parallel/body.md +101 -0
  216. workbay_system-0.1.0/workbay_system/payload/skills/review-parallel/skill.yaml +18 -0
  217. workbay_system-0.1.0/workbay_system/payload/skills/scope/body.md +70 -0
  218. workbay_system-0.1.0/workbay_system/payload/skills/scope/skill.yaml +15 -0
  219. workbay_system-0.1.0/workbay_system/payload/skills/security-audit/body.md +297 -0
  220. workbay_system-0.1.0/workbay_system/payload/skills/security-audit/skill.yaml +17 -0
  221. workbay_system-0.1.0/workbay_system/payload/skills/spec/body.md +97 -0
  222. workbay_system-0.1.0/workbay_system/payload/skills/spec/skill.yaml +17 -0
  223. workbay_system-0.1.0/workbay_system/payload/skills/subfeature-committer/body.md +78 -0
  224. workbay_system-0.1.0/workbay_system/payload/skills/subfeature-committer/skill.yaml +12 -0
  225. workbay_system-0.1.0/workbay_system/payload/skills/tdd/body.md +78 -0
  226. workbay_system-0.1.0/workbay_system/payload/skills/tdd/skill.yaml +15 -0
  227. workbay_system-0.1.0/workbay_system/payload/skills/worktree-orchestrator/body.md +185 -0
  228. workbay_system-0.1.0/workbay_system/payload/skills/worktree-orchestrator/skill.yaml +17 -0
  229. workbay_system-0.1.0/workbay_system/payload/skills/worktree-worker/body.md +153 -0
  230. workbay_system-0.1.0/workbay_system/payload/skills/worktree-worker/skill.yaml +17 -0
@@ -0,0 +1,4 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .DS_Store
4
+ DASHBOARD.md
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.4
2
+ Name: workbay-system
3
+ Version: 0.1.0
4
+ Summary: Canonical workbay-system overlay payload (skills, hooks, contracts, generator) shipped as package data for workbay-bootstrap.
5
+ Project-URL: Homepage, https://github.com/darce/workbay
6
+ Project-URL: Source, https://github.com/darce/workbay/tree/main/packages/workbay-system
7
+ Author: darce
8
+ License-Expression: LicenseRef-Proprietary
9
+ Requires-Python: >=3.11
10
+ Provides-Extra: dev
11
+ Requires-Dist: hatchling>=1.27; extra == 'dev'
12
+ Requires-Dist: pytest>=8; extra == 'dev'
13
+ Requires-Dist: pyyaml>=6; extra == 'dev'
14
+ Description-Content-Type: text/markdown
15
+
16
+ # workbay-system
17
+
18
+ Shared workbay-system surface: skills, hooks, contracts, commands, prompts,
19
+ and the validators that keep them coherent.
20
+
21
+ This repository is **MVP-scope-private** internal tooling. It is consumed by
22
+ the `workbay-bootstrap` CLI, which clones it into
23
+ `<consumer-root>/.workbay/remote/` and symlinks selected surfaces into
24
+ consumer repos. There is no LICENSE or CONTRIBUTING file by design.
25
+
26
+ ## Contents
27
+
28
+ The canonical sources are model-agnostic. Per-agent surfaces
29
+ (`.claude/skills/`, `.claude/commands/`, `.github/prompts/`,
30
+ `.codex/skills/`, `.cursor/skills/`, `.grok/plugins/workbay-system/`, ...) are
31
+ *generated* into target repos by
32
+ `scripts/generate_agent_workflows.py` during `workbay-bootstrap install`.
33
+ They do not exist in this package's source tree.
34
+
35
+ | Path | Purpose |
36
+ | --------------------------------------------- | ----------------------------------------------------------------------- |
37
+ | `skills/<slug>/skill.yaml` | Canonical structured metadata per skill. Validates against `workbay_protocol.SkillManifest`. |
38
+ | `skills/<slug>/body.md` | Canonical prose body per skill. Plain Markdown, no frontmatter. |
39
+ | `config/agent-workflows/portable_commands.json` | Source-of-truth manifest for the portable command router. |
40
+ | `scripts/generate_agent_workflows.py` | Renders the manifest + skills into per-agent artifacts (Claude commands + skill packs, Copilot prompts, Codex router blocks, Codex/Cursor/grok skill copies). |
41
+ | `scripts/check_skills.py` | Skill-anatomy validator (delegates structured validation to `workbay_protocol.SkillManifest`). |
42
+ | `scripts/check_harness_sync.py` | Cross-harness contract validator. |
43
+ | `scripts/migrate_skills_to_neutral_layout.py` | One-shot migration helper from the legacy `.claude/skills/<slug>/SKILL.md` layout. |
44
+ | `scripts/hooks/` | Claude Code / Copilot shared hooks plus client-side git hooks. |
45
+ | `docs/workbay/contracts/` | YAML contracts (`harness-protocol.yaml` and friends). |
46
+ | `docs/workbay/maps/mcp-tool-routing.yaml` | Routing map consumed by `check_skills.py` to validate `mcp_tools` references. |
47
+ | `docs/plugin-distribution.md` | Operator guide for `make plugins-build` / `make plugins-check` and the Claude / Codex / Cursor / grok install flow. See also [ADR-001](docs/workbay/adrs/ADR-001-agentic-plugin-distribution.md). |
48
+ | `Makefile.d/plugins.mk` | Make-target fragment wiring `plugins-build` / `plugins-check` to `generate_agent_workflows.py --mode=plugin`. |
49
+
50
+ ## Versioning
51
+
52
+ This repository uses Semantic Versioning. The current package release is
53
+ `workbay-system 0.4.0`; the current monorepo distribution tag is
54
+ `v0.1.24`. See `CHANGELOG.md` for the full history.
55
+
56
+ ## Provenance
57
+
58
+ - `v0.2.0` was extracted from a consumer repository snapshot. It expands the skill
59
+ catalog to 21 populated skills, hoists the
60
+ `.claude/commands/`, `.github/prompts/`, and
61
+ `docs/workbay/templates/` surfaces, and splits the
62
+ `docs/workbay/contracts/` directory so only the six agent/agentic
63
+ contracts ship in the hoisted surface (the consumer-specific
64
+ contracts were removed).
65
+ - `v0.1.0` was extracted from the first consumer repository snapshot
66
+ used to seed this package.
67
+
68
+ ## Consumer Setup
69
+
70
+ The `workbay-bootstrap` CLI handles the clone + symlink +
71
+ overlay-manifest write cycle for consumers. Consumer repos may publish
72
+ repo-local setup notes that point back to this package.
@@ -0,0 +1,57 @@
1
+ # workbay-system
2
+
3
+ Shared workbay-system surface: skills, hooks, contracts, commands, prompts,
4
+ and the validators that keep them coherent.
5
+
6
+ This repository is **MVP-scope-private** internal tooling. It is consumed by
7
+ the `workbay-bootstrap` CLI, which clones it into
8
+ `<consumer-root>/.workbay/remote/` and symlinks selected surfaces into
9
+ consumer repos. There is no LICENSE or CONTRIBUTING file by design.
10
+
11
+ ## Contents
12
+
13
+ The canonical sources are model-agnostic. Per-agent surfaces
14
+ (`.claude/skills/`, `.claude/commands/`, `.github/prompts/`,
15
+ `.codex/skills/`, `.cursor/skills/`, `.grok/plugins/workbay-system/`, ...) are
16
+ *generated* into target repos by
17
+ `scripts/generate_agent_workflows.py` during `workbay-bootstrap install`.
18
+ They do not exist in this package's source tree.
19
+
20
+ | Path | Purpose |
21
+ | --------------------------------------------- | ----------------------------------------------------------------------- |
22
+ | `skills/<slug>/skill.yaml` | Canonical structured metadata per skill. Validates against `workbay_protocol.SkillManifest`. |
23
+ | `skills/<slug>/body.md` | Canonical prose body per skill. Plain Markdown, no frontmatter. |
24
+ | `config/agent-workflows/portable_commands.json` | Source-of-truth manifest for the portable command router. |
25
+ | `scripts/generate_agent_workflows.py` | Renders the manifest + skills into per-agent artifacts (Claude commands + skill packs, Copilot prompts, Codex router blocks, Codex/Cursor/grok skill copies). |
26
+ | `scripts/check_skills.py` | Skill-anatomy validator (delegates structured validation to `workbay_protocol.SkillManifest`). |
27
+ | `scripts/check_harness_sync.py` | Cross-harness contract validator. |
28
+ | `scripts/migrate_skills_to_neutral_layout.py` | One-shot migration helper from the legacy `.claude/skills/<slug>/SKILL.md` layout. |
29
+ | `scripts/hooks/` | Claude Code / Copilot shared hooks plus client-side git hooks. |
30
+ | `docs/workbay/contracts/` | YAML contracts (`harness-protocol.yaml` and friends). |
31
+ | `docs/workbay/maps/mcp-tool-routing.yaml` | Routing map consumed by `check_skills.py` to validate `mcp_tools` references. |
32
+ | `docs/plugin-distribution.md` | Operator guide for `make plugins-build` / `make plugins-check` and the Claude / Codex / Cursor / grok install flow. See also [ADR-001](docs/workbay/adrs/ADR-001-agentic-plugin-distribution.md). |
33
+ | `Makefile.d/plugins.mk` | Make-target fragment wiring `plugins-build` / `plugins-check` to `generate_agent_workflows.py --mode=plugin`. |
34
+
35
+ ## Versioning
36
+
37
+ This repository uses Semantic Versioning. The current package release is
38
+ `workbay-system 0.4.0`; the current monorepo distribution tag is
39
+ `v0.1.24`. See `CHANGELOG.md` for the full history.
40
+
41
+ ## Provenance
42
+
43
+ - `v0.2.0` was extracted from a consumer repository snapshot. It expands the skill
44
+ catalog to 21 populated skills, hoists the
45
+ `.claude/commands/`, `.github/prompts/`, and
46
+ `docs/workbay/templates/` surfaces, and splits the
47
+ `docs/workbay/contracts/` directory so only the six agent/agentic
48
+ contracts ship in the hoisted surface (the consumer-specific
49
+ contracts were removed).
50
+ - `v0.1.0` was extracted from the first consumer repository snapshot
51
+ used to seed this package.
52
+
53
+ ## Consumer Setup
54
+
55
+ The `workbay-bootstrap` CLI handles the clone + symlink +
56
+ overlay-manifest write cycle for consumers. Consumer repos may publish
57
+ repo-local setup notes that point back to this package.
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env python3
2
+ """Build-time vendor of scripts/_scrub_core.py for hatch builds from sdist."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import re
7
+
8
+ INTERNAL_REF_PREFIXES = (
9
+ "AHMCP",
10
+ "AOMCP",
11
+ "APD",
12
+ "DCMCP",
13
+ "WBF",
14
+ "CHC",
15
+ "PA",
16
+ "MAINT",
17
+ "APM-SPEC-TR",
18
+ "WORKSTATE-REF",
19
+ )
20
+
21
+ INTERNAL_REF_RE = re.compile(
22
+ r"(?<![A-Za-z])(?:"
23
+ + "|".join(re.escape(prefix) for prefix in INTERNAL_REF_PREFIXES)
24
+ + r"|WS|WB|E[0-9]+)(?:[0-9]+)?(?:-[A-Z0-9]+)+"
25
+ )
26
+
27
+ PROCESS_REF_RES = (
28
+ re.compile(r"\b[Pp]lan\s+[0-9]{4}\b"),
29
+ re.compile(r"\b[Ss]lice\s+[0-9]+[A-Za-z]?\b"),
30
+ re.compile(r"\b[Ss]tep\s+[0-9]+/[0-9]+\b"),
31
+ )
32
+
33
+ INLINE_INTERNAL_PREFIX_RE = re.compile(
34
+ r"(?<![A-Za-z])(?:AHMCP|AOMCP|APD|DCMCP|WBF|CHC|APM-SPEC-TR)(?![A-Za-z])",
35
+ re.IGNORECASE,
36
+ )
37
+
38
+ INLINE_EPIC_REF_RE = re.compile(r"E([0-9]+)-([0-9]+(?:-[A-Z0-9]+)*)")
39
+
40
+ _COLLAPSE_RE = re.compile(
41
+ r"\b(?:internal|implementation note)(?:[ \t]+(?:internal|implementation note))+\b"
42
+ )
43
+
44
+
45
+ def scrub_text(text: str) -> str:
46
+ scrubbed = INTERNAL_REF_RE.sub("internal", text)
47
+ scrubbed = INLINE_INTERNAL_PREFIX_RE.sub("internal", scrubbed)
48
+ scrubbed = INLINE_EPIC_REF_RE.sub("internal", scrubbed)
49
+ for regex in PROCESS_REF_RES:
50
+ scrubbed = regex.sub("implementation note", scrubbed)
51
+ return _COLLAPSE_RE.sub("internal", scrubbed)
@@ -0,0 +1,288 @@
1
+ """Hatch build hook: scrub staged package copies into wheel+sdist artifacts."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import importlib.util
6
+ import shutil
7
+ import tempfile
8
+ from pathlib import Path
9
+ from typing import Any, NamedTuple, Protocol
10
+
11
+ try: # hatchling is a build-time-only dep (build-system.requires), not a test dep.
12
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
13
+ from hatchling.metadata.plugin.interface import MetadataHookInterface
14
+ from hatchling.plugin import hookimpl
15
+ except ModuleNotFoundError: # keep pure discover_scrub_targets importable for tests
16
+ BuildHookInterface = object # type: ignore[assignment,misc]
17
+ MetadataHookInterface = object # type: ignore[assignment,misc]
18
+
19
+ def hookimpl(func): # type: ignore[no-redef]
20
+ return func
21
+
22
+ _TEXT_SUFFIXES = {
23
+ ".md",
24
+ ".py",
25
+ ".yaml",
26
+ ".yml",
27
+ ".json",
28
+ ".toml",
29
+ ".txt",
30
+ ".mk",
31
+ ".sh",
32
+ ".in",
33
+ ".cfg",
34
+ ".ini",
35
+ ".template",
36
+ ".j2",
37
+ }
38
+
39
+ # Build-support files vendored into the sdist so the wheel can be rebuilt from it.
40
+ # They carry the scrub matcher vocabulary verbatim (the literal AHMCP/AOMCP/... ids
41
+ # the transform looks for) and MUST NOT themselves be scrubbed — doing so rewrites
42
+ # those literals to "internal" and ships a gutted scrub engine. They ride into the
43
+ # sdist via hatchling's own only-include and are scan-exempt in the privacy gate
44
+ # (scripts/check_shipped_privacy.py: _SCAN_EXEMPT_RELPATHS), so skip them here.
45
+ _BUILD_SUPPORT_NAMES = {"_scrub_core.py", "hatch_build.py"}
46
+
47
+
48
+ class ScrubTarget(NamedTuple):
49
+ source_path: Path
50
+ wheel_prefix: str
51
+ is_dir: bool
52
+
53
+
54
+ class _WheelConfigView(Protocol):
55
+ packages: list[str] | None
56
+ only_include: list[str] | None
57
+ sources: list[str] | None
58
+
59
+
60
+ def _strip_src_prefix(path: str) -> str:
61
+ if path.startswith("src/"):
62
+ return path.removeprefix("src/")
63
+ return path
64
+
65
+
66
+ def _rel_entry(entry: str, *, root: Path) -> str:
67
+ entry_path = Path(entry)
68
+ if entry_path.is_absolute():
69
+ return entry_path.relative_to(root).as_posix()
70
+ return entry.replace("\\", "/")
71
+
72
+
73
+ def _wheel_prefix_for_entry(entry: str, *, root: Path) -> str:
74
+ rel = _rel_entry(entry, root=root)
75
+ if rel.endswith(".py"):
76
+ return Path(rel).name
77
+ return _strip_src_prefix(rel.rstrip("/"))
78
+
79
+
80
+ def discover_scrub_targets(
81
+ build_config: _WheelConfigView | Any,
82
+ *,
83
+ root: Path,
84
+ ) -> list[ScrubTarget]:
85
+ """Resolve layout-aware scrub targets from the wheel build config."""
86
+ packages = list(getattr(build_config, "packages", None) or [])
87
+ only_include = list(getattr(build_config, "only_include", None) or [])
88
+ sources = list(getattr(build_config, "sources", None) or [])
89
+
90
+ targets: list[ScrubTarget] = []
91
+ covered_sources: set[Path] = set()
92
+
93
+ def _append_target(source_path: Path, wheel_prefix: str) -> None:
94
+ resolved = source_path.resolve()
95
+ if resolved in covered_sources:
96
+ return
97
+ if not source_path.exists():
98
+ raise FileNotFoundError(source_path)
99
+ covered_sources.add(resolved)
100
+ targets.append(
101
+ ScrubTarget(
102
+ source_path=source_path,
103
+ wheel_prefix=wheel_prefix,
104
+ is_dir=source_path.is_dir(),
105
+ )
106
+ )
107
+
108
+ package_prefixes = {
109
+ _strip_src_prefix(_rel_entry(package, root=root).rstrip("/")) for package in packages
110
+ }
111
+
112
+ for package in packages:
113
+ rel = _rel_entry(package, root=root)
114
+ _append_target(root / rel, _strip_src_prefix(rel.rstrip("/")))
115
+
116
+ for entry in only_include:
117
+ rel = _rel_entry(entry, root=root)
118
+ if Path(rel).name in _BUILD_SUPPORT_NAMES:
119
+ # Vendored build machinery ships verbatim; never stage/scrub it.
120
+ continue
121
+ wheel_prefix = _wheel_prefix_for_entry(entry, root=root)
122
+ if rel.endswith(".py"):
123
+ source_path = root / rel
124
+ if not source_path.exists():
125
+ source_path = root / "src" / Path(rel).name
126
+ elif wheel_prefix in package_prefixes:
127
+ source_path = root / rel
128
+ else:
129
+ # Root-layout only-include names map to on-disk src/<pkg> trees.
130
+ candidate = root / "src" / wheel_prefix
131
+ source_path = candidate if candidate.exists() else root / rel
132
+ _append_target(source_path, wheel_prefix)
133
+
134
+ if targets:
135
+ return targets
136
+
137
+ if sources:
138
+ for source_root in sources:
139
+ rel = _rel_entry(source_root, root=root)
140
+ source_path = root / rel
141
+ if not source_path.exists():
142
+ raise FileNotFoundError(source_path)
143
+ wheel_prefix = _strip_src_prefix(rel.rstrip("/"))
144
+ targets.append(
145
+ ScrubTarget(
146
+ source_path=source_path,
147
+ wheel_prefix=wheel_prefix,
148
+ is_dir=source_path.is_dir(),
149
+ )
150
+ )
151
+ return targets
152
+
153
+ return targets
154
+
155
+
156
+ def _load_scrub_text():
157
+ scrub_core = Path(__file__).resolve().parent / "_scrub_core.py"
158
+ spec = importlib.util.spec_from_file_location("scrub_core_build", scrub_core)
159
+ assert spec and spec.loader
160
+ module = importlib.util.module_from_spec(spec)
161
+ spec.loader.exec_module(module)
162
+ return module.scrub_text
163
+
164
+
165
+ def _should_scrub(path: Path) -> bool:
166
+ return path.suffix.lower() in _TEXT_SUFFIXES or path.name in {
167
+ "Makefile",
168
+ "LICENSE",
169
+ "README.md",
170
+ }
171
+
172
+
173
+ def _scrub_tree(tree: Path, scrub_text) -> None:
174
+ for path in tree.rglob("*"):
175
+ if not path.is_file() or path.is_symlink():
176
+ continue
177
+ if not _should_scrub(path):
178
+ continue
179
+ try:
180
+ original = path.read_text(encoding="utf-8")
181
+ except (UnicodeDecodeError, OSError):
182
+ continue
183
+ scrubbed = scrub_text(original)
184
+ if scrubbed != original:
185
+ path.write_text(scrubbed, encoding="utf-8")
186
+
187
+
188
+ def _stage_target(staging: Path, target: ScrubTarget, scrub_text) -> Path:
189
+ if target.is_dir:
190
+ staged = staging / target.wheel_prefix
191
+ # Drop compiled bytecode/caches: force_include bypasses the sdist `exclude`
192
+ # globs, so an uncleaned source tree would otherwise ship unscanned .pyc.
193
+ shutil.copytree(
194
+ target.source_path,
195
+ staged,
196
+ ignore=shutil.ignore_patterns("__pycache__", "*.pyc", "*.pyo"),
197
+ )
198
+ _scrub_tree(staged, scrub_text)
199
+ return staged
200
+
201
+ staged = staging / target.wheel_prefix
202
+ staged.parent.mkdir(parents=True, exist_ok=True)
203
+ shutil.copy2(target.source_path, staged)
204
+ if _should_scrub(staged):
205
+ original = staged.read_text(encoding="utf-8")
206
+ scrubbed = scrub_text(original)
207
+ if scrubbed != original:
208
+ staged.write_text(scrubbed, encoding="utf-8")
209
+ return staged
210
+
211
+
212
+ def _force_include_staged(
213
+ force_include: dict[str, str],
214
+ staged_root: Path,
215
+ wheel_prefix: str,
216
+ ) -> None:
217
+ for path in staged_root.rglob("*"):
218
+ if not path.is_file():
219
+ continue
220
+ rel = path.relative_to(staged_root).as_posix()
221
+ force_include[str(path)] = f"{wheel_prefix}/{rel}" if rel else wheel_prefix
222
+
223
+
224
+ class ScrubAtBuildHook(BuildHookInterface):
225
+ PLUGIN_NAME = "custom"
226
+
227
+ @property
228
+ def _staging_dirs(self) -> list[Path]:
229
+ dirs = getattr(self, "_staging_dirs_store", None)
230
+ if dirs is None:
231
+ dirs = []
232
+ self._staging_dirs_store = dirs
233
+ return dirs
234
+
235
+ def initialize(self, version: str, build_data: dict) -> None:
236
+ scrub_text = _load_scrub_text()
237
+ root = Path(self.root)
238
+ targets = discover_scrub_targets(self.build_config, root=root)
239
+ if not targets:
240
+ return
241
+
242
+ staging = Path(tempfile.mkdtemp(prefix="workbay-scrub-stage-", dir=None))
243
+ if not staging.is_absolute():
244
+ staging = staging.resolve()
245
+ self._staging_dirs.append(staging)
246
+ force_include = build_data.setdefault("force_include", {})
247
+
248
+ for target in targets:
249
+ staged = _stage_target(staging, target, scrub_text)
250
+ if target.is_dir:
251
+ _force_include_staged(force_include, staged, target.wheel_prefix)
252
+ else:
253
+ force_include[str(staged)] = target.wheel_prefix
254
+
255
+ def finalize(self, version: str, build_data: dict, artifact_path: str) -> None:
256
+ while self._staging_dirs:
257
+ shutil.rmtree(self._staging_dirs.pop(), ignore_errors=True)
258
+
259
+
260
+ class ScrubMetadataHook(MetadataHookInterface):
261
+ PLUGIN_NAME = "custom"
262
+
263
+ def update(self, metadata: dict) -> None:
264
+ """Scrub the README long-description hatchling bakes into core metadata.
265
+
266
+ hatchling resolves ``readme`` -> the Description in wheel METADATA / sdist
267
+ PKG-INFO straight from the authored README, OUTSIDE the build hook's
268
+ force_include payload, so internal refs there would ship unscrubbed. A
269
+ package opts in by declaring ``dynamic = ["readme"]`` (and dropping the
270
+ static ``readme`` key); we supply the scrubbed long-description here.
271
+ """
272
+ scrub_text = _load_scrub_text()
273
+ readme_path = Path(self.root) / "README.md"
274
+ if readme_path.is_file():
275
+ metadata["readme"] = {
276
+ "content-type": "text/markdown",
277
+ "text": scrub_text(readme_path.read_text(encoding="utf-8")),
278
+ }
279
+
280
+
281
+ @hookimpl
282
+ def hatch_register_build_hook():
283
+ return ScrubAtBuildHook
284
+
285
+
286
+ @hookimpl
287
+ def hatch_register_metadata_hook():
288
+ return ScrubMetadataHook
@@ -0,0 +1,71 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "workbay-system"
7
+ version = "0.1.0"
8
+ description = "Canonical workbay-system overlay payload (skills, hooks, contracts, generator) shipped as package data for workbay-bootstrap."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "LicenseRef-Proprietary"
12
+ authors = [{ name = "darce" }]
13
+ dependencies = []
14
+
15
+ [project.urls]
16
+ Homepage = "https://github.com/darce/workbay"
17
+ Source = "https://github.com/darce/workbay/tree/main/packages/workbay-system"
18
+
19
+ [project.optional-dependencies]
20
+ dev = ["pytest>=8", "pyyaml>=6", "hatchling>=1.27"]
21
+
22
+ # uv-only dev provisioning: sibling test deps resolve via path-editable sources.
23
+ # ``[project.optional-dependencies] dev`` stays for pip; ``dependency-groups`` is
24
+ # what ``uv sync`` installs by default (also additively with ``--extra dev``).
25
+ # The three shared pins are duplicated in ``[project.optional-dependencies] dev``
26
+ # above (pip path vs uv path) — keep both lists in sync when bumping a pin.
27
+ [dependency-groups]
28
+ dev = [
29
+ "pytest>=8",
30
+ "pyyaml>=6",
31
+ "hatchling>=1.27",
32
+ "mcp-workbay-handoff[test] ; python_version >= '3.12'",
33
+ ]
34
+
35
+ [tool.uv.sources]
36
+ mcp-workbay-handoff = { path = "../mcp-workbay-handoff", editable = true }
37
+ workbay-protocol = { path = "../workbay-protocol", editable = true }
38
+
39
+ # Overlay packaging (0020 S3): the overlay payload is co-located under
40
+ # `workbay_system/payload/` and ships by "ship the package" — `only-include`
41
+ # delivers the importable package (with its payload subtree) and there is no
42
+ # force-include map. Internal-only material (evals, adrs, generated, tests)
43
+ # lives OUTSIDE `workbay_system/`, so it is structurally impossible to sweep
44
+ # into the wheel; `tests/test_payload_colocation.py` (the negative privacy
45
+ # guard + the wheel-vs-source byte-parity test) is the comprehensive guard that
46
+ # no internal file leaks and no needed surface is dropped.
47
+ [tool.hatch.build.hooks.custom]
48
+ path = "hatch_build.py"
49
+
50
+ [tool.hatch.build.targets.wheel]
51
+ only-include = ["workbay_system"]
52
+ exclude = ["**/__pycache__", "**/*.pyc"]
53
+
54
+ # Source-model rework (0038): the sdist is an allowlist (not a denylist) so
55
+ # internal-only top-level material (task docs, specs, adrs, harness prompts,
56
+ # editor config, dev scripts, agent guides, changelog) can never silently leak
57
+ # into the published source distribution. Ship only what is needed to rebuild
58
+ # the wheel from sdist: the importable package (with its scrubbed payload), the
59
+ # build hook, and its vendored scrub core. pyproject.toml and README.md are
60
+ # always included by hatchling as sdist metadata. The privacy gate scans the
61
+ # *entire* unpacked sdist, so anything added here is also gated.
62
+ [tool.hatch.build.targets.sdist]
63
+ only-include = ["workbay_system", "hatch_build.py", "_scrub_core.py"]
64
+ exclude = ["**/__pycache__", "**/*.pyc", "**/evals/**", "**/evals.mk"]
65
+
66
+ [tool.pytest.ini_options]
67
+ testpaths = ["tests"]
68
+ addopts = "-ra"
69
+ markers = [
70
+ "integration: uv-driven environment provisioning checks (need `uv`; isolated, side-effect-free).",
71
+ ]
@@ -0,0 +1,25 @@
1
+ """workbay-system overlay payload package.
2
+
3
+ Ships the canonical overlay surfaces — skills, the workflow generator,
4
+ agent-workflows config, and the shared hook/contract surfaces — as package
5
+ data so ``workbay-bootstrap`` can materialize them from an installed
6
+ distribution (the package delivery source) instead of a git clone.
7
+
8
+ The payload is co-located under ``workbay_system/payload/`` and ships by
9
+ "ship the package" (``only-include = ["workbay_system"]`` in
10
+ ``pyproject.toml`` — no force-include map), so :func:`data_root` resolves to the
11
+ ``payload/`` directory that contains ``skills/``, ``scripts/``, ``config/``,
12
+ ``docs/``, ``Makefile.d/``, and ``.github/`` once installed.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ from importlib import resources
18
+ from pathlib import Path
19
+
20
+ __all__ = ["data_root"]
21
+
22
+
23
+ def data_root() -> Path:
24
+ """Return the filesystem root of the installed overlay payload."""
25
+ return Path(str(resources.files(__name__) / "payload"))
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env bash
2
+ # SessionStart hook — ensure this clone's GENERATED agent surfaces exist.
3
+ #
4
+ # Three agent surfaces are generated into GITIGNORED paths, so a fresh clone
5
+ # carries the pins/sources but not the generated output — and the surfaces
6
+ # silently fail to load until they are built:
7
+ # - Claude plugin tree .workbay/generated/plugins/workbay-system/base/claude (make plugins-build)
8
+ # - Codex plugin tree .workbay/generated/plugins/workbay-system/base/codex (make plugins-build)
9
+ # - VS Code Copilot .github/prompts/ (make generate-agent-workflows)
10
+ #
11
+ # This hook regenerates all of them when missing. It can only run on CLAUDE CODE
12
+ # session start — Codex and VS Code Copilot have no equivalent trigger (see the
13
+ # README "Developing in this repo" section) — but because `plugins-build` emits
14
+ # BOTH plugin trees and `generate-agent-workflows` emits the Copilot prompts,
15
+ # opening Claude once bootstraps every surface. Plugins load only at session
16
+ # start, so a one-time restart is needed after the first build. The hook is a
17
+ # no-op (fast, silent) once the surfaces exist and never blocks session start.
18
+ set -euo pipefail
19
+
20
+ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
21
+ claude_manifest="$repo_root/.workbay/generated/plugins/workbay-system/base/claude/.claude-plugin/plugin.json"
22
+ codex_manifest="$repo_root/.workbay/generated/plugins/workbay-system/base/codex/.codex-plugin/plugin.json"
23
+ copilot_prompts="$repo_root/.github/prompts"
24
+
25
+ # All three surfaces must be present to skip; checking only Claude + Copilot
26
+ # would leave a partial-drift clone (e.g. only the codex tree deleted) unhealed.
27
+ if [ -f "$claude_manifest" ] && [ -f "$codex_manifest" ] && [ -d "$copilot_prompts" ]; then
28
+ exit 0
29
+ fi
30
+
31
+ echo "workbay-system agent surfaces missing (fresh clone?) — generating them…"
32
+ ok=1
33
+ make -C "$repo_root" plugins-build >/dev/null 2>&1 || ok=0
34
+ # Pass WORKFLOW_TARGET_ROOT so the Copilot prompts land in this repo's root
35
+ # .github/prompts/ (the surface VS Code reads); without --target the generator
36
+ # only rewrites the tracked package-level source copy.
37
+ make -C "$repo_root" generate-agent-workflows WORKFLOW_TARGET_ROOT="$repo_root" >/dev/null 2>&1 || ok=0
38
+ if [ "$ok" -eq 1 ]; then
39
+ echo "Generated the Claude + Codex plugin trees and the VS Code Copilot prompts."
40
+ echo "RESTART Claude Code (/exit, then reopen) to load the /branch-review, /plan-analyze, … slash commands."
41
+ else
42
+ echo "Could not auto-generate every surface. Run 'cd \"$repo_root\" && make plugins-build && make generate-agent-workflows WORKFLOW_TARGET_ROOT=\"\$PWD\"' (or 'workbay-bootstrap install --target \"$repo_root\"') manually, then restart Claude Code."
43
+ fi
44
+ exit 0