A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Sentinel is a set of rules—an AI operating system for disciplined, test-driven software development. It transforms Curs
Sentinel is a ruleset and execution system that transforms AI coding tools into disciplined, test-driven collaborators. It acts as a programmable operating system for development, enforcing structure, context, and test-first implementation through a set of non-negotiable engineering principles defined in .cursorrules.
Sentinel doesn't just assist you. It governs your workflow, ensuring quality and consistency.
Modern AI tools are powerful code generators, but often lack context, violate architectural boundaries, and bypass essential engineering practices. This leads to technical debt, rework, and systems that are hard to maintain.
Sentinel fixes this. It makes AI obey your engineering system—not undermine it. Key benefits include:
docs/architecture.mermaid) and quality standards (CODE_QUALITY).tasks/tasks.md.PLANNER_MODE, TDD_ENFORCEMENT, ARCHITECTURE_MODE, etc.) for clarity.docs/log.md, docs/status.md) and require resolution.docs/*) to maintain context and ensure alignment.Want to start a new project with Sentinel in Cursor? Just do this:
Copy the rules file:
RULES.md from this repo into your new project directory as .cursorrules.Open Cursor in your project directory.
Trigger onboarding:
docs/PRD.md, docs/technical.md, docs/architecture.mermaid, docs/unit_testing_guideline.md, tasks/tasks.md).gitignore tailored to your tech stackReview and approve the generated docs.
You're ready to plan and build—Sentinel will guide you step by step!
Already using Cursor? See the Quick Start above for the fastest way to begin!
git clone git@github.com:dominno/sentinel.git
cp sentinel/RULES.md YOUR_PROJECT/.cursorrules # Or .winsurfrules, etc.
mkdir -p docs tasks src docs/research # Add other source dirs as needed
touch \
docs/PRD.md \
docs/technical.md \
docs/architecture.mermaid \
docs/unit_testing_guideline.md
docs/unit_testing_guideline.md. Sentinel will not run without these commands defined.~/.cursor/mcp.json like this:
{
"mcpServers": {
"time": {
"command": "uvx",
"args": ["mcp-server-time", "--local-timezone=Europe/Warsaw"]
}
}
}
docs/PRD.md, docs/technical.md, docs/architecture.mermaid, and docs/unit_testing_guideline.md with your project's specifics.Not sure how to create these files? Use the Quick Start onboarding above! Just copy the rules file, open Cursor, and describe your project idea. Sentinel will guide you through generating all required docs interactively.
Sentinel relies on these key files for context and governance:
| File | Role |
|---|---|
docs/PRD.md | Product reasoning — the "why" |
docs/technical.md | Constraints and engineering standards |
docs/architecture.mermaid | System boundaries and data flows |
docs/unit_testing_guideline.md | TDD style and expectations |
docs/status.md | Project status (progress, issues, major decisions & rationale in Decision History) |
docs/log.md | Granular, time-stamped log of every action/event, violation, or retrospective. |
tasks/tasks.md | All implementation plans (checklists). Task entries include: Task ID, title, description, explicit statuses (`Planned |
tasks/[TASK-ID].md | Detailed summary of a completed task: what was done, code/test links, review results, PRD alignment. |
docs/research/[TASK-ID].md | (Optional) Research summary generated by the AI for complex or unknown tasks, detailing findings on best practices or relevant libraries. |
docs/research/[domain][topic].md | Individual domain research files created during comprehensive onboarding, containing focused research on specific knowledge domains. |
docs/research/ONBOARDING_COMPREHENSIVE.md | Consolidated research findings from multi-domain analysis during project onboarding, containing executive summary, domain analysis, and implementation recommendations. |
.cursorrules/.winsurfrules | The core Sentinel ruleset |
(Note: Decision History in status.md is strictly for major decisions; log.md captures all other events.)
Interact with your AI assistant using specific prompts that trigger Sentinel's modes and enforcement.
Mandatory Steps Before Starting Any Task:
status.md, tasks.md, etc.).tasks/tasks.md have a status of Done. If not, it enters FAIL_SAFE_MODE with a warning and does not proceed with the task.develop and create/switch to a new feature branch (feature/[task-id]-[slug]).Starting a New Feature (Defined in tasks/tasks.md):
Use the FEATURE_WORK_PROMPT_TEMPLATE defined in .cursorrules. Expand it fully:
Work on feature [FEATURE NAME or TASK-ID] following these non-negotiable rules:
**Context & Setup:**
- Restore full context before any work (status.md, tasks.md, technical.md, architecture.mermaid, unit_testing_guideline.md)
- If context cannot be restored, STOP and enter FAIL_SAFE_MODE immediately
- Create and switch to a new feature branch from develop before any code creation
- Confirm test command and linting rules are defined
**TDD Workflow - Strict Test-First:**
- For EACH checklist item, follow the complete TDD loop:
1. Write ONE failing test BEFORE implementation code (except for project structure tasks)
2. Run the test IMMEDIATELY to verify it fails for the expected reason
3. Write MINIMAL code to pass the test
4. Run the test again to verify it passes
5. Refactor while keeping tests passing
6. Run all tests before moving to next item
- NEVER create multiple test files in sequence without running tests between them
- If TDD order is violated, STOP immediately and log as process violation
**Code Quality Standards:**
- Follow SOLID, KISS, DRY principles
- Avoid magic numbers, use constants/configs
- Extract shared logic, keep functions < 30 LOC
- Maintain strict module boundaries per architecture.mermaid
- Document public methods with JSDoc
**Autonomous Decision Making:**
- Proceed WITHOUT asking when implementing clear checklist items, writing tests, or making small refactors
- STOP and ASK when instructions are unclear, multiple interpretations exist, or architectural boundaries might be crossed
- Act with speed when clear, ask when uncertain
**Task Completion:**
- Run full test suite before marking complete
- Explicitly review all DEFINITION_OF_DONE criteria
- Perform tech debt check and log any findings
- Update status.md and tasks.md with canonical timestamps
- Merge feature branch to develop after all checks pass
Log all work meticulously and STOP immediately if any rule is violated.
Just use
Work on [FEATURE NAME or TASK-ID] use FEATURE_WORK_PROMPT_TEMPLATE
Requesting a New Feature (Not in tasks/tasks.md):
"I have an idea: users should reset passwords via email"
Sentinel will:
PLANNER_MODE.tasks/tasks.md following the template and CODE_QUALITY principles.FEATURE_WORK_PROMPT_TEMPLATE to start implementation.Mandatory Steps Before Marking Any Task Complete:
tasks/tasks.md are complete.CODE_REVIEWER_MODE and TECH_DEBT_REFACTOR completed, results logged.develop.status.md, log.md, and tasks/tasks.md reflect completion with canonical timestamps.After Task Completion:
Once a task fully meets its DEFINITION_OF_DONE (including merge to develop and final log/status updates):
Task Completion Summary Generation:
tasks/[COMPLETED_TASK_ID].md.CODE_REVIEWER_MODE and TECH_DEBT_REFACTOR), and a link to the main log entry.tasks/[COMPLETED_TASK_ID].md."Next Task Suggestion Logic:
tasks/tasks.md to identify the next high-priority, unblocked task (Status: Planned, all dependencies Done).Sentinel can help you break down high-level ideas from your docs/PRD.md, docs/technical.md, and docs/architecture.mermaid into actionable tasks in tasks/tasks.md. This is typically a two-stage process involving ARCHITECTURE_MODE (for larger features) and PLANNER_MODE.
1. High-Level Design with ARCHITECTURE_MODE (Optional, for complex features)
If you're introducing a significant new feature or module that might impact your system's architecture:
ARCHITECTURE_MODE:
"Design the new [Feature/Module Name] based on docs/PRD.md and docs/technical.md"
docs/architecture.mermaid and other relevant documents.docs/architecture.mermaid and outline major components.PLANNER_MODE.2. Detailed Task Scaffolding with PLANNER_MODE
Once you have a clear idea (either directly from your PRD or refined through ARCHITECTURE_MODE), use PLANNER_MODE to generate detailed, actionable tasks:
PLANNER_MODE:
"Create tasks for [Feature/User Story description] based on docs/PRD.md, docs/technical.md, and the updated docs/architecture.mermaid. Ensure tasks align with docs/unit_testing_guideline.md."
"Work on [Non-existent Task Name/ID]" // Sentinel will automatically switch to PLANNER_MODE
PLANNER_MODE.docs/PRD.md, docs/technical.md, docs/architecture.mermaid, docs/unit_testing_guideline.md).docs/research/[TASK-ID].md. It then asks for user direction on how to proceed with planning based on this research.tasks/tasks.md.
TASK_EXPANSION_PROTOCOL. If the user agrees, the complex task is broken down into smaller, numbered sub-tasks (e.g., [PARENT_TASK_ID].1, [PARENT_TASK_ID].2), and the original parent task is updated in tasks/tasks.md to Status: Epic, with its implementation plan listing the new sub-task IDs.tasks/tasks.md for each identified sub-task, including:
tasks/tasks.md, complete with checklists and acceptance criteria.Once tasks are approved and exist in tasks/tasks.md, you can begin implementation using the strict TDD_ENFORCEMENT mode by prompting:
"Work on [TASK-ID] use FEATURE_WORK_PROMPT_TEMPLATE"
Sentinel trusts the AI assistant to act autonomously only when instructions are clear and unambiguous. The AI should:
TECH_DEBT_REFACTOR cycle. Shall I create a new task proposal for this refactor, or how should I proceed?").FAIL_SAFE_MODE if context cannot be restored or ambiguity cannot be resolved.Sentinel includes mechanisms for learning and process refinement:
What went well? What broke? What to change?) is appended to docs/log.md.RULE_MAINTENANCE_MODETo ensure the ruleset itself remains effective and adapts to the project's needs, Sentinel includes RULE_MAINTENANCE_MODE:
RULES.md and any associated .cursor/rules/*.mdc files.TECH_DEBT_REFACTOR cycle identifies inefficiencies linked to rule ambiguity or impracticality.docs/log.md, docs/status.md, and tasks/tasks.md to identify patterns, frequent violations, or rule-induced bottlenecks.RULES.md or .cursor/rules/custom.mdc). All changes are meticulously logged in docs/log.md and a dedicated rule changelog.Sentinel operates in strict modes. The current mode is always announced.
| Mode | Description | Trigger |
|---|---|---|
TDD_ENFORCEMENT | Implements feature using strict test-first flow (Test-Code-Refactor) | Feature prompt for existing task |
PLANNER_MODE | Scaffolds new tasks from idea or PRD. Includes AI-driven complexity estimation (1-10), prompts for research on complex/unknown tasks (output to docs/research/), and can invoke TASK_EXPANSION_PROTOCOL to break down large tasks into sub-tasks, with parent becoming an Epic. | Feature prompt for non-existing task |
DEBUGGER_MODE | Investigates and resolves bugs/regressions/repeated errors | Test failures, unexpected errors |
ARCHITECTURE_MODE | Designs or validates new systems/modules | Request for new system/module design or architectural change |
CODE_REVIEWER_MODE | Reviews code against quality standards with constructive feedback. Dual Operating Modes: Code Review + Research Validation with brutal honesty assessment (1-10 rating). | Request for review, post-task completion, research validation during COMPREHENSIVE_RESEARCH_MODE |
TECH_DEBT_REFACTOR | Identifies, logs, and prioritizes technical debt | Post-task completion, identification of refactor opportunity |
CONTEXT_RESTORE | Loads required documentation before starting any major action | Start of any task/mode, after context loss |
FAIL_SAFE_MODE | Stops execution if anything is unclear, ambiguous, or context missing | Missing context, unclear instructions, rule ambiguity |
RULE_MAINTENANCE_MODE | Analyzes system performance against rules and proposes improvements to the ruleset itself. | Manual invocation, periodic schedule, repeated process violations, or insights from TECH_DEBT_REFACTOR. |
RESEARCH_MODE | Allows user-initiated research for any task. AI uses web search, synthesizes findings, and saves a summary to docs/research/[TASK-ID].md. | Explicit user command, e.g., "Enter RESEARCH_MODE for [TASK-ID]" or "Research [topic] for [TASK-ID]". |
COMPREHENSIVE_RESEARCH_MODE | Multi-domain intelligence gathering for project onboarding. Identifies 3-5 critical knowledge domains, executes targeted research, and provides comprehensive documentation with quality assessment. | Automatically triggered during PROJECT_ONBOARDING_MODE, or explicit user command. |
PROJECT_ONBOARDING_MODE | Comprehensive research-driven onboarding for new projects. Interactive Q&A, multi-domain research, iterative validation loops, and complete project bootstrap from just the rules file. | Detected when core context files are missing or empty, or user intent to start new project. |
A task is only complete when ALL these criteria are met and verified:
tasks/tasks.md are explicitly met.CODE_REVIEWER_MODE).TECH_DEBT_REFACTOR).develop.status.md and log.md updated with completion status and canonical timestamp.(Sentinel may use a checklist format like ✅ / ❌ / STILL NEED TO CHECK during this verification)
Sentinel is designed for:
It is not ideal for:
See Sentinel used in real projects:
MIT — use, adapt, and enforce Sentinel in your own projects. Sentinel values discipline and quality.
We drew inspiration from the following resources:
A practical approach to managing multiple AI agents in Cursor through strict file-tree partitioning and domain boundarie
📄 Configuration files that enhance Cursor AI editor experience with custom rules and behaviors
Cursor AI 编程规则精选集 | 132+ 规则,覆盖前端/后端/AI/DevOps 等 32 个领域