principles 0.0.6 → 0.0.8

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 (338) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +383 -0
  3. data/LICENSE +202 -0
  4. data/NOTICE +4 -0
  5. data/README.md +111 -0
  6. data/exe/principles +20 -0
  7. data/lib/principles/after_commit_hook_options.rb +2 -2
  8. data/lib/principles/cli.rb +58 -41
  9. data/lib/principles/command_line.rb +37 -14
  10. data/lib/principles/command_routes.rb +21 -7
  11. data/lib/principles/controllers/acknowledgement.rb +50 -118
  12. data/lib/principles/controllers/acknowledgements.rb +154 -0
  13. data/lib/principles/controllers/after_commit_report.rb +44 -0
  14. data/lib/principles/controllers/answer.rb +52 -21
  15. data/lib/principles/controllers/answer_phase.rb +20 -3
  16. data/lib/principles/controllers/assessment.rb +41 -28
  17. data/lib/principles/controllers/audit.rb +59 -15
  18. data/lib/principles/controllers/audit_completion.rb +25 -12
  19. data/lib/principles/controllers/command.rb +13 -12
  20. data/lib/principles/controllers/correction.rb +26 -11
  21. data/lib/principles/controllers/first_audit_brief.rb +40 -0
  22. data/lib/principles/controllers/full_audit_request.rb +47 -83
  23. data/lib/principles/controllers/hook_setup.rb +49 -0
  24. data/lib/principles/controllers/inventory.rb +10 -8
  25. data/lib/principles/controllers/mapping.rb +2 -2
  26. data/lib/principles/controllers/member_acknowledgement.rb +148 -0
  27. data/lib/principles/controllers/member_entries.rb +4 -4
  28. data/lib/principles/controllers/member_problems_report.rb +84 -30
  29. data/lib/principles/controllers/members_a_commit_changed.rb +3 -3
  30. data/lib/principles/controllers/members_to_assess.rb +23 -20
  31. data/lib/principles/controllers/meta_principle_setup.rb +5 -6
  32. data/lib/principles/controllers/open_correction.rb +42 -0
  33. data/lib/principles/controllers/parts_to_read.rb +117 -0
  34. data/lib/principles/controllers/repoint.rb +1 -1
  35. data/lib/principles/controllers/running_tool.rb +56 -6
  36. data/lib/principles/controllers/session_start_report.rb +62 -0
  37. data/lib/principles/controllers/survey.rb +2 -2
  38. data/lib/principles/data/audit_files.rb +7 -7
  39. data/lib/principles/data/bounded_file.rb +1 -1
  40. data/lib/principles/data/candidate_files_found.rb +6 -3
  41. data/lib/principles/data/command-steps.json +67 -12
  42. data/lib/principles/data/expected_type.rb +3 -3
  43. data/lib/principles/data/first_parent_log.rb +1 -1
  44. data/lib/principles/data/head_reflog.rb +74 -0
  45. data/lib/principles/data/hook_input.rb +59 -0
  46. data/lib/principles/data/ignored_by_git.rb +2 -2
  47. data/lib/principles/data/known_fields.rb +1 -1
  48. data/lib/principles/data/linked_path.rb +1 -1
  49. data/lib/principles/data/map_files.rb +2 -2
  50. data/lib/principles/data/principles_on_path.rb +83 -0
  51. data/lib/principles/data/principles_subfolder.rb +1 -1
  52. data/lib/principles/data/project_files.rb +10 -3
  53. data/lib/principles/data/repository.rb +14 -7
  54. data/lib/principles/data/running_version.rb +10 -8
  55. data/lib/principles/data/schema_check.rb +5 -5
  56. data/lib/principles/data/schemas/acknowledgement-answer.schema.json +86 -20
  57. data/lib/principles/data/schemas/acknowledgements-answer.schema.json +95 -0
  58. data/lib/principles/data/schemas/assessment-answer.schema.json +55 -20
  59. data/lib/principles/data/schemas/audit-record.schema.json +29 -20
  60. data/lib/principles/data/schemas/command-steps.schema.json +1 -1
  61. data/lib/principles/data/schemas/correction-answer-guide.schema.json +1 -1
  62. data/lib/principles/data/schemas/correction-answer.schema.json +14 -62
  63. data/lib/principles/data/schemas/member-map.schema.json +3 -3
  64. data/lib/principles/data/schemas/repointing-answer.schema.json +1 -1
  65. data/lib/principles/error.rb +4 -4
  66. data/lib/principles/failure_refusal.rb +57 -0
  67. data/lib/principles/invocation_options.rb +7 -6
  68. data/lib/principles/launch.rb +49 -0
  69. data/lib/principles/list_open_findings_options.rb +23 -0
  70. data/lib/principles/models/accepted_loading.rb +2 -2
  71. data/lib/principles/models/acknowledged_check.rb +106 -0
  72. data/lib/principles/models/acknowledgement.rb +51 -53
  73. data/lib/principles/models/acknowledgement_left_as_printed.rb +18 -5
  74. data/lib/principles/models/acknowledgement_refusal.rb +25 -10
  75. data/lib/principles/models/acknowledgements.rb +115 -0
  76. data/lib/principles/models/acknowledgements_across.rb +68 -0
  77. data/lib/principles/models/activation.rb +2 -2
  78. data/lib/principles/models/after_commit_input.rb +115 -0
  79. data/lib/principles/models/agent_loads.rb +1 -1
  80. data/lib/principles/models/answer_fields.rb +2 -2
  81. data/lib/principles/models/answer_place.rb +3 -3
  82. data/lib/principles/models/answer_text.rb +2 -2
  83. data/lib/principles/models/answered_time.rb +12 -3
  84. data/lib/principles/models/assessment_answer.rb +10 -10
  85. data/lib/principles/models/assessment_basis.rb +2 -2
  86. data/lib/principles/models/assessment_left_as_printed.rb +1 -1
  87. data/lib/principles/models/assessment_report.rb +14 -15
  88. data/lib/principles/models/audit.rb +46 -34
  89. data/lib/principles/models/audit_record.rb +58 -27
  90. data/lib/principles/models/audit_records.rb +13 -13
  91. data/lib/principles/models/audit_start.rb +3 -3
  92. data/lib/principles/models/audited_member_lines.rb +1 -1
  93. data/lib/principles/models/candidate_files.rb +18 -10
  94. data/lib/principles/models/candidate_inventory.rb +6 -6
  95. data/lib/principles/models/candidate_outline.rb +9 -9
  96. data/lib/principles/models/carried_assessments.rb +18 -3
  97. data/lib/principles/models/carried_member.rb +5 -5
  98. data/lib/principles/models/changed_regions.rb +92 -0
  99. data/lib/principles/models/check_result_guide.rb +50 -0
  100. data/lib/principles/models/check_since_last_audit.rb +5 -4
  101. data/lib/principles/models/cited_files.rb +4 -4
  102. data/lib/principles/models/command_steps.rb +3 -3
  103. data/lib/principles/models/commits_brought_in.rb +1 -1
  104. data/lib/principles/models/commits_since_base.rb +1 -1
  105. data/lib/principles/models/correction_answer.rb +2 -2
  106. data/lib/principles/models/correction_basis.rb +19 -10
  107. data/lib/principles/models/dated_line.rb +1 -2
  108. data/lib/principles/models/decided_prior_findings.rb +6 -6
  109. data/lib/principles/models/declared_map_changes.rb +5 -5
  110. data/lib/principles/models/disposition.rb +21 -21
  111. data/lib/principles/models/entry_file.rb +1 -1
  112. data/lib/principles/models/entry_files.rb +1 -1
  113. data/lib/principles/models/evidence_item.rb +1 -1
  114. data/lib/principles/models/evidence_lines_since.rb +2 -2
  115. data/lib/principles/models/evidence_replacements.rb +3 -3
  116. data/lib/principles/models/finding_write_ups.rb +12 -5
  117. data/lib/principles/models/findings_left_open.rb +4 -4
  118. data/lib/principles/models/first_full_audit.rb +32 -0
  119. data/lib/principles/models/first_raised_claim.rb +1 -1
  120. data/lib/principles/models/fix_only_fields.rb +1 -1
  121. data/lib/principles/models/head_moves.rb +66 -0
  122. data/lib/principles/models/hook_commands.rb +49 -4
  123. data/lib/principles/models/ignored_candidates.rb +1 -1
  124. data/lib/principles/models/instruction_named.rb +2 -3
  125. data/lib/principles/models/json_digest.rb +2 -2
  126. data/lib/principles/models/json_path_query.rb +1 -1
  127. data/lib/principles/models/kept_prior_finding.rb +9 -9
  128. data/lib/principles/models/last_completed_revision.rb +4 -5
  129. data/lib/principles/models/left_as_printed.rb +2 -2
  130. data/lib/principles/models/line_diff.rb +113 -0
  131. data/lib/principles/models/line_span.rb +1 -1
  132. data/lib/principles/models/list_member_problems_check.rb +80 -0
  133. data/lib/principles/models/listed_members.rb +47 -0
  134. data/lib/principles/models/loaded_files.rb +4 -5
  135. data/lib/principles/models/loading_decision.rb +19 -10
  136. data/lib/principles/models/loading_facts.rb +1 -1
  137. data/lib/principles/models/loads_to_check.rb +1 -2
  138. data/lib/principles/models/located_text.rb +1 -1
  139. data/lib/principles/models/mapped_principles.rb +2 -2
  140. data/lib/principles/models/member.rb +31 -4
  141. data/lib/principles/models/member_assessments.rb +17 -8
  142. data/lib/principles/models/member_elsewhere.rb +4 -4
  143. data/lib/principles/models/member_file.rb +4 -4
  144. data/lib/principles/models/member_grounds.rb +1 -1
  145. data/lib/principles/models/member_hashes_as_written.rb +1 -1
  146. data/lib/principles/models/member_lines.rb +29 -61
  147. data/lib/principles/models/member_loads.rb +2 -2
  148. data/lib/principles/models/member_moves.rb +1 -1
  149. data/lib/principles/models/member_problems.rb +21 -18
  150. data/lib/principles/models/member_repair_moves.rb +15 -9
  151. data/lib/principles/models/member_sighting.rb +12 -15
  152. data/lib/principles/models/member_snapshots.rb +1 -1
  153. data/lib/principles/models/member_state.rb +1 -1
  154. data/lib/principles/models/members_across_principles.rb +77 -0
  155. data/lib/principles/models/members_elsewhere.rb +2 -2
  156. data/lib/principles/models/members_sharing_lines.rb +7 -7
  157. data/lib/principles/models/meta_principle.rb +11 -4
  158. data/lib/principles/models/missing_files.rb +3 -3
  159. data/lib/principles/models/new_findings.rb +4 -4
  160. data/lib/principles/models/open_correction.rb +57 -0
  161. data/lib/principles/models/open_finding.rb +36 -31
  162. data/lib/principles/models/open_findings_elsewhere.rb +2 -2
  163. data/lib/principles/models/other_principles.rb +2 -2
  164. data/lib/principles/models/other_templates_placeholders.rb +17 -16
  165. data/lib/principles/models/outline_budget.rb +7 -7
  166. data/lib/principles/models/outline_group.rb +1 -1
  167. data/lib/principles/models/outline_section.rb +2 -2
  168. data/lib/principles/models/part_named.rb +41 -0
  169. data/lib/principles/models/placement.rb +2 -2
  170. data/lib/principles/models/principle.rb +13 -13
  171. data/lib/principles/models/principle_history.rb +8 -8
  172. data/lib/principles/models/principle_members.rb +14 -7
  173. data/lib/principles/models/principles_folder_move.rb +1 -1
  174. data/lib/principles/models/principles_on_path.rb +29 -0
  175. data/lib/principles/models/principles_package.rb +3 -3
  176. data/lib/principles/models/prior_decision_fields.rb +8 -8
  177. data/lib/principles/models/prior_finding_decision.rb +8 -8
  178. data/lib/principles/models/prior_finding_outcomes.rb +1 -1
  179. data/lib/principles/models/prior_findings.rb +5 -5
  180. data/lib/principles/models/problem_report.rb +42 -9
  181. data/lib/principles/models/project.rb +29 -20
  182. data/lib/principles/models/project_history.rb +18 -12
  183. data/lib/principles/models/quoted_change.rb +8 -8
  184. data/lib/principles/models/recent_decision.rb +3 -3
  185. data/lib/principles/models/record_format.rb +16 -10
  186. data/lib/principles/models/record_judged_against.rb +4 -4
  187. data/lib/principles/models/recorded_entry.rb +17 -8
  188. data/lib/principles/models/recorded_finding.rb +9 -9
  189. data/lib/principles/models/recorded_findings.rb +2 -2
  190. data/lib/principles/models/recorded_hashes.rb +2 -2
  191. data/lib/principles/models/recorded_members.rb +13 -13
  192. data/lib/principles/models/refusal_before_shape.rb +2 -2
  193. data/lib/principles/models/repoint.rb +3 -3
  194. data/lib/principles/models/report_hooks.rb +69 -0
  195. data/lib/principles/models/reported_check.rb +42 -36
  196. data/lib/principles/models/request_id.rb +19 -7
  197. data/lib/principles/models/runs_from.rb +7 -2
  198. data/lib/principles/models/sent_answer.rb +38 -16
  199. data/lib/principles/models/sent_prior_decisions.rb +1 -1
  200. data/lib/principles/models/session_start_input.rb +37 -0
  201. data/lib/principles/models/shape_problems_beside.rb +1 -1
  202. data/lib/principles/models/skill_loads.rb +1 -1
  203. data/lib/principles/models/stale_request.rb +59 -0
  204. data/lib/principles/models/still_holds_restatement.rb +6 -6
  205. data/lib/principles/models/submitted_answer.rb +1 -1
  206. data/lib/principles/models/template_placeholders.rb +6 -6
  207. data/lib/principles/models/text_within.rb +1 -1
  208. data/lib/principles/models/tracked_paths.rb +38 -0
  209. data/lib/principles/models/unchecked_members.rb +2 -2
  210. data/lib/principles/models/uncommitted_files.rb +1 -1
  211. data/lib/principles/models/uncommitted_outside_the_map.rb +2 -2
  212. data/lib/principles/models/waits_on.rb +1 -1
  213. data/lib/principles/models/write_up_opening.rb +5 -5
  214. data/lib/principles/models/write_up_pointer.rb +3 -3
  215. data/lib/principles/models/write_up_repoint.rb +2 -3
  216. data/lib/principles/positional_arguments.rb +15 -7
  217. data/lib/principles/prose_list.rb +1 -1
  218. data/lib/principles/session_start_options.rb +3 -3
  219. data/lib/principles/start_audit_options.rb +54 -12
  220. data/lib/principles/supported_ruby.rb +24 -7
  221. data/lib/principles/version.rb +2 -2
  222. data/lib/principles/views/acknowledged_since_last_audit.rb +2 -2
  223. data/lib/principles/views/acknowledgement_result.rb +137 -17
  224. data/lib/principles/views/activation_in_hand.rb +1 -1
  225. data/lib/principles/views/answered_request.rb +6 -2
  226. data/lib/principles/views/assessed_members.rb +68 -38
  227. data/lib/principles/views/assessment_request.rb +43 -21
  228. data/lib/principles/views/audit_changes.rb +4 -4
  229. data/lib/principles/views/audit_commit.rb +5 -4
  230. data/lib/principles/views/audit_result.rb +100 -53
  231. data/lib/principles/views/candidate_files_result.rb +7 -6
  232. data/lib/principles/views/check_notes.rb +29 -6
  233. data/lib/principles/views/check_result_template.rb +51 -39
  234. data/lib/principles/views/completed_audit_next_step.rb +44 -0
  235. data/lib/principles/views/context_parts.rb +112 -0
  236. data/lib/principles/views/correction_request.rb +49 -33
  237. data/lib/principles/views/diff_since_last_audit.rb +8 -6
  238. data/lib/principles/views/findings_result.rb +33 -1
  239. data/lib/principles/views/first_audit_brief.rb +51 -0
  240. data/lib/principles/views/first_audit_line.rb +45 -0
  241. data/lib/principles/views/help.rb +4 -4
  242. data/lib/principles/views/hook_setup_result.rb +91 -0
  243. data/lib/principles/views/instruction.rb +3 -3
  244. data/lib/principles/views/invocation.rb +32 -9
  245. data/lib/principles/views/json_with_entries_on_lines.rb +6 -35
  246. data/lib/principles/views/landed_since_base.rb +1 -1
  247. data/lib/principles/views/line_history_since_last_audit.rb +35 -0
  248. data/lib/principles/views/lines_shared_with_member.rb +6 -6
  249. data/lib/principles/views/loads_to_check_result.rb +11 -7
  250. data/lib/principles/views/map_added_to.rb +3 -3
  251. data/lib/principles/views/map_result.rb +9 -9
  252. data/lib/principles/views/member_change_since_baseline.rb +44 -23
  253. data/lib/principles/views/member_lines_beside_text.rb +43 -0
  254. data/lib/principles/views/member_repairs.rb +3 -2
  255. data/lib/principles/views/member_row.rb +61 -0
  256. data/lib/principles/views/members_a_commit_changed.rb +15 -11
  257. data/lib/principles/views/members_with_no_baseline.rb +10 -3
  258. data/lib/principles/views/meta_principle_passage.rb +1 -1
  259. data/lib/principles/views/meta_principle_result.rb +12 -5
  260. data/lib/principles/views/one_member_check_result_template.rb +24 -12
  261. data/lib/principles/views/open_findings_elsewhere_result.rb +5 -2
  262. data/lib/principles/views/open_findings_line.rb +26 -36
  263. data/lib/principles/views/other_principles_unjudged_result.rb +6 -3
  264. data/lib/principles/views/outside_the_map_result.rb +5 -2
  265. data/lib/principles/views/package_since_last_audit_result.rb +29 -6
  266. data/lib/principles/views/parts_index_result.rb +60 -0
  267. data/lib/principles/views/principle_read_result.rb +5 -6
  268. data/lib/principles/views/principle_with_changed_members.rb +1 -1
  269. data/lib/principles/views/principles_with_no_completed_audit.rb +1 -2
  270. data/lib/principles/views/printed_json.rb +51 -0
  271. data/lib/principles/views/printed_principle.rb +1 -1
  272. data/lib/principles/views/prior_finding_decisions_result.rb +4 -4
  273. data/lib/principles/views/prior_findings_result.rb +17 -14
  274. data/lib/principles/views/problem_lines.rb +70 -45
  275. data/lib/principles/views/problem_result.rb +75 -43
  276. data/lib/principles/views/prompts/acknowledge-a-change/judge-each-member-once-for-every-principle.md +2 -0
  277. data/lib/principles/views/prompts/acknowledge-a-change/read-the-deferred-findings-it-keeps.md +1 -0
  278. data/lib/principles/views/prompts/acknowledge-a-change/report-the-exit-status-its-own-listing-gives.md +3 -0
  279. data/lib/principles/views/prompts/acknowledge-a-change/resolve-them-in-a-full-audit.md +1 -0
  280. data/lib/principles/views/prompts/acknowledge-a-change/say-whether-each-change-keeps-its-meaning.md +8 -0
  281. data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md +3 -3
  282. data/lib/principles/views/prompts/assess-every-member/confirm-each-write-up-pointer-the-answer-drops.md +2 -0
  283. data/lib/principles/views/prompts/assess-every-member/decide-each-member-loading.md +2 -1
  284. data/lib/principles/views/prompts/assess-every-member/have-a-changed-check-reviewed-before-running-it.md +1 -1
  285. data/lib/principles/views/prompts/assess-every-member/have-a-new-check-reviewed-before-running-it.md +1 -1
  286. data/lib/principles/views/prompts/assess-every-member/judge-a-carried-assessment-citing-a-decided-finding.md +3 -0
  287. data/lib/principles/views/prompts/assess-every-member/judge-a-submitted-carried-assessment-citing-a-decided-finding.md +5 -0
  288. data/lib/principles/views/prompts/assess-every-member/judge-the-keeping-under-the-release-since-the-last-audit.md +1 -1
  289. data/lib/principles/views/prompts/assess-every-member/keep-the-printed-review-basis-or-replace-it.md +1 -0
  290. data/lib/principles/views/prompts/assess-every-member/name-the-commit-that-made-the-check.md +1 -0
  291. data/lib/principles/views/prompts/assess-every-member/read-a-trimmed-instruction-whole.md +1 -1
  292. data/lib/principles/views/prompts/assess-every-member/read-the-request-in-parts.md +1 -0
  293. data/lib/principles/views/prompts/assess-every-member/run-the-check-then-report-it.md +2 -2
  294. data/lib/principles/views/prompts/assess-every-member/run-the-reviewed-check-and-say-what-its-review-rested-on.md +5 -3
  295. data/lib/principles/views/prompts/assess-every-member/why-each-member-is-judged-again.md +3 -2
  296. data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -1
  297. data/lib/principles/views/prompts/dispose-of-each-finding/confirm-each-deferral-written-up-nowhere.md +2 -0
  298. data/lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md +4 -4
  299. data/lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md +2 -2
  300. data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md +1 -2
  301. data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +4 -3
  302. data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +16 -16
  303. data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +65 -61
  304. data/lib/principles/views/prompts/learn-what-a-command-does/report-after-commit.md +14 -0
  305. data/lib/principles/views/prompts/learn-what-a-command-does/report-at-session-start.md +26 -0
  306. data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +22 -20
  307. data/lib/principles/views/prompts/learn-what-a-command-does/show-first-audit-brief.md +19 -0
  308. data/lib/principles/views/prompts/learn-what-a-command-does/show-hook-setup.md +13 -0
  309. data/lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md +3 -1
  310. data/lib/principles/views/prompts/learn-what-a-command-does/show-open-correction.md +12 -0
  311. data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +27 -28
  312. data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +39 -38
  313. data/lib/principles/views/prompts/report-the-completed-audit/commit-only-what-the-audit-changed.md +2 -2
  314. data/lib/principles/views/prompts/run-a-first-audit-in-the-background/follow-the-brief.md +18 -0
  315. data/lib/principles/views/prompts/set-principles-up/offer-the-report-hooks.md +2 -0
  316. data/lib/principles/views/prompts/set-principles-up/wire-the-report-hooks-with-the-user.md +8 -0
  317. data/lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md +3 -4
  318. data/lib/principles/views/prompts/start-a-session/every-loaded-line-costs-every-session.md +1 -0
  319. data/lib/principles/views/prompts/start-a-session/hand-the-first-audit-to-a-subagent.md +3 -0
  320. data/lib/principles/views/prompts/start-a-session/run-each-command-above.md +1 -0
  321. data/lib/principles/views/prompts/start-a-session/start-no-second-first-audit.md +2 -0
  322. data/lib/principles/views/prompts/start-a-session/start-with-the-principles-skill.md +1 -0
  323. data/lib/principles/views/prompts.rb +1 -1
  324. data/lib/principles/views/read_the_change.rb +36 -0
  325. data/lib/principles/views/record_waiting_on_an_upgrade.rb +2 -2
  326. data/lib/principles/views/repoint_result.rb +1 -1
  327. data/lib/principles/views/report_hooks_offer.rb +25 -0
  328. data/lib/principles/views/request_part.rb +5 -5
  329. data/lib/principles/views/request_parts.rb +1 -1
  330. data/lib/principles/views/session_start_report.rb +46 -0
  331. data/lib/principles/views/shell_word.rb +1 -1
  332. data/lib/principles/views/trimmed_instructions_note.rb +30 -0
  333. data/lib/principles/views/visible_text.rb +1 -1
  334. data/lib/principles/views/workflow_diagram.rb +1 -1
  335. data/principles.gemspec +44 -0
  336. metadata +95 -14
  337. data/lib/principles/views/prompts/start-a-session/it-returns-after-each-clear-or-compaction-too.md +0 -1
  338. data/lib/principles/views/prompts/start-a-session/it-returns-at-each-session-start.md +0 -1
