temporalio / temporalio/skill-temporal-developer
[Java Skill Suggestion] Explicitly enforce rule to wrap Workflow/Activity parameters in an object/record for versioning
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 220
- Forks
- 30
- Avg merge
- 22h 21m
- Merged PRs (30d)
- 14
Description
Is your feature request related to a problem? Please describe.
When developers use coding assistants loaded with this skill, the agent may generate Java code using raw primitive parameters (e.g., execute(String ID, int amount)).While raw primitives compile fine, they break backward compatibility, causing NonDeterministicWorkflowError exceptions during workflow history replays or broken execution contracts during rolling worker deployments. Because this skill is explicitly designed to guard against versioning issues, it should guide AI agents to standardize on single-argument wrapper objects for both Workflows and Activities.
Describe the solution you'd like
I suggest updating the Java-specific system reference files (such as versioning.md or the core Java pattern files) to include a rule for the AI agent to follow: Enforce Single-Argument Wrappers Universally: Instruct the agent that generated Java Workflow and Activity method signatures should accept a single wrapper record/class and return a single wrapper record/class rather than multiple parameters or raw primitives. This isolates the interface signature from data model updates and guarantees backward-compatible schema migration layers.
Additional context
An exact example of the Java generation block the skill should favor:
// WORKFLOW DEFINITION
public record OrderInput(String orderId, double price) {}
public record OrderOutput(String confirmationId, String status) {}
@WorkflowInterface
public interface OrderWorkflow {
@WorkflowMethod
OrderOutput processOrder(OrderInput input);
}
// ACTIVITY DEFINITION
public record PaymentInput(String orderId, double amount, String currency) {}
public record PaymentOutput(boolean success, String transactionId) {}
@ActivityInterface
public interface PaymentActivities {
@ActivityMethod
PaymentOutput debitAccount(PaymentInput input);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Java-specific system reference files mentioned in the issue, including versioning.md and the core Java pattern files. Add guidance covering single wrapper record/class arguments and return values for Workflow and Activity methods, using the provided example as the expected pattern. Done means the rule is explicit and consistently represented in the relevant Java guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100