Skip to content

Commit c744ad8

Browse files
luiseimanclaude
andcommitted
feat: v3.5.0 — sync from Claude Code v2.1.120→v2.1.128 + agent memory checklist
Six practices incorporated. Three security-monitoring entries created. New domain rule: - domain/plugin-distribution.md — covers ${CLAUDE_PLUGIN_DATA} persistent state (v2.1.126), CLAUDE_CODE_PLUGIN_SEED_DIR multi-dir layered overlays (base + corporate + personal), managed marketplace governance (strictKnownMarketplaces, blockedMarketplaces, allowManagedPermissionRulesOnly, pluginTrustMessage), reserved server names (workspace v2.1.128), lifecycle hygiene (claude plugin prune, --plugin-dir .zip) - dotforge metrics.yml/inbox migration to ${CLAUDE_PLUGIN_DATA} documented as candidate but explicitly out of scope this release Skill/docs/agent updates: - skills/reset-project/SKILL.md: new Step 5b suggesting `claude project purge` post-reset (v2.1.126+) to drop orphaned transcripts/manifests; verifies CLI availability before suggesting, never runs automatically - docs/usage-guide.md: new "Layered distribution (multi-seed)" subsection + PR review tip (/resume accepts PR URLs, v2.1.122+) - docs/security-checklist.md: new "--dangerously-skip-permissions tradeoffs (v2.1.121+)" subsection — flag now bypasses prompts for .claude/{skills, agents,commands} writes; explicit warning against pairing with unverified prompt sources (injection vector to template files) - agents/{architect,code-reviewer,implementer,security-auditor}.md: appended Memory persistence section with concrete checklist on when to write to agent-memory. Targets agent-memory-underused finding from /forge insights 2026-04-21 (≤2 entries per agent across 5 months) Inbox processing: - 6 accept → active/ incorporated_in ['3.5.0'] - 1 reject: tradingbot-session-changes (auto-stub) - inbox now empty metrics.yml: 4 monitoring (plugin-data-variable, claude-project-purge, skip-permissions-claude-paths, agent-memory-underused), 2 not-applicable. Verified against CC v2.1.128. Watch-upstream pass surfaced additional v2.1.120- 128 deltas (PostToolUse.updatedToolOutput for all tools, Setup hook event, alwaysLoad MCP, claude ultrareview, ${CLAUDE_EFFORT}, missing settings fields) captured separately for next cycle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 744a669 commit c744ad8

17 files changed

Lines changed: 394 additions & 3 deletions
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
globs: "**/.claude-plugin/**,**/plugin.json,**/install.sh,**/.mcp.json"
3+
description: "Plugin distribution: persistent state, seed dirs, marketplace policy, reserved names"
4+
domain: claude-code-engineering
5+
last_verified: 2026-05-05
6+
---
7+
8+
# Plugin Distribution
9+
10+
## Persistent state — `${CLAUDE_PLUGIN_DATA}` (v2.1.126+)
11+
12+
- Plugin-scoped directory for state that must survive plugin updates/reinstalls
13+
- Available in hooks, skills, commands as the env var `${CLAUDE_PLUGIN_DATA}`
14+
- Use for: accumulated metrics, last-processed IDs, capture inboxes, manifests of managed projects
15+
- NEVER store secrets here — sandbox env-scrub does NOT cover plugin data dirs
16+
- Distinct from `${CLAUDE_PLUGIN_ROOT}` (read-only plugin install dir)
17+
18+
For dotforge specifically: candidates to migrate are `practices/metrics.yml` (counters), `.forge/manifest.json` (registry), and post-session captures that currently land in `practices/inbox/` (which dirties git status). Migration is a multi-commit project — pilot one (e.g. `inbox/`) before others.
19+
20+
## Multi-seed distribution — `CLAUDE_CODE_PLUGIN_SEED_DIR`
21+
22+
- Accepts multiple directories separated by platform delimiter (`:` Unix, `;` Windows)
23+
- Layered overlay pattern: `seed1` (base) `:` `seed2` (corporate) `:` `seed3` (personal)
24+
- Use for: enterprise overlays on top of public template, personal preferences on top of team config
25+
- Later seeds override earlier ones for files with the same path
26+
27+
## Marketplace governance (managed settings)
28+
29+
- `strictKnownMarketplaces` — allowlist of marketplace sources (exact match, supports github/git/url/npm/file/directory/hostPattern)
30+
- `blockedMarketplaces` — denylist
31+
- `allowedChannelPlugins` — restricts which plugins can listen on `--channels`
32+
- `allowManagedPermissionRulesOnly` — locks projects to managed-only permission rules
33+
- `pluginTrustMessage` — custom warning shown on plugin trust prompts
34+
35+
## Reserved names
36+
37+
- `workspace` — reserved as MCP server name since v2.1.128. Plugins/projects using this name skipped with warning at startup. Audit `.mcp.json` and `mcp/` configs in dotforge stacks before declaring server names.
38+
39+
## Lifecycle hygiene
40+
41+
- `claude plugin prune` (v2.1.121+) — removes orphaned auto-installed dependencies
42+
- `plugin uninstall --prune` — cascades dependency cleanup
43+
- `--plugin-dir` accepts `.zip` archives (v2.1.128+) — alternative distribution path
44+
45+
## When to plugin vs `.claude/`
46+
47+
| Need | Use |
48+
|------|-----|
49+
| One-project customization, quick experiment | `.claude/` standalone |
50+
| Shared with team, versioned, namespaced skills | Plugin |
51+
| Enterprise governance (marketplace allowlist) | Plugin via managed settings |
52+
| State that must survive updates | Plugin + `${CLAUDE_PLUGIN_DATA}` |

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.1
1+
3.5.0