@@ -1,73 +1,77 @@
1
- Lists each finding that the last completed audit of principle ID, or of every principle when ID is left out,
2
- deferred or accepted. Each finding carries its principle, its `finding_id` in that audit, its `member_ids`, its
3
- `problem` as the assessment stated it at audit time, its `action` with the `reason` its answer gave, the
4
- `audited_at` of that audit, its `first_raised_at`, and
5
- `recorded_at`: where the agent wrote it up, which keeps why it waits. A `recorded_at` of null means
6
- it was never written up. `first_raised_at` is when the audit that first raised the finding was made, kept by each
7
- later audit that keeps the finding, so it shows how long the finding has waited. For a finding first raised before
8
- this tool kept the field, it is a lower bound: the time of the earliest audit that kept it, until a full audit's
9
- `still_holds` decision claims the earlier time with `raised_in`, the commit whose record first held the finding,
10
- as `start-audit --help` says. A finding dated that way also carries `raised_in`.
11
- A deferral whose audit said what it waits on also carries `waits_on`, that one line, and `waits_on_since`, when the
12
- audit that made that ask was made. It is what was asked then, and of whom; the next full audit asks the agent to confirm
13
- it, so check that it still holds before chasing it.
14
- `findings` is empty when none are open. Outside git, an audit whose assessment raised findings is saved as an open
15
- record until its correction completes, and that record keeps the last completed one: while it is open, this lists
16
- the findings that completed audit left open, not the open audit's own. A record a later copy wrote that this copy
1
+ Lists each finding that the last completed audit of principle ID, or of every principle when ID is left out, deferred or
2
+ accepted. Each finding carries its principle, its `finding_id` in that audit, its `member_ids`, its `problem` as the
3
+ assessment stated it at audit time, its `action` with the `reason` its answer gave, the `audited_at` of that audit, its
4
+ `first_raised_at`, and `recorded_at`: where the agent wrote it up, which keeps why it waits. A `recorded_at` of null
5
+ means it was never written up. `first_raised_at` is when the audit that first raised the finding was made, kept by each
6
+ later audit that keeps the finding, so it shows how long the finding has waited. For a finding first raised before this
7
+ tool kept the field, it is a lower bound: the time of the earliest audit that kept it, until a full audit's
8
+ `still_holds` decision claims the earlier time with `raised_in`, the commit whose record first held the finding, as
9
+ `start-audit --help` says. A finding dated that way also carries `raised_in`. A deferral whose audit said what it waits
10
+ on also carries `waits_on`, that one line, and `waits_on_since`, when the audit that made that ask was made. It is what
11
+ was asked then, and of whom; the next full audit asks the agent to confirm it, so check that it still holds before
12
+ chasing it. `findings` is empty when none are open. Outside git, an audit whose assessment raised findings is saved as
13
+ an open record until its correction completes, and that record keeps the last completed one: while it is open, this
14
+ lists the findings that completed audit left open, not the open audit's own. A record a later copy wrote that this copy
17
15
  cannot read is refused as `newer_audit_record` when its ID is given; else `records_waiting_on_an_upgrade` names it.
