@bradygaster/squad-sdk 0.9.0 → 0.9.1

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 (76) hide show
  1. package/README.md +296 -296
  2. package/dist/agents/history-shadow.js +30 -30
  3. package/dist/build/github-dist.js +42 -42
  4. package/dist/config/init.js +173 -173
  5. package/dist/sharing/consult.js +78 -78
  6. package/package.json +1 -1
  7. package/templates/casting/Futurama.json +9 -9
  8. package/templates/casting-history.json +4 -4
  9. package/templates/casting-policy.json +37 -37
  10. package/templates/casting-reference.md +104 -104
  11. package/templates/casting-registry.json +3 -3
  12. package/templates/ceremonies.md +41 -41
  13. package/templates/charter.md +53 -53
  14. package/templates/constraint-tracking.md +38 -38
  15. package/templates/cooperative-rate-limiting.md +229 -229
  16. package/templates/copilot-instructions.md +46 -46
  17. package/templates/history.md +10 -10
  18. package/templates/identity/now.md +9 -9
  19. package/templates/identity/wisdom.md +15 -15
  20. package/templates/issue-lifecycle.md +412 -412
  21. package/templates/keda-scaler.md +164 -164
  22. package/templates/machine-capabilities.md +74 -74
  23. package/templates/mcp-config.md +90 -90
  24. package/templates/multi-agent-format.md +28 -28
  25. package/templates/plugin-marketplace.md +49 -49
  26. package/templates/ralph-circuit-breaker.md +313 -313
  27. package/templates/raw-agent-output.md +37 -37
  28. package/templates/roster.md +60 -60
  29. package/templates/routing.md +39 -39
  30. package/templates/run-output.md +50 -50
  31. package/templates/schedule.json +19 -19
  32. package/templates/scribe-charter.md +119 -119
  33. package/templates/skill.md +24 -24
  34. package/templates/skills/agent-collaboration/SKILL.md +42 -42
  35. package/templates/skills/agent-conduct/SKILL.md +24 -24
  36. package/templates/skills/architectural-proposals/SKILL.md +151 -151
  37. package/templates/skills/ci-validation-gates/SKILL.md +84 -84
  38. package/templates/skills/cli-wiring/SKILL.md +47 -47
  39. package/templates/skills/client-compatibility/SKILL.md +89 -89
  40. package/templates/skills/cross-squad/SKILL.md +114 -114
  41. package/templates/skills/distributed-mesh/SKILL.md +287 -287
  42. package/templates/skills/distributed-mesh/mesh.json.example +30 -30
  43. package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -111
  44. package/templates/skills/distributed-mesh/sync-mesh.sh +104 -104
  45. package/templates/skills/docs-standards/SKILL.md +71 -71
  46. package/templates/skills/economy-mode/SKILL.md +114 -114
  47. package/templates/skills/external-comms/SKILL.md +329 -329
  48. package/templates/skills/gh-auth-isolation/SKILL.md +183 -183
  49. package/templates/skills/git-workflow/SKILL.md +204 -204
  50. package/templates/skills/github-multi-account/SKILL.md +95 -95
  51. package/templates/skills/history-hygiene/SKILL.md +36 -36
  52. package/templates/skills/humanizer/SKILL.md +105 -105
  53. package/templates/skills/init-mode/SKILL.md +102 -102
  54. package/templates/skills/model-selection/SKILL.md +117 -117
  55. package/templates/skills/nap/SKILL.md +24 -24
  56. package/templates/skills/personal-squad/SKILL.md +57 -57
  57. package/templates/skills/project-conventions/SKILL.md +56 -56
  58. package/templates/skills/release-process/SKILL.md +423 -423
  59. package/templates/skills/reskill/SKILL.md +92 -92
  60. package/templates/skills/reviewer-protocol/SKILL.md +79 -79
  61. package/templates/skills/secret-handling/SKILL.md +200 -200
  62. package/templates/skills/session-recovery/SKILL.md +155 -155
  63. package/templates/skills/squad-conventions/SKILL.md +69 -69
  64. package/templates/skills/test-discipline/SKILL.md +37 -37
  65. package/templates/skills/windows-compatibility/SKILL.md +74 -74
  66. package/templates/workflows/squad-ci.yml +24 -24
  67. package/templates/workflows/squad-docs.yml +54 -54
  68. package/templates/workflows/squad-heartbeat.yml +171 -171
  69. package/templates/workflows/squad-insider-release.yml +61 -61
  70. package/templates/workflows/squad-issue-assign.yml +161 -161
  71. package/templates/workflows/squad-label-enforce.yml +181 -181
  72. package/templates/workflows/squad-preview.yml +55 -55
  73. package/templates/workflows/squad-promote.yml +120 -120
  74. package/templates/workflows/squad-release.yml +77 -77
  75. package/templates/workflows/squad-triage.yml +260 -260
  76. package/templates/workflows/sync-squad-labels.yml +169 -169
@@ -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.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"