chore: simplify project-structure-validator agent#418
Conversation
Remove custom bash tooling (build-component-graph.sh) and use simpler tree-based approach that works across projects. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WalkthroughThe project-structure-validator agent documentation underwent a significant rewrite, introducing a numbered workflow, explicit component placement rules, and detailed output format specifications. The build-component-graph.sh script was removed, and its gitignore entry was deleted accordingly. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.claude/agents/project-structure-validator.md(1 hunks).claude/agents/project-structure-validator/.gitignore(0 hunks).claude/agents/project-structure-validator/build-component-graph.sh(0 hunks)
💤 Files with no reviewable changes (2)
- .claude/agents/project-structure-validator/.gitignore
- .claude/agents/project-structure-validator/build-component-graph.sh
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-12-12T05:45:09.686Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-12T05:45:09.686Z
Learning: Applies to **/components/**/*.{ts,tsx} : Structure project folders as one folder per component with PascalCase naming (ComponentName/ComponentName.tsx + index.ts barrel export)
Applied to files:
.claude/agents/project-structure-validator.md
📚 Learning: 2025-11-24T21:32:21.725Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: apps/desktop/CLAUDE.md:0-0
Timestamp: 2025-11-24T21:32:21.725Z
Learning: Applies to apps/desktop/**/AGENTS.md : Document agent responsibilities, capabilities, and interaction patterns in AGENTS.md
Applied to files:
.claude/agents/project-structure-validator.md
🪛 markdownlint-cli2 (0.18.1)
.claude/agents/project-structure-validator.md
32-32: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
39-39: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Deploy Docs
- GitHub Check: Deploy Admin
- GitHub Check: Deploy Web
- GitHub Check: Deploy Marketing
- GitHub Check: Deploy API
- GitHub Check: Build
🔇 Additional comments (4)
.claude/agents/project-structure-validator.md (4)
9-27: Excellent simplification of workflow.The shift from a custom build-component-graph.sh script to using the standard
treecommand significantly reduces complexity and maintenance overhead. The five-step workflow is clear, actionable, and leverages familiar Unix tools. This directly addresses the PR objective of removing custom bash tooling.
28-63: Comprehensive rules with strong alignment to project conventions.The Rules section provides well-structured, explicit guidance on barrel patterns, component placement, context exports, and shadcn exceptions. This directly mirrors the component structure learning from your codebase (PascalCase naming, barrel pattern re-exports) and makes the validator's expectations unambiguous and actionable.
64-84: Clear, detailed output format for validation reports.The Output Format template is well-organized with distinct sections for summary, changes made, verification results, and remaining issues. The "Feedback for Improvement" section encourages iterative refinement of both this agent and the project rules, which should help the agent become more effective over time.
1-84: PR objective achieved: simplified agent with tree-based approach.The updated documentation successfully replaces the custom graph-building script with a straightforward tree-based visualization. The agent now has explicit rules, a clear numbered workflow, and detailed output formatting. This is more maintainable, easier to understand, and should work reliably across projects as intended.
|
|
||
| ### Folder Structure | ||
| Every module (component, hook, constant, util, store) uses the barrel pattern: | ||
| ``` |
There was a problem hiding this comment.
Specify language identifiers in fenced code blocks.
The code blocks displaying the folder structure are missing language specifiers, which violates Markdown best practices and may cause linting failures.
🔎 Apply this diff to add language specifiers:
### Folder Structure
Every module (component, hook, constant, util, store) uses the barrel pattern:
-```
+```text
moduleName/
├── moduleName.ts(x)
└── index.ts # re-exports from moduleName.ts(x)No barrel index.ts for parent directories - only for individual modules.
- +text
constants/
├── viewport/
│ ├── viewport.ts # exports VIEWPORT_SIZES, HEADER_HEIGHT
│ └── index.ts # re-exports from viewport.ts
└── (NO index.ts here)
Also applies to: 39-39
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
32-32: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In .claude/agents/project-structure-validator.md around lines 32 and 39, the
fenced code blocks showing folder structure lack language identifiers; update
each triple-backtick fence to include a language (use "text" for plain directory
trees) so the blocks become ```text ... ``` to satisfy Markdown linting and best
practices; ensure both places (line 32 and line 39) are changed and that only
the fence markers are modified, preserving the inner content exactly.
Remove custom bash tooling (build-component-graph.sh) and use simpler tree-based approach that works across projects. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Summary
build-component-graph.shand.gitignore)treecommand instead of custom graph building scriptTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.