periplon 0.2.0

Rust SDK for building multi-agent AI workflows and automation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
# Task Groups Tutorial

Step-by-step guide to mastering task groups.

## Table of Contents

1. [Getting Started]#getting-started
2. [Your First Task Group]#your-first-task-group
3. [Sequential vs Parallel]#sequential-vs-parallel
4. [Adding Dependencies]#adding-dependencies
5. [Working with Variables]#working-with-variables
6. [Hierarchical Groups]#hierarchical-groups
7. [Error Handling]#error-handling
8. [Conditional Execution]#conditional-execution
9. [Real-World Example]#real-world-example
10. [Next Steps]#next-steps

## Getting Started

### Prerequisites

- Rust installed (1.70+)
- Basic understanding of YAML
- Agent SDK set up

### Installation

```bash
# Clone the repository
git clone https://github.com/your-org/periplon
cd periplon

# Build the DSL executor
cargo build --release --bin periplon-executor
```

### Verify Installation

```bash
./target/release/periplon-executor --version
```

## Your First Task Group

Let's create a simple workflow with a task group.

### Step 1: Create Workflow File

Create `my-first-workflow.yaml`:

```yaml
name: "My First Workflow"
version: "1.0.0"
description: "A simple workflow to learn task groups"

agents:
  worker:
    description: "A general-purpose worker agent"
    tools: [Read, Write, Bash]
    permissions:
      mode: "default"

task_groups:
  my_first_group:
    description: "My first task group"
    execution_mode: "sequential"
    tasks:
      - hello
      - world

tasks:
  hello:
    description: "Print hello"
    agent: "worker"
    group: "my_first_group"

  world:
    description: "Print world"
    agent: "worker"
    group: "my_first_group"
```

### Step 2: Validate

```bash
./target/release/periplon-executor validate my-first-workflow.yaml
```

**Expected Output:**
```
✓ Workflow is valid
```

### Step 3: Run

```bash
./target/release/periplon-executor run my-first-workflow.yaml
```

**What Happened:**
1. Group `my_first_group` started
2. Task `hello` executed
3. Task `world` executed
4. Group completed

🎉 Congratulations! You've created your first task group!

## Sequential vs Parallel

Let's explore the difference between execution modes.

### Sequential Example

Tasks run one after another:

```yaml
task_groups:
  sequential_example:
    description: "Sequential task execution"
    execution_mode: "sequential"
    tasks:
      - step1
      - step2
      - step3
```

**Timeline:**
```
0s    2s    4s    6s
│─────│─────│─────│
step1 step2 step3
```

### Parallel Example

Tasks run concurrently:

```yaml
task_groups:
  parallel_example:
    description: "Parallel task execution"
    execution_mode: "parallel"
    tasks:
      - test1
      - test2
      - test3
```

**Timeline:**
```
0s         2s
│──────────│
test1
test2
test3
```

### Exercise: Compare Performance

Create `compare-modes.yaml`:

```yaml
name: "Compare Execution Modes"
version: "1.0.0"

agents:
  worker:
    description: "Worker agent"
    tools: [Bash]
    permissions:
      mode: "acceptEdits"

task_groups:
  sequential_group:
    description: "Sequential execution"
    execution_mode: "sequential"
    tasks:
      - seq_task1
      - seq_task2
      - seq_task3

  parallel_group:
    description: "Parallel execution"
    execution_mode: "parallel"
    tasks:
      - par_task1
      - par_task2
      - par_task3

tasks:
  seq_task1:
    description: "Sleep 2 seconds"
    agent: "worker"
    group: "sequential_group"

  seq_task2:
    description: "Sleep 2 seconds"
    agent: "worker"
    group: "sequential_group"

  seq_task3:
    description: "Sleep 2 seconds"
    agent: "worker"
    group: "sequential_group"

  par_task1:
    description: "Sleep 2 seconds"
    agent: "worker"
    group: "parallel_group"

  par_task2:
    description: "Sleep 2 seconds"
    agent: "worker"
    group: "parallel_group"

  par_task3:
    description: "Sleep 2 seconds"
    agent: "worker"
    group: "parallel_group"
```

**Run and time:**
```bash
time ./target/release/periplon-executor run compare-modes.yaml
```

**Expected:**
- Sequential: ~6 seconds (2s × 3)
- Parallel: ~2 seconds (all at once)

