Commit Graph

4 Commits

Author SHA1 Message Date
Nikita Levyankov e9c0aafad9 fix: wrap string profile values in arrays for consistency
The ternary operators WERE needed after all! Profile values can be:
- Arrays: ['dev', 'architect', 'pm']
- Strings: 'all' (special keyword)

Downstream code expects arrays:
- filterWorkflows() checks selectedWorkflows.includes('all')
- filterAgents() checks selectedAgents.includes('all')
- separateModifiers() iterates with for-of loop

Without wrapping strings in arrays:
- 'all' → stays as string → includes() doesn't work
- WITH fix: 'all' → becomes ['all'] → includes('all') works ✓

This fixes the profile workflow:
1. Profile defines: workflows: 'all'
2. Parser wraps: normalized.workflows = ['all']
3. Filter checks: selectedWorkflows.includes('all') → true ✓

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-18 12:36:30 +02:00
Nikita Levyankov b88845c0fe fix: remove useless ternary operators in options-parser
The ternary operators were checking `Array.isArray()` but returning the same value in both branches, making them completely pointless. Since profiles can contain both arrays (e.g., `['dev', 'architect']`) and strings (e.g., `'all'`), and both are valid, we should just assign the value directly.

Fixed lines:
- normalized.modules = profile.modules
- normalized.agents = profile.agents
- normalized.workflows = profile.workflows

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-18 12:32:04 +02:00
Nikita Levyankov 1dca5fb4b7 fix: lint and formatting issues in non-interactive installation PR
- Fix ESLint errors: use switch over else-if, remove unused catch bindings, use slice over substring, use replaceAll over replace
- Fix Prettier formatting issues across all modified files
- Fix markdown lint: wrap bare URL in angle brackets

All tests passing: schemas, installation, validation, lint, markdown lint, and formatting checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-18 12:25:01 +02:00
Nikita Levyankov b6ade22984 feat: introduce non-interactive cli installation 2025-12-17 11:42:35 +02:00