Repository navigation
fix(harness): enforce permissions and correct stale guidance - #178
Merged
Merged
Conversation
Align both harnesses with intended safety boundaries and match agent guidance to current workflows. - Deny destructive and secret-read actions, and move stop warnings into a dedicated hook. - Correct stale instructions for approvals, tools, reviews, and coverage workflows. - Document permission gates, coverage limits, and package compatibility; regenerate the OpenCode agent mirror.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executive Summary
The project permission rules denied only three destructive actions. A guard hook that claimed to protect
.claude/settings.jsonnever ran, because its matcher covered only shell commands, and the Stop hook only printed a warning from an inline command. A prompt audit of the agents, skills, and instruction files also found stale paths, commands, and facts. This change adds deny rules for irreversible actions, removes the ineffective guard wiring, and corrects the stale guidance.Code Changes
.claude/settings.json: 17 new deny rules (destructive git, recursive delete, remote delete, and reads of.env*,~/.ssh,~/.aws). The unusedpre-tool-use-guardwiring is removed. The opencode plugin still uses that script. Native ask rules now gate edits to this file for the primary harness..claude/hooks/stop-violations: the Stop hook moves from an inline command to this script. It warns and exits 0. The violation scan matches text, so it reports diagnostic strings and ordinary properties as hits..claude/agents/, plus the regenerated opencode mirror): fixes for the analyzer register paths, the--no-formatflag, thesmart-commitdescription,dep-check.shrouting, local function expression bodies, and the memory index.naming-migrateandrefactoring-specialistkeep worktree isolation and now return edits with verification pending when the worktree is nested..claude/skills/): stale coverage and CRAP instructions rewritten for the Cobertura workflow, approval prompts before file deletes, preflight phrases mapped to/yeet --dry-run, plan wording without a named planning skill, a review-only rule formr-sparkle, and approval rules forfix-investigate.Tests and Tooling
scripts/check.shpassed (shell lint, format, build, CI-category tests) on an earlier tree. Later edits changed markdown and shell hook text only.scripts/format.sh --check, shellcheck on all shell scripts, the opencode mirror check, the analyzer release check, and the README rule table check pass on the branch head.scripts/test.sh --all) did not run. No C# source changed.Review Guide
.claude/settings.json. Bash deny patterns match prefixes, so a wrapped command such asbash -c "rm -rf ..."bypasses them. TheReaddenies are the reliable ones.lode/practices.mdnow treats the publishedE128.Analyzerspackage surface as public.Pug.Core.*type names stay in analyzer metadata and test stubs. They are functional, not prose.Rollback
Revert the squashed commit. No runtime code, package version, or CI workflow changes.