Terminology: template.yaml files are CONTRACT templates, not capability templates #117
Labels
No labels
blocked:children
blocked:commit-ready-failed
blocked:depends-231
blocked:depends-236
blocked:depends-237
blocked:depends-238
blocked:depends-239
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-lint
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:no-changes
blocked:no-procedure
blocked:preflight
blocked:verify-failed
bug
enhancement
feature-request
high-priority
in-progress
lint-cleanup
needs-decompose
needs-triage
ops-retry
ops-task
phase-5
quickfix
security/medium
self-building
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/mesh-seed#117
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Critical Terminology Error
The codebase conflates two different concepts:
What template.yaml files actually are:
What capabilities actually are:
Current Code Confusion
Evidence of misnamed concepts:
CapabilityRegistryloads template.yaml (should beContractRegistry)CapabilityRecordhasskillsfield (should beContractRecordwith skill_family)CapabilityLoaderloads template.yaml (should load contract definitions)Impact
This terminology error causes:
Fix Required
Rename to contract terminology:
CapabilityRegistry→ContractRegistryCapabilityRecord→ContractRecordCapabilityLoader→ContractLoadercapabilities/_muscle/→contracts/_muscle/Clarify in documentation:
Separate concerns:
References
Code Evidence: Workers Have "Capabilities" (Should Be "Contracts")
runtime/worker_registry.py:180-289
Workers register with "capabilities" but this is terminology confusion:
The Confusion
Workers are registering "capabilities" but what they're actually registering is:
What Should Happen
Workers register:
Current "Capability" Fields Are Actually Contract References
Evidence from WorkerRegistration (line 40-63):
capabilities: set[str]- Should becontracts: set[str]behavior_capability: str- Should bebehavior_contract: strcapability_registry.get(cap)- Should validate against contract templatesLedger Schema Also Confused
From substrate/ledger.py:
capability_id TEXT DEFAULT ''in agents tablecapability_id TEXT NOT NULLin worker_instances tableThese should be
contract_id- they reference which contract the worker is executing.Impact
The terminology confusion causes:
References
Template.yaml Structure Evidence
capabilities/_muscle/writer/v1/template.yaml
Current naming (incorrect):
What This Actually Defines
This is a contract template, not a capability template:
id: writer= Contract identifier (which contract type)skills:= Skill family that can fulfill contractexecution.bond_required= Economic termsgenotype.constraints= Validation constraintsCorrect Structure Should Be
worker_factory Template Also Confused
capabilities/_muscle/worker_factory/template.yaml:capability.id: worker_factory- Should becontract.id: worker_factoryDirectory Naming Confusion
capabilities/_muscle/writer/v1/should be:contracts/_muscle/writer/v1/- Contract templates directoryWorkers don't "have" these directories - they reference these contract templates when executing.
Summary
Every file currently called "capability template" is actually a "contract template". The entire naming convention needs systematic renaming:
capabilities/→contracts/capability:→contract:CapabilityRegistry→ContractRegistrycapabilities:→contracts:capability_id→contract_idThis is foundational - all downstream architecture depends on this terminology correction.
RESOLVED - Terminology refactored to "primitives"
This issue has been addressed by the comprehensive terminology refactoring in commit
a10e79f.What was done:
Directory renamed:
capabilities/→primitives/Runtime modules renamed:
Class names updated:
Template schema updated:
primitive:,type:, andtier:fieldsBase templates created:
Why "primitives" over "contracts":
Tests: All 43 tests passing, 24/25 primitives loading correctly.
This issue can be closed.