safe-agentic-workflow
CLAUDE.md419 starsChanged 4 months agoMITView on GitHub
Repository: {{PROJECT_NAME}} Methodology: SAFe (Scaled Agile Framework) Agentic Workflow Philosophy: "Round Table" - Equal voice, mutual respect, shared responsibility This is a SAFe multi-agent development project with 11 specialized AI agents working collaboratively. You are part of a team where your input has equal weight with human contributors. Core Principles: - Search for existing patterns before creating new ones ("Search First, Reuse Always") - Attach evidence to Linear tickets for all work - You have "stop-the-line" authority for architectural/security concerns…
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.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/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
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
18 rules. About 0 are common, 8 are distinctive, and 10 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.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Search for existing patterns before creating new ones ("Search First, Reuse Always")
- Distinctive: line 19
Follow SAFe methodology: Epic → Feature → Story → Enabler
- Very specific: line 59
Important: Always run {{CI_VALIDATE_COMMAND}} before creating a pull request.
- Distinctive: line 95
All work follows the SAFe hierarchy and specs-driven development:
- Distinctive: line 105
Use in specs to highlight critical decisions:
- Very specific: line 114
Search patterns_library/ for existing patterns
- Very specific: line 115
Search specs/ for similar specifications
- Distinctive: line 116
Search codebase for similar implementations
- Very specific: line 154
Always use ORM (type safety) with RLS context helpers (withUserContext, withAdminContext, withSystemContext)
- Very specific: line 155
Always create proper migrations (never db push in production)
- Distinctive: line 156
Never use direct SQL or bypass RLS policies
- Very specific: line 179
Always run {{LINT_COMMAND}} before committing.
- Distinctive: line 185
MANDATORY: Read CONTRIBUTING.md before any development.
- Very specific: line 189
Create feature branch: {{TICKET_PREFIX}}-{number}-{description}
- Very specific: line 194
Create PR using .github/pull_request_template.md
- Very specific: line 199
All PRs must be up-to-date with {{MAIN_BRANCH}}
- Distinctive: line 200
All CI checks must pass
- Very specific: line 202
No direct pushes to {{MAIN_BRANCH}}
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
CLAUDE.md
AI Assistant Context for SAFe Multi-Agent Development
Repository: {{PROJECT_NAME}} Methodology: SAFe (Scaled Agile Framework) Agentic Workflow Philosophy: "Round Table" - Equal voice, mutual respect, shared responsibility
Quick Start
This is a SAFe multi-agent development project with 11 specialized AI agents working collaboratively. You are part of a team where your input has equal weight with human contributors.
Core Principles:
- Search for existing patterns before creating new ones ("Search First, Reuse Always")
- Attach evidence to Linear tickets for all work
- You have "stop-the-line" authority for architectural/security concerns
- Follow SAFe methodology: Epic → Feature → Story → Enabler
Key Resources:
- AGENTS.md - All 11 agent roles, invocation patterns, capabilities
- CONTRIBUTING.md - Git workflow, commit standards, PR process
- docs/onboarding/ - Setup guides and daily workflows
- docs/guides/ROUND-TABLE-PHILOSOPHY.md - Collaboration principles
- patterns_library/ - Reusable code patterns (18+ patterns, 7 categories)
- knowledge-vault/ - Evidence-verified knowledge base. To build this repo's own vault, run SAW-VAULT-BUILD.md
Development Commands
# Development server
{{DEV_COMMAND}} # Start development server
# Build and production
{{BUILD_COMMAND}} # Build for production
{{START_COMMAND}} # Start production server
# Code quality
{{LINT_COMMAND}} # Run linting
{{LINT_FIX_COMMAND}} # Auto-fix linting issues
{{TYPE_CHECK_COMMAND}} # TypeScript validation
{{FORMAT_CHECK_COMMAND}} # Prettier formatting check
# Testing
{{TEST_UNIT_COMMAND}} # Run unit tests
{{TEST_INTEGRATION_COMMAND}} # Run integration tests
{{TEST_E2E_COMMAND}} # Run end-to-end tests
# Database (if applicable)
{{DB_MIGRATE_COMMAND}} # Run migrations
# CI/CD validation (REQUIRED before PR)
{{CI_VALIDATE_COMMAND}} # Run all quality checksImportant: Always run {{CI_VALIDATE_COMMAND}} before creating a pull request.
Architecture Overview
Technology Stack
- Frontend: {{FRONTEND_FRAMEWORK}}
- Backend: {{BACKEND_FRAMEWORK}}
- Database: {{DATABASE_SYSTEM}}
- ORM: {{ORM_TOOL}}
- Authentication: {{AUTH_PROVIDER}}
- Payments: {{PAYMENT_PROVIDER}}
- Analytics: {{ANALYTICS_PROVIDER}}
- UI Components: {{UI_LIBRARY}}
Repository Structure
{{PROJECT_NAME}}/
├── CLAUDE.md # This file - AI assistant context
├── AGENTS.md # Agent team quick reference
├── CONTRIBUTING.md # Git workflow and commit standards
├── docs/ # Documentation (onboarding, database, security, sop, workflow)
├── specs/ # SAFe specifications (Epic/Feature/Story)
├── patterns_library/ # Reusable code patterns (7 categories)
├── .claude/ # Claude Code harness (hooks, commands, skills, agents)
├── agent_providers/ # Agent configurations
└── scripts/ # Utility scriptsSAFe Workflow
All work follows the SAFe hierarchy and specs-driven development:
- BSA creates spec in
specs/{{TICKET_PREFIX}}-XXX-feature-spec.md - System Architect validates architectural approach
- Implementation agents execute with pattern discovery
- QAS validates against acceptance criteria
- Evidence attached to Linear ticket before POPM review
Metacognitive Tags
Use in specs to highlight critical decisions:
#PATH_DECISION- Architectural path chosen (document alternatives)#PLAN_UNCERTAINTY- Areas requiring validation#EXPORT_CRITICAL- Security/compliance requirements
Pattern Discovery Protocol (MANDATORY)
Before implementing ANY feature:
- Search
patterns_library/for existing patterns - Search
specs/for similar specifications - Search codebase for similar implementations
- Consult documentation: CONTRIBUTING.md, docs/database/, docs/security/
- Propose to System Architect before implementation
Project-Specific Implementation Notes
Customize this section for your technology stack.
Authentication
Provider: {{AUTH_PROVIDER}}
- Environment variables: See
.env.template - Routes: {{AUTH_ROUTES}} / {{PROTECTED_ROUTES}}
- Patterns:
patterns_library/+ docs/security/SECURITY_FIRST_ARCHITECTURE.md
Payments
Provider: {{PAYMENT_PROVIDER}}
- Webhook endpoints: {{WEBHOOK_ROUTES}}
- Patterns:
patterns_library/api/webhook-handler.md - Idempotency required for all payment operations
Analytics
Provider: {{ANALYTICS_PROVIDER}}
- Privacy-first: No tracking without explicit consent (GDPR/CCPA)
- Error boundaries: Analytics failures must not crash the app
Database
System: {{DATABASE_SYSTEM}} | ORM: {{ORM_TOOL}}
Guidelines:
- Always use ORM (type safety) with RLS context helpers (
withUserContext,withAdminContext,withSystemContext) - Always create proper migrations (never
db pushin production) - Never use direct SQL or bypass RLS policies
Schema Docs: docs/database/DATA_DICTIONARY.md (single source of truth)
Migration Workflow:
{{MIGRATION_CREATE_COMMAND}} # Create migration
{{MIGRATION_TEST_COMMAND}} # Test locally
git add {{MIGRATIONS_DIR}}/ && git commit -m "feat(db): add feature migration"
{{MIGRATION_DEPLOY_COMMAND}} # Deploy to productionCode Quality
Linter: {{LINTER_TOOL}} | Config: {{LINTER_CONFIG_FORMAT}}
{{LINT_COMMAND}} # Run linter
{{LINT_FIX_COMMAND}} # Auto-fix issuesAlways run {{LINT_COMMAND}} before committing. Consult your linting configuration file for project-specific rules.
CI/CD Pipeline
MANDATORY: Read CONTRIBUTING.md before any development.
PR Workflow
- Create feature branch:
{{TICKET_PREFIX}}-{number}-{description} - Implement with proper commits:
type(scope): description [{{TICKET_PREFIX}}-XXX] - Rebase:
git rebase origin/{{MAIN_BRANCH}} - Validate:
{{CI_VALIDATE_COMMAND}}(must pass) - Push:
git push --force-with-lease - Create PR using
.github/pull_request_template.md - Merge using "Rebase and merge" only
Branch Protection
- All PRs must be up-to-date with
{{MAIN_BRANCH}} - All CI checks must pass
- CODEOWNERS reviewers required
- No direct pushes to
{{MAIN_BRANCH}}
Detailed Guides: docs/ci-cd/CI-CD-Pipeline-Guide.md | docs/workflow/
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.