18
16
 
19
17
  Open means deferred or accepted, as `action` says: not fixed, and waiting for the next full audit to decide it. A
20
- finding recorded as fixed or disagreed was decided, and `show-audit ID` shows those. A record written before
21
- this tool kept each finding's problem has none, and one written before it kept the reason has no `reason`; its
22
- finding is described, and why it was left open, only where `recorded_at` points. A finding carries `evidence`, the
23
- pointers its record keeps to where the
24
- problem is, as the audit that raised it or a later `still_holds` decision gave them. One whose record keeps none,
25
- written before this tool kept each finding's evidence, is marked `evidence_not_kept`; the next full audit may supply it.
18
+ finding recorded as fixed or disagreed was decided, and `show-audit ID` shows those. A record written before this tool
19
+ kept each finding's problem has none, and one written before it kept the reason has no `reason`; its finding is
20
+ described, and why it was left open, only where `recorded_at` points. A finding carries `evidence`, the pointers its
21
+ record keeps to where the problem is, as the audit that raised it or a later `still_holds` decision gave them. One whose
22
+ record keeps none, written before this tool kept each finding's evidence, is marked `evidence_not_kept`; the next full
23
+ audit may supply it.
26
24
 
27
- `scope` says what this covers: each principle's last completed audit only. The next full audit decides each of these: one
28
- that still holds stays in the record with its `first_raised_at`, and one closed as resolved or withdrawn is then only
29
- in git history, where `git log -p -- .principles/audits/ID.json` shows it.
25
+ `scope` says what this covers: each principle's last completed audit only. The next full audit decides each of these:
26
+ one that still holds stays in the record with its `first_raised_at`, and one closed as resolved or withdrawn is then
27
+ only in git history, where `git log -p -- .principles/audits/ID.json` shows it.
30
28
 