## Adding Dependencies

Groups can depend on other groups.

### Basic Dependency

```yaml
task_groups:
  prepare:
    description: "Prepare environment"
    execution_mode: "sequential"
    tasks:
      - setup_env
      - fetch_data

  process:
    description: "Process data"
    execution_mode: "parallel"
    depends_on: [prepare]  # Waits for prepare
    tasks:
      - process_data
      - analyze_data
```

**Execution Flow:**
```
prepare (sequential)
  ├── setup_env
  └── fetch_data
process (parallel)
  ├── process_data
  └── analyze_data
```

### Multiple Dependencies

```yaml
task_groups:
  fetch:
    tasks: [fetch_data]

  validate:
    tasks: [validate_data]

  process:
    depends_on: [fetch, validate]  # Both must complete
    tasks: [process_data]
```

**Execution Flow:**
```
fetch ──┐
        ├─→ process
validate─┘
```

### Exercise: Build Pipeline

Create `build-pipeline.yaml`:

```yaml
name: "Build Pipeline"
version: "1.0.0"

agents:
  builder:
    description: "Build agent"
    tools: [Bash, Read, Write]
    permissions:
      mode: "acceptEdits"

task_groups:
  checkout:
    description: "Checkout code"
    execution_mode: "sequential"
    tasks:
      - git_clone

  build:
    description: "Build application"
    execution_mode: "sequential"
    depends_on: [checkout]
    tasks:
      - compile

  test:
    description: "Run tests"
    execution_mode: "parallel"
    depends_on: [build]
    tasks:
      - unit_tests
      - integration_tests

tasks:
  git_clone:
    description: "Clone repository"
    agent: "builder"
    group: "checkout"

  compile:
    description: "Compile code"
    agent: "builder"
    group: "build"

  unit_tests:
    description: "Run unit tests"
    agent: "builder"
    group: "test"

  integration_tests:
    description: "Run integration tests"
    agent: "builder"
    group: "test"
```

**Run:**
```bash
./target/release/periplon-executor run build-pipeline.yaml
```

## Working with Variables

Groups can pass data through variables.

### Group Outputs

```yaml
task_groups:
  analysis:
    description: "Analyze code"
    execution_mode: "sequential"
    tasks:
      - analyze

    outputs:
      score:
        source:
          type: state
          key: "analysis.score"
```

### Group Inputs

```yaml
task_groups:
  reporting:
    description: "Generate report"
    execution_mode: "sequential"
    depends_on: [analysis]
    tasks:
      - report

    inputs:
      analysis_score: "${group.analysis.score}"
```

### Complete Example

Create `variables-example.yaml`:

```yaml
name: "Variables Example"
version: "1.0.0"

inputs:
  project_name:
    type: string
    required: true

agents:
  analyzer:
    description: "Analyzer agent"
    tools: [Read, Grep, Glob]
    permissions:
      mode: "default"

task_groups:
  scan:
    description: "Scan ${workflow.project_name}"
    execution_mode: "sequential"
    tasks:
      - count_files

    outputs:
      file_count:
        source:
          type: state
          key: "scan.file_count"

  report:
    description: "Generate report"
    execution_mode: "sequential"
    depends_on: [scan]
    tasks:
      - create_report

    inputs:
      files: "${group.scan.file_count}"

tasks:
  count_files:
    description: "Count files in ${workflow.project_name}"
    agent: "analyzer"
    group: "scan"

  create_report:
    description: "Report on ${group.scan.file_count} files"
    agent: "analyzer"
    group: "report"
```

**Run:**
```bash
./target/release/periplon-executor run variables-example.yaml \
  --input project_name=my-project
```

## Hierarchical Groups

Groups can contain other groups.

### Basic Hierarchy

```yaml
task_groups:
  # Parent group
  deployment:
    description: "Complete deployment"
    groups:
      - build_stage
      - deploy_stage

  # Child groups
  build_stage:
    parent: "deployment"
    tasks: [build]

  deploy_stage:
    parent: "deployment"
    depends_on: [build_stage]
    tasks: [deploy]
```

**Structure:**
```
deployment
├── build_stage
│   └── build
└── deploy_stage
    └── deploy
```

### Multi-Level Hierarchy

Create `hierarchy-example.yaml`:

