Skip to content

feat: add SOD examples, DUTIES.md files, and README documentation#14

Merged
shreyas-lyzr merged 5 commits intoopen-gitagent:mainfrom
patel-lyzr:feat/sod-4-examples-docs
Feb 27, 2026
Merged

feat: add SOD examples, DUTIES.md files, and README documentation#14
shreyas-lyzr merged 5 commits intoopen-gitagent:mainfrom
patel-lyzr:feat/sod-4-examples-docs

Conversation

@patel-lyzr
Copy link
Contributor

Summary

Adds examples, documentation, and DUTIES.md files for the segregation of duties feature:

  • examples/full/agent.yaml: segregation_of_duties config with analyst, reviewer, and auditor roles, 3 conflict pairs, assignments, full isolation, 2 handoff workflows, strict enforcement
  • examples/full/DUTIES.md: Root-level SOD policy — roles table, conflict matrix, handoff workflows (regulatory filing, customer communication), isolation policy, enforcement mode
  • examples/full/agents/fact-checker/DUTIES.md: Per-agent role declaration — reviewer role with permissions, boundaries (must/must not), handoff participation, isolation constraints
  • examples/full/compliance/regulatory-map.yaml: duty_segregation capability mapping (FINOS AI Governance, FINRA 3110 SOD, SOC 2 logical access)
  • README.md: SOD pattern section with YAML example, updated directory tree showing DUTIES.md, compliance docs with Salient AI / FINOS attribution

Context

Part 4 of 4 for the SOD feature (#10). Depends on #13 (adapters).

Test plan

  • npm run build passes cleanly
  • node dist/index.js validate -d examples/full --compliance — full example validates with SOD
  • node dist/index.js audit -d examples/full — complete audit with SOD section
  • DUTIES.md files are well-structured and consistent with spec

PR Stack

  1. Spec + Schema + Types (feat: add segregation of duties schema, types, and spec #11)
  2. CLI support (feat: add SOD validation, audit reporting, and init scaffolding #12)
  3. Adapter support (feat: add SOD constraints to system-prompt and claude-code adapters #13)
  4. Examples + docs (this PR)

🤖 Generated with Claude Code

Add the `segregation_of_duties` subsection to the compliance schema with
support for roles, conflict matrix, assignments, isolation levels,
handoff workflows, and enforcement modes.

- JSON Schema definition in agent-yaml.schema.json
- TypeScript types in loader.ts ComplianceConfig interface
- Spec documentation including DUTIES.md convention, validation rules,
  and regulatory reference table

Closes open-gitagent#10 (part 1 of 4)
- validate.ts: 16 validation rules for SOD (role uniqueness, conflict
  detection, assignment integrity, handoff validation, risk tier checks)
- audit.ts: new "Segregation of Duties" section in audit report
- init.ts: DUTIES.md scaffolding in full template

Part 2 of 4 — depends on feat/sod-1-spec-schema
- system-prompt.ts: exports SOD role assignments, conflict rules,
  handoff requirements, isolation constraints, and DUTIES.md content
- claude-code.ts: includes SOD subsection in Compliance output and
  loads DUTIES.md into generated CLAUDE.md

Part 3 of 4 — depends on feat/sod-2-cli-commands
- examples/full/agent.yaml: segregation_of_duties config with analyst,
  reviewer, and auditor roles
- examples/full/DUTIES.md: root-level SOD policy (roles, conflicts,
  handoffs, isolation, enforcement)
- examples/full/agents/fact-checker/DUTIES.md: per-agent role declaration
- examples/full/compliance/regulatory-map.yaml: duty_segregation mapping
- README.md: SOD pattern section, updated directory tree, compliance docs

Part 4 of 4 — depends on feat/sod-3-adapters
Copy link
Contributor

@shreyas-lyzr shreyas-lyzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples and DUTIES.md files are well-written. A couple of things before this one merges:

  1. README changes should use our current directory tree format. The main README was recently restructured with grouped categories (Core Identity, Behavior & Rules, Capabilities, etc). Make sure the DUTIES.md addition fits into the "Behavior & Rules" group and uses the same comment style:

    │   # ── 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
    
  2. The Salient AI / FINOS attribution line in the Compliance section is a nice touch — good to credit the inspiration.

  3. The examples/full/ description update ("SOD with DUTIES.md") is clear.

Fix the tree format in README and this is good to merge.

Match the comment alignment style used by RULES.md and AGENTS.md
in the grouped category format.
@shreyas-lyzr shreyas-lyzr merged commit 8e01947 into open-gitagent:main Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants