@bradygaster/squad-cli 0.9.1 → 0.9.2-insider.5

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 (276) hide show
  1. package/README.md +329 -329
  2. package/dist/cli/commands/build.d.ts.map +1 -1
  3. package/dist/cli/commands/build.js +10 -10
  4. package/dist/cli/commands/build.js.map +1 -1
  5. package/dist/cli/commands/config.d.ts +12 -0
  6. package/dist/cli/commands/config.d.ts.map +1 -0
  7. package/dist/cli/commands/config.js +157 -0
  8. package/dist/cli/commands/config.js.map +1 -0
  9. package/dist/cli/commands/consult.d.ts.map +1 -1
  10. package/dist/cli/commands/consult.js +9 -4
  11. package/dist/cli/commands/consult.js.map +1 -1
  12. package/dist/cli/commands/copilot.d.ts.map +1 -1
  13. package/dist/cli/commands/copilot.js +8 -7
  14. package/dist/cli/commands/copilot.js.map +1 -1
  15. package/dist/cli/commands/doctor.d.ts.map +1 -1
  16. package/dist/cli/commands/doctor.js +50 -17
  17. package/dist/cli/commands/doctor.js.map +1 -1
  18. package/dist/cli/commands/economy.d.ts.map +1 -1
  19. package/dist/cli/commands/economy.js +3 -2
  20. package/dist/cli/commands/economy.js.map +1 -1
  21. package/dist/cli/commands/export.d.ts.map +1 -1
  22. package/dist/cli/commands/export.js +22 -16
  23. package/dist/cli/commands/export.js.map +1 -1
  24. package/dist/cli/commands/extract.d.ts.map +1 -1
  25. package/dist/cli/commands/extract.js +14 -10
  26. package/dist/cli/commands/extract.js.map +1 -1
  27. package/dist/cli/commands/import.d.ts.map +1 -1
  28. package/dist/cli/commands/import.js +21 -18
  29. package/dist/cli/commands/import.js.map +1 -1
  30. package/dist/cli/commands/init-remote.d.ts.map +1 -1
  31. package/dist/cli/commands/init-remote.js +7 -6
  32. package/dist/cli/commands/init-remote.js.map +1 -1
  33. package/dist/cli/commands/link.d.ts.map +1 -1
  34. package/dist/cli/commands/link.js +11 -10
  35. package/dist/cli/commands/link.js.map +1 -1
  36. package/dist/cli/commands/migrate.d.ts.map +1 -1
  37. package/dist/cli/commands/migrate.js +19 -18
  38. package/dist/cli/commands/migrate.js.map +1 -1
  39. package/dist/cli/commands/personal.d.ts.map +1 -1
  40. package/dist/cli/commands/personal.js +57 -65
  41. package/dist/cli/commands/personal.js.map +1 -1
  42. package/dist/cli/commands/plugin.d.ts.map +1 -1
  43. package/dist/cli/commands/plugin.js +8 -7
  44. package/dist/cli/commands/plugin.js.map +1 -1
  45. package/dist/cli/commands/rc.d.ts.map +1 -1
  46. package/dist/cli/commands/rc.js +19 -12
  47. package/dist/cli/commands/rc.js.map +1 -1
  48. package/dist/cli/commands/schedule.d.ts.map +1 -1
  49. package/dist/cli/commands/schedule.js +6 -5
  50. package/dist/cli/commands/schedule.js.map +1 -1
  51. package/dist/cli/commands/start.d.ts.map +1 -1
  52. package/dist/cli/commands/start.js +18 -11
  53. package/dist/cli/commands/start.js.map +1 -1
  54. package/dist/cli/commands/streams.d.ts.map +1 -1
  55. package/dist/cli/commands/streams.js +3 -2
  56. package/dist/cli/commands/streams.js.map +1 -1
  57. package/dist/cli/commands/upstream.d.ts.map +1 -1
  58. package/dist/cli/commands/upstream.js +23 -19
  59. package/dist/cli/commands/upstream.js.map +1 -1
  60. package/dist/cli/commands/watch/capabilities/board.d.ts +22 -0
  61. package/dist/cli/commands/watch/capabilities/board.d.ts.map +1 -0
  62. package/dist/cli/commands/watch/capabilities/board.js +121 -0
  63. package/dist/cli/commands/watch/capabilities/board.js.map +1 -0
  64. package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts +14 -0
  65. package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts.map +1 -0
  66. package/dist/cli/commands/watch/capabilities/decision-hygiene.js +72 -0
  67. package/dist/cli/commands/watch/capabilities/decision-hygiene.js.map +1 -0
  68. package/dist/cli/commands/watch/capabilities/execute.d.ts +33 -0
  69. package/dist/cli/commands/watch/capabilities/execute.d.ts.map +1 -0
  70. package/dist/cli/commands/watch/capabilities/execute.js +119 -0
  71. package/dist/cli/commands/watch/capabilities/execute.js.map +1 -0
  72. package/dist/cli/commands/watch/capabilities/index.d.ts +7 -0
  73. package/dist/cli/commands/watch/capabilities/index.d.ts.map +1 -0
  74. package/dist/cli/commands/watch/capabilities/index.js +28 -0
  75. package/dist/cli/commands/watch/capabilities/index.js.map +1 -0
  76. package/dist/cli/commands/watch/capabilities/monitor-email.d.ts +14 -0
  77. package/dist/cli/commands/watch/capabilities/monitor-email.d.ts.map +1 -0
  78. package/dist/cli/commands/watch/capabilities/monitor-email.js +54 -0
  79. package/dist/cli/commands/watch/capabilities/monitor-email.js.map +1 -0
  80. package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts +14 -0
  81. package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts.map +1 -0
  82. package/dist/cli/commands/watch/capabilities/monitor-teams.js +55 -0
  83. package/dist/cli/commands/watch/capabilities/monitor-teams.js.map +1 -0
  84. package/dist/cli/commands/watch/capabilities/retro.d.ts +14 -0
  85. package/dist/cli/commands/watch/capabilities/retro.d.ts.map +1 -0
  86. package/dist/cli/commands/watch/capabilities/retro.js +81 -0
  87. package/dist/cli/commands/watch/capabilities/retro.js.map +1 -0
  88. package/dist/cli/commands/watch/capabilities/self-pull.d.ts +14 -0
  89. package/dist/cli/commands/watch/capabilities/self-pull.d.ts.map +1 -0
  90. package/dist/cli/commands/watch/capabilities/self-pull.js +33 -0
  91. package/dist/cli/commands/watch/capabilities/self-pull.js.map +1 -0
  92. package/dist/cli/commands/watch/capabilities/two-pass.d.ts +14 -0
  93. package/dist/cli/commands/watch/capabilities/two-pass.d.ts.map +1 -0
  94. package/dist/cli/commands/watch/capabilities/two-pass.js +66 -0
  95. package/dist/cli/commands/watch/capabilities/two-pass.js.map +1 -0
  96. package/dist/cli/commands/watch/capabilities/wave-dispatch.d.ts +14 -0
  97. package/dist/cli/commands/watch/capabilities/wave-dispatch.d.ts.map +1 -0
  98. package/dist/cli/commands/watch/capabilities/wave-dispatch.js +117 -0
  99. package/dist/cli/commands/watch/capabilities/wave-dispatch.js.map +1 -0
  100. package/dist/cli/commands/watch/config.d.ts +25 -0
  101. package/dist/cli/commands/watch/config.d.ts.map +1 -0
  102. package/dist/cli/commands/watch/config.js +82 -0
  103. package/dist/cli/commands/watch/config.js.map +1 -0
  104. package/dist/cli/commands/watch/index.d.ts +95 -0
  105. package/dist/cli/commands/watch/index.d.ts.map +1 -0
  106. package/dist/cli/commands/watch/index.js +704 -0
  107. package/dist/cli/commands/watch/index.js.map +1 -0
  108. package/dist/cli/commands/watch/registry.d.ts +19 -0
  109. package/dist/cli/commands/watch/registry.d.ts.map +1 -0
  110. package/dist/cli/commands/watch/registry.js +28 -0
  111. package/dist/cli/commands/watch/registry.js.map +1 -0
  112. package/dist/cli/commands/watch/types.d.ts +57 -0
  113. package/dist/cli/commands/watch/types.d.ts.map +1 -0
  114. package/dist/cli/commands/watch/types.js +8 -0
  115. package/dist/cli/commands/watch/types.js.map +1 -0
  116. package/dist/cli/core/cast.d.ts.map +1 -1
  117. package/dist/cli/core/cast.js +15 -19
  118. package/dist/cli/core/cast.js.map +1 -1
  119. package/dist/cli/core/detect-squad-dir.d.ts.map +1 -1
  120. package/dist/cli/core/detect-squad-dir.js +12 -10
  121. package/dist/cli/core/detect-squad-dir.js.map +1 -1
  122. package/dist/cli/core/email-scrub.d.ts.map +1 -1
  123. package/dist/cli/core/email-scrub.js +12 -11
  124. package/dist/cli/core/email-scrub.js.map +1 -1
  125. package/dist/cli/core/gh-cli.d.ts +13 -0
  126. package/dist/cli/core/gh-cli.d.ts.map +1 -1
  127. package/dist/cli/core/gh-cli.js +24 -0
  128. package/dist/cli/core/gh-cli.js.map +1 -1
  129. package/dist/cli/core/init.d.ts +2 -0
  130. package/dist/cli/core/init.d.ts.map +1 -1
  131. package/dist/cli/core/init.js +22 -5
  132. package/dist/cli/core/init.js.map +1 -1
  133. package/dist/cli/core/migrate-directory.d.ts.map +1 -1
  134. package/dist/cli/core/migrate-directory.js +14 -13
  135. package/dist/cli/core/migrate-directory.js.map +1 -1
  136. package/dist/cli/core/migrations.d.ts.map +1 -1
  137. package/dist/cli/core/migrations.js +22 -8
  138. package/dist/cli/core/migrations.js.map +1 -1
  139. package/dist/cli/core/nap.d.ts.map +1 -1
  140. package/dist/cli/core/nap.js +111 -49
  141. package/dist/cli/core/nap.js.map +1 -1
  142. package/dist/cli/core/project-type.d.ts.map +1 -1
  143. package/dist/cli/core/project-type.js +11 -10
  144. package/dist/cli/core/project-type.js.map +1 -1
  145. package/dist/cli/core/team-md.d.ts.map +1 -1
  146. package/dist/cli/core/team-md.js +43 -38
  147. package/dist/cli/core/team-md.js.map +1 -1
  148. package/dist/cli/core/templates.d.ts.map +1 -1
  149. package/dist/cli/core/templates.js +4 -3
  150. package/dist/cli/core/templates.js.map +1 -1
  151. package/dist/cli/core/upgrade.d.ts.map +1 -1
  152. package/dist/cli/core/upgrade.js +68 -55
  153. package/dist/cli/core/upgrade.js.map +1 -1
  154. package/dist/cli/core/version.d.ts.map +1 -1
  155. package/dist/cli/core/version.js +8 -7
  156. package/dist/cli/core/version.js.map +1 -1
  157. package/dist/cli/index.d.ts +1 -1
  158. package/dist/cli/index.d.ts.map +1 -1
  159. package/dist/cli/index.js +1 -1
  160. package/dist/cli/index.js.map +1 -1
  161. package/dist/cli/self-update.d.ts.map +1 -1
  162. package/dist/cli/self-update.js +7 -4
  163. package/dist/cli/self-update.js.map +1 -1
  164. package/dist/cli/shell/agent-name-parser.d.ts +16 -0
  165. package/dist/cli/shell/agent-name-parser.d.ts.map +1 -0
  166. package/dist/cli/shell/agent-name-parser.js +54 -0
  167. package/dist/cli/shell/agent-name-parser.js.map +1 -0
  168. package/dist/cli/shell/commands.d.ts.map +1 -1
  169. package/dist/cli/shell/commands.js +4 -3
  170. package/dist/cli/shell/commands.js.map +1 -1
  171. package/dist/cli/shell/coordinator.d.ts +4 -1
  172. package/dist/cli/shell/coordinator.d.ts.map +1 -1
  173. package/dist/cli/shell/coordinator.js +29 -26
  174. package/dist/cli/shell/coordinator.js.map +1 -1
  175. package/dist/cli/shell/index.d.ts.map +1 -1
  176. package/dist/cli/shell/index.js +33 -35
  177. package/dist/cli/shell/index.js.map +1 -1
  178. package/dist/cli/shell/lifecycle.d.ts +13 -2
  179. package/dist/cli/shell/lifecycle.d.ts.map +1 -1
  180. package/dist/cli/shell/lifecycle.js +26 -13
  181. package/dist/cli/shell/lifecycle.js.map +1 -1
  182. package/dist/cli/shell/session-store.d.ts.map +1 -1
  183. package/dist/cli/shell/session-store.js +16 -12
  184. package/dist/cli/shell/session-store.js.map +1 -1
  185. package/dist/cli/shell/spawn.d.ts +4 -1
  186. package/dist/cli/shell/spawn.d.ts.map +1 -1
  187. package/dist/cli/shell/spawn.js +28 -10
  188. package/dist/cli/shell/spawn.js.map +1 -1
  189. package/dist/cli-entry.js +83 -12
  190. package/dist/cli-entry.js.map +1 -1
  191. package/package.json +8 -4
  192. package/scripts/patch-esm-imports.mjs +105 -105
  193. package/scripts/patch-ink-rendering.mjs +115 -115
  194. package/templates/casting/Futurama.json +9 -9
  195. package/templates/casting-history.json +4 -4
  196. package/templates/casting-policy.json +37 -37
  197. package/templates/casting-reference.md +104 -104
  198. package/templates/casting-registry.json +3 -3
  199. package/templates/ceremonies.md +41 -41
  200. package/templates/charter.md +53 -53
  201. package/templates/constraint-tracking.md +38 -38
  202. package/templates/cooperative-rate-limiting.md +229 -229
  203. package/templates/copilot-instructions.md +46 -46
  204. package/templates/history.md +10 -10
  205. package/templates/identity/now.md +9 -9
  206. package/templates/identity/wisdom.md +15 -15
  207. package/templates/issue-lifecycle.md +412 -412
  208. package/templates/keda-scaler.md +164 -164
  209. package/templates/machine-capabilities.md +74 -74
  210. package/templates/mcp-config.md +90 -90
  211. package/templates/multi-agent-format.md +28 -28
  212. package/templates/orchestration-log.md +27 -27
  213. package/templates/plugin-marketplace.md +49 -49
  214. package/templates/ralph-circuit-breaker.md +313 -313
  215. package/templates/raw-agent-output.md +37 -37
  216. package/templates/roster.md +60 -60
  217. package/templates/routing.md +39 -39
  218. package/templates/run-output.md +50 -50
  219. package/templates/scribe-charter.md +123 -119
  220. package/templates/skill.md +24 -24
  221. package/templates/skills/agent-collaboration/SKILL.md +42 -42
  222. package/templates/skills/agent-conduct/SKILL.md +24 -24
  223. package/templates/skills/architectural-proposals/SKILL.md +151 -151
  224. package/templates/skills/ci-validation-gates/SKILL.md +84 -84
  225. package/templates/skills/cli-wiring/SKILL.md +47 -47
  226. package/templates/skills/client-compatibility/SKILL.md +89 -89
  227. package/templates/skills/cross-machine-coordination/SKILL.md +434 -0
  228. package/templates/skills/cross-squad/SKILL.md +114 -114
  229. package/templates/skills/distributed-mesh/SKILL.md +287 -287
  230. package/templates/skills/distributed-mesh/mesh.json.example +30 -30
  231. package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -111
  232. package/templates/skills/distributed-mesh/sync-mesh.sh +104 -104
  233. package/templates/skills/docs-standards/SKILL.md +71 -71
  234. package/templates/skills/economy-mode/SKILL.md +114 -114
  235. package/templates/skills/error-recovery/SKILL.md +99 -0
  236. package/templates/skills/external-comms/SKILL.md +329 -329
  237. package/templates/skills/gh-auth-isolation/SKILL.md +183 -183
  238. package/templates/skills/git-workflow/SKILL.md +204 -204
  239. package/templates/skills/github-multi-account/SKILL.md +95 -95
  240. package/templates/skills/history-hygiene/SKILL.md +36 -36
  241. package/templates/skills/humanizer/SKILL.md +105 -105
  242. package/templates/skills/init-mode/SKILL.md +102 -102
  243. package/templates/skills/iterative-retrieval/SKILL.md +165 -0
  244. package/templates/skills/model-selection/SKILL.md +117 -117
  245. package/templates/skills/nap/SKILL.md +24 -24
  246. package/templates/skills/notification-routing/SKILL.md +105 -0
  247. package/templates/skills/personal-squad/SKILL.md +57 -57
  248. package/templates/skills/pr-screenshots/SKILL.md +149 -0
  249. package/templates/skills/ralph-two-pass-scan/SKILL.md +35 -0
  250. package/templates/skills/reflect/SKILL.md +229 -0
  251. package/templates/skills/release-process/SKILL.md +131 -423
  252. package/templates/skills/reskill/SKILL.md +92 -92
  253. package/templates/skills/retro-enforcement/SKILL.md +148 -0
  254. package/templates/skills/reviewer-protocol/SKILL.md +79 -79
  255. package/templates/skills/secret-handling/SKILL.md +200 -200
  256. package/templates/skills/session-recovery/SKILL.md +155 -155
  257. package/templates/skills/squad-conventions/SKILL.md +69 -69
  258. package/templates/skills/test-discipline/SKILL.md +37 -37
  259. package/templates/skills/tiered-memory/SKILL.md +234 -0
  260. package/templates/skills/windows-compatibility/SKILL.md +98 -74
  261. package/templates/{squad.agent.md → squad.agent.md.template} +1316 -1287
  262. package/templates/workflows/squad-ci.yml +24 -24
  263. package/templates/workflows/squad-docs.yml +54 -54
  264. package/templates/workflows/squad-heartbeat.yml +0 -4
  265. package/templates/workflows/squad-insider-release.yml +61 -61
  266. package/templates/workflows/squad-issue-assign.yml +161 -161
  267. package/templates/workflows/squad-label-enforce.yml +181 -181
  268. package/templates/workflows/squad-preview.yml +55 -55
  269. package/templates/workflows/squad-promote.yml +120 -120
  270. package/templates/workflows/squad-release.yml +77 -77
  271. package/templates/workflows/squad-triage.yml +260 -260
  272. package/templates/workflows/sync-squad-labels.yml +169 -169
  273. package/dist/cli/commands/watch.d.ts +0 -18
  274. package/dist/cli/commands/watch.d.ts.map +0 -1
  275. package/dist/cli/commands/watch.js +0 -306
  276. package/dist/cli/commands/watch.js.map +0 -1