```yaml
name: "Hierarchical Groups"
version: "1.0.0"

agents:
  worker:
    description: "Worker agent"
    tools: [Bash, Read, Write]
    permissions:
      mode: "acceptEdits"

task_groups:
  # Level 0: Root
  ci_cd:
    description: "CI/CD Pipeline"
    execution_mode: "sequential"
    groups:
      - build_stage
      - test_stage

  # Level 1: Stages
  build_stage:
    description: "Build Stage"
    parent: "ci_cd"
    execution_mode: "sequential"
    groups:
      - compile
      - package

  test_stage:
    description: "Test Stage"
    parent: "ci_cd"
    execution_mode: "parallel"
    depends_on: [build_stage]
    groups:
      - unit_tests
      - integration_tests

  # Level 2: Sub-stages
  compile:
    description: "Compilation"
    parent: "build_stage"
    execution_mode: "parallel"
    tasks:
      - compile_backend
      - compile_frontend

  package:
    description: "Packaging"
    parent: "build_stage"
    execution_mode: "sequential"
    depends_on: [compile]
    tasks:
      - create_package

  unit_tests:
    description: "Unit Tests"
    parent: "test_stage"
    execution_mode: "parallel"
    tasks:
      - test_backend
      - test_frontend

  integration_tests:
    description: "Integration Tests"
    parent: "test_stage"
    execution_mode: "sequential"
    tasks:
      - test_api

tasks:
  compile_backend:
    description: "Compile backend"
    agent: "worker"
    group: "compile"

  compile_frontend:
    description: "Compile frontend"
    agent: "worker"
    group: "compile"

  create_package:
    description: "Create deployment package"
    agent: "worker"
    group: "package"

  test_backend:
    description: "Test backend"
    agent: "worker"
    group: "unit_tests"

  test_frontend:
    description: "Test frontend"
    agent: "worker"
    group: "unit_tests"

  test_api:
    description: "Test API"
    agent: "worker"
    group: "integration_tests"
```

**Structure:**
```
ci_cd
├── build_stage
│   ├── compile
│   │   ├── compile_backend
│   │   └── compile_frontend
│   └── package
│       └── create_package
└── test_stage
    ├── unit_tests
    │   ├── test_backend
    │   └── test_frontend
    └── integration_tests
        └── test_api
```

**Run:**
```bash
./target/release/periplon-executor run hierarchy-example.yaml
```

## Error Handling

Control how groups handle failures.

### Stop on Error

Default behavior - stops immediately:

```yaml
task_groups:
  critical_tasks:
    on_error: "stop"
    tasks:
      - task1
      - task2
      - task3
```

**Behavior:** If task2 fails, task3 is cancelled

### Continue on Error

Collects all failures:

```yaml
task_groups:
  test_suite:
    on_error: "continue"
    tasks:
      - test1
      - test2
      - test3
```

**Behavior:** All tests run, even if some fail

### Exercise: Error Handling

Create `error-handling.yaml`:

```yaml
name: "Error Handling Demo"
version: "1.0.0"

agents:
  worker:
    description: "Worker"
    tools: [Bash]
    permissions:
      mode: "acceptEdits"

task_groups:
  stop_on_error:
    description: "Stop on first error"
    execution_mode: "sequential"
    on_error: "stop"
    tasks:
      - task1
      - failing_task
      - task3

  continue_on_error:
    description: "Continue despite errors"
    execution_mode: "sequential"
    on_error: "continue"
    tasks:
      - task4
      - failing_task2
      - task5

tasks:
  task1:
    description: "Success"
    agent: "worker"
    group: "stop_on_error"

  failing_task:
    description: "This will fail"
    agent: "worker"
    group: "stop_on_error"

  task3:
    description: "Won't execute"
    agent: "worker"
    group: "stop_on_error"

  task4:
    description: "Success"
    agent: "worker"
    group: "continue_on_error"

  failing_task2:
    description: "This will fail"
    agent: "worker"
    group: "continue_on_error"

  task5:
    description: "Will execute anyway"
    agent: "worker"
    group: "continue_on_error"
```

## Conditional Execution

Groups can execute conditionally.

### Basic Condition

```yaml
task_groups:
  quality_check:
    tasks: [analyze]
    outputs:
      score:
        source:
          type: state
          key: "quality.score"

  deployment:
    depends_on: [quality_check]
    condition: "${group.quality_check.score} >= 0.8"
    tasks: [deploy]
```

