Skip to content

feat(validator): add project-template drift check #663

Merged
potiuk merged 1 commit into
apache:mainfrom
justinmclean:project-template-drift-check
Jul 1, 2026
Merged

feat(validator): add project-template drift check #663
potiuk merged 1 commit into
apache:mainfrom
justinmclean:project-template-drift-check

Conversation

@justinmclean

Copy link
Copy Markdown
Member

Summary

Add validate_project_template_drift (check #15) to
tools/skill-and-tool-validator to mechanically compare
projects/_template/ with projects/non-asf-example/ for structural
drift, closing the Known gap in specs/project-agnosticism.md.

Three SOFT advisory checks under the new template-drift category:

  1. README file-list coherence: every file linked in the ## Files
    section of non-asf-example/README.md must exist on disk.
  2. Undocumented files: every .md file in non-asf-example/ (other
    than README.md) must be mentioned somewhere in its README.
  3. Shared-file h2 alignment: for each .md file present in both
    profiles, h2 section headings are compared. project.md and
    README.md are excluded since they differ intentionally by
    organization profile (org-inherited blocks, narrative structure).

22 new tests in TestProjectTemplateDrift cover all checks, the
live-repo clean-state assertion, DocToc-stripping, exclusion of
parent-traversal and external URLs, and the project.md/README.md
exemptions. The live tree produces zero template-drift violations.

Updates specs/project-agnosticism.md Known gaps to document the
new check and its scope.

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: manually tested

@justinmclean justinmclean self-assigned this Jul 1, 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.

Oh. Cool - it will be nice for any future changes :)

…visory)

Add validate_project_template_drift (check apache#15) to
tools/skill-and-tool-validator to mechanically compare
projects/_template/ with projects/non-asf-example/ for structural
drift, closing the Known gap in specs/project-agnosticism.md.

Three SOFT advisory checks under the new template-drift category:

1. README file-list coherence: every file linked in the ## Files
   section of non-asf-example/README.md must exist on disk.
2. Undocumented files: every .md file in non-asf-example/ (other
   than README.md) must be mentioned somewhere in its README.
3. Shared-file h2 alignment: for each .md file present in both
   profiles, h2 section headings are compared. project.md and
   README.md are excluded since they differ intentionally by
   organization profile (org-inherited blocks, narrative structure).

22 new tests in TestProjectTemplateDrift cover all checks, the
live-repo clean-state assertion, DocToc-stripping, exclusion of
parent-traversal and external URLs, and the project.md/README.md
exemptions. The live tree produces zero template-drift violations.

Updates specs/project-agnosticism.md Known gaps to document the
new check and its scope.

Generated-by: Claude (Opus 4.7)
@potiuk potiuk force-pushed the project-template-drift-check branch from 55e16e9 to 0ca030f Compare July 1, 2026 07:28
@potiuk potiuk merged commit a9ae8fc into apache:main Jul 1, 2026
31 checks passed
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