@mmerterden/multi-agent-pipeline 15.5.0 → 15.6.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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/pipeline/multi-agent-refs/component-dispatch.md +1 -1
- package/pipeline/multi-agent-refs/phases/phase-3-dev.md +24 -50
- package/pipeline/multi-agent-refs/phases/phase-4-review.md +2 -2
- package/pipeline/multi-agent-refs/phases/phase-5-test.md +6 -6
- package/pipeline/multi-agent-refs/phases/phase-6-commit.md +2 -2
- package/pipeline/multi-agent-refs/rules.md +1 -1
- package/pipeline/schemas/figma-project-config.schema.json +1 -1
- package/pipeline/scripts/_stack-routing.mjs +40 -2
- package/pipeline/scripts/build-stack-plugins.mjs +15 -5
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,14 @@ Internal file-layout changes that don't affect the slash-command surface are sti
|
|
|
16
16
|
|
|
17
17
|
## [Unreleased]
|
|
18
18
|
|
|
19
|
+
## [15.6.0] - 2026-08-18
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- **The heart goes platform-blind** (platform-dynamic audit, 15 findings): Phase 3's RED run, target resolution and build verification become `case "$STACK"` arms (gradle/pytest/npm beside xcodebuild, with the Gradle build-lock decision stated); Phase 4 Gate 1 matches its own stack-generic Gates 2-3; Phase 2 dispatches the platform's architect agent; Phase 5's device-check table gains the Android MCP tools; the figma-config schema stops claiming SwiftUI as universal; wiki scope gains a `platform` value.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **Per-stack routing hatches**: `STACK_ONLY` lists in `_stack-routing.mjs` so a stack-only skill (ktlint, hilt-di, ...) routes with one list entry instead of a regex widening - and `--check-routing` now FAILS on unrouted skills. `lint-skills` accepts `platform: backend|frontend`.
|
|
26
|
+
|
|
19
27
|
## [15.5.0] - 2026-08-18
|
|
20
28
|
|
|
21
29
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mmerterden/multi-agent-pipeline",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.6.0",
|
|
4
4
|
"description": "8-phase AI development pipeline with full orchestration on Claude Code, Copilot CLI and Codex CLI. Analysis, planning, TDD, CLI-aware parallel review with consensus surfacing + Fable triage, default-FAIL evidence gates, secret + intent guards, per-phase cost ledger, persistent learnings memory, wiki generation, commit automation. Token-preserving uninstall.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -52,7 +52,7 @@ a single atom is `component`. When it cannot be decided, ask - do not default
|
|
|
52
52
|
omits the wiring.
|
|
53
53
|
|
|
54
54
|
**Pre-implementation validation is not optional on iOS.** Before the create skill
|
|
55
|
-
runs, dispatch
|
|
55
|
+
runs, dispatch `<toolkit>:figma-validate` (probed like every dual-name skill; a toolkit that ships none records the skip) for the frame. It checks
|
|
56
56
|
registry presence, Code Connect strategy, **design token compliance**, dependency
|
|
57
57
|
readiness, atomic scope and already-implemented status in about ten seconds. Those
|
|
58
58
|
are precisely the checks whose absence produced guessed spacing and an unpublished
|
|
@@ -122,16 +122,17 @@ For each task (respecting dependency order):
|
|
|
122
122
|
- `describe` / `it` → Quick/Nimble
|
|
123
123
|
- Test naming: `test{Scenario}_{Expected}` (e.g. `testKeychainReturnsNil_doesNotCrash`)
|
|
124
124
|
- One test per behavior change - not one test per file
|
|
125
|
-
- Run test to confirm RED:
|
|
125
|
+
- Run test to confirm RED - the command is the platform's, one arm per stack:
|
|
126
126
|
```bash
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
2>&1 | tail -5
|
|
134
|
-
|
|
127
|
+
case "$STACK" in
|
|
128
|
+
ios) acquire_build_lock "$TASK_ID"
|
|
129
|
+
xcodebuild test -scheme "{scheme}" -destination "platform=iOS Simulator,name={simulator}" \
|
|
130
|
+
-derivedDataPath "{worktreePath}/.DerivedData" -only-testing:"{testTarget}/{testClass}/{testMethod}" 2>&1 | tail -5
|
|
131
|
+
release_build_lock ;;
|
|
132
|
+
android) ./gradlew test --tests "{testClass}.{testMethod}" 2>&1 | tail -5 ;;
|
|
133
|
+
backend) pytest "{test_file}::{test_name}" 2>&1 | tail -5 ;;
|
|
134
|
+
frontend) npm test -- --testPathPattern="{file}" 2>&1 | tail -5 ;;
|
|
135
|
+
esac
|
|
135
136
|
```
|
|
136
137
|
- Must fail for the RIGHT reason (expected assertion, not compilation error)
|
|
137
138
|
|
|
@@ -154,49 +155,22 @@ For each task (respecting dependency order):
|
|
|
154
155
|
- Only if duplication or naming is poor
|
|
155
156
|
- Re-run tests after refactor → still GREEN
|
|
156
157
|
|
|
157
|
-
**
|
|
158
|
+
**Target resolution** (auto-detect once per project, cache in `agent-state.json`; ios resolves scheme + simulator, android resolves module + variant, backend/frontend need none):
|
|
158
159
|
```bash
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
xcrun simctl list devices available -j | jq '.devices | to_entries[] | select(.key | contains("iOS")) | .value[0].name'
|
|
160
|
+
case "$STACK" in
|
|
161
|
+
ios) xcodebuild -list -json -project "{projectPath}" 2>/dev/null || xcodebuild -list -json -workspace "{workspacePath}" 2>/dev/null
|
|
162
|
+
# prefer the scheme matching the project name, then the first non-test scheme
|
|
163
|
+
xcrun simctl list devices available -j | jq '.devices | to_entries[] | select(.key | contains("iOS")) | .value[0].name' ;;
|
|
164
|
+
android) ./gradlew projects 2>/dev/null | grep -E "^\+--- Project" ; ./gradlew tasks --all 2>/dev/null | grep -m5 "assemble.*Debug" ;;
|
|
165
|
+
esac
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
**Preferred - MCP tool (token-efficient, dev-toolkit-mcp ≥ 2.3.0):**
|
|
176
|
-
```
|
|
177
|
-
acquire_build_lock "$TASK_ID"
|
|
178
|
-
mcp__dev-toolkit__ios_xcodebuild({
|
|
179
|
-
project: "{projectPath}", // or workspace
|
|
180
|
-
scheme: "{scheme}",
|
|
181
|
-
configuration: "Release",
|
|
182
|
-
destination: "generic/platform=iOS",
|
|
183
|
-
derived_data_path: "{worktreePath}/.DerivedData"
|
|
184
|
-
})
|
|
185
|
-
release_build_lock
|
|
186
|
-
```
|
|
187
|
-
Returns one line: `Build: SUCCESS|FAILURE (E errors, W warnings) [xcresult-<id>]`. On failure, drill in only when needed via `mcp__dev-toolkit__ios_xcresult({id, mode: "errors"})`. Saves thousands of tokens per build cycle vs. raw xcodebuild output.
|
|
188
|
-
|
|
189
|
-
**Fallback - raw xcodebuild** (when MCP server is unavailable):
|
|
190
|
-
```bash
|
|
191
|
-
acquire_build_lock "$TASK_ID"
|
|
192
|
-
xcodebuild build \
|
|
193
|
-
-scheme "{scheme}" \
|
|
194
|
-
-destination "generic/platform=iOS" \
|
|
195
|
-
-derivedDataPath "{worktreePath}/.DerivedData" \
|
|
196
|
-
2>&1 | tail -5
|
|
197
|
-
release_build_lock
|
|
198
|
-
```
|
|
199
|
-
5. If build fails → fix → rebuild (max 3 attempts, track `retryCount` in state). With MCP path: pass the captured xcresult ID to `ios_xcresult` mode `errors` first, then `warnings` only if needed - never dump full log into context.
|
|
168
|
+
4. **Build verification** (per stack; ios/android under the build queue lock, see below):
|
|
169
|
+
- **ios, preferred (MCP, dev-toolkit ≥ 2.3.0)**: `acquire_build_lock` → `mcp__dev-toolkit__ios_xcodebuild({project|workspace, scheme, configuration: "Release", destination: "generic/platform=iOS", derived_data_path: "{worktreePath}/.DerivedData"})` → `release_build_lock`. Returns one line `Build: SUCCESS|FAILURE (E errors, W warnings) [xcresult-<id>]`; on failure drill in via `mcp__dev-toolkit__ios_xcresult({id, mode: "errors"})`, never dump the full log.
|
|
170
|
+
- **ios, fallback (raw)**: same lock pair around `xcodebuild build -scheme "{scheme}" -destination "generic/platform=iOS" -derivedDataPath "{worktreePath}/.DerivedData" 2>&1 | tail -5`.
|
|
171
|
+
- **android**: lock pair around `./gradlew assembleDebug 2>&1 | tail -5` (the Gradle daemon and `build/` outputs contend across parallel worktrees exactly as DerivedData does - the lock applies).
|
|
172
|
+
- **backend / frontend**: `python -m compileall .` / `npm run build --if-present 2>&1 | tail -5`; no lock.
|
|
173
|
+
5. If build fails → fix → rebuild (max 3 attempts, track `retryCount` in state).
|
|
200
174
|
6. **Intermediate commit** (after each completed task in the plan):
|
|
201
175
|
```bash
|
|
202
176
|
git -C "{worktreePath}" add -A
|
|
@@ -247,7 +221,7 @@ release_build_lock() { rm -rf "$BUILD_LOCK"; }
|
|
|
247
221
|
- Phase 4 Step 1 Gate 1 (build gate before review)
|
|
248
222
|
- Phase 4 Step 1 Gate 3 (test gate before review)
|
|
249
223
|
|
|
250
|
-
**
|
|
224
|
+
**Android**: same lock discipline - the Gradle daemon and `build/` outputs contend across parallel worktrees. **Backend/frontend** (Python, Node.js): no lock needed - these build/test in parallel without conflicts.
|
|
251
225
|
|
|
252
226
|
---
|
|
253
227
|
|
|
@@ -10,8 +10,8 @@ Progress emission per `$HOME/.claude/multi-agent-refs/progress-contract.md` -
|
|
|
10
10
|
If any gate fails → fix first, don't waste AI tokens reviewing broken code.
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
# Gate 1: Build (Xcode uses build queue lock
|
|
14
|
-
|
|
13
|
+
# Gate 1: Build (xcodebuild/gradle assemble/tsc/py compile - stack-dependent; Xcode uses the build queue lock, see Phase 3) - tee output to a log
|
|
14
|
+
<build-command> 2>&1 | tee "$WORKTREE/.build.log"
|
|
15
15
|
# Gate 2: Lint (swiftlint/ktlint/ruff/eslint - stack-dependent)
|
|
16
16
|
# Gate 3: Tests pass (xcodebuild test/gradle test/pytest/npm test) - tee output to a log
|
|
17
17
|
<test-command> 2>&1 | tee "$WORKTREE/.test.log"
|
|
@@ -126,12 +126,12 @@ Before or during user testing, run device-level audits via Bash if user requests
|
|
|
126
126
|
|
|
127
127
|
| Check | When | Command |
|
|
128
128
|
| ------------------- | ----------------- | ----------------------------------------- |
|
|
129
|
-
| Accessibility audit | UI changes | `mcp__dev-
|
|
130
|
-
| Biometric test | Auth flow changes | `mcp__dev-toolkit__ios_biometric` (
|
|
131
|
-
| Launch time |
|
|
132
|
-
| Visual test | Any UI changes | `/multi-agent test` (sim-test)
|
|
133
|
-
| Snapshot regression | Component / pixel-stable UI changes | `mcp__dev-toolkit__ios_visual_diff`
|
|
134
|
-
|
|
|
129
|
+
| Accessibility audit | UI changes | `mcp__dev-toolkit__{ios,android}_accessibility_audit` |
|
|
130
|
+
| Biometric test | Auth flow changes | ios: `mcp__dev-toolkit__ios_biometric` (android: manual) |
|
|
131
|
+
| Launch time | Perf-sensitive changes | ios: app-launch instrument · android: `mcp__dev-toolkit__android_launch_time` |
|
|
132
|
+
| Visual test | Any UI changes | `/multi-agent test` (sim-test, both platforms) |
|
|
133
|
+
| Snapshot regression | Component / pixel-stable UI changes | ios: `mcp__dev-toolkit__ios_visual_diff` · android: `mcp__dev-toolkit__android_screenshot` + compare |
|
|
134
|
+
| Store screenshots | `taskType === screenshot` | ios: `ios_status_bar({preset: "clean"})` · android: `android_screenshot` |
|
|
135
135
|
|
|
136
136
|
Results included in Phase 7 report. MCP tools preferred when available - concise structured output, lower token cost.
|
|
137
137
|
|
|
@@ -129,13 +129,13 @@ gh pr create --base {baseBranch} --head {branch} $REVIEWERS \
|
|
|
129
129
|
--body-file /tmp/pr-body-$TASK_ID.md
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
**UI Component PR (when
|
|
132
|
+
**UI Component PR (when a UI component is detected (SwiftUI/Compose)):**
|
|
133
133
|
|
|
134
134
|
Same `gh pr create` pattern with component-specific body sections:
|
|
135
135
|
|
|
136
136
|
- Component Details: file table (Configuration, View, Modifiers, Tests)
|
|
137
137
|
- Variants table, Design Tokens Used, Figma URL
|
|
138
|
-
- Accessibility: labels, identifiers,
|
|
138
|
+
- Accessibility: labels, identifiers, platform-minimum tap target (44pt iOS / 48dp Android), Dynamic Type
|
|
139
139
|
- Test Coverage: structural/behavioral/snapshot counts
|
|
140
140
|
- Checklist: no magic numbers, configuration purity, modifier chain, accessibility, dark mode + RTL, build passes
|
|
141
141
|
|
|
@@ -139,7 +139,7 @@ This is the single source of truth. When a contributor or model is unsure where
|
|
|
139
139
|
|
|
140
140
|
## Build Queue
|
|
141
141
|
|
|
142
|
-
-
|
|
142
|
+
- `xcodebuild` and `./gradlew` build/test calls acquire `/tmp/claude-xcodebuild.lock` first: parallel runs corrupt DerivedData/simulators and contend on the Gradle daemon.
|
|
143
143
|
- Each worktree uses its own `-derivedDataPath "{worktreePath}/.DerivedData"` to prevent cross-contamination.
|
|
144
144
|
- Lock auto-releases; stale locks (>15min) get force-cleaned.
|
|
145
145
|
- Non-Xcode builds (Gradle, npm, Python) don't need the lock - they handle their own concurrency.
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
"ui": {
|
|
277
277
|
"type": "object",
|
|
278
278
|
"additionalProperties": false,
|
|
279
|
-
"description": "UI interaction systems. Consumed by the figma-navigation / figma-overlays / figma-bottom-sheets convention skills and by Phase 4 review. When a section is absent or its mode is 'native', the pipeline uses stock SwiftUI
|
|
279
|
+
"description": "UI interaction systems. Consumed by the figma-navigation / figma-overlays / figma-bottom-sheets convention skills and by Phase 4 review. When a section is absent or its mode is 'native', the pipeline uses the platform's stock system (SwiftUI NavigationStack/.sheet on iOS, Compose Navigation/dialogs on Android). Set mode 'custom' to route to a project-supplied system by the type names below.",
|
|
280
280
|
"properties": {
|
|
281
281
|
"navigationSystem": {
|
|
282
282
|
"type": "object",
|
|
@@ -27,7 +27,11 @@ export const COMMON_SKILLS = [
|
|
|
27
27
|
"localization-reuse-map",
|
|
28
28
|
];
|
|
29
29
|
|
|
30
|
-
//
|
|
30
|
+
// Stack-only escape hatches: skill names that match no stack pattern route to
|
|
31
|
+
// exactly one plugin. Every stack gets one - a stack whose new skill matches
|
|
32
|
+
// nothing must be addable HERE (one list entry), never by widening a regex or
|
|
33
|
+
// releasing new pipeline logic. Apple's list came first; the peers are seeded
|
|
34
|
+
// with the names that plausibly arrive next.
|
|
31
35
|
export const APPLE_ONLY = [
|
|
32
36
|
"avkit",
|
|
33
37
|
"cryptokit",
|
|
@@ -42,6 +46,38 @@ export const APPLE_ONLY = [
|
|
|
42
46
|
"xcode-project-analyzer",
|
|
43
47
|
];
|
|
44
48
|
|
|
49
|
+
export const ANDROID_ONLY = [
|
|
50
|
+
"ktlint",
|
|
51
|
+
"detekt",
|
|
52
|
+
"espresso",
|
|
53
|
+
"hilt-di",
|
|
54
|
+
"proguard-r8",
|
|
55
|
+
"workmanager",
|
|
56
|
+
"jetpack-glance",
|
|
57
|
+
"coroutines",
|
|
58
|
+
"material3-theming",
|
|
59
|
+
"baseline-profiles",
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
export const BACKEND_ONLY = [
|
|
63
|
+
"grpc-services",
|
|
64
|
+
"message-queues",
|
|
65
|
+
"sql-migrations",
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
export const FRONTEND_ONLY = [
|
|
69
|
+
"storybook",
|
|
70
|
+
"web-vitals",
|
|
71
|
+
"service-workers",
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
export const STACK_ONLY = {
|
|
75
|
+
"ai-ios-toolkit": APPLE_ONLY,
|
|
76
|
+
"ai-android-toolkit": ANDROID_ONLY,
|
|
77
|
+
"ai-backend-toolkit": BACKEND_ONLY,
|
|
78
|
+
"ai-frontend-toolkit": FRONTEND_ONLY,
|
|
79
|
+
};
|
|
80
|
+
|
|
45
81
|
// stack → matching pattern (per-stack routing patterns (formerly in stack-swap.sh))
|
|
46
82
|
//
|
|
47
83
|
// A skill lands in every plugin whose pattern it matches, so a bare substring
|
|
@@ -70,7 +106,9 @@ export const STACK_PATTERNS = {
|
|
|
70
106
|
*/
|
|
71
107
|
export function routeSkill(name) {
|
|
72
108
|
if (COMMON_SKILLS.includes(name)) return [COMMON_PLUGIN];
|
|
73
|
-
|
|
109
|
+
for (const [plugin, list] of Object.entries(STACK_ONLY)) {
|
|
110
|
+
if (list.includes(name)) return [plugin];
|
|
111
|
+
}
|
|
74
112
|
const hits = [];
|
|
75
113
|
for (const [plugin, re] of Object.entries(STACK_PATTERNS)) {
|
|
76
114
|
if (re.test(name)) hits.push(plugin);
|
|
@@ -56,6 +56,7 @@ import {
|
|
|
56
56
|
COMMON_PLUGIN,
|
|
57
57
|
COMMON_SKILLS,
|
|
58
58
|
APPLE_ONLY,
|
|
59
|
+
STACK_ONLY,
|
|
59
60
|
STACK_PATTERNS,
|
|
60
61
|
} from "./_stack-routing.mjs";
|
|
61
62
|
|
|
@@ -119,9 +120,12 @@ for (const skill of allSkills) {
|
|
|
119
120
|
desired[COMMON_PLUGIN].add(skill);
|
|
120
121
|
continue;
|
|
121
122
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
{
|
|
124
|
+
const only = Object.entries(STACK_ONLY).find(([, list]) => list.includes(skill));
|
|
125
|
+
if (only) {
|
|
126
|
+
desired[only[0]].add(skill);
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
125
129
|
}
|
|
126
130
|
let matched = false;
|
|
127
131
|
for (const [plugin, re] of Object.entries(STACK_PATTERNS)) {
|
|
@@ -144,7 +148,7 @@ for (const skill of allSkills) {
|
|
|
144
148
|
// source in this repo, so CI can gate it without a checkout of the plugins repo.
|
|
145
149
|
const multiRouted = [];
|
|
146
150
|
for (const skill of allSkills) {
|
|
147
|
-
if (COMMON_SKILLS.includes(skill) ||
|
|
151
|
+
if (COMMON_SKILLS.includes(skill) || Object.values(STACK_ONLY).some((l) => l.includes(skill))) continue;
|
|
148
152
|
const owners = Object.entries(STACK_PATTERNS)
|
|
149
153
|
.filter(([, re]) => re.test(skill))
|
|
150
154
|
.map(([p]) => p);
|
|
@@ -160,8 +164,14 @@ if (args.includes("--check-routing")) {
|
|
|
160
164
|
console.error("fix: anchor the offending STACK_PATTERNS alternative to the exact skill name");
|
|
161
165
|
process.exit(1);
|
|
162
166
|
}
|
|
167
|
+
if (unrouted.length) {
|
|
168
|
+
console.error(`check-routing: ${unrouted.length} skill(s) route to NO plugin`);
|
|
169
|
+
for (const s of unrouted) console.error(` FAIL ${s}`);
|
|
170
|
+
console.error("fix: add the name to its stack's STACK_ONLY list in _stack-routing.mjs");
|
|
171
|
+
process.exit(1);
|
|
172
|
+
}
|
|
163
173
|
console.log(
|
|
164
|
-
`check-routing: clean (${allSkills.length} skills,
|
|
174
|
+
`check-routing: clean (${allSkills.length} skills, 0 unrouted, 0 multi-routed)`,
|
|
165
175
|
);
|
|
166
176
|
process.exit(0);
|
|
167
177
|
}
|