agents/architect.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,12 @@ Only record decisions with lasting impact. Skip trivial or one-off choices.
6363
- Never propose a technology switch without cost/effort analysis
6464
- Keep total output under 5K tokens — summarize, don't dump raw analysis
6565
- If the caller needs follow-up, they will use SendMessage — do not start a new context
66+
67+
## Memory persistence
68+
69+
Before returning, ask yourself: *Did I discover a non-obvious pattern, a recurring tradeoff in this codebase, or a constraint a future architect would benefit from knowing?* If yes, append a dated entry to `.claude/agent-memory/architect.md` with:
70+
- One-line title
71+
- Key recurring/false-positive findings (use `**Recurring:**` or `**False positive:**` prefix)
72+
- A short note on context (which subsystem, why it matters)
73+
74+
Skip persistence for: routine validations, single-use answers, work the caller already understood.

agents/code-reviewer.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,12 @@ Do NOT report:
8282
- Run `git diff` or `git diff --staged` to see actual changes when available
8383
- Keep total output under 5K tokens — summarize, don't dump raw diffs
8484
- If the caller needs follow-up, they will use SendMessage — do not start a new context
85+
86+
## Memory persistence
87+
88+
Before returning, ask yourself: *Did I find a recurring issue (same bug class twice), a false-positive pattern in my own heuristics, or an idiom this codebase uses that a future review should respect?* If yes, append a dated entry to `.claude/agent-memory/code-reviewer.md` with:
89+
- One-line title
90+
- Bullets prefixed with `**Recurring:**` or `**False positive:**` (matches existing entries in this project)
91+
- The why — one sentence on what makes it a pattern, not a one-off
92+
93+
Skip persistence for: clean reviews, project-specific style nits without broader implication.

agents/implementer.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,12 @@ Always conclude with:
7171
- Use project conventions (check CLAUDE.md for stack preferences)
7272
- Keep total output under 5K tokens — summarize changes, don't echo full files
7373
- If the caller needs follow-up, they will use SendMessage — do not start a new context
74+
75+
## Memory persistence
76+
77+
Before returning, ask yourself: *Did I hit a non-obvious build/test gotcha, an environment quirk, or a workaround that future implementers would re-discover?* If yes, append a dated entry to `.claude/agent-memory/implementer.md` with:
78+
- One-line title (the symptom)
79+
- Cause and fix in 2-3 lines
80+
- Optional: link to commit or file:line that documents the fix
81+
82+
Skip persistence for: standard implementation tasks where the spec was clear and execution routine.