**Behavior:** `deployment` only runs if score ≥ 0.8

### Exercise: Quality Gate

Create `quality-gate.yaml`:

```yaml
name: "Quality Gate"
version: "1.0.0"

inputs:
  min_coverage:
    type: number
    required: false
    default: 0.8

agents:
  tester:
    description: "Test agent"
    tools: [Bash, Read]
    permissions:
      mode: "default"

task_groups:
  run_tests:
    description: "Run test suite"
    execution_mode: "parallel"
    tasks:
      - unit_tests
      - integration_tests

    outputs:
      coverage:
        source:
          type: state
          key: "test.coverage"

  deploy:
    description: "Deploy to production"
    depends_on: [run_tests]
    condition: "${group.run_tests.coverage} >= ${workflow.min_coverage}"
    tasks:
      - deploy_prod

tasks:
  unit_tests:
    description: "Run unit tests"
    agent: "tester"
    group: "run_tests"

  integration_tests:
    description: "Run integration tests"
    agent: "tester"
    group: "run_tests"

  deploy_prod:
    description: "Deploy to production"
    agent: "tester"
    group: "deploy"
```

**Run with different thresholds:**
```bash
# Strict quality gate
./target/release/periplon-executor run quality-gate.yaml \
  --input min_coverage=0.95

# Relaxed quality gate
./target/release/periplon-executor run quality-gate.yaml \
  --input min_coverage=0.7
```

## Real-World Example

Let's build a complete microservice deployment pipeline.

Create `microservice-deploy.yaml`:

```yaml
name: "Microservice Deployment Pipeline"
version: "1.0.0"
description: "Complete CI/CD pipeline for microservice deployment"

inputs:
  service_name:
    type: string
    required: true
    description: "Name of the microservice"

  environment:
    type: string
    required: true
    description: "Target environment (dev, staging, prod)"

  repo_url:
    type: string
    required: true
    description: "Git repository URL"

  min_test_coverage:
    type: number
    required: false
    default: 0.8
    description: "Minimum test coverage required"

agents:
  ci_agent:
    description: "CI/CD automation agent"
    tools: [Bash, Read, Write, Grep]
    permissions:
      mode: "acceptEdits"

  test_agent:
    description: "Testing agent"
    tools: [Bash, Read]
    permissions:
      mode: "default"

  deploy_agent:
    description: "Deployment agent"
    tools: [Bash, Read, Write]
    permissions:
      mode: "acceptEdits"

task_groups:
  # Root pipeline
  pipeline:
    description: "Complete deployment pipeline for ${workflow.service_name}"
    execution_mode: "sequential"
    groups:
      - source_preparation
      - build_and_test
      - deployment

    timeout: 1800  # 30 minutes

  # Stage 1: Source preparation
  source_preparation:
    description: "Prepare source code"
    parent: "pipeline"
    execution_mode: "sequential"
    tasks:
      - checkout_code
      - fetch_dependencies

    timeout: 300

    outputs:
      commit_hash:
        source:
          type: state
          key: "git.commit_hash"

  # Stage 2: Build and test
  build_and_test:
    description: "Build and test ${workflow.service_name}"
    parent: "pipeline"
    execution_mode: "sequential"
    groups:
      - build
      - test

    depends_on: [source_preparation]
    timeout: 900

  # Build phase
  build:
    description: "Build application"
    parent: "build_and_test"
    execution_mode: "parallel"
    tasks:
      - compile_code
      - build_docker_image

    max_concurrency: 2

    outputs:
      docker_image:
        source:
          type: state
          key: "docker.image_tag"

  # Test phase
  test:
    description: "Run test suite"
    parent: "build_and_test"
    execution_mode: "parallel"
    depends_on: [build]
    tasks:
      - run_unit_tests
      - run_integration_tests
      - run_security_scan

    on_error: "continue"  # Collect all test results
    max_concurrency: 3

    outputs:
      coverage:
        source:
          type: state
          key: "test.coverage"
      tests_passed:
        source:
          type: state
          key: "test.passed"

  # Stage 3: Deployment
  deployment:
    description: "Deploy to ${workflow.environment}"
    parent: "pipeline"
    execution_mode: "sequential"
    depends_on: [build_and_test]

    # Quality gate: only deploy if tests passed and coverage is good
    condition: |
      ${group.test.tests_passed} == true &&
      ${group.test.coverage} >= ${workflow.min_test_coverage}

    tasks:
      - backup_current
      - deploy_new_version
      - verify_deployment
      - update_monitoring

    timeout: 600
    on_error: "rollback"

    inputs:
      image: "${group.build.docker_image}"

    outputs:
      deployment_url:
        source:
          type: state
          key: "deployment.url"

tasks:
  # Source preparation tasks
  checkout_code:
    description: "Checkout code from ${workflow.repo_url}"
    agent: "ci_agent"
    group: "source_preparation"

  fetch_dependencies:
    description: "Fetch dependencies"
    agent: "ci_agent"
    group: "source_preparation"
    depends_on: [checkout_code]

  # Build tasks
  compile_code:
    description: "Compile ${workflow.service_name}"
    agent: "ci_agent"
    group: "build"

  build_docker_image:
    description: "Build Docker image for ${workflow.service_name}"
    agent: "ci_agent"
    group: "build"
    depends_on: [compile_code]

  # Test tasks
  run_unit_tests:
    description: "Run unit tests"
    agent: "test_agent"
    group: "test"

  run_integration_tests:
    description: "Run integration tests"
    agent: "test_agent"
    group: "test"

  run_security_scan:
    description: "Run security scan"
    agent: "test_agent"
    group: "test"

  # Deployment tasks
  backup_current:
    description: "Backup current ${workflow.environment} deployment"
    agent: "deploy_agent"
    group: "deployment"

  deploy_new_version:
    description: "Deploy new version to ${workflow.environment}"
    agent: "deploy_agent"
    group: "deployment"
    depends_on: [backup_current]

  verify_deployment:
    description: "Verify deployment"
    agent: "deploy_agent"
    group: "deployment"
    depends_on: [deploy_new_version]

  update_monitoring:
    description: "Update monitoring dashboards"
    agent: "deploy_agent"
    group: "deployment"
    depends_on: [verify_deployment]
```

