diff --git a/docs/conventions/ecosystem-commands/CHANGELOG.md b/docs/conventions/ecosystem-commands/CHANGELOG.md index ba7e151ee..8f6b7f3a4 100644 --- a/docs/conventions/ecosystem-commands/CHANGELOG.md +++ b/docs/conventions/ecosystem-commands/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog — ecosystem-commands convention +## 1.1.0 — 2026-07-15 + +Additive: optional `tool-pin` key — pinned tool versions keyed by tool name. When present, resolvers +warn if the installed version drifts from the pin (a pin typically mirrors the repo's own CI pin); +inert when absent. Bundled portable defaults never set it — pins are consumer-specific. + ## 1.0.0 — 2026-07-12 Initial contract (design gate melodic-software/medley#1390): diff --git a/docs/conventions/ecosystem-commands/ecosystem.schema.json b/docs/conventions/ecosystem-commands/ecosystem.schema.json index d70b84911..5299bfdb7 100644 --- a/docs/conventions/ecosystem-commands/ecosystem.schema.json +++ b/docs/conventions/ecosystem-commands/ecosystem.schema.json @@ -51,6 +51,11 @@ "type": "string", "description": "Cross-platform install guidance shown when a required tool is missing. Missing tools report skip, never failure." }, + "tool-pin": { + "type": "object", + "additionalProperties": { "type": "string", "minLength": 1 }, + "description": "Pinned tool versions keyed by tool name. When present, resolvers warn if the installed version drifts from the pin (a pin typically mirrors the repo's own CI pin). Inert when absent." + }, "gates": { "type": "array", "description": "Repo-specific CI-parity gates beyond plain build/test/lint (lockfile drift, generated-artifact freshness, schema regeneration).", diff --git a/plugins/claude-config-audit/.claude-plugin/plugin.json b/plugins/claude-config-audit/.claude-plugin/plugin.json index f023b59b9..96f0ce8c0 100644 --- a/plugins/claude-config-audit/.claude-plugin/plugin.json +++ b/plugins/claude-config-audit/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "claude-config-audit", - "version": "0.3.0", + "version": "0.4.0", "description": "Four audit skills for a repo's Claude Code configuration: settings-audit (settings.json / .mcp.json / hooks / plugins / permissions drift), memory-health (CLAUDE.md, rules, and auto-memory against official-doc criteria), automation-deep-dive (evidence-gated verdicts on automation gaps), and permission-hygiene (allow-rule / allowed-tools grants for auto-mode durability and portability).", "author": { "name": "Melodic Software", diff --git a/plugins/claude-config-audit/CHANGELOG.md b/plugins/claude-config-audit/CHANGELOG.md new file mode 100644 index 000000000..861322171 --- /dev/null +++ b/plugins/claude-config-audit/CHANGELOG.md @@ -0,0 +1,17 @@ +# Changelog + +All notable changes to the `claude-config-audit` plugin are documented here. Format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. + +## [0.4.0] + +### Added + +- "Pre-computed context" blocks in the `automation-deep-dive`, `memory-health`, and `settings-audit` + skills: `!`-executed commands inject live repo facts (automation inventory; memory/rules/CLAUDE.md + counts and the RD1/M2 script-backed check counts; installed Claude Code version) at skill load, so + each audit starts from guaranteed-fresh evidence instead of relying on the model to remember to run + the bundled scripts. Every command carries an `|| echo` fallback so skill load never hard-fails. + No `allowed-tools` self-grant ships with the blocks: a `Bash(bash *)` grant is the + interpreter-led P1 shape this plugin's own `permission-hygiene` criteria flag (auto mode drops it), + and `!`-execution does not route through `allowed-tools`. diff --git a/plugins/claude-config-audit/skills/automation-deep-dive/SKILL.md b/plugins/claude-config-audit/skills/automation-deep-dive/SKILL.md index 9d56b54c1..0a87a1db7 100644 --- a/plugins/claude-config-audit/skills/automation-deep-dive/SKILL.md +++ b/plugins/claude-config-audit/skills/automation-deep-dive/SKILL.md @@ -6,6 +6,10 @@ user-invocable: true disable-model-invocation: false --- +## Pre-computed context + +Automation inventory: !`bash "${CLAUDE_PLUGIN_ROOT}/skills/automation-deep-dive/scripts/inventory.sh" 2>/dev/null || echo "inventory unavailable"` + ## Purpose Audit the repo's automation landscape and identify genuine gaps — not surface-level "you don't have X" diff --git a/plugins/claude-config-audit/skills/memory-health/SKILL.md b/plugins/claude-config-audit/skills/memory-health/SKILL.md index 49bf813f9..f77b01c58 100644 --- a/plugins/claude-config-audit/skills/memory-health/SKILL.md +++ b/plugins/claude-config-audit/skills/memory-health/SKILL.md @@ -6,6 +6,16 @@ user-invocable: true disable-model-invocation: false --- +## Pre-computed context + +Memory files: !`d=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/memory-health/scripts/resolve-memory-dir.sh" 2>/dev/null); ls "$d"/*.md 2>/dev/null | wc -l | tr -d '\r' || echo "0"` +MEMORY.md lines: !`d=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/memory-health/scripts/resolve-memory-dir.sh" 2>/dev/null); test -f "$d/MEMORY.md" && wc -l < "$d/MEMORY.md" | tr -d '\r' || echo "0"` +Rules files: !`find .claude/rules -name "*.md" 2>/dev/null | wc -l | tr -d '\r' || echo "0"` +CLAUDE.md lines: !`test -f CLAUDE.md && wc -l < CLAUDE.md | tr -d '\r' || echo "0"` +CLAUDE.local.md exists: !`test -f CLAUDE.local.md && echo "yes" || echo "no"` +Orphan always-loaded rules (RD1): !`bash "${CLAUDE_PLUGIN_ROOT}/skills/memory-health/scripts/orphan-rule-check.sh" --count 2>/dev/null || echo "?"` +MEMORY.md index issues (M2): !`bash "${CLAUDE_PLUGIN_ROOT}/skills/memory-health/scripts/memory-index-refs-check.sh" --count 2>/dev/null || echo "?"` + # Memory Health Deterministic health check for the Claude Code instruction/memory layer. Audits files YOU write that diff --git a/plugins/claude-config-audit/skills/settings-audit/SKILL.md b/plugins/claude-config-audit/skills/settings-audit/SKILL.md index 7ada29dfc..4214cd941 100644 --- a/plugins/claude-config-audit/skills/settings-audit/SKILL.md +++ b/plugins/claude-config-audit/skills/settings-audit/SKILL.md @@ -6,6 +6,10 @@ user-invocable: true disable-model-invocation: false --- +## Pre-computed context + +Claude Code version: !`claude --version 2>/dev/null || echo "unknown"` + ## Purpose Periodic audit of Claude Code configuration files against current official documentation and the diff --git a/plugins/code-tidying/.claude-plugin/plugin.json b/plugins/code-tidying/.claude-plugin/plugin.json index b9bef5884..e996b86ae 100644 --- a/plugins/code-tidying/.claude-plugin/plugin.json +++ b/plugins/code-tidying/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "code-tidying", - "version": "0.3.1", + "version": "0.4.0", "description": "Code tidying and comment hygiene: /code-tidying:tidy proactively hunts a rotated, glob-scoped lane for Beck-style tidyings under a research-backed scope budget and ships one tight PR; /code-tidying:batch-simplify sweeps recently changed files through grouped, dependency-ordered simplification waves with a never-drop deferred-items contract; /code-tidying:comment-residue is a read-only classifier that flags history, plan, conversational, and ticket/PR residue in code comments for author-applied deletion. Project-specific tidy lanes are scaffolded into a tracked .claude/tidy-lanes/ config folder by a re-runnable setup skill.", "author": { "name": "Melodic Software", diff --git a/plugins/code-tidying/CHANGELOG.md b/plugins/code-tidying/CHANGELOG.md new file mode 100644 index 000000000..e4639f2cf --- /dev/null +++ b/plugins/code-tidying/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +All notable changes to the `code-tidying` plugin are documented here. Format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. + +## [0.4.0] + +### Added + +- Stdlib-only frontmatter-fence integrity check in the self-update lane's verification commands: a portable python one-liner that confirms every SKILL.md's `---` fences are present and the frontmatter between them is non-empty, since a broken fence would block the next session's skill discovery. diff --git a/plugins/code-tidying/skills/tidy/lanes/self-update.md b/plugins/code-tidying/skills/tidy/lanes/self-update.md index 9cf615855..7271785df 100644 --- a/plugins/code-tidying/skills/tidy/lanes/self-update.md +++ b/plugins/code-tidying/skills/tidy/lanes/self-update.md @@ -48,6 +48,13 @@ npx markdownlint-cli2 bash skills/tidy/scripts/open-pr-count.test.sh # if the script changed (it shouldn't in this lane) ``` +Markdown lint does not cover the frontmatter parse contract — a broken `---` fence in a SKILL.md would block the next session's skill discovery. Run from the plugin root: + +```bash +# Stdlib-only (no PyYAML): confirms each SKILL.md's `---` fences are present and the frontmatter between them is non-empty. +python -c "import glob,sys; bad=[p for p in glob.glob('skills/*/SKILL.md') if (lambda s: len(s)!=3 or s[0] or not s[1].strip())(open(p,encoding='utf-8').read().split('---',2))]; sys.exit('broken frontmatter: '+', '.join(bad)) if bad else print('OK')" +``` + ## Conventional Commits type `chore(tidy):`. Example title: `chore(tidy): self-update — fix typos in lane file headers`. diff --git a/plugins/codebase-audit/.claude-plugin/plugin.json b/plugins/codebase-audit/.claude-plugin/plugin.json index dd6d1cc67..9f79efb6f 100644 --- a/plugins/codebase-audit/.claude-plugin/plugin.json +++ b/plugins/codebase-audit/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "codebase-audit", - "version": "0.1.2", + "version": "0.2.0", "description": "Repo-wide drift audit between docs, config, code, and architecture: verifies every factual claim against reality via parallel subagent fan-out, severity-rates findings, and fixes or presents for review. Audit dimensions are configurable through a tracked .claude/codebase-audit.md config file written by the setup skill.", "author": { "name": "Melodic Software", diff --git a/plugins/codebase-audit/CHANGELOG.md b/plugins/codebase-audit/CHANGELOG.md new file mode 100644 index 000000000..2edd0c4c5 --- /dev/null +++ b/plugins/codebase-audit/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +All notable changes to the `codebase-audit` plugin are documented here. Format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. + +## [0.2.0] + +### Added + +- Optional background/unattended execution variant for the Phase 1 per-file fan-out: the same + discovery can run as a saved workflow (background execution, same-session resume, rerunnable + script) when the environment provides such a surface; the in-session fan-out remains the default. diff --git a/plugins/codebase-audit/skills/codebase-audit/context/discovery-method.md b/plugins/codebase-audit/skills/codebase-audit/context/discovery-method.md index 654db35dd..0cbc2258d 100644 --- a/plugins/codebase-audit/skills/codebase-audit/context/discovery-method.md +++ b/plugins/codebase-audit/skills/codebase-audit/context/discovery-method.md @@ -73,6 +73,13 @@ caught vs a single sequential agent. Because each agent owns one file, the "complete one dimension before the next" sequencing is moot — there is no shared context to thin out, so dimension order does not matter. +**Background / unattended variant:** the same per-file fan-out can run as a saved workflow +(background execution, same-session resume, rerunnable script) instead of in-session subagents — +same discovery, different executor. This applies only when your environment provides a +background/saved-workflow execution surface; the in-session fan-out above is the default. Reach for +the workflow form only when you want a fire-and-forget periodic audit you can walk away from — an +interactive audit you are actively driving stays with the in-session fan-out. + ## What to report Report **every discrepancy** found, no matter how small. Also report what you verified as correct — diff --git a/plugins/event-storming/.claude-plugin/plugin.json b/plugins/event-storming/.claude-plugin/plugin.json index 25abff074..49101e256 100644 --- a/plugins/event-storming/.claude-plugin/plugin.json +++ b/plugins/event-storming/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "event-storming", - "version": "0.2.1", + "version": "0.3.0", "description": "EventStorming for domain discovery — a methodology skill (Big Picture / Process Modeling / Design-Level facilitation reference, notation, patterns) and a simulation skill (agentic multi-persona workshops that produce a structured-markdown model by default; a live Miro-board rendering path is available when the first-party miro plugin is enabled).", "author": { "name": "Melodic Software", diff --git a/plugins/event-storming/CHANGELOG.md b/plugins/event-storming/CHANGELOG.md new file mode 100644 index 000000000..c56f8f8b5 --- /dev/null +++ b/plugins/event-storming/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog + +All notable changes to the `event-storming` plugin are documented here. Format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. + +## [0.3.0] + +### Added + +- `--design-level` deep dive now guards its prerequisite: when no prior Process Modeling board exists for the bounded context in `${CLAUDE_PLUGIN_DATA}/history.jsonl`, it surfaces the missing prerequisite and offers to run `--process-model` first instead of fabricating a process model or aggregates. Pinned by the new `design-level-missing-prerequisite` eval. + +### Fixed + +- Dangling bare "memory" references in the simulation skill's deep-dive and evaluation steps now use the `${CLAUDE_PLUGIN_DATA}/history.jsonl` run-state seam like every sibling reference. diff --git a/plugins/event-storming/skills/simulation/SKILL.md b/plugins/event-storming/skills/simulation/SKILL.md index a0fac0b45..8e393ec04 100644 --- a/plugins/event-storming/skills/simulation/SKILL.md +++ b/plugins/event-storming/skills/simulation/SKILL.md @@ -16,7 +16,7 @@ Parse `$ARGUMENTS` for a simulation mode: - `--simulate [domain]`: Run a full simulation cycle with interactive progression. Loads `agentic-simulation.md` and `simulation-evaluation.md`. Starts with Big Picture, identifies bounded contexts, then uses AskUserQuestion to guide the user through selecting which BC to explore next. Domain defaults to "Developer Conference" if not specified. See "Running a Simulation" below. - `--process-model [board-url-or-bc-name]`: Run Process Modeling only, against an existing Big Picture board. Reads the BP board to extract the winning problem / selected BC, then executes PM with the 3-pass technique. Use when the user wants to deep-dive a specific BC without re-running Big Picture. - `--design-level [board-url-or-bc-name]`: Run Design-Level only, against an existing Process Modeling board. Reads the PM board to extract the process model, then executes DL with Blank Aggregates technique. Use when the user wants to go from PM → DL on a specific bounded context. -- `--evaluate`: Run the iteration workflow against existing boards. Loads `iteration-workflow.md` and `simulation-evaluation.md`. Executes: SCORE → COMPARE → DIFF → FIX → VERIFY → CODIFY. Requires existing boards (reads from memory for board URLs). +- `--evaluate`: Run the iteration workflow against existing boards. Loads `iteration-workflow.md` and `simulation-evaluation.md`. Executes: SCORE → COMPARE → DIFF → FIX → VERIFY → CODIFY. Requires existing boards (reads the run-state store, `${CLAUDE_PLUGIN_DATA}/history.jsonl`, for board URLs). - `--retrospective [domain]`: Run Big Picture as an organization retrospective — exploring an existing business process to find improvement opportunities. Frames exploration as "what ACTUALLY happens?" vs the official version. Same phases as `--simulate` but with a focus on problems/opportunities in existing flows rather than new product discovery. (Book Ch. 1 story 4, Ch. 10) - `--induction [domain]`: Run Big Picture as a new hire onboarding exercise. The New Hire persona leads (models based on guessing/assumptions), senior personas correct and explain. Implements Brandolini's "give newcomers the leading role" (Ch. 10). Produces a learning-oriented model, not a definitive one. - `--value [domain]`: Run standalone Value Exploration against an existing Big Picture board. Executes all 5 sub-rounds: Financial value → Non-financial currencies → Contrasting perspectives → Diverging perspectives (customer segments) → Explore Purpose. (Book Ch. 5) @@ -57,7 +57,10 @@ plugin's tool under the `mcp__plugin_miro_miro__` prefix. Modes that read an *existing* board (`--process-model`, `--design-level`, `--evaluate`, `--crc`, `--discover-bcs` with a board URL) require Miro — if it's absent, say so and offer path 2, since -there is no board to read. +there is no board to read. One check precedes that gate: for a BC-name input, `--design-level` +resolves its prerequisite first — the run-state store lookup (`${CLAUDE_PLUGIN_DATA}/history.jsonl`) +needs no Miro, so a missing Process Modeling board is surfaced as the missing prerequisite (offer +`--process-model` first) before any Miro gating. ## Running a Simulation (`--simulate`) @@ -75,9 +78,9 @@ there is no board to read. 1. **Setup** — MCP preflight (Miro availability per "Miro availability & graceful degradation" above), domain research (3+ web-research searches — Perplexity MCP if present, else `WebSearch`; default domain "Developer Conference"), persona setup (4-7 personas, three-zone DEEP/GREY/PRETEND knowledge, 5 shared focal moments). Session lifecycle (ID, dirs, teardown) and preflight detail: `@./reference/agentic-simulation.md` "Session lifecycle". 2. **Big Picture** (always first) — run every workshop phase in order (Chaotic Exploration → Enforce Timeline → People & Systems → Explicit Walk-through → Reverse Narrative → [optional] Add the Money / Value Exploration → Problems & Opportunities → Arrow Voting → Wrapping Up) per `@./reference/agentic-simulation.md` "Round-Based Orchestration", taking a visual-verification screenshot at each transition; then run the post-workshop visual check (Ch. 9) and score against the Big Picture rubric. 3. **Post-workshop analysis + interactive progression** — run bounded-context discovery (architect's homework, not a workshop phase — see `--discover-bcs` below), present the arrow-voting winner and discovered BCs, then use AskUserQuestion to let the user pick the next BC to Process Model, then Design-Level, repeating per BC. **Never auto-advance formats — the user chooses each step.** -4. **Evaluation & codification** — score all boards against the full rubric, compare against memory baselines, run the retrospective protocol (`@./reference/simulation-evaluation.md`), update memory with version metrics / board URLs / findings, present the version comparison, and clean up old boards with user approval. +4. **Evaluation & codification** — score all boards against the full rubric, compare against the `${CLAUDE_PLUGIN_DATA}/history.jsonl` baselines, run the retrospective protocol (`@./reference/simulation-evaluation.md`), update the run-state store with version metrics / board URLs / findings, present the version comparison, and clean up old boards with user approval. -Throughout, maintain an **exploration map** (Big Picture URL, all BCs explored + unexplored, per-BC Process Modeling and Design-Level board URLs) on the Big Picture board as a cyan sticky and in memory — layout detail in `@./reference/agentic-simulation.md`. +Throughout, maintain an **exploration map** (Big Picture URL, all BCs explored + unexplored, per-BC Process Modeling and Design-Level board URLs) on the Big Picture board as a cyan sticky and in the run-state store (`${CLAUDE_PLUGIN_DATA}/history.jsonl`) — layout detail in `@./reference/agentic-simulation.md`. ## Running a Deep Dive (`--process-model` or `--design-level`) @@ -85,7 +88,7 @@ When invoked with `--process-model` or `--design-level`, run a single format aga **`--process-model [board-url-or-bc-name]`:** -1. Read memory for the Big Picture board URL and the list of identified BCs +1. Read the run-state store (`${CLAUDE_PLUGIN_DATA}/history.jsonl`) for the Big Picture board URL and the list of identified BCs 2. If a BC name is given, extract relevant events from the BP board for that context 3. If a board URL is given, read it directly 4. Execute Process Modeling with 3-pass technique on the selected scope @@ -94,17 +97,18 @@ When invoked with `--process-model` or `--design-level`, run a single format aga **`--design-level [board-url-or-bc-name]`:** -1. Read memory for the Process Modeling board URL for the specified BC -2. Extract the process model (events, commands, policies) -3. Execute Design-Level with Blank Aggregates technique -4. Score against DL rubric -5. Update the exploration map with the new aggregate information +1. Read the run-state store (`${CLAUDE_PLUGIN_DATA}/history.jsonl`) for the Process Modeling board URL for the specified BC +2. If no prior Process Modeling board exists for the BC, surface the missing prerequisite and offer to run `--process-model` first — never fabricate a process model or aggregates from scratch +3. Extract the process model (events, commands, policies) +4. Execute Design-Level with Blank Aggregates technique +5. Score against DL rubric +6. Update the exploration map with the new aggregate information ## Running an Evaluation (`--evaluate`) When invoked with `--evaluate`, run the iteration workflow against existing boards WITHOUT re-running the simulation. Use this to re-score boards, compare versions, or verify that fixes improved quality. -**Execution:** Follow `iteration-workflow.md` steps 2-7 (SCORE → COMPARE → DIFF → FIX → VERIFY → CODIFY). Read board data via Miro MCP, score against rubric, compare against memory baselines. +**Execution:** Follow `iteration-workflow.md` steps 2-7 (SCORE → COMPARE → DIFF → FIX → VERIFY → CODIFY). Read board data via Miro MCP, score against rubric, compare against the `${CLAUDE_PLUGIN_DATA}/history.jsonl` baselines. ## Bounded Context Discovery Protocol (`--discover-bcs`) diff --git a/plugins/event-storming/skills/simulation/evals/evals.json b/plugins/event-storming/skills/simulation/evals/evals.json index 2a7ac8d73..9e89c8ed9 100644 --- a/plugins/event-storming/skills/simulation/evals/evals.json +++ b/plugins/event-storming/skills/simulation/evals/evals.json @@ -73,6 +73,18 @@ "Output does not fabricate some other arbitrary domain as if the user had specified it", "Output honors the Miro preflight — proceeding on-board when Miro is available, or offering the structured-markdown / connect-and-retry degradation when Miro is absent — rather than assuming an unconditional board run" ] + }, + { + "id": 7, + "name": "design-level-missing-prerequisite", + "prompt": "--design-level Enrollment", + "expected_output": "Design-Level deep-dive routing that first requires the prerequisite: an existing Process Modeling board for the Enrollment bounded context. It should look up the PM board URL in the run-state store (${CLAUDE_PLUGIN_DATA}/history.jsonl) and, finding no prior board, surface the missing prerequisite — offering to run --process-model first — rather than fabricating a process model or aggregates from scratch. It routes to Design-Level behavior (Blank Aggregates technique), not to Big Picture or the interactive-discovery flow.", + "files": [], + "expectations": [ + "Recognizes Design-Level requires an existing Process Modeling board for the bounded context and looks up the board URL in ${CLAUDE_PLUGIN_DATA}/history.jsonl before proceeding", + "On finding no prior Process Modeling board, surfaces the missing prerequisite (offering to run --process-model first) instead of fabricating a process model or aggregates from scratch", + "Routes to Design-Level behavior (e.g. Blank Aggregates), not to Big Picture or the no-args interactive discovery flow" + ] } ] } diff --git a/plugins/implementation/.claude-plugin/plugin.json b/plugins/implementation/.claude-plugin/plugin.json index 4a8a4cbf1..19102a3a8 100644 --- a/plugins/implementation/.claude-plugin/plugin.json +++ b/plugins/implementation/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "implementation", - "version": "0.4.1", + "version": "0.5.0", "description": "Disciplined implementation stage: execute approved plans inline or via orchestrated workers, run polyglot build/test/lint verification, author and diagnose tests, drive live E2E checks, and prove changes achieved their intended outcome — with measurable-improvement claims verified against planning-time baselines.", "author": { "name": "Melodic Software", diff --git a/plugins/implementation/CHANGELOG.md b/plugins/implementation/CHANGELOG.md index dbb826044..43d6abd04 100644 --- a/plugins/implementation/CHANGELOG.md +++ b/plugins/implementation/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to the `implementation` plugin are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. +## [0.5.0] + +### Added + +- **Optional `tool-pin` version-drift warning in `/lint`.** The ecosystem-commands contract gains an + optional `tool-pin` key (pinned tool versions keyed by tool name; contract 1.1.0): when the resolved + config pins a tool version, `/lint` warns if the installed version drifts from the pin (a pin + typically mirrors the consumer's own CI pin). Inert when absent — no pin, no check. +- **`/implement` over-correction trap logs to the session retro.** When the Step 3.5 over-correction + guard fires, document it in the session's retro — surfaced to `/session-flow:retro` when the + `session-flow` plugin is installed; otherwise noted in the completion summary. + ## [0.4.0] ### Changed diff --git a/plugins/implementation/reference/resolution-ladder.md b/plugins/implementation/reference/resolution-ladder.md index 1c166d157..8a9f7c166 100644 --- a/plugins/implementation/reference/resolution-ladder.md +++ b/plugins/implementation/reference/resolution-ladder.md @@ -18,7 +18,8 @@ conforming to the contract's `ecosystem.schema.json`. Command keys are **opaque Plus `globs` (required — classify changed files), and optional `enabled` (default `true`; a consumer sets `false` to disable an ecosystem without deleting its file), `anchor`, `project-discovery`, -`opt-in`, `install-hint`, `gates`, `notes`. Placeholders substituted by the running skill: +`opt-in`, `install-hint`, `tool-pin` (pinned tool versions keyed by tool name — the running skill +warns on installed-vs-pinned drift; inert when absent), `gates`, `notes`. Placeholders substituted by the running skill: `` (changed-files list scoped to this ecosystem), `` (resolved per `anchor`), `` (each root from `project-discovery`), `$REPO_ROOT` (`git rev-parse --show-toplevel`). diff --git a/plugins/implementation/skills/implement/SKILL.md b/plugins/implementation/skills/implement/SKILL.md index 574d62f61..be6e3324c 100644 --- a/plugins/implementation/skills/implement/SKILL.md +++ b/plugins/implementation/skills/implement/SKILL.md @@ -137,6 +137,8 @@ Options: - Specific items: ``` +If the trap fires, document it in this session's retro — when the `session-flow` plugin is installed, surface it as an input to `/session-flow:retro`; otherwise note it in the completion summary. + ## Step 4: Task Tracking and Phase-Boundary Handoff For non-trivial implementations (3+ steps), use TaskCreate at the start: diff --git a/plugins/implementation/skills/lint/SKILL.md b/plugins/implementation/skills/lint/SKILL.md index 8c3366e45..a705bd7e2 100644 --- a/plugins/implementation/skills/lint/SKILL.md +++ b/plugins/implementation/skills/lint/SKILL.md @@ -79,6 +79,8 @@ Per-project walking (ecosystems with `project-discovery`): Tool presence: verify tools on `PATH` before each ecosystem; report `skip` with `install-hint` when missing. +Tool pins (`tool-pin` sub-key, e.g. zizmor): when the resolved config pins a tool version, warn if the installed version drifts from the pin (a pin typically mirrors the consumer's own CI pin). No pin, no check. + Cross-cutting: resolve `$EC_BIN` for editorconfig-checker binary-name variants before substituting into the check command: ```bash diff --git a/plugins/planning/.claude-plugin/plugin.json b/plugins/planning/.claude-plugin/plugin.json index d45e95fce..7ec77d5f4 100644 --- a/plugins/planning/.claude-plugin/plugin.json +++ b/plugins/planning/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "planning", - "version": "0.8.1", + "version": "0.9.0", "description": "Pre-implementation planning pipeline: chart a too-big, foggy effort as a decision map, diverge on candidate approaches, lock product intent and the engineering contract, explore the design space, stress-test adversarially, and produce a structured implementation plan with an approval gate — persisting PRD.md / PLAN.md / design artifacts for fresh-session handoff.", "author": { "name": "Melodic Software", diff --git a/plugins/planning/CHANGELOG.md b/plugins/planning/CHANGELOG.md index f9a52b9bb..ae0457b60 100644 --- a/plugins/planning/CHANGELOG.md +++ b/plugins/planning/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to the `planning` plugin are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. +## [0.9.0] + +### Added + +- **Agent-team composition guidance in `/planning:architect` Step 4.5**: design for an agent team + when parallel-safe workers must message each other (vs independent fan-out sub-agents); + decompose by context boundary / disjoint clean-interface file-set, never by lifecycle role; + dependency-order the task list so blocked tasks auto-unblock; teammates are not + worktree-isolated, so disjoint file ownership is mandatory. The Step 4.5 routing enum regains + the agent-team surface. + +### Changed + +- **Baseline capture routes to the measurement SSOT**: `/planning:architect` Step 2 routes to + `/implementation:verify-improvement` (`performance baseline` / `metrics baseline`) when + installed instead of restating the measure/store/compare mechanism inline; manual capture + remains the degrade path. +- **`/planning:devils-advocate` follow-ups regain the verification pointer**: suggests + `/implementation:verify-changes` (if installed) when code changes were involved. + ## [0.8.0] ### Changed diff --git a/plugins/planning/skills/architect/SKILL.md b/plugins/planning/skills/architect/SKILL.md index 4dc443a7e..98af57fcb 100644 --- a/plugins/planning/skills/architect/SKILL.md +++ b/plugins/planning/skills/architect/SKILL.md @@ -107,7 +107,7 @@ Per-scale calibration examples live in [context/plan-template.md](context/plan-t **Integration-first phase ordering** — once the technique is the kept branch (tracer bullet / walking skeleton), for multi-layer features sequence the FIRST phase as the integration slice and make its `**Sanity Check:**` an end-to-end runtime probe. Skip for pure-horizontal work (migration, lint, doc pass). -**Measurable-goal baseline capture** — when the brief states a measurable goal (perf / latency / throughput / allocation / complexity / coverage keywords), capture a baseline **by default** BEFORE the change: measure the pre-change state and store the raw capture under `//baselines/` (default `.work/`; the memory slice — baselines are machine-bound and never committed), then record the baseline value + target in PLAN.md. After the change, re-measure and record the comparison in PLAN.md, referencing the stored capture — the contract carries the distilled numbers, never the raw output. Never claim an improvement without a baseline. +**Measurable-goal baseline capture** — when the brief states a measurable goal (perf / latency / throughput / allocation / complexity / coverage keywords), capture a baseline **by default** BEFORE the change: route to `/implementation:verify-improvement performance baseline` (perf) or `/implementation:verify-improvement metrics baseline` (code metrics) if installed — the measurement mechanism is SSOT there; this skill routes, never reimplements — or measure the pre-change state manually. Store the raw capture under `//baselines/` (default `.work/`; the memory slice — baselines are machine-bound and never committed), then record the baseline value + target in PLAN.md. After the change, re-measure and compare through the same route (its `compare` phase reads the stored baseline, or re-measure manually) and record the comparison in PLAN.md, referencing the stored capture — the contract carries the distilled numbers, never the raw output. Never claim an improvement without a baseline. ### Step 3: Plan Stress-Test (MANDATORY — never skip) @@ -164,7 +164,7 @@ After the phase plan is locked but before Step 5 approval, compute the execution 6. **Author scope-fencing tables** — for each parallel agent: ALLOWED files (whitelist) + explicit FORBIDDEN (PLAN.md, other agents' territory) per [context/plan-template.md](context/plan-template.md) "Scope-fencing tables" 7. **Surface the cost** — parallel agents multiply token usage; state "N agents parallel vs sequential" so the user picks consciously 8. **Document sequential fallback** — an explicit path back to sequential ordering if parallel orchestration fails (scope-fence violation, concurrent-edit race, an agent reports it cannot complete) -9. **Assign per-phase execution surface** — give each phase a routing row (`Phase | Surface | Basis`): main-session for judgment-heavy or tightly-coupled work, sub-agent worker for mechanical or file-disjoint volume work +9. **Assign per-phase execution surface** — give each phase a routing row (`Phase | Surface | Basis`): main-session for judgment-heavy or tightly-coupled work, sub-agent worker for mechanical or file-disjoint volume work, agent team for parallel-safe workers that must message each other — route to agent team only when the environment has agent teams enabled (an experimental, default-off surface); otherwise fall back to sub-agent workers or sequential **Output:** an Execution-Shape Analysis subsection in the plan body (parallelism shape + per-phase routing table) + scope-fencing tables in "Handoff to implementation". The user approves the shape at Step 5. @@ -172,6 +172,7 @@ After the phase plan is locked but before Step 5 approval, compute the execution - Parallel orchestration depends on sub-agent compliance with scope-fence discipline. The sequential fallback path MUST be documented in PLAN.md "Handoff to implementation" - PLAN.md edits stay main-session-only (status updates would race if agents edited PLAN); agents report back instead +- **Design for an agent team when the parallel-safe workers must message each other** (cross-layer feature, competing-hypothesis debugging) rather than just fan out and report back — that execution shape is an **agent team**, not independent fan-out sub-agents. The file-overlap matrix above IS the team-safety check: decompose by **context boundary / disjoint clean-interface file-set, never by lifecycle role** (a planner/implementer/tester of one feature shares too much context). Dependency-order the task list so blocked tasks auto-unblock; teammates are NOT worktree-isolated, so disjoint file ownership is mandatory, not optional. Agent teams are an experimental, default-off runtime surface — verify availability before routing a phase there, and keep the sub-agent fan-out or sequential path as the documented fallback - The user's commit policy is unchanged — staging/commits happen per the consuming project's own rules, never silently by parallel agents ### Step 4.6: Tag unilateral decisions diff --git a/plugins/planning/skills/devils-advocate/SKILL.md b/plugins/planning/skills/devils-advocate/SKILL.md index 341b3816b..375c8d5c8 100644 --- a/plugins/planning/skills/devils-advocate/SKILL.md +++ b/plugins/planning/skills/devils-advocate/SKILL.md @@ -162,6 +162,7 @@ If critical or high findings exist, present specific plan modifications: Based on findings, suggest relevant follow-up actions: +- Verifying the changes end-to-end (`/implementation:verify-changes` if installed) if code changes were involved - Targeted research rounds (`/discovery:research` if installed, or the strongest research capability available) if critical assumptions remain unverified - Filing deferred research or monitoring items in the project's work-item tracker (`/work-items:work-items` if installed) diff --git a/plugins/prototype/.claude-plugin/plugin.json b/plugins/prototype/.claude-plugin/plugin.json index ff6845f50..0df2f6112 100644 --- a/plugins/prototype/.claude-plugin/plugin.json +++ b/plugins/prototype/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "prototype", - "version": "0.2.0", + "version": "0.2.1", "description": "Builds throwaway code to answer a design question before committing to architecture — a logic facet (an interactive terminal app over a portable state model) and a UI facet (radically different visual variants on one route).", "author": { "name": "Melodic Software", diff --git a/plugins/prototype/CHANGELOG.md b/plugins/prototype/CHANGELOG.md new file mode 100644 index 000000000..dbd976d87 --- /dev/null +++ b/plugins/prototype/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +All notable changes to the `prototype` plugin are documented here. Format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. + +## [0.2.1] + +### Added + +- **Composition table.** The shared discipline now maps the prototype to its upstream and + downstream workflow skills — `/planning:prd`, `/improve-architecture:improve-architecture`, + `/planning:architect`, and `/implementation:implement` — each invoked only when the sibling + plugin is installed. +- **Named handoff capability in the auto-invoke gate.** The gate's "checkpointing your current + work first" now names `/session-flow:handoff` (when installed) as the checkpoint capability. diff --git a/plugins/prototype/context/discipline.md b/plugins/prototype/context/discipline.md index 1c104fda5..127ecd9aa 100644 --- a/plugins/prototype/context/discipline.md +++ b/plugins/prototype/context/discipline.md @@ -14,7 +14,7 @@ change. When the model reaches for a prototype without an explicit request to spike, **STOP** and confirm scope before writing any throwaway code. Do not detour out of an active workflow without -checkpointing your current work first. +checkpointing your current work first (`/session-flow:handoff` when installed). ## Rules (both facets) @@ -46,3 +46,12 @@ prototype so the answer gets filled in before deletion. Then delete the throwawa - **Does not explore what IS** — reading and tracing the codebase understands what exists; a prototype tests what *could* be. - **Does not generalize** — no "what if we wanted to support X later." One question, one answer. + +## Composition + +| When | Skill | How it composes | +|------|-------|-----------------| +| Product intent locked | `/planning:prd` (when installed) | PRD says "users need X" — prototype proves X works | +| Architecture discovery surfaced a design question | `/improve-architecture:improve-architecture` (when installed) | Improvement pass surfaces the opportunity → prototype validates the approach | +| Prototype answered the question | `/planning:architect` (when installed) | Validated decision feeds the plan | +| Logic module worth keeping | `/implementation:implement` (when installed) | Lift the pure module into production; delete the TUI shell | diff --git a/plugins/review-toolkit/.claude-plugin/plugin.json b/plugins/review-toolkit/.claude-plugin/plugin.json index 6231d8d8e..cd29bad37 100644 --- a/plugins/review-toolkit/.claude-plugin/plugin.json +++ b/plugins/review-toolkit/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "review-toolkit", - "version": "0.4.0", + "version": "0.5.0", "description": "Code-review toolkit: six read-only reviewer agents (code, security, architecture, doc drift, build/test/lint, CI-log audit) plus two orchestration skills — a single-lens quality gate and a multi-surface review fan-out with severity-ranked, deduplicated findings.", "author": { "name": "Melodic Software", diff --git a/plugins/review-toolkit/CHANGELOG.md b/plugins/review-toolkit/CHANGELOG.md index 8ff2aa295..87d783844 100644 --- a/plugins/review-toolkit/CHANGELOG.md +++ b/plugins/review-toolkit/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to the `review-toolkit` plugin are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. +## [0.5.0] + +### Added + +- **Model-assignment cost routing for the findings-normalization pipeline.** Each stage heading in + `code-review-fanout`'s findings-normalization context now carries its model annotation, and a + closing `## Model assignment` section summarizes the routing: Stage 0 Sonnet (parse fidelity), + Stages 1–2 deterministic/Haiku (enum lookup), Stage 3 Sonnet (semantic merge), Stage 4 + deterministic. + ## [0.4.0] ### Changed diff --git a/plugins/review-toolkit/skills/code-review-fanout/context/findings-normalization.md b/plugins/review-toolkit/skills/code-review-fanout/context/findings-normalization.md index 15715a8e7..f4f55eedc 100644 --- a/plugins/review-toolkit/skills/code-review-fanout/context/findings-normalization.md +++ b/plugins/review-toolkit/skills/code-review-fanout/context/findings-normalization.md @@ -18,7 +18,7 @@ The 5-stage main-thread pipeline that turns heterogeneous free-text findings fro Line numbers from LLM reviewers drift — treat inferred lines as approximate and keep dedup noise-tolerant. -## Stage 0 — Extraction +## Stage 0 — Extraction (Sonnet) Per-surface free-text → records `{surface, file, line, line_basis, category, native_severity, native_confidence, raw_text}`. @@ -26,7 +26,7 @@ Per-surface free-text → records `{surface, file, line, line_basis, category, n - **Category normalization** — a small enum (`security`, `architecture`, `performance`, `testing`, `error-handling`, `concurrency`, `docs`, …; unmappable → `other`), NOT raw per-source strings (they false-split). - **Parse-failure accounting** — record raw vs normalized counts per surface; preserve unparsable findings as raw text in the report's `## Unparsed` appendix. NEVER drop. -## Stage 1 — Severity crosswalk +## Stage 1 — Severity crosswalk (deterministic / Haiku) Map native severity → the tier vocabulary in effect (the project's own, else `${CLAUDE_PLUGIN_ROOT}/context/severity.md`): @@ -36,16 +36,20 @@ Map native severity → the tier vocabulary in effect (the project's own, else ` - doc-drift: Stale → IMPORTANT; Missing/Aspirational → SUGGESTION. - **Surfaces emitting no severity (e.g. the `code-review` plugin)** → DERIVE from content: bug/correctness → CRITICAL or IMPORTANT by impact; convention-adherence → IMPORTANT; ambiguous → IMPORTANT + `pending: human-tier`. A confidence filter having passed is confidence-of-realness, NOT severity — a high-confidence nitpick is still a nitpick. -## Stage 2 — Confidence enum +## Stage 2 — Confidence enum (deterministic / Haiku) Per `${CLAUDE_PLUGIN_ROOT}/context/severity.md` "Confidence axis": plugin-filtered high scores → `high`; security-reviewer high/medium/low straight through; surfaces emitting none → `unscored`. **Absent confidence ≠ low.** -## Stage 3 — Dedup +## Stage 3 — Dedup (Sonnet) Key = normalized file path + line-proximity bucket (±3 lines), NOT category. File-scoped findings (null `line`) bucket by path + category + a content-gist check — merge two line-less records only when their `raw_text` describes the same issue; path alone would collapse distinct architecture/doc findings in the same file. Doc-space never merges with source-space. **Minimize FALSE-MERGE over FALSE-SPLIT** — a false merge silently drops a real issue; a false split only adds noise. When in doubt, do NOT merge. -## Stage 4 — Agreement / rank +## Stage 4 — Agreement / rank (deterministic) - **Cross-surface merge takes MAX severity + MAX confidence** — never a filtered value. - **Agreement = positive presence only.** Count the surfaces that flagged the issue; a surface's ABSENCE carries no signal (it may have been confidence-filtered, not judged absent). - **Rank:** (1) tier CRITICAL → IMPORTANT → SUGGESTION; (2) agreement count descending; (3) confidence `high` > `medium` > `unscored` > `low`. Render `pending: human-tier` and `forward-flag` markers visibly. + +## Model assignment + +Stage 0 Sonnet (parse fidelity) · Stage 1–2 deterministic/Haiku (enum lookup) · Stage 3 Sonnet (semantic merge) · Stage 4 deterministic. diff --git a/plugins/session-flow/.claude-plugin/plugin.json b/plugins/session-flow/.claude-plugin/plugin.json index bddd0b679..3d5958d80 100644 --- a/plugins/session-flow/.claude-plugin/plugin.json +++ b/plugins/session-flow/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "session-flow", - "version": "0.3.0", + "version": "0.4.0", "description": "Session-lifecycle toolkit of four skills: workflow (navigate a staged dev workflow and suggest the next stage), handoff (write a save-point and resume prompt for /clear, with optional --bg background-agent launch), retro (structured session retrospective with transcript metrics and learning codification), and orchestration-brief (arm a session or worker with proactive-orchestration imperatives).", "author": { "name": "Melodic Software", diff --git a/plugins/session-flow/CHANGELOG.md b/plugins/session-flow/CHANGELOG.md index a7211a332..98e3aa169 100644 --- a/plugins/session-flow/CHANGELOG.md +++ b/plugins/session-flow/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog — session-flow plugin +## 0.4.0 — 2026-07-15 + +Added: + +- retro: `reference/ecosystem-improvement-catalog.md` — placement decision + tree (project vs personal scope, laptop-dies test), per-target + recommendation formats (memory, rules, hooks, skills, agents, MCP + servers, settings), and a hook-event table verified against the current + official hooks docs. Loaded by session-mode Phase 3. +- handoff: `context/gotchas.md` — failure patterns (prompt-only when + durability is required, plan-anticipated work dropped on batch pushback, + handoff without verifiable sanity-check evidence, continuing past an + explicit stop). Loaded on demand from the SKILL.md checklist. + ## 0.3.0 — 2026-07-14 Adopt the marketplace topic-docs convention diff --git a/plugins/session-flow/skills/handoff/SKILL.md b/plugins/session-flow/skills/handoff/SKILL.md index b3cd88c28..798858c35 100644 --- a/plugins/session-flow/skills/handoff/SKILL.md +++ b/plugins/session-flow/skills/handoff/SKILL.md @@ -223,7 +223,8 @@ fallback), then: ## Post-write enforcement checklist Tick each item in the response so the user can verify the exit shape. Missing any tick = handoff -incomplete. +incomplete. Known failure patterns live in `context/gotchas.md` — load on demand when a step feels +ambiguous. **Full path:** diff --git a/plugins/session-flow/skills/handoff/context/gotchas.md b/plugins/session-flow/skills/handoff/context/gotchas.md new file mode 100644 index 000000000..2a27c0d7a --- /dev/null +++ b/plugins/session-flow/skills/handoff/context/gotchas.md @@ -0,0 +1,13 @@ +# Handoff gotchas + +Failure patterns from real sessions. Loaded on demand from the handoff SKILL.md. + +- **Prompt-only when durability is required** — prompt-only fits small, self-contained follow-ups; + when a plan artifact, dead-ends, or load-bearing decisions back the work, write the durable + handoff file. Any doubt → full handoff. +- **Dropping plan-anticipated work on batch pushback** — when the user rejects N≥2 proposed + actions, separate by category (plan-anticipated vs invented); never silent-drop all. +- **Handoff without sanity-check evidence** — Progress claims need verifiable evidence (a grep + hit, a test exit code), not "looks good." +- **Continuing after the user says stop** — a handoff is a save-point, never permission to keep + implementing. Respect explicit pause/stop. diff --git a/plugins/session-flow/skills/retro/context/session.md b/plugins/session-flow/skills/retro/context/session.md index 759da12d6..29d162bf3 100644 --- a/plugins/session-flow/skills/retro/context/session.md +++ b/plugins/session-flow/skills/retro/context/session.md @@ -151,6 +151,10 @@ findings. Code configuration: verify it against current official docs before presenting — never recommend features from training-data assumptions. +**Load the catalog.** Read `${CLAUDE_PLUGIN_ROOT}/skills/retro/reference/ecosystem-improvement-catalog.md` +before filling the table — the placement decision tree and the per-target recommendation formats +(memory, rules, hooks, skills, agents, MCP servers, settings) live there. + Present as a GFM table with a **Scope** column distinguishing: - **project** — git-tracked, shared with the team (the repo's `CLAUDE.md`, rules, skills, settings) diff --git a/plugins/session-flow/skills/retro/reference/ecosystem-improvement-catalog.md b/plugins/session-flow/skills/retro/reference/ecosystem-improvement-catalog.md new file mode 100644 index 000000000..229ea37a6 --- /dev/null +++ b/plugins/session-flow/skills/retro/reference/ecosystem-improvement-catalog.md @@ -0,0 +1,221 @@ +# Ecosystem Improvement Catalog + +Taxonomy of improvements codifiable from session findings. Each category maps a finding type to a +specific ecosystem target. + +**Research before recommending.** The Claude Code ecosystem evolves constantly — verify current +capabilities against current official docs (WebSearch, WebFetch, or a docs-lookup agent/MCP +server) before recommending; never recommend features from training-data assumptions. + +## Placement Decision Tree + +Before recommending a target, determine WHERE the finding should live. The key distinction is +**scope** — who needs this knowledge, and what happens if it is lost? + +**Two scopes:** + +- **project** — git-tracked in the consuming repo (`CLAUDE.md`, `.claude/rules/`, + `.claude/skills/`, `.claude/settings.json`). Committed, shared, survives machine loss. +- **personal** — machine-local (auto-memory under the session data directory, user settings). NOT + committed, NOT backed up. Only affects this user's sessions. + +**Decision questions (ask in order, stop at first match):** + +1. **Would another contributor (human or agent) on a fresh clone need this?** + - Technical gotchas, tooling quirks, enforcement gaps, conventions → **project** + (rules/CLAUDE.md) + - Example: "the analyzer silently skips generated files" → the relevant `.claude/rules/` file +2. **Does it protect the accuracy or quality of a specific git-tracked artifact?** + - Guard rails for skills, rules files, or documentation → **project** (in the artifact it + protects) + - Example: a source-verification guard for a skill → that skill's own SKILL.md + - These often *look like* feedback memories ("don't do X") but are quality gates for a shared + artifact — would a different agent on a fresh clone make the same mistake? Yes → project. +3. **Is it about how this specific user wants the agent to behave?** + - Interaction preferences, behavioral corrections, validated approaches → **personal** + (feedback memory) + - Laptop dies = acceptable; the next session rediscovers preferences through interaction. +4. **Is it about this user's role, expertise, or context?** + - User profile, domain knowledge level → **personal** (user memory); rediscoverable by asking +5. **Is it about ongoing work status, deadlines, or who's doing what?** + - Temporal project context → **personal** (project memory) + - Laptop dies = check git log, the issue tracker, and project boards for current state. +6. **Is it a pointer to where information lives externally?** + - External system references → **personal** (reference memory); rediscoverable by asking + +**Laptop-dies test:** if this knowledge were lost tomorrow, would the project suffer (→ commit it) +or would just this user's convenience suffer (→ memory is fine)? + +**Common misplacements to watch for:** + +- Technical gotchas in memory instead of rules — these affect ALL contributors, not just one user +- Convention decisions in memory instead of CLAUDE.md — if it's how the project works, commit it +- **Guard rails for skills/artifacts in feedback memory instead of the artifact itself** — if a + correction prevents corrupting a git-tracked file, it belongs in that file, not in memory +- "Project status" memories that duplicate git-tracked content — redundant with the file itself +- Session metrics (retro scores) — personal by default; move into the repo only if the team wants + AI quality visibility + +## Memory + +Personal learnings that persist across THIS USER's sessions on THIS machine. NOT committed, NOT +shared — either rediscoverable (preferences, references) or ephemeral (work status). + +### When to recommend + +- **Feedback memory** — the user corrected behavior, or a non-obvious approach was validated +- **User memory** — learned something about the user's role, preferences, or expertise +- **Project memory** — learned about ongoing work, deadlines, or context not in code/git +- **Reference memory** — discovered where information lives in external systems + +### Format + +Match the consumer's existing auto-memory conventions — read a sibling memory file first and follow +its naming, structure, and any index it maintains rather than inventing a new format. + +### What NOT to save + +No code patterns derivable from the codebase, no git history, no debugging recipes, no duplicates +of instruction-file content, no ephemeral task details. + +## CLAUDE.md / Rules + +Conventions and guidelines that should be documented. + +### When to recommend + +- A convention was followed implicitly but isn't documented — future sessions would rediscover it +- An existing rule was ambiguous and caused confusion — clarify it +- A rule is outdated and caused incorrect behavior — update or remove it +- A new pattern was established that should be the default going forward + +### Criteria for CLAUDE.md vs rules files + +| Target | Criteria | +| --- | --- | +| CLAUDE.md | Repo-wide, always-on context. Keep brief — reference, don't duplicate | +| `.claude/rules/*.md` | Scoped to file types. Detailed conventions, gotchas, examples | +| Neither | General industry knowledge the agent already follows | + +### Important + +Do NOT recommend content that duplicates source-of-truth files (linter configs, analyzer rule +lists, formatter settings). CLAUDE.md documents that enforcement exists; it doesn't reproduce it. + +## Hooks + +Automated enforcement for agentic workflow. The hook system evolves — verify supported events, +matcher syntax, and environment variables against the current hooks documentation. + +### When to recommend + +- A recurring mistake could be caught automatically before it happens +- A quality gate was missed that could be enforced by a hook +- A specific tool usage pattern should be blocked or warned about + +### Hook events (verify the current list before recommending) + +| Hook Event | Use Case | Matcher | +| --- | --- | --- | +| SessionStart | One-time setup when a session begins or resumes | startup, resume, clear, compact | +| Setup | Repo setup/maintenance runs (`--init`, `--init-only`, `--maintenance`) | init, maintenance | +| UserPromptSubmit | Inject context or validate before Claude processes a prompt | (none) | +| UserPromptExpansion | When a user-typed command expands into a prompt | command name | +| PreToolUse | Block or warn before a tool executes | tool name | +| PermissionRequest / PermissionDenied | Permission dialog appears / tool call auto-denied | tool name | +| PostToolUse | Validate output after a tool succeeds (e.g., format check) | tool name | +| PostToolUseFailure | React to failed tool calls | tool name | +| PostToolBatch | After a batch of parallel tool calls resolves | (none) | +| Notification | When Claude Code sends a notification | notification type | +| MessageDisplay | While assistant message text is displayed | (none) | +| SubagentStart / SubagentStop | When subagents spawn or finish | agent type | +| TaskCreated / TaskCompleted | Task-list lifecycle — creation and completion | (none) | +| TeammateIdle | When an agent-team teammate is about to go idle | (none) | +| Stop | When Claude finishes responding | (none) | +| StopFailure | When the turn ends due to an API error | error type | +| InstructionsLoaded | When a CLAUDE.md or rules file loads into context | session_start, nested_traversal, path_glob_match, include, compact | +| ConfigChange | When a config file changes during a session | config source | +| CwdChanged | When the working directory changes | (none) | +| FileChanged | When a watched file changes on disk | filenames to watch | +| WorktreeCreate / WorktreeRemove | Worktree lifecycle — environment setup, cleanup | (none) | +| PreCompact / PostCompact | Before / after context compaction | manual, auto (PreCompact only) | +| Elicitation / ElicitationResult | MCP server user-input requests and responses | MCP server name | +| SessionEnd | When a session terminates | termination reason | + +### Recommendation format + +Include: hook event, matcher pattern, what the script checks, expected behavior (block vs warn). + +## Skills + +Repeatable workflows that should be encapsulated as skills (slash commands). + +### When to recommend + +- A multi-step workflow was performed that could be triggered with a single command +- The workflow was complex enough that recreating it would require significant context +- The workflow is likely to be reused (not a one-off investigation) +- The session revealed a pattern that would benefit from bundled reference files or scripts + +### Recommendation format + +Include: proposed name, description, estimated complexity (simple/moderate/complex), pattern +category (progressive-disclosure, script-bundled, action-router), key phases. + +## Agents + +Subagent configurations that improve quality. Verify supported fields (YAML frontmatter, tool +access, model selection, isolation modes) against the current subagent docs before recommending. + +### When to recommend + +- A task was done sequentially that could have been parallelized with subagents +- A specialized analysis would benefit from a dedicated agent with restricted scope +- A recurring delegation pattern emerged that should be formalized + +### Recommendation format + +Include: agent type, description, tool access, model recommendation, when to use. + +## MCP Servers + +Model Context Protocol servers that provide tool access to external systems. + +### When to recommend + +- The session needed access to a resource that wasn't available (database, API docs, dashboard) +- A manual lookup could have been automated with an MCP server +- An existing MCP server could have been used but wasn't + +### Recommendation format + +Include: server type (stdio/SSE/HTTP), resource provided, read-only vs read-write, expected +benefit. + +## Settings / Configuration + +Changes to Claude Code settings (settings.json, permissions, environment variables). + +### When to recommend + +- A permission was repeatedly denied that should be pre-approved +- An environment variable was needed but not configured +- A sandbox or security setting needs adjustment + +### Recommendation format + +Include: which settings file (user/project), the specific setting key, proposed value, rationale. + +## Other Ecosystem Components + +Additional component types may be relevant: output styles, plugins, LSP servers, status lines, +rules files. These evolve — research current capabilities when a session reveals a need that +doesn't fit the categories above. + +## Priority Levels + +| Priority | Definition | Action | +| --- | --- | --- | +| high | Prevents recurring errors, blocks bad patterns | Implement before next session | +| medium | Improves efficiency or quality | Queue for implementation | +| low | Nice to have, minor improvement | Note for future consideration |