Skip to content

Test/engineering skill contract verification - #11

Open
BurhanAbdullah wants to merge 1 commit into
Power-Agent:mainfrom
BurhanAbdullah:test/engineering-skill-contract-verification
Open

BurhanAbdullah wants to merge 1 commit into
Power-Agent:mainfrom
BurhanAbdullah:test/engineering-skill-contract-verification

Conversation

@BurhanAbdullah

Copy link
Copy Markdown
Contributor

Summary

Adds automated contract verification for PowerSkills engineering and tool-specific skills, helping ensure that documented workflows remain consistent with the repository structure and available PowerMCP tools.

Adds regression tests for the expected tool and engineering skill catalogs.

Checks that skills define their required workflow, escalation, and delivery sections.

Verifies that documented local assets and script paths exist.

Checks escalation targets against the bundled engineering skills.

Adds a validation CLI for skill frontmatter, workflow requirements, and referenced assets.

Adds a GitHub Actions workflow to run contract checks on Python 3.11 and 3.12.

Supports optional verification against a local PowerMCP checkout.

Testing

The PR adds automated checks intended to run in CI. These checks do not require proprietary engineering software or claim to execute vendor simulations.

CI status: Pending verification. Please confirm that both Python-version jobs and all required repository checks pass before merging.

Scope

This contribution is limited to skill-contract validation and CI coverage, keeping it separate from the existing UTF-8 and N-1 changes.

@qian-harvard

Copy link
Copy Markdown
Contributor

Review of 005870c: two validation bugs should be fixed before merging.

  1. --root validates the script’s checkout instead of the requested directory. In skill-creator/scripts/contract_validate.py:54–64, validate(root) iterates module-global SKILL_ROOTS, which were built from ROOT. Reproduction: python skill-creator/scripts/contract_validate.py --root <empty-existing-directory> exits 0 with “Skill contract validation passed.” If an issue is found, relative_to(root) can instead raise ValueError. Build the skill roots from the supplied root, and add regression coverage showing that an empty or invalid target fails and a separate valid target is actually inspected.

  2. The optional PowerMCP check does not verify the collected tools. In tests/test_skill_contracts.py:158–175, signatures is collected but never used; the assertion only requires at least one command name to also appear in README. All eight contract tests still pass with POWER_MCP_REPO pointing at an empty directory, so the extra checkout in CI currently provides no conformance check. Compare the intended MCP tool calls against the registered tools, fail for an explicitly supplied checkout with no discoverable tools, and cover a missing/renamed tool. The extractor also needs a test for @mcp.tool() on function declarations, since that form currently does not add the decorated function name.

The current contract tests and CLI pass on the repository itself, but the reproductions above show that those passing results do not cover these advertised behaviors.

@BurhanAbdullah
BurhanAbdullah force-pushed the test/engineering-skill-contract-verification branch 2 times, most recently from f9fd8b8 to 1d37a2e Compare October 25, 2026 04:11
@BurhanAbdullah
BurhanAbdullah force-pushed the test/engineering-skill-contract-verification branch from f03d1c6 to 9b7ad07 Compare October 25, 2026 04:12
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.

2 participants