@event4u/agent-config 8.13.0 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +183 -0
- package/MIGRATION.md +14 -0
- package/README.md +2 -2
- 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/explain-run.md +88 -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 +139 -8
- package/dist/agent-src/commands/pr/create.md +35 -22
- 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 +3 -2
- package/dist/agent-src/commands/team/delegate.md +3 -2
- package/dist/agent-src/commands/team/review.md +3 -2
- package/dist/agent-src/commands/team/status.md +49 -18
- package/dist/agent-src/commands/team-knowledge.md +8 -6
- package/dist/agent-src/commands/team.md +21 -16
- 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 +4 -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/llm-provider-knowledge/SKILL.md +146 -0
- package/dist/agent-src/skills/llm-provider-knowledge/evals/triggers.json +20 -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/prompts/README.md +11 -0
- 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/skills/token-optimizer/SKILL.md +10 -4
- package/dist/agent-src/templates/agent-settings.md +28 -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/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +314 -194
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +5 -5
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +23 -18
- package/dist/discovery/trust-report.md +8 -8
- package/dist/discovery/workspaces.json +18 -13
- package/dist/install/install.mjs +48 -33
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/agent_settings.js +4 -1
- package/dist/scripts/_lib/agent_settings.js.map +1 -1
- package/dist/scripts/condense.js +5 -0
- package/dist/scripts/condense.js.map +1 -1
- package/dist/server/schemas/settings.js +10 -1
- package/dist/server/schemas/settings.js.map +1 -1
- package/docs/CLAIMS.md +9 -2
- package/docs/MIGRATION.md +20 -0
- package/docs/SKILL_CENSUS.md +8 -0
- package/docs/architecture.md +3 -3
- package/docs/benchmark.md +67 -2
- package/docs/catalog.md +2 -2
- package/docs/command-flows.md +1 -1
- package/docs/contracts/agents-layout.md +1 -1
- package/docs/contracts/ai-council-config.md +9 -2
- package/docs/contracts/ai-team-config.md +37 -4
- package/docs/contracts/consumer-bridge.md +55 -63
- package/docs/contracts/install-layout.md +1 -1
- package/docs/contracts/migrate-command.md +1 -1
- package/docs/contracts/prelaunch-diagnostics.md +151 -0
- package/docs/contracts/release-pr-gating.md +1 -0
- package/docs/customization.md +22 -1
- package/docs/decisions/ADR-020-global-only-consumer-scope.md +34 -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 +1 -1
- package/docs/getting-started.md +17 -6
- 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/api-cost-levers.md +126 -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/installation.md +2 -1
- package/docs/maintainers/dev-mode.md +3 -2
- 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/agent-src/templates/scripts/work_engine/_lib/agent_settings.ts +4 -1
- package/src/config/agent-settings.template.yml +73 -10
- package/src/config/gitignore-block.txt +16 -6
- package/src/config/prelaunch-areas.yml +36 -0
- package/src/scripts/_cli/cmd_conformance.ts +2 -2
- package/src/scripts/_cli/cmd_doctor.ts +280 -39
- package/src/scripts/_cli/cmd_refresh.ts +35 -118
- package/src/scripts/_lib/agent_settings.ts +4 -1
- package/src/scripts/_lib/claude_plugin.ts +77 -2
- package/src/scripts/_lib/orchestration_record.ts +5 -0
- package/src/scripts/_lib/tool_adapter_registry.ts +120 -0
- package/src/scripts/ai_council/clients.ts +68 -6
- package/src/scripts/ai_council/pricing.ts +62 -0
- package/src/scripts/ai_team/config.ts +73 -1
- 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/council_cli.ts +19 -3
- package/src/scripts/hook_manifest.yaml +12 -1
- package/src/scripts/install.ts +44 -45
- package/src/scripts/lint_agents_layout.ts +10 -4
- package/src/scripts/lint_breaking_changes_index.ts +303 -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/mcp_server/tools.ts +1 -3
- 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/run_skill_evals.ts +70 -4
- package/src/scripts/schemas/agent-settings.schema.json +17 -0
- 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/self_review_gate.test.ts +11 -0
- package/src/scripts/self_review_gate.ts +7 -1
- package/src/scripts/skill_eval_coverage.ts +4 -1
- 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 +24 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# smoke_host_loadability.sh — real-host loadability smoke
|
|
3
|
+
# (road-to-ecosystem-harvest-skill-quality-gates Phase 4, Source G).
|
|
4
|
+
#
|
|
5
|
+
# The static check (check_host_loadability.ts) proves the generated trees
|
|
6
|
+
# PARSE; this smoke proves the real Claude Code CLI actually ACCEPTS them:
|
|
7
|
+
#
|
|
8
|
+
# 1. `claude plugin validate .claude-plugin` — the host's own validator on
|
|
9
|
+
# the marketplace manifest + plugin dirs.
|
|
10
|
+
# 2. Temp-home install: add this repo as a marketplace in a throwaway HOME,
|
|
11
|
+
# install the bootstrap-shim plugin, assert it shows up in
|
|
12
|
+
# `claude plugin list`. Nothing touches the developer's real ~/.claude.
|
|
13
|
+
# 3. Metadata cross-consistency (marketplace ↔ plugin dirs ↔ docs):
|
|
14
|
+
# lint_marketplace + lint_marketplace_install_completeness +
|
|
15
|
+
# lint_supported_tools_matrix + check_host_loadability.
|
|
16
|
+
#
|
|
17
|
+
# Contract: OPTIONAL in CI (runners without the claude CLI skip with exit 0
|
|
18
|
+
# and a notice), REQUIRED before releases — pass --require to make a missing
|
|
19
|
+
# CLI a failure (wired into the release flow, see docs/contracts/release-pr-gating.md).
|
|
20
|
+
set -euo pipefail
|
|
21
|
+
|
|
22
|
+
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
23
|
+
cd "$REPO_ROOT"
|
|
24
|
+
|
|
25
|
+
REQUIRE=0
|
|
26
|
+
for arg in "$@"; do
|
|
27
|
+
case "$arg" in
|
|
28
|
+
--require) REQUIRE=1 ;;
|
|
29
|
+
*) echo "usage: smoke_host_loadability.sh [--require]" >&2; exit 2 ;;
|
|
30
|
+
esac
|
|
31
|
+
done
|
|
32
|
+
|
|
33
|
+
CLAUDE_BIN="${CLAUDE_CLI:-$(command -v claude || true)}"
|
|
34
|
+
if [ -n "$CLAUDE_BIN" ] && [ ! -x "$CLAUDE_BIN" ]; then
|
|
35
|
+
CLAUDE_BIN=""
|
|
36
|
+
fi
|
|
37
|
+
if [ -z "$CLAUDE_BIN" ]; then
|
|
38
|
+
if [ "$REQUIRE" -eq 1 ]; then
|
|
39
|
+
echo "❌ claude CLI not found and --require set (release gate). Install Claude Code or set CLAUDE_CLI." >&2
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
echo "⚠️ claude CLI not found — real-host smoke skipped (static checks still run)."
|
|
43
|
+
./scripts-run src/scripts/check_host_loadability --root .
|
|
44
|
+
./scripts-run src/scripts/lint_supported_tools_matrix
|
|
45
|
+
exit 0
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
MARKETPLACE_NAME="$(node -e "console.log(JSON.parse(require('node:fs').readFileSync('.claude-plugin/marketplace.json','utf8')).name)")"
|
|
49
|
+
PLUGIN_NAME="$(node -e "console.log(JSON.parse(require('node:fs').readFileSync('.claude-plugin/marketplace.json','utf8')).plugins[0].name)")"
|
|
50
|
+
|
|
51
|
+
echo "→ 1/3 host-CLI manifest validation (claude plugin validate)"
|
|
52
|
+
# validate expects the directory that CONTAINS .claude-plugin/.
|
|
53
|
+
"$CLAUDE_BIN" plugin validate "$REPO_ROOT"
|
|
54
|
+
|
|
55
|
+
echo "→ 2/3 temp-home install + load assertion (${PLUGIN_NAME}@${MARKETPLACE_NAME})"
|
|
56
|
+
TMP_HOME="$(mktemp -d)"
|
|
57
|
+
cleanup() { rm -rf "$TMP_HOME"; }
|
|
58
|
+
trap cleanup EXIT
|
|
59
|
+
export ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY:-}"
|
|
60
|
+
HOME="$TMP_HOME" "$CLAUDE_BIN" plugin marketplace add "$REPO_ROOT"
|
|
61
|
+
HOME="$TMP_HOME" "$CLAUDE_BIN" plugin install "${PLUGIN_NAME}@${MARKETPLACE_NAME}"
|
|
62
|
+
if ! HOME="$TMP_HOME" "$CLAUDE_BIN" plugin list | grep -q "$PLUGIN_NAME"; then
|
|
63
|
+
echo "❌ plugin '${PLUGIN_NAME}' not listed after temp-home install — host did not load it" >&2
|
|
64
|
+
exit 1
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
echo "→ 3/3 metadata cross-consistency (marketplace ↔ plugin dirs ↔ docs)"
|
|
68
|
+
./scripts-run src/scripts/lint_marketplace
|
|
69
|
+
./scripts-run src/scripts/lint_marketplace_install_completeness
|
|
70
|
+
./scripts-run src/scripts/lint_supported_tools_matrix
|
|
71
|
+
./scripts-run src/scripts/check_host_loadability --root .
|
|
72
|
+
|
|
73
|
+
echo "✅ host-loadability smoke green (validate + temp-home install + cross-consistency)"
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Team Review-Gate governance — `stop` concern (road-to-team-mode Phase 4).
|
|
4
|
+
*
|
|
5
|
+
* Minimal call-site for `src/scripts/ai_team/review_gate.ts`. On Stop it
|
|
6
|
+
* reads the dispatcher envelope, and — ONLY when `ai_team.enabled` AND
|
|
7
|
+
* `ai_team.review_gate.managed` are true — locates the newest stop-gate
|
|
8
|
+
* review job the codex plugin persisted for this session, parses its
|
|
9
|
+
* first-line ALLOW/BLOCK contract, applies the consecutive-BLOCK counter,
|
|
10
|
+
* and prints the circuit-breaker notice (exactly once per trip) to stdout
|
|
11
|
+
* for the dispatch layer to render. With `managed: false` (default) the
|
|
12
|
+
* hook exits 0 without touching anything — byte-identical pre-Phase-4
|
|
13
|
+
* Stop behavior.
|
|
14
|
+
*
|
|
15
|
+
* Composition point (documented, not yet wired): register this script as a
|
|
16
|
+
* `team-review-gate` concern in `src/scripts/hook_manifest.yaml` on the
|
|
17
|
+
* claude / cowork `stop` slots, after `chat-history` (ordering relative to
|
|
18
|
+
* the PLUGIN's own Stop hook is host-scheduled and irrelevant here — the
|
|
19
|
+
* verdict is read from the plugin's persisted job record, not from sibling
|
|
20
|
+
* hook output). Manifest registration drags the lint_hook_manifest +
|
|
21
|
+
* installer + tests/hooks snapshot surface, so it is left to the
|
|
22
|
+
* orchestrator; this file is dispatcher-shaped and drop-in ready.
|
|
23
|
+
*
|
|
24
|
+
* Contract: never blocks, exit 0 on every path, `fail_closed: false`.
|
|
25
|
+
*/
|
|
26
|
+
import fs from 'node:fs';
|
|
27
|
+
import path from 'node:path';
|
|
28
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
29
|
+
|
|
30
|
+
import {
|
|
31
|
+
find_latest_gate_transcript,
|
|
32
|
+
record_gate_verdict,
|
|
33
|
+
} from './ai_team/review_gate.js';
|
|
34
|
+
import { AI_TEAM_DEFAULTS, load_ai_team_config, type AiTeamConfig } from './ai_team/config.js';
|
|
35
|
+
import { unwrap } from './hooks/envelope.js';
|
|
36
|
+
|
|
37
|
+
function _read_stdin(): string {
|
|
38
|
+
try {
|
|
39
|
+
if (process.stdin.isTTY) {
|
|
40
|
+
return '';
|
|
41
|
+
}
|
|
42
|
+
return fs.readFileSync(0, 'utf-8');
|
|
43
|
+
} catch {
|
|
44
|
+
return '';
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function main(): number {
|
|
49
|
+
const [envelope] = unwrap(_read_stdin(), 'claude');
|
|
50
|
+
|
|
51
|
+
const event = String(envelope['event'] ?? '');
|
|
52
|
+
if (event !== '' && event !== 'stop') {
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const workspace_root =
|
|
57
|
+
String(envelope['workspace_root'] ?? '').trim() || process.cwd();
|
|
58
|
+
const session_id = String(envelope['session_id'] ?? '');
|
|
59
|
+
|
|
60
|
+
let config: AiTeamConfig;
|
|
61
|
+
try {
|
|
62
|
+
config = load_ai_team_config({ cwd: workspace_root });
|
|
63
|
+
} catch {
|
|
64
|
+
// A broken ai_team block must never break the Stop path — doctor
|
|
65
|
+
// owns reporting it. Defaults = managed off = strict no-op.
|
|
66
|
+
config = AI_TEAM_DEFAULTS;
|
|
67
|
+
}
|
|
68
|
+
if (!config.enabled || !config.review_gate.managed) {
|
|
69
|
+
return 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let notice: string | null = null;
|
|
73
|
+
try {
|
|
74
|
+
const gate = find_latest_gate_transcript(workspace_root, session_id);
|
|
75
|
+
if (gate === null) {
|
|
76
|
+
return 0; // no gate run this session — nothing to govern
|
|
77
|
+
}
|
|
78
|
+
const outcome = record_gate_verdict({
|
|
79
|
+
session_id,
|
|
80
|
+
transcript_text: gate.transcript,
|
|
81
|
+
dedupe_key: gate.job_id,
|
|
82
|
+
config,
|
|
83
|
+
project_root: workspace_root,
|
|
84
|
+
});
|
|
85
|
+
notice = outcome.notice;
|
|
86
|
+
} catch {
|
|
87
|
+
return 0; // fail-open — never block the agent loop
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (notice !== null) {
|
|
91
|
+
process.stdout.write(`${notice}\n`);
|
|
92
|
+
}
|
|
93
|
+
return 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function _isCliEntry(): boolean {
|
|
97
|
+
if (process.argv[1] === undefined) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
const argvUrl = pathToFileURL(path.resolve(process.argv[1])).href;
|
|
101
|
+
if (import.meta.url === argvUrl) {
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
const here = fs.realpathSync(fileURLToPath(import.meta.url));
|
|
106
|
+
const argv = fs.realpathSync(path.resolve(process.argv[1]));
|
|
107
|
+
return here === argv;
|
|
108
|
+
} catch {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (_isCliEntry()) {
|
|
114
|
+
process.exit(main());
|
|
115
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_note": "Shrink-only grandfather allowlist for check_trigger_eval_presence (road-to-composition-ratchet). Skills listed here predate the trigger-eval presence gate and may lack evals/triggers.json. Entries may ONLY be removed (when the skill gains a triggers.json or is deleted)
|
|
2
|
+
"_note": "Shrink-only grandfather allowlist for check_trigger_eval_presence (road-to-composition-ratchet). Skills listed here predate the trigger-eval presence gate and may lack evals/triggers.json. Entries may ONLY be removed (when the skill gains a triggers.json or is deleted) \u2014 never added. Frozen 2026-07-08 at 221 of 264 skills.",
|
|
3
3
|
"skills": [
|
|
4
4
|
"accessibility-auditor",
|
|
5
5
|
"activation-design",
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
"emit-tickets",
|
|
65
65
|
"error-handling-patterns",
|
|
66
66
|
"expansion-playbook",
|
|
67
|
-
"fe-design",
|
|
68
67
|
"feature-planning",
|
|
69
68
|
"file-editor",
|
|
70
69
|
"finishing-a-development-branch",
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* utilization_report.ts — U1 loaded-vs-fired utilization report
|
|
3
|
+
* (road-to-ecosystem-harvest-reliability-measurement, P1).
|
|
4
|
+
*
|
|
5
|
+
* PRIVACY: session engagement logs are personal data. This tool is
|
|
6
|
+
* LOCAL-ONLY and REPORT-ONLY by default — it is deliberately NOT wired into
|
|
7
|
+
* `task ci`; the opt-in gate flags below are for a consumer's own CI, never
|
|
8
|
+
* this repo's. The report header restates this.
|
|
9
|
+
*
|
|
10
|
+
* Consumes (never redefines) the pre-registered window criteria at
|
|
11
|
+
* docs/design/utilization-window-criteria.md (CLAIMS
|
|
12
|
+
* `utilization-window-decidability`):
|
|
13
|
+
* floor — ≥ 100 task/phase-step boundaries · ≥ 2 recording periods ≥ 14
|
|
14
|
+
* days apart (host identity is not in the schema) · ≥ 45 days
|
|
15
|
+
* since 2026-07-12. Below floor → UNDERPOWERED report, no verdicts.
|
|
16
|
+
* D1 — loaded-never-consulted over the window → retirement candidate
|
|
17
|
+
* (REAP verdict; kernel + safety floors exempt by construction).
|
|
18
|
+
* Without the U1a denominator in the data the report degrades to
|
|
19
|
+
* consulted-set analysis and says so.
|
|
20
|
+
* D2 — consulted-never-applied with ≥ 5 consultations and
|
|
21
|
+
* applied-ratio < 10% → trigger-review queue (REVIEW verdict).
|
|
22
|
+
* D3/D4 — above floor: ≥ 1 named decision per artifact kind (or a stated
|
|
23
|
+
* reason); below floor: honest null, gates stay closed.
|
|
24
|
+
*
|
|
25
|
+
* Verdicts: REAP (cut candidate — reversible quarantine with a manifest,
|
|
26
|
+
* never hard delete), KEEP, REVIEW. Session floor: no verdict below
|
|
27
|
+
* MIN_SESSIONS distinct task_ids — absence of evidence is not evidence of
|
|
28
|
+
* absence.
|
|
29
|
+
*
|
|
30
|
+
* Opt-in CI-gate flags (consumer-side only): --fail-under-utilization <pct>
|
|
31
|
+
* exits 3 when overall fired/loaded falls below the threshold;
|
|
32
|
+
* --fail-on-stale-days <n> exits 3 when the newest event is older than n
|
|
33
|
+
* days. Neither flag is used in this repo's pipelines.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
import * as fs from 'node:fs';
|
|
37
|
+
import * as path from 'node:path';
|
|
38
|
+
|
|
39
|
+
import { aggregate } from '../agent-src/templates/scripts/telemetry/aggregator.js';
|
|
40
|
+
|
|
41
|
+
export const WINDOW_START_ISO = '2026-07-12T00:00:00Z';
|
|
42
|
+
export const FLOOR_BOUNDARIES = 100;
|
|
43
|
+
export const FLOOR_ELAPSED_DAYS = 45;
|
|
44
|
+
export const FLOOR_PERIOD_GAP_DAYS = 14;
|
|
45
|
+
export const MIN_SESSIONS = 4; // session floor for any verdict
|
|
46
|
+
export const D2_MIN_CONSULTED = 5;
|
|
47
|
+
export const D2_APPLIED_RATIO_LT = 0.10;
|
|
48
|
+
|
|
49
|
+
export interface VerdictRow {
|
|
50
|
+
kind: string;
|
|
51
|
+
id: string;
|
|
52
|
+
loaded: number;
|
|
53
|
+
consulted: number;
|
|
54
|
+
applied: number;
|
|
55
|
+
verdict: 'REAP' | 'KEEP' | 'REVIEW';
|
|
56
|
+
rule: 'D1' | 'D2' | '—';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface KernelInfo {
|
|
60
|
+
kernel: Set<string>;
|
|
61
|
+
safety_floors: Set<string>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Kernel rule ids (type: always / alwaysApply) + *-safety-floor ids — exempt from REAP. */
|
|
65
|
+
export function read_exempt(rulesDir: string): KernelInfo {
|
|
66
|
+
const kernel = new Set<string>();
|
|
67
|
+
const safety = new Set<string>();
|
|
68
|
+
for (const name of fs.readdirSync(rulesDir)) {
|
|
69
|
+
if (!name.endsWith('.md')) continue;
|
|
70
|
+
const id = name.replace(/\.md$/, '');
|
|
71
|
+
if (id.endsWith('-safety-floor')) safety.add(id);
|
|
72
|
+
const head = fs.readFileSync(path.join(rulesDir, name), 'utf-8').slice(0, 400);
|
|
73
|
+
if (/^type:\s*["']?always["']?/m.test(head) || /^alwaysApply:\s*true/m.test(head)) {
|
|
74
|
+
kernel.add(id);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return { kernel, safety_floors: safety };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function decide(
|
|
81
|
+
row: { kind: string; id: string; loaded: number; consulted: number; applied: number },
|
|
82
|
+
exempt: KernelInfo,
|
|
83
|
+
sessions: number,
|
|
84
|
+
): VerdictRow {
|
|
85
|
+
const base = { ...row } as VerdictRow;
|
|
86
|
+
if (sessions < MIN_SESSIONS) {
|
|
87
|
+
base.verdict = 'KEEP';
|
|
88
|
+
base.rule = '—';
|
|
89
|
+
return base; // below the session floor no negative verdict is allowed
|
|
90
|
+
}
|
|
91
|
+
const isExempt = row.kind === 'rules'
|
|
92
|
+
&& (exempt.kernel.has(row.id) || exempt.safety_floors.has(row.id));
|
|
93
|
+
if (row.loaded > 0 && row.consulted === 0 && !isExempt) {
|
|
94
|
+
base.verdict = 'REAP';
|
|
95
|
+
base.rule = 'D1';
|
|
96
|
+
return base;
|
|
97
|
+
}
|
|
98
|
+
if (row.consulted >= D2_MIN_CONSULTED && row.applied / row.consulted < D2_APPLIED_RATIO_LT) {
|
|
99
|
+
base.verdict = 'REVIEW';
|
|
100
|
+
base.rule = 'D2';
|
|
101
|
+
return base;
|
|
102
|
+
}
|
|
103
|
+
base.verdict = 'KEEP';
|
|
104
|
+
base.rule = '—';
|
|
105
|
+
return base;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface FloorState {
|
|
109
|
+
boundaries: number;
|
|
110
|
+
sessions: number;
|
|
111
|
+
elapsed_days: number;
|
|
112
|
+
periods_ok: boolean;
|
|
113
|
+
above_floor: boolean;
|
|
114
|
+
has_loaded: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function day_diff(aIso: string, bIso: string): number {
|
|
118
|
+
return Math.abs(Date.parse(aIso) - Date.parse(bIso)) / 86_400_000;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function assess_floor(logPath: string): FloorState {
|
|
122
|
+
const agg = aggregate(logPath);
|
|
123
|
+
// sessions = distinct task_ids; boundaries = parsed events. Recording
|
|
124
|
+
// periods: earliest vs latest ts ≥ FLOOR_PERIOD_GAP_DAYS apart (the
|
|
125
|
+
// schema-preserving degradation recorded in the criteria doc).
|
|
126
|
+
const text = fs.existsSync(logPath) ? fs.readFileSync(logPath, 'utf-8') : '';
|
|
127
|
+
const taskIds = new Set<string>();
|
|
128
|
+
for (const line of text.split('\n')) {
|
|
129
|
+
const m = line.match(/"task_id":"([^"]+)"/);
|
|
130
|
+
if (m) taskIds.add(m[1] ?? '');
|
|
131
|
+
}
|
|
132
|
+
const elapsed = agg.latest_ts ? day_diff(WINDOW_START_ISO, agg.latest_ts) : 0;
|
|
133
|
+
const periodsOk = agg.earliest_ts !== null && agg.latest_ts !== null
|
|
134
|
+
&& day_diff(agg.earliest_ts, agg.latest_ts) >= FLOOR_PERIOD_GAP_DAYS;
|
|
135
|
+
return {
|
|
136
|
+
boundaries: agg.parsed_events,
|
|
137
|
+
sessions: taskIds.size,
|
|
138
|
+
elapsed_days: Math.floor(elapsed),
|
|
139
|
+
periods_ok: periodsOk,
|
|
140
|
+
above_floor: agg.parsed_events >= FLOOR_BOUNDARIES && periodsOk
|
|
141
|
+
&& elapsed >= FLOOR_ELAPSED_DAYS,
|
|
142
|
+
has_loaded: agg.loaded_events > 0,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export async function main(argv: string[]): Promise<number> {
|
|
147
|
+
const arg = (flag: string): string | null => {
|
|
148
|
+
const i = argv.indexOf(flag);
|
|
149
|
+
return i !== -1 ? argv[i + 1] ?? null : null;
|
|
150
|
+
};
|
|
151
|
+
const logPath = arg('--log') ?? '.agent-engagement.jsonl';
|
|
152
|
+
const rulesDir = arg('--rules-dir') ?? 'dist/agent-src/rules';
|
|
153
|
+
const failUnder = arg('--fail-under-utilization');
|
|
154
|
+
const failStale = arg('--fail-on-stale-days');
|
|
155
|
+
const out: string[] = [];
|
|
156
|
+
out.push('# Utilization report — loaded vs fired');
|
|
157
|
+
out.push('');
|
|
158
|
+
out.push('> LOCAL-ONLY, REPORT-ONLY. Session transcripts/engagement logs are personal');
|
|
159
|
+
out.push('> data; this tool never runs in `task ci` and its output stays out of git.');
|
|
160
|
+
out.push('> Criteria consumed from docs/design/utilization-window-criteria.md — the');
|
|
161
|
+
out.push('> report applies D1-D4, it does not redefine them. A REAP verdict is a');
|
|
162
|
+
out.push('> QUARANTINE candidate (reversible move + manifest: what/when/why/restore),');
|
|
163
|
+
out.push('> never a hard delete.');
|
|
164
|
+
out.push('');
|
|
165
|
+
|
|
166
|
+
const floor = assess_floor(logPath);
|
|
167
|
+
out.push(`- boundaries recorded: ${floor.boundaries} (floor ${FLOOR_BOUNDARIES})`);
|
|
168
|
+
out.push(`- distinct sessions: ${floor.sessions} (verdict floor ${MIN_SESSIONS})`);
|
|
169
|
+
out.push(`- recording span ≥ ${FLOOR_PERIOD_GAP_DAYS}d: ${floor.periods_ok}`);
|
|
170
|
+
out.push(`- loaded denominator present: ${floor.has_loaded}${floor.has_loaded ? '' : ' — D1 degrades to consulted-set analysis (stated per the criteria doc)'}`);
|
|
171
|
+
out.push('');
|
|
172
|
+
|
|
173
|
+
const agg = aggregate(logPath);
|
|
174
|
+
const exempt = read_exempt(rulesDir);
|
|
175
|
+
const rows = agg.stats().map((s) => decide(
|
|
176
|
+
{ kind: s.kind, id: s.artefact_id, loaded: s.loaded, consulted: s.consulted, applied: s.applied },
|
|
177
|
+
exempt,
|
|
178
|
+
floor.sessions,
|
|
179
|
+
));
|
|
180
|
+
|
|
181
|
+
if (!floor.above_floor) {
|
|
182
|
+
out.push('## Verdict: UNDERPOWERED (window floor not met — D4 path)');
|
|
183
|
+
out.push('');
|
|
184
|
+
out.push('No REAP/REVIEW verdicts are issued below the observation floor;');
|
|
185
|
+
out.push('lifecycle-automation and field-outcome-ledger gates stay closed.');
|
|
186
|
+
out.push('Interim observed counts follow (informational only):');
|
|
187
|
+
} else {
|
|
188
|
+
out.push('## Verdicts (D3 path — above floor)');
|
|
189
|
+
}
|
|
190
|
+
out.push('');
|
|
191
|
+
out.push('| kind | id | loaded | consulted | applied | verdict | rule |');
|
|
192
|
+
out.push('|---|---|---:|---:|---:|---|---|');
|
|
193
|
+
const ranked = [...rows].sort((a, b) => (a.consulted - b.consulted) || (b.loaded - a.loaded));
|
|
194
|
+
for (const r of ranked) {
|
|
195
|
+
const verdict = floor.above_floor ? r.verdict : '—';
|
|
196
|
+
const rule = floor.above_floor ? r.rule : '—';
|
|
197
|
+
out.push(`| ${r.kind} | \`${r.id}\` | ${r.loaded} | ${r.consulted} | ${r.applied} | ${verdict} | ${rule} |`);
|
|
198
|
+
}
|
|
199
|
+
process.stdout.write(`${out.join('\n')}\n`);
|
|
200
|
+
|
|
201
|
+
// Opt-in consumer CI gates (exit 3) — never wired in this repo.
|
|
202
|
+
if (failUnder !== null) {
|
|
203
|
+
const totLoaded = rows.reduce((n, r) => n + r.loaded, 0);
|
|
204
|
+
const totFired = rows.reduce((n, r) => n + (r.loaded > 0 && r.consulted > 0 ? 1 : 0), 0);
|
|
205
|
+
const denom = rows.filter((r) => r.loaded > 0).length;
|
|
206
|
+
const pct = denom > 0 && totLoaded > 0 ? (totFired / denom) * 100 : 100;
|
|
207
|
+
if (pct < Number(failUnder)) return 3;
|
|
208
|
+
}
|
|
209
|
+
if (failStale !== null && agg.latest_ts !== null) {
|
|
210
|
+
if (day_diff(agg.latest_ts, new Date().toISOString()) > Number(failStale)) return 3;
|
|
211
|
+
}
|
|
212
|
+
return 0;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const isMain = process.argv[1] !== undefined
|
|
216
|
+
&& path.resolve(process.argv[1]) === path.resolve(new URL(import.meta.url).pathname);
|
|
217
|
+
if (isMain) {
|
|
218
|
+
main(process.argv.slice(2)).then(
|
|
219
|
+
(code) => process.exit(code),
|
|
220
|
+
(err) => {
|
|
221
|
+
process.stderr.write(`${err instanceof Error ? err.stack ?? err.message : String(err)}\n`);
|
|
222
|
+
process.exit(1);
|
|
223
|
+
},
|
|
224
|
+
);
|
|
225
|
+
}
|
|
@@ -304,7 +304,15 @@ export const settingsSchema = z.object({
|
|
|
304
304
|
suppress_setup_hint: z.boolean().default(false).describe(
|
|
305
305
|
'Suppress the one-line wizard/init recommendation to set up the codex plugin on Claude-Code hosts. Cosmetic only — never changes behavior.',
|
|
306
306
|
),
|
|
307
|
-
|
|
307
|
+
review_gate: z.object({
|
|
308
|
+
managed: z.boolean().default(false).describe(
|
|
309
|
+
"Managed governance of the codex plugin's Stop-hook Review Gate (road-to-team-mode Phase 4). false (default) = byte-identical pre-Phase-4 behavior: no counting, no circuit breaker. true = count consecutive BLOCK verdicts per session and trip the circuit breaker at max_consecutive_blocks.",
|
|
310
|
+
),
|
|
311
|
+
max_consecutive_blocks: z.number().int().min(1).default(3).describe(
|
|
312
|
+
'Circuit-breaker bound: after this many CONSECUTIVE BLOCK verdicts in one session, a visible notice is injected exactly once and the managed layer stops re-blocking — the user decides, never an infinite Claude↔Codex loop. An ALLOW verdict resets the counter. Positive integer.',
|
|
313
|
+
),
|
|
314
|
+
}).default({ managed: false, max_consecutive_blocks: 3 }),
|
|
315
|
+
}).default({ enabled: false, model: 'auto', allow_delegate: false, max_calls_per_day: 50, suppress_setup_hint: false, review_gate: { managed: false, max_consecutive_blocks: 3 } }),
|
|
308
316
|
onboarding: z.object({
|
|
309
317
|
onboarded: z.boolean().default(false).describe(
|
|
310
318
|
'Set to true once the developer has completed `agent-config setup`. The onboarding-gate rule blocks the first turn of every chat until this is true. Toggle back to false to re-trigger the wizard.',
|
|
@@ -335,6 +343,21 @@ export const settingsSchema = z.object({
|
|
|
335
343
|
preview_description: z.boolean().default(false).describe(
|
|
336
344
|
'When /create-pr runs, show the generated title and body and wait for confirmation before opening the PR. Off by default (zero-friction PR creation); turn on if you want a last-look gate.',
|
|
337
345
|
),
|
|
346
|
+
detail_level: z.enum(['min', 'med', 'max']).default('min').describe(
|
|
347
|
+
'Verbosity tier for the generated PR description body. min (default) = title + 2-3 sentence what/why/impact + linked ticket (token-frugal); med = min + grouped changes + tests note; max = med + how-to-test + edge cases + reviewer guidance. Critical info (breaking changes, migrations, security, rollback) is ALWAYS included at every tier — the tier governs explanatory depth, never whether a critical callout appears.',
|
|
348
|
+
),
|
|
349
|
+
api_examples: z.boolean().default(true).describe(
|
|
350
|
+
'JSON request/response examples for API-endpoint changes. true (default) = include a fenced example ONLY when grounded in a real source (response DTO/resource, OpenAPI/schema, test fixture, or an actual probe); no grounded source → a one-line pointer, never an invented example. false = never add API examples.',
|
|
351
|
+
),
|
|
352
|
+
screenshots: z.boolean().default(false).describe(
|
|
353
|
+
'Screenshots for frontend changes. false (default) = never attempt. true = attempt when the host has browser/preview tooling and the diff touches a frontend surface; capability-gated (emits a one-line note and leaves the placeholder when tooling is absent, never fails or blocks the PR). Before/after + changed-region highlighting is best-effort.',
|
|
354
|
+
),
|
|
355
|
+
ui_paths: z.array(z.string()).default([]).describe(
|
|
356
|
+
'Optional glob list that makes frontend detection explicit instead of heuristic (e.g. ["resources/views/**", "src/pages/**"]). Empty (default) = a light path/extension heuristic that fails open (no false enrichment when the surface is ambiguous).',
|
|
357
|
+
),
|
|
358
|
+
api_paths: z.array(z.string()).default([]).describe(
|
|
359
|
+
'Optional glob list that makes API-endpoint detection explicit instead of heuristic (e.g. ["app/Http/Controllers/Api/**", "src/pages/api/**"]). Empty (default) = a light path/extension heuristic that fails open.',
|
|
360
|
+
),
|
|
338
361
|
}),
|
|
339
362
|
}),
|
|
340
363
|
memory: z.object({
|