Skip to content

Add interactive authoring for md-utils configuration #136

Description

@DandyLyons

Summary

Add a md-utils config interactive workflow for interactively creating, editing, and removing project configuration, rules, and types.

Motivation

The interactive rule and type workflows need a coherent project-level entry point. Configuration version, project layout, reusable types, rules, and external JSON Schema references should be managed through one consistent Noora-based experience without duplicating prompt infrastructure.

Proposed behavior

Provide:

md-utils config interactive

The workflow should support full CRUD for the supported configuration resources:

  • create, edit, and remove project configuration;
  • create, edit, and remove standalone 0.3.0 types;
  • create, edit, and remove standalone 0.3.0 rules;
  • select and validate existing JSON Schema references.

The workflow should reuse the shared interactive infrastructure planned for types interactive and rules interactive, including Noora prompts, existing CLIStyle output, draft state, previews, validation, cancellation, and atomic writes.

JSON Schema contents should not receive a schema interactive editor. Documentation should recommend established tools such as sourcemeta/jsonschema, ajv-cli, check-jsonschema, and swaggest/json-cli.

Design requirements

  • Preserve unrelated configuration, types, rules, and schema files.
  • Support cancellation without modifying files.
  • Validate the complete proposed project before writing.
  • Keep non-interactive commands unchanged.
  • Use the same config discovery and project-root rules as existing commands.
  • Handle migration from legacy configuration versions explicitly rather than silently rewriting them.

Acceptance criteria

  • Users can create a project configuration interactively.
  • Users can edit an existing project configuration interactively.
  • Users can remove supported configuration resources with confirmation.
  • The workflow reuses the shared type and rule interactive infrastructure.
  • Complete proposed changes are previewed and validated before writing.
  • Cancellation and declined confirmation leave the project unchanged.
  • Unrelated resources are preserved.
  • Existing non-interactive config behavior remains unchanged.
  • Tests cover create, edit, remove, validation failure, confirmation, cancellation, and preservation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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