@mmerterden/multi-agent-pipeline 23.6.0 → 24.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -1
- package/README.md +61 -27
- package/README.tr.md +46 -12
- package/SECURITY.md +3 -3
- package/docs/architecture.md +47 -8
- package/docs/ecosystem.md +20 -18
- package/docs/engineering.md +1 -1
- package/docs/facts.json +8 -6
- package/docs/features.md +59 -15
- package/install/_codex-agents.mjs +13 -8
- package/install/_common.mjs +24 -0
- package/install/_dev-only-files.mjs +4 -0
- package/install/_mcp-register.mjs +6 -2
- package/install/_rewrite-tree.mjs +197 -0
- package/install/codex.mjs +96 -180
- package/install/copilot.mjs +24 -54
- package/install/index.mjs +29 -11
- package/install/templates/codex-instructions.md +21 -5
- package/install/templates/copilot-instructions.md +21 -14
- package/manifest.json +2082 -0
- package/package.json +6 -2
- package/pipeline/commands/multi-agent/SKILL.md +7 -5
- package/pipeline/commands/multi-agent/analysis/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +31 -3
- package/pipeline/commands/multi-agent/autopilot-status/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/channels/SKILL.md +16 -8
- package/pipeline/commands/multi-agent/log/SKILL.md +2 -0
- package/pipeline/commands/multi-agent/resume/SKILL.md +2 -0
- package/pipeline/commands/multi-agent/review-rounds/SKILL.md +94 -0
- package/pipeline/commands/multi-agent/stack/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/sync/SKILL.md +3 -3
- package/pipeline/contract/manifest.json +1 -1
- package/pipeline/contract/types/index.d.ts +1 -0
- package/pipeline/lib/_jira-auth.sh +50 -78
- package/pipeline/lib/_service-account.sh +191 -0
- package/pipeline/lib/credential-inventory.sh +49 -37
- package/pipeline/lib/credential-store.sh +48 -3
- package/pipeline/lib/fetch-confluence.sh +76 -92
- package/pipeline/lib/fetch-crashlytics.sh +30 -59
- package/pipeline/lib/fetch-figma-annotations.sh +9 -9
- package/pipeline/lib/fetch-fortify.sh +77 -81
- package/pipeline/lib/fetch-graylog.sh +38 -77
- package/pipeline/lib/figma-mcp-refresh.sh +23 -4
- package/pipeline/lib/figma-screenshot.sh +7 -8
- package/pipeline/lib/figma-token.sh +39 -46
- package/pipeline/lib/host.mjs +138 -0
- package/pipeline/lib/host.sh +48 -0
- package/pipeline/lib/issue-fetcher.sh +25 -41
- package/pipeline/lib/jira-publish.sh +23 -21
- package/pipeline/lib/local-model.mjs +93 -0
- package/pipeline/lib/md2confluence-v3.py +37 -30
- package/pipeline/lib/model-dispatch.sh +41 -4
- package/pipeline/lib/model-resolve.mjs +58 -0
- package/pipeline/lib/post-pr-review.sh +38 -53
- package/pipeline/lib/reviewer-families.mjs +70 -0
- package/pipeline/lib/service-account.mjs +2131 -0
- package/pipeline/lib/service-account.sh +35 -0
- package/pipeline/lib/usage-names.generated.mjs +3 -0
- package/pipeline/lib/usage-token.mjs +64 -24
- package/pipeline/lib/usage-vocab.mjs +1 -1
- package/pipeline/lib/user-facing.mjs +11 -3
- package/pipeline/lib/vercel-deploy.sh +17 -26
- package/pipeline/multi-agent-refs/_entry-picker.md +62 -0
- package/pipeline/multi-agent-refs/_input-parser.md +1 -1
- package/pipeline/multi-agent-refs/analysis/intake.md +2 -0
- package/pipeline/multi-agent-refs/analysis/reusable-refs.md +1 -0
- package/pipeline/multi-agent-refs/analysis/unattended.md +135 -0
- package/pipeline/multi-agent-refs/autopilot-on/details.md +16 -0
- package/pipeline/multi-agent-refs/channels/generator.md +10 -2
- package/pipeline/multi-agent-refs/channels/menu.md +3 -1
- package/pipeline/multi-agent-refs/channels/preview.md +3 -1
- package/pipeline/multi-agent-refs/channels/reference.md +16 -2
- package/pipeline/multi-agent-refs/channels/report-file.md +188 -0
- package/pipeline/multi-agent-refs/component-dispatch.md +2 -2
- package/pipeline/multi-agent-refs/cross-cli-contract.md +38 -30
- package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +4 -4
- package/pipeline/multi-agent-refs/features/doctor.md +37 -11
- package/pipeline/multi-agent-refs/features/free-models.md +3 -3
- package/pipeline/multi-agent-refs/features/local-model.md +87 -0
- package/pipeline/multi-agent-refs/features/model-fallback.md +25 -10
- package/pipeline/multi-agent-refs/features/product-context.md +6 -5
- package/pipeline/multi-agent-refs/features/review-delta.md +1 -1
- package/pipeline/multi-agent-refs/features/review-rounds.md +40 -0
- package/pipeline/multi-agent-refs/features/rework-escalation.md +5 -4
- package/pipeline/multi-agent-refs/features/service-accounts.md +233 -0
- package/pipeline/multi-agent-refs/features/unattended-security.md +10 -1
- package/pipeline/multi-agent-refs/help/en.md +31 -2
- package/pipeline/multi-agent-refs/help/tr.md +31 -2
- package/pipeline/multi-agent-refs/orchestrator/copilot-pipeline.md +3 -2
- package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +2 -1
- package/pipeline/multi-agent-refs/phases/modes.md +20 -1
- package/pipeline/multi-agent-refs/phases/operations.md +1 -1
- package/pipeline/multi-agent-refs/phases/phase-0-init.md +1 -1
- package/pipeline/multi-agent-refs/phases/phase-2-dev.md +4 -4
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +7 -3
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +12 -10
- package/pipeline/multi-agent-refs/phases.md +4 -3
- package/pipeline/multi-agent-refs/resume/details.md +2 -0
- package/pipeline/multi-agent-refs/review/panel.md +30 -18
- package/pipeline/multi-agent-refs/setup/discovery.md +17 -5
- package/pipeline/multi-agent-refs/setup/token-save-flow.md +21 -2
- package/pipeline/multi-agent-refs/sync/overview.md +11 -5
- package/pipeline/multi-agent-refs/tracker-contract.md +28 -10
- package/pipeline/office/index.html +4 -4
- package/pipeline/schemas/agent-state.schema.json +19 -1
- package/pipeline/schemas/autopilot-config.schema.json +29 -4
- package/pipeline/schemas/hosts.json +512 -0
- package/pipeline/schemas/hosts.schema.json +310 -0
- package/pipeline/schemas/launch.json +22 -2
- package/pipeline/schemas/launch.schema.json +2 -1
- package/pipeline/schemas/phases.json +21 -3
- package/pipeline/schemas/phases.schema.json +8 -0
- package/pipeline/schemas/prefs.schema.json +346 -7
- package/pipeline/schemas/token-budget.json +2 -2
- package/pipeline/scripts/.doctor-mut.47076.mjs +2253 -0
- package/pipeline/scripts/_autopilot-config.mjs +67 -4
- package/pipeline/scripts/_autopilot-item.mjs +67 -0
- package/pipeline/scripts/_autopilot-outcomes.mjs +6 -0
- package/pipeline/scripts/_cost.mjs +75 -3
- package/pipeline/scripts/analysis-sources.mjs +22 -5
- package/pipeline/scripts/analysis-unattended.mjs +360 -0
- package/pipeline/scripts/anonymize-findings.mjs +3 -7
- package/pipeline/scripts/autopilot-arming.mjs +19 -10
- package/pipeline/scripts/autopilot-intake.mjs +124 -27
- package/pipeline/scripts/autopilot-menubar.swift +7 -0
- package/pipeline/scripts/autopilot-runner.mjs +77 -48
- package/pipeline/scripts/autopilot-status.sh +32 -9
- package/pipeline/scripts/bulk-read.sh +37 -5
- package/pipeline/scripts/confluence-readback.mjs +15 -7
- package/pipeline/scripts/cost-table.json +65 -25
- package/pipeline/scripts/doctor.mjs +119 -32
- package/pipeline/scripts/entry-mode.mjs +101 -0
- package/pipeline/scripts/estimate.mjs +30 -16
- package/pipeline/scripts/feedback-send.mjs +11 -8
- package/pipeline/scripts/gen-facts.mjs +16 -13
- package/pipeline/scripts/jira-attach.sh +23 -28
- package/pipeline/scripts/jira-search.sh +5 -21
- package/pipeline/scripts/launch-request.mjs +15 -9
- package/pipeline/scripts/migrate-prefs.mjs +56 -0
- package/pipeline/scripts/phase-tracker.sh +146 -38
- package/pipeline/scripts/priority-review.mjs +14 -7
- package/pipeline/scripts/product-context.mjs +26 -7
- package/pipeline/scripts/prune-logs.sh +4 -2
- package/pipeline/scripts/report-file.mjs +285 -0
- package/pipeline/scripts/review-rounds.mjs +592 -0
- package/pipeline/scripts/rework-escalation.mjs +26 -7
- package/pipeline/scripts/service-read.mjs +19 -17
- package/pipeline/scripts/skill-siblings.mjs +17 -1
- package/pipeline/scripts/status-overview.mjs +20 -10
- package/pipeline/scripts/uninstall.mjs +145 -57
- package/pipeline/scripts/usage-register.mjs +34 -11
- package/pipeline/scripts/usage-report.mjs +31 -26
- package/pipeline/scripts/validate-state.mjs +19 -11
- package/pipeline/scripts/validate-triage.mjs +11 -1
- package/pipeline/scripts/work-items.mjs +25 -28
- package/pipeline/scripts/write-store-config.mjs +37 -11
- package/pipeline/skills/.skill-manifest.json +11 -7
- package/pipeline/skills/.skills-index.json +13 -2
- package/pipeline/skills/shared/README.md +4 -3
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +14 -6
- package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +2 -0
- package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +11 -8
- package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-review-rounds/SKILL.md +92 -0
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
- package/pipeline/skills/skills-index.md +2 -1
- package/pipeline/lib/credential-resolve.mjs +0 -75
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mmerterden/multi-agent-pipeline",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0",
|
|
4
4
|
"description": "6-phase AI development pipeline with full orchestration on Claude Code, Copilot CLI and Codex CLI. Analysis, planning, TDD, CLI-aware parallel review with consensus surfacing + Fable triage, default-FAIL evidence gates, secret + intent guards, per-phase cost ledger, persistent learnings memory, wiki generation, commit automation. Token-preserving uninstall.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"start": "node index.js",
|
|
23
|
-
"test": "npm run format:check && npm run lint && node --test test/*.test.mjs && node --test test/*.serial.mjs && node pipeline/scripts/run-smokes.mjs && node pipeline/scripts/lint-skills.mjs && node pipeline/scripts/gen-skills-index.mjs --check && node pipeline/scripts/build-skills-index.mjs --check && node pipeline/scripts/gen-free-llm-skill.mjs --check && node pipeline/scripts/gen-secret-patterns.mjs --check && node pipeline/scripts/gen-free-hosts.mjs --check && node pipeline/scripts/gen-usage-names.mjs --check && node pipeline/scripts/sync-skill-copies.mjs --check && node pipeline/scripts/gen-toolkit-path-params.mjs --check && node pipeline/scripts/gen-fact-marks.mjs --check && node pipeline/scripts/gen-office-command-matrix.mjs --check && node pipeline/scripts/gen-access-check.mjs --check && node pipeline/scripts/lint-unused-exports.mjs --baseline pipeline/scripts/fixtures/unused-exports-baseline.txt && node pipeline/scripts/lint-personas.mjs && node pipeline/scripts/lint-mcp-refs.mjs && node pipeline/scripts/eval-triage.mjs && node pipeline/scripts/eval-golden-tasks.mjs && node pipeline/scripts/eval-intent.mjs && node pipeline/scripts/eval-recall.mjs && node pipeline/scripts/eval-call-edges.mjs && node pipeline/scripts/eval-persona-walk.mjs && node pipeline/scripts/eval-guard-robustness.mjs --fast && node pipeline/scripts/validate-schemas.mjs && node pipeline/scripts/validate-prefs.mjs && node pipeline/scripts/scorecard.mjs",
|
|
23
|
+
"test": "npm run format:check && npm run lint && node --test test/*.test.mjs && node --test test/*.serial.mjs && node pipeline/scripts/run-smokes.mjs && node pipeline/scripts/lint-skills.mjs && node pipeline/scripts/gen-skills-index.mjs --check && node pipeline/scripts/build-skills-index.mjs --check && node pipeline/scripts/gen-free-llm-skill.mjs --check && node pipeline/scripts/gen-secret-patterns.mjs --check && node pipeline/scripts/gen-free-hosts.mjs --check && node pipeline/scripts/gen-usage-names.mjs --check && node pipeline/scripts/sync-skill-copies.mjs --check && node pipeline/scripts/gen-toolkit-path-params.mjs --check && node pipeline/scripts/gen-fact-marks.mjs --check && node pipeline/scripts/gen-office-command-matrix.mjs --check && node pipeline/scripts/gen-host-tables.mjs --check && node pipeline/scripts/gen-access-check.mjs --check && node pipeline/scripts/lint-host-literals.mjs --baseline pipeline/scripts/fixtures/host-literals-baseline.txt && node pipeline/scripts/lint-credential-reads.mjs --baseline pipeline/scripts/fixtures/credential-reads-baseline.txt && node pipeline/scripts/lint-unused-exports.mjs --baseline pipeline/scripts/fixtures/unused-exports-baseline.txt && node pipeline/scripts/lint-temp-guards.mjs && node pipeline/scripts/lint-personas.mjs && node pipeline/scripts/lint-mcp-refs.mjs && node pipeline/scripts/eval-triage.mjs && node pipeline/scripts/eval-golden-tasks.mjs && node pipeline/scripts/eval-intent.mjs && node pipeline/scripts/eval-recall.mjs && node pipeline/scripts/eval-call-edges.mjs && node pipeline/scripts/eval-persona-walk.mjs && node pipeline/scripts/eval-guard-robustness.mjs --fast && node pipeline/scripts/validate-schemas.mjs && node pipeline/scripts/validate-prefs.mjs && node pipeline/scripts/scorecard.mjs",
|
|
24
24
|
"test:unit": "node --test test/*.test.mjs && node --test test/*.serial.mjs",
|
|
25
25
|
"test:smoke": "node pipeline/scripts/run-smokes.mjs",
|
|
26
26
|
"lint:skills": "node pipeline/scripts/lint-skills.mjs",
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
"!pipeline/scripts/gen-fact-marks.mjs",
|
|
113
113
|
"!pipeline/scripts/gen-access-check.mjs",
|
|
114
114
|
"!pipeline/scripts/gen-office-command-matrix.mjs",
|
|
115
|
+
"!pipeline/scripts/gen-host-tables.mjs",
|
|
115
116
|
"!pipeline/scripts/gen-ref-toc.mjs",
|
|
116
117
|
"!pipeline/scripts/ref-filler-audit.mjs",
|
|
117
118
|
"!pipeline/scripts/make-manifest.mjs",
|
|
@@ -124,6 +125,9 @@
|
|
|
124
125
|
"!pipeline/scripts/lint-mcp-refs.mjs",
|
|
125
126
|
"!pipeline/scripts/lint-phase-labels.mjs",
|
|
126
127
|
"!pipeline/scripts/lint-unused-exports.mjs",
|
|
128
|
+
"!pipeline/scripts/lint-host-literals.mjs",
|
|
129
|
+
"!pipeline/scripts/lint-temp-guards.mjs",
|
|
130
|
+
"!pipeline/scripts/lint-credential-reads.mjs",
|
|
127
131
|
"!pipeline/scripts/check-md-links.mjs",
|
|
128
132
|
"!pipeline/scripts/validate-schemas.mjs",
|
|
129
133
|
"!pipeline/scripts/sync-parity-check.sh",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Task orchestrator - full pipeline via Jira ID + branch or GitHub Issue URL: analysis, plan, TDD development, parallel review + Fable triage (3 reviewers per host: Fable + Opus + Sonnet on Claude Code, GPT-5.4 + Opus + Sonnet on Copilot CLI), commit, log. Use when given a Jira ID, a GitHub issue or a free-text task and the whole pipeline should run."
|
|
3
3
|
description-tr: "Görev orkestratörü - Jira ID + branch veya GitHub Issue URL ile tam pipeline: analiz, plan, TDD geliştirme, paralel review + Fable triyajı (CLI'ya göre: Claude Code'da 3, Copilot CLI'da 3 model), commit, log"
|
|
4
|
-
argument-hint:
|
|
4
|
+
argument-hint: '[JIRA-KEY | issue URL | repo#N | "task"] [autopilot [--loop N]] [--review-rounds N] - or a sub-command: status, log #N, resume #N, kill #N'
|
|
5
5
|
allowed-tools: Agent, Bash, Read, Write, Edit, Glob, Grep, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion, WebFetch, WebSearch, NotebookEdit, Skill
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -21,7 +21,7 @@ Parse the user input and route to the correct sub-command.
|
|
|
21
21
|
|
|
22
22
|
Each subcommand has its own entry: `/multi-agent:<name>` on Claude Code, `/multi-agent-<name>` on Copilot CLI; the space form is still routed here. Classification lives in `$HOME/.claude/multi-agent-refs/_input-parser.md` (canonical): `#N` / bare number, `repo#N`, GitHub issue URL, Jira URL, bare Jira id, `jira`, `issue`, free text.
|
|
23
23
|
|
|
24
|
-
**Quoting**: For a double-quoted first argument, strip the surrounding double quotes and unescape (`\"` becomes `"`, and `\\` becomes `\` before a quote or at the end). If the resulting value as a whole is a Jira key, a Jira or GitHub issue URL, `repo#N` or `#N`, it is that structured reference; otherwise it is free text, and a structured token inside a sentence stays free text. Everything after the closing quote is modifiers (`autopilot`, `--loop N`, the branch name after a Jira key) (`_input-parser.md` "Quoting").
|
|
24
|
+
**Quoting**: For a double-quoted first argument, strip the surrounding double quotes and unescape (`\"` becomes `"`, and `\\` becomes `\` before a quote or at the end). If the resulting value as a whole is a Jira key, a Jira or GitHub issue URL, `repo#N` or `#N`, it is that structured reference; otherwise it is free text, and a structured token inside a sentence stays free text. Everything after the closing quote is modifiers (`autopilot`, `--loop N`, `--review-rounds N`, the branch name after a Jira key) (`_input-parser.md` "Quoting").
|
|
25
25
|
|
|
26
26
|
**Rule**: whatever the type, **account is always asked** (autopilot picks a default). After an issue fetch the **maturity check is required**: a blocker asks before it halts, and an autopilot run can ask on the item itself (`$HOME/.claude/multi-agent-refs/features/maturity-followup.md`). Free text skips maturity.
|
|
27
27
|
|
|
@@ -38,7 +38,7 @@ ACCESS_LINE=$(node "$HOME/.claude/scripts/usage-access.mjs"); ACCESS_RC=$?
|
|
|
38
38
|
Read `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` "Routing and loading tables" whenever a row below is not enough: every row in full, the loading table, guide selection and the lib scripts. After routing, `Read` only the file the action needs.
|
|
39
39
|
|
|
40
40
|
| Input | Read / do |
|
|
41
|
-
|
|
41
|
+
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
42
|
| Task (Jira id / URL, GitHub `#N` / URL, `repo#N`, free text) | `$HOME/.claude/multi-agent-refs/phases.md` + `_account-picker.md` + `_repo-picker.md` + `_dev-context.md` |
|
|
43
43
|
| `jira` / `issue` | `$HOME/.claude/commands/multi-agent/jira/SKILL.md` / `issue/SKILL.md` (4-step pickers) |
|
|
44
44
|
| `status`, `log [id]`, `resume [id]` | Inline; status scans `$HOME/.claude/logs/multi-agent/` |
|
|
@@ -51,8 +51,10 @@ Read `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` "Routing and lo
|
|
|
51
51
|
| `test`, `test-dark-mode`, `test-accessibility`, `test-dynamic-type`, `test-screenshots` | `$HOME/.claude/commands/sim-test.md`, scenario pinned by the name |
|
|
52
52
|
| `language [en\|tr]` | Inline: show or set `outputLanguage` only (`$HOME/.claude/commands/multi-agent/language/SKILL.md`) |
|
|
53
53
|
| Any other subcommand (`setup`, `channels`, `analysis`, `design-check`, `store-ready`, ...) | `$HOME/.claude/commands/multi-agent/<name>/SKILL.md`, except the user-only commands `clean-disk`, `forget`, `garbage-collect`, `kill`, `pair`, `prune-logs`, `prune-prompts`, `purge`, `review-priority`, `routines-delete`, `uninstall` (each sets `disable-model-invocation: true`): never read their files; name the command for the user to type (`/multi-agent:<name>` on Claude Code, the `/multi-agent-<name>` prompt on Codex CLI) and stop |
|
|
54
|
+
| `--review-rounds N` | Modifier: this run allows N review rework rounds (1 to 3, default 2), overriding the repo and global setting for this run only. `node "$HOME/.claude/scripts/review-rounds.mjs" parse "<modifiers>"` returns N (exit 2 on a value outside 1 to 3: say so and stop before Phase 0). Phase 0 stores it with `review-rounds.mjs record --state "$STATE_FILE" --rounds N` (`features/review-rounds.md`). The standing setting is `/multi-agent:review-rounds` |
|
|
54
55
|
| `autopilot` | Modifier: skip confirmations, auto commit/PR (`phases/modes.md`). With `--loop N`: Loop mode below |
|
|
55
|
-
|
|
|
56
|
+
| `help` | `$HOME/.claude/commands/multi-agent/help/SKILL.md` |
|
|
57
|
+
| No args | `$HOME/.claude/multi-agent-refs/_entry-picker.md`: ask which kind of task this is, then route the answer through this table. Never reached by an unattended run |
|
|
56
58
|
|
|
57
59
|
`jira`, `issue` and the direct-ID path all end in the Interactive Launcher, then Phase 0; account is always asked, the maturity check halts on a blocker, and the dev-context step always runs. Read `$HOME/.claude/multi-agent-refs/orchestrator/dispatcher.md` before routing any of them: the per-command steps, the Jira empty-description question and the launcher prompts.
|
|
58
60
|
|
|
@@ -73,7 +75,7 @@ Each iteration is a full unattended autopilot run: without `install --unattended
|
|
|
73
75
|
|
|
74
76
|
## Agents and model routing
|
|
75
77
|
|
|
76
|
-
Agent definitions: `dispatcher.md` "Agent definitions". Before each Agent dispatch, read `preferredModel` from the persona file and
|
|
78
|
+
Agent definitions: `dispatcher.md` "Agent definitions". Before each Agent dispatch, read `preferredModel` from the persona file and hand the resolved rung to the child the way THIS host does it (`features/model-fallback.md` "Routing at dispatch" has the table, generated from the host registry). Precedence: `PHASE_MODEL_OVERRIDE` > a matching `prefs.global.modelRouting` rule (only when the phase named no model, and only for a rung this host offers) > persona `preferredModel` > `fable` (fallback: `$HOME/.claude/multi-agent-refs/features/model-fallback.md`). Simple text tasks ask `model-dispatch.sh delegate --default host` first: `$HOME/.claude/multi-agent-refs/features/free-models.md`.
|
|
77
79
|
|
|
78
80
|
## Rules
|
|
79
81
|
|
|
@@ -37,6 +37,10 @@ Never surface them as questions, re-derive them or invite an override mid-run. T
|
|
|
37
37
|
|
|
38
38
|
`$ARGUMENTS`: optional analysis name, else asked at Phase 0. `check|refresh <doc.md>`: follow `$HOME/.claude/multi-agent-refs/features/analysis-sources.md` instead. `conform <doc.md>`: follow `$HOME/.claude/multi-agent-refs/features/analysis-outline.md` instead.
|
|
39
39
|
|
|
40
|
+
`<tracker-ref> autopilot`: the unattended form continuous mode launches for an item carrying the repo's analysis label (`analysisGithubLabel` / `analysisJiraLabel`). The reference is the item itself - a Jira key or `owner/repo#N` - and the side-effect contract above is unchanged: the run stops at the document, which is what the queue records as `doc-delivered`. It is its own declared mode (`phases.json` `modes.analysis-autopilot`): record it as `mode: "analysis"` with `autopilot: true`, ask nothing, and answer every Phase 0 question from evidence or park on it - Phase 0 mounts the derivation contract, and nothing below is taken as a default because nobody answered.
|
|
41
|
+
|
|
42
|
+
With nothing after the command, read `$HOME/.claude/multi-agent-refs/_entry-picker.md` first: a bare invocation asks which of the four it is, rather than assuming a new analysis and asking only for a name. An unattended run with no argument refuses there and never reaches a question.
|
|
43
|
+
|
|
40
44
|
## Steps
|
|
41
45
|
|
|
42
46
|
### Phase 0 - Intake
|
|
@@ -59,7 +59,7 @@ is no `add-repo` / `remove-repo` command.
|
|
|
59
59
|
Unavailable repos are printed above the question as a plain list with their
|
|
60
60
|
reason, not offered as options.
|
|
61
61
|
|
|
62
|
-
### 4. Sources and
|
|
62
|
+
### 4. Sources and labels, per selected repo
|
|
63
63
|
|
|
64
64
|
One `AskUserQuestion` per newly added repo (never re-ask a configured one):
|
|
65
65
|
|
|
@@ -71,6 +71,31 @@ query per source is in `details.md`, "Source queries". When Jira is selected,
|
|
|
71
71
|
state the two Jira caveats from that section (global label namespace, Labels
|
|
72
72
|
field on the edit screen).
|
|
73
73
|
|
|
74
|
+
Then one more question per repo, for the **second queue**:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
header: "Analysis"
|
|
78
|
+
question: <localized: "Should this repo also pick up analysis work? A labelled item then runs the analysis command and stops at a written document instead of a pull request.">
|
|
79
|
+
options:
|
|
80
|
+
- label: "Development only" # pre-selected
|
|
81
|
+
description: <localized: "The repo stays on one queue. Nothing changes.">
|
|
82
|
+
- label: "Analysis too, agent-analysis"
|
|
83
|
+
description: <localized: "Items carrying agent-analysis are analysed; the label must differ from the development one.">
|
|
84
|
+
- label: "Analysis too, my own label"
|
|
85
|
+
description: <localized: "Same, under a label you name.">
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Branch on the option selected, never on its text. **Development only** writes
|
|
89
|
+
neither `analysisQueue` nor an analysis label, and that is what leaves the repo
|
|
90
|
+
out: an analysis label nobody asked for would enrol a repo in a second queue
|
|
91
|
+
that spends runs on documents. The other two write `analysisQueue: true` plus
|
|
92
|
+
`analysisGithubLabel` / `analysisJiraLabel` for the sources selected above. The
|
|
93
|
+
analysis label must differ from the development one on the same tracker - a
|
|
94
|
+
config where they are equal is refused when the queue next loads, so refuse it
|
|
95
|
+
here, say which two fields collided, and re-ask.
|
|
96
|
+
|
|
97
|
+
Reasoning and the analysis query: `details.md`, "Source queries".
|
|
98
|
+
|
|
74
99
|
Run the query before saving it, and show the count:
|
|
75
100
|
|
|
76
101
|
```bash
|
|
@@ -104,7 +129,9 @@ Validate against `schemas/autopilot-config.schema.json`, then write
|
|
|
104
129
|
`slots: 1`, `scanIntervalSeconds: 120`, `maxAttempts: 2`,
|
|
105
130
|
`costCeilingUsd: 25`. `awake` carries the answer from the previous step. Never
|
|
106
131
|
write `askOnLowMaturity`, `reportStatus`, `sendItemKeys` or `depthRouter`; drop
|
|
107
|
-
them when rewriting an older file.
|
|
132
|
+
them when rewriting an older file. `analysisQueue` and the analysis labels are
|
|
133
|
+
written only for a repo whose step 4 answer asked for them, and removed from a
|
|
134
|
+
repo whose answer no longer does.
|
|
108
135
|
|
|
109
136
|
### 7. Build the menu bar indicator (best effort)
|
|
110
137
|
|
|
@@ -160,7 +187,8 @@ saves the selection and installs neither.
|
|
|
160
187
|
|
|
161
188
|
### 9. Report what is now true
|
|
162
189
|
|
|
163
|
-
Say all five: which repos and which labels
|
|
190
|
+
Say all five: which repos and which labels, naming any repo that is on the
|
|
191
|
+
analysis queue as well and what that queue delivers (a document, not a PR); that it survives a restart with no
|
|
164
192
|
command to run (launchd loads at **login**, not boot); that the machine is kept awake while the mode is on and whether the display is kept on; the slot count
|
|
165
193
|
and the ceiling this machine would allow (`ma_ap_slot_ceiling`); and that
|
|
166
194
|
`/multi-agent:autopilot-off` is the only way to stop it.
|
|
@@ -30,7 +30,8 @@ you spells it.
|
|
|
30
30
|
|---|---|
|
|
31
31
|
| `OFF` with repos selected | the selection is kept, launchd holds no job. `autopilot-on` starts it again without re-asking |
|
|
32
32
|
| `not set up` | never configured on this machine; nothing has been written |
|
|
33
|
-
| `Running` | in flight now. Phase and elapsed come from the run's own state, not from a guess |
|
|
33
|
+
| `Running` | in flight now. Phase and elapsed come from the run's own state, not from a guess; an analysis item says so and shows its own step names (Intake, Evidence, Synthesis, ...) |
|
|
34
|
+
| `Queued for development` / `Queued for analysis` | the two queues, listed apart because they deliver different things: a pull request, or a written document with no branch and no PR. A repo is only in the second one when it was enrolled (`/multi-agent:autopilot-on`, step 4); no analysis heading means no repo asked for it |
|
|
34
35
|
| `Waiting for an answer` | the run is parked on a question and never re-runs on its own. Answer it with `resume <id> --answer <option>` or from a client; the questions are posted on the item only when `autopilotCommentsOnIssue` is on (default off) |
|
|
35
36
|
| `the config is on but launchd holds no job` | the failure a `resume` command would have hidden: an OS update dropped the plist, or it was booted out. Re-run `autopilot-on` |
|
|
36
37
|
|
|
@@ -44,6 +45,8 @@ not a fault.
|
|
|
44
45
|
(`features/autopilot-operations.md`): `inhibitorHeld` (a sleep inhibitor is held
|
|
45
46
|
for a run in flight), `lastGcReport` and `lastDigest` (paths of the newest daily
|
|
46
47
|
cleanup report and digest in `~/.claude/autopilot/`, empty when there is none),
|
|
48
|
+
`queuedDevelopment` and `queuedAnalysis` (the same queue split by kind, so a
|
|
49
|
+
client renders the two without re-deriving the rule),
|
|
47
50
|
`maxParallelAgents` (the configured cap, `null` when unlimited), and `awake`,
|
|
48
51
|
`{held, display}`: whether the awake agent that keeps the Mac awake for as long
|
|
49
52
|
as the mode is on is running, and whether it keeps the display on too. On with
|
|
@@ -86,6 +89,7 @@ string per row:
|
|
|
86
89
|
|
|
87
90
|
```
|
|
88
91
|
PROJ-1234 · Phase 2/5 Dev · ios
|
|
92
|
+
PROJ-1240 · Phase 2/5 Synthesis · ios · analysis
|
|
89
93
|
PROJ-1199 · waiting for an answer
|
|
90
94
|
```
|
|
91
95
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Multi-channel reporter - Jira/Confluence/Wiki/PR description/Board status. Multi-select channels + content, humanizer pass, reviewer-preserving Bitbucket PR PUT, GitHub Projects v2 board status move. Use to post or redo a run's report; Phase 5 delegates here, or invoke by Jira ID / PR URL / branch."
|
|
3
|
-
description-tr: "Çok kanallı raporlayıcı - Jira/Confluence/Wiki/PR açıklaması/Board durumu. Çoklu kanal + içerik seçimi, humanizer geçişi, reviewer'ı koruyan Bitbucket PR PUT, GitHub Projects v2 board durum taşıma. Faz 5 bu skill'e delege eder; Jira ID / PR URL / branch ile sonradan da çağrılabilir."
|
|
4
|
-
argument-hint: '[Jira-id | PR-url | #N | Jira-url] [--channels pr,jira,confluence,wiki,board] [--content normal,technical,test,auto-diff,note,test-run] [--flow-run <runId>] [--message "..."] [--message-file path] [--board-status <key>] [--dry-run] [--append] [--ready]'
|
|
5
|
-
parameters: [{"name":"target","kind":"text"},{"name":"--channels","kind":"enum","repeat":true,"enum":["pr","jira","confluence","wiki","board"]},{"name":"--content","kind":"enum","repeat":true,"enum":["normal","technical","test","auto-diff","note","test-run"]},{"name":"--flow-run","kind":"text"},{"name":"--message","kind":"text"},{"name":"--message-file","kind":"path"},{"name":"--board-status","kind":"text"},{"name":"--dry-run","kind":"flag"},{"name":"--append","kind":"flag"},{"name":"--ready","kind":"flag"}]
|
|
2
|
+
description: "Multi-channel reporter - Jira/Confluence/Wiki/PR description/Board status. Multi-select channels + content, humanizer pass, reviewer-preserving Bitbucket PR PUT, GitHub Projects v2 board status move. Also writes the run's report to a local file on every run, whatever the channels did. Use to post or redo a run's report; Phase 5 delegates here, or invoke by Jira ID / PR URL / branch."
|
|
3
|
+
description-tr: "Çok kanallı raporlayıcı - Jira/Confluence/Wiki/PR açıklaması/Board durumu. Çoklu kanal + içerik seçimi, humanizer geçişi, reviewer'ı koruyan Bitbucket PR PUT, GitHub Projects v2 board durum taşıma. Her koşuda, kanallardan bağımsız olarak, koşunun raporunu yerel bir dosyaya da yazar. Faz 5 bu skill'e delege eder; Jira ID / PR URL / branch ile sonradan da çağrılabilir."
|
|
4
|
+
argument-hint: '[Jira-id | PR-url | #N | Jira-url] [--channels pr,jira,confluence,wiki,board] [--content normal,technical,test,auto-diff,note,test-run] [--flow-run <runId>] [--message "..."] [--message-file path] [--board-status <key>] [--dry-run] [--append] [--ready] [--file-only]'
|
|
5
|
+
parameters: [{"name":"target","kind":"text"},{"name":"--channels","kind":"enum","repeat":true,"enum":["pr","jira","confluence","wiki","board"]},{"name":"--content","kind":"enum","repeat":true,"enum":["normal","technical","test","auto-diff","note","test-run"]},{"name":"--flow-run","kind":"text"},{"name":"--message","kind":"text"},{"name":"--message-file","kind":"path"},{"name":"--board-status","kind":"text"},{"name":"--dry-run","kind":"flag"},{"name":"--append","kind":"flag"},{"name":"--ready","kind":"flag"},{"name":"--file-only","kind":"flag"}]
|
|
6
6
|
gui: form
|
|
7
7
|
destructive: false
|
|
8
8
|
confirm: none
|
|
@@ -21,9 +21,11 @@ ACCESS_LINE=$(node "$HOME/.claude/scripts/usage-access.mjs"); ACCESS_RC=$?
|
|
|
21
21
|
|
|
22
22
|
Single entry point for posting a task report to Jira, Confluence, Wiki (component-only), the PR description and Board status (GitHub Projects v2). Phase 5 delegates here; users also invoke it post-hoc by Jira ID / PR URL / branch. Claude Code: `/multi-agent:channels <target>`; Copilot CLI: `multi-agent-channels <target>`.
|
|
23
23
|
|
|
24
|
+
Every run that composes a body also writes it to `task-report.md` beside the run's `agent-log.md`. That file is not a channel and has no setting: it is what a machine with no tracker, an unattended run and a cancelled menu are left with. Contract: `$HOME/.claude/multi-agent-refs/channels/report-file.md`.
|
|
25
|
+
|
|
24
26
|
## Gotchas
|
|
25
27
|
|
|
26
|
-
- Nothing is posted before the Step 6 approval gate resolves, in every interactive mode. Under `MULTI_AGENT_UNATTENDED=1` nothing is posted at all.
|
|
28
|
+
- Nothing is posted before the Step 6 approval gate resolves, in every interactive mode. Under `MULTI_AGENT_UNATTENDED=1` nothing is posted at all. The report file is still written in both cases; it is not a post.
|
|
27
29
|
- Jira renders `:)` `(x)` `(!)` as emoticons, so a Swift selector like `login(source:input:)` breaks. Post through `jira-publish.sh`, which escapes the body; never assemble the request by hand.
|
|
28
30
|
- A Bitbucket PR update must carry the reviewer list back, or the PUT removes every reviewer.
|
|
29
31
|
- With several repos, the PR description goes to every PR but Jira and Confluence get one post each.
|
|
@@ -44,9 +46,11 @@ Pipeline log, PR diff, or a manual message, best first. Read `$HOME/.claude/mult
|
|
|
44
46
|
|
|
45
47
|
Step 3a prints the Work Summary first (summary-first flow) when `agent-state.json` exists, and auto-ticks that content row; an explicit pref wins. Step 3b: **Channels** (PR description, Jira comment, Confluence page, Wiki, Board) and **Content**; an unavailable option is greyed with a reason, never hidden. Selections pre-tick from and save to `prefs.global.reportChannels` / `prefs.global.reportContent`. Autopilot still pauses here; unattended posts nothing (`$HOME/.claude/multi-agent-refs/features/unattended-security.md`).
|
|
46
48
|
|
|
49
|
+
Above the picker, print one line: the report file is always written, and where. Zero channels ticked is a valid selection and means file-only. When no channel is selectable at all, print the greyed rows with their reasons as text and ask only Content.
|
|
50
|
+
|
|
47
51
|
### Step 4 - Mode short-circuit
|
|
48
52
|
|
|
49
|
-
`--channels` + `--content` flags, autopilot (prefs),
|
|
53
|
+
`--channels` + `--content` flags, autopilot (prefs), `--dry-run` and `--file-only` skip or shortcut the menu (table in `reference.md`).
|
|
50
54
|
|
|
51
55
|
### Step 5 - Generator
|
|
52
56
|
|
|
@@ -55,6 +59,7 @@ One section body per selected content source, each run through the `humanizer` s
|
|
|
55
59
|
- **The Jira body is not the PR body.** Jira gets only `Geliştirme Özeti`, `Test Senaryoları`, `Etki Analizi` and `Bağlantılar` (plus the test run when selected); technical sections are dropped from it, never converted, and go to the PR and Confluence.
|
|
56
60
|
- PR section order is fixed by `channels/pr.md`; content options are sources, not the shape.
|
|
57
61
|
- Target length: under 80 lines; auto-diff capped at 5 lines per section.
|
|
62
|
+
- **After the humanizer, write the report file** (`report-file.mjs write`), before Step 6. The file always carries one PR-shaped body: the PR body when `pr` is selected, otherwise a `Report` body composed in the `channels/pr.md` order with the PR tone.
|
|
58
63
|
|
|
59
64
|
### Step 6 - Body preview + approval gate
|
|
60
65
|
|
|
@@ -64,9 +69,11 @@ One `AskUserQuestion` (`picker-contract.md`; `question` / `label` / `description
|
|
|
64
69
|
|
|
65
70
|
**Hard rule:** what is posted is byte-identical to the approved preview (markup conversion excepted). Any regeneration after approval invalidates the approval and re-runs the gate.
|
|
66
71
|
|
|
72
|
+
The report file is not a post and is outside this gate: `Edit` rewrites it, `Cancel` leaves it in place.
|
|
73
|
+
|
|
67
74
|
### Step 7 - Channel dispatch
|
|
68
75
|
|
|
69
|
-
Adapters run in parallel; one failure does not block the others. Dispatch NEVER starts before the Step 6 gate resolves, except autopilot and `--dry-run`. Multi-repo: `channels/multi-repo.md`.
|
|
76
|
+
Adapters run in parallel; one failure does not block the others. The report file is not an adapter, and no adapter failure affects it. Dispatch NEVER starts before the Step 6 gate resolves, except autopilot and `--dry-run`. Multi-repo: `channels/multi-repo.md`.
|
|
70
77
|
|
|
71
78
|
- **PR description**: GitHub `gh pr edit --body-file`; Bitbucket a reviewer-preserving `PUT` that re-sends `reviewers`, `fromRef`, `toRef`, `draft`, `version`. Replace by default, `--append` opt-in. Contract: `$HOME/.claude/multi-agent-refs/channels/pr.md`.
|
|
72
79
|
- **Jira comment**: PR URL on line 1, then the four sections. Post with `bash "$HOME/.claude/lib/jira-publish.sh" --issue "$JIRA_ID" --body-file "$F" --target comment` (escapes the body, token never on argv). Contract: `$HOME/.claude/multi-agent-refs/channels/jira.md`. Issue family (`state.jiraFamily`): `jira-family-write.sh plan`, preview, `apply`, per `$HOME/.claude/multi-agent-refs/features/jira-family.md`.
|
|
@@ -76,7 +83,7 @@ Adapters run in parallel; one failure does not block the others. Dispatch NEVER
|
|
|
76
83
|
|
|
77
84
|
### Step 8 - Summary
|
|
78
85
|
|
|
79
|
-
One line per channel (status, metric, URL), format in `reference.md`; persist the selections to prefs.
|
|
86
|
+
One line per channel (status, metric, URL), format in `reference.md`; persist the selections to prefs. Re-run `report-file.mjs write` with `--delivery` to stamp the outcomes, then print the `Report file` row last.
|
|
80
87
|
|
|
81
88
|
## Required rules
|
|
82
89
|
|
|
@@ -88,4 +95,5 @@ One line per channel (status, metric, URL), format in `reference.md`; persist th
|
|
|
88
95
|
- **Every body item cites a symbol / file / line** from the diff or log.
|
|
89
96
|
- **Adapter failures are non-blocking**.
|
|
90
97
|
- **Approval before post**: autopilot and `--dry-run` are the only bypasses.
|
|
98
|
+
- **Report file every run**: written whenever a body was composed, never gated, never posted; `--dry-run` is the only case that composes and does not write.
|
|
91
99
|
- **Phase 5 autopilot** always pauses at the menu; a 30-min timeout ends the session cleanly, resumable via `/multi-agent:resume`.
|
|
@@ -27,6 +27,8 @@ Show the task's detailed agent-log.md report.
|
|
|
27
27
|
|
|
28
28
|
3. **Read agent-log.md** - display the file.
|
|
29
29
|
|
|
30
|
+
3b. **Name the report file when it is there.** `task-report.md` in the same directory is the run's report as Phase 5 composed it, written whether or not a channel took it. Print its path in one line; do not inline it, since the log is already long and the two say different things.
|
|
31
|
+
|
|
30
32
|
4. **Cost + durations come from the tracker, not only the log.** The tracker contract promises token/duration data "surfaced in `:log` reports", and agent-log.md only carries it when Phase 5 appended the Cost Breakdown. When that section is absent, render it live:
|
|
31
33
|
```bash
|
|
32
34
|
bash $HOME/.claude/scripts/render-agent-log-cost.sh "<task-id>" 2>/dev/null
|
|
@@ -62,6 +62,8 @@ Load `tracker-state.json`, never re-init it (`tracker-contract.md` "Resume behav
|
|
|
62
62
|
|
|
63
63
|
Read `state.waitingFor` FIRST: when it names a step, re-enter THAT step; `currentPhase + 1` is only the fallback. Before Step 5, read `resume/details.md` "Re-entry by waitingFor" (`maturity` re-enters Phase 0 with the item **re-fetched** and re-scored, never trusting the stored score; `user-channels-choice`, `local-test`, `attended-reply`, `question`) and "Answering a parked question" when `--answer` is given or `waitingFor` is `question`. The answer is data: the re-entered step reads `lastAnswer.optionIds`, never text to follow. `answer-question.mjs` exit 5 means the run moved; re-read state and stop.
|
|
64
64
|
|
|
65
|
+
A decided and unfinished rework (`phases["2"].reworkForIteration` equal to the number of `reviewIterations`) re-enters Phase 2, never Phase 3 Step 4 again.
|
|
66
|
+
|
|
65
67
|
Clear `waitingFor` in the same write that records the answer, on re-entry. Log: `🔄 Resumed {JIRA-KEY}-{id} from Phase {N}`
|
|
66
68
|
|
|
67
69
|
### Step 6 - Untracked branch work: context resolution
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Set how often review sends work back, 1 to 3 (default 2). Use when changing review rounds."
|
|
3
|
+
description-tr: "Review'ın işi koşu durmadan önce kaç kez geliştirmeye geri gönderebileceğini gösterir ya da ayarlar (1 ile 3, varsayılan 2). Review tur sayısını değiştirmek istendiğinde kullanılır."
|
|
4
|
+
argument-hint: "[status | 1 | 2 | 3 | reset] [--repo] - no argument opens a picker"
|
|
5
|
+
parameters: [{"name":"value","kind":"enum","enum":["status","1","2","3","reset"]},{"name":"--repo","kind":"flag"}]
|
|
6
|
+
gui: form
|
|
7
|
+
destructive: false
|
|
8
|
+
confirm: none
|
|
9
|
+
allowed-tools: Bash, AskUserQuestion
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# multi-agent review-rounds - how many times review may send work back
|
|
13
|
+
|
|
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
|
+
|
|
16
|
+
**Input**: ${ARGUMENTS}
|
|
17
|
+
|
|
18
|
+
Phase 3 sends accepted blocking findings back to Phase 2 for rework. This command
|
|
19
|
+
sets how many of those reworks a run allows: with limit N, review sends work back
|
|
20
|
+
N times, every rework is reviewed again, and the run stops when a review still has
|
|
21
|
+
blocking findings after N reworks (at most N + 1 reviews). The range is 1 to 3 (3
|
|
22
|
+
is the ceiling on `reworkCount`) and the default is 2. Every reader of the limit goes
|
|
23
|
+
through one resolver, so the number set here is the number a run obeys:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
RR="$HOME/.claude/scripts/review-rounds.mjs"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Precedence, first valid value wins: `--review-rounds N` on the run, then this
|
|
30
|
+
repository's setting (`prefs.projects.<slug>.maxReworkCycles`), then the global
|
|
31
|
+
setting (`prefs.global.review.maxReworkCycles`), then 2. A stored value outside
|
|
32
|
+
1 to 3 is ignored and reported, never clamped. Autopilot's circuit-breaker value
|
|
33
|
+
(`autopilotCircuitBreaker.maxReworkCycles`) can only lower the rework-storm
|
|
34
|
+
trigger; it never raises the limit.
|
|
35
|
+
|
|
36
|
+
## Forms
|
|
37
|
+
|
|
38
|
+
| Input | Does |
|
|
39
|
+
|---|---|
|
|
40
|
+
| (none) | Shows the effective value and its source, then asks with the picker below. Interactive only. |
|
|
41
|
+
| `status` | `node "$RR" get`: prints the value, its source and the range. Asks nothing. |
|
|
42
|
+
| `1`, `2` or `3` | `node "$RR" set <n>`: writes it globally. Asks nothing. |
|
|
43
|
+
| `1`, `2` or `3` with `--repo` | `node "$RR" set <n> --repo`: writes it for the current repository only. |
|
|
44
|
+
| `reset` (with `--repo` for the repository) | `node "$RR" reset [--repo]`: removes that override. |
|
|
45
|
+
| `--repo` | Scopes to the current repository (its folder name, the run's `state.project`), or to `--project <key>`. A scope that cannot be resolved, or `--project` without `--repo`, exits 2 and writes nothing. |
|
|
46
|
+
| anything else | Print the usage line and stop with a non-zero exit. |
|
|
47
|
+
|
|
48
|
+
Print the script's output as written: it is already in the user's output language.
|
|
49
|
+
A value outside 1 to 3 is refused by the script with exit 2 and nothing is written;
|
|
50
|
+
report its message and stop.
|
|
51
|
+
|
|
52
|
+
## Unattended runs
|
|
53
|
+
|
|
54
|
+
When `MULTI_AGENT_UNATTENDED=1` or `autopilot` is in the input, no picker opens and
|
|
55
|
+
nothing is defaulted. With no argument, run `node "$RR" get`, print the result and
|
|
56
|
+
stop. Setting a value needs an explicit argument (`1`, `2`, `3` or `reset`).
|
|
57
|
+
|
|
58
|
+
## The picker (no argument, attended)
|
|
59
|
+
|
|
60
|
+
1. Run `node "$RR" get --json`; print the `get` text form (value, source, range).
|
|
61
|
+
2. Render the question, the labels and the descriptions below in
|
|
62
|
+
`outputLanguage`; only `header` is a fixed chip. The table gives each label in
|
|
63
|
+
its English form (Turkish: `2 tur (Önerilen)`, `3 tur`, `1 tur`). The default
|
|
64
|
+
(2) is first and carries `(Recommended)`; the option equal to the
|
|
65
|
+
current effective value carries `(current)` (Turkish `(geçerli)`), both
|
|
66
|
+
suffixes on one label when they coincide. The order is fixed: 2, 3, 1.
|
|
67
|
+
3. Ask once. An empty answer is not consent: ask again, or write nothing.
|
|
68
|
+
4. Branch on the option selected. If it equals the current effective value, write
|
|
69
|
+
nothing and say it is unchanged. Otherwise run `node "$RR" set <n>` (add
|
|
70
|
+
`--repo` only when the input carried `--repo`) and print its output. Scope is
|
|
71
|
+
not asked: global is the default and `--repo` is the way to scope.
|
|
72
|
+
|
|
73
|
+
`AskUserQuestion`: `header: "Rounds"`.
|
|
74
|
+
|
|
75
|
+
| # | label | description (en) | description (tr) |
|
|
76
|
+
|---|---|---|---|
|
|
77
|
+
| 1 | `2 rounds (Recommended)` | Review can send work back to development twice; a third failed review stops the run. | Review işi iki kez geliştirmeye geri gönderebilir; üçüncü başarısız review koşuyu durdurur. |
|
|
78
|
+
| 2 | `3 rounds` | Review can send work back to development three times; a fourth failed review stops the run. | Review işi üç kez geliştirmeye geri gönderebilir; dördüncü başarısız review koşuyu durdurur. |
|
|
79
|
+
| 3 | `1 round` | Review can send work back to development once; a second failed review stops the run. | Review işi bir kez geliştirmeye geri gönderebilir; ikinci başarısız review koşuyu durdurur. |
|
|
80
|
+
|
|
81
|
+
| | en | tr |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| question | How many times may review send work back to development before the run stops? | Koşu durmadan önce review işi kaç kez geliştirmeye geri gönderebilsin? |
|
|
84
|
+
|
|
85
|
+
On a host without a native picker (Copilot CLI), use the numbered-menu fallback of
|
|
86
|
+
the picker contract: `ask-choice.sh` with the three labels in this order, and map
|
|
87
|
+
the answer by its index, never by its text.
|
|
88
|
+
|
|
89
|
+
## Related
|
|
90
|
+
|
|
91
|
+
- Resolver, precedence and exit codes: `$HOME/.claude/scripts/review-rounds.mjs`
|
|
92
|
+
- Where a run reads the limit: `$HOME/.claude/multi-agent-refs/phases/phase-3-review.md` Step 4
|
|
93
|
+
(`review-rounds.mjs next`) and `$HOME/.claude/multi-agent-refs/features/review-rounds.md`
|
|
94
|
+
- One run only: `/multi-agent "task" --review-rounds N`
|
|
@@ -37,7 +37,7 @@ Derived, not listed: `pluginsForStacks()` in `scripts/_stack-routing.mjs` owns i
|
|
|
37
37
|
- **legacy-key cleanup**: delete any `ai-*-engineering-toolkit@multi-agent-plugins` keys - those plugin names were retired by the `ai-<stack>-toolkit` rename and a stale `true` there enables a plugin that no longer exists in the marketplace
|
|
38
38
|
- **Apple's Xcode skills**: when `~/.claude/xcode-apple-marketplace` exists, set `xcode-integration@xcode-apple` to `true` if `ios` is in the selection and `false` otherwise. Without that directory leave the key absent
|
|
39
39
|
4. **Unknown arg** → show the known stacks; do not guess.
|
|
40
|
-
5. **
|
|
40
|
+
5. **Engine-host refresh offer.** Every host that keeps its own skill copies filters them to the enabled stacks at install time, so after a change ask (single `AskUserQuestion`, not silent): "Refresh the other hosts' local copies now?" - Yes runs `node <pipelineRepo>/install.js` with one flag per host tree that already exists (`--copilot` for `~/.copilot`, `--codex` for `~/.codex`, `--local` for `~/.codex-local`), No leaves them stale with a one-line warning naming the command to run later. A flag for a tree that is not there would install a host the user never asked for, so the flags follow the trees rather than the registry. Skip this question entirely when none of those trees exists.
|
|
41
41
|
|
|
42
42
|
## Implementation
|
|
43
43
|
|
|
@@ -54,7 +54,7 @@ Run every step automatically:
|
|
|
54
54
|
```
|
|
55
55
|
Step 0: DOCTOR doctor.mjs - exit 2 or 4 stops the sync
|
|
56
56
|
Step 1.5: DETECT Compare timestamps, find stale targets
|
|
57
|
-
Step 2: COPILOT Claude Code -> Copilot CLI (instructions +
|
|
57
|
+
Step 2: COPILOT Claude Code -> Copilot CLI (instructions + 81 sub-command skills)
|
|
58
58
|
Step 2b: CODEX Claude Code -> Codex CLI (router skill + specs as refs + agent TOML)
|
|
59
59
|
Step 3: REPO Claude Code -> pipeline repo (genericized, personal data scrub, bash -n on all sh)
|
|
60
60
|
Step 3c: PLUGINS shared/external -> multi-agent-plugins marketplace (rebuild, bump, push)
|
|
@@ -141,14 +141,14 @@ Claude <-> Copilot axis only; Codex takes Step 2b (`cross-cli-contract.md` 2.6).
|
|
|
141
141
|
|
|
142
142
|
`~/.claude/commands/multi-agent/{cmd}/SKILL.md` <-> `~/.copilot/skills/multi-agent-{cmd}/SKILL.md`.
|
|
143
143
|
|
|
144
|
-
**
|
|
144
|
+
**81 commands are synced** (canonical inventory - must match `cross-cli-contract.md` section 1; drift = contract violation):
|
|
145
145
|
|
|
146
146
|
```
|
|
147
147
|
address-review, analysis, analysis-jira, analysis-resolve, autopilot-off, autopilot-on,
|
|
148
148
|
autopilot-status, bug-bash, build-optimize, channels, clean-disk, complaint-analysis, create-jira,
|
|
149
149
|
design-check, diff-explain, doctor, estimate, fable-off, fable-on, fable-status, feedback, forget, garbage-collect, graph, health, help,
|
|
150
150
|
ios-coding-standard, issue, jira, kill, language, log,
|
|
151
|
-
manual-test, office-off, office-on, office-status, pair, postmortem, prune-logs, prune-prompts, purge, refactor, research, resume, review, review-analysis, review-issue, review-jira, review-priority, route-off, route-on, route-status,
|
|
151
|
+
manual-test, office-off, office-on, office-status, pair, postmortem, prune-logs, prune-prompts, purge, refactor, research, resume, review, review-analysis, review-issue, review-jira, review-priority, review-rounds, route-off, route-on, route-status,
|
|
152
152
|
routines, routines-browse, routines-delete, routines-import, routines-share, routines-update,
|
|
153
153
|
save, scaffold, scan, scenario-audit, search, security-review, serve, setup, stack, status, steer, store-ready, sync, test,
|
|
154
154
|
test-accessibility, test-dark-mode, test-dynamic-type, test-gen, test-screenshots,
|
|
@@ -308,6 +308,7 @@ export interface LaunchHost {
|
|
|
308
308
|
bin?: string;
|
|
309
309
|
cwd?: string;
|
|
310
310
|
note: string;
|
|
311
|
+
/** The launch shape per declared mode of schemas/phases.json that a client may start without a terminal conversation. autopilot runs the pipeline and stops at a pull request; analysis-autopilot runs the analysis command and stops at a document. */
|
|
311
312
|
modes?: {
|
|
312
313
|
[key: string]: LaunchShape;
|
|
313
314
|
};
|
|
@@ -8,106 +8,78 @@
|
|
|
8
8
|
# and a third writer was about to make it three. Duplicated auth does not stay
|
|
9
9
|
# duplicated: it drifts, and the copy that drifts is the one nobody is looking at.
|
|
10
10
|
#
|
|
11
|
-
# Today only `analysis-jira-write.sh` sources this. The two older callers still
|
|
12
|
-
# carry their own resolution - `issue-fetcher.sh` resolves per-account token keys
|
|
13
|
-
# this helper does not model yet - so this is where new callers go, not a
|
|
14
|
-
# consolidation that has already happened.
|
|
15
11
|
# Worse, the part most worth getting right is the part most easily retyped badly -
|
|
16
|
-
# the token goes to curl through a
|
|
17
|
-
#
|
|
18
|
-
#
|
|
12
|
+
# the token goes to curl through a config file so it never reaches argv, a log,
|
|
13
|
+
# or `ps`. A second-hand copy of that idiom is a leak waiting for the first
|
|
14
|
+
# person who simplifies it.
|
|
15
|
+
#
|
|
16
|
+
# Host and token are now one answer rather than two lookups: `service-account.sh`
|
|
17
|
+
# decides which account covers the host being called and hands out that account's
|
|
18
|
+
# token for that host only. The token never reaches a shell variable here -
|
|
19
|
+
# `jira_api` asks for a curl config per call - so a stray `set -x` or an error
|
|
20
|
+
# trace has nothing to print.
|
|
19
21
|
#
|
|
20
22
|
# Sourced, never executed. The leading underscore marks it: it is a library for
|
|
21
23
|
# the scripts beside it, not a command.
|
|
22
24
|
#
|
|
23
25
|
# . "$(dirname "$0")/_jira-auth.sh"
|
|
24
|
-
# jira_auth_resolve || exit 4 # sets JIRA_API_HOST
|
|
26
|
+
# jira_auth_resolve || exit 4 # sets JIRA_API_HOST
|
|
25
27
|
# jira_api GET /rest/api/2/myself
|
|
26
28
|
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
29
|
+
# What the caller may still say, and what each now means to the resolver:
|
|
30
|
+
# $JIRA_HOST, $ACCOUNT_JIRA_HOST the destination; an account must cover it
|
|
31
|
+
# $JIRA_TOKEN a credential from the environment
|
|
32
|
+
# $JIRA_TOKEN_KEY, $ACCOUNT_JIRA_TOKEN_KEY a store item name; the account
|
|
33
|
+
# holding it answers
|
|
32
34
|
#
|
|
33
|
-
# Exit contract: `jira_auth_resolve` returns 0 when
|
|
34
|
-
# did not, having already said which on
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
# a
|
|
35
|
+
# Exit contract: `jira_auth_resolve` returns 0 when the host and an account for
|
|
36
|
+
# it both resolved, and 4 when either did not, having already said which on
|
|
37
|
+
# stderr. 4 is the code both original callers used for "could not resolve", so
|
|
38
|
+
# nothing downstream changes meaning. jq is no longer involved, so the old 3
|
|
39
|
+
# ("a value had to come from prefs and jq is not installed") can no longer
|
|
40
|
+
# happen; a caller testing for it will simply never see it.
|
|
38
41
|
|
|
39
42
|
# shellcheck shell=bash
|
|
40
43
|
|
|
41
|
-
#
|
|
42
|
-
|
|
43
|
-
JIRA_AUTH_PREFS="${JIRA_AUTH_PREFS:-${MULTI_AGENT_PREFS:-$HOME/.claude/multi-agent-preferences.json}}"
|
|
44
|
-
|
|
45
|
-
_jira_auth_pref() { # _jira_auth_pref <jq path> -> value or empty
|
|
46
|
-
[ -f "$JIRA_AUTH_PREFS" ] || { printf ''; return 0; }
|
|
47
|
-
# Without jq this printed empty and returned 0, so "no jq" and "key not set"
|
|
48
|
-
# were the same answer and the caller went on to authenticate with nothing -
|
|
49
|
-
# surfacing much later as a 401 that blames the credential.
|
|
50
|
-
if ! command -v jq >/dev/null 2>&1; then
|
|
51
|
-
echo "jq not found - cannot read $JIRA_AUTH_PREFS (install: brew install jq)" >&2
|
|
52
|
-
printf ''
|
|
53
|
-
return 3
|
|
54
|
-
fi
|
|
55
|
-
jq -r "$1 // empty" "$JIRA_AUTH_PREFS" 2>/dev/null || printf ''
|
|
56
|
-
}
|
|
44
|
+
# shellcheck source=_service-account.sh
|
|
45
|
+
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/_service-account.sh"
|
|
57
46
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return
|
|
47
|
+
# The selectors the environment asked for, as resolver arguments.
|
|
48
|
+
_jira_auth_selectors() {
|
|
49
|
+
local host="${JIRA_HOST:-${ACCOUNT_JIRA_HOST:-}}"
|
|
50
|
+
local item="${JIRA_TOKEN_KEY:-${ACCOUNT_JIRA_TOKEN_KEY:-}}"
|
|
51
|
+
[ -n "$host" ] && printf '%s\n%s\n' "--host" "$host"
|
|
52
|
+
[ -n "$item" ] && printf '%s\n%s\n' "--item" "$item"
|
|
53
|
+
return 0
|
|
65
54
|
}
|
|
66
55
|
|
|
67
56
|
jira_auth_resolve() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
local -a sel=()
|
|
58
|
+
while IFS= read -r line; do [ -n "$line" ] && sel+=("$line"); done < <(_jira_auth_selectors)
|
|
59
|
+
|
|
60
|
+
JIRA_API_HOST="$(sa_host jira "${sel[@]+"${sel[@]}"}")" || {
|
|
61
|
+
echo "ERR: no Jira account for this run: $(sa_explain)" >&2
|
|
62
|
+
return 4
|
|
63
|
+
}
|
|
72
64
|
if [ -z "$JIRA_API_HOST" ]; then
|
|
73
|
-
echo "ERR:
|
|
65
|
+
echo "ERR: the Jira account names no host; run /multi-agent:setup" >&2
|
|
74
66
|
return 4
|
|
75
67
|
fi
|
|
76
|
-
|
|
77
|
-
JIRA_API_HOST="${JIRA_API_HOST#https://}"
|
|
78
|
-
JIRA_API_HOST="${JIRA_API_HOST#http://}"
|
|
79
|
-
JIRA_API_HOST="${JIRA_API_HOST%/}"
|
|
80
|
-
|
|
81
|
-
JIRA_API_TOKEN="${JIRA_TOKEN:-}"
|
|
82
|
-
if [ -z "$JIRA_API_TOKEN" ]; then
|
|
83
|
-
local key store
|
|
84
|
-
key="${JIRA_TOKEN_KEY:-${ACCOUNT_JIRA_TOKEN_KEY:-}}"
|
|
85
|
-
[ -n "$key" ] || key="$(_jira_auth_pref '.global.keychainMapping.jira')" || return $?
|
|
86
|
-
if [ -z "$key" ]; then
|
|
87
|
-
echo "ERR: no Jira token: set JIRA_TOKEN or map prefs .global.keychainMapping.jira" >&2
|
|
88
|
-
return 4
|
|
89
|
-
fi
|
|
90
|
-
store="$(_jira_auth_store)" || {
|
|
91
|
-
echo "ERR: credential-store.sh not found next to lib/ or in ~/.claude/lib" >&2
|
|
92
|
-
return 4
|
|
93
|
-
}
|
|
94
|
-
JIRA_API_TOKEN="$(bash "$store" get "$key" 2>/dev/null || printf '')"
|
|
95
|
-
if [ -z "$JIRA_API_TOKEN" ]; then
|
|
96
|
-
echo "ERR: Jira token not in the credential store under: $key" >&2
|
|
97
|
-
return 4
|
|
98
|
-
fi
|
|
99
|
-
fi
|
|
68
|
+
JIRA_AUTH_SELECTORS=("${sel[@]+"${sel[@]}"}")
|
|
100
69
|
return 0
|
|
101
70
|
}
|
|
102
71
|
|
|
103
|
-
# The token reaches curl only through a -K config on process substitution: never
|
|
104
|
-
# argv, never a log, never `ps`. Every caller goes through here so that stays
|
|
105
|
-
# true in one place instead of three.
|
|
106
|
-
_jira_auth_cfg() { printf 'header = "Authorization: Bearer %s"\n' "$1"; }
|
|
107
|
-
|
|
108
72
|
jira_api() { # jira_api <METHOD> <path> [curl args...]
|
|
109
|
-
local method="$1" path="$2"
|
|
110
|
-
|
|
73
|
+
local method="$1" path="$2" cfg
|
|
74
|
+
shift 2
|
|
75
|
+
cfg="$(sa_cfg jira "https://$JIRA_API_HOST$path" bearer \
|
|
76
|
+
"${JIRA_AUTH_SELECTORS[@]+"${JIRA_AUTH_SELECTORS[@]}"}")" || {
|
|
77
|
+
echo "ERR: $(sa_explain)" >&2
|
|
78
|
+
return 4
|
|
79
|
+
}
|
|
80
|
+
# The URL and the scheme lock live in the config, so they cannot be separated
|
|
81
|
+
# from the header between the check and the request.
|
|
82
|
+
curl -sS -m 30 --config "$cfg" \
|
|
111
83
|
-H "Content-Type: application/json" \
|
|
112
|
-
-X "$method" "
|
|
84
|
+
-X "$method" "$@"
|
|
113
85
|
}
|