Skip to content

Optimization suggestions for local configuration workflow #22

@rolfedh

Description

@rolfedh

Optimization Suggestions for Local Configuration Workflow

Based on real-world usage experience with the new local configuration system, here are several optimization opportunities:

1. Repository Detection Intelligence

Issue Observed:

The migration detected repository 'rolfedh' (parent directory) instead of 'openshift-docs' (actual repository).

Suggestions:

  • Prioritize Git repositories: When searching for matching repositories in global config, prefer paths that contain .git directories
  • Exact match first: If current directory name matches a repository name in global config, prefer that
  • Smart naming: During migration, use the actual repository name (from .git/config or directory name) rather than the matched global config name

2. Migration Configuration Cleanup

Issue Observed:

The migrated config contains both 'openshift-docs' and 'rolfedh' repositories, plus an unrelated allowed_paths pointing to /home/rolfedh/aditi.

Suggestions:

  • Selective migration: Only migrate the specific repository that matches, not all repositories
  • Path filtering: Only migrate allowed_paths that are within the current repository
  • Config pruning: Offer to clean up irrelevant entries during migration
  • Fresh start option: Add --no-migrate flag to init to skip migration even if available

3. Performance Optimizations

Issue Observed:

The check command timed out processing a large repository.

Suggestions:

  • Progress indication: Show a progress bar with file count ("Processing 1234 of 5678 files...")
  • Incremental processing: Cache Vale results and only re-check modified files
  • Parallel processing: Use multiple Vale containers for large repositories
  • Configurable timeout: Allow users to set custom timeouts for large repos
  • Exclude patterns: Honor .gitignore by default, add .aditiignore for additional patterns

4. User Experience Improvements

Suggestions:

  • Dry run for migration: Show what would be migrated before asking for confirmation

    Found configuration for 'rolfedh' in global config:
    - Repository root: /home/rolfedh
    - Default branch: main
    - Allowed paths: /home/rolfedh/aditi (outside current repo - will skip)
    
    Migrate this configuration? [Y/n]:
    
  • Migration summary: After migration, show what was migrated and what was skipped

  • Config validation: Warn about suspicious configurations (e.g., repository root is parent of current directory)

5. Configuration Management

Suggestions:

  • Config edit command: aditi config edit to open config in editor
  • Config show command: aditi config show to display current configuration
  • Config validate command: aditi config validate to check for issues
  • Config clean command: aditi config clean to remove invalid entries

6. Migration Rollback

Suggestions:

  • Backup before migration: Save global config state before removing entries
  • Undo migration: aditi init --undo-migration to revert to global config
  • Migration log: Track what was migrated when, useful for troubleshooting

7. Smart Defaults

Suggestions:

  • Auto-detect repository type: If in a Git repo, automatically set repository name from origin URL
  • Branch detection: Automatically detect and set the default branch from Git
  • Intelligent paths: When no paths specified, intelligently find documentation directories (docs/, documentation/, *.adoc in root)

8. Error Recovery

Suggestions:

  • Partial migration recovery: If migration fails partway, offer to complete or rollback
  • Config repair: Detect and offer to fix common config issues
  • Better error messages: "Config exists for parent directory - did you mean to run init there?"

9. Multi-Repository Workflow

Suggestions:

  • Workspace mode: Support multiple related repositories with shared configuration
  • Config inheritance: Allow .aditi/ to inherit from parent directories
  • Cross-repo references: Support checking files across related repositories

10. Quick Start Enhancement

Suggestions:

  • Single command setup: aditi quickstart that runs init, detects docs, and does a sample check
  • Interactive setup: Guide users through optimal configuration for their repository structure
  • Templates: Provide config templates for common documentation structures

Context

These suggestions come from the experience of implementing and testing the local configuration management system. The system works well but these optimizations would improve usability, especially for users migrating from the old global configuration system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions