feat(extensions): add Roast Room, bring Codex to parity, fix audit findings
Roast Room is installed as a managed Git clone under ~/.my-ai-configuration/roast-room, shared by Claude and Codex. A personal launcher skill runs it from any folder, starts its live room when needed, and only runs when invoked by name (/roast-room, $roast-room). Codex now gets what was Claude-only before: the Caveman skill with a SessionStart hook that keeps it on, PreCompact and session-pointer hooks, execpolicy deny rules mirroring Claude's permissions.deny, and Impeccable's custom agents registered in ~/.codex/agents. The command-safety hook checks both shell dialects for Codex on Windows, where PowerShell text arrives as Bash, in both the PowerShell and Bash packages. Audit fixes: - command-safety blocks git checkout -- / restore / push --force / stash clear and find -delete, and treats heredoc bodies as text - removing a clone clears read-only Git files, git errors no longer abort the extension sync, and a lock left by a dead process is replaced - with-credential passes child flags such as -k or -d through unchanged and resolves commands from PATH - uninstall strips only owned hooks from settings.json and config.toml and keeps the selection while another client is installed; update keeps CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY; Bash merges write the same bytes as PowerShell - qmd no longer trusts a stale daemon.json after a lost start race and prunes collections of deleted repositories - Bash scripts avoid GNU-only find -printf Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
63a36d90e0
commit
b35e2254b3
48 files changed
+1059
-98
No files matched your search
+8
-7
@@ -6,18 +6,19 @@ The adapters register these events:
|
||||
|
||||
| Client | Event | Action |
|
||||
| --- | --- | --- |
|
||||
| Codex and Claude | `PreToolUse` | Block clearly destructive shell commands (`Validate-CommandSafety`/`validate-command-safety.sh`); Claude matches the `Bash` and `PowerShell` tools. |
|
||||
| Codex and Claude | `PreToolUse` | Once per session, remind the agent to run `semantic-search` before the first open search (`Show-SearchReminder`/`show-search-reminder.sh`); a no-op unless QMD's `qmd-search.mjs` is installed. Claude matches `Grep`, `Glob`, `Bash`, and `PowerShell`; Codex matches `Bash`. |
|
||||
| Codex and Claude | `PreToolUse` | Block clearly destructive shell commands (`Validate-CommandSafety`/`validate-command-safety.sh`); Claude matches the `Bash` and `PowerShell` tools, Codex matches `Bash` and on Windows checks both dialects (`-Shell unknown`), because Codex reports PowerShell script text as `Bash`. |
|
||||
| Codex and Claude | `PreToolUse` | Remind the agent to run `semantic-search` before the first open search and again after every 10 open searches without it (`Show-SearchReminder`/`show-search-reminder.sh`); a no-op unless QMD's `qmd-search.mjs` is installed. Claude matches `Grep`, `Glob`, `Bash`, and `PowerShell`; Codex matches `Bash`. |
|
||||
| Codex and Claude | `Stop` | Run the finish notification (`flashbang`). |
|
||||
| Codex and Claude | `Stop` | Push back once on an unbacked completion claim (`Check-CompletionEvidence`/`check-completion-evidence.sh`). |
|
||||
| Codex and Claude | `UserPromptSubmit` | Ask the agent to propose a durable rule when a prompt looks like a correction (`Show-CorrectionPrompt`/`show-correction-prompt.sh`). |
|
||||
| Claude | `PreCompact` | Record the compaction timestamp under the installed configuration root and point to existing workspace task state. |
|
||||
| Claude | `SessionStart` | Print an absolute pointer if the workspace's `.ai-session/state.json` exists. |
|
||||
| Codex and Claude | `PreCompact` | Record the compaction timestamp under the installed configuration root and point to existing workspace task state. |
|
||||
| Codex and Claude | `SessionStart` | Print an absolute pointer if the workspace's `.ai-session/state.json` exists. |
|
||||
| Codex | `SessionStart` | Print the installed Caveman skill (`Show-CavemanMode`/`show-caveman-mode.sh`) so caveman style is always on, as the Claude plugin does; `CAVEMAN_DEFAULT_MODE=off` disables it, and it is a no-op without the skill. |
|
||||
| Codex and Claude | `SessionStart` | Warm the QMD index and search daemon in the background (only while local QMD search is enabled). |
|
||||
|
||||
The main agent alone maintains canonical task state. Hooks never write or summarize it, print its contents, or infer completed verification. The task-state hooks use the hook event's `cwd`, falling back to the process working directory when no workspace is supplied. Malformed event data does not fall back to another project. An absent state file is a successful no-op. Legacy state under the installed configuration root is not automatically adopted; confirm its task before migrating it. The scripts do not grant permissions, bypass approvals, or replace client permission systems.
|
||||
|
||||
The search reminder never blocks a tool call. It fires on `Grep`/`Glob` or on shell commands that look like searches (`rg`, `grep`, `find`, `fd`, `git grep`, `Select-String`, recursive `Get-ChildItem`). It stays silent for the rest of the session once it has fired or once the session ran `qmd-search.mjs`. It matches command text, so wrapped or aliased searches can slip through. Per-session markers are hashed session IDs under `~/.my-ai-configuration/state/search-reminder/`; markers older than seven days are pruned.
|
||||
The search reminder never blocks a tool call. It fires on `Grep`/`Glob` or on shell commands that look like searches (`rg`, `grep`, `find`, `fd`, `git grep`, `Select-String`, recursive `Get-ChildItem`). It repeats after every 10 open searches without `qmd-search.mjs`, which also covers context lost to compaction, and stays silent while the session keeps using `qmd-search.mjs`. It matches command text, so wrapped or aliased searches can slip through. Per-session markers are hashed session IDs under `~/.my-ai-configuration/state/search-reminder/`; markers older than seven days are pruned.
|
||||
|
||||
The QMD warm-up hook uses the process working directory and starts only inside a Git repository when Node.js and the installed wrapper are available. It runs detached; wrapper errors are recorded in `~/.my-ai-configuration/qmd/warm.log`. Disabling local search removes its hook registration. See [Local QMD search](configuration.md#local-qmd-search) for daemon behavior and storage.
|
||||
|
||||
@@ -27,10 +28,10 @@ The completion hook blocks a stop only when the last message claims completion,
|
||||
|
||||
The command-safety hook parses the command (quote-aware splitting on `;`, `&&`, `||`, `|`, and newlines; nested `bash -c`, `pwsh -Command`, `cmd /c`, and `eval`) and exits 2 with a reason for `rm` with recursive and force flags in any order, `git reset --hard`, `git clean -f`, `Remove-Item -Recurse` (including `ri` and, outside Bash, the `rm`/`del`/`rd` aliases), `del`/`rd /s /q`, and `format <drive>:`. The logic lives once in `command-safety.py`; the shell wrappers only resolve Python. Called with a command argument (`-Command`/first argument), the wrappers check that command and also reject absolute paths outside the workspace. Like the client deny rules, the hook is a guard rail against accidents, not a security boundary: it sees only command text, not what scripts, aliases, or variables expand to, and it fails open on unparsable input or missing Python.
|
||||
|
||||
The Claude `permissions.deny` patterns (`Bash(rm -rf*)`, `PowerShell(Remove-Item *-Recurse*)`, and the `git reset --hard`/`git clean` patterns) match only the literal command prefix. They do not catch `rm -fr`, `rm -r -f`, or a destructive command after `cd x &&`; the PreToolUse hook covers those variants. Treat both layers as hurdles, and rely on the sandbox, approvals, and version control for real protection.
|
||||
The Claude `permissions.deny` patterns (`Bash(rm -rf*)`, `PowerShell(Remove-Item *-Recurse*)`, and the `git reset --hard`/`git clean` patterns) match only the literal command prefix. Codex gets the same backstop as execpolicy rules in `~/.codex/rules/my-ai-configuration.rules` (`prefix_rule` with `decision = "forbidden"` for `git reset --hard`, `git clean`, `rm -rf`, and `rm -fr`); prefix rules cannot express `Remove-Item ... -Recurse`. Neither layer catches `rm -r -f` or a destructive command after `cd x &&`; the PreToolUse hook covers those variants. Treat both layers as hurdles, and rely on the sandbox, approvals, and version control for real protection.
|
||||
|
||||
`Invoke-PostChangeVerification`/`invoke-post-change-verification.sh` is an unregistered utility that explicitly runs the repository build when invoked; it is not an automatic requirement after each change.
|
||||
|
||||
All Python-based hooks find their interpreter through `Resolve-Python.ps1`/`resolve-python.sh`, which skip PATH entries that cannot run Python 3.11+ (such as the Windows Store alias). Without Python these hooks are skipped silently; `doctor` reports that case as a failure.
|
||||
|
||||
`Test-SessionConfig`/`test-session-config.sh` checks required repository inputs and is called by the build. Build and doctor do not execute the registered notification or session-state hooks. Claude's status line is a separate `statusLine` command, not a hook event.
|
||||
`Test-SessionConfig`/`test-session-config.sh` checks required repository inputs and is called by the build. Build and doctor do not execute the registered notification or session-state hooks. Claude's status line is a separate `statusLine` command, not a hook event. Codex cannot run a status-line script; its `[tui] status_line` in the managed `config.toml` shows the equivalent built-in items (model, reasoning, limits, project, branch, and context use).
|
||||
+4
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
The user-level plugin manifest is `adapters/plugins.tsv`. It maps each logical extension to the client-specific plugin, skill, or MCP installation method.
|
||||
|
||||
The current baseline includes Ponytail, i-have-adhd, Superpowers, Context7, Caveman (Claude only), MCPorter, Humanizer, Impeccable, Apple Design, REA, and Modern Web Guidance. Install and update operate at user scope and show an extension selector unless running a dry run or Quickupdate. Selections are collected before configuration changes. Both rebuild generated packages before synchronizing client files and extensions. Choosing Auto for local search can prepare and benchmark QMD earlier, during option selection.
|
||||
The current baseline includes Ponytail, i-have-adhd, Superpowers, Context7, Caveman, MCPorter, Humanizer, Impeccable, Apple Design, REA, Modern Web Guidance, and Roast Room. Install and update operate at user scope and show an extension selector unless running a dry run or Quickupdate. Selections are collected before configuration changes. Both rebuild generated packages before synchronizing client files and extensions. Choosing Auto for local search can prepare and benchmark QMD earlier, during option selection.
|
||||
|
||||
### Automatic workflow integration
|
||||
|
||||
@@ -47,7 +47,9 @@ The check passes only if documentation retrieval returns relevant content with a
|
||||
|
||||
Codex's local `plugins` and `marketplaces` tables survive configuration synchronization, along with other root keys, extra fields in managed tables, other unmanaged tables, and unowned array tables; changed files are backed up. Cached plugin files alone are not treated as proof of installation: selection uses the client CLI's installed list. If an older update removed the registrations, inspect the backed-up `config.toml` under `~/.codex/backups/` and reselect the affected plugins on the next update.
|
||||
|
||||
Caveman is installed for Claude only: a `-` in the `codex_method` column marks a Claude-only extension, which the Codex selector omits and which install and update remove from Codex when this setup installed it there. Humanizer and Impeccable are downloaded to Codex as skill payloads from the GitHub sources in the manifest, without running upstream installers. Both appear in the extension selector for Codex. Apple Design has no plugin marketplace, so a `-` in `claude_plugin` together with `codex_method` `skill` installs the same payload for Claude into `~/.claude/skills/apple-design`. Each update downloads the latest upstream commit and records its revision. Impeccable's design-detector hooks run in every project for both clients: Claude through the plugin's own hooks, Codex through the registered `Invoke-ImpeccableHook`/`invoke-impeccable-hook.sh` wrapper (see `shared/hooks/README.md`). No per-project `impeccable hooks on` is needed; `impeccable hooks off` still disables a project. Ownership is recorded in `~/.my-ai-configuration/extensions.json`. Skill files are tracked by hash; modified or foreign files are retained with a warning. Existing installations from before ownership tracking are not automatically adopted.
|
||||
Roast Room uses the `clone` method: install keeps a shallow Git clone of the manifest's GitHub source in `~/.my-ai-configuration/<folder>` and update fast-forwards it unless tracked files changed locally. Both clients share the clone. The personal launcher skill `shared/skills/extensions/roast-room` makes `/roast-room` (Claude Code) and `$roast-room` (Codex) work from any folder; `disable-model-invocation: true` and Codex's `agents/openai.yaml` (`allow_implicit_invocation: false`) keep it manual-only. It it starts the live room (`node app/server.mjs`, port 4730) when it is not running and writes sessions into the clone, where the room reads them. Outside the clone, seats run through the upstream fallback (a general subagent given the seat's agent file) because the `council-*` agents are registered only in a Claude Code session started there. As a personal skill it also shadows the clone's own `roast-room` skill, so the board never starts on its own. `/newroaster` still needs a Claude Code session started in the clone. Uninstall removes the clone only when it holds no saved sessions, `.env` files, or other local files.
|
||||
|
||||
Caveman is a Claude plugin and a Codex skill payload (`skills/caveman` from the same repository); a registered Codex `SessionStart` hook prints it so caveman style is always on in Codex too. A `-` in the `codex_method` column marks a Claude-only extension, which the Codex selector omits and which install and update remove from Codex when this setup installed it there; no current entry uses it. Humanizer and Impeccable are downloaded to Codex as skill payloads from the GitHub sources in the manifest, without running upstream installers. Both appear in the extension selector for Codex. Apple Design has no plugin marketplace, so a `-` in `claude_plugin` together with `codex_method` `skill` installs the same payload for Claude into `~/.claude/skills/apple-design`. Each update downloads the latest upstream commit and records its revision. For Codex, a skill payload's `agents/*.toml` files are also written to `~/.codex/agents/`, where Codex loads custom agents, so Impeccable's finish, motion, asset, documenter, and edit-applier agents are registered as on Claude; they are tracked by hash and removed with the skill. Impeccable's design-detector hooks run in every project for both clients: Claude through the plugin's own hooks, Codex through the registered `Invoke-ImpeccableHook`/`invoke-impeccable-hook.sh` wrapper (see `shared/hooks/README.md`). No per-project `impeccable hooks on` is needed; `impeccable hooks off` still disables a project. Ownership is recorded in `~/.my-ai-configuration/extensions.json`. Skill files are tracked by hash; modified or foreign files are retained with a warning. Existing installations from before ownership tracking are not automatically adopted.
|
||||
|
||||
|
||||
### Setup options outside the extension selector
|
||||
|
||||
@@ -63,6 +63,7 @@ On Windows, an unavailable profile-folder lookup falls back to PowerShell's home
|
||||
| `tests/test-build-validation.ps1`, `tests/test-build-validation.sh` | Validate build failures and generated output. |
|
||||
| `tests/test-capabilities.ps1`, `tests/test-capabilities.sh` | Check that Python resolution skips a broken interpreter on PATH (such as the Windows Store alias) and that the capability check reports the resolved interpreter. |
|
||||
| `tests/test-rule-structure.py` | Validate the rule-structure checks in `checks/validate-config.py`: level-1 headings, unique titles, complete indexes, and existing routing targets. |
|
||||
| `tests/test-caveman-hook.py` | Validate the Codex Caveman session hook in both shells: it prints the installed skill without frontmatter, is silent without the skill, and honors `CAVEMAN_DEFAULT_MODE=off`. |
|
||||
| `tests/test-command-safety.py` | Validate the command-safety hook: destructive Bash, PowerShell, and cmd variants are blocked, ordinary commands pass, unusable input fails open, and both shell wrappers pass stdin and exit codes through. |
|
||||
| `tests/test-install-guards.ps1`, `tests/test-install-guards.sh` | Validate install and update guard conditions. |
|
||||
| `tests/test-config-effects.py` | Check that generated limits and permissions take effect: Codex keeps the V1 multi-agent implementation that honors `agents.max_depth`; with `AI_CONFIG_LIVE_TESTS=1`, short Haiku sessions confirm that Claude withholds the Agent tool from subagents, refuses subagents above the concurrency limit, and blocks `git reset --hard` in every shell tool. |
|
||||
|
||||
@@ -10,6 +10,7 @@ The current structure is organized by purpose:
|
||||
- `implementation/`: SQL, unit-test, integration-test, and end-to-end or UI test writing
|
||||
- `diagnostics/`: read-only incident investigation from Grafana, Azure DevOps, and SQL Server evidence, and before/after performance measurement
|
||||
- `work-items/`: work-item definition and verification, including Azure DevOps items (fact checking lives in `research`)
|
||||
- `extensions/`: launchers for managed extensions (currently `roast-room`, run only by name: `/roast-room` in Claude Code, `$roast-room` in Codex)
|
||||
- `media/`: images, screenshots, video, and audio: formats, delivery and performance, captions and transcripts, playback, social-preview metadata, practical marketing workflows, design tools, and common mistakes
|
||||
|
||||
General planning, debugging, code review, and completion verification workflows come from Superpowers, so the catalog does not duplicate their triggers. The remaining skills cover focused domains Superpowers does not.
|
||||
|
||||
Reference in new issue
Block a user