Skip to content

Migrate: Replace validate-design-md.sh with JavaScript #611

@ashleyshaw

Description

@ashleyshaw

Overview

Migrate skills/design-md-agent/design-md-generator/scripts/validate-design-md.sh from Bash to JavaScript with Jest test coverage.

Current Implementation

The script validates DESIGN.md files by:

  • Locating the design.md CLI from various sources (installed command, local repo, npx package, or zip files)
  • Running spec and lint checks against the DESIGN.md file
  • Generating a Markdown report with validation results
  • Performing manual checks (frontmatter, required headings, filename)

Requirements

  • Create scripts/design-md-agent/validateDesignMd.js equivalent
  • Support environment variables: DESIGN_MD_FILE, DESIGN_MD_REPORT, DESIGNMD_REPO_PATH, DESIGNMD_CLI_CMD
  • CLI detection strategy (command, local repo, npx fallback, zip extraction)
  • Report generation (Markdown format with summary and manual checks)
  • Jest tests covering all major paths
  • Error handling for missing files and CLI unavailability
  • Remove validate-design-md.sh after verification

Related

Part of #[bash-to-js-migration-epic] - Remove all shell scripts from the codebase

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions