@flancer32/skill-teqfw-esm-validator
v0.6.0
Published
Validate TeqFW-compatible ES modules with a JSON CLI and installable agent skill.
Readme
skill-teqfw-esm-validator
Validate TeqFW-compatible ES modules with a deterministic JSON CLI.
Current package version: 0.6.0.
What It Does
The validator checks TeqFW source files against the profile/rule model documented in ctx/:
- the
baseprofile for all modules - the
type-regularprofile for regular TeqFW components - the
type-config-runtimeprofile for runtime configuration components - atomic AST, JSDoc, and runtime rules owned by those profiles
The CLI accepts either:
- a single
.mjsor.jsfile - a directory, which is scanned recursively for matching
.mjsand.jsfiles
By default, the CLI runs the base profile. Use --profile to select a different documented profile.
Install
npm install -g @flancer32/skill-teqfw-esm-validatorThe package installs the agent skill automatically during postinstall.
Update
Update the installed package the same way you installed it:
npm install -g @flancer32/skill-teqfw-esm-validator@latestIf you already have the package installed globally, this refreshes the CLI and reinstalls the bundled agent skill during postinstall.
Usage
Validate one file:
teqfw-esm-validator src/Rules/Ast/RequireDefaultExport.mjsValidate a directory recursively:
teqfw-esm-validator srcValidate with an explicit profile:
teqfw-esm-validator --profile type-config-runtime src/Profiles/Type/Config/Runtime.mjsThe CLI prints strict JSON and exits with:
0when validation succeeds1when validation fails or the CLI encounters an error
Output
Successful validation:
{
"valid": true,
"violations": []
}When validating a directory, violations include the affected fileName so you can see which file failed.
CLI errors are also reported as JSON violations, for example:
cli.missing-argumentcli.missing-filecli.unknown-profilecli.runtime-error
Agent Skill
The packaged skill lives in skill/SKILL.md.
Development
npm install
npm testRelease notes are tracked in CHANGELOG.md.
