principles 0.0.5 → 0.0.6

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.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/lib/principles/after_commit_hook_options.rb +4 -1
  3. data/lib/principles/command_line.rb +12 -28
  4. data/lib/principles/command_routes.rb +7 -1
  5. data/lib/principles/controllers/acknowledgement.rb +36 -26
  6. data/lib/principles/controllers/answer.rb +7 -5
  7. data/lib/principles/controllers/assessment.rb +14 -3
  8. data/lib/principles/controllers/audit_completion.rb +3 -1
  9. data/lib/principles/controllers/command.rb +2 -2
  10. data/lib/principles/controllers/correction.rb +3 -1
  11. data/lib/principles/controllers/full_audit_request.rb +1 -1
  12. data/lib/principles/controllers/guidance_search_paths.rb +31 -0
  13. data/lib/principles/controllers/inventory.rb +3 -22
  14. data/lib/principles/controllers/mapping.rb +9 -1
  15. data/lib/principles/controllers/member_addition.rb +65 -0
  16. data/lib/principles/controllers/member_entries.rb +6 -24
  17. data/lib/principles/controllers/member_problems_report.rb +2 -2
  18. data/lib/principles/controllers/members_to_assess.rb +1 -1
  19. data/lib/principles/controllers/meta_principle_setup.rb +1 -1
  20. data/lib/principles/controllers/repoint.rb +5 -2
  21. data/lib/principles/controllers/survey.rb +60 -0
  22. data/lib/principles/data/audit_files.rb +4 -0
  23. data/lib/principles/data/candidate_files_found.rb +48 -13
  24. data/lib/principles/data/command-steps.json +77 -16
  25. data/lib/principles/data/committed_tree.rb +84 -0
  26. data/lib/principles/data/first_parent_log.rb +48 -0
  27. data/lib/principles/data/first_parent_range.rb +122 -0
  28. data/lib/principles/data/git_command.rb +37 -0
  29. data/lib/principles/data/guidance_search_paths_file.rb +107 -0
  30. data/lib/principles/data/map_files.rb +35 -10
  31. data/lib/principles/data/principles_directory.rb +40 -0
  32. data/lib/principles/data/principles_subfolder.rb +39 -16
  33. data/lib/principles/data/project_files.rb +11 -3
  34. data/lib/principles/data/repository.rb +55 -29
  35. data/lib/principles/data/requested_candidate_files.rb +43 -0
  36. data/lib/principles/data/running_version.rb +3 -5
  37. data/lib/principles/data/schemas/acknowledgement-answer.schema.json +4 -5
  38. data/lib/principles/data/schemas/answer-guide.schema.json +255 -63
  39. data/lib/principles/data/schemas/command-steps.schema.json +1 -1
  40. data/lib/principles/data/schemas/correction-answer-guide.schema.json +2 -1
  41. data/lib/principles/data/schemas/correction-answer.schema.json +6 -0
  42. data/lib/principles/data/schemas/guidance-search-paths.schema.json +13 -0
  43. data/lib/principles/data/schemas/member-map-history.schema.json +20 -0
  44. data/lib/principles/data/verified_head.rb +162 -0
  45. data/lib/principles/invocation_options.rb +2 -2
  46. data/lib/principles/models/acknowledgement.rb +28 -6
  47. data/lib/principles/models/acknowledgement_left_as_printed.rb +51 -0
  48. data/lib/principles/models/audit_entry_protecting_map.rb +28 -0
  49. data/lib/principles/models/audit_record.rb +4 -0
  50. data/lib/principles/models/audit_records.rb +34 -8
  51. data/lib/principles/models/candidate_files.rb +17 -6
  52. data/lib/principles/models/candidate_inventory.rb +51 -7
  53. data/lib/principles/models/captured_head.rb +72 -0
  54. data/lib/principles/models/check_since_last_audit.rb +4 -8
  55. data/lib/principles/models/declared_map_changes.rb +25 -9
  56. data/lib/principles/models/declared_member_removals.rb +75 -0
  57. data/lib/principles/models/disposition.rb +4 -2
  58. data/lib/principles/models/fix_only_fields.rb +12 -0
  59. data/lib/principles/models/guidance_search_path.rb +26 -0
  60. data/lib/principles/models/guidance_search_paths.rb +57 -0
  61. data/lib/principles/models/line_span.rb +6 -0
  62. data/lib/principles/models/loaded_files.rb +1 -2
  63. data/lib/principles/models/loading_scope.rb +61 -0
  64. data/lib/principles/models/locator.rb +6 -0
  65. data/lib/principles/models/mapped_principles.rb +39 -37
  66. data/lib/principles/models/member_file.rb +20 -71
  67. data/lib/principles/models/member_history.rb +7 -5
  68. data/lib/principles/models/member_loading_scopes.rb +49 -0
  69. data/lib/principles/models/member_loads.rb +4 -0
  70. data/lib/principles/models/member_mapping_run.rb +30 -0
  71. data/lib/principles/models/member_moves.rb +4 -0
  72. data/lib/principles/models/member_problems.rb +48 -24
  73. data/lib/principles/models/member_region.rb +129 -0
  74. data/lib/principles/models/member_repair_moves.rb +9 -11
  75. data/lib/principles/models/member_snapshots.rb +14 -1
  76. data/lib/principles/models/members_in_consecutive_sections.rb +56 -0
  77. data/lib/principles/models/meta_principle.rb +14 -0
  78. data/lib/principles/models/missing_files.rb +2 -2
  79. data/lib/principles/models/other_templates_placeholders.rb +1 -1
  80. data/lib/principles/models/outline_budget.rb +29 -14
  81. data/lib/principles/models/principle.rb +14 -7
  82. data/lib/principles/models/principle_file_revision.rb +48 -0
  83. data/lib/principles/models/principle_history.rb +46 -19
  84. data/lib/principles/models/principle_lineage.rb +118 -0
  85. data/lib/principles/models/principle_map_revision.rb +39 -0
  86. data/lib/principles/models/principle_mapping_history.rb +132 -0
  87. data/lib/principles/models/principle_members.rb +14 -0
  88. data/lib/principles/models/principle_predecessor.rb +45 -0
  89. data/lib/principles/models/principle_publication.rb +177 -0
  90. data/lib/principles/models/principle_revision.rb +104 -0
  91. data/lib/principles/models/problem_report.rb +17 -5
  92. data/lib/principles/models/project.rb +43 -27
  93. data/lib/principles/models/project_history.rb +45 -25
  94. data/lib/principles/models/record_format.rb +6 -0
  95. data/lib/principles/models/reported_check.rb +2 -1
  96. data/lib/principles/models/sent_answer.rb +10 -0
  97. data/lib/principles/models/survey_search_paths.rb +26 -0
  98. data/lib/principles/models/uncommitted_files.rb +50 -0
  99. data/lib/principles/models/unknown_principle.rb +29 -0
  100. data/lib/principles/positional_arguments.rb +37 -0
  101. data/lib/principles/version.rb +2 -2
  102. data/lib/principles/views/acknowledgement_result.rb +16 -12
  103. data/lib/principles/views/added_member.rb +41 -0
  104. data/lib/principles/views/answered_request.rb +21 -0
  105. data/lib/principles/views/assessment_request.rb +2 -1
  106. data/lib/principles/views/audit_result.rb +21 -26
  107. data/lib/principles/views/candidate_files_result.rb +56 -12
  108. data/lib/principles/views/candidate_outlines_result.rb +25 -0
  109. data/lib/principles/views/consecutive_sections_elsewhere.rb +27 -0
  110. data/lib/principles/views/correction_request.rb +32 -1
  111. data/lib/principles/views/guidance_search_paths_result.rb +26 -0
  112. data/lib/principles/views/json_with_entries_on_lines.rb +12 -4
  113. data/lib/principles/views/map_added_to.rb +56 -2
  114. data/lib/principles/views/map_result.rb +22 -42
  115. data/lib/principles/views/maps_needing_members_or_audit.rb +47 -0
  116. data/lib/principles/views/member_change_since_baseline.rb +2 -1
  117. data/lib/principles/views/member_repairs.rb +2 -1
  118. data/lib/principles/views/new_loading_scope.rb +31 -0
  119. data/lib/principles/views/one_member_check_result_template.rb +25 -21
  120. data/lib/principles/views/principle_read_result.rb +4 -1
  121. data/lib/principles/views/principles_with_no_completed_audit.rb +9 -3
  122. data/lib/principles/views/problem_lines.rb +3 -1
  123. data/lib/principles/views/problem_result.rb +8 -3
  124. data/lib/principles/views/prompts/acknowledge-a-change/run-the-check-and-report-it-passing.md +3 -3
  125. data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md +6 -6
  126. data/lib/principles/views/prompts/assess-every-member/answer-guide.json +67 -43
  127. data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
  128. data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +12 -0
  129. data/lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md +4 -0
  130. data/lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md +6 -0
  131. data/lib/principles/views/prompts/find-a-principle-to-map/choose-an-existing-or-new-principle.md +2 -0
  132. data/lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md +4 -2
  133. data/lib/principles/views/prompts/find-a-principle-to-map/compare-with-mapped-principles.md +11 -0
  134. data/lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md +2 -2
  135. data/lib/principles/views/prompts/find-a-principle-to-map/survey-a-later-range.md +3 -0
  136. data/lib/principles/views/prompts/find-a-principle-to-map/what-each-command-writes.md +4 -4
  137. data/lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md +5 -4
  138. data/lib/principles/views/prompts/learn-what-a-command-does/add-guidance-search-path.md +17 -0
  139. data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +35 -6
  140. data/lib/principles/views/prompts/learn-what-a-command-does/create-principle.md +16 -0
  141. data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +37 -4
  142. data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +5 -4
  143. data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +5 -0
  144. data/lib/principles/views/prompts/learn-what-a-command-does/remove-guidance-search-path.md +13 -0
  145. data/lib/principles/views/prompts/learn-what-a-command-does/remove-principle.md +25 -0
  146. data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +26 -0
  147. data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +21 -0
  148. data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +2 -2
  149. data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +51 -54
  150. data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +7 -0
  151. metadata +55 -4
  152. data/lib/principles/models/candidate_listing.rb +0 -41
