principles 0.0.5 → 0.0.7

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 (192) hide show
  1. checksums.yaml +4 -4
  2. data/lib/principles/after_commit_hook_options.rb +4 -1
  3. data/lib/principles/cli.rb +9 -0
  4. data/lib/principles/command_line.rb +31 -30
  5. data/lib/principles/command_routes.rb +9 -3
  6. data/lib/principles/controllers/acknowledgement.rb +82 -95
  7. data/lib/principles/controllers/answer.rb +14 -11
  8. data/lib/principles/controllers/assessment.rb +27 -24
  9. data/lib/principles/controllers/audit.rb +24 -4
  10. data/lib/principles/controllers/audit_completion.rb +10 -4
  11. data/lib/principles/controllers/command.rb +2 -2
  12. data/lib/principles/controllers/correction.rb +16 -7
  13. data/lib/principles/controllers/full_audit_request.rb +8 -3
  14. data/lib/principles/controllers/guidance_search_paths.rb +31 -0
  15. data/lib/principles/controllers/inventory.rb +3 -22
  16. data/lib/principles/controllers/mapping.rb +9 -1
  17. data/lib/principles/controllers/member_acknowledgement.rb +137 -0
  18. data/lib/principles/controllers/member_addition.rb +65 -0
  19. data/lib/principles/controllers/member_entries.rb +6 -24
  20. data/lib/principles/controllers/member_problems_report.rb +33 -25
  21. data/lib/principles/controllers/members_to_assess.rb +1 -1
  22. data/lib/principles/controllers/meta_principle_setup.rb +1 -1
  23. data/lib/principles/controllers/repoint.rb +5 -2
  24. data/lib/principles/controllers/survey.rb +60 -0
  25. data/lib/principles/data/audit_files.rb +4 -0
  26. data/lib/principles/data/candidate_files_found.rb +48 -13
  27. data/lib/principles/data/command-steps.json +86 -25
  28. data/lib/principles/data/committed_tree.rb +84 -0
  29. data/lib/principles/data/first_parent_log.rb +48 -0
  30. data/lib/principles/data/first_parent_range.rb +122 -0
  31. data/lib/principles/data/git_command.rb +37 -0
  32. data/lib/principles/data/guidance_search_paths_file.rb +107 -0
  33. data/lib/principles/data/map_files.rb +35 -10
  34. data/lib/principles/data/principles_directory.rb +40 -0
  35. data/lib/principles/data/principles_subfolder.rb +39 -16
  36. data/lib/principles/data/project_files.rb +11 -3
  37. data/lib/principles/data/repository.rb +55 -29
  38. data/lib/principles/data/requested_candidate_files.rb +43 -0
  39. data/lib/principles/data/running_version.rb +3 -5
  40. data/lib/principles/data/schemas/acknowledgement-answer.schema.json +6 -6
  41. data/lib/principles/data/schemas/acknowledgements-answer.schema.json +88 -0
  42. data/lib/principles/data/schemas/answer-guide.schema.json +255 -63
  43. data/lib/principles/data/schemas/assessment-answer.schema.json +15 -1
  44. data/lib/principles/data/schemas/command-steps.schema.json +1 -1
  45. data/lib/principles/data/schemas/correction-answer-guide.schema.json +2 -1
  46. data/lib/principles/data/schemas/correction-answer.schema.json +12 -54
  47. data/lib/principles/data/schemas/guidance-search-paths.schema.json +13 -0
  48. data/lib/principles/data/schemas/member-map-history.schema.json +20 -0
  49. data/lib/principles/data/verified_head.rb +162 -0
  50. data/lib/principles/invocation_options.rb +5 -4
  51. data/lib/principles/list_open_findings_options.rb +23 -0
  52. data/lib/principles/models/acknowledged_check.rb +94 -0
  53. data/lib/principles/models/acknowledgement.rb +40 -36
  54. data/lib/principles/models/acknowledgement_left_as_printed.rb +72 -0
  55. data/lib/principles/models/acknowledgements.rb +99 -0
  56. data/lib/principles/models/answered_time.rb +9 -0
  57. data/lib/principles/models/assessment_report.rb +13 -13
  58. data/lib/principles/models/audit.rb +17 -4
  59. data/lib/principles/models/audit_entry_protecting_map.rb +28 -0
  60. data/lib/principles/models/audit_record.rb +9 -0
  61. data/lib/principles/models/audit_records.rb +34 -8
  62. data/lib/principles/models/candidate_files.rb +17 -6
  63. data/lib/principles/models/candidate_inventory.rb +51 -7
  64. data/lib/principles/models/captured_head.rb +72 -0
  65. data/lib/principles/models/check_since_last_audit.rb +4 -8
  66. data/lib/principles/models/correction_basis.rb +14 -5
  67. data/lib/principles/models/declared_map_changes.rb +25 -9
  68. data/lib/principles/models/declared_member_removals.rb +75 -0
  69. data/lib/principles/models/disposition.rb +4 -2
  70. data/lib/principles/models/fix_only_fields.rb +12 -0
  71. data/lib/principles/models/guidance_search_path.rb +26 -0
  72. data/lib/principles/models/guidance_search_paths.rb +57 -0
  73. data/lib/principles/models/line_span.rb +6 -0
  74. data/lib/principles/models/list_member_problems_check.rb +80 -0
  75. data/lib/principles/models/listed_members.rb +49 -0
  76. data/lib/principles/models/loaded_files.rb +1 -2
  77. data/lib/principles/models/loading_decision.rb +17 -8
  78. data/lib/principles/models/loading_scope.rb +61 -0
  79. data/lib/principles/models/loads_to_check.rb +0 -1
  80. data/lib/principles/models/locator.rb +6 -0
  81. data/lib/principles/models/mapped_principles.rb +39 -37
  82. data/lib/principles/models/member_assessments.rb +11 -2
  83. data/lib/principles/models/member_file.rb +20 -71
  84. data/lib/principles/models/member_history.rb +7 -5
  85. data/lib/principles/models/member_loading_scopes.rb +49 -0
  86. data/lib/principles/models/member_loads.rb +4 -0
  87. data/lib/principles/models/member_mapping_run.rb +30 -0
  88. data/lib/principles/models/member_moves.rb +4 -0
  89. data/lib/principles/models/member_problems.rb +57 -29
  90. data/lib/principles/models/member_region.rb +129 -0
  91. data/lib/principles/models/member_repair_moves.rb +9 -11
  92. data/lib/principles/models/member_sighting.rb +5 -8
  93. data/lib/principles/models/member_snapshots.rb +14 -1
  94. data/lib/principles/models/members_in_consecutive_sections.rb +56 -0
  95. data/lib/principles/models/meta_principle.rb +14 -0
  96. data/lib/principles/models/missing_files.rb +2 -2
  97. data/lib/principles/models/other_templates_placeholders.rb +1 -1
  98. data/lib/principles/models/outline_budget.rb +29 -14
  99. data/lib/principles/models/principle.rb +14 -7
  100. data/lib/principles/models/principle_file_revision.rb +48 -0
  101. data/lib/principles/models/principle_history.rb +46 -19
  102. data/lib/principles/models/principle_lineage.rb +118 -0
  103. data/lib/principles/models/principle_map_revision.rb +39 -0
  104. data/lib/principles/models/principle_mapping_history.rb +132 -0
  105. data/lib/principles/models/principle_members.rb +14 -0
  106. data/lib/principles/models/principle_predecessor.rb +45 -0
  107. data/lib/principles/models/principle_publication.rb +177 -0
  108. data/lib/principles/models/principle_revision.rb +104 -0
  109. data/lib/principles/models/problem_report.rb +36 -9
  110. data/lib/principles/models/project.rb +47 -30
  111. data/lib/principles/models/project_history.rb +45 -25
  112. data/lib/principles/models/record_format.rb +6 -0
  113. data/lib/principles/models/reported_check.rb +16 -12
  114. data/lib/principles/models/request_id.rb +1 -1
  115. data/lib/principles/models/sent_answer.rb +35 -5
  116. data/lib/principles/models/survey_search_paths.rb +26 -0
  117. data/lib/principles/models/uncommitted_files.rb +50 -0
  118. data/lib/principles/models/unknown_principle.rb +29 -0
  119. data/lib/principles/positional_arguments.rb +38 -0
  120. data/lib/principles/session_start_options.rb +3 -3
  121. data/lib/principles/start_audit_options.rb +10 -2
  122. data/lib/principles/version.rb +2 -2
  123. data/lib/principles/views/acknowledgement_result.rb +54 -16
  124. data/lib/principles/views/added_member.rb +41 -0
  125. data/lib/principles/views/answered_request.rb +21 -0
  126. data/lib/principles/views/assessed_members.rb +26 -5
  127. data/lib/principles/views/assessment_request.rb +24 -4
  128. data/lib/principles/views/audit_result.rb +30 -27
  129. data/lib/principles/views/candidate_files_result.rb +56 -12
  130. data/lib/principles/views/candidate_outlines_result.rb +25 -0
  131. data/lib/principles/views/check_result_template.rb +18 -17
  132. data/lib/principles/views/consecutive_sections_elsewhere.rb +27 -0
  133. data/lib/principles/views/correction_request.rb +38 -10
  134. data/lib/principles/views/findings_result.rb +21 -0
  135. data/lib/principles/views/guidance_search_paths_result.rb +26 -0
  136. data/lib/principles/views/invocation.rb +19 -4
  137. data/lib/principles/views/json_with_entries_on_lines.rb +12 -4
  138. data/lib/principles/views/loads_to_check_result.rb +3 -2
  139. data/lib/principles/views/map_added_to.rb +56 -2
  140. data/lib/principles/views/map_result.rb +22 -42
  141. data/lib/principles/views/maps_needing_members_or_audit.rb +47 -0
  142. data/lib/principles/views/member_change_since_baseline.rb +2 -1
  143. data/lib/principles/views/member_repairs.rb +2 -1
  144. data/lib/principles/views/member_row.rb +61 -0
  145. data/lib/principles/views/members_a_commit_changed.rb +2 -1
  146. data/lib/principles/views/members_with_no_baseline.rb +8 -1
  147. data/lib/principles/views/new_loading_scope.rb +31 -0
  148. data/lib/principles/views/one_member_check_result_template.rb +37 -21
  149. data/lib/principles/views/open_findings_line.rb +2 -1
  150. data/lib/principles/views/principle_read_result.rb +4 -1
  151. data/lib/principles/views/principles_with_no_completed_audit.rb +9 -3
  152. data/lib/principles/views/problem_lines.rb +50 -45
  153. data/lib/principles/views/problem_result.rb +59 -25
  154. data/lib/principles/views/prompts/acknowledge-a-change/report-the-exit-status-its-own-listing-gives.md +3 -0
  155. data/lib/principles/views/prompts/acknowledge-a-change/run-the-check-and-report-it-passing.md +3 -3
  156. data/lib/principles/views/prompts/acknowledge-a-change/say-whether-each-change-keeps-its-meaning.md +8 -0
  157. data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md +6 -6
  158. data/lib/principles/views/prompts/assess-every-member/answer-guide.json +67 -43
  159. data/lib/principles/views/prompts/assess-every-member/decide-each-member-loading.md +2 -1
  160. data/lib/principles/views/prompts/assess-every-member/run-the-check-then-report-it.md +2 -2
  161. data/lib/principles/views/prompts/assess-every-member/run-the-reviewed-check-and-say-what-its-review-rested-on.md +5 -3
  162. data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
  163. data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +12 -0
  164. data/lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md +4 -0
  165. data/lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md +6 -0
  166. data/lib/principles/views/prompts/find-a-principle-to-map/choose-an-existing-or-new-principle.md +2 -0
  167. data/lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md +4 -2
  168. data/lib/principles/views/prompts/find-a-principle-to-map/compare-with-mapped-principles.md +11 -0
  169. data/lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md +2 -2
  170. data/lib/principles/views/prompts/find-a-principle-to-map/survey-a-later-range.md +3 -0
  171. data/lib/principles/views/prompts/find-a-principle-to-map/what-each-command-writes.md +4 -4
  172. data/lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md +5 -4
  173. data/lib/principles/views/prompts/learn-what-a-command-does/add-guidance-search-path.md +17 -0
  174. data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +35 -6
  175. data/lib/principles/views/prompts/learn-what-a-command-does/create-principle.md +16 -0
  176. data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md +1 -2
  177. data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +37 -4
  178. data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +20 -19
  179. data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +65 -61
  180. data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +5 -0
  181. data/lib/principles/views/prompts/learn-what-a-command-does/remove-guidance-search-path.md +13 -0
  182. data/lib/principles/views/prompts/learn-what-a-command-does/remove-principle.md +25 -0
  183. data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +33 -7
  184. data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +21 -0
  185. data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +10 -10
  186. data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +51 -54
  187. data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +7 -0
  188. data/lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md +1 -1
  189. data/lib/principles/views/prompts/start-a-session/every-loaded-line-costs-every-session.md +1 -0
  190. data/lib/principles/views/prompts/start-a-session/start-with-the-principles-skill.md +1 -0
  191. metadata +67 -4
  192. 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,12 +27,12 @@
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); for this tool's own list-member-problems --short, which exits 3 while it lists the member, 3 with the member ids it lists under listed_members, each one this answer acknowledges (#1276). Models::ReportedCheck checks it.",
32
31
  "properties": {
33
32
  "command": { "type": "string" },
34
33
  "exit_status": { "type": ["integer", "string"] },
35
- "review_basis": { "type": "string" }
34
+ "review_basis": { "type": "string" },
35
+ "listed_members": { "type": "array", "items": { "type": "string" } }
36
36
  }
