@mmerterden/multi-agent-pipeline 14.2.2 → 15.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.
Files changed (132) hide show
  1. package/CHANGELOG.md +186 -6
  2. package/README.md +19 -12
  3. package/README.tr.md +19 -12
  4. package/SECURITY.md +43 -0
  5. package/docs/FIGMA_PIPELINE.md +3 -3
  6. package/docs/adr/0006-skills-core-external-split.md +1 -1
  7. package/docs/adr/0007-multi-tool-adapter-framework.md +1 -1
  8. package/docs/adr/0009-claude-stack-skills-plugin-only.md +31 -0
  9. package/docs/adr/README.md +1 -0
  10. package/docs/architecture.md +13 -13
  11. package/docs/ecosystem.md +31 -31
  12. package/docs/features.md +5 -5
  13. package/index.js +6 -1
  14. package/install/_codex-agents.mjs +11 -2
  15. package/install/_common.mjs +109 -3
  16. package/install/_dev-only-files.mjs +0 -1
  17. package/install/_platform-filter.mjs +54 -113
  18. package/install/_plugin-skills.mjs +36 -36
  19. package/install/claude.mjs +251 -61
  20. package/install/codex.mjs +28 -6
  21. package/install/copilot.mjs +69 -9
  22. package/install/index.mjs +9 -3
  23. package/install/templates/codex-instructions.md +1 -1
  24. package/install/templates/copilot-instructions.md +3 -3
  25. package/package.json +2 -3
  26. package/pipeline/commands/multi-agent/SKILL.md +2 -0
  27. package/pipeline/commands/multi-agent/analysis/SKILL.md +3 -3
  28. package/pipeline/commands/multi-agent/analysis-resolve/SKILL.md +2 -2
  29. package/pipeline/commands/multi-agent/build-optimize/SKILL.md +9 -9
  30. package/pipeline/commands/multi-agent/channels/SKILL.md +1 -1
  31. package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +186 -0
  32. package/pipeline/commands/multi-agent/dev/SKILL.md +1 -1
  33. package/pipeline/commands/multi-agent/dev-autopilot/SKILL.md +1 -1
  34. package/pipeline/commands/multi-agent/dev-local/SKILL.md +1 -1
  35. package/pipeline/commands/multi-agent/dev-local-autopilot/SKILL.md +1 -1
  36. package/pipeline/commands/multi-agent/garbage-collect/SKILL.md +1 -1
  37. package/pipeline/commands/multi-agent/help/SKILL.md +19 -4
  38. package/pipeline/commands/multi-agent/ios-coding-standard/SKILL.md +2 -2
  39. package/pipeline/commands/multi-agent/jira/SKILL.md +1 -1
  40. package/pipeline/commands/multi-agent/prune-prompts/SKILL.md +81 -0
  41. package/pipeline/commands/multi-agent/refactor/SKILL.md +36 -1
  42. package/pipeline/commands/multi-agent/resume/SKILL.md +1 -1
  43. package/pipeline/commands/multi-agent/{ship → resume-local}/SKILL.md +8 -8
  44. package/pipeline/commands/multi-agent/scan/SKILL.md +1 -1
  45. package/pipeline/commands/multi-agent/setup/SKILL.md +5 -5
  46. package/pipeline/commands/multi-agent/stack/SKILL.md +62 -40
  47. package/pipeline/commands/multi-agent/store-ready/SKILL.md +3 -3
  48. package/pipeline/commands/multi-agent/sync/SKILL.md +18 -11
  49. package/pipeline/commands/multi-agent/testflight-validation/SKILL.md +1 -1
  50. package/pipeline/commands/multi-agent/uninstall/SKILL.md +2 -0
  51. package/pipeline/commands/multi-agent/update/SKILL.md +4 -4
  52. package/pipeline/lib/issue-fetcher.sh +1 -1
  53. package/pipeline/lib/parse-complaints.sh +316 -0
  54. package/pipeline/multi-agent-refs/channels/wiki.md +3 -3
  55. package/pipeline/multi-agent-refs/complaint-analysis-template.md +99 -0
  56. package/pipeline/multi-agent-refs/component-dispatch.md +6 -6
  57. package/pipeline/multi-agent-refs/cross-cli-contract.md +16 -16
  58. package/pipeline/multi-agent-refs/features/external-context-injection.md +1 -1
  59. package/pipeline/multi-agent-refs/features/stack-skill-routing.md +5 -5
  60. package/pipeline/multi-agent-refs/generate-issue.md +1 -1
  61. package/pipeline/multi-agent-refs/phases/modes.md +1 -1
  62. package/pipeline/multi-agent-refs/phases/operations.md +7 -1
  63. package/pipeline/multi-agent-refs/phases/phase-0-init.md +1 -1
  64. package/pipeline/multi-agent-refs/phases/phase-1-analysis.md +7 -7
  65. package/pipeline/multi-agent-refs/phases/phase-2-planning.md +5 -5
  66. package/pipeline/multi-agent-refs/phases/phase-3-dev.md +3 -3
  67. package/pipeline/multi-agent-refs/phases/phase-4-review.md +12 -12
  68. package/pipeline/multi-agent-refs/phases/phase-5-test.md +1 -1
  69. package/pipeline/multi-agent-refs/phases/phase-7-report.md +6 -0
  70. package/pipeline/multi-agent-refs/tracker-contract.md +3 -2
  71. package/pipeline/multi-agent-refs/wiki-capture.md +2 -2
  72. package/pipeline/preferences-template.json +18 -5
  73. package/pipeline/rules/figma-pipeline.md +2 -2
  74. package/pipeline/schemas/agent-state.schema.json +1 -1
  75. package/pipeline/schemas/complaint-analysis-spec.schema.json +216 -0
  76. package/pipeline/schemas/migrations/prefs-2.5.0-to-2.6.0.mjs +46 -0
  77. package/pipeline/schemas/prefs.schema.json +296 -66
  78. package/pipeline/schemas/token-budget.json +2 -2
  79. package/pipeline/scripts/README.md +4 -3
  80. package/pipeline/scripts/_stack-routing.mjs +79 -0
  81. package/pipeline/scripts/audit-log-rotate.sh +4 -1
  82. package/pipeline/scripts/build-skills-index.mjs +11 -0
  83. package/pipeline/scripts/build-stack-plugins.mjs +28 -60
  84. package/pipeline/scripts/check-derived-drift.mjs +55 -28
  85. package/pipeline/scripts/gc-worktrees.sh +4 -1
  86. package/pipeline/scripts/gen-skills-index.mjs +1 -1
  87. package/pipeline/scripts/match-skills.mjs +12 -2
  88. package/pipeline/scripts/migrate-prefs.mjs +33 -21
  89. package/pipeline/scripts/phase-tracker.sh +32 -5
  90. package/pipeline/scripts/phase0-exit-gate.mjs +3 -2
  91. package/pipeline/scripts/run-aggregator.mjs +7 -2
  92. package/pipeline/scripts/scan-agent-config.sh +1 -1
  93. package/pipeline/scripts/skill-conformance.mjs +165 -30
  94. package/pipeline/scripts/smoke-cross-cli-behavior.sh +1 -1
  95. package/pipeline/scripts/test-gap-rules/android.json +25 -0
  96. package/pipeline/scripts/test-gap-rules/ios.json +34 -0
  97. package/pipeline/scripts/test-gap-rules/node.json +29 -0
  98. package/pipeline/scripts/test-gap-rules/python.json +25 -0
  99. package/pipeline/scripts/uninstall.mjs +160 -11
  100. package/pipeline/scripts/usage-report.mjs +426 -0
  101. package/pipeline/scripts/validate-complaint-doc.mjs +250 -0
  102. package/pipeline/scripts/validate-reviewer.mjs +9 -3
  103. package/pipeline/skills/.skill-manifest.json +156 -108
  104. package/pipeline/skills/.skills-index.json +449 -12
  105. package/pipeline/skills/shared/README.md +14 -10
  106. package/pipeline/skills/shared/core/multi-agent-analysis-resolve/SKILL.md +1 -1
  107. package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +1 -1
  108. package/pipeline/skills/shared/core/multi-agent-complaint-analysis/SKILL.md +49 -0
  109. package/pipeline/skills/shared/core/multi-agent-dev/SKILL.md +1 -1
  110. package/pipeline/skills/shared/core/multi-agent-dev-autopilot/SKILL.md +1 -1
  111. package/pipeline/skills/shared/core/multi-agent-dev-local/SKILL.md +1 -1
  112. package/pipeline/skills/shared/core/multi-agent-dev-local-autopilot/SKILL.md +1 -1
  113. package/pipeline/skills/shared/core/multi-agent-ios-coding-standard/SKILL.md +2 -2
  114. package/pipeline/skills/shared/core/multi-agent-prune-prompts/SKILL.md +83 -0
  115. package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +153 -90
  116. package/pipeline/skills/shared/core/{multi-agent-ship → multi-agent-resume-local}/SKILL.md +6 -6
  117. package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +89 -22
  118. package/pipeline/skills/shared/core/multi-agent-store-ready/SKILL.md +1 -1
  119. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +8 -8
  120. package/pipeline/skills/shared/core/multi-agent-testflight-validation/SKILL.md +1 -1
  121. package/pipeline/skills/shared/core/multi-agent-update/SKILL.md +1 -1
  122. package/pipeline/skills/shared/external/ios-coding-standard/modules/_TEMPLATE.yml +2 -2
  123. package/pipeline/skills/shared/external/ios-coding-standard/references/rules.yml +368 -33
  124. package/pipeline/skills/shared/external/ios-coding-standard/references/swiftlint.draft.yml +1 -2
  125. package/pipeline/skills/shared/external/ios-coding-standard/scripts/check_structure.py +765 -0
  126. package/pipeline/skills/shared/external/ios-module-structure/SKILL.md +75 -0
  127. package/pipeline/skills/shared/external/ios-module-structure/modules/_TEMPLATE.yml +131 -0
  128. package/pipeline/skills/shared/external/ios-module-structure/references/rules.yml +559 -0
  129. package/pipeline/skills/shared/external/ios-module-structure/scripts/check_structure.py +765 -0
  130. package/pipeline/skills/shared/external/localization-reuse-map/example-mapping.json +53 -10
  131. package/pipeline/skills/shared/external/localization-reuse-map/reference/sources-and-recipes.md +4 -3
  132. package/pipeline/skills/skills-index.md +7 -4
