Skip to content

feat: add segregation of duties schema, types, and spec#11

Merged
shreyas-lyzr merged 1 commit intoopen-gitagent:mainfrom
patel-lyzr:feat/sod-1-spec-schema
Feb 27, 2026
Merged

feat: add segregation of duties schema, types, and spec#11
shreyas-lyzr merged 1 commit intoopen-gitagent:mainfrom
patel-lyzr:feat/sod-1-spec-schema

Conversation

@patel-lyzr
Copy link
Contributor

Summary

Adds the segregation_of_duties subsection to the gitagent compliance schema — a new spec-level concept for enforcing that no single agent controls a critical process end-to-end.

  • JSON Schema (agent-yaml.schema.json): Full segregation_of_duties_config definition with roles (id, description, permissions), conflicts (2-tuples), assignments (agent→roles mapping), isolation (state/credentials enums), handoffs (action + required_roles + approval), and enforcement (strict/advisory)
  • TypeScript types (loader.ts): segregation_of_duties added to ComplianceConfig interface
  • Specification (SPECIFICATION.md): DUTIES.md convention (root + per-agent levels), SOD YAML documentation, validation rule Welcome to gitagent — introduce yourself and your use case #8, regulatory reference table (FINOS, SOC 2, SR 11-7, FINRA 3110)

Context

Inspired by Salient AI's purpose-built agent architecture (each agent scoped to one duty in the lending lifecycle) and the FINOS AI Governance Framework's multi-agent isolation controls.

Closes #10 (part 1 of 4)

Test plan

  • npm run build passes cleanly
  • Review schema validates correctly against example agents
  • Spec documentation is clear and complete

PR Stack

This is PR 1 of 4 for the SOD feature:

  1. Spec + Schema + Types (this PR)
  2. CLI support (validate, audit, init)
  3. Adapter support (system-prompt, claude-code)
  4. Examples + docs (examples/full/, README)

🤖 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)
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.

Nice work splitting this into a proper PR stack — much easier to review.

This PR (spec + schema + types) looks solid:

  • Schema design is clean — roles, conflicts, assignments, isolation, handoffs, enforcement all make sense as separate concerns
  • The permissions enum (create, submit, review, approve, reject, execute, audit, report) covers the maker-checker-executor-auditor pattern well
  • DUTIES.md at two levels (root policy + per-agent declaration) is a smart design choice — mirrors how RULES.md works
  • Validation rule #8 in the spec is well-defined with clear constraints
  • Regulatory reference table (FINOS, SOC 2, SR 11-7, FINRA 3110) adds credibility

One minor thing: the DUTIES.md line in the directory structure tree has extra spaces vs the other entries — cosmetic but worth fixing:

├── DUTIES.md                 # (3 extra spaces vs other lines)

Approving — this is ready to merge. The rest of the stack depends on it so let's get this in.

@shreyas-lyzr shreyas-lyzr merged commit 106dcd2 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.

feat: Add Segregation of Duties (SOD) to compliance schema

2 participants