@@ -530,31 +530,70 @@ vars.*
530530outputs.*
531531` ` `
532532
533+ CognitiveState v1 also supports (agent-skills runtime extension) :
534+
535+ ` ` `
536+ working.*
537+ output.*
538+ extensions.*
539+ ` ` `
540+
533541Example :
534542
535543` ` ` yaml
536544output:
537545 summary: outputs.summary
538546` ` `
539547
548+ CognitiveState v1 example :
549+
550+ ` ` ` yaml
551+ output:
552+ entities: working.entities
553+ draft: working.artifacts.first_draft
554+ quality: output.result_type
555+ ` ` `
556+
540557---
541558
542559# Valid References
543560
544- Skills support only the following reference forms :
561+ Skills support the following reference forms :
562+
563+ Legacy (all runtimes) :
545564
546565` ` `
547566inputs.*
548567vars.*
549568outputs.*
550569` ` `
551570
571+ CognitiveState v1 (agent-skills runtime extension) :
572+
573+ ` ` `
574+ frame.*
575+ working.*
576+ output.*
577+ extensions.*
578+ ` ` `
579+
580+ CognitiveState v1 references support nested path traversal (dict keys, list indices) :
581+
582+ ` ` `
583+ frame.constraints.budget
584+ working.entities.0.name
585+ working.artifacts.draft
586+ ` ` `
587+
552588Examples :
553589
554590` ` `
555591inputs.file_path
556592vars.document_text
557593outputs.summary
594+ frame.goal
595+ working.risks
596+ output.result_type
558597` ` `
559598
560599---
@@ -564,10 +603,36 @@ outputs.summary
564603The following rules apply :
565604
5666051. Steps cannot modify `inputs`.
567- 2. Steps may write only to `vars` or `outputs`.
568- 3. Each target field should be written once.
569- 4. Outputs declared in the skill must be produced by a step.
570- 5. Steps may consume values produced by earlier steps.
606+ 2. Steps may write to `vars` or `outputs` (legacy), or `working`, `output`, `extensions` (CognitiveState v1).
607+ 3. Steps cannot write to `frame` (frozen) or `trace` (engine-managed).
608+ 4. Each target field should be written once (unless a merge strategy is declared).
609+ 5. Outputs declared in the skill must be produced by a step.
610+ 6. Steps may consume values produced by earlier steps.
611+
612+ # ## Merge Strategies (CognitiveState v1)
613+
614+ When multiple steps write to the same target, a merge strategy may be declared
615+ in `step.config.merge_strategy` :
616+
617+ | Strategy | Behavior |
618+ |----------|----------|
619+ | `overwrite` | Default. Error on duplicate target. |
620+ | `append` | Extends list targets via concatenation. |
621+ | `deep_merge` | Recursively merges dict targets. |
622+ | `replace` | Unconditionally overwrites, no error. |
623+
624+ Example :
625+
626+ ` ` ` yaml
627+ - id: collect_risks
628+ uses: analysis.risk.extract
629+ config:
630+ merge_strategy: append
631+ input:
632+ text: vars.document_text
633+ output:
634+ risks: working.risks
635+ ` ` `
571636
572637Execution order is determined by **data dependencies**.
573638
0 commit comments