Skip to content

Refactor CLI to simplified --user/--project design#17

Merged
virtualian merged 11 commits into
mainfrom
15-refactor-cli-simplified-design
Nov 28, 2025
Merged

Refactor CLI to simplified --user/--project design#17
virtualian merged 11 commits into
mainfrom
15-refactor-cli-simplified-design

Conversation

@virtualian
Copy link
Copy Markdown
Owner

Summary

  • Refactor CLI from complex flags to simple --user / --project separation
  • Add --standards flag for selective standard installation
  • Simplify user-level setup to personal preferences only (no duplication of project standards)
  • Add verbose (-v) and silent (-q) mode options to all scripts
  • Create shared logging library for consistent script output
  • Add README files to key MARR folders
  • Update templates with prompt references in generated CLAUDE.md

Test plan

  • Run marr init --user and verify user-level setup
  • Run marr init --project and verify project files created
  • Test --verbose and --quiet flags on scripts
  • Run full test suite via test-in-testuser.sh

Closes #15

virtualian and others added 11 commits November 26, 2025 11:55
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
@virtualian virtualian merged commit 5ff60e6 into main Nov 28, 2025
@virtualian virtualian deleted the 15-refactor-cli-simplified-design branch November 28, 2025 09:31
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.

Refactor CLI to simplified --user/--project design

1 participant