Skip to content

Commit 7311f49

Browse files
Add initial support for Go
1 parent ff033bc commit 7311f49

11 files changed

Lines changed: 3590 additions & 16 deletions

SKILL.md

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
name: Temporal Development
3-
description: This skill should be used when the user asks to "create a Temporal workflow", "write a Temporal activity", "debug stuck workflow", "fix non-determinism error", "Temporal Python", "Temporal TypeScript", "workflow replay", "activity timeout", "signal workflow", "query workflow", "worker not starting", "activity keeps retrying", "Temporal heartbeat", "continue-as-new", "child workflow", "saga pattern", "workflow versioning", "durable execution", "reliable distributed systems", or mentions Temporal SDK development. Provides multi-language guidance for Python and TypeScript with operational scripts.
3+
description: This skill should be used when the user asks to "create a Temporal workflow", "write a Temporal activity", "debug stuck workflow", "fix non-determinism error", "Temporal Python", "Temporal TypeScript", "Temporal Go", "Temporal Golang", "workflow replay", "activity timeout", "signal workflow", "query workflow", "worker not starting", "activity keeps retrying", "Temporal heartbeat", "continue-as-new", "child workflow", "saga pattern", "workflow versioning", "durable execution", "reliable distributed systems", or mentions Temporal SDK development. Provides multi-language guidance for Python, TypeScript, and Go with operational scripts.
44
version: 1.0.0
55
---
66

77
# Temporal Development
88

99
## Overview
1010

11-
Temporal is a durable execution platform that makes workflows survive failures automatically. This skill provides guidance for building Temporal applications in Python and TypeScript.
11+
Temporal is a durable execution platform that makes workflows survive failures automatically. This skill provides guidance for building Temporal applications in Python, TypeScript, and Go.
1212

1313
## Core Architecture
1414

@@ -59,15 +59,17 @@ See `references/core/determinism.md` for detailed explanation.
5959

6060
## Determinism Quick Reference
6161

62-
| Forbidden | Python | TypeScript |
63-
|-----------|--------|------------|
64-
| Current time | `workflow.now()` | `Date.now()` (auto-replaced) |
65-
| Random | `workflow.random()` | `Math.random()` (auto-replaced) |
66-
| UUID | `workflow.uuid4()` | `uuid4()` from workflow |
67-
| Sleep | `asyncio.sleep()` | `sleep()` from workflow |
62+
| Forbidden | Python | TypeScript | Go |
63+
|-----------|--------|------------|-----|
64+
| Current time | `workflow.now()` | `Date.now()` (auto-replaced) | `workflow.Now(ctx)` |
65+
| Random | `workflow.random()` | `Math.random()` (auto-replaced) | `workflow.SideEffect()` |
66+
| UUID | `workflow.uuid4()` | `uuid4()` from workflow | `workflow.SideEffect()` |
67+
| Sleep | `asyncio.sleep()` | `sleep()` from workflow | `workflow.Sleep(ctx, d)` |
68+
| Concurrency | N/A (async) | N/A (async) | `workflow.Go(ctx, fn)` |
6869

6970
**Python sandbox**: Explicit protection, use `workflow.unsafe.imports_passed_through()` for libraries
7071
**TypeScript sandbox**: V8 isolation, automatic replacements, use type-only imports for activities
72+
**Go**: No sandbox - use `workflowcheck` static analysis tool and code review
7173

7274
## Language Selection
7375

@@ -85,16 +87,24 @@ See `references/core/determinism.md` for detailed explanation.
8587
- Webpack bundling for workflows
8688
- See `references/typescript/typescript.md`
8789

90+
### Go
91+
- Regular functions with `workflow.Context` or `context.Context`
92+
- No sandbox - determinism via code review and static analysis
93+
- Use `workflow.Go()` instead of `go` keyword
94+
- Use `workflow.Channel` instead of Go channels
95+
- Run `workflowcheck ./...` in CI
96+
- See `references/go/go.md`
97+
8898
## Pattern Index
8999

90-
| Pattern | Use Case | Python | TypeScript |
91-
|---------|----------|--------|------------|
92-
| **Signals** | Fire-and-forget events to running workflow | `references/python/patterns.md` | `references/typescript/patterns.md` |
93-
| **Queries** | Read-only state inspection | `references/python/patterns.md` | `references/typescript/patterns.md` |
94-
| **Updates** | Synchronous state modification with response | `references/python/patterns.md` | `references/typescript/patterns.md` |
95-
| **Child Workflows** | Break down large workflows, isolate failures | `references/python/patterns.md` | `references/typescript/patterns.md` |
96-
| **Continue-as-New** | Prevent unbounded history growth | `references/python/advanced-features.md` | `references/typescript/advanced-features.md` |
97-
| **Saga** | Distributed transactions with compensation | `references/python/patterns.md` | `references/typescript/patterns.md` |
100+
| Pattern | Use Case | Python | TypeScript | Go |
101+
|---------|----------|--------|------------|-----|
102+
| **Signals** | Fire-and-forget events to running workflow | `references/python/patterns.md` | `references/typescript/patterns.md` | `references/go/patterns.md` |
103+
| **Queries** | Read-only state inspection | `references/python/patterns.md` | `references/typescript/patterns.md` | `references/go/patterns.md` |
104+
| **Updates** | Synchronous state modification with response | `references/python/patterns.md` | `references/typescript/patterns.md` | `references/go/advanced-features.md` |
105+
| **Child Workflows** | Break down large workflows, isolate failures | `references/python/patterns.md` | `references/typescript/patterns.md` | `references/go/patterns.md` |
106+
| **Continue-as-New** | Prevent unbounded history growth | `references/python/advanced-features.md` | `references/typescript/advanced-features.md` | `references/go/patterns.md` |
107+
| **Saga** | Distributed transactions with compensation | `references/python/patterns.md` | `references/typescript/patterns.md` | `references/go/patterns.md` |
98108

99109
## Troubleshooting Quick Reference
100110

@@ -187,6 +197,18 @@ Available scripts in `scripts/` for worker and workflow management:
187197
- **`references/typescript/advanced-features.md`** - Cancellation scopes, interceptors
188198
- **`references/typescript/gotchas.md`** - TypeScript-specific anti-patterns
189199

200+
### Go References
201+
- **`references/go/go.md`** - Go SDK overview, quick start
202+
- **`references/go/determinism.md`** - workflowcheck, safe alternatives, concurrency
203+
- **`references/go/patterns.md`** - Go pattern implementations (signals, queries, saga)
204+
- **`references/go/testing.md`** - TestWorkflowEnvironment, mocking, replay testing
205+
- **`references/go/error-handling.md`** - ApplicationError, retry policies, idempotency
206+
- **`references/go/data-handling.md`** - Data converters, protobuf, encryption
207+
- **`references/go/observability.md`** - Logging, metrics, tracing, Search Attributes
208+
- **`references/go/versioning.md`** - GetVersion API, Worker Versioning
209+
- **`references/go/advanced-features.md`** - Continue-as-new, updates, schedules, interceptors
210+
- **`references/go/gotchas.md`** - Go-specific anti-patterns
211+
190212
## Feedback
191213

192214
If this skill's explanations are unclear, misleading, or missing important information—or if Temporal concepts are proving unexpectedly difficult to work with—draft a GitHub issue body describing the problem encountered and what would have helped, then ask the user to file it at https://github.com/temporalio/skill-temporal-developer/issues/new. Do not file the issue autonomously.

0 commit comments

Comments
 (0)