← Files Atelier Pottery MentorARCHIVED FILE

scripts/validate_package.py

1.95 KB · Nov 22, 2026 · 18:56 UTC

↓ Download file

See the change to this file →

#!/usr/bin/env python3
import json,re,sys
from pathlib import Path
ROOT=Path(__file__).resolve().parents[1]
m=json.loads((ROOT/'plugin.json').read_text()); i=m['extensions']['com.openai']['interface']; old=json.loads((ROOT/'.codex-plugin/plugin.json').read_text());checks=[]
def ok(cond,msg):
 if not cond:raise AssertionError(msg)
 checks.append(msg)
ok(m['name']=='atelier-pottery-mentor','internal identity');ok(m['version']=='0.2.0','version');ok(m['author']['name']=='Tekris Labs','publisher');ok(old['name']==m['name'] and old['version']==m['version'],'legacy identity');ok(old['interface']['displayName']==i['displayName'],'legacy display name');ok(len(i['defaultPrompt'])<=3,'starter count');ok(all(len(x)<=128 for x in i['defaultPrompt']),'starter lengths');ok(len(i['shortDescription'])<30,'subtitle length');ok(len(i['displayName'])<=30,'display length');ok(len(i['capabilities'])<=20,'capabilities count');ok(all(len(x)<=120 for x in i['capabilities']),'capability lengths');
for key in ['websiteURL','supportURL','privacyPolicyURL','termsOfServiceURL']:
 ok(i[key].startswith('https://tekrislabs.com/'),key)
for key in ['logo','composerIcon']:
 ok((ROOT/i[key]).is_file(),key)
for x in sorted((ROOT/'skills').glob('*/SKILL.md')):
 t=x.read_text();ok(t.startswith('---\nname: '),str(x));ok(('name: '+x.parent.name) in t.split('---',2)[1],str(x)+' name');ok('description:' in t.split('---',2)[1],str(x)+' description');
 for rel in re.findall(r'`((?:\.\./)+[^`]+\.(?:md|py))`',t):
  ok((x.parent/rel).exists(),str(x)+': '+rel)
for x in (ROOT/'legacy/v0.1.1/references').glob('*.md'):ok(x.is_file(),str(x))
case=json.loads((ROOT/'benchmarks/cases.json').read_text())['cases'];ok(len(case)>=24,'benchmark count');ok(len({x['id'] for x in case})==len(case),'unique benchmark IDs');ok(all(x['status']=='not_run' for x in case),'benchmark honesty');print(f'{len(checks)} package checks passed; {len(list((ROOT/"skills").glob("*/SKILL.md")))} skills, {len(case)} benchmark definitions')

SHA-256: d7f40a8afe6f601d641256e435ef4904b02c45f561045fa023fabb3848fa59d0