1// Schema lifecycle: experimental | stable | deprecated
2@status("stable")
3package gemara
4
5@go(gemara)
6
7// Entity represents a human or tool
8#Entity: {
9 // id uniquely identifies the entity and allows this entry to be referenced by other elements
10 id: string
11
12 // name is the name of the entity
13 name: string
14
15 // type specifies the type of entity interacting in the workflow
16 type: #EntityType
17
18 // version is the version of the entity (for tools; if applicable)
19 version?: string
20
21 // description provides additional context about the entity
22 description?: string
23
24 // uri is a general URI for the entity information
25 uri?: =~"^https?://[^\\s]+$"
26}
27
28// Actor represents an entity (human or tool) that performs actions in evaluations
29#Actor: {
30 #Entity
31
32 // contact is contact information for the actor
33 contact?: #Contact @go(Contact)
34}
35
36// Resource represents an entity that exists in the system and can be evaluated
37#Resource: {
38 #Entity
39
40 // environment describes where the resource exists (e.g., production, staging, development, specific region)
41 environment?: string @go(Environment)
42
43 // owner is the contact information for the person or group responsible for managing or owning this resource
44 owner?: #Contact @go(Owner)
45}
46
47// EntityType specifies what entity is interacting in the workflow
48#EntityType: "Human" | "Software" | "Software Assisted" @go(-)
49
50// Contact is the contact information for a person or group
51#Contact: {
52 // name is the preferred descriptor for the contact entity
53 name: string
54
55 // affiliation is the organization with which the contact entity is associated, such as a team, school, or employer
56 affiliation?: string @go(Affiliation,type=*string)
57
58 // email is the preferred email address to reach the contact
59 email?: #Email @go(Email,type=*Email)
60
61 // social is a social media handle or other profile for the contact, such as GitHub
62 social?: string @go(Social,type=*string)
63}
64
65// Email represents a validated email address pattern
66#Email: =~"^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$"
67
68// RACI defines the roles responsible for managing an artifact
69#RACI: {
70 // responsible identifies the entities responsible for executing work to manage or mitigate the artifact
71 responsible: [#Contact, ...#Contact]
72
73 // accountable identifies the entity ultimately accountable for the outcome
74 accountable: [#Contact, ...#Contact]
75
76 // consulted identifies entities whose input is required when assessing or responding to the artifact
77 consulted?: [#Contact, ...#Contact]
78
79 // informed identifies entities that should be notified about changes to the artifact status
80 informed?: [#Contact, ...#Contact]
81}