[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82476":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":37,"readmeContent":38,"aiSummary":39,"trendingCount":16,"starSnapshotCount":16,"syncStatus":40,"lastSyncTime":41,"discoverSource":42},82476,"opengap","open-gitagent\u002Fopengap","open-gitagent","A framework-agnostic, git-native standard for defining AI agents","https:\u002F\u002Fgitagent.sh",null,"TypeScript",2807,337,15,9,0,10,12,14,30,29.59,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35,36],"agent","agent-framework","agent-skills","agents","assistant","claude-code","gitagent","open-standard","openclaw","skills","2026-06-12 02:04:26","\u003Cp align=\"center\">\n  \u003Cimg src=\"hero.png\" alt=\"OpenGAP — GitAgentProtocol (Open GAP)\" width=\"700\" \u002F>\n\u003C\u002Fp>\n\n# OpenGAP | your repository becomes your agent\n\n> **`opengap`** — the OpenGAP CLI, published as [`@open-gitagent\u002Fopengap`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@open-gitagent\u002Fopengap). Previously published as `@open-gitagent\u002Fgapman` and originally `@open-gitagent\u002Fgitagent`; the `gitagent` command is still installed as an alias for backward compatibility.\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@open-gitagent\u002Fopengap)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@open-gitagent\u002Fopengap)\n[![CI](https:\u002F\u002Fgithub.com\u002Fopen-gitagent\u002Fgitagent\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fopen-gitagent\u002Fgitagent\u002Factions\u002Fworkflows\u002Fci.yml)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Spec: v0.1.0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fspec-v0.1.0-blue)](https:\u002F\u002Fgithub.com\u002Fopen-gitagent\u002Fgitagent\u002Fblob\u002Fmain\u002Fspec\u002FSPECIFICATION.md)\n[![Node >= 18](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%3E%3D18-brightgreen)](https:\u002F\u002Fnodejs.org)\n\nOpenGAP (the Git Agent Protocol) is a framework-agnostic, git-native standard for defining AI agents. Clone a repo, get an agent. `opengap` is its reference CLI.\n\n## Why\n\nEvery AI framework has its own structure. There's no universal, portable way to define an agent that works across Claude Code, OpenAI, LangChain, CrewAI, and AutoGen. **gitagent** fixes that.\n\n- **Git-native** — Version control, branching, diffing, and collaboration built in\n- **Framework-agnostic** — Export to any framework with adapters\n- **Compliance-ready** — First-class support for FINRA, Federal Reserve, SEC, and segregation of duties\n- **Composable** — Agents can extend, depend on, and delegate to other agents\n\n## The Standard\n\nYour repository becomes your agent. Drop these files into any git repo and it becomes a portable, framework-agnostic agent definition — everything else (CLI, adapters, patterns) builds on top of it.\n\n```\nmy-agent\u002F\n│\n│   # ── Core Identity (required) ──────────────────────────\n├── agent.yaml              # Manifest — name, version, model, skills, tools, compliance\n├── SOUL.md                 # Identity, personality, communication style, values\n│\n│   # ── Behavior & Rules ──────────────────────────────────\n├── RULES.md                # Hard constraints, must-always\u002Fmust-never, safety boundaries\n├── DUTIES.md               # Segregation of duties policy and role boundaries\n├── AGENTS.md               # Framework-agnostic fallback instructions\n│\n│   # ── Capabilities ──────────────────────────────────────\n├── skills\u002F                 # Reusable capability modules (SKILL.md + scripts)\n│   └── code-review\u002F\n│       ├── SKILL.md\n│       └── review.sh\n├── tools\u002F                  # MCP-compatible tool definitions (YAML schemas)\n├── workflows\u002F              # Multi-step procedures\u002Fplaybooks\n│\n│   # ── Knowledge & Memory ────────────────────────────────\n├── knowledge\u002F              # Reference documents the agent can consult\n├── memory\u002F                 # Persistent cross-session memory\n│   └── runtime\u002F            # Live agent state (dailylog.md, context.md)\n│\n│   # ── Lifecycle & Ops ───────────────────────────────────\n├── hooks\u002F                  # Lifecycle event handlers (bootstrap.md, teardown.md)\n├── config\u002F                 # Environment-specific overrides\n├── compliance\u002F             # Regulatory compliance artifacts\n│\n│   # ── Composition ───────────────────────────────────────\n├── agents\u002F                 # Sub-agent definitions (recursive structure)\n│   └── fact-checker\u002F\n│       ├── agent.yaml\n│       ├── SOUL.md\n│       └── DUTIES.md       # This agent's role, permissions, boundaries\n├── examples\u002F               # Calibration interactions (few-shot)\n│\n│   # ── Runtime ───────────────────────────────────────────\n└── .gitagent\u002F              # Runtime state (gitignored)\n```\n\nOnly two files are required: **`agent.yaml`** (the manifest) and **`SOUL.md`** (the identity). Everything else is optional — add what you need, ignore the rest.\n\n## Patterns\n\nThese are the architectural patterns that emerge when you define agents as git-native file systems.\n\n### Human-in-the-Loop for RL Agents\nWhen an agent learns a new skill or writes to memory, it opens a branch + PR for human review before merging.\n\n\u003Cimg src=\"patterns\u002Fhuman-in-the-loop.png\" alt=\"Human-in-the-Loop\" width=\"600\" \u002F>\n\n### Segregation of Duties (SOD)\nNo single agent should control a critical process end-to-end. Define roles (`maker`, `checker`, `executor`, `auditor`), a conflict matrix (which roles can't be the same agent), and handoff workflows — all in `agent.yaml` + `DUTIES.md`. The validator catches violations before deployment.\n\n```yaml\ncompliance:\n  segregation_of_duties:\n    roles:\n      - id: maker\n        description: Creates proposals\n        permissions: [create, submit]\n      - id: checker\n        description: Reviews and approves\n        permissions: [review, approve, reject]\n    conflicts:\n      - [maker, checker]         # maker cannot approve own work\n    assignments:\n      loan-originator: [maker]\n      credit-reviewer: [checker]\n    handoffs:\n      - action: credit_decision\n        required_roles: [maker, checker]\n        approval_required: true\n    enforcement: strict\n```\n\n### Live Agent Memory\nThe `memory\u002F` folder holds a `runtime\u002F` subfolder where agents write live knowledge — `dailylog.md`, `key-decisions.md`, and `context.md` — persisting state across sessions.\n\n\u003Cimg src=\"patterns\u002Flive-agent-memory.png\" alt=\"Live Agent Memory\" width=\"600\" \u002F>\n\n### Agent Versioning\nEvery change to your agent is a git commit. Roll back broken prompts, revert bad skills, and explore past versions — full undo history for your agent.\n\n\u003Cimg src=\"patterns\u002Fagent-versioning.png\" alt=\"Agent Versioning\" width=\"600\" \u002F>\n\n### Shared Context & Skills via Monorepo\nRoot-level `context.md`, `skills\u002F`, `tools\u002F` are automatically shared across every agent in the monorepo. No duplication, one source of truth.\n\n\u003Cimg src=\"patterns\u002Fshared-context.png\" alt=\"Shared Context\" width=\"600\" \u002F>\n\n### Branch-based Deployment\nUse git branches (`dev` → `staging` → `main`) to promote agent changes through environments, just like shipping software.\n\n\u003Cimg src=\"patterns\u002Fbranch-deployment.png\" alt=\"Branch-based Deployment\" width=\"600\" \u002F>\n\n### Knowledge Tree\nThe `knowledge\u002F` folder stores entity relationships as a hierarchical tree with embeddings, letting agents reason over structured data at runtime.\n\n\u003Cimg src=\"patterns\u002Fknowledge-tree.png\" alt=\"Knowledge Tree\" width=\"600\" \u002F>\n\n### Agent Forking & Remixing\nFork any public agent repo, customize its `SOUL.md`, add your own skills, and PR improvements back upstream — open-source collaboration for AI agents.\n\n\u003Cimg src=\"patterns\u002Fagent-forking.png\" alt=\"Agent Forking & Remixing\" width=\"600\" \u002F>\n\n### CI\u002FCD for Agents\nRun `opengap validate` on every push via GitHub Actions. Test agent behavior in CI, block bad merges, and auto-deploy — treat agent quality like code quality.\n\n\u003Cimg src=\"patterns\u002Fci-cd-agents.png\" alt=\"CI\u002FCD for Agents\" width=\"600\" \u002F>\n\n### Agent Diff & Audit Trail\n`git diff` shows exactly what changed between agent versions. `git blame` traces every line to who wrote it and when — full traceability out of the box.\n\n\u003Cimg src=\"patterns\u002Fagent-diff-audit.png\" alt=\"Agent Diff & Audit Trail\" width=\"600\" \u002F>\n\n### Tagged Releases\nTag stable agent versions like `v1.1.0`. Pin production to a tag, canary new versions on staging, and roll back instantly if something breaks.\n\n\u003Cimg src=\"patterns\u002Ftagged-releases.png\" alt=\"Tagged Releases\" width=\"600\" \u002F>\n\n### Secret Management via .gitignore\nAgent tools that need API keys read from a local `.env` file — kept out of version control via `.gitignore`. Agent config is shareable, secrets stay local.\n\n\u003Cimg src=\"patterns\u002Fsecret-management.png\" alt=\"Secret Management\" width=\"600\" \u002F>\n\n### Agent Lifecycle with Hooks\nDefine `bootstrap.md` and `teardown.md` in the `hooks\u002F` folder to control what an agent does on startup and before it stops.\n\n\u003Cimg src=\"patterns\u002Fagent-automation-hooks.png\" alt=\"Agent Lifecycle Hooks\" width=\"600\" \u002F>\n\n### SkillsFlow\nDeterministic, multi-step workflows defined in `workflows\u002F` as YAML. Chain `skill:`, `agent:`, and `tool:` steps with `depends_on` ordering, `${{ }}` template data flow, and per-step `prompt:` overrides. Every run follows the same path — no LLM discretion on execution order.\n\n```yaml\nname: code-review-flow\ndescription: Full code review pipeline\ntriggers:\n  - pull_request\n\nsteps:\n  lint:\n    skill: static-analysis\n    inputs:\n      path: ${{ trigger.changed_files }}\n\n  review:\n    agent: code-reviewer\n    depends_on: [lint]\n    prompt: |\n      Focus on security and performance.\n      Flag any use of eval() or raw SQL.\n    inputs:\n      findings: ${{ steps.lint.outputs.issues }}\n\n  test:\n    tool: bash\n    depends_on: [lint]\n    inputs:\n      command: \"npm test -- --coverage\"\n\n  report:\n    skill: review-summary\n    depends_on: [review, test]\n    conditions:\n      - ${{ steps.review.outputs.severity != 'none' }}\n    inputs:\n      review: ${{ steps.review.outputs.comments }}\n      coverage: ${{ steps.test.outputs.report }}\n\nerror_handling:\n  on_failure: notify\n  channel: \"#eng-reviews\"\n```\n\n### Porting Framework Agents to GitAgent\n\nAgents built in frameworks like NVIDIA AIQ, LangGraph, or CrewAI have their identity split across config files, Jinja2 templates, and Python code. gitagent extracts the **identity layer** — prompts, rules, roles, tool schemas — into a portable, versionable format.\n\n> **What ports cleanly:** system prompts, persona definitions, hard constraints, tool schemas, role\u002FSOD policies, model preferences.\n>\n> **What stays in the framework:** runtime orchestration (state machines, graph wiring), live tool execution, memory I\u002FO, iterative loops.\n\nThis pattern is demonstrated with [NVIDIA's AIQ Deep Researcher](https:\u002F\u002Fgithub.com\u002FNVIDIA-AI-Blueprints\u002Faiq) — a 3-agent hierarchy (orchestrator → planner → researcher) that produces cited research reports. The gitagent version captures the agent's identity, rules, and SOD policy so you can:\n\n- **Fork for a new domain** — edit `SOUL.md` for legal\u002Fmedical\u002Ffinance research without touching Python\n- **Version prompts independently** — `git diff` when the orchestrator's style regresses\n- **Validate SOD** — `opengap validate --compliance` ensures the orchestrator can't also be the researcher\n- **Export to other runtimes** — same identity on Claude Code, OpenAI, or as a raw system prompt\n\n```\nexamples\u002Fnvidia-deep-researcher\u002F\n├── agent.yaml                  # Manifest + SOD policy\n├── SOUL.md                     # Orchestrator identity (from orchestrator.j2)\n├── RULES.md                    # Citation rules, report constraints\n├── DUTIES.md                   # Role separation: orchestrator ↔ planner ↔ researcher\n├── agents\u002Fplanner\u002F             # Planner sub-agent (from planner.j2)\n├── agents\u002Fresearcher\u002F          # Researcher sub-agent (from researcher.j2)\n├── skills\u002F{web,paper,knowledge}-search\u002F\n├── tools\u002F*.yaml                # MCP-compatible tool schemas\n└── config\u002F                     # Model assignments per environment\n```\n\nSee [`examples\u002Fnvidia-deep-researcher\u002F`](examples\u002Fnvidia-deep-researcher\u002F) for the full working example.\n\n## Quick Start\n\n```bash\n# Install\nnpm i -g @open-gitagent\u002Fopengap\n\n# Create a new agent\nopengap init --template standard\n\n# Validate\nopengap validate\n\n# View agent info\nopengap info\n\n# Export to system prompt\nopengap export --format system-prompt\n```\n\n> `gitagent` is installed as an alias — all `opengap \u003Ccmd>` calls work as `gitagent \u003Ccmd>` too.\n\n## agent.yaml\n\nThe only file with a strict schema. Minimal example:\n\n```yaml\nspec_version: \"0.1.0\"\nname: my-agent\nversion: 0.1.0\ndescription: A helpful assistant agent\n```\n\nFull example with compliance:\n\n```yaml\nspec_version: \"0.1.0\"\nname: compliance-analyst\nversion: 1.0.0\ndescription: Financial compliance analysis agent\nmodel:\n  preferred: claude-opus-4-6\ncompliance:\n  risk_tier: high\n  frameworks: [finra, federal_reserve, sec]\n  supervision:\n    human_in_the_loop: always\n    kill_switch: true\n  recordkeeping:\n    audit_logging: true\n    retention_period: 7y\n    immutable: true\n  model_risk:\n    validation_cadence: quarterly\n    ongoing_monitoring: true\n  segregation_of_duties:\n    roles:\n      - id: analyst\n        permissions: [create, submit]\n      - id: reviewer\n        permissions: [review, approve, reject]\n    conflicts:\n      - [analyst, reviewer]\n    assignments:\n      compliance-analyst: [analyst]\n      fact-checker: [reviewer]\n    enforcement: strict\n```\n\n## CLI Commands\n\nBoth `opengap` and `gitagent` refer to the same binary — use whichever you prefer.\n\n| Command | Description |\n|---------|-------------|\n| `opengap init [--template]` | Scaffold new agent (`minimal`, `standard`, `full`, `llm-wiki`) |\n| `opengap validate [--compliance]` | Validate against spec and regulatory requirements |\n| `opengap info` | Display agent summary |\n| `opengap export --format \u003Cfmt>` | Export to other formats (see adapters below) |\n| `opengap import --from \u003Cfmt> \u003Cpath>` | Import (`claude`, `cursor`, `crewai`, `opencode`) |\n| `opengap run \u003Csource> --adapter \u003Ca>` | Run an agent from a git repo or local directory |\n| `opengap install` | Resolve and install git-based dependencies |\n| `opengap audit` | Generate compliance audit report |\n| `opengap skills \u003Ccmd>` | Manage skills (`search`, `install`, `list`, `info`) |\n| `opengap lyzr \u003Ccmd>` | Manage Lyzr agents (`create`, `update`, `info`, `run`) |\n\n## Compliance\n\ngitagent has first-class support for financial regulatory compliance:\n\n### FINRA\n- **Rule 3110** — Supervision: human-in-the-loop, escalation triggers, kill switch\n- **Rule 4511** — Recordkeeping: immutable audit logs, retention periods, SEC 17a-4 compliance\n- **Rule 2210** — Communications: fair\u002Fbalanced enforcement, no misleading statements\n- **Reg Notice 24-09** — Existing rules apply to GenAI\u002FLLMs\n\n### Federal Reserve\n- **SR 11-7** — Model Risk Management: validation cadence, ongoing monitoring, outcomes analysis\n- **SR 23-4** — Third-Party Risk: vendor due diligence, SOC reports, subcontractor assessment\n\n### SEC \u002F CFPB\n- **Reg S-P** — Customer privacy, PII handling\n- **CFPB Circular 2022-03** — Explainable adverse action, Less Discriminatory Alternative search\n\n### Segregation of Duties\n- **Roles & Permissions** — Define maker, checker, executor, auditor roles with controlled permissions\n- **Conflict Matrix** — Declare which role pairs cannot be held by the same agent\n- **Handoff Workflows** — Require multi-agent participation for critical actions (credit decisions, regulatory filings)\n- **Isolation** — Full state and credential segregation between roles\n- **DUTIES.md** — Root-level policy + per-agent role declarations\n- **Enforcement** — Strict (blocks deployment) or advisory (warnings only)\n\nInspired by [Salient AI](https:\u002F\u002Fwww.trysalient.com\u002F)'s purpose-built agent architecture and the [FINOS AI Governance Framework](https:\u002F\u002Fair-governance-framework.finos.org\u002Fmitigations\u002Fmi-22_multi-agent-isolation-and-segmentation.html).\n\nRun `opengap audit` for a full compliance checklist against your agent configuration.\n\n## Adapters\n\nAdapters are used by both `export` and `run`. Available adapters:\n\n| Adapter | Description |\n|---------|-------------|\n| `system-prompt` | Concatenated system prompt (works with any LLM) |\n| `claude-code` | Claude Code compatible CLAUDE.md |\n| `openai` | OpenAI Agents SDK Python code |\n| `crewai` | CrewAI YAML configuration |\n| `lyzr` | Lyzr Studio agent |\n| `github` | GitHub Models inference |\n| `git` | Git-native execution (run only) |\n| `opencode` | OpenCode instructions + config |\n| `gemini` | Google Gemini CLI (GEMINI.md + settings.json) |\n| `openclaw` | OpenClaw format |\n| `nanobot` | Nanobot format |\n| `cursor` | Cursor `.cursor\u002Frules\u002F*.mdc` files |\n| `copilot` | GitHub Copilot instructions (export only) |\n| `codex` | OpenAI Codex CLI instructions (export only) |\n| `kiro` | Kiro agent format (export only) |\n| `gitclaw` | GitClaw agent format |\n\n```bash\n# Export to system prompt\nopengap export --format system-prompt\n\n# Run an agent directly\nopengap run .\u002Fmy-agent --adapter lyzr\n\n# Run an agent definition against a separate target workspace\nopengap run --dir .\u002Fagents\u002Freviewer --workspace ~\u002Fcode\u002Fmy-app --adapter claude -p \"Review this repository\"\n```\n\n## Inheritance & Composition\n\n```yaml\n# Extend a parent agent\nextends: https:\u002F\u002Fgithub.com\u002Forg\u002Fbase-agent.git\n\n# Compose with dependencies\ndependencies:\n  - name: fact-checker\n    source: https:\u002F\u002Fgithub.com\u002Forg\u002Ffact-checker.git\n    version: ^1.0.0\n    mount: agents\u002Ffact-checker\n```\n\n## Examples\n\nSee the `examples\u002F` directory:\n\n- **`examples\u002Fminimal\u002F`** — 2-file hello world (agent.yaml + SOUL.md)\n- **`examples\u002Fstandard\u002F`** — Code review agent with skills, tools, and rules\n- **`examples\u002Ffull\u002F`** — Production compliance agent with all directories, hooks, workflows, sub-agents, SOD with DUTIES.md, and regulatory artifacts\n- **`examples\u002Fgitagent-helper\u002F`** — Helper agent that assists with creating gitagent definitions\n- **`examples\u002Flyzr-agent\u002F`** — Example Lyzr Studio integration\n\n## Specification\n\nFull specification at [`spec\u002FSPECIFICATION.md`](spec\u002FSPECIFICATION.md).\n\nJSON Schemas for validation at `spec\u002Fschemas\u002F`.\n\n## Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=open-gitagent\u002Fopengap&type=Date)](https:\u002F\u002Fstar-history.com\u002F#open-gitagent\u002Fopengap&Date)\n\n## Built with gitagent?\n\nIf you've built an agent using gitagent, we'd love to hear about it! [Open a discussion](https:\u002F\u002Fgithub.com\u002Fopen-gitagent\u002Fgitagent\u002Fdiscussions) or add a `gitagent` topic to your repo.\n\n## License\n\nMIT\n","OpenGAP 是一个与框架无关的、基于Git的标准，用于定义AI代理。其核心功能包括通过简单的文件结构将任何Git仓库转换为可移植的AI代理定义，并支持版本控制、分支管理、差异比较和协作。技术特点方面，OpenGAP不仅兼容多种AI框架如Claude Code、OpenAI等，还提供了针对金融监管机构要求的安全性和合规性支持。此外，它允许代理之间相互扩展、依赖及委托任务，增强了系统的灵活性和复用性。适合于需要跨不同AI平台共享或迁移智能代理定义的企业级应用开发场景中使用。",2,"2026-06-11 04:08:43","high_star"]