Download release/projectos-rules.sch from AnthropicallyHuggingFaces/ProjectOS: direct link, hf CLI and curl.
- Browser
- Download file 9.28 kB
-
https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/release/projectos-rules.sch
- Command line
-
hf download hf://spaces/AnthropicallyHuggingFaces/ProjectOS/release/projectos-rules.sch
-
curl -L -o projectos-rules.sch https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/release/projectos-rules.sch
9.28 kB
| <sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt"> | |
| <sch:title>ProjectOS v2 manifest rules</sch:title> | |
| <sch:pattern id="manifest-shape"> | |
| <sch:rule context="ProjectOS"> | |
| <sch:assert test="@version = '2.0'">The manifest version must be 2.0.</sch:assert> | |
| <sch:assert test="count(decisionFormula/step) = 15">The decision formula must define all 15 stages.</sch:assert> | |
| <sch:assert test="count(decisionFormula/step[@gate = 'true']) = 2">The decision formula must include logic and governance gates.</sch:assert> | |
| <sch:assert test="count(projectLifecycle/stage) = 12">The project lifecycle must define all 12 stages.</sch:assert> | |
| <sch:assert test="count(fabrics/fabric) = 11">The manifest must define the 11 ProjectOS fabrics.</sch:assert> | |
| <sch:assert test="count(councils/council) = 6">The manifest must define six council templates.</sch:assert> | |
| <sch:assert test="count(agents/agent) = 12">The manifest must define 12 specialist agents.</sch:assert> | |
| <sch:assert test="count(models/model) >= 1">At least one model routing entry is required.</sch:assert> | |
| <sch:assert test="count(workspaces/workspace) >= 1">At least one workspace route is required.</sch:assert> | |
| <sch:assert test="count(permissions/permission) >= 1">At least one permission rule is required.</sch:assert> | |
| <sch:assert test="normalize-space(runtime/@profile) != ''">The runtime profile must be named.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="catalog-quality"> | |
| <sch:rule context="fabrics/fabric"> | |
| <sch:assert test="normalize-space(@name) != ''">Every fabric needs a name.</sch:assert> | |
| <sch:assert test="normalize-space(@description) != ''">Every fabric needs a description for the dashboard.</sch:assert> | |
| <sch:assert test="count(capability) >= 1">Every fabric must declare at least one capability.</sch:assert> | |
| </sch:rule> | |
| <sch:rule context="councils/council"> | |
| <sch:assert test="normalize-space(@description) != ''">Every council needs a description.</sch:assert> | |
| <sch:assert test="count(member) >= 1">Every council must assign at least one member.</sch:assert> | |
| </sch:rule> | |
| <sch:rule context="agents/agent"> | |
| <sch:assert test="normalize-space(@description) != ''">Every agent needs a description.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="unique-registries"> | |
| <sch:rule context="ProjectOS"> | |
| <sch:assert test="count(fabrics/fabric) = count(fabrics/fabric[not(@name = preceding-sibling::fabric/@name)])">Fabric names must be unique.</sch:assert> | |
| <sch:assert test="count(councils/council) = count(councils/council[not(@name = preceding-sibling::council/@name)])">Council names must be unique.</sch:assert> | |
| <sch:assert test="count(agents/agent) = count(agents/agent[not(@name = preceding-sibling::agent/@name)])">Agent names must be unique.</sch:assert> | |
| <sch:assert test="count(models/model) = count(models/model[not(@role = preceding-sibling::model/@role)])">Model roles must be unique.</sch:assert> | |
| <sch:assert test="count(workspaces/workspace) = count(workspaces/workspace[not(@role = preceding-sibling::workspace/@role)])">Workspace roles must be unique.</sch:assert> | |
| <sch:assert test="count(permissions/permission) = count(permissions/permission[not(@id = preceding-sibling::permission/@id)])">Permission rule identifiers must be unique.</sch:assert> | |
| <sch:assert test="normalize-space(storage/@local) != '' and normalize-space(storage/@enterprise) != ''">Both local and enterprise storage targets must be named.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="registry-quality"> | |
| <sch:rule context="models/model"> | |
| <sch:assert test="normalize-space(@role) != '' and normalize-space(@provider) != ''">Each model route needs a role and provider.</sch:assert> | |
| </sch:rule> | |
| <sch:rule context="workspaces/workspace"> | |
| <sch:assert test="normalize-space(@role) != '' and normalize-space(@name) != ''">Each workspace route needs a role and workspace name.</sch:assert> | |
| </sch:rule> | |
| <sch:rule context="permissions/permission"> | |
| <sch:assert test="@effect = 'allow' or @effect = 'deny' or @effect = 'require-approval'">Permission effects must be allow, deny, or require-approval.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="logic-required"> | |
| <sch:rule context="CouncilTemplate"> | |
| <sch:assert test="Member[@Ref='LogicAgent']">LogicAgent required.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="storage-provider"> | |
| <sch:rule context="storage"> | |
| <sch:assert test="count(providers/provider[@enabled='true' or @enabled='1']) > 0">At least one storage provider must be enabled.</sch:assert> | |
| <sch:assert test="count(vectorStores/vectorStore) > 0">At least one vector store must be configured.</sch:assert> | |
| <sch:assert test="count(vectorStores/vectorStore[@provider='sqlite-vec']) = 0 or count(providers/provider[@name='SQLite' and (@enabled='true' or @enabled='1')]) > 0">sqlite-vec requires the SQLite provider to be enabled.</sch:assert> | |
| <sch:assert test="count(vectorStores/vectorStore[@provider='pgvector']) = 0 or count(providers/provider[@name='PostgreSQL' and (@enabled='true' or @enabled='1')]) > 0">pgvector requires the PostgreSQL provider to be enabled.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="canon-retention"> | |
| <sch:rule context="storage/retention"> | |
| <sch:assert test="@keepCanonForever='true' or @keepCanonForever='1'">Canon storage must be retained permanently.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="migration-backup"> | |
| <sch:rule context="storage/migration"> | |
| <sch:assert test="@autoMigrate='false' or @autoMigrate='0' or @backupBeforeMigration='true' or @backupBeforeMigration='1'">Automatic migrations require backups.</sch:assert> | |
| <sch:assert test="@autoMigrate='false' or @autoMigrate='0' or @validateSchema='true' or @validateSchema='1'">Automatic migrations require schema validation.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="symbol-registry"> | |
| <sch:rule context="namingConventions"> | |
| <sch:assert test="count(convention) > 0">At least one canonical symbol convention is required.</sch:assert> | |
| <sch:assert test="count(convention/alias[. = /ProjectOS/namingConventions/convention/@canonical]) = 0">A symbol alias cannot collide with a canonical symbol name.</sch:assert> | |
| </sch:rule> | |
| <sch:rule context="convention"> | |
| <sch:assert test="normalize-space(@canonical) != ''">Each symbol convention needs a canonical name.</sch:assert> | |
| <sch:assert test="count(alias) > 0">Each canonical symbol needs at least one alias.</sch:assert> | |
| </sch:rule> | |
| <sch:rule context="languageProfiles/languageProfile"> | |
| <sch:assert test="normalize-space(@name) != ''">Each language profile needs a name.</sch:assert> | |
| <sch:assert test="@interfacePrefix or @interfacePrefix = ''">Each language profile must define its interface prefix, which may be empty.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="documentation-outputs"> | |
| <sch:rule context="documentation"> | |
| <sch:assert test="count(output[@enabled='true' or @enabled='1']) > 0">At least one documentation output must be enabled.</sch:assert> | |
| <sch:assert test="count(output[@name='Architecture' and (@enabled='true' or @enabled='1')]) = 1">Architecture documentation must be enabled.</sch:assert> | |
| <sch:assert test="count(output[@name='Bootstrap' and (@enabled='true' or @enabled='1')]) = 1">Bootstrap documentation must be enabled.</sch:assert> | |
| <sch:assert test="count(output[@name='Schema' and (@enabled='true' or @enabled='1')]) = 1">Schema documentation must be enabled.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| <sch:pattern id="mcp-registry"> | |
| <sch:rule context="mcpServers"> | |
| <sch:assert test="count(server) > 0">At least one MCP server entry is required.</sch:assert> | |
| <sch:assert test="count(server) = count(server[normalize-space(@name) != ''])">Every MCP server needs a name.</sch:assert> | |
| <sch:assert test="count(server) = count(server[normalize-space(@adapter) != ''])">Every MCP server needs a registered adapter name.</sch:assert> | |
| <sch:assert test="count(server[@authMode='environment' or @authMode='keyring']) = count(server[@authMode='environment' or @authMode='keyring'][normalize-space(@credentialRef) != ''])">Environment and keyring authentication require a credential reference.</sch:assert> | |
| <sch:assert test="count(profiles/profile) > 0">At least one MCP profile is required.</sch:assert> | |
| </sch:rule> | |
| <sch:rule context="mcpServers/profiles"> | |
| <sch:assert test="count(profile[@name='database-write' and @enabled='true']) = 0">The database-write profile must stay disabled until a write role and approval policy are configured.</sch:assert> | |
| <sch:assert test="count(../server[@name='github-write' and @enabled='true']) = 0">GitHub write access must stay disabled until a write-scoped credential is configured.</sch:assert> | |
| </sch:rule> | |
| </sch:pattern> | |
| </sch:schema> | |