37
37
  }
38
38
  }
@@ -0,0 +1,88 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "acknowledgements-answer.schema.json",
4
+ "title": "Acknowledgements answer",
5
+ "description": "What an agent answers a request to acknowledge several members of one principle with (#1169): the request's id, its basis naming each member, and under members one entry per member, keyed by its id, holding what a one-member answer holds beside its head. Fields this tool does not read are refused (D29). Models::Acknowledgements refuses an answer whose members differ from its basis, and each entry is checked as Models::Acknowledgement checks a one-member answer.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "request_id",
10
+ "basis",
11
+ "members"
12
+ ],
13
+ "properties": {
14
+ "request_id": {
15
+ "type": "string"
16
+ },
17
+ "basis": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": [
21
+ "member_ids"
22
+ ],
23
+ "properties": {
24
+ "member_ids": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ }
30
+ }
31
+ },
32
+ "members": {
33
+ "type": "object",
34
+ "additionalProperties": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "description": "One member's judgement, read as a one-member answer's fields beside its request_id and basis are read (acknowledgement-answer.schema.json).",
38
+ "required": [
39
+ "meaning_kept",
40
+ "reason"
41
+ ],
42
+ "properties": {
43
+ "meaning_kept": {
44
+ "type": "boolean"
45
+ },
46
+ "reason": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "old_line": {
51
+ "type": "string"
52
+ },
53
+ "new_line": {
54
+ "type": "string"
55
+ },
56
+ "check_result": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "x-unread-field-advice": {
60
+ "not_run_reason": "a check that cannot be run here needs a full audit: start one instead"
61
+ },
62
+ "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); for this tool's own list-member-problems --short, which exits 3 while it lists the member, 3 with the member ids it lists under listed_members, each one this answer acknowledges (#1276). Models::ReportedCheck checks it.",
63
+ "properties": {
64
+ "command": {
65
+ "type": "string"
66
+ },
67
+ "exit_status": {
68
+ "type": [
69
+ "integer",
70
+ "string"
71
+ ]
72
+ },
73
+ "review_basis": {
74
+ "type": "string"
75
+ },
76
+ "listed_members": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "string"
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
@@ -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
  }
@@ -71,7 +71,7 @@
71
71
  "observed_at": {
72
72
  "type": ["string", "null"],
73
73
  "minLength": 1,
74
- "description": "On an observed delivery only, when the agent saw what observation describes, if that was before this audit; omitted or null, it is this audit's time, so the agent never types a clock time (#716). Models::MemberSighting refuses it on not_observed, one not a UTC time to the second as audited_at is, such as 2026-11-01T09:30:00Z, and one after the answer (#699), and refuses an observation repeated word for word from the last full audit as observation_repeats_last_audit unless it is that audit's date or null (#680, #716)."
74
+ "description": "On an observed delivery only, when the agent saw what observation describes, if that was before this audit; omitted or null, it is this audit's time, so the agent never types a clock time (#716). Models::MemberSighting refuses it on not_observed, one not a time to the second as audited_at is, such as 2026-11-01T09:30:00Z, whose UTC offset, such as +05:30, it reads as the same instant in UTC (#1187), and one after the answer (#699), and refuses an observation repeated word for word from the last full audit as observation_repeats_last_audit unless it is that audit's date or null (#680, #716)."
75
75
  },
76
76
  "evidence": {
77
77
  "type": "array",
@@ -130,6 +130,20 @@
130
130
  "type": "string",
131
131
  "description": "The note start-audit --as template prints at its head saying how a field left as printed is read, which an answer may send back and Models::AssessmentAnswer ignores, whatever it holds (#1043, D88)."
132
132
  },
133
+ "carried_checks_to_run": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "string"
137
+ },
138
+ "description": "The carried members whose check start-audit --as template still asks to run, which an answer may send back and Models::AssessmentAnswer ignores (D12, D19)."
139
+ },
140
+ "check_instructions": {
141
+ "type": "object",
142
+ "additionalProperties": {
143
+ "type": "string"
144
+ },
145
+ "description": "How to run and report each checked member's check, by member id, which start-audit --as template prints at its head, and an answer may send back and Models::AssessmentAnswer ignores (#1191)."
146
+ },
133
147
  "collective_assessment": {
134
148
  "type": "string"
135
149
  },
@@ -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", "lines"] } },
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"] }