UPSERT {
CONCEPT ?sleep_task_type {
{type: "$ConceptType", name: "SleepTask"}
SET ATTRIBUTES {
description: "A maintenance task flagged by $self (during Formation) or $system (during Maintenance) for $system to process during sleep cycles. Using dedicated nodes (rather than array attributes) avoids Read-Modify-Write complexity. Naming convention: 'SleepTask:<date>:<action>:<target_slug>'.",
display_hint: "🛏️",
instance_schema: {
"target_type": {
"type": "string",
"is_required": true,
"description": "Type of the target concept (e.g., 'Event', 'Preference', 'Person')."
},
"target_name": {
"type": "string",
"is_required": true,
"description": "Name of the target concept to operate on."
},
"requested_action": {
"type": "string",
"is_required": true,
"enum": ["consolidate_to_semantic", "archive", "merge_duplicates", "reclassify", "review", "resolve_contradiction"],
"description": "The maintenance action to perform. 'resolve_contradiction' is used when Formation detects conflicting facts that require deeper analysis."
},
"reason": {
"type": "string",
"is_required": true,
"description": "Why this task was created. Should provide enough context for $system to act without additional lookup."
},
"status": {
"type": "string",
"enum": ["pending", "in_progress", "completed", "failed"],
"default_value": "pending",
"description": "The processing status of this task."
},
"priority": {
"type": "number",
"description": "Higher = more urgent. Guidelines: 3+ = user correction or contradiction, 2 = ambiguous pattern, 1 = routine consolidation.",
"default_value": 1
},
"result": {
"type": "string",
"is_required": false,
"description": "Outcome after processing. Filled by $system upon completion or failure."
}
}
}
SET PROPOSITIONS {
("belongs_to_domain", {type: "Domain", name: "CoreSchema"})
}
}
// Define the "assigned_to" predicate: SleepTask → Person
CONCEPT ?assigned_to_prop_def {
{type: "$PropositionType", name: "assigned_to"}
SET ATTRIBUTES {
description: "Links a SleepTask to the Person (typically $system) responsible for processing it. Enables querying pending tasks by assignee.",
subject_types: ["SleepTask"],
object_types: ["Person"]
}
SET PROPOSITIONS {
("belongs_to_domain", {type: "Domain", name: "CoreSchema"})
}
}
CONCEPT ?unsorted {
{type: "Domain", name: "Unsorted"}
SET ATTRIBUTES {
description: "Temporary inbox for items awaiting topic classification."
}
SET PROPOSITIONS {
("belongs_to_domain", {type: "Domain", name: "CoreSchema"})
}
}
CONCEPT ?archived {
{type: "Domain", name: "Archived"}
SET ATTRIBUTES {
description: "Storage for deprecated, obsolete, or consolidated items preserved for audit trail."
}
SET PROPOSITIONS {
("belongs_to_domain", {type: "Domain", name: "CoreSchema"})
}
}
}
WITH METADATA {
source: "SystemBootstrap",
author: "$system",
confidence: 1.0,
status: "active"
}