I’d love to propose a Cursor feature that allows users to control execution order and cycle flow between parallel chat sessions, and to share context across them.
I frequently use what I might shamelessly call “advanced prompts” (see below ), and I often run them in a loop-casting style—automatically pasting them into sessions and calling them repeatedly.
I think Cursor users would really benefit from either (or both) of the following:
- A way to define execution order between chat agents (and ideally, to cycle through them in sequence)
- Context sharing between chat sessions
Of course, this could create an explosion of requests unless bounded by cycle limits or throttling—but the possibilities for power users and automation workflows would be huge.
What does everyone think?
Below: my so-called “advanced prompt”
Prompt revision suggestions are also welcome😇
This prompt relies heavily on verbatim precision, but since the original is written in Japanese, there may be some loss of verbatim accuracy in the English translation.
Prompt Specification:
Version: "1.0.0"
# ============================================================
# 0. Overall Class Design (Japanese naming, verbatim definitions, consistency guaranteed)
# ┌─> MainLoopManagerClass ─┬─> UnitExtractionClass
# │ ├─> TestManagerClass
# │ ├─> DevelopmentManagerClass
# │ └─> VerificationManagerClass
# │
# ├─> ResourceManagerClass
# ├─> MemoryStorageManagerClass
# └─> RuleInspectorClass
#
# Fields: (refer with ClassName.Field or ClassName.FieldName)
# FieldContent1
# FieldContent2
# Method description format:
# MethodName(args):
# Process1
# Process2
# ============================================================
# ------------------------------------------------------------
ResourceManagerClass:
# ------------------------------------------------------------
Fields:
Required Resources:
- "@20250320142446_initial_schema.sql"
- "@database.ts"
- "@created_files_list.yaml"
- "@tailwind.config.js"
Read-only Resources (editing forbidden):
- "tailwind.config.js"
- "nuxt.config.ts"
- "playwright.config.ts"
- "playwright.global-setup.ts"
- "database.ts"
Optional Reference Docs:
- "@Nuxt.js"
- "@NuxtFonts"
- "@TipTap"
- "@supabase"
Auth-related Mandatory Functions (read-only):
- "@register-user-function.ts"
- "@login-with-account-function.ts"
- "@delete-user-function.ts"
# ------------------------------------------------------------
MemoryStorageManagerClass:
# ------------------------------------------------------------
Fields:
Memory File: "created_files_list.yaml"
Structure Definition:
UnitName:
PathWithinUnit:
State: "NotCreated | Generating | VerbatimDone"
DependencyPaths: []
DependentPaths: []
Dependencies: []
Dependents: []
State: "NotCreated | Generating | VerbatimDone"
UnitCreationOrder: 1
State Details:
NotCreated: UI transition screens needed for the unit’s tests are added at depth 1
Generating: VerificationManagerClass.verbatimVerify() not yet passed
VerbatimDone: VerificationManagerClass.verbatimVerify() passed
Recording Rules:
- "Write with relative path + extension"
- "Must exactly match real directory structure"
- "If functional dependency exists, add Japanese comment"
Violation Conditions:
- "Omission of required files is a verbatim violation"
Methods:
load():
Read YAML and store to internal dict
writeBack():
Convert internal dict to YAML and save verbatim
updateState(unit, newState):
Overwrite state
writeBack()
addRecord(unit, path, info):
Add new file info
writeBack()
updateRecord(unit, path, newInfo):
Update existing info
writeBack()
deleteRecord(unit, path):
Remove entry
writeBack()
getIncompleteUnit():
Return earliest unit whose state is not "VerbatimDone"
If none found, call RuleInspectorClass.syntaxHaltReport()
recordExistingUnits():
If entry empty, scan existing project structure and create entries with creation order 0
# ------------------------------------------------------------
UnitExtractionClass:
# ------------------------------------------------------------
Fields:
Granularity Rules: [
"1 screen = 1 unit",
"Add UI transition screens needed for unit tests at depth 1",
"No bulk CRUD generation",
"Generate in CRUD order per feature (if any unit group lacks RUD in YAML, generate those RUD first)",
"Non-screen responsibilities directly called from UI components are extracted as part of that UI unit",
"Only extract as independent unit if a list-type screen exists that lets the user survey/select data and acts as UI start point leading to other units",
"Screen units must follow one of: ['Navigation', 'EntryScreen', 'IntermediateScreen', 'HiddenResponsibility']",
"Only 'EntryScreen' appears in navigation; 'IntermediateScreen' and 'HiddenResponsibility' are never shown directly in UI",
"EntryScreen: screen a user explicitly starts via UI",
"IntermediateScreen: screen shown via transition from another unit (list → detail, edit, etc.)",
"HiddenResponsibility: utility/API/state-management unit with no UI"
]
Extraction Sources: ["20250320142446_initial_schema.sql", "database.ts", "memory storage file"]
Methods:
extract():
Parse SQL & type files, generate unit candidates topologically
MemoryStorageManagerClass.addRecord(unitName, filePath, fileInfo)
MemoryStorageManagerClass.load()
Determine next unit to create topologically and return
evaluateDependencies(targetUnit):
Confirm target unit, promote to Generating
MemoryStorageManagerClass.updateState(unitName, "Generating")
MemoryStorageManagerClass.load()
Determine next unit to create topologically and return
setInitialUnits():
Set TopPageUnit with creation order 1
MemoryStorageManagerClass.updateState("TopPageUnit", "NotCreated")
Set NavigationUnit with order 2
MemoryStorageManagerClass.updateState("NavigationUnit", "NotCreated")
Set UserRegistrationUnit with order 3
MemoryStorageManagerClass.updateState("UserRegistrationUnit", "NotCreated")
Return target unit
# ------------------------------------------------------------
TestManagerClass:
# ------------------------------------------------------------
Fields:
Allowed APIs:
- "page.click"
- "locator.type(delay:0)"
- "getByTestId"
- "context.router"
Preconditions:
- "Always wait for document.readyState==='complete'"
- "Capture every page console output via page.on('console')"
- "Enable page.on('response') monitoring; log any HTTP response with status >= 300"
- "Prepare test data through UI only"
- "After CRUD cycle completes for specific data, check existing 'VerbatimDone' test code; if DELETE not included, add cleanup via UI"
- "Define exactly one test file per unit"
Async Verification Spec:
- "page.waitForFunction(fn, arg, { timeout })"
- "waitForFunction function must have single arg form (arg)=>{}"
- "Playwright API forbidden inside waitForFunction"
- "expect(locator).toHaveText(...) limited to:
- Stage 1: confirm DOM stable via waitForFunction
- Stage 2: verify text presence with expect(locator).toHaveText(/.+/, { timeout }) only"
- "No standalone use"
- "Omitting timeout in verification is forbidden"
- "Do not add timeout to static elements"
- "When using expect.poll, specify interval and predicate"
- ".not.toBeVisible() forbidden → use waitForFunction for DOM null check"
Forbidden APIs:
- "page.goto (except initial path '/')"
- "test.slow()"
- "test.describe.configure({ mode:'slow' })"
- "@nuxt/test-utils"
- ".not.toBeVisible()"
- "mock"
- "fallback"
- "dummy data"
- "temporary implementation"
- "getByRole"
- "getByLabelText"
- "getByAltText"
UI Requirements:
data-testid: "Required"
Implicit role attribute usage forbidden: true
Single-arg arrow func forbidden: "(a,b)=>{} etc. forbidden"
Methods:
generate(targetUnit):
Generate test code per unit spec
RuleInspectorClass.preEditCheck()
CRUD files
RuleInspectorClass.postEditCheck()
MemoryStorageManagerClass.addRecord()/updateRecord()/deleteRecord()
apiViolationScan(testCode)
apiViolationScan(testCode):
Static-analyze for forbidden APIs and return violation list
execute():
Run `npx playwright test --reporter=line` and return log
# ------------------------------------------------------------
DevelopmentManagerClass:
# ------------------------------------------------------------
Fields:
Tailwind Limits: {extend: "forbidden", undefinedColor: "forbidden"}
Supabase Limits: {typeSource: "database.ts", any_unknown: "forbidden", queryConsistency: "required", wrapperClient: "forbidden"}
UI Constraints: {data-testid: "required (unit-name prefix, overwrite/duplicate forbidden)", image: "@NuxtImage", icon: "@NuxtIcon"}
Error Handling:
UI: "Japanese display"
console: "error.stack||error explicit; log every exception via JSON bridge, SSR/Client"
stackNullFallback: true
Methods:
codeGenerate(fixProposal):
Generate code from proposal
RuleInspectorClass.preEditCheck()
CRUD files
RuleInspectorClass.postEditCheck()
MemoryStorageManagerClass.addRecord()/updateRecord()/deleteRecord()
logicSeparationCheck()
colorCheck()
logicSeparationCheck():
Extract logic to composables
Move backend calls to API layer
Extract per lifecycle hook
colorCheck():
Compare against theme.colors and detect violations
# ------------------------------------------------------------
VerificationManagerClass:
# ------------------------------------------------------------
Fields:
LogKeywords: ["all logs captured by page.on('console')", "Received string:", "Expected string:", "not found", "toBeVisible"]
Methods:
parseLog(testLog):
Extract lines matching keywords
Return boolean abnormal
fixProposal(testLog):
Return fixes based on abnormal lines
verbatimVerify(targetUnit):
Remove unnecessary console.logs (leave logs with JP reason comment)
Add Japanese comments line-by-line for all code
Confirm zero prompt violations across all files in unit
Re-run tests for unit and ensure success
# ------------------------------------------------------------
MainLoopManagerClass:
# ------------------------------------------------------------
Fields:
consecutiveFailures: 0
failureThreshold: unlimited
targetUnit: empty by default
Methods:
init():
ResourceManagerClass.readOnlyResources
ResourceManagerClass.requiredResources
MemoryStorageManagerClass.load()
MemoryStorageManagerClass.recordExistingUnits()
MainLoopManagerClass.targetUnit = UnitExtractionClass.setInitialUnits()
MainLoopManagerClass.targetUnit = UnitExtractionClass.extract()
runLoop():
while True:
targetUnit = MemoryStorageManagerClass.getIncompleteUnit()
if targetUnit is None:
break
syntaxExtraction(targetUnit)
testLog = testPhase(targetUnit)
developmentPhase(testLog)
verificationPhase(targetUnit)
anomalyCheck()
syntaxExtraction(targetUnit):
targetUnit = UnitExtractionClass.evaluateDependencies(targetUnit)
testPhase(targetUnit):
TestManagerClass.generate(targetUnit)
testLog = TestManagerClass.execute()
return testLog
developmentPhase(testLog):
fixProposal = VerificationManagerClass.fixProposal(testLog)
DevelopmentManagerClass.codeGenerate(fixProposal)
verificationPhase(targetUnit):
testLog = TestManagerClass.execute()
abnormal = VerificationManagerClass.parseLog(testLog)
if abnormal:
fixProposal = VerificationManagerClass.fixProposal(testLog)
DevelopmentManagerClass.codeGenerate(fixProposal)
consecutiveFailures += 1
else:
VerificationManagerClass.verbatimVerify(targetUnit)
MemoryStorageManagerClass.updateState(targetUnit, "VerbatimDone")
consecutiveFailures = 0
anomalyCheck():
If all autonomous fixes per prompt design fail,
or environment change needed,
RuleInspectorClass.syntaxHaltReport()
# ------------------------------------------------------------
RuleInspectorClass:
# ------------------------------------------------------------
Fields: {}
Methods:
syntaxHaltReport():
status: "failure"
summary: <problem report>
unit: "<unit name>"
last_phase: "<test design | verification loop>"
preEditCheck(content):
Ensure content not within ResourceManagerClass.readOnlyResources
postEditCheck(content):
Ensure file exists, no syntax error, verbatim match
Cursor Special Rules:
forcedLoopControl:
minimumCycles: 25
completionCriteria: "explicit command | all units complete"
subjectivityForbidden: true
autoFixRules:
edit_file_limit: "unlimited"
ambiguousTerminationForbidden: true
loopDeficitRebellion: true