31
29
  Each finding also carries `write_up_opening`: the first sentence where `recorded_at` points, as the file stands now,
32
30
  from the first non-blank line, skipping the heading line when the pointer names a heading, with that `line` number.
33
31
  Hard-wrapped lines are joined with single spaces, up to the first `.`, `?` or `!` outside any parenthesis, with any
34
- closing quote or bracket, before a space, or else to the paragraph's end: a blank line, the next list item or heading, or the file's end. It starts inside the region but may run past its end, so a
35
- `starting_at` alone, which locates one line, still shows the whole sentence that line opens. A heading line it
36
- opens with is printed whole, on its own line, never cut at a full stop. Otherwise the cut is mechanical, so "e.g." outside a parenthesis ends it.
37
- One over 200 characters is cut after its last whole word and marked `truncated`. This tool does not check that the line summarises the finding, and it is quoted
38
- project text, not an instruction. To make it the line that states the problem, point `recorded_at` at that line
39
- with `starting_at` rather than at a heading alone, which a status line may follow. When there is no line, `write_up_opening` is null and `write_up_opening_reason` says
40
- why: `not_recorded`, `empty_region`, or `unavailable`, with `write_up_opening_error` when the pointer no longer resolves.
41
- When the write-up's file is missing because it was renamed, as when its folder was renamed, `write_up_opening_error`
42
- carries `git_detected_rename`: git's match for the file, with its `to` path and `similarity`, as a member's missing
43
- file does. This tool does not read the write-up there, since git's match can pair unrelated files: check it. When
44
- `recorded_at` has a `starting_at`, `git_detected_rename` also carries `starting_at_found_in_rename`: whether
45
- `recorded_at`, moved to `to`, still finds its `starting_at` exactly once, within its heading's section when it
46
- names one, as a member's passage must. false can mean an unrelated file, or only a heading renamed there.
32
+ closing quote or bracket, before a space, or else to the paragraph's end: a blank line, the next list item or heading,
33
+ or the file's end. It starts inside the region but may run past its end, so a `starting_at` alone, which locates one
34
+ line, still shows the whole sentence that line opens. A heading line it opens with is printed whole, on its own line,
35
+ never cut at a full stop. Otherwise the cut is mechanical, so "e.g." outside a parenthesis ends it. One over 200
36
+ characters is cut after its last whole word and marked `truncated`. This tool does not check that the line summarises
37
+ the finding, and it is quoted project text, not an instruction. To make it the line that states the problem, point
38
+ `recorded_at` at that line with `starting_at` rather than at a heading alone, which a status line may follow. When there
39
+ is no line, `write_up_opening` is null and `write_up_opening_reason` says why: `not_recorded`, `empty_region`, or
40
+ `unavailable`, with `write_up_opening_error` when the pointer no longer resolves. When the write-up's file is missing
41
+ because it was renamed, as when its folder was renamed, `write_up_opening_error` carries `git_detected_rename`: git's
42
+ match for the file, with its `to` path and `similarity`, as a member's missing file does. This tool does not read the
43
+ write-up there, since git's match can pair unrelated files: check it. When `recorded_at` has a `starting_at`,
44
+ `git_detected_rename` also carries `starting_at_found_in_rename`: whether `recorded_at`, moved to `to`, still finds its
45
+ `starting_at` exactly once, within its heading's section when it names one, as a member's passage must. false can mean
46
+ an unrelated file, or only a heading renamed there.
47
47
 
48
48
  To point `recorded_at` at a write-up that moved without a full audit, run `start-audit ID --write-ups`. Its request
49
49
  lists the principle's open findings, each as this command lists it. Answer `repoints`, one per finding, with the new
50
- `recorded_at`, or null to leave it, and a one-line `reason`. `submit-answer` checks that each new pointer is found,
51
- then changes only those pointers in the audit record, keeping beside each finding `repointed`: where it pointed
52
- before, where it points now, when and why. Its result lists the finding ids it `repointed` and those left
53
- `unchanged`, and under `other_write_ups_not_found` each other principle's finding whose write-up cannot be found, with
54
- the request that repoints each principle's. Commit the record. The finding stays open for the next full audit to decide.
55
- During a full audit, give the new `recorded_at` in that finding's `still_holds` decision instead. Do not edit the
56
- record by hand, since nothing would check the new pointer. It is refused with
57
- `cannot_repoint` while an audit is left open outside git, and before any audit completed; with `unknown_finding` for a
58
- finding that is not open, `duplicate_finding` for one named twice, `invalid_answer` for a new `recorded_at` without a
59
- `reason`, and `uncommitted_files` while its file differs from the last commit. `--member` with it is refused.
50
+ `recorded_at`, or null to leave it, and a one-line `reason`. `submit-answer` checks that each new pointer is found, then
51
+ changes only those pointers in the audit record, keeping beside each finding `repointed`: where it pointed before, where
52
+ it points now, when and why. Its result lists the finding ids it `repointed` and those left `unchanged`, and under
53
+ `other_write_ups_not_found` each other principle's finding whose write-up cannot be found, with the request that
54
+ repoints each principle's. Commit the record. The finding stays open for the next full audit to decide. During a full
55
+ audit, give the new `recorded_at` in that finding's `still_holds` decision instead. Do not edit the record by hand,
56
+ since nothing would check the new pointer. It is refused with `cannot_repoint` while an audit is left open outside git,
57
+ and before any audit completed; with `unknown_finding` for a finding that is not open, `duplicate_finding` for one named
58
+ twice, `invalid_answer` for a new `recorded_at` without a `reason`, and `uncommitted_files` while its file differs from
59
+ the last commit. `--member` with it is refused.
60
60
 
