Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ jobs:
f for f in os.listdir('snippets')
if f.endswith('.py')
])
example_count = len([
d for d in os.listdir('examples')
if os.path.isdir(os.path.join('examples', d))
and os.path.exists(os.path.join('examples', d, 'README.md'))
])

readme = open('README.md').read()
if f'{skill_count} skills' not in readme:
Expand All @@ -255,11 +260,13 @@ jobs:
errors.append(f'README template count mismatch (expected "{template_count} {template_word}" substring)')
if f'{snippet_count} snippets' not in readme:
errors.append(f'README snippet count mismatch (expected "{snippet_count} snippets" substring)')
if f'{example_count} examples' not in readme:
errors.append(f'README example count mismatch (expected "{example_count} examples" substring)')

if errors:
for e in errors:
print(f'::error::{e}', file=sys.stderr)
sys.exit(1)

print(f'Counts verified: {skill_count} skills, {rule_count} rules, {template_count} {template_word}, {snippet_count} snippets')
print(f'Counts verified: {skill_count} skills, {rule_count} rules, {template_count} {template_word}, {snippet_count} snippets, {example_count} examples')
PYEOF
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ way, and a one-paragraph rationale. 30 to 80 lines is the right size.
## CI/CD workflows

- `validate.yml` runs file structure checks plus a `validate-counts` job that
asserts the README aggregate counts (12 skills, 6 rules, 2 templates, 17
snippets) match filesystem reality. The counts language in `README.md` is
load-bearing: the job greps for it.
asserts the README aggregate counts (skills, rules, templates, snippets,
and examples) match filesystem reality. The counts language in `README.md`
is load-bearing: the job greps for it.
- `validate.yml` also runs a `validate-manifest` job that checks
`.cursor-plugin/plugin.json` against reality: every listed path must exist,
every skill, rule, snippet, template, and example on disk must be listed,
Expand Down
Loading