@@ -1,181 +1,181 @@
1
- name: Squad Label Enforce
2
-
3
- on:
4
- issues:
5
- types: [labeled]
6
-
7
- permissions:
8
- issues: write
9
- contents: read
10
-
11
- jobs:
12
- enforce:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: actions/checkout@v4
16
-
17
- - name: Enforce mutual exclusivity
18
- uses: actions/github-script@v7
19
- with:
20
- script: |
21
- const issue = context.payload.issue;
22
- const appliedLabel = context.payload.label.name;
23
-
24
- // Namespaces with mutual exclusivity rules
25
- const EXCLUSIVE_PREFIXES = ['go:', 'release:', 'type:', 'priority:'];
26
-
27
- // Skip if not a managed namespace label
28
- if (!EXCLUSIVE_PREFIXES.some(p => appliedLabel.startsWith(p))) {
29
- core.info(`Label ${appliedLabel} is not in a managed namespace — skipping`);
30
- return;
31
- }
32
-
33
- const allLabels = issue.labels.map(l => l.name);
34
-
35
- // Handle go: namespace (mutual exclusivity)
36
- if (appliedLabel.startsWith('go:')) {
37
- const otherGoLabels = allLabels.filter(l =>
38
- l.startsWith('go:') && l !== appliedLabel
39
- );
40
-
41
- if (otherGoLabels.length > 0) {
42
- // Remove conflicting go: labels
43
- for (const label of otherGoLabels) {
44
- await github.rest.issues.removeLabel({
45
- owner: context.repo.owner,
46
- repo: context.repo.repo,
47
- issue_number: issue.number,
48
- name: label
49
- });
50
- core.info(`Removed conflicting label: ${label}`);
51
- }
52
-
53
- // Post update comment
54
- await github.rest.issues.createComment({
55
- owner: context.repo.owner,
56
- repo: context.repo.repo,
57
- issue_number: issue.number,
58
- body: `🏷️ Triage verdict updated → \`${appliedLabel}\``
59
- });
60
- }
61
-
62
- // Auto-apply release:backlog if go:yes and no release target
63
- if (appliedLabel === 'go:yes') {
64
- const hasReleaseLabel = allLabels.some(l => l.startsWith('release:'));
65
- if (!hasReleaseLabel) {
66
- await github.rest.issues.addLabels({
67
- owner: context.repo.owner,
68
- repo: context.repo.repo,
69
- issue_number: issue.number,
70
- labels: ['release:backlog']
71
- });
72
-
73
- await github.rest.issues.createComment({
74
- owner: context.repo.owner,
75
- repo: context.repo.repo,
76
- issue_number: issue.number,
77
- body: `📋 Marked as \`release:backlog\` — assign a release target when ready.`
78
- });
79
-
80
- core.info('Applied release:backlog for go:yes issue');
81
- }
82
- }
83
-
84
- // Remove release: labels if go:no
85
- if (appliedLabel === 'go:no') {
86
- const releaseLabels = allLabels.filter(l => l.startsWith('release:'));
87
- if (releaseLabels.length > 0) {
88
- for (const label of releaseLabels) {
89
- await github.rest.issues.removeLabel({
90
- owner: context.repo.owner,
91
- repo: context.repo.repo,
92
- issue_number: issue.number,
93
- name: label
94
- });
95
- core.info(`Removed release label from go:no issue: ${label}`);
96
- }
97
- }
98
- }
99
- }
100
-
101
- // Handle release: namespace (mutual exclusivity)
102
- if (appliedLabel.startsWith('release:')) {
103
- const otherReleaseLabels = allLabels.filter(l =>
104
- l.startsWith('release:') && l !== appliedLabel
105
- );
106
-
107
- if (otherReleaseLabels.length > 0) {
108
- // Remove conflicting release: labels
109
- for (const label of otherReleaseLabels) {
110
- await github.rest.issues.removeLabel({
111
- owner: context.repo.owner,
112
- repo: context.repo.repo,
113
- issue_number: issue.number,
114
- name: label
115
- });
116
- core.info(`Removed conflicting label: ${label}`);
117
- }
118
-
119
- // Post update comment
120
- await github.rest.issues.createComment({
121
- owner: context.repo.owner,
122
- repo: context.repo.repo,
123
- issue_number: issue.number,
124
- body: `🏷️ Release target updated → \`${appliedLabel}\``
125
- });
126
- }
127
- }
128
-
129
- // Handle type: namespace (mutual exclusivity)
130
- if (appliedLabel.startsWith('type:')) {
131
- const otherTypeLabels = allLabels.filter(l =>
132
- l.startsWith('type:') && l !== appliedLabel
133
- );
134
-
135
- if (otherTypeLabels.length > 0) {
136
- for (const label of otherTypeLabels) {
137
- await github.rest.issues.removeLabel({
138
- owner: context.repo.owner,
139
- repo: context.repo.repo,
140
- issue_number: issue.number,
141
- name: label
142
- });
143
- core.info(`Removed conflicting label: ${label}`);
144
- }
145
-
146
- await github.rest.issues.createComment({
147
- owner: context.repo.owner,
148
- repo: context.repo.repo,
149
- issue_number: issue.number,
150
- body: `🏷️ Issue type updated → \`${appliedLabel}\``
151
- });
152
- }
153
- }
154
-
155
- // Handle priority: namespace (mutual exclusivity)
156
- if (appliedLabel.startsWith('priority:')) {
157
- const otherPriorityLabels = allLabels.filter(l =>
158
- l.startsWith('priority:') && l !== appliedLabel
159
- );
160
-
161
- if (otherPriorityLabels.length > 0) {
162
- for (const label of otherPriorityLabels) {
163
- await github.rest.issues.removeLabel({
164
- owner: context.repo.owner,
165
- repo: context.repo.repo,
166
- issue_number: issue.number,
167
- name: label
168
- });
169
- core.info(`Removed conflicting label: ${label}`);
170
- }
171
-
172
- await github.rest.issues.createComment({
173
- owner: context.repo.owner,
174
- repo: context.repo.repo,
175
- issue_number: issue.number,
176
- body: `🏷️ Priority updated → \`${appliedLabel}\``
177
- });
178
- }
179
- }
180
-
181
- core.info(`Label enforcement complete for ${appliedLabel}`);
1
+ name: Squad Label Enforce
2
+
3
+ on:
4
+ issues:
5
+ types: [labeled]
6
+
7
+ permissions:
8
+ issues: write
9
+ contents: read
10
+
11
+ jobs:
12
+ enforce:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Enforce mutual exclusivity
18
+ uses: actions/github-script@v7
19
+ with:
20
+ script: |
21
+ const issue = context.payload.issue;
22
+ const appliedLabel = context.payload.label.name;
23
+
24
+ // Namespaces with mutual exclusivity rules
25
+ const EXCLUSIVE_PREFIXES = ['go:', 'release:', 'type:', 'priority:'];
26
+
27
+ // Skip if not a managed namespace label
28
+ if (!EXCLUSIVE_PREFIXES.some(p => appliedLabel.startsWith(p))) {
29
+ core.info(`Label ${appliedLabel} is not in a managed namespace — skipping`);
30
+ return;
31
+ }
32
+
33
+ const allLabels = issue.labels.map(l => l.name);
34
+
35
+ // Handle go: namespace (mutual exclusivity)
36
+ if (appliedLabel.startsWith('go:')) {
37
+ const otherGoLabels = allLabels.filter(l =>
38
+ l.startsWith('go:') && l !== appliedLabel
39
+ );
40
+
41
+ if (otherGoLabels.length > 0) {
42
+ // Remove conflicting go: labels
43
+ for (const label of otherGoLabels) {
44
+ await github.rest.issues.removeLabel({
45
+ owner: context.repo.owner,
46
+ repo: context.repo.repo,
47
+ issue_number: issue.number,
48
+ name: label
49
+ });
50
+ core.info(`Removed conflicting label: ${label}`);
51
+ }
52
+
53
+ // Post update comment
54
+ await github.rest.issues.createComment({
55
+ owner: context.repo.owner,
56
+ repo: context.repo.repo,
57
+ issue_number: issue.number,
58
+ body: `🏷️ Triage verdict updated → \`${appliedLabel}\``
59
+ });
60
+ }
61
+
62
+ // Auto-apply release:backlog if go:yes and no release target
63
+ if (appliedLabel === 'go:yes') {
64
+ const hasReleaseLabel = allLabels.some(l => l.startsWith('release:'));
65
+ if (!hasReleaseLabel) {
66
+ await github.rest.issues.addLabels({
67
+ owner: context.repo.owner,
68
+ repo: context.repo.repo,
69
+ issue_number: issue.number,
70
+ labels: ['release:backlog']
71
+ });
72
+
73
+ await github.rest.issues.createComment({
74
+ owner: context.repo.owner,
75
+ repo: context.repo.repo,
76
+ issue_number: issue.number,
77
+ body: `📋 Marked as \`release:backlog\` — assign a release target when ready.`
78
+ });
79
+
80
+ core.info('Applied release:backlog for go:yes issue');
81
+ }
82
+ }
83
+
84
+ // Remove release: labels if go:no
85
+ if (appliedLabel === 'go:no') {
86
+ const releaseLabels = allLabels.filter(l => l.startsWith('release:'));
87
+ if (releaseLabels.length > 0) {
88
+ for (const label of releaseLabels) {
89
+ await github.rest.issues.removeLabel({
90
+ owner: context.repo.owner,
91
+ repo: context.repo.repo,
92
+ issue_number: issue.number,
93
+ name: label
94
+ });
95
+ core.info(`Removed release label from go:no issue: ${label}`);
96
+ }
97
+ }
98
+ }
99
+ }
100
+
101
+ // Handle release: namespace (mutual exclusivity)
102
+ if (appliedLabel.startsWith('release:')) {
103
+ const otherReleaseLabels = allLabels.filter(l =>
104
+ l.startsWith('release:') && l !== appliedLabel
105
+ );
106
+
107
+ if (otherReleaseLabels.length > 0) {
108
+ // Remove conflicting release: labels
109
+ for (const label of otherReleaseLabels) {
110
+ await github.rest.issues.removeLabel({
111
+ owner: context.repo.owner,
112
+ repo: context.repo.repo,
113
+ issue_number: issue.number,
114
+ name: label
115
+ });
116
+ core.info(`Removed conflicting label: ${label}`);
117
+ }
118
+
119
+ // Post update comment
120
+ await github.rest.issues.createComment({
121
+ owner: context.repo.owner,
122
+ repo: context.repo.repo,
123
+ issue_number: issue.number,
124
+ body: `🏷️ Release target updated → \`${appliedLabel}\``
125
+ });
126
+ }
127
+ }
128
+
129
+ // Handle type: namespace (mutual exclusivity)
130
+ if (appliedLabel.startsWith('type:')) {
131
+ const otherTypeLabels = allLabels.filter(l =>
132
+ l.startsWith('type:') && l !== appliedLabel
133
+ );
134
+
135
+ if (otherTypeLabels.length > 0) {
136
+ for (const label of otherTypeLabels) {
137
+ await github.rest.issues.removeLabel({
138
+ owner: context.repo.owner,
139
+ repo: context.repo.repo,
140
+ issue_number: issue.number,
141
+ name: label
142
+ });
143
+ core.info(`Removed conflicting label: ${label}`);
144
+ }
145
+
146
+ await github.rest.issues.createComment({
147
+ owner: context.repo.owner,
148
+ repo: context.repo.repo,
149
+ issue_number: issue.number,
150
+ body: `🏷️ Issue type updated → \`${appliedLabel}\``
151
+ });
152
+ }
153
+ }
154
+
155
+ // Handle priority: namespace (mutual exclusivity)
156
+ if (appliedLabel.startsWith('priority:')) {
157
+ const otherPriorityLabels = allLabels.filter(l =>
158
+ l.startsWith('priority:') && l !== appliedLabel
159
+ );
160
+
161
+ if (otherPriorityLabels.length > 0) {
162
+ for (const label of otherPriorityLabels) {
163
+ await github.rest.issues.removeLabel({
164
+ owner: context.repo.owner,
165
+ repo: context.repo.repo,
166
+ issue_number: issue.number,
167
+ name: label
168
+ });
169
+ core.info(`Removed conflicting label: ${label}`);
170
+ }
171
+
172
+ await github.rest.issues.createComment({
173
+ owner: context.repo.owner,
174
+ repo: context.repo.repo,
175
+ issue_number: issue.number,
176
+ body: `🏷️ Priority updated → \`${appliedLabel}\``
177
+ });
178
+ }
179
+ }
180
+
181
+ core.info(`Label enforcement complete for ${appliedLabel}`);
@@ -1,55 +1,55 @@
1
- name: Squad Preview Validation
2
-
3
- on:
4
- push:
5
- branches: [preview]
6
-
7
- permissions:
8
- contents: read
9
-
10
- jobs:
11
- validate:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v4
15
-
16
- - uses: actions/setup-node@v4
17
- with:
18
- node-version: 22
19
-
20
- - name: Validate version consistency
21
- run: |
22
- VERSION=$(node -e "console.log(require('./package.json').version)")
23
- if ! grep -q "## \[$VERSION\]" CHANGELOG.md 2>/dev/null; then
24
- echo "::error::Version $VERSION not found in CHANGELOG.md — update CHANGELOG.md before release"
25
- exit 1
26
- fi
27
- echo "✅ Version $VERSION validated in CHANGELOG.md"
28
-
29
- - name: Run tests
30
- run: node --test test/*.test.js
31
-
32
- - name: Check no .ai-team/ or .squad/ files are tracked
33
- run: |
34
- FOUND_FORBIDDEN=0
35
- if git ls-files --error-unmatch .ai-team/ 2>/dev/null; then
36
- echo "::error::❌ .ai-team/ files are tracked on preview — this must not ship."
37
- FOUND_FORBIDDEN=1
38
- fi
39
- if git ls-files --error-unmatch .squad/ 2>/dev/null; then
40
- echo "::error::❌ .squad/ files are tracked on preview — this must not ship."
41
- FOUND_FORBIDDEN=1
42
- fi
43
- if [ $FOUND_FORBIDDEN -eq 1 ]; then
44
- exit 1
45
- fi
46
- echo "✅ No .ai-team/ or .squad/ files tracked — clean for release."
47
-
48
- - name: Validate package.json version
49
- run: |
50
- VERSION=$(node -e "console.log(require('./package.json').version)")
51
- if [ -z "$VERSION" ]; then
52
- echo "::error::❌ No version field found in package.json."
53
- exit 1
54
- fi
55
- echo "✅ package.json version: $VERSION"
1
+ name: Squad Preview Validation
2
+
3
+ on:
4
+ push:
5
+ branches: [preview]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ validate:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: 22
19
+
20
+ - name: Validate version consistency
21
+ run: |
22
+ VERSION=$(node -e "console.log(require('./package.json').version)")
23
+ if ! grep -q "## \[$VERSION\]" CHANGELOG.md 2>/dev/null; then
24
+ echo "::error::Version $VERSION not found in CHANGELOG.md — update CHANGELOG.md before release"
25
+ exit 1
26
+ fi
27
+ echo "✅ Version $VERSION validated in CHANGELOG.md"
28
+
29
+ - name: Run tests
30
+ run: node --test test/*.test.cjs
31
+
32
+ - name: Check no .ai-team/ or .squad/ files are tracked
33
+ run: |
34
+ FOUND_FORBIDDEN=0
35
+ if git ls-files --error-unmatch .ai-team/ 2>/dev/null; then
36
+ echo "::error::❌ .ai-team/ files are tracked on preview — this must not ship."
37
+ FOUND_FORBIDDEN=1
38
+ fi
39
+ if git ls-files --error-unmatch .squad/ 2>/dev/null; then
40
+ echo "::error::❌ .squad/ files are tracked on preview — this must not ship."
41
+ FOUND_FORBIDDEN=1
42
+ fi
43
+ if [ $FOUND_FORBIDDEN -eq 1 ]; then
44
+ exit 1
45
+ fi
46
+ echo "✅ No .ai-team/ or .squad/ files tracked — clean for release."
47
+
48
+ - name: Validate package.json version
49
+ run: |
50
+ VERSION=$(node -e "console.log(require('./package.json').version)")
51
+ if [ -z "$VERSION" ]; then
52
+ echo "::error::❌ No version field found in package.json."
53
+ exit 1
54
+ fi
55
+ echo "✅ package.json version: $VERSION"