Skip to content

feat(validator): add HARD check for required files in organizations/<org>/ - #721

Merged
potiuk merged 1 commit into
apache:mainfrom
justinmclean:org-structure-validation
Jul 4, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
justinmclean:org-structure-validation

Conversation

@justinmclean

Copy link
Copy Markdown
Member

Summary

Add validate_organization_structure (check #16) that enforces every organizations// adapter directory contains README.md and organization.md. Clears the Known Gap in the organization-adapters spec: No structural validator check yet enforces required files in organizations// (currently README + organization.md by convention).

The check is HARD (ORGANIZATION_CATEGORY) so an incomplete adapter directory fails the validator rather than emitting only an advisory. The live tree (ASF/ and independent/) already carries both files, so no existing adapter is broken. The _template/ directory is excluded from the check, matching the existing known_organizations() convention.

8 new test cases in TestOrganizationStructure cover: well-formed org, missing README.md, missing organization.md, both files absent, template exclusion, multi-org sweep, empty organizations/ directory, and the HARD-category assertion. All 433 tests pass (uv run direct).

Generated-by: Claude (Opus 4.7)

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other:

Test plan

  • prek run --all-files passes
  • For Python packages touched: uv run pytest / ruff check / mypy passes
  • For Groovy bridges touched: command-line invocation tested end-to-end
  • For skill changes: eval suite passes for the affected skill
    (PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/)
  • For skill behaviour changes: a new or updated eval fixture is included in this PR
    (a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
  • Other:

…org>/

Add validate_organization_structure (check apache#16) that enforces every
organizations/<org>/ adapter directory contains README.md and
organization.md. Clears the Known Gap in the organization-adapters
spec: No structural validator check yet enforces required files in
organizations/<org>/ (currently README + organization.md by convention).

The check is HARD (ORGANIZATION_CATEGORY) so an incomplete adapter
directory fails the validator rather than emitting only an advisory.
The live tree (ASF/ and independent/) already carries both files,
so no existing adapter is broken. The _template/ directory is excluded
from the check, matching the existing known_organizations() convention.

8 new test cases in TestOrganizationStructure cover: well-formed org,
missing README.md, missing organization.md, both files absent, template
exclusion, multi-org sweep, empty organizations/ directory, and the
HARD-category assertion. All 433 tests pass (uv run direct).

Generated-by: Claude (Opus 4.7)
@justinmclean justinmclean self-assigned this Jul 4, 2026

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — adds validate_organization_structure() emitting a HARD organization violation when an organizations/<org>/ directory (excluding _template) lacks README.md or organization.md, wired into run_validation with 8 focused unit tests. The check matches the existing tree (all three live orgs pass, _template correctly excluded), reuses existing symbols, and adds no false positives. Not a skill change, so no eval suite is required. CI green.

@potiuk
potiuk merged commit 0381844 into apache:main Jul 4, 2026
35 checks passed
@potiuk potiuk added the substrate:framework-dev Tool substrate: build / validate / eval the framework itself label Sep 25, 2026
@potiuk potiuk added the family:tools tools/* label Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

family:tools tools/* substrate:framework-dev Tool substrate: build / validate / eval the framework itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants