Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"metadata": {
"description": "Claude Code plugins by Alexander Grebennik",
"version": "1.16.19"
"version": "1.16.20"
},
"plugins": [
{
Expand All @@ -19,7 +19,7 @@
"source": "git-subdir",
"url": "slbug/claude-ruby-grape-rails",
"path": "plugins/ruby-grape-rails",
"ref": "v1.16.19"
"ref": "v1.16.20"
},
"relevance": {
"topic": "Rails",
Expand Down
22 changes: 16 additions & 6 deletions .claude/rules/agent-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,22 @@ one model response count as one turn. The `Complete analysis by turn
~M` rule is satisfied when the agent's M-th model invocation has
completed.

## Foreground Dispatch

Plugin agents are spawned foreground only. No skill body, fanout
template, or example MAY pass `run_in_background: true` on an
`Agent(...)` call. Parallel = multiple Agent tool calls in one
message; never the background flag.
## Agent Dispatch

No skill body, fanout template, or example MAY pass
`run_in_background: true` on an `Agent(...)` call. Parallel = multiple
Agent tool calls in one message; never the background flag.

| Session | Runtime behavior |
|---|---|
| Interactive terminal, VS Code, desktop (fork mode on, the default) | Main-conversation subagents start in the background. The Agent tool exposes no `run_in_background` parameter. Completion arrives as a notification |
| `claude -p`, Agent SDK, or `CLAUDE_CODE_FORK_SUBAGENT=0` | Claude chooses foreground or background. The flag exists — the prohibition above applies |

Every skill that spawns an agent and consumes its result — fanout or
single agent — MUST carry an explicit "wait for the agent(s) to
complete" step between the spawn step and the first artifact read,
Artifact Recovery step, or use of the return text. Without it, a
background agent's result is consumed before it exists.

## Memory

Expand Down
13 changes: 13 additions & 0 deletions .claude/rules/hook-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ Add or update a short policy comment near the top of the hook when behavior chan
ignored on `clear`/`compact`). Use the JSON form to combine it with
`additionalContext`. Read input `session_title` first to avoid clobbering
a user `/rename` (see `check-scratchpad.sh`)
- `UserPromptSubmit` receives a typed skill or slash command as the
line the user typed (`/rb:plan ...`, `/ruby-grape-rails:plan ...`),
NOT the expanded skill body, and runs before the expansion. Match
both prefixes on `.prompt` (see `session-title.sh`). Use
`UserPromptExpansion` to match on the resolved command name
- `PostToolUse` command hooks get 10 seconds, whatever their `timeout`,
when the user ends the turn with `Ctrl+Enter` while the tool runs.
CC kills a hook still running at that point. Only `async: true` hooks
outlive it. Keep every blocking `PostToolUse` hook safe to kill
mid-run — no partial writes, temp files cleaned by `trap <fn> EXIT`.
Register cleanup on `EXIT` only: bash runs the `EXIT` trap when a
signal terminates it, while a cleanup-only handler on `HUP`/`INT`/`TERM`
swallows the signal and the script continues to its normal exit
- `SubagentStart` uses `hookSpecificOutput.additionalContext` to inject context into subagents
- `PostToolUseFailure` uses `hookSpecificOutput.additionalContext` for debugging hints

Expand Down
7 changes: 6 additions & 1 deletion .claude/rules/skill-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,14 @@ skills/{name}/
subdir-per-topic (research per-aspect). See
`plugins/ruby-grape-rails/references/run-manifest.md` for schema,
staleness rules, and write protocol.
- Agent dispatch: foreground only. Skill bodies MUST NOT pass
- Agent dispatch: skill bodies MUST NOT pass
`run_in_background: true` on any `Agent(...)` call. Parallel = many
Agent tool calls in a single message, NOT the background flag.
Interactive sessions start main-conversation subagents in the
background regardless, so every skill that spawns an agent and
consumes its result — fanout or single agent — MUST state an explicit
wait-for-completion step before its first artifact read. See
`.claude/rules/agent-development.md` § "Agent Dispatch".

## Colon Naming

Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/cc-changelog/references/analysis-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Imperative-only. Map CC changelog entries to specific plugin components.
| `marketplace.json` schema | `.claude-plugin/marketplace.json` |
| `${CLAUDE_PLUGIN_DATA}` | `plugins/ruby-grape-rails/hooks/scripts/setup-dirs.sh`, `plugins/ruby-grape-rails/hooks/scripts/log-progress.sh` |
| `${CLAUDE_PLUGIN_ROOT}` | All hooks.json paths |
| `settings.json` keys | `plugins/ruby-grape-rails/settings.json` ships only `subagentStatusLine`. Documented supported keys per CC docs: `agent` + `subagentStatusLine`. New documented keys → INFO unless plugin adopts. |
| `settings.json` keys | Plugin ships no `settings.json`. `subagentStatusLine` is removed from CC (loads, no effect). A plugin's `agent` setting is deprecated. New documented plugin-level keys → INFO unless plugin adopts. |
| Plugin validation changes | CI workflow |

### Tool System
Expand Down
4 changes: 4 additions & 0 deletions .claude/skills/docs-check/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ Write findings to .claude/docs-check/reports/{surface}-report.md
Agent body owns BLOCKER/WARNING/INFO/PASS classification, "no large
docs paste" rule, "stop after returning". Call site stays minimal.

Wait for every `docs-surface-validator` to complete before step 7 —
interactive sessions run them in the background and notify on
completion. A report is MISSING only after its worker has completed.

### 6. Structural Baseline (Always)

Keep these results in view while synthesizing:
Expand Down
6 changes: 3 additions & 3 deletions .claude/skills/docs-check/references/doc-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Primary cached pages (plugin-critical):
| `env-vars.md` | Environment variable contract: `CLAUDE_PLUGIN_ROOT`, `CLAUDE_PLUGIN_DATA`, `CLAUDE_PROJECT_DIR`, etc. |
| `errors.md` | Error taxonomy driving hook failure classification and `StopFailure` matchers |
| `cli-reference.md` | `claude plugin validate`, `--plugin-dir`, flags used by eval/doctor scripts |
| `statusline.md` | Plugin-level `subagentStatusLine` setting schema |
| `statusline.md` | Status line surface — confirms no plugin-level status line setting has returned |
| `discover-plugins.md` | Marketplace install flow, `git-subdir` path resolution |
| `sandboxing.md` | Bash sandboxing semantics affecting hook side-effect guarantees |
| `context-window.md` | PreCompact/PostCompact hook timing and payload |
Expand Down Expand Up @@ -70,7 +70,7 @@ Additional cached pages (context/reference):
| `permission-modes.md` | Permission modes and implications for plugins |
| `permissions.md` | Comprehensive permissions guide |
| `fast-mode.md` | `/fast` semantics and eligible models — relates to `effort: max` skill settings |
| `output-styles.md` | Output-style surface adjacent to statusline + `subagentStatusLine` |
| `output-styles.md` | Output-style surface adjacent to the status line |
| `troubleshooting.md` | Hook failure diagnosis patterns |
| `common-workflows.md` | Plan/Work/Review lifecycle comparison with `/rb:*` workflows |
| `whats-new/index.md` | Weekly release notes index — `cc-changelog` + docs-check feed |
Expand Down Expand Up @@ -194,7 +194,7 @@ Use:
Questions this answers:

- Is the `claude plugin ...` subcommand used by doctor/eval still documented?
- Does plugin-level `subagentStatusLine` match the documented schema?
- Do docs reintroduce a plugin-level status line or plugin `settings.json` key? The plugin ships none.

### Built-in Feature Overlap

Expand Down
6 changes: 4 additions & 2 deletions .claude/skills/docs-check/references/validation-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,10 @@ Checks for `.claude-plugin/plugin.json`:
- metadata: `$schema`, `name`, `displayName`, `version`,
`description`, `author`, `homepage`, `repository`, `license`,
`keywords`, `metadata`, `defaultEnabled`, `dependencies`
- behavior: `settings` (only `agent` and `subagentStatusLine` take
effect), `userConfig`, `channels`
- behavior: `userConfig`, `channels`. The plugin ships no
`settings.json` — `subagentStatusLine` is removed (loads, no
effect) and a plugin's `agent` setting is deprecated (warns in
`claude plugin validate`)
- components: `skills`, `commands`, `agents`, `hooks`, `mcpServers`,
`lspServers`, `outputStyles`, `workflows`
- `experimental.themes`, `experimental.monitors`, `experimental.evals`
Expand Down
1 change: 1 addition & 0 deletions .claude/skills/session-deep-dive/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Spawn one analysis subagent per transcript. Include:
- reminder that metrics are heuristic

