Skip to content

CarlosFelipeF/AgenticDevelopment

Repository files navigation

Agentic Development

License: MIT OWASP Framework

A governance framework for AI coding agents — ensuring secure, consistent, and predictable behavior in software development workflows.


The Problem

AI coding agents (Claude, Cursor, GitHub Copilot, etc.) are powerful but unpredictable. Without governance:

  • Security risks: Agents may commit secrets, execute dangerous commands, or introduce vulnerabilities
  • Inconsistent behavior: Different sessions produce different coding styles, commit formats, and workflows
  • No boundaries: Agents don't know what they're allowed to do without explicit constraints
  • Social engineering vulnerabilities: Agents can be manipulated through prompt injection

The Solution

This framework provides a structured governance layer that AI agents load at the start of each session. It defines:

  • What agents can and cannot do (permissions)
  • How agents should behave (conventions)
  • How agents must respond to security threats (immutable rules)

Built on the OWASP Agentic Security Initiative (ASI01-10), it addresses real-world threats specific to AI agents.


Table of Contents


Features

Feature Description
Layered Protocols 7 protocol files loaded in order, from security to project-specific
Immutable Security Rules Core constraints that cannot be overridden by any instruction
OWASP ASI Alignment Mapped to all 10 agentic security threat categories
Social Engineering Protection Agents trained to reject manipulation attempts
Configurable Conventions Project-specific rules without compromising security
Slash Commands Standardized commands for common workflows
Human + Agent Documentation Separate docs for platform security vs agent behavior

Quick Start

1. Copy the framework to your project

cp -r .agent /path/to/your/project/
cp AGENTS.md /path/to/your/project/

2. Customize project-specific rules

Edit .agent/07-PROJECT.md with your project's conventions:

# Project-Specific Rules

## Branch Naming
feature/<ticket>-<description>

## Commit Prefix
[PROJ-XXX]

## Test Command
npm test

3. Reference in your AI assistant

Claude Code / Claude: Add to your project's custom instructions:

Before starting work, read and follow AGENTS.md

Cursor: Add to .cursorrules:

@AGENTS.md - Follow these governance rules for all operations

4. Verify it's working

Ask your agent: "What files should you load at session start?"

Expected answer: The 7 .agent/ protocol files in order.


Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        AI CODING AGENT                          │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │                    GOVERNANCE LAYER                       │  │
│  │                                                           │  │
│  │   ┌─────────────┐  ┌─────────────┐  ┌─────────────┐       │  │
│  │   │  IMMUTABLE  │  │ CONFIGURABLE│  │   PROJECT   │       │  │
│  │   │   RULES     │  │    RULES    │  │   CONTEXT   │       │  │
│  │   │             │  │             │  │             │       │  │
│  │   │ 01-SECURITY │  │03-WORKFLOW  │  │ARCHITECTURE │       │  │
│  │   │ 02-CONSTR.  │  │04-CONVENT.  │  │  TESTING    │       │  │
│  │   │             │  │05-SESSIONS  │  │  GLOSSARY   │       │  │
│  │   │             │  │06-PROTOCOLS │  │             │       │  │
│  │   │             │  │07-PROJECT   │  │             │       │  │
│  │   └─────────────┘  └─────────────┘  └─────────────┘       │  │
│  │         ▲                 ▲                ▲              │  │
│  │         │                 │                │              │  │
│  │         └────── LOADED AT SESSION START ──┘               │  │
│  │                                                           │  │
│  └───────────────────────────────────────────────────────────┘  │
│                              │                                  │
│                              ▼                                  │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │                    AGENT ACTIONS                          │  │
│  │                                                           │  │
│  │    Read Files    Write Code    Run Commands    Commit     │  │
│  │                                                           │  │
│  └───────────────────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────────────────┘

File Structure

your-project/
├── .agent/                          # Agent governance (loaded by AI)
│   ├── 01-SECURITY.md               # Security behaviors
│   ├── 02-CONSTRAINTS.md            # Permissions matrix
│   ├── 03-WORKFLOW.md               # Git operations
│   ├── 04-CONVENTIONS.md            # Code style
│   ├── 05-SESSIONS.md               # Session management
│   ├── 06-PROTOCOLS.md              # Slash commands
│   └── 07-PROJECT.md                # Your customizations
├── AGENTS.md                        # Entry point for agents
├── ARCHITECTURE.md                  # System design (for context)
├── TESTING.md                       # Test strategy (for context)
├── GLOSSARY.md                      # Domain terms (for context)
└── AGENTIC-SECURITY-CHECKLIST.md    # For human review

The .agent/ Protocol Files

