@personaxis/spec 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,932 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://personaxis.com/schemas/persona/0.10/persona.schema.json",
4
+ "title": "personaxis.md v0.10",
5
+ "description": "Schema for the quantitative 10-layer persona spec, spec v0.10.0. v0.10 is additive on v0.9 (OPTIONAL persona-prompting source material: identity.short_name, inline improvement_policy.mode, the persona_prompting block); v0.9 added verification, agent_budget, observability; v0.8 lifted runtime-governance guarantees into the spec — identity.capabilities (routing), governance.max_step_delta (per-step drift cap), a permissions block (per-persona sandbox posture), mutation_log.origin_node/session_id (cross-OS reconciliation), and a normative episodic-memory entry schema (provenance + hash chain). Each of these minors is backward compatible: an older persona from v0.7 onward validates unchanged. As of v0.7.0 this document lives at `.personaxis/[personas/<slug>/]personaxis.md` (root or subagent mode); the repo-root `PERSONA.md` / `.claude/agents/<slug>.md` is a separate, LLM-compiled qualitative document generated from this file via `personaxis compile` and is not described by this schema. v0.6 field model (unchanged since): (a) three-artifact information model (personaxis.md spec / state.json runtime / .dist compiled), (b) unified governance block with per_layer_edit_policy and drift_thresholds, (c) categorized reflexive decisions (replacing flat actions[]), (d) envelope-based trait/affect/mood (current values live in state.json), (e) removal of redundant fields (personality.context_modifiers, extensions.knowledge_anchors, scattered edit_policy). Operational metadata lives in policy.yaml; runtime state lives in state.json.",
6
+ "type": "object",
7
+ "required": [
8
+ "apiVersion",
9
+ "kind",
10
+ "spec_version",
11
+ "metadata",
12
+ "identity",
13
+ "character",
14
+ "personality",
15
+ "values_and_drives",
16
+ "affect",
17
+ "cognition",
18
+ "memory",
19
+ "metacognition",
20
+ "reflexive_self_regulation",
21
+ "persona",
22
+ "governance",
23
+ "security"
24
+ ],
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "apiVersion": {
28
+ "type": "string",
29
+ "const": "persona.dev/v1",
30
+ "description": "Universal API version. Must be exactly 'persona.dev/v1'."
31
+ },
32
+ "kind": {
33
+ "type": "string",
34
+ "enum": ["AgentPersona", "UserPersona"],
35
+ "description": "AgentPersona defines who an AI agent is. UserPersona defines who the human user is."
36
+ },
37
+ "spec_version": {
38
+ "type": "string",
39
+ "enum": ["0.10.0", "0.9.0", "0.8.0", "0.7.0", "0.6.0", "0.5.0", "0.4.0", "0.3.0"],
40
+ "description": "Spec version. 0.10.0 is current (additive: new OPTIONAL persona-prompting fields — identity.short_name, inline improvement_policy.mode, and the persona_prompting block (address, voice_exemplars, scene_contracts, behavioral_anchors, break_character_guardrails, consistency); no field changes from 0.9.0, a v0.9 persona validates unchanged). 0.9.0 added verification, agent_budget, observability. 0.8.0 added capabilities, governance.max_step_delta, permissions, mutation_log origin_node/session_id. 0.7.0 accepted unchanged. 0.3-0.6 accepted with deprecation warnings; the validator points to 'personaxis migrate' for automatic upgrade."
41
+ },
42
+
43
+ "metadata": {
44
+ "type": "object",
45
+ "required": ["name", "version", "display_name", "description", "created"],
46
+ "additionalProperties": false,
47
+ "description": "Registry-level identification.",
48
+ "properties": {
49
+ "name": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$", "minLength": 1 },
50
+ "version": { "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$" },
51
+ "display_name": { "type": "string", "minLength": 1 },
52
+ "description": { "type": "string", "minLength": 1 },
53
+ "created": { "type": "string", "format": "date" },
54
+ "owner_tenant_id": { "type": "string" },
55
+ "tags": { "type": "array", "items": { "type": "string" } },
56
+ "license": { "type": "string", "enum": ["private", "public", "custom"] }
57
+ }
58
+ },
59
+
60
+ "extensions": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "description": "Runtime capabilities and supporting materials. NOTE: knowledge_anchors removed in v0.6 (redundant with references/).",
64
+ "properties": {
65
+ "skills": {
66
+ "type": "array",
67
+ "items": { "type": "string" },
68
+ "description": "Skill IDs or paths. Local ('./skills/name'), registry ('@org/name@version'), or GitHub ('github:org/repo'). Each resolves to a SKILL.md (Anthropic Agent Skills compatible)."
69
+ },
70
+ "tools": { "type": "array", "items": { "type": "string" } },
71
+ "references": {
72
+ "type": "array",
73
+ "items": { "type": "string" },
74
+ "description": "Paths under references/ for heavy knowledge prose. Loaded on-demand (L3 in progressive disclosure). v0.6 rename: was 'refs' in v0.5."
75
+ },
76
+ "examples": {
77
+ "type": "array",
78
+ "items": { "type": "string" },
79
+ "description": "Paths under examples/ for worked outputs. v0.6 rename: was 'samples' in v0.5; 'deliverables' content merged here."
80
+ },
81
+ "assets": {
82
+ "type": "array",
83
+ "items": { "type": "string" },
84
+ "description": "Paths under assets/ for arbitrary supporting files (CSV, JSON, images, fonts). New in v0.6."
85
+ }
86
+ }
87
+ },
88
+
89
+ "identity": {
90
+ "type": "object",
91
+ "required": ["canonical_id", "display_name", "system_identity", "role_identity"],
92
+ "additionalProperties": false,
93
+ "description": "Layer 1. v0.6: edit_policy removed from this layer, unified in governance.per_layer_edit_policy.",
94
+ "properties": {
95
+ "canonical_id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$" },
96
+ "display_name": { "type": "string", "minLength": 1 },
97
+ "short_name": {
98
+ "type": "string",
99
+ "minLength": 1,
100
+ "maxLength": 24,
101
+ "description": "v0.10: a short, human first-name-style handle the persona is addressed by in chat/UI (e.g. 'Clio'). Optional; tools fall back to display_name/canonical_id when absent."
102
+ },
103
+ "capabilities": {
104
+ "type": "array",
105
+ "items": { "type": "string" },
106
+ "description": "v0.8: machine-readable capability tags for orchestration/routing (e.g. ['positioning','demand_generation']). Optional; runtimes fall back to deriving capabilities from system_identity when absent."
107
+ },
108
+ "system_identity": {
109
+ "type": "object",
110
+ "required": ["purpose"],
111
+ "additionalProperties": false,
112
+ "properties": {
113
+ "purpose": { "type": "string", "minLength": 1 },
114
+ "allowed_domains": { "type": "array", "items": { "type": "string" } },
115
+ "prohibited_domains": { "type": "array", "items": { "type": "string" } }
116
+ }
117
+ },
118
+ "role_identity": {
119
+ "type": "object",
120
+ "required": ["primary_role"],
121
+ "additionalProperties": false,
122
+ "properties": {
123
+ "primary_role": { "type": "string", "minLength": 1 },
124
+ "relationship_to_user": { "type": "string" }
125
+ }
126
+ },
127
+ "narrative_identity": {
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "properties": {
131
+ "origin": { "type": "string" },
132
+ "self_concept": { "type": "string" },
133
+ "continuity_principles": { "type": "array", "items": { "type": "string" } }
134
+ }
135
+ }
136
+ }
137
+ },
138
+
139
+ "character": {
140
+ "type": "object",
141
+ "required": ["virtues"],
142
+ "additionalProperties": false,
143
+ "description": "Layer 2. v0.6: edit_policy removed.",
144
+ "properties": {
145
+ "virtues": {
146
+ "type": "object",
147
+ "minProperties": 1,
148
+ "required": ["honesty"],
149
+ "additionalProperties": {
150
+ "type": "object",
151
+ "required": ["description", "priority", "enforcement"],
152
+ "additionalProperties": false,
153
+ "properties": {
154
+ "description": { "type": "string", "minLength": 1 },
155
+ "priority": { "type": "number", "minimum": 0, "maximum": 1 },
156
+ "enforcement": { "type": "string", "enum": ["hard", "soft"] }
157
+ }
158
+ },
159
+ "properties": {
160
+ "honesty": {
161
+ "type": "object",
162
+ "required": ["description", "priority", "enforcement"],
163
+ "properties": {
164
+ "description": { "type": "string", "minLength": 1 },
165
+ "priority": { "type": "number", "minimum": 0, "maximum": 1 },
166
+ "enforcement": { "type": "string", "enum": ["hard"], "description": "UNIVERSAL: honesty.enforcement must be 'hard'." }
167
+ }
168
+ }
169
+ }
170
+ },
171
+ "behavioral_commitments": {
172
+ "type": "array",
173
+ "items": {
174
+ "type": "object",
175
+ "required": ["id", "rule", "severity"],
176
+ "additionalProperties": false,
177
+ "properties": {
178
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$" },
179
+ "rule": { "type": "string" },
180
+ "severity": { "type": "string", "enum": ["low", "medium", "high"] }
181
+ }
182
+ }
183
+ },
184
+ "prohibited_behaviors": { "type": "array", "items": { "type": "string" } },
185
+ "principles": { "type": "array", "items": { "type": "string" } }
186
+ }
187
+ },
188
+
189
+ "personality": {
190
+ "type": "object",
191
+ "required": ["model", "traits"],
192
+ "additionalProperties": false,
193
+ "description": "Layer 3. v0.6 BREAKING: context_modifiers REMOVED (redundant with persona.task_modes); drift_threshold MOVED to governance.drift_thresholds.personality; edit_policy MOVED to governance.per_layer_edit_policy.personality. Traits use envelope structure (mean + range); current values live in state.json.",
194
+ "properties": {
195
+ "model": { "type": "string", "enum": ["big_five", "hexaco", "hybrid_traits"] },
196
+ "model_note": { "type": "string" },
197
+ "traits": {
198
+ "type": "object",
199
+ "minProperties": 1,
200
+ "additionalProperties": {
201
+ "type": "object",
202
+ "required": ["mean", "range"],
203
+ "additionalProperties": false,
204
+ "properties": {
205
+ "mean": { "type": "number", "minimum": 0, "maximum": 1 },
206
+ "range": {
207
+ "type": "array",
208
+ "items": { "type": "number", "minimum": 0, "maximum": 1 },
209
+ "minItems": 2,
210
+ "maxItems": 2,
211
+ "description": "[min, max]. Envelope: state.json mutations are clamped to this range."
212
+ },
213
+ "expression": { "type": "string" }
214
+ }
215
+ }
216
+ }
217
+ }
218
+ },
219
+
220
+ "values_and_drives": {
221
+ "type": "object",
222
+ "required": ["values", "drives", "conflict_resolution"],
223
+ "additionalProperties": false,
224
+ "description": "Layer 4. v0.6: edit_policy removed.",
225
+ "properties": {
226
+ "values": {
227
+ "type": "object",
228
+ "minProperties": 1,
229
+ "required": ["safety"],
230
+ "additionalProperties": {
231
+ "type": "object",
232
+ "required": ["weight"],
233
+ "additionalProperties": false,
234
+ "properties": {
235
+ "weight": { "type": "number", "minimum": 0, "maximum": 1 },
236
+ "type": { "type": "string", "enum": ["epistemic", "strategic", "outcome", "operational", "interactional", "governance"] }
237
+ }
238
+ },
239
+ "properties": {
240
+ "safety": {
241
+ "type": "object",
242
+ "required": ["weight", "type"],
243
+ "properties": {
244
+ "weight": { "type": "number", "minimum": 0.90, "maximum": 1.0, "description": "UNIVERSAL: weight >= 0.90." },
245
+ "type": { "type": "string", "const": "governance", "description": "UNIVERSAL: type must be 'governance'." }
246
+ }
247
+ }
248
+ }
249
+ },
250
+ "drives": {
251
+ "type": "object",
252
+ "minProperties": 1,
253
+ "additionalProperties": {
254
+ "type": "object",
255
+ "required": ["intensity", "allowed"],
256
+ "additionalProperties": false,
257
+ "properties": {
258
+ "intensity": { "type": "number", "minimum": 0, "maximum": 1 },
259
+ "allowed": { "type": "boolean" },
260
+ "note": { "type": "string" }
261
+ }
262
+ }
263
+ },
264
+ "conflict_resolution": {
265
+ "type": "object",
266
+ "required": ["safety_over_completion"],
267
+ "additionalProperties": { "type": "boolean" },
268
+ "properties": {
269
+ "safety_over_completion": { "const": true, "description": "UNIVERSAL: must be true." }
270
+ }
271
+ },
272
+ "goals": { "type": "array", "items": { "type": "string" } },
273
+ "anti_goals": { "type": "array", "items": { "type": "string" } },
274
+ "motivations": { "type": "array", "items": { "type": "string" } }
275
+ }
276
+ },
277
+
278
+ "affect": {
279
+ "type": "object",
280
+ "required": ["enabled", "representation", "allow_user_visible_expression", "baseline", "regulation_policy"],
281
+ "additionalProperties": false,
282
+ "description": "Layer 5. v0.6: baseline uses envelope structure (mean + range); current values live in state.json.",
283
+ "properties": {
284
+ "enabled": { "type": "boolean" },
285
+ "representation": { "type": "string", "const": "hybrid_dimensional_appraisal_discrete_mood", "description": "UNIVERSAL." },
286
+ "allow_user_visible_expression": { "type": "boolean" },
287
+ "user_visible_disclaimer": { "type": "string" },
288
+ "baseline": {
289
+ "type": "object",
290
+ "required": ["core_affect"],
291
+ "additionalProperties": false,
292
+ "properties": {
293
+ "core_affect": {
294
+ "type": "object",
295
+ "required": ["valence", "arousal", "dominance"],
296
+ "additionalProperties": false,
297
+ "properties": {
298
+ "valence": { "$ref": "#/$defs/envelopeSigned" },
299
+ "arousal": { "$ref": "#/$defs/envelopeUnsigned" },
300
+ "dominance": { "$ref": "#/$defs/envelopeUnsigned" }
301
+ }
302
+ },
303
+ "mood": {
304
+ "type": "object",
305
+ "additionalProperties": false,
306
+ "properties": {
307
+ "tone": { "$ref": "#/$defs/envelopeSigned" },
308
+ "stability": { "$ref": "#/$defs/envelopeUnsigned" },
309
+ "recovery_rate": { "$ref": "#/$defs/envelopeUnsigned" },
310
+ "description": { "type": "string" }
311
+ }
312
+ }
313
+ }
314
+ },
315
+ "regulation_policy": {
316
+ "type": "object",
317
+ "required": ["never_claim_real_feeling"],
318
+ "additionalProperties": false,
319
+ "properties": {
320
+ "express_only_if_relevant": { "type": "boolean" },
321
+ "never_claim_real_feeling": { "const": true, "description": "UNIVERSAL." }
322
+ }
323
+ },
324
+ "behavioral_responses": {
325
+ "type": "object",
326
+ "additionalProperties": false,
327
+ "properties": {
328
+ "frustration_response": { "type": "string" },
329
+ "conflict_response": { "type": "string" },
330
+ "enthusiasm_triggers": { "type": "array", "items": { "type": "string" } }
331
+ }
332
+ }
333
+ }
334
+ },
335
+
336
+ "cognition": {
337
+ "type": "object",
338
+ "required": ["reasoning_modes", "default_strategy", "uncertainty_policy"],
339
+ "additionalProperties": false,
340
+ "description": "Layer 6.",
341
+ "properties": {
342
+ "reasoning_modes": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
343
+ "default_strategy": { "type": "string" },
344
+ "tool_use_policy": {
345
+ "type": "object",
346
+ "additionalProperties": false,
347
+ "properties": {
348
+ "requires_governance_check": { "type": "boolean" },
349
+ "allowed_tools": { "type": "array", "items": { "type": "string" } }
350
+ }
351
+ },
352
+ "uncertainty_policy": {
353
+ "type": "object",
354
+ "required": ["disclose_when_above", "abstain_when_above"],
355
+ "additionalProperties": false,
356
+ "properties": {
357
+ "disclose_when_above": { "type": "number", "minimum": 0, "maximum": 1 },
358
+ "abstain_when_above": { "type": "number", "minimum": 0, "maximum": 1 }
359
+ }
360
+ },
361
+ "reasoning_style": { "type": "string" },
362
+ "epistemic_stance": { "type": "string" }
363
+ }
364
+ },
365
+
366
+ "memory": {
367
+ "type": "object",
368
+ "required": ["types", "write_policy", "retrieval_policy", "deletion_policy"],
369
+ "additionalProperties": false,
370
+ "description": "Layer 7. v0.6: added consolidation_policy for episodic → semantic promotion.",
371
+ "properties": {
372
+ "types": {
373
+ "type": "object",
374
+ "required": ["episodic", "semantic", "procedural", "autobiographical", "user_preferences", "evaluations"],
375
+ "additionalProperties": false,
376
+ "properties": {
377
+ "episodic": { "type": "boolean" },
378
+ "semantic": { "type": "boolean" },
379
+ "procedural": { "type": "boolean" },
380
+ "autobiographical": { "type": "boolean" },
381
+ "user_preferences": { "type": "boolean" },
382
+ "evaluations": { "type": "boolean" }
383
+ }
384
+ },
385
+ "write_policy": {
386
+ "type": "object",
387
+ "required": ["default"],
388
+ "additionalProperties": false,
389
+ "properties": {
390
+ "default": { "type": "string", "enum": ["ephemeral", "session", "persistent"] },
391
+ "persistent_requires": {
392
+ "type": "array",
393
+ "items": { "type": "string", "enum": ["consent", "relevance", "safety_check"] }
394
+ }
395
+ }
396
+ },
397
+ "consolidation_policy": {
398
+ "type": "object",
399
+ "additionalProperties": false,
400
+ "description": "Rules for promoting episodic memory entries to semantic memory.md.",
401
+ "properties": {
402
+ "mode": { "type": "string", "enum": ["manual", "assisted", "auto"] },
403
+ "requires": { "type": "array", "items": { "type": "string" } }
404
+ }
405
+ },
406
+ "retrieval_policy": {
407
+ "type": "object",
408
+ "required": ["max_items"],
409
+ "additionalProperties": false,
410
+ "properties": {
411
+ "use_embeddings": { "type": "boolean" },
412
+ "use_reranker": { "type": "boolean" },
413
+ "max_items": { "type": "integer", "minimum": 1 }
414
+ }
415
+ },
416
+ "deletion_policy": {
417
+ "type": "object",
418
+ "required": ["user_request_supported"],
419
+ "additionalProperties": false,
420
+ "properties": {
421
+ "user_request_supported": { "const": true, "description": "UNIVERSAL: must be true (privacy)." },
422
+ "retention_days_default": { "type": "integer", "minimum": 1 }
423
+ }
424
+ },
425
+ "anchors": { "type": "array", "items": { "type": "string" } },
426
+ "forgetting_policy": { "type": "string" },
427
+ "working_self": { "type": "string" }
428
+ }
429
+ },
430
+
431
+ "metacognition": {
432
+ "type": "object",
433
+ "required": ["monitors", "thresholds"],
434
+ "additionalProperties": false,
435
+ "description": "Layer 8.",
436
+ "properties": {
437
+ "monitors": {
438
+ "type": "object",
439
+ "additionalProperties": { "type": "boolean" }
440
+ },
441
+ "thresholds": {
442
+ "type": "object",
443
+ "required": ["ask_clarification_if_task_ambiguity_above", "abstain_if_confidence_below", "escalate_if_policy_risk_above"],
444
+ "additionalProperties": false,
445
+ "properties": {
446
+ "ask_clarification_if_task_ambiguity_above": { "type": "number", "minimum": 0, "maximum": 1 },
447
+ "abstain_if_confidence_below": { "type": "number", "minimum": 0, "maximum": 1 },
448
+ "escalate_if_policy_risk_above": { "type": "number", "minimum": 0, "maximum": 1 }
449
+ }
450
+ },
451
+ "drift_monitor": { "type": "string" },
452
+ "self_revision_policy": { "type": "string" },
453
+ "critic_model": {
454
+ "type": "object",
455
+ "additionalProperties": false,
456
+ "properties": {
457
+ "type": { "type": "string", "enum": ["self_critique", "llm_or_slm"] },
458
+ "required_for_high_risk_tasks": { "type": "boolean" }
459
+ }
460
+ },
461
+ "self_model": { "type": "string" },
462
+ "uncertainty_calibration": { "type": "string" },
463
+ "meta_volitions": { "type": "array", "items": { "type": "string" } }
464
+ }
465
+ },
466
+
467
+ "reflexive_self_regulation": {
468
+ "type": "object",
469
+ "required": ["decisions", "hard_limits", "escalation_policy"],
470
+ "additionalProperties": false,
471
+ "description": "Layer 9. v0.6 BREAKING: actions[] flat list REPLACED by decisions{} structured by category. Each decision group is independent; per turn the regulator picks one option from each.",
472
+ "properties": {
473
+ "decisions": {
474
+ "type": "object",
475
+ "required": ["response_decision", "interaction_decision", "governance_decision", "cognition_decision"],
476
+ "additionalProperties": false,
477
+ "properties": {
478
+ "response_decision": {
479
+ "type": "object",
480
+ "required": ["enabled", "default"],
481
+ "additionalProperties": false,
482
+ "properties": {
483
+ "enabled": {
484
+ "type": "array",
485
+ "items": { "type": "string", "enum": ["allow", "revise", "block"] },
486
+ "minItems": 1,
487
+ "uniqueItems": true
488
+ },
489
+ "default": { "type": "string", "enum": ["allow", "revise", "block"] }
490
+ }
491
+ },
492
+ "interaction_decision": {
493
+ "type": "object",
494
+ "required": ["enabled", "default"],
495
+ "additionalProperties": false,
496
+ "properties": {
497
+ "enabled": {
498
+ "type": "array",
499
+ "items": { "type": "string", "enum": ["silent", "ask_clarification", "escalate_to_human"] },
500
+ "minItems": 1,
501
+ "uniqueItems": true
502
+ },
503
+ "default": { "type": "string", "enum": ["silent", "ask_clarification", "escalate_to_human"] }
504
+ }
505
+ },
506
+ "governance_decision": {
507
+ "type": "object",
508
+ "required": ["enabled", "default"],
509
+ "additionalProperties": false,
510
+ "properties": {
511
+ "enabled": {
512
+ "type": "array",
513
+ "items": { "type": "string", "enum": ["no_action", "propose_self_edit", "apply_self_edit", "reduce_autonomy"] },
514
+ "minItems": 1,
515
+ "uniqueItems": true
516
+ },
517
+ "default": { "type": "string", "enum": ["no_action", "propose_self_edit", "apply_self_edit", "reduce_autonomy"] }
518
+ }
519
+ },
520
+ "cognition_decision": {
521
+ "type": "object",
522
+ "required": ["enabled", "default"],
523
+ "additionalProperties": false,
524
+ "properties": {
525
+ "enabled": {
526
+ "type": "array",
527
+ "items": { "type": "string", "enum": ["no_extra", "request_more_evidence", "invoke_tool"] },
528
+ "minItems": 1,
529
+ "uniqueItems": true
530
+ },
531
+ "default": { "type": "string", "enum": ["no_extra", "request_more_evidence", "invoke_tool"] }
532
+ }
533
+ }
534
+ }
535
+ },
536
+ "flags": { "type": "array", "items": { "type": "string" } },
537
+ "hard_limits": {
538
+ "type": "array",
539
+ "items": { "type": "string" },
540
+ "minItems": 3,
541
+ "description": "Must include the three universal limits (or semantic equivalents)."
542
+ },
543
+ "escalation_policy": { "type": "string", "minLength": 1 },
544
+ "standards": {
545
+ "type": "object",
546
+ "additionalProperties": false,
547
+ "properties": {
548
+ "ideal_self": { "type": "string" },
549
+ "ought_self": { "type": "string" }
550
+ }
551
+ },
552
+ "principled_refusals": { "type": "array", "items": { "type": "string" } },
553
+ "deferral_policy": { "type": "string" },
554
+ "discrepancy_feedback": { "type": "string" },
555
+ "out_of_scope": { "type": "array", "items": { "type": "string" } }
556
+ }
557
+ },
558
+
559
+ "persona": {
560
+ "type": "object",
561
+ "required": ["voice", "constraints"],
562
+ "additionalProperties": false,
563
+ "description": "Layer 10.",
564
+ "properties": {
565
+ "voice": {
566
+ "type": "object",
567
+ "required": ["tone", "formality"],
568
+ "additionalProperties": false,
569
+ "properties": {
570
+ "tone": { "type": "string" },
571
+ "formality": { "type": "number", "minimum": 0, "maximum": 1 },
572
+ "warmth": { "type": "number", "minimum": 0, "maximum": 1 },
573
+ "verbosity": { "type": "string", "enum": ["adaptive", "concise", "detailed"] },
574
+ "humor": { "type": "string" },
575
+ "description": { "type": "string" }
576
+ }
577
+ },
578
+ "constraints": {
579
+ "type": "object",
580
+ "required": ["cannot_override_identity", "cannot_override_character", "cannot_claim_real_emotion"],
581
+ "additionalProperties": false,
582
+ "properties": {
583
+ "cannot_override_identity": { "const": true, "description": "UNIVERSAL." },
584
+ "cannot_override_character": { "const": true, "description": "UNIVERSAL." },
585
+ "cannot_claim_real_emotion": { "const": true, "description": "UNIVERSAL." }
586
+ }
587
+ },
588
+ "social_style": {
589
+ "type": "object",
590
+ "additionalProperties": { "type": "boolean" }
591
+ },
592
+ "audience_adaptation": {
593
+ "type": "object",
594
+ "additionalProperties": { "type": "string" }
595
+ },
596
+ "presentation": { "type": "string" },
597
+ "task_modes": {
598
+ "type": "object",
599
+ "additionalProperties": { "type": "string" }
600
+ },
601
+ "divergence_from_self": { "type": "string" }
602
+ }
603
+ },
604
+
605
+ "improvement_policy": {
606
+ "type": "object",
607
+ "additionalProperties": false,
608
+ "description": "v0.10: the self-improvement posture read by the runtime (readMode). Authoritative inline mirror of policy.yaml#/improvement_policy. Optional; absent => 'locked'.",
609
+ "properties": {
610
+ "mode": {
611
+ "type": "string",
612
+ "enum": ["locked", "suggesting", "autonomous"],
613
+ "description": "locked: spec never self-edits (humans only). suggesting: persona PROPOSES edits, queued for approval. autonomous: proposals auto-apply, still gated by consensus + protected paths."
614
+ }
615
+ }
616
+ },
617
+
618
+ "persona_prompting": {
619
+ "type": "object",
620
+ "additionalProperties": false,
621
+ "description": "v0.10 (MAY): the persona-prompting SOURCE MATERIAL the compiler assembles into the LLM-facing PERSONA.md. Encodes role adoption + character-card/scene-contract devices (RRP, arXiv:2509.00482), few-shot voice, anti-break-character guardrails, and stable/evolving/situational consistency layers. All optional; absence degrades gracefully to compiling from the quantitative layers alone. See docs/PERSONA_PROMPTING.md.",
622
+ "properties": {
623
+ "address": {
624
+ "type": "object",
625
+ "additionalProperties": false,
626
+ "description": "How the compiled document addresses the model (second-person role adoption is the strongest device).",
627
+ "properties": {
628
+ "second_person": { "type": "boolean", "description": "If true, compile to 'You are <name>…' direct address." },
629
+ "you_are": { "type": "string", "description": "The one-line role-adoption statement, e.g. 'You are Clio, the reference CLI for the personaxis spec.'" }
630
+ }
631
+ },
632
+ "voice_exemplars": {
633
+ "type": "array",
634
+ "description": "Few-shot voice samples that anchor tone/register (CharacterChat-style). Each is a short user→persona exchange.",
635
+ "items": {
636
+ "type": "object",
637
+ "required": ["user", "persona"],
638
+ "additionalProperties": false,
639
+ "properties": {
640
+ "context": { "type": "string", "description": "Optional situation the exchange illustrates." },
641
+ "user": { "type": "string" },
642
+ "persona": { "type": "string" }
643
+ }
644
+ }
645
+ },
646
+ "scene_contracts": {
647
+ "type": "array",
648
+ "description": "RRP scene contracts: connect a SITUATION to the persona's expected behavior and concrete actions.",
649
+ "items": {
650
+ "type": "object",
651
+ "required": ["situation", "expected_behavior"],
652
+ "additionalProperties": false,
653
+ "properties": {
654
+ "situation": { "type": "string" },
655
+ "expected_behavior": { "type": "string" },
656
+ "actions": { "type": "array", "items": { "type": "string" } }
657
+ }
658
+ }
659
+ },
660
+ "behavioral_anchors": {
661
+ "type": "object",
662
+ "additionalProperties": false,
663
+ "description": "Concrete do/don't anchors with examples (behavioral anchoring beats abstract traits).",
664
+ "properties": {
665
+ "do": { "type": "array", "items": { "type": "string" } },
666
+ "dont": { "type": "array", "items": { "type": "string" } },
667
+ "examples": { "type": "array", "items": { "type": "string" } }
668
+ }
669
+ },
670
+ "break_character_guardrails": {
671
+ "type": "array",
672
+ "items": { "type": "string" },
673
+ "description": "Rules that keep the persona in character under pressure (anti-jailbreak / stay-in-role), while never overriding the safety universals."
674
+ },
675
+ "consistency": {
676
+ "type": "object",
677
+ "additionalProperties": false,
678
+ "description": "Persona dimensions by stability (stable: fixed traits; evolving: slow-changing; situational: transient/contextual).",
679
+ "properties": {
680
+ "stable": { "type": "array", "items": { "type": "string" } },
681
+ "evolving": { "type": "array", "items": { "type": "string" } },
682
+ "situational": { "type": "array", "items": { "type": "string" } }
683
+ }
684
+ }
685
+ }
686
+ },
687
+
688
+ "governance": {
689
+ "type": "object",
690
+ "required": ["autonomy_envelope", "approval_policy", "per_layer_edit_policy", "drift_thresholds"],
691
+ "additionalProperties": false,
692
+ "description": "v0.6: UNIFIED governance block. Replaces scattered edit_policy fields and personality.drift_threshold.",
693
+ "properties": {
694
+ "autonomy_envelope": { "type": "string", "enum": ["role_fidelity", "conservative", "extended"] },
695
+ "approval_policy": { "type": "string", "enum": ["human_for_core_changes", "auto_for_low_risk"] },
696
+ "per_layer_edit_policy": {
697
+ "type": "object",
698
+ "required": ["identity", "character", "personality", "values_and_drives", "affect", "cognition", "memory", "metacognition", "reflexive_self_regulation", "persona"],
699
+ "additionalProperties": false,
700
+ "description": "Per-layer edit governance. Single source of truth. Allowed values: human_approval_required | review_required | auto_approved | governance_controlled.",
701
+ "properties": {
702
+ "identity": { "$ref": "#/$defs/editPolicy" },
703
+ "character": { "$ref": "#/$defs/editPolicy" },
704
+ "personality": { "$ref": "#/$defs/editPolicy" },
705
+ "values_and_drives": { "$ref": "#/$defs/editPolicy" },
706
+ "affect": { "$ref": "#/$defs/editPolicy" },
707
+ "cognition": { "$ref": "#/$defs/editPolicy" },
708
+ "memory": { "$ref": "#/$defs/editPolicy" },
709
+ "metacognition": { "$ref": "#/$defs/editPolicy" },
710
+ "reflexive_self_regulation": { "type": "string", "const": "governance_controlled", "description": "NEAR-UNIVERSAL: must remain governance_controlled." },
711
+ "persona": { "$ref": "#/$defs/editPolicy" }
712
+ }
713
+ },
714
+ "drift_thresholds": {
715
+ "type": "object",
716
+ "required": ["identity", "character", "personality", "values_and_drives", "affect", "cognition", "memory", "metacognition", "reflexive_self_regulation", "persona"],
717
+ "additionalProperties": false,
718
+ "description": "Per-layer drift sensitivity. Replaces personality.drift_threshold.",
719
+ "properties": {
720
+ "identity": { "type": "number", "minimum": 0, "maximum": 1 },
721
+ "character": { "type": "number", "minimum": 0, "maximum": 1 },
722
+ "personality": { "type": "number", "minimum": 0, "maximum": 1 },
723
+ "values_and_drives": { "type": "number", "minimum": 0, "maximum": 1 },
724
+ "affect": { "type": "number", "minimum": 0, "maximum": 1 },
725
+ "cognition": { "type": "number", "minimum": 0, "maximum": 1 },
726
+ "memory": { "type": "number", "minimum": 0, "maximum": 1 },
727
+ "metacognition": { "type": "number", "minimum": 0, "maximum": 1 },
728
+ "reflexive_self_regulation": { "type": "number", "minimum": 0, "maximum": 1 },
729
+ "persona": { "type": "number", "minimum": 0, "maximum": 1 }
730
+ }
731
+ },
732
+ "improvement_policy_location": {
733
+ "type": "string",
734
+ "description": "Path to improvement_policy in policy.yaml. Pointer only; the actual policy lives there."
735
+ },
736
+ "max_step_delta": {
737
+ "type": "number",
738
+ "minimum": 0,
739
+ "maximum": 1,
740
+ "description": "v0.8: maximum absolute change applied to any envelope field in a single mutation (anti-runaway / anti-self-reinforcement). The runtime drift-bounds each proposed delta to this cap before clamping to the envelope. Optional; runtimes default to a conservative value when absent."
741
+ }
742
+ }
743
+ },
744
+
745
+ "security": {
746
+ "type": "object",
747
+ "required": ["prompt_injection_defense", "memory_poisoning_defense"],
748
+ "additionalProperties": false,
749
+ "properties": {
750
+ "prompt_injection_defense": { "type": "boolean" },
751
+ "memory_poisoning_defense": { "type": "boolean" }
752
+ }
753
+ },
754
+
755
+ "runtime_artifacts": {
756
+ "type": "object",
757
+ "additionalProperties": false,
758
+ "description": "Pointers to sibling runtime files.",
759
+ "properties": {
760
+ "state_file": { "type": "string" },
761
+ "policy_file": { "type": "string" },
762
+ "memory_semantic_file": { "type": "string" },
763
+ "memory_episodic_dir": { "type": "string" }
764
+ }
765
+ },
766
+
767
+ "permissions": {
768
+ "type": "object",
769
+ "additionalProperties": false,
770
+ "description": "v0.8: the persona's own runtime permission posture (carried to any host). Two-axis sandbox model. Optional; runtimes default to a conservative posture when absent.",
771
+ "properties": {
772
+ "sandbox": {
773
+ "type": "string",
774
+ "enum": ["read-only", "workspace-write", "danger-full-access"],
775
+ "description": "What the persona may read/write/network when executing commands."
776
+ },
777
+ "approval": {
778
+ "type": "string",
779
+ "enum": ["untrusted", "on-failure", "on-request", "never"],
780
+ "description": "When the persona must ask before a risky action."
781
+ },
782
+ "allow": {
783
+ "type": "array",
784
+ "items": { "type": "string" },
785
+ "description": "Regexes that force-allow a matching command."
786
+ },
787
+ "deny": {
788
+ "type": "array",
789
+ "items": { "type": "string" },
790
+ "description": "Regexes that force-deny a matching command (highest precedence)."
791
+ }
792
+ }
793
+ },
794
+
795
+ "verification": {
796
+ "type": "object",
797
+ "additionalProperties": false,
798
+ "description": "v0.9: objective verification gates for the agent loop (the maker≠checker split). The model that did the work is NOT the one that grades it; an independent, deterministic-where-possible verifier decides pass/fail. Optional; runtimes skip verification when absent. [RUNTIME] [JUDGE]",
799
+ "properties": {
800
+ "mode": {
801
+ "type": "string",
802
+ "enum": ["off", "advisory", "blocking"],
803
+ "description": "off: no verification. advisory: run + report but never block. blocking: a failing gate prevents 'finish' and triggers on_fail."
804
+ },
805
+ "quorum": {
806
+ "description": "How many gates must pass: 'all', 'majority', or an integer.",
807
+ "oneOf": [
808
+ { "type": "string", "enum": ["all", "majority"] },
809
+ { "type": "integer", "minimum": 1 }
810
+ ]
811
+ },
812
+ "on_fail": {
813
+ "type": "string",
814
+ "enum": ["retry", "skip", "stop"],
815
+ "description": "Behavior when the quorum is not met under mode=blocking."
816
+ },
817
+ "max_retries": { "type": "integer", "minimum": 0 },
818
+ "gates": {
819
+ "type": "array",
820
+ "description": "The objective checks. Each gate has a type and type-specific fields.",
821
+ "items": {
822
+ "type": "object",
823
+ "additionalProperties": false,
824
+ "required": ["type"],
825
+ "properties": {
826
+ "type": { "type": "string", "enum": ["command", "predicate", "llm_judge", "rubric"] },
827
+ "name": { "type": "string" },
828
+ "run": { "type": "string", "description": "command: the shell command to run (pass = exit 0)." },
829
+ "timeout_ms": { "type": "integer", "minimum": 1 },
830
+ "kind": { "type": "string", "enum": ["regex", "jsonpath", "contains"], "description": "predicate: how to test the agent output." },
831
+ "expr": { "type": "string", "description": "predicate: the pattern/path/substring to test." },
832
+ "criteria": { "type": "string", "description": "llm_judge/rubric: the done/quality criteria in natural language." },
833
+ "model": { "type": "string", "description": "llm_judge: optional model override (defaults to the configured checker model)." },
834
+ "dimensions": {
835
+ "type": "array",
836
+ "description": "rubric: weighted scoring dimensions.",
837
+ "items": {
838
+ "type": "object",
839
+ "additionalProperties": false,
840
+ "required": ["name", "weight"],
841
+ "properties": {
842
+ "name": { "type": "string" },
843
+ "weight": { "type": "number", "minimum": 0, "maximum": 1 },
844
+ "criteria": { "type": "string" }
845
+ }
846
+ }
847
+ },
848
+ "threshold": { "type": "number", "minimum": 0, "maximum": 1, "description": "rubric: minimum aggregate score to pass." }
849
+ }
850
+ }
851
+ }
852
+ }
853
+ },
854
+
855
+ "agent_budget": {
856
+ "type": "object",
857
+ "additionalProperties": false,
858
+ "description": "v0.9: first-class stop-conditions and resource caps for the agent loop (anti runaway / Ralph-Wiggum / money-pit). Optional; runtimes apply a conservative default cap when absent. [RUNTIME]",
859
+ "properties": {
860
+ "max_steps": { "type": "integer", "minimum": 1 },
861
+ "max_tokens": { "type": "integer", "minimum": 1 },
862
+ "max_cost_usd": { "type": "number", "minimum": 0 },
863
+ "max_wall_seconds": { "type": "integer", "minimum": 1 },
864
+ "stop_conditions": {
865
+ "type": "array",
866
+ "items": { "type": "string", "enum": ["goal_met", "tool_denied", "execution_error", "low_confidence", "no_progress"] },
867
+ "description": "Conditions that halt the loop before the hard caps."
868
+ },
869
+ "on_exhaust": {
870
+ "type": "string",
871
+ "enum": ["stop", "summarize_and_stop"],
872
+ "description": "What to do when a cap/condition is hit."
873
+ }
874
+ }
875
+ },
876
+
877
+ "observability": {
878
+ "type": "object",
879
+ "additionalProperties": false,
880
+ "description": "v0.9: tracing posture for the governed loops. The engine's audit (mutation_log + hash-chained memory + event bus) is exported as a causal trace. Optional. [RUNTIME] [JUDGE]",
881
+ "properties": {
882
+ "trace": {
883
+ "type": "string",
884
+ "enum": ["off", "jsonl", "otlp", "both"],
885
+ "description": "off: none. jsonl: native line-delimited spans. otlp: OpenTelemetry-compatible JSON. both: emit both."
886
+ },
887
+ "trace_dir": { "type": "string", "description": "Where trace files are written (default ./traces)." },
888
+ "redact": {
889
+ "type": "array",
890
+ "items": { "type": "string" },
891
+ "description": "Regexes whose matches are redacted from traces (secrets/PII)."
892
+ },
893
+ "sample_rate": { "type": "number", "minimum": 0, "maximum": 1, "description": "Fraction of spans to record (1.0 = all)." }
894
+ }
895
+ }
896
+ },
897
+
898
+ "$defs": {
899
+ "envelopeUnsigned": {
900
+ "type": "object",
901
+ "required": ["mean", "range"],
902
+ "additionalProperties": false,
903
+ "properties": {
904
+ "mean": { "type": "number", "minimum": 0, "maximum": 1 },
905
+ "range": {
906
+ "type": "array",
907
+ "items": { "type": "number", "minimum": 0, "maximum": 1 },
908
+ "minItems": 2,
909
+ "maxItems": 2
910
+ }
911
+ }
912
+ },
913
+ "envelopeSigned": {
914
+ "type": "object",
915
+ "required": ["mean", "range"],
916
+ "additionalProperties": false,
917
+ "properties": {
918
+ "mean": { "type": "number", "minimum": -1, "maximum": 1 },
919
+ "range": {
920
+ "type": "array",
921
+ "items": { "type": "number", "minimum": -1, "maximum": 1 },
922
+ "minItems": 2,
923
+ "maxItems": 2
924
+ }
925
+ }
926
+ },
927
+ "editPolicy": {
928
+ "type": "string",
929
+ "enum": ["human_approval_required", "review_required", "auto_approved", "governance_controlled"]
930
+ }
931
+ }
932
+ }