61
- `--short` is for a session-start hook, where an open finding would otherwise wait unseen until its principle's next
62
- full audit. It prints one line instead of JSON, and nothing at all when no finding is open, exiting 0 either way:
63
- how many findings are open, how many whole days the oldest has waited since its `first_raised_at`, that finding's
64
- principle and id, its `waits_on` when it has one, cut at a word within 80 characters with a parenthesis left open
65
- closed, how many of several have no `waits_on`, and the command that lists them. While any open finding's
66
- `write_up_opening_reason` is `unavailable`, the line also names that write-up, or the first of them with their
67
- count, so a pointer that no longer resolves is seen at session start. With `--session-start SOURCE`, one of
68
- `startup`, `resume`, `clear` and `compact` as Claude Code's SessionStart hook names them, the line for `clear` or
69
- `compact` says it returns after each clear or compaction too, asking at the next pause rather than before the user's
70
- first task; without it the line is worded for `startup`. For `resume`, whose conversation holds the line already, it
71
- gives only the findings and the command that prints it whole. The days run from `first_raised_at`, not `waits_on_since`, which dates only the ask. For a finding
72
- raised before this tool kept the field the days are a lower bound, as `first_raised_at` is. The principles
73
- plugin's session-start hook prints this line, passing its source.
61
+ `--lines` is for deciding whom to tell, as the session-start line asks: it prints each open finding on a line, its
62
+ principle, id, `waits on:` its `waits_on`, `waits on no one named`, or `accepted` for one that waits on no one by
63
+ design, and `open N days` since first raised, with no script over this JSON. It cannot be given with `--short`.
64
+
65
+ `--short` is for a session-start hook, where an open finding would otherwise wait unseen until its principle's next full
66
+ audit. It prints one line instead of JSON, and nothing at all when no finding is open, exiting 0 either way: how many
67
+ findings are open, how many whole days the oldest has waited since its `first_raised_at`, that finding's principle and
68
+ id, its `waits_on` when it has one, cut at a word within 80 characters with a parenthesis left open closed, how many of
69
+ several deferred ones have no `waits_on`, and the command that lists them. While any open finding's
70
+ `write_up_opening_reason` is `unavailable`, the line also names that write-up, or the first of them with their count, so
71
+ a pointer that no longer resolves is seen at session start. With `--session-start SOURCE`, one of `startup`, `resume`,
72
+ `clear` and `compact` as Claude Code's SessionStart hook names them, the line for `clear` or `compact` asks at the next
73
+ pause rather than before the user's first task; without it the line is worded for `startup`. For `resume`, whose
74
+ conversation holds the line already, it gives only the findings and the command that prints it whole. The days run from
75
+ `first_raised_at`, not `waits_on_since`, which dates only the ask. For a finding raised before this tool kept the field
76
+ the days are a lower bound, as `first_raised_at` is. The principles plugin's session-start hook prints this line,
77
+ passing its source.
@@ -0,0 +1,14 @@
1
+ Run by a hook after each shell call, not by the agent: when the call committed, it names the mapped members those
2
+ commits changed, and the host puts that beside the call's result. It reads the hook's JSON on stdin until stdin closes,
3
+ or until a second passes with nothing more, so a shell that leaves stdin open is not kept waiting; it reads nothing
4
+ from a terminal. It always exits 0, since a host shows the user an error on any other status and gives the agent
5
+ nothing; a failure prints one `principles:` line naming it.
6
+
7
+ It looks at the call's own directory first, then each directory its command changed into with `cd` or ran `git -C` in,
8
+ and reports on the first mapped repository whose HEAD a commit moved during the call: its HEAD reflog was written
9
+ since the call started, and not by a checkout or a reset, which bring in no new commit. The output is the hook's JSON,
10
+ whose `hookSpecificOutput.additionalContext` names each changed member and the `list-member-problems` command that
11
+ shows it, or prints nothing when the commits changed no mapped member. A call that committed nothing costs a few git
12
+ calls and loads nothing else of this tool. A host that gives no call duration, as Codex does not, is read as a call
13
+ that took no time, so a commit made more than a few seconds before a long call ended is left to the next session
14
+ start.
@@ -0,0 +1,26 @@
1
+ Run by a SessionStart hook, not by the agent: it prints what the agent should act on as a session starts, and the host
2
+ adds that to the agent's context. It reads the hook's JSON on stdin until stdin closes, or until a second passes with
3
+ nothing more, so a shell that leaves stdin open is not kept waiting; it reads nothing from a terminal. It always exits
4
+ 0, since a host adds a SessionStart hook's output to the context only on 0, and shows the user an error on any other
5
+ status. In a project with no maps it prints nothing.
6
+
7
+ Otherwise each line it prints starts `principles:`. The first, the meta-principle's reminder, says that what loads at
8
+ session start costs every session's context; a resumed session holds it already, so it is left out when the input's
9
+ `source` is `resume`. Input that is not JSON, or names no source a host sends, is read as a startup. Then one line for
10
+ each principle with a member an audit assessed that changed since, counting them, with the
11
+ `list-member-problems ID --short` command that lists them, and last where to start with them: the principles skill
12
+ under the plugin, else those commands. An edit to a member no audit has assessed is not counted here, since it
13
+ carries no verdict to act on. In git, a line follows for each principle with members no baseline holds yet, as a
14
+ session that ended mid-mapping leaves them, saying which files to commit, or the audit to run when every file is
15
+ committed already. Outside git only an audit gives a baseline, so that line would repeat at every
16
+ session, and is left out. Then a line for each principle whose audit record a later release of principles wrote: this
17
+ copy does not check its members, so none of them is counted, and the line says how to update. Then, while any
18
+ principle awaits its first full audit, one line counting them, naming none, asks the agent to tell the user and start
19
+ one background subagent to follow `show-first-audit-brief`, or to offer the audit at its next pause if it cannot.
20
+ At resume and compact, when one may be running already, it gives the count alone and asks for no second one.
21
+ Last, while any finding an audit deferred or accepted is open, the one line `list-open-findings --short` prints, worded
22
+ for the session's start, and short on resume, whose conversation holds the whole line already.
23
+
24
+ When the maps or members cannot be read, as `list-member-problems` would refuse, it prints instead the refusal's code
25
+ and that command, whose refusal says why and how to repair it, and still exits 0. Stdin that cannot be read is read as
26
+ empty input. Any other failure prints one `principles:` line naming it, and exits 0 too.
@@ -1,8 +1,8 @@
1
- Checks your answer to request REQUEST_ID exactly as `submit-answer` would, and writes nothing. It prints
2
- the refusal `submit-answer` would give, such as a passage that matches twice, or `answer_acceptable`
3
- with the files submitting would write. Use it instead of searching the project yourself before you
4
- submit. Pass `--file FILE`, naming the answer written to a FILE outside the project; `--file -` reads it from stdin
5
- instead. Its `next_action` ends with `submit-answer`, giving the same `--file` value again.
1
+ Checks your answer, to the request its `request_id` or REQUEST_ID names, as `submit-answer` would; writes nothing.
2
+ It prints the refusal `submit-answer` would give, such as a passage that matches twice, or `answer_acceptable`
3
+ with the files submitting would write. Use it instead of searching the project yourself before you submit. Pass
4
+ `--file FILE`, naming the answer written to a FILE outside the project; `--file -` reads it from stdin instead.
5
+ Its `next_action` ends with `submit-answer`, giving the same `--file` value again.
6
6
 
7
7
  The same current-ID history checks apply to assessment/correction answers with a Git base. For their
8
8
  `stale_request` and `git_history_unavailable` conditions and repairs:
@@ -23,24 +23,26 @@ sentence with hard-wrapped lines joined, or null with the reason. If that line i
23
23
  pointer before you submit. Nothing is shown until an answer writes a record, so in git a full audit's
24
24
  first appears at the answer that completes it.
25
25
 
26
- When a full audit's assessment has findings, `correction_template` is the correction's answer it leads to, with
27
- its `request_id` and the `basis` digests filled in, so you never copy them by hand. Save it to a file outside the
28
- project, such as under `$TMPDIR`, and fill only its `dispositions`: each `action` names the four actions and what
29
- each adds. Submit it after the assessment, as `next_action` says; outside git the assessment writes the open record
30
- the correction is checked against.
26
+ When a full audit's assessment carries a member forward whose kept assessment names a finding the answer decides
27
+ other than still_holds, `carried_assessments_citing_decided_findings` lists it with those `finding_ids`, as a fact
28
+ to judge before you submit: ids repeat across records, so nothing is refused.
31
29
 
32
- `correction_recovery` explains what to keep before changing members: the exact original assessment you submit,
33
- including its request_id and basis, and the returned correction packet with its response_template or
34
- correction_template. Save both outside the project before fixes. For `--file -`, retain the exact stdin bytes
35
- and supply them again. In Git, after submitting the assessment, recover a lost correction while its request
36
- inputs remain unchanged by checking the original assessment request with its original answer file again:
30
+ When a full audit's assessment sets a prior finding's `recorded_at` to null, `prior_findings_pointers_dropped`
31
+ names each finding whose write-up pointer that drops, with the pointer, so you confirm the drop is meant.
37
32
 