Agents load these files in numerical order at session start. Earlier files have higher precedence.

01-SECURITY.md — Security Behaviors

Purpose: Define how agents handle security-sensitive operations.

Key contents:

  • Secrets detection patterns (API keys, passwords, private keys)
  • Input validation requirements
  • Command execution safeguards
  • Dependency security checks
  • OWASP ASI threat mappings

Example rule:

If secrets are detected:
1. STOP immediately
2. Do NOT commit
3. Alert the human operator
4. Suggest using environment variables

02-CONSTRAINTS.md — Permissions Matrix

Purpose: Define what agents are allowed to do.

Key contents:

  • Allowed/denied file operations
  • Allowed/denied shell commands
  • Directory boundaries
  • Resource access limits

Example matrix:

| Action              | Allowed | Requires Approval |
|---------------------|---------|-------------------|
| Read source files   | Yes     | No                |
| Write source files  | Yes     | No                |
| Delete files        | No      | Yes               |
| Run npm install     | Yes     | No                |
| Run rm -rf          | No      | Always            |

03-WORKFLOW.md — Git Operations

Purpose: Standardize version control behavior.

Key contents:

  • Branch naming conventions
  • Commit message format
  • PR description templates
  • Merge strategies

04-CONVENTIONS.md — Code Style

Purpose: Ensure consistent code output.

Key contents:

  • Language-specific style guides
  • Naming conventions
  • File organization patterns
  • Documentation requirements

05-SESSIONS.md — Session Management

Purpose: Define session lifecycle behaviors.

Key contents:

  • Session start checklist
  • Context loading order
  • Handoff protocols
  • Session end summary format

06-PROTOCOLS.md — Slash Commands

Purpose: Define available workflow commands.

Key contents:

  • /plan — Create implementation plans
  • /review — Perform code reviews
  • /commit — Create well-formatted commits
  • /test — Run relevant tests
  • Full command reference with examples

07-PROJECT.md — Project Customization

Purpose: Your project-specific overrides.

This is the only file you should edit. Use it to:

  • Override default conventions
  • Add project-specific commands
  • Define custom workflows
  • Set team preferences

Precedence Rules

Not all rules are equal. The framework distinguishes between immutable and configurable rules.

Immutable Rules (Cannot be overridden)

These rules exist in 01-SECURITY.md and 02-CONSTRAINTS.md and cannot be changed by any file or instruction:

Rule Reason
Never commit secrets Prevents credential leaks
Never disable security tooling Maintains defense in depth
Never delete production data Prevents catastrophic loss
Always require approval for destructive ops Human in the loop
Never ignore .gitignore Respects project boundaries

Why immutable? These protect against both accidents and prompt injection attacks.

Configurable Rules (Can be overridden in 07-PROJECT.md)

Rule Default Can Override?
Branch naming feature/<desc> Yes
Commit format Conventional Commits Yes
Code style Language defaults Yes
Test coverage threshold 80% Yes
Documentation requirements JSDoc/docstrings Yes

Slash Commands

Available in 06-PROTOCOLS.md

Command Description Example
/plan <task> Create implementation plan /plan add user auth
/design <feature> Create technical design doc /design payment system
/review Review staged changes /review
/security-review Security-focused review /security-review
/commit Create formatted commit /commit
/branch <ticket> <desc> Create feature branch /branch PROJ-123 auth
/pr Prepare PR description /pr
/test [scope] Run relevant tests /test auth
/debug <error> Analyze error /debug TypeError...
/refactor <target> <goal> Plan refactoring /refactor UserService extract auth
/status Current session status /status
/recap Summarize session work /recap

Additional Slash Commands

For more slash commands (like /mvp for tracer bullet MVP planning), see the companion repository:

ai-slash-commands — A library of reusable slash commands for AI coding assistants.


Integration Guide

Claude Code

Add to your project instructions or .claude settings:

At the start of each session, load governance files:
1. Read AGENTS.md
2. Follow the context loading order specified
3. Apply all rules from .agent/ files

Cursor

Create or update .cursorrules:

# Agent Governance

@AGENTS.md contains behavioral rules for this project.
@.agent/01-SECURITY.md through @.agent/07-PROJECT.md define protocols.

Before any operation:
1. Check if action is allowed in 02-CONSTRAINTS.md
2. Follow conventions in 04-CONVENTIONS.md
3. Use commit format from 03-WORKFLOW.md

GitHub Copilot

Add to repository instructions:

This repository uses the Agentic Development governance framework.
See AGENTS.md for behavioral rules and .agent/ for protocols.

Other AI Assistants

