# document-review

Adopt this skill: https://proskills.md/skills/compliance/open-gitagent-opengap-examples-full-skills-document-review

Page: https://proskills.md/skills/compliance/open-gitagent-opengap-examples-full-skills-document-review
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: examples/full/skills/document-review/SKILL.md
size: 2056
sha: 9b8192faf55e965b0e41567443f34c888952f768
upstream: https://github.com/open-gitagent/opengap/blob/main/examples/full/skills/document-review/SKILL.md

````text
---
name: document-review
description: "Reviews financial documents (prospectuses, ADVs, marketing materials) for FINRA 2210 compliance, required disclosures, and balanced presentation. Use when reviewing financial statements, audit documents, regulatory filings, or when the user mentions compliance checks, financial audits, or document verification."
license: proprietary
allowed-tools: search-regulations generate-report
metadata:
  author: gitagent-examples
  version: "1.0.0"
  category: compliance
  risk_tier: high
---

# Document Review

## Instructions
When reviewing a financial document:

1. **Classify the document** — Determine document type (prospectus, ADV, customer agreement, marketing material, etc.)
2. **Identify applicable rules** — Map to FINRA 2210 (communications), SEC disclosure requirements, etc.
3. **Check required elements** — Verify all required disclosures, disclaimers, and content are present
4. **Assess accuracy** — Flag potentially misleading, exaggerated, or promissory statements
5. **Check balance** — Per FINRA 2210, ensure risks and benefits are presented in a balanced manner
6. **Review formatting** — Verify required prominence of disclosures

## Key Checks
- [ ] All required disclosures present
- [ ] No misleading or exaggerated claims
- [ ] Balanced presentation of risks and benefits
- [ ] Proper disclaimers included
- [ ] Correct classification (correspondence/retail/institutional)
- [ ] Principal pre-approval status verified (if retail communication)

## Output Format

For each finding, produce:

```
### [SEVERITY] — [Rule Reference]
- **Issue**: [What was found]
- **Location**: [Section/page reference]
- **Recommended action**: [Specific fix]
```

### Example Finding

```
### WARNING — FINRA 2210(d)(1)(A)
- **Issue**: Performance claim "consistently outperforms the market" lacks supporting data and time period
- **Location**: Page 2, paragraph 3
- **Recommended action**: Add specific time period, benchmark comparison, and standardized performance data per SEC Rule 482
```
````

## File: README.md
upstream: https://github.com/open-gitagent/opengap/blob/main/README.md

````text
<p align="center">
  <img src="hero.png" alt="OpenGAP — GitAgentProtocol (Open GAP)" width="700" />
</p>

# OpenGAP | your repository becomes your agent

