Skip to content

fix: add missing YAML frontmatter to codebase-cleanup commands#490

Merged
wshobson merged 1 commit intowshobson:mainfrom
xiaolai:fix/nlpm-codebase-cleanup-frontmatter
Apr 17, 2026
Merged

fix: add missing YAML frontmatter to codebase-cleanup commands#490
wshobson merged 1 commit intowshobson:mainfrom
xiaolai:fix/nlpm-codebase-cleanup-frontmatter

Conversation

@xiaolai
Copy link
Copy Markdown

@xiaolai xiaolai commented Apr 17, 2026

Automated audit: This PR was generated by NLPM, a natural language programming linter, running via claude-code-action. Please evaluate the diff on its merits.

Bug

All three commands in plugins/codebase-cleanup/commands/ have no YAML frontmatter block:

  • tech-debt.md — starts with # Technical Debt Analysis and Remediation
  • deps-audit.md — starts with # Dependency Audit and Security Analysis
  • refactor-clean.md — starts with # Refactor and Clean Code

Claude Code requires a --- delimited frontmatter block with at minimum a description field to register a slash command. Without it, the command is silently absent when users install the codebase-cleanup plugin — all three slash commands are completely unavailable.

Fix

Added minimal frontmatter to each command with a description derived from the file's title and opening paragraph:

---
description: "..."
---

No content was changed — only the required registration header was prepended. The descriptions are concise, single-sentence summaries of what each command does.

All three commands in the codebase-cleanup plugin had no YAML frontmatter,
causing them to silently fail registration in Claude Code. Added minimal
description frontmatter to each command.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@wshobson
Copy link
Copy Markdown
Owner

Thanks @xiaolai — merged. Clean one-line-per-file fix that restores three commands to the registry.

tomjwxf pushed a commit to tomjwxf/wshobson-agents that referenced this pull request Apr 17, 2026
Three blocking items + one non-blocking clarification from the review:

1. marketplace.json unicode regression FIXED. Reset the file to upstream
   HEAD, then inserted ONLY the review-agent-governance entry with a
   string-based append that preserves every existing UTF-8 character
   byte-for-byte. No entries other than the new one are modified.
   `grep -c '\\u' marketplace.json` returns 0 escape sequences.

