agy-squad 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/full-review/SKILL.md +89 -0
- package/.agents/skills/full-review/references/evidence-intake.md +146 -0
- package/.agents/skills/full-review/references/report-template.md +216 -0
- package/.agents/skills/full-review/references/review-roles.md +91 -0
- package/.agents/skills/pr-review/SKILL.md +60 -0
- package/.agents/skills/pr-review/references/pr-review-standard.md +163 -0
- package/.agents/skills/self-diagnosis/SKILL.md +63 -0
- package/.agents/skills/self-diagnosis/references/execution-and-teardown.md +71 -0
- package/.agents/skills/self-diagnosis/references/optimization-and-review-rubric.md +61 -0
- package/.agents/skills/self-diagnosis/resources/comparative-research-manifest.json +42 -0
- package/.agents/skills/self-diagnosis/resources/self-diagnosis-manifest.json +144 -0
- package/.agents/skills/self-diagnosis/scripts/diagnose.mjs +1971 -0
- package/.agents/skills/swarm-governance/SKILL.md +59 -0
- package/.agents/skills/swarm-governance/references/bundling-and-wire-format.md +88 -0
- package/.agents/skills/swarm-governance/references/intake-and-planning.md +120 -0
- package/.agents/skills/swarm-governance/references/large-swarms.md +39 -0
- package/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +156 -2
- package/bin/agy-squad.mjs +293 -0
- package/docs/assets/architecture-overview.svg +39 -0
- package/docs/assets/manifest-and-modes.svg +39 -0
- package/docs/assets/role-and-verdict-gate.svg +39 -0
- package/docs/assets/skill-role-workflows.svg +39 -0
- package/docs/assets/swarm-lifecycle.svg +39 -0
- package/docs/benchmarks.md +102 -0
- package/docs/concepts.md +81 -0
- package/docs/core-workflows.md +128 -0
- package/docs/getting-started.md +116 -0
- package/docs/index.md +47 -0
- package/docs/plans/LEDGER.md +24 -0
- package/docs/plans/comparative-harness-architecture-retest.md +1174 -0
- package/docs/plans/comparative-harness-architecture-teamwork.md +1170 -0
- package/docs/plans/comparative-harness-architecture.md +256 -0
- package/docs/plans/native-enforcement-ledger.md +126 -0
- package/docs/plans/pr3-option-b-fixes.md +803 -0
- package/docs/plans/wsl-cli-verification.md +55 -0
- package/docs/reviews/post-pr5-governance-review.md +221 -0
- package/docs/reviews/pr1-code-review-ledger.md +581 -0
- package/docs/reviews/pr1-production-readiness-review.md +764 -0
- package/docs/reviews/pr2-documentation-review-ledger.md +380 -0
- package/docs/reviews/pr3-squad-alignment-full-review.md +1021 -0
- package/docs/reviews/pr4-swarm-governance-pivot-review.md +593 -0
- package/docs/reviews/pr5-full-review-direction.md +330 -0
- package/docs/reviews/pr5-independent-review.md +266 -0
- package/docs/reviews/pr5-layered-swarm-review.md +513 -0
- package/docs/reviews/pr5-phase2-swarm-planner-review.md +470 -0
- package/docs/reviews/pr5-reconciled-review.md +573 -0
- package/docs/reviews/rebuild-wsl-dispatch-review-r2.md +427 -0
- package/docs/reviews/rebuild-wsl-dispatch-review.md +552 -0
- package/docs/roles-and-workflows.md +115 -0
- package/docs/stopping-agents.md +39 -0
- package/docs/tools.md +122 -0
- package/install.ps1 +5 -0
- package/install.sh +4 -0
- package/mcp/briefs.mjs +202 -0
- package/mcp/dispatch.mjs +280 -0
- package/mcp/handoffs.mjs +814 -0
- package/mcp/index.js +322 -0
- package/mcp/planner.mjs +755 -0
- package/mcp/verdicts.mjs +224 -0
- package/package.json +57 -4
- package/plugin.json +20 -0
- package/scripts/install-register.mjs +510 -0
- package/scripts/release-preflight.mjs +142 -0
package/mcp/verdicts.mjs
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
const CONTENT_VERDICTS = new Set(["PASS", "FAIL", "BLOCKED"]);
|
|
2
|
+
const INTEGRITY_VERDICTS = new Set(["CLEAN", "INTEGRITY VIOLATION"]);
|
|
3
|
+
const SQUAD_ID_RE = /^[A-Za-z0-9_.-]+$/;
|
|
4
|
+
const RESERVED_OBJECT_KEYS = new Set(["__proto__", "constructor", "prototype"]);
|
|
5
|
+
|
|
6
|
+
function validateSquadId(squadId) {
|
|
7
|
+
if (typeof squadId !== "string" || !squadId) {
|
|
8
|
+
throw new Error("Squad ID must be a nonempty string.");
|
|
9
|
+
}
|
|
10
|
+
if (RESERVED_OBJECT_KEYS.has(squadId) || squadId === "." || squadId === "..") {
|
|
11
|
+
throw new Error(`Invalid reserved squad ID '${squadId}'.`);
|
|
12
|
+
}
|
|
13
|
+
if (!SQUAD_ID_RE.test(squadId)) {
|
|
14
|
+
throw new Error(`Invalid squad ID '${squadId}': use only [A-Za-z0-9_.-]+.`);
|
|
15
|
+
}
|
|
16
|
+
return squadId;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Strip fenced code blocks line-by-line (tracking matching opening/closing
|
|
21
|
+
* fence tokens) before stripping inline code spans so an inline `` ` ``` ` ``
|
|
22
|
+
* cannot swallow subsequent lines.
|
|
23
|
+
* @param {string} markdown
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
26
|
+
function stripCode(markdown) {
|
|
27
|
+
const normalized = markdown.startsWith("\uFEFF") ? markdown.slice(1) : markdown;
|
|
28
|
+
const lines = normalized.split(/\r?\n/);
|
|
29
|
+
const kept = [];
|
|
30
|
+
let fenceChar = "";
|
|
31
|
+
let fenceLen = 0;
|
|
32
|
+
|
|
33
|
+
for (const line of lines) {
|
|
34
|
+
if (!fenceChar) {
|
|
35
|
+
const open = line.match(/^\s{0,3}(`{3,}|~{3,})/);
|
|
36
|
+
if (open && !(open[1][0] === "`" && line.slice(open[0].length).includes("`"))) {
|
|
37
|
+
fenceChar = open[1][0];
|
|
38
|
+
fenceLen = open[1].length;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
kept.push(line);
|
|
42
|
+
} else {
|
|
43
|
+
const closeRe = new RegExp(`^\\s{0,3}${fenceChar}{${fenceLen},}\\s*$`);
|
|
44
|
+
if (closeRe.test(line)) {
|
|
45
|
+
fenceChar = "";
|
|
46
|
+
fenceLen = 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return kept
|
|
52
|
+
.join("\n")
|
|
53
|
+
.replace(/(`+)([^\r\n]*?)\1/g, " ");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Parse strict single-line verdict declarations of the form
|
|
58
|
+
* `<Label>: <ALLOWED_TOKEN>` (with optional list/heading prefix, Markdown
|
|
59
|
+
* emphasis, and trailing period). Rejects hedged or compound values.
|
|
60
|
+
* @param {string} markdown
|
|
61
|
+
* @param {string[]} labels
|
|
62
|
+
* @param {Set<string>} allowed
|
|
63
|
+
* @returns {Set<string>}
|
|
64
|
+
*/
|
|
65
|
+
function parseStrictLines(markdown, labels, allowed) {
|
|
66
|
+
const clean = stripCode(markdown);
|
|
67
|
+
const labelPattern = labels.join("|");
|
|
68
|
+
const prefix = "(?:(?:\\d+[.)]|[-*+])\\s+|#+\\s+)?(?:[*_]{1,3})?";
|
|
69
|
+
const labelRe = new RegExp(`^\\s*${prefix}\\s*(?:${labelPattern})\\s*(?:[*_]{1,3})?\\s*:`, "i");
|
|
70
|
+
const exactRe = new RegExp(
|
|
71
|
+
`^\\s*${prefix}\\s*(?:${labelPattern})\\s*(?:[*_]{1,3})?\\s*:\\s*(?:[*_]{1,3})?\\s*(?:[*_]{1,3})?\\s*([A-Z][A-Z ]*?)\\s*\\.?\\s*(?:[*_]{1,3})?\\s*$`,
|
|
72
|
+
"i"
|
|
73
|
+
);
|
|
74
|
+
const found = new Set();
|
|
75
|
+
|
|
76
|
+
for (const line of clean.split(/\r?\n/)) {
|
|
77
|
+
if (!labelRe.test(line)) continue;
|
|
78
|
+
const match = line.match(exactRe);
|
|
79
|
+
if (!match) {
|
|
80
|
+
throw new Error(`Malformed or hedged verdict line: "${line.trim()}"`);
|
|
81
|
+
}
|
|
82
|
+
const normalized = match[1].replace(/\s+/g, " ").trim().toUpperCase();
|
|
83
|
+
if (!allowed.has(normalized)) {
|
|
84
|
+
throw new Error(`Unsupported verdict "${normalized}" on line: "${line.trim()}"`);
|
|
85
|
+
}
|
|
86
|
+
found.add(normalized);
|
|
87
|
+
}
|
|
88
|
+
return found;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Parse a strict content verdict (`PASS`, `FAIL`, or `BLOCKED`) from a
|
|
93
|
+
* synthesis or lead report. Rejects missing, hedged, or contradicted verdicts.
|
|
94
|
+
* @param {string} markdown
|
|
95
|
+
* @returns {"PASS"|"FAIL"|"BLOCKED"}
|
|
96
|
+
*/
|
|
97
|
+
function parseContentVerdict(markdown) {
|
|
98
|
+
const found = parseStrictLines(markdown, ["Content Verdict", "Verdict"], CONTENT_VERDICTS);
|
|
99
|
+
if (found.size === 0) {
|
|
100
|
+
throw new Error("Report must record an unambiguous single-line 'Content Verdict: PASS|FAIL|BLOCKED' (or 'Verdict: ...').");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const clean = stripCode(markdown);
|
|
104
|
+
for (const line of clean.split(/\r?\n/)) {
|
|
105
|
+
// Reject explicit negations targeting PASS (uppercase PASS, or lowercase "pass" at clause end)
|
|
106
|
+
const negMatch = line.match(
|
|
107
|
+
/\b(not|no|never|isn't|wasn't|didn't|doesn't|cannot|can't|did\s+not|does\s+not)\s+(pass)\b(?:\s*([.,;:!?]|$))?/i
|
|
108
|
+
);
|
|
109
|
+
if (negMatch && (negMatch[2] === "PASS" || negMatch[3] !== undefined)) {
|
|
110
|
+
found.add("FAIL");
|
|
111
|
+
}
|
|
112
|
+
// Reject secondary labeled verdict/status/check lines or table cells asserting FAIL/BLOCKED
|
|
113
|
+
const labeled = line.match(
|
|
114
|
+
/(?:^|\b)(?:verdict|status|result|check|disposition|outcome)\s*(?:[*_]{1,3})?\s*(?:[:—–-]|\bis\b)\s*(?:[*_]{1,3})?\s*(PASS|FAIL|BLOCKED)(?![-\w])/i
|
|
115
|
+
);
|
|
116
|
+
if (labeled) {
|
|
117
|
+
const token = labeled[1].toUpperCase();
|
|
118
|
+
if (token !== "PASS") found.add(token);
|
|
119
|
+
}
|
|
120
|
+
const leading = line.match(/^\s*(?:\d+[.)]\s*|[-*+]\s*|#+\s*)?(?:[*_]{1,3})?(FAIL|BLOCKED)(?:[*_]{1,3})?\s*[:—–-]/);
|
|
121
|
+
if (leading) {
|
|
122
|
+
found.add(leading[1]);
|
|
123
|
+
}
|
|
124
|
+
const tableCell = line.match(/\|\s*(?:[*_]{1,3})?(FAIL|BLOCKED)(?:[*_]{1,3})?\s*\|/);
|
|
125
|
+
if (tableCell) {
|
|
126
|
+
found.add(tableCell[1]);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (found.size > 1) {
|
|
131
|
+
throw new Error(`Report contains conflicting content verdicts: ${[...found].join(", ")}.`);
|
|
132
|
+
}
|
|
133
|
+
return [...found][0];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Parse a strict integrity audit verdict (`CLEAN` or `INTEGRITY VIOLATION`)
|
|
138
|
+
* from an independent integrity auditor report.
|
|
139
|
+
* @param {string} markdown
|
|
140
|
+
* @returns {"CLEAN"|"INTEGRITY VIOLATION"}
|
|
141
|
+
*/
|
|
142
|
+
function parseIntegrityVerdict(markdown) {
|
|
143
|
+
const found = parseStrictLines(markdown, ["Integrity Verdict"], INTEGRITY_VERDICTS);
|
|
144
|
+
if (found.size === 0) {
|
|
145
|
+
throw new Error("Integrity audit report must record an unambiguous single-line 'Integrity Verdict: CLEAN' or 'Integrity Verdict: INTEGRITY VIOLATION'.");
|
|
146
|
+
}
|
|
147
|
+
if (found.size > 1) {
|
|
148
|
+
throw new Error(`Integrity audit report contains conflicting verdicts: ${[...found].join(", ")}.`);
|
|
149
|
+
}
|
|
150
|
+
return [...found][0];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Parse a `Target Squad: <id>` declaration from an integrity report.
|
|
155
|
+
* Supports optional unordered/ordered list, heading, and Markdown emphasis;
|
|
156
|
+
* throws on malformed, reserved, or conflicting Target Squad declarations.
|
|
157
|
+
* @param {string} markdown
|
|
158
|
+
* @returns {string|undefined}
|
|
159
|
+
*/
|
|
160
|
+
function parseTargetSquad(markdown) {
|
|
161
|
+
const clean = stripCode(markdown);
|
|
162
|
+
const prefix = "(?:(?:\\d+[.)]|[-*+])\\s+|#+\\s+)?(?:[*_]{1,3})?";
|
|
163
|
+
const labelRe = new RegExp(`^\\s*${prefix}\\s*Target Squad\\s*(?:[*_]{1,3})?\\s*:`, "i");
|
|
164
|
+
const exactRe = new RegExp(
|
|
165
|
+
`^\\s*${prefix}\\s*Target Squad\\s*(?:[*_]{1,3})?\\s*:\\s*(?:[*_]{1,3})?\\s*(?:[*_]{1,3})?\\s*([A-Za-z0-9_.-]+)\\s*\\.?\\s*(?:[*_]{1,3})?\\s*$`,
|
|
166
|
+
"i"
|
|
167
|
+
);
|
|
168
|
+
const found = new Set();
|
|
169
|
+
|
|
170
|
+
for (const line of clean.split(/\r?\n/)) {
|
|
171
|
+
if (!labelRe.test(line)) continue;
|
|
172
|
+
const match = line.match(exactRe);
|
|
173
|
+
if (!match) {
|
|
174
|
+
throw new Error(`Malformed Target Squad line: "${line.trim()}"`);
|
|
175
|
+
}
|
|
176
|
+
found.add(validateSquadId(match[1]));
|
|
177
|
+
}
|
|
178
|
+
if (found.size > 1) {
|
|
179
|
+
throw new Error(`Integrity report contains conflicting Target Squad declarations: ${[...found].join(", ")}.`);
|
|
180
|
+
}
|
|
181
|
+
return found.size === 1 ? [...found][0] : undefined;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Parse a strict `Evidence Digest: <64-hex>` declaration from an integrity report.
|
|
186
|
+
* @param {string} markdown
|
|
187
|
+
* @returns {string|undefined}
|
|
188
|
+
*/
|
|
189
|
+
function parseEvidenceDigest(markdown) {
|
|
190
|
+
const clean = stripCode(markdown);
|
|
191
|
+
const prefix = "(?:(?:\\d+[.)]|[-*+])\\s+|#+\\s+)?(?:[*_]{1,3})?";
|
|
192
|
+
const labelRe = new RegExp(`^\\s*${prefix}\\s*Evidence Digest\\s*(?:[*_]{1,3})?\\s*:`, "i");
|
|
193
|
+
const exactRe = new RegExp(
|
|
194
|
+
`^\\s*${prefix}\\s*Evidence Digest\\s*(?:[*_]{1,3})?\\s*:\\s*(?:[*_]{1,3})?\\s*(?:[*_]{1,3})?\\s*([0-9a-f]{64})\\s*\\.?\\s*(?:[*_]{1,3})?\\s*$`,
|
|
195
|
+
"i"
|
|
196
|
+
);
|
|
197
|
+
const found = new Set();
|
|
198
|
+
|
|
199
|
+
for (const line of clean.split(/\r?\n/)) {
|
|
200
|
+
if (!labelRe.test(line)) continue;
|
|
201
|
+
const match = line.match(exactRe);
|
|
202
|
+
if (!match) {
|
|
203
|
+
throw new Error(`Malformed Evidence Digest line: "${line.trim()}"`);
|
|
204
|
+
}
|
|
205
|
+
found.add(match[1].toLowerCase());
|
|
206
|
+
}
|
|
207
|
+
if (found.size > 1) {
|
|
208
|
+
throw new Error(`Integrity report contains conflicting Evidence Digest declarations: ${[...found].join(", ")}.`);
|
|
209
|
+
}
|
|
210
|
+
return found.size === 1 ? [...found][0] : undefined;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export {
|
|
214
|
+
CONTENT_VERDICTS,
|
|
215
|
+
INTEGRITY_VERDICTS,
|
|
216
|
+
RESERVED_OBJECT_KEYS,
|
|
217
|
+
SQUAD_ID_RE,
|
|
218
|
+
parseContentVerdict,
|
|
219
|
+
parseEvidenceDigest,
|
|
220
|
+
parseIntegrityVerdict,
|
|
221
|
+
parseTargetSquad,
|
|
222
|
+
stripCode,
|
|
223
|
+
validateSquadId
|
|
224
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agy-squad",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Swarm planning, Pointer-Over-Wire governance, integrity auditing, and SHA-256 verification for Google Antigravity.",
|
|
5
|
+
"main": "mcp/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"agy-squad": "bin/agy-squad.mjs",
|
|
8
|
+
"agy-squad-mcp": "mcp/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin",
|
|
12
|
+
"mcp",
|
|
13
|
+
"scripts",
|
|
14
|
+
".agents/skills",
|
|
15
|
+
"docs",
|
|
16
|
+
"plugin.json",
|
|
17
|
+
"install.sh",
|
|
18
|
+
"install.ps1",
|
|
19
|
+
"README.md",
|
|
20
|
+
"CHANGELOG.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"start": "node mcp/index.js",
|
|
26
|
+
"setup": "node scripts/install-register.mjs",
|
|
27
|
+
"uninstall": "node scripts/install-register.mjs --uninstall",
|
|
28
|
+
"status": "node scripts/install-register.mjs --status",
|
|
29
|
+
"preflight": "node scripts/release-preflight.mjs",
|
|
30
|
+
"test": "node tests/test-verdicts-and-pivot.mjs && node tests/test-dispatch.mjs && node tests/test-planner.mjs && node tests/test-handoffs.mjs && node tests/test-run.mjs && node tests/test-server.mjs && node tests/test-comparative-dossier.mjs && node tests/test-lifecycle-installer.mjs && node benchmarks/teamwork-vs-squad/verify-benchmark.mjs && node tests/verify-package.mjs --self-test",
|
|
31
|
+
"verify:package": "node tests/verify-package.mjs --self-test && npm pack --dry-run --json | node tests/verify-package.mjs",
|
|
32
|
+
"docs": "zensical serve"
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/paragon-ux/Agy-Squad.git"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://paragon-ux.github.io/agy-squad/",
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/paragon-ux/Agy-Squad/issues"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=22"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"antigravity",
|
|
50
|
+
"mcp",
|
|
51
|
+
"subagents",
|
|
52
|
+
"swarm",
|
|
53
|
+
"governance",
|
|
54
|
+
"pr-review",
|
|
55
|
+
"cli"
|
|
56
|
+
],
|
|
57
|
+
"author": "paragon-ux",
|
|
58
|
+
"license": "MIT"
|
|
59
|
+
}
|
package/plugin.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agy-squad",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Swarm planning, Pointer-Over-Wire governance, integrity auditing, and SHA-256 verification for Google Antigravity.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "paragon-ux"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://github.com/paragon-ux/Agy-Squad",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"antigravity",
|
|
12
|
+
"swarm",
|
|
13
|
+
"subagents",
|
|
14
|
+
"governance",
|
|
15
|
+
"pr-review",
|
|
16
|
+
"mcp"
|
|
17
|
+
],
|
|
18
|
+
"skills": "./skills",
|
|
19
|
+
"mcpServers": "./mcp_config.json"
|
|
20
|
+
}
|