@@ -0,0 +1,43 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require_relative "../error"
5
+ require_relative "candidate_files_found"
6
+
7
+ module Principles
8
+ module Data
9
+ # Only the literal files the agent asked to outline, with each unread or refused request retained.
10
+ class RequestedCandidateFiles
11
+ #: (ProjectFiles, Array[String]) -> void
12
+ def initialize(files, paths)
13
+ @files = files
14
+ @paths = paths.map { |path| path.sub(%r{\A(?:\./)+}, "") }.uniq.sort #: Array[String]
15
+ freeze
16
+ end
17
+
18
+ #: () -> Hash[String, untyped]
19
+ def to_h
20
+ results = @paths.map { |path| requested(path) }
21
+ listing = { "files" => results.filter_map { |result| result["file"] },
22
+ "unreadable" => results.filter_map { |result| result["refusal"] },
23
+ "possibly_test_data" => [], "selected_files" => @paths }
24
+ ignored = results.filter_map { |result| result["ignored"] }
25
+ ignored.empty? ? listing : listing.merge("ignored" => ignored, "ignored_ancestor_folders" => [])
26
+ end
27
+
28
+ private
29
+
30
+ # Resolve before asking git: an invalid request cannot stop the other paths' ignore checks.
31
+ #: (String) -> Hash[String, untyped]
32
+ def requested(path)
33
+ @files.resolve(path)
34
+ ignored = @files.ignored_paths(@files.text_paths(path))
35
+ return { "ignored" => path } if ignored&.any?
36
+
37
+ { "file" => CandidateFilesFound.listed(path, text: @files.read_text(path), leads_to: @files.leads_to(path)) }
38
+ rescue Error => e
39
+ { "refusal" => e.payload }
40
+ end
41
+ end
42
+ end
43
+ end
@@ -1,8 +1,8 @@
1
1
  # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
