-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: simplify scaffold-rules to use AGENTS.md as single source of truth #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…f truth - AGENTS.md now contains the marker-wrapped rules section with dual format: - `@path` syntax for Claude Code to load file contents - `[name](path)` markdown links for other tools and GitHub rendering - CLAUDE.md simplified to just `@AGENTS.md` reference - Updated ScaffoldOutput type: replaced `claudeMdSection` with `claudeMdReference` - Added comprehensive tests for claudeMdReference behavior and dual format - Updated SKILL.md workflow to reflect new architecture This eliminates format duplication and makes the setup more portable across different AI coding agents (Claude Code, Cursor, Copilot, etc.). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code Review - PR #18SummaryThis refactoring successfully simplifies the scaffold-rules architecture by establishing AGENTS.md as the single source of truth, with CLAUDE.md reduced to a simple ✅ Strengths1. Architecture Improvement
2. Code Quality
3. Test Coverage
4. Documentation
🔍 Observations (Not Issues)1. Dual Format Readability // Line 260
lines.push(`- @${rulesPath}/${template.filename} - [${ruleId}](${rulesPath}/${template.filename})`)Example output: This works but reads as "bullet, @ reference, dash, markdown link". Consider if a comment explaining the dual-format intent would help future maintainers (though the TSDoc at :238-246 does cover this). 2. Constant Function Purity 🎯 Specific Code ChecksType Safety ✅
Error Handling ✅
Security ✅
Performance ✅
📋 Test Coverage AnalysisEdge Cases Covered:
Good Test Practices:
🚀 Suggested Enhancements (Optional)These are nice-to-haves, not blockers:
✅ Verification Checklist
🎉 VerdictLGTM - Excellent refactoring work! This PR achieves its stated goals cleanly:
The code is production-ready. The optional suggestions above are enhancements for future consideration, not blockers for merging. No security concerns, no bugs found, no performance issues. Review completed using repository rules from AGENTS.md and |
- Add .plaited/rules/documentation.md for TSDoc and diagram standards - Update AGENTS.md files to use skills-installer instead of marketplace - Remove Claude-specific language from rules and SKILL.md files - Clean up unused template headers from rule files - Update validate-skill examples to show multi-agent usage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code Review - PR #18: Simplify scaffold-rules architectureSummaryThis PR successfully refactors the scaffold-rules system to eliminate duplication between CLAUDE.md and AGENTS.md by establishing AGENTS.md as the single source of truth. The implementation is clean, well-tested, and represents a meaningful architectural improvement. ✅ Strengths1. Clear Architectural Improvement
2. Code Quality Excellence
3. Exceptional Test Coverage
4. Documentation Quality
🔍 Code AnalysisType Safety ✅
Function Design ✅
String Generation ✅
Error Handling ✅
📊 Verification ChecklistBased on
🎯 Specific Line-by-Line Checkssrc/scaffold-rules.ts
AGENTS.md
CLAUDE.md
Tests (src/tests/scaffold-rules.spec.ts)
💭 Minor Observations (Not Issues)
🚀 Impact AssessmentPositive impacts:
Risk assessment: Low
🎉 VerdictLGTM - Excellent refactoring work! This PR achieves its stated goals cleanly and demonstrates strong engineering practices:
No security concerns, no bugs found, no performance issues, no blocking issues. The refactoring eliminates duplication while maintaining full functionality and improving testability. Ready to merge. Review completed per |
Summary
@AGENTS.mdreference (one line)agentsMdSectionto use dual format for maximum compatibility:@pathsyntax for Claude Code to load file contents[name](path)markdown links for other tools and GitHub renderingclaudeMdSectionwithclaudeMdReferencein CLI outputTest plan
bun run checkpasses (biome, types, package)agentsMdSectionoutputclaudeMdReferenceis constant regardless of rules/path selection🤖 Generated with Claude Code