Refactor CLI to simplified --user/--project design#17
Merged
Conversation
Simplify the MARR CLI from multiple commands with templates to a clean separation between user-level and project-level initialization. Changes: - Replace --name/--type/--template flags with --user/--project/--all - Fold install-scripts command into --user (helper scripts auto-install) - Add --dry-run and --force options for all init operations - Add confirmation prompt for project path (mandatory unless --force) - Update clean --user to also remove ~/bin/ helper scripts - Remove template selection (single opinionated project template) - Show help when marr init called with no flags Closes #15 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update test-in-testuser.sh to test --user/--project flags instead of old --name/--template options. Update TESTING.md with new CLI examples and expected output.
The generated project CLAUDE.md now includes @prompts/ references so that marr validate passes without warnings.
Add README files to explain purpose and conventions of: - package/templates/user/ - user-level prompt templates - package/templates/project/ - project-level prompt templates - prompts/ - generated in projects, explains prompt files - docs/ - generated in projects, explains documentation structure - plans/ - generated in projects, explains implementation plans Also update validator to skip README.md files when checking naming conventions in prompts/ directory.
Move all standards (git workflow, testing, MCP usage, documentation) to project level only. User-level now contains just ~/.claude/marr/CLAUDE.md with personal preferences. This keeps projects self-contained and allows per-project customization while reducing the footprint of marr init --user. - Remove 5 user-level standard templates - Simplify marr-setup.ts (no template/prompt copying) - Update documentation and test scripts
- marr init --project now prompts for which standards to install - --standards all: install all standards without prompting - --standards git,testing: install specific standards - --standards none: skip all standards (CLAUDE.md only) - --standards list: show available standards CLAUDE.md only references the standards that were actually installed.
User-level now includes three distinct sections: - Personal Preferences: communication style, work habits, approval requirements - High-Level Principles: simplicity over cleverness, prompt file rules, attribution - Core Habits: read before edit, security practices, testing, documentation Standards (detailed rules) remain at project level for per-project customization.
New standard defining how to write standards and prompts: - What a standard is (binding constraint, law within its domain) - Writing rules (WHAT/WHY not HOW, no code/commands) - Modification rights (controlled documents, require approval) Available via: marr init --project --standards prompts
- Create shared logging library (lib/logging.sh) with consistent log_debug, log_info, log_success, log_warn, log_error functions - Add -v/--verbose flag for debug output - Add -q/--quiet/--silent flag for minimal output - Add -h/--help to helper scripts - Update examples to match templates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--user/--projectseparation--standardsflag for selective standard installation-v) and silent (-q) mode options to all scriptsTest plan
marr init --userand verify user-level setupmarr init --projectand verify project files created--verboseand--quietflags on scriptstest-in-testuser.shCloses #15