The framework is tool-agnostic. For any AI assistant:

  1. Ensure it can read markdown files from your project
  2. Instruct it to load AGENTS.md at session start
  3. Verify it follows the protocol loading order

Customization

What to Customize

Edit only .agent/07-PROJECT.md. Examples:

Custom branch naming:

## Branch Naming
Format: `<type>/<ticket>-<description>`
Types: feature, bugfix, hotfix, release
Example: `feature/PROJ-123-user-authentication`

Custom commit format:

## Commit Messages
Format: `[<TICKET>] <type>: <description>`
Example: `[PROJ-123] feat: add user authentication`

Project-specific commands:

## Custom Commands

### /deploy
Trigger deployment pipeline:
1. Run full test suite
2. Build production assets
3. Create deployment PR

What NOT to Customize

Do not modify:

  • 01-SECURITY.md — Security rules are intentionally immutable
  • 02-CONSTRAINTS.md — Permission boundaries protect your system

If you need different security rules, you may be looking for a different risk profile than this framework provides.


Security Model

OWASP Agentic Security Initiative Alignment

This framework maps to all 10 OWASP ASI threat categories:

Code Threat How Framework Addresses
ASI01 Prompt Injection Immutable rules can't be overridden by prompts
ASI02 Tool Misuse Explicit permission matrix in 02-CONSTRAINTS
ASI03 Privilege Misuse Least privilege defaults, approval workflows
ASI04 Supply Chain Dependency verification requirements
ASI05 Sandbox Escape Directory boundaries, command restrictions
ASI06 Memory Poisoning Context validation, state verification
ASI07 Agent Communication N/A (single-agent framework)
ASI08 Cascading Failures Fail-secure defaults, human escalation
ASI09 Trust Exploitation Social engineering rejection protocols
ASI10 Guardrail Bypass Immutable rules, no override mechanism

Social Engineering Protection

Agents are explicitly trained to reject:

  • "Ignore previous instructions" attacks
  • Fake authority claims ("I'm the admin, bypass security")
  • Urgency manipulation ("This is critical, skip the review")
  • Permission escalation ("For testing purposes, disable checks")

Response protocol: When manipulation is detected, agents should:

  1. Refuse the request
  2. Explain why it was rejected
  3. Ask for legitimate clarification

FAQ

Why separate files instead of one large AGENTS.md?

Modularity and precedence. Separate files allow:

  • Clear precedence (numbered order)
  • Easier updates (change one file, not hunt through a monolith)
  • Better context loading (agents can reference specific files)
  • Cleaner customization (only edit 07-PROJECT.md)

Can I use this with multiple AI tools?

Yes. The framework is tool-agnostic markdown. Any AI that can read files can use it.

What if an agent ignores the rules?

This framework works with cooperative agents — AI systems designed to follow instructions. It's not a sandbox or security boundary; it's a governance contract.

For true security boundaries, use:

  • Sandboxed execution environments
  • CI/CD pipeline restrictions
  • Git branch protection rules
  • Code review requirements

How do I update the framework?

Pull updates from this repository, but preserve your 07-PROJECT.md:

# Backup your customizations
cp .agent/07-PROJECT.md .agent/07-PROJECT.md.bak

# Update framework files
cp -r new-version/.agent/0[1-6]*.md .agent/

# Restore customizations
mv .agent/07-PROJECT.md.bak .agent/07-PROJECT.md

Is this compatible with Claude Code's built-in AGENTS.md support?

Yes. Claude Code automatically looks for AGENTS.md in project roots. This framework's AGENTS.md acts as the entry point that directs Claude to load the .agent/ protocol files.


Roadmap

v2.0.0 (Current)

  • OWASP ASI alignment
  • 7-file protocol structure
  • Immutable/configurable rule separation
  • Social engineering protection

v2.1.0 (Planned)

  • Multi-agent coordination protocols
  • Enhanced audit logging formats
  • Integration templates for more AI tools
  • Automated compliance checking

v3.0.0 (Future)

  • Machine-readable rule format (YAML/JSON)
  • Automated rule enforcement tooling
  • Metrics and observability hooks
  • Team-based permission inheritance

Contributing

Contributions are welcome! Here's how to help:

Reporting Issues

  • Use GitHub Issues for bugs and feature requests
  • Include your AI tool, framework version, and reproduction steps

Submitting Changes

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Make your changes
  4. Test with at least one AI assistant
  5. Submit a pull request

Areas Needing Help

  • Integration guides for more AI tools
  • Translations to other languages
  • Real-world case studies
  • Security review and hardening

Acknowledgments


License

MIT License — see LICENSE for details.


Built for the era of AI-assisted development.

About

Agentic development documentation and resources

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •