Skip to content

Overhaul Installation System to Best-in-Class Standards #95

@carmandale

Description

@carmandale

Overview

Transform Agent OS installation from functional to exemplary by implementing industry best practices, fixing critical gaps, and creating a gold-standard user experience.

Problem Statement

Critical Issues Identified

  1. Missing scripts: workflow-status.sh, workflow-complete.sh not installed → commands fail
  2. Inconsistent frontmatter: Older commands lack security controls (allowed-tools)
  3. Path resolution bugs: Example files show ~ paths that don't work in settings.json
  4. No idempotency: Scripts not safely re-runnable
  5. Limited error context: Generic failures without actionable guidance
  6. Update mechanism: Hook updates don't work (Issue Fix installer to properly update Claude hooks when needed #65)
  7. Verification gaps: No comprehensive health check (Issues Create missing verify-installation.sh script #92, Address Repository Technical Debt and Infrastructure Gaps #93)

Evidence:

  • Research: docs/INSTALLATION-BEST-PRACTICES.md (created)
  • Research: docs/INSTALLATION-RESEARCH-SUMMARY.md (created)
  • Repository analysis: setup.sh:1-466, setup-claude-code.sh:1-263
  • Real user impact: Commands showing 'no such file or directory' errors

Proposed Solution

Three-phase transformation to world-class installation:

Phase 1: Critical Fixes (Week 1) ✅ IN PROGRESS

  • ✅ Fix missing script installations (uncommitted work)
  • Add frontmatter to all commands
  • Implement comprehensive verification
  • Fix path resolution issues

Phase 2: Reliability & Security (Week 2)

  • Make scripts idempotent
  • Add robust error handling
  • Implement security best practices
  • Add cross-platform support

Phase 3: Polish & Documentation (Week 3)

  • Create interactive installation experience
  • Add self-update mechanism
  • Write comprehensive troubleshooting guide
  • Document all conventions

Acceptance Criteria

Phase 1 (Critical Fixes)

  • workflow-status.sh installed and executable
  • workflow-complete.sh installed and executable
  • All 8 commands have proper frontmatter
  • verify-installation.sh created and tested
  • Hook examples use absolute paths
  • hygiene-check.md instruction installed

Phase 2 (Reliability & Security)

  • setup.sh wrapped in main() function
  • Idempotency checks for all operations
  • Centralized abort() error function
  • Cross-platform detection (macOS/Linux)
  • Secure file permissions (600/700)

Phase 3 (Polish & Documentation)

  • Progress indicators (step X/Y)
  • Color-coded output
  • self-update.sh script
  • docs/TROUBLESHOOTING.md
  • Installation completes <60s

Success Metrics

Installation Reliability:

  • ✅ 100% of repo scripts installed (currently ~80%)
  • ✅ 0 'command not found' errors
  • ✅ <1% installation failure rate

User Experience:

  • ⏱️ <60s installation time
  • 📊 User satisfaction >4.5/5
  • 🐛 <5 bugs/month

Related Issues

Current Status

Uncommitted work already addresses Phase 1:

  • ✅ setup.sh: Adds workflow-status.sh installation (fixes /workflow-status command)
  • ✅ setup.sh: Adds workflow-complete.sh installation (fixes /workflow-complete command)
  • ✅ setup.sh: Adds hygiene-check.md instruction installation
  • ✅ setup.sh: Adds Codex CLI support with --skip-codex-commands flag
  • ✅ setup-claude-code-local.sh: Updates command list for parity
  • ✅ setup-cursor.sh: Maintains cross-platform command parity
  • ✅ Removes obsolete work-session.md command

Next Steps:

  1. Commit current fixes as Phase 1 initial implementation
  2. Add frontmatter to remaining 5 commands
  3. Create verify-installation.sh script
  4. Fix path examples in hooks/examples/

References

Research Documents

  • docs/INSTALLATION-BEST-PRACTICES.md (35KB comprehensive guide)
  • docs/INSTALLATION-RESEARCH-SUMMARY.md (14KB quick reference)

External Best Practices

  • Homebrew, Rustup, NVM installation patterns
  • Claude Code integration requirements
  • Security best practices for shell installations

Implementation Patterns

See full technical specification with code examples:

  • Script installation automation
  • Frontmatter templates for all commands
  • verify-installation.sh implementation
  • Idempotency patterns
  • Error handling with abort() function
  • Cross-platform detection
  • Self-update mechanism
  • Troubleshooting guide template

Phase 1 Critical Fixes Ready for Implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions