Skip to content

test: validate skills map entries and add contributing guide#76

Open
tonyblu331 wants to merge 6 commits into
midudev:mainfrom
tonyblu331:test/validate-skills-map-contributing
Open

test: validate skills map entries and add contributing guide#76
tonyblu331 wants to merge 6 commits into
midudev:mainfrom
tonyblu331:test/validate-skills-map-contributing

Conversation

@tonyblu331
Copy link
Copy Markdown
Contributor

What Changed

  • New: packages/autoskills/tests/skills-map.validation.test.mjs — 12 structural validation tests across 3 suites
  • New: CONTRIBUTING.md — AutoSkills-specific contribution guide

Validation test — what it checks

SKILLS_MAP:

  • Unique technology ids
  • Required fields present (id, name, detect, skills)
  • detect has at least one signal (packages, configFiles, gems, packagePatterns, or configFileContent)
  • Signal arrays are non-empty with correct types (RegExp for packagePatterns, strings for the rest)
  • configFileContent blocks have patterns and either files or scanGradleLayout: true
  • Skill refs match owner/repo/skill-name or https://...
  • No duplicate skill refs within an entry

COMBO_SKILLS_MAP:

  • Unique combo ids
  • requires has ≥ 2 ids, all of which exist in SKILLS_MAP
  • No duplicate ids within requires
  • Same skill ref validation as above

Error feedback contract (8 additional tests): validates that error messages are actionable — they tell the contributor exactly what to fix and include format hints or examples.

Why This Change

Closes #62.

Discussion in #62 concluded that the registry split proposal was premature at the current scale (~1,300 lines of declarative data). The pragmatic path: add a schema validation test and a clear contribution guide without changing the architecture or raising the bar for contributors.

This PR delivers exactly that:

  • Single-map authoring workflow stays intact
  • No build step introduced
  • CI now rejects malformed entries with specific, actionable messages

Testing Done

  • ✅ Automated tests pass locally: 171 tests, 0 failures
  • ✅ Edge cases tested: configFileContent variants, combo references, duplicate detection, type mismatches
  • ✅ Error messages are actionable with format hints

Type of Change

  • test: Tests
  • docs: Documentation

Security & Quality Checklist

  • No secrets or API keys committed
  • Follows project coding standards (ESM, node:test, node:assert/strict)
  • No sensitive data exposed

Documentation

  • CONTRIBUTING.md added with full workflow + AutoSkills-specific guidance
  • Detection signal priority table with code examples
  • Common mistakes shown with ✗ / ✓ annotations
  • Exact error output contributors will see in CI
  • Separate checklists for technology, combo, and detection fix PRs

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

@tonyblu331 is attempting to deploy a commit to the midudev pro Team on Vercel.

A member of the Team first needs to authorize it.

Add structural validation test for SKILLS_MAP and COMBO_SKILLS_MAP with
12 tests verifying entry shape, required fields, detect signals, skill refs,
and combo references. Error messages are actionable with format hints.

Rewrite CONTRIBUTING.md with AutoSkills-specific guidance: how to add a
technology, combo, or fix detection. Includes detection signal priority,
skill ref format, common mistakes, and separate checklists.

Closes midudev#62. Implements the pragmatic path: validate the catalog contract
and document the contribution workflow without splitting the architecture.
@tonyblu331 tonyblu331 force-pushed the test/validate-skills-map-contributing branch from be05489 to cc2e9d6 Compare April 21, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split skills-map.mjs into a validated source registry

1 participant