skill_contract— mounted skills must be signable, scoped, and complete (#972).
Flags atapp.check():
- Envelope tools without a signing private key → always ERROR
- Tool scopes absent from
app.register_scope(when a scope registry exists) → env-aware (ERROR production / WARNING staging / silent development), same registry-backed idiom asauth_spec - Any scoped tool with no
AuthMiddleware→ env-aware (scopes resolve via the auth user ContextVar) - Incomplete freeze-time manifest (empty tools / public key / content digest) → always ERROR
Registered fromuse_skill() via
app.register_contract_check(chirp_ui pattern). Middleware / env are read
from the live app becauseContractCheckSnapshot
does not expose them to plugin checks.
contracts.rules_skill_contract
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
Serializable skill descriptor stored inextras['skills'].
Evaluate skill contract records and return issues (pure; unit-testable).
Plugin check registered byuse_skill— holds the app for env/middleware.
Build aSkillContractRecord from a live Skill.
SkillContractRecord
class
Serializable skill descriptor stored inextras['skills'].
check_skill_contract
function
def check_skill_contract(skills: Sequence[SkillContractRecord], *, scope_registry: frozenset[str], env: str = 'development', has_auth_middleware: bool = False) -> list[ContractIssue]
Evaluate skill contract records and return issues (pure; unit-testable).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
skills
|
Sequence[SkillContractRecord]
|
— | |
scope_registry
|
frozenset[str]
|
— | |
env
|
str
|
'development'
|
|
has_auth_middleware
|
bool
|
False
|
SkillContractCheck
class
Plugin check registered byuse_skill— holds the app for env/middleware.
skill_record_from_skill
function
def skill_record_from_skill(skill: Any) -> SkillContractRecord
Build aSkillContractRecord from a live Skill.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
skill
|
Any
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/contracts/rules_skill_contract.py:1