**Run:**
```bash
./target/release/periplon-executor run microservice-deploy.yaml \
  --input service_name=user-api \
  --input environment=staging \
  --input repo_url=https://github.com/myorg/user-api \
  --input min_test_coverage=0.85
```

**Pipeline Flow:**
```
pipeline
├── source_preparation (sequential)
│   ├── checkout_code
│   └── fetch_dependencies
│
├── build_and_test (sequential)
│   ├── build (parallel)
│   │   ├── compile_code
│   │   └── build_docker_image
│   └── test (parallel, continue on error)
│       ├── run_unit_tests
│       ├── run_integration_tests
│       └── run_security_scan
│
└── deployment (sequential, conditional, rollback on error)
    ├── backup_current
    ├── deploy_new_version
    ├── verify_deployment
    └── update_monitoring
```

## Next Steps

### Practice Exercises

1. **Modify the Pipeline**: Add a performance testing phase
2. **Add More Environments**: Support dev, staging, and prod
3. **Implement Canary Deployment**: Deploy to subset of servers first
4. **Add Notifications**: Send notifications on success/failure
5. **Create Rollback Group**: Implement automatic rollback

### Advanced Topics

- [Hierarchical Groups]./README.md#hierarchical-groups - Deep nesting patterns
- [Variable System]./README.md#variable-system - Advanced variable usage
- [Error Handling]./README.md#error-handling - Complex error strategies
- [Architecture]./architecture.md - Internal implementation

### Resources

- [API Reference]./api-reference.md - Complete schema documentation
- [Examples]../../examples/task-groups/ - More working examples
- [Main DSL Docs]../../README.md - Overall DSL documentation

### Getting Help

- GitHub Issues: Report bugs or request features
- Discussions: Ask questions and share workflows
- Examples: Learn from community workflows

---

**Congratulations!** You've completed the task groups tutorial. You now know how to:

✓ Create basic task groups
✓ Use sequential and parallel execution
✓ Add dependencies between groups
✓ Pass data with variables
✓ Build hierarchical structures
✓ Handle errors appropriately
✓ Use conditional execution
✓ Build real-world pipelines

Keep experimenting and building amazing workflows! 🚀