@mmerterden/multi-agent-pipeline 20.36.0 → 20.37.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.
- package/CHANGELOG.md +37 -0
- package/docs/facts.json +2 -2
- package/docs/features.md +1 -1
- package/docs/recovery-guide.md +1 -1
- package/install/catalog-history.json +1 -1
- package/manifest.json +225 -148
- package/package.json +1 -1
- package/pipeline/commands/multi-agent/SKILL.md +33 -154
- package/pipeline/commands/multi-agent/analysis/SKILL.md +14 -68
- package/pipeline/commands/multi-agent/analysis-jira/SKILL.md +5 -8
- package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +38 -109
- package/pipeline/commands/multi-agent/channels/SKILL.md +38 -167
- package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +37 -144
- package/pipeline/commands/multi-agent/design-check/SKILL.md +27 -131
- package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +22 -48
- package/pipeline/commands/multi-agent/ios-coding-standard/SKILL.md +37 -180
- package/pipeline/commands/multi-agent/jira/SKILL.md +16 -46
- package/pipeline/commands/multi-agent/manual-test/SKILL.md +12 -7
- package/pipeline/commands/multi-agent/refactor/SKILL.md +23 -184
- package/pipeline/commands/multi-agent/resume/SKILL.md +30 -136
- package/pipeline/commands/multi-agent/review/SKILL.md +24 -199
- package/pipeline/commands/multi-agent/setup/SKILL.md +25 -181
- package/pipeline/commands/multi-agent/stack/SKILL.md +9 -53
- package/pipeline/commands/multi-agent/status/SKILL.md +13 -2
- package/pipeline/commands/multi-agent/store-ready/SKILL.md +27 -226
- package/pipeline/commands/multi-agent/sync/SKILL.md +35 -164
- package/pipeline/commands/multi-agent/test-gen/SKILL.md +2 -4
- package/pipeline/commands/multi-agent/update/SKILL.md +18 -60
- package/pipeline/contract/CHANGELOG.md +9 -0
- package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
- package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
- package/pipeline/contract/fixtures/error-unsigned.json +1 -1
- package/pipeline/contract/fixtures/runs-awaiting-question.json +1 -1
- package/pipeline/contract/fixtures/runs-empty.json +1 -1
- package/pipeline/contract/fixtures/runs-failed.json +1 -1
- package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +1 -1
- package/pipeline/contract/fixtures/runs-pr-opened.json +1 -1
- package/pipeline/contract/fixtures/runs-running.json +1 -1
- package/pipeline/contract/manifest.json +5 -5
- package/pipeline/contract/types/index.d.ts +3 -2
- package/pipeline/multi-agent-refs/audit-guide.md +20 -0
- package/pipeline/multi-agent-refs/autopilot-on/details.md +148 -0
- package/pipeline/multi-agent-refs/channels/generator.md +14 -0
- package/pipeline/multi-agent-refs/channels/preview.md +13 -0
- package/pipeline/multi-agent-refs/channels/reference.md +46 -0
- package/pipeline/multi-agent-refs/complaint-analysis/phases.md +159 -0
- package/pipeline/multi-agent-refs/design-check/export.md +1 -0
- package/pipeline/multi-agent-refs/design-check/init-inventory.md +1 -1
- package/pipeline/multi-agent-refs/design-check/scope-and-ledger.md +64 -0
- package/pipeline/multi-agent-refs/features/analysis-command-notes.md +53 -0
- package/pipeline/multi-agent-refs/features/commit-multi-repo.md +63 -0
- package/pipeline/multi-agent-refs/features/dev-multi-repo.md +51 -0
- package/pipeline/multi-agent-refs/features/test-gap.md +40 -0
- package/pipeline/multi-agent-refs/features/worktree-finalize.md +1 -1
- package/pipeline/multi-agent-refs/garbage-collect/phases.md +60 -0
- package/pipeline/multi-agent-refs/ios-coding-standard/plan.md +71 -0
- package/pipeline/multi-agent-refs/ios-coding-standard/resolve-and-scan.md +135 -0
- package/pipeline/multi-agent-refs/jira/picker-detail.md +71 -0
- package/pipeline/multi-agent-refs/orchestrator/copilot-pipeline.md +88 -0
- package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +96 -1
- package/pipeline/multi-agent-refs/orchestrator/phase-3-user-test.md +12 -9
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +4 -4
- package/pipeline/multi-agent-refs/phases/phase-2-dev.md +8 -47
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +21 -65
- package/pipeline/multi-agent-refs/phases/phase-4-commit.md +9 -59
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +0 -31
- package/pipeline/multi-agent-refs/refactor/sweep.md +190 -0
- package/pipeline/multi-agent-refs/resume/details.md +115 -2
- package/pipeline/multi-agent-refs/review/inputs.md +33 -1
- package/pipeline/multi-agent-refs/review/module-guides.md +9 -1
- package/pipeline/multi-agent-refs/review/panel.md +75 -0
- package/pipeline/multi-agent-refs/review/valven.md +5 -1
- package/pipeline/multi-agent-refs/rules.md +1 -1
- package/pipeline/multi-agent-refs/setup/hooks-and-plugins.md +4 -0
- package/pipeline/multi-agent-refs/setup/token-save-flow.md +13 -0
- package/pipeline/multi-agent-refs/stack/background.md +72 -0
- package/pipeline/multi-agent-refs/store-ready/gates.md +139 -0
- package/pipeline/multi-agent-refs/store-ready/report.md +40 -2
- package/pipeline/multi-agent-refs/sync/office.md +10 -0
- package/pipeline/multi-agent-refs/sync/overview.md +61 -0
- package/pipeline/multi-agent-refs/sync/repo.md +91 -0
- package/pipeline/multi-agent-refs/update/details.md +83 -0
- package/pipeline/office/index.html +6 -3
- package/pipeline/office/toolkit.json +1 -1
- package/pipeline/rules/figma-pipeline.md +6 -3
- package/pipeline/schemas/prefs.schema.json +1 -1
- package/pipeline/schemas/runs-index.schema.json +2 -1
- package/pipeline/scripts/_memory-policy.mjs +27 -5
- package/pipeline/scripts/checkpoint-fold.sh +59 -0
- package/pipeline/scripts/contract-server.mjs +1 -1
- package/pipeline/scripts/gate-ledger.mjs +1 -1
- package/pipeline/scripts/office-control.mjs +41 -15
- package/pipeline/scripts/offload-ref.sh +1 -1
- package/pipeline/scripts/rework-rulings.mjs +5 -3
- package/pipeline/scripts/runs-index.mjs +34 -7
- package/pipeline/scripts/scope-check-gate.mjs +15 -2
- package/pipeline/scripts/status-overview.mjs +401 -0
- package/pipeline/scripts/user-test-handoff.sh +203 -0
- package/pipeline/scripts/validate-planning.mjs +5 -3
- package/pipeline/scripts/validate-triage.mjs +2 -1
- package/pipeline/scripts/write-state.mjs +13 -4
- package/pipeline/skills/.skill-manifest.json +64 -64
- package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +7 -70
- package/pipeline/skills/shared/core/apple-archive-compliance/references/examples.md +67 -0
- package/pipeline/skills/shared/core/apple-archive-compliance/references/version-history.md +8 -0
- package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +10 -72
- package/pipeline/skills/shared/core/google-play-compliance/references/examples.md +69 -0
- package/pipeline/skills/shared/core/google-play-compliance/references/notes.md +7 -0
- package/pipeline/skills/shared/core/google-play-compliance/references/version-history.md +5 -0
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +39 -262
- package/pipeline/skills/shared/core/multi-agent-autopilot-on/SKILL.md +35 -73
- package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +37 -337
- package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +27 -122
- package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +8 -340
- package/pipeline/skills/shared/core/multi-agent-ios-coding-standard/SKILL.md +37 -180
- package/pipeline/skills/shared/core/multi-agent-manual-test/SKILL.md +12 -7
- package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +23 -184
- package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +14 -82
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +25 -277
- package/pipeline/skills/shared/core/multi-agent-status/SKILL.md +13 -2
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +73 -217
- package/pipeline/skills/shared/external/alarmkit/SKILL.md +11 -162
- package/pipeline/skills/shared/external/alarmkit/references/alarmkit-code.md +257 -0
- package/pipeline/skills/shared/external/android-architecture/SKILL.md +7 -58
- package/pipeline/skills/shared/external/android-architecture/references/code-examples.md +68 -0
- package/pipeline/skills/shared/external/app-intents/SKILL.md +3 -45
- package/pipeline/skills/shared/external/app-intents/references/code-examples.md +54 -0
- package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +5 -81
- package/pipeline/skills/shared/external/app-store-optimization/references/engagement-and-localization.md +96 -0
- package/pipeline/skills/shared/external/app-store-review/SKILL.md +6 -112
- package/pipeline/skills/shared/external/app-store-review/references/monetization-and-submission.md +138 -0
- package/pipeline/skills/shared/external/apple-on-device-ai/SKILL.md +10 -117
- package/pipeline/skills/shared/external/apple-on-device-ai/references/foundation-models-code.md +186 -0
- package/pipeline/skills/shared/external/authentication/SKILL.md +3 -50
- package/pipeline/skills/shared/external/authentication/references/code-examples.md +59 -0
- package/pipeline/skills/shared/external/callkit-voip/SKILL.md +3 -84
- package/pipeline/skills/shared/external/callkit-voip/references/code-examples.md +93 -0
- package/pipeline/skills/shared/external/ci-cd-pipelines/SKILL.md +7 -263
- package/pipeline/skills/shared/external/ci-cd-pipelines/references/pipeline-examples.md +281 -0
- package/pipeline/skills/shared/external/clean-code/SKILL.md +8 -41
- package/pipeline/skills/shared/external/clean-code/references/code-examples.md +56 -0
- package/pipeline/skills/shared/external/cloudkit-sync/SKILL.md +8 -146
- package/pipeline/skills/shared/external/cloudkit-sync/references/cloudkit-code.md +214 -0
- package/pipeline/skills/shared/external/compose-components/SKILL.md +6 -80
- package/pipeline/skills/shared/external/compose-components/references/code-examples.md +89 -0
- package/pipeline/skills/shared/external/compose-navigation/SKILL.md +5 -64
- package/pipeline/skills/shared/external/compose-navigation/references/code-examples.md +70 -0
- package/pipeline/skills/shared/external/core-data/SKILL.md +9 -157
- package/pipeline/skills/shared/external/core-data/references/core-data-code.md +221 -0
- package/pipeline/skills/shared/external/core-nfc/SKILL.md +3 -89
- package/pipeline/skills/shared/external/core-nfc/references/code-examples.md +98 -0
- package/pipeline/skills/shared/external/coreml/SKILL.md +17 -133
- package/pipeline/skills/shared/external/coreml/references/coreml-code.md +208 -0
- package/pipeline/skills/shared/external/css-modern/SKILL.md +8 -131
- package/pipeline/skills/shared/external/css-modern/references/code-examples.md +142 -0
- package/pipeline/skills/shared/external/database-patterns/SKILL.md +6 -103
- package/pipeline/skills/shared/external/database-patterns/references/orm-examples.md +112 -0
- package/pipeline/skills/shared/external/html-semantic/SKILL.md +7 -48
- package/pipeline/skills/shared/external/html-semantic/references/code-examples.md +54 -0
- package/pipeline/skills/shared/external/humanizer/SKILL.md +6 -19
- package/pipeline/skills/shared/external/humanizer/references/voice.md +24 -0
- package/pipeline/skills/shared/external/ios-accessibility/SKILL.md +13 -170
- package/pipeline/skills/shared/external/ios-accessibility/references/assistive-tech-review.md +224 -0
- package/pipeline/skills/shared/external/ios-localization/SKILL.md +2 -24
- package/pipeline/skills/shared/external/ios-localization/references/code-examples.md +30 -0
- package/pipeline/skills/shared/external/ios-networking/SKILL.md +3 -58
- package/pipeline/skills/shared/external/ios-networking/references/code-examples.md +67 -0
- package/pipeline/skills/shared/external/ios-security/SKILL.md +4 -64
- package/pipeline/skills/shared/external/ios-security/references/code-examples.md +74 -0
- package/pipeline/skills/shared/external/live-activities/SKILL.md +4 -90
- package/pipeline/skills/shared/external/live-activities/references/code-examples.md +108 -0
- package/pipeline/skills/shared/external/localization-reuse-map/SKILL.md +9 -23
- package/pipeline/skills/shared/external/localization-reuse-map/references/project-settings.md +22 -0
- package/pipeline/skills/shared/external/mapkit-location/SKILL.md +5 -95
- package/pipeline/skills/shared/external/mapkit-location/references/code-examples.md +117 -0
- package/pipeline/skills/shared/external/nextjs-app-router/SKILL.md +7 -106
- package/pipeline/skills/shared/external/nextjs-app-router/references/app-router-examples.md +124 -0
- package/pipeline/skills/shared/external/permissionkit/SKILL.md +2 -31
- package/pipeline/skills/shared/external/permissionkit/references/code-examples.md +37 -0
- package/pipeline/skills/shared/external/play-store-review/SKILL.md +6 -74
- package/pipeline/skills/shared/external/play-store-review/references/signing-and-policies.md +83 -0
- package/pipeline/skills/shared/external/push-notifications/SKILL.md +8 -125
- package/pipeline/skills/shared/external/push-notifications/references/notification-code.md +176 -0
- package/pipeline/skills/shared/external/python-patterns/SKILL.md +7 -158
- package/pipeline/skills/shared/external/python-patterns/references/python-examples.md +176 -0
- package/pipeline/skills/shared/external/rest-api-design/SKILL.md +7 -157
- package/pipeline/skills/shared/external/rest-api-design/references/api-examples.md +175 -0
- package/pipeline/skills/shared/external/swift-architecture/SKILL.md +11 -230
- package/pipeline/skills/shared/external/swift-architecture/references/pattern-examples.md +295 -0
- package/pipeline/skills/shared/external/swift-codable/SKILL.md +17 -149
- package/pipeline/skills/shared/external/swift-codable/references/codable-recipes.md +207 -0
- package/pipeline/skills/shared/external/swift-concurrency/SKILL.md +12 -99
- package/pipeline/skills/shared/external/swift-concurrency/references/code-examples.md +100 -0
- package/pipeline/skills/shared/external/swift-concurrency/references/swift-6-2-additions.md +18 -0
- package/pipeline/skills/shared/external/swift-formatstyle/SKILL.md +9 -78
- package/pipeline/skills/shared/external/swift-formatstyle/references/formatstyle-examples.md +113 -0
- package/pipeline/skills/shared/external/swift-language/SKILL.md +3 -56
- package/pipeline/skills/shared/external/swift-language/references/code-examples.md +65 -0
- package/pipeline/skills/shared/external/swift-testing-pro/SKILL.md +1 -0
- package/pipeline/skills/shared/external/swiftdata/SKILL.md +6 -122
- package/pipeline/skills/shared/external/swiftdata/references/code-examples.md +140 -0
- package/pipeline/skills/shared/external/swiftui-uikit-interop/SKILL.md +12 -139
- package/pipeline/skills/shared/external/swiftui-uikit-interop/references/interop-code.md +198 -0
- package/pipeline/skills/shared/external/tailwind-css/SKILL.md +9 -81
- package/pipeline/skills/shared/external/tailwind-css/references/code-examples.md +91 -0
- package/pipeline/skills/shared/external/testing-backend/SKILL.md +7 -207
- package/pipeline/skills/shared/external/testing-backend/references/testing-examples.md +225 -0
- package/pipeline/skills/shared/external/typescript-patterns/SKILL.md +8 -89
- package/pipeline/skills/shared/external/typescript-patterns/references/code-examples.md +100 -0
- package/pipeline/skills/shared/external/vision-framework/SKILL.md +2 -20
- package/pipeline/skills/shared/external/vision-framework/references/code-examples.md +26 -0
- package/pipeline/skills/shared/external/vue-composition/SKILL.md +7 -169
- package/pipeline/skills/shared/external/vue-composition/references/vue-examples.md +187 -0
- package/pipeline/skills/shared/external/web-accessibility/SKILL.md +7 -174
- package/pipeline/skills/shared/external/web-accessibility/references/a11y-examples.md +192 -0
- package/pipeline/skills/shared/external/web-performance/SKILL.md +8 -66
- package/pipeline/skills/shared/external/web-performance/references/code-examples.md +77 -0
- package/pipeline/skills/shared/external/web-testing/SKILL.md +11 -186
- package/pipeline/skills/shared/external/web-testing/references/testing-examples.md +213 -0
- /package/pipeline/skills/shared/external/localization-reuse-map/{reference → references}/format-and-output.md +0 -0
- /package/pipeline/skills/shared/external/localization-reuse-map/{reference → references}/publish-and-snapshot.md +0 -0
- /package/pipeline/skills/shared/external/localization-reuse-map/{reference → references}/sources-and-recipes.md +0 -0
|
@@ -12,184 +12,77 @@ confirm: none
|
|
|
12
12
|
|
|
13
13
|
**Input**: $ARGUMENTS (optional run name, optional `--file <path>`, optional Jira ids / Jira URLs / Confluence URLs; remaining free text is treated as pasted complaints)
|
|
14
14
|
|
|
15
|
-
Triage of customer-reported errors across the layers the team owns (client apps + BFFs)
|
|
15
|
+
Triage of customer-reported errors across the layers the team owns (client apps + BFFs): Graylog evidence by trx/conversation id, read-only repo correlation, a verdict per complaint. **Core failures get a routing recommendation, never a fix analysis.**
|
|
16
16
|
|
|
17
|
-
**Side-effect contract**: may write a local markdown report, post a Confluence page, or add a Jira comment
|
|
17
|
+
**Side-effect contract**: may write a local markdown report, post a Confluence page, or add a Jira comment - but **never** creates branches, worktrees, commits, or PRs. Stops at the report.
|
|
18
18
|
|
|
19
|
-
> **Language**:
|
|
19
|
+
> **Language**: instruction prose stays English (`$HOME/.claude/multi-agent-refs/rules.md` Language Application). `AskUserQuestion` `question` / `label` / `description` and the report body follow `outputLanguage`; `header` (<=12 chars), verdict tokens, Graylog excerpts and payload metadata stay English.
|
|
20
|
+
|
|
21
|
+
Procedures, tables, the full locked decisions and the reusable refs: `$HOME/.claude/multi-agent-refs/complaint-analysis/phases.md`. Read the section each phase names before running it.
|
|
20
22
|
|
|
21
23
|
## Locked decisions (do not re-ask)
|
|
22
24
|
|
|
23
|
-
1. **Graylog is primary evidence
|
|
24
|
-
2. **Ids are never guessed.**
|
|
25
|
-
3. **Read-only ops command.** No worktree, branch, commit, PR, or dev chaining.
|
|
26
|
-
4. **Redaction before any output
|
|
27
|
-
5. **Core is a residual classification, not a repo
|
|
28
|
-
6. **Layer mapping is user-confirmed
|
|
29
|
-
7. **Output default = Local file
|
|
30
|
-
8. **Humanizer punctuation policy is non-negotiable
|
|
31
|
-
9. **Language split
|
|
32
|
-
10. **
|
|
33
|
-
11. **One
|
|
34
|
-
12. **No auto-commit.**
|
|
35
|
-
13. **Client/bff verdicts carry a
|
|
25
|
+
1. **Graylog is primary evidence.** A fetch failure never halts the run; it caps that complaint at `insufficient-evidence`.
|
|
26
|
+
2. **Ids are never guessed.** No trxId and no convId: the user supplies one or marks `skip-graylog`. Empty submit is not consent; re-ask.
|
|
27
|
+
3. **Read-only ops command.** No worktree, branch, commit, PR, or dev chaining.
|
|
28
|
+
4. **Redaction before any output** (`parse-complaints.sh`, Jira / Confluence text via `--stdin`). Raw PII never enters state, drafts or any target.
|
|
29
|
+
5. **Core is a residual classification, not a repo**: routing only, no fix analysis, no core-repo grepping.
|
|
30
|
+
6. **Layer mapping is user-confirmed** before Phase 1.
|
|
31
|
+
7. **Output default = Local file**; Confluence and Jira are never default-selected.
|
|
32
|
+
8. **Humanizer punctuation policy is non-negotiable**: no em-dash, en-dash, ellipsis, curly quotes or section sign; Turkish diacritics preserved, never ASCII-folded.
|
|
33
|
+
9. **Language split** as above.
|
|
34
|
+
10. **Citations.** `client`/`bff` cites a Graylog message (timestamp + source) AND a `file:line`, else `insufficient-evidence`; `core` cites the message naming the upstream service.
|
|
35
|
+
11. **One batch per run**; unrelated products: ask to split.
|
|
36
|
+
12. **No auto-commit.**
|
|
37
|
+
13. **Client/bff verdicts carry a dev handoff** (fix plan + dev prompt), never run here; other verdicts get none.
|
|
36
38
|
|
|
37
39
|
## Steps
|
|
38
40
|
|
|
39
41
|
### Phase 0 - Intake
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
#### Step 0 - Language resolution (BLOCKING)
|
|
44
|
-
|
|
45
|
-
Read `prefs.global.outputLanguage` (`tr` or `en`, default `tr`) before the first picker. Every `<localized: "...">` marker in this file is rendered in that language, never emitted literally.
|
|
46
|
-
|
|
47
|
-
#### Step 1 - Run name
|
|
48
|
-
|
|
49
|
-
From `$ARGUMENTS` quoted string if present, else default `complaints-<YYYYMMDD>` (announce, do not ask). Result: `state.complaintSpec.runName`.
|
|
50
|
-
|
|
51
|
-
#### Step 2 - Account picker
|
|
52
|
-
|
|
53
|
-
Reuse `$HOME/.claude/multi-agent-refs/_account-picker.md`. Needed for Graylog-adjacent Jira/Confluence fetches and dispatch; skipped only when the run is fully local (no Jira/Confluence input, local output only) - then `account: null`.
|
|
54
|
-
|
|
55
|
-
#### Step 3 - Repo multi-select
|
|
56
|
-
|
|
57
|
-
Reuse `$HOME/.claude/multi-agent-refs/_repo-picker.md` (multi-select via `~/.claude/lib/repo-cache.sh`). Guidance line in the question: <localized: "Select the client and BFF repos your team owns (e.g. ios / android / web / mobile-bff / web-bff). Core services are NOT selected - core is a triage outcome, not a repo.">
|
|
58
|
-
|
|
59
|
-
#### Step 3b - Layer tagging (single confirmation table)
|
|
43
|
+
`AskUserQuestion` chain into `state.complaintSpec.*`, breadcrumbs per `$HOME/.claude/multi-agent-refs/picker-contract.md`. Read `phases.md` "Phase 0" first.
|
|
60
44
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|---|---|
|
|
69
|
-
| File path (`--file` or detected) | `~/.claude/lib/parse-complaints.sh --file <path>` (format auto-detected; exit 5 = xlsx degrade -> surface `degradeReason`, ask for a CSV export path, re-run) |
|
|
70
|
-
| Pasted free text | `parse-complaints.sh --stdin` (splits blocks, pre-fills ids via the shared label set) |
|
|
71
|
-
| Jira id / URL | Fetch issue summary + description + comments via Jira REST (account token); concatenate as text blocks, pipe through `parse-complaints.sh --stdin` (Locked 4) |
|
|
72
|
-
| Confluence URL | `~/.claude/lib/fetch-confluence.sh <url>`; page body paragraphs/table rows become text blocks, piped through `parse-complaints.sh --stdin` |
|
|
73
|
-
|
|
74
|
-
Merge all outputs into one list, re-numbering ids `C-01..C-NN`. Result: `state.complaintSpec.input` + `state.complaintSpec.complaints[]`.
|
|
75
|
-
|
|
76
|
-
#### Step 5 - Id confirmation loop (Locked 2)
|
|
77
|
-
|
|
78
|
-
Render the parsed table (id, redacted excerpt <= 80 chars, trxId, convId, platformHint) to the user. For every complaint missing BOTH ids, one AskUserQuestion: <localized: "Complaint <id> has no trx/conversation id. Supply one, or skip Graylog for it?"> with options `Skip Graylog for this complaint` (-> `skipGraylog: true`) and Other for the id (`trx:<value>` / `conv:<value>`). Empty submit re-asks. Set `phase: "fetching_graylog"`.
|
|
45
|
+
0. **Language (BLOCKING)**: read `prefs.global.outputLanguage` (default `tr`) before the first picker; every `<localized: "...">` marker renders in it, never literally.
|
|
46
|
+
1. **Run name**: quoted argument, else `complaints-<YYYYMMDD>` (announce, do not ask).
|
|
47
|
+
2. **Account**: `$HOME/.claude/multi-agent-refs/_account-picker.md`; `null` only for a fully local run.
|
|
48
|
+
3. **Repos**: `$HOME/.claude/multi-agent-refs/_repo-picker.md`, owned client + BFF repos only.
|
|
49
|
+
3b. **Layer tagging**: infer a layer per repo, ONE confirmation question with the whole table (`Approve mapping` / `Override rows`) (Locked 6).
|
|
50
|
+
4. **Complaint input**: every source through `parse-complaints.sh` (Locked 4), merged as `C-01..C-NN`.
|
|
51
|
+
5. **Id confirmation loop** for every complaint missing both ids (Locked 2). Then `phase: "fetching_graylog"`.
|
|
79
52
|
|
|
80
53
|
### Phase 1 - Graylog evidence fan-out
|
|
81
54
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
~/.claude/lib/fetch-graylog.sh --trx <trxId> --conv <convId> # pass whichever exist
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Environment defaults to `auto`: production first, the test instance (`hosts.graylogTest`) when production returns nothing or is unreachable. A customer complaint is normally a production event, but a tester-minted id only exists on test, and prod-only search reports "no logs" for both cases identically. When the intake itself says which environment a complaint came from, pin it with `--env prod` / `--env test` rather than letting the fallback decide.
|
|
89
|
-
|
|
90
|
-
Record per complaint: `graylog: {status: ok|degraded|skipped, environment, totalResults, degradeReason}` plus the top messages (timestamp, source, level, message excerpt) kept in working context for Phase 2/3. Failure handling:
|
|
91
|
-
|
|
92
|
-
- Exit 0 with `degraded: true` -> `status: degraded`, keep the reason, continue.
|
|
93
|
-
- Exit 2 / 3 / 6 (credential / auth / host) -> per `$HOME/.claude/multi-agent-refs/keychain.md` non-critical rule: warn ONCE (`WARN: Graylog unavailable (<reason>); remaining complaints proceed without log evidence.`), mark this and all remaining fetches `status: degraded`, continue. Never halt (Locked 1).
|
|
94
|
-
- `skipGraylog: true` -> `status: skipped`.
|
|
95
|
-
|
|
96
|
-
**Always name the environment when citing log evidence.** `source.environment` in the fetcher payload says which instance answered; the same lines mean different things depending on whether a production complaint was corroborated by production logs or only by test ones. A complaint whose only evidence came from test is `insufficient-evidence` for a production claim, not `bff`.
|
|
97
|
-
|
|
98
|
-
Set `phase: "correlating_repos"`.
|
|
55
|
+
`~/.claude/lib/fetch-graylog.sh --trx <trxId> --conv <convId>` per complaint with an id and no `skipGraylog`; environment `auto` unless the intake pins it (`--env prod|test`). Exit 2 / 3 / 6: warn ONCE per `$HOME/.claude/multi-agent-refs/keychain.md`, mark the rest `degraded`, continue; never halt (Locked 1). **Always name the environment when citing log evidence**; test-only evidence is `insufficient-evidence` for a production claim. Statuses and recorded fields: `phases.md` "Phase 1". Then `phase: "correlating_repos"`.
|
|
99
56
|
|
|
100
57
|
### Phase 2 - Repo evidence correlation (read-only)
|
|
101
58
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
grep -rn --include='*.swift' --include='*.kt' --include='*.ts' --include='*.tsx' --include='*.js' --include='*.java' -E "<signal>" "$REPO_PATH"
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Bucket hits per complaint as `repoEvidence[] = {repo, layer, file, line, signal, matchKind: direct|partial}` (`direct` = exact endpoint/error-code/template match; `partial` = fuzzy/name-only). Grep only - no convention extraction, no Figma, no Swagger. Complaints with `status: degraded|skipped` still get a text-similarity pass (grep the complaint's distinctive nouns/error phrases), tagged `partial`. Set `phase: "triaging"`.
|
|
59
|
+
Grep the selected repos for Graylog-derived signals only; degraded or skipped complaints get a `partial` text-similarity pass. Details: `phases.md` "Phase 2". Then `phase: "triaging"`.
|
|
109
60
|
|
|
110
61
|
### Phase 3 - Triage classification
|
|
111
62
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
| Condition | Verdict |
|
|
115
|
-
|---|---|
|
|
116
|
-
| Graylog error originates in an owned layer: signal matched `direct` in a selected repo, OR the failing `source` maps to an owned BFF | `client:<ios|android|web>` or `bff:<mobile-bff|web-bff>` + root-cause rationale + citations (Locked 10) |
|
|
117
|
-
| Graylog shows the failure downstream of owned layers: `source` is an unowned core service, 5xx from an upstream nobody selected owns, no repo match | `core` + routing recommendation (below) |
|
|
118
|
-
| No/degraded Graylog AND no direct repo signal | `insufficient-evidence` + open question row |
|
|
119
|
-
|
|
120
|
-
**Routing recommendation** (core only, Locked 5): `{suspectedService: <Graylog source>, endpoint, errorCode, evidenceExcerpt (EN, redacted), suggestedQueue: prefs.projects[<project>].routing.coreTeamLabel ?? null, confidence}`.
|
|
121
|
-
|
|
122
|
-
Verdict shape: `verdict: {category, layer, confidence: high|medium|low, rationale}`. Ambiguous client-vs-bff attribution lowers `confidence`, never invents evidence.
|
|
123
|
-
|
|
124
|
-
**Development handoff (client/bff only, Locked 13)**: for each `client`/`bff` verdict, derive from the `repoEvidence[]` rows:
|
|
125
|
-
|
|
126
|
-
- **Fix plan**: 2-5 numbered steps referencing the existing architecture by `file:line` - which service/view/handler to change, what to reuse (reuse-first: prefer extending the cited components over adding new ones), which tests to add. No speculative rewrites.
|
|
127
|
-
- **Dev prompt**: one fenced English block the user can paste into `/multi-agent` (or a Jira description): complaint summary, root cause, the cited files, the fix plan steps, and the acceptance check. Include the complaint id (`[C-NN]`) for traceability.
|
|
128
|
-
|
|
129
|
-
Set `phase: "drafting"`.
|
|
63
|
+
Owned-layer origin -> `client:<ios|android|web>` / `bff:<mobile-bff|web-bff>`; downstream unowned failure -> `core` + routing recommendation; no evidence -> `insufficient-evidence`. Ambiguity lowers `confidence`, never invents evidence. Condition table, routing shape and the client/bff fix plan + dev prompt (Locked 13): `phases.md` "Phase 3". Then `phase: "drafting"`.
|
|
130
64
|
|
|
131
65
|
### Phase 4 - Draft, humanize, buffer
|
|
132
66
|
|
|
133
|
-
1. Render
|
|
134
|
-
2. **Humanizer pass (required: actually invoke the `ai-common-toolkit:humanizer` skill; the punctuation grep alone does NOT satisfy this)
|
|
135
|
-
3.
|
|
136
|
-
4. Show
|
|
67
|
+
1. Render per `$HOME/.claude/multi-agent-refs/complaint-analysis-template.md` to `/tmp/complaint-analysis-<run-slug>-<UTC-iso8601>/report.md` (`outputs.draftDir`).
|
|
68
|
+
2. **Humanizer pass (required: actually invoke the `ai-common-toolkit:humanizer` skill; the punctuation grep alone does NOT satisfy this)**: `language: <tr|en>`, `tone: technical-explanatory`, `stripFancyPunctuation: true` (Locked 8).
|
|
69
|
+
3. `node $HOME/.claude/scripts/validate-complaint-doc.mjs <draft>` reports no banned punctuation (never `grep -P`).
|
|
70
|
+
4. Show path + size; `phase: "awaiting_output_decision"`.
|
|
137
71
|
|
|
138
72
|
### Phase 4.5 - Output destination picker
|
|
139
73
|
|
|
140
|
-
AskUserQuestion
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
header: "Output"
|
|
144
|
-
question: <localized: "Where should the triage report be written?">
|
|
145
|
-
options:
|
|
146
|
-
- label: "Local file" (description: complaints/<run-name>.md in the primary repo's working tree)
|
|
147
|
-
- label: "Confluence page"
|
|
148
|
-
- label: "Jira"
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Follow-ups: Confluence -> ask parent page (Other, LRU recents from `prefs.projects[<project>].confluenceUrls`); Jira -> pick from Step 4 Jira ids if any, else ask via Other. Result: `outputs.destinations[]`. Set `phase: "dispatching"`.
|
|
74
|
+
`AskUserQuestion` multiSelect, `header` `Output`, options `Local file` (pre-selected, Locked 7) / `Confluence page` / `Jira`; follow-ups in `phases.md` "Phase 4.5". Then `phase: "dispatching"`.
|
|
152
75
|
|
|
153
76
|
### Phase 5 - Validate, dispatch, report. Stop.
|
|
154
77
|
|
|
155
|
-
**Pre-dispatch gate (BLOCKING)**: `
|
|
156
|
-
|
|
157
|
-
| Target | Action |
|
|
158
|
-
|---|---|
|
|
159
|
-
| Local | `cp` the draft to `complaints/<run-name>.md` in the primary repo's working tree. **No commit** (Locked 12). |
|
|
160
|
-
| Confluence | Re-humanize with `formal-stakeholder` tone; post one page under the chosen parent via `$HOME/.claude/multi-agent-refs/channels/confluence.md` + `~/.claude/lib/md2confluence-v3.py`. |
|
|
161
|
-
| Jira | Re-humanize with `informal-technical` tone; markdown -> wiki markup per `$HOME/.claude/multi-agent-refs/channels/jira.md`; post as a comment on the chosen issue (never close/transition the issue). |
|
|
162
|
-
|
|
163
|
-
Then print the summary in `outputLanguage`: complaint count, verdict counts (`X client / Y bff / Z core / W insufficient-evidence`), degraded services, output paths/URLs. When any `core` verdict exists, add: <localized: "N complaint(s) route to the core team - see the routing section before forwarding.">
|
|
78
|
+
**Pre-dispatch gate (BLOCKING)**: `validate-complaint-doc.mjs <draft>`; any ERROR blocks dispatch until fixed and re-validated. Local copies to `complaints/<run-name>.md` with **no commit** (Locked 12); Confluence and Jira re-humanize and post per `phases.md` "Phase 5" (a Jira issue gets a comment, never a close or transition). 401 / 403: surface it and offer Local. Print the `outputLanguage` summary (`phases.md` "Phase 5").
|
|
164
79
|
|
|
165
80
|
**Stop. Do not chain into a dev run. Do not open a worktree. Do not create a branch.** Set `phase: "done"`.
|
|
166
81
|
|
|
167
82
|
### Resume contract
|
|
168
83
|
|
|
169
|
-
`state.complaintSpec.phase`: `intake | fetching_graylog | correlating_repos | triaging | drafting | awaiting_output_decision | dispatching | reporting | done`.
|
|
170
|
-
|
|
171
|
-
`/multi-agent:resume` at `awaiting_output_decision`: if `outputs.draftDir` still holds `report.md`, jump to Phase 4.5; if gone, re-render Phase 4 from state (evidence is retained). Earlier phases resume at their own boundary; Graylog results already in state are never re-fetched.
|
|
172
|
-
|
|
173
|
-
## Reusable refs
|
|
174
|
-
|
|
175
|
-
| Path | Reason |
|
|
176
|
-
|---|---|
|
|
177
|
-
| `~/.claude/lib/parse-complaints.sh` | Phase 0 Step 4 normalization + redaction (all formats + stdin) |
|
|
178
|
-
| `~/.claude/lib/context-link-extractor.sh` | Phase 0 Step 4 input classifier (jira / confluence / graylog id labels) |
|
|
179
|
-
| `~/.claude/lib/fetch-graylog.sh` | Phase 1 log evidence (`--trx` / `--conv`) |
|
|
180
|
-
| `~/.claude/lib/fetch-confluence.sh` | Phase 0 Step 4 Confluence-sourced complaints |
|
|
181
|
-
| `$HOME/.claude/multi-agent-refs/_account-picker.md`, `_repo-picker.md`, `picker-contract.md` | Phase 0 pickers |
|
|
182
|
-
| `$HOME/.claude/multi-agent-refs/keychain.md` | Phase 1 non-critical credential handling |
|
|
183
|
-
| `$HOME/.claude/multi-agent-refs/complaint-analysis-template.md` | Phase 4 report template (8 sections) |
|
|
184
|
-
| `ai-common-toolkit:humanizer` | Phase 4 tone pass |
|
|
185
|
-
| `ai-analyst-toolkit:signal-community` | Phase 1 corroboration, optional. Advisory only: a matching report outside the company shows the complaint is not one user's device, and lands in the risks section with its link, never as a root cause. |
|
|
186
|
-
| `$HOME/.claude/scripts/validate-complaint-doc.mjs` | Phase 5 pre-dispatch gate |
|
|
187
|
-
| `$HOME/.claude/multi-agent-refs/channels/confluence.md`, `channels/jira.md`, `~/.claude/lib/md2confluence-v3.py` | Phase 5 dispatch |
|
|
188
|
-
| `$HOME/.claude/schemas/complaint-analysis-spec.schema.json` | State contract |
|
|
84
|
+
`state.complaintSpec.phase`: `intake | fetching_graylog | correlating_repos | triaging | drafting | awaiting_output_decision | dispatching | reporting | done`. At `awaiting_output_decision`, jump to Phase 4.5 when `report.md` is still in `outputs.draftDir`, else re-render Phase 4 from state. Earlier phases resume at their own boundary. Graylog results in state are never re-fetched.
|
|
189
85
|
|
|
190
86
|
## Notes
|
|
191
87
|
|
|
192
|
-
- Fully generic: hosts
|
|
193
|
-
- `prefs.projects[<project>].routing.coreTeamLabel` is optional; when unset, `suggestedQueue` renders as `-` and the routing entry still stands.
|
|
194
|
-
- If Confluence / Jira dispatch returns 401 / 403, surface the error and offer the Local fallback (the draft stays on disk).
|
|
195
|
-
- The `complaints/` directory is not gitignored; the user commits manually if desired.
|
|
88
|
+
- Fully generic: hosts from `prefs.global.hosts.*`, tokens from `prefs.global.keychainMapping.*`; no company name, host, or real repo name in this file.
|
|
@@ -9,13 +9,11 @@ confirm: none
|
|
|
9
9
|
allowed-tools: Agent, Bash, Read, Write, Edit, Glob, Grep, TaskCreate, TaskUpdate, AskUserQuestion, Skill, mcp__claude_ai_Figma__get_metadata, mcp__claude_ai_Figma__get_design_context, mcp__claude_ai_Figma__get_screenshot, mcp__multi-agent-toolkit__design_mock_detect, mcp__multi-agent-toolkit__design_scenario_inventory, mcp__multi-agent-toolkit__design_mock_launch, mcp__multi-agent-toolkit__design_ui_geometry, mcp__multi-agent-toolkit__design_visual_compare, mcp__multi-agent-toolkit__design_report, mcp__multi-agent-toolkit__ios_list_devices, mcp__multi-agent-toolkit__ios_boot_device, mcp__multi-agent-toolkit__ios_launch_app, mcp__multi-agent-toolkit__ios_terminate_app, mcp__multi-agent-toolkit__ios_screenshot, mcp__multi-agent-toolkit__ios_tap, mcp__multi-agent-toolkit__ios_swipe, mcp__multi-agent-toolkit__ios_type_text, mcp__multi-agent-toolkit__ios_open_url, mcp__multi-agent-toolkit__ios_get_ui_tree, mcp__multi-agent-toolkit__ios_status_bar, mcp__multi-agent-toolkit__ios_set_appearance, mcp__multi-agent-toolkit__ios_set_locale, mcp__multi-agent-toolkit__ios_xcodebuild, mcp__multi-agent-toolkit__ios_xcresult, mcp__multi-agent-toolkit__android_list_devices, mcp__multi-agent-toolkit__android_screenshot, mcp__multi-agent-toolkit__android_tap, mcp__multi-agent-toolkit__android_swipe, mcp__multi-agent-toolkit__android_type_text, mcp__multi-agent-toolkit__android_open_url, mcp__multi-agent-toolkit__android_launch_app, mcp__multi-agent-toolkit__android_stop_app
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
# /multi-agent:design-check
|
|
12
|
+
# /multi-agent:design-check - Mock-mode vs Figma design audit
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Runs the app in **mock mode** on a simulator / emulator and compares each screen and mock variant against Figma at the **pixel + geometry + typography + color** level. **Local-only**: no CI, no commits, no PR; the report goes to `~/DesignChecks/`, the worktree only isolates the Debug build.
|
|
15
15
|
|
|
16
|
-
**
|
|
17
|
-
|
|
18
|
-
> **Language (read FIRST)**: `prefs.global.promptLanguage` is always `en` - this spec and every instruction to the LLM stay English. `prefs.global.outputLanguage` applies to conversational lines and the human-readable parts of the report; pass it to `design_report` as `report.lang` (engine defaults to English, ships `en` + `tr` label packs, per-key `report.labels` overrides). `AskUserQuestion` `header` chips, branch names, file paths, code identifiers and log lines stay English; option `label`s follow `outputLanguage`. Full contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
|
|
16
|
+
> **Language**: this spec stays English. `outputLanguage` covers conversational lines and the report (`design_report` `report.lang`); `header` chips, paths, identifiers and logs stay English. Contract: `$HOME/.claude/multi-agent-refs/rules.md` "Language Application".
|
|
19
17
|
|
|
20
18
|
## Gotchas
|
|
21
19
|
|
|
@@ -23,145 +21,43 @@ Local, on-device design-conformance auditor. Runs the app in a **mock mode** on
|
|
|
23
21
|
- The coverage gate fails the run when a target was neither audited nor skipped with a reason. "Not reached" is not "passed".
|
|
24
22
|
- A Figma variant with no matching mock state is a finding about the mock, not a pass for the screen.
|
|
25
23
|
|
|
26
|
-
## Scope
|
|
27
|
-
|
|
28
|
-
The scope decides which **inventory targets** (Phase 0 step 5) the run must audit. It never changes how thoroughly each target is audited.
|
|
29
|
-
|
|
30
|
-
| Form | Example | Scope |
|
|
31
|
-
|------|---------|-------|
|
|
32
|
-
| empty / `module` | `/multi-agent:design-check` | Every target in the module's inventory |
|
|
33
|
-
| screen name | `order-status` | Every target whose `screen` matches (case/separator-insensitive) |
|
|
34
|
-
| `screen@variant` | `order-status@expired` | One target |
|
|
35
|
-
| target id | `scenario-case:orderstatusoutcome-expired` | One target, exactly |
|
|
36
|
-
| Figma URL(s) | `https://figma.com/design/...?node-id=1-2` | Only the frames those URLs name |
|
|
37
|
-
| `--resume` | `--resume` | The unaudited remainder of the most recent run for this repo + module |
|
|
38
|
-
| combinations | `seat-map summary@semi-success` | Union of the above, space- or newline-separated |
|
|
39
|
-
|
|
40
|
-
A scope that matches **no** inventory target is an error, not an empty run: print the closest inventory ids and halt.
|
|
41
|
-
|
|
42
|
-
**Whole-module is the default, and it is meant to finish.** The inventory prices each target (`cost: relaunch | in-app`) and batches them into a run `plan`, so a 50-target module is typically about a dozen relaunches rather than fifty. Scope exists for resuming an interrupted run and for re-checking one screen after a fix, **not** for trimming an audit down to what feels affordable. The coverage gate applies to the **scoped** target set, so a deliberate scoped run is never penalised for out-of-scope targets, and `--resume` closes the remainder.
|
|
43
|
-
|
|
44
|
-
## Pipeline
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
Phase 0: Init & Gate → repo + module picker, platform detect, MOCK FEASIBILITY GATE, SCENARIO INVENTORY, scope resolve, report dir, worktree
|
|
48
|
-
Phase 1: Build & Launch → Debug build in worktree, boot device, install, launch in mock mode
|
|
49
|
-
Phase 2: Figma → fetch module frame tree, enumerate + map variants (ask when ambiguous)
|
|
50
|
-
Phase 3: Drive & Compare → per plan batch: one launch → capture + flip in-app states → match → batch-ask → compare
|
|
51
|
-
Phase 4: Report → coverage gate + assemble + export HTML + PDF (+ Confluence) to ~/DesignChecks/
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Requirements
|
|
55
|
-
|
|
56
|
-
- **iOS**: Xcode + an available Simulator. **Android**: Android SDK + a running emulator / device.
|
|
57
|
-
- **MCP**: the `multi-agent-toolkit` MCP server (>= 2.8.0, for `design_scenario_inventory`, the `design_report` coverage gate, and `design_visual_compare` region alignment). The Figma MCP (`mcp__claude_ai_Figma__*`) must be authenticated - the user supplies the Figma URL.
|
|
58
|
-
- The selected module must be auditable: a **mock mode** (preferred - it can toggle variants) or a **snapshot capture** of the screen's view model. Phase 0 decides which. Neither → the command halts.
|
|
59
|
-
|
|
60
|
-
## Phase Tracker Contract (mandatory)
|
|
61
|
-
|
|
62
|
-
Register one tile per phase in strict order BEFORE any update, on both channels. Full spec: `$HOME/.claude/multi-agent-refs/tracker-contract.md`.
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
bash $HOME/.claude/scripts/phase-tracker.sh init "$TASK_ID"
|
|
66
|
-
for p in "0:Init & Gate" "1:Build & Launch" "2:Figma" "3:Drive & Compare" "4:Report"; do
|
|
67
|
-
bash $HOME/.claude/scripts/phase-tracker.sh add "${p%%:*}" "${p#*:}"
|
|
68
|
-
done
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
In Claude Code also drive the native TaskList widget: fire all `TaskCreate` calls in phase order (0→1→2→3→4) first, persist each `taskId` via `phase-tracker.sh meta <N> tasklist_id`, then flip status with `TaskUpdate` + `phase-tracker.sh update` at every boundary. On Copilot / plain shell call `phase-tracker.sh render` instead (no TaskCreate).
|
|
72
|
-
|
|
73
|
-
## STOP-AND-CONFIRM format
|
|
74
|
-
|
|
75
|
-
Every Phase 0 / Phase 2 decision uses a native `AskUserQuestion` picker per `picker-contract.md` (numbered text menus are forbidden). Print a `Step <i>/<n>: <what it decides>` breadcrumb before each picker. Confirmation is required even with a single option; state inheritance from a previous run is FORBIDDEN.
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Phase 0 - Init, Feasibility Gate & Inventory
|
|
80
|
-
|
|
81
|
-
0. **MCP CURRENCY GATE (first, before anything expensive)** - a session started before the last update serves the OLD tool list while reporting "connected". Check both halves before the Debug build: (a) **session** - `design_scenario_inventory` is available and `design_visual_compare` accepts `live_region`; (b) **disk** - probe what a fresh connection would serve. Disk OK but session stale → **HALT**, tell the user to reconnect (`/mcp` → `multi-agent-toolkit` → Reconnect). Disk stale → **HALT**, the checkout needs updating. Both current → continue. Never substitute a local `node` call for a missing tool: the run would silently lose the coverage gate and region alignment. Full procedure: `$HOME/.claude/multi-agent-refs/design-check/mcp-currency-gate.md`. Read it for Phase 0 step 0.
|
|
82
|
-
1. **Repo picker** - `$HOME/.claude/multi-agent-refs/_repo-picker.md`. Account picker skipped unless Confluence export is enabled.
|
|
83
|
-
2. **Module / dev-context picker** - `$HOME/.claude/multi-agent-refs/_dev-context.md`; multi-module allowed, each audited independently.
|
|
84
|
-
3. **Platform detect** - persist `state.designCheck.platform`.
|
|
85
|
-
4. **MOCK FEASIBILITY GATE** - `mcp__multi-agent-toolkit__design_mock_detect` on the selected module path. Branch on `supported`:
|
|
86
|
-
- **`false`** → try the **snapshot lane** before halting: a screen renderable from its own view model is auditable without a runtime mock switch. Ask via `AskUserQuestion`, persist `state.designCheck.captureLane = "snapshot"`, and state the trade (no in-app variant flips). Declined or not renderable → **HALT** with `reason`. Never fabricate a comparison.
|
|
87
|
-
- **`"debug-only"`** → `AskUserQuestion` warning: variants cannot be toggled at launch, only the default Debug state is comparable. Continue / Cancel.
|
|
88
|
-
- **`true`** → continue; persist `state.designCheck.mock`.
|
|
89
|
-
5. **SCENARIO INVENTORY (this is the audit's target set)** - `mcp__multi-agent-toolkit__design_scenario_inventory` with the config's inventory overrides. This list, not the agent's reading of the code or what the UI exposes to tapping, is what the run is measured against. Persist verbatim to `state.designCheck.inventory`.
|
|
90
|
-
- `targetCount: 0` → warn that no state driver was found and only the default launch state can be audited; a `debug-only` project lands here.
|
|
91
|
-
- `truncated: true` → the target set is INCOMPLETE. Say so now, and pass `coverage.truncatedInventory: true` in Phase 4 so the gate fails rather than reporting a clean percentage of a partial denominator. Narrow the scope to a screen and work through the module in `--resume` steps.
|
|
92
|
-
- `ignored[]` non-empty → list what the config dropped, so a stale `ignoreTargets` cannot quietly shrink the audit.
|
|
93
|
-
6. **Scope resolve** - intersect `$ARGUMENTS` with `inventory.targets`; persist `state.designCheck.scope = { argument, targetIds[] }`. Print the set grouped by screen as `<n> targets · <relaunchCount> relaunches` (cost from `plan`, not the target count). Ask for confirmation only when `relaunchCount` exceeds `config coverage.confirmAbove` (default 25), as a cost estimate; never propose a smaller scope as the easy path.
|
|
94
|
-
7. **`--resume`** - scope = the latest `run-state.json` targets minus `covered` minus `skipped`. No previous run → tell the user and fall back to whole-module scope after confirmation.
|
|
95
|
-
8. **Report dir** - create `~/DesignChecks/{repo}__{module}/{UTC-timestamp}/` (+ `assets/`) now, persist `state.designCheck.reportDir`; it exists before driving starts.
|
|
96
|
-
9. **Worktree** - `{projectRoot}/.worktrees/{taskId}`, `taskId` = `DC-<shortId>`, **never under $HOME**; prune stale locks and add the residue guard first. Local mode is not offered.
|
|
97
|
-
|
|
98
|
-
Then persist `agent-state.json`. Full procedure: `$HOME/.claude/multi-agent-refs/design-check/init-inventory.md`. Read it for Phase 0 steps 1-9.
|
|
99
|
-
|
|
100
|
-
## Phase 1 - Build & Launch (mock)
|
|
101
|
-
|
|
102
|
-
Debug build in the worktree (mocks need Debug), boot, install once, fix status bar / appearance / locale, launch via `design_mock_launch` with the Phase 0 activation (`debug-only`: plain launch). Phase 3 relaunches, never rebuilds. Full procedure: `$HOME/.claude/multi-agent-refs/design-check/build-launch.md`. Read it for Phase 1.
|
|
103
|
-
|
|
104
|
-
## Phase 2 - Figma fetch & variant mapping (module-scoped)
|
|
105
|
-
|
|
106
|
-
Figma **discovery** happens only here: the frame tree is fetched once and no later phase browses Figma looking for candidates. Phase 3 may still fetch a specific node the user hands over in the 3.3 batch-ask - that is a targeted fetch of an already-identified frame, not discovery, and it is the only Figma call allowed after this phase.
|
|
107
|
-
|
|
108
|
-
Fetch the frame tree, map each scoped target to a frame, fetch screenshot + design context per variant, persist `state.designCheck.variants[]`. **Ambiguous or unmatched → defer to the Phase 3.3 batch-ask. Never guess silently.** Full procedure: `$HOME/.claude/multi-agent-refs/design-check/figma-mapping.md`. Read it for Phase 2.
|
|
109
|
-
|
|
110
|
-
## Phase 3 - Drive every scoped target → capture → match → batch-ask → compare
|
|
111
|
-
|
|
112
|
-
**This phase iterates `state.designCheck.scope.targetIds` - a finite list decided in Phase 0. It ends when every id is resolved, not when the UI stops offering new taps.** Tap-walking alone cannot reach a state that needs a different launch argument, scenario case, or typed scenario code - which is how a module's error / edge states go missing.
|
|
113
|
-
|
|
114
|
-
### 3.0 What every capture is compared against
|
|
115
|
-
|
|
116
|
-
**Read `$HOME/.claude/multi-agent-refs/features/design-conformance.md` before the first compare.** It owns the per-component catalog (30 groups), the scope tags, and the three rules that decide whether this phase produced a result or an impression: enumerate first (a blank cell is a fail-to-verify), measure never the token, and converge per component (two consecutive clean attempts, cap 8). The screen is done when every component converged - not when the walk reached the bottom.
|
|
117
|
-
|
|
118
|
-
### 3.1 Drive the inventory's plan, batch by batch
|
|
119
|
-
|
|
120
|
-
**Follow `inventory.plan`, filtered to the scoped ids.** Each batch is one launch: the relaunch target opens a screen, then every in-app target for that screen is flipped while the app sits there - **no relaunch between them**. Driving the plan is what makes full coverage affordable. Activate each target by its `driver.type`, and capture the tap-reachable sub-states (sheets, modals, inline errors) under `<id>#<sub-label>`. Each capture (screenshot + `design_ui_geometry`) goes to `state.designCheck.captured[]`. **Persist `state` and `run-state.json` after every capture**, so a run that dies mid-way resumes from where it stopped. Full procedure (driver table, capture mechanics): `$HOME/.claude/multi-agent-refs/design-check/drive-capture.md`. Read it for Phase 3.1.
|
|
121
|
-
|
|
122
|
-
An unreachable target is recorded immediately as `{ id, reason }` in `state.designCheck.skipped[]` with a concrete reason. "Requires a scenario / prefix / launch-arg" is **not** a reason - it describes the work, which is this phase's job.
|
|
123
|
-
|
|
124
|
-
### 3.2 Match each capture → Figma frame (auto)
|
|
24
|
+
## Scope, requirements, tracker
|
|
125
25
|
|
|
126
|
-
|
|
26
|
+
Before Phase 0, read `$HOME/.claude/multi-agent-refs/design-check/scope-and-ledger.md`: the scope grammar (empty, screen, `screen@variant`, target id, Figma URL, `--resume`), the requirements, the tracker detail and the ledger rules. Whole-module is the default and is meant to finish; scope is for resuming or re-checking, never for trimming. No mock mode and no snapshot capture: halt.
|
|
127
27
|
|
|
128
|
-
|
|
28
|
+
Tracker: `phase-tracker.sh init` + `add` for `0:Init & Gate`, `1:Build & Launch`, `2:Figma`, `3:Drive & Compare`, `4:Report`, plus `TaskCreate` in phase order first (`$HOME/.claude/multi-agent-refs/tracker-contract.md`).
|
|
129
29
|
|
|
130
|
-
|
|
30
|
+
Every Phase 0 / Phase 2 decision is a native `AskUserQuestion` per `picker-contract.md` with a `Step <i>/<n>` breadcrumb; confirm even a single option; never inherit state from a previous run.
|
|
131
31
|
|
|
132
|
-
|
|
32
|
+
## Phase 0 - Init, feasibility gate, inventory
|
|
133
33
|
|
|
134
|
-
|
|
34
|
+
Read `$HOME/.claude/multi-agent-refs/design-check/mcp-currency-gate.md` for step 0 and `$HOME/.claude/multi-agent-refs/design-check/init-inventory.md` for steps 1-9.
|
|
135
35
|
|
|
136
|
-
**
|
|
36
|
+
0. **MCP currency gate** before anything expensive: session stale or disk stale: **HALT** (reconnect, or update the checkout). Never substitute a local `node` call for a missing tool.
|
|
37
|
+
1-3. Repo picker, module picker, platform detect.
|
|
38
|
+
4. **Mock feasibility** (`design_mock_detect`): `false`: offer the **snapshot lane** (`captureLane = "snapshot"`, no in-app flips), declined or not renderable: **HALT** with `reason`, never fabricate a comparison. `"debug-only"`: warn, Continue / Cancel. `true`: persist `state.designCheck.mock`.
|
|
39
|
+
5. **Scenario inventory** (`design_scenario_inventory`) is the target set; persist verbatim. `truncated: true`: say so and pass `coverage.truncatedInventory: true` in Phase 4. `targetCount: 0`: only the default launch state is auditable. List `ignored[]`.
|
|
40
|
+
6-7. Scope resolve, `--resume`; confirm only above `coverage.confirmAbove` relaunches, as a cost estimate, never offering a smaller scope.
|
|
41
|
+
8-9. Report dir now; worktree `{projectRoot}/.worktrees/DC-<shortId>`, never under $HOME.
|
|
137
42
|
|
|
138
|
-
|
|
43
|
+
## Phase 1 - Build & launch
|
|
139
44
|
|
|
140
|
-
|
|
45
|
+
Debug build in the worktree, launch via `design_mock_launch`; Phase 3 relaunches, never rebuilds. Read `$HOME/.claude/multi-agent-refs/design-check/build-launch.md` for Phase 1.
|
|
141
46
|
|
|
142
|
-
|
|
143
|
-
- **skipped** - with a concrete reason recorded in 3.1 / 3.3
|
|
47
|
+
## Phase 2 - Figma mapping
|
|
144
48
|
|
|
145
|
-
|
|
49
|
+
The only Figma discovery; later only a node the user hands over in 3.3. **Ambiguous or unmatched: defer to 3.3, never guess.** Read `$HOME/.claude/multi-agent-refs/design-check/figma-mapping.md` for Phase 2.
|
|
146
50
|
|
|
147
|
-
|
|
51
|
+
## Phase 3 - Drive, capture, match, compare
|
|
148
52
|
|
|
149
|
-
|
|
53
|
+
Iterate `scope.targetIds`; done when every id is resolved, not when taps run out. Before the first compare, read `$HOME/.claude/multi-agent-refs/features/design-conformance.md`.
|
|
150
54
|
|
|
151
|
-
1.
|
|
152
|
-
2.
|
|
153
|
-
3.
|
|
154
|
-
4. **COVERAGE GATE (blocking, not advisory)** - read `coverage` from the tool result and persist it to `state.designCheck.coverage`:
|
|
155
|
-
- `gate: "pass"` → report per-variant PASS/FAIL + findings count + report paths.
|
|
156
|
-
- `gate: "fail"` → the run is **INCOMPLETE**. Print `coverageError`, the `unaccountedIds`, and the exact command that closes the gap: `/multi-agent:design-check --resume`. Do not present an incomplete audit as a finished one, do not bury the miss in a footnote, and never pad the covered list to make the gate pass.
|
|
55
|
+
- **3.1** Drive `inventory.plan` batch by batch; persist `state` and `run-state.json` after every capture. Unreachable: skip with a concrete reason. Read `$HOME/.claude/multi-agent-refs/design-check/drive-capture.md`.
|
|
56
|
+
- **3.2-3.4** Confident matches only; batch-ask everything unmatched ONCE, showing each live screenshot; compare all pairs (`tolerance_px: 2, color_tolerance: 3, max_diff_pct: 1.0`), sheets and modals with region alignment. **Edge insets are defects**: never raise `tolerance_px` to hide one. Read `$HOME/.claude/multi-agent-refs/design-check/compare.md`.
|
|
57
|
+
- **3.5** Every id ends covered or skipped; `covered + skipped` must equal `targetIds` before Phase 4.
|
|
157
58
|
|
|
158
|
-
|
|
159
|
-
5. Remove the worktree unless the user asked to keep the built app. The report dir is never removed.
|
|
59
|
+
## Phase 4 - Report and coverage gate
|
|
160
60
|
|
|
161
|
-
|
|
61
|
+
Use `state.designCheck.reportDir`. Pass ids, not counts; each variant carries `walk` with `didNotConverge` and `notVerified`. Export with `design_report` (Confluence only when enabled). Read `$HOME/.claude/multi-agent-refs/design-check/export.md` for Phase 4.
|
|
162
62
|
|
|
163
|
-
|
|
164
|
-
- **The inventory is the contract**: Phase 0 step 5 decides what "done" means. An audit that visits the linear happy path and lists the rest as "not visited" is the failure mode this pipeline exists to prevent; the gate makes it visible instead of polite.
|
|
165
|
-
- **Chunk with scope, not with silence**: a 50-target module is a legitimate multi-run job. Scope it, finish each run's gate cleanly, and let `--resume` carry the remainder.
|
|
166
|
-
- **"Pixel perfect" is perceptual + geometric**: scale normalized, chrome cropped; findings carry px / pt / hex deltas and a tolerance.
|
|
167
|
-
- The `design_*` engine is project-agnostic; project specifics (mock keys, launch args / targets, node overrides, status-bar crop, coverage floor, Confluence toggle) come from `design-check-config.json` / prefs, never hardcoded.
|
|
63
|
+
**Coverage gate (blocking)**: `pass`: report results and paths. `fail`: the run is **INCOMPLETE**; print `coverageError`, `unaccountedIds` and `/multi-agent:design-check --resume`. Never pad the covered list. Remove the worktree unless asked to keep it; never the report dir.
|
|
@@ -13,15 +13,14 @@ confirm: required
|
|
|
13
13
|
|
|
14
14
|
> **Pickers follow** `$HOME/.claude/multi-agent-refs/picker-contract.md`: never a one-option call, and branch on the option selected, not on its text.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
drafts (`analysis-*`). Most are never cleaned up, so a long-lived machine
|
|
21
|
-
accumulates them. This sweeps the known prefixes only.
|
|
16
|
+
Sweeps run scratch under `/tmp` (known prefixes only), worktree residue,
|
|
17
|
+
offloaded payloads and, with `--abandoned`, stopped runs. Backed by
|
|
18
|
+
`$HOME/.claude/scripts/gc-tmp.sh` and its siblings. Safe by default: it previews
|
|
19
|
+
and deletes nothing until you confirm.
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
What each phase covers, the abandoned-run line kinds and the scope of each
|
|
22
|
+
phase: `$HOME/.claude/multi-agent-refs/garbage-collect/phases.md`. Read it when
|
|
23
|
+
explaining a phase's output.
|
|
25
24
|
|
|
26
25
|
## Steps
|
|
27
26
|
|
|
@@ -63,13 +62,8 @@ deletes nothing until you confirm.
|
|
|
63
62
|
bash $HOME/.claude/scripts/gc-worktrees.sh ${ARGUMENTS}
|
|
64
63
|
```
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
orphan `.worktrees/*` dirs no longer registered as worktrees, gitlink
|
|
69
|
-
residue in the index (`.worktrees/{id}` recorded as a "Subproject commit"
|
|
70
|
-
entry by a pre-guard `git add -A`), and a missing `.worktrees/` line in
|
|
71
|
-
`.git/info/exclude`. Registered, healthy worktrees are NEVER touched -
|
|
72
|
-
those belong to `/multi-agent:resume` / `/multi-agent:kill`.
|
|
65
|
+
Registered, healthy worktrees are NEVER touched - those belong to
|
|
66
|
+
`/multi-agent:resume` / `/multi-agent:kill`.
|
|
73
67
|
|
|
74
68
|
- Output says `nothing to do` -> skip silently, no question.
|
|
75
69
|
- Otherwise surface a second `AskUserQuestion` (in `outputLanguage`):
|
|
@@ -86,13 +80,8 @@ deletes nothing until you confirm.
|
|
|
86
80
|
bash $HOME/.claude/scripts/gc-refs.sh ${ARGUMENTS}
|
|
87
81
|
```
|
|
88
82
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
the worktree; when the run chose a local workspace it lands in the real checkout, and
|
|
92
|
-
because it is gitignored it never shows up in `git status`. Only files
|
|
93
|
-
matching the node-id shape are touched - anything else in that directory is
|
|
94
|
-
left alone, and files inside the grace window are spared so a sweep cannot
|
|
95
|
-
pull a ref out from under a running phase.
|
|
83
|
+
Only node-id-shaped files under `.multi-agent/refs/` are touched, and files
|
|
84
|
+
inside the grace window are spared.
|
|
96
85
|
|
|
97
86
|
- Output says `nothing to do` -> skip silently, no question.
|
|
98
87
|
- Otherwise surface a third `AskUserQuestion` (in `outputLanguage`):
|
|
@@ -112,25 +101,15 @@ deletes nothing until you confirm.
|
|
|
112
101
|
bash $HOME/.claude/scripts/gc-abandoned.sh ${ARGUMENTS}
|
|
113
102
|
```
|
|
114
103
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
104
|
+
The four line kinds (`would remove`, `would stash`, `would mark abandoned`,
|
|
105
|
+
`unattributed`) are not interchangeable; their table is in `phases.md`. An
|
|
106
|
+
`unattributed` worktree is **never removed, whatever the flags**: report the
|
|
107
|
+
list and its size; the user decides.
|
|
119
108
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
| `would remove` / `would remove worktree` | reapable: stopped past its age limit, or finished with its worktree left behind |
|
|
125
|
-
| `would stash` | uncommitted work found - it goes into a stash entry labelled `autopilot/abandoned/<task-id>` (`git stash list`) and the worktree is **kept** |
|
|
126
|
-
| `would mark abandoned` | the state is stale but there is no worktree left to remove |
|
|
127
|
-
| `unattributed` | a worktree with no run state. **Never removed, whatever the flags.** `.worktrees/` is not exclusively ours, and nothing distinguishes a hand-made worktree from a pipeline one whose log was pruned. Report the list and its size; the user decides |
|
|
128
|
-
|
|
129
|
-
Three rules hold with or without `--yes`, and they are why this is safe to
|
|
130
|
-
offer: a run waiting on you (open PR, Phase 4/5, `awaiting_input`) is never
|
|
131
|
-
touched; a path outside `<repo>/.worktrees/` is never removed, which matters
|
|
132
|
-
because four state files on the measured machine record the REPO ROOT as
|
|
133
|
-
their `worktreePath`; and uncommitted work is stashed rather than lost.
|
|
109
|
+
Three rules hold with or without `--yes`: a run waiting on you (open PR,
|
|
110
|
+
Phase 4/5, `awaiting_input`) is never touched; a path outside
|
|
111
|
+
`<repo>/.worktrees/` is never removed; and uncommitted work is stashed rather
|
|
112
|
+
than lost.
|
|
134
113
|
|
|
135
114
|
- Output says `nothing to do` -> skip silently, no question.
|
|
136
115
|
- Otherwise surface a fourth `AskUserQuestion` (in `outputLanguage`):
|
|
@@ -147,11 +126,6 @@ deletes nothing until you confirm.
|
|
|
147
126
|
and `/multi-agent:resume` re-uses them. If a run is paused at
|
|
148
127
|
`awaiting_output_decision`, pass `--older-than=<minutes>` so fresh drafts are
|
|
149
128
|
spared, or finish the run first.
|
|
150
|
-
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
live under `~/.claude/logs/multi-agent/` and are cleaned by
|
|
154
|
-
`/multi-agent:prune-logs`. The per-repo memory stores under
|
|
155
|
-
`~/.claude/memory/multi-agent/` are durable knowledge, not scratch: they are
|
|
156
|
-
removed only by `/multi-agent:uninstall --all-data`, or one entry at a time
|
|
157
|
-
with `learnings-ledger.mjs forget`.
|
|
129
|
+
- Per-task logs (`/multi-agent:prune-logs`) and the per-repo memory stores
|
|
130
|
+
(`/multi-agent:uninstall --all-data`) are never swept here; see `phases.md`,
|
|
131
|
+
"Scope of each phase".
|