claude-dev-env 2.13.0 → 2.14.1
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.md +135 -0
- package/CLAUDE.md +1 -57
- package/_shared/AGENTS.md +15 -0
- package/_shared/CLAUDE.md +1 -15
- package/_shared/advisor/AGENTS.md +22 -0
- package/_shared/advisor/CLAUDE.md +1 -22
- package/_shared/pr-loop/AGENTS.md +27 -0
- package/_shared/pr-loop/CLAUDE.md +1 -27
- package/_shared/pr-loop/scripts/AGENTS.md +35 -0
- package/_shared/pr-loop/scripts/CLAUDE.md +1 -35
- package/_shared/pr-loop/scripts/code_rules_gate_parts/AGENTS.md +42 -0
- package/_shared/pr-loop/scripts/code_rules_gate_parts/CLAUDE.md +1 -42
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/AGENTS.md +26 -0
- package/_shared/pr-loop/scripts/pr_loop_shared_constants/CLAUDE.md +1 -26
- package/_shared/pr-loop/scripts/tests/AGENTS.md +44 -0
- package/_shared/pr-loop/scripts/tests/CLAUDE.md +1 -44
- package/_shared/process-tree/AGENTS.md +41 -0
- package/_shared/process-tree/CLAUDE.md +1 -41
- package/agents/AGENTS.md +26 -0
- package/agents/CLAUDE.md +1 -31
- package/agents/clean-coder.md +6 -6
- package/agents/test_agent_frontmatter.py +11 -11
- package/audit-rubrics/AGENTS.md +43 -0
- package/audit-rubrics/CLAUDE.md +1 -43
- package/audit-rubrics/category_rubrics/AGENTS.md +37 -0
- package/audit-rubrics/category_rubrics/CLAUDE.md +1 -37
- package/audit-rubrics/prompts/AGENTS.md +37 -0
- package/audit-rubrics/prompts/CLAUDE.md +1 -37
- package/bin/AGENTS.md +112 -0
- package/bin/CLAUDE.md +1 -112
- package/bin/ever-shipped-skills.mjs +1 -0
- package/bin/install-constants.mjs +6 -7
- package/bin/install.mjs +24 -5
- package/bin/install.test.mjs +34 -0
- package/commands/AGENTS.md +13 -0
- package/commands/CLAUDE.md +1 -23
- package/docs/AGENTS.md +32 -0
- package/docs/CLAUDE.md +1 -32
- package/docs/CODE_RULES.md +1 -1
- package/docs/imagegen.md +22 -0
- package/docs/references/AGENTS.md +17 -0
- package/docs/references/CLAUDE.md +1 -17
- package/hooks/AGENTS.md +31 -0
- package/hooks/CLAUDE.md +1 -31
- package/hooks/_gh_pr_author_swap_utils.py +14 -0
- package/hooks/advisory/AGENTS.md +16 -0
- package/hooks/advisory/CLAUDE.md +1 -16
- package/hooks/blocking/AGENTS.md +123 -0
- package/hooks/blocking/CLAUDE.md +1 -123
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/AGENTS.md +28 -0
- package/hooks/blocking/claude_md_orphan_file_blocker_parts/CLAUDE.md +1 -28
- package/hooks/blocking/code_rules_banned_identifiers.py +1 -1
- package/hooks/blocking/code_rules_dead_module_constant.py +149 -37
- package/hooks/blocking/code_rules_probe_chains.py +6 -2
- package/hooks/blocking/config/AGENTS.md +10 -0
- package/hooks/blocking/config/CLAUDE.md +1 -10
- package/hooks/blocking/gh_pr_author_restore.py +7 -2
- package/hooks/blocking/intent_only_ending_blocker.py +11 -16
- package/hooks/blocking/inventory_intent_records/AGENTS.md +26 -0
- package/hooks/blocking/inventory_intent_records/CLAUDE.md +1 -26
- package/hooks/blocking/package_inventory_stale_blocker_parts/AGENTS.md +26 -0
- package/hooks/blocking/package_inventory_stale_blocker_parts/CLAUDE.md +1 -26
- package/hooks/blocking/pii_prevention_blocker_parts/AGENTS.md +24 -0
- package/hooks/blocking/pii_prevention_blocker_parts/CLAUDE.md +1 -24
- package/hooks/blocking/tdd_enforcer_parts/AGENTS.md +30 -0
- package/hooks/blocking/tdd_enforcer_parts/CLAUDE.md +1 -30
- package/hooks/blocking/test_claude_md_orphan_file_blocker.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer_banned_prefixes.py +1 -1
- package/hooks/blocking/test_code_rules_enforcer_dead_module_constant.py +171 -0
- package/hooks/blocking/test_code_rules_enforcer_magic_allowlist.py +1 -1
- package/hooks/blocking/test_gh_pr_author_restore.py +2 -1
- package/hooks/blocking/test_intent_only_ending_blocker.py +4 -0
- package/hooks/diagnostic/AGENTS.md +75 -0
- package/hooks/diagnostic/CLAUDE.md +1 -43
- package/hooks/diagnostic/hook_log_extractor.py +2 -2
- package/hooks/diagnostic/hook_log_init.py +2 -2
- package/hooks/diagnostic/migrations/AGENTS.md +16 -0
- package/hooks/diagnostic/migrations/CLAUDE.md +1 -16
- package/hooks/diagnostic/queries/AGENTS.md +19 -0
- package/hooks/diagnostic/queries/CLAUDE.md +1 -19
- package/hooks/diagnostic/test_hook_log_extractor.py +2 -2
- package/hooks/git-hooks/AGENTS.md +31 -0
- package/hooks/git-hooks/CLAUDE.md +1 -31
- package/hooks/git-hooks/git_hooks_constants/AGENTS.md +21 -0
- package/hooks/git-hooks/git_hooks_constants/CLAUDE.md +1 -21
- package/hooks/git-hooks/git_hooks_constants/__init__.py +4 -6
- package/hooks/git-hooks/pre_push.py +47 -34
- package/hooks/git-hooks/test_pre_push.py +111 -7
- package/hooks/hooks_constants/AGENTS.md +104 -0
- package/hooks/hooks_constants/CLAUDE.md +1 -104
- package/hooks/hooks_constants/hook_log_extractor_constants.py +1 -2
- package/hooks/hooks_constants/task_list_loop_starter_constants.py +4 -3
- package/hooks/hooks_constants/working_style_prompt_constants.py +29 -20
- package/hooks/lifecycle/AGENTS.md +18 -0
- package/hooks/lifecycle/CLAUDE.md +1 -18
- package/hooks/observability/AGENTS.md +20 -0
- package/hooks/observability/CLAUDE.md +1 -20
- package/hooks/session/AGENTS.md +33 -0
- package/hooks/session/CLAUDE.md +1 -33
- package/hooks/session/gh_pr_author_session_cleanup.py +7 -2
- package/hooks/session/task_list_loop_starter.py +3 -3
- package/hooks/session/test_gh_pr_author_session_cleanup.py +2 -1
- package/hooks/session/test_task_list_loop_starter.py +10 -2
- package/hooks/session/test_working_style_prompt.py +9 -4
- package/hooks/validation/AGENTS.md +20 -0
- package/hooks/validation/CLAUDE.md +1 -20
- package/hooks/validators/AGENTS.md +51 -0
- package/hooks/validators/CLAUDE.md +1 -51
- package/hooks/validators/health_check.py +52 -19
- package/hooks/validators/python_style_checks.py +1 -1
- package/hooks/validators/test_health_check.py +112 -27
- package/hooks/workflow/AGENTS.md +16 -0
- package/hooks/workflow/CLAUDE.md +1 -16
- package/installable-surfaces.manifest.json +1 -0
- package/output-styles/AGENTS.md +15 -0
- package/output-styles/CLAUDE.md +1 -15
- package/package.json +2 -1
- package/rules/AGENTS.md +61 -0
- package/rules/CLAUDE.md +1 -61
- package/rules/code-standards.md +5 -9
- package/rules/doc-prose-cuts.md +1 -1
- package/scripts/AGENTS.md +62 -0
- package/scripts/CLAUDE.md +1 -62
- package/scripts/codex_compat_materializer.py +4 -0
- package/scripts/dev_env_scripts_constants/AGENTS.md +21 -0
- package/scripts/dev_env_scripts_constants/CLAUDE.md +1 -21
- package/scripts/sync_to_cursor/AGENTS.md +23 -0
- package/scripts/sync_to_cursor/CLAUDE.md +1 -23
- package/scripts/test_active_capability_references.py +2 -2
- package/scripts/test_validate_instruction_pairs.py +90 -0
- package/scripts/test_verify_installable_package.py +5 -1
- package/scripts/tests/AGENTS.md +33 -0
- package/scripts/tests/CLAUDE.md +1 -33
- package/scripts/tests/test_codex_compat_materializer.py +36 -1
- package/scripts/validate_instruction_pairs.py +183 -0
- package/skills/AGENTS.md +72 -0
- package/skills/CLAUDE.md +1 -72
- package/skills/_shared/AGENTS.md +44 -0
- package/skills/_shared/CLAUDE.md +1 -44
- package/skills/_shared/advisor/AGENTS.md +9 -0
- package/skills/_shared/advisor/CLAUDE.md +1 -9
- package/skills/_shared/pr-loop/AGENTS.md +50 -0
- package/skills/_shared/pr-loop/CLAUDE.md +1 -50
- package/skills/_shared/pr-loop/prompts/AGENTS.md +9 -0
- package/skills/_shared/pr-loop/prompts/CLAUDE.md +1 -9
- package/skills/_shared/pr-loop/scripts/AGENTS.md +35 -0
- package/skills/_shared/pr-loop/scripts/CLAUDE.md +1 -35
- package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/AGENTS.md +24 -0
- package/skills/_shared/pr-loop/scripts/skills_pr_loop_constants/CLAUDE.md +1 -24
- package/skills/anthropic-plan/AGENTS.md +34 -0
- package/skills/anthropic-plan/CLAUDE.md +1 -34
- package/skills/anthropic-plan/SKILL.md +1 -1
- package/skills/anthropic-plan/scripts/AGENTS.md +11 -0
- package/skills/anthropic-plan/scripts/CLAUDE.md +1 -11
- package/skills/anthropic-plan/scripts/anthropic_plan_scripts_constants/AGENTS.md +16 -0
- package/skills/anthropic-plan/scripts/anthropic_plan_scripts_constants/CLAUDE.md +1 -16
- package/skills/anthropic-plan/templates/AGENTS.md +13 -0
- package/skills/anthropic-plan/templates/CLAUDE.md +1 -13
- package/skills/anthropic-plan/test_skill_contract.py +8 -6
- package/skills/anthropic-plan/workflow/AGENTS.md +14 -0
- package/skills/anthropic-plan/workflow/CLAUDE.md +1 -14
- package/skills/auditing-claude-config/AGENTS.md +21 -0
- package/skills/auditing-claude-config/CLAUDE.md +1 -21
- package/skills/autoconverge/AGENTS.md +36 -0
- package/skills/autoconverge/CLAUDE.md +1 -36
- package/skills/autoconverge/reference/AGENTS.md +16 -0
- package/skills/autoconverge/reference/CLAUDE.md +1 -16
- package/skills/autoconverge/workflow/AGENTS.md +26 -0
- package/skills/autoconverge/workflow/CLAUDE.md +1 -26
- package/skills/autoconverge/workflow/autoconverge_report_constants/AGENTS.md +16 -0
- package/skills/autoconverge/workflow/autoconverge_report_constants/CLAUDE.md +1 -16
- package/skills/bugteam/AGENTS.md +30 -0
- package/skills/bugteam/CLAUDE.md +1 -30
- package/skills/bugteam/reference/AGENTS.md +20 -0
- package/skills/bugteam/reference/CLAUDE.md +1 -20
- package/skills/bugteam/reference/obstacles/AGENTS.md +24 -0
- package/skills/bugteam/reference/obstacles/CLAUDE.md +1 -24
- package/skills/bugteam/scripts/AGENTS.md +30 -0
- package/skills/bugteam/scripts/CLAUDE.md +1 -30
- package/skills/bugteam/scripts/bugteam_scripts_constants/AGENTS.md +18 -0
- package/skills/bugteam/scripts/bugteam_scripts_constants/CLAUDE.md +1 -18
- package/skills/closeout/reference/handoff-prompt-template.md +1 -1
- package/skills/codex-review/AGENTS.md +46 -0
- package/skills/codex-review/CLAUDE.md +1 -46
- package/skills/codex-review/reference/AGENTS.md +15 -0
- package/skills/codex-review/reference/CLAUDE.md +1 -15
- package/skills/codex-review/scripts/codex_review_scripts_constants/AGENTS.md +18 -0
- package/skills/codex-review/scripts/codex_review_scripts_constants/CLAUDE.md +1 -18
- package/skills/codex-review/test_skill_scaffold.py +3 -3
- package/skills/copilot-review/AGENTS.md +18 -0
- package/skills/copilot-review/CLAUDE.md +1 -18
- package/skills/everything-search/AGENTS.md +17 -0
- package/skills/everything-search/CLAUDE.md +1 -17
- package/skills/fresh-branch/AGENTS.md +14 -0
- package/skills/fresh-branch/CLAUDE.md +1 -14
- package/skills/grok-spawn/AGENTS.md +28 -0
- package/skills/grok-spawn/CLAUDE.md +1 -28
- package/skills/pr-converge/AGENTS.md +32 -0
- package/skills/pr-converge/CLAUDE.md +1 -32
- package/skills/pr-converge/pr_converge_skill_constants/AGENTS.md +26 -0
- package/skills/pr-converge/pr_converge_skill_constants/CLAUDE.md +1 -26
- package/skills/pr-converge/reference/AGENTS.md +28 -0
- package/skills/pr-converge/reference/CLAUDE.md +1 -28
- package/skills/pr-converge/reference/obstacles/AGENTS.md +23 -0
- package/skills/pr-converge/reference/obstacles/CLAUDE.md +1 -23
- package/skills/pr-converge/scripts/AGENTS.md +46 -0
- package/skills/pr-converge/scripts/CLAUDE.md +1 -46
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/AGENTS.md +18 -0
- package/skills/pr-converge/scripts/pr_converge_scripts_constants/CLAUDE.md +1 -18
- package/skills/pr-converge/workflows/AGENTS.md +16 -0
- package/skills/pr-converge/workflows/CLAUDE.md +1 -16
- package/skills/prototype/SKILL.md +1 -2
- package/skills/prototype/reference/honest-limitations.md +1 -1
- package/skills/prototype/reference/promotion-tasks.md +1 -1
- package/skills/prototype/workflows/promotion.md +1 -1
- package/skills/rebase/AGENTS.md +32 -0
- package/skills/rebase/CLAUDE.md +1 -32
- package/skills/recall/AGENTS.md +30 -0
- package/skills/recall/CLAUDE.md +1 -30
- package/skills/remember/AGENTS.md +31 -0
- package/skills/remember/CLAUDE.md +1 -31
- package/skills/reviews/SKILL.md +1 -1
- package/skills/session-log/AGENTS.md +32 -0
- package/skills/session-log/CLAUDE.md +1 -32
- package/skills/session-tidy/AGENTS.md +36 -0
- package/skills/session-tidy/CLAUDE.md +1 -36
- package/skills/skill-builder/AGENTS.md +49 -0
- package/skills/skill-builder/CLAUDE.md +1 -49
- package/skills/skill-builder/references/AGENTS.md +25 -0
- package/skills/skill-builder/references/CLAUDE.md +1 -25
- package/skills/skill-builder/references/deterministic-elements.md +1 -1
- package/skills/skill-builder/templates/AGENTS.md +14 -0
- package/skills/skill-builder/templates/CLAUDE.md +1 -14
- package/skills/skill-builder/workflows/AGENTS.md +19 -0
- package/skills/skill-builder/workflows/CLAUDE.md +1 -19
- package/skills/task-build/AGENTS.md +29 -0
- package/skills/task-build/CLAUDE.md +1 -29
- package/skills/update/AGENTS.md +38 -0
- package/skills/update/CLAUDE.md +1 -38
- package/system-prompts/AGENTS.md +17 -0
- package/system-prompts/CLAUDE.md +1 -17
- package/system-prompts/software-engineer.xml +3 -3
- package/agents/caveman.md +0 -73
- package/agents/clasp-deployment-orchestrator.md +0 -608
- package/agents/code-advisor.md +0 -23
- package/agents/deep-research.md +0 -152
- package/agents/docs-agent.md +0 -85
- package/commands/commit.md +0 -28
- package/commands/docupdate.md +0 -322
- package/commands/hook-log-extract.md +0 -70
- package/commands/hook-log-init.md +0 -76
- package/commands/implement.md +0 -102
- package/commands/plan.md +0 -14
- package/commands/pr-comments.md +0 -47
- package/commands/review-plan.md +0 -5
- package/commands/right-size.md +0 -15
- package/commands/sum.md +0 -30
- package/skills/imagegen/SKILL.md +0 -21
- package/skills/imagegen/scripts/config/__init__.py +0 -1
- package/skills/imagegen/scripts/config/constants.py +0 -28
- package/skills/imagegen/scripts/imagegen.py +0 -45
- package/skills/imagegen/scripts/imagegen_core.py +0 -528
- package/skills/imagegen/scripts/test_imagegen.py +0 -204
package/skills/CLAUDE.md
CHANGED
|
@@ -1,72 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Each skill is a self-contained folder Claude Code loads on demand. At startup, only the skill's `name` and `description` metadata load. The full `SKILL.md` body and any support files load only when a skill becomes relevant to the conversation.
|
|
4
|
-
|
|
5
|
-
## Skill folder convention
|
|
6
|
-
|
|
7
|
-
| Item | Role |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `SKILL.md` | Required entry point. YAML frontmatter with `name` and `description` (the trigger). Body holds the skill's full instructions. |
|
|
10
|
-
| `scripts/` | Python helper scripts the skill invokes at runtime. |
|
|
11
|
-
| `workflow/` | `.mjs` workflow scripts run via the `Workflow` tool. |
|
|
12
|
-
| `templates/` | Template files the skill or workflow renders at build time. |
|
|
13
|
-
| `reference/` | Reference docs the skill cites or the workflow reads. |
|
|
14
|
-
| `*_constants/` | Python package of named constants imported by `scripts/`. |
|
|
15
|
-
|
|
16
|
-
Skills install to `~/.claude/skills/<skill-name>/` via `packages/claude-dev-env/bin/install.mjs`. See `docs/references/skill-install-system.md` for the install pipeline.
|
|
17
|
-
|
|
18
|
-
## Shared support code
|
|
19
|
-
|
|
20
|
-
**`skills/_shared/`** — skill-local PR-loop helpers plus `@` stubs that name
|
|
21
|
-
canonical homes under **`@~/.claude/_shared/`** (advisor protocol, PR-loop
|
|
22
|
-
contracts, runtime scripts). Map: `skills/_shared/CLAUDE.md`. End-of-run gotchas: `skills/_shared/end-of-run-gotcha-recommendations.md`.
|
|
23
|
-
|
|
24
|
-
## Skill groups
|
|
25
|
-
|
|
26
|
-
**Planning and implementation**
|
|
27
|
-
- `anthropic-plan` — creates a source-grounded plan packet before any code changes
|
|
28
|
-
- `orchestrator` — turns the session into the orchestrator: it spawns executor subagents to do the code edits and test runs; hard decisions go to a shared advisor (Claude warm `session-advisor` via SendMessage; a third-party host: max-tier Claude via CLI Claude-chain)
|
|
29
|
-
- `orchestrator-refresh` — sub-skill fired by the `/orchestrator` loop to re-assert the host-matched shared-advisor discipline mid-run (Claude SendMessage; a third-party host's Claude CLI chain, no Agent-tool advisor spawn)
|
|
30
|
-
- `team-advisor` — binds one advisor at the strongest reachable tier (Claude warm agent; a third-party host: max-tier Claude via CLI Claude-chain, fail closed when unreachable); consult cadence and weight live in `docs/references/advisor-tool.md`
|
|
31
|
-
- `grokify` — builds a paste-ready Grok Build handoff with a Claude advisor charter
|
|
32
|
-
- `grok-spawn` — orchestrator playbook for fleets of headless grok CLI workers (preflight, batch spec, `spawn_grok_batch.py`)
|
|
33
|
-
|
|
34
|
-
**PR review and convergence**
|
|
35
|
-
- `autoconverge` — autonomous single-run workflow that drives a PR to ready
|
|
36
|
-
- `pr-converge` — paced convergence loop across `ScheduleWakeup` ticks
|
|
37
|
-
- `bugteam` — open-loop audit-fix until convergence
|
|
38
|
-
- `copilot-review` — requests and polls a GitHub Copilot review
|
|
39
|
-
- `copilot-finding-triage` — tiers each Copilot gate finding, verifies each code concern with an executed check, then routes it (auto-fix a confirmed defect, resolve a refuted one, page the user only for an inconclusive one)
|
|
40
|
-
- `reviewer-gates` — availability gates for external reviewers (opt-out parse, Copilot quota, Bugbot trigger/detect)
|
|
41
|
-
- `pr-fix-protocol` — applies reviewer findings as verified fixes and drives unresolved review threads to zero
|
|
42
|
-
- `pr-loop-lifecycle` — opens and closes a PR-loop run (grant, teardown, PR description, revoke, report)
|
|
43
|
-
- `pr-loop-cloud-transport` — six-step transport workflow that lets any PR-loop skill run in a session whose `gh` CLI is absent or cannot act on the PR (MCP schema load, origin/HEAD fix, identity rules, the gh-to-MCP substitution matrix, the Copilot status rule, and the post self-check)
|
|
44
|
-
|
|
45
|
-
**Code review guides (Google eng-practices, adapted for an AI reviewer)**
|
|
46
|
-
- `small-cl` — the Small CLs guide; refs: handling reviewer comments
|
|
47
|
-
- `comments` — writing review comments and handling reviewer comments; refs: the review standard, pushback, respectful code reviews
|
|
48
|
-
- `reviews` — the reviewer guide: standard, what to look for, navigating a CL, speed, pushback; refs: CL descriptions, review comments, emergencies, style guides, the two guide indexes
|
|
49
|
-
- `descriptions` — writing good CL descriptions
|
|
50
|
-
- `emergencies` — what counts as an emergency change; refs: what to look for, speed
|
|
51
|
-
- Focused pull request guidance: [`small-cl/SKILL.md`](small-cl/SKILL.md)
|
|
52
|
-
|
|
53
|
-
**Research and discovery**
|
|
54
|
-
- `recall` — retrieves facts from memory files
|
|
55
|
-
- `remember` — saves a decision, gotcha, or architectural choice to the Obsidian vault
|
|
56
|
-
- `everything-search` — file-system search via the Everything `es.exe` CLI
|
|
57
|
-
- `beat-sheet` — reformats a reply as short single-line beats
|
|
58
|
-
- `show` — creates and reviews inline visual explanations: diagrams, interactive widgets, mockups, charts, and illustrations
|
|
59
|
-
|
|
60
|
-
**Session and workflow management**
|
|
61
|
-
- `session-log` — logs a session report to the Obsidian vault
|
|
62
|
-
- `session-tidy` — tidies the session folder
|
|
63
|
-
- `task-build` — gathers open tasks
|
|
64
|
-
- `issue-tracker` — one consistent way to create, update in place, and close GitHub issues for a work-stream: one epic parent with native sub-issues, dedup-first, marker-delimited body sections edited in place, and an epic checklist mirroring the children
|
|
65
|
-
- `closeout` — session-end entry that harvests obstacles into issue-candidate records and delegates filing to the `issue-tracker` agent (skill fallback), keeping the user-validation gate on each draft
|
|
66
|
-
- `privacy-hygiene` — full-repo personal-data and secret sweep plus remediation guide
|
|
67
|
-
- `update` — updates the dev-env package
|
|
68
|
-
- `fresh-branch` — creates a clean branch off main
|
|
69
|
-
- `rebase` — rebases onto main
|
|
70
|
-
- `usage-pause` — waits out the 5-hour usage window in ScheduleWakeup stages that keep agent contexts warm; probes the OAuth usage endpoint or takes a manual reset override
|
|
71
|
-
- `skill-builder` — complete skill-building lifecycle
|
|
72
|
-
- `auditing-claude-config` — audits a Claude Code setup for context-budget waste and produces a migration table with savings
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# skills/_shared
|
|
2
|
+
|
|
3
|
+
**Map** for skill-install shared assets. Open a stub, then load the `@` target.
|
|
4
|
+
|
|
5
|
+
## Two homes
|
|
6
|
+
|
|
7
|
+
| Home | Path | Holds |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **Skills shared** | `~/.claude/skills/_shared/` | Converge helpers, end-of-run gotcha ref, and `@` stubs |
|
|
10
|
+
| **Top-level shared** | `~/.claude/_shared/` | Advisor protocol, PR-loop contracts, runtime scripts |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Reference docs (this tree)
|
|
14
|
+
|
|
15
|
+
| File | Role |
|
|
16
|
+
|---|---|
|
|
17
|
+
| **`end-of-run-gotcha-recommendations.md`** | End-of-run pasteable gotcha protocol for every skill |
|
|
18
|
+
|
|
19
|
+
## Subdirectories
|
|
20
|
+
|
|
21
|
+
| Directory | Role |
|
|
22
|
+
|---|---|
|
|
23
|
+
| **`advisor/`** | Stubs → `@~/.claude/_shared/advisor/` |
|
|
24
|
+
| **`pr-loop/`** | Local converge helpers + stubs → `@~/.claude/_shared/pr-loop/` |
|
|
25
|
+
|
|
26
|
+
## Canonical-path stubs
|
|
27
|
+
|
|
28
|
+
| Stub here | Load |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `advisor/advisor-protocol.md` | `@~/.claude/_shared/advisor/advisor-protocol.md` |
|
|
31
|
+
| `advisor/CLAUDE.md` | `@~/.claude/_shared/advisor/CLAUDE.md` |
|
|
32
|
+
| `advisor/scripts/README.md` | `@~/.claude/_shared/advisor/scripts/` |
|
|
33
|
+
| `pr-loop/audit-contract.md` | `@~/.claude/_shared/pr-loop/audit-contract.md` |
|
|
34
|
+
| `pr-loop/audit-reply-template.md` | `@~/.claude/_shared/pr-loop/audit-reply-template.md` |
|
|
35
|
+
| `pr-loop/code-rules-gate.md` | `@~/.claude/_shared/pr-loop/code-rules-gate.md` |
|
|
36
|
+
| `pr-loop/fix-protocol.md` | `@~/.claude/_shared/pr-loop/fix-protocol.md` |
|
|
37
|
+
| `pr-loop/gh-payloads.md` | `@~/.claude/_shared/pr-loop/gh-payloads.md` |
|
|
38
|
+
| `pr-loop/post-audit-thread-contract.md` | `@~/.claude/_shared/pr-loop/post-audit-thread-contract.md` |
|
|
39
|
+
| `pr-loop/precatch-rubric.md` | `@~/.claude/_shared/pr-loop/precatch-rubric.md` |
|
|
40
|
+
| `pr-loop/state-schema.md` | `@~/.claude/_shared/pr-loop/state-schema.md` |
|
|
41
|
+
| `pr-loop/worker-spawn.md` | `@~/.claude/_shared/pr-loop/worker-spawn.md` |
|
|
42
|
+
| `pr-loop/scripts/RUNTIME_SCRIPTS.md` | `@~/.claude/_shared/pr-loop/scripts/` |
|
|
43
|
+
|
|
44
|
+
Install via `packages/claude-dev-env/bin/install.mjs`.
|
package/skills/_shared/CLAUDE.md
CHANGED
|
@@ -1,44 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
**Map** for skill-install shared assets. Open a stub, then load the `@` target.
|
|
4
|
-
|
|
5
|
-
## Two homes
|
|
6
|
-
|
|
7
|
-
| Home | Path | Holds |
|
|
8
|
-
|---|---|---|
|
|
9
|
-
| **Skills shared** | `~/.claude/skills/_shared/` | Converge helpers, end-of-run gotcha ref, and `@` stubs |
|
|
10
|
-
| **Top-level shared** | `~/.claude/_shared/` | Advisor protocol, PR-loop contracts, runtime scripts |
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Reference docs (this tree)
|
|
14
|
-
|
|
15
|
-
| File | Role |
|
|
16
|
-
|---|---|
|
|
17
|
-
| **`end-of-run-gotcha-recommendations.md`** | End-of-run pasteable gotcha protocol for every skill |
|
|
18
|
-
|
|
19
|
-
## Subdirectories
|
|
20
|
-
|
|
21
|
-
| Directory | Role |
|
|
22
|
-
|---|---|
|
|
23
|
-
| **`advisor/`** | Stubs → `@~/.claude/_shared/advisor/` |
|
|
24
|
-
| **`pr-loop/`** | Local converge helpers + stubs → `@~/.claude/_shared/pr-loop/` |
|
|
25
|
-
|
|
26
|
-
## Canonical-path stubs
|
|
27
|
-
|
|
28
|
-
| Stub here | Load |
|
|
29
|
-
|---|---|
|
|
30
|
-
| `advisor/advisor-protocol.md` | `@~/.claude/_shared/advisor/advisor-protocol.md` |
|
|
31
|
-
| `advisor/CLAUDE.md` | `@~/.claude/_shared/advisor/CLAUDE.md` |
|
|
32
|
-
| `advisor/scripts/README.md` | `@~/.claude/_shared/advisor/scripts/` |
|
|
33
|
-
| `pr-loop/audit-contract.md` | `@~/.claude/_shared/pr-loop/audit-contract.md` |
|
|
34
|
-
| `pr-loop/audit-reply-template.md` | `@~/.claude/_shared/pr-loop/audit-reply-template.md` |
|
|
35
|
-
| `pr-loop/code-rules-gate.md` | `@~/.claude/_shared/pr-loop/code-rules-gate.md` |
|
|
36
|
-
| `pr-loop/fix-protocol.md` | `@~/.claude/_shared/pr-loop/fix-protocol.md` |
|
|
37
|
-
| `pr-loop/gh-payloads.md` | `@~/.claude/_shared/pr-loop/gh-payloads.md` |
|
|
38
|
-
| `pr-loop/post-audit-thread-contract.md` | `@~/.claude/_shared/pr-loop/post-audit-thread-contract.md` |
|
|
39
|
-
| `pr-loop/precatch-rubric.md` | `@~/.claude/_shared/pr-loop/precatch-rubric.md` |
|
|
40
|
-
| `pr-loop/state-schema.md` | `@~/.claude/_shared/pr-loop/state-schema.md` |
|
|
41
|
-
| `pr-loop/worker-spawn.md` | `@~/.claude/_shared/pr-loop/worker-spawn.md` |
|
|
42
|
-
| `pr-loop/scripts/RUNTIME_SCRIPTS.md` | `@~/.claude/_shared/pr-loop/scripts/` |
|
|
43
|
-
|
|
44
|
-
Install via `packages/claude-dev-env/bin/install.mjs`.
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Advisor
|
|
2
|
+
|
|
3
|
+
**Canonical home:**
|
|
4
|
+
|
|
5
|
+
@~/.claude/_shared/advisor/CLAUDE.md
|
|
6
|
+
|
|
7
|
+
@~/.claude/_shared/advisor/advisor-protocol.md
|
|
8
|
+
|
|
9
|
+
Scripts: `~/.claude/_shared/advisor/scripts/` (`model_tier_run_validator.py`, `codex_sol_advisor.py`, `tier_model_ids.py`, constants under `scripts/config/`).
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
**Canonical home:**
|
|
4
|
-
|
|
5
|
-
@~/.claude/_shared/advisor/CLAUDE.md
|
|
6
|
-
|
|
7
|
-
@~/.claude/_shared/advisor/advisor-protocol.md
|
|
8
|
-
|
|
9
|
-
Scripts: `~/.claude/_shared/advisor/scripts/` (`model_tier_run_validator.py`, `codex_sol_advisor.py`, `tier_model_ids.py`, constants under `scripts/config/`).
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# pr-loop
|
|
2
|
+
|
|
3
|
+
Shared infrastructure for the PR audit-fix loop used by `bugteam`,
|
|
4
|
+
`pr-converge`, and `autoconverge`. Provides the XML prompt template, Python
|
|
5
|
+
runtime scripts, the portable converge driver protocol, and named constants
|
|
6
|
+
those skills invoke during each loop tick.
|
|
7
|
+
|
|
8
|
+
## Subdirectories
|
|
9
|
+
|
|
10
|
+
| Directory | Role |
|
|
11
|
+
|---|---|
|
|
12
|
+
| `prompts/` | XML agent prompt templates. |
|
|
13
|
+
| `scripts/` | Python scripts for loop state management, prompt building, outcome recording, path resolution, pacer selection, and preflight checks. |
|
|
14
|
+
|
|
15
|
+
## Canonical-path stubs (`~/.claude/_shared/pr-loop/`)
|
|
16
|
+
|
|
17
|
+
Open a stub, then load the `@` target:
|
|
18
|
+
|
|
19
|
+
| Stub here | Load |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `audit-contract.md` | `@~/.claude/_shared/pr-loop/audit-contract.md` |
|
|
22
|
+
| `audit-reply-template.md` | `@~/.claude/_shared/pr-loop/audit-reply-template.md` |
|
|
23
|
+
| `code-rules-gate.md` | `@~/.claude/_shared/pr-loop/code-rules-gate.md` |
|
|
24
|
+
| `fix-protocol.md` | `@~/.claude/_shared/pr-loop/fix-protocol.md` |
|
|
25
|
+
| `gh-payloads.md` | `@~/.claude/_shared/pr-loop/gh-payloads.md` |
|
|
26
|
+
| `post-audit-thread-contract.md` | `@~/.claude/_shared/pr-loop/post-audit-thread-contract.md` |
|
|
27
|
+
| `precatch-rubric.md` | `@~/.claude/_shared/pr-loop/precatch-rubric.md` |
|
|
28
|
+
| `state-schema.md` | `@~/.claude/_shared/pr-loop/state-schema.md` |
|
|
29
|
+
| `worker-spawn.md` | `@~/.claude/_shared/pr-loop/worker-spawn.md` |
|
|
30
|
+
| `scripts/RUNTIME_SCRIPTS.md` | `@~/.claude/_shared/pr-loop/scripts/` |
|
|
31
|
+
|
|
32
|
+
## Key files (live in this tree)
|
|
33
|
+
|
|
34
|
+
| File | Role |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `portable-driver.md` | Continuous in-session pacer when Workflow / ScheduleWakeup are absent. |
|
|
37
|
+
| `prompts/pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. |
|
|
38
|
+
| `scripts/select_converge_pacer.py` | Maps entry skill + host tool flags to `workflow`, `schedule_wakeup`, or `portable`. |
|
|
39
|
+
| `scripts/build_audit_prompt.py` | Assembles the audit agent prompt from loop state and the constants module. |
|
|
40
|
+
| `scripts/build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings. |
|
|
41
|
+
| `scripts/init_loop_state.py` | Initializes the per-PR loop state JSON file. |
|
|
42
|
+
| `scripts/write_audit_outcomes.py` | Writes the per-loop audit outcome XML into the workspace. |
|
|
43
|
+
| `scripts/write_fix_outcomes.py` | Writes the per-loop fix outcome XML into the workspace. |
|
|
44
|
+
| `scripts/preflight_worktree.py` | Verifies the working directory is a healthy worktree for the target PR's repo. |
|
|
45
|
+
| `scripts/teardown_worktrees.py` | Removes loop worktrees on clean exit. |
|
|
46
|
+
| `scripts/write_handoff.py` | Writes durable resume-handoff files under `~/.claude/runtime/pr-loop/<run-name>/` at each converge checkpoint. |
|
|
47
|
+
| `scripts/_path_resolver.py` | Resolves workspace and worktree paths from PR metadata. |
|
|
48
|
+
| `scripts/_cli_utils.py` | Shared CLI argument parsing helpers. |
|
|
49
|
+
| `scripts/_xml_utils.py` | XML serialization helpers. |
|
|
50
|
+
| `scripts/skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Shared infrastructure for the PR audit-fix loop used by `bugteam`,
|
|
4
|
-
`pr-converge`, and `autoconverge`. Provides the XML prompt template, Python
|
|
5
|
-
runtime scripts, the portable converge driver protocol, and named constants
|
|
6
|
-
those skills invoke during each loop tick.
|
|
7
|
-
|
|
8
|
-
## Subdirectories
|
|
9
|
-
|
|
10
|
-
| Directory | Role |
|
|
11
|
-
|---|---|
|
|
12
|
-
| `prompts/` | XML agent prompt templates. |
|
|
13
|
-
| `scripts/` | Python scripts for loop state management, prompt building, outcome recording, path resolution, pacer selection, and preflight checks. |
|
|
14
|
-
|
|
15
|
-
## Canonical-path stubs (`~/.claude/_shared/pr-loop/`)
|
|
16
|
-
|
|
17
|
-
Open a stub, then load the `@` target:
|
|
18
|
-
|
|
19
|
-
| Stub here | Load |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `audit-contract.md` | `@~/.claude/_shared/pr-loop/audit-contract.md` |
|
|
22
|
-
| `audit-reply-template.md` | `@~/.claude/_shared/pr-loop/audit-reply-template.md` |
|
|
23
|
-
| `code-rules-gate.md` | `@~/.claude/_shared/pr-loop/code-rules-gate.md` |
|
|
24
|
-
| `fix-protocol.md` | `@~/.claude/_shared/pr-loop/fix-protocol.md` |
|
|
25
|
-
| `gh-payloads.md` | `@~/.claude/_shared/pr-loop/gh-payloads.md` |
|
|
26
|
-
| `post-audit-thread-contract.md` | `@~/.claude/_shared/pr-loop/post-audit-thread-contract.md` |
|
|
27
|
-
| `precatch-rubric.md` | `@~/.claude/_shared/pr-loop/precatch-rubric.md` |
|
|
28
|
-
| `state-schema.md` | `@~/.claude/_shared/pr-loop/state-schema.md` |
|
|
29
|
-
| `worker-spawn.md` | `@~/.claude/_shared/pr-loop/worker-spawn.md` |
|
|
30
|
-
| `scripts/RUNTIME_SCRIPTS.md` | `@~/.claude/_shared/pr-loop/scripts/` |
|
|
31
|
-
|
|
32
|
-
## Key files (live in this tree)
|
|
33
|
-
|
|
34
|
-
| File | Role |
|
|
35
|
-
|---|---|
|
|
36
|
-
| `portable-driver.md` | Continuous in-session pacer when Workflow / ScheduleWakeup are absent. |
|
|
37
|
-
| `prompts/pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. |
|
|
38
|
-
| `scripts/select_converge_pacer.py` | Maps entry skill + host tool flags to `workflow`, `schedule_wakeup`, or `portable`. |
|
|
39
|
-
| `scripts/build_audit_prompt.py` | Assembles the audit agent prompt from loop state and the constants module. |
|
|
40
|
-
| `scripts/build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings. |
|
|
41
|
-
| `scripts/init_loop_state.py` | Initializes the per-PR loop state JSON file. |
|
|
42
|
-
| `scripts/write_audit_outcomes.py` | Writes the per-loop audit outcome XML into the workspace. |
|
|
43
|
-
| `scripts/write_fix_outcomes.py` | Writes the per-loop fix outcome XML into the workspace. |
|
|
44
|
-
| `scripts/preflight_worktree.py` | Verifies the working directory is a healthy worktree for the target PR's repo. |
|
|
45
|
-
| `scripts/teardown_worktrees.py` | Removes loop worktrees on clean exit. |
|
|
46
|
-
| `scripts/write_handoff.py` | Writes durable resume-handoff files under `~/.claude/runtime/pr-loop/<run-name>/` at each converge checkpoint. |
|
|
47
|
-
| `scripts/_path_resolver.py` | Resolves workspace and worktree paths from PR metadata. |
|
|
48
|
-
| `scripts/_cli_utils.py` | Shared CLI argument parsing helpers. |
|
|
49
|
-
| `scripts/_xml_utils.py` | XML serialization helpers. |
|
|
50
|
-
| `scripts/skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# prompts
|
|
2
|
+
|
|
3
|
+
XML agent prompt templates for the PR audit-fix loop.
|
|
4
|
+
|
|
5
|
+
## Key files
|
|
6
|
+
|
|
7
|
+
| File | Role |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. Defines the agent role, scope anchors, a ten-rule detection workflow, and output format. `bugteam` and `pr-converge` both inject this prompt when running the consistency audit step. |
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
XML agent prompt templates for the PR audit-fix loop.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Role |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `pr-consistency-audit.xml` | Structured prompt artifact for the cross-file consistency audit agent. Defines the agent role, scope anchors, a ten-rule detection workflow, and output format. `bugteam` and `pr-converge` both inject this prompt when running the consistency audit step. |
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# scripts
|
|
2
|
+
|
|
3
|
+
Python scripts that run the PR audit-fix loop at runtime. Both `bugteam` and `pr-converge` invoke these scripts during each loop tick.
|
|
4
|
+
|
|
5
|
+
## Two script homes
|
|
6
|
+
|
|
7
|
+
| Home | Path |
|
|
8
|
+
|---|---|
|
|
9
|
+
| **Skill-local** (this folder) | Converge helpers: `build_*_prompt.py`, `init_loop_state.py`, `portable_converge_driver.py`, … |
|
|
10
|
+
| **Runtime** (top-level shared) | Gate / preflight / review helpers — see `RUNTIME_SCRIPTS.md` → `@~/.claude/_shared/pr-loop/scripts/` |
|
|
11
|
+
|
|
12
|
+
## Key files (skill-local)
|
|
13
|
+
|
|
14
|
+
| File | Role |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `audit_category_schema.py` | Loads the A-Q schema JSON, exports category entries, validates rubric/prompt projections, renders deterministic skeletons. |
|
|
17
|
+
| `build_audit_prompt.py` | Assembles the audit agent prompt from loop state and category constants. |
|
|
18
|
+
| `build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings XML. |
|
|
19
|
+
| `init_loop_state.py` | Initializes the per-PR `loop-state.json` file in the workspace directory. |
|
|
20
|
+
| `write_audit_outcomes.py` | Writes per-loop audit outcome XML into the workspace. |
|
|
21
|
+
| `write_fix_outcomes.py` | Writes per-loop fix outcome XML into the workspace. |
|
|
22
|
+
| `preflight_worktree.py` | Verifies the working directory is a healthy git worktree for the target PR's repo. Supports `--mode strict` to abort when the repo does not match. |
|
|
23
|
+
| `teardown_worktrees.py` | Removes per-PR worktrees after a clean loop exit. |
|
|
24
|
+
| `write_handoff.py` | Writes durable resume-handoff files under the run's `~/.claude/runtime/pr-loop` directory at each converge checkpoint. |
|
|
25
|
+
| `select_converge_pacer.py` | Selects `workflow`, `schedule_wakeup`, or `portable` for pr-converge / autoconverge from host tool flags. |
|
|
26
|
+
| `build_converge_task_list.py` | Step-1 task list: runnable review gates + final all_runnable_reviews_clean_same_head. |
|
|
27
|
+
| `portable_converge_driver.py` | portable_converge_driver phase machine: open-run and post-step transitions emit JSON next/commands only. |
|
|
28
|
+
| `_path_resolver.py` | Resolves workspace and worktree paths from PR owner, repo, and number. |
|
|
29
|
+
| `_cli_utils.py` | Shared CLI argument parsing helpers (argparse wrappers). |
|
|
30
|
+
| `_xml_utils.py` | XML serialization helpers for outcome files. |
|
|
31
|
+
| `skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
|
|
32
|
+
|
|
33
|
+
## Tests
|
|
34
|
+
|
|
35
|
+
Each script has a paired test file (`test_build_audit_prompt.py`, `test_build_fix_prompt.py`, etc.) in this directory. Run with `python -m pytest` from the repo root.
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Python scripts that run the PR audit-fix loop at runtime. Both `bugteam` and `pr-converge` invoke these scripts during each loop tick.
|
|
4
|
-
|
|
5
|
-
## Two script homes
|
|
6
|
-
|
|
7
|
-
| Home | Path |
|
|
8
|
-
|---|---|
|
|
9
|
-
| **Skill-local** (this folder) | Converge helpers: `build_*_prompt.py`, `init_loop_state.py`, `portable_converge_driver.py`, … |
|
|
10
|
-
| **Runtime** (top-level shared) | Gate / preflight / review helpers — see `RUNTIME_SCRIPTS.md` → `@~/.claude/_shared/pr-loop/scripts/` |
|
|
11
|
-
|
|
12
|
-
## Key files (skill-local)
|
|
13
|
-
|
|
14
|
-
| File | Role |
|
|
15
|
-
|---|---|
|
|
16
|
-
| `audit_category_schema.py` | Loads the A-Q schema JSON, exports category entries, validates rubric/prompt projections, renders deterministic skeletons. |
|
|
17
|
-
| `build_audit_prompt.py` | Assembles the audit agent prompt from loop state and category constants. |
|
|
18
|
-
| `build_fix_prompt.py` | Assembles the fix agent prompt from loop state and findings XML. |
|
|
19
|
-
| `init_loop_state.py` | Initializes the per-PR `loop-state.json` file in the workspace directory. |
|
|
20
|
-
| `write_audit_outcomes.py` | Writes per-loop audit outcome XML into the workspace. |
|
|
21
|
-
| `write_fix_outcomes.py` | Writes per-loop fix outcome XML into the workspace. |
|
|
22
|
-
| `preflight_worktree.py` | Verifies the working directory is a healthy git worktree for the target PR's repo. Supports `--mode strict` to abort when the repo does not match. |
|
|
23
|
-
| `teardown_worktrees.py` | Removes per-PR worktrees after a clean loop exit. |
|
|
24
|
-
| `write_handoff.py` | Writes durable resume-handoff files under the run's `~/.claude/runtime/pr-loop` directory at each converge checkpoint. |
|
|
25
|
-
| `select_converge_pacer.py` | Selects `workflow`, `schedule_wakeup`, or `portable` for pr-converge / autoconverge from host tool flags. |
|
|
26
|
-
| `build_converge_task_list.py` | Step-1 task list: runnable review gates + final all_runnable_reviews_clean_same_head. |
|
|
27
|
-
| `portable_converge_driver.py` | portable_converge_driver phase machine: open-run and post-step transitions emit JSON next/commands only. |
|
|
28
|
-
| `_path_resolver.py` | Resolves workspace and worktree paths from PR owner, repo, and number. |
|
|
29
|
-
| `_cli_utils.py` | Shared CLI argument parsing helpers (argparse wrappers). |
|
|
30
|
-
| `_xml_utils.py` | XML serialization helpers for outcome files. |
|
|
31
|
-
| `skills_pr_loop_constants/` | Named constants package imported by the scripts above. |
|
|
32
|
-
|
|
33
|
-
## Tests
|
|
34
|
-
|
|
35
|
-
Each script has a paired test file (`test_build_audit_prompt.py`, `test_build_fix_prompt.py`, etc.) in this directory. Run with `python -m pytest` from the repo root.
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# skills_pr_loop_constants
|
|
2
|
+
|
|
3
|
+
Python package of named constants for the `pr-loop` shared scripts. All constants are `UPPER_SNAKE_CASE` module-level names imported by the sibling scripts.
|
|
4
|
+
|
|
5
|
+
## Key files
|
|
6
|
+
|
|
7
|
+
| File | Role |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `__init__.py` | Package marker. |
|
|
10
|
+
| `path_resolver_constants.py` | Path template strings and format constants: workspace directory naming, worktree directory name, diff patch filename pattern, outcome XML filename patterns, fix status values, audit constraint texts, audit category entries, fix execution steps, and fix constraint texts. |
|
|
11
|
+
| `audit_category_schema_constants.py` | Paths, regexes, and encoding constants for `audit_category_schema.py` (A-Q schema load and projection parity). |
|
|
12
|
+
| `preflight_constants.py` | Constants used by `preflight_worktree.py` for exit codes and output marker strings. |
|
|
13
|
+
| `handoff_constants.py` | Filename, path-segment, and template constants for the durable handoff writer. |
|
|
14
|
+
| `pacer_constants.py` | Entry-skill names, pacer tokens, CLI flags, and result keys for `select_converge_pacer.py`. |
|
|
15
|
+
| `portable_driver_constants.py` | Phase names, next-action tokens, wait delays, blockers, CLI flags, and result keys for `portable_converge_driver.py`. |
|
|
16
|
+
| `converge_task_list_constants.py` | Task ids, kinds, and CLI flags for `build_converge_task_list.py`. |
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
Scripts import directly from the package:
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from skills_pr_loop_constants.path_resolver_constants import PER_PR_WORKSPACE_TEMPLATE
|
|
24
|
+
```
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Python package of named constants for the `pr-loop` shared scripts. All constants are `UPPER_SNAKE_CASE` module-level names imported by the sibling scripts.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Role |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `__init__.py` | Package marker. |
|
|
10
|
-
| `path_resolver_constants.py` | Path template strings and format constants: workspace directory naming, worktree directory name, diff patch filename pattern, outcome XML filename patterns, fix status values, audit constraint texts, audit category entries, fix execution steps, and fix constraint texts. |
|
|
11
|
-
| `audit_category_schema_constants.py` | Paths, regexes, and encoding constants for `audit_category_schema.py` (A-Q schema load and projection parity). |
|
|
12
|
-
| `preflight_constants.py` | Constants used by `preflight_worktree.py` for exit codes and output marker strings. |
|
|
13
|
-
| `handoff_constants.py` | Filename, path-segment, and template constants for the durable handoff writer. |
|
|
14
|
-
| `pacer_constants.py` | Entry-skill names, pacer tokens, CLI flags, and result keys for `select_converge_pacer.py`. |
|
|
15
|
-
| `portable_driver_constants.py` | Phase names, next-action tokens, wait delays, blockers, CLI flags, and result keys for `portable_converge_driver.py`. |
|
|
16
|
-
| `converge_task_list_constants.py` | Task ids, kinds, and CLI flags for `build_converge_task_list.py`. |
|
|
17
|
-
|
|
18
|
-
## Usage
|
|
19
|
-
|
|
20
|
-
Scripts import directly from the package:
|
|
21
|
-
|
|
22
|
-
```python
|
|
23
|
-
from skills_pr_loop_constants.path_resolver_constants import PER_PR_WORKSPACE_TEMPLATE
|
|
24
|
-
```
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# anthropic-plan
|
|
2
|
+
|
|
3
|
+
**Trigger:** `/anthropic-plan`, "plan this first", "think before coding", "make a plan", "scope this out", "don't code yet", and non-trivial requests that need source-grounded design before build work.
|
|
4
|
+
|
|
5
|
+
Creates a repo-local plan packet under `docs/plans/<slug>/` by running the `plan-packet.mjs` workflow. The skill first drafts a short starting plan and gets the user's approval in plan mode (`EnterPlanMode` / `ExitPlanMode`); on approval it runs the workflow. The packet holds context, spec, implementation steps, validation, and a handoff prompt for the build agent. The skill stops before any production code changes.
|
|
6
|
+
|
|
7
|
+
## Subdirectories
|
|
8
|
+
|
|
9
|
+
| Directory | Role |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `scripts/` | Python validator (`validate_packet.py`) that checks the packet's required files, placeholders, and consistency. |
|
|
12
|
+
| `templates/` | Template files the workflow renders when building the packet (`README.md`, `build-prompt.md`, `reuse-audit.md`, `source-map.md`, `visual-plan.template.html`). |
|
|
13
|
+
| `workflow/` | The `.mjs` workflow scripts and their test files. |
|
|
14
|
+
|
|
15
|
+
## Key files
|
|
16
|
+
|
|
17
|
+
| File | Role |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `SKILL.md` | Entry point. Full planning protocol, workflow contract, packet shape, and validation rules. |
|
|
20
|
+
| `workflow/plan-packet.mjs` | Main workflow script. Reads repo context, writes the packet, runs the validator, spawns `plan-packet-validator`, runs the reuse audit, builds the visual HTML, and returns the packet path. |
|
|
21
|
+
| `workflow/plan-packet.contract.test.mjs` | Contract tests for the workflow script. |
|
|
22
|
+
| `packages/claude-dev-env/skills/anthropic-plan/scripts/validate_packet.py` | Deterministic validator: checks required files, open questions, source-map strength, TDD coverage, and `packet.json` consistency. Exits with code 2 on failure. |
|
|
23
|
+
| `templates/visual-plan.template.html` | Template for the single-file offline visual HTML the workflow builds after validation. |
|
|
24
|
+
|
|
25
|
+
## Entry point
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
Workflow({
|
|
29
|
+
scriptPath: "$HOME/.claude/skills/anthropic-plan/workflow/plan-packet.mjs",
|
|
30
|
+
args: { task: "<user request>", cwd: "<working directory>" }
|
|
31
|
+
})
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The session must be in a worktree (path has `.claude/worktrees/`) before calling the workflow.
|
|
@@ -1,34 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
**Trigger:** `/anthropic-plan`, `/plan`, "plan this first", "think before coding", "make a plan", "scope this out", "don't code yet", and non-trivial requests that need source-grounded design before build work.
|
|
4
|
-
|
|
5
|
-
Creates a repo-local plan packet under `docs/plans/<slug>/` by running the `plan-packet.mjs` workflow. The skill first drafts a short starting plan and gets the user's approval in plan mode (`EnterPlanMode` / `ExitPlanMode`); on approval it runs the workflow. The packet holds context, spec, implementation steps, validation, and a handoff prompt for the build agent. The skill stops before any production code changes.
|
|
6
|
-
|
|
7
|
-
## Subdirectories
|
|
8
|
-
|
|
9
|
-
| Directory | Role |
|
|
10
|
-
|---|---|
|
|
11
|
-
| `scripts/` | Python validator (`validate_packet.py`) that checks the packet's required files, placeholders, and consistency. |
|
|
12
|
-
| `templates/` | Template files the workflow renders when building the packet (`README.md`, `build-prompt.md`, `reuse-audit.md`, `source-map.md`, `visual-plan.template.html`). |
|
|
13
|
-
| `workflow/` | The `.mjs` workflow scripts and their test files. |
|
|
14
|
-
|
|
15
|
-
## Key files
|
|
16
|
-
|
|
17
|
-
| File | Role |
|
|
18
|
-
|---|---|
|
|
19
|
-
| `SKILL.md` | Entry point. Full planning protocol, workflow contract, packet shape, and validation rules. |
|
|
20
|
-
| `workflow/plan-packet.mjs` | Main workflow script. Reads repo context, writes the packet, runs the validator, spawns `plan-packet-validator`, runs the reuse audit, builds the visual HTML, and returns the packet path. |
|
|
21
|
-
| `workflow/plan-packet.contract.test.mjs` | Contract tests for the workflow script. |
|
|
22
|
-
| `packages/claude-dev-env/skills/anthropic-plan/scripts/validate_packet.py` | Deterministic validator: checks required files, open questions, source-map strength, TDD coverage, and `packet.json` consistency. Exits with code 2 on failure. |
|
|
23
|
-
| `templates/visual-plan.template.html` | Template for the single-file offline visual HTML the workflow builds after validation. |
|
|
24
|
-
|
|
25
|
-
## Entry point
|
|
26
|
-
|
|
27
|
-
```js
|
|
28
|
-
Workflow({
|
|
29
|
-
scriptPath: "$HOME/.claude/skills/anthropic-plan/workflow/plan-packet.mjs",
|
|
30
|
-
args: { task: "<user request>", cwd: "<working directory>" }
|
|
31
|
-
})
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
The session must be in a worktree (path has `.claude/worktrees/`) before calling the workflow.
|
|
1
|
+
@AGENTS.md
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: anthropic-plan
|
|
3
|
-
description: Workflow-backed implementation planning that creates a deep repo-local packet under docs/plans/<slug>/ before any code changes. Use for /anthropic-plan,
|
|
3
|
+
description: Workflow-backed implementation planning that creates a deep repo-local packet under docs/plans/<slug>/ before any code changes. Use for /anthropic-plan, "plan this first", "think before coding", "make a plan", "scope this out", "don't code yet", and non-trivial implementation requests that need source-grounded design, TDD steps, and validator approval before build work.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Anthropic Plan
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# scripts
|
|
2
|
+
|
|
3
|
+
Python scripts for the `anthropic-plan` skill.
|
|
4
|
+
|
|
5
|
+
## Key files
|
|
6
|
+
|
|
7
|
+
| File | Role |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `validate_packet.py` | Deterministic packet validator. Checks that all required files exist under `docs/plans/<slug>/`, that no placeholder text remains, that `packet.json` is consistent with the folder contents, and that the TDD plan is present. Exits with code 2 on failure; the workflow treats a non-zero exit as a blocking finding. |
|
|
10
|
+
| `test_validate_packet.py` | Tests for `validate_packet.py`. |
|
|
11
|
+
| `anthropic_plan_scripts_constants/` | Named constants package (`validate_packet_constants.py`) that lists every required relative path the validator checks. |
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Python scripts for the `anthropic-plan` skill.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Role |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `validate_packet.py` | Deterministic packet validator. Checks that all required files exist under `docs/plans/<slug>/`, that no placeholder text remains, that `packet.json` is consistent with the folder contents, and that the TDD plan is present. Exits with code 2 on failure; the workflow treats a non-zero exit as a blocking finding. |
|
|
10
|
-
| `test_validate_packet.py` | Tests for `validate_packet.py`. |
|
|
11
|
-
| `anthropic_plan_scripts_constants/` | Named constants package (`validate_packet_constants.py`) that lists every required relative path the validator checks. |
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# anthropic_plan_scripts_constants
|
|
2
|
+
|
|
3
|
+
Python package of named constants for `anthropic-plan/scripts/`.
|
|
4
|
+
|
|
5
|
+
## Key files
|
|
6
|
+
|
|
7
|
+
| File | Role |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `__init__.py` | Package marker. |
|
|
10
|
+
| `validate_packet_constants.py` | Defines `ALL_REQUIRED_RELATIVE_PATHS` — the tuple of every relative path that must exist inside a valid plan packet (e.g. `README.md`, `packet.json`, `context/source-map.md`, `implementation/tdd-plan.md`, `handoff/build-prompt.md`). Also defines `MARKDOWN_FILE_SUFFIX` and `EXIT_CODE_VALIDATION_FAILED`. |
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from anthropic_plan_scripts_constants.validate_packet_constants import ALL_REQUIRED_RELATIVE_PATHS
|
|
16
|
+
```
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Python package of named constants for `anthropic-plan/scripts/`.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Role |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `__init__.py` | Package marker. |
|
|
10
|
-
| `validate_packet_constants.py` | Defines `ALL_REQUIRED_RELATIVE_PATHS` — the tuple of every relative path that must exist inside a valid plan packet (e.g. `README.md`, `packet.json`, `context/source-map.md`, `implementation/tdd-plan.md`, `handoff/build-prompt.md`). Also defines `MARKDOWN_FILE_SUFFIX` and `EXIT_CODE_VALIDATION_FAILED`. |
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```python
|
|
15
|
-
from anthropic_plan_scripts_constants.validate_packet_constants import ALL_REQUIRED_RELATIVE_PATHS
|
|
16
|
-
```
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# templates
|
|
2
|
+
|
|
3
|
+
Template files the `plan-packet.mjs` workflow renders when building a plan packet.
|
|
4
|
+
|
|
5
|
+
## Key files
|
|
6
|
+
|
|
7
|
+
| File | Role |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `README.md` | Markdown template for the packet's top-level `README.md`. Placeholder slots for plan title, goal, status, packet map, and build path. |
|
|
10
|
+
| `build-prompt.md` | Template for `handoff/build-prompt.md` — the standalone prompt the build agent reads to start coding without needing the rest of the packet. |
|
|
11
|
+
| `reuse-audit.md` | Template for `validation/reuse-audit.md` — the per-item verdict table the workflow fills in during the reuse audit step. |
|
|
12
|
+
| `source-map.md` | Template for `context/source-map.md` — the inventory of source files and facts the planner extracts. |
|
|
13
|
+
| `visual-plan.template.html` | Single-file offline HTML template. The workflow fills this with packet data after validation to produce `visual-plan.html` beside the packet. Inlines all CSS and JavaScript; references no external assets. |
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Template files the `plan-packet.mjs` workflow renders when building a plan packet.
|
|
4
|
-
|
|
5
|
-
## Key files
|
|
6
|
-
|
|
7
|
-
| File | Role |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `README.md` | Markdown template for the packet's top-level `README.md`. Placeholder slots for plan title, goal, status, packet map, and build path. |
|
|
10
|
-
| `build-prompt.md` | Template for `handoff/build-prompt.md` — the standalone prompt the build agent reads to start coding without needing the rest of the packet. |
|
|
11
|
-
| `reuse-audit.md` | Template for `validation/reuse-audit.md` — the per-item verdict table the workflow fills in during the reuse audit step. |
|
|
12
|
-
| `source-map.md` | Template for `context/source-map.md` — the inventory of source files and facts the planner extracts. |
|
|
13
|
-
| `visual-plan.template.html` | Single-file offline HTML template. The workflow fills this with packet data after validation to produce `visual-plan.html` beside the packet. Inlines all CSS and JavaScript; references no external assets. |
|
|
1
|
+
@AGENTS.md
|