Write each report to `.claude/session-analysis/{short_id}-report.md`.
Wait for every subagent to complete before step 5.

### 5. Compress When Needed

Expand Down
8 changes: 2 additions & 6 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ PR review: flag prose that violates this rule.
| Hooks | `plugins/ruby-grape-rails/hooks/hooks.json` + `scripts/*` | Shell + Ruby triggered by CC events (PostToolUse, PostToolUseFailure, SessionStart, etc) |
| Executables | `plugins/ruby-grape-rails/bin/*` | Plugin CLIs added to Bash PATH; no extension; chmod +x; mixed bash + Ruby |
| Library | `plugins/ruby-grape-rails/lib/*.rb` | End-user runtime modules (Ruby ≥ 3.4, stdlib only) |
| Plugin settings | `plugins/ruby-grape-rails/settings.json` | Only `agent` + `subagentStatusLine` keys supported per CC docs |
| Eval | `lab/eval/` | Deterministic Python eval framework for plugin quality |
| Contributor tooling | `.claude/` | NOT shipped; `.claude/rules/` (auto-loaded path-scoped rules), `.claude/skills/` (contributor-only skills) |

### Currently-shipped binaries

| Binary | Purpose |
|---|---|
| `subagent-statusline` (bash) | advisory statusline renderer; fail-open |
| `detect-stack` (Ruby) | `/rb:init` stack detection |
| `extract-permissions` (Ruby) | transcript-based Bash permission recommender |
| `resolve-base-ref` (bash) | eval-able BASE_REF resolver for diff comparisons |
Expand Down Expand Up @@ -151,10 +149,8 @@ the PR.
`hooks/hooks.json` references, sourcing in other `*.sh` files
(`source ".../LIB_NAME.sh"`), matching tests under
`lab/eval/tests/test_runtime_scripts.py`.
- **`bin/<exec>` renamed / added / removed** → also check
`plugins/ruby-grape-rails/settings.json` (statusline command path),
`plugins/ruby-grape-rails/hooks/scripts/install-statusline-wrapper.sh`,
any skill/agent/script that shells out, `CLAUDE.md` "Executables"
- **`bin/<exec>` renamed / added / removed** → also check any
skill/agent/script that shells out, `CLAUDE.md` "Executables"
enumeration.
- **New skill / agent / hook added** → also check corresponding
`lab/eval/evals/`, `lab/eval/triggers/`, `lab/eval/dimensions/`
Expand Down
48 changes: 14 additions & 34 deletions .github/instructions/plugin-review.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,14 @@ Exception files (human-facing, narrative OK): `README.md`,
the shebang; rescue at process boundary, never use `Kernel#eval` /
`Kernel#system` with unvalidated input (Iron Law 12)
- Advisory fail-open pattern (empty stdout, exit 0 on any error) is
intentional for statusline and similar advisory executables — do NOT
flag as "missing error handling"
intentional for advisory executables — do NOT flag as "missing error
handling"
- From `hooks.json`, `.mcp.json`, `monitors/monitors.json`, template
expansion is supported; reference bundled scripts via
`${CLAUDE_PLUGIN_ROOT}/...`