> **`opengap`** — the OpenGAP CLI, published as [`@open-gitagent/opengap`](https://www.npmjs.com/package/@open-gitagent/opengap). Previously published as `@open-gitagent/gapman` and originally `@open-gitagent/gitagent`; the `gitagent` command is still installed as an alias for backward compatibility.

[![npm version](https://img.shields.io/npm/v/@open-gitagent/opengap)](https://www.npmjs.com/package/@open-gitagent/opengap)
[![CI](https://github.com/open-gitagent/gitagent/actions/workflows/ci.yml/badge.svg)](https://github.com/open-gitagent/gitagent/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Spec: v0.1.0](https://img.shields.io/badge/spec-v0.1.0-blue)](https://github.com/open-gitagent/gitagent/blob/main/spec/SPECIFICATION.md)
[![Node >= 18](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)

OpenGAP (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.

## Why

Every 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.

- **Git-native** — Version control, branching, diffing, and collaboration built in
- **Framework-agnostic** — Export to any framework with adapters
- **Compliance-ready** — First-class support for FINRA, Federal Reserve, SEC, and segregation of duties
- **Composable** — Agents can extend, depend on, and delegate to other agents

## The Standard

Your 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.

```
my-agent/
│
│   # ── Core Identity (required) ──────────────────────────
├── agent.yaml              # Manifest — name, version, model, skills, tools, compliance
├── SOUL.md                 # Identity, personality, communication style, values
│
│   # ── Behavior & Rules ──────────────────────────────────
├── RULES.md                # Hard constraints, must-always/must-never, safety boundaries
├── DUTIES.md               # Segregation of duties policy and role boundaries
├── AGENTS.md               # Framework-agnostic fallback instructions
│
│   # ── Capabilities ──────────────────────────────────────
├── skills/                 # Reusable capability modules (SKILL.md + scripts)
│   └── code-review/
│       ├── SKILL.md
│       └── review.sh
├── tools/                  # MCP-compatible tool definitions (YAML schemas)
├── workflows/              # Multi-step procedures/playbooks
│
│   # ── Knowledge & Memory ────────────────────────────────
├── knowledge/              # Reference documents the agent can consult
├── memory/                 # Persistent cross-session memory
│   └── runtime/            # Live agent state (dailylog.md, context.md)
│
│   # ── Lifecycle & Ops ───────────────────────────────────
├── hooks/                  # Lifecycle event handlers (bootstrap.md, teardown.md)
├── config/                 # Environment-specific overrides
├── compliance/             # Regulatory compliance artifacts
│
│   # ── Composition ───────────────────────────────────────
├── agents/                 # Sub-agent definitions (recursive structure)
│   └── fact-checker/
│       ├── agent.yaml
│       ├── SOUL.md
│       └── DUTIES.md       # This agent's role, permissions, boundaries
├── examples/               # Calibration interactions (few-shot)
│
│   # ── Runtime ───────────────────────────────────────────
└── .gitagent/              # Runtime state (gitignored)
```

Only two files are required: **`agent.yaml`** (the manifest) and **`SOUL.md`** (the identity). Everything else is optional — add what you need, ignore the rest.

## Patterns

These are the architectural patterns that emerge when you define agents as git-native file systems.

### Human-in-the-Loop for RL Agents
When an agent learns a new skill or writes to memory, it opens a branch + PR for human review before merging.

<img src="patterns/human-in-the-loop.png" alt="Human-in-the-Loop" width="600" />

### Segregation of Duties (SOD)
No 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.

```yaml
compliance:
  segregation_of_duties:
    roles:
      - id: maker
        description: Creates proposals
        permissions: [create, submit]
      - id: checker
        description: Reviews and approves
        permissions: [review, approve, reject]
    conflicts:
      - [maker, checker]         # maker cannot approve own work
    assignments:
      loan-originator: [maker]
      credit-reviewer: [checker]
    handoffs:
      - action: credit_decision
        required_roles: [maker, checker]
        approval_required: true
    enforcement: strict
```

### Live Agent Memory
The `memory/` folder holds a `runtime/` subfolder where agents write live knowledge — `dailylog.md`, `key-decisions.md`, and `context.md` — persisting state across sessions.

<img src="patterns/live-agent-memory.png" alt="Live Agent Memory" width="600" />

### Agent Versioning
Every 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.

<img src="patterns/agent-versioning.png" alt="Agent Versioning" width="600" />

### Shared Context & Skills via Monorepo
Root-level `context.md`, `skills/`, `tools/` are automatically shared across every agent in the monorepo. No duplication, one source of truth.

<img src="patterns/shared-context.png" alt="Shared Context" width="600" />

### Branch-based Deployment
Use git branches (`dev` → `staging` → `main`) to promote agent changes through environments, just like shipping software.

<img src="patterns/branch-deployment.png" alt="Branch-based Deployment" width="600" />

### Knowledge Tree
The `knowledge/` folder stores entity relationships as a hierarchical tree with embeddings, letting agents reason over structured data at runtime.

<img src="patterns/knowledge-tree.png" alt="Knowledge Tree" width="600" />

### Agent Forking & Remixing
Fork any public agent repo, customize its `SOUL.md`, add your own skills, and PR improvements back upstream — open-source collaboration for AI agents.

<img src="patterns/agent-forking.png" alt="Agent Forking & Remixing" width="600" />

### CI/CD for Agents
Run `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.

<img src="patterns/ci-cd-agents.png" alt="CI/CD for Agents" width="600" />

### Agent Diff & Audit Trail
`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.

<img src="patterns/agent-diff-audit.png" alt="Agent Diff & Audit Trail" width="600" />

### Tagged Releases
Tag stable agent versions like `v1.1.0`. Pin production to a tag, canary new versions on staging, and roll back instantly if something breaks.

<img src="patterns/tagged-releases.png" alt="Tagged Releases" width="600" />

### Secret Management via .gitignore
Agent 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.

<img src="patterns/secret-management.png" alt="Secret Management" width="600" />

### Agent Lifecycle with Hooks
Define `bootstrap.md` and `teardown.md` in the `hooks/` folder to control what an agent does on sta
````
