Skip to main content

Core library for the Score portable AI knowledge format

Project description

score-core

Core library for the Score portable AI knowledge format.

Score is a human-readable, LLM-agnostic format for encoding organisational knowledge as portable skill files. score-core provides the schema, parser, serialiser, validator, library validator, Context API models, and Recording models that any Score-compatible tool needs.

Full format specification: score_spec.md Writing skills: WRITING_SKILLS.md

Install

pip install score-core

Quickstart

Validate a skill file

score validate path/to/my-skill.md
score validate path/to/skills/ --strict

Validate programmatically

from score import parse_skill_file, validate_skill

skill = parse_skill_file("path/to/my-skill.md")
payload = {
    "name": skill.name,
    "description": skill.description,
    "version": skill.version,
    "owner": skill.owner,
    "triggers": list(skill.triggers),
    "tags": list(skill.tags),
    "active": skill.active,
    "created": skill.created,
    "updated": skill.updated,
    "body": skill.body,
}

result = validate_skill(payload)
if not result["valid"]:
    for error in result["errors"]:
        print(f"error: {error['field']}{error['message']}")
for warning in result["warnings"]:
    print(f"warning: {warning['field']}{warning['message']}")

Work with the Pydantic model

from score import parse_skill_file_pydantic, validate_skill_file

skill_file = parse_skill_file_pydantic("path/to/my-skill.md")
result = validate_skill_file(skill_file)
print(result)  # ValidationResult(valid=True, errors=[], warnings=[...], ...)

Library validation

from score import validate_library

skills = [...]  # list of full skill dicts
report = validate_library(skills)
print(report["summary"]["overall_health"])  # "good" | "warning" | "critical"

Migrate existing skills to v0.1.1

score migrate path/to/skills/ --to 0.1.1           # dry run
score migrate path/to/skills/ --to 0.1.1 --apply   # write changes

CLI commands

Command Purpose
score validate <path> Validate a single file or directory
score library-check <dir> Full library report (overlaps, coverage)
score governance-init <dir> Report skills missing v0.1.1 governance fields
score verify-recording <file> Verify Recording hash chain integrity
score migrate <dir> --to 0.1.1 Add safe defaults for new spec fields

What's in the package

  • score.schema — Pydantic models (SkillFile, UITheme, ExecutionHints) and field constants
  • score.parser.mdSkill (runtime dataclass) and SkillFile (Pydantic)
  • score.serialiserSkill.md with YAML frontmatter
  • score.validator — three-tier validation (errors, warnings, hints)
  • score.library_validator — cross-skill checks and fix proposal
  • score.context_api — request/response models for the Score Context API
  • score.recording — audit log entry models and hash chain utilities
  • score.cliscore command-line interface

Relationship to Maestro

Maestro is the commercial skill management product built on the Score format. score-core is the shared library that Maestro and any other Score-compatible tool import. Maestro uses score-core internally; it is not a Maestro dependency.

Version

Current: 0.1.0 — supports Score format v0.1.1 with governance metadata fields.

Licence

MIT. See LICENCE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

score_core-0.1.1.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

score_core-0.1.1-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file score_core-0.1.1.tar.gz.

File metadata

  • Download URL: score_core-0.1.1.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for score_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0694412dbfd16b998fbe153c99aee9c343ba5846ac349b917937a8427e2e8af1
MD5 c9147803d0baec8bb360fb4834780e37
BLAKE2b-256 8153e16f8d9bbfe7ac8f9f82a2306bee1cde7351344ce9c0d8a11c2a5ead42ff

See more details on using hashes here.

File details

Details for the file score_core-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: score_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for score_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf8a8868361341d3f9b25902386512eadde043df7d084d9f1d869c3ef609fb0a
MD5 d7225c4c9e482651416702612bdb0c62
BLAKE2b-256 73db5c6ab2b1a6ab4fac0c843f25cd8406c18bb11a81a0c0f5b5885f21a2a158

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page