### Currently shipped binaries (plugins/ruby-grape-rails/bin/)

- `subagent-statusline` (bash) — advisory, fail-open. Empty stdout +
exit 0 on any error. Referenced from `settings.json` indirectly via
`~/.claude/ruby-grape-rails-subagent-statusline` wrapper
- `detect-stack` (Ruby) — `/rb:init` stack detection. Outputs
`key=value` pairs; treats unreadable manifests as absent
- `extract-permissions` (Ruby) — analyzes session transcripts to
Expand Down Expand Up @@ -288,32 +285,12 @@ Notes:

## Plugin Settings (plugins/**/settings.json)

- Only `agent` and `subagentStatusLine` keys are supported per CC docs
(`plugins-reference.md` standard plugin layout)
- Unknown keys are silently ignored by CC — do NOT flag partial coverage
of other settings fields
- `subagentStatusLine.command` does NOT expand `${CLAUDE_PLUGIN_ROOT}`
and CC does NOT export `CLAUDE_PLUGIN_ROOT` to the statusline
subprocess nor add plugin `bin/` to its PATH. Plugin-bundled
statusline scripts therefore require a SessionStart hook that writes
a small wrapper at `~/.claude/<plugin-id>-subagent-statusline`
pointing at the current absolute plugin path. The plugin
`settings.json` then references that stable user-home path. The
wrapper must be rewritten only when its content differs from the
desired content (plugin version changes change the absolute path).
Do NOT flag this indirection as unnecessary — it is required by the
documented CC substitution scope

### subagentStatusLine payload schema (as observed, not fully documented)