38
- `%{executable} show-answer-check ORIGINAL_ASSESSMENT_REQUEST_ID --file ORIGINAL_ASSESSMENT_FILE`
33
+ When a deferred finding the record keeps open gives `recorded_at` null, `next_action`'s first line names it: null
34
+ is allowed when there is nowhere to point, and then `list-open-findings` prints no write-up for it.
39
35
 
40
- The result gives the same correction_template and writes nothing. Changed audited members, a completed audit
41
- or a newer record can refuse replay; recovery after fixes is not promised. Preserve the correction packet
42
- before editing rather than starting a fresh assessment to reconstruct missing judgements. Outside Git, this
43
- replay route is not established; retain the original packets.
36
+ When a full audit's assessment has findings, `next_action` names the command that prints the correction's answer
37
+ it leads to, `--as template`, with its `request_id` and the `basis` digests filled in, so you never copy them by
38
+ hand; `show-open-correction ID` prints the same answer once the assessment is submitted. Redirect it to a file
39
+ outside the project, such as under `$TMPDIR`, and fill only its `dispositions`: each `action` names the four actions
40
+ and what each adds. Submit it after the assessment, as `next_action` says; the assessment writes the open record the
41
+ correction is checked against. `--as template` refuses with `no_correction_to_fill` an answer that leads to none.
42
+
43
+ `correction_recovery` says to keep a copy of the assessment you submit, or for `--file -` its exact stdin bytes,
44
+ until the correction completes the audit, and ends with `show-open-correction ID`, which prints the correction's
45
+ answer again from the open record once the assessment is submitted, in git or outside it and after fixes too.
44
46
 
45
47
  When a correction's fixed disposition lists `changed_map_entries`, `map_entry_changes` names each such member by
46
48
  `member_id`, under its id after any `moved_members`, with each of its `role` and `check` that changed since the
@@ -0,0 +1,19 @@
1
+ A principle's first full audit reads tens of kilobytes, which would crowd the context of a session busy with
2
+ its user's task. This command is for the background subagent that session starts to run that audit instead.
3
+ It writes nothing.
4
+
5
+ With no ID it lists, under `awaiting_first_audit`, the principles `list-member-problems` names as awaiting
6
+ a first full audit, and its `next_action` gives each one's brief command on a line of its own. Leave out any
7
+ your instructions or memory say to skip, and run one.
8
+
9
+ For principle ID it prints `principle`, `brief` and an empty `wrote`. The `brief` is what the subagent follows:
10
+ stop and say so if a principles command would ask the user's permission; read the request with
11
+ `start-audit ID --part index` and each part it names; fill the template `start-audit ID --as template` prints,
12
+ check it with `show-answer-check` and submit it with `submit-answer`; commit nothing and edit no member file,
13
+ in place of the completed result's commit step; and return at most about 600 bytes: a one-sentence conclusion,
14
+ each finding that needs the user, each path written, and the commands the completed result offers the user.
15
+ The session that started it commits the record by its path, or tells the user it is ready to commit.
16
+
17
+ It refuses with `first_audit_completed` once a full audit of principle ID has completed, since its later
18
+ audits start from `list-member-problems`; its repair names the command that lists the principles still
19
+ awaiting a first full audit.
@@ -0,0 +1,13 @@
1
+ Use it to give a project the reports the principles plugin's hooks give, when this tool is installed as a gem
2
+ without the plugin: at each session's start, what the agent should act on, and after each shell call that commits,
3
+ the mapped members the commit changed. Without them, a changed member goes unseen until someone runs
4
+ `list-member-problems`.
5
+
6
+ It writes nothing. First, when the `principles` on PATH is not this copy, `principles_on_path` says so: none there
7
+ prints its version, so every entry would print its failure line, or another version is first, which the entries would
8
+ run instead; show it to the user before the entries. It prints, under `hosts`, Claude Code's entries first, for its
9
+ gitignored `.claude/settings.local.json`, then Codex's, for `.codex/hooks.json`, each with the `file` they go in, why
10
+ the block is `offered`, and the `entries` to merge into its `hooks`. Each entry runs `principles` as found on PATH,
11
+ so an upgrade leaves it unchanged, and echoes that principles failed to start when it cannot run, instead of failing
12
+ the hook. `next_action` says to write them only once the user agrees, and how to remove them: delete the entries
13
+ whose command starts `principles report-`, as when the plugin is enabled, since the reports would come twice.
@@ -25,7 +25,9 @@ it has no import, since its text was not read. `passage` gives the passage's tex
25
25
  `estimated_tokens`, since it loads in every session, and `presumes` says what it asks of a teammate without
26
26
  `principles`. `runs_from` says whether this run came from the Claude Code plugin or from the command line, and
27
27
  `session_start_hook_in_this_session` whether the plugin's session-start hook, which reports changed members, runs
28
- in the session this run is part of. Neither says anything of a teammate's sessions, which this tool cannot see, so
28
+ in the session this run is part of. While it does not, `hook_setup` names `show-hook-setup`, which prints the hook
29
+ entries that report changed members without the plugin. Neither says anything of a teammate's sessions, which this
30
+ tool cannot see, so
29
31
  weigh with the user who the passage serves.
30
32
 
31
33
  Run again before the passage is mapped, it proposes the same again. Where the map is already there, it shows the map
@@ -0,0 +1,12 @@
1
+ Prints the answer to fill for the correction a full audit's assessment with findings opened, which
2
+ `submit-answer` names rather than prints. Print it again whenever you lose it; you need not submit the assessment
3
+ again. It reads principle ID's open audit record and writes nothing.
4
+
5
+ It prints the correction's answer alone: its `request_id` and `basis`, which you hand back unchanged, and one disposition for each finding to fill.
6
+ Redirect it to a file outside the project, such as under `$TMPDIR`, fill only its `dispositions`, and
7
+ submit it with `submit-answer --file FILE`. It prints the same answer in git and outside it, and still
8
+ after you fix members, which leaves the correction current; `submit-answer` checks it as usual.
9
+
10
+ It refuses with `no_open_correction` while none is open to print. With no audit open, or only a completed
11
+ one, its repair names the full audit to start. With an audit open whose record an earlier release wrote,
12
+ which keeps no correction, it says to submit the assessment again, which prints its correction and keeps it.
@@ -1,13 +1,16 @@
1
- Asks you to assess every member of principle ID and the set as a whole. Run it after mapping, and again when
2
- `show-principle` reports a member changed, unassessed, locator_lost or unavailable.
1
+ Asks you to assess every member of principle ID and the set as a whole. Run it after mapping and when `show-principle`
2
+ reports a member changed, unassessed, locator_lost or unavailable. `--part PART` prints one part, a member's with its
3
+ `text` and `lines_in_text`, an instruction or `response_template` as printed (`part_empty` if empty), `--as template
4
+ --part members/ID` a slot; `--part index` lists `part_command`, each one's `bytes`, whether `this_audit` `judges` or
5
+ `carries_forward` a member, as `read_in_parts` says, `trimmed_instructions`, then `answer_with` and the `next_action`.
3
6
 
4
7
  `start-audit` itself writes nothing. `submit-answer` writes the audit record, `.principles/audits/ID.json`: a full audit
5
- writes it completed when its assessment has no findings or its correction is accepted. In git, commit the record each
6
- time it is written, as `files_to_commit` lists it. In a full audit, make each fix after the assessment is accepted and
7
- before you submit the correction that reports it, or the assessment is refused as `stale_request`, as is an edited
8
- `basis`, whose `basis.last_completed_revision` names the record it follows, or null for none. The audit judges the text
9
- now: a problem no completed audit recorded and fixed before `start-audit` is not recorded, and a deferred or accepted
10
- finding fixed since is decided `resolved`. To record one, commit a revert, run the audit, and redo it in the correction.
8
+ writes it open when its assessment has findings, completed once it has none or its correction is accepted. In git,
9
+ commit each completed record, as `files_to_commit` lists it. In a full audit, make each fix after the assessment is
10
+ accepted and before you submit the correction that reports it, or the assessment is refused as `stale_request`, as is an
11
+ edited `basis`, whose `basis.last_completed_revision` names the record it follows. The audit judges the text now: a
12
+ problem no completed audit recorded and fixed before `start-audit` is not recorded, and a deferred or accepted finding
13
+ fixed since is decided `resolved`. To record one, commit a revert, run the audit, and redo it in the correction.
11
14
 
12
15
  It refuses with `broken_members` while a member cannot be found or read, grouped by file in `missing_files`. A checked
13
16
  member carries `check_since_last_audit`, and `check_hidden_characters` if its check hides any. `mapped_elsewhere` shows
@@ -17,8 +20,6 @@ other principles' members on its lines, judged by `mapped_elsewhere_instruction`
17
20
  changed or untracked files, `not_named` the rest. `--instruction FIELD` prints whole any `trimmed_instructions` lists. A
