Repository navigation
Description
Tier: judgment Found: 2026-10-02, plugin directory submission (path plugin). The portal's policy-review hold "Pre-approves broad shell access in allowed-tools" covers 9 findings.
Problem. While a skill is active, its allowed-tools entries let Claude Code run matching commands without asking. The directory holds a plugin for review when an entry is bare Bash, Bash(*), or a wildcard directly after a shell, interpreter, package manager or runner, and asks for "the exact commands the component needs, or remove it". From plugin/skills/*/SKILL.md on main:
- Bare
Bash:fullsolve,loop,test Bash(*):verify- Wildcard after the tool:
improve(Bash(gh *),Bash(git *),Bash(npm run *),Bash(npx *)) andupstream(Bash(gh *),Bash(git *)) - Runner wildcards:
exec:Bash(npm install:*),Bash(npx tsc:*)qa:Bash(npx semgrep:*),Bash(npx tsx scripts/semgrep-scan.ts:*),Bash(npx sequant worktree:*)setup:Bash(node -e:*)test:Bash(npx tsx:*)
- Unrendered placeholder:
testshipsBash({{PM_RUN}} dev:*).plugin/skills/is copied fromtemplates/without placeholder rendering, so the entry never matches anything. - Related notes: "Allowed tools unscoped write" (9: bare
Write/Edit) and "Allowed tools skill any" (fullsolve: bareSkill).
Who it affects. Phases started by sequant run use permissionMode: "bypassPermissions" (src/lib/workflow/drivers/claude-code.ts:137), so narrowing these entries changes interactive use only. Users running /fullsolve, /verify etc. by hand will get permission prompts for commands that ran silently before. That's a product trade-off, so it's judgment tier.
AC
- AC-1: No
plugin/skills/*/SKILL.mdallowed-toolsentry is bareBash,Bash(*), orBash(<tool> *)forgh/git/npm run/npx. Each is replaced by the specific subcommands that skill's body runs, or removed. Evidence: a gate test over the frontmatter of all three skill copies, mutation-verified by re-addingBashto one skill - AC-2: Runner wildcards (
npx …:*,npm install:*,node -e:*) are narrowed to the exact invocation the skill uses, or removed where the skill body doesn't run them. Evidence: the AC-1 gate test also rejectsnpx [^ ]+:\*,node -e:\*andnpm install:\* - AC-3:
test'sBash({{PM_RUN}} dev:*)becomes an entry that works unrendered (for exampleBash(npm run dev:*),Bash(pnpm dev:*),Bash(yarn dev:*)), or is removed. Evidence:grep -n '{{' plugin/skills/*/SKILL.mdfinds nothing in anyallowed-toolsblock - AC-4: Bare
Write/Edit/Skillgrants are scoped to the paths or skills each skill writes or starts, or kept with a one-line reason in the PR. Evidence: PR body table, one row per skill - AC-5: Interactive smoke:
/verifyand/fullsolveon a scratch issue still complete; any new prompts are listed in the PR. Evidence: the PR body - AC-6: (human-required) The directory portal's Validate on the PR branch (path
plugin) no longer lists "Pre-approves broad shell access in allowed-tools". Evidence: portal result pasted in the PR
Non-Goals
- Changing headless phase permissions (
bypassPermissions).
May touch
templates/skills/*/SKILL.md,.claude/skills/*/SKILL.md,skills/*/SKILL.md,plugin/skills/*/SKILL.md(via sync), a frontmatter gate test
Activity
admarble commentedon Oct 3, 2026
Runner context (2026-10-03) — read before exec
.claude/skills/*/SKILL.mdonly, then runnpm run sync:skills..claude/skillsis the canonical copy (scripts/check-skill-sync.ts:8), and that one command writes the other three mirrors from it:templates/skills/,skills/andplugin/skills/. If you edittemplates/first, the sync silently reverts it. There are four copies, not three. AC-1's gate test should iterate all four roots. Copy theSKILL_ROOTS+it.eachpattern fromsrc/lib/__tests__/fullsolve-merge-gate-skill.test.ts:138, which already asserts over theallowed-toolsfrontmatter.allowed-toolsfrontmatter has one source (.claude/skills/) and one copier (sync:skills). Nothing insrc/reads or writes it. Its only test readers are the fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958 merge-gate test and this new gate. When you narrowfullsolve, keepfullsolve-merge-gate-skill.test.tsgreen. Its "other gh pr entries are untouched" case pins specificgh prgrants.---lines), not the whole file. Mutation-verify it by re-adding bareBashto one.claude/skillscopy, re-syncing, and confirming exactly that test fails, then restore. TheSEQUANT_MUTATIONmarker'sfailedTestmust start with the test file path.bypassPermissions, so they can't observe permission prompts. The runner does the AC-5 interactive smoke after exec, and the owner runs AC-6 (portal Validate). QA: mark both as pending-runner and pending-owner. Don't mark them met.npm test. Run only the targeted files (npx vitest run <new gate test> src/lib/__tests__/fullsolve-merge-gate-skill.test.ts,npm run lint:skill-sync,npm run lint:skill-calls), in the foreground. CI runs the full suite.admarble commentedon Oct 3, 2026
Complexity: Standard (6 ACs, 2 directories:
.claude/skills/(+3 synced mirrors),src/lib/__tests__/)AC Quality Check
All six ACs parse, and each has an
Evidence:clause. AC-1–3 → integration_test; AC-4–6 → manual.grep -n '{{' plugin/skills/*/SKILL.md) also matches body text today, for exampletest's{{DEV_URL}}at line 237. Resolution: fold AC-3 into the frontmatter gate test, so it asserts that noallowed-toolsblock contains{{.npx [^ ]+:\*fails on main today, so it is not vacuous. But it misses two entries the issue names itself:npx sequant worktree:*andnpx tsx scripts/semgrep-scan.ts:*. Both have a space before:*. See Design Review Q4 for the stricter rule..claude/skills(canonical),templates/skills,skills,plugin/skills. The gate iterates all four.Scope Assessment
Non-Goals: headless
bypassPermissionsstays unchanged.Verdict: ✅ SCOPE_OK
The issue's inventory is incomplete (literal AC-1 scope)
The issue's list follows the portal's 9 findings. On main, these entries also break AC-1/AC-2 as written, so the gate fails unless they are narrowed too:
assessandsolve:Bash(git *),Bash(gh *)upstream: alsoBash(npx tsx *),Bash(jq *),Bash(base64 *)merger:Bash(git:*),Bash(gh pr:*),Bash(gh issue:*).git:*has the same semantics asgit *, so the gate normalizesX:*≡X *.npx sequant worktree:*also appears inassess,loop,mergerandtestgen, not onlyqa. Skill bodies run only itsresolveandverifysubcommands.Grants with no body use (AC-2: remove them):
exec'snpx tsc:*qa'snpx semgrep:*andnpx tsx scripts/semgrep-scan.ts:*upstream'snpx tsx *Grep confirms that none of these appears outside the frontmatter. Exec should re-check each skill's
references/before removing anything.Acceptance Criteria
AC-1: no bare
Bash,Bash(*)orBash(<gh|git|npm run|npx> *|:*)in any rootVerification: Integration Test (file-reading gate)
Scenario: Given the frontmatter of every
*/SKILL.mdin all 4 roots → When the gate parses eachallowed-toolslist → Then no entry matches the broad forms. Mutation: add bareBashto one.claude/skillscopy, runnpm run sync:skills, and confirm exactly the gate fails.Assumptions: the frontmatter is the span between the first two
---lines.AC-2: runner wildcards narrowed or removed
Verification: Integration Test (same gate)
Scenario: Given an entry starting
npx/node -e/npm install/tsxthat ends in*→ Then it fails unless listed in the gate's explicit allowlist, where each allowlisted entry carries a one-line reason.AC-3: no
{{…}}placeholder in anyallowed-toolsblockVerification: Integration Test (same gate, scoped to the frontmatter)
AC-4: bare
Write/Edit/Skillscoped or justifiedVerification: Manual (a PR-body table with one row per skill)
AC-5: interactive
/verify+/fullsolvesmokeVerification: Manual — pending-runner. Phases run under
bypassPermissionsand can't observe prompts.AC-6: portal Validate no longer lists the hold
Verification: Manual — pending-owner.
Implementation Plan
Phase 1: Inventory (per skill, before any edit)
references/for every command it runs. Record a grant list. Don't guess.Skill(<name>)and path-scopedWrite(...)/Edit(...)rules are supported. Record what you find; AC-4 depends on it.Phase 2: Narrow
.claude/skills/*/SKILL.mdfrontmatter onlyBash/Bash(*)→ the explicit subcommand grants the body runs. Applies tofullsolve,loop,testandverify.verifyruns arbitrary user commands, so those now prompt. That is the intended trade-off; list it under AC-5.Bash(gh *)/Bash(git *)/Bash(git:*)/Bash(npm run *)/Bash(npx *)→ per-subcommand grants (gh issue view:*,git diff:*, …). Applies toimprove,upstream,assess,solveandmerger.npx sequant worktree:*→npx sequant worktree resolve:*+npx sequant worktree verify:*. These go on the gate allowlist, with the reason: the issue number varies.setup'snode -e:*→ the exact script the body runs, or remove it.exec'snpm install:*→Bash(npm install)(no args) orBash(npm ci), whichever the body runs.test'snpx tsx:*→npx tsx scripts/seed-test-is a variable path, so remove it.test: replace{{PM_RUN}} dev:*with literal entries:npm run dev:*,pnpm dev:*,pnpm run dev:*,yarn dev:*,bun run dev:*. Leave the body's{{PM_RUN}}alone.init.ts:969still renders it for consumers.npm run sync:skills. Never edittemplates/first: the sync reverts it.Phase 3: Gate + docs
src/lib/__tests__/skill-allowed-tools-gate.test.ts.SKILL_ROOTSandit.eachfromfullsolve-merge-gate-skill.test.ts, then addplugin/skills. The existing test omits that root.allowed-toolslist and strip# comments.:*≡*), AC-2 runner rule + allowlist, AC-3 no{{.docs/reference/permissions.md. Its skill-frontmatter section says allowed-tools "restrict" tools, but they pre-approve. Add one line on the narrowing policy.SEQUANT_MUTATIONmarker.failedTestmust start with the test file path.Design Review
.claude/skills/(the one source), plus a test-only gate. Nothing insrc/readsallowed-tools.qa/execinteractive users for no portal gain.fullsolve-merge-gate-skill.test.ts, which removedgh pr merge:*). There is one priorallowed-toolsfix (fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958); feat(evals): assess-dashboard claude plugin eval case — needs a Bash(gh issue view) exception or a local-fixture read path in /assess #1008 is related (an eval needingBash(gh issue view)). That is <2 fix issues, so precedent applies. This change is the class-level fix: one gate over every skill, not one per skill.npx sequant worktree:*, which the portal flagged. The stricter rule is: any runner entry ending in*fails unless explicitly allowlisted with a reason.npx sequant worktree resolve:*still be flagged?" Unknown until AC-6. If the portal still flags it, drop the allowlist entry. Headless runs are unaffected either way..claude/skills/*/SKILL.md. Copier:scripts/check-skill-sync.ts --fix.src/commands/init.ts:969(renders{{PM_RUN}}into templates for consumer projects)fullsolve-merge-gate-skill.test.ts: keepgh pr create:*+gh pr list:*in fullsolverelease-checkout-lock-skill.test.ts: a comment only, not affecteddocs/reference/permissions.mdNo design choice between architectures, so no ADR is required.
Feature Quality Planning
Notable items:
Sibling grants the portal didn't flag:
qa'sBash(gh api:*)allows arbitrary API calls, including DELETE.setup'scurl:*/sed:*/cat:*clean'srm:*/find:*Recommend a follow-up issue, not this PR, unless AC-6's portal run flags them.
AC-4 table rows:
exec/fullsolve/loop/testgenedit anywhere in the worktree, so "keep, reason: implementation writes arbitrary source paths" is expected.reflect/docs/clean/setupare candidates for path scoping, if Phase 1 confirms the rule syntax.Conflict risk: low. fix(run): sequant run has two PR producers — exec opens the PR itself and createPR returns it untouched, dropping the QA note, ready-gate report and summary #1247 (exec) and feat(spec): Design Review stops on recurrence and lists producers; spec can halt before exec when the AC's lever is wrong #1250 (spec) are open worktrees that touch those SKILL.md bodies, but neither touches frontmatter.
Open Questions
assess/solve/merger/upstream's extra entries, which AC-1's literal text covers but the issue's list omits? Recommendation: yes, or the gate can't pass. Impact if wrong: a gate with per-skill exemptions.npx sequant worktree resolve:*acceptable? Recommendation: allowlist it with a reason, and let AC-6 decide. Impact if wrong: one more portal round, then remove it.SkillinfullsolveasSkill(sequant:spec)…? Recommendation: only if Phase 1 confirms Claude Code supports per-skill rules; otherwise keep it with a reason. Impact if wrong: a dead grant, and the sub-skills prompt.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning:
npx vitest run src/lib/__tests__/skill-allowed-tools-gate.test.ts src/lib/__tests__/fullsolve-merge-gate-skill.test.ts,npm run lint:skill-sync,npm run lint:skill-calls). CI runs the full suite.Label Review
Current: enhancement
Recommended: +
plannedQuality Loop: won't auto-enable (SCOPE_OK).
admarble commentedon Oct 3, 2026
QA Verdict: AC_NOT_MET
AC coverage: 3/6 met
Gaps:
fix(#1287): drop spec's git -C wildcard, restore qa's semgrep-scan as…
admarble commentedon Oct 3, 2026
QA Verdict: NEEDS_VERIFICATION
AC coverage: 4/6 met
Pending ACs:
Needs human review:
fix(#1287): drop the grants the portal still held — relative-path scr…
admarble commentedon Oct 4, 2026
Owner decision (2026-10-04): AC-5 is accepted on the PR's "New prompts" list. PR #1291 lists the commands each narrowed skill will now prompt for in interactive use. The owner accepted that list as AC-5's evidence in place of an interactive
/verify+/fullsolverun on a scratch issue. No interactive run was performed. If a prompt turns out to be disruptive in real use, file it against #1292 or as a new issue, and add the narrowest grant that covers it.The other ACs were checked by the runner:
fda34abno longer lists "Pre-approves broad shell access in allowed-tools".d9f4d7e2.fix(#1349): drop the npx vitest/jest grants the allowed-tools gate re…
feat(#1349): improve(skills): phases run affected tests (vitest --cha…