Skip to content

Commit 4c20718

Browse files
committed
fix
1 parent ef959ae commit 4c20718

30 files changed

Lines changed: 2567 additions & 1232 deletions

File tree

.claude/.skiller.json

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,24 @@
399399
"pluginId": "compound-engineering@every-marketplace",
400400
"pluginVersion": "2.40.0",
401401
"sourceKind": "skill",
402-
"sourceRelPath": "skills/generate_command",
403-
"destRelPath": "generate_command"
402+
"sourceRelPath": "skills/git-clean-gone-branches",
403+
"destRelPath": "git-clean-gone-branches"
404+
},
405+
{
406+
"sourceType": "plugin",
407+
"pluginId": "compound-engineering@every-marketplace",
408+
"pluginVersion": "2.40.0",
409+
"sourceKind": "skill",
410+
"sourceRelPath": "skills/git-commit-push-pr",
411+
"destRelPath": "git-commit-push-pr"
412+
},
413+
{
414+
"sourceType": "plugin",
415+
"pluginId": "compound-engineering@every-marketplace",
416+
"pluginVersion": "2.40.0",
417+
"sourceKind": "skill",
418+
"sourceRelPath": "skills/git-commit",
419+
"destRelPath": "git-commit"
404420
},
405421
{
406422
"sourceType": "plugin",
@@ -498,6 +514,14 @@
498514
"sourceRelPath": "agents/review/maintainability-reviewer.md",
499515
"destRelPath": "maintainability-reviewer"
500516
},
517+
{
518+
"sourceType": "plugin",
519+
"pluginId": "compound-engineering@every-marketplace",
520+
"pluginVersion": "2.40.0",
521+
"sourceKind": "skill",
522+
"sourceRelPath": "skills/onboarding",
523+
"destRelPath": "onboarding"
524+
},
501525
{
502526
"sourceType": "plugin",
503527
"pluginId": "compound-engineering@every-marketplace",
@@ -615,8 +639,8 @@
615639
"pluginId": "compound-engineering@every-marketplace",
616640
"pluginVersion": "2.40.0",
617641
"sourceKind": "skill",
618-
"sourceRelPath": "skills/resolve-pr-parallel",
619-
"destRelPath": "resolve-pr-parallel"
642+
"sourceRelPath": "skills/resolve-pr-feedback",
643+
"destRelPath": "resolve-pr-feedback"
620644
},
621645
{
622646
"sourceType": "plugin",

.codex/skills/ce-compound/SKILL.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ Based on problem type, these agents can enhance documentation:
427427
### When to Invoke
428428
- **Auto-triggered** (optional): Agents can run post-documentation for enhancement
429429
- **Manual trigger**: User can invoke agents after /ce:compound completes for deeper review
430-
- **Customize agents**: Edit `compound-engineering.local.md` or invoke the `setup` skill to configure which review agents are used across all workflows
431430

432431
## Related Commands
433432

.codex/skills/ce-review/SKILL.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Routing rules:
7373

7474
## Reviewers
7575

76-
8 personas in two tiers, plus CE-specific agents. See [persona-catalog.md](./references/persona-catalog.md) for the full catalog.
76+
13 reviewer personas in layered conditionals, plus CE-specific agents. See [persona-catalog.md](./references/persona-catalog.md) for the full catalog.
7777

7878
**Always-on (every review):**
7979

@@ -85,7 +85,7 @@ Routing rules:
8585
| `compound-engineering:review:agent-native-reviewer` | Verify new features are agent-accessible |
8686
| `compound-engineering:research:learnings-researcher` | Search docs/solutions/ for past issues related to this PR |
8787

88-
**Conditional (selected per diff):**
88+
**Cross-cutting conditional (selected per diff):**
8989

9090
| Agent | Select when diff touches... |
9191
|-------|---------------------------|
@@ -95,6 +95,16 @@ Routing rules:
9595
| `compound-engineering:review:data-migrations-reviewer` | Migrations, schema changes, backfills |
9696
| `compound-engineering:review:reliability-reviewer` | Error handling, retries, timeouts, background jobs |
9797

98+
**Stack-specific conditional (selected per diff):**
99+
100+
| Agent | Select when diff touches... |
101+
|-------|---------------------------|
102+
| `compound-engineering:review:dhh-rails-reviewer` | Rails architecture, service objects, session/auth choices, or Hotwire-vs-SPA boundaries |
103+
| `compound-engineering:review:kieran-rails-reviewer` | Rails application code where conventions, naming, and maintainability are in play |
104+
| `compound-engineering:review:kieran-python-reviewer` | Python modules, endpoints, scripts, or services |
105+
| `compound-engineering:review:kieran-typescript-reviewer` | TypeScript components, services, hooks, utilities, or shared types |
106+
| `compound-engineering:review:julik-frontend-races-reviewer` | Stimulus/Turbo controllers, DOM events, timers, animations, or async UI flows |
107+
98108
**CE conditional (migration-specific):**
99109

100110
| Agent | Select when diff includes migration files |
@@ -104,7 +114,7 @@ Routing rules:
104114

105115
## Review Scope
106116

107-
Every review spawns all 3 always-on personas plus the 2 CE always-on agents, then adds applicable conditionals. The tier model naturally right-sizes: a small config change triggers 0 conditionals = 5 reviewers. A large auth feature triggers security + maybe reliability = 7 reviewers.
117+
Every review spawns all 3 always-on personas plus the 2 CE always-on agents, then adds whichever cross-cutting and stack-specific conditionals fit the diff. The model naturally right-sizes: a small config change triggers 0 conditionals = 5 reviewers. A Rails auth feature might trigger security + reliability + kieran-rails + dhh-rails = 9 reviewers.
108118

109119
## Protected Artifacts
110120

@@ -314,7 +324,9 @@ Pass this to every reviewer in their spawn prompt. Intent shapes *how hard each
314324

315325
### Stage 3: Select reviewers
316326

317-
Read the diff and file list from Stage 1. The 3 always-on personas and 2 CE always-on agents are automatic. For each conditional persona in [persona-catalog.md](./references/persona-catalog.md), decide whether the diff warrants it. This is agent judgment, not keyword matching.
327+
Read the diff and file list from Stage 1. The 3 always-on personas and 2 CE always-on agents are automatic. For each cross-cutting and stack-specific conditional persona in [persona-catalog.md](./references/persona-catalog.md), decide whether the diff warrants it. This is agent judgment, not keyword matching.
328+
329+
Stack-specific personas are additive. A Rails UI change may warrant `kieran-rails` plus `julik-frontend-races`; a TypeScript API diff may warrant `kieran-typescript` plus `api-contract` and `reliability`.
318330

319331
For CE conditional agents, check if the diff includes files matching `db/migrate/*.rb`, `db/schema.rb`, or data backfill scripts.
320332

@@ -328,6 +340,8 @@ Review team:
328340
- agent-native-reviewer (always)
329341
- learnings-researcher (always)
330342
- security -- new endpoint in routes.rb accepts user-provided redirect URL
343+
- kieran-rails -- controller and Turbo flow changed in app/controllers and app/views
344+
- dhh-rails -- diff adds service objects around ordinary Rails CRUD
331345
- data-migrations -- adds migration 20260303_add_index_to_orders
332346
- schema-drift-detector -- migration files present
333347
```
@@ -408,9 +422,11 @@ Before delivering the review, verify:
408422
5. **Protected artifacts are respected.** Discard any findings that recommend deleting or gitignoring files in `docs/brainstorms/`, `docs/plans/`, or `docs/solutions/`.
409423
6. **Findings don't duplicate linter output.** Don't flag things the project's linter/formatter would catch (missing semicolons, wrong indentation). Focus on semantic issues.
410424

411-
## Language-Agnostic
425+
## Language-Aware Conditionals
426+
427+
This skill uses stack-specific reviewer agents when the diff clearly warrants them. Keep those agents opinionated. They are not generic language checkers; they add a distinct review lens on top of the always-on and cross-cutting personas.
412428

413-
This skill does NOT use language-specific reviewer agents. Persona reviewers adapt their criteria to the language/framework based on project context (loaded automatically). This keeps the skill simple and avoids maintaining parallel reviewers per language.
429+
Do not spawn them mechanically from file extensions alone. The trigger is meaningful changed behavior, architecture, or UI state in that stack.
414430

415431
## After Review
416432

.codex/skills/ce-review/references/persona-catalog.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Persona Catalog
22

3-
8 reviewer personas organized in two tiers, plus CE-specific agents. The orchestrator uses this catalog to select which reviewers to spawn for each review.
3+
13 reviewer personas organized into always-on, cross-cutting conditional, and stack-specific conditional layers, plus CE-specific agents. The orchestrator uses this catalog to select which reviewers to spawn for each review.
44

55
## Always-on (3 personas + 2 CE agents)
66

@@ -33,6 +33,18 @@ Spawned when the orchestrator identifies relevant patterns in the diff. The orch
3333
| `data-migrations` | `compound-engineering:review:data-migrations-reviewer` | Migration files, schema changes, backfill scripts, data transformations |
3434
| `reliability` | `compound-engineering:review:reliability-reviewer` | Error handling, retry logic, circuit breakers, timeouts, background jobs, async handlers, health checks |
3535

36+
## Stack-Specific Conditional (5 personas)
37+
38+
These reviewers keep their original opinionated lens. They are additive with the cross-cutting personas above, not replacements for them.
39+
40+
| Persona | Agent | Select when diff touches... |
41+
|---------|-------|---------------------------|
42+
| `dhh-rails` | `compound-engineering:review:dhh-rails-reviewer` | Rails architecture, service objects, authentication/session choices, Hotwire-vs-SPA boundaries, or abstractions that may fight Rails conventions |
43+
| `kieran-rails` | `compound-engineering:review:kieran-rails-reviewer` | Rails controllers, models, views, jobs, components, routes, or other application-layer Ruby code where clarity and conventions matter |
44+
| `kieran-python` | `compound-engineering:review:kieran-python-reviewer` | Python modules, endpoints, services, scripts, or typed domain code |
45+
| `kieran-typescript` | `compound-engineering:review:kieran-typescript-reviewer` | TypeScript components, services, hooks, utilities, or shared types |
46+
| `julik-frontend-races` | `compound-engineering:review:julik-frontend-races-reviewer` | Stimulus/Turbo controllers, DOM event wiring, timers, async UI flows, animations, or frontend state transitions with race potential |
47+
3648
## CE Conditional Agents (migration-specific)
3749

3850
These CE-native agents provide specialized analysis beyond what the persona agents cover. Spawn them when the diff includes database migrations, schema.rb, or data backfills.
@@ -45,6 +57,7 @@ These CE-native agents provide specialized analysis beyond what the persona agen
4557
## Selection rules
4658

4759
1. **Always spawn all 3 always-on personas** plus the 2 CE always-on agents.
48-
2. **For each conditional persona**, the orchestrator reads the diff and decides whether the persona's domain is relevant. This is a judgment call, not a keyword match.
49-
3. **For CE conditional agents**, spawn when the diff includes migration files (`db/migrate/*.rb`, `db/schema.rb`) or data backfill scripts.
50-
4. **Announce the team** before spawning with a one-line justification per conditional reviewer selected.
60+
2. **For each cross-cutting conditional persona**, the orchestrator reads the diff and decides whether the persona's domain is relevant. This is a judgment call, not a keyword match.
61+
3. **For each stack-specific conditional persona**, use file types and changed patterns as a starting point, then decide whether the diff actually introduces meaningful work for that reviewer. Do not spawn language-specific reviewers just because one config or generated file happens to match the extension.
62+
4. **For CE conditional agents**, spawn when the diff includes migration files (`db/migrate/*.rb`, `db/schema.rb`) or data backfill scripts.
63+
5. **Announce the team** before spawning with a one-line justification per conditional reviewer selected.

.codex/skills/ce-work-beta/SKILL.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,9 @@ This command takes a work document (plan, specification, or todo file) and execu
244244
# Use linting-agent before pushing to origin
245245
```
246246

247-
2. **Consider Reviewer Agents** (Optional)
247+
2. **Consider Code Review** (Optional)
248248

249-
Use for complex, risky, or large changes. Read agents from `compound-engineering.local.md` frontmatter (`review_agents`). If no settings file, invoke the `setup` skill to create one.
250-
251-
Run configured agents in parallel with Task tool. Present findings and address critical issues.
249+
Use for complex, risky, or large changes. Load the `ce:review` skill with `mode:autofix` to fix safe issues and flag the rest before shipping.
252250

253251
3. **Final Validation**
254252
- All tasks marked completed
@@ -470,7 +468,7 @@ When external delegation is active, follow this workflow for each tagged task. D
470468
471469
Verify the delegate CLI is installed. If not found, print "Delegate CLI not installed - continuing with standard mode." and proceed normally.
472470
473-
2. **Build prompt** — For each task, assemble a prompt from the plan's implementation unit (Goal, Files, Approach, Conventions from `compound-engineering.local.md`). Include rules: no git commits, no PRs, run `git status` and `git diff --stat` when done. Never embed credentials or tokens in the prompt - pass auth through environment variables.
471+
2. **Build prompt** — For each task, assemble a prompt from the plan's implementation unit (Goal, Files, Approach, Conventions from project CLAUDE.md/AGENTS.md). Include rules: no git commits, no PRs, run `git status` and `git diff --stat` when done. Never embed credentials or tokens in the prompt - pass auth through environment variables.
474472
475473
3. **Write prompt to file** — Save the assembled prompt to a unique temporary file to avoid shell quoting issues and cross-task races. Use a unique filename per task.
476474

.codex/skills/ce-work/SKILL.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,9 @@ This command takes a work document (plan, specification, or todo file) and execu
235235
# Use linting-agent before pushing to origin
236236
```
237237

238-
2. **Consider Reviewer Agents** (Optional)
238+
2. **Consider Code Review** (Optional)
239239

240-
Use for complex, risky, or large changes. Read agents from `compound-engineering.local.md` frontmatter (`review_agents`). If no settings file, invoke the `setup` skill to create one.
241-
242-
Run configured agents in parallel with Task tool. Present findings and address critical issues.
240+
Use for complex, risky, or large changes. Load the `ce:review` skill with `mode:autofix` to fix safe issues and flag the rest before shipping.
243241

244242
3. **Final Validation**
245243
- All tasks marked completed

.codex/skills/claude-permissions-optimizer/scripts/extract-commands.mjs

Lines changed: 2 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import { readdir, readFile, stat } from "node:fs/promises";
1616
import { join } from "node:path";
1717
import { homedir } from "node:os";
18+
import { isRiskFlag, normalize } from "./normalize.mjs";
1819

1920
const args = process.argv.slice(2);
2021

@@ -299,127 +300,7 @@ function classify(command) {
299300
return { tier: "unknown" };
300301
}
301302

302-
// ── Normalization ──────────────────────────────────────────────────────────
303-
304-
// Risk-modifying flags that must NOT be collapsed into wildcards.
305-
// Global flags are always preserved; context-specific flags only matter
306-
// for certain base commands.
307-
const GLOBAL_RISK_FLAGS = new Set([
308-
"--force", "--hard", "-rf", "--privileged", "--no-verify",
309-
"--system", "--force-with-lease", "-D", "--force-if-includes",
310-
"--volumes", "--rmi", "--rewrite", "--delete",
311-
]);
312-
313-
// Flags that are only risky for specific base commands.
314-
// -f means force-push in git, force-remove in docker, but pattern-file in grep.
315-
// -v means remove-volumes in docker-compose, but verbose everywhere else.
316-
const CONTEXTUAL_RISK_FLAGS = {
317-
"-f": new Set(["git", "docker", "rm"]),
318-
"-v": new Set(["docker", "docker-compose"]),
319-
};
320-
321-
function isRiskFlag(token, base) {
322-
if (GLOBAL_RISK_FLAGS.has(token)) return true;
323-
// Check context-specific flags
324-
const contexts = CONTEXTUAL_RISK_FLAGS[token];
325-
if (contexts && base && contexts.has(base)) return true;
326-
// Combined short flags containing risk chars: -rf, -fr, -fR, etc.
327-
if (/^-[a-zA-Z]*[rf][a-zA-Z]*$/.test(token) && token.length <= 4) return true;
328-
return false;
329-
}
330-
331-
function normalize(command) {
332-
// Don't normalize shell injection patterns
333-
if (/\|\s*(sh|bash|zsh)\b/.test(command)) return command;
334-
// Don't normalize sudo -- keep as-is
335-
if (/^sudo\s/.test(command)) return "sudo *";
336-
337-
// Handle pnpm --filter <pkg> <subcommand> specially
338-
const pnpmFilter = command.match(/^pnpm\s+--filter\s+\S+\s+(\S+)/);
339-
if (pnpmFilter) return "pnpm --filter * " + pnpmFilter[1] + " *";
340-
341-
// Handle sed specially -- preserve the mode flag to keep safe patterns narrow.
342-
// sed -i (in-place) is destructive; sed -n, sed -e, bare sed are read-only.
343-
if (/^sed\s/.test(command)) {
344-
if (/\s-i\b/.test(command)) return "sed -i *";
345-
const sedFlag = command.match(/^sed\s+(-[a-zA-Z])\s/);
346-
return sedFlag ? "sed " + sedFlag[1] + " *" : "sed *";
347-
}
348-
349-
// Handle ast-grep specially -- preserve --rewrite flag.
350-
if (/^(ast-grep|sg)\s/.test(command)) {
351-
const base = command.startsWith("sg") ? "sg" : "ast-grep";
352-
return /\s--rewrite\b/.test(command) ? base + " --rewrite *" : base + " *";
353-
}
354-
355-
// Handle find specially -- preserve key action flags.
356-
// find -delete and find -exec rm are destructive; find -name/-type are safe.
357-
if (/^find\s/.test(command)) {
358-
if (/\s-delete\b/.test(command)) return "find -delete *";
359-
if (/\s-exec\s/.test(command)) return "find -exec *";
360-
// Extract the first predicate flag for a narrower safe pattern
361-
const findFlag = command.match(/\s(-(?:name|type|path|iname))\s/);
362-
return findFlag ? "find " + findFlag[1] + " *" : "find *";
363-
}
364-
365-
// Handle git -C <dir> <subcommand> -- strip the -C <dir> and normalize the git subcommand
366-
const gitC = command.match(/^git\s+-C\s+\S+\s+(.+)$/);
367-
if (gitC) return normalize("git " + gitC[1]);
368-
369-
// Split on compound operators -- normalize the first command only
370-
const compoundMatch = command.match(/^(.+?)\s*(&&|\|\||;)\s*(.+)$/);
371-
if (compoundMatch) {
372-
return normalize(compoundMatch[1].trim());
373-
}
374-
375-
// Strip trailing pipe chains for normalization (e.g., `cmd | tail -5`)
376-
// but preserve pipe-to-shell (already handled by shell injection check above)
377-
const pipeMatch = command.match(/^(.+?)\s*\|\s*(.+)$/);
378-
if (pipeMatch) {
379-
return normalize(pipeMatch[1].trim());
380-
}
381-
382-
// Strip trailing redirections (2>&1, > file, >> file)
383-
const cleaned = command.replace(/\s*[12]?>>?\s*\S+\s*$/, "").replace(/\s*2>&1\s*$/, "").trim();
384-
385-
const parts = cleaned.split(/\s+/);
386-
if (parts.length === 0) return command;
387-
388-
const base = parts[0];
389-
390-
// For git/docker/gh/npm etc, include the subcommand
391-
const multiWordBases = ["git", "docker", "docker-compose", "gh", "npm", "bun",
392-
"pnpm", "yarn", "cargo", "pip", "pip3", "bundle", "systemctl", "kubectl"];
393-
394-
let prefix = base;
395-
let argStart = 1;
396-
397-
if (multiWordBases.includes(base) && parts.length > 1) {
398-
prefix = base + " " + parts[1];
399-
argStart = 2;
400-
}
401-
402-
// Preserve risk-modifying flags in the remaining args
403-
const preservedFlags = [];
404-
for (let i = argStart; i < parts.length; i++) {
405-
if (isRiskFlag(parts[i], base)) {
406-
preservedFlags.push(parts[i]);
407-
}
408-
}
409-
410-
// Build the normalized pattern
411-
if (parts.length <= argStart && preservedFlags.length === 0) {
412-
return prefix; // no args, no flags: e.g., "git status"
413-
}
414-
415-
const flagStr = preservedFlags.length > 0 ? " " + preservedFlags.join(" ") : "";
416-
const hasVaryingArgs = parts.length > argStart + preservedFlags.length;
417-
418-
if (hasVaryingArgs) {
419-
return prefix + flagStr + " *";
420-
}
421-
return prefix + flagStr;
422-
}
303+
// ── Normalization (see ./normalize.mjs) ────────────────────────────────────
423304

424305
// ── Session file scanning ──────────────────────────────────────────────────
425306

0 commit comments

Comments
 (0)