-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspec-schema.json
More file actions
117 lines (117 loc) · 3.71 KB
/
spec-schema.json
File metadata and controls
117 lines (117 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SpecOps Spec Metadata",
"description": "Per-spec metadata file (spec.json) tracking lifecycle status, authorship, and review state",
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 100,
"pattern": "^[a-zA-Z0-9._-]+$",
"description": "Spec identifier matching the directory name"
},
"type": {
"type": "string",
"enum": ["feature", "bugfix", "refactor"],
"description": "Type of specification"
},
"status": {
"type": "string",
"enum": ["draft", "in-review", "approved", "self-approved", "implementing", "completed"],
"description": "Current lifecycle status"
},
"version": {
"type": "integer",
"minimum": 1,
"description": "Spec version, incremented on each revision round"
},
"created": {
"type": "string",
"maxLength": 30,
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(Z|[+-]\\d{2}:\\d{2})$",
"description": "ISO 8601 timestamp when the spec was first created"
},
"updated": {
"type": "string",
"maxLength": 30,
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(Z|[+-]\\d{2}:\\d{2})$",
"description": "ISO 8601 timestamp when spec.json was last modified"
},
"author": {
"type": "object",
"description": "Engineer who created the spec (populated from git config)",
"properties": {
"name": {
"type": "string",
"maxLength": 100
}
},
"required": ["name"],
"additionalProperties": false
},
"reviewers": {
"type": "array",
"maxItems": 20,
"description": "List of reviewers and their review status",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 100
},
"status": {
"type": "string",
"enum": ["pending", "approved", "changes-requested"]
},
"reviewedAt": {
"type": "string",
"maxLength": 30,
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(Z|[+-]\\d{2}:\\d{2})$",
"description": "ISO 8601 timestamp of the review"
},
"round": {
"type": "integer",
"minimum": 1,
"description": "Which review round this entry belongs to"
},
"selfApproval": {
"type": "boolean",
"description": "True when the reviewer is also the spec author (self-review)"
}
},
"required": ["name", "status"],
"additionalProperties": false
}
},
"specopsCreatedWith": {
"type": "string",
"maxLength": 20,
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
"description": "SpecOps version that created this spec. Set once at creation, never updated."
},
"specopsUpdatedWith": {
"type": "string",
"maxLength": 20,
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
"description": "SpecOps version that last modified this spec. Updated on every spec.json write."
},
"reviewRounds": {
"type": "integer",
"minimum": 0,
"description": "Current review iteration count"
},
"approvals": {
"type": "integer",
"minimum": 0,
"description": "Count of current-round approvals"
},
"requiredApprovals": {
"type": "integer",
"minimum": 0,
"description": "Number of approvals needed. Set to 0 when review is disabled, otherwise copied from config at creation time."
}
},
"required": ["id", "type", "status", "version", "created", "updated", "author"],
"additionalProperties": false
}