You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add segregation of duties schema, types, and spec
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#10 (part 1 of 4)
@@ -365,6 +408,30 @@ For regulated agents, RULES.md should include explicit regulatory constraints:
365
408
- Never transmit restricted data across jurisdictional boundaries
366
409
```
367
410
411
+
## 5a. DUTIES.md — Segregation of Duties
412
+
413
+
Declares the agent's duties, role boundaries, and the system-wide SOD policy. DUTIES.md exists at two levels:
414
+
415
+
**Root level** (`DUTIES.md`) — Documents the system-wide segregation of duties policy: all roles, the conflict matrix, handoff workflows, isolation policy, and enforcement mode. This is the SOD equivalent of `RULES.md` — it defines the policy that all agents in the system must follow.
416
+
417
+
**Per-agent level** (`agents/<name>/DUTIES.md`) — Declares this specific agent's role, permissions, boundaries, and handoff participation. Each sub-agent's DUTIES.md answers: what is my role, what can I do, what must I not do, and who do I hand off to.
418
+
419
+
### Root DUTIES.md Recommended Sections
420
+
421
+
-**Roles** — Table of all roles, assigned agents, and permissions
422
+
-**Conflict Matrix** — Which role pairs cannot be held by the same agent
423
+
-**Handoff Workflows** — Step-by-step handoff chains for critical actions
424
+
-**Isolation Policy** — State and credential isolation levels
425
+
-**Enforcement** — Strict vs advisory mode
426
+
427
+
### Per-Agent DUTIES.md Recommended Sections
428
+
429
+
-**Role** — This agent's assigned role
430
+
-**Permissions** — What actions this agent can take
431
+
-**Boundaries** — Must/must-not rules specific to this role
432
+
-**Handoff Participation** — Where this agent sits in handoff chains
433
+
-**Isolation** — This agent's isolation constraints
434
+
368
435
## 6. AGENTS.md — Framework-Agnostic Instructions
369
436
370
437
Provides fallback instructions compatible with Cursor, Copilot, and other tools that read `AGENTS.md`. This file supplements `agent.yaml` + `SOUL.md` for systems that don't understand the gitagent format.
@@ -864,6 +931,13 @@ A valid gitagent repository must:
864
931
5. All referenced tools must exist in `tools/`
865
932
6. All referenced sub-agents must exist in `agents/`
866
933
7. `hooks.yaml` scripts must exist at specified paths
934
+
8. If `compliance.segregation_of_duties` is present:
935
+
- `roles`must define at least 2 roles with unique IDs
936
+
- `conflicts`pairs must reference defined role IDs
937
+
- `assignments`must reference defined role IDs
938
+
- No agent in `assignments` may hold roles that appear together in `conflicts`
939
+
- `handoffs.required_roles`must reference defined role IDs and include at least 2
940
+
- Assigned agents should exist in the `agents` section
867
941
868
942
## 19. CLI Commands
869
943
@@ -942,6 +1016,15 @@ All schemas are in `spec/schemas/`:
942
1016
| SR 21-8 | BSA/AML Model Risk | `compliance.model_risk` for AML agents |
0 commit comments