Skip to content

Add Vibe-Coding SOP (5-stage AI coding workflow rule) - #342

Open
youngcintj wants to merge 2 commits into
PatrickJS:mainfrom
youngcintj:main
Open

Add Vibe-Coding SOP (5-stage AI coding workflow rule)#342
youngcintj wants to merge 2 commits into
PatrickJS:mainfrom
youngcintj:main

Conversation

@youngcintj

@youngcintj youngcintj commented Jul 28, 2026

Copy link
Copy Markdown

Summary

Adds Vibe-Coding SOP, a new Cursor rule providing a 5-stage standard operating procedure for AI-assisted coding: requirements → tech evaluation → development → testing → review. It enforces a "plan-before-code" safety gate that blocks file writes until the plan is human-approved, and ships a reusable design system to keep generated UI consistent.

Contribution Type

  • New resource (Cursor rule)
  • Added to the Documentation section in README

Value To Cursor Users

  • Plan-before-code discipline — stages 1–2 produce only Markdown (analysis/plans); no code is written until a human approves the approach, directly addressing uncontrolled AI codegen.
  • Consistent UI, not AI slop — produces a reusable docs/design-system.md so generated interfaces stay coherent instead of generic.
  • Structured reporting at every step — execution rationale, risks, and next-step recommendations, with mandatory human sign-off at key decision points.
  • Composable — optional project-level slash commands and Claude Code hooks are available in the source repo for teams that want automation on top.

Added Or Changed Files

  • rules/vibe-coding-sop-cursorrules-prompt-file.mdc — rule body with frontmatter (description, globs, alwaysApply: false) (new, +101)
  • README.md — one new entry under Documentation (+1)

