feat(semantic): add agent-system vocabulary seed — JSON-LD [T0-3] - #232
Merged
Conversation
Vocabulary seed for the agent-system domain (base ns https://spec.sourceos.dev/vocab/agent-system#): six terms — AgentClass, PermissionFlag, ManagedSpace, SeamDefinition, CapabilityException, BundleIdentity — each with @type/rdfs:label/rdfs:comment. Anchors the urn:srcos:agent-passport:* namespace; realized as OWL/SHACL in ontogenesis (T1). - semantic/agent-system-vocabulary.jsonld - tools/validate_agent_system_vocabulary.py: asserts all six terms present and complete (empty label/comment rejected). - Makefile: validate-agent-system-vocabulary wired into validate. make validate green. Closes #231
There was a problem hiding this comment.
Pull request overview
This PR implements Issue #231 (T0-3) by adding a seed JSON-LD vocabulary for the agent-system domain under the https://spec.sourceos.dev/vocab/agent-system# namespace and wiring a dedicated validator into the repository’s make validate workflow.
Changes:
- Added
semantic/agent-system-vocabulary.jsonlddefining the six required terms with@type,rdfs:label, andrdfs:comment. - Added
tools/validate_agent_system_vocabulary.pyto enforce required terms/fields and basic namespace invariants. - Integrated the new validator into
Makefileviavalidate-agent-system-vocabularyand included it in thevalidateaggregate target.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/validate_agent_system_vocabulary.py | New Python validator to enforce required term presence/completeness for the agent-system JSON-LD vocabulary seed. |
| semantic/agent-system-vocabulary.jsonld | New JSON-LD vocabulary seed defining the required six agent-system terms in the specified namespace. |
| Makefile | Adds a validate-agent-system-vocabulary target and includes it in make validate. |
Comment on lines
+35
to
+44
| def main() -> int: | ||
| try: | ||
| doc = json.loads(VOCAB_PATH.read_text(encoding="utf-8")) | ||
| except (OSError, json.JSONDecodeError) as exc: | ||
| fail(f"{VOCAB_PATH.name} is not valid JSON: {exc}") | ||
|
|
||
| ctx = doc.get("@context") | ||
| if not isinstance(ctx, dict) or ctx.get("agentsys") != BASE_NS: | ||
| fail(f"@context must map agentsys -> {BASE_NS}") | ||
|
|
Comment on lines
+56
to
+63
| term = node_id.split(":", 1)[1] | ||
| missing = REQUIRED_FIELDS - set(node) | ||
| if missing: | ||
| fail(f"term {term} is missing required field(s): {sorted(missing)}") | ||
| for field in ("rdfs:label", "rdfs:comment"): | ||
| if not str(node.get(field, "")).strip(): | ||
| fail(f"term {term} has an empty {field}") | ||
| seen[term] = node |
| @@ -1,8 +1,11 @@ | |||
| .PHONY: validate validate-resource-contract validate-measurement validate-value-type validate-source-locator validate-sourceos-repo-manifest validate-mesh-action-registry validate-control-plane-examples validate-nlboot-examples validate-lattice-data-governai-examples validate-ops-history-examples validate-runtime-observability-examples validate-interpretability-examples validate-lifecycle-boundary-examples validate-svf-contracts validate-sync-cycle-receipts validate-onboarding-examples validate-runtime-causality-examples validate-agentic-os-examples validate-triparty-examples validate-labor-market-examples validate-supply-chain-risk-examples validate-reasoning-examples validate-mpcc-event-examples validate-knowledge-nugget-examples validate-semantic-action-examples validate-epistemic-kernel-examples validate-ab-update-examples validate-device-service-examples validate-duplicate-schema-ids validate-lawful-dispatch-receipt validate-architectural-building-block validate-agent-passport-examples validate-seam-definition-examples validate-measurement | |||
| .PHONY: validate validate-resource-contract validate-measurement validate-value-type validate-source-locator validate-sourceos-repo-manifest validate-mesh-action-registry validate-control-plane-examples validate-nlboot-examples validate-lattice-data-governai-examples validate-ops-history-examples validate-runtime-observability-examples validate-interpretability-examples validate-lifecycle-boundary-examples validate-svf-contracts validate-sync-cycle-receipts validate-onboarding-examples validate-runtime-causality-examples validate-agentic-os-examples validate-triparty-examples validate-labor-market-examples validate-supply-chain-risk-examples validate-reasoning-examples validate-mpcc-event-examples validate-knowledge-nugget-examples validate-semantic-action-examples validate-epistemic-kernel-examples validate-ab-update-examples validate-device-service-examples validate-duplicate-schema-ids validate-lawful-dispatch-receipt validate-architectural-building-block validate-agent-passport-examples validate-seam-definition-examples validate-agent-system-vocabulary validate-measurement | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements T0-3. Adds
semantic/agent-system-vocabulary.jsonld(6 terms, each @type/rdfs:label/rdfs:comment) + validator intomake validate.Verification
python3 tools/validate_agent_system_vocabulary.py→OK: agent-system vocabulary valid; 6 terms defined with @type + rdfs:label + rdfs:comment (...)make validate→OK: validateAcceptance criteria
Closes #231