Skip to main content

validate

Validate the structure of a Cognitive Module.

Recommended (unambiguous) usage:

  • npx cogn@2.2.12 validate ...

If you see No such option: --all, you are likely running a different binary on your machine. Use the npx form above.

Syntax

npx cogn@2.2.12 validate <module> [--v22] [--format text|json]
npx cogn@2.2.12 validate --all [--v22] [--format text|json]

Options

OptionDescription
--v22Enable strict v2.2 checks
--allValidate all modules in search paths
--formatOutput format: text (default) or json

What It Checks

  • Required files: module.yaml (v2) or MODULE.md/module.md (legacy)
  • Valid YAML/JSON
  • Required manifest fields (name, version, responsibility)
  • Schema presence and structure
  • v2.2 strict checks (tier/meta/explain length)

Examples

# Standard validation
npx cogn@2.2.12 validate code-reviewer

# Strict v2.2 validation
npx cogn@2.2.12 validate code-reviewer --v22

# Validate all modules
npx cogn@2.2.12 validate --all --v22 --format json

Migration Recommendation

If you see v1/v2.1 warnings, use:

npx cogn@2.2.12 migrate code-reviewer --dry-run
npx cogn@2.2.12 migrate code-reviewer
npx cogn@2.2.12 validate code-reviewer --v22