safe-agentic-workflow / rules
Cursor rule419 starsChanged 4 months agoMITView on GitHub
SAFe methodology core principles, round-table philosophy, search-first-reuse-always, evidence-based delivery. Apply to ALL work in this repository.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/01-git-workflow.mdcCursor rule
- .cursor/rules/02-pattern-discovery.mdcCursor rule
- .cursor/rules/03-safe-ai-dlc.mdcCursor rule
- .cursor/rules/04-knowledge-vault.mdcCursor rule
- .cursor/rules/10-backend-python.mdcCursor rule
- .cursor/rules/11-frontend-react.mdcCursor rule
- .cursor/rules/12-database-sql.mdcCursor rule
- .cursor/rules/13-testing.mdcCursor rule
- .cursor/rules/14-spec-creation.mdcCursor rule
- .cursor/rules/15-deployment.mdcCursor rule
- .cursor/rules/16-stripe-payments.mdcCursor rule
- .cursor/rules/20-agent-architect.mdcCursor rule
- .cursor/rules/21-agent-backend.mdcCursor rule
- .cursor/rules/22-agent-qas.mdcCursor rule
- .cursor/rules/23-agent-security.mdcCursor rule
- .cursor/rules/30-background-agents.mdcCursor rule
- .cursor/rules/31-mcp-integration.mdcCursor rule
- .cursor/rules/README.mdCursor rule
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- orchestration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- security-auditSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- vault-syncSkill
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- orchestration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- security-auditSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- vault-syncSkill
The file
We split this 00-core-principles.mdc into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Every agent and human contributor's input carries equal weight
- Very specific: line 21
Search patterns_library/ for existing code patterns
- Very specific: line 22
Search specs/ for similar specifications
- Distinctive: line 23
Search the codebase for similar implementations
- Distinctive: line 25
Only create new patterns if nothing exists (and that is BSA/Architect's job)
- Distinctive: line 31
All work follows: Epic > Feature > Story > Enabler
- Distinctive: line 41
Use these in specs to flag critical decisions:
- Distinctive: line 58
Every agent role has an explicit exit state defining its handoff point:
- Distinctive: line 82
All work requires evidence attached to the project management ticket
- Distinctive: line 84
No work is "done" without verifiable evidence
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: "SAFe methodology core principles, round-table philosophy, search-first-reuse-always, evidence-based delivery. Apply to ALL work in this repository."
alwaysApply: true
---
# SAFe Core Principles
This repository uses **SAFe (Scaled Agile Framework) Agentic Workflow** with 11 specialized AI agent roles. You are part of a collaborative team where every contributor has equal voice.
## Round Table Philosophy
- Equal voice, mutual respect, shared responsibility
- Every agent and human contributor's input carries equal weight
- "Stop-the-line" authority: ANY contributor can halt work for architectural or security concerns
- Decisions are evidence-based, not authority-based
## Search First, Reuse Always
**MANDATORY before implementing anything:**
1. Search `patterns_library/` for existing code patterns
2. Search `specs/` for similar specifications
3. Search the codebase for similar implementations
4. Consult documentation (see CONTRIBUTING.md, docs/)
5. Only create new patterns if nothing exists (and that is BSA/Architect's job)
See `patterns_library/README.md` for the full pattern index (18+ patterns across 7 categories).
## SAFe Hierarchy
All work follows: **Epic > Feature > Story > Enabler**
1. BSA creates spec in `specs/{{TICKET_PREFIX}}-XXX-feature-spec.md`
2. System Architect validates the architectural approach
3. Implementation agents execute using discovered patterns
4. QAS validates against acceptance criteria
5. Evidence is attached to the project management ticket before POPM review
## Metacognitive Tags
Use these in specs to flag critical decisions:
- `#PATH_DECISION` -- Architectural path chosen (document alternatives)
- `#PLAN_UNCERTAINTY` -- Areas requiring validation
- `#EXPORT_CRITICAL` -- Security or compliance requirements
## Key Resources
- `CLAUDE.md` -- Full AI assistant context and development commands
- `AGENTS.md` -- All 11 agent roles, invocation patterns, exit states
- `CONTRIBUTING.md` -- Git workflow, commit standards, PR process
- `patterns_library/` -- Reusable code patterns (copy-paste ready)
- `docs/onboarding/` -- Setup guides and daily workflows
- `docs/guides/ROUND-TABLE-PHILOSOPHY.md` -- Collaboration principles
## Exit States
Every agent role has an explicit exit state defining its handoff point:
| Role | Exit State |
|------------------|-------------------------------------------|
| BE-Developer | "Ready for QAS" |
| FE-Developer | "Ready for QAS" |
| Data-Engineer | "Ready for QAS" |
| QAS | "Approved for RTE" |
| RTE | "Ready for HITL Review" |
| System Architect | "Stage 1 Approved - Ready for ARCHitect" |
| HITL | MERGED |
## Quality Gates
| Gate | Owner | Blocking? |
|-----------------|------------------|--------------------------|
| Stop-the-Line | Implementer | YES -- no AC = no work |
| QAS Gate | QAS | YES -- no approval = stop|
| Stage 1 Review | System Architect | YES -- pattern check |
| Stage 2 Review | ARCHitect-CLI | YES -- architecture check|
| HITL Merge | {{AUTHOR_NAME}} | YES -- final authority |
## Evidence-Based Delivery
- All work requires evidence attached to the project management ticket
- Evidence includes: command output, test results, validation screenshots
- No work is "done" without verifiable evidence
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