Quality Checklist

  • Checked this rule isn't already on the list
  • Follows the existing .mdc frontmatter format (description / globs / alwaysApply)
  • Entry placed in the correct README section (Documentation)
  • Description is concise and non-promotional
  • All links are public and working (source repo: https://github.com/youngcintj/vibe-coding-sop)
  • License clear (MIT)

Notes For Maintainers

  • Source repo: https://github.com/youngcintj/vibe-coding-sop (MIT)
  • The .mdc here is a Cursor-format export of the SOP; the canonical skill (with commands / hooks / end-to-end examples) lives in the source repo.
  • Happy to adjust placement, wording, or frontmatter to match the list's conventions.

Thanks for maintaining this list!

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new Cursor Vibe-Coding SOP covering a five-stage workflow, approval gates, development controls, testing, UI practices, and code review reporting. The README documentation list now links to the SOP.

Changes

Vibe-Coding SOP

Layer / File(s) Summary
Define the Vibe-Coding workflow
rules/vibe-coding-sop-cursorrules-prompt-file.mdc
Adds the five-stage workflow, mandatory checkpoints, human approval gate, Git guidance, testing expectations, design-system requirements, and structured review reports.
Publish the SOP in documentation rules
README.md
Adds a linked “Vibe-Coding SOP” entry to the documentation rules list.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: patrickjs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adding the Vibe-Coding SOP rule and its 5-stage workflow.
Description check ✅ Passed The description follows the template well and includes all required sections with specific file, value, checklist, and maintainer notes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rules/vibe-coding-sop-cursorrules-prompt-file.mdc`:
- Around line 13-18: Update the “阶段 1:需求确认” section in
rules/vibe-coding-sop-cursorrules-prompt-file.mdc to explicitly prohibit
creating, modifying, deleting, or renaming any files before human approval;
retain the existing approval-gate description in README.md at line 316 with no
direct change required.
- Around line 1-4: Update the rule frontmatter for the SOP so it activates
reliably across coding tasks by setting alwaysApply to true; remove the empty
globs configuration if it is no longer needed, while preserving the existing
description.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dca7cafd-5a50-4a83-8623-4363d86c3395

📥 Commits

Reviewing files that changed from the base of the PR and between b044f95 and 1dd2338.

📒 Files selected for processing (2)
  • README.md
  • rules/vibe-coding-sop-cursorrules-prompt-file.mdc

Comment on lines +1 to +4
---
description: A 5-stage vibe-coding standard operating procedure (SOP) for Cursor — requirements → tech eval → development → testing → review. Includes a safety gate that blocks file writes until the plan is approved by the human, and produces a reusable design system so generated UI stays consistent instead of "AI slop".
globs:
alwaysApply: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- locate the file ---\n'
fd -a 'vibe-coding-sop-cursorrules-prompt-file\.mdc$' . || true

printf '\n--- git status/diff stat ---\n'
git diff --stat || true

printf '\n--- target file around frontmatter and mentions ---\n'
path="$(fd 'vibe-coding-sop-cursorrules-prompt-file\.mdc$' . | head -n 1 || true)"
if [ -n "${path:-}" ]; then
  wc -l "$path"
  sed -n '1,40p' "$path" | cat -n
  printf '\n--- rule title/self references ---\n'
  rg -n 'automatic|project|wide|alwaysApply|globs|Cursor|rule|prompt|sop' "$path"
fi

Repository: PatrickJS/awesome-cursorrules

Length of output: 258


🌐 Web query:

Cursor context rules yml md frontmatter alwaysApply globs documentation

💡 Result:

Cursor has transitioned to a directory-based system for managing AI instructions, using.mdc files within a.cursor/rules/ folder [1][2]. While the legacy.cursorrules file in the project root is still supported for backward compatibility, it is recommended to migrate to the new format for better scoping and organization [3][4][5]. ### Modern.mdc Rules System Project rules are now defined as.mdc (Markdown + metadata) files located in the.cursor/rules/ directory [1][4]. These files use YAML frontmatter to control their activation and scope [2][6]. ### Frontmatter Configuration Each.mdc file should contain a YAML frontmatter block at the top [2][7]. The three primary fields used to control rule application are: * description: A one-line summary that helps Cursor's agent decide whether the rule is relevant to the current task [1][4][6]. * globs: A list of file patterns (e.g., ["src//.ts", "styles/.css"]) that trigger the rule automatically when a matching file is in context [2][4]. * alwaysApply: A boolean flag [1][7]. * When true: The rule is always included in every chat session, and the globs/description fields are ignored [1][4]. * When false: The rule is applied conditionally based on matching globs or agent relevance [1][7]. ### Rule Activation Modes Based on these settings, rules generally fall into four activation categories [4][7]: 1. Always Apply: alwaysApply: true. Included in every request [4][7]. 2. Auto-attached: alwaysApply: false with globs provided. Activates when a file matching the glob is in context [1][4]. 3. Agent-requested: alwaysApply: false with a description provided (but no globs). The agent reads the description and determines if it is relevant [1][6][7]. 4. Manual: alwaysApply: false with no globs or description. The rule only activates when explicitly referenced (e.g., @-mentioning the rule in chat) [4][7]. Note: Plain.md files in the.cursor/rules/ folder are ignored by the rules system because they lack the required frontmatter [1][4]. If you prefer plain markdown without frontmatter, you can use AGENTS.md instead [1].

Citations:


Make the rule activate reliably across coding tasks.

With alwaysApply: false and globs: empty, the rule is agent-relevance/manual rather than project-wide. Set alwaysApply: true, or add explicit matching globs if this SOP should auto-attach only for certain task contexts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rules/vibe-coding-sop-cursorrules-prompt-file.mdc` around lines 1 - 4, Update
the rule frontmatter for the SOP so it activates reliably across coding tasks by
setting alwaysApply to true; remove the empty globs configuration if it is no
longer needed, while preserving the existing description.

Comment on lines +13 to +18
任何"写代码"任务(后端/前端/全栈/脚本),按这个流程走:

### 阶段 1:需求确认
- 不要一上来就写代码。先问清楚:需求边界(不做什么)、验收标准(用户用得顺的具体行为)、优先级(MVP vs 完整)
- 必产出:需求规格 + 风险点 + 后续建议
- 拍板:边界 / 验收标准 / 优先级

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Enforce the advertised approval gate before claiming it.

The SOP and README promise that file writes are blocked until human approval, but the rule currently lacks an explicit no-mutation constraint.

  • rules/vibe-coding-sop-cursorrules-prompt-file.mdc#L13-L18: prohibit all file creation, modification, deletion, and renaming before approval.
  • README.md#L316-L316: retain the safety-gate description after the rule enforces it.
📍 Affects 2 files
  • rules/vibe-coding-sop-cursorrules-prompt-file.mdc#L13-L18 (this comment)
  • README.md#L316-L316
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rules/vibe-coding-sop-cursorrules-prompt-file.mdc` around lines 13 - 18,
Update the “阶段 1:需求确认” section in
rules/vibe-coding-sop-cursorrules-prompt-file.mdc to explicitly prohibit
creating, modifying, deleting, or renaming any files before human approval;
retain the existing approval-gate description in README.md at line 316 with no
direct change required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant