temporal-rules

temporal-rules is a cursor rule for Cursor from proyecto26/projectx. It costs 2,467 tokens per session, scanned A, original, MIT.

Project rules for Temporal, a system that runs long-running workflows and coordinates their individual activities. The rules describe a NestJS monorepo, meaning one repository containing multiple applications and shared packages.

In plain words
What is it for?
They are for defining Temporal workflows, implementing activities, configuring workers, and organizing shared workflow utilities in the specified application structure.
Why use it?
They give developers consistent locations, versions, worker setup, task queues, and workflow patterns for this project.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import type { ActivitiesService } from '../main';.

Good fit They are for defining Temporal workflows, implementing activities, configuring workers, and organizing shared workflow utilities in the specified application structure.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/proyecto26/projectx
agentmods
npx agentmods add rules/proyecto26/projectx/temporal-rules

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for temporal-rules

README.md
[![agentmods](https://agentmods.dev/badge/rules/proyecto26/projectx/temporal-rules/github.svg)](https://agentmods.dev/rules/proyecto26/projectx/temporal-rules)
Your own site
<a href="https://agentmods.dev/rules/proyecto26/projectx/temporal-rules"><img src="https://agentmods.dev/badge/rules/proyecto26/projectx/temporal-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for temporal-rules

Your own site · 80×15
<a href="https://agentmods.dev/rules/proyecto26/projectx/temporal-rules"><img src="https://agentmods.dev/badge/rules/proyecto26/projectx/temporal-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,467 This file is loaded in full into every session.
When invoked 2,467 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02467 $0.02467
Opus 5.5 $0.00987 $0.00987
Sonnet 5.5 $0.00493 $0.00493
Haiku 4.5 $0.00247 $0.00247

Measured 1mo ago against content hash 5f13fec75f0f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

temporal-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/backend/temporal-rules.mdc · 362 lines

How it starts

The opening of the file, as written. The whole thing — 362 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Temporal Workflow Rules

Project Context

  • This project uses Temporal.io for workflow orchestration
  • Temporal Server version: 1.29.2
  • Temporal Admin Tools: 1.29.1-tctl-1.18.4-cli-1.5.0
  • Temporal UI: 2.44.1
  • All services connect to Temporal for long-running business processes

Workflow Architecture

Workflow Locations

  • Workflow definitions: apps/*/src/workflows/
  • Activity implementations: apps/*/src/activities/
  • Shared workflow utilities: packages/workflows/src/lib/
  • Temporal configuration: apps/*/src/config/temporal.config.ts

Worker Configuration

  • Each NestJS app runs its own Temporal worker
  • Workers are initialized in the main application bootstrap
  • Task queue is configured per service via environment variables
  • Workers bundle workflows using Webpack

Workflow Patterns

Workflow Definition

import { proxyActivities } from '@temporalio/workflow';
import type { ActivitiesService } from '../main';
const activities = proxyActivities<ActivitiesService>({
  startToCloseTimeout: '1 minute',
});
export async function myWorkflow(input: WorkflowInput): Promise<WorkflowOutput> {
  // Workflow logic here
  const result = await activities.myActivity(input);
  return result;
}

Activity Definition

@Injectable()
export class ActivitiesService {
  constructor(
    private readonly prisma: PrismaService,
    private readonly emailService: EmailService,
  ) {}
  async myActivity(input: ActivityInput): Promise<ActivityOutput> {
    // Activity logic with side effects
    return result;
  }
}

Critical Rules

Workflow Code Constraints

  • ❌ NO direct database calls in workflows
  • ❌ NO HTTP requests in workflows
  • ❌ NO file I/O in workflows
  • ❌ NO random number generation in workflows
  • ❌ NO Date.now() or new Date() in workflows
  • ✅ YES to deterministic logic only
  • ✅ YES to calling activities for side effects

Use Activities For

  • Database operations (Prisma queries)
  • HTTP/API calls
  • Email sending
  • File operations
  • Any non-deterministic operations
  • External service integrations

Read the full file on GitHub · 362 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 362 lines · 2,467 tokens per session scan A 5f13fec75f0f

Subscribe to this mod's changes

temporal-rules is a cursor rule published in the GitHub repository proyecto26/projectx (83 stars, last pushed 6mo ago), licensed MIT. It adds 2,467 tokens to every session, about $0.0099 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.