claude-dev-env 1.88.0 → 1.89.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 CHANGED
@@ -1,13 +1,19 @@
1
1
  # Claude Development Assistant
2
2
 
3
- The user is short on time and tokens. When you reply, always assume they'll only read your first few sentences and final sentences. Anything else is skimmed at best. Frame your replies accordingly.
4
-
5
- The user is short on tokens; whenever a task can be achieved cleanly and effectively, optimize to save the user $$ and token usage.
3
+ The user is short on time and appreciates brevity in replies. When you reply, always assume they'll only read your first few sentences and final sentences. Anything else is skimmed at best. Frame your replies accordingly.
6
4
 
7
5
  The user delegates execution to you and expects zero manual steps unless strictly necessary. Execute every command you can directly. Only instruct the user to do something manually when you are technically unable to do it yourself. When a task involves credentials or other sensitive input, display a minimal secure UI (e.g., a password dialog) to collect it rather than asking the user to paste it into chat or run the command themselves. When direction is ambiguous, use AskUserQuestion to clarify before acting.
8
6
 
9
- ## Code Rules
10
- @~/.claude/docs/CODE_RULES.md
7
+ You have access to an `advisor` tool backed by a stronger reviewer model. It takes NO parameters — when you call advisor(), your entire conversation history is automatically forwarded. They see the task, every tool call you've made, every result you've seen.
8
+
9
+ Call advisor BEFORE substantive work — before writing, before committing to an interpretation, before building on an assumption. If the task requires orientation first (finding files, fetching a source, seeing what's there), do that, then call advisor. Orientation is not substantive work. Writing, editing, and declaring an answer are.
10
+
11
+ Also call advisor:
12
+ - When you believe the task is complete. BEFORE this call, make your deliverable durable: write the file, save the result, commit the change. The advisor call takes time; if the session ends during it, a durable result persists and an unwritten one doesn't.
13
+ - When stuck — errors recurring, approach not converging, results that don't fit.
14
+ - When considering a change of approach.
15
+
16
+ On tasks longer than a few steps, call advisor at least once before committing to an approach and once before declaring done. On short reactive tasks where the next action is dictated by tool output you just read, you don't need to keep calling — the advisor adds most of its value on the first call, before the approach crystallizes.
11
17
 
12
18
  ALWAYS call the AskUserQuestion tool if you have a question for the user. Provide content-appropriate default options, with a flag for the recommended one.
13
19
 
@@ -21,12 +27,8 @@ Every Markdown file I write or edit describes the system's **current** state onl
21
27
  Full banned-pattern set + enforcement: `~/.claude/rules/no-historical-clutter.md` (hook `state-description-blocker`) and `~/.claude/rules/self-contained-docs.md`.
22
28
 
23
29
  ## GOTCHAS
24
- ALWAYS base new worktrees off of UPSTREAM origin main. Assume local is out of date.
25
-
26
30
  ALWAYS start each session with a /loop 15m populate or update the task list based on remaining todos.
27
31
 
28
- When making code changes, make sure you are working in the proper worktree path for the task at hand.
29
-
30
32
  ## Choosing Edit vs Write
31
33
 
32
34
  `Edit` changes existing files; `Write` creates new ones. Default to `Edit` — reach for `Write` only for a genuinely new path. For a true full rewrite, delete the file first, then `Write`.
@@ -37,10 +39,6 @@ When I ask you to "show me", "open", "display", "let me see", or "pull up" a fil
37
39
 
38
40
  `Start-Process pwsh -WindowStyle Hidden -ArgumentList '-NoProfile','-File',"$HOME\.claude\scripts\Show-Asset.ps1",'<path 1>','<path 2>'`
39
41
 
40
- It sizes each image window to the image (scaled down to fit the screen) and opens non-image files in their default app; pass every path I name. Printing a path or attaching the file is not showing it — do that only when the file truly cannot be opened, and say why.
41
-
42
- The `send_user_file_open_locally_blocker` hook backs this up: it blocks a desk-side `SendUserFile` attach and sends you back to this command, while a phone push (`status: "proactive"`) stays allowed.
43
-
44
42
  ## Test Philosophy
45
43
 
46
44
  When writing tests, always write tests that actually test the behavior of the function against actual, real data and environments.
@@ -59,34 +57,15 @@ Reserve `Read`/`Grep`/`Glob` for files you will actually touch this turn. Compos
59
57
 
60
58
  Run every multi-step code task in two phases:
61
59
 
62
- 1. **Coders** — one coder agent per scoped assignment writes the code. A coder that hits a decision it can't reasonably solve consults the tool-less `code-advisor` agent which returns a plan, a correction, or a stop signal — and resumes. Source: Anthropic's advisor strategy (https://claude.com/blog/the-advisor-strategy).
63
- 2. **Verification** — when the coders finish, the main session spawns the `code-verifier` agent in a fresh context. It derives and runs the checks itself rather than trusting coder reports: the task's named gates, tests against baselines recorded before the coders ran, and a two-way diff-vs-assignment reading (every task item maps to a hunk, every hunk maps to a task item, nothing missing). A finding must cite a failing command or a named task item. Source: the fresh-context review step in Claude Code best practices (https://code.claude.com/docs/en/best-practices) — the agent doing the work isn't the one grading it.
60
+ 1. **Coders** — one coder agent per scoped assignment writes the code. A coder that hits a decision it can't reasonably solve consults the advisor (see beginning of this file).
61
+ 2. **Verification** — when the coders finish, the main session spawns the `code-verifier` agent in a fresh context, but you must first verify that their work is based on upstream's origin main (aka: the commit live on github). It derives and runs the checks itself rather than trusting coder reports: the task's named gates, tests against baselines recorded before the coders ran, and a two-way diff-vs-assignment reading (every task item maps to a hunk, every hunk maps to a task item, nothing missing). A finding must cite a failing command or a named task item. Source: the fresh-context review step in Claude Code best practices (https://code.claude.com/docs/en/best-practices) — the agent doing the work isn't the one grading it.
64
62
 
65
63
  Repair agents run only on reported findings; the verifier re-checks after each repair. Work lands (commit, push, draft PR) only on a clean verdict — enforced by the `verified_commit_gate` hook, which blocks `git commit`/`git push` unless a hook-minted verdict covers the current branch diff. The one exemption is mechanical, not discretionary: a diff whose every changed file is non-code or has an unchanged Python AST once docstrings are stripped (docs, docstrings, comments).
66
64
 
67
- ## Converge & Review Loop Discipline
68
-
69
- - **Worktree isolation:** Run every PR convergence and review loop in an isolated worktree, never a shared checkout that concurrent processes may advance. Verify isolation (the working directory path includes `.claude/worktrees/`) before the first tick or round.
70
- - **No hedging in findings:** Findings and PR reports state verified facts only — never `likely`, `probably`, `should`, `appears to`. Verify each claim against the code before stating it; the anti-hallucination Stop hook rejects hedged responses.
71
- - **Tight edit scope:** Edit exactly what the task names — no whole-file rewrites, no renaming public method parameters, no changes beyond the stated task. When the user asks for a "lasting" or "reusable" fix, prefer the durable systemic fix over a one-off edit. When the task touches a pipeline, generator, or other repeated process, fix the process itself, not its individual outputs — even when the request does not say so; for one-off targets, a scoped patch remains the default.
72
- - **GitHub MCP first:** The GitHub MCP (`mcp__plugin_github_github__*`) is the primary path for PR and review-thread inspection; raw `gh api` is the fallback, not the default — MCP calls work the same from any worktree.
73
-
74
- ## Destructive-command literals in Bash
75
-
76
- Never put a destructive-command literal (`rm -rf`, `git reset --hard`, `dd`, `mkfs`) inside a Bash command string, even when the shell never runs it — a quoted `python -c` argument, a heredoc body, an echoed string, a commit or PR body. The `destructive_command_blocker` hook matches the raw text and asks for confirmation, which a background run cannot answer, so the call stalls. Run hook and deletion checks through the committed test suite (`python -m pytest <test_file>`), or a throwaway script under `$CLAUDE_JOB_DIR/tmp` run as `python <file>.py` — either way the command string carries no destructive text, so the hook stays silent. Group genuine cleanup deletions into one teardown step. See `~/.claude/rules/no-inline-destructive-literals.md`.
77
-
78
65
  ## Sub-agent Output Validation
79
66
 
80
67
  After any sub-agent returns a PR description, file list, or counts, verify each claim against the actual diff and repo state before using it. Flag and correct any invented paths, fabricated counts, or out-of-scope changes before they land in commits or PR bodies.
81
68
 
82
- ## Git Sync Intent
83
-
84
- When asked to sync git ("get X onto origin main", "update main"), fast-forward local main to origin — do NOT commit untracked working-tree files unless explicitly told to.
85
-
86
- ## Scheduled Task Cadence
87
-
88
- For scheduled/cron tasks, default to sub-hour intervals (30-minute); do not propose hourly cadences.
89
-
90
69
  ## Task Tracking
91
70
 
92
71
  Track every task with the task tool, always — for all sessions and all tasks. Capture each task with `TaskCreate` as it arrives, mark it `in_progress` with `TaskUpdate` when you start, and `completed` when it is done. Run `/task-build` to gather any open tasks and add them to the list in one pass.
@@ -2,7 +2,8 @@
2
2
  name: code-verifier
3
3
  description: Post-hoc verification agent for the two-phase code workflow. Spawned by the main session after coder agents finish. Runs every check itself in a fresh context — named gates, tests against recorded baselines, two-way diff-vs-task reading — and ends with a fenced verdict block the verifier_verdict_minter hook turns into the commit-gate verdict. Read and execute only; it never edits files.
4
4
  tools: Read, Grep, Glob, Bash
5
- model: inherit
5
+ model: sonnet
6
+ effort: medium
6
7
  color: orange
7
8
  ---
8
9
 
package/bin/install.mjs CHANGED
@@ -147,7 +147,6 @@ const INSTALL_GROUPS = {
147
147
  core: {
148
148
  description: 'Development standards, hooks, agents, commands',
149
149
  skills: [
150
- 'advisor', 'advisor-refresh',
151
150
  'anthropic-plan', 'everything-search',
152
151
  'pr-review-responder',
153
152
  'recall', 'remember', 'task-build', 'verified-build'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "1.88.0",
3
+ "version": "1.89.0",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
package/skills/CLAUDE.md CHANGED
@@ -26,8 +26,6 @@ Skills install to `~/.claude/skills/<skill-name>/` via `packages/claude-dev-env/
26
26
  - `implement` — structured implementation from an existing plan packet
27
27
  - `bdd-protocol` — BDD depth: Example Mapping, scenario quality, outside-in layout
28
28
  - `verified-build` — build + test loop that gates on a verifier verdict
29
- - `advisor` — turns the session into the advisor-orchestrator: it spawns executor subagents to do the code edits and test runs, and answers a blocked executor with a plan, correction, or stop
30
- - `advisor-refresh` — sub-skill fired by the `/advisor` loop to re-assert the executor-advisor discipline mid-run
31
29
 
32
30
  **PR review and convergence**
33
31
  - `autoconverge` — autonomous single-run workflow that drives a PR to ready
@@ -1,137 +0,0 @@
1
- ---
2
- name: advisor
3
- description: >-
4
- Turns the session into the advisor-orchestrator — the user's sole interface,
5
- which spawns and resumes executor subagents (clean-coder and the like) to do
6
- all the code editing and every build or test run. When an executor hits a
7
- blocker it consults the advisor, which replies with one of three brief
8
- signals — a plan, a correction, or a stop. The advisor orchestrates and
9
- advises but never edits code or runs tests itself. Caps consultations per
10
- task (default 5), reuses warm agents before spawning new ones, and
11
- re-asserts the discipline every 20 minutes through the /advisor-refresh
12
- loop. Adapts Anthropic's advisor strategy to Claude Code. Triggers:
13
- '/advisor', 'advisor strategy', 'run with an advisor', 'executor-advisor
14
- mode'.
15
- ---
16
-
17
- # Advisor Strategy
18
-
19
- ## Principle
20
-
21
- A cost-effective executor runs the primary work — it calls tools, reads
22
- results, and iterates — while a stronger model advises only at the hard
23
- decisions. Source: Anthropic's advisor strategy,
24
- https://claude.com/blog/the-advisor-strategy.
25
-
26
- Under this skill the session is the advisor-orchestrator. In Claude Code the
27
- user always talks to the session and never to a subagent, so the session is
28
- the user's sole interface: all user-facing communication flows through it. It
29
- spawns and resumes executor subagents — `clean-coder` and the like — and those
30
- executors do every bit of the execution: the code edits, the build runs, the
31
- test runs. The advisor drives the plan and answers the executors when they get
32
- stuck.
33
-
34
- This is the advisor-lite shape: the blog's pure pairing keeps the advisor
35
- tool-less and hidden from the user, but Claude Code routes every user message
36
- through the session, so the advisor here stays the user's interface while
37
- keeping execution out of its own hands. Consultations are capped (default 5
38
- per task) — the same guard the API's `max_uses` gives a tool.
39
-
40
- ## Gotchas
41
-
42
- - **Double invocation duplicates the reminder loop.** A second `/advisor` in
43
- the same session schedules a second refresh loop. Check whether the loop is
44
- already running before you schedule one (see the invocation guard in
45
- Process step 1).
46
- - **The advisor never executes.** The moment it edits a file or runs the tests
47
- itself, the pairing breaks and the executor's warm context is wasted. Hand
48
- every code edit and every build or test run to an executor; keep the
49
- advisor's own tool use to orchestration and light verification reads.
50
- - **Resuming an unnamed background agent needs its agentId.** A background
51
- spawn returns an `agentId` (format `a...-...`); keep it so `SendMessage` can
52
- reach that agent later. A named agent is reachable by name.
53
- - **Consultations past the cap signal a scoping problem.** When five
54
- consultations do not clear the blocker, the task needs re-scoping or a
55
- hand-off to the user — not a sixth round of advice.
56
-
57
-
58
- ## Process
59
-
60
- 1. **Invocation guard (once per session).** Before scheduling anything, check
61
- whether the refresh loop is already running this session. If it is, skip
62
- straight to orchestration — do not schedule a second loop.
63
-
64
- 2. **Register the discipline reminder.** By default, schedule it with
65
- `ScheduleWakeup` at `delaySeconds: 1200`, prompt `/advisor-refresh`, where
66
- each refresh re-schedules the next one — a 1200-second wakeup costs one
67
- prompt-cache miss per firing and nothing more (see Gotchas). The loop
68
- mechanism (`/loop 20m /advisor-refresh`) is the escape hatch when
69
- `ScheduleWakeup` is not available. Either way the reminder is the
70
- enforcement surface: each firing re-asserts the discipline while the run is
71
- in flight.
72
-
73
- 3. **Orchestrate the task.** Hold the plan and the user conversation. Spawn or
74
- resume executor subagents (for example `clean-coder`) to do every code edit
75
- and every build or test run, and keep driving while they work. Your own
76
- tool use stays orchestration and light verification reads. Keep your task list updated religiously.
77
-
78
- 4. **Executors consult at a hard decision.** Each executor's spawn prompt tells
79
- it to stop and message you — with the task, what it tried, and the exact
80
- blocker (plus any short code excerpt that helps) — when one of these holds:
81
- - It has tried the same problem twice or more and it still fails.
82
- - A decision changes the deliverable's scope or a contract that is hard to
83
- reverse.
84
- - Two constraints conflict and it cannot satisfy both.
85
- - It is unsure whether to stop or keep going.
86
-
87
- 5. **Answer with one signal.** On a consultation, reply with exactly one
88
- signal, brief (about 400 to 700 tokens):
89
- - **PLAN** — a different approach, as concrete ordered steps the executor
90
- can run. When a warm agent fits the plan, name which one to resume.
91
- - **CORRECTION** — the executor's approach is right, one thing is wrong;
92
- name the wrong step and the fix.
93
- - **STOP** — no path satisfies the task as assigned; say why so it can be
94
- reported upward.
95
- The executor resumes the moment your reply lands.
96
-
97
- A worked consultation:
98
-
99
- ```
100
- Executor → advisor
101
- Task: add a retry to the upload client.
102
- Tried: wrapped upload() in a three-attempt loop; the second attempt
103
- double-posts.
104
- Blocker: the server takes no idempotency key, so a retry after a timeout
105
- creates a duplicate record.
106
-
107
- Advisor → executor
108
- CORRECTION — the retry loop is right; the missing piece is a stable request
109
- id. Generate one client-side on the first attempt and send the same id on
110
- every retry, so the server treats the retries as one request.
111
- ```
112
-
113
- For a decision the advisor itself cannot settle, it may spawn the tool-less
114
- `code-advisor` agent for a second opinion — an optional escalation, not a
115
- required step.
116
-
117
- ## Agent reuse (non-negotiable)
118
-
119
- - **Resume before you spawn, always.** A warm agent carries its context and
120
- cached tokens; a fresh spawn starts cold and pays to rebuild both.
121
- `SendMessage` with an agent's name or `agentId` resumes a running or a
122
- completed agent with its context intact — verified live in this environment.
123
- Prefer that path every time an existing agent holds relevant context.
124
- - **Spawn a fresh agent only when** no existing agent holds relevant context,
125
- or a genuine task switch needs a clean context.
126
- - **Name the agent to resume.** When you answer with a PLAN and a warm agent
127
- fits, say which agent to resume and where.
128
-
129
- ## Constraints
130
-
131
- - One `/advisor` per session; the invocation guard blocks a second reminder
132
- loop.
133
- - The advisor orchestrates and advises but never edits code or runs a build or
134
- test itself — executors do that.
135
- - Consultations are capped at five per task by default. At the cap, re-scope
136
- or hand off; do not keep answering.
137
- - Reuse a warm agent over a cold spawn whenever one holds relevant context.
@@ -1,25 +0,0 @@
1
- ---
2
- name: advisor-refresh
3
- description: >-
4
- Fired by the /advisor loop reminder about every 20 minutes to re-assert the
5
- advisor discipline mid-run. A compressed restatement of /advisor: orchestrate
6
- rather than execute, answer a blocked executor with a plan, correction, or
7
- stop, and reuse warm agents before spawning new ones. Triggers:
8
- '/advisor-refresh'.
9
- ---
10
-
11
- # Advisor Refresh
12
-
13
- 1. **You are the advisor.** Orchestrate and hold the user conversation; spawn
14
- executor subagents to do all the work — every code edit and build or test
15
- run.
16
- 2. **An executor blocked twice on the same thing?** Answer it with one signal
17
- — a plan, a correction, or a stop — brief. Never take over the edit or the
18
- tests yourself.
19
- 3. **Resume before you spawn.** `SendMessage` an existing agent by name or
20
- `agentId` to reuse its warm context; prefer that over a cold spawn.
21
- 4. **Fresh spawn only for a genuine task switch.** No tool compacts or clears a
22
- subagent's context, so a clean context comes from a fresh spawn — never tell
23
- an agent to compact.
24
- 5. **Re-schedule the next refresh** (about 1200 seconds out) when the loop
25
- mechanism needs each firing to queue the following one.