The statusline subprocess receives base hook fields plus `columns` and a
`tasks[]` array. Each task provides `id`, `type` (e.g. `local_agent`),
`status`, `description`, `label` (usually the same text as `description`),
`startTime` as epoch milliseconds (13-digit integer), `tokenCount`,
`tokenSamples` as a number array, and `cwd`. The docs also list `.name`
but current CC payloads do NOT include it — match emoji/label from
`.label` first, falling back to `.description` and finally `.name`. Do
NOT flag the fallback chain as over-engineered.
- The plugin ships NO `settings.json`. Flag any PR that adds one
- `subagentStatusLine` is removed from CC — the key loads and has no
effect. Flag any reintroduced statusline script, wrapper, or setting
- A plugin's `agent` setting is deprecated in CC — it still applies and
warns at startup, in `claude plugin list`, and in
`claude plugin validate`. Flag any PR that adds it

## Do NOT Flag

Expand All @@ -322,8 +299,6 @@ NOT flag the fallback chain as over-engineered.
- `omitClaudeMd: true` on specialist agents (intentional context savings)
- Colon-namespaced skill names like `rb:plan` (known compatibility item)
- Advisory fail-open (empty stdout, exit 0) in `bin/` and advisory hooks
- Partial coverage in plugin `settings.json` (only `agent` and
`subagentStatusLine` are documented as supported)
- Pointer-only links to `references/preferences/tool-batching.md`
from skill or agent bodies (canonical examples doc for the
tool-batching preference). Pointer = the link without restating
Expand Down Expand Up @@ -399,7 +374,12 @@ NOT flag the fallback chain as over-engineered.
one consolidated verdict per artifact.
- `run_in_background: true` on any `Agent(...)` call in shipped
skill bodies, fanout templates, or example snippets — flag as
BLOCKER. Plugin agents dispatch foreground only.
BLOCKER.
- A skill — fanout or single agent — whose spawn step is followed by an
artifact read, Artifact Recovery step, or use of the return text with
no explicit wait-for-completion step between them. Interactive
sessions run main-conversation subagents in the background, so the
read would precede the result.
- Raw `mv`, `cp`, `jq -i`, `rm`, or improvised shell against any
`RUN-CURRENT.json` path or per-agent artifact path in shipped skill
bodies, hook scripts, or examples — flag as BLOCKER. All manifest
Expand Down
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,35 @@ Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.16.20] - 2026-11-13

### Removed

- Custom subagent status line. Claude Code removed the
`subagentStatusLine` setting, so subagent rows always use the default
look. The plugin no longer ships `settings.json`,
`bin/subagent-statusline`, or the `install-statusline-wrapper.sh`
`SessionStart` hook. A leftover
`~/.claude/ruby-grape-rails-subagent-statusline` wrapper is unused and
safe to delete by hand.

### Changed

- `/rb:review`, `/rb:brainstorm`, `/rb:investigate`, and the
`/rb:research` provenance step state that spawned agents run in the
background in interactive sessions and that results are read only
after every agent completes. The "foreground" wording is dropped from
the `/rb:plan` and `/rb:brainstorm` spawn steps.

### Fixed

- `format-ruby.sh` removes its `ruby-format.*` stderr capture when the
hook is killed or exits mid-formatter, instead of only after the
formatter returns.
- Contributor tooling: `markdownlint-cli` raised to `^0.50.0`, with
`overrides` pinning `minimatch` and `katex` to patched releases.
`npm audit` reports 0 vulnerabilities.

## [1.16.19] - 2026-10-01

### Changed
Expand Down Expand Up @@ -3150,7 +3179,8 @@ Prevents context exhaustion with 3 compression strategies
- 100+ reference documents across all skill domains
- Plugin development guide with size guidelines and checklists

[Unreleased]: https://github.com/slbug/claude-ruby-grape-rails/compare/v1.16.19...HEAD
[Unreleased]: https://github.com/slbug/claude-ruby-grape-rails/compare/v1.16.20...HEAD
[1.16.20]: https://github.com/slbug/claude-ruby-grape-rails/compare/v1.16.19...v1.16.20
[1.16.19]: https://github.com/slbug/claude-ruby-grape-rails/compare/v1.16.18...v1.16.19
[1.16.18]: https://github.com/slbug/claude-ruby-grape-rails/compare/v1.16.17...v1.16.18
[1.16.17]: https://github.com/slbug/claude-ruby-grape-rails/compare/v1.16.16...v1.16.17
Expand Down
Loading
Loading