18
21
  meta-principle audit adds `package_since_last_audit`, `passage_changed` and `other_principles_with_unjudged_changes`.
19
22
 
20
- ## Since the last full audit
21
-
22
23
  After a full audit, a member carries `carried_forward`, with its `assessed_at`, an observed one's `observed_at` (or
23
24
  `observed_at_from_assessed_at`), `evidence_changed` and, in git, `file_changed_outside_member`, or `judge_because` with
24
25
  `read_the_change`, a moved one `moved_from`; a carried one prints whole if a fact fires or a finding is open on it;
@@ -40,29 +41,27 @@ lost item. Decide each in `prior_finding_decisions` as `still_holds`, `resolved`
40
41
  ## Members to check against the activation
41
42
 
42
43
  When the principle's activation is a set of files, `context.loads_to_check_against_activation` lists each member whose
43
- file Claude Code loads at session start, with its `loads` and `listed_for`, to weigh whether a principle meant for that
44
- work loads in every session; this tool compares no globs, and `not_listed_no_known_carrier` names the members this tool
45
- knows no carrier for. Decide every row in `loading_decisions`, as `context.loads_to_check_instruction` explains, or this
46
- tool refuses it with `incomplete_loading_decisions`. The record keeps an accepted decision as `loading_accepted`, which
47
- the next audit shows as `last_accepted`, with `last_accepted.since_accepted` and whether `member_text` or `loading`
48
- changed. Not listed yet: members loading on files, skills or agents, members this tool could not determine, members a
49
- hook names, and anything under an invoked or always activation or in a one-member audit.
44
+ file Claude Code loads at session start, with its `loads` and `listed_for`, for you to weigh; this tool compares no
45
+ globs, and `not_listed_no_known_carrier` names those with no known carrier. Decide each row in `loading_decisions` as
46
+ `context.loads_to_check_instruction` explains, or it is refused as `incomplete_loading_decisions`. An accepted decision
47
+ is kept as `loading_accepted`, which the next audit shows as `last_accepted`, with `last_accepted.since_accepted` and
48
+ whether `member_text` or `loading` changed. Not listed yet: members loading on files, skills or agents, ones a hook
49
+ names or this tool could not determine, and any under an invoked or always activation or in a one-member audit.
50
50
 
51
51
  ## One member's edit: `--member`
52
52
 
53
53
  Use `--member MEMBER` when one member was edited but still says the same thing, as `list-member-problems --help`
54
- describes; without it, `list-member-problems --short` repeats the edit until a full audit. Its request shows the
55
- `baseline_commit` it was last judged at, `member_lines` then and now (or a large member's `changed_region`,
56
- `context_lines` and `from_line`, or `read_instead`), `first_changed_lines`, `read_the_change`, `check_instruction` and
57
- the member's `deferred_findings` and `accepted_findings`; its `question` asks for `meaning_kept`. This tool checks both
58
- quotes. An id near a mapped one is refused with `unknown_member`, naming it under `did_you_mean`. A one-member audit
59
- writes the record once its answer is accepted, keeping the edit in its `acknowledgements`; commit it. It is refused with
60
- `cannot_acknowledge` outside git, while an audit is open, and for a member no completed audit assessed, whose baseline
61
- text does not match the audit record, whose check is not the one that audit ran, or whose `check_result` is not a pass:
62
- run a full audit. A member moved with `move-member` since its baseline carries `evidence_at_baseline`, and one the last
54
+ describes, or `list-member-problems --short` repeats it until a full audit. It shows `baseline_commit`, `member_lines`
55
+ (or a large member's `changed_region` or `changed_regions`, `context_lines`, `from_line`, `unchanged_lines_skipped` or
56
+ `read_instead`), `first_changed_lines`, `read_the_change`, `check_instruction`, its `deferred_findings` and
57
+ `accepted_findings`, with `deferred_findings_kept` and `change_shown_under` across principles; its `question` asks for
58
+ `meaning_kept`. This tool checks both quotes. A near-miss id is refused as `unknown_member` with `did_you_mean`. A
59
+ one-member audit writes the record once its answer is accepted, keeping the edit in `acknowledgements`; commit it. It is
60
+ refused as `cannot_acknowledge` outside git, while an audit is open, and for a member no completed audit assessed, whose
61
+ baseline text does not match the audit record, whose check is not the one that audit ran, or whose `check_result` is not
62
+ a pass: run a full audit. A member moved with `move-member` since its baseline carries `evidence_at_baseline`, and one a
63
63
  full audit's correction fixed carries `audit_base_commit`: judge only the change since `baseline_commit`.
64
64
 
65
65
  ## Outside git
66
66
 
67
- In a project outside git, an assessment with findings writes an open record, which the accepted correction completes.
68
- Until then it keeps the prior findings to list again; one opened by an older version of this tool kept none.
67
+ Outside git, the open record also keeps what the audit began from and, until its correction completes, prior findings.
@@ -1,53 +1,54 @@
1
- Gives your answer to request REQUEST_ID from its `response_template`. Pass a JSON FILE outside the project with
2
- `--file FILE`; `--file -` reads stdin. This tool writes audit records at `.principles/audits/ID.json`, never member
3
- guidance. In a full audit, make each fix after the assessment is accepted and before you submit the correction that
4
- reports it; earlier fixes cause `stale_request` before an assessment's shape check. A completed full audit or
5
- acknowledgement after an assessment/correction request causes `audit_completed_since_request`, protecting the newer
6
- record and its findings: run `list-open-findings ID`, then start again. Keep `basis` unchanged;
7
- `last_completed_revision` identifies its preceding record. An identical completed-answer retry writes nothing; an
8
- assessment whose correction completed is refused.
1
+ Gives your answer, filled from its template, to the request its `request_id` names; a REQUEST_ID you give must
2
+ match. Pass a JSON FILE outside the project with `--file FILE`; `--file -` reads stdin. This tool writes audit records
3
+ at `.principles/audits/ID.json`, never member guidance. In a full audit, make each fix after the assessment is accepted
4
+ and before you submit the correction that reports it; earlier fixes cause `stale_request` before an assessment's shape
5
+ check. A completed full audit or acknowledgement after an assessment/correction request causes
6
+ `audit_completed_since_request`, protecting the newer record and its findings: run `list-open-findings ID`, then start
7
+ again. Keep `basis` unchanged; `last_completed_revision` identifies its preceding record. An identical completed-answer
8
+ retry writes nothing; an assessment whose correction completed is refused.
9
9
 
10
10
  After prior request checks, a Git-based assessment/correction expires at a committed current-ID map gap on captured
11
11
  HEAD's first-parent line (`stale_request`), even after identical recreation; start anew. Unrelated commits are allowed.
12
12
  Unverifiable continuity (missing history/tree or base off that line) gives `git_history_unavailable`: restore complete
13
13
  history/access or start a new audit on this branch. Requests with no Git base keep their existing behavior.
14
14
 