@@ -2,24 +2,24 @@
2
2
 
3
3
  Single source of truth for skills delivered to both Claude Code (`~/.claude/skills/`) and Copilot CLI (`~/.copilot/skills/`) by the installer.
4
4
 
5
- **Total:** 201 skills (52 core + 149 external). Auto-generated by `scripts/gen-skills-index.mjs` - do not edit by hand.
5
+ **Total:** 205 skills (54 core + 151 external). Auto-generated by `scripts/gen-skills-index.mjs` - do not edit by hand.
6
6
 
7
7
  ## Directory layout
8
8
 
9
- - **`core/`** - 52 `multi-agent*` orchestration skills that are pipeline-critical. Edits here are core-code changes.
10
- - **`external/`** - 149 iOS / Android / generic skills imported from the upstream skill library. Mirrors of third-party guidance.
11
- - Install destination stays flat: both trees flatten into `~/.claude/skills/` and `~/.copilot/skills/`. See ADR-0006 for the rationale.
9
+ - **`core/`** - 54 `multi-agent*` orchestration skills that are pipeline-critical. Edits here are core-code changes.
10
+ - **`external/`** - 151 iOS / Android / generic skills imported from the upstream skill library. Mirrors of third-party guidance.
11
+ - Install destinations (ADR-0009): Claude Code gets NO local copy of `external/` - it loads those skills from the `multi-agent-plugins` marketplace, namespaced (`ai-<stack>-toolkit:<name>`); only the two compliance catalogs from `core/` land in `~/.claude/skills/`. Copilot CLI and Codex CLI receive a flat copy filtered to the enabled stacks. `external/` remains the single authoring source that `build-stack-plugins.mjs` publishes from.
12
12
 