agents/security-auditor.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,12 @@ For each pattern, know the safe alternative:
116116
- Max 20 findings — prioritize by actual exploitability, not theoretical risk
117117
- Keep total output under 5K tokens — summarize findings, don't dump raw grep output
118118
- If the caller needs follow-up, they will use SendMessage — do not start a new context
119+
120+
## Memory persistence
121+
122+
Before returning, ask yourself: *Did I find a recurring vulnerability class in this codebase, a false-positive my own heuristics flag often here, or a custom security idiom (e.g., a project-specific token rotation pattern) worth respecting?* If yes, append a dated entry to `.claude/agent-memory/security-auditor.md` with:
123+
- One-line title
124+
- Severity context (which vector, what blocks exploit)
125+
- Bullets prefixed with `**Recurring:**` or `**False positive:**`
126+
127+
Skip persistence for: clean audits, individual high-severity findings already filed in CLAUDE_ERRORS.md.

docs/changelog.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,35 @@
44
>
55
> Historial de versiones. Las entradas usan español/inglés mixto según la evolución del proyecto. Los términos técnicos son universales.
66
7+
## v3.5.0 (2026-05-05)
8+
9+
### Sync from Claude Code v2.1.120 → v2.1.128 + agent memory checklist
10+
11+
Six practices incorporated. Three security-relevant (`monitoring`), one auto-stub rejected.
12+
13+
#### New domain rule
14+
15+
- **`.claude/rules/domain/plugin-distribution.md`** — covers `${CLAUDE_PLUGIN_DATA}` (v2.1.126+ persistent state for plugins surviving updates), `CLAUDE_CODE_PLUGIN_SEED_DIR` multi-dir layered overlays (base + corporate + personal), managed marketplace governance (`strictKnownMarketplaces`, `blockedMarketplaces`, `allowManagedPermissionRulesOnly`, `pluginTrustMessage`), reserved server names (`workspace` since v2.1.128), and lifecycle hygiene (`claude plugin prune`, `--plugin-dir .zip`).
16+
- Migration of dotforge's `practices/metrics.yml` and `inbox/` to `${CLAUDE_PLUGIN_DATA}` is documented as a candidate but explicitly out of scope this release (multi-commit work).
17+
18+
#### Skill / docs / agent updates
19+
20+
- `skills/reset-project/SKILL.md` — new Step 5b suggesting `claude project purge $PWD` post-reset (v2.1.126+) to drop orphaned transcripts, task lists, and `~/.claude.json` entry. Verifies CLI availability before suggesting; never runs automatically.
21+
- `docs/usage-guide.md` — new "Layered distribution (multi-seed)" subsection covering `CLAUDE_CODE_PLUGIN_SEED_DIR` overlay pattern; new "PR review flow tip" noting `/resume` accepts pasted PR URLs (v2.1.122+, GitHub/Enterprise/GitLab/Bitbucket).
22+
- `docs/security-checklist.md` — new "`--dangerously-skip-permissions` tradeoffs (v2.1.121+)" subsection documenting that the flag now bypasses prompts for `.claude/skills,agents,commands` writes, with explicit warning against pairing with prompts that include unverified content (injection vector that can now write to template files unprompted).
23+
- `agents/{architect,code-reviewer,implementer,security-auditor}.md` — appended a "Memory persistence" section to each agent prompt with concrete checklist on when (and when not) to write to `.claude/agent-memory/<agent>.md`. Targets the `agent-memory-underused` finding from `/forge insights` 2026-04-21 (≤2 entries per agent across 5 months).
24+
25+
#### Practices
26+
27+
- 6 practices moved `inbox/ → active/`, frontmatter `incorporated_in: ['3.5.0']`.
28+
- 1 rejected (`tradingbot-session-changes` — auto-stub, summary-only).
29+
- Inbox: 0 pending.
30+
- `metrics.yml`: 4 new `monitoring` entries (plugin-data-variable, claude-project-purge, skip-permissions-claude-paths, agent-memory-underused), 2 `not-applicable`.
31+
32+
#### Verified against
33+
34+
- Claude Code v2.1.128 (latest as of 2026-05-04). Watch-upstream pass surfaced additional v2.1.120-128 deltas captured for next cycle (PostToolUse.updatedToolOutput for all tools, Setup hook event, alwaysLoad MCP option, claude ultrareview, ${CLAUDE_EFFORT} placeholder, missing settings fields).
35+
736
## v3.4.1 (2026-04-27)
837

