@event4u/agent-config 8.12.0 → 9.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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +164 -0
- package/README.md +1 -1
- package/dist/agent-src/commands/agent-handoff.md +35 -0
- package/dist/agent-src/commands/agents/init.md +1 -0
- package/dist/agent-src/commands/agents/optimize.md +1 -0
- package/dist/agent-src/commands/agents/user/accept.md +3 -2
- package/dist/agent-src/commands/agents/user/init.md +5 -4
- package/dist/agent-src/commands/agents/user/update.md +3 -2
- package/dist/agent-src/commands/agents/user.md +1 -0
- package/dist/agent-src/commands/agents.md +1 -0
- package/dist/agent-src/commands/analytics/show.md +1 -0
- package/dist/agent-src/commands/analytics.md +1 -0
- package/dist/agent-src/commands/analyze/decision.md +1 -0
- package/dist/agent-src/commands/analyze/incident.md +1 -0
- package/dist/agent-src/commands/analyze/near-miss.md +1 -0
- package/dist/agent-src/commands/analyze/postmortem.md +1 -0
- package/dist/agent-src/commands/analyze/premortem.md +1 -0
- package/dist/agent-src/commands/analyze/reference-repo.md +1 -0
- package/dist/agent-src/commands/analyze.md +3 -2
- package/dist/agent-src/commands/brand/identity.md +6 -5
- package/dist/agent-src/commands/brand/review.md +6 -5
- package/dist/agent-src/commands/brand/strategy.md +6 -4
- package/dist/agent-src/commands/brand/tokens.md +7 -6
- package/dist/agent-src/commands/brand/voice.md +5 -4
- package/dist/agent-src/commands/brand.md +9 -7
- package/dist/agent-src/commands/bug/fix.md +1 -0
- package/dist/agent-src/commands/bug/investigate.md +1 -0
- package/dist/agent-src/commands/bug.md +2 -1
- package/dist/agent-src/commands/challenge-me/vision.md +1 -0
- package/dist/agent-src/commands/challenge-me/with-docs.md +1 -0
- package/dist/agent-src/commands/challenge-me.md +28 -6
- package/dist/agent-src/commands/chat-history.md +1 -0
- package/dist/agent-src/commands/check-current-md.md +1 -0
- package/dist/agent-src/commands/commit.md +1 -0
- package/dist/agent-src/commands/context/create.md +3 -2
- package/dist/agent-src/commands/context.md +1 -0
- package/dist/agent-src/commands/cost/profile.md +1 -0
- package/dist/agent-src/commands/cost.md +2 -1
- package/dist/agent-src/commands/council/analysis.md +1 -0
- package/dist/agent-src/commands/council/debate.md +1 -0
- package/dist/agent-src/commands/council/default.md +21 -20
- package/dist/agent-src/commands/council/design.md +1 -0
- package/dist/agent-src/commands/council/optimize.md +1 -0
- package/dist/agent-src/commands/council/pr.md +1 -0
- package/dist/agent-src/commands/council.md +1 -0
- package/dist/agent-src/commands/estimate-ticket.md +1 -0
- package/dist/agent-src/commands/feature/dev.md +1 -0
- package/dist/agent-src/commands/feature/explore.md +1 -0
- package/dist/agent-src/commands/feature/plan.md +1 -0
- package/dist/agent-src/commands/feature/refactor.md +1 -0
- package/dist/agent-src/commands/feature/roadmap.md +1 -0
- package/dist/agent-src/commands/feature.md +2 -1
- package/dist/agent-src/commands/fix/pr-comments.md +19 -0
- package/dist/agent-src/commands/fix.md +2 -1
- package/dist/agent-src/commands/ghostwriter/delete.md +1 -0
- package/dist/agent-src/commands/ghostwriter/fetch.md +1 -0
- package/dist/agent-src/commands/ghostwriter/show.md +1 -0
- package/dist/agent-src/commands/ghostwriter/write.md +1 -0
- package/dist/agent-src/commands/ghostwriter.md +1 -0
- package/dist/agent-src/commands/grill-me.md +17 -12
- package/dist/agent-src/commands/humanize.md +1 -0
- package/dist/agent-src/commands/image/analyse.md +2 -1
- package/dist/agent-src/commands/image/create.md +1 -0
- package/dist/agent-src/commands/image/verify.md +1 -0
- package/dist/agent-src/commands/image.md +16 -12
- package/dist/agent-src/commands/implement-ticket.md +1 -0
- package/dist/agent-src/commands/judge/on-diff.md +1 -0
- package/dist/agent-src/commands/judge/solo.md +1 -0
- package/dist/agent-src/commands/judge/steps.md +1 -0
- package/dist/agent-src/commands/judge.md +1 -0
- package/dist/agent-src/commands/knowledge/cross-repo.md +1 -0
- package/dist/agent-src/commands/knowledge/forget.md +1 -0
- package/dist/agent-src/commands/knowledge/ingest.md +1 -0
- package/dist/agent-src/commands/knowledge/list.md +10 -0
- package/dist/agent-src/commands/knowledge.md +1 -0
- package/dist/agent-src/commands/memory/learn-low-impact.md +1 -0
- package/dist/agent-src/commands/memory/mine-session.md +1 -0
- package/dist/agent-src/commands/memory/promote.md +3 -2
- package/dist/agent-src/commands/memory.md +1 -0
- package/dist/agent-src/commands/mission/upgrade.md +45 -24
- package/dist/agent-src/commands/mode.md +1 -0
- package/dist/agent-src/commands/module/create.md +1 -0
- package/dist/agent-src/commands/module/explore.md +1 -0
- package/dist/agent-src/commands/module.md +1 -0
- package/dist/agent-src/commands/optimize/agents-dir.md +1 -0
- package/dist/agent-src/commands/optimize/project.md +1 -0
- package/dist/agent-src/commands/optimize/prompt.md +1 -0
- package/dist/agent-src/commands/optimize.md +2 -1
- package/dist/agent-src/commands/orchestrate.md +1 -0
- package/dist/agent-src/commands/override.md +1 -0
- package/dist/agent-src/commands/package.md +2 -1
- package/dist/agent-src/commands/post-as/ghostwriter.md +1 -0
- package/dist/agent-src/commands/post-as/me.md +1 -0
- package/dist/agent-src/commands/post-as.md +1 -0
- package/dist/agent-src/commands/pr/create/description-only.md +1 -0
- package/dist/agent-src/commands/pr/create.md +28 -0
- package/dist/agent-src/commands/prediction-pool.md +7 -6
- package/dist/agent-src/commands/prepare-for-review.md +1 -0
- package/dist/agent-src/commands/profile/activate.md +1 -0
- package/dist/agent-src/commands/profile/deactivate.md +1 -0
- package/dist/agent-src/commands/profile.md +1 -0
- package/dist/agent-src/commands/project.md +2 -1
- package/dist/agent-src/commands/refine-ticket.md +7 -0
- package/dist/agent-src/commands/research/deep.md +1 -0
- package/dist/agent-src/commands/research.md +1 -0
- package/dist/agent-src/commands/review/routing.md +1 -0
- package/dist/agent-src/commands/review.md +2 -1
- package/dist/agent-src/commands/roadmap/ai-council.md +1 -0
- package/dist/agent-src/commands/roadmap/materialize.md +1 -0
- package/dist/agent-src/commands/roadmap/process-full.md +1 -0
- package/dist/agent-src/commands/roadmap/process-phase.md +1 -0
- package/dist/agent-src/commands/roadmap/process-step.md +1 -0
- package/dist/agent-src/commands/roadmap.md +1 -0
- package/dist/agent-src/commands/security-audit-config.md +2 -1
- package/dist/agent-src/commands/skill/preview.md +1 -0
- package/dist/agent-src/commands/skill.md +1 -0
- package/dist/agent-src/commands/skills/discover.md +1 -0
- package/dist/agent-src/commands/skills.md +1 -0
- package/dist/agent-src/commands/sync/agent-settings.md +1 -0
- package/dist/agent-src/commands/sync.md +2 -1
- package/dist/agent-src/commands/team/adversarial.md +97 -0
- package/dist/agent-src/commands/team/delegate.md +110 -0
- package/dist/agent-src/commands/team/review.md +85 -0
- package/dist/agent-src/commands/team/status.md +123 -0
- package/dist/agent-src/commands/team-knowledge.md +8 -6
- package/dist/agent-src/commands/team.md +152 -0
- package/dist/agent-src/commands/tests/e2e-heal.md +1 -0
- package/dist/agent-src/commands/tests/e2e-plan.md +1 -0
- package/dist/agent-src/commands/tests/execute.md +1 -0
- package/dist/agent-src/commands/tests.md +2 -1
- package/dist/agent-src/commands/update-form-request-messages.md +1 -0
- package/dist/agent-src/commands/upstream-contribute.md +1 -0
- package/dist/agent-src/commands/video/from-script.md +3 -2
- package/dist/agent-src/commands/video/from-song.md +22 -21
- package/dist/agent-src/commands/video/scene.md +1 -0
- package/dist/agent-src/commands/video/stitch.md +2 -1
- package/dist/agent-src/commands/video/storyboard.md +1 -0
- package/dist/agent-src/commands/video.md +1 -0
- package/dist/agent-src/commands/work.md +1 -0
- package/dist/agent-src/commands/worktree/cleanup.md +8 -7
- package/dist/agent-src/commands/worktree/create.md +1 -0
- package/dist/agent-src/commands/worktree/verify.md +1 -0
- package/dist/agent-src/commands/worktree.md +1 -0
- package/dist/agent-src/rules/active-remediation.md +12 -36
- package/dist/agent-src/rules/artifact-drafting-protocol.md +7 -64
- package/dist/agent-src/rules/context-hygiene.md +19 -113
- package/dist/agent-src/rules/design-fidelity.md +4 -60
- package/dist/agent-src/rules/domain-adoption-policy.md +10 -106
- package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +12 -60
- package/dist/agent-src/rules/improve-before-implement.md +6 -0
- package/dist/agent-src/rules/minimal-safe-diff.md +6 -86
- package/dist/agent-src/rules/size-enforcement.md +10 -0
- package/dist/agent-src/rules/tool-safety.md +17 -3
- package/dist/agent-src/skills/agent-security-review/SKILL.md +12 -1
- package/dist/agent-src/skills/ai-council/SKILL.md +11 -0
- package/dist/agent-src/skills/bug-analyzer/SKILL.md +24 -2
- package/dist/agent-src/skills/code-review/SKILL.md +105 -93
- package/dist/agent-src/skills/code-review/checklists/backend.md +50 -0
- package/dist/agent-src/skills/code-review/checklists/database.md +19 -0
- package/dist/agent-src/skills/code-review/checklists/dependency.md +18 -0
- package/dist/agent-src/skills/code-review/checklists/docs.md +14 -0
- package/dist/agent-src/skills/code-review/checklists/frontend.md +19 -0
- package/dist/agent-src/skills/code-review/checklists/infra.md +17 -0
- package/dist/agent-src/skills/code-review/checklists/producing-the-review.md +62 -0
- package/dist/agent-src/skills/code-review/checklists/test-only.md +13 -0
- package/dist/agent-src/skills/code-review/evals/evals.json +53 -15
- package/dist/agent-src/skills/condense-memory/SKILL.md +3 -2
- package/dist/agent-src/skills/conventional-commits-writing/evals/evals.json +15 -0
- package/dist/agent-src/skills/docker/SKILL.md +10 -0
- package/dist/agent-src/skills/docx-authoring/SKILL.md +102 -0
- package/dist/agent-src/skills/github-ci/evals/evals.json +25 -0
- package/dist/agent-src/skills/humanizer/SKILL.md +79 -3
- package/dist/agent-src/skills/humanizer/references/anti-aiisms.md +112 -0
- package/dist/agent-src/skills/humanizer/references/fixtures.md +70 -0
- package/dist/agent-src/skills/judge-bug-hunter/SKILL.md +7 -1
- package/dist/agent-src/skills/laravel/SKILL.md +10 -0
- package/dist/agent-src/skills/launch-readiness/SKILL.md +35 -0
- package/dist/agent-src/skills/merge-conflicts/SKILL.md +30 -0
- package/dist/agent-src/skills/pdf-tools/SKILL.md +101 -0
- package/dist/agent-src/skills/quality-tools/evals/evals.json +15 -0
- package/dist/agent-src/skills/security-audit/SKILL.md +29 -0
- package/dist/agent-src/skills/security-maturity-assessment/SKILL.md +90 -0
- package/dist/agent-src/skills/security-maturity-assessment/evals/triggers.json +52 -0
- package/dist/agent-src/skills/skill-writing/SKILL.md +79 -0
- package/dist/agent-src/skills/spreadsheet-authoring/SKILL.md +11 -3
- package/dist/agent-src/skills/subagent-orchestration/schemas/team-review-status.json +103 -0
- package/dist/agent-src/skills/terraform/SKILL.md +10 -0
- package/dist/agent-src/skills/test-driven-development/SKILL.md +31 -0
- package/dist/agent-src/skills/threat-modeling/SKILL.md +15 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/dist/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
- package/dist/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
- package/dist/agent-src/templates/scripts/telemetry_record.ts +5 -0
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +378 -174
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +4 -4
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +16 -8
- package/dist/discovery/trust-report.md +3 -3
- package/dist/discovery/workspaces.json +14 -6
- package/dist/install/install.mjs +46 -0
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/router.json +1 -1
- package/dist/scripts/condense.js +5 -0
- package/dist/scripts/condense.js.map +1 -1
- package/dist/server/schemas/settings.js +11 -0
- package/dist/server/schemas/settings.js.map +1 -1
- package/docs/CLAIMS.md +9 -2
- package/docs/SKILL_CENSUS.md +8 -0
- package/docs/architecture.md +3 -3
- package/docs/benchmark.md +67 -2
- package/docs/catalog.md +10 -4
- package/docs/command-flows.md +6 -1
- package/docs/contracts/ai-council-config.md +9 -2
- package/docs/contracts/ai-team-config.md +224 -0
- package/docs/contracts/command-clusters.md +1 -0
- package/docs/contracts/prelaunch-diagnostics.md +151 -0
- package/docs/contracts/release-pr-gating.md +1 -0
- package/docs/decisions/ADR-049-configuration-trust-boundary.md +9 -1
- package/docs/featured-skills.md +2 -2
- package/docs/getting-started-by-role.md +3 -1
- package/docs/getting-started.md +42 -1
- package/docs/governance-advantage.md +1 -1
- package/docs/guidelines/agent-infra/active-remediation-mechanics.md +45 -0
- package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +28 -0
- package/docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md +76 -0
- package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +90 -0
- package/docs/guidelines/agent-infra/domain-adoption-gates.md +112 -0
- package/docs/guidelines/agent-infra/framework-neutrality-patterns.md +66 -0
- package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +99 -0
- package/docs/guidelines/agent-infra/skill-quality-checklist.md +13 -0
- package/docs/guidelines/design-fidelity-mechanics.md +76 -0
- package/docs/maintainers/branch-protection.md +18 -0
- package/docs/parity/command-frontmatter.md +60 -0
- package/docs/proof.md +7 -6
- package/package.json +1 -1
- package/src/agent-src/templates/scripts/telemetry/aggregator.ts +0 -0
- package/src/agent-src/templates/scripts/telemetry/engagement.ts +30 -0
- package/src/agent-src/templates/scripts/telemetry/report_renderer.ts +22 -9
- package/src/agent-src/templates/scripts/telemetry_record.ts +5 -0
- package/src/config/agent-settings.template.yml +71 -7
- package/src/config/prelaunch-areas.yml +36 -0
- package/src/scripts/_cli/cmd_doctor.ts +288 -1
- package/src/scripts/_lib/claude_plugin.ts +114 -4
- package/src/scripts/_lib/orchestration_record.ts +5 -0
- package/src/scripts/_lib/tool_adapter_registry.ts +120 -0
- package/src/scripts/ai_team/config.ts +234 -0
- package/src/scripts/ai_team/review_gate.ts +636 -0
- package/src/scripts/ai_team/team_dispatch.ts +612 -0
- package/src/scripts/bench_ab_task_runner.ts +11 -1
- package/src/scripts/bench_parity_count.ts +279 -0
- package/src/scripts/build_linear_digest.ts +3 -1
- package/src/scripts/check_bridge_derivation.ts +172 -0
- package/src/scripts/check_consumer_scope_flip.ts +179 -0
- package/src/scripts/check_council_config_location.ts +115 -15
- package/src/scripts/check_host_loadability.ts +81 -0
- package/src/scripts/condense.ts +5 -0
- package/src/scripts/hook_manifest.yaml +12 -1
- package/src/scripts/install.ts +39 -0
- package/src/scripts/lint_handoffs.ts +42 -0
- package/src/scripts/lint_skill_descriptions.ts +228 -0
- package/src/scripts/lint_skill_descriptions_allowlist.json +1 -0
- package/src/scripts/lint_skill_scripts_readonly.ts +145 -0
- package/src/scripts/lint_skill_scripts_readonly_allowlist.json +8 -0
- package/src/scripts/lint_supported_tools_matrix.ts +35 -0
- package/src/scripts/optimize_skill_description.ts +144 -0
- package/src/scripts/orchestration_record.ts +2 -1
- package/src/scripts/prelaunch_diagnostics.ts +248 -0
- package/src/scripts/rule_backlinks.ts +0 -0
- package/src/scripts/run_skill_evals.ts +70 -4
- package/src/scripts/schemas/command.schema.json +7 -0
- package/src/scripts/schemas/evals.schema.json +105 -14
- package/src/scripts/schemas/prelaunch-report.schema.json +107 -0
- package/src/scripts/schemas/skill.schema.json +18 -1
- package/src/scripts/schemas/subagent.schema.json +6 -0
- package/src/scripts/skill_linter.ts +43 -3
- package/src/scripts/smoke_host_loadability.sh +73 -0
- package/src/scripts/team_review_gate_hook.ts +115 -0
- package/src/scripts/trigger_eval_grandfather.json +1 -2
- package/src/scripts/utilization_report.ts +225 -0
- package/src/server/schemas/settings.ts +25 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
model_tier: inherit
|
|
3
|
+
name: team
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
argument-hint: "[review|adversarial|delegate|status] [args]"
|
|
6
|
+
pack: meta
|
|
7
|
+
intent: "Route a cross-model team-mode request (review, adversarial, delegate, status) to the official plugin under ai_team governance"
|
|
8
|
+
routes_to: [team-review, team-adversarial, team-delegate, team-status]
|
|
9
|
+
replaces: []
|
|
10
|
+
tier: 2
|
|
11
|
+
visibility: internal
|
|
12
|
+
description: Team orchestrator — governed cross-model access layer (a second strong model reviews the real diff; read-only multi-host fallback); routes to review, adversarial, delegate, status
|
|
13
|
+
cluster: team
|
|
14
|
+
type: orchestrator
|
|
15
|
+
suggestion:
|
|
16
|
+
eligible: true
|
|
17
|
+
trigger_description: "second model, GPT drüberschauen lassen, cross-model review, review gate, let another strong model check the diff, team review"
|
|
18
|
+
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)"
|
|
19
|
+
workspaces:
|
|
20
|
+
- agent-config-maintainer
|
|
21
|
+
packs:
|
|
22
|
+
- meta
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# /team
|
|
26
|
+
|
|
27
|
+
Top-level orchestrator for the `/team` family — governed **team mode**: a
|
|
28
|
+
governed access layer with a read-only multi-host fallback, the depth
|
|
29
|
+
complement to the council. A second strong model reviews the **real diff
|
|
30
|
+
with repo access** and returns its findings. On Claude Code hosts every
|
|
31
|
+
sub-command is a **thin delegation** to the official
|
|
32
|
+
`openai/codex-plugin-cc` plugin (`/codex:*`) — this family adds governance
|
|
33
|
+
(default-off gate, delegate opt-in, quota visibility, fail-closed setup
|
|
34
|
+
checks), never a reimplementation. An iterated build → review → fix loop is
|
|
35
|
+
**gated future work** — it unlocks only with a positive verdict from the
|
|
36
|
+
pre-registered benchmark (§ No-claims note).
|
|
37
|
+
|
|
38
|
+
## What team mode is — and is not
|
|
39
|
+
|
|
40
|
+
- **Is:** a single strong reviewer running inside the working tree via the
|
|
41
|
+
Codex CLI under the user's subscription. It reads git state itself and
|
|
42
|
+
returns an opinionated review of the actual change.
|
|
43
|
+
- **Is not:** the council. The council is breadth under a neutrality
|
|
44
|
+
contract — N members see the artefact text only, never the repo, never the
|
|
45
|
+
host's framing. Team mode is the inverse on every axis (table below). The
|
|
46
|
+
council's neutrality contract is untouched by team mode.
|
|
47
|
+
|
|
48
|
+
## Boundary — /council vs. /team
|
|
49
|
+
|
|
50
|
+
| Axis | `/council` | `/team` |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| Shape | Breadth — N members, one round by default | Depth — one strong reviewer on the real diff |
|
|
53
|
+
| Context | Artefact text only; never the repo, never host framing (neutrality contract) | Full repo access — the reviewer reads git state itself |
|
|
54
|
+
| 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`) |
|
|
55
|
+
| Model choice | Mid-tier default (cost decision) | Strongest available — `ai_team.model: 'auto'` defers to the CLI default |
|
|
56
|
+
| 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 |
|
|
57
|
+
|
|
58
|
+
## Default-off gate — check FIRST, before anything else
|
|
59
|
+
|
|
60
|
+
Read `ai_team.enabled` from `.agent-settings.yml`. Missing key or `false`
|
|
61
|
+
(the shipped default) → print the enable pointer and **STOP**. Do not route,
|
|
62
|
+
do not suggest a sub-command, do not probe for the plugin:
|
|
63
|
+
|
|
64
|
+
> Team mode is disabled (`ai_team.enabled: false`, the default).
|
|
65
|
+
> Enable it in `.agent-settings.yml`:
|
|
66
|
+
>
|
|
67
|
+
> ```yaml
|
|
68
|
+
> ai_team:
|
|
69
|
+
> enabled: true
|
|
70
|
+
> ```
|
|
71
|
+
>
|
|
72
|
+
> Key reference: `docs/contracts/ai-team-config.md`. Then run
|
|
73
|
+
> `agent-config doctor --check team` to verify plugin + auth setup.
|
|
74
|
+
|
|
75
|
+
Every sub-command repeats this check independently — the gate holds even when
|
|
76
|
+
a wrapper is invoked directly.
|
|
77
|
+
|
|
78
|
+
## Sub-commands
|
|
79
|
+
|
|
80
|
+
| Sub-command | Delegates to (Claude Code) | Purpose |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| `/team review [--background]` | `/codex:review` | Cross-model review of the current working-tree / staged diff |
|
|
83
|
+
| `/team adversarial <focus>` | `/codex:adversarial-review` | Adversarial cross-model review on a named focus — the escalation rung above the single-model `adversarial-review` skill |
|
|
84
|
+
| `/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` |
|
|
85
|
+
| `/team status` | `/codex:status` + quota block | Plugin job status plus the shared openai counter against both ceilings (team + council), naming any blocked path |
|
|
86
|
+
|
|
87
|
+
## Dispatch
|
|
88
|
+
|
|
89
|
+
1. Run the default-off gate above. Disabled → enable pointer, stop.
|
|
90
|
+
2. Parse the user's argument: `/team <sub-command> [args]`.
|
|
91
|
+
3. Look up the sub-command in the table above; load the routed file and
|
|
92
|
+
follow its `## Instructions` verbatim with the remaining args.
|
|
93
|
+
4. Unknown or missing sub-command → print the table and ask:
|
|
94
|
+
|
|
95
|
+
> 1. review — cross-model review of the real diff (optionally `--background`)
|
|
96
|
+
> 2. adversarial — adversarial cross-model review on a focus
|
|
97
|
+
> 3. delegate — hand a task to the second model (write access; second opt-in)
|
|
98
|
+
> 4. status — plugin jobs + today's call-quota ledger
|
|
99
|
+
|
|
100
|
+
## Fail-closed contract (all wrappers)
|
|
101
|
+
|
|
102
|
+
When the official plugin is absent on a Claude Code host, every wrapper
|
|
103
|
+
fails **closed** with the doctor remediation pointer — never a silent no-op,
|
|
104
|
+
never an inline reimplementation of the plugin:
|
|
105
|
+
|
|
106
|
+
> ❌ Team mode is enabled, but the official plugin is not installed on this
|
|
107
|
+
> Claude Code host. `/team <sub>` fails closed — it never reimplements the
|
|
108
|
+
> plugin inline and never silently no-ops.
|
|
109
|
+
>
|
|
110
|
+
> Run the guided check and follow its remediation block:
|
|
111
|
+
>
|
|
112
|
+
> ```bash
|
|
113
|
+
> agent-config doctor --check team
|
|
114
|
+
> ```
|
|
115
|
+
|
|
116
|
+
On non-Claude-Code hosts the wrappers fall back to a **read-only** transport
|
|
117
|
+
(repo-diff bundle via the council's `OpenAICliClient`) — no plugin job
|
|
118
|
+
control, no background jobs, no delegate write path; the capability delta
|
|
119
|
+
vs. the native plugin is stated in the output. When the codex CLI itself is
|
|
120
|
+
absent, the same fail-closed principle applies: state it plainly and stop.
|
|
121
|
+
|
|
122
|
+
## No-claims note
|
|
123
|
+
|
|
124
|
+
The review-lift value of cross-model team review is **unproven** until the
|
|
125
|
+
pre-registered three-arm benchmark (team review vs. single-model adversarial
|
|
126
|
+
self-review vs. `council:pr`) has run. Never assert "two strong models catch
|
|
127
|
+
each other's errors", a defect-finding lift, or any quantified quality claim
|
|
128
|
+
in output, docs, or suggestions. Team mode is offered as a workflow, not as a
|
|
129
|
+
measured improvement.
|
|
130
|
+
|
|
131
|
+
## Rules
|
|
132
|
+
|
|
133
|
+
- **Do NOT commit, push, or open a PR.** `/team` produces text; the plugin's
|
|
134
|
+
review output is returned verbatim.
|
|
135
|
+
- **Do NOT chain sub-commands.** One `/team <sub>` per turn.
|
|
136
|
+
- **Write access exists only via `/team delegate`**, and only when
|
|
137
|
+
`ai_team.allow_delegate: true` (default `false`). Every other wrapper is
|
|
138
|
+
read-only.
|
|
139
|
+
- **Quota:** every team call counts into the existing
|
|
140
|
+
`cli_call_budget.max_calls_per_day.openai` bucket — one subscription, one
|
|
141
|
+
counter. No parallel counting system.
|
|
142
|
+
- If the user invokes `/team` with no argument, **show the menu** — do not
|
|
143
|
+
guess which sub-command they meant.
|
|
144
|
+
|
|
145
|
+
## See also
|
|
146
|
+
|
|
147
|
+
- `/council` — breadth under a neutrality contract; the complement, not the
|
|
148
|
+
competitor.
|
|
149
|
+
- `adversarial-review` skill — the free single-model first rung below
|
|
150
|
+
`/team adversarial`.
|
|
151
|
+
- `docs/contracts/ai-team-config.md` — the `ai_team` settings block
|
|
152
|
+
(`enabled`, `model`, `allow_delegate`, `max_calls_per_day`).
|
|
@@ -9,6 +9,7 @@ sub: e2e-heal
|
|
|
9
9
|
cluster: tests
|
|
10
10
|
skills: [playwright-testing]
|
|
11
11
|
description: Find, debug, and fix failing Playwright E2E tests
|
|
12
|
+
argument-hint: "[test-file | ci-run-url]"
|
|
12
13
|
suggestion:
|
|
13
14
|
eligible: true
|
|
14
15
|
trigger_description: "fix the failing E2E tests, playwright tests are red"
|
|
@@ -9,6 +9,7 @@ sub: e2e-plan
|
|
|
9
9
|
cluster: tests
|
|
10
10
|
skills: [playwright-testing]
|
|
11
11
|
description: Explore the application and create a structured E2E test plan in Markdown
|
|
12
|
+
argument-hint: "[url | feature-area]"
|
|
12
13
|
suggestion:
|
|
13
14
|
eligible: true
|
|
14
15
|
trigger_description: "plan E2E tests for this feature, what should we cover in playwright"
|
|
@@ -8,6 +8,7 @@ cluster: tests
|
|
|
8
8
|
sub: execute
|
|
9
9
|
skills: [pest-testing, quality-tools]
|
|
10
10
|
description: Run the project's test suite — stack-adaptive (pest / phpunit / vitest / jest / pytest / …)
|
|
11
|
+
argument-hint: "[file | filter] [--include-e2e] [--include-slow] [--php]"
|
|
11
12
|
suggestion:
|
|
12
13
|
eligible: true
|
|
13
14
|
trigger_description: "run the tests, execute the test suite"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
model_tier: medium
|
|
3
3
|
name: tests
|
|
4
4
|
disable-model-invocation: true
|
|
5
|
+
argument-hint: "[create|execute|e2e-plan|e2e-heal] [args]"
|
|
5
6
|
pack: engineering-base
|
|
6
7
|
tier: 2
|
|
7
8
|
visibility: internal
|
|
@@ -34,7 +35,7 @@ commands with a single entry point + sub-command dispatch.
|
|
|
34
35
|
| `/tests e2e-heal` | `commands/tests/e2e-heal.md` | Find, debug, and fix failing Playwright E2E tests |
|
|
35
36
|
|
|
36
37
|
Sub-command names match the locked contract in
|
|
37
|
-
[`docs/contracts/command-clusters.md`](
|
|
38
|
+
[`docs/contracts/command-clusters.md`](../docs/contracts/command-clusters.md).
|
|
38
39
|
Both sub-commands resolve the runner via the
|
|
39
40
|
[`toolchain-resolver`](../contexts/execution/toolchain-resolver.md) — they
|
|
40
41
|
adapt to the consumer's stack instead of assuming one.
|
|
@@ -7,6 +7,7 @@ visibility: internal
|
|
|
7
7
|
framework: laravel
|
|
8
8
|
skills: [laravel-validation]
|
|
9
9
|
description: "Sync the messages() method of a FormRequest class — add missing entries, link them to language keys, and clean up stale ones."
|
|
10
|
+
argument-hint: "[ClassName | file-path]"
|
|
10
11
|
suggestion:
|
|
11
12
|
eligible: true
|
|
12
13
|
trigger_description: "sync the form request messages, update the validation messages"
|
|
@@ -6,6 +6,7 @@ tier: 2
|
|
|
6
6
|
visibility: internal
|
|
7
7
|
skills: [upstream-contribute, skill-writing, learning-to-rule-or-skill]
|
|
8
8
|
description: Contribute a learning, skill, rule, or fix from a consumer project back to the shared agent-config package
|
|
9
|
+
argument-hint: "[path | description]"
|
|
9
10
|
suggestion:
|
|
10
11
|
eligible: true
|
|
11
12
|
trigger_description: "contribute this back to agent-config, upstream this learning"
|
|
@@ -7,6 +7,7 @@ visibility: internal
|
|
|
7
7
|
cluster: video
|
|
8
8
|
sub: from-script
|
|
9
9
|
description: Drive a script end-to-end through the AI video pipeline — scenes → blueprint → image → operator pick → motion → video → stitch. Preview default; --mode commit spends behind the cost gate.
|
|
10
|
+
argument-hint: "<path-to-script.md> [--mode preview|commit] [--max-spend-usd <usd>] [--image-provider <id>] [--video-provider <id>]"
|
|
10
11
|
personas: [hollywood-director, ai-video-technical-director]
|
|
11
12
|
skills: [scene-expander, video-director, pixar-storyteller, character-consistency, motion-choreographer]
|
|
12
13
|
suggestion:
|
|
@@ -146,8 +147,8 @@ cost (commit) or summed modeled `cost_estimate` labeled *modeled*
|
|
|
146
147
|
- **One project per invocation.** Re-running on the same project
|
|
147
148
|
resumes from existing artefacts (skips completed scenes) via the
|
|
148
149
|
ADR-059 resume scan: `scripts/ai-video/lib/resume-scan.sh scan
|
|
149
|
-
<project> --plan <project>/plan.json` — `green` reused, `stale` /
|
|
150
|
-
`missing` re-render, `failed` surfaces its `error.json`. State
|
|
150
|
+
<project> --plan <project>/plan.json` — `green` is reused, `stale` /
|
|
151
|
+
`missing` re-render, `failed` surfaces its `error.json`. State is the
|
|
151
152
|
per-scene sentinel set (`prompt.json` with `input_sha256`, the clip,
|
|
152
153
|
`error.json`, `cost.json`) — no central checkpoint file.
|
|
153
154
|
|
|
@@ -7,6 +7,7 @@ visibility: internal
|
|
|
7
7
|
cluster: video
|
|
8
8
|
sub: from-song
|
|
9
9
|
description: Music-video from a song + reference images — accept or derive a timed scene script, optional character-lock, render, stitch, mux song as master track. Preview default; --mode commit gates the spend.
|
|
10
|
+
argument-hint: "<images-dir> <song-file> [--mode preview|commit] [--brief <text>|--auto-script] [--max-spend-usd <usd>]"
|
|
10
11
|
personas: [hollywood-director, ai-video-technical-director]
|
|
11
12
|
skills: [song-to-script, scene-expander, video-director, character-consistency, motion-choreographer, prompt-validator]
|
|
12
13
|
suggestion:
|
|
@@ -61,7 +62,7 @@ silent best-guess.
|
|
|
61
62
|
| Input | Required | Meaning |
|
|
62
63
|
|---|---|---|
|
|
63
64
|
| `<images-dir>` | yes | Folder of reference stills (`.png` / `.jpg`). When they contain a consistent human subject the on-screen identity is locked from them; otherwise the run is style-only (Step 6). |
|
|
64
|
-
| `<song-file>` | yes | Audio track (`.mp3` / `.wav` / `.m4a`) — or an `https://` song link (Suno / Udio / YouTube / any yt-dlp-supported page): ingested to a local file first via `scripts/ai-video/lib/ingest-song.sh <url> <project>` (operator-installed `yt-dlp` + `ffmpeg`; rights note surfaced; size-capped; never a silent overwrite)
|
|
65
|
+
| `<song-file>` | yes | Audio track (`.mp3` / `.wav` / `.m4a`) — or an `https://` song link (Suno / Udio / YouTube / any yt-dlp-supported page): the link is ingested to a local file first via `scripts/ai-video/lib/ingest-song.sh <url> <project>` (operator-installed `yt-dlp` + `ffmpeg`; rights note surfaced; size-capped; never a silent overwrite) and the pipeline continues on `<project>/song.m4a`. Defines total duration and, in `--auto-script` mode, the scene structure. |
|
|
65
66
|
| `--brief "<text>"` | one of brief/auto | Operator-written description of the video (mood, story, settings). |
|
|
66
67
|
| `--auto-script` | one of brief/auto | Derive the script from the song via the `song-to-script` skill. |
|
|
67
68
|
| `--scene-durations <list>` | no | Manual cut points (e.g. `0:00-0:15,0:15-0:30,…`). Overrides probe timing — the honest path when the track is flat (probe `method: interval`). |
|
|
@@ -95,28 +96,28 @@ with usage, never a deadlocked prompt.
|
|
|
95
96
|
|
|
96
97
|
- `<images-dir>` exists and holds ≥1 `.png`/`.jpg`. Empty or missing →
|
|
97
98
|
halt, list what was found.
|
|
98
|
-
- `<song-file>` given as an `https://` link → ingest first:
|
|
99
|
+
- `<song-file>` given as an `https://` link → ingest it first:
|
|
99
100
|
`scripts/ai-video/lib/ingest-song.sh <url> <project>` (exit 3 names
|
|
100
|
-
the missing tool; exit 75
|
|
101
|
-
local file replaces the URL for every later step — ground
|
|
102
|
-
the real bytes, and the media-governance gate below runs
|
|
103
|
-
ingested file (a platform link is *more* likely a
|
|
104
|
-
commercial song — check `voice-cloning` deliberately).
|
|
101
|
+
the missing tool; exit 75 is a retryable download failure). The
|
|
102
|
+
ingested local file replaces the URL for every later step — ground
|
|
103
|
+
truth stays the real bytes, and the media-governance gate below runs
|
|
104
|
+
on the ingested file (a platform link is *more* likely to be a
|
|
105
|
+
recognisable commercial song — check `voice-cloning` deliberately).
|
|
105
106
|
- `<song-file>` exists and is a readable audio container (`ffprobe`
|
|
106
107
|
returns an audio stream). Derive its length + structure now,
|
|
107
108
|
**adapter-first with the probe as the floor** (fallback semantics per
|
|
108
109
|
[`audio-adapter-contract.md § Fallback`](../../../scripts/ai-video/lib/audio-adapter-contract.md)):
|
|
109
|
-
1. An `audio-analysis` provider configured in `agents/.ai-video.xml`
|
|
110
|
+
1. An `audio-analysis` provider is configured in `agents/.ai-video.xml`
|
|
110
111
|
**and** `scripts/ai-video/audio-adapters/<id>.sh` exists → run
|
|
111
112
|
```bash
|
|
112
113
|
echo '{"audio_path":"<song-file>"}' | scripts/ai-video/audio-adapters/<id>.sh analyze
|
|
113
114
|
```
|
|
114
115
|
Real `{bpm, beats, downbeats, sections:[{start,end,label}]}` drives
|
|
115
|
-
the cut; report names the `source`. **
|
|
116
|
-
|
|
117
|
-
**
|
|
118
|
-
**halt with the actionable message** — a configured
|
|
119
|
-
silently degrades.
|
|
116
|
+
the cut; the report names the `source`. On a **transient** failure
|
|
117
|
+
(exit 75) retry once, then fall back to the probe with ONE warning
|
|
118
|
+
line. On a **config** failure (exit 3/6/7 — CLI missing, disabled,
|
|
119
|
+
bad key) **halt with the actionable message** — a configured
|
|
120
|
+
adapter never silently degrades.
|
|
120
121
|
2. No audio-analysis provider configured → run the zero-dependency
|
|
121
122
|
probe (the normal path, not a degradation):
|
|
122
123
|
```bash
|
|
@@ -224,7 +225,7 @@ When the track has vocals **and** the run assigns singers / lip-sync:
|
|
|
224
225
|
scripts/ai-video/lib/validate-vocal-map.sh <project>/vocal-map.json \
|
|
225
226
|
<project>/transcript.json --roster "<cast>"
|
|
226
227
|
```
|
|
227
|
-
— mechanically rejects re-timed lines, lyrics absent from the
|
|
228
|
+
— it mechanically rejects re-timed lines, lyrics absent from the
|
|
228
229
|
transcript, and missing singers (exit 7 with the offending line). A
|
|
229
230
|
skeleton-derived map cannot reach the operator, let alone a render.
|
|
230
231
|
3. **Each vocal line maps to its OWN singer.** Never put one character's
|
|
@@ -363,20 +364,20 @@ Before rendering, run the mechanical scan:
|
|
|
363
364
|
scripts/ai-video/lib/resume-scan.sh scan <project> --plan <project>/plan.json
|
|
364
365
|
```
|
|
365
366
|
|
|
366
|
-
`plan.json` holds each scene's current `input_sha256`
|
|
367
|
+
where `plan.json` holds each scene's current `input_sha256`
|
|
367
368
|
(`resume-scan.sh hash < scenes/<id>/prompt.json` — same canonicalization
|
|
368
|
-
the render path stamps). `green` scenes skipped verbatim; `stale`
|
|
369
|
-
(prompt edited, provider/model switched, hash tampered)
|
|
370
|
-
re-render; `failed`
|
|
371
|
-
scene completes, write `scenes/<id>/cost.json`
|
|
369
|
+
the render path stamps). `green` scenes are skipped verbatim; `stale`
|
|
370
|
+
(prompt edited, provider/model switched, hash tampered) and `missing`
|
|
371
|
+
scenes re-render; `failed` scenes surface their `error.json` reason.
|
|
372
|
+
After each live scene completes, write `scenes/<id>/cost.json`
|
|
372
373
|
(`{charged_usd, adapter, model}`, atomic `tmp`+`mv`) — the scan sums it
|
|
373
374
|
as `spent_usd` and the batch loop re-checks `--max-spend-usd` against it
|
|
374
375
|
before **every** live submit, not only at the upfront gate. Per-scene
|
|
375
376
|
kill-switch (ADR-059 §6): max one surfaced auto-retry on
|
|
376
|
-
`retryable: true
|
|
377
|
+
`retryable: true`, content-policy refusals always halt. Rollback is
|
|
377
378
|
deletion (`rm -rf scenes/<id>/` → re-render); `--clean`
|
|
378
379
|
(`resume-scan.sh clean <project>`) removes failed-scene residue only —
|
|
379
|
-
green artifacts never auto-deleted.
|
|
380
|
+
green artifacts are never auto-deleted.
|
|
380
381
|
|
|
381
382
|
### 9. Stitch + master-audio mux + duration reconciliation
|
|
382
383
|
|
|
@@ -7,6 +7,7 @@ visibility: internal
|
|
|
7
7
|
cluster: video
|
|
8
8
|
sub: scene
|
|
9
9
|
description: Render a single scene from a one-line idea — scene-expander → blueprint → image → operator pick → motion → video. Preview mode default (no spend); --mode commit renders live behind the cost gate.
|
|
10
|
+
argument-hint: "<idea> [--mode preview|commit] [--image-provider <id>] [--video-provider <id>] [--project <slug>]"
|
|
10
11
|
personas: [hollywood-director, ai-video-technical-director]
|
|
11
12
|
skills: [scene-expander, video-director, character-consistency, motion-choreographer]
|
|
12
13
|
suggestion:
|
|
@@ -7,6 +7,7 @@ visibility: internal
|
|
|
7
7
|
cluster: video
|
|
8
8
|
sub: stitch
|
|
9
9
|
description: Re-stitch existing clips in `<project>/scenes/*/` after operator edits — no re-render. ffmpeg concat driven by manifest.json.
|
|
10
|
+
argument-hint: "<project-slug> [--skip-scene <id>] [--continue]"
|
|
10
11
|
personas: [ai-video-technical-director]
|
|
11
12
|
skills: []
|
|
12
13
|
suggestion:
|
|
@@ -86,4 +87,4 @@ No live cost (no network calls happened). No commit. No push.
|
|
|
86
87
|
- [`/video:from-script`](from-script.md) — full pipeline including
|
|
87
88
|
initial stitch
|
|
88
89
|
- [`/video:scene`](scene.md) — render one scene
|
|
89
|
-
- [`scripts/ai-video/stitch.sh`](
|
|
90
|
+
- [`scripts/ai-video/stitch.sh`](../../../scripts/ai-video/stitch.sh) — the underlying tool
|
|
@@ -7,6 +7,7 @@ visibility: internal
|
|
|
7
7
|
cluster: video
|
|
8
8
|
sub: storyboard
|
|
9
9
|
description: Image-only storyboard — script → scenes → blueprint → image render → contact-sheet PNG via ffmpeg montage. No video calls.
|
|
10
|
+
argument-hint: "<path-to-script.md> [--image-provider <id>]"
|
|
10
11
|
personas: [hollywood-director]
|
|
11
12
|
skills: [scene-expander, video-director, character-consistency]
|
|
12
13
|
suggestion:
|
|
@@ -6,6 +6,7 @@ tier: 2
|
|
|
6
6
|
visibility: internal
|
|
7
7
|
cluster: video
|
|
8
8
|
description: Video-creation orchestrator — Hollywood-level AI video pipeline. Routes to from-script, from-song, scene, storyboard, stitch.
|
|
9
|
+
argument-hint: "[from-script|from-song|scene|storyboard|stitch] [args]"
|
|
9
10
|
type: orchestrator
|
|
10
11
|
suggestion:
|
|
11
12
|
eligible: true
|
|
@@ -9,6 +9,7 @@ tier: 0
|
|
|
9
9
|
visibility: visible
|
|
10
10
|
skills: [refine-prompt, command-routing]
|
|
11
11
|
description: Drive a free-form prompt end-to-end through refine → score → plan → implement → test → verify → report — Option-A loop over the `work_engine` engine, confidence-band gated, no auto-git.
|
|
12
|
+
argument-hint: "[prompt]"
|
|
12
13
|
suggestion:
|
|
13
14
|
eligible: true
|
|
14
15
|
trigger_description: "build this, implement this, drive this end-to-end"
|
|
@@ -8,6 +8,7 @@ cluster: worktree
|
|
|
8
8
|
sub: cleanup
|
|
9
9
|
skills: [worktree-lifecycle, git-workflow]
|
|
10
10
|
description: Safe worktree removal gate — refuses while the branch holds commits on no other ref; never force-deletes
|
|
11
|
+
argument-hint: "[worktree-path]"
|
|
11
12
|
suggestion:
|
|
12
13
|
eligible: true
|
|
13
14
|
trigger_description: "clean up the worktrees, remove the finished worktree"
|
|
@@ -41,8 +42,8 @@ untracked files, paths with spaces — `tests/scripts/worktree_cleanup_check.tes
|
|
|
41
42
|
./scripts-run src/scripts/worktree_cleanup_check check <worktree-path>
|
|
42
43
|
```
|
|
43
44
|
|
|
44
|
-
Exit `0` → removal allowed. Exit `1` → **refuse** that candidate;
|
|
45
|
-
names the exact gate:
|
|
45
|
+
Exit `0` → removal allowed. Exit `1` → **refuse** that candidate; the
|
|
46
|
+
output names the exact gate:
|
|
46
47
|
|
|
47
48
|
1. **Detached HEAD** — no branch to judge reachability for; resolve the
|
|
48
49
|
state manually first.
|
|
@@ -50,11 +51,11 @@ names the exact gate:
|
|
|
50
51
|
files count as work). Never `git worktree remove --force`.
|
|
51
52
|
3. **Unique commits** — commits reachable from the worktree branch but
|
|
52
53
|
from no other ref (branches, remotes, AND tags — a tag counts as
|
|
53
|
-
reachability).
|
|
54
|
-
the commit list and hand the decision back — dropping
|
|
55
|
-
session did not author is forbidden by the
|
|
56
|
-
rule (shared-branch Iron Law); merging or
|
|
57
|
-
user's call.
|
|
54
|
+
reachability). The branch holds work that exists nowhere else:
|
|
55
|
+
surface the commit list and hand the decision back — dropping
|
|
56
|
+
commits the session did not author is forbidden by the
|
|
57
|
+
`git-history-discipline` rule (shared-branch Iron Law); merging or
|
|
58
|
+
preserving them is the user's call.
|
|
58
59
|
|
|
59
60
|
### 3. Remove the allowed candidates
|
|
60
61
|
|
|
@@ -8,6 +8,7 @@ cluster: worktree
|
|
|
8
8
|
sub: create
|
|
9
9
|
skills: [worktree-lifecycle, using-git-worktrees]
|
|
10
10
|
description: Create a governed worktree and write its scope-lock note — propose-once branch naming, host-native primitive preferred
|
|
11
|
+
argument-hint: "[task] [branch-name]"
|
|
11
12
|
suggestion:
|
|
12
13
|
eligible: true
|
|
13
14
|
trigger_description: "do this in a worktree, isolate this task, spawn a worktree for X"
|
|
@@ -8,6 +8,7 @@ cluster: worktree
|
|
|
8
8
|
sub: verify
|
|
9
9
|
skills: [worktree-lifecycle, verify-completion-evidence]
|
|
10
10
|
description: Run the scoped verification for a worktree's declared change — narrow probes matched to the diff, never the full CI pipeline
|
|
11
|
+
argument-hint: "[worktree-path | branch]"
|
|
11
12
|
suggestion:
|
|
12
13
|
eligible: true
|
|
13
14
|
trigger_description: "verify the worktree change, prove this worktree is ready"
|
|
@@ -14,13 +14,15 @@ triggers:
|
|
|
14
14
|
- keyword: "upgrade"
|
|
15
15
|
- keyword: "cleanup"
|
|
16
16
|
- keyword: "technical debt"
|
|
17
|
+
routes_to:
|
|
18
|
+
- "guideline:agent-infra/active-remediation-mechanics"
|
|
17
19
|
workspaces: [engineering]
|
|
18
20
|
packs: [engineering-base]
|
|
19
21
|
---
|
|
20
22
|
|
|
21
23
|
# Active Remediation
|
|
22
24
|
|
|
23
|
-
The user
|
|
25
|
+
The user does not see the code at the spot you are editing — you do. So this package guides the agent to **actively improve** what it touches: don't accept legacy, debt, security gaps, or duplication as given. But active improvement is bounded — it must never become the scope creep `minimal-safe-diff` exists to stop. The rule is a **ladder**: act by size and alignment, and **never silently ignore** a real issue.
|
|
24
26
|
|
|
25
27
|
## The Iron Law
|
|
26
28
|
|
|
@@ -34,44 +36,15 @@ A LIVE SECURITY / DATA-EXPOSURE GAP IS NEVER MERELY "NOTED FOR LATER".
|
|
|
34
36
|
|
|
35
37
|
## What to remediate
|
|
36
38
|
|
|
37
|
-
Security gaps (broken access control, injection, secrets, missing authz — see `broken-access-control`) · missing/weak test coverage · bad code (dead code, silent error-swallow, unguarded edge cases) · **duplication** (same
|
|
39
|
+
Security gaps (broken access control, injection, secrets, missing authz — see `broken-access-control`) · missing/weak test coverage · bad code (dead code, silent error-swallow, unguarded edge cases) · **duplication** (the same or near-same logic repeated instead of one method/abstraction) · **stale version-idioms** (code written for an older language/framework version than the project actually runs).
|
|
38
40
|
|
|
39
|
-
## The ladder —
|
|
41
|
+
## The ladder — three tiers
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Allowed **only** when ALL hold — the testable "small + task-aligned" definition:
|
|
44
|
-
- **Same request path / module** as the current task (not an unrelated feature).
|
|
45
|
-
- **≤ ~10 changed lines** in one production file plus its test file — no wider cross-file ripple.
|
|
46
|
-
- **No public-API / response-shape change**, no new parameter.
|
|
47
|
-
- **No dependency bump, no migration, no data change.**
|
|
48
|
-
- **Its verification ships in the same commit** — the security fix's negative test, the correctness fix's case.
|
|
49
|
-
|
|
50
|
-
Under those constraints the fix is auditable in the same diff and is *not* scope creep — it corrects a boundary the agent touched. Anything outside them → **note + ask**, never auto. (`minimal-safe-diff` still governs the rest: no reformatting, no opportunistic refactor, no drive-by rename.)
|
|
51
|
-
|
|
52
|
-
### Note + ask (batched)
|
|
53
|
-
|
|
54
|
-
Bigger, or diverges from the task → do **not** refactor inline, do **not** interrupt the flow. Note the site (file:line + issue). Surface the batch as **one** numbered-options prompt (`user-interaction`, one recommendation line) **after the task is delivered** — or mid-work only when the flow makes it natural. Each option carries a real trade-off (`no-cheap-questions`). Refactor only on an explicit yes, as a separate scoped change (`scope-control`, `downstream-changes`).
|
|
55
|
-
|
|
56
|
-
### Propose a follow-up PR (many spots)
|
|
57
|
-
|
|
58
|
-
Too many to fold in without blowing the current diff's scope → propose **one or more separate follow-up PRs** (or a roadmap under `agents/roadmaps/`, using the shared-prefix convention) so the user reviews before merge. Creating the PR/roadmap is **permission-gated** — propose, get a yes, then create (`scope-control`, `commit-policy`).
|
|
59
|
-
|
|
60
|
-
## Version-gated modernization
|
|
61
|
-
|
|
62
|
-
Update stale idioms to the version the project **actually runs** — only when that version is **verified**:
|
|
63
|
-
- **Establish the version first** from the manifest constraint (`composer.json` `require`, `package.json` `engines`, `.tool-versions`, lockfile) — use the **lowest** bound; on an ambiguous/monorepo range, ask once. **Unknown version → do not touch** (must fit the project structure — the `source-discovery` gate).
|
|
64
|
-
- **Syntax-only, behavior-preserving idioms** (e.g. `array()` → `[]`, `isset($x)?$x:$d` → `$x ?? $d`, concat → template) provably equivalent → treat as a small fix (auto per the ladder).
|
|
65
|
-
- **Behavioral changes** (`readonly`/typed properties, new semantics) and **any dependency/version bump** → **ask only**, never auto (a version bump stays under `minimal-safe-diff`'s no-dependency-bump prohibition; a pure syntax idiom is categorically different).
|
|
43
|
+
**Fix now** — small + task-aligned; ALL five conditions hold: same request path/module · ≤ ~10 changed lines in one production file (plus its test file) · no public-API / response-shape change · no dependency bump, no migration · verification ships in the same commit. Anything outside → next tier. · **Note + ask** (batched, one numbered-options prompt after delivery) · **Follow-up PR** (many spots; creation stays permission-gated). Per-tier criteria + version-gated modernization + guardrails: the mechanics guideline below.
|
|
66
44
|
|
|
67
45
|
## Live-security carve-out (priority)
|
|
68
46
|
|
|
69
|
-
A **live cross-user / cross-tenant data exposure** (`broken-access-control`) is not "note for later": a potential GDPR-notifiable breach (Art. 33, 72 h from discovery).
|
|
70
|
-
|
|
71
|
-
## Guardrails — don't become a nagging machine
|
|
72
|
-
|
|
73
|
-
- Subordinate to `no-cheap-questions` (self-check items 3 & 14 — real trade-off, not a disguised continuation/commit ask), `autonomous-execution` (the end-of-session batch must not read as "shall I continue?"), `user-interaction`, `ask-when-uncertain` (one batched prompt = one question).
|
|
74
|
-
- Threshold to surface at all: a **real, nameable** improvement with concrete benefit. Cosmetic nitpicks with no trade-off → drop silently. The live-security carve-out is the only case that interrupts or overrides autonomy.
|
|
47
|
+
A **live cross-user / cross-tenant data exposure** (per `broken-access-control`) is not a "note for later": it is a potential GDPR-notifiable breach (Art. 33, 72 h from discovery). If it meets the fix-now bar → fix it now with its negative test. If not → **stop and surface it immediately** (a safety surface, visible even under an autonomous mandate — like the `no-pr-progress-comments` safety carve-out). Never defer it silently, never look away.
|
|
75
48
|
|
|
76
49
|
## When it fires
|
|
77
50
|
|
|
@@ -79,12 +52,15 @@ While implementing/modifying code you pass an issue outside the literal task. Al
|
|
|
79
52
|
|
|
80
53
|
## When NOT to fire
|
|
81
54
|
|
|
82
|
-
- No issue spotted. Prose/docs-only.
|
|
55
|
+
- No issue spotted. Prose/docs-only. The user fenced the scope ("just this one line").
|
|
83
56
|
- The issue is the task itself — then it's just the task (no ladder needed).
|
|
84
57
|
|
|
58
|
+
Body migrated to [`guideline:agent-infra/active-remediation-mechanics`](../docs/guidelines/agent-infra/active-remediation-mechanics.md) (per P4 of `road-to-kernel-and-router.md`) — per-tier fix-now/note+ask/follow-up-PR criteria, version-gated modernization, anti-nagging guardrails.
|
|
59
|
+
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|
|
60
|
+
|
|
85
61
|
## See also
|
|
86
62
|
|
|
87
|
-
- [`minimal-safe-diff`](minimal-safe-diff.md) — the carve-out
|
|
63
|
+
- [`minimal-safe-diff`](minimal-safe-diff.md) — the fix-now carve-out is bounded by it; everything outside the five conditions stays note+ask.
|
|
88
64
|
- [`broken-access-control`](broken-access-control.md) — the security category + the live-exposure carve-out.
|
|
89
65
|
- [`prefer-enums-over-literals`](prefer-enums-over-literals.md) — an instance of this ladder (enum literals).
|
|
90
66
|
- [`source-discovery-gate`](source-discovery-gate.md) — establishing the verified project version before modernizing.
|
|
@@ -14,6 +14,8 @@ triggers:
|
|
|
14
14
|
- phrase: "new guideline"
|
|
15
15
|
- phrase: "neue Regel"
|
|
16
16
|
- phrase: "bau mir ein Skill"
|
|
17
|
+
routes_to:
|
|
18
|
+
- "guideline:agent-infra/artifact-drafting-protocol-mechanics"
|
|
17
19
|
workspaces: [agent-config-maintainer, engineering]
|
|
18
20
|
packs: [meta]
|
|
19
21
|
---
|
|
@@ -42,71 +44,9 @@ rewrites with a specific target phrasing, < 10-line edits, or explicit
|
|
|
42
44
|
bypass (*"just write it"*, *"skip protocol"*, *"einfach machen"*).
|
|
43
45
|
Fires once per creation task, not once per edit.
|
|
44
46
|
|
|
45
|
-
##
|
|
47
|
+
## The three phases
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
*"skip / I don't know yet"* escape):
|
|
49
|
-
|
|
50
|
-
1. **Problem** — what does this solve that no existing artifact solves?
|
|
51
|
-
2. **Trigger surface** — which user phrasings should fire this?
|
|
52
|
-
3. **Should-trigger examples** — 2-3 in the user's words.
|
|
53
|
-
4. **Near-miss cases** — 2-3 phrasings that must **not** fire.
|
|
54
|
-
5. **Artifact type** — skill, rule, command, or guideline? Offer a
|
|
55
|
-
3-line primer if unsure.
|
|
56
|
-
|
|
57
|
-
If the user skips Q1 or Q5, stop and surface the ambiguity — don't guess.
|
|
58
|
-
|
|
59
|
-
## Phase B — Research
|
|
60
|
-
|
|
61
|
-
Run the **search protocol** from
|
|
62
|
-
[`learning-to-rule-or-skill` § 4](../skills/learning-to-rule-or-skill/SKILL.md#4-check-for-overlap--search-protocol-mandatory)
|
|
63
|
-
— `ls` all four surfaces (`skills/`, `rules/`, `guidelines/`, `commands/`),
|
|
64
|
-
grep with **solution-words AND problem-words**, scan sub-directory
|
|
65
|
-
taxonomies, then **open and skim** the 3 nearest matches. A negative grep
|
|
66
|
-
alone is not proof of no overlap. Report the top 3-5 most-similar
|
|
67
|
-
artifacts and ask (numbered options):
|
|
68
|
-
|
|
69
|
-
- Extend an existing one?
|
|
70
|
-
- Create a new one — gap is real?
|
|
71
|
-
- Show overlap first?
|
|
72
|
-
- Promote via `learning-to-rule-or-skill` instead?
|
|
73
|
-
|
|
74
|
-
Carry the summary into the commit message (*"Reviewed before drafting:
|
|
75
|
-
X, Y"*).
|
|
76
|
-
|
|
77
|
-
## Phase C — Draft
|
|
78
|
-
|
|
79
|
-
Propose **2-3 description variants** — Conservative / Pushy
|
|
80
|
-
(per `skill-quality`) / Concrete (embedded trigger example). User picks
|
|
81
|
-
or merges. Only then draft the body. Surface every structural choice
|
|
82
|
-
(size class, section order) as numbered options if in doubt.
|
|
83
|
-
|
|
84
|
-
Enforce size live: *"Body is at 420/500 lines. Split?"* (budgets per
|
|
85
|
-
`size-enforcement`). New skills also get an `evals/triggers.json` stub
|
|
86
|
-
(5 should-trigger + 5 should-not-trigger). See `skill-writing` § 1c.
|
|
87
|
-
|
|
88
|
-
## Roadmap-run batch mode — the ONE structured bypass
|
|
89
|
-
|
|
90
|
-
When a `/roadmap:process-*` run starts under an **accepted execution
|
|
91
|
-
contract** ([`roadmap-execution-contract`](../contexts/execution/roadmap-execution-contract.md))
|
|
92
|
-
whose pre-scan detected artifact-authoring steps, the protocol runs in
|
|
93
|
-
batch mode for exactly those artifacts:
|
|
94
|
-
|
|
95
|
-
- **Phase B (Research) runs ONCE at contract time, against the CURRENT
|
|
96
|
-
artifact state** — one overlap scan covering every artifact the
|
|
97
|
-
roadmap plans; results (nearest matches, extend-vs-create verdicts)
|
|
98
|
-
are surfaced inside the contract summary the user accepts. This is
|
|
99
|
-
why authoring-time-only checking is not enough: a sibling roadmap may
|
|
100
|
-
have landed overlapping artifacts between authoring and execution.
|
|
101
|
-
- **Phases A (Understand) and C (Draft) run non-interactively during
|
|
102
|
-
the run** — the roadmap step text is the Understand input; the
|
|
103
|
-
contract acceptance is the approval that the per-phase prompts exist
|
|
104
|
-
to obtain.
|
|
105
|
-
- **Scope is the batch, nothing more.** An artifact NOT declared in the
|
|
106
|
-
roadmap (discovered mid-run) triggers the full interactive protocol —
|
|
107
|
-
or, under the contract, the scope-out-of-roadmap halt.
|
|
108
|
-
- Batch mode never skips the Research pass itself — it relocates and
|
|
109
|
-
batches it. `artifact_protocol: skip` does not exist.
|
|
49
|
+
**A — Understand** (≤ 5 clarifying questions: problem, trigger surface, should-trigger examples, near-misses, artifact type) · **B — Research** (mandatory four-surface overlap scan; open + skim the 3 nearest matches; extend-vs-create decision) · **C — Draft** (2-3 description variants first, then the body; live size enforcement). Per-phase procedure + the roadmap batch-mode carve-out: the mechanics guideline below.
|
|
110
50
|
|
|
111
51
|
## Golden rules
|
|
112
52
|
|
|
@@ -118,5 +58,8 @@ batch mode for exactly those artifacts:
|
|
|
118
58
|
- Commit only on approval.
|
|
119
59
|
- Bypass is legitimate — *"just write it"* drops the protocol immediately.
|
|
120
60
|
|
|
61
|
+
Body migrated to [`guideline:agent-infra/artifact-drafting-protocol-mechanics`](../docs/guidelines/agent-infra/artifact-drafting-protocol-mechanics.md) (per P4 of `road-to-kernel-and-router.md`) — Phase A/B/C procedure detail + the roadmap-run batch-mode carve-out (Research-once-at-contract-time, batch scope, no `artifact_protocol: skip`).
|
|
62
|
+
Trigger-set above activates this routing on demand, independent of the discipline profile (ADR-110).
|
|
63
|
+
|
|
121
64
|
Extends (cross-link, don't restate): `ask-when-uncertain`,
|
|
122
65
|
`improve-before-implement`, `user-interaction`, `skill-quality`.
|