13
13
  Source layout is logical grouping only - skill discovery at runtime is unchanged.
14
14
 
15
15
  ## Categories
16
16
 
17
- - [Pipeline Orchestration](#pipeline-orchestration) - 52
18
- - [iOS / Apple Ecosystem](#ios-apple-ecosystem) - 89
17
+ - [Pipeline Orchestration](#pipeline-orchestration) - 54
18
+ - [iOS / Apple Ecosystem](#ios-apple-ecosystem) - 90
19
19
  - [Android / Kotlin](#android-kotlin) - 13
20
20
  - [Web / Frontend](#web-frontend) - 10
21
21
  - [Backend / API](#backend-api) - 11
22
- - [Cross-cutting](#cross-cutting) - 26
22
+ - [Cross-cutting](#cross-cutting) - 27
23
23
 
24
24
  ## Pipeline Orchestration
25
25
 
@@ -29,10 +29,11 @@ Source layout is logical grouping only - skill discovery at runtime is unchang
29
29
  | [`google-play-compliance`](./core/google-play-compliance/) | `core` | Google Play Store publication compliance - bundletool + aapt2 + apksigner orchestration + 21-rule policy catalog with Play Console error c |
30
30
  | [`multi-agent`](./core/multi-agent/) | `core` | Task orchestrator: runs the full pipeline from a Jira ID or GitHub Issue URL - analysis → plan → TDD development → parallel review (Fable |
31
31
  | [`multi-agent-analysis`](./core/multi-agent-analysis/) | `core` | Standalone feature-spec analysis (v3 template). Platform-agnostic concept layer with repo-driven convention extraction and per-platform Pass |
32
- | [`multi-agent-analysis-resolve`](./core/multi-agent-analysis-resolve/) | `core` | Resolve the Section 20 Risks and Open Questions of an analysis v3 document one row at a time. Proposes up to 3 source-labeled answer candida |
32
+ | [`multi-agent-analysis-resolve`](./core/multi-agent-analysis-resolve/) | `core` | Resolve the Section 20 Risks and Open Questions of an analysis v3 document one row at a time: up to 3 source-labeled answer candidates per r |
33
33
  | [`multi-agent-autopilot`](./core/multi-agent-autopilot/) | `core` | Launch any task in autopilot mode: skips every confirmation, runs end-to-end autonomously. Use when a task should run end to end with no con |
34
34
  | [`multi-agent-build-optimize`](./core/multi-agent-build-optimize/) | `core` | Wrapper that dispatches to xcode-build-orchestrator on iOS repos. Benchmarks the current Xcode build, runs compilation / project / SPM analy |
35
35
  | [`multi-agent-channels`](./core/multi-agent-channels/) | `core` | Multi-channel reporter - Jira/Confluence/Wiki/PR description. Multi-select channels + content, humanizer pass, reviewer-preserving Bitbuck |
36
+ | [`multi-agent-complaint-analysis`](./core/multi-agent-complaint-analysis/) | `core` | Customer-complaint triage. Ingests complaints (paste, csv/xlsx/txt/json file, Jira issue, Confluence URL), fetches Graylog evidence per trx/ |
36
37
  | [`multi-agent-create-jira`](./core/multi-agent-create-jira/) | `core` | Create a standards-compliant Jira issue (Task / Bug / Story): asks the type, mines project conventions, drafts from a standard template with |
37
38
  | [`multi-agent-design-check`](./core/multi-agent-design-check/) | `core` | Mock-mode vs Figma design audit (iOS / Android, local-only). Pick repo + module, gate on mock support, enumerate every state driver into a c |
38
39
  | [`multi-agent-dev`](./core/multi-agent-dev/) | `core` | Fast development mode: Init → Dev (Opus) → Review → Test → Commit → Report. Analysis and planning are skipped, review is not. Use when the w |
@@ -53,9 +54,11 @@ Source layout is logical grouping only - skill discovery at runtime is unchang
53
54
  | [`multi-agent-log`](./core/multi-agent-log/) | `core` | Show the agent-log.md for the given task. With no ID, shows the most recent task. Use when asked what a task did, or to read its log. |
54
55
  | [`multi-agent-manual-test`](./core/multi-agent-manual-test/) | `core` | Switch to the active task's branch and prepare it for manual testing in Xcode. Phase 5 standalone (the UI Bug Hunter lives at multi-agent-te |
55
56
  | [`multi-agent-prune-logs`](./core/multi-agent-prune-logs/) | `core` | Delete per-task project logs under ~/.claude/logs/multi-agent (filter by age/project/task). Audit trail + metrics are preserved. Dry-run fir |
57
+ | [`multi-agent-prune-prompts`](./core/multi-agent-prune-prompts/) | `core` | Zero-base prompt review: measure the always-on instruction footprint, classify every rule block, propose keep/trial-removal/delete; applies |
56
58
  | [`multi-agent-purge`](./core/multi-agent-purge/) | `core` | ⚠️ Wipes every worktree, branch, log, and state file. Irreversible; asks for double confirmation. Use when every worktree, branch, log and s |
57
59
  | [`multi-agent-refactor`](./core/multi-agent-refactor/) | `core` | Analyse the project: extract adapted best-practices, hunt real bugs + improvement areas, check upstream drift of derived skills, research th |
58
60
  | [`multi-agent-resume`](./core/multi-agent-resume/) | `core` | Resume a stopped or failed task from the phase where it left off. Use when a task stopped or failed and should carry on from where it left o |
61
+ | [`multi-agent-resume-local`](./core/multi-agent-resume-local/) | `core` | Continue already-done LOCAL work through the pipeline tail: Review → Build+Test → Commit/PR → Report (technical analysis + Jira test-scenari |
59
62
  | [`multi-agent-review`](./core/multi-agent-review/) | `core` | Run parallel review on a branch diff or a Pull Request: 2 models on Claude Code (Fable + Sonnet), 3 models on Copilot CLI (GPT + Opus + Sonn |
60
63
  | [`multi-agent-review-issue`](./core/multi-agent-review-issue/) | `core` | Assess whether a GitHub issue is ready for multi-agent development: fetch it, grade scope / acceptance criteria / repro / design / API / sta |
61
64
  | [`multi-agent-review-jira`](./core/multi-agent-review-jira/) | `core` | Assess whether a Jira issue is ready for multi-agent development: fetch it, grade scope / acceptance criteria / repro / design / API / stack |
@@ -64,8 +67,7 @@ Source layout is logical grouping only - skill discovery at runtime is unchang
64
67
  | [`multi-agent-scan`](./core/multi-agent-scan/) | `core` | Skill security scan: walks local skill directories against a tiered pattern catalog. Use when local skill directories need checking for unsa |
65
68
  | [`multi-agent-search`](./core/multi-agent-search/) | `core` | Log search across every agent-log.md with smart ranking and filters. Optional --semantic flag queries the per-repo triage corpus. Use when s |
66
69
  | [`multi-agent-setup`](./core/multi-agent-setup/) | `core` | First-run setup wizard: keychain token discovery, Git Identity onboarding, and pipeline preparation. Use when the pipeline is being set up f |
67
- | [`multi-agent-ship`](./core/multi-agent-ship/) | `core` | Continue already-done LOCAL work through the pipeline tail: Review → Build+Test → Commit/PR → Report (technical analysis + Jira test-scenari |
68
- | [`multi-agent-stack`](./core/multi-agent-stack/) | `core` | Select the active stack for this repo by enabling the matching marketplace plugin(s) in .claude/settings.json (ios/android/mobile/backend/fr |
70
+ | [`multi-agent-stack`](./core/multi-agent-stack/) | `core` | Select the active stack(s) for this repo by enabling the matching marketplace plugin(s) in .claude/settings.json. Multi-select: pass several |
69
71
  | [`multi-agent-status`](./core/multi-agent-status/) | `core` | Show every multi-agent task's ID, phase, branch, and status. Use when asked what is running, or for an overview of every task. |
70
72
  | [`multi-agent-store-ready`](./core/multi-agent-store-ready/) | `core` | Pre-submission store readiness for a built package, iOS and Android, local-only. Three symmetric gates per platform: a static package audit, |
71
73
  | [`multi-agent-sync`](./core/multi-agent-sync/) | `core` | One-shot sync of the entire multi-agent ecosystem: Claude Code, Copilot CLI, pipeline repo, website, and the dev-toolkit MCP server. Use whe |
@@ -119,6 +121,7 @@ Source layout is logical grouping only - skill discovery at runtime is unchang
119
121
  | [`ios-debugger-agent`](./external/ios-debugger-agent/) | `external` | Debug the current iOS project on a booted simulator with XcodeBuildMCP. Use when an iOS bug has to be reproduced and diagnosed on a booted s |
120
122
  | [`ios-developer`](./external/ios-developer/) | `external` | Develop native iOS applications with Swift/SwiftUI. Masters iOS 18, SwiftUI, UIKit integration, Core Data, networking, and App Store optimiz |
121
123
  | [`ios-localization`](./external/ios-localization/) | `external` | Implement, review, or improve localization and internationalization in iOS/macOS apps - String Catalogs (.xcstrings), generated localizabl |
124
+ | [`ios-module-structure`](./external/ios-module-structure/) | `external` | The ios-module-structure rule registry: stable-ID rules over where a declaration lives, what its file is called and what its folder must con |
122
125
  | [`ios-networking`](./external/ios-networking/) | `external` | Build, review, or improve networking code in iOS/macOS apps using URLSession with async/await, structured concurrency, and modern Swift patt |
123
126
  | [`ios-security`](./external/ios-security/) | `external` | Secure iOS apps with Keychain Services, CryptoKit encryption, biometric authentication (Face ID, Touch ID), Secure Enclave key storage, LACo |
124
127
  | [`ios-simulator`](./external/ios-simulator/) | `external` | Manages iOS Simulator devices and tests app behaviour with xcrun simctl: device lifecycle, app install and launch, push notification and loc |
@@ -242,6 +245,7 @@ Source layout is logical grouping only - skill discovery at runtime is unchang
242
245
  | [`github-actions-templates`](./external/github-actions-templates/) | `external` | Production-ready GitHub Actions workflow patterns for testing, building, and deploying applications. Use when a GitHub Actions workflow has |
243
246
  | [`help-skills`](./external/help-skills/) | `external` | Mevcut tum iOS/Swift skill'lerini listeler ve ne ise yaradiklarini aciklar. Use when asked which iOS or Swift skills are available and what |
244
247
  | [`humanizer`](./external/humanizer/) | `external` | \| |
248
+ | [`localization-reuse-map`](./external/localization-reuse-map/) | `external` | >- |
245
249
  | [`pdfkit`](./external/pdfkit/) | `external` | Display and manipulate PDF documents using PDFKit. Use when embedding PDFView to show PDF files, creating or modifying PDFDocument instances |
246
250
  | [`search-first`](./external/search-first/) | `external` | \| |
247
251
  | [`skill-creator`](./external/skill-creator/) | `external` | Author and refine skills for a plugin/toolkit efficiently. Use when creating a new skill, trimming or splitting an existing one, writing a s |
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: multi-agent-analysis-resolve
3
3
  language: en
4
- description: "Resolve the Section 20 Risks and Open Questions of an analysis v3 document one row at a time. Proposes up to 3 source-labeled answer candidates per row (from evidence / from repo / AI reasoned), merges the chosen answer into the target body section, and updates the doc in place with a changelog bump. Companion to multi-agent-analysis. Use when an analysis document's open questions and risks need answering row by row before development starts."
4
+ description: "Resolve the Section 20 Risks and Open Questions of an analysis v3 document one row at a time: up to 3 source-labeled answer candidates per row (evidence / repo / AI reasoned), chosen answer merged into the target section, doc updated in place with a changelog bump. Same locked decisions as /multi-agent:analysis. Use when an analysis document's open questions need answering before development starts."
5
5
  user-invocable: true
6
6
  argument-hint: "[path/to/analysis/<feature>-<platform>.md] [--autonomous]"
7
7
  ---
@@ -39,7 +39,7 @@ Thin wrapper around the vendored `xcode-build-orchestrator` skill so iOS users d
39
39
  ## Detailed implementation
40
40
 
41
41
  Full steps: `$HOME/.claude/commands/multi-agent/build-optimize/SKILL.md`.
42
- Upstream attribution: `$HOME/.claude/skills/NOTICE-xcode-build-skills.md`.
42
+ Upstream attribution: ai-ios-toolkit plugin NOTICE (xcode build skills).
43
43
 
44
44
  ## Notes
45
45
 
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: multi-agent-complaint-analysis
3
+ language: en
4
+ description: "Customer-complaint triage. Ingests complaints (paste, csv/xlsx/txt/json file, Jira issue, Confluence URL), fetches Graylog evidence per trx/conversation id, correlates read-only against the selected client + BFF repos; per complaint: client/bff root cause + fix plan + dev prompt, or core routing recommendation, or insufficient-evidence. Report only, no dev chaining. Use when customer-reported errors need layer triage."
5
+ user-invocable: true
6
+ argument-hint: "[\"<run-name>\"] [--file <path>] [<jira-id | jira-url | confluence-url> ...]"
7
+ ---
8
+
9
+ # multi-agent-complaint-analysis - Customer Complaint Triage
10
+
11
+ **Input**: $ARGUMENTS (optional run name, optional `--file <path>`, optional Jira ids / Confluence URLs; remaining free text = pasted complaints)
12
+
13
+ Triage of customer-reported errors across the layers the team owns. Per complaint: Graylog evidence by trx/conversation id, read-only repo correlation, and a verdict. Core failures get a routing recommendation to the backend core team, never a fix analysis. **Independent and read-only**: no branches, worktrees, commits, PRs, or dev chaining - the run ends at the report.
14
+
15
+ ## When to use
16
+
17
+ - A batch of customer complaints / store reviews / support tickets needs to be mapped to responsible layers (ios / android / web / mobile-bff / web-bff vs backend core)
18
+ - Production error reports carry trxId / conversationId values worth pulling from Graylog
19
+ - The team needs a forwardable routing record for core-side failures
20
+
21
+ ## Key rules
22
+
23
+ - Graylog is the primary evidence in this command (deliberate departure from the dev pipeline's advisory-only rule); a failed fetch degrades that complaint to `insufficient-evidence`, never halts the run.
24
+ - Ids are never guessed: complaints without trx/conv ids trigger a supply-or-skip prompt.
25
+ - Complaint text is redacted at intake (email / phone / card / national-id / PNR shapes); raw PII never reaches state or any output.
26
+ - Core is a residual classification, not a repo: no core-repo grepping, no fix speculation.
27
+ - Client/bff verdicts carry a development handoff: a fix plan referencing the existing architecture (`file:line` reuse-first steps) plus a fenced English dev prompt ready for the dev pipeline or a Jira description. The command still never runs dev itself.
28
+ - Output default is Local file; Confluence / Jira are posted only on request. Never closes or transitions issues.
29
+
30
+ ## Flow
31
+
32
+ | Phase | Action |
33
+ |---|---|
34
+ | 0. Intake | Run name + account picker + repo multi-select + layer-tag confirmation + multi-source complaint ingestion (`lib/parse-complaints.sh`) + id confirmation loop |
35
+ | 1. Graylog | Per-complaint `lib/fetch-graylog.sh --trx/--conv`; credential/host failure degrades and continues |
36
+ | 2. Correlate | Extract signals (endpoints, error codes, exceptions, source services) from Graylog hits; read-only grep across selected repos |
37
+ | 3. Triage | Verdict per complaint: `client:<layer>` / `bff:<layer>` (citations + fix plan grounded in the existing architecture + ready-to-run dev prompt) or `core` (routing recommendation) or `insufficient-evidence` |
38
+ | 4. Draft | Render 8-section report, humanizer pass, punctuation gate |
39
+ | 4.5 Output picker | Local file (default) / Confluence page / Jira comment (asked only after the draft exists) |
40
+ | 5. Dispatch | `validate-complaint-doc.mjs` gate, write/post, verdict-count summary. **Stop.** |
41
+
42
+ Pickers route through `lib/ask-choice.sh` per the picker contract.
43
+
44
+ ## Detailed implementation
45
+
46
+ Full steps: the Claude-side command doc for `complaint-analysis` (same phase structure and locked decisions).
47
+ Report template: `complaint-analysis-template.md` (8 sections; routing section required per core verdict).
48
+ State schema: `schemas/complaint-analysis-spec.schema.json`.
49
+ Report gate: `scripts/validate-complaint-doc.mjs` (front-matter, sections, verdict tokens, routing entries, punctuation, redaction-leak scan).
@@ -70,4 +70,4 @@ Before writing anything outward-facing - PR body, Jira comment, Confluence pag
70
70
 
71
71
  ## Intake warnings (`--dev` family)
72
72
 
73
- Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:ship`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
73
+ Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:resume-local`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
@@ -62,4 +62,4 @@ Before writing anything outward-facing - PR body, Jira comment, Confluence pag
62
62
 
63
63
  ## Intake warnings (`--dev` family)
64
64
 
65
- Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:ship`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
65
+ Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:resume-local`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
@@ -42,4 +42,4 @@ Before writing anything outward-facing - PR body, Jira comment, Confluence pag
42
42
 
43
43
  ## Intake warnings (`--dev` family)
44
44
 
45
- Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:ship`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
45
+ Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:resume-local`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
@@ -48,4 +48,4 @@ Before writing anything outward-facing - PR body, Jira comment, Confluence pag
48
48
 
49
49
  ## Intake warnings (`--dev` family)
50
50
 
51
- Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:ship`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
51
+ Two checks belong at the top of every `--dev` run and are specified once in `$HOME/.claude/multi-agent-refs/phases/modes.md` "Intake warnings shared by the whole `--dev` family": an analysis document supplied to a mode that skips Analysis and Planning, and a branch that already carries the work (which wants `/multi-agent:resume-local`, not a second Dev pass). Read that section rather than reasoning about it from scratch.
@@ -10,9 +10,9 @@ argument-hint: "[module name or path]"
10
10
 
11
11
  **Input**: $ARGUMENTS - optionally a module name or path. When absent, Phase 1 discovers and asks.
12
12
 
13
- This routine is the **procedure**. The rules live in the `ios-coding-standard` skill, whose registry is
13
+ This routine is the **procedure**. The rules live in the `ai-ios-toolkit:ios-coding-standard` skill, whose registry is
14
14
  `references/rules.yml` and whose teaching doc is `references/STANDARD.md`. Load that
15
- skill first; it is installed on every host and carried by the iOS stack plugin, so
15
+ skill first; Claude Code loads it from the iOS stack plugin, Copilot/Codex from their local copy, so
16
16
  there is one registry rather than a copy per CLI. Never restate a rule here - cite its ID. A rule that is not in the
17
17
  registry is not a rule; if the audit needs one, propose it as `status: proposed` and say so.
18
18
 
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: multi-agent-prune-prompts
3
+ language: en
4
+ description: "Zero-base prompt review: measure the always-on instruction footprint, classify every rule block, propose keep/trial-removal/delete; applies only approved rows. Use when a new model ships or instructions have accumulated."
5
+ user-invocable: true
6
+ argument-hint: "[--report-only]"
7
+ ---
8
+
9
+ # multi-agent prune-prompts - Zero-Base Prompt Review
10
+
11
+ Instruction files only grow. Every rule was added because some model once got
12
+ something wrong, and nobody deletes a rule once a workaround ships. A newer
13
+ model needs fewer of them; the ones it no longer needs are pure context tax on
14
+ every session, and stale rules actively mislead.
15
+
16
+ The discipline this command applies (after Boris Cherny's advice): on a model
17
+ upgrade, assume ZERO instructions are needed, and let each line earn its way
18
+ back. A line earns its way back only after the model gets the same thing wrong
19
+ repeatedly (three strikes) WITHOUT it. Instructions are a cache of past model
20
+ failures; a new model invalidates that cache.
21
+
22
+ ## Flow
23
+
24
+ ### 1. MEASURE - the always-on footprint
25
+
26
+ Estimate tokens (chars/4) for each layer the model carries into every session:
27
+
28
+ ```bash
29
+ wc -c "$HOME/.claude/CLAUDE.md" 2>/dev/null
30
+ wc -c "$HOME"/.claude/rules/*.md 2>/dev/null
31
+ find "$PWD" -maxdepth 2 -name "CLAUDE.md" -exec wc -c {} + 2>/dev/null
32
+ ```
33
+
34
+ Report a table: layer, file, estimated tokens, share of total. Flag any single
35
+ file above ~2,000 estimated tokens.
36
+
37
+ ### 2. CLASSIFY - what kind of line is each rule
38
+
39
+ Walk CLAUDE.md + each rules/ file section by section. Classify every
40
+ instruction block:
41
+
42
+ | Class | Meaning | Default verdict |
43
+ |---|---|---|
44
+ | **Constraint** | Facts the model cannot infer (hosts, key names, branch formats, team conventions) | keep |
45
+ | **Failure patch** | "Never do X" added after a model did X | trial removal - the current model may not need it |
46
+ | **Restatement** | Something the model does correctly anyway (write tests, guard early) | delete |
47
+ | **Stale** | References files, commands or workflows that no longer exist | delete |
48
+
49
+ For failure patches, note WHEN the patch was added if git history shows it -
50
+ a patch older than the current model's release is the strongest removal
51
+ candidate.
52
+
53
+ ### 3. REPORT - the zero-base proposal
54
+
55
+ One table, every block accounted for: file, section, class, verdict
56
+ (keep / trial-removal / delete), and the one-line reason. Never a sample -
57
+ if a section is not in the table, the review did not happen.
58
+
59
+ With `--report-only`, stop here.
60
+
61
+ ### 4. APPLY - only what the user approves
62
+
63
+ Present the table, ask which verdicts to apply (all deletes / all
64
+ trial-removals too / pick rows). For approved rows, edit the files. Trial
65
+ removals move the block into `~/.claude/rules/.pruned/<file>.md` with a
66
+ dated header rather than deleting outright, so a strike-out can be reverted
67
+ by moving the block back.
68
+
69
+ ### 5. THE THREE-STRIKE RULE going forward
70
+
71
+ After a prune, when the model gets something wrong that a removed rule used
72
+ to cover, do NOT restore it on the first miss. Record the miss (the
73
+ `.pruned/` file has a `strikes:` line per block). Restore the line only on
74
+ the third occurrence of the SAME failure. One line back at a time - never
75
+ the whole file.
76
+
77
+ ## Boundaries
78
+
79
+ - Never touches skill bodies or command files - those load on demand and are
80
+ not part of the always-on footprint. The lint gate (`lint-skills.mjs`)
81
+ owns their budgets.
82
+ - Never touches `multi-agent-preferences.json` or anything under `logs/`.
83
+ - Applies nothing without explicit approval on the report table.