handoff-check 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +60 -20
- package/dist/cli.js +639 -132
- package/docs/agent-integration.md +4 -4
- package/docs/architecture.md +12 -0
- package/docs/decisions/0006-project-profiles-and-reports.md +87 -0
- package/docs/decisions/0007-snapshot-diff-and-guided-setup.md +26 -0
- package/docs/development-plan.md +16 -2
- package/docs/explainability.md +7 -7
- package/docs/first-check.md +6 -6
- package/docs/lifecycle.md +6 -6
- package/docs/project-context.md +120 -0
- package/docs/releasing.md +4 -4
- package/docs/roadmap.md +7 -0
- package/docs/snapshot-diff-and-setup.md +74 -0
- package/examples/project-profiles/config.json +15 -0
- package/examples/project-profiles/constraints.json +27 -0
- package/examples/project-profiles/production.json +34 -0
- package/examples/project-profiles/staging.json +20 -0
- package/package.json +1 -1
- package/schemas/config.v2.schema.json +55 -0
- package/schemas/constraints.v3.schema.json +78 -0
- package/schemas/diff.v1.schema.json +121 -0
- package/schemas/handoff.v4.schema.json +193 -0
- package/schemas/report.v1.schema.json +168 -0
- package/skills/handoff-check/SKILL.md +35 -5
package/package.json
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Handoff Check explicit project/profile config v2",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["schemaVersion"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": {
|
|
9
|
+
"const": 2
|
|
10
|
+
},
|
|
11
|
+
"constraints": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "\\S"
|
|
14
|
+
},
|
|
15
|
+
"handoff": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "\\S"
|
|
18
|
+
},
|
|
19
|
+
"scope": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
22
|
+
},
|
|
23
|
+
"projectId": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
26
|
+
},
|
|
27
|
+
"profiles": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"minProperties": 1,
|
|
30
|
+
"propertyNames": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["scope"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"scope": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
42
|
+
},
|
|
43
|
+
"constraints": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"pattern": "\\S"
|
|
46
|
+
},
|
|
47
|
+
"handoff": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "\\S"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Handoff Check project-bound manifest v3",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["schemaVersion", "constraints", "projectId"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": {
|
|
9
|
+
"const": 3
|
|
10
|
+
},
|
|
11
|
+
"constraints": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"$ref": "#/$defs/constraint"
|
|
15
|
+
},
|
|
16
|
+
"description": "IDs must be unique. Replacement references must exist, share scope, and form an acyclic graph; these checks are enforced by the CLI."
|
|
17
|
+
},
|
|
18
|
+
"projectId": {
|
|
19
|
+
"$ref": "#/$defs/identifier"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"$defs": {
|
|
23
|
+
"identifier": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
26
|
+
},
|
|
27
|
+
"text": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "\\S"
|
|
30
|
+
},
|
|
31
|
+
"timestamp": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"format": "date-time",
|
|
34
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,3})?Z$",
|
|
35
|
+
"description": "UTC only; real calendar dates required. The CLI also rejects leap seconds and rollover dates."
|
|
36
|
+
},
|
|
37
|
+
"constraint": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": ["id", "scope", "description", "source", "revision"],
|
|
41
|
+
"dependentRequired": {
|
|
42
|
+
"replacedBy": ["supersededAt"],
|
|
43
|
+
"supersededAt": ["replacedBy"]
|
|
44
|
+
},
|
|
45
|
+
"properties": {
|
|
46
|
+
"id": {
|
|
47
|
+
"$ref": "#/$defs/identifier"
|
|
48
|
+
},
|
|
49
|
+
"scope": {
|
|
50
|
+
"$ref": "#/$defs/identifier"
|
|
51
|
+
},
|
|
52
|
+
"description": {
|
|
53
|
+
"$ref": "#/$defs/text"
|
|
54
|
+
},
|
|
55
|
+
"source": {
|
|
56
|
+
"$ref": "#/$defs/text"
|
|
57
|
+
},
|
|
58
|
+
"expiresAt": {
|
|
59
|
+
"$ref": "#/$defs/timestamp"
|
|
60
|
+
},
|
|
61
|
+
"revokedAt": {
|
|
62
|
+
"$ref": "#/$defs/timestamp"
|
|
63
|
+
},
|
|
64
|
+
"replacedBy": {
|
|
65
|
+
"$ref": "#/$defs/identifier"
|
|
66
|
+
},
|
|
67
|
+
"supersededAt": {
|
|
68
|
+
"$ref": "#/$defs/timestamp"
|
|
69
|
+
},
|
|
70
|
+
"revision": {
|
|
71
|
+
"type": "integer",
|
|
72
|
+
"minimum": 1,
|
|
73
|
+
"maximum": 9007199254740991
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/Larusajs/Handoff-Check/schemas/diff.v1.schema.json",
|
|
4
|
+
"title": "Handoff Check snapshot diff v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"status",
|
|
10
|
+
"scope",
|
|
11
|
+
"beforeCount",
|
|
12
|
+
"afterCount",
|
|
13
|
+
"unchangedCount",
|
|
14
|
+
"changes",
|
|
15
|
+
"notice"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"schemaVersion": { "const": 1 },
|
|
19
|
+
"status": { "enum": ["unchanged", "different"] },
|
|
20
|
+
"scope": { "$ref": "#/$defs/identifier" },
|
|
21
|
+
"projectId": { "$ref": "#/$defs/identifier" },
|
|
22
|
+
"beforeCount": { "type": "integer", "minimum": 0 },
|
|
23
|
+
"afterCount": { "type": "integer", "minimum": 0 },
|
|
24
|
+
"unchangedCount": { "type": "integer", "minimum": 0 },
|
|
25
|
+
"notice": { "type": "string" },
|
|
26
|
+
"changes": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["id", "kind", "before", "after"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
34
|
+
"kind": { "enum": ["ADDED", "REMOVED", "CHANGED"] },
|
|
35
|
+
"before": {
|
|
36
|
+
"oneOf": [{ "$ref": "#/$defs/reference" }, { "type": "null" }]
|
|
37
|
+
},
|
|
38
|
+
"after": {
|
|
39
|
+
"oneOf": [{ "$ref": "#/$defs/reference" }, { "type": "null" }]
|
|
40
|
+
},
|
|
41
|
+
"fields": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["field", "before", "after"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"field": {
|
|
49
|
+
"enum": [
|
|
50
|
+
"id",
|
|
51
|
+
"scope",
|
|
52
|
+
"description",
|
|
53
|
+
"source",
|
|
54
|
+
"expiresAt",
|
|
55
|
+
"revokedAt",
|
|
56
|
+
"replacedBy",
|
|
57
|
+
"supersededAt",
|
|
58
|
+
"revision"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"before": { "type": ["string", "number", "null"] },
|
|
62
|
+
"after": { "type": ["string", "number", "null"] }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"allOf": [
|
|
68
|
+
{
|
|
69
|
+
"if": { "properties": { "kind": { "const": "ADDED" } } },
|
|
70
|
+
"then": {
|
|
71
|
+
"properties": {
|
|
72
|
+
"before": { "type": "null" },
|
|
73
|
+
"after": { "$ref": "#/$defs/reference" }
|
|
74
|
+
},
|
|
75
|
+
"not": { "required": ["fields"] }
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"if": { "properties": { "kind": { "const": "REMOVED" } } },
|
|
80
|
+
"then": {
|
|
81
|
+
"properties": {
|
|
82
|
+
"before": { "$ref": "#/$defs/reference" },
|
|
83
|
+
"after": { "type": "null" }
|
|
84
|
+
},
|
|
85
|
+
"not": { "required": ["fields"] }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"if": { "properties": { "kind": { "const": "CHANGED" } } },
|
|
90
|
+
"then": {
|
|
91
|
+
"properties": {
|
|
92
|
+
"before": { "$ref": "#/$defs/reference" },
|
|
93
|
+
"after": { "$ref": "#/$defs/reference" }
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"$defs": {
|
|
102
|
+
"identifier": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
105
|
+
},
|
|
106
|
+
"reference": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["id", "revision", "contentHash"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
112
|
+
"revision": {
|
|
113
|
+
"type": "integer",
|
|
114
|
+
"minimum": 1,
|
|
115
|
+
"maximum": 9007199254740991
|
|
116
|
+
},
|
|
117
|
+
"contentHash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Handoff Check project-bound handoff v4",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schemaVersion",
|
|
8
|
+
"task",
|
|
9
|
+
"scope",
|
|
10
|
+
"capturedAt",
|
|
11
|
+
"activeConstraints",
|
|
12
|
+
"projectId",
|
|
13
|
+
"contentMode"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"schemaVersion": {
|
|
17
|
+
"const": 4
|
|
18
|
+
},
|
|
19
|
+
"task": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "\\S"
|
|
22
|
+
},
|
|
23
|
+
"scope": {
|
|
24
|
+
"$ref": "#/$defs/id"
|
|
25
|
+
},
|
|
26
|
+
"capturedAt": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"format": "date-time",
|
|
29
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,3})?Z$"
|
|
30
|
+
},
|
|
31
|
+
"activeConstraints": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"description": "Unique IDs; each content id/revision/canonical hash must agree with its reference. The CLI enforces these checks and rejects self-replacements. Replacement targets need not occur in this snapshot.",
|
|
34
|
+
"items": {
|
|
35
|
+
"oneOf": [
|
|
36
|
+
{
|
|
37
|
+
"$ref": "#/$defs/hashReference"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"$ref": "#/$defs/retainedReference"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"projectId": {
|
|
46
|
+
"$ref": "#/$defs/id"
|
|
47
|
+
},
|
|
48
|
+
"contentMode": {
|
|
49
|
+
"enum": ["hashes", "retained"]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"$defs": {
|
|
53
|
+
"id": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
56
|
+
},
|
|
57
|
+
"identifier": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
60
|
+
},
|
|
61
|
+
"text": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "\\S"
|
|
64
|
+
},
|
|
65
|
+
"timestamp": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"format": "date-time",
|
|
68
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,3})?Z$",
|
|
69
|
+
"description": "UTC only; real calendar dates required. The CLI also rejects leap seconds and rollover dates."
|
|
70
|
+
},
|
|
71
|
+
"constraint": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["id", "scope", "description", "source", "revision"],
|
|
75
|
+
"dependentRequired": {
|
|
76
|
+
"replacedBy": ["supersededAt"],
|
|
77
|
+
"supersededAt": ["replacedBy"]
|
|
78
|
+
},
|
|
79
|
+
"properties": {
|
|
80
|
+
"id": {
|
|
81
|
+
"$ref": "#/$defs/identifier"
|
|
82
|
+
},
|
|
83
|
+
"scope": {
|
|
84
|
+
"$ref": "#/$defs/identifier"
|
|
85
|
+
},
|
|
86
|
+
"description": {
|
|
87
|
+
"$ref": "#/$defs/text"
|
|
88
|
+
},
|
|
89
|
+
"source": {
|
|
90
|
+
"$ref": "#/$defs/text"
|
|
91
|
+
},
|
|
92
|
+
"expiresAt": {
|
|
93
|
+
"$ref": "#/$defs/timestamp"
|
|
94
|
+
},
|
|
95
|
+
"revokedAt": {
|
|
96
|
+
"$ref": "#/$defs/timestamp"
|
|
97
|
+
},
|
|
98
|
+
"replacedBy": {
|
|
99
|
+
"$ref": "#/$defs/identifier"
|
|
100
|
+
},
|
|
101
|
+
"supersededAt": {
|
|
102
|
+
"$ref": "#/$defs/timestamp"
|
|
103
|
+
},
|
|
104
|
+
"revision": {
|
|
105
|
+
"type": "integer",
|
|
106
|
+
"minimum": 1,
|
|
107
|
+
"maximum": 9007199254740991
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"hashReference": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": ["id", "revision", "contentHash"],
|
|
115
|
+
"properties": {
|
|
116
|
+
"id": {
|
|
117
|
+
"$ref": "#/$defs/id"
|
|
118
|
+
},
|
|
119
|
+
"revision": {
|
|
120
|
+
"type": "integer",
|
|
121
|
+
"minimum": 1,
|
|
122
|
+
"maximum": 9007199254740991
|
|
123
|
+
},
|
|
124
|
+
"contentHash": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"retainedReference": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"required": ["id", "revision", "contentHash", "content"],
|
|
134
|
+
"properties": {
|
|
135
|
+
"id": {
|
|
136
|
+
"$ref": "#/$defs/id"
|
|
137
|
+
},
|
|
138
|
+
"revision": {
|
|
139
|
+
"type": "integer",
|
|
140
|
+
"minimum": 1,
|
|
141
|
+
"maximum": 9007199254740991
|
|
142
|
+
},
|
|
143
|
+
"contentHash": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
|
|
146
|
+
},
|
|
147
|
+
"content": {
|
|
148
|
+
"$ref": "#/$defs/constraint"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"allOf": [
|
|
154
|
+
{
|
|
155
|
+
"if": {
|
|
156
|
+
"properties": {
|
|
157
|
+
"contentMode": {
|
|
158
|
+
"const": "hashes"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"then": {
|
|
163
|
+
"properties": {
|
|
164
|
+
"activeConstraints": {
|
|
165
|
+
"items": {
|
|
166
|
+
"$ref": "#/$defs/hashReference"
|
|
167
|
+
},
|
|
168
|
+
"type": "array"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"if": {
|
|
175
|
+
"properties": {
|
|
176
|
+
"contentMode": {
|
|
177
|
+
"const": "retained"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"then": {
|
|
182
|
+
"properties": {
|
|
183
|
+
"activeConstraints": {
|
|
184
|
+
"items": {
|
|
185
|
+
"$ref": "#/$defs/retainedReference"
|
|
186
|
+
},
|
|
187
|
+
"type": "array"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Handoff Check reproducibility report v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"schemaVersion",
|
|
8
|
+
"kind",
|
|
9
|
+
"packageVersion",
|
|
10
|
+
"policies",
|
|
11
|
+
"inputs",
|
|
12
|
+
"result",
|
|
13
|
+
"notice"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"schemaVersion": {
|
|
17
|
+
"const": 1
|
|
18
|
+
},
|
|
19
|
+
"kind": {
|
|
20
|
+
"const": "verification-report"
|
|
21
|
+
},
|
|
22
|
+
"packageVersion": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"projectId": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
28
|
+
},
|
|
29
|
+
"profile": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
32
|
+
},
|
|
33
|
+
"policies": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["requireContent", "requireActive"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"requireContent": {
|
|
39
|
+
"type": "boolean"
|
|
40
|
+
},
|
|
41
|
+
"requireActive": {
|
|
42
|
+
"type": "boolean"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"inputs": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"required": ["manifest", "handoff", "config"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"manifest": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["path", "sha256"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"path": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"sha256": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"handoff": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"required": ["path", "sha256"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"path": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"sha256": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"config": {
|
|
80
|
+
"anyOf": [
|
|
81
|
+
{
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["path", "sha256"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"path": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"sha256": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "null"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"git": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": ["worktree", "commit", "branch"],
|
|
106
|
+
"properties": {
|
|
107
|
+
"worktree": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"commit": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"pattern": "^[a-f0-9]{40,64}$"
|
|
113
|
+
},
|
|
114
|
+
"branch": {
|
|
115
|
+
"type": ["string", "null"]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"result": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"description": "Existing versioned verifier result; its semantics remain governed by verifier contracts.",
|
|
122
|
+
"required": [
|
|
123
|
+
"schemaVersion",
|
|
124
|
+
"status",
|
|
125
|
+
"scope",
|
|
126
|
+
"asOf",
|
|
127
|
+
"expectedConstraints",
|
|
128
|
+
"reportedConstraints",
|
|
129
|
+
"findings"
|
|
130
|
+
],
|
|
131
|
+
"properties": {
|
|
132
|
+
"schemaVersion": {
|
|
133
|
+
"enum": [1, 2, 3, 4]
|
|
134
|
+
},
|
|
135
|
+
"status": {
|
|
136
|
+
"enum": ["verified", "mismatch"]
|
|
137
|
+
},
|
|
138
|
+
"scope": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"asOf": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"expectedConstraints": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"items": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"reportedConstraints": {
|
|
151
|
+
"type": "array",
|
|
152
|
+
"items": {
|
|
153
|
+
"type": "string"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"findings": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": {
|
|
159
|
+
"type": "object"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"notice": {
|
|
165
|
+
"type": "string"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -46,7 +46,7 @@ report. Keep ordinary task summaries separate from the declared constraint IDs.
|
|
|
46
46
|
|
|
47
47
|
## Content-aware handoffs
|
|
48
48
|
|
|
49
|
-
Report the active-rule count as well as findings. V2/v3 JSON exposes
|
|
49
|
+
Report the active-rule count as well as findings. V2/v3/v4 JSON exposes
|
|
50
50
|
`activeConstraintCount`; legacy JSON exposes `expectedConstraints.length`.
|
|
51
51
|
A zero count is not evidence that real active rules were checked. It may mean a
|
|
52
52
|
starter, another scope, or only inactive rules. Text marks this as PASS (EMPTY)
|
|
@@ -54,8 +54,8 @@ when there are no mismatches. If the project explicitly requires a nonempty set,
|
|
|
54
54
|
add `--require-active`: zero then produces global NO_ACTIVE_CONSTRAINTS and exit 1.
|
|
55
55
|
Do not enable this policy silently or invent rules to satisfy it.
|
|
56
56
|
|
|
57
|
-
Use schemaVersion 2 or
|
|
58
|
-
carried active rule has a different revision or content hash.
|
|
57
|
+
Use schemaVersion 2/3 unbound or 4 project-bound handoffs with revision/hash references. `CHANGED` means a
|
|
58
|
+
carried active rule has a different revision or content hash. Retained v3/v4 findings include
|
|
59
59
|
typed field-level `changes` from saved to current values; null means an absent
|
|
60
60
|
optional field. V2 stores hashes only, so previous text is unavailable. Report
|
|
61
61
|
expected/reported values and available changes, then review the current rule.
|
|
@@ -80,9 +80,9 @@ a v2 manifest can maintain explicit revisions. Hashes catch content edits even i
|
|
|
80
80
|
the revision was not incremented.
|
|
81
81
|
|
|
82
82
|
Only when old-content retention is explicitly chosen, add `--include-content` to
|
|
83
|
-
snapshot. This creates
|
|
83
|
+
snapshot. This creates an unbound v3 or project-bound v4 retained handoff containing full descriptions, sources and
|
|
84
84
|
lifecycle values; consider sensitive content before committing or sharing it.
|
|
85
|
-
|
|
85
|
+
Unbound snapshots default to v2; bound manifests create v4. Do not silently upgrade existing files or enable
|
|
86
86
|
retention. Older CLI versions cannot read v3; upgrade affected consumers first.
|
|
87
87
|
|
|
88
88
|
On resume, verify the saved baseline FIRST. Never run snapshot automatically to
|
|
@@ -104,3 +104,33 @@ success and may contain FAIL or NOT VERIFIED. Re-run verify for details and
|
|
|
104
104
|
immediately before critical actions; startup context is not authorization or a
|
|
105
105
|
blocking guarantee. Codex/Cursor adapters are not shipped in 0.5; invoke the CLI
|
|
106
106
|
explicitly there.
|
|
107
|
+
|
|
108
|
+
## Explicit project and environment context
|
|
109
|
+
|
|
110
|
+
When config v2 profiles are used, select the user/workflow's explicit --profile;
|
|
111
|
+
do not infer one from a branch/directory. Do not combine it with scope/input-path
|
|
112
|
+
overrides. Bound manifest v3/handoff v4 must match projectId and selected scope;
|
|
113
|
+
do not edit identity or downgrade binding merely to obtain a pass. Upgrade all
|
|
114
|
+
consumers and verify/review the old baseline before deliberately migrating both
|
|
115
|
+
inputs. Existing unbound files remain supported.
|
|
116
|
+
|
|
117
|
+
Use verify --report --format json or markdown only when reproducibility metadata
|
|
118
|
+
is requested. It wraps the result with package/policy/profile/input digests;
|
|
119
|
+
--git-context separately opts into Git reads. A report is not authenticated proof
|
|
120
|
+
of compliance or authorization. Never redirect reports onto input/config files.
|
|
121
|
+
Doctor and the advisory Claude hook support the same explicit profile selection.
|
|
122
|
+
|
|
123
|
+
## Saved snapshot comparison and first setup
|
|
124
|
+
|
|
125
|
+
Use `diff --before <saved.json> --after <next.json> --format json` only to compare
|
|
126
|
+
two explicitly selected content-aware snapshots of the same scope/project.
|
|
127
|
+
Exit 0 means unchanged declarations, 1 means differences, 2 means invalid inputs.
|
|
128
|
+
Field details require retained content on both sides. Diff does not evaluate
|
|
129
|
+
current applicability, inspect agent memory, or replace verify on resume. Never
|
|
130
|
+
capture a new baseline merely to clear a diff or assume the later operand is newer.
|
|
131
|
+
|
|
132
|
+
`setup` is an interactive human onboarding flow for new projects. It previews
|
|
133
|
+
project/profile files and one user-authored global rule with retained baselines,
|
|
134
|
+
then requires explicit adoption. It installs no skills/hooks/settings. Do not
|
|
135
|
+
drive it to invent policy or refresh existing baselines; use noninteractive init
|
|
136
|
+
for automation and deliberate review/migration for existing projects.
|