2. approve-review.md $1 → $ARGUMENTS. The marketplace slash-command
   convention (per plugins/codebase-cleanup/commands/deps-audit.md from
   PR wshobson#490) is $ARGUMENTS, which captures the full argument including
   spaces. $1 only captured the first word. Also JSON-escape the reason
   before embedding in the approval record (via python3 json.dumps) so
   quotes, backslashes, and newlines do not break the JSON body. This
   resolves the non-blocking JSON-escape note too.

3. README honesty on the approval log. Previously claimed the chain
   "records exactly which actions were human-gated and when," which was
   overstating: approval log entries under ./review-receipts/approvals/
   are plain JSON, not signed. Rewrote that paragraph to explicitly
   separate the signed PostToolUse chain (covered by
   @veritasacta/verify) from the operator-trust approval log. Points
   users at protect-mcp sign directly if they need signed approval
   records for regulated environments.

4. Added an explicit note on what the signed chain covers when the
   approval flag is present: PreToolUse short-circuits without calling
   Cedar, so the downstream PostToolUse receipt has decision:allow but
   no policy_digest. Auditors walking the chain should expect this.
   Resolves the "document the short-circuit" non-blocking item.

Not addressed (pending Seth's follow-up):
- marketplace.json conflict with wshobson#496 will be resolved by rebase order
  (whichever merges first; the other rebases)

Tests:
- python3 -m json.tool validates marketplace.json, plugin.json, hooks.json
- grep -c '\\u' on marketplace.json = 0
tomjwxf pushed a commit to tomjwxf/wshobson-agents that referenced this pull request Apr 19, 2026
Three blocking items + one non-blocking clarification from the review:

1. marketplace.json unicode regression FIXED. Reset the file to upstream
   HEAD, then inserted ONLY the review-agent-governance entry with a
   string-based append that preserves every existing UTF-8 character
   byte-for-byte. No entries other than the new one are modified.
   `grep -c '\\u' marketplace.json` returns 0 escape sequences.

2. approve-review.md $1 → $ARGUMENTS. The marketplace slash-command
   convention (per plugins/codebase-cleanup/commands/deps-audit.md from
   PR wshobson#490) is $ARGUMENTS, which captures the full argument including
   spaces. $1 only captured the first word. Also JSON-escape the reason
   before embedding in the approval record (via python3 json.dumps) so
   quotes, backslashes, and newlines do not break the JSON body. This
   resolves the non-blocking JSON-escape note too.

3. README honesty on the approval log. Previously claimed the chain
   "records exactly which actions were human-gated and when," which was
   overstating: approval log entries under ./review-receipts/approvals/
   are plain JSON, not signed. Rewrote that paragraph to explicitly
   separate the signed PostToolUse chain (covered by
   @veritasacta/verify) from the operator-trust approval log. Points
   users at protect-mcp sign directly if they need signed approval
   records for regulated environments.

4. Added an explicit note on what the signed chain covers when the
   approval flag is present: PreToolUse short-circuits without calling
   Cedar, so the downstream PostToolUse receipt has decision:allow but
   no policy_digest. Auditors walking the chain should expect this.
   Resolves the "document the short-circuit" non-blocking item.

Not addressed (pending Seth's follow-up):
- marketplace.json conflict with wshobson#496 will be resolved by rebase order
  (whichever merges first; the other rebases)

Tests:
- python3 -m json.tool validates marketplace.json, plugin.json, hooks.json
- grep -c '\\u' on marketplace.json = 0
tomjwxf pushed a commit to tomjwxf/wshobson-agents that referenced this pull request Apr 20, 2026
Three blocking items + one non-blocking clarification from the review:

1. marketplace.json unicode regression FIXED. Reset the file to upstream
   HEAD, then inserted ONLY the review-agent-governance entry with a
   string-based append that preserves every existing UTF-8 character
   byte-for-byte. No entries other than the new one are modified.
   `grep -c '\\u' marketplace.json` returns 0 escape sequences.

2. approve-review.md $1 → $ARGUMENTS. The marketplace slash-command
   convention (per plugins/codebase-cleanup/commands/deps-audit.md from
   PR wshobson#490) is $ARGUMENTS, which captures the full argument including
   spaces. $1 only captured the first word. Also JSON-escape the reason
   before embedding in the approval record (via python3 json.dumps) so
   quotes, backslashes, and newlines do not break the JSON body. This
   resolves the non-blocking JSON-escape note too.

3. README honesty on the approval log. Previously claimed the chain
   "records exactly which actions were human-gated and when," which was
   overstating: approval log entries under ./review-receipts/approvals/
   are plain JSON, not signed. Rewrote that paragraph to explicitly
   separate the signed PostToolUse chain (covered by
   @veritasacta/verify) from the operator-trust approval log. Points
   users at protect-mcp sign directly if they need signed approval
   records for regulated environments.

4. Added an explicit note on what the signed chain covers when the
   approval flag is present: PreToolUse short-circuits without calling
   Cedar, so the downstream PostToolUse receipt has decision:allow but
   no policy_digest. Auditors walking the chain should expect this.
   Resolves the "document the short-circuit" non-blocking item.

Not addressed (pending Seth's follow-up):
- marketplace.json conflict with wshobson#496 will be resolved by rebase order
  (whichever merges first; the other rebases)

Tests:
- python3 -m json.tool validates marketplace.json, plugin.json, hooks.json
- grep -c '\\u' on marketplace.json = 0
tomjwxf pushed a commit to tomjwxf/wshobson-agents that referenced this pull request Apr 26, 2026
Three blocking items + one non-blocking clarification from the review:

1. marketplace.json unicode regression FIXED. Reset the file to upstream
   HEAD, then inserted ONLY the review-agent-governance entry with a
   string-based append that preserves every existing UTF-8 character
   byte-for-byte. No entries other than the new one are modified.
   `grep -c '\\u' marketplace.json` returns 0 escape sequences.

2. approve-review.md $1 → $ARGUMENTS. The marketplace slash-command
   convention (per plugins/codebase-cleanup/commands/deps-audit.md from
   PR wshobson#490) is $ARGUMENTS, which captures the full argument including
   spaces. $1 only captured the first word. Also JSON-escape the reason
   before embedding in the approval record (via python3 json.dumps) so
   quotes, backslashes, and newlines do not break the JSON body. This
   resolves the non-blocking JSON-escape note too.

3. README honesty on the approval log. Previously claimed the chain
   "records exactly which actions were human-gated and when," which was
   overstating: approval log entries under ./review-receipts/approvals/
   are plain JSON, not signed. Rewrote that paragraph to explicitly
   separate the signed PostToolUse chain (covered by
   @veritasacta/verify) from the operator-trust approval log. Points
   users at protect-mcp sign directly if they need signed approval
   records for regulated environments.

4. Added an explicit note on what the signed chain covers when the
   approval flag is present: PreToolUse short-circuits without calling
   Cedar, so the downstream PostToolUse receipt has decision:allow but
   no policy_digest. Auditors walking the chain should expect this.
   Resolves the "document the short-circuit" non-blocking item.

Not addressed (pending Seth's follow-up):
- marketplace.json conflict with wshobson#496 will be resolved by rebase order
  (whichever merges first; the other rebases)

Tests:
- python3 -m json.tool validates marketplace.json, plugin.json, hooks.json
- grep -c '\\u' on marketplace.json = 0
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.

2 participants