claude-dev-env 1.92.1 → 1.93.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.md +6 -2
- package/_shared/CLAUDE.md +2 -1
- package/_shared/advisor/CLAUDE.md +21 -0
- package/_shared/advisor/advisor-protocol.md +142 -0
- package/_shared/advisor/scripts/config/advisor_scripts_constants/__init__.py +1 -0
- package/_shared/advisor/scripts/config/advisor_scripts_constants/model_tier_run_validator_constants.py +86 -0
- package/_shared/advisor/scripts/model_tier_run_validator.py +246 -0
- package/_shared/advisor/scripts/pyproject.toml +3 -0
- package/_shared/advisor/scripts/tests/test_model_tier_run_validator.py +302 -0
- package/_shared/advisor/scripts/tests/test_tier_model_ids.py +180 -0
- package/_shared/advisor/scripts/tier_model_ids.py +164 -0
- package/_shared/pr-loop/CLAUDE.md +1 -0
- package/_shared/pr-loop/precatch-rubric.md +65 -0
- package/_shared/pr-loop/scripts/CLAUDE.md +1 -1
- package/_shared/pr-loop/scripts/code_rules_gate.py +137 -5
- package/_shared/pr-loop/scripts/post_audit_thread.py +1 -1
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/CLAUDE.md +1 -1
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/code_rules_gate_constants.py +16 -0
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/reviews_disabled_constants.py +2 -1
- package/_shared/pr-loop/scripts/reviewer_availability.py +42 -12
- package/_shared/pr-loop/scripts/reviews_disabled.py +65 -21
- package/_shared/pr-loop/scripts/terminology_sweep.py +69 -21
- package/_shared/pr-loop/scripts/tests/CLAUDE.md +1 -1
- package/_shared/pr-loop/scripts/tests/fixtures/{copilot_internal_user_jonecho.json → copilot_internal_user_example.json} +1 -1
- package/_shared/pr-loop/scripts/tests/test_agent_config_carveout.py +1 -1
- package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +146 -2
- package/_shared/pr-loop/scripts/tests/test_copilot_quota.py +8 -8
- package/_shared/pr-loop/scripts/tests/test_reviewer_availability.py +18 -5
- package/_shared/pr-loop/scripts/tests/test_reviews_disabled.py +56 -5
- package/_shared/pr-loop/scripts/tests/test_terminology_sweep.py +104 -17
- package/agents/CLAUDE.md +3 -2
- package/agents/clasp-deployment-orchestrator.md +2 -2
- package/agents/code-advisor.md +7 -5
- package/agents/code-verifier.md +6 -2
- package/agents/session-advisor.md +27 -0
- package/audit-rubrics/category_rubrics/category-j-code-rules-compliance.md +1 -1
- package/audit-rubrics/category_rubrics/category-k-codebase-conflicts.md +1 -1
- package/audit-rubrics/prompts/category-a-api-contracts.md +2 -2
- package/audit-rubrics/prompts/category-b-selector-engine-compat.md +2 -2
- package/audit-rubrics/prompts/category-c-resource-cleanup.md +2 -2
- package/audit-rubrics/prompts/category-d-scoping-and-ordering.md +2 -2
- package/audit-rubrics/prompts/category-e-dead-code.md +2 -2
- package/audit-rubrics/prompts/category-f-silent-failures.md +2 -2
- package/audit-rubrics/prompts/category-g-bounds-and-overflow.md +2 -2
- package/audit-rubrics/prompts/category-h-security-boundaries.md +2 -2
- package/audit-rubrics/prompts/category-i-concurrency.md +2 -2
- package/audit-rubrics/prompts/category-j-code-rules-compliance.md +2 -2
- package/audit-rubrics/prompts/category-k-codebase-conflicts.md +2 -2
- package/audit-rubrics/prompts/category-l-behavior-equivalence.md +2 -2
- package/audit-rubrics/prompts/category-m-producer-consumer-cardinality.md +2 -2
- package/audit-rubrics/prompts/category-n-test-name-scenario-verifier.md +2 -2
- package/audit-rubrics/prompts/category-o-docstring-vs-impl-drift.md +2 -2
- package/audit-rubrics/prompts/category-p-name-vs-behavior-contract.md +2 -2
- package/bin/CLAUDE.md +1 -0
- package/bin/expand_home_directory_tokens.mjs +75 -0
- package/bin/install.mjs +21 -7
- package/bin/install.test.mjs +220 -10
- package/hooks/CLAUDE.md +1 -1
- package/hooks/blocking/CLAUDE.md +4 -1
- package/hooks/blocking/_path_setup.py +13 -0
- package/hooks/blocking/bash_pre_tool_use_dispatcher.py +281 -0
- package/hooks/blocking/code_rules_dead_module_constant.py +88 -16
- package/hooks/blocking/code_rules_enforcer.py +6 -0
- package/hooks/blocking/code_rules_imports_logging.py +34 -1
- package/hooks/blocking/code_rules_paths_syspath.py +1 -1
- package/hooks/blocking/code_rules_test_layout.py +272 -0
- package/hooks/blocking/nas_ssh_binary_enforcer.py +22 -12
- package/hooks/blocking/pii_prevention_blocker.py +781 -0
- package/hooks/blocking/pii_scanner.py +340 -0
- package/hooks/blocking/pre_tool_use_dispatcher.py +3 -3
- package/hooks/blocking/stop_dispatcher.py +84 -0
- package/hooks/blocking/test__path_setup.py +39 -0
- package/hooks/blocking/test_bash_dispatcher_interpreter_starts.py +61 -0
- package/hooks/blocking/test_bash_pre_tool_use_dispatcher.py +294 -0
- package/hooks/blocking/test_code_rules_enforcer_cross_skill_duplicate.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer_dead_module_constant.py +51 -0
- package/hooks/blocking/test_code_rules_enforcer_dead_module_constant_read_cap.py +103 -0
- package/hooks/blocking/test_code_rules_enforcer_dot_test_pattern.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer_file_global_constants.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer_hardcoded_user_path.py +11 -11
- package/hooks/blocking/test_code_rules_enforcer_naive_datetime.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer_same_file_inline_duplicate.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer_test_layout.py +111 -0
- package/hooks/blocking/test_code_rules_enforcer_type_checking_scope.py +76 -0
- package/hooks/blocking/test_destructive_command_blocker.py +29 -9
- package/hooks/blocking/test_gh_body_arg_blocker.py +3 -3
- package/hooks/blocking/test_nas_ssh_binary_enforcer.py +96 -39
- package/hooks/blocking/test_pii_prevention_blocker.py +905 -0
- package/hooks/blocking/test_pii_prevention_windows_git_path.py +41 -0
- package/hooks/blocking/test_pii_scanner.py +165 -0
- package/hooks/blocking/test_pr_description_enforcer_pr_number.py +1 -1
- package/hooks/blocking/test_pre_tool_use_dispatcher.py +14 -13
- package/hooks/blocking/test_stop_dispatcher.py +187 -0
- package/hooks/blocking/test_verdict_directory_write_blocker.py +1 -1
- package/hooks/blocking/test_volatile_path_in_post_blocker.py +3 -3
- package/hooks/blocking/volatile_path_in_post_blocker.py +54 -5
- package/hooks/diagnostic/migrations/README.md +25 -26
- package/hooks/diagnostic/test_hook_log_extractor.py +10 -10
- package/hooks/hooks.json +10 -120
- package/hooks/hooks_constants/CLAUDE.md +12 -3
- package/hooks/hooks_constants/bash_pre_tool_use_dispatcher_constants.py +78 -0
- package/hooks/hooks_constants/dead_module_constant_constants.py +1 -0
- package/hooks/hooks_constants/hosted_hook_runner.py +73 -0
- package/hooks/hooks_constants/local_identity.py +182 -0
- package/hooks/hooks_constants/nas_ssh_binary_enforcer_constants.py +4 -37
- package/hooks/hooks_constants/pii_prevention_constants.py +299 -0
- package/hooks/hooks_constants/pre_tool_use_dispatcher_constants.py +4 -0
- package/hooks/hooks_constants/python_style_checks_constants.py +15 -0
- package/hooks/hooks_constants/stop_dispatcher_constants.py +26 -0
- package/hooks/hooks_constants/test_bash_pre_tool_use_dispatcher_constants.py +87 -0
- package/hooks/hooks_constants/test_hardcoded_user_path_constants.py +2 -2
- package/hooks/hooks_constants/test_hosted_hook_runner.py +101 -0
- package/hooks/hooks_constants/test_layout_constants.py +28 -0
- package/hooks/hooks_constants/test_local_identity.py +88 -0
- package/hooks/hooks_constants/test_session_env_cleanup_constants.py +1 -1
- package/hooks/hooks_constants/test_stop_dispatcher_constants.py +32 -0
- package/hooks/validators/README.md +5 -6
- package/hooks/validators/__init__.py +2 -2
- package/hooks/validators/python_style_checks.py +298 -243
- package/hooks/validators/run_all_validators.py +6 -0
- package/hooks/validators/test_python_style_checks.py +278 -163
- package/package.json +2 -2
- package/rules/CLAUDE.md +2 -1
- package/rules/bdd.md +1 -1
- package/rules/nas-ssh-invocation.md +6 -4
- package/rules/no-justification-noise.md +61 -0
- package/scripts/test_setup_project_paths.py +1 -1
- package/skills/CLAUDE.md +6 -3
- package/skills/_shared/pr-loop/scripts/_path_resolver.py +2 -2
- package/skills/_shared/pr-loop/scripts/build_audit_prompt.py +1 -1
- package/skills/_shared/pr-loop/scripts/build_fix_prompt.py +1 -1
- package/skills/_shared/pr-loop/scripts/test__path_resolver.py +42 -3
- package/skills/_shared/pr-loop/scripts/test_build_audit_prompt.py +11 -11
- package/skills/_shared/pr-loop/scripts/test_build_fix_prompt.py +26 -3
- package/skills/_shared/pr-loop/scripts/test_preflight_worktree.py +49 -25
- package/skills/autoconverge/CLAUDE.md +3 -3
- package/skills/autoconverge/SKILL.md +113 -35
- package/skills/autoconverge/reference/CLAUDE.md +2 -2
- package/skills/autoconverge/reference/convergence.md +44 -22
- package/skills/autoconverge/reference/gotchas.md +11 -0
- package/skills/autoconverge/reference/stop-conditions.md +23 -13
- package/skills/autoconverge/workflow/CLAUDE.md +2 -1
- package/skills/autoconverge/workflow/converge.clean-audit.test.mjs +15 -19
- package/skills/autoconverge/workflow/converge.contract.test.mjs +43 -42
- package/skills/autoconverge/workflow/converge.copilot-gate.test.mjs +141 -16
- package/skills/autoconverge/workflow/converge.fix-recovery.test.mjs +2 -2
- package/skills/autoconverge/workflow/converge.mjs +329 -68
- package/skills/autoconverge/workflow/converge.path-aware.test.mjs +1 -1
- package/skills/autoconverge/workflow/converge.precatch.test.mjs +152 -0
- package/skills/autoconverge/workflow/converge.run-input.test.mjs +3 -3
- package/skills/autoconverge/workflow/converge_multi.run-input.test.mjs +15 -15
- package/skills/autoconverge/workflow/test_convergence_summary.py +6 -6
- package/skills/bdd-protocol/SKILL.md +4 -5
- package/skills/bdd-protocol/references/anti-patterns.md +1 -1
- package/skills/bugteam/SKILL.md +8 -0
- package/skills/bugteam/reference/copilot-gap-analysis.md +20 -20
- package/skills/bugteam/reference/obstacles/audit-walk-categories.md +1 -1
- package/skills/bugteam/reference/team-setup.md +7 -5
- package/skills/bugteam/scripts/reflow_skill_md.py +1 -1
- package/skills/copilot-finding-triage/SKILL.md +124 -0
- package/skills/copilot-finding-triage/reference/tier-rubric.md +49 -0
- package/skills/copilot-finding-triage/scripts/conftest.py +8 -0
- package/skills/copilot-finding-triage/scripts/copilot_finding_triage_constants/__init__.py +0 -0
- package/skills/copilot-finding-triage/scripts/copilot_finding_triage_constants/config/__init__.py +0 -0
- package/skills/copilot-finding-triage/scripts/copilot_finding_triage_constants/config/notify_ntfy_constants.py +32 -0
- package/skills/copilot-finding-triage/scripts/notify_ntfy.py +192 -0
- package/skills/copilot-finding-triage/scripts/test_notify_ntfy.py +141 -0
- package/skills/copilot-finding-triage/templates/notification.md +34 -0
- package/skills/copilot-review/SKILL.md +8 -6
- package/skills/findbugs/SKILL.md +4 -0
- package/skills/fixbugs/SKILL.md +8 -7
- package/skills/gotcha/CLAUDE.md +2 -2
- package/skills/gotcha/SKILL.md +4 -4
- package/skills/log-audit/SKILL.md +4 -6
- package/skills/monitor-open-prs/CLAUDE.md +1 -1
- package/skills/monitor-open-prs/SKILL.md +6 -1
- package/skills/orchestrator/SKILL.md +74 -78
- package/skills/orchestrator-refresh/SKILL.md +24 -12
- package/skills/post-audit-findings/SKILL.md +5 -9
- package/skills/pr-consistency-audit/SKILL.md +5 -1
- package/skills/pr-converge/CLAUDE.md +1 -1
- package/skills/pr-converge/SKILL.md +86 -47
- package/skills/pr-converge/reference/CLAUDE.md +1 -1
- package/skills/pr-converge/reference/convergence-gates.md +20 -17
- package/skills/pr-converge/reference/examples.md +63 -47
- package/skills/pr-converge/reference/fix-protocol.md +15 -15
- package/skills/pr-converge/reference/ground-rules.md +11 -7
- package/skills/pr-converge/reference/multi-pr-orchestration.md +6 -5
- package/skills/pr-converge/reference/per-tick.md +129 -107
- package/skills/pr-converge/reference/state-schema.md +15 -10
- package/skills/pr-converge/scripts/check_convergence.py +5 -4
- package/skills/pr-converge/scripts/test_check_convergence.py +6 -4
- package/skills/pr-fix-protocol/SKILL.md +3 -8
- package/skills/pr-loop-cloud-transport/SKILL.md +102 -0
- package/skills/pr-loop-cloud-transport/reference/identity-and-hooks.md +40 -0
- package/skills/pr-loop-cloud-transport/reference/substitution-matrix.md +48 -0
- package/skills/pr-loop-lifecycle/SKILL.md +5 -9
- package/skills/pr-scope-resolve/SKILL.md +3 -6
- package/skills/privacy-hygiene/SKILL.md +114 -0
- package/skills/qbug/SKILL.md +8 -8
- package/skills/rebase/SKILL.md +5 -1
- package/skills/refine/SKILL.md +4 -5
- package/skills/reviewer-gates/SKILL.md +7 -11
- package/skills/session-log/SKILL.md +4 -1
- package/skills/skill-builder/SKILL.md +3 -6
- package/skills/structure-prompt/SKILL.md +4 -5
- package/skills/team-advisor/SKILL.md +56 -0
- package/skills/test_markdown_link_integrity.py +10 -6
- package/skills/update/SKILL.md +5 -1
- package/skills/usage-pause/SKILL.md +14 -5
- package/skills/usage-pause/scripts/resolve_usage_window.py +83 -5
- package/skills/usage-pause/scripts/test_resolve_usage_window.py +185 -17
- package/skills/usage-pause/scripts/usage_pause_constants/resolve_usage_window_constants.py +4 -3
- package/skills/verified-build/SKILL.md +4 -9
package/skills/gotcha/SKILL.md
CHANGED
|
@@ -22,7 +22,7 @@ The caller provides the obstacle context. Distill it into:
|
|
|
22
22
|
- **What the user had to do** to resolve it.
|
|
23
23
|
- **What to do differently next time** (the actionable gotcha).
|
|
24
24
|
|
|
25
|
-
Determine which repo the skill lives in. Usually this is `claude-
|
|
25
|
+
Determine which repo the skill lives in. Usually this is `claude-dev-env`, but if the skill is in another repo (e.g. a project-specific `.claude/skills/` directory), use that repo instead.
|
|
26
26
|
|
|
27
27
|
### Step 2 — Delegate to bg-agent
|
|
28
28
|
|
|
@@ -62,11 +62,11 @@ If a `## Gotchas` section already exists, append to it. If not, create it at the
|
|
|
62
62
|
|
|
63
63
|
| Skill location | Repo |
|
|
64
64
|
|---|---|
|
|
65
|
-
| `packages/claude-dev-env/skills/<name>/` | `jl-cmd/claude-
|
|
66
|
-
| `~/.claude/skills/<name>/` | `jl-cmd/claude-
|
|
65
|
+
| `packages/claude-dev-env/skills/<name>/` | `jl-cmd/claude-dev-env` |
|
|
66
|
+
| `~/.claude/skills/<name>/` | `jl-cmd/claude-dev-env` (user skills) |
|
|
67
67
|
| Project `.claude/skills/<name>/` | That project's repo |
|
|
68
68
|
|
|
69
|
-
When unsure, ask the user which repo. Otherwise, default to `claude-
|
|
69
|
+
When unsure, ask the user which repo. Otherwise, default to `claude-dev-env`.
|
|
70
70
|
|
|
71
71
|
## Gotchas
|
|
72
72
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: log-audit
|
|
3
3
|
description: >-
|
|
4
|
-
Watches this repo's own logs for patterns worth acting on
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
per real finding, and mines the defects Copilot and Bugbot keep catching into
|
|
9
|
-
skill-edit proposals. Runs as a background agent that resumes after a restart.
|
|
4
|
+
Watches this repo's own logs for patterns worth acting on: clusters recurring
|
|
5
|
+
errors and timing regressions, then opens a grouped fix PR or a tracked
|
|
6
|
+
optimization issue per real finding. Use for /log-audit, 'audit the logs',
|
|
7
|
+
'what keeps failing', or 'what's getting slower'.
|
|
10
8
|
---
|
|
11
9
|
|
|
12
10
|
# log-audit
|
|
@@ -22,7 +22,7 @@ Discovers every open pull request across the `jl-cmd/*` and `JonEcho/*` owner sc
|
|
|
22
22
|
## Workflow summary
|
|
23
23
|
|
|
24
24
|
1. Call `discover_open_prs.discover_open_prs(all_owners=["jl-cmd", "JonEcho"])` to get the full open-PR list.
|
|
25
|
-
2. For each PR, invoke `/bugteam
|
|
25
|
+
2. For each PR, invoke `/bugteam <pr_number>`; include `--bugbot-retrigger` only when bugbot is enabled (`reviews_disabled.py --reviewer bugbot` exits 1).
|
|
26
26
|
3. After each bugteam run, poll for new bugbot comments on a 60s → 120s → 240s → 480s → 960s backoff. Re-invoke bugteam if new findings appear.
|
|
27
27
|
4. Emit a sweep summary when all PRs exit polling.
|
|
28
28
|
|
|
@@ -15,12 +15,17 @@ description: >-
|
|
|
15
15
|
|
|
16
16
|
## Contents
|
|
17
17
|
|
|
18
|
+
- Transport check — gh presence and auth route the sweep local or through the cloud transport
|
|
18
19
|
- When this skill applies — refusal cases and trigger conditions
|
|
19
20
|
- Discovery — `scripts/discover_open_prs.py` queries via `gh search prs` across both owner scopes
|
|
20
21
|
- Dispatch — `/bugteam --bugbot-retrigger <pr_numbers...>`
|
|
21
22
|
- Post-convergence polling — bugbot replies and re-invocation
|
|
22
23
|
- `scripts/discover_open_prs.py` — the discovery helper
|
|
23
24
|
|
|
25
|
+
## Transport check (before any GitHub step)
|
|
26
|
+
|
|
27
|
+
Run `command -v gh`; when it succeeds, run `gh auth status`; for each PR the sweep dispatches, `gh api repos/<owner>/<repo> --jq .permissions.push` must print `true`. When any check fails, run the `pr-loop-cloud-transport` skill first and route every `gh` operation in this skill through its substitution matrix, including the discovery query (`mcp__github__search_pull_requests` with `perPage` in place of `gh search prs`).
|
|
28
|
+
|
|
24
29
|
## When this skill applies
|
|
25
30
|
|
|
26
31
|
`/monitor-open-prs` authorizes one full sweep over all open PRs in both owner scopes.
|
|
@@ -41,7 +46,7 @@ Call `scripts/discover_open_prs.discover_open_prs(all_owners=["jl-cmd", "JonEcho
|
|
|
41
46
|
For each discovered PR:
|
|
42
47
|
|
|
43
48
|
1. Resolve the PR's repo checkout (existing worktree or fresh `git clone`).
|
|
44
|
-
2. From that checkout, invoke `/bugteam
|
|
49
|
+
2. From that checkout, invoke `/bugteam <pr_number>`. Include `--bugbot-retrigger` only when bugbot is enabled for the run — when `python "$HOME/.claude/_shared/pr-loop/scripts/reviews_disabled.py" --reviewer bugbot` exits 1. On exit 0 (bugbot disabled — the default) omit `--bugbot-retrigger` so the bugbot leg sits out the run.
|
|
45
50
|
3. The `--bugbot-retrigger` flag tells bugteam to post `bugbot run` as an issue comment after every successful FIX push so Cursor's bugbot re-evaluates the new commit.
|
|
46
51
|
4. Bugteam runs its own 20-loop audit/fix cycle per PR; this skill waits for each bugteam invocation to return before dispatching the next (or fanning out — see below).
|
|
47
52
|
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orchestrator
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
descriptions, and searches; the advisor answers blockers with one of three
|
|
10
|
-
brief signals — a plan, a correction, or a stop. The advisor never edits
|
|
11
|
-
code or runs tests itself. Caps consultations per task (default 5), reuses
|
|
12
|
-
warm workflow agents before spawning new ones, and re-asserts the
|
|
13
|
-
discipline every 20 minutes through the /orchestrator-refresh loop. Adapts
|
|
14
|
-
Anthropic's coordinator pattern (plan big, execute small) to Claude Code.
|
|
15
|
-
Triggers: '/orchestrator', 'orchestrator strategy', 'run with an
|
|
16
|
-
orchestrator', 'executor-advisor mode', 'orchestrator enforcement', 'agent
|
|
17
|
-
routing', 'orchestrate'.
|
|
4
|
+
Advisor-orchestrator mode: plan and delegate while workflow-backed agents
|
|
5
|
+
execute; a shared session-advisor answers hard decisions with endorse,
|
|
6
|
+
correction, plan, or stop. Triggers: '/orchestrator', 'orchestrator
|
|
7
|
+
strategy', 'run with an orchestrator', 'executor-advisor mode',
|
|
8
|
+
'orchestrator enforcement', 'agent routing', 'orchestrate'.
|
|
18
9
|
---
|
|
19
10
|
|
|
20
11
|
# Orchestrator Strategy
|
|
@@ -37,8 +28,9 @@ is the advisor-orchestrator. In Claude Code the user always talks to the session
|
|
|
37
28
|
subagent, so the session is the user's sole interface: all user-facing
|
|
38
29
|
communication flows through it. It spawns and resumes executor subagents
|
|
39
30
|
— `clean-coder` and the like — and those executors do every bit of the
|
|
40
|
-
execution: the code edits, the build runs, the test runs. The
|
|
41
|
-
drives the plan and
|
|
31
|
+
execution: the code edits, the build runs, the test runs. The orchestrating
|
|
32
|
+
session drives the plan and routes hard decisions to the shared advisor
|
|
33
|
+
(Claude: warm `session-advisor`; Grok: this session self-as-advisor).
|
|
42
34
|
|
|
43
35
|
## Gotchas
|
|
44
36
|
|
|
@@ -46,10 +38,12 @@ drives the plan and answers the executors when they get stuck.
|
|
|
46
38
|
in the same session schedules a second refresh loop. Check whether the loop
|
|
47
39
|
is already running before you schedule one (see the invocation guard in
|
|
48
40
|
Process step 1).
|
|
49
|
-
- **The
|
|
50
|
-
itself, the pairing breaks and the executor's warm context is
|
|
51
|
-
every code edit and every build or test run to an executor; keep
|
|
52
|
-
|
|
41
|
+
- **The orchestrating session never executes.** The moment it edits a file or
|
|
42
|
+
runs the tests itself, the pairing breaks and the executor's warm context is
|
|
43
|
+
wasted. Hand every code edit and every build or test run to an executor; keep
|
|
44
|
+
the orchestrating session's own tool use to orchestration and light
|
|
45
|
+
verification reads. Hard decisions go to the shared advisor (Claude:
|
|
46
|
+
`session-advisor` via SendMessage; Grok: this session inline).
|
|
53
47
|
- **Flat ad hoc spawns bypass routing.** Every execution task goes through a
|
|
54
48
|
workflow-backed spawn or workflow resume so the required agent type, model,
|
|
55
49
|
prompt packet, and sidecar metadata stay attached to the work.
|
|
@@ -59,16 +53,16 @@ drives the plan and answers the executors when they get stuck.
|
|
|
59
53
|
- **Resuming an unnamed background agent needs its agentId.** A background
|
|
60
54
|
spawn returns an `agentId` (format `a...-...`); keep it so `SendMessage` can
|
|
61
55
|
reach that agent later. A named agent is reachable by name.
|
|
62
|
-
- **
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
- **Only the orchestrating session owns the shared advisor's lifecycle.** An
|
|
57
|
+
executor that finds the advisor unreachable (Claude warm agent, or this
|
|
58
|
+
session on Grok) reports that upward; it never spawns a replacement itself.
|
|
66
59
|
|
|
67
60
|
## Process
|
|
68
61
|
|
|
69
62
|
1. **Check whether the refresh loop is already running this
|
|
70
|
-
session
|
|
71
|
-
|
|
63
|
+
session.** If it is, do not schedule a second loop. Reuse any live
|
|
64
|
+
shared advisor bind (Claude warm `session-advisor`, or Grok self-bind —
|
|
65
|
+
run step 3 only when none exists yet), then skip straight to step 4.
|
|
72
66
|
|
|
73
67
|
2. **Register the discipline reminder.** By default, schedule it with
|
|
74
68
|
`ScheduleWakeup` at `delaySeconds: 1200`, prompt `/orchestrator-refresh`,
|
|
@@ -79,11 +73,48 @@ drives the plan and answers the executors when they get stuck.
|
|
|
79
73
|
enforcement surface: each firing re-asserts the discipline while the run is
|
|
80
74
|
in flight.
|
|
81
75
|
|
|
82
|
-
3. **
|
|
76
|
+
3. **Bind the shared advisor before any executor.** Detect the host profile
|
|
77
|
+
first (see Host profiles in
|
|
78
|
+
[`_shared/advisor/advisor-protocol.md`](../../_shared/advisor/advisor-protocol.md)).
|
|
79
|
+
On a **Claude host**, follow the Warm-up procedure in that doc (Agent spawn
|
|
80
|
+
of `session-advisor`). Compute the model floor as the max of the
|
|
81
|
+
orchestrating session's own tier and the highest model in the Workflow Agent
|
|
82
|
+
Routing table below (today: max(Sonnet, Opus) = Opus). Paste the **Claude
|
|
83
|
+
host** Advisor block from that doc, with the resolved agent name filled in,
|
|
84
|
+
into every executor's spawn prompt. On a **Grok host**, skip that spawn —
|
|
85
|
+
use the protocol's self-as-advisor path (this session *is* the advisor;
|
|
86
|
+
single tier `Grok`, attempt result `self`). Paste the **Grok host** Advisor
|
|
87
|
+
block from that doc into every executor's spawn prompt — never the Claude
|
|
88
|
+
SendMessage block. Every row in the routing table is a consumer of the
|
|
89
|
+
shared advisor, not just this session. The orchestrating session owns the
|
|
90
|
+
shared advisor's lifecycle end to end (spawn or self-bind, drift handling
|
|
91
|
+
per the shared doc, shutdown at task end); executors only ever SendMessage
|
|
92
|
+
the warm agent (Claude) or report to this session (Grok).
|
|
93
|
+
|
|
94
|
+
4. **Orchestrate the task.** Hold the plan and the user conversation. Execute
|
|
83
95
|
workflow-backed spawns or resumes using the routing table below, and keep
|
|
84
|
-
driving while they work.
|
|
96
|
+
driving while they work. Every executor spawn includes the host-matched
|
|
97
|
+
Advisor block from step 3. Your own tool use stays orchestration and light
|
|
85
98
|
verification reads. Keep your task list updated religiously.
|
|
86
99
|
|
|
100
|
+
5. **Consult the shared advisor at hard decisions.** Every consumer — each
|
|
101
|
+
executor and this session — consults when one of these holds (same list as
|
|
102
|
+
the protocol and Advisor block):
|
|
103
|
+
- A nontrivial plan is about to be locked in and acted on.
|
|
104
|
+
- The consumer believes its assigned work is finished.
|
|
105
|
+
- A commit, push, or other hard-to-reverse action is about to run.
|
|
106
|
+
- The same failure has come back more than once, or progress has stalled.
|
|
107
|
+
- The chosen approach is being reconsidered.
|
|
108
|
+
|
|
109
|
+
**Claude host:** consult the shared `session-advisor` via `SendMessage`.
|
|
110
|
+
**Grok host:** executors report to this orchestrating session; this session
|
|
111
|
+
answers the four signals inline (self-as-advisor — no Agent, no
|
|
112
|
+
SendMessage-to-`session-advisor`). Every consult gets back one of four
|
|
113
|
+
signals (ENDORSE, CORRECTION, PLAN, or STOP). See
|
|
114
|
+
`agents/session-advisor.md` for what each signal means and
|
|
115
|
+
[`_shared/advisor/advisor-protocol.md`](../../_shared/advisor/advisor-protocol.md)
|
|
116
|
+
for the consult format.
|
|
117
|
+
|
|
87
118
|
## Workflow Agent Routing
|
|
88
119
|
|
|
89
120
|
Every delegated task runs through a workflow-backed agent invocation. Do not
|
|
@@ -93,11 +124,10 @@ available.
|
|
|
93
124
|
| Work | Agent type | Model |
|
|
94
125
|
|---|---|---|
|
|
95
126
|
| Feature, bug, and refactor coding | `clean-coder` | `opus` |
|
|
96
|
-
| Verification passes | `code-verifier` | `
|
|
127
|
+
| Verification passes | `code-verifier` | `sonnet` |
|
|
97
128
|
| Script runs, GitHub posting, and backfill driving | `general-purpose` runner | `sonnet` |
|
|
98
|
-
| PR descriptions | `pr-description-writer` | `
|
|
129
|
+
| PR descriptions | `pr-description-writer` | `haiku`, with file-list grounding check |
|
|
99
130
|
| Fan-out searches and checklist verification reads | `Explore` | `haiku`; use `sonnet` when judgment-heavy |
|
|
100
|
-
| Escalated blockers needing a second opinion beyond the orchestrator's own judgment | `code-advisor` | Fable preferred (matches the orchestrating session); opus if Fable is unavailable. |
|
|
101
131
|
|
|
102
132
|
Routing rules:
|
|
103
133
|
|
|
@@ -114,45 +144,6 @@ Routing rules:
|
|
|
114
144
|
- Exploration workflows return file paths, line numbers, and direct evidence;
|
|
115
145
|
they do not write code or mutate repo state.
|
|
116
146
|
|
|
117
|
-
4. **Executors consult at a hard decision.** Each executor's spawn prompt tells
|
|
118
|
-
it to stop and message you — with the task, what it tried, and the exact
|
|
119
|
-
blocker (plus any short code excerpt that helps) — when one of these holds:
|
|
120
|
-
- It has tried the same problem twice or more and it still fails.
|
|
121
|
-
- A decision changes the deliverable's scope or a contract that is hard to
|
|
122
|
-
reverse.
|
|
123
|
-
- Two constraints conflict and it cannot satisfy both.
|
|
124
|
-
- It is unsure whether to stop or keep going.
|
|
125
|
-
|
|
126
|
-
5. **Answer with one signal.** On a consultation, reply with exactly one
|
|
127
|
-
signal, brief (about 400 to 700 tokens):
|
|
128
|
-
- **PLAN** — a different approach, as concrete ordered steps the executor
|
|
129
|
-
can run. When a warm agent fits the plan, name which one to resume.
|
|
130
|
-
- **CORRECTION** — the executor's approach is right, one thing is wrong;
|
|
131
|
-
name the wrong step and the fix.
|
|
132
|
-
- **STOP** — no path satisfies the task as assigned; say why so it can be
|
|
133
|
-
reported upward.
|
|
134
|
-
The executor resumes the moment your reply lands.
|
|
135
|
-
|
|
136
|
-
A worked consultation:
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
Executor → advisor
|
|
140
|
-
Task: add a retry to the upload client.
|
|
141
|
-
Tried: wrapped upload() in a three-attempt loop; the second attempt
|
|
142
|
-
double-posts.
|
|
143
|
-
Blocker: the server takes no idempotency key, so a retry after a timeout
|
|
144
|
-
creates a duplicate record.
|
|
145
|
-
|
|
146
|
-
Advisor → executor
|
|
147
|
-
CORRECTION — the retry loop is right; the missing piece is a stable request
|
|
148
|
-
id. Generate one client-side on the first attempt and send the same id on
|
|
149
|
-
every retry, so the server treats the retries as one request.
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
For a decision the advisor itself cannot settle, it may use a workflow
|
|
153
|
-
escalation to the tool-less `code-advisor` agent for a second opinion — an
|
|
154
|
-
optional escalation, not a required step.
|
|
155
|
-
|
|
156
147
|
## Agent reuse (non-negotiable)
|
|
157
148
|
|
|
158
149
|
- **Resume before you spawn, always.** A warm agent carries its context and
|
|
@@ -162,27 +153,32 @@ Routing rules:
|
|
|
162
153
|
matches the routing table.
|
|
163
154
|
- **Spawn a fresh agent only when** no existing agent holds relevant context,
|
|
164
155
|
or a genuine task switch needs a clean context.
|
|
165
|
-
- **Name the agent to resume.** When
|
|
166
|
-
|
|
156
|
+
- **Name the agent to resume.** When a PLAN from the shared advisor fits a warm
|
|
157
|
+
agent, name which agent to resume and where.
|
|
167
158
|
|
|
168
159
|
## Constraints
|
|
169
160
|
|
|
170
161
|
- One `/orchestrator` per session; the invocation guard blocks a second
|
|
171
162
|
reminder loop.
|
|
172
|
-
- The
|
|
173
|
-
|
|
163
|
+
- The orchestrating session orchestrates and routes hard decisions to the
|
|
164
|
+
shared advisor (host-matched path in step 5), but never edits code or runs a
|
|
165
|
+
build or test itself — executors do that.
|
|
174
166
|
- Delegated execution uses workflow-backed agent invocations and follows the
|
|
175
167
|
Workflow Agent Routing table exactly.
|
|
176
|
-
-
|
|
177
|
-
|
|
168
|
+
- One shared advisor per orchestrated session, owned by the orchestrating
|
|
169
|
+
session (see
|
|
170
|
+
[`_shared/advisor/advisor-protocol.md`](../../_shared/advisor/advisor-protocol.md))
|
|
171
|
+
— on Claude, executors consult a warm `session-advisor` via SendMessage; on
|
|
172
|
+
Grok, this session is the advisor and executors report here. Executors never
|
|
173
|
+
spawn or respawn the advisor.
|
|
178
174
|
- Reuse a warm agent over a cold spawn whenever one holds relevant context.
|
|
179
175
|
|
|
180
176
|
## File Index
|
|
181
177
|
|
|
182
178
|
| File | Purpose |
|
|
183
179
|
|---|---|
|
|
184
|
-
| `SKILL.md` |
|
|
180
|
+
| `SKILL.md` | Orchestrator strategy, workflow routing contract, shared-advisor consult protocol, reuse rules, and constraints. |
|
|
185
181
|
|
|
186
182
|
## Folder Map
|
|
187
183
|
|
|
188
|
-
- `SKILL.md` — complete
|
|
184
|
+
- `SKILL.md` — complete orchestrator workflow instructions.
|
|
@@ -2,22 +2,34 @@
|
|
|
2
2
|
name: orchestrator-refresh
|
|
3
3
|
description: >-
|
|
4
4
|
Fired by the /orchestrator loop reminder about every 20 minutes to
|
|
5
|
-
re-assert the advisor discipline mid-run
|
|
6
|
-
/
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
re-assert the advisor discipline mid-run: orchestrate, route hard decisions
|
|
6
|
+
to the shared advisor (ENDORSE / CORRECTION / PLAN / STOP — SendMessage on
|
|
7
|
+
Claude, self-as-advisor on Grok), reuse warm agents. Triggers:
|
|
8
|
+
'/orchestrator-refresh'.
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Orchestrator Refresh
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
Detect the host profile first (see Host profiles in
|
|
14
|
+
[`_shared/advisor/advisor-protocol.md`](../../_shared/advisor/advisor-protocol.md)).
|
|
15
|
+
Re-assert the discipline for that host only — do not invent a Claude
|
|
16
|
+
`session-advisor` spawn on a Grok host.
|
|
17
|
+
|
|
18
|
+
1. **You are the advisor-orchestrator.** Orchestrate and hold the user
|
|
19
|
+
conversation; spawn executor subagents to do all the work — every code edit
|
|
20
|
+
and build or test run.
|
|
21
|
+
2. **Hard decisions go to the shared advisor.**
|
|
22
|
+
- **Claude host:** executors consult the warm `session-advisor` via
|
|
23
|
+
`SendMessage` and receive one of four signals — ENDORSE, CORRECTION, PLAN,
|
|
24
|
+
or STOP. The orchestrating session routes its own hard decisions the same
|
|
25
|
+
way and keeps its tool use to orchestration and light verification reads.
|
|
26
|
+
- **Grok host:** this session *is* the advisor (self-as-advisor). Do **not**
|
|
27
|
+
spawn `session-advisor` and do **not** tell executors to SendMessage a
|
|
28
|
+
separate advisor agent. Executors report blockers to this session; answer
|
|
29
|
+
with ENDORSE / CORRECTION / PLAN / STOP inline.
|
|
30
|
+
3. **Resume before you spawn.** `SendMessage` an existing *executor* agent by
|
|
31
|
+
name or `agentId` to reuse its warm context; prefer that over a cold spawn.
|
|
32
|
+
(On Grok this is executor reuse only — not an advisor spawn.)
|
|
21
33
|
4. **Fresh spawn only for a genuine task switch.** No tool compacts or clears a
|
|
22
34
|
subagent's context, so a clean context comes from a fresh spawn — never tell
|
|
23
35
|
an agent to compact.
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: post-audit-findings
|
|
3
3
|
description: >-
|
|
4
|
-
Publishes an audit pass as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
toggle via BUGTEAM_REVIEWER_ACCOUNT, and harvests finding comment ids and
|
|
10
|
-
PRRT thread node ids for the fix loop. Invoked by audit skills (bugteam,
|
|
11
|
-
qbug, findbugs) after each audit pass, CLEAN or DIRTY; not for ad-hoc PR
|
|
12
|
-
comments or review replies.
|
|
4
|
+
Publishes an audit pass as a GitHub PR review through post_audit_thread.py:
|
|
5
|
+
maps findings to the review-comment JSON shape, splits anchored from
|
|
6
|
+
unanchored, and collects the comment and thread ids for the fix loop. Invoked
|
|
7
|
+
by audit skills (bugteam, qbug, findbugs) after each pass; not for ad-hoc
|
|
8
|
+
comments.
|
|
13
9
|
---
|
|
14
10
|
|
|
15
11
|
# Post Audit Findings
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pr-consistency-audit
|
|
3
3
|
description: >-
|
|
4
|
-
Audits a PR for cross-file inconsistencies
|
|
4
|
+
Audits a PR for cross-file inconsistencies: wrong arguments, missing files or
|
|
5
|
+
scripts, stale remnants, docstring mismatches, and cross-platform bugs. Use
|
|
6
|
+
when the user says 'audit this PR', 'find inconsistencies', 'cross-reference
|
|
7
|
+
docs against scripts', 'check for stale references', or 'PR consistency
|
|
8
|
+
audit'.
|
|
5
9
|
---
|
|
6
10
|
|
|
7
11
|
# PR Consistency Audit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# pr-converge skill
|
|
2
2
|
|
|
3
|
-
Drives a draft PR to convergence by
|
|
3
|
+
Drives a draft PR to convergence by driving the internal passes to clean first — a code-review pass and a bugteam audit — then running Cursor Bugbot and Copilot as terminal confirmation gates, applying TDD fixes, posting inline replies, and re-triggering the external reviewers each tick until all are clean on the same HEAD and the PR is mergeable.
|
|
4
4
|
|
|
5
5
|
**Trigger:** `/pr-converge`, "drive PR to convergence", "loop bugbot and bugteam", "babysit bugbot and bugteam", "until both are clean", "converge this PR".
|
|
6
6
|
|