@event4u/agent-config 8.11.0 → 8.13.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/.claude-plugin/marketplace.json +1 -1
- package/AGENTS.md +1 -0
- package/CHANGELOG.md +64 -266
- package/README.md +2 -2
- package/dist/agent-src/commands/pr/create.md +26 -0
- package/dist/agent-src/commands/team/adversarial.md +96 -0
- package/dist/agent-src/commands/team/delegate.md +109 -0
- package/dist/agent-src/commands/team/review.md +84 -0
- package/dist/agent-src/commands/team/status.md +92 -0
- package/dist/agent-src/commands/team.md +147 -0
- package/dist/agent-src/contexts/execution/roadmap-ci-steps-mechanics.md +117 -0
- package/dist/agent-src/contexts/execution/roadmap-process-loop.md +106 -94
- package/dist/agent-src/rules/architecture.md +6 -51
- package/dist/agent-src/rules/code-comment-discipline.md +10 -94
- package/dist/agent-src/rules/decision-revisit-gate.md +9 -77
- package/dist/agent-src/rules/improve-before-implement.md +8 -65
- package/dist/agent-src/rules/no-roadmap-references.md +13 -77
- package/dist/agent-src/rules/persona-governance.md +5 -47
- package/dist/agent-src/rules/provider-lifecycle-discipline.md +6 -32
- package/dist/agent-src/rules/roadmap-ci-steps-policy.md +21 -104
- package/dist/agent-src/rules/untrusted-input-defense.md +3 -75
- package/dist/agent-src/skills/agent-docs-writing/SKILL.md +83 -0
- package/dist/agent-src/skills/decision-review/SKILL.md +86 -0
- package/dist/agent-src/skills/module-detect-on-the-fly/SKILL.md +58 -1
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/contexts/knowledge-card.md +12 -0
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +159 -21
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +3 -3
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +11 -6
- package/dist/discovery/trust-report.md +2 -2
- package/dist/discovery/workspaces.json +10 -5
- package/dist/install/install.mjs +38 -0
- package/dist/mcp/registry-manifest.json +2 -2
- package/dist/router.json +1 -1
- package/dist/server/schemas/settings.js +7 -0
- package/dist/server/schemas/settings.js.map +1 -1
- package/docs/CLAIMS.md +31 -3
- package/docs/architecture.md +2 -2
- package/docs/archive/CHANGELOG-pre-8.12.0.md +304 -0
- package/docs/benchmark.md +39 -0
- package/docs/catalog.md +10 -4
- package/docs/command-flows.md +6 -1
- package/docs/contracts/ai-council-config.md +9 -4
- package/docs/contracts/ai-team-config.md +191 -0
- package/docs/contracts/command-clusters.md +1 -0
- package/docs/contracts/persona-schema.md +49 -0
- package/docs/contracts/provider-lifecycle.md +29 -4
- package/docs/decisions/ADR-120-council-chairman-mode.md +70 -0
- package/docs/decisions/ADR-121-knowledge-sensitivity-classes.md +90 -0
- package/docs/decisions/INDEX.md +2 -0
- package/docs/design/council-vs-solo-baseline.md +92 -0
- package/docs/design/utilization-window-criteria.md +51 -0
- package/docs/featured-skills.md +1 -1
- package/docs/getting-started-by-role.md +3 -1
- package/docs/getting-started.md +31 -1
- package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +68 -0
- package/docs/guidelines/agent-infra/rule-body-migration-inventory.md +241 -0
- package/docs/guidelines/agent-infra/untrusted-input-spotlighting.md +80 -3
- package/docs/guidelines/code-clarity.md +86 -1
- package/docs/maintainers/branch-protection.md +105 -0
- package/docs/maintainers/system-map.md +85 -0
- package/docs/proof.md +15 -4
- package/package.json +1 -1
- package/src/config/agent-settings.template.yml +49 -0
- package/src/scripts/_cli/cmd_doctor.ts +291 -1
- package/src/scripts/_lib/claude_plugin.ts +39 -4
- package/src/scripts/_lib/knowledge_global.ts +44 -0
- package/src/scripts/_lib/knowledge_global_promote.ts +150 -0
- package/src/scripts/ai_council/orchestrator.ts +188 -1
- package/src/scripts/ai_team/config.ts +162 -0
- package/src/scripts/bench_persona_placebo.ts +308 -0
- package/src/scripts/bench_quality_rerun.ts +357 -0
- package/src/scripts/build_proof.ts +9 -0
- package/src/scripts/check_artefact_count_messaging.ts +56 -0
- package/src/scripts/check_knowledge_cards.ts +33 -4
- package/src/scripts/check_portability.ts +1 -0
- package/src/scripts/complexity_report.ts +776 -0
- package/src/scripts/consumer_matrix.ts +251 -12
- package/src/scripts/council_cli.ts +56 -1
- package/src/scripts/explain_run.ts +593 -0
- package/src/scripts/install.ts +39 -0
- package/src/scripts/knowledge_global_cli.ts +234 -45
- package/src/scripts/rule_backlinks.ts +350 -0
- package/src/server/schemas/settings.ts +17 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: inherit
|
|
3
|
+
name: team-adversarial
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
pack: product-reasoning
|
|
6
|
+
tier: 2
|
|
7
|
+
visibility: internal
|
|
8
|
+
skills: [adversarial-review]
|
|
9
|
+
description: Thin wrapper — adversarial cross-model review on a named focus via the official plugin (/codex:adversarial-review). Escalation rung above the single-model adversarial-review skill.
|
|
10
|
+
cluster: team
|
|
11
|
+
sub: adversarial
|
|
12
|
+
suggestion:
|
|
13
|
+
eligible: true
|
|
14
|
+
trigger_description: "adversarial cross-model review, attack this change with a second model, stress-test the diff with GPT, hostile review by another model"
|
|
15
|
+
trigger_context: "ai_team.enabled is true AND single-model self-review found nothing or the stakes are high — escalate the Attack-Defend-Revise frame to a second strong model"
|
|
16
|
+
workspaces:
|
|
17
|
+
- agent-config-maintainer
|
|
18
|
+
packs:
|
|
19
|
+
- product-reasoning
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# /team adversarial
|
|
23
|
+
|
|
24
|
+
## Instructions
|
|
25
|
+
|
|
26
|
+
Thin wrapper: adversarial cross-model review on a named focus. Same
|
|
27
|
+
Attack-Defend-Revise frame as the `adversarial-review` skill, different
|
|
28
|
+
attacker — a second strong model with repo access instead of the host model
|
|
29
|
+
critiquing itself. Use it as the **escalation rung**: single-model
|
|
30
|
+
self-review found nothing, or the stakes are high.
|
|
31
|
+
|
|
32
|
+
### 1. Gate — `ai_team.enabled`
|
|
33
|
+
|
|
34
|
+
Read `ai_team.enabled` from `.agent-settings.yml`. Missing or `false` →
|
|
35
|
+
print the enable pointer from `/team` (master) § "Default-off gate" and
|
|
36
|
+
**STOP**.
|
|
37
|
+
|
|
38
|
+
### 2. Gate — plugin presence (fail closed)
|
|
39
|
+
|
|
40
|
+
On a Claude Code host, verify the official plugin is installed. Absent →
|
|
41
|
+
print the fail-closed block from `/team` (master) § "Fail-closed contract"
|
|
42
|
+
(`agent-config doctor --check team`) and **STOP**. Never reimplement the
|
|
43
|
+
adversarial review inline; never silently no-op.
|
|
44
|
+
|
|
45
|
+
On a non-Claude-Code host: state that the cross-model adversarial path
|
|
46
|
+
currently requires the Claude Code plugin, offer the single-model
|
|
47
|
+
`adversarial-review` skill as the available rung, and stop.
|
|
48
|
+
|
|
49
|
+
### 3. Resolve the focus
|
|
50
|
+
|
|
51
|
+
The user invoked `/team adversarial <focus>` — e.g. `security`,
|
|
52
|
+
`error handling`, `the tenant-scope change in UserService`. If no focus was
|
|
53
|
+
supplied, ask (one question per turn, per `ask-when-uncertain`):
|
|
54
|
+
|
|
55
|
+
> What should the adversarial review attack?
|
|
56
|
+
>
|
|
57
|
+
> 1. A named surface (e.g. security, error handling, concurrency)
|
|
58
|
+
> 2. A specific file / change (name it)
|
|
59
|
+
> 3. Cancel
|
|
60
|
+
|
|
61
|
+
### 4. Delegate
|
|
62
|
+
|
|
63
|
+
Invoke the plugin with the focus passed through unchanged:
|
|
64
|
+
|
|
65
|
+
- `/team adversarial <focus>` → `/codex:adversarial-review <focus>`
|
|
66
|
+
|
|
67
|
+
### 5. Return the findings verbatim
|
|
68
|
+
|
|
69
|
+
Render the plugin's findings unchanged — do not soften, dedupe, or re-rank.
|
|
70
|
+
The call counts into the `cli_call_budget.max_calls_per_day.openai` quota;
|
|
71
|
+
on quota exhaustion surface the transport's refusal, do not retry.
|
|
72
|
+
|
|
73
|
+
## Output format
|
|
74
|
+
|
|
75
|
+
- The plugin's adversarial findings, verbatim.
|
|
76
|
+
- Gate failures print exactly one block (enable pointer or fail-closed
|
|
77
|
+
block) and stop.
|
|
78
|
+
|
|
79
|
+
## Do NOT
|
|
80
|
+
|
|
81
|
+
- Do NOT run when `ai_team.enabled` is false — enable pointer, stop.
|
|
82
|
+
- Do NOT reimplement the adversarial pass inline when the plugin is absent —
|
|
83
|
+
fail closed with the doctor pointer.
|
|
84
|
+
- Do NOT skip the free first rung reflexively — the single-model
|
|
85
|
+
`adversarial-review` skill costs nothing; escalate when it finds nothing
|
|
86
|
+
or the stakes justify a second model.
|
|
87
|
+
- Do NOT edit files, commit, push, or open a PR — read-only.
|
|
88
|
+
- Do NOT claim a defect-finding lift; the benchmark verdict is pending (see
|
|
89
|
+
`/team` master § "No-claims note").
|
|
90
|
+
|
|
91
|
+
## See also
|
|
92
|
+
|
|
93
|
+
- `adversarial-review` skill — the single-model Attack-Defend-Revise frame
|
|
94
|
+
this escalates.
|
|
95
|
+
- `/team review` — the non-adversarial cross-model review.
|
|
96
|
+
- `/team` — master orchestrator: gates, boundary table vs `/council`.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: inherit
|
|
3
|
+
name: team-delegate
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
pack: product-reasoning
|
|
6
|
+
tier: 2
|
|
7
|
+
visibility: internal
|
|
8
|
+
description: Thin wrapper — hand a task to the second model as a native worker via the official plugin (/codex:rescue). The only write-access wrapper; double-gated behind ai_team.allow_delegate.
|
|
9
|
+
cluster: team
|
|
10
|
+
sub: delegate
|
|
11
|
+
suggestion:
|
|
12
|
+
eligible: false
|
|
13
|
+
rationale: "Only write-access wrapper in the family; delegation of write access must be explicitly typed by the user, never suggested."
|
|
14
|
+
workspaces:
|
|
15
|
+
- agent-config-maintainer
|
|
16
|
+
packs:
|
|
17
|
+
- product-reasoning
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# /team delegate
|
|
21
|
+
|
|
22
|
+
## Instructions
|
|
23
|
+
|
|
24
|
+
Thin wrapper: hand a task to the second model as a **native worker** in the
|
|
25
|
+
repo. On Claude Code hosts it delegates to the official plugin's
|
|
26
|
+
`/codex:rescue`. This is the **only wrapper that delegates write access**,
|
|
27
|
+
so it carries a second opt-in on top of the family gate.
|
|
28
|
+
|
|
29
|
+
### 1. Gate — `ai_team.enabled`
|
|
30
|
+
|
|
31
|
+
Read `ai_team.enabled` from `.agent-settings.yml`. Missing or `false` →
|
|
32
|
+
print the enable pointer from `/team` (master) § "Default-off gate" and
|
|
33
|
+
**STOP**.
|
|
34
|
+
|
|
35
|
+
### 2. Gate — `ai_team.allow_delegate` (second opt-in)
|
|
36
|
+
|
|
37
|
+
Read `ai_team.allow_delegate`. Missing or `false` (the shipped default) →
|
|
38
|
+
refuse with the enable pointer and **STOP**:
|
|
39
|
+
|
|
40
|
+
> `/team delegate` is disabled (`ai_team.allow_delegate: false`, the
|
|
41
|
+
> default). It is the only team-mode wrapper that hands **write access** to
|
|
42
|
+
> the second model, so it needs its own opt-in:
|
|
43
|
+
>
|
|
44
|
+
> ```yaml
|
|
45
|
+
> ai_team:
|
|
46
|
+
> enabled: true
|
|
47
|
+
> allow_delegate: true
|
|
48
|
+
> ```
|
|
49
|
+
>
|
|
50
|
+
> Key reference: `docs/contracts/ai-team-config.md`.
|
|
51
|
+
|
|
52
|
+
### 3. Gate — plugin presence (fail closed)
|
|
53
|
+
|
|
54
|
+
On a Claude Code host, verify the official plugin is installed. Absent →
|
|
55
|
+
print the fail-closed block from `/team` (master) § "Fail-closed contract"
|
|
56
|
+
(`agent-config doctor --check team`) and **STOP**. Never reimplement the
|
|
57
|
+
worker inline; never silently no-op.
|
|
58
|
+
|
|
59
|
+
On a non-Claude-Code host: there is **no** delegate fallback — the
|
|
60
|
+
worker-via-bundle path is deferred by a recorded internal null. State that
|
|
61
|
+
delegation requires the Claude Code plugin and stop.
|
|
62
|
+
|
|
63
|
+
### 4. Resolve the task
|
|
64
|
+
|
|
65
|
+
The user invoked `/team delegate <task>`. If the task text is missing, ask
|
|
66
|
+
(one question per turn, per `ask-when-uncertain`) for a one-line task
|
|
67
|
+
description; do not invent scope.
|
|
68
|
+
|
|
69
|
+
### 5. Delegate
|
|
70
|
+
|
|
71
|
+
Invoke the plugin with the task passed through unchanged:
|
|
72
|
+
|
|
73
|
+
- `/team delegate <task>` → `/codex:rescue <task>`
|
|
74
|
+
|
|
75
|
+
The Codex worker runs natively in the working tree under the user's
|
|
76
|
+
subscription. The call counts into the
|
|
77
|
+
`cli_call_budget.max_calls_per_day.openai` quota; on exhaustion surface the
|
|
78
|
+
transport's refusal, do not retry.
|
|
79
|
+
|
|
80
|
+
### 6. Return the result verbatim
|
|
81
|
+
|
|
82
|
+
Render the plugin's result unchanged. Any edits the worker made are in the
|
|
83
|
+
working tree for the user to review — this wrapper never commits, pushes, or
|
|
84
|
+
opens a PR on top of them.
|
|
85
|
+
|
|
86
|
+
## Output format
|
|
87
|
+
|
|
88
|
+
- The plugin's rescue/delegation result, verbatim.
|
|
89
|
+
- Gate failures print exactly one block (enable pointer, allow_delegate
|
|
90
|
+
refusal, or fail-closed block) and stop.
|
|
91
|
+
|
|
92
|
+
## Do NOT
|
|
93
|
+
|
|
94
|
+
- Do NOT run when `ai_team.enabled` is false — enable pointer, stop.
|
|
95
|
+
- Do NOT run when `ai_team.allow_delegate` is false — refusal block, stop.
|
|
96
|
+
Never treat `enabled: true` alone as delegate authorization.
|
|
97
|
+
- Do NOT reimplement the worker inline when the plugin is absent — fail
|
|
98
|
+
closed with the doctor pointer.
|
|
99
|
+
- Do NOT commit, push, or open a PR over the worker's edits — review is the
|
|
100
|
+
user's call.
|
|
101
|
+
- Do NOT claim a productivity or quality lift; the benchmark verdict is
|
|
102
|
+
pending (see `/team` master § "No-claims note").
|
|
103
|
+
|
|
104
|
+
## See also
|
|
105
|
+
|
|
106
|
+
- `/team` — master orchestrator: gates, boundary table vs `/council`.
|
|
107
|
+
- `/team review` — the read-only default lens; prefer it unless the user
|
|
108
|
+
explicitly wants the second model to do the work.
|
|
109
|
+
- `docs/contracts/ai-team-config.md` — `ai_team.allow_delegate` semantics.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: inherit
|
|
3
|
+
name: team-review
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
pack: product-reasoning
|
|
6
|
+
tier: 2
|
|
7
|
+
visibility: internal
|
|
8
|
+
description: Thin wrapper — cross-model review of the current diff via the official plugin (/codex:review). Gated on ai_team.enabled; fails closed when the plugin is absent.
|
|
9
|
+
cluster: team
|
|
10
|
+
sub: review
|
|
11
|
+
suggestion:
|
|
12
|
+
eligible: true
|
|
13
|
+
trigger_description: "team review, second model review, cross-model review of my changes, GPT drüberschauen lassen, review the diff with another strong model"
|
|
14
|
+
trigger_context: "ai_team.enabled is true AND there is an uncommitted / staged diff the user wants a second strong model to review with repo access"
|
|
15
|
+
workspaces:
|
|
16
|
+
- agent-config-maintainer
|
|
17
|
+
packs:
|
|
18
|
+
- product-reasoning
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# /team review
|
|
22
|
+
|
|
23
|
+
## Instructions
|
|
24
|
+
|
|
25
|
+
Thin wrapper: cross-model review of the current change. On Claude Code hosts
|
|
26
|
+
it delegates verbatim to the official plugin's `/codex:review` — this wrapper
|
|
27
|
+
owns only the governance gates around it.
|
|
28
|
+
|
|
29
|
+
### 1. Gate — `ai_team.enabled`
|
|
30
|
+
|
|
31
|
+
Read `ai_team.enabled` from `.agent-settings.yml`. Missing or `false` →
|
|
32
|
+
print the enable pointer from `/team` (master) § "Default-off gate" and
|
|
33
|
+
**STOP**. No plugin probe, no partial run.
|
|
34
|
+
|
|
35
|
+
### 2. Gate — plugin presence (fail closed)
|
|
36
|
+
|
|
37
|
+
On a Claude Code host, verify the official plugin is installed (its
|
|
38
|
+
`/codex:*` commands are available). Absent → print the fail-closed block
|
|
39
|
+
from `/team` (master) § "Fail-closed contract" — the remediation path is
|
|
40
|
+
`agent-config doctor --check team` — and **STOP**. Never reimplement the
|
|
41
|
+
review inline; never silently no-op.
|
|
42
|
+
|
|
43
|
+
On a non-Claude-Code host: the repo-diff-bundle fallback is a later phase.
|
|
44
|
+
State that team review currently requires the Claude Code plugin, point to
|
|
45
|
+
`agent-config doctor --check team`, and stop.
|
|
46
|
+
|
|
47
|
+
### 3. Delegate
|
|
48
|
+
|
|
49
|
+
Invoke the plugin:
|
|
50
|
+
|
|
51
|
+
- `/team review` → `/codex:review`
|
|
52
|
+
- `/team review --background` → `/codex:review --background`
|
|
53
|
+
|
|
54
|
+
Pass the flag through unchanged. Scope resolution (what counts as "the
|
|
55
|
+
diff") is the plugin's job — do not pre-compute or filter the diff here.
|
|
56
|
+
|
|
57
|
+
### 4. Return the review verbatim
|
|
58
|
+
|
|
59
|
+
Render the plugin's review output unchanged. Do not summarize, re-rank, or
|
|
60
|
+
soften findings. The call counts into the
|
|
61
|
+
`cli_call_budget.max_calls_per_day.openai` quota (one subscription, one
|
|
62
|
+
counter); if the quota is exhausted the transport refuses — surface that
|
|
63
|
+
refusal, do not retry.
|
|
64
|
+
|
|
65
|
+
## Output format
|
|
66
|
+
|
|
67
|
+
- The plugin's review, verbatim.
|
|
68
|
+
- Nothing else on success; gate failures print exactly one block (enable
|
|
69
|
+
pointer or fail-closed block) and stop.
|
|
70
|
+
|
|
71
|
+
## Do NOT
|
|
72
|
+
|
|
73
|
+
- Do NOT run when `ai_team.enabled` is false — enable pointer, stop.
|
|
74
|
+
- Do NOT reimplement the review inline when the plugin is absent — fail
|
|
75
|
+
closed with the doctor pointer.
|
|
76
|
+
- Do NOT edit files, commit, push, or open a PR — this wrapper is read-only.
|
|
77
|
+
- Do NOT claim a review-quality lift; the benchmark verdict is pending (see
|
|
78
|
+
`/team` master § "No-claims note").
|
|
79
|
+
|
|
80
|
+
## See also
|
|
81
|
+
|
|
82
|
+
- `/team` — master orchestrator: gates, boundary table vs `/council`.
|
|
83
|
+
- `/team adversarial` — focused adversarial variant.
|
|
84
|
+
- `adversarial-review` skill — single-model self-review, the free first rung.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: inherit
|
|
3
|
+
name: team-status
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
pack: product-reasoning
|
|
6
|
+
tier: 2
|
|
7
|
+
visibility: internal
|
|
8
|
+
description: Thin wrapper — plugin job status via /codex:status plus a ledger line with today's cli_call_budget openai count. Gated on ai_team.enabled; fails closed when the plugin is absent.
|
|
9
|
+
cluster: team
|
|
10
|
+
sub: status
|
|
11
|
+
suggestion:
|
|
12
|
+
eligible: false
|
|
13
|
+
rationale: "Read-only state query; users invoke it explicitly when they want job or quota status — suggesting it adds noise."
|
|
14
|
+
workspaces:
|
|
15
|
+
- agent-config-maintainer
|
|
16
|
+
packs:
|
|
17
|
+
- product-reasoning
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# /team status
|
|
21
|
+
|
|
22
|
+
## Instructions
|
|
23
|
+
|
|
24
|
+
Thin wrapper: team-mode status. On Claude Code hosts it delegates to the
|
|
25
|
+
official plugin's `/codex:status` and appends **our** quota ledger line —
|
|
26
|
+
the one piece of state the plugin does not know about.
|
|
27
|
+
|
|
28
|
+
### 1. Gate — `ai_team.enabled`
|
|
29
|
+
|
|
30
|
+
Read `ai_team.enabled` from `.agent-settings.yml`. Missing or `false` →
|
|
31
|
+
print the enable pointer from `/team` (master) § "Default-off gate" and
|
|
32
|
+
**STOP**.
|
|
33
|
+
|
|
34
|
+
### 2. Gate — plugin presence (fail closed)
|
|
35
|
+
|
|
36
|
+
On a Claude Code host, verify the official plugin is installed. Absent →
|
|
37
|
+
print the fail-closed block from `/team` (master) § "Fail-closed contract"
|
|
38
|
+
(`agent-config doctor --check team`) and **STOP** — never a silent no-op.
|
|
39
|
+
|
|
40
|
+
On a non-Claude-Code host: state that plugin job status requires the Claude
|
|
41
|
+
Code plugin, then still print the ledger line (Step 4) — the quota counter
|
|
42
|
+
is ours and host-independent.
|
|
43
|
+
|
|
44
|
+
### 3. Delegate
|
|
45
|
+
|
|
46
|
+
Invoke the plugin:
|
|
47
|
+
|
|
48
|
+
- `/team status` → `/codex:status`
|
|
49
|
+
|
|
50
|
+
Render its job/status output verbatim.
|
|
51
|
+
|
|
52
|
+
### 4. Append the quota ledger line
|
|
53
|
+
|
|
54
|
+
Read today's openai CLI-call count from the shared counter state at
|
|
55
|
+
`~/.event4u/agent-config/cli-calls.json` (daily UTC reset — the same file
|
|
56
|
+
the council's CLI transport maintains for
|
|
57
|
+
`cli_call_budget.max_calls_per_day.openai`). Append one line:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Ledger: <N> openai CLI calls today (UTC) · cap: <max_calls_per_day or "unset">
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- `<N>` = today's openai count from the counter file; `0` when the file or
|
|
64
|
+
today's entry is absent.
|
|
65
|
+
- `<cap>` = `ai_team.max_calls_per_day` when set; fall back to
|
|
66
|
+
`cli_call_budget.max_calls_per_day.openai`; `unset` when neither exists.
|
|
67
|
+
- One counter, one subscription — never introduce a parallel team-only
|
|
68
|
+
counting file.
|
|
69
|
+
|
|
70
|
+
## Output format
|
|
71
|
+
|
|
72
|
+
- The plugin's status output, verbatim.
|
|
73
|
+
- Exactly one trailing `Ledger:` line in the format above.
|
|
74
|
+
- Gate failures print exactly one block (enable pointer or fail-closed
|
|
75
|
+
block) and stop.
|
|
76
|
+
|
|
77
|
+
## Do NOT
|
|
78
|
+
|
|
79
|
+
- Do NOT run when `ai_team.enabled` is false — enable pointer, stop.
|
|
80
|
+
- Do NOT fabricate a count when the counter file is unreadable — print
|
|
81
|
+
`Ledger: unavailable (<reason>)` instead of a guessed number.
|
|
82
|
+
- Do NOT write to `cli-calls.json` — the transport owns the counter; this
|
|
83
|
+
wrapper is read-only.
|
|
84
|
+
- Do NOT reimplement job tracking inline when the plugin is absent — fail
|
|
85
|
+
closed with the doctor pointer (the ledger line alone is still printed on
|
|
86
|
+
non-Claude-Code hosts, per Step 2).
|
|
87
|
+
|
|
88
|
+
## See also
|
|
89
|
+
|
|
90
|
+
- `/team` — master orchestrator: gates, boundary table vs `/council`.
|
|
91
|
+
- `docs/contracts/ai-team-config.md` — `ai_team.max_calls_per_day`.
|
|
92
|
+
- `ai-council` skill — the shared CLI transport that maintains the counter.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: inherit
|
|
3
|
+
name: team
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
pack: product-reasoning
|
|
6
|
+
intent: "Route a cross-model team-mode request (review, adversarial, delegate, status) to the official plugin under ai_team governance"
|
|
7
|
+
routes_to: [team-review, team-adversarial, team-delegate, team-status]
|
|
8
|
+
replaces: []
|
|
9
|
+
tier: 2
|
|
10
|
+
visibility: internal
|
|
11
|
+
description: Team orchestrator — cross-model depth review (one strong model builds, a second reviews the real diff); routes to review, adversarial, delegate, status
|
|
12
|
+
cluster: team
|
|
13
|
+
type: orchestrator
|
|
14
|
+
suggestion:
|
|
15
|
+
eligible: true
|
|
16
|
+
trigger_description: "second model, GPT drüberschauen lassen, cross-model review, review gate, let another strong model check the diff, team review"
|
|
17
|
+
trigger_context: "ai_team.enabled is true AND the user wants a second strong model to review the actual working-tree diff with repo access (depth) — not a neutral artefact opinion (that is /council)"
|
|
18
|
+
workspaces:
|
|
19
|
+
- agent-config-maintainer
|
|
20
|
+
packs:
|
|
21
|
+
- product-reasoning
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# /team
|
|
25
|
+
|
|
26
|
+
Top-level orchestrator for the `/team` family — governed **team mode**: the
|
|
27
|
+
depth complement to the council. One strong model builds; a second strong
|
|
28
|
+
model reviews the **real diff with repo access** and iterates. On Claude Code
|
|
29
|
+
hosts every sub-command is a **thin delegation** to the official
|
|
30
|
+
`openai/codex-plugin-cc` plugin (`/codex:*`) — this family adds governance
|
|
31
|
+
(default-off gate, delegate opt-in, quota visibility, fail-closed setup
|
|
32
|
+
checks), never a reimplementation.
|
|
33
|
+
|
|
34
|
+
## What team mode is — and is not
|
|
35
|
+
|
|
36
|
+
- **Is:** a single strong reviewer running inside the working tree via the
|
|
37
|
+
Codex CLI under the user's subscription. It reads git state itself,
|
|
38
|
+
iterates build → review → fix, and returns an opinionated review of the
|
|
39
|
+
actual change.
|
|
40
|
+
- **Is not:** the council. The council is breadth under a neutrality
|
|
41
|
+
contract — N members see the artefact text only, never the repo, never the
|
|
42
|
+
host's framing. Team mode is the inverse on every axis (table below). The
|
|
43
|
+
council's neutrality contract is untouched by team mode.
|
|
44
|
+
|
|
45
|
+
## Boundary — /council vs. /team
|
|
46
|
+
|
|
47
|
+
| Axis | `/council` | `/team` |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| Shape | Breadth — N members, one round by default | Depth — one strong reviewer, iterated |
|
|
50
|
+
| Context | Artefact text only; never the repo, never host framing (neutrality contract) | Full repo access — the reviewer reads git state itself |
|
|
51
|
+
| Cost model | Billable API members by default; USD cost gate | Subscription-authed Codex CLI; daily call quota (`cli_call_budget.max_calls_per_day.openai`) |
|
|
52
|
+
| Model choice | Mid-tier default (cost decision) | Strongest available — `ai_team.model: 'auto'` defers to the CLI default |
|
|
53
|
+
| Write access | Never (text only; one opt-in PR comment under `pr`) | Read-only by default; `/team delegate` is the single write path, behind a second opt-in |
|
|
54
|
+
|
|
55
|
+
## Default-off gate — check FIRST, before anything else
|
|
56
|
+
|
|
57
|
+
Read `ai_team.enabled` from `.agent-settings.yml`. Missing key or `false`
|
|
58
|
+
(the shipped default) → print the enable pointer and **STOP**. Do not route,
|
|
59
|
+
do not suggest a sub-command, do not probe for the plugin:
|
|
60
|
+
|
|
61
|
+
> Team mode is disabled (`ai_team.enabled: false`, the default).
|
|
62
|
+
> Enable it in `.agent-settings.yml`:
|
|
63
|
+
>
|
|
64
|
+
> ```yaml
|
|
65
|
+
> ai_team:
|
|
66
|
+
> enabled: true
|
|
67
|
+
> ```
|
|
68
|
+
>
|
|
69
|
+
> Key reference: `docs/contracts/ai-team-config.md`. Then run
|
|
70
|
+
> `agent-config doctor --check team` to verify plugin + auth setup.
|
|
71
|
+
|
|
72
|
+
Every sub-command repeats this check independently — the gate holds even when
|
|
73
|
+
a wrapper is invoked directly.
|
|
74
|
+
|
|
75
|
+
## Sub-commands
|
|
76
|
+
|
|
77
|
+
| Sub-command | Delegates to (Claude Code) | Purpose |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| `/team review [--background]` | `/codex:review` | Cross-model review of the current working-tree / staged diff |
|
|
80
|
+
| `/team adversarial <focus>` | `/codex:adversarial-review` | Adversarial cross-model review on a named focus — the escalation rung above the single-model `adversarial-review` skill |
|
|
81
|
+
| `/team delegate <task>` | `/codex:rescue` | Hand a task to the second model as a native worker — the only write-access wrapper; gated behind `ai_team.allow_delegate` |
|
|
82
|
+
| `/team status` | `/codex:status` + ledger line | Plugin job status plus today's `cli_call_budget` openai count |
|
|
83
|
+
|
|
84
|
+
## Dispatch
|
|
85
|
+
|
|
86
|
+
1. Run the default-off gate above. Disabled → enable pointer, stop.
|
|
87
|
+
2. Parse the user's argument: `/team <sub-command> [args]`.
|
|
88
|
+
3. Look up the sub-command in the table above; load the routed file and
|
|
89
|
+
follow its `## Instructions` verbatim with the remaining args.
|
|
90
|
+
4. Unknown or missing sub-command → print the table and ask:
|
|
91
|
+
|
|
92
|
+
> 1. review — cross-model review of the real diff (optionally `--background`)
|
|
93
|
+
> 2. adversarial — adversarial cross-model review on a focus
|
|
94
|
+
> 3. delegate — hand a task to the second model (write access; second opt-in)
|
|
95
|
+
> 4. status — plugin jobs + today's call-quota ledger
|
|
96
|
+
|
|
97
|
+
## Fail-closed contract (all wrappers)
|
|
98
|
+
|
|
99
|
+
When the official plugin is absent on a Claude Code host, every wrapper
|
|
100
|
+
fails **closed** with the doctor remediation pointer — never a silent no-op,
|
|
101
|
+
never an inline reimplementation of the plugin:
|
|
102
|
+
|
|
103
|
+
> ❌ Team mode is enabled, but the official plugin is not installed on this
|
|
104
|
+
> Claude Code host. `/team <sub>` fails closed — it never reimplements the
|
|
105
|
+
> plugin inline and never silently no-ops.
|
|
106
|
+
>
|
|
107
|
+
> Run the guided check and follow its remediation block:
|
|
108
|
+
>
|
|
109
|
+
> ```bash
|
|
110
|
+
> agent-config doctor --check team
|
|
111
|
+
> ```
|
|
112
|
+
|
|
113
|
+
On non-Claude-Code hosts the fallback transport (repo-diff bundle via the
|
|
114
|
+
council's `OpenAICliClient`) is a later phase; until it lands, wrappers state
|
|
115
|
+
that plainly and stop — same fail-closed principle.
|
|
116
|
+
|
|
117
|
+
## No-claims note
|
|
118
|
+
|
|
119
|
+
The review-lift value of cross-model team review is **unproven** until the
|
|
120
|
+
pre-registered three-arm benchmark (team review vs. single-model adversarial
|
|
121
|
+
self-review vs. `council:pr`) has run. Never assert "two strong models catch
|
|
122
|
+
each other's errors", a defect-finding lift, or any quantified quality claim
|
|
123
|
+
in output, docs, or suggestions. Team mode is offered as a workflow, not as a
|
|
124
|
+
measured improvement.
|
|
125
|
+
|
|
126
|
+
## Rules
|
|
127
|
+
|
|
128
|
+
- **Do NOT commit, push, or open a PR.** `/team` produces text; the plugin's
|
|
129
|
+
review output is returned verbatim.
|
|
130
|
+
- **Do NOT chain sub-commands.** One `/team <sub>` per turn.
|
|
131
|
+
- **Write access exists only via `/team delegate`**, and only when
|
|
132
|
+
`ai_team.allow_delegate: true` (default `false`). Every other wrapper is
|
|
133
|
+
read-only.
|
|
134
|
+
- **Quota:** every team call counts into the existing
|
|
135
|
+
`cli_call_budget.max_calls_per_day.openai` bucket — one subscription, one
|
|
136
|
+
counter. No parallel counting system.
|
|
137
|
+
- If the user invokes `/team` with no argument, **show the menu** — do not
|
|
138
|
+
guess which sub-command they meant.
|
|
139
|
+
|
|
140
|
+
## See also
|
|
141
|
+
|
|
142
|
+
- `/council` — breadth under a neutrality contract; the complement, not the
|
|
143
|
+
competitor.
|
|
144
|
+
- `adversarial-review` skill — the free single-model first rung below
|
|
145
|
+
`/team adversarial`.
|
|
146
|
+
- `docs/contracts/ai-team-config.md` — the `ai_team` settings block
|
|
147
|
+
(`enabled`, `model`, `allow_delegate`, `max_calls_per_day`).
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Roadmap CI-Steps — Mechanics
|
|
2
|
+
|
|
3
|
+
Migrated body of the [`roadmap-ci-steps-policy`](../../rules/roadmap-ci-steps-policy.md)
|
|
4
|
+
rule (per P4 of `road-to-kernel-and-router.md`). Loaded by
|
|
5
|
+
[`roadmap-process-loop § 5` step 0](roadmap-process-loop.md#5-step-loop) and by
|
|
6
|
+
the rule's routing line. The Iron Law stays in the rule; this file carries the
|
|
7
|
+
pattern table, carve-outs, linter contract, inline-skip mechanics, and failure
|
|
8
|
+
modes.
|
|
9
|
+
|
|
10
|
+
## Forbidden step patterns (authoring + execution)
|
|
11
|
+
|
|
12
|
+
A step is **CI-shaped** when its text matches any of the patterns
|
|
13
|
+
below. Case-insensitive. Pattern matching is line-bounded — the
|
|
14
|
+
literal must appear inside the step's `- [ ]` line or its immediate
|
|
15
|
+
inline note (the next indented `<!-- … -->` or `(…)` annotation).
|
|
16
|
+
|
|
17
|
+
| Pattern | Example |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `task ci` | `Run task ci before the boundary` |
|
|
20
|
+
| `task ci-strict` | `task ci-strict release gate` |
|
|
21
|
+
| `task ci-fast` | `task ci-fast smoke` |
|
|
22
|
+
| `make test` | `Run make test on phase boundary` |
|
|
23
|
+
| `make ci` | `make ci pre-merge` |
|
|
24
|
+
| `npm run check` / `pnpm run check` / `yarn check` | `npm run check before commit` |
|
|
25
|
+
| `composer test` | `composer test on every phase` |
|
|
26
|
+
| `vendor/bin/phpunit` (whole-suite, no path arg) | `vendor/bin/phpunit` |
|
|
27
|
+
| `php artisan test` (no `--filter`) | `php artisan test` |
|
|
28
|
+
|
|
29
|
+
Targeted commands (`vendor/bin/phpstan analyse <module-path>` such as
|
|
30
|
+
`vendor/bin/phpstan analyse app/Modules/X` in Laravel,
|
|
31
|
+
`php artisan test --filter=…`, `npm run lint -- --fix path/`) are
|
|
32
|
+
**not** CI-shaped — they are narrow verifications, allowed regardless
|
|
33
|
+
of the setting.
|
|
34
|
+
|
|
35
|
+
## Carve-outs — when CI-shaped steps are still allowed
|
|
36
|
+
|
|
37
|
+
1. **New CI gate / smoke test / test file landed by this roadmap.**
|
|
38
|
+
Once-locally execution is mandatory under
|
|
39
|
+
[`verify-before-complete`](../../rules/verify-before-complete.md) carve-out
|
|
40
|
+
(see `templates/agent-settings.md` § `quality.local_auto_run`).
|
|
41
|
+
Mark the step with `<!-- carve-out: new-gate-verification -->`
|
|
42
|
+
on the same line; the linter and the execution loop both honour
|
|
43
|
+
the marker and let the step run.
|
|
44
|
+
2. **`quality.local_auto_run: true`.** Setting opt-in restores the
|
|
45
|
+
pre-policy behaviour — the linter no-ops and the execution loop
|
|
46
|
+
runs CI steps unmodified.
|
|
47
|
+
3. **Acceptance-criteria block at end of roadmap.** Final-gate prose
|
|
48
|
+
like "All quality gates pass (`task ci`)" inside an
|
|
49
|
+
`## Acceptance criteria` section is documentation, not an
|
|
50
|
+
executable step (no `- [ ]` checkbox in front of the literal).
|
|
51
|
+
Linter ignores; execution loop never reaches it as a step.
|
|
52
|
+
|
|
53
|
+
## Authoring — linter blocks at write-time
|
|
54
|
+
|
|
55
|
+
`task lint-roadmap-ci-steps` (wired into `task ci-fast` /
|
|
56
|
+
`lint-roadmap-complexity` cadence) scans `agents/roadmaps/*.md` and
|
|
57
|
+
per-module roadmap dirs resolved via
|
|
58
|
+
`scripts/_lib/agent_settings.ts::enumerate_modules()`
|
|
59
|
+
(`{module_path}/{modules.agent_folder}/roadmaps/*.md`; Laravel shape:
|
|
60
|
+
`app/Modules/*/agents/roadmaps/*.md`). Exit code:
|
|
61
|
+
|
|
62
|
+
- `0` — no CI-shaped steps, or setting is `true`, or every match is
|
|
63
|
+
carve-out-marked.
|
|
64
|
+
- `1` — at least one CI-shaped step in an active (non-archived,
|
|
65
|
+
non-skipped) roadmap with `quality.local_auto_run: false` and no
|
|
66
|
+
carve-out marker. Linter prints the file, line, matched literal,
|
|
67
|
+
and suggested rewording.
|
|
68
|
+
|
|
69
|
+
Archive (`agents/roadmaps/archive/`) and skipped
|
|
70
|
+
(`agents/roadmaps/skipped/`) are out of scope — they record history,
|
|
71
|
+
not future work.
|
|
72
|
+
|
|
73
|
+
## Execution — process-loop skips inline
|
|
74
|
+
|
|
75
|
+
Wrappers `/roadmap:process-step|phase|full` honour the policy at the
|
|
76
|
+
top of [`roadmap-process-loop § 5`](roadmap-process-loop.md#5-step-loop):
|
|
77
|
+
|
|
78
|
+
1. Before running a step, match its text against the patterns above.
|
|
79
|
+
2. If CI-shaped **and** `quality.local_auto_run: false` **and** no
|
|
80
|
+
carve-out marker → flip the checkbox to `[-]` (cancelled), append
|
|
81
|
+
a one-line reason as inline note, regenerate the dashboard,
|
|
82
|
+
continue to the next step. **Never** run the gate.
|
|
83
|
+
3. If CI-shaped **and** `quality.local_auto_run: true` → run the
|
|
84
|
+
step normally.
|
|
85
|
+
4. If carve-out-marked → run the step regardless of the setting.
|
|
86
|
+
|
|
87
|
+
The `[-]` reason format is fixed:
|
|
88
|
+
`<!-- skipped: quality.local_auto_run=false → remote CI is the gate -->`.
|
|
89
|
+
Per [`roadmap-progress-sync`](../../rules/roadmap-progress-sync.md) the flip and
|
|
90
|
+
the dashboard regen happen in the **same reply** that decides to
|
|
91
|
+
skip; saving skips for the archive commit is a rule violation.
|
|
92
|
+
|
|
93
|
+
## Failure modes
|
|
94
|
+
|
|
95
|
+
- Authoring `- [ ] Run task ci` while `local_auto_run: false` — linter
|
|
96
|
+
fails the PR.
|
|
97
|
+
- Executing a CI-shaped step without the inline-skip flip — Iron Law
|
|
98
|
+
violation; the loop never reaches the gate.
|
|
99
|
+
- Adding a carve-out marker to bypass the gate for an *existing*
|
|
100
|
+
pipeline run — abuse; the marker is reserved for **new** gates
|
|
101
|
+
introduced by the same roadmap.
|
|
102
|
+
- Hiding the literal inside a fenced bash block to dodge the linter —
|
|
103
|
+
the linter matches inside fenced blocks too (see
|
|
104
|
+
`scripts/lint_roadmap_ci_steps.ts`).
|
|
105
|
+
|
|
106
|
+
## See also
|
|
107
|
+
|
|
108
|
+
- [`roadmap-ci-steps-policy`](../../rules/roadmap-ci-steps-policy.md) — the
|
|
109
|
+
Iron Law + trigger surface this file backs.
|
|
110
|
+
- [`verify-before-complete`](../../rules/verify-before-complete.md) — the
|
|
111
|
+
Iron Law the policy narrows; carve-out cites it.
|
|
112
|
+
- [`roadmap-progress-sync`](../../rules/roadmap-progress-sync.md) — inline flip
|
|
113
|
+
+ dashboard regen contract.
|
|
114
|
+
- `templates/agent-settings.md` § `quality.local_auto_run` — source
|
|
115
|
+
of the toggle and its carve-out wording.
|
|
116
|
+
- [`roadmap-process-loop`](roadmap-process-loop.md) — § 5 owns the
|
|
117
|
+
inline-skip step gate.
|