claude-dev-env 2.7.1 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +7 -1
- package/_shared/CLAUDE.md +1 -0
- package/_shared/advisor/advisor-protocol.md +19 -9
- package/_shared/pr-loop/audit-contract.md +4 -4
- package/_shared/pr-loop/precatch-rubric.md +2 -2
- package/_shared/process-tree/CLAUDE.md +41 -0
- package/_shared/process-tree/scripts/config/process_tree_scripts_constants/__init__.py +1 -0
- package/_shared/process-tree/scripts/config/process_tree_scripts_constants/process_tree_kill_constants.py +27 -0
- package/_shared/process-tree/scripts/process_tree_kill.py +141 -0
- package/_shared/process-tree/scripts/pyproject.toml +16 -0
- package/_shared/process-tree/scripts/test_process_tree_kill.py +278 -0
- package/agents/clean-coder.md +9 -19
- package/agents/code-quality-agent.md +6 -5
- package/agents/deep-research.md +7 -24
- package/agents/docs-agent.md +1 -27
- package/agents/issue-tracker.md +1 -7
- package/agents/skill-writer-agent.md +1 -2
- package/agents/test_agent_frontmatter.py +335 -12
- package/docs/CODE_RULES.md +4 -2
- package/docs/references/CLAUDE.md +2 -2
- package/docs/references/advisor-tool.md +44 -6
- package/docs/references/team-advisor-skill.md +14 -8
- package/hooks/blocking/CLAUDE.md +2 -0
- package/hooks/blocking/fable_spawn_gate.py +187 -0
- package/hooks/blocking/piped_pytest_blocker.py +1223 -0
- package/hooks/blocking/plain_language_blocker.py +287 -15
- package/hooks/blocking/test_fable_spawn_gate.py +374 -0
- package/hooks/blocking/test_piped_pytest_blocker.py +587 -0
- package/hooks/blocking/test_plain_language_blocker.py +277 -2
- package/hooks/blocking/test_pre_tool_use_dispatcher.py +34 -2
- package/hooks/git-hooks/CLAUDE.md +2 -2
- package/hooks/git-hooks/git_hooks_constants/__init__.py +28 -0
- package/hooks/git-hooks/pre_push.py +343 -54
- package/hooks/git-hooks/test_pre_push.py +852 -6
- package/hooks/hooks.json +9 -19
- package/hooks/hooks_constants/CLAUDE.md +2 -0
- package/hooks/hooks_constants/bash_pre_tool_use_dispatcher_constants.py +1 -0
- package/hooks/hooks_constants/code_rules_path_utils_constants.py +1 -0
- package/hooks/hooks_constants/fable_spawn_gate_constants.py +62 -0
- package/hooks/hooks_constants/piped_pytest_blocker_constants.py +360 -0
- package/hooks/hooks_constants/plain_language_blocker_constants.py +64 -1
- package/hooks/hooks_constants/pre_tool_use_dispatcher_constants.py +10 -0
- package/hooks/hooks_constants/shell_command_segments.py +1 -1
- package/hooks/hooks_constants/test_bash_pre_tool_use_dispatcher_constants.py +1 -0
- package/hooks/hooks_constants/test_pre_tool_use_dispatcher_constants.py +27 -0
- package/hooks/hooks_constants/test_prose_metrics_parity.py +124 -0
- package/output-styles/CLAUDE.md +17 -0
- package/output-styles/caveman-agent.md +37 -0
- package/package.json +2 -1
- package/rules/CLAUDE.md +1 -0
- package/rules/ask-user-question-required.md +26 -0
- package/rules/claims-as-quotes.md +65 -0
- package/rules/code-standards.md +33 -7
- package/rules/eli11-replies.md +1 -1
- package/scripts/CLAUDE.md +3 -3
- package/scripts/_code_review_test_support.py +6 -0
- package/scripts/check.ps1 +18 -5
- package/scripts/claude_chain_runner.py +203 -31
- package/scripts/codec_forwarding_test_support.py +2 -0
- package/scripts/dev_env_scripts_constants/CLAUDE.md +4 -4
- package/scripts/dev_env_scripts_constants/claude_chain_constants.py +38 -0
- package/scripts/dev_env_scripts_constants/code_review_constants.py +403 -2
- package/scripts/dev_env_scripts_constants/grok_run_ledger_constants.py +50 -0
- package/scripts/dev_env_scripts_constants/grok_worker_constants.py +132 -24
- package/scripts/grok_headless_runner.py +16 -83
- package/scripts/grok_patch_artifacts.py +123 -0
- package/scripts/grok_run_ledger.py +318 -0
- package/scripts/spawn_grok_batch.py +591 -10
- package/scripts/test_claude_chain_runner.py +358 -0
- package/scripts/test_grok_headless_runner.py +18 -63
- package/scripts/test_grok_patch_artifacts.py +82 -0
- package/scripts/test_grok_run_ledger.py +116 -0
- package/scripts/test_invoke_code_review.py +298 -0
- package/scripts/test_resolve_worker_spawn.py +6 -0
- package/scripts/test_spawn_grok_batch.py +396 -0
- package/scripts/tests/CLAUDE.md +1 -0
- package/scripts/tests/test_grok_worker_constants.py +59 -0
- package/skills/CLAUDE.md +4 -2
- package/skills/_shared/CLAUDE.md +37 -4
- package/skills/_shared/advisor/CLAUDE.md +9 -0
- package/skills/_shared/advisor/advisor-protocol.md +5 -0
- package/skills/_shared/advisor/scripts/README.md +9 -0
- package/skills/_shared/end-of-run-gotcha-recommendations.md +156 -0
- package/skills/_shared/pr-loop/CLAUDE.md +18 -1
- package/skills/_shared/pr-loop/audit-contract.md +5 -0
- package/skills/_shared/pr-loop/audit-reply-template.md +5 -0
- package/skills/_shared/pr-loop/code-rules-gate.md +5 -0
- package/skills/_shared/pr-loop/fix-protocol.md +5 -0
- package/skills/_shared/pr-loop/gh-payloads.md +5 -0
- package/skills/_shared/pr-loop/post-audit-thread-contract.md +5 -0
- package/skills/_shared/pr-loop/precatch-rubric.md +5 -0
- package/skills/_shared/pr-loop/scripts/CLAUDE.md +8 -1
- package/skills/_shared/pr-loop/scripts/RUNTIME_SCRIPTS.md +29 -0
- package/skills/_shared/pr-loop/scripts/test_build_audit_prompt.py +46 -0
- package/skills/_shared/pr-loop/state-schema.md +5 -0
- package/skills/_shared/pr-loop/worker-spawn.md +5 -0
- package/skills/autoconverge/workflow/converge.contract.test.mjs +105 -2
- package/skills/autoconverge/workflow/converge.fix-recovery.test.mjs +34 -1
- package/skills/autoconverge/workflow/converge.mjs +66 -33
- package/skills/codex-review/scripts/codex_review_scripts_constants/codex_usage_probe_constants.py +0 -4
- package/skills/codex-review/scripts/codex_usage_probe.py +20 -33
- package/skills/codex-review/scripts/run_codex_review.py +16 -64
- package/skills/codex-review/scripts/test_codex_usage_probe.py +46 -41
- package/skills/codex-review/scripts/test_run_codex_review.py +1 -33
- package/skills/e-code-review/SKILL.md +15 -9
- package/skills/e-code-review/reference/fix.md +29 -7
- package/skills/e-code-review/reference/loop.md +230 -14
- package/skills/e-code-review/reference/low.md +33 -15
- package/skills/e-code-review/reference/medium.md +55 -21
- package/skills/e-code-review/reference/runner-selection.md +40 -0
- package/skills/e-code-review/reference/xhigh.md +30 -12
- package/skills/e-code-review/scripts/e_code_review_scripts_constants/__init__.py +1 -0
- package/skills/e-code-review/scripts/e_code_review_scripts_constants/grok_code_review_constants.py +55 -0
- package/skills/e-code-review/scripts/grok_code_review.py +221 -0
- package/skills/e-code-review/scripts/test_grok_code_review.py +212 -0
- package/skills/fresh-branch/CLAUDE.md +5 -5
- package/skills/fresh-branch/SKILL.md +14 -6
- package/skills/fresh-branch/scripts/create_fresh_branch.py +122 -39
- package/skills/fresh-branch/scripts/fresh_branch_scripts_constants/fresh_branch_cli_constants.py +10 -3
- package/skills/fresh-branch/scripts/test_create_fresh_branch.py +251 -0
- package/skills/grok-spawn/SKILL.md +10 -0
- package/skills/orchestrator/SKILL.md +9 -1
- package/skills/orchestrator-refresh/SKILL.md +5 -1
- package/skills/task-build/reference/tool-routing.md +3 -0
- package/skills/team-advisor/SKILL.md +23 -41
- package/system-prompts/software-engineer.xml +6 -3
- package/skills/test_markdown_link_integrity.py +0 -107
|
@@ -2,60 +2,42 @@
|
|
|
2
2
|
name: team-advisor
|
|
3
3
|
description: >-
|
|
4
4
|
Spawn one warm session-advisor at the strongest reachable tier and consult
|
|
5
|
-
it before
|
|
5
|
+
it before substantive work, completion, commits, or when stuck. Triggers:
|
|
6
6
|
'team-advisor', 'team advisor', 'second opinion', 'advisor', 'consult',
|
|
7
7
|
'verify', 'validate', 'commit', 'push'.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Team Advisor
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
One warm advisor at the strongest tier this session can reach. This session is the sole consumer.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Refs
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
**
|
|
19
|
-
[
|
|
20
|
-
|
|
21
|
-
walk until the host is known.
|
|
22
|
-
|
|
23
|
-
This session is the shared advisor's sole consumer, so its model floor is
|
|
24
|
-
simply this session's own tier — no routing table to take a max against.
|
|
16
|
+
| Doc | Holds |
|
|
17
|
+
|---|---|
|
|
18
|
+
| [`docs/references/advisor-tool.md`](../../docs/references/advisor-tool.md) | **Consult cadence and weight** — when to call, hard rule before first write, how to treat advice. Read this for every consult. |
|
|
19
|
+
| [`~/.claude/_shared/advisor/advisor-protocol.md`](../../_shared/advisor/advisor-protocol.md) | **Bind and lifecycle** — host detect, model floor, warm-up or CLI bind, charter, drift re-bind, CLI fallback, executor paste blocks. |
|
|
20
|
+
| [`agents/session-advisor.md`](../../agents/session-advisor.md) | **Reply contract** — ENDORSE / CORRECTION / PLAN / STOP; SendMessage only. |
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
warm-up spawn and charter, the consult format and cadence, drift-respawn, and
|
|
28
|
-
the CLI fallback — using `team-advisor-agent` as the name and this session as
|
|
29
|
-
the only consumer (skip the "who you are and your assignment" opener in each
|
|
30
|
-
consult; a single-consumer session doesn't need it).
|
|
22
|
+
## Bind
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
reply, fail closed and report to the user — do **not** answer ENDORSE /
|
|
39
|
-
CORRECTION / PLAN / STOP as this third-party session.
|
|
24
|
+
1. Detect the host profile first (protocol **Host profiles**), then walk the model floor.
|
|
25
|
+
2. Floor: this session's own tier on Claude; Opus floor with Fable first on a third-party host.
|
|
26
|
+
3. Name: `team-advisor-agent` on Claude (Agent spawn of `session-advisor`); one CLI `session_id` on a third-party host via the protocol Claude-chain.
|
|
27
|
+
4. A Fable-tier spawn or re-spawn carries the exact token `FABLE-SPAWN-AUTHORIZED` in its prompt (protocol warm-up; `fable_spawn_gate` requires it).
|
|
28
|
+
5. Skip the multi-consumer "who you are" opener — sole consumer.
|
|
29
|
+
6. When the bind or reply path fails, fail closed and report to the user. On a third-party host, only the bound Claude advisor issues ENDORSE / CORRECTION / PLAN / STOP.
|
|
40
30
|
|
|
41
|
-
|
|
31
|
+
Full walk, charter, consult message shape, and drift re-bind live in the protocol.
|
|
42
32
|
|
|
43
|
-
|
|
44
|
-
`session_id` on a third-party host), owned by this session for its whole lifecycle
|
|
45
|
-
(spawn or CLI bind, drift re-bind, shutdown) — see
|
|
46
|
-
[`_shared/advisor/advisor-protocol.md`](../../_shared/advisor/advisor-protocol.md).
|
|
47
|
-
- Never bind the advisor, or its CLI path, at a tier below the protocol floor
|
|
48
|
-
for this host (Claude: this session's own tier; a third-party host: Opus floor
|
|
49
|
-
with Fable first).
|
|
50
|
-
- The advisor only answers. It never edits a file, never runs a build or
|
|
51
|
-
test, and never posts anything on the session's behalf.
|
|
33
|
+
## Consult
|
|
52
34
|
|
|
53
|
-
|
|
35
|
+
Follow **When to call**, **Hard rule**, and **How to treat advice** in `advisor-tool.md`.
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
|---|---|
|
|
57
|
-
| `SKILL.md` | Pointer to the shared advisor protocol; this session's consumer-specific wiring and constraints. |
|
|
37
|
+
Each brief: delta since last consult, live decision or blocker, paths or excerpts needed. Protocol owns the full consult format.
|
|
58
38
|
|
|
59
|
-
##
|
|
39
|
+
## Constraints
|
|
60
40
|
|
|
61
|
-
-
|
|
41
|
+
- One bind per session; this session owns spawn or CLI bind, drift re-bind, and shutdown.
|
|
42
|
+
- Bind at or above the protocol floor for this host.
|
|
43
|
+
- The advisor only answers (messaging); the session runs tools and posts.
|
|
@@ -90,8 +90,10 @@
|
|
|
90
90
|
</problem_solving>
|
|
91
91
|
|
|
92
92
|
<code_quality>
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
Canonical code-quality policy is repository-root AGENTS.md (installed review contract).
|
|
94
|
+
~/.claude/docs/CODE_RULES.md is the compact projection of AGENTS.md for generation load —
|
|
95
|
+
when the two disagree, AGENTS.md wins. The checklist below is a short reminder, not a
|
|
96
|
+
second canonical source.
|
|
95
97
|
|
|
96
98
|
Naming — full words only:
|
|
97
99
|
- Use "context" over "ctx", "configuration" over "cfg", "message" over "msg",
|
|
@@ -109,7 +111,8 @@
|
|
|
109
111
|
Types — complete coverage required:
|
|
110
112
|
- Every parameter and return value carries an explicit type hint
|
|
111
113
|
- Replace Any with the most specific type available
|
|
112
|
-
-
|
|
114
|
+
- Prefer a real type over `# type: ignore`; when an ignore is required, add a second
|
|
115
|
+
trailing `#` justification of at least five characters (AGENTS Types)
|
|
113
116
|
|
|
114
117
|
Configuration — one source of truth:
|
|
115
118
|
- Every constant lives in config/ only
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"""Link-integrity check for the skills tree and shared protocol docs.
|
|
2
|
-
|
|
3
|
-
Walks every markdown file under ``skills/``, ``_shared/pr-loop/``, and
|
|
4
|
-
``_shared/advisor/`` and resolves each relative markdown link target against
|
|
5
|
-
the linking file's directory. A link whose target file or directory does not
|
|
6
|
-
exist on disk is reported with its source file and line number, and the test
|
|
7
|
-
fails.
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
from __future__ import annotations
|
|
11
|
-
|
|
12
|
-
import re
|
|
13
|
-
from pathlib import Path
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
SKILLS_ROOT = Path(__file__).parent
|
|
17
|
-
SHARED_PR_LOOP_ROOT = SKILLS_ROOT.parent / "_shared" / "pr-loop"
|
|
18
|
-
SHARED_ADVISOR_ROOT = SKILLS_ROOT.parent / "_shared" / "advisor"
|
|
19
|
-
|
|
20
|
-
MARKDOWN_LINK_PATTERN = re.compile(r"\]\(([^)\s]+)\)")
|
|
21
|
-
FENCE_MARKER = "```"
|
|
22
|
-
|
|
23
|
-
SKIPPED_TARGET_PREFIXES = (
|
|
24
|
-
"http://",
|
|
25
|
-
"https://",
|
|
26
|
-
"mailto:",
|
|
27
|
-
"#",
|
|
28
|
-
"/",
|
|
29
|
-
"$",
|
|
30
|
-
"~",
|
|
31
|
-
"<",
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def _iter_markdown_files() -> list[Path]:
|
|
36
|
-
"""List every markdown file the integrity check covers.
|
|
37
|
-
|
|
38
|
-
Returns:
|
|
39
|
-
All ``.md`` files under the skills tree, the shared pr-loop tree, and
|
|
40
|
-
the shared advisor tree.
|
|
41
|
-
"""
|
|
42
|
-
all_markdown_files = sorted(SKILLS_ROOT.rglob("*.md"))
|
|
43
|
-
all_markdown_files.extend(sorted(SHARED_PR_LOOP_ROOT.rglob("*.md")))
|
|
44
|
-
all_markdown_files.extend(sorted(SHARED_ADVISOR_ROOT.rglob("*.md")))
|
|
45
|
-
return all_markdown_files
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def _is_checkable_target(link_target: str) -> bool:
|
|
49
|
-
"""Decide whether a markdown link target names a local relative path.
|
|
50
|
-
|
|
51
|
-
Args:
|
|
52
|
-
link_target: The raw text between ``](`` and ``)`` in a markdown link.
|
|
53
|
-
|
|
54
|
-
Returns:
|
|
55
|
-
True when the target is a relative filesystem path this check can
|
|
56
|
-
resolve; False for URLs, anchors, absolute paths, environment-variable
|
|
57
|
-
paths, home-relative paths, and angle-bracket placeholders.
|
|
58
|
-
"""
|
|
59
|
-
if link_target.startswith(SKIPPED_TARGET_PREFIXES):
|
|
60
|
-
return False
|
|
61
|
-
if "\\" in link_target and link_target.count(":") > 0:
|
|
62
|
-
return False
|
|
63
|
-
return True
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
def _collect_broken_links(markdown_path: Path) -> list[str]:
|
|
67
|
-
"""Resolve every relative link in one markdown file.
|
|
68
|
-
|
|
69
|
-
Fenced code blocks are skipped, and a ``#fragment`` suffix is stripped
|
|
70
|
-
before resolution.
|
|
71
|
-
|
|
72
|
-
Args:
|
|
73
|
-
markdown_path: The markdown file whose links are resolved.
|
|
74
|
-
|
|
75
|
-
Returns:
|
|
76
|
-
One ``file:line -> target`` description per unresolvable link.
|
|
77
|
-
"""
|
|
78
|
-
all_broken_links: list[str] = []
|
|
79
|
-
is_inside_fence = False
|
|
80
|
-
for line_number, each_line in enumerate(
|
|
81
|
-
markdown_path.read_text(encoding="utf-8").splitlines(), start=1
|
|
82
|
-
):
|
|
83
|
-
if each_line.lstrip().startswith(FENCE_MARKER):
|
|
84
|
-
is_inside_fence = not is_inside_fence
|
|
85
|
-
continue
|
|
86
|
-
if is_inside_fence:
|
|
87
|
-
continue
|
|
88
|
-
for each_match in MARKDOWN_LINK_PATTERN.finditer(each_line):
|
|
89
|
-
link_target = each_match.group(1).split("#", 1)[0]
|
|
90
|
-
if not link_target or not _is_checkable_target(link_target):
|
|
91
|
-
continue
|
|
92
|
-
resolved_target = (markdown_path.parent / link_target).resolve()
|
|
93
|
-
if not resolved_target.exists():
|
|
94
|
-
all_broken_links.append(
|
|
95
|
-
f"{markdown_path}:{line_number} -> {each_match.group(1)}"
|
|
96
|
-
)
|
|
97
|
-
return all_broken_links
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
def test_every_relative_markdown_link_resolves() -> None:
|
|
101
|
-
all_broken_links: list[str] = []
|
|
102
|
-
for each_markdown_path in _iter_markdown_files():
|
|
103
|
-
all_broken_links.extend(_collect_broken_links(each_markdown_path))
|
|
104
|
-
broken_link_report = "\n".join(all_broken_links)
|
|
105
|
-
assert not all_broken_links, (
|
|
106
|
-
f"Unresolvable relative markdown links:\n{broken_link_report}"
|
|
107
|
-
)
|