Skip to content

Commit fdf4049

Browse files
luiseimanclaude
andcommitted
chore: capture 7 practices from /forge watch (Claude Code v2.1.120-128)
Inbox additions for next /forge update cycle: HIGH: - posttooluse-updated-output-all-tools (v2.1.121) — PostToolUse hooks can now rewrite output for ALL tools, not just MCP. Significant capability shift. MEDIUM: - setup-hook-event — domain/hook-architecture.md says 31 events; should be 32 (Setup fires for --init-only/--maintenance with init/maintenance matchers) - mcp-alwaysload-option (v2.1.121) — alwaysLoad: true per MCP server bypasses tool-search deferral - claude-ultrareview-cli (v2.1.120) — non-interactive code review CLI for CI - claude-effort-skill-placeholder (v2.1.120) — ${CLAUDE_EFFORT} in skill content enables effort-aware skill design - settings-fields-missing — availableModels, effortLevel, defaultShell, viewMode, pluginTrustMessage, enableWeakerNestedSandbox; plus managed-only enterprise fields (allowManagedPermissionRulesOnly, allowManagedDomainsOnly, allowManagedReadPathsOnly, strictKnownMarketplaces, blockedMarketplaces) LOW (batched): - misc-v2-1-120-128 — --plugin-dir .zip, claude plugin prune, AI_AGENT subprocess env, ANTHROPIC_BEDROCK_SERVICE_TIER, --channels API-key auth needs channelsEnabled, workspace reserved MCP name Inbox: 7 pending. Run /forge update next cycle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c744ad8 commit fdf4049

7 files changed

