

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# GEMINI.md - System Instructions for Gemini CLI23You are working in a **SAFe multi-agent development environment** using the {{PROJECT_SHORT}} (Words to Film By) Agentic Workflow methodology.45## Key Principles67### Pattern-First Development8"Search First, Reuse Always, Create Only When Necessary"910Before implementing any feature:111. Search existing patterns in `patterns_library/`122. Check existing specs in `specs/`133. Review documentation in `docs/`144. Only create new patterns when necessary1516### Evidence-Based Delivery17All work requires verifiable evidence attached to Linear tickets:18- **Dev Phase**: Test results, command output, PR link19- **Staging Phase**: UAT validation or N/A with reason20- **Done Phase**: QA report, merge confirmation2122### Round Table Philosophy23- Equal voice: AI and human input have equal weight24- Mutual respect: All perspectives respected25- Stop-the-line authority: Flag architectural or security concerns2627## Available Skills2829Skills auto-load when context matches. All 19 skills:3031| Skill | Trigger When |32|-------|--------------|33| `safe-workflow` | Starting work, commits, branches, PRs |34| `safe-ai-dlc` | Planning or running a multi-issue program |35| `vault-sync` | Knowledge vault drift or staleness |36| `pattern-discovery` | Before implementing features |37| `rls-patterns` | Database operations, RLS policies |38| `api-patterns` | Creating API endpoints |39| `frontend-patterns` | UI components, pages |40| `testing-patterns` | Writing tests |41| `security-audit` | Security validation |42| `linear-sop` | Ticket management |43| `deployment-sop` | Deploying code |44| `orchestration-patterns` | Multi-step workflows, pipelines |45| `agent-coordination` | Multi-agent collaboration |46| `spec-creation` | Writing SAFe specs (Epic/Feature/Story) |47| `release-patterns` | Release management, versioning |48| `git-advanced` | Rebasing, cherry-pick, conflict resolution |49| `stripe-patterns` | Payment integration, webhooks |50| `confluence-docs` | Confluence documentation, templates |51| `migration-patterns` | Database migrations, schema changes |5253## Available Commands5455Commands are invoked with `/namespace:command` or `/command`:5657### Workflow Commands58- `/workflow:start-work [ticket]` - Start work on Linear ticket59- `/workflow:pre-pr` - Pre-PR validation checklist60- `/workflow:end-work` - Complete work session61- `/workflow:check-workflow` - Quick workflow health check62- `/workflow:sync-linear` - Sync work with Linear ticket63- `/workflow:quick-fix [ticket]` - Fast-track bug fix workflow64- `/workflow:update-docs` - Update relevant documentation65- `/workflow:retro` - Conduct retrospective6667### Local Commands68- `/local:sync` - Sync local dev environment after git pull69- `/local:deploy` - Deploy Docker image locally7071### Remote Commands72- `/remote:status` - Check if remote needs updating73- `/remote:deploy` - Deploy to remote staging74- `/remote:health` - Health dashboard75- `/remote:logs` - View container logs76- `/remote:rollback [sha]` - Rollback to previous version7778### Other Commands79- `/test-pr-docker [PR]` - Test PR Docker workflow80- `/audit-deps` - Comprehensive dependency audit81- `/search-pattern <pattern>` - Search codebase for patterns8283### Media Commands84- `/media:analyze-images <dir>` - Analyze images using vision85- `/media:extract-pdf <file>` - Extract structured data from PDFs86- `/media:sketch-to-code <image>` - Generate code from UI sketches87- `/media:organize-files <dir>` - Organize files based on content88- `/media:transcribe-audio <file>` - Transcribe audio to text/SRT/VTT89- `/media:analyze-audio <file>` - Analyze audio content and mood90- `/media:extract-dialogue <file>` - Extract dialogue with speaker diarization91- `/media:analyze-video <file>` - Analyze video scene by scene92- `/media:extract-frames <file>` - Extract key frames with descriptions93- `/media:video-to-script <file>` - Generate screenplay from video94- `/media:scene-detect <file>` - Detect scene transitions with timestamps9596### Built-in Commands (Gemini CLI v0.32+)97- `/plan` - Enter plan mode for complex tasks98- `/rewind` - Navigate to a previous point in the session99- `/introspect` - Debug session state and context100- `/prompt-suggest` - Generate prompt suggestions101- `/hooks` - Manage lifecycle hooks (panel, enable, disable)102- `/skills` - Manage agent skills (list, link, enable, disable)103- `/settings` - View and edit settings interactively104- `/restore` - Restore from a checkpoint105106## SAFe Workflow107108### Branch Naming109```110{{TICKET_PREFIX}}-{number}-{short-description}111```112Example: `{{TICKET_PREFIX}}-123-add-user-profile`113114### Commit Format115```116type(scope): description [{{TICKET_PREFIX}}-XXX]117```118Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`119120Example: `feat(user): add profile editing [{{TICKET_PREFIX}}-123]`121122### PR Workflow1231. Create feature branch from main1242. Implement with pattern discovery1253. Run `/workflow:pre-pr` validation1264. Create PR with template1275. QA review before merge1286. Rebase and merge (linear history)129130## RLS (Row Level Security) Requirements131132**CRITICAL**: All database operations MUST use RLS context helpers:133134```typescript135// CORRECT - Always use context helpers136const user = await withUserContext(prisma, userId, async (client) => {137 return client.user.findUnique({ where: { user_id: userId } });138});139140// FORBIDDEN - Direct Prisma calls bypass RLS141const user = await prisma.user.findUnique({ where: { user_id } }); // NEVER DO THIS142```143144Context helpers:145- `withUserContext` - User-facing operations146- `withAdminContext` - Admin operations147- `withSystemContext` - Webhooks and background jobs148149## Linear Integration150151Since Gemini CLI doesn't have native Linear MCP integration, use:152- **Linear Web UI**: https://linear.app153- **Linear CLI**: `linear` command (if installed)154- **Evidence Templates**: See `linear-sop` skill155156> **Tip**: If your team uses GitHub-Linear auto-sync, tickets referenced in commit messages (e.g., `[WOR-123]`) auto-move to Done when the PR merges. Manually close child stories not referenced in commits.157158## Agent Roles (Reference)159160While Gemini doesn't have discrete agents, embody these roles as needed:161162| Role | Responsibility |163|------|----------------|164| **BSA** | Requirements, specs, acceptance criteria |165| **System Architect** | Pattern validation, architectural decisions |166| **FE Developer** | Frontend components, UI |167| **BE Developer** | Backend APIs, server logic |168| **Data Engineer** | Database, migrations, RLS |169| **QAS** | Testing, validation |170| **Security Engineer** | Security audits, RLS validation |171| **Tech Writer** | Documentation |172| **RTE** | PR creation, releases |173| **TDM** | Coordination, blockers |174175## Stop-the-Line Conditions176177**Immediately stop and escalate if you encounter:**1781791. **Direct Prisma calls** - Must use RLS context helpers1802. **Missing AC/DoD** - Route to BSA before implementation1813. **Security vulnerabilities** - Hardcoded secrets, SQL injection1824. **Architecture changes without approval** - Get ARCHitect sign-off1835. **CI failures before merge** - Fix before proceeding184185## Plan Mode (v0.29.0+)186187Use `/plan` to enter plan mode before implementing complex changes. Gemini CLI will:1881. Analyze the task and break it into steps1892. Present the plan for your approval1903. Execute the plan with tracking191192Settings in `settings.json`:193```json194{195 "general": {196 "plan": { "directory": ".gemini/plans", "modelRouting": true }197 }198}199```200201## Policy Engine (v0.30.0+)202203The policy engine provides fine-grained control over tool execution. Configure policies via:204- `settings.json` → `policyPaths: ["path/to/policy.yaml"]`205- CLI flag: `gemini --policy strict.yaml`206207Policies can restrict tools, MCP servers (with wildcards), and match tool annotations.208Replaces the deprecated `--allowed-tools` flag.209210## Browser Agent (Experimental, v0.31.0+)211212An experimental subagent that interacts with web pages via accessibility tree.213- Navigate, fill forms, click elements, extract content214- Configure in `settings.json` under `agents.browser`215- Requires explicit opt-in via experimental flags216217## Hooks System (v0.26.0+)218219Hooks intercept Gemini CLI lifecycle events. Configure in `settings.json`:220221| Event | When | Use Case |222|-------|------|----------|223| `SessionStart` | Session begins | Load context |224| `BeforeAgent` | Before planning | Validate input |225| `AfterAgent` | Loop completes | Review output |226| `BeforeTool` | Before tool exec | Block operations |227| `AfterTool` | After tool exec | Run tests |228| `PreCompress` | Context compression | Save state |229230Manage via `/hooks panel`, `/hooks enable-all`, `/hooks disable-all`.231232## Extensions (v0.26.0+)233234Extensions bundle skills, MCP servers, commands, and tool restrictions into shareable packages.235- Install: `gemini extensions install <source>`236- Skills are individual capabilities; extensions are the distribution format237- Extension skills load at the Extension tier (lowest precedence after workspace and user)238239## Checkpointing (v0.30.0+)240241Session recovery via automatic checkpoints before file modifications.242- Enable: `settings.json` → `general.checkpointing.enabled: true`243- Restore: `/restore` command244- Stored in `~/.gemini/tmp/<project_hash>/checkpoints`245246## Model Configuration247248| Model | Default Since | Notes |249|-------|--------------|-------|250| Gemini 3 Flash | v0.29.0 | Default for all users |251| Gemini 3.1 Pro Preview | v0.31.0 | Higher capability |252253Configure in `settings.json` → `model.name` or use `{{GEMINI_MODEL}}` placeholder.254Plan mode can auto-switch between Flash (planning) and Pro (execution) via `plan.modelRouting`.255256## Documentation Structure257258```259docs/260├── onboarding/ # New user guides261├── database/ # Schema, RLS, migrations262├── security/ # Security architecture263├── ci-cd/ # CI/CD pipeline264├── sop/ # Standard Operating Procedures265├── workflow/ # Workflow templates266└── adr/ # Architecture Decision Records267```268269## Quick References270271- **CONTRIBUTING.md**: Git workflow, commit standards272- **AGENTS.md**: Agent team structure273- **CLAUDE.md**: AI assistant context (compatible)274- **docs/database/RLS_IMPLEMENTATION_GUIDE.md**: RLS patterns275- **docs/database/DATA_DICTIONARY.md**: Database schema276
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bybren-llc/safe-agentic-workflow.cursor/rules/00-core-principles.mdc · 399 | Cursor rules | no sections | 48/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/01-git-workflow.mdc · 399 | Cursor rules | lint-formatstyletypesgit+2 | 85/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/02-pattern-discovery.mdc · 399 | Cursor rules | stylearchgitdo-not+2 | 73/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/03-safe-ai-dlc.mdc · 399 | Cursor rules | styledo-not | 59/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/04-knowledge-vault.mdc · 399 | Cursor rules | stylegitapido-not | 73/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/10-backend-python.mdc · 399 | Cursor rules | testlint-formatstylegit+4 | 97/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/11-frontend-react.mdc · 399 | Cursor rules | buildstyletypessecurity+3 | 65/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/12-database-sql.mdc · 399 | Cursor rules | testtypesgitsecurity+3 | 69/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/13-testing.mdc · 399 | Cursor rules | teststyletesting-strategyapi+1 | 88/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/14-spec-creation.mdc · 399 | Cursor rules | teststylegitdo-not | 69/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/15-deployment.mdc · 399 | Cursor rules | setuptestgitsecurity+2 | 80/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/16-stripe-payments.mdc · 399 | Cursor rules | testdo-not | 61/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/20-agent-architect.mdc · 399 | Cursor rules | stylearchgit | 58/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/21-agent-backend.mdc · 399 | Cursor rules | testlint-formatstyleapi+1 | 85/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/22-agent-qas.mdc · 399 | Cursor rules | teststylesecurityagent-behaviour | 81/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/23-agent-security.mdc · 399 | Cursor rules | stylesecurity | 52/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/30-background-agents.mdc · 399 | Cursor rules | testlint-formatstylegit+1 | 74/100 | today | |
| bybren-llc/safe-agentic-workflow.cursor/rules/31-mcp-integration.mdc · 399 | Cursor rules | stylesecuritydo-notagent-behaviour | 61/100 | today | |
| bybren-llc/safe-agentic-workflowAGENTS.md · 399 | AGENTS.md | buildteststylearch+5 | 84/100 | today | |
| bybren-llc/safe-agentic-workflowCLAUDE.md · 399 | CLAUDE.md | buildtestlint-formatarch+6 | 91/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| google-gemini/gemini-cliGEMINI.md · 107k | GEMINI.md | setupbuildtestlint-format+6 | 91/100 | 14 days ago | |
| enuno/unifi-mcp-serverGEMINI.md · 226 | GEMINI.md | setuptestlint-formatstyle+8 | 89/100 | today | |
| compozy/gographGEMINI.md · 9 | GEMINI.md | setuptestlint-formatarch+4 | 86/100 | 14 days ago | |
| nordeim/misc1/GEMINI.md · 0 | GEMINI.md | setupbuildtestlint-format+3 | 81/100 | 14 days ago | |
| lepinkainen/hovimestariGEMINI.md · 0 | GEMINI.md | teststylearchtesting-strategy+1 | 81/100 | 14 days ago | |
| firebase/flutterfireGEMINI.md · 9.2k | GEMINI.md | lint-formatstylearchdo-not+1 | 80/100 | 14 days ago | |
| doubts-suplab/eeik-bootstrapGEMINI.md · 1 | GEMINI.md | teststylearchgit+2 | 80/100 | today | |
| lepinkainen/humanlogGEMINI.md · 0 | GEMINI.md | buildteststylearch+2 | 79/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/bybren-llc-safe-agentic-workflow-gemini-gemini)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.