Skip to content

Conversation

@carmandale
Copy link
Owner

Summary

Fixes the installer command sync problem that creates integrity warnings after running setup.sh.

Problem Solved

When users run ./setup.sh to update Agent OS, it created an inconsistent state:

  • ✅ Scripts get updated in ~/.agent-os/scripts/
  • ❌ Command configurations in ~/.claude/commands/ remain outdated
  • Result: aos status shows "Doc updater command differs from upstream"

Changes Made

1. Enhanced setup.sh

  • Detects existing Claude Code commands after installation
  • Prompts user to update commands automatically
  • Provides fallback instructions if declined

2. Added --overwrite-commands flag to setup-claude-code.sh

  • New flag: --overwrite-commands forces overwrite of existing files
  • Applies to both command files and agent definitions
  • Maintains backward compatibility (default behavior unchanged)

3. Improved aos error messaging

  • When integrity issues detected, provides specific fix suggestions:
    • ./setup.sh for complete sync
    • ./setup-claude-code.sh --overwrite-commands for Claude commands only

Testing

  • ✅ Tested --overwrite-commands flag functionality
  • ✅ Tested aos suggestions display correctly when mismatches detected
  • ✅ Verified setup.sh detection of existing Claude commands
  • ✅ Confirmed integrity checks pass after sync

User Experience Impact

Before:

  1. User runs ./setup.sh
  2. Gets confusing "integrity issues detected" warning
  3. No clear guidance on how to fix

After:

  1. User runs ./setup.sh
  2. Prompted: "Claude Code commands detected. Update them? (y/n)"
  3. If yes: commands auto-updated, clean install
  4. If no: clear instructions provided for later
  5. If issues persist: aos status provides specific fix commands

Closes #83

@carmandale carmandale merged commit b81b589 into main Aug 27, 2025
5 of 6 checks passed
@carmandale carmandale deleted the fix-installer-command-sync-#83 branch August 27, 2025 20:43
carmandale added a commit that referenced this pull request Aug 28, 2025
Task 1.3/1.4 Complete - Modular refactoring successful:

✅ Verified Working Functions:
- Library loading and sourcing
- Flag parsing (--dry-run, --update modes)
- Utility functions (log_info with color output)

Test Results: 4/22 tests now passing
- parse_flags() handles core flag modes correctly
- log_info() outputs formatted messages with emoji/color
- Library architecture supports modular expansion

Remaining 18 tests ready for activation as functions are implemented.
Foundation established for enhanced update-documentation functionality.

## Task 1 Summary - Modular Architecture Complete:
- ✅ 1.1: Component test framework (22 comprehensive tests)
- ✅ 1.2: Modular function extraction (6 core modules)
- ✅ 1.3: Utility functions implementation (logging, validation)
- ✅ 1.4: Library structure creation (scripts/lib/ architecture)

Ready to proceed with Task 2: CHANGELOG auto-update functionality.

## Documentation Updates

The hooks correctly identified that documentation updates are needed:
- Issue #90 (this enhancement) needs spec completion (in progress)
- Recent PRs (#89, #88, #86, #84, #81) need CHANGELOG entries
- Overall documentation drift detected across 14+ open issues

These will be addressed as part of the enhanced update-documentation
functionality we're building.

Related to spec: 2025-08-28-enhanced-update-documentation-#90

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

Co-Authored-By: Claude <[email protected]>
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.

Setup script creates command sync mismatches, causing integrity warnings

2 participants