agentleFS
myshra777-aimyshra777-ai/garuda/.cursor/rules/garuda-talon.mdc

garuda / rules

Cursor rule4 starsChanged 13 days agoApache-2.0View on GitHub

Garuda Talon Active Architectural & ADR Enforcement Contract

The file

We split this garuda-talon.mdc into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    BEFORE editing any file or symbol: Call MCP tool garuda.talon_pre_edit with the target file or symbol name to inspect its callers, layer …

    line 19
  2. Very specific:

    IMMEDIATELY AFTER editing any file: Call MCP tool garuda.talon_verify_edit to verify 0 net-new policy & ADR violations.

    line 21
  3. Very specific:

    ON BLOCK VERDICT: Follow the self_repair_instructions in the verdict immediately and re-run garuda.talon_verify_edit until ALLOW is …

    line 22

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
garuda-talon.mdc
---
description: Garuda Talon Active Architectural & ADR Enforcement Contract
globs: ["**/*"]
alwaysApply: true
---

# GARUDA TALON — ACTIVE ARCHITECTURAL CONTRACT

- **Workspace**: `go-validation-10` (`0c915bfa-afb0-4351-9108-ebf0e56e64a9`)
- **Graph Scale**: 3301 AST entities | 13632 verified edges
- **Build Receipt**: `lang=go platform=linux/amd64 cgo=off tags=[none] commit=uncommitted graph_fp=c495d231048d`
- **Reproduce Command**: `GOOS=linux GOARCH=amd64 CGO_ENABLED=0 garuda check --target linux/amd64 --cgo=false --workspace go-validation-10`
- **Enforcement Mode**: `ACTIVE (FAIL-CLOSED)`

## 1. Mandatory Agent Execution Protocol (Non-Negotiable)

You are operating inside a **Garuda Talon Enforced Workspace**. Every code change is verified against the AST call graph, ingested Architecture Decision Records (ADRs), and declarative YAML policies before completion:

1. **BEFORE editing any file or symbol**: Call MCP tool `garuda.talon_pre_edit` with the target file or symbol name to inspect its callers, layer boundaries, and ADR rules.
2. **WHILE writing code**: Respect all `MUST` / `MUST_NOT` ADR rules and YAML architectural policies listed below.
3. **IMMEDIATELY AFTER editing any file**: Call MCP tool `garuda.talon_verify_edit` to verify 0 net-new policy & ADR violations.
4. **ON `BLOCK` VERDICT**: Follow the `self_repair_instructions` in the verdict immediately and re-run `garuda.talon_verify_edit` until `ALLOW` is returned.

## 2. Active Declarative Policy Guardrails

- **`[WARN]` API handlers must not bypass store layer to access database/sql directly or transitively** (`architecture-no-api-to-store-bypass`, predicates: `verification_missing`): API handlers must not bypass store layer to access database/sql directly or transitively
- **`[WARN]` Exported payment handlers must have runtime evidence** (`require-runtime-evidence-for-exported`, predicates: `verification_missing`): Exported payment handlers must have runtime evidence
- **`[WARN]` Exported functions should have runtime evidence** (`warn-missing-runtime`, predicates: `verification_missing`): Exported function has no runtime evidence. Consider adding a smoke test or re-running OTel ingestion.

## 3. Ingested ADR & Documentation Claims (`document_claims`)

- **`[MUST_NOT]`** `HandleDashboard` **MUST_NOT CALLS** `DirectBankAPI` *(source: ADR-0004: Zero-Trust Agent Execution & Pre-Edit Gate, current status: SUPPORTED)*
- **`[MUST_NOT]`** `RefundHandler` **MUST_NOT CALLS** `DirectBankAPI` *(source: ADR 0001: Payment Refund Processing, current status: UNVERIFIED)*
- **`[MUST]`** `AppendLeafAndSealTx` **MUST IDEMPOTENT** `IdempotencyKey` *(source: ADR-0004: Zero-Trust Agent Execution & Pre-Edit Gate, current status: UNVERIFIED)*
- **`[MUST]`** `RefundHandler` **MUST CALLS** `IdempotencyStore` *(source: ADR 0001: Payment Refund Processing, current status: UNVERIFIED)*
- **`[MUST]`** `RefundHandler` **MUST IDEMPOTENT** `IdempotencyKey` *(source: ADR 0001: Payment Refund Processing, current status: UNVERIFIED)*
- **`[MUST]`** `RunGuard` **MUST CALLS** `CompileContract` *(source: ADR-0004: Zero-Trust Agent Execution & Pre-Edit Gate, current status: SUPPORTED)*

## 4. High-Blast-Radius Architectural Hubs

- **`github.com/myshra777-ai/garuda/internal/store.Pool`** (method, 102 inbound edges) — `internal/store/postgres.go`
- **`github.com/myshra777-ai/garuda/cmd/garuda-mcp.safePool`** (method, 64 inbound edges) — `cmd/garuda-mcp/tools_common.go`
- **`github.com/myshra777-ai/garuda/cmd/garuda-mcp.resolveTenantAndWorkspace`** (method, 52 inbound edges) — `cmd/garuda-mcp/tools_governance.go`
- **`github.com/myshra777-ai/garuda/cmd/garuda-mcp.resolveMCPWorkspaceName`** (method, 43 inbound edges) — `cmd/garuda-mcp/tools_audit.go`
- **`github.com/myshra777-ai/garuda/internal/api.Valid`** (method, 40 inbound edges) — `internal/api/generated.go`
- **`github.com/myshra777-ai/garuda/internal/types.Evidence`** (struct, 34 inbound edges) — `internal/types/types.go`
- **`github.com/myshra777-ai/garuda/internal/api.RespondWithError`** (method, 33 inbound edges) — `internal/api/error.go`
- **`github.com/myshra777-ai/garuda/cmd/garuda-mcp.sanitizeMCPFilePath`** (function, 24 inbound edges) — `cmd/garuda-mcp/tools_semantic.go`
- **`github.com/myshra777-ai/garuda/internal/api.applyEditors`** (method, 22 inbound edges) — `internal/api/generated.go`
- **`github.com/myshra777-ai/garuda/internal/api.applySecurityHeaders`** (function, 22 inbound edges) — `internal/api/dashboard_handlers.go`

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.