- require "English"
5
4
  require_relative "../version"
5
+ require_relative "git_command"
6
6
 
7
7
  module Principles
8
8
  # Every file and process this tool reads or writes. data/CLAUDE.md owns the boundary.
@@ -34,10 +34,8 @@ module Principles
34
34
  def commit
35
35
  return @archived_commit if @archived_commit.match?(/\A\h+\z/)
36
36
 
37
- sha = IO.popen(["git", "-C", @checkout, "rev-parse", "--short", "HEAD"], err: File::NULL, &:read).to_s.strip
38
- $CHILD_STATUS&.success? && !sha.empty? ? sha : "unknown"
39
- rescue SystemCallError
40
- "unknown"
37
+ sha, ok = GitCommand.new(@checkout).run(%w[rev-parse --short HEAD])
38
+ ok && !sha.strip.empty? ? sha.strip : "unknown"
41
39
  end
42
40
  end
43
41
  end
@@ -2,16 +2,16 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "acknowledgement-answer.schema.json",
4
4
  "title": "Acknowledgement answer",
5
- "description": "What an agent answers a one-member audit with (D33): the request's id and basis, whether the change keeps the member's meaning, a one-line reason, and a line quoted from the member's text before the change and one from after it, or \"\" for a side with no line the other lacks. Fields this tool does not read are refused (D29). Models::Acknowledgement checks the quotes and the reason.",
5
+ "description": "What an agent answers a one-member audit with (D33): the request's id and basis, whether the change keeps the member's meaning, a one-line reason, and a line quoted from the member's text before the change and one from after it, or \"\" for a side with no line the other lacks; a quote left out, as is the basis's base_commit, which the request id already pins, is read as the request's first_changed_lines printed it (#1166). Fields this tool does not read are refused (D29). Models::Acknowledgement checks the quotes and the reason.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
- "required": ["request_id", "basis", "meaning_kept", "reason", "old_line", "new_line"],
8
+ "required": ["request_id", "basis", "meaning_kept", "reason"],
9
9
  "properties": {
10
10
  "request_id": { "type": "string" },
11
11
  "basis": {
12
12
  "type": "object",
13
13
  "additionalProperties": false,
14
- "required": ["base_commit", "member_id"],
14
+ "required": ["member_id"],
15
15
  "properties": {
16
16
  "base_commit": { "type": "string" },
17
17
  "member_id": { "type": "string" }
@@ -27,8 +27,7 @@
27
27
  "x-unread-field-advice": {
28
28
  "not_run_reason": "a check that cannot be run here needs a full audit: start one instead"
29
29
  },
30
- "required": ["command"],
31
- "description": "The result of the member's check, which the answer reports when the member has one: the command as the map names it and its exit_status, which must be 0, since a check that fails or cannot be run is a full audit's to judge, with review_basis when a new line says what its review rested on (D30, D63, #1115). Models::ReportedCheck checks it.",
30
+ "description": "The result of the member's check, which the answer reports when the member has one: the command as the map names it, or left out to read as the request printed it (#1166), and its exit_status, which must be 0, since a check that fails or cannot be run is a full audit's to judge, with review_basis when a new line says what its review rested on (D30, D63, #1115). Models::ReportedCheck checks it.",
32
31
  "properties": {
33
32
  "command": { "type": "string" },
34
33
  "exit_status": { "type": ["integer", "string"] },
@@ -7,88 +7,280 @@
7
7
  "required": ["finding", "member_delivery", "recent_decision", "reassessment", "check_result"],
8
8
  "additionalProperties": false,
9
9
  "properties": {
10
- "finding": {
11
- "type": "object",
12
- "required": ["id", "member_ids", "problem", "consequence", "proposed_action", "evidence"],
13
- "additionalProperties": false,
14
- "properties": {
15
- "id": { "type": "string" },
16
- "member_ids": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
17
- "problem": { "type": "string" },
18
- "consequence": { "type": "string" },
19
- "proposed_action": { "type": "string" },
20
- "evidence": {
21
- "type": "array",
22
- "minItems": 1,
23
- "items": {
10
+ "finding": {
11
+ "type": "object",
12
+ "required": [
13
+ "copy_to",
14
+ "copy_from",
15
+ "examples",
16
+ "notes"
17
+ ],
18
+ "additionalProperties": false,
19
+ "properties": {
20
+ "copy_to": {
21
+ "type": "string"
22
+ },
23
+ "copy_from": {
24
+ "type": "string"
25
+ },
26
+ "examples": {
27
+ "type": "object",
28
+ "required": [
29
+ "finding"
30
+ ],
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "finding": {
34
+ "type": "object",
35
+ "required": [
36
+ "id",
37
+ "member_ids",
38
+ "problem",
39
+ "consequence",
40
+ "proposed_action",
41
+ "evidence"
42
+ ],
43
+ "additionalProperties": false,
44
+ "properties": {
45
+ "id": {
46
+ "type": "string"
47
+ },
48
+ "member_ids": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string"
52
+ },
53
+ "minItems": 1
54
+ },
55
+ "problem": {
56
+ "type": "string"
57
+ },
58
+ "consequence": {
59
+ "type": "string"
60
+ },
61
+ "proposed_action": {
62
+ "type": "string"
63
+ },
64
+ "evidence": {
65
+ "type": "array",
66
+ "minItems": 1,
67
+ "items": {
68
+ "type": "object",
69
+ "required": [
70
+ "path"
71
+ ],
72
+ "properties": {
73
+ "path": {
74
+ "type": "string"
75
+ },
76
+ "heading": {
77
+ "type": "string"
78
+ },
79
+ "starting_at": {
80
+ "type": "string"
81
+ },
82
+ "ending_at": {
83
+ "type": "string"
84
+ },
85
+ "query": {
86
+ "type": "string"
87
+ }
88
+ },
89
+ "additionalProperties": false
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ },
96
+ "notes": {
97
+ "type": "string"
98
+ }
99
+ }
100
+ },
101
+ "member_delivery": {
102
+ "type": "object",
103
+ "required": [
104
+ "copy_to",
105
+ "copy_from",
106
+ "examples",
107
+ "notes"
108
+ ],
109
+ "additionalProperties": false,
110
+ "properties": {
111
+ "copy_to": {
112
+ "type": "string"
113
+ },
114
+ "copy_from": {
115
+ "type": "string"
116
+ },
117
+ "examples": {
118
+ "type": "object",
119
+ "required": [
120
+ "not_observed",
121
+ "observed"
122
+ ],
123
+ "additionalProperties": false,
124
+ "properties": {
125
+ "not_observed": {
126
+ "type": "object",
127
+ "required": [
128
+ "delivery"
129
+ ],
130
+ "properties": {
131
+ "delivery": {
132
+ "const": "not_observed"
133
+ }
134
+ },
135
+ "additionalProperties": false
136
+ },
137
+ "observed": {
24
138
  "type": "object",
25
- "required": ["path"],
139
+ "required": [
140
+ "delivery",
141
+ "observation"
142
+ ],
26
143
  "properties": {
27
- "path": { "type": "string" },
28
- "heading": { "type": "string" },
29
- "starting_at": { "type": "string" },
30
- "ending_at": { "type": "string" },
31
- "query": { "type": "string" }
144
+ "delivery": {
145
+ "const": "observed"
146
+ },
147
+ "observation": {
148
+ "type": "string"
149
+ },
150
+ "observed_at": {
151
+ "type": [
152
+ "string",
153
+ "null"
154
+ ]
155
+ }
32
156
  },
33
157
  "additionalProperties": false
34
158
  }
35
159
  }
160
+ },
161
+ "notes": {
162
+ "type": "string"
36
163
  }
37
- },
38
- "member_delivery": {
39
- "type": "object",
40
- "required": ["not_observed", "observed"],
41
- "additionalProperties": false,
42
- "properties": {
43
- "not_observed": {
44
- "type": "object",
45
- "required": ["delivery"],
46
- "properties": { "delivery": { "const": "not_observed" } },
47
- "additionalProperties": false
48
- },
49
- "observed": {
50
- "type": "object",
51
- "required": ["delivery", "observation"],
52
- "properties": { "delivery": { "const": "observed" }, "observation": { "type": "string" },
53
- "observed_at": { "type": "string" } },
54
- "additionalProperties": false
164
+ }
165
+ },
166
+ "recent_decision": {
167
+ "type": "object",
168
+ "required": [
169
+ "copy_to",
170
+ "copy_from",
171
+ "examples"
172
+ ],
173
+ "additionalProperties": false,
174
+ "properties": {
175
+ "copy_to": {
176
+ "type": "string"
177
+ },
178
+ "copy_from": {
179
+ "type": "string"
180
+ },
181
+ "examples": {
182
+ "type": "object",
183
+ "required": [
184
+ "assessed",
185
+ "unavailable"
186
+ ],
187
+ "additionalProperties": false,
188
+ "properties": {
189
+ "assessed": {
190
+ "type": "object",
191
+ "required": [
192
+ "assessment",
193
+ "evidence"
194
+ ],
195
+ "additionalProperties": false,
196
+ "properties": {
197
+ "assessment": {
198
+ "type": "string"
199
+ },
200
+ "evidence": {
201
+ "$ref": "#/properties/finding/properties/examples/properties/finding/properties/evidence"
202
+ }
203
+ }
204
+ },
205
+ "unavailable": {
206
+ "type": "object",
207
+ "required": [
208
+ "unavailable_reason"
209
+ ],
210
+ "properties": {
211
+ "unavailable_reason": {
212
+ "type": "string"
213
+ }
214
+ },
215
+ "additionalProperties": false
216
+ }
55
217
  }
56
218
  }
57
- },
58
- "recent_decision": {
219
+ }
220
+ },
221
+ "reassessment": { "type": "string" },
222
+ "check_result": {
59
223
  "type": "object",
60
- "required": ["assessed", "unavailable"],
224
+ "required": [
225
+ "copy_to",
226
+ "copy_from",
227
+ "examples",
228
+ "limits"
229
+ ],
61
230
  "additionalProperties": false,
62
231
  "properties": {
63
- "assessed": {
232
+ "copy_to": {
233
+ "type": "string"
234
+ },
235
+ "copy_from": {
236
+ "type": "string"
237
+ },
238
+ "examples": {
64
239
  "type": "object",
65
- "required": ["assessment", "evidence"],
240
+ "required": [
241
+ "ran",
242
+ "not_run"
243
+ ],
66
244
  "additionalProperties": false,
67
245
  "properties": {
68
- "assessment": { "type": "string" },
69
- "evidence": { "$ref": "#/properties/finding/properties/evidence" }
246
+ "ran": {
247
+ "type": "object",
248
+ "required": [
249
+ "command",
250
+ "exit_status"
251
+ ],
252
+ "additionalProperties": false,
253
+ "properties": {
254
+ "command": {
255
+ "type": "string"
256
+ },
257
+ "exit_status": {
258
+ "type": "integer"
259
+ }
260
+ }
261
+ },
262
+ "not_run": {
263
+ "type": "object",
264
+ "required": [
265
+ "command",
266
+ "not_run_reason"
267
+ ],
268
+ "additionalProperties": false,
269
+ "properties": {
270
+ "command": {
271
+ "type": "string"
272
+ },
273
+ "not_run_reason": {
274
+ "type": "string"
275
+ }
276
+ }
277
+ }
70
278
  }
71
279
  },
72
- "unavailable": {
73
- "type": "object",
74
- "required": ["unavailable_reason"],
75
- "properties": { "unavailable_reason": { "type": "string" } },
76
- "additionalProperties": false
280
+ "limits": {
281
+ "type": "string"
77
282
  }
78
283
  }
79
- },
80
- "reassessment": { "type": "string" },
81
- "check_result": {
82
- "type": "object",
83
- "required": ["command", "exit_status", "review_basis", "not_run_reason", "limits"],
84
- "additionalProperties": false,
85
- "properties": {
86
- "command": { "type": "string" },
87
- "exit_status": { "type": "integer" },
88
- "review_basis": { "type": "string" },
89
- "not_run_reason": { "type": "string" },
90
- "limits": { "type": "string" }
91
- }
92
284
  }
93
285
  }
94
286
  }
@@ -72,7 +72,7 @@
72
72
  "usage": { "$ref": "#/$defs/prose" },
73
73
  "group": { "$ref": "#/$defs/slug" },
74
74
  "options": { "type": "array", "uniqueItems": true,
75
- "items": { "enum": ["description", "path", "section", "starting-at", "ending-at", "query", "role", "check", "file", "short", "session-start", "commits-after", "hook-event", "member", "when-files", "when-invoked", "always", "write-ups", "as", "instruction"] } },
75
+ "items": { "enum": ["description", "path", "section", "starting-at", "ending-at", "query", "role", "check", "file", "short", "session-start", "commits-after", "hook-event", "member", "when-files", "when-invoked", "always", "write-ups", "as", "instruction", "also", "confirm"] } },
76
76
  "requires": { "type": "array", "uniqueItems": true, "items": { "enum": ["file"] } },
77
77
  "summary": { "$ref": "#/$defs/prose" },
78
78
  "help": { "type": "string", "pattern": "^[a-z]+(-[a-z]+)+/[a-z]+(-[a-z]+)+$" },
@@ -14,12 +14,13 @@
14
14
  "properties": {
15
15
  "fixed": {
16
16
  "type": "object",
17
- "required": ["action", "reason", "changed_members", "evidence", "reassessment", "recorded_at"],
17
+ "required": ["action", "reason", "changed_members", "removed_members", "evidence", "reassessment", "recorded_at"],
18
18
  "additionalProperties": false,
19
19
  "properties": {
20
20
  "action": { "const": "fixed" },
21
21
  "reason": { "type": "string", "minLength": 1 },
22
22
  "changed_members": { "type": "array", "items": { "type": "string" } },
23
+ "removed_members": { "type": "array", "items": { "type": "string" } },
23
24
  "evidence": { "type": "array", "items": { "type": "object" } },
24
25
  "reassessment": { "type": "string", "minLength": 1 },
25
26
  "recorded_at": { "type": ["object", "null"] }
@@ -272,6 +272,12 @@
272
272
  "type": "string"
273
273
  }
274
274
  },
275
+ "removed_members": {
276
+ "type": "array",
277
+ "items": {
278
+ "type": "string"
279
+ }
280
+ },
275
281
  "reassessment": {
276
282
  "type": "string"
277
283
  },
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "guidance-search-paths.schema.json",
4
+ "title": "Recorded guidance search paths",
5
+ "description": "Additional root-relative guidance globs recorded after the principles table, in the project's one .principles/guidance-search-paths.json file.",
6
+ "type": "object",
7
+ "required": ["format", "globs"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "format": { "type": "integer", "enum": [1] },
11
+ "globs": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }
12
+ }
13
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "member-map-history.schema.json",
4
+ "title": "Linked member map history",
5
+ "description": "The additional shape of a format-3 map's exact immediate predecessor, checked beside the common member-map schema. Earlier formats keep predecessor as unknown metadata.",
6
+ "type": "object",
7
+ "required": ["format", "predecessor"],
8
+ "properties": {
9
+ "format": { "const": 3 },
10
+ "predecessor": {
11
+ "type": "object",
12
+ "required": ["principle_id", "commit"],
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "principle_id": { "type": "string", "pattern": "\\A[a-z0-9]+(?:-[a-z0-9]+)*\\z" },
16
+ "commit": { "type": "string", "pattern": "\\A[0-9a-f]{40}([0-9a-f]{24})?\\z" }
17
+ }
18
+ }
19
+ }
20
+ }