claude-dev-env 2.28.1 → 2.29.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/.agents/agents/AGENTS.md +0 -31
- package/.agents/agents/clean-coder.md +1 -1
- package/.agents/agents/test_agent_frontmatter.py +3 -1
- package/.agents/skills/AGENTS.md +0 -70
- package/.agents/skills/_shared/AGENTS.md +0 -44
- package/.agents/skills/_shared/advisor/AGENTS.md +0 -8
- package/.agents/skills/_shared/pr-loop/AGENTS.md +0 -57
- package/.agents/skills/_shared/pr-loop/prompts/AGENTS.md +0 -8
- package/.agents/skills/_shared/pr-loop/scripts/AGENTS.md +0 -34
- package/.agents/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/AGENTS.md +0 -23
- package/.agents/skills/autoconverge/AGENTS.md +0 -35
- package/.agents/skills/autoconverge/reference/AGENTS.md +0 -15
- package/.agents/skills/autoconverge/workflow/AGENTS.md +0 -25
- package/.agents/skills/autoconverge/workflow/autoconverge_report_constants/AGENTS.md +0 -15
- package/.agents/skills/everything-search/AGENTS.md +0 -16
- package/.agents/skills/fresh-branch/AGENTS.md +0 -13
- package/.agents/skills/grok-spawn/AGENTS.md +0 -27
- package/.agents/skills/orchestrator/.claude/CLAUDE.md +1 -0
- package/.agents/skills/orchestrator/AGENTS.md +1 -0
- package/.agents/skills/orchestrator/SKILL.md +44 -53
- package/.agents/skills/orchestrator/reference/.claude/CLAUDE.md +1 -0
- package/.agents/skills/orchestrator/reference/AGENTS.md +1 -0
- package/.agents/skills/orchestrator/reference/consult-the-orchestrator.md +70 -0
- package/.agents/skills/orchestrator/reference/executor-consult-block.md +62 -0
- package/.agents/skills/orchestrator/reference/host-detect.md +15 -0
- package/.agents/skills/orchestrator/test_orchestrator_skill_contract.py +62 -0
- package/.agents/skills/orchestrator-refresh/SKILL.md +16 -34
- package/.agents/skills/rebase/AGENTS.md +0 -31
- package/.agents/skills/session-log/AGENTS.md +0 -31
- package/.agents/skills/session-tidy/AGENTS.md +0 -35
- package/.agents/skills/skill-builder/AGENTS.md +0 -48
- package/.agents/skills/skill-builder/references/AGENTS.md +0 -24
- package/.agents/skills/skill-builder/templates/AGENTS.md +0 -13
- package/.agents/skills/skill-builder/workflows/AGENTS.md +0 -18
- package/.agents/skills/task-build/AGENTS.md +0 -28
- package/.agents/skills/update/AGENTS.md +0 -37
- package/.agents/skills-archived/AGENTS.md +0 -44
- package/.agents/skills-archived/anthropic-plan/AGENTS.md +0 -33
- package/.agents/skills-archived/anthropic-plan/scripts/AGENTS.md +0 -10
- package/.agents/skills-archived/anthropic-plan/scripts/anthropic_plan_scripts_constants/AGENTS.md +0 -15
- package/.agents/skills-archived/anthropic-plan/templates/AGENTS.md +0 -12
- package/.agents/skills-archived/anthropic-plan/workflow/AGENTS.md +0 -13
- package/.agents/skills-archived/auditing-claude-config/AGENTS.md +0 -20
- package/.agents/skills-archived/bugteam/AGENTS.md +0 -29
- package/.agents/skills-archived/bugteam/reference/AGENTS.md +0 -19
- package/.agents/skills-archived/bugteam/reference/obstacles/AGENTS.md +0 -23
- package/.agents/skills-archived/bugteam/scripts/AGENTS.md +0 -29
- package/.agents/skills-archived/bugteam/scripts/bugteam_scripts_constants/AGENTS.md +0 -17
- package/.agents/skills-archived/codex-review/AGENTS.md +0 -45
- package/.agents/skills-archived/codex-review/reference/AGENTS.md +0 -14
- package/.agents/skills-archived/codex-review/scripts/codex_review_scripts_constants/AGENTS.md +0 -17
- package/.agents/skills-archived/codex-review/test_skill_scaffold.py +13 -3
- package/.agents/skills-archived/copilot-review/AGENTS.md +0 -17
- package/.agents/skills-archived/pr-converge/AGENTS.md +0 -31
- package/.agents/skills-archived/pr-converge/pr_converge_skill_constants/AGENTS.md +0 -25
- package/.agents/skills-archived/pr-converge/reference/AGENTS.md +0 -27
- package/.agents/skills-archived/pr-converge/reference/obstacles/AGENTS.md +0 -22
- package/.agents/skills-archived/pr-converge/scripts/AGENTS.md +0 -45
- package/.agents/skills-archived/pr-converge/scripts/pr_converge_scripts_constants/AGENTS.md +0 -17
- package/.agents/skills-archived/pr-converge/workflows/AGENTS.md +0 -15
- package/.agents/skills-archived/recall/AGENTS.md +0 -29
- package/.agents/skills-archived/remember/AGENTS.md +0 -30
- package/AGENTS.md +0 -112
- package/_shared/AGENTS.md +0 -16
- package/_shared/advisor/AGENTS.md +0 -21
- package/_shared/advisor/advisor-protocol.md +4 -1
- package/_shared/advisor/reference/consult-format.md +4 -2
- package/_shared/pr-loop/AGENTS.md +0 -27
- package/_shared/pr-loop/scripts/AGENTS.md +0 -49
- package/_shared/pr-loop/scripts/code_rules_gate_parts/AGENTS.md +0 -41
- package/_shared/pr-loop/scripts/codex_review_scripts_constants/AGENTS.md +0 -17
- package/_shared/pr-loop/scripts/pr_converge_scripts_constants/AGENTS.md +0 -17
- package/_shared/pr-loop/scripts/pr_converge_skill_constants/AGENTS.md +0 -25
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/AGENTS.md +0 -25
- package/_shared/pr-loop/scripts/tests/AGENTS.md +0 -43
- package/_shared/process-tree/AGENTS.md +0 -40
- package/audit-rubrics/AGENTS.md +0 -42
- package/audit-rubrics/category_rubrics/AGENTS.md +0 -36
- package/audit-rubrics/prompts/AGENTS.md +0 -36
- package/bin/AGENTS.md +0 -118
- package/bin/install.test.mjs +1 -1
- package/commands/AGENTS.md +0 -14
- package/docs/AGENTS.md +0 -31
- package/docs/references/AGENTS.md +0 -16
- package/hooks/AGENTS.md +0 -27
- package/hooks/advisory/AGENTS.md +0 -15
- package/hooks/blocking/AGENTS.md +0 -112
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/AGENTS.md +0 -27
- package/hooks/blocking/config/AGENTS.md +0 -9
- package/hooks/blocking/inventory_intent_records/AGENTS.md +0 -25
- package/hooks/blocking/package_inventory_stale_blocker_parts/AGENTS.md +0 -25
- package/hooks/blocking/pii_prevention_blocker_parts/AGENTS.md +0 -23
- package/hooks/blocking/tdd_enforcer_parts/AGENTS.md +0 -29
- package/hooks/git-hooks/AGENTS.md +0 -31
- package/hooks/git-hooks/git_hooks_constants/AGENTS.md +0 -20
- package/hooks/hooks_constants/AGENTS.md +0 -99
- package/hooks/lifecycle/AGENTS.md +0 -17
- package/hooks/observability/AGENTS.md +0 -19
- package/hooks/session/AGENTS.md +0 -37
- package/hooks/validation/AGENTS.md +0 -19
- package/hooks/validators/AGENTS.md +0 -51
- package/hooks/workflow/AGENTS.md +0 -15
- package/output-styles/AGENTS.md +0 -14
- package/package.json +1 -1
- package/rules/AGENTS.md +0 -55
- package/scripts/AGENTS.md +0 -55
- package/scripts/dev_env_scripts_constants/AGENTS.md +0 -20
- package/scripts/sync_to_cursor/AGENTS.md +0 -22
- package/scripts/tests/AGENTS.md +0 -34
- package/system-prompts/AGENTS.md +0 -24
|
@@ -1,28 +1 @@
|
|
|
1
|
-
# pr-converge/reference
|
|
2
1
|
|
|
3
|
-
Reference documents for the `pr-converge` skill. These files define the per-tick step sequence, convergence gates, fix protocol, stop conditions, state schema, multi-PR orchestration, and examples.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `progress-checklist.md` | The per-tick eleven-step checklist (Step 0 open → Step 11 report), each step pointing to its spoke file |
|
|
10
|
-
| `per-tick.md` | Step-by-step procedure for one tick (resolve HEAD, run the internal CODE_REVIEW and BUGTEAM phases, then the terminal BUGBOT and COPILOT_WAIT gates, schedule next wakeup) |
|
|
11
|
-
| `convergence-gates.md` | Six gates that must all pass before the PR is marked ready for review |
|
|
12
|
-
| `fix-protocol.md` | pr-converge deltas on the `pr-fix-protocol` skill: multi-PR teammate obligations and the same-tick bugbot re-trigger rule |
|
|
13
|
-
| `ground-rules.md` | Non-negotiable constraints for the convergence loop |
|
|
14
|
-
| `stop-conditions.md` | Conditions that end the loop without convergence (cap reached, stuck, user stop) |
|
|
15
|
-
| `state-schema.md` | Fields in `pr-converge-state.json` and their meanings |
|
|
16
|
-
| `multi-pr-orchestration.md` | How to run the loop across multiple PRs in parallel |
|
|
17
|
-
| `examples.md` | Worked examples of tick sequences |
|
|
18
|
-
|
|
19
|
-
## Subdirectories
|
|
20
|
-
|
|
21
|
-
| Directory | Role |
|
|
22
|
-
|---|---|
|
|
23
|
-
| `obstacles/` | Per-obstacle runbooks for known failure modes in the convergence loop |
|
|
24
|
-
|
|
25
|
-
## Conventions
|
|
26
|
-
|
|
27
|
-
- `per-tick.md` is the primary reference loaded during each tick. The pacing workflow lives in `../workflows/schedule-wakeup-loop.md`.
|
|
28
|
-
- Every gate in `convergence-gates.md` must produce evidence before the next gate runs.
|
|
@@ -1,23 +1 @@
|
|
|
1
|
-
# pr-converge/reference/obstacles
|
|
2
1
|
|
|
3
|
-
Per-obstacle runbooks for known failure modes in the `pr-converge` convergence loop. Each file covers one specific obstacle: what causes it, how to detect it, and how to recover.
|
|
4
|
-
|
|
5
|
-
## Files
|
|
6
|
-
|
|
7
|
-
| File | Obstacle |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `fix-post-replies.md` | Posting inline review replies fails or posts to the wrong thread |
|
|
10
|
-
| `fix-publish-summary.md` | Publishing the bugteam summary comment fails |
|
|
11
|
-
| `fix-push.md` | `git push` fails during a fix commit |
|
|
12
|
-
| `fix-read-filelines.md` | Reading file line ranges for a fix fails |
|
|
13
|
-
| `fix-reset-state.md` | State JSON becomes corrupt or inconsistent between ticks |
|
|
14
|
-
| `fix-resolve-threads.md` | Resolving inline comment threads via GraphQL fails |
|
|
15
|
-
| `fix-spawn-clean-coder.md` | Spawning the `clean-coder` subagent fails or produces no output |
|
|
16
|
-
| `fix-stage-commit.md` | Staging or committing a fix fails |
|
|
17
|
-
| `fix-trigger-bugbot.md` | Triggering Cursor Bugbot via an issue comment fails |
|
|
18
|
-
| `fix-write-test.md` | Writing a failing test before a fix fails |
|
|
19
|
-
|
|
20
|
-
## Conventions
|
|
21
|
-
|
|
22
|
-
- Each runbook is loaded on demand when the convergence loop hits that specific obstacle.
|
|
23
|
-
- Runbooks do not overlap with `per-tick.md`; they cover edge cases and recovery paths that fall outside the normal tick flow.
|
|
@@ -1,46 +1 @@
|
|
|
1
|
-
# pr-converge/scripts
|
|
2
1
|
|
|
3
|
-
Python helper scripts for the `pr-converge` skill, plus their tests and a PowerShell/AutoHotkey toolset for advancing Cursor agents.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `check_bugbot_ci.py` | Checks bugbot CI check-run status on a given SHA |
|
|
10
|
-
| `check_convergence.py` | Evaluates whether all convergence gates pass on the current HEAD |
|
|
11
|
-
| `check_convergence_availability.py` | Resolves reviewer waivers from flag, disk-authoritative settings (env fallback), and the availability/quota probe, with waived / enforced / probe_error_reason states |
|
|
12
|
-
| `check_convergence_gates.py` | GitHub REST leaf checks (review and Bugbot) the convergence gates call |
|
|
13
|
-
| `check_convergence_thread_gates.py` | GitHub GraphQL and REST leaf checks (review threads and pending reviewers) the convergence gates call |
|
|
14
|
-
| `check_pending_reviews.py` | Fetches pending review requests and reviewer states |
|
|
15
|
-
| `fetch_copilot_reviews.py` | Fetches Copilot reviewer reviews filtered to the current HEAD |
|
|
16
|
-
| `post_fix_reply.py` | Posts an inline reply to a review comment thread |
|
|
17
|
-
| `reflow_skill_md.py` | Reformats `SKILL.md` to enforce a line width limit |
|
|
18
|
-
| `README.md` | MCP tool reference for PR operations used by the scripts |
|
|
19
|
-
| `_pr_converge_path_setup.py` | Adds the scripts directory to `sys.path` for direct script imports |
|
|
20
|
-
| `conftest.py` | Puts the scripts directory on `sys.path` so pytest collects the suite |
|
|
21
|
-
| `test_check_bugbot_ci.py` | Tests for `check_bugbot_ci.py` |
|
|
22
|
-
| `test_check_convergence.py` | Tests for `check_convergence.py` |
|
|
23
|
-
| `test_check_convergence_availability.py` | Tests for `check_convergence_availability.py` |
|
|
24
|
-
| `test_check_convergence_contract.py` | Contract pins for `check_convergence.py` gate wiring |
|
|
25
|
-
| `test_check_convergence_gates.py` | Tests for `check_convergence_gates.py` |
|
|
26
|
-
| `test_check_convergence_thread_gates.py` | Tests for `check_convergence_thread_gates.py` |
|
|
27
|
-
| `test__pr_converge_path_setup.py` | Tests for `_pr_converge_path_setup.py` |
|
|
28
|
-
| `test_cursor_agents_continue.py` | Tests for the cursor-agents-continue toolset |
|
|
29
|
-
| `test_reflow_skill_md.py` | Tests for `reflow_skill_md.py` |
|
|
30
|
-
| `caller-window-pid.ps1` | Gets the PID of the calling terminal window |
|
|
31
|
-
| `cursor-agents-continue.ahk` | AutoHotkey script to advance Cursor agent prompts |
|
|
32
|
-
| `cursor-agents-continue.cmd` | CMD wrapper for the AHK script |
|
|
33
|
-
| `cursor-agents-continue-stop-others.ps1` | Stops other Cursor agents before advancing one |
|
|
34
|
-
| `cursor-agents-continue-caller.cmd` | Caller-side CMD wrapper |
|
|
35
|
-
|
|
36
|
-
## Subdirectories
|
|
37
|
-
|
|
38
|
-
| Directory | Role |
|
|
39
|
-
|---|---|
|
|
40
|
-
| `pr_converge_scripts_constants/` | Script-specific constants (re-exports skill constants plus adds reflow/CLI constants) |
|
|
41
|
-
|
|
42
|
-
## Conventions
|
|
43
|
-
|
|
44
|
-
- Scripts import constants from `pr_converge_scripts_constants.pr_converge_constants`, which re-exports everything from `pr_converge_skill_constants.constants`.
|
|
45
|
-
- Run scripts as `python ~/.claude/skills/pr-converge/scripts/<script>.py --owner <O> --repo <R> --pr-number <N>`.
|
|
46
|
-
- The `reflow_skill_md.py` script targets `SKILL.md` in the parent skill directory (resolved via `TARGET_SKILL_PATH` in `pr_converge_scripts_constants/reflow_skill_md_constants.py`).
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
# pr_converge_scripts_constants
|
|
2
1
|
|
|
3
|
-
Constants module for the `pr-converge` skill's Python scripts. Re-exports all runtime/API constants from the skill-level module and adds script-specific constants for CLI arguments, markdown patterns, and reflow settings.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `__init__.py` | Package marker |
|
|
10
|
-
| `pr_converge_constants.py` | Re-exports all constants from `pr_converge_skill_constants.constants` plus adds script-specific values |
|
|
11
|
-
| `reflow_skill_md_constants.py` | Constants for `reflow_skill_md.py`: line width limit, list item patterns, `TARGET_SKILL_PATH` |
|
|
12
|
-
| `convergence_gate_constants.py` | Constants for `check_convergence_gates.py`: short-SHA length, join separators, and the review-threads GraphQL query |
|
|
13
|
-
|
|
14
|
-
## Conventions
|
|
15
|
-
|
|
16
|
-
- `pr_converge_constants.py` uses `from pr_converge_skill_constants.constants import ...` (with `# noqa: F401`) to re-export everything so script files can import from one location.
|
|
17
|
-
- `reflow_skill_md_constants.py` resolves `TARGET_SKILL_PATH` from its own `__file__` path, pointing to `SKILL.md` three directories up.
|
|
18
|
-
- Script-specific regex patterns (ordered list items, bullet list items, unfinished markdown link targets, markdown reference definitions) live in `reflow_skill_md_constants.py`.
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
# pr-converge/workflows
|
|
2
1
|
|
|
3
|
-
Pacing workflow specification for the `pr-converge` loop.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `schedule-wakeup-loop.md` | Specifies `ScheduleWakeup` call parameters, delays, and stop/convergence conditions for each tick |
|
|
10
|
-
|
|
11
|
-
## Conventions
|
|
12
|
-
|
|
13
|
-
- `per-tick.md` (in `../reference/`) references this file for Step 4 (schedule next wakeup). Read it before running Step 4.
|
|
14
|
-
- Default delay: `delaySeconds: 360`. Exception: BUGBOT inline-lag branch uses `delaySeconds: 90`.
|
|
15
|
-
- On convergence or a hard stop condition, omit the `ScheduleWakeup` call entirely.
|
|
16
|
-
- The `reason` field in each `ScheduleWakeup` call names what is being awaited, including the current `phase` and `bugbot_clean_at` SHA when set.
|
|
@@ -1,30 +1 @@
|
|
|
1
|
-
# recall
|
|
2
1
|
|
|
3
|
-
Retrieves prior session context and decisions from the Obsidian vault for the current project.
|
|
4
|
-
|
|
5
|
-
**Trigger:** `/recall [search query or project name]`.
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Surfaces relevant session reports, decision notes, and research from the Obsidian vault before starting work. Prevents repeating decisions already made or missing known gotchas.
|
|
10
|
-
|
|
11
|
-
## Key files
|
|
12
|
-
|
|
13
|
-
| File | Purpose |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `SKILL.md` | The complete skill — six steps (resolve query, frontmatter search, content search, read top matches, present with attribution, handle no results). No companion files. |
|
|
16
|
-
|
|
17
|
-
## How the skill runs
|
|
18
|
-
|
|
19
|
-
1. Uses `$ARGUMENTS` as the search query, or infers the project name from conversation context.
|
|
20
|
-
2. Searches by frontmatter first (`mcp__obsidian__search_notes` with `searchFrontmatter: true`) to catch session reports and decision notes tagged with the project.
|
|
21
|
-
3. Falls back to content keyword search when frontmatter search returns few results.
|
|
22
|
-
4. Reads the top 3 most relevant notes via `mcp__obsidian__read_note`, preferring recent notes and decision summaries over raw research.
|
|
23
|
-
5. Reports each note with its path, date, relevant excerpts, and whether any decisions are marked `status: Superseded`.
|
|
24
|
-
6. States clearly when no vault history exists — never infers or invents history.
|
|
25
|
-
|
|
26
|
-
## Conventions
|
|
27
|
-
|
|
28
|
-
- `disable-model-invocation: true` is not set; this skill does invoke the model to synthesize results.
|
|
29
|
-
- The skill is read-only: it never writes to the vault.
|
|
30
|
-
- Companion to `/remember` (which writes decisions) and `/session-log` (which writes session reports).
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
# remember
|
|
2
1
|
|
|
3
|
-
Saves a decision, gotcha, or architectural choice to the Obsidian vault as a structured note.
|
|
4
|
-
|
|
5
|
-
**Trigger:** User-initiated only. `/remember [what to remember]`.
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Writes a decision, fact, procedure, or gotcha to `decisions/[Project] - [Short Title].md` in the Obsidian vault. Each note carries structured frontmatter and a body shaped by its type, making it searchable and readable via `/recall`.
|
|
10
|
-
|
|
11
|
-
## Key files
|
|
12
|
-
|
|
13
|
-
| File | Purpose |
|
|
14
|
-
|---|---|
|
|
15
|
-
| `SKILL.md` | The complete skill — six steps (parse input, classify type, infer project, generate title, write to vault, confirm). No companion files. |
|
|
16
|
-
|
|
17
|
-
## Four note types
|
|
18
|
-
|
|
19
|
-
| Type | Body format |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `decision` | Decision + Reasoning + Alternatives + Consequences |
|
|
22
|
-
| `gotcha` | Gotcha + Symptom + Fix |
|
|
23
|
-
| `procedural` | 1–3 clear sentences describing the how-to |
|
|
24
|
-
| `fact` | 1–3 clear sentences stating the fact |
|
|
25
|
-
|
|
26
|
-
## Conventions
|
|
27
|
-
|
|
28
|
-
- `disable-model-invocation: true` is set — runs without a secondary LLM call.
|
|
29
|
-
- Writes via `mcp__obsidian__write_note` only; never edits existing notes.
|
|
30
|
-
- Path pattern: `decisions/[Project] - [Short Title].md`.
|
|
31
|
-
- Companion to `/recall` (reads vault) and `/session-log` (triggers decision extraction at session end).
|
package/AGENTS.md
CHANGED
|
@@ -1,113 +1 @@
|
|
|
1
|
-
less words. small words. few words. always. forever.
|
|
2
1
|
|
|
3
|
-
Avoid all redundant text for all output. IE: instead of "the review found 2 real issues", simply state "the review found 2 issues".
|
|
4
|
-
|
|
5
|
-
## User-facing language hierarchy
|
|
6
|
-
|
|
7
|
-
ELI5 owns beginner framing and beginner-friendly presentation, large visuals, minimal text, one stable self-contained HTML artifact, update-in-place continuity, and sharing when a response needs that presentation.
|
|
8
|
-
|
|
9
|
-
`rules/asd-ste100-language.md` owns sentence-level word choice, grammar, tone, punctuation, exact labels, and prose form in every user-facing response and every ELI5 page.
|
|
10
|
-
|
|
11
|
-
Named capability rules own evidence, questions, current-state documentation, completion, code documentation, durable artifacts, and runtime enforcement. They apply ASD sentence rules and use ELI5 presentation when their user-facing output needs that envelope.
|
|
12
|
-
|
|
13
|
-
Raw tool output, machine payloads, code, and native repository artifacts keep their required formats. Their user-visible explanations follow the ASD rule.
|
|
14
|
-
|
|
15
|
-
A responsible human verifies technical accuracy, terminology, safety, confidentiality, and intended meaning.
|
|
16
|
-
|
|
17
|
-
Ask when ambiguity materially changes scope or implementation. Collect credentials through secure UI only; never request secrets in chat.
|
|
18
|
-
|
|
19
|
-
## Documentation
|
|
20
|
-
|
|
21
|
-
Describe the current system state. Keep documentation self-contained. Apply `rules/asd-ste100-language.md` for sentence-level prose.
|
|
22
|
-
|
|
23
|
-
Code and tests
|
|
24
|
-
|
|
25
|
-
Tests must exercise real behavior, real data, and production paths. Test theater is forbidden.
|
|
26
|
-
|
|
27
|
-
For multi-step code tasks:
|
|
28
|
-
|
|
29
|
-
Coders consult a warm session-advisor when blocked (Sol xHigh).
|
|
30
|
-
Repair reported findings when that review mode is selected.
|
|
31
|
-
|
|
32
|
-
Use `~/.claude/agents/session-advisor.md` for advisor selection and consultation protocol.
|
|
33
|
-
|
|
34
|
-
Research and delegation
|
|
35
|
-
Delegate fact extraction when multiple files or search patterns are required. Request precise file-and-line answers.
|
|
36
|
-
|
|
37
|
-
Use warm & reusable parallel luna (you decide effort level per task) fast subagents for unrelated questions; threaded & named appropriately.
|
|
38
|
-
|
|
39
|
-
Read or search directly only in files you will modify via es.exe.
|
|
40
|
-
|
|
41
|
-
For code navigation, prefer es.exe, then content search or globbing.
|
|
42
|
-
|
|
43
|
-
Scope every es.exe search.
|
|
44
|
-
|
|
45
|
-
Never scan an entire drive or network share.
|
|
46
|
-
|
|
47
|
-
Use `~/.claude/skills/everything-search/SKILL.md` for scoped filesystem searches that require Everything.
|
|
48
|
-
|
|
49
|
-
Task tracking
|
|
50
|
-
Track every task using `update_plan`.
|
|
51
|
-
|
|
52
|
-
## Definitions
|
|
53
|
-
Warm agent: Any agent who has acted within the past 30 minutes.
|
|
54
|
-
|
|
55
|
-
# Response and working style
|
|
56
|
-
|
|
57
|
-
ELI5 presentation sets beginner framing, useful visuals, concise detail, stable HTML continuity, and sharing when that capability applies.
|
|
58
|
-
|
|
59
|
-
Sentence-level language follows `rules/asd-ste100-language.md`.
|
|
60
|
-
|
|
61
|
-
Progress and final structure follow the named completion contract.
|
|
62
|
-
|
|
63
|
-
# Word budget
|
|
64
|
-
|
|
65
|
-
Keep ELI5 pages concise and useful. Use the ASD rule's 20-word procedure target and 25-word descriptive target when the technical content allows.
|
|
66
|
-
|
|
67
|
-
# No contrast framing
|
|
68
|
-
|
|
69
|
-
Use direct claims and direct actions. The canonical rule owns sentence form; capability contracts own exceptions needed to explain a concrete failure.
|
|
70
|
-
|
|
71
|
-
# Naming
|
|
72
|
-
|
|
73
|
-
Use full capability names for files, modules, functions, variables, branches, and tests. Name reusable components for the capability they provide. Keep workflow words on driver surfaces.
|
|
74
|
-
|
|
75
|
-
# Change size
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
When planning work or opening a pull request, size the change first: one self-contained change, around 100 lines, with its tests. Read the small-changelists guide for the numbers, the allowed exceptions, and how to split.
|
|
80
|
-
|
|
81
|
-
Use `~/.claude/skills/pr-small-cl/SKILL.md` for change-size guidance and review-sized boundaries.
|
|
82
|
-
|
|
83
|
-
## Execution and delegation
|
|
84
|
-
|
|
85
|
-
Delegate all task work to Tier 3 agents.
|
|
86
|
-
|
|
87
|
-
Draft a separate assignment for each agent. Each assignment must be clear, concise, tightly scoped, independently executable, and explicit about ownership, constraints, deliverables, and verification.
|
|
88
|
-
|
|
89
|
-
Run independent assignments in parallel. Keep overlapping work sequential. The primary agent coordinates agents, resolves dependencies, verifies results, and reports outcomes.
|
|
90
|
-
|
|
91
|
-
## Definitions
|
|
92
|
-
|
|
93
|
-
Tier 3 agent: A strong execution specialist that independently completes a bounded assignment, follows repository contracts, repairs routine failures, tests production behavior, and escalates decisions that materially affect architecture or scope.
|
|
94
|
-
|
|
95
|
-
Warm agent: An agent that has acted within the past 30 minutes. Reuse warm agents for related follow-up work.
|
|
96
|
-
|
|
97
|
-
# Corrections
|
|
98
|
-
|
|
99
|
-
Only correct an earlier statement when the ecode, conclusions, or decisions. Statecorrections plainly and briefly, then continue the task. For slips that change nothing for the user, make the fix and move on without noting it.
|
|
100
|
-
|
|
101
|
-
# Tool calls and output hygiene
|
|
102
|
-
|
|
103
|
-
When you use a tool, you may say a brief sentence first. If no tool can express what the user asked for, say so. Do not include internal or system XML tags in your response.
|
|
104
|
-
|
|
105
|
-
Use the named review workflow for code-review response reporting.
|
|
106
|
-
|
|
107
|
-
# Code review
|
|
108
|
-
|
|
109
|
-
When reviewing code, report everything you find. Filtering belongs in a separate pass.
|
|
110
|
-
|
|
111
|
-
<tone_preference>
|
|
112
|
-
ELI5 sets beginner-friendly presentation when it applies. ASD sets sentence-level wording and tone.
|
|
113
|
-
</tone_preference>
|
package/_shared/AGENTS.md
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
# _shared
|
|
2
1
|
|
|
3
|
-
Cross-cutting runtime assets shared by multiple skills. The PR-loop skills (`bugteam`, `pr-converge`, `findbugs`, `fixbugs`) are one such cluster; other clusters live here too. Files here are installed into `~/.claude/_shared/` by `bin/install.mjs` alongside the skill directories that import them.
|
|
4
|
-
|
|
5
|
-
Shared assets use `~/.claude/rules/asd-ste100-language.md` for user-facing word choice, sentence style, tone, punctuation, and prose form. Each asset keeps its workflow-specific structure.
|
|
6
|
-
|
|
7
|
-
## Contents
|
|
8
|
-
|
|
9
|
-
| Entry | Description |
|
|
10
|
-
|---|---|
|
|
11
|
-
| `pr-loop/` | Docs, scripts, and constants for the PR-loop workflow suite |
|
|
12
|
-
| `advisor/` | Warm-advisor spawn-and-consult protocol for `team-advisor` and `orchestrator` |
|
|
13
|
-
| `process-tree/` | One process-tree kill helper for every script that captures a spawned CLI's output |
|
|
14
|
-
|
|
15
|
-
## Install path
|
|
16
|
-
|
|
17
|
-
`bin/install.mjs` copies this entire directory tree verbatim to `~/.claude/_shared/`. Skills reference files here by relative path from their own skill root (e.g. `../../_shared/pr-loop/audit-contract.md`).
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
# _shared/advisor
|
|
2
1
|
|
|
3
|
-
Warm-advisor bind-and-consult protocol shared by `team-advisor`, `orchestrator`, `orchestrator-refresh`, and every executor subagent `orchestrator` routes work to. Changes here affect all of these simultaneously — treat this as a breaking-change surface.
|
|
4
|
-
|
|
5
|
-
Host profile is resolved from session identity first (Claude, Codex, or neither). Claude walks Fable then Sol in-session (CLI chain as the Fable fallback). Codex walks Sol in-session. A third-party host binds Fable through the CLI Claude-chain (fail closed when Fable and Sol cannot serve) with a separate executor paste block.
|
|
6
|
-
|
|
7
|
-
## Key documents
|
|
8
|
-
|
|
9
|
-
| File | Purpose |
|
|
10
|
-
|---|---|
|
|
11
|
-
| `advisor-protocol.md` | Router with a moment-keyed read map: session identity and host profiles first, model floor, warm-up and consult standing rules, lifecycle ownership, Advisor-block assembly rule, and the shared CLI Claude-chain — each with a stub pointing at its `reference/` detail file |
|
|
12
|
-
|
|
13
|
-
## Subdirectory
|
|
14
|
-
|
|
15
|
-
| Entry | Description |
|
|
16
|
-
|---|---|
|
|
17
|
-
| `scripts/` | `model_tier_run_validator.py` (spawn-walk log checks, including Codex Sol-first and optional Sol), `codex_sol_advisor.py` (read-only Sol bind and resume at shared `ADVISOR_EFFORT`), `tier_model_ids.py` (Claude aliases, Codex model ids, session identity, and host detection), and `advisor_scripts_constants` under `scripts/config/` (ladder, bind tokens, aliases, host profiles, identity tokens, shared effort, and SendMessage wait bound) |
|
|
18
|
-
| `reference/` | Progressive-disclosure detail behind protocol stub sections: `identity.md`, `warm-up.md`, `third-party-bind.md`, `sol-rung.md`, `consult-format.md`, `advisor-block.md`, `lifecycle.md`, `cli-chain.md`, and `spawn-walk-log.md` |
|
|
19
|
-
|
|
20
|
-
## Breaking-change rule
|
|
21
|
-
|
|
22
|
-
A change to session identity, host detection, the model-floor rule, the charter template, any host's Advisor block, or lifecycle ownership in `advisor-protocol.md` requires updating every consuming skill (`team-advisor`, `orchestrator`, `orchestrator-refresh`) in the same commit.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Advisor Protocol
|
|
2
2
|
|
|
3
|
-
Shared spawn-once, consult-by-message protocol for a warm advisor.
|
|
3
|
+
Shared spawn-once, consult-by-message protocol for a warm advisor.
|
|
4
|
+
`team-advisor` binds the advisor for its own consulting session.
|
|
5
|
+
Executor spawn prompts that skill issues consume the assembled Advisor
|
|
6
|
+
block.
|
|
4
7
|
|
|
5
8
|
**First step of every bind:** name the session identity and resolve the host profile (next section).
|
|
6
9
|
Walk the model-floor ladder, spawn the in-session advisor, or open the CLI fallback only after the host is known.
|
|
@@ -16,7 +16,7 @@ The first consult is complete and self-contained. It carries:
|
|
|
16
16
|
- Unresolved risks
|
|
17
17
|
- Load-bearing paths or excerpts
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
If more than one party consults the same advisor, open with who is asking and the assignment. A `/team-advisor` session talks to its advisor alone, so it may omit that identity opener while keeping the assignment.
|
|
20
20
|
|
|
21
21
|
Later consults carry only the delta: changed actions, new output, changed decisions, new validation, and newly discovered risks.
|
|
22
22
|
|
|
@@ -36,6 +36,8 @@ After a CORRECTION or PLAN, your next consult on that topic opens with what happ
|
|
|
36
36
|
## Handling the reply
|
|
37
37
|
|
|
38
38
|
Address a CORRECTION before treating the plan or the work as done, whether it names a wrong step or a risk worth closing.
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
`/team-advisor` is the skill that binds one warm advisor for the session that ran it. That lead session sends every consult. The bound advisor (`team-advisor-agent` on Claude) replies only to the lead session. If the lead session later spawns worker subagents, those workers do not consult the bound advisor, and the bound advisor does not reply to them. When the reply is STOP, or the bound advisor cannot be reached, the lead session tells the human. The lead session has no parent session to report to.
|
|
41
|
+
|
|
40
42
|
When the advisor becomes unreachable, report that to the session that owns its lifecycle ([`lifecycle.md`](lifecycle.md)); that session alone decides whether to respawn (Claude Agent, Codex native Sol, or third-party CLI re-bind).
|
|
41
43
|
A third-party host that cannot re-bind follows the fail-closed rule in [`third-party-bind.md`](third-party-bind.md).
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
# _shared/pr-loop
|
|
2
1
|
|
|
3
|
-
Runtime documents and scripts shared by every PR-loop skill. Changes here affect `bugteam`, `pr-converge`, `clean-room audit`, and `pr-fix-protocol` simultaneously — treat this as a breaking-change surface.
|
|
4
|
-
|
|
5
|
-
## Key documents
|
|
6
|
-
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `audit-contract.md` | Canonical finding schema (Shape A / Shape B) and loop contract; defines the JSON shapes every audit skill must emit |
|
|
10
|
-
| `audit-reply-template.md` | Canonical reply skeleton Claude posts to each unresolved review thread; single source of truth for reply structure |
|
|
11
|
-
| `post-audit-thread-contract.md` | Single source of truth for the `post_audit_thread.py` invocation string, exit-code table, and per-caller policy (bugteam exit 2 = hard blocker; autoconverge clean-audit failed post = recorded bypass) |
|
|
12
|
-
| `fix-protocol.md` | Ordered sequence a fix lens follows: read, capture SHA, TDD, apply, validate, self-audit, commit, push, reply + resolve |
|
|
13
|
-
| `gh-payloads.md` | How to build GitHub review and reply payloads via MCP tools; describes the one-review-per-loop pattern |
|
|
14
|
-
| `preflight-proposal.md` | Shared immutable proposal evidence and mutation-boundary contract for audit preflight worktrees |
|
|
15
|
-
| `state-schema.md` | Fields each PR-loop workflow tracks across iterations; documents common fields and per-skill extensions |
|
|
16
|
-
| `code-rules-gate.md` | Reference for the CODE_RULES pre-commit gate check; describes what the gate blocks and when it runs |
|
|
17
|
-
| `precatch-rubric.md` | Shared pre-catch lane checklist — deterministic sweep, doc-vs-code parity, test-assertion completeness, PR-description parity, adversarial audit — that autoconverge's lenses and pr-converge's CODE_REVIEW step read on demand |
|
|
18
|
-
| `worker-spawn.md` | Worker-spawn tier protocol and Claude-only slash-step host routing: three tiers, CLI/API inputs, JSON result shape, host detection, code-review modes via `detect_host_profile` + `invoke_code_review`, leader-socket rule, cloud setup; documents `scripts/resolve_worker_spawn.py` |
|
|
19
|
-
|
|
20
|
-
## Subdirectory
|
|
21
|
-
|
|
22
|
-
| Entry | Description |
|
|
23
|
-
|---|---|
|
|
24
|
-
| `scripts/` | Python scripts and constants consumed at runtime by the PR-loop skills |
|
|
25
|
-
|
|
26
|
-
## Breaking-change rule
|
|
27
|
-
|
|
28
|
-
Any shape change in a canonical contract listed under **Key documents** requires updating every consuming skill in the same commit.
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
# _shared/pr-loop/scripts
|
|
2
1
|
|
|
3
|
-
Python scripts invoked at runtime by the PR-loop skills. Each script is a standalone CLI entry point; `pr_loop_shared_constants/` holds the named constants they import.
|
|
4
|
-
|
|
5
|
-
## Key scripts
|
|
6
|
-
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `preflight.py` | Pre-flight check run before each audit loop tick: verifies hooks path, finds test files, runs pytest, checks for `BUGTEAM_PREFLIGHT_SKIP` opt-out |
|
|
10
|
-
| `preflight_self_heal.py` | Clears stale `core.hooksPath` overrides that Git seeds into fresh worktree local config; called from `preflight.py` |
|
|
11
|
-
| `post_audit_thread.py` | Posts an audit review (APPROVE / REQUEST_CHANGES) to a draft PR via the GitHub reviews API; reads the body skeleton from `audit-reply-template.md` at runtime |
|
|
12
|
-
| `grant_project_claude_permissions.py` | Writes idempotent allow-rules and `additionalDirectories` entries into `~/.claude/settings.json` so subagents can edit the project's `.claude/` tree without prompting |
|
|
13
|
-
| `revoke_project_claude_permissions.py` | Removes the allow-rules and entries that `grant_project_claude_permissions.py` wrote; safe to run when no prior grant exists |
|
|
14
|
-
| `stale_worktree_rule_sweep.py` | Drops allow/deny rules pointing at deleted `~/.claude/worktrees/<repo>/<worktree>` directories and deduplicates the rule arrays; run by the grant and revoke flows before they write |
|
|
15
|
-
| `code_rules_gate.py` | Pre-commit gate that runs `code_rules_enforcer` checks on staged Python files before a fix commit lands, and the terminology sweep over the staged diff |
|
|
16
|
-
| `terminology_sweep.py` | Flags a prose term that near-misses an identifier introduced on added code lines of a unified diff (shared leading word, divergent tail) |
|
|
17
|
-
| `reviews_disabled.py` | Shared helper for the reviewer opt-out and opt-in gates; parses `CLAUDE_REVIEWS_DISABLED` tokens `bugteam`, `bugbot`, `copilot`, and `codex`, plus `CLAUDE_REVIEWS_ENABLED` for opt-in. `bugbot`, `bugteam`, and `codex` are off by default and each runs only when `CLAUDE_REVIEWS_ENABLED` lists it; `copilot` runs by default and stops only when `CLAUDE_REVIEWS_DISABLED` lists it |
|
|
18
|
-
| `copilot_quota.py` | Copilot premium-request quota pre-check: resolves a configured GitHub account, reads its remaining `premium_interactions` quota via `gh api copilot_internal/user`, and exits 0 (run Copilot) or non-zero (skip: out of quota, API down, or no account configured) |
|
|
19
|
-
| `reviewer_availability.py` | Unified reviewer-availability entry point for Copilot and Bugbot: reuses `copilot_quota.py` and `reviews_disabled.py` and exits 0 when the named `--reviewer` may be spawned, non-zero when it is opted out or (for Copilot) out of quota |
|
|
20
|
-
| `fix_hookspath.py` | Repairs a malformed `core.hooksPath` global git config entry |
|
|
21
|
-
| `_claude_permissions_common.py` | Internal helpers shared by the grant/revoke scripts: atomic settings.json writes, list mutation, path helpers |
|
|
22
|
-
| `check_convergence.py` | Single convergence gate check for autoconverge finalize and mark-ready hooks |
|
|
23
|
-
| `check_bugbot_ci.py` | Bugbot CI check-run status on a given SHA |
|
|
24
|
-
| `check_convergence_availability.py` | Reviewer waiver resolution for convergence gates |
|
|
25
|
-
| `check_convergence_gates.py` | GitHub REST leaf checks for convergence gates |
|
|
26
|
-
| `check_convergence_thread_gates.py` | GitHub GraphQL and REST thread gate checks |
|
|
27
|
-
| `check_pending_reviews.py` | Pending review requests and reviewer states |
|
|
28
|
-
| `fetch_copilot_reviews.py` | Copilot reviews filtered to the current HEAD |
|
|
29
|
-
| `post_fix_reply.py` | Inline reply poster for review comment threads |
|
|
30
|
-
| `run_codex_review.py` | Codex review capture wrapper for the autoconverge Codex gate |
|
|
31
|
-
| `codex_usage_probe.py` | Weekly Codex usage probe for gate threshold decisions |
|
|
32
|
-
| `codex_down_classifier.py` | Maps Codex run outcomes to completed or codex_down |
|
|
33
|
-
| `parse_codex_findings.py` | Parses Codex reviewer output into findings |
|
|
34
|
-
|
|
35
|
-
## Subdirectories
|
|
36
|
-
|
|
37
|
-
| Entry | Description |
|
|
38
|
-
|---|---|
|
|
39
|
-
| `code_rules_gate_parts/` | The decomposed modules `code_rules_gate.py` wires together: enforcer loading, git file sets, blob readers, added-line maps, violation scoping, wrapper plumb-through, gate running, staged-test running, and argument parsing |
|
|
40
|
-
| `pr_loop_shared_constants/` | Named constants used by the scripts above |
|
|
41
|
-
| `pr_converge_skill_constants/` | Bot logins, review states, and API templates for convergence scripts |
|
|
42
|
-
| `pr_converge_scripts_constants/` | CLI and reflow constants for convergence scripts |
|
|
43
|
-
| `codex_review_scripts_constants/` | Constants for Codex review capture and classification |
|
|
44
|
-
| `tests/` | pytest suite for all scripts in this directory |
|
|
45
|
-
|
|
46
|
-
## Running tests
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
python -m pytest packages/claude-dev-env/_shared/pr-loop/scripts/tests/
|
|
50
|
-
```
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
# code_rules_gate_parts
|
|
2
1
|
|
|
3
|
-
The modules `code_rules_gate.py` wires together to run the code-rules gate. Each
|
|
4
|
-
module owns one concern; the entry script imports them and re-exports their
|
|
5
|
-
surface for the test suite.
|
|
6
|
-
|
|
7
|
-
## Modules
|
|
8
|
-
|
|
9
|
-
| File | Purpose |
|
|
10
|
-
|---|---|
|
|
11
|
-
| `enforcer_loading.py` | Locates and loads `code_rules_enforcer.validate_content` from disk with the hooks directory on `sys.path` |
|
|
12
|
-
| `git_file_sets.py` | Resolves the diff, staged, and untracked file sets from git, plus prefix filtering and staged line-span helpers |
|
|
13
|
-
| `git_blob_readers.py` | Reads the committed and staged content of one file, and probes staged-index presence |
|
|
14
|
-
| `added_line_maps.py` | Maps each changed file to the line numbers the current diff added, resolving renames and new files |
|
|
15
|
-
| `violation_scoping.py` | Recovers a violation's line span from the enforcer message and partitions violations into blocking versus advisory |
|
|
16
|
-
| `wrapper_plumb_check.py` | Flags a public wrapper that drops a same-file delegate's optional keyword arguments; holds the code-path and test-path classifiers |
|
|
17
|
-
| `gate_running.py` | Validates the eligible file set, reports the inspected-file count, and prints the partitioned violation report |
|
|
18
|
-
| `staged_test_running.py` | Runs one staged-test group, grouped by its owning pytest config and by top-level directory when no config owns it, in command-line-length-safe pytest batches, optionally writing a JUnit XML report per batch |
|
|
19
|
-
| `staged_test_regression.py` | Discovers the staged test files, runs every group, and blocks only on a failure the staged change introduces — a group that fails is re-run against the HEAD baseline (a throwaway detached checkout made with `git worktree add --detach` under the OS temp root, deleted with `git worktree remove --force`) and only a failure absent there blocks |
|
|
20
|
-
| `baseline_import_isolation.py` | Points the baseline run's imports at the baseline worktree — rebases every repository import root onto the front of its `PYTHONPATH` — and installs the pytest plugin that reports which modules the run loaded out of the user's own tree, so a route that survives the rebase is measured and the baseline discarded |
|
|
21
|
-
| `gate_arguments.py` | Parses the gate's command-line arguments |
|
|
22
|
-
| `__init__.py` | Package marker |
|
|
23
|
-
|
|
24
|
-
## Staged-test grouping boundaries
|
|
25
|
-
|
|
26
|
-
The top-level fallback in `staged_test_running.py` fires only in a repository
|
|
27
|
-
whose root holds no pytest config, and it splits top-level neighbors alone:
|
|
28
|
-
|
|
29
|
-
- Config-less packages that sit deeper under one shared top-level directory, such as `pkgs/alpha` and `pkgs/beta`, share that directory's single pytest session, so a module name they both expose still shadows.
|
|
30
|
-
- A `conftest.py` at the repository root stays unloaded for those groups, because each session works from the top-level directory and the root file falls outside the tree pytest treats as its root.
|
|
31
|
-
|
|
32
|
-
## Subdirectory
|
|
33
|
-
|
|
34
|
-
| Entry | Description |
|
|
35
|
-
|---|---|
|
|
36
|
-
| `tests/` | pytest suite with one test module per module above, plus `_repo_test_helpers.py` (shared real-git-repository builders) |
|
|
37
|
-
|
|
38
|
-
## Running tests
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
python -m pytest packages/claude-dev-env/_shared/pr-loop/scripts/code_rules_gate_parts/tests/
|
|
42
|
-
```
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
# codex_review_scripts_constants
|
|
2
1
|
|
|
3
|
-
Python package of named constants imported by Codex review scripts under `_shared/pr-loop/scripts/`. Importing from this package keeps magic values out of script bodies.
|
|
4
|
-
|
|
5
|
-
## Modules
|
|
6
|
-
|
|
7
|
-
| File | Constants for |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `__init__.py` | Package marker and package docstring. |
|
|
10
|
-
| `run_constants.py` | Binary name, flag strings, custom-instructions prompt, version-probe pattern, timeout default, decode/timeout exit sentinels, flag_token_pattern suffix (whole-token shape match), JSONL keys, and capture outcome class labels for `run_codex_review.py`. |
|
|
11
|
-
| `findings_constants.py` | Finding field keys, fenced-JSON and freeform patterns for `parse_codex_findings.py`. |
|
|
12
|
-
| `classifier_constants.py` | Failure class names and stream markers for `codex_down_classifier.py`. |
|
|
13
|
-
| `run_constants.py` | Binary name, flag strings, custom-instructions prompt, version-probe pattern, timeout default, decode/timeout exit sentinels, flag_token_pattern suffix (whole-token shape match), JSONL keys, JSONL capture filename and newline mode, and capture outcome class labels for `run_codex_review.py`. |
|
|
14
|
-
| `codex_usage_probe_constants.py` | The weekly-usage probe CLI: gate threshold, report JSON keys, app-server JSON-RPC surface, rate-limit field keys, weekly-window sizing, text-status parse patterns, source labels, and exit codes. |
|
|
15
|
-
|
|
16
|
-
## Convention
|
|
17
|
-
|
|
18
|
-
Scripts import from this package at module scope. No constant is defined inline in a script body — the hook enforces this at write time.
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
# pr_converge_scripts_constants
|
|
2
1
|
|
|
3
|
-
Constants module for shared PR-loop convergence scripts. Re-exports all runtime/API constants from `pr_converge_skill_constants` and adds script-specific constants for CLI arguments, markdown patterns, and reflow settings.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `__init__.py` | Package marker |
|
|
10
|
-
| `pr_converge_constants.py` | Re-exports all constants from `pr_converge_skill_constants.constants` plus adds script-specific values |
|
|
11
|
-
| `reflow_skill_md_constants.py` | Constants for `reflow_skill_md.py`: line width limit, list item patterns, `TARGET_SKILL_PATH` |
|
|
12
|
-
| `convergence_gate_constants.py` | Constants for `check_convergence_gates.py`: short-SHA length, join separators, and the review-threads GraphQL query |
|
|
13
|
-
|
|
14
|
-
## Conventions
|
|
15
|
-
|
|
16
|
-
- `pr_converge_constants.py` uses `from pr_converge_skill_constants.constants import ...` (with `# noqa: F401`) to re-export everything so script files can import from one location.
|
|
17
|
-
- `reflow_skill_md_constants.py` resolves `TARGET_SKILL_PATH` from its own `__file__` path, pointing to `SKILL.md` three directories up.
|
|
18
|
-
- Script-specific regex patterns (ordered list items, bullet list items, unfinished markdown link targets, markdown reference definitions) live in `reflow_skill_md_constants.py`.
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
# pr_converge_skill_constants
|
|
2
1
|
|
|
3
|
-
Importable Python constants module for shared PR-loop convergence scripts. Script-specific constants (CLI args, markdown patterns, reflow settings) live in `pr_converge_scripts_constants/` beside this package and import from here.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `__init__.py` | Package marker |
|
|
10
|
-
| `constants.py` | All runtime and API constants: bot logins, review states, GH API path templates, bugbot/bugteam detection patterns, exit codes |
|
|
11
|
-
|
|
12
|
-
## Exported constants (selected)
|
|
13
|
-
|
|
14
|
-
| Constant | Purpose |
|
|
15
|
-
|---|---|
|
|
16
|
-
| `CURSOR_BOT_LOGIN` | Login string for the Cursor bugbot reviewer |
|
|
17
|
-
| `COPILOT_REVIEWER_LOGIN` | Login string for the Copilot reviewer bot |
|
|
18
|
-
| `ALL_COPILOT_CLEAN_REVIEW_STATES` | Tuple of review states that count as clean for Copilot |
|
|
19
|
-
| `BUGBOT_DIRTY_BODY_REGEX` | Regex that matches a bugbot review body reporting findings |
|
|
20
|
-
| `GH_REVIEWS_PATH_TEMPLATE` | `gh api` path template for PR reviews |
|
|
21
|
-
| `GH_INLINE_COMMENTS_PATH_TEMPLATE` | `gh api` path template for PR inline comments |
|
|
22
|
-
|
|
23
|
-
## Conventions
|
|
24
|
-
|
|
25
|
-
- All path templates use `str.format(**kwargs)` with keys `owner`, `repo`, `number`.
|
|
26
|
-
- `packages/claude-dev-env/_shared/pr-loop/scripts/pr_converge_scripts_constants/pr_converge_constants.py` re-exports everything here via `from pr_converge_skill_constants.constants import ...` so scripts can import from either location.
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
# pr_loop_shared_constants
|
|
2
1
|
|
|
3
|
-
Named constants for every script in `_shared/pr-loop/scripts/`. Each module owns the constants for one script; the module name mirrors the script name with a `_constants` suffix.
|
|
4
|
-
|
|
5
|
-
## Modules
|
|
6
|
-
|
|
7
|
-
| File | Constants for |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `claude_permissions_constants.py` | `grant_project_claude_permissions.py` and `revoke_project_claude_permissions.py` — permission rule strings and settings.json keys |
|
|
10
|
-
| `claude_settings_keys_constants.py` | Top-level `~/.claude/settings.json` key names used across the permission helpers |
|
|
11
|
-
| `stale_worktree_rule_sweep_constants.py` | `stale_worktree_rule_sweep.py` — the worktrees subdirectory name, the worktree path segment count, the rule-string delimiters, the `.claude` home path marker, and `get_claude_worktrees_root` |
|
|
12
|
-
| `code_rules_gate_constants.py` | `code_rules_gate.py` — file extensions, git diff subcommands, test filename patterns |
|
|
13
|
-
| `inline_duplicate_body_span_constants.py` | `code_rules_gate.py` — regex and capture-group indices for the same-file inline-duplicate message, which carries both the helper and the enclosing span the gate reconstructs the union from |
|
|
14
|
-
| `fix_hookspath_constants.py` | `fix_hookspath.py` — verification suffix and related strings |
|
|
15
|
-
| `post_audit_thread_constants.py` | `post_audit_thread.py` — HTTP status codes, retry counts, GitHub API paths |
|
|
16
|
-
| `preflight_constants.py` | `preflight.py` — env-var names, git subcommands, pytest exit codes, test discovery patterns |
|
|
17
|
-
| `preflight_self_heal_constants.py` | `preflight_self_heal.py` — git config keys and local-scope detection strings |
|
|
18
|
-
| `reviews_disabled_constants.py` | `reviews_disabled.py` — `CLAUDE_REVIEWS_DISABLED` and `CLAUDE_REVIEWS_ENABLED` env-var names and token taxonomy |
|
|
19
|
-
| `copilot_quota_constants.py` | `copilot_quota.py` — `COPILOT_QUOTA_ACCOUNT` env-var name, `copilot_internal/user` API path, the `premium_interactions` gating field names, the four skip/run exit codes, and the default `.env` path |
|
|
20
|
-
| `terminology_sweep_constants.py` | `terminology_sweep.py` — identifier and prose-token regexes, diff-parsing prefixes, code-file extensions, test-file detection patterns, and the finding-message template |
|
|
21
|
-
| `reviewer_availability_constants.py` | `reviewer_availability.py` — the available/down exit codes for the unified reviewer-availability pre-check |
|
|
22
|
-
| `__init__.py` | Empty package marker |
|
|
23
|
-
|
|
24
|
-
## Convention
|
|
25
|
-
|
|
26
|
-
Every constant is `UPPER_SNAKE_CASE` with an explicit type annotation. No magic literals appear in the consuming scripts — all values live here. Test coverage for each module lives in `tests/test_<module_name>.py`.
|