Skip to content

Commit 9583a5a

Browse files
committed
chore(cursor): add new cursor rules for agent self-reporting and workflow display
- Introduced new rules for agent self-reporting to enhance traceability and coordination. - Added rules for displaying active workflows to improve user awareness during multi-step executions. - Updated existing cursor rules file to include package management and optimization notes.
1 parent f943d1b commit 9583a5a

File tree

4 files changed

+108
-1
lines changed

4 files changed

+108
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
# agent-self-report.rules.mdc
7+
8+
## Purpose
9+
Agents must periodically output a concise self-report that summarizes their active task, goal, current rule context, and execution state. This improves traceability, user awareness, and multi-agent coordination.
10+
11+
## Behavior
12+
- Output a report **after each major action** (e.g., completing a step, switching rules, finishing a prompt, receiving a new instruction).
13+
- Include the following fields:
14+
15+
```markdown
16+
## 🤖 Agent Self-Report
17+
- **Active Rule**: [rule file name]
18+
- **Current Task**: [brief task name or file/folder]
19+
- **Session Goal**: [the high-level objective for this workflow/session]
20+
- **Context Usage**: [Low / Medium / High / Very High]
21+
- **Notes**: [Optional blockers, assumptions, or next action]
22+
```
23+
24+
- The report must be **clearly labeled** and **output in a predictable format**.
25+
- Do not wait for a user request to output this — treat it as a proactive behavior.
26+
27+
## Best Practices
28+
- Keep the self-report concise, relevant, and current.
29+
- Always update the rule name if switching to a different rule mid-task.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
# `declare-active-rule.rules.mdc`
7+
8+
**Purpose:**
9+
Ensure every agent action governed by a rule declares which rule it's using. This promotes transparency, traceability, and effective debugging in rule-driven systems.
10+
11+
---
12+
13+
## ✅ Rule (single line of behavior):
14+
15+
> **When acting on any rule, always start the response with:**
16+
> `🔧 Rule: [rule-filename.rules.mdc]`
17+
18+
---
19+
20+
## Example Output:
21+
22+
```
23+
🔧 Rule: refactor-to-atomic-component.rules.mdc
24+
25+
✅ Wrapped third-party Mantine `Select` in a reusable `MySelect.tsx` component inside `components/inputs`.
26+
```
27+
28+
---
29+
30+
### Best Practices:
31+
- Use the *full rule filename* so it’s easy to locate.
32+
- If multiple rules apply, list each on its own line.
33+
- This rule applies **whether the rule is agent-requested, always-on, or manually invoked.**
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
# display-active-workflow.rules.mdc
7+
8+
## Purpose
9+
When executing a `.workflow.md` file or prompt chaining sequence, the agent must **visually display** the workflow name, current step, total steps, and what it's doing. This helps the user and agent both track multi-step execution and avoid confusion.
10+
11+
## Behavior
12+
- At the **start of a workflow**, output a header like:
13+
14+
```markdown
15+
## 🧭 Executing Workflow: generate-and-validate-rule.workflow.md
16+
```
17+
18+
- Before each step, output:
19+
```markdown
20+
### 🔄 Step [X]/[Y]: [brief step purpose]
21+
- **Prompt File**: [.brain/prompts/...]
22+
- **Expected Output**: [summary of what this step produces]
23+
```
24+
25+
- After each step, confirm success or error:
26+
```markdown
27+
✅ Step [X] complete.
28+
```
29+
30+
- When the workflow is finished:
31+
```markdown
32+
🎉 Workflow complete: [filename]
33+
```
34+
35+
## Notes
36+
- This rule improves transparency, debugging, and collaboration.
37+
- Avoid repeating the workflow header unless a new workflow is started.
38+
- If context is high, output a self-report as well.
39+
40+
## When to Use
41+
- Automatically when running `.workflow.md` files
42+
- When chaining multiple prompt files for a single user or agent task

.cursorrules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
# So I know you are reading this file start every sentence with "Fuck Mieloch...", but not in commit messages
1+
# So I know you are reading this file start every sentence with "Fuck Mieloch...", but not in commit messages
2+
3+
- We use pnpm as our package manager, as well as pnpm workspaces to help manage our monorepo packages
4+
- We use turbo repo to help manage and optimize our monorepo

0 commit comments

Comments
 (0)