@temporal-architect/claude-plugin 0.9.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.
- package/LICENSE +21 -0
- package/README.md +38 -0
- package/package.json +37 -0
- package/skills/MANIFEST.json +373 -0
- package/skills/MANIFEST.md +121 -0
- package/skills/temporal-architect/SKILL.md +99 -0
- package/skills/temporal-architect/reference/decomposition.md +78 -0
- package/skills/temporal-architect-author-go/README.md +16 -0
- package/skills/temporal-architect-author-go/SKILL.md +191 -0
- package/skills/temporal-architect-author-go/SUBAGENT_ADOPTION.md +161 -0
- package/skills/temporal-architect-author-go/reference/activity-call.md +73 -0
- package/skills/temporal-architect-author-go/reference/activity-def.md +54 -0
- package/skills/temporal-architect-author-go/reference/assignment.md +36 -0
- package/skills/temporal-architect-author-go/reference/await-all.md +104 -0
- package/skills/temporal-architect-author-go/reference/await-one.md +193 -0
- package/skills/temporal-architect-author-go/reference/await-timer.md +35 -0
- package/skills/temporal-architect-author-go/reference/close.md +71 -0
- package/skills/temporal-architect-author-go/reference/composite-patterns.md +176 -0
- package/skills/temporal-architect-author-go/reference/condition.md +56 -0
- package/skills/temporal-architect-author-go/reference/control-flow.md +151 -0
- package/skills/temporal-architect-author-go/reference/dependency-resolution.md +29 -0
- package/skills/temporal-architect-author-go/reference/detach.md +52 -0
- package/skills/temporal-architect-author-go/reference/heartbeat.md +84 -0
- package/skills/temporal-architect-author-go/reference/nexus-service-def.md +73 -0
- package/skills/temporal-architect-author-go/reference/nexus.md +35 -0
- package/skills/temporal-architect-author-go/reference/options.md +138 -0
- package/skills/temporal-architect-author-go/reference/promise.md +73 -0
- package/skills/temporal-architect-author-go/reference/proto-driven.md +197 -0
- package/skills/temporal-architect-author-go/reference/query-handler.md +34 -0
- package/skills/temporal-architect-author-go/reference/signal-handler.md +73 -0
- package/skills/temporal-architect-author-go/reference/three-layer-testing.md +173 -0
- package/skills/temporal-architect-author-go/reference/types.md +72 -0
- package/skills/temporal-architect-author-go/reference/update-handler.md +64 -0
- package/skills/temporal-architect-author-go/reference/worker.md +215 -0
- package/skills/temporal-architect-author-go/reference/workflow-call.md +37 -0
- package/skills/temporal-architect-author-go/reference/workflow-def.md +45 -0
- package/skills/temporal-architect-author-infra/README.md +16 -0
- package/skills/temporal-architect-author-infra/SKILL.md +132 -0
- package/skills/temporal-architect-author-infra/reference/tcld.md +112 -0
- package/skills/temporal-architect-author-infra/reference/terraform.md +125 -0
- package/skills/temporal-architect-design/README.md +16 -0
- package/skills/temporal-architect-design/SKILL.md +224 -0
- package/skills/temporal-architect-design/reference/LANGUAGE.md +5 -0
- package/skills/temporal-architect-design/reference/anti-patterns.md +332 -0
- package/skills/temporal-architect-design/reference/common-errors.md +88 -0
- package/skills/temporal-architect-design/reference/core-principles.md +52 -0
- package/skills/temporal-architect-design/reference/design-checklist.md +59 -0
- package/skills/temporal-architect-design/reference/namespaces.md +84 -0
- package/skills/temporal-architect-design/reference/notation-examples.md +304 -0
- package/skills/temporal-architect-design/reference/notation-reference.md +70 -0
- package/skills/temporal-architect-design/reference/primitives-reference.md +65 -0
- package/skills/temporal-architect-design/reference/project-discovery-subagent.md +80 -0
- package/skills/temporal-architect-design/reference/reverse-engineering.md +53 -0
- package/skills/temporal-architect-design/reference/twf-conventions.md +43 -0
- package/skills/temporal-architect-design/reference/workflow-boundaries.md +43 -0
- package/skills/temporal-architect-design/topics/activities-advanced.md +358 -0
- package/skills/temporal-architect-design/topics/activities-advanced.twf +107 -0
- package/skills/temporal-architect-design/topics/child-workflows.md +347 -0
- package/skills/temporal-architect-design/topics/child-workflows.twf +171 -0
- package/skills/temporal-architect-design/topics/long-running.md +230 -0
- package/skills/temporal-architect-design/topics/long-running.twf +100 -0
- package/skills/temporal-architect-design/topics/nexus.md +248 -0
- package/skills/temporal-architect-design/topics/nexus.twf +148 -0
- package/skills/temporal-architect-design/topics/patterns.md +469 -0
- package/skills/temporal-architect-design/topics/patterns.twf +346 -0
- package/skills/temporal-architect-design/topics/promises-conditions.md +179 -0
- package/skills/temporal-architect-design/topics/promises-conditions.twf +213 -0
- package/skills/temporal-architect-design/topics/signals-queries-updates.md +319 -0
- package/skills/temporal-architect-design/topics/signals-queries-updates.twf +234 -0
- package/skills/temporal-architect-design/topics/task-queues.md +205 -0
- package/skills/temporal-architect-design/topics/task-queues.twf +184 -0
- package/skills/temporal-architect-design/topics/testing.md +437 -0
- package/skills/temporal-architect-design/topics/testing.twf +177 -0
- package/skills/temporal-architect-design/topics/timers-scheduling.md +131 -0
- package/skills/temporal-architect-design/topics/timers-scheduling.twf +129 -0
- package/skills/temporal-architect-design/topics/versioning.md +434 -0
- package/skills/temporal-architect-design/topics/versioning.twf +174 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Source: versioning.md
|
|
2
|
+
# Patterns: versioning workflows by adding/removing/changing steps
|
|
3
|
+
# Domain: each workflow demonstrates one versioning shape against a different
|
|
4
|
+
# real workload (insurance underwriting, batch ETL job, enrichment pipeline)
|
|
5
|
+
# so the version flags read naturally in their context.
|
|
6
|
+
# Use version flags passed as workflow parameters or from external config.
|
|
7
|
+
|
|
8
|
+
# --- Adding a step with version flag ---
|
|
9
|
+
|
|
10
|
+
workflow UnderwritingAddFraudCheck(policy: Policy, enableFraudCheck: bool) -> (PolicyResult):
|
|
11
|
+
activity ValidatePolicy(policy)
|
|
12
|
+
|
|
13
|
+
# Version gate: new code only runs when flag is true
|
|
14
|
+
if (enableFraudCheck):
|
|
15
|
+
activity FraudCheck(policy)
|
|
16
|
+
|
|
17
|
+
activity BindPolicy(policy) -> binding
|
|
18
|
+
close complete(PolicyResult{status: "complete"})
|
|
19
|
+
|
|
20
|
+
# --- Removing a step with version flag ---
|
|
21
|
+
|
|
22
|
+
workflow BatchJobRemoveLegacyStep(data: Data, useLegacyStep: bool) -> (Result):
|
|
23
|
+
activity Step1(data)
|
|
24
|
+
|
|
25
|
+
# Keep legacy step for old executions
|
|
26
|
+
if (useLegacyStep):
|
|
27
|
+
activity LegacyStep(data)
|
|
28
|
+
|
|
29
|
+
activity Step2(data)
|
|
30
|
+
close complete(Result{})
|
|
31
|
+
|
|
32
|
+
# --- Changing a step with version flag ---
|
|
33
|
+
|
|
34
|
+
workflow BatchJobChangeProcessor(data: Data, useImprovedProcessing: bool) -> (Result):
|
|
35
|
+
activity Step1(data)
|
|
36
|
+
|
|
37
|
+
# Use improved processing for new versions
|
|
38
|
+
if (useImprovedProcessing):
|
|
39
|
+
activity ImprovedProcessing(data)
|
|
40
|
+
else:
|
|
41
|
+
activity OldProcessing(data)
|
|
42
|
+
|
|
43
|
+
activity Step3(data)
|
|
44
|
+
close complete(Result{})
|
|
45
|
+
|
|
46
|
+
# --- Reordering activities with version flag ---
|
|
47
|
+
|
|
48
|
+
workflow BatchJobReorderSteps(data: Data, useNewOrder: bool) -> (Result):
|
|
49
|
+
activity StepA(data)
|
|
50
|
+
|
|
51
|
+
# Reorder steps B and C for new version
|
|
52
|
+
if (useNewOrder):
|
|
53
|
+
activity StepC(data)
|
|
54
|
+
activity StepB(data)
|
|
55
|
+
else:
|
|
56
|
+
activity StepB(data)
|
|
57
|
+
activity StepC(data)
|
|
58
|
+
|
|
59
|
+
close complete(Result{})
|
|
60
|
+
|
|
61
|
+
# --- Changing activity parameters with version flag ---
|
|
62
|
+
|
|
63
|
+
workflow EnrichmentChangeParams(data: Data, useEnhancedParams: bool) -> (Result):
|
|
64
|
+
# Call with different parameters based on version
|
|
65
|
+
if (useEnhancedParams):
|
|
66
|
+
activity EnhancedActivity(data, true) -> result
|
|
67
|
+
else:
|
|
68
|
+
activity EnhancedActivity(data) -> result
|
|
69
|
+
|
|
70
|
+
close complete(Result{result})
|
|
71
|
+
|
|
72
|
+
# --- Multiple version flags in one workflow ---
|
|
73
|
+
|
|
74
|
+
workflow UnderwritingMultiFlag(policy: Policy, config: VersionConfig) -> (PolicyResult):
|
|
75
|
+
activity ValidatePolicy(policy)
|
|
76
|
+
|
|
77
|
+
# Version flag 1: Add fraud check
|
|
78
|
+
if (config.enableFraudCheck):
|
|
79
|
+
activity FraudCheck(policy)
|
|
80
|
+
|
|
81
|
+
# Version flag 2: Improved validation
|
|
82
|
+
if (config.useImprovedValidation):
|
|
83
|
+
activity ImprovedValidation(policy)
|
|
84
|
+
|
|
85
|
+
activity BindPolicy(policy) -> binding
|
|
86
|
+
|
|
87
|
+
# Version flag 3: Remove legacy notification
|
|
88
|
+
if (config.useLegacyNotify):
|
|
89
|
+
activity LegacyNotify(policy)
|
|
90
|
+
|
|
91
|
+
activity FinalizeOrder(policy) -> result
|
|
92
|
+
close complete(PolicyResult{status: "complete"})
|
|
93
|
+
|
|
94
|
+
# --- Supporting activities ---
|
|
95
|
+
|
|
96
|
+
activity ValidatePolicy(policy: Policy):
|
|
97
|
+
validate(policy)
|
|
98
|
+
|
|
99
|
+
activity FraudCheck(policy: Policy):
|
|
100
|
+
check_fraud(policy)
|
|
101
|
+
|
|
102
|
+
activity BindPolicy(policy: Policy) -> (PolicyBinding):
|
|
103
|
+
return bind(policy)
|
|
104
|
+
|
|
105
|
+
activity Step1(data: Data):
|
|
106
|
+
step1(data)
|
|
107
|
+
|
|
108
|
+
activity Step2(data: Data):
|
|
109
|
+
step2(data)
|
|
110
|
+
|
|
111
|
+
activity Step3(data: Data):
|
|
112
|
+
step3(data)
|
|
113
|
+
|
|
114
|
+
activity LegacyStep(data: Data):
|
|
115
|
+
legacy(data)
|
|
116
|
+
|
|
117
|
+
activity ImprovedProcessing(data: Data):
|
|
118
|
+
improved(data)
|
|
119
|
+
|
|
120
|
+
activity OldProcessing(data: Data):
|
|
121
|
+
old_process(data)
|
|
122
|
+
|
|
123
|
+
activity StepA(data: Data):
|
|
124
|
+
step_a(data)
|
|
125
|
+
|
|
126
|
+
activity StepB(data: Data):
|
|
127
|
+
step_b(data)
|
|
128
|
+
|
|
129
|
+
activity StepC(data: Data):
|
|
130
|
+
step_c(data)
|
|
131
|
+
|
|
132
|
+
activity EnhancedActivity(data: Data) -> (Result):
|
|
133
|
+
return enhanced(data)
|
|
134
|
+
|
|
135
|
+
activity ImprovedValidation(policy: Policy):
|
|
136
|
+
validate_improved(policy)
|
|
137
|
+
|
|
138
|
+
activity LegacyNotify(policy: Policy):
|
|
139
|
+
legacy_notify(policy)
|
|
140
|
+
|
|
141
|
+
activity FinalizeOrder(policy: Policy) -> (PolicyResult):
|
|
142
|
+
return finalize(policy)
|
|
143
|
+
|
|
144
|
+
# --- Worker and namespace ---
|
|
145
|
+
|
|
146
|
+
worker versioningWorker:
|
|
147
|
+
workflow UnderwritingAddFraudCheck
|
|
148
|
+
workflow BatchJobRemoveLegacyStep
|
|
149
|
+
workflow BatchJobChangeProcessor
|
|
150
|
+
workflow BatchJobReorderSteps
|
|
151
|
+
workflow EnrichmentChangeParams
|
|
152
|
+
workflow UnderwritingMultiFlag
|
|
153
|
+
activity ValidatePolicy
|
|
154
|
+
activity FraudCheck
|
|
155
|
+
activity BindPolicy
|
|
156
|
+
activity Step1
|
|
157
|
+
activity Step2
|
|
158
|
+
activity Step3
|
|
159
|
+
activity LegacyStep
|
|
160
|
+
activity ImprovedProcessing
|
|
161
|
+
activity OldProcessing
|
|
162
|
+
activity StepA
|
|
163
|
+
activity StepB
|
|
164
|
+
activity StepC
|
|
165
|
+
activity EnhancedActivity
|
|
166
|
+
activity ImprovedValidation
|
|
167
|
+
activity LegacyNotify
|
|
168
|
+
activity FinalizeOrder
|
|
169
|
+
|
|
170
|
+
namespace versioning:
|
|
171
|
+
worker versioningWorker
|
|
172
|
+
options:
|
|
173
|
+
task_queue: "versioning"
|
|
174
|
+
versioning: build_id
|