feat: add SOD examples, DUTIES.md files, and README documentation#14
Merged
shreyas-lyzr merged 5 commits intoopen-gitagent:mainfrom Feb 27, 2026
Merged
Conversation
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
76ff2db to
877c6ef
Compare
Contributor
shreyas-lyzr
left a comment
There was a problem hiding this comment.
Examples and DUTIES.md files are well-written. A couple of things before this one merges:
-
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 -
The Salient AI / FINOS attribution line in the Compliance section is a nice touch — good to credit the inspiration.
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds examples, documentation, and DUTIES.md files for the segregation of duties feature:
segregation_of_dutiesconfig with analyst, reviewer, and auditor roles, 3 conflict pairs, assignments, full isolation, 2 handoff workflows, strict enforcementduty_segregationcapability mapping (FINOS AI Governance, FINRA 3110 SOD, SOC 2 logical access)Context
Part 4 of 4 for the SOD feature (#10). Depends on #13 (adapters).
Test plan
npm run buildpasses cleanlynode dist/index.js validate -d examples/full --compliance— full example validates with SODnode dist/index.js audit -d examples/full— complete audit with SOD sectionPR Stack
🤖 Generated with Claude Code