938
### New rule — `stacks/trading/rules/backtesting-adr-gate.md`

docs/security-checklist.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ Claude Code supports 6 permission modes that control when operations require con
6868
- [ ] Document which permissions are stripped in auto-mode for team awareness
6969
- [ ] Test critical workflows with auto-mode enabled to verify they still work
7070

71+
### `--dangerously-skip-permissions` tradeoffs (v2.1.121+)
72+
73+
Since v2.1.121/126, this flag bypasses prompts for writes to `.claude/skills/`, `.claude/agents/`, `.claude/commands/`, `.claude/`, `.git/`, `.vscode/`, and shell config files. Catastrophic removals still prompt as a safety net.
74+
75+
- [ ] Use ONLY in trusted automation (CI/CD with vetted prompts, scripted bootstrap)
76+
- [ ] NEVER pair with prompts that include unverified content (issues, web fetches, untrusted documents) — those become injection vectors that can now write to template files unprompted
77+
- [ ] In CI, prefer specific allow rules over `--dangerously-skip-permissions` whenever the operation set is bounded
78+
- [ ] Audit the prompt source before invoking with this flag — anything that lands in `.claude/` shapes the next session's behavior
79+
7180
---
7281

7382
# Checklist de Seguridad — Pre-deploy

docs/usage-guide.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ cd ~/Documents/GitHub/dotforge # or wherever you cloned dotforge
6363

6464
**Cross-platform:** Linux, macOS, WSL, Git Bash. Uses copies as fallback if symlinks are not supported.
6565

66+
### Layered distribution (multi-seed)
67+
68+
Claude Code's `CLAUDE_CODE_PLUGIN_SEED_DIR` accepts multiple directories separated by `:` (Unix) / `;` (Windows). Layer base + corporate + personal overlays:
69+
70+
```bash
71+
# base = public dotforge | corporate = chaco-digital private overlay | personal = luiseiman tweaks
72+
export CLAUDE_CODE_PLUGIN_SEED_DIR="$HOME/.dotforge:$HOME/work/cd-overlay:$HOME/.dotforge-personal"
73+
claude
74+
```
75+
76+
Later seeds override earlier seeds for files with the same path. Use this for enterprise deployments where a public template + private overlay must coexist without forks.
77+
6678
### Skill Execution Context
6779

6880
Heavy skills (>150 lines, ~5K+ tokens) use `context: fork` in their frontmatter. This executes the skill in an isolated subagent, preventing it from consuming the main conversation's context window. Skills with `context: fork`: plugin-generator, bootstrap-project, init-project, domain-extract, audit-project.
@@ -226,6 +238,15 @@ Automatic alerts:
226238
- Score that drops >1.5 points
227239
- Projects with an old version of dotforge
228240

241+
### PR review flow tip (v2.1.122+)
242+
243+
Pasting a PR URL into the `/resume` search box finds the session that originally created the PR — works for GitHub, GitHub Enterprise, GitLab, Bitbucket. Useful for picking up review feedback without remembering session names.
244+
245+
```
246+
/resume
247+
# then paste: https://github.com/luiseiman/repo/pull/123
248+
```
249+
229250
### Session analysis
230251

231252
```

practices/inbox/2026-04-21-agent-memory-underused.md renamed to practices/active/2026-04-21-agent-memory-underused.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
id: agent-memory-underused
33
source: session-insights
4-
status: inbox
4+
status: active
55
captured: 2026-04-21
66
tags: [insights, agents, agent-memory, low-priority, needs-more-info]
77
tested_in: [dotforge]
8-
incorporated_in: []
8+
incorporated_in: ['3.5.0']
99
---
1010

1111
# Agent memory is underused — 1–2 entries per agent across ~5 months

0 commit comments

Comments
 (0)