Lines changed: 264 additions & 0 deletions
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
id: claude-effort-skill-placeholder
3+
source: watch:code.claude.com/docs/en/changelog
4+
status: inbox
5+
captured: 2026-05-05
6+
tags: [skills, effort, design-pattern, medium-priority, v2.1.120]
7+
tested_in: []
8+
incorporated_in: []
9+
---
10+
11+
# `${CLAUDE_EFFORT}` skill placeholder (v2.1.120) — effort-aware skill content
12+
13+
## Observation
14+
15+
v2.1.120 added support for `${CLAUDE_EFFORT}` in skill content (markdown body, not just frontmatter). Resolves at runtime to the active effort tier (`low | medium | high | xhigh | max`).
16+
17+
## Why it matters for dotforge
18+
19+
Several dotforge skills change behavior based on depth needed:
20+
- `skills/audit-project` could parameterize check depth (low: file presence; high: content + cross-checks)
21+
- `skills/benchmark` could pin its A/B comparisons to current effort
22+
- `skills/session-insights` could adjust how deep it walks history
23+
24+
Currently these skills don't reference effort at all. Adding `${CLAUDE_EFFORT}` lets the user say "give me a quick audit" (effort low) vs "thorough one" (effort high) without forking the skill.
25+
26+
## Required update
27+
28+
1. `domain/rule-effectiveness.md` — frontmatter table already lists `effort`; add to the body the `${CLAUDE_EFFORT}` runtime placeholder concept (skill content, not just frontmatter).
29+
2. Pilot adoption in one skill (likely `audit-project` or `session-insights`) before retrofitting all.
30+
31+
## Affected files
32+
33+
- `.claude/rules/domain/rule-effectiveness.md`
34+
- (pilot) `skills/audit-project/SKILL.md` or `skills/session-insights/SKILL.md`
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
id: claude-ultrareview-cli
3+
source: watch:code.claude.com/docs/en/cli-reference
4+
status: inbox
5+
captured: 2026-05-05
6+
tags: [cli, ci, code-review, medium-priority, v2.1.120]
7+
tested_in: []
8+
incorporated_in: []
9+
---
10+
11+
# `claude ultrareview [target]` non-interactive CLI subcommand (v2.1.120)
12+
13+
## Observation
14+
15+
v2.1.120 added a non-interactive variant of `/ultrareview`:
16+
17+
```bash
18+
claude ultrareview 1234 # PR number → review with multi-agent analysis
19+
claude ultrareview 1234 --json # raw payload
20+
claude ultrareview --timeout 60 ... # override 30-min default
21+
# exit 0 = clean, 1 = findings/error
22+
```
23+
24+
## Why it matters for dotforge
25+
26+
CI integration becomes trivial — pre-merge review gates without needing an interactive session.
27+
28+
Currently `docs/usage-guide.md` doesn't cover automated review at all. Dotforge ships a `code-reviewer` agent for interactive use; pairing with `claude ultrareview` in CI is the natural extension.
29+
30+
## Required update
31+
32+
1. `docs/usage-guide.md` — new subsection in CI/automation context describing the pattern: invoke `claude ultrareview <PR>` in GitHub Actions, capture `--json` output, post as PR comment.
33+
2. Optional: example workflow file in `docs/examples/` (would need a new dir).
34+
35+
## Affected files
36+
37+
- `docs/usage-guide.md`
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
id: mcp-alwaysload-option
3+
source: watch:code.claude.com/docs/en/changelog
4+
status: inbox
5+
captured: 2026-05-05
6+
tags: [mcp, permissions, performance, medium-priority, v2.1.121]
7+
tested_in: []
8+
incorporated_in: []
9+
---
10+
11+
# `alwaysLoad: true` MCP server option (v2.1.121) — bypass tool-search deferral
12+
13+
## Observation
14+
15+
v2.1.121 added `alwaysLoad: true` to MCP server config. When set, all tools from that server skip the tool-search deferral mechanism and are always available in the prompt.
16+
17+
Tradeoff: faster access, more context spent. The default deferral was added precisely because MCP servers can ship dozens of tools that bloat the prompt.
18+
19+
## Why it matters for dotforge
20+
21+
Projects that use specific MCP servers heavily (Atlassian for jira-nbch, Supabase for InviSight-iOS) can opt-in to skip the search overhead when those tools are needed every session.
22+
23+
`domain/permission-model.md` covers `enableAllProjectMcpServers`, `allowedMcpServers`, etc. but does NOT document `alwaysLoad`. Worth a sentence.
24+
25+
## Required update
26+
27+
`domain/permission-model.md` MCP section — add:
28+
```
29+
- `alwaysLoad: true` (per-server, v2.1.121+): all tools from that server skip
30+
tool-search deferral and stay available in the prompt. Use only when MCP
31+
tools are needed in every turn — costs context for fewer tool-search
32+
invocations.
33+
```
34+
35+
## Affected files
36+
37+
- `.claude/rules/domain/permission-model.md`
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
id: misc-v2-1-120-128
3+
source: watch:code.claude.com/docs/en/changelog
4+
status: inbox
5+
captured: 2026-05-05
6+
tags: [misc, low-priority, v2.1.120, v2.1.122, v2.1.128]
7+
tested_in: []
8+
incorporated_in: []
9+
---
10+
11+
# Misc v2.1.120-128 deltas (batched, low priority)
12+
13+
Single capture for low-impact items. Each gets one line in `docs/best-practices.md` or a relevant existing doc — no new domain rule warranted.
14+
15+
## Items
16+
17+
1. **`--plugin-dir` accepts `.zip` archives** (v2.1.128) — alternative dotforge plugin distribution path. Could ship a release `.zip` from CI alongside git clone instructions.
18+
19+
2. **`claude plugin prune`** + **`plugin uninstall --prune`** (v2.1.121) — orphan dependency cleanup. Mention in dotforge install/uninstall docs.
20+
21+
3. **`AI_AGENT` env var auto-set for subprocesses** (v2.1.120) — useful for observability when dotforge hooks invoke `gh`, `kubectl`, etc. No code change; doc note that subprocess attribution works out of the box.
22+
23+
4. **`ANTHROPIC_BEDROCK_SERVICE_TIER` env var** (v2.1.122) — Bedrock tier selection (default | flex | priority). Only relevant for Bedrock users; no current dotforge user.
24+
25+
5. **`--channels` works with API-key auth** (v2.1.128) — requires `channelsEnabled: true` in settings. Update `integrations/channels/README.md` to note this.
26+
27+
6. **`workspace` reserved as MCP server name** (v2.1.128) — verified no dotforge stack uses this name. Doc note for users.
28+
29+
7. **`claude install [version]`** (existing but worth doc note) — pin specific CC versions for reproducibility.
30+
31+
## Affected files
32+
33+
- `docs/best-practices.md` (collect minor tips)
34+
- `integrations/channels/README.md` (channelsEnabled note)
35+
- `docs/usage-guide.md` (install section — `.zip` distribution, `plugin prune`)
36+
37+
## Decision
38+
39+
Pendiente — incorporar como un solo update menor a docs cuando haya tema relacionado, no promover a práctica activa individualmente.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
id: posttooluse-updated-output-all-tools
3+
source: watch:code.claude.com/docs/en/changelog
4+
status: inbox
5+
captured: 2026-05-05
6+
tags: [hooks, post-tool-use, capability, high-priority, v2.1.121]
7+
tested_in: []
8+
incorporated_in: []
9+
---
10+
11+
# `PostToolUse.hookSpecificOutput.updatedToolOutput` now works for ALL tools (v2.1.121)
12+
13+
## Observation
14+
15+
v2.1.121 changelog: `PostToolUse` hooks can replace tool output for any tool — Bash, Edit, Write, Read, etc. — via `hookSpecificOutput.updatedToolOutput`. Previously this field only worked for MCP tools (named `updatedMCPToolOutput`).
16+
17+
## Why it matters for dotforge
18+
19+
`domain/hook-events.md` documents `updatedMCPToolOutput` for MCP tools only. The expanded capability changes hook design tradeoffs:
20+
21+
- Lint/format hooks could rewrite Bash output (e.g. strip trailing whitespace from `cat` results) before the model reads it
22+
- `block-destructive.sh` could be paired with a PostToolUse handler that redacts sensitive output from `git diff` or `env` calls
23+
- Test runners could compress verbose output to a one-line summary before consumption
24+
25+
But also new risks:
26+
- Output rewriting can hide errors the model needs to see (failing tests pass silently if output is overwritten)
27+
- Audit trail confusion: what the model sees ≠ what the tool actually returned
28+
29+
## Required update
30+
31+
1. `domain/hook-events.md` — replace `updatedMCPToolOutput` notes with `updatedToolOutput` (general, since v2.1.121); preserve historical note that pre-v2.1.121 it was MCP-only.
32+
2. `domain/hook-architecture.md` — section on PostToolUse should call out the design tradeoff.
33+
3. Consider whether dotforge ships any hook that should use this (lint-on-save? session-report? probably not — both are fine emitting alongside, not replacing).
34+
35+
## Affected files
36+
37+
- `.claude/rules/domain/hook-events.md`
38+
- `.claude/rules/domain/hook-architecture.md`
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
id: settings-fields-missing
3+
source: watch:code.claude.com/docs/en/settings
4+
status: inbox
5+
captured: 2026-05-05
6+
tags: [settings, drift, enterprise, medium-priority]
7+
tested_in: []
8+
incorporated_in: []
9+
---
10+
11+
# settings.json fields missing from domain rules
12+
13+
## Observation
14+
15+
A walk through the official settings.json schema surfaces fields not documented anywhere in `.claude/rules/domain/`:
16+
17+
**Generally relevant**:
18+
- `availableModels` — restrict selectable models (subset of all)
19+
- `effortLevel` — persist effort across sessions (vs session-only `--effort` flag)
20+
- `defaultShell` — bash | powershell at the settings level (cross-platform)
21+
- `viewMode` — default | verbose | focus (transcript view)
22+
- `pluginTrustMessage` — custom warning shown on plugin trust prompts
23+
- `enableWeakerNestedSandbox` — Docker-friendly relaxed sandbox
24+
25+
**Managed-only (enterprise)**:
26+
- `allowManagedPermissionRulesOnly` — locks projects to managed permission rules
27+
- `network.allowManagedDomainsOnly` — managed-domain-only outbound
28+
- `filesystem.allowManagedReadPathsOnly` — managed-read-only filesystem
29+
- `strictKnownMarketplaces` — managed marketplace allowlist (exact match, supports github/git/url/npm/file/directory/hostPattern)
30+
- `blockedMarketplaces` — managed denylist
31+
32+
## Why it matters
33+
34+
- `availableModels` / `effortLevel`: relevant for any team standardizing on a model/effort baseline (e.g., "this project uses Sonnet at high, no Opus").
35+
- Managed-only fields: critical for any enterprise that wants to deploy dotforge across an org with controlled marketplace and permission policy. Currently `domain/permission-model.md` covers `allowedMcpServers`/`deniedMcpServers` but stops there.
36+
37+
## Required update
38+
39+
1. `domain/rule-effectiveness.md` or new `domain/settings-fields.md` — document the generally-relevant fields with one-line each.
40+
2. `domain/permission-model.md` Enterprise managed settings section — add the five managed-only fields with use case.
41+
42+
## Affected files
43+
44+
- `.claude/rules/domain/rule-effectiveness.md` (or new file)
45+
- `.claude/rules/domain/permission-model.md`
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
id: setup-hook-event
3+
source: watch:code.claude.com/docs/en/hooks
4+
status: inbox
5+
captured: 2026-05-05
6+
tags: [hooks, lifecycle, drift, medium-priority]
7+
tested_in: []
8+
incorporated_in: []
9+
---
10+
11+
# `Setup` hook event missing from domain rules — should be 32 events not 31
12+
13+
## Observation
14+
15+
Per current hooks doc, the lifecycle event roster includes `Setup` — fires for `--init-only` and `--maintenance` runs with matchers `init` and `maintenance` respectively.
16+
17+
`domain/hook-architecture.md` opens with: "Events (31 total, verified v2.1.114 — code.claude.com/docs/en/hooks)" and groups session-level events as `SessionStart, SessionEnd, InstructionsLoaded`. **`Setup` is not listed.**
18+
19+
## Why it matters
20+
21+
- CI/automation flows that use `claude --init-only` or `--maintenance` rely on `Setup` hooks to provision env vars, validate prerequisites, or rotate creds before the session starts.
22+
- Contributors writing init-time hooks may put them on `SessionStart` and miss the `Setup` lifecycle entirely (or the inverse — Setup hooks they expect to run on every session do not).
23+
24+
## Required update
25+
26+
1. `domain/hook-architecture.md` — add `Setup` to session-level events; bump verified tag and total count to 32.
27+
2. `domain/hook-events.md` — document `Setup` payload + matchers `init|maintenance`; note non-blockable.
28+
3. CLI flag refs in `domain/parallel-sessions.md` — cross-reference `--init-only` / `--maintenance` to the `Setup` hook.
29+
30+
## Affected files
31+
32+
- `.claude/rules/domain/hook-architecture.md`
33+
- `.claude/rules/domain/hook-events.md`
34+
- `.claude/rules/domain/parallel-sessions.md`

0 commit comments

Comments
 (0)