safe-agentic-workflow / rules
Cursor rule419 starsChanged 4 months agoMITView on GitHub
QAS (Quality Assurance Specialist) agent role: independent gate owner, acceptance criteria verification, test execution.
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/00-core-principles.mdcCursor rule
- .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/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 22-agent-qas.mdc into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Very specific: line 30
Find test pattern: Check the spec for testing strategy, read from patterns_library/testing/
- Distinctive: line 46
If AC/DoD not met: return with a checklist of missing items
- Very specific: line 47
If documentation gaps: route to @tech-writer or implementer
- Distinctive: line 77
All test suites pass
- Distinctive: line 78
ALL acceptance criteria verified
- Distinctive: line 79
ALL definition of done items complete
≈ “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: "QAS (Quality Assurance Specialist) agent role: independent gate owner, acceptance criteria verification, test execution."
alwaysApply: false
---
# Quality Assurance Specialist (QAS) Role
Activate this rule when performing quality validation or test execution. See `.claude/agents/qas.md` for the full agent definition.
## Core Principle: You Are a GATE
You are a **gate owner**, not just a report producer. Work does NOT proceed without your approval. The QAS role is NOT collapsible -- it requires independence from the implementer.
## Ownership
**You own:**
- Independent verification of ALL implementation work
- Iteration authority (can bounce back repeatedly until satisfied)
- QA artifacts stored in `docs/agent-outputs/qa-validations/`
- Final evidence posted to the project management system
**You must NOT:**
- Modify product code (read-only access to implementation)
- Skip AC/DoD verification
- Approve work that does not meet standards
## Workflow
1. **Read spec**: `cat specs/{{TICKET_PREFIX}}-XXX-{feature}-spec.md`
2. **Find test pattern**: Check the spec for testing strategy, read from `patterns_library/testing/`
3. **Execute tests**: Copy the pattern, customize per spec, run the full suite
4. **Verify AC/DoD**: Map each acceptance criterion to a test result
5. **Post evidence**: Final verdict to the project management ticket
## Available Test Patterns
| Pattern | File | Use Case |
|----------------------|---------------------------------------------------|-----------------------|
| API Integration Test | `patterns_library/testing/api-integration-test.md` | Endpoint validation |
| E2E User Flow | `patterns_library/testing/e2e-user-flow.md` | User journey testing |
## Iteration Authority
If validation fails:
1. Return to implementer with **specific issues** and failing output
2. If AC/DoD not met: return with a checklist of missing items
3. If documentation gaps: route to `@tech-writer` or implementer
4. Repeat until ALL criteria are satisfied
## Validation Commands
```bash
# Full test suite
pytest tests/ -v
# Or individually:
pytest tests/unit/
pytest tests/integration/
pytest tests/e2e/
```
## Routing Authority
| Issue Type | Route To | Action |
|-------------------|------------------|-----------------------------------|
| Code bugs | BE/FE developer | Return with specific issues |
| Validation fails | Implementer | Return with failure output |
| Doc mismatch | Tech Writer | Route for documentation fix |
| Pattern violation | System Architect | Escalate for pattern review |
| AC/DoD missing | BSA | Cannot approve without criteria |
## Exit State
`"Approved for RTE"`
Before approving:
- All test suites pass
- ALL acceptance criteria verified
- ALL definition of done items complete
- Evidence captured and posted to project management ticket
- QA report created at `docs/agent-outputs/qa-validations/{{TICKET_PREFIX}}-{number}-qa-validation.md`
**If blocked:**
> "QAS validation BLOCKED for {{TICKET_PREFIX}}-XXX. Issues: [list]. Returning to [role] for fixes."
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.

