Skip to content

fix(fix-plan): exempt Claude Code sessions from checklist direct-edit guard - #377

Closed
DrumRobot wants to merge 8 commits into
fix/cleanup-report-dedupfrom
fix/checklist-guard-claude-code-exempt
Closed

fix(fix-plan): exempt Claude Code sessions from checklist direct-edit guard#377
DrumRobot wants to merge 8 commits into
fix/cleanup-report-dedupfrom
fix/checklist-guard-claude-code-exempt

Conversation

@DrumRobot

Copy link
Copy Markdown
Member

Summary

block-direct-checklist-edit.js blocks ALL Edit/Write tool calls on fix_plan.md/checklist.md, but the sanctioned scripts cover item addition only — item updates, sync auto-checks ([ ][x] on MERGED PRs), audit annotations, and pipeline-log stamps have no scripted path. Under Claude Code the guard therefore blocked the fix-plan skill's own documented pipeline contract (sync auto-check rules, recency-marker stamping).

Per user direction, the guard's purpose is to stop lower-capability harnesses (e.g. Antigravity/Gemini) from schema-corrupting direct edits — Claude Code sessions are trusted. This change exempts Claude Code by detecting CLAUDE_PROJECT_DIR / CLAUDE_PLUGIN_ROOT in the hook process env (Claude Code provides these to hook commands; other harnesses do not). The ALLOW_CHECKLIST_DIRECT_EDIT=1 escape and the block for non-Claude-Code environments stay unchanged.

Base is next-feat per the skill-divergence override: skills/fix-plan/ is currently staging on next-feat (warn-fixplan-item-schema.sh + tests differ from main).

Test plan

  • CC env + fix_plan.md → exit 0 (allowed)
  • no CC env + fix_plan.md → exit 2 (blocked, message unchanged)
  • no CC env + other file → exit 0
  • CLAUDE_PLUGIN_ROOT only → exit 0

🤖 Generated with Claude Code

…conformance linter

Adds $schema to plugin.json (root + .claude-plugin/ mirror, kept byte-identical) and
bumps both to 0.1.1 to match the already-published marketplace.json entry (user-confirmed
direction -- ask per the workspace version-value HARD STOP). Introduces
scripts/verify-plugin-spec.py: a stdlib-only linter that validates every marketplace.json-
referenced plugin.json against a pinned copy of the canonical v1.0.0 schema (offline, no
network fetch), and enforces three invariants the spec itself does not encode -- dual-
manifest equality, plugin.json<->marketplace.json version match, and marketplace "source"
path containment. Wired into make test / make verify-spec. 30 new unit tests plus a
smoke test against this repo's own manifests, all green.
…g on disk

Adding this while porting verify-plugin-spec.py to es6kr/claude-plugins surfaced a
real instance: 5 of its 6 sub-plugin marketplace entries point at plugins/<name>/
directories that do not exist (their content appears to have migrated to
es6kr/skills without the catalog entry being cleaned up). The linter previously
just silently skipped any entry without a plugin.json, conflating not-yet-
migrated (directory exists, no manifest) with stale (directory gone entirely).
check_source_directory_exists() distinguishes the two -- only the latter fails.
feat: adopt Agent Plugins Specification v1.0.0 for plugin.json + add conformance linter
feat(fix-plan): resolve artifacts_path from works-config and decouple plane_create_issue
… guard

The guard's purpose is to stop lower-capability harnesses (e.g.
Antigravity/Gemini) from schema-corrupting direct edits to
fix_plan.md/checklist.md. But the sanctioned scripts only cover item
ADDITION — item updates, sync auto-checks, audit annotations, and
pipeline-log stamps have no scripted path, so the guard also blocked the
fix-plan skill's own documented pipeline contract when run under Claude
Code.

Exempt Claude Code by detecting CLAUDE_PROJECT_DIR / CLAUDE_PLUGIN_ROOT
in the hook process env (Claude Code provides these to hook commands;
other harnesses do not). The ALLOW_CHECKLIST_DIRECT_EDIT escape and the
block for non-Claude-Code environments stay unchanged.

Smoke-tested: CC env + fix_plan -> exit 0; no CC env + fix_plan ->
exit 2; no CC env + other file -> exit 0.
@DrumRobot
DrumRobot marked this pull request as ready for review August 25, 2026 06:23
@DrumRobot
DrumRobot changed the base branch from next-feat to fix/cleanup-report-dedup August 27, 2026 01:36
@DrumRobot DrumRobot closed this Aug 27, 2026
@DrumRobot
DrumRobot deleted the fix/checklist-guard-claude-code-exempt branch August 27, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant