feat: add interactive mode to schema-refine command
Added --interactive/-i flag to schema-refine command that allows users to review and approve each refinement individually: - Displays each detected issue with details - Shows current and suggested values - Prompts for confirmation (y/N/q) - Applies only approved fixes - Shows summary at completion This gives users fine-grained control over which refinements to apply. Example usage: markitect schema-refine schema.json --interactive 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1912,9 +1912,11 @@ def schema_analyze_cmd(config, schema_file, verbose):
|
||||
help='Migrate deprecated extensions (requires manual review)')
|
||||
@click.option('--dry-run', is_flag=True,
|
||||
help='Show changes without applying them')
|
||||
@click.option('--interactive', '-i', is_flag=True,
|
||||
help='Prompt for each refinement interactively')
|
||||
@pass_config
|
||||
def schema_refine_cmd(config, schema_file, output, loosen_counts, no_loosen_counts,
|
||||
round_numbers, no_round_numbers, migrate_deprecated, dry_run):
|
||||
round_numbers, no_round_numbers, migrate_deprecated, dry_run, interactive):
|
||||
"""
|
||||
Refine a schema by automatically applying fixes for rigidity issues.
|
||||
|
||||
@@ -1933,6 +1935,9 @@ def schema_refine_cmd(config, schema_file, output, loosen_counts, no_loosen_coun
|
||||
# Preview changes without applying
|
||||
markitect schema-refine schema.json --dry-run
|
||||
|
||||
# Review each fix interactively
|
||||
markitect schema-refine schema.json --interactive
|
||||
|
||||
# Save refined schema to new file
|
||||
markitect schema-refine schema.json --output refined-schema.json
|
||||
|
||||
@@ -1951,7 +1956,8 @@ def schema_refine_cmd(config, schema_file, output, loosen_counts, no_loosen_coun
|
||||
loosen_counts=loosen,
|
||||
migrate_deprecated=migrate_deprecated,
|
||||
round_numbers=round_nums,
|
||||
dry_run=dry_run
|
||||
dry_run=dry_run,
|
||||
interactive=interactive
|
||||
))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user