15
- An observed assessment may give `observed_at`, the sighting's UTC time (for example `2026-11-01T09:30:00Z`); absent or
16
- null uses this audit's time. When the sighting is a dated record you read during this audit, `observed_at` is the
17
- record's date, not when you read it. Wrong format, dates after the answer or any date on not_observed, even null,
18
- cause `invalid_answer`. An observation judged afresh that copies the last audit word-for-word causes
19
- `observation_repeats_last_audit` unless `observed_at` matches that sighting or is null. Keep its date for a retained
20
- sighting; reword a later one, using null for this audit. Reworded text is not judged. An evidence/`recorded_at`
21
- location refusal (such as `ambiguous_passage`) or `check_result` refusal (`invalid_check_result`) retains its code,
22
- any `path` and repair, names whose evidence/check failed, and gives `fields` with each `problem` and JSON `pointer`
23
- into your answer. `invalid_answer` names fields ending in another template's placeholder; use this template or reword
24
- the ending. Set correction `action` to fixed, deferred, accepted or disagreed; else `invalid_disposition` names the
25
- finding. A deferred disposition may give `waits_on`, one line naming whom it waits on and to decide what, printed by
26
- `list-open-findings`. Null is allowed on any action; text on another action or multiple lines causes
27
- `invalid_disposition`. The tool records when it was asked; never send that time. For a legacy prior finding,
28
- `still_holds` may supply `first_raised_at` (that audit's `audited_at`) and `raised_in` (full commit sha) together.
29
- Only that commit's `.principles/audits/ID.json` or earlier `.memeplex/audits/ID.json` is read; it must leave the same
30
- finding deferred/accepted. Judge identity yourself. Refusals explain repairs: `raised_in_not_found` (also outside
31
- git), `raised_in_unreadable`, `raised_in_lacks_finding`, `raised_in_time_differs`, `first_raised_not_earlier` (date
32
- must precede stored time). Completed full audits list own/kept deferred or accepted IDs in `open_findings`,
15
+ An observed assessment may give `observed_at`, the sighting's time to the second (for example `2026-11-01T09:30:00Z`, or
16
+ with an offset such as `+05:30`, kept as the same instant in UTC); absent or null uses this audit's time. When the
17
+ sighting is a dated record you read during this audit, `observed_at` is the record's date, not when you read it. Wrong
18
+ format, dates after the answer or any date on not_observed, even null, cause `invalid_answer`. An observation judged
19
+ afresh that copies the last audit word-for-word causes `observation_repeats_last_audit` unless `observed_at` matches
20
+ that sighting or is null. Keep its date for a retained sighting; reword a later one, using null for this audit. Reworded
21
+ text is not judged. An evidence/`recorded_at` location refusal (such as `ambiguous_passage`) or `check_result` refusal
22
+ (`invalid_check_result`) retains its code, any `path` and repair, names whose evidence/check failed, and gives `fields`
23
+ with each `problem` and JSON `pointer` into your answer. `invalid_answer` names fields ending in another template's
24
+ placeholder; use this template or reword the ending. Set correction `action` to fixed, deferred, accepted or disagreed;
25
+ else `invalid_disposition` names the finding. A deferred disposition may give `waits_on`, one line naming whom it waits
26
+ on and to decide what, printed by `list-open-findings`. Null is allowed on any action; text on another action or
27
+ multiple lines causes `invalid_disposition`. The tool records when it was asked; never send that time. For a legacy
28
+ prior finding, `still_holds` may supply `first_raised_at` (that audit's `audited_at`) and `raised_in` (full commit sha)
29
+ together. Only that commit's `.principles/audits/ID.json` or earlier `.memeplex/audits/ID.json` is read; it must leave
30
+ the same finding deferred/accepted. Judge identity yourself. Refusals explain repairs: `raised_in_not_found` (also
31
+ outside git), `raised_in_unreadable`, `raised_in_lacks_finding`, `raised_in_time_differs`, `first_raised_not_earlier`
32
+ (date must precede stored time). Completed full audits list own/kept deferred or accepted IDs in `open_findings`,
33
33
  fixed/resolved IDs in `resolved_findings`, and each closed prior finding's decision/reason in `prior_findings_closed`.
34
- Disagreed/withdrawn findings are in neither open nor resolved. In git, `commits_since_base` lists commits touching
35
- each member's file; uncommitted fixes have an empty list. `files_to_commit` lists their files; `commit_with` commits
36
- only those, stopping during an unfinished merge. Replace its `-m` default as `commit_message_to_replace` says.
37
- `cited_files_missing` lists missing cited files excluded from `files_to_commit`; record references remain. If HEAD
38
- moved without touching a member, `head_moved_past_base` gives `base_commit` and `head`. If its fixes changed a file
39
- another principle also maps, `other_principles_with_changed_members` names each such principle and its members in
40
- fixed findings' files, by `id` with the `state` `list-member-problems` gives: `changed` when its text now differs from
41
- its baseline, or `locator_lost` or `unavailable` when the fix broke where this tool finds it, which its `repair_with`
42
- on `show-principle ID` repairs. Then re-audit that principle, or acknowledge a member's edit with `start-audit ID
43
- --member MEMBER`. A changed file no fixed finding names is not checked. `correction_recovery` says what to retain
44
- before fixes; see `show-answer-check --help` for unchanged-input Git replay.
34
+ Disagreed/withdrawn findings are in neither open nor resolved. In git, `commits_since_base` lists commits touching each
35
+ member's file; uncommitted fixes have an empty list. `files_to_commit` lists their files; `commit_with` commits only
36
+ those, stopping during an unfinished merge. Replace its `-m` default as `commit_message_to_replace` says.
37
+ `cited_files_missing` lists missing cited files excluded from `files_to_commit`; record references remain. If HEAD moved
38
+ without touching a member, `head_moved_past_base` gives `base_commit` and `head`. If its fixes changed a file another
39
+ principle also maps, `other_principles_with_changed_members` names each such principle and its members in fixed
40
+ findings' files, by `id` with the `state` `list-member-problems` gives: `changed` when its text now differs from its
41
+ baseline, or `locator_lost` or `unavailable` when the fix broke where this tool finds it, which its `repair_with` on
42
+ `show-principle ID` repairs. Then re-audit that principle, or acknowledge a member's edit with `start-audit ID --member
43
+ MEMBER`. A changed file no fixed finding names is not checked. A correction's `next_action` names `show-open-correction
44
+ ID`, printing its answer, not in this result, to save, edit by hand and submit. `correction_recovery` says
45
+ what to retain; `show-answer-check --help` covers `carried_assessments_citing_decided_findings`.
45
46
 
46
47
  In git, this tool reads the map at the audit base: fixed dispositions declare roles/checks in `changed_map_entries`,
47
48
  text/additions in `changed_members`, removals in `removed_members`. `invalid_removed_members` rejects invalid removal
48
49
  claims; `empty_correction_map` requires a survivor/replacement. Source files stay intact.
49
50
  `claimed_change_missing` rejects unchanged entries; `members_added_awaiting_assessment` lack baselines.
50
- Role/removal claims require git (`map_entries_need_git`). Full rules: correction question and `show-answer-check --help`.
51
+ Role/removal claims require git (`map_entries_need_git`). Full rules: correction question, `show-answer-check --help`.
51
52
 
52
53
  For a `start-audit --member` request, `quote_not_found` refuses an `old_line` or `new_line` not a line only its side
53
54
  holds, or "" where `first_changed_lines` is not, and one left out reads as printed; else it prints `acknowledged`.
@@ -2,5 +2,5 @@ Before using this recipe, inspect the diff for every file in `files_to_commit` a
2
2
  each change is authorized and respects its ownership. Listing a file here grants no permission.
3
3
  Follow the project's existing review, verification and commit-message rules.
4
4
 
5
- Commit %{files}, and nothing else staged, with the command that ends this line, after replacing its default `-m`
6
- message as `commit_message_to_replace` says. Commit with: %{command}
5
+ Commit %{files}, and nothing else staged, with the `commit_with` command, after replacing its default `-m`
6
+ message as `commit_message_to_replace` says.
@@ -0,0 +1,18 @@
1
+ Run the first full audit of %{id} in the background.
2
+
3
+ 1. If a principles command would ask the user's permission, run none and return only: offer this audit to the user
4
+ at a pause, since principles would ask.
5
+
6
+ 2. Read the request in parts, which costs about the bytes of the whole request and its member files. Type
7
+ part_command and then the part as printed, never in a shell variable. Its parts: %{index}
8
+
9
+ 3. Keep every answer file at $TMPDIR/principles-%{id}-answer.json, never in the project. Redirect the template
10
+ below there and edit it, running each member check the request names and no script over this output.
11
+ Check it with show-answer-check, then submit-answer, each with --file and that path; answer a
12
+ correction the same way. On a stale_request refusal, start once more. Its template: %{template}
13
+
14
+ 4. Skip the completed result's commit and report: commit nothing, edit no member file.
15
+
16
+ 5. Return at most 600 bytes, nothing else: a sentence on whether the members carry %{id}; a line per finding that
17
+ needs the user, its id and question; each path under wrote, from the project root; each command next_action offers
18
+ the user, a line each, from its subcommand on.
@@ -0,0 +1,2 @@
1
+ Without the principles plugin no hook reports changed members, so to show the user the hook entries that report them
2
+ as a session starts and after a commit: %{command}
@@ -0,0 +1,8 @@
1
+ Show the user the entries for the host this session runs in, and the file they go in, and write them, merged into
2
+ any hooks the file already has, only once the user agrees. Leave them out of a committed settings file unless
3
+ every teammate has principles installed, since each hook would fail for one who has not. Codex runs them only once
4
+ the user trusts them in /hooks.
5
+
6
+ They run the session-start and after-commit reports that the principles plugin's hooks run. To remove them, as when
7
+ the principles plugin is enabled and the reports would come twice, delete the entries whose command starts
8
+ `principles report-`.
@@ -1,5 +1,4 @@
1
- %{findings}.%{without_waits_on}%{write_ups} %{returns} until a full audit decides %{them}.
2
- %{when} list %{them}, then raise in one short message any waiting on the user or no one named. Judge by
3
- context, such as git's user name, whether a named person is your user; if unsure, raise it. Do not raise any
4
- waiting on someone else, or that you can see you raised in this conversation. To see whom %{each} waits on, run
1
+ %{findings}.%{no_one_named}%{write_ups} %{when} raise in one short message only those waiting on your user or
2
+ no one named, and not any this conversation shows you raised. Judge from context, such as git's user name, whether a
3
+ named person is your user; if unsure, raise it. Whom %{each} waits on:
5
4
  %{command}