Skip to content

Guard docs/ to only allow design/ and tasks/#89

Merged
hackerwins merged 1 commit into
mainfrom
guard-docs-directory
Mar 28, 2026
Merged

Guard docs/ to only allow design/ and tasks/#89
hackerwins merged 1 commit into
mainfrom
guard-docs-directory

Conversation

@hackerwins

@hackerwins hackerwins commented Mar 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add pre-commit hook guard that blocks files under docs/ outside of docs/design/ and docs/tasks/
  • Error message guides agents to the correct path, preventing stray directories like docs/superpowers/
  • Remove existing docs/superpowers/ directory

Test plan

  • Staging docs/superpowers/test.md blocks the commit
  • Files under docs/design/ and docs/tasks/ commit normally
  • Deleting files from disallowed paths passes (--diff-filter=d)
  • pnpm verify:fast passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced documentation management processes for the development workflow.
    • Removed internal planning documentation.

A pre-commit hook now blocks commits that add files under docs/
outside of docs/design/ and docs/tasks/. The error message guides
agents to the correct path, preventing tool-generated directories
like docs/superpowers/ from accumulating.

Also removes the existing docs/superpowers/ tree that was created
by an external tool.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1159d585-8fa0-4878-9c1d-202801d7aefa

📥 Commits

Reviewing files that changed from the base of the PR and between bc2de24 and 99eef15.

📒 Files selected for processing (3)
  • .githooks/pre-commit
  • docs/superpowers/plans/2026-03-25-docs-block-types.md
  • docs/superpowers/specs/2026-03-26-docs-phase2-inline-clipboard-design.md
💤 Files with no reviewable changes (2)
  • docs/superpowers/specs/2026-03-26-docs-phase2-inline-clipboard-design.md
  • docs/superpowers/plans/2026-03-25-docs-block-types.md

📝 Walkthrough

Walkthrough

Added a pre-commit hook to guard against accidental deletions of documentation files in the docs/ directory (excluding docs/design/ and docs/tasks/ subdirectories), and deleted two documentation files containing Phase 1 and Phase 2 implementation plans.

Changes

Cohort / File(s) Summary
Pre-commit Hook
.githooks/pre-commit
Added guard logic to inspect staged deletions in docs/ directory. Blocks commits that delete files outside of docs/design/ and docs/tasks/ subdirectories, with error message and allowlist explanation.
Deleted Documentation
docs/superpowers/plans/2026-03-25-docs-block-types.md, docs/superpowers/specs/2026-03-26-docs-phase2-inline-clipboard-design.md
Removed Phase 1 block type extensions and Phase 2 inline clipboard design documentation files containing implementation plans, task breakdowns, and specification details.

Poem

🐰 The docs are now safe, guarded with care,
A pre-commit shield floating through air,
Old plans deleted, the path now clear,
Only the keepers remain here dear! ✨

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: adding a guard to the docs/ directory that restricts file additions to design/ and tasks/ subdirectories.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch guard-docs-directory

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Verification: verify:self

Result: ✅ PASS in 101.4s

Lane Status Duration
sheets:build ✅ pass 13.8s
docs:build ✅ pass 5.9s
verify:fast ✅ pass 48.0s
frontend:build ✅ pass 14.8s
verify:frontend:chunks ✅ pass 0.3s
backend:build ✅ pass 4.3s
cli:build ✅ pass 1.8s
verify:entropy ✅ pass 12.5s

Verification: verify:integration

Result: ✅ PASS

@hackerwins
hackerwins merged commit 5eccd46 into main Mar 28, 2026
3 checks passed
@hackerwins
hackerwins deleted the guard-docs-directory branch March 28, 2026 04:58
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