principles 0.1.3 → 0.1.5

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 (312) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +151 -1
  3. data/README.md +10 -6
  4. data/exe/principles +1 -1
  5. data/lib/principles/cli.rb +9 -10
  6. data/lib/principles/command_line.rb +15 -6
  7. data/lib/principles/command_routes.rb +18 -2
  8. data/lib/principles/controllers/acknowledgement.rb +19 -4
  9. data/lib/principles/controllers/acknowledgements.rb +43 -12
  10. data/lib/principles/controllers/after_commit_report.rb +15 -2
  11. data/lib/principles/controllers/assessment.rb +7 -3
  12. data/lib/principles/controllers/audit.rb +17 -8
  13. data/lib/principles/controllers/audit_completion.rb +34 -9
  14. data/lib/principles/controllers/carrier_edit_report.rb +40 -0
  15. data/lib/principles/controllers/carrier_practices.rb +26 -0
  16. data/lib/principles/controllers/command.rb +36 -5
  17. data/lib/principles/controllers/context_budget.rb +61 -0
  18. data/lib/principles/controllers/correction.rb +15 -5
  19. data/lib/principles/controllers/full_audit_request.rb +38 -42
  20. data/lib/principles/controllers/inventory.rb +78 -71
  21. data/lib/principles/controllers/last_record_notice_beside.rb +51 -0
  22. data/lib/principles/controllers/member_addition.rb +20 -5
  23. data/lib/principles/controllers/member_entries.rb +50 -39
  24. data/lib/principles/controllers/member_entry_changes.rb +71 -0
  25. data/lib/principles/controllers/member_problems_report.rb +26 -6
  26. data/lib/principles/controllers/members_a_commit_changed.rb +14 -5
  27. data/lib/principles/controllers/members_in_logged_requests.rb +52 -0
  28. data/lib/principles/controllers/members_to_assess.rb +35 -8
  29. data/lib/principles/controllers/meta_principle_setup.rb +12 -4
  30. data/lib/principles/controllers/open_correction.rb +3 -2
  31. data/lib/principles/controllers/parts_to_read.rb +48 -6
  32. data/lib/principles/controllers/plugin_member_addition.rb +48 -0
  33. data/lib/principles/controllers/principle_listing.rb +84 -0
  34. data/lib/principles/controllers/request_logging.rb +65 -0
  35. data/lib/principles/controllers/running_tool.rb +55 -15
  36. data/lib/principles/controllers/session_start_report.rb +26 -2
  37. data/lib/principles/data/branches_bringing_in.rb +52 -0
  38. data/lib/principles/data/captured_requests.rb +118 -0
  39. data/lib/principles/data/carrier_page_markers.rb +38 -0
  40. data/lib/principles/data/changes_since.rb +56 -0
  41. data/lib/principles/data/claude_code_home.rb +75 -0
  42. data/lib/principles/data/command-steps.json +139 -23
  43. data/lib/principles/data/decoded_leaf.rb +63 -0
  44. data/lib/principles/data/head_reflog.rb +13 -2
  45. data/lib/principles/data/kept_line.rb +39 -0
  46. data/lib/principles/data/known_marketplaces.rb +50 -0
  47. data/lib/principles/data/logged_request_matches.rb +144 -0
  48. data/lib/principles/data/logged_request_scan.rb +188 -0
  49. data/lib/principles/data/map_files.rb +18 -4
  50. data/lib/principles/data/plugin_folder.rb +85 -0
  51. data/lib/principles/data/plugin_registry.rb +73 -0
  52. data/lib/principles/data/principles_store.rb +49 -0
  53. data/lib/principles/data/project_files.rb +15 -0
  54. data/lib/principles/data/ran.rb +25 -0
  55. data/lib/principles/data/raw_request_filter.rb +61 -0
  56. data/lib/principles/data/repository.rb +29 -27
  57. data/lib/principles/data/request_logging_folder.rb +135 -0
  58. data/lib/principles/data/request_shape.rb +33 -0
  59. data/lib/principles/data/running_version.rb +1 -1
  60. data/lib/principles/data/schemas/acknowledgement-answer.schema.json +16 -1
  61. data/lib/principles/data/schemas/acknowledgements-answer.schema.json +16 -1
  62. data/lib/principles/data/schemas/assessment-answer.schema.json +8 -0
  63. data/lib/principles/data/schemas/command-steps.schema.json +1 -1
  64. data/lib/principles/data/schemas/correction-answer-guide.schema.json +2 -1
  65. data/lib/principles/data/schemas/correction-answer.schema.json +14 -0
  66. data/lib/principles/data/schemas/member-map.schema.json +12 -1
  67. data/lib/principles/data/settings_env_keys.rb +26 -0
  68. data/lib/principles/data/string_counts.rb +39 -0
  69. data/lib/principles/data/tools_on_path.rb +25 -0
  70. data/lib/principles/data/user_request_logging_folder.rb +73 -0
  71. data/lib/principles/invocation_options.rb +5 -3
  72. data/lib/principles/launch.rb +29 -10
  73. data/lib/principles/models/acknowledged_check.rb +11 -1
  74. data/lib/principles/models/acknowledgement.rb +5 -0
  75. data/lib/principles/models/acknowledgement_refusal.rb +20 -11
  76. data/lib/principles/models/acknowledgements_to_offer.rb +86 -0
  77. data/lib/principles/models/after_commit_input.rb +5 -0
  78. data/lib/principles/models/answer_fields.rb +3 -0
  79. data/lib/principles/models/assessment_basis.rb +10 -3
  80. data/lib/principles/models/audit.rb +10 -10
  81. data/lib/principles/models/audit_record.rb +10 -0
  82. data/lib/principles/models/audit_records.rb +4 -3
  83. data/lib/principles/models/audit_start.rb +9 -0
  84. data/lib/principles/models/authored_locator.rb +33 -0
  85. data/lib/principles/models/candidate_files.rb +23 -3
  86. data/lib/principles/models/candidate_outline.rb +18 -125
  87. data/lib/principles/models/captured_sessions.rb +166 -0
  88. data/lib/principles/models/carrier_edit_input.rb +56 -0
  89. data/lib/principles/models/carrier_kind.rb +79 -0
  90. data/lib/principles/models/carrier_pages_shown.rb +28 -0
  91. data/lib/principles/models/carved_message_bytes.rb +115 -0
  92. data/lib/principles/models/cited_files.rb +12 -3
  93. data/lib/principles/models/context_parts.rb +59 -0
  94. data/lib/principles/models/decided_prior_findings.rb +5 -0
  95. data/lib/principles/models/declared_map_changes.rb +22 -13
  96. data/lib/principles/models/disposition.rb +37 -6
  97. data/lib/principles/models/disposition_placeholders.rb +12 -0
  98. data/lib/principles/models/disposition_text_field.rb +4 -0
  99. data/lib/principles/models/dropped_thinking.rb +73 -0
  100. data/lib/principles/models/feature.rb +54 -0
  101. data/lib/principles/models/finding_outcomes.rb +55 -0
  102. data/lib/principles/models/findings_left_open.rb +9 -11
  103. data/lib/principles/models/head_moves.rb +27 -10
  104. data/lib/principles/models/installed_component.rb +55 -0
  105. data/lib/principles/models/installed_plugins.rb +174 -0
  106. data/lib/principles/models/kept_sessions.rb +34 -0
  107. data/lib/principles/models/locator.rb +8 -0
  108. data/lib/principles/models/logged_request_reach.rb +52 -0
  109. data/lib/principles/models/logged_request_scan_completeness.rb +43 -0
  110. data/lib/principles/models/map_format_raise.rb +28 -0
  111. data/lib/principles/models/mapped_baseline.rb +46 -0
  112. data/lib/principles/models/mapped_principles.rb +2 -1
  113. data/lib/principles/models/maps_holding_file_whole.rb +42 -0
  114. data/lib/principles/models/markdown_text.rb +143 -0
  115. data/lib/principles/models/member.rb +19 -1
  116. data/lib/principles/models/member_entry.rb +56 -0
  117. data/lib/principles/models/member_justification.rb +52 -0
  118. data/lib/principles/models/member_lines.rb +11 -0
  119. data/lib/principles/models/member_loads.rb +17 -2
  120. data/lib/principles/models/member_problems.rb +46 -42
  121. data/lib/principles/models/member_reach.rb +59 -0
  122. data/lib/principles/models/member_snapshots.rb +34 -4
  123. data/lib/principles/models/member_text_as_sent.rb +31 -0
  124. data/lib/principles/models/member_texts.rb +45 -0
  125. data/lib/principles/models/members_by_part.rb +67 -0
  126. data/lib/principles/models/members_in_logged_requests.rb +279 -0
  127. data/lib/principles/models/meta_principle.rb +4 -4
  128. data/lib/principles/models/missing_files.rb +41 -16
  129. data/lib/principles/models/nearly_matching_maps.rb +56 -0
  130. data/lib/principles/models/open_correction.rb +5 -0
  131. data/lib/principles/models/open_finding.rb +4 -3
  132. data/lib/principles/models/outline_budget.rb +10 -1
  133. data/lib/principles/models/outline_item.rb +25 -0
  134. data/lib/principles/models/outline_section.rb +15 -4
  135. data/lib/principles/models/part_named.rb +16 -2
  136. data/lib/principles/models/part_token_estimates.rb +60 -0
  137. data/lib/principles/models/plugin_component.rb +37 -0
  138. data/lib/principles/models/plugin_enabled_in_project_settings.rb +61 -0
  139. data/lib/principles/models/plugin_install.rb +33 -0
  140. data/lib/principles/models/plugin_name.rb +23 -0
  141. data/lib/principles/models/plugin_reference.rb +53 -0
  142. data/lib/principles/models/principle.rb +7 -4
  143. data/lib/principles/models/principle_members.rb +22 -0
  144. data/lib/principles/models/prior_finding_decision.rb +1 -1
  145. data/lib/principles/models/prior_finding_outcomes.rb +12 -1
  146. data/lib/principles/models/problem_report.rb +14 -25
  147. data/lib/principles/models/project.rb +51 -56
  148. data/lib/principles/models/project_harness.rb +48 -0
  149. data/lib/principles/models/project_history.rb +19 -5
  150. data/lib/principles/models/recorded_members.rb +7 -0
  151. data/lib/principles/models/report_hooks.rb +9 -4
  152. data/lib/principles/models/request_channel.rb +62 -0
  153. data/lib/principles/models/request_kind.rb +62 -0
  154. data/lib/principles/models/request_logging.rb +231 -0
  155. data/lib/principles/models/request_logging_guard.rb +84 -0
  156. data/lib/principles/models/request_time.rb +46 -0
  157. data/lib/principles/models/runs_from.rb +0 -5
  158. data/lib/principles/models/script_comments.rb +58 -0
  159. data/lib/principles/models/session_registry.rb +61 -0
  160. data/lib/principles/models/session_start_input.rb +11 -2
  161. data/lib/principles/models/session_trend.rb +36 -0
  162. data/lib/principles/models/stale_request.rb +9 -0
  163. data/lib/principles/models/turn_opening.rb +83 -0
  164. data/lib/principles/models/turn_position.rb +43 -0
  165. data/lib/principles/models/unfixed_part.rb +82 -0
  166. data/lib/principles/models/unresolved_plugin_members.rb +35 -0
  167. data/lib/principles/models/user_logged_requests.rb +90 -0
  168. data/lib/principles/models/user_settings_entries.rb +49 -0
  169. data/lib/principles/models/whole_file_member_read.rb +48 -0
  170. data/lib/principles/models/without_prose.rb +20 -0
  171. data/lib/principles/models/workflow_jobs.rb +92 -0
  172. data/lib/principles/show_members_in_logged_requests_options.rb +27 -0
  173. data/lib/principles/show_principle_options.rb +32 -0
  174. data/lib/principles/version.rb +2 -2
  175. data/lib/principles/views/acknowledged_result.rb +31 -12
  176. data/lib/principles/views/acknowledgement_result.rb +18 -13
  177. data/lib/principles/views/acknowledgement_template_alone.rb +55 -0
  178. data/lib/principles/views/acknowledgements_offered.rb +54 -0
  179. data/lib/principles/views/added_member.rb +22 -6
  180. data/lib/principles/views/answer_in_a_file.rb +15 -15
  181. data/lib/principles/views/assessed_members.rb +19 -8
  182. data/lib/principles/views/assessment_request.rb +14 -6
  183. data/lib/principles/views/audit_changes.rb +14 -8
  184. data/lib/principles/views/audit_findings.rb +34 -0
  185. data/lib/principles/views/audit_result.rb +26 -24
  186. data/lib/principles/views/candidate_files_result.rb +1 -1
  187. data/lib/principles/views/carrier_checks.rb +40 -0
  188. data/lib/principles/views/carrier_edit_denial.rb +36 -0
  189. data/lib/principles/views/carrier_practices_page.rb +49 -0
  190. data/lib/principles/views/completed_audit_findings.rb +33 -0
  191. data/lib/principles/views/completed_audit_next_step.rb +12 -4
  192. data/lib/principles/views/consecutive_sections_elsewhere.rb +4 -0
  193. data/lib/principles/views/context_budget_result.rb +99 -0
  194. data/lib/principles/views/context_parts.rb +129 -25
  195. data/lib/principles/views/correction_request.rb +32 -17
  196. data/lib/principles/views/disposition_template.rb +35 -0
  197. data/lib/principles/views/first_audit.rb +29 -15
  198. data/lib/principles/views/first_audit_line.rb +4 -5
  199. data/lib/principles/views/hook_setup_result.rb +3 -1
  200. data/lib/principles/views/invocation.rb +14 -5
  201. data/lib/principles/views/last_record_notice.rb +41 -0
  202. data/lib/principles/views/lines_shared_with_member.rb +16 -22
  203. data/lib/principles/views/logged_request_status_meanings.rb +29 -0
  204. data/lib/principles/views/logged_requests_evidence.rb +84 -0
  205. data/lib/principles/views/map_added_to.rb +14 -12
  206. data/lib/principles/views/map_format_raised.rb +28 -0
  207. data/lib/principles/views/map_result.rb +41 -18
  208. data/lib/principles/views/maps_needing_members_or_audit.rb +1 -1
  209. data/lib/principles/views/member_change_since_baseline.rb +4 -0
  210. data/lib/principles/views/member_row.rb +13 -4
  211. data/lib/principles/views/member_sets_overlap.rb +31 -0
  212. data/lib/principles/views/members_a_commit_changed.rb +42 -25
  213. data/lib/principles/views/members_changed_during_audit.rb +27 -0
  214. data/lib/principles/views/members_in_logged_requests_result.rb +123 -0
  215. data/lib/principles/views/members_too_short_to_scan.rb +45 -0
  216. data/lib/principles/views/members_with_no_baseline.rb +6 -6
  217. data/lib/principles/views/meta_principle_result.rb +52 -15
  218. data/lib/principles/views/open_findings_line.rb +31 -92
  219. data/lib/principles/views/parts_index_result.rb +9 -5
  220. data/lib/principles/views/principle_read_result.rb +52 -11
  221. data/lib/principles/views/prior_findings_result.rb +9 -1
  222. data/lib/principles/views/problem_facts.rb +5 -3
  223. data/lib/principles/views/problem_lines.rb +54 -6
  224. data/lib/principles/views/problem_result.rb +7 -15
  225. data/lib/principles/views/prompts/assess-every-member/ask-whether-a-member-seen-only-as-read-is-loaded.md +3 -0
  226. data/lib/principles/views/prompts/assess-every-member/ask-whether-each-reason-holds.md +2 -0
  227. data/lib/principles/views/prompts/assess-every-member/claim-an-earlier-first-raised-at.md +6 -6
  228. data/lib/principles/views/prompts/assess-every-member/judge-the-keeping-against-the-other-principles.md +2 -0
  229. data/lib/principles/views/prompts/assess-every-member/read-a-compact-carried-member.md +9 -8
  230. data/lib/principles/views/prompts/assess-every-member/read-a-flagged-member-s-text-whole.md +3 -0
  231. data/lib/principles/views/prompts/assess-every-member/read-a-judged-member-s-text-whole.md +3 -0
  232. data/lib/principles/views/prompts/assess-every-member/turn-on-request-logging-to-see-what-reaches-context.md +2 -0
  233. data/lib/principles/views/prompts/assess-every-member/weigh-what-reached-the-context.md +7 -0
  234. data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
  235. data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +6 -1
  236. data/lib/principles/views/prompts/dispose-of-each-finding/read-the-carrier-page-before-fixing.md +1 -0
  237. data/lib/principles/views/prompts/edit-a-carrier/read-the-page-before-the-first-edit.md +2 -0
  238. data/lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md +1 -1
  239. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-configuration.md +41 -0
  240. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-scripts.md +35 -0
  241. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-instruction-files.md +37 -0
  242. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-other-text-an-agent-reads.md +38 -0
  243. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-rule-files.md +34 -0
  244. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-skills.md +35 -0
  245. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-subagent-definitions.md +35 -0
  246. data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +49 -51
  247. data/lib/principles/views/prompts/learn-what-a-command-does/change-member-name.md +12 -0
  248. data/lib/principles/views/prompts/learn-what-a-command-does/change-member-reason.md +12 -0
  249. data/lib/principles/views/prompts/learn-what-a-command-does/change-member-role.md +2 -1
  250. data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md +1 -1
  251. data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +1 -1
  252. data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +32 -32
  253. data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +10 -11
  254. data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +7 -6
  255. data/lib/principles/views/prompts/learn-what-a-command-does/remove-logged-requests.md +22 -0
  256. data/lib/principles/views/prompts/learn-what-a-command-does/remove-member.md +2 -1
  257. data/lib/principles/views/prompts/learn-what-a-command-does/report-at-session-start.md +8 -4
  258. data/lib/principles/views/prompts/learn-what-a-command-does/report-before-carrier-edit.md +13 -0
  259. data/lib/principles/views/prompts/learn-what-a-command-does/show-audit.md +7 -0
  260. data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +8 -2
  261. data/lib/principles/views/prompts/learn-what-a-command-does/show-carrier-practices.md +13 -0
  262. data/lib/principles/views/prompts/learn-what-a-command-does/show-context-budget.md +69 -0
  263. data/lib/principles/views/prompts/learn-what-a-command-does/show-hook-setup.md +4 -4
  264. data/lib/principles/views/prompts/learn-what-a-command-does/show-logged-requests.md +22 -0
  265. data/lib/principles/views/prompts/learn-what-a-command-does/show-members-in-logged-requests.md +62 -0
  266. data/lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md +13 -10
  267. data/lib/principles/views/prompts/learn-what-a-command-does/show-principle.md +16 -16
  268. data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +27 -27
  269. data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +17 -17
  270. data/lib/principles/views/prompts/learn-what-a-command-does/turn-off-request-logging.md +18 -0
  271. data/lib/principles/views/prompts/learn-what-a-command-does/turn-on-request-logging.md +44 -0
  272. data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +3 -2
  273. data/lib/principles/views/prompts/read-what-reached-the-context/explain-request-logging-to-the-user.md +11 -0
  274. data/lib/principles/views/prompts/read-what-reached-the-context/explain-user-request-logging-to-the-user.md +10 -0
  275. data/lib/principles/views/prompts/read-what-reached-the-context/see-whether-members-reach-the-agent.md +2 -0
  276. data/lib/principles/views/prompts/read-what-reached-the-context/what-a-thread-continuation-holds.md +3 -0
  277. data/lib/principles/views/prompts/read-what-reached-the-context/what-absent-means.md +2 -0
  278. data/lib/principles/views/prompts/read-what-reached-the-context/what-each-context-budget-line-says.md +4 -0
  279. data/lib/principles/views/prompts/read-what-reached-the-context/what-each-member-line-says.md +2 -0
  280. data/lib/principles/views/prompts/read-what-reached-the-context/what-not-a-carrier-means.md +2 -0
  281. data/lib/principles/views/prompts/read-what-reached-the-context/what-present-but-not-loaded-means.md +2 -0
  282. data/lib/principles/views/prompts/read-what-reached-the-context/what-present-means.md +1 -0
  283. data/lib/principles/views/prompts/read-what-reached-the-context/what-unmeasurable-means.md +2 -0
  284. data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-audit-asks-to-acknowledge-or-audit-again.md +1 -0
  285. data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-mapping-commit-asks-for-an-audit.md +1 -0
  286. data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-pinned-asks-for-an-audit.md +1 -0
  287. data/lib/principles/views/prompts/report-after-a-commit/plugin-members-are-still-listed.md +1 -0
  288. data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members-waiting-on-an-upgrade.md +2 -2
  289. data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members.md +2 -2
  290. data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-what-each-needs-before-the-next-commit.md +1 -0
  291. data/lib/principles/views/prompts/run-a-first-audit-in-the-background/follow-the-brief.md +1 -0
  292. data/lib/principles/views/prompts/set-principles-up/ask-to-set-principles-up-after-an-audit.md +1 -0
  293. data/lib/principles/views/prompts/set-principles-up/entry-file-passage.md +1 -1
  294. data/lib/principles/views/prompts/set-principles-up/map-the-enabling-line-at-no-edit.md +3 -0
  295. data/lib/principles/views/prompts/set-principles-up/name-the-step-each-member-lacks.md +2 -2
  296. data/lib/principles/views/prompts/set-principles-up/place-the-passage-with-the-user.md +4 -2
  297. data/lib/principles/views/prompts/set-principles-up/what-the-passage-presumes.md +1 -1
  298. data/lib/principles/views/prompts/set-principles-up/why-set-principles-up.md +1 -0
  299. data/lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md +2 -1
  300. data/lib/principles/views/prompts/start-a-session/ask-to-set-principles-up.md +2 -0
  301. data/lib/principles/views/prompts/start-a-session/hand-the-first-audit-to-a-subagent.md +2 -3
  302. data/lib/principles/views/prompts/start-a-session/name-the-principles-nothing-checks.md +1 -0
  303. data/lib/principles/views/prompts/start-a-session/raise-the-open-findings-waiting-on-no-one.md +1 -0
  304. data/lib/principles/views/request_logging_result.rb +108 -0
  305. data/lib/principles/views/request_part.rb +10 -4
  306. data/lib/principles/views/request_parts.rb +9 -0
  307. data/lib/principles/views/set_up_offer_line.rb +43 -0
  308. data/lib/principles/views/whole_file_elsewhere.rb +30 -0
  309. metadata +154 -5
  310. data/lib/principles/views/prompts/report-after-a-commit/the-principles-skill-is-where-to-start.md +0 -1
  311. data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-each-one.md +0 -1
  312. data/lib/principles/views/prompts/set-principles-up/keep-them-held-between-audits.md +0 -2
@@ -0,0 +1,62 @@
1
+ A member can be mapped and audited yet never reach the agent, or reach it in every request at a cost nobody
2
+ chose. This command is for seeing what actually reached the context: it reads the logged requests and
3
+ reports which mapped members' text each one holds. It writes nothing.
4
+
5
+ A captured request holds the session's whole working context and the user's account email, and the host writes its
6
+ file readable by other local users, so the command reads none while git might commit one. It refuses with
7
+ `request_logging_unguarded` while the folder's `.gitignore` is gone, and with `request_logging_not_ignored` while git
8
+ does not ignore every path there.
9
+
10
+ It runs `jq` and `rg` over the captured requests, with no slower fallback. While either is not on PATH it
11
+ refuses with `fast_tools_missing`, naming the missing tool and what it does here; ask the user before
12
+ installing it, then run the command again.
13
+
14
+ It opens with `members_by_status`, how many members have each status, every status named. Then it prints
15
+ `members`, one entry per mapped member: its `principle`, its `member` key, then, for a member moved since it was
16
+ mapped, its `id`, where it is now, since its key names where it was, then its `status`, the `seen_in` requests that
17
+ held its lines, `channels`, how many of them held it by each `channel` below, its `most_bytes` in one, and the
18
+ `segments` it was seen in. That stays within a tool result however
19
+ many requests are logged. `--places` prints instead, under `seen`, each place its lines were found, which grows with
20
+ every request, and `--member KEY`, given once a member, the same for those members alone, refusing a key no map holds
21
+ as `unknown_member`, with any key it is spelled like as `did_you_mean`, each member's places in the order their
22
+ requests were sent, those with no time last: the `request` file, `request_at`, when it was sent, in ISO 8601 UTC from
23
+ the host's index, or null where its index line gives no time; for a request no index line names, `request_at` is
24
+ when its file was written instead, a little after it was sent, and `request_at_from` says `file_written`; the `query_source` the host's index gives it, its `request_kind`, for a `model_turn` its `turn_position`, the
25
+ JSON `path` inside the request, the `segment` (`reminder` inside a system reminder, `plain` elsewhere), the `channel` it came by, which tells the host loading a member from the agent reading or quoting it: `system`, the system prompt, `system_message`, a message whose role is system, which the host adds, as its skill listing, `tool_definition`, a tool the request lists, `reminder`, a system reminder the host added to a message or a tool result, `tool_input`, what the agent sent a tool, `tool_result`, what a tool gave back, a command's printed output among them, and `message_text`, other text in any other message, whoever wrote it, or `other` anywhere else; the
26
+ `share` of the member's lines found there, the `count` of their occurrences there, the `offsets` at which each
27
+ starts, in bytes into the string at `path`, and their `bytes`, every occurrence counted, since a line sent twice
28
+ costs its bytes twice. A member is measured by its lines of 24 bytes or more, with leading indentation stripped.
29
+ While requests are logged here, `list-member-problems` names each member with no such line under
30
+ `too_short_to_scan`, an `unmeasurable` one here, with the `move-member` that widens it. `orphans` counts the
31
+ captured requests the host's index gives no `query_source`, since it writes an index line only once the response
32
+ succeeds. `requests_by_kind` counts the requests read through as `model_turn`, a turn of the agent's own, `side_call`, a
33
+ call the host made on its behalf, such as a summary, under the same `query_source`, and `unclassified`, neither;
34
+ `kind_heuristic` says how each was told, since the host does not say: a request continuing a thread is a model
35
+ turn, any other under a listed side-call source is a side call, a list observed on one log, and any other request
36
+ is told by its shape; weigh a member missing from side calls as no gap. `model_turns_by_position` counts the model turns, each place's `turn_position`, as `turn_opening`, a request
37
+ that opens one of the agent's turns, `mid_turn`, one sent after a tool result, and `unclassified`, neither;
38
+ `model_turns_by_query_source` counts them by each `query_source` the host's index gives, a request it gives none
39
+ under `orphan`. `position_heuristic` says how each was told. `what_a_continuation_holds` says that a request
40
+ continuing a thread holds only what it added, so a member's places and channels there count that text alone.
41
+ `quoting_requests` names the
42
+ requests that name a captured request file, where the agent read or named one, so what was seen there may
43
+ be a quote of an earlier request rather than what the host loaded. `unreadable` names each request the scan could
44
+ not read, by its `request` file and its `reason`: `not_whole_json` for one that is not whole JSON, such as one a
45
+ host left truncated, and `not_decoded` for whole JSON the scan stops at, such as a list rather than a request,
46
+ or a request the scan did not decode to its end, such as one the host rewrote while it read.
47
+ Such a request is not scanned at all, rather than in part, so a member it held is not counted.
48
+ `completeness` says how much the scan read: the requests `captured`, those under `unreadable` too, the `leaves`,
49
+ strings, in those it decoded, and `complete`, true only when it read every request through. A full audit's
50
+ `requests` and every `seen_in` count only the requests read through, the captured ones less the unreadable. Read an
51
+ `absent` as proven only while `complete` is true.
52
+ Nothing from a request's text is printed, and `wrote` is empty.
53
+
54
+ `--short` prints lines instead of JSON, and no `status_meanings`, to read before or in place of the whole result: first the counts by status,
55
+ then the requests captured, whether the scan was complete, how many requests were unreadable and how many quote a logged
56
+ request, then the requests by kind and the model turns by position, in all and by query_source as `source opening/mid/unclassified`; then what a continuation holds; then what each member line says; then one tab-separated line a member, with its status, principle, member key, followed by `(now ID)` once
57
+ moved, the segments it was seen in, and its requests by channel as `channel:count`, each
58
+ or `-` for none.
59
+
60
+ `status_meanings` says once what each `status` means, `not_a_carrier` first. A full audit's `logged_requests` part
61
+ prints it too, with `model_turns_by_position`, `model_turns_by_query_source`, `position_heuristic` and
62
+ `what_a_continuation_holds`.
@@ -1,17 +1,20 @@
1
- Nothing keeps a project's principles held between audits: `principles` reports a changed member, but nothing in the
2
- project's guidance tells an agent to act on that report, so the drift waits until someone thinks to audit. This
3
- command shows the map of `sticking-to-your-principles`, the principle that does that keeping, with its description and
4
- an activation for all work. Run it to set principles up, once a first principle is mapped and audited. It writes
5
- nothing: no map, and none of the project's guidance. While `already_mapped` is false, `map_file` and `map` are the map the printed `add-member`
6
- creates, with the passage as its first member, so no map without members waits while the passage waits to be placed.
1
+ Between audits, only a session with a `principles` hook checks a project's principles: the hook reports a changed
2
+ member, but nothing in the project's guidance has every session act on that report, so the drift waits until
3
+ someone thinks to audit. This command shows the map of `sticking-to-your-principles`, the principle that does that
4
+ keeping, with its description and an activation for all work. Run it to set principles up, once a first principle
5
+ is mapped and audited. It writes nothing: no map, and none of the project's guidance. While `already_mapped` is
6
+ false, `map_file` and `map` are the map the printed `add-member` creates, with the passage as its first member, so no
7
+ map without members waits while the passage waits to be placed.
7
8
 
8
9
  The first member need not be the passage. Any file or setting in the project that keeps the principles in front of
9
10
  the agent can be, such as a timer of the project's own, or the committed setting that enables the plugin for the team,
10
11
  its `enabledPlugins` line. This helps teammates only if they can install the plugin from a marketplace they can
11
12
  access. Map it with the other `add-member` the question prints, whose role names the step it runs
12
- and what starts it, a hook, a timer or a reader. A completed full audit's `next_action` offers this
13
- command until the map has a member, of any kind. A mapped member says only that the project names
14
- something to keep the principles held; this principle's audit judges whether it does. An owner who enables the
13
+ and what starts it, a hook, a timer or a reader. Where `.claude/settings.json` enables the plugin,
14
+ `enabled_in_project_settings` gives its `path` and the `starting_at` that locates its line, and the question says that
15
+ mapping it writes only `.principles/`. A completed full audit's `set_up_offer` asks the user, and each session start
16
+ repeats the ask, until the map has a member, of any kind. A mapped member says only that the project names
17
+ something to check the principles between audits; this principle's audit judges whether it does. An owner who enables the
15
18
  plugin only at user scope has nothing in the project to map: the question says so, and names the two ways on, to
16
19
  commit the project-scope enablement and map its line, or to leave principles not set up for now.
17
20
 
@@ -47,7 +50,7 @@ passage's member carries no check, since a command stored in the map runs on eve
47
50
 
48
51
  `existing_principles` lists the project's other principles as `list-principles` does. While there are none,
49
52
  `next_action` leads to `list-candidate-files` to map the first, since this principle's first full audit has nothing
50
- to keep held yet. Once there are, it leads to that audit. In git, committing the map and the entry file is the
53
+ to check yet. Once there are, it leads to that audit. In git, committing the map and the entry file is the
51
54
  passage member's baseline; outside git, that first full audit gives it one.
52
55
 
53
56
  Example:
@@ -1,18 +1,19 @@
1
1
  Shows each member of principle ID, where its text is now and whether it changed since the last audit. Audit when a
2
2
  member is changed, unassessed, locator_lost or unavailable. A member that is locator_lost or unavailable carries
3
- `repair_with`: a `move-member` with its `NEW_PATH`, `HEADING` or `QUERY` to fill in, for a section or passage a
4
- second `move-member` for text moved into another file, and a `remove-member`. Run the one that fits;
5
- `next_action` names those members.
3
+ `repair_with`: a `move-member` with its `NEW_PATH`, `HEADING` or `QUERY` to fill in, for a section or passage a second
4
+ `move-member` for text moved into another file, and a `remove-member`. Run the one that fits; `next_action` names those
5
+ members. A member from an installed plugin carries `source`, with `read_only: true`; one no installed plugin gives is
6
+ `plugin_unresolved`, with its `reason` and no `repair_with`. `--member MEMBER_ID` prints that member alone, its
7
+ `last_assessment` and any `last_acknowledgement` since; an unknown id is `unknown_member`. A `name` leads its member.
6
8
 
7
- Each member's `loads` says, for each host this tool derives, when that host loads the member's file into the agent's
8
- context. Only `claude_code` is derived; Codex is not yet. The derivation follows Claude Code's documented loading
9
- from the file's path alone, for a session started at the project root, not what loaded in any session:
9
+ `--loads` adds each member's `loads` and the rest below. Each member's `loads` says, for each host this tool derives,
10
+ when that host loads the member's file into the agent's context. Only `claude_code` is derived; Codex is not yet.
11
+ It follows Claude Code's documented loading by path, for a session at the project root, not what loaded in one:
10
12
 
11
13
  - `session_start`: the project's `CLAUDE.md`, `.claude/CLAUDE.md` or `CLAUDE.local.md`, in every session.
12
14
  - `on_files` with `files`: one of those files in a folder below the root, once a file in that folder is read,
13
15
  written or edited.
14
- - `session_start` too: a rule in `.claude/rules/`, or a folder within it, without a `paths` field in its
15
- frontmatter.
16
+ - `session_start` too: a rule in `.claude/rules/`, or a folder within it, with no `paths` field in its frontmatter.
16
17
  - `on_files` with `paths_field`: a rule with a `paths` field, once a file it matches is read, written or edited.
17
18
  `paths_field` is the field's lines as written; this tool does not read the globs, so read them yourself.
18
19
  - `on_invocation`: a skill's `SKILL.md` in `.claude/skills/NAME/`, whose body loads when the skill is invoked.
@@ -32,7 +33,7 @@ from the file's path alone, for a session started at the project root, not what
32
33
  a note kept beside the agents, is `not_determined`.
33
34
  - `not_determined`: This tool knows the file is a rule, a skill or an agent but not when it loads.
34
35
  `frontmatter_refused` names the code this tool refused its frontmatter with, so read the frontmatter; `not_derived`
35
- names a kind it does not derive yet, such as a rules folder below the project root.
36
+ names a kind it does not derive yet, such as a rules folder below the project root or a plugin's file.
36
37
  - `no_known_carrier`: This tool knows no Claude Code facility that loads this path by itself. An `@` import from
37
38
  another instruction file, or a user-level file, may still load it; read the importing file to check.
38
39
 
@@ -56,13 +57,12 @@ an unreadable file is not taken for one without hooks.
56
57
  divided by four, rounded up, not a tokenizer count. These are source measurements, not injected context sizes:
57
58
  host processing and imports can change what reaches context. A skill's body waits for invocation; an agent's
58
59
  body goes to its subagent. A `loads` without `context` refers to the main session.
59
- `member_bytes` and `member_tokens` measure the member's own lines, equalling the file values for a whole-file
60
- member, omitted when this tool cannot find the member. Moving source lines need not save that much context.
61
- Those lines may be other members' too: `overlaps` names this principle's members sharing a line with it, `same_lines_as`
62
- those spanning exactly its lines, and `mapped_elsewhere` other principles' members, each with its role, `first_line`,
63
- `last_line`, and `same_lines` when spanning exactly the same lines, `spans_these_lines` when its lines include all of
64
- this member's, or `within_these_lines` when they all lie within this member's. Each is left out when none shares a line.
65
- Before narrowing a section to save its `member_bytes`, check whose lines they are.
60
+ `member_bytes` and `member_tokens` measure the member's own lines, equalling the file values for a whole-file member,
61
+ omitted when this tool cannot find the member. Before narrowing a section to save them, check whose lines they are:
62
+ `overlaps` names this principle's members sharing a line with it, `same_lines_as` those spanning exactly its lines,
63
+ and `mapped_elsewhere` other principles' members, each with its role, `first_line`, `last_line`, and `same_lines` when
64
+ spanning exactly the same lines, `spans_these_lines` when its lines include all of this member's, or
65
+ `within_these_lines` when they all lie within this member's. Each is left out when none shares a line.
66
66
 
67
67
  Adding members' sizes counts a shared file once per member. `loading_basis` qualifies the aggregates below:
68
68
  `host: claude_code`, `kind: documented_prediction`, `session_start_assumption: project_root`; not observed delivery
@@ -1,8 +1,8 @@
1
- Asks you to assess every member of principle ID and the set. Run it after mapping and when `show-principle` reports a
2
- member changed, unassessed, locator_lost or unavailable. `--part PART` prints parts, sized in `part_bytes`: a member's
3
- with its `text` and `lines_in_text`, an instruction as printed or `response_template` bare (`part_empty` if empty),
4
- `--as template --part members/ID` slots; `--part index` lists `part_command`, their `bytes`, whether `this_audit`
5
- `judges` or `carries_forward` a member, `trimmed_instructions`, `answer_with` and `next_action`, per `read_in_parts`.
1
+ Asks you to assess every member of principle ID and the set, after mapping or when `show-principle` reports one changed
2
+ or unassessed. `--part PART` prints parts, sized in `part_bytes`: a member's with `text` and `lines_in_text`, or a whole
3
+ file's `text_part`: `read_with`, `bytes`, `read_whole`; `response_template` bare or `part_empty`; `--as template --part
4
+ members/ID` slots. `--part index`: `part_command`, `bytes` or `bytes_unknown`, `this_audit`: `judges` (ids: `--part
5
+ judged_members`)/`carries_forward`, `trimmed_instructions`, `answer_with` and `next_action`, per `read_in_parts`.
6
6
 
7
7
  `start-audit` itself writes nothing. `submit-answer` writes the audit record, `.principles/audits/ID.json`: a full audit
8
8
  writes it open when its assessment has findings, completed once it has none or its correction is accepted. In git,
@@ -12,30 +12,30 @@ edited `basis`, whose `basis.last_completed_revision` names the record it follow
12
12
  problem no completed audit recorded and fixed before `start-audit` is not recorded, and a deferred or accepted finding
13
13
  fixed since is decided `resolved`. To record one, commit a revert, run the audit, and redo it in the correction.
14
14
 
15
- It refuses with `broken_members` while a member cannot be found or read, grouped by file in `missing_files`. A checked
16
- member carries `check_since_last_audit`, and `check_hidden_characters` if its check hides any. `mapped_elsewhere` shows
17
- other principles' members on its lines, judged by `mapped_elsewhere_instruction`, with `open_finding_ids` from
15
+ It refuses with `broken_members` while a member cannot be found or read, by file in `missing_files`. A checked member
16
+ carries `check_since_last_audit`, and `check_hidden_characters` if its check hides any. `mapped_elsewhere` shows other
17
+ principles' members on its lines, judged by `mapped_elsewhere_instruction`, with `open_finding_ids` from
18
18
  `open_findings_elsewhere`, whose `evidence` items say `shares_lines_with`, `shares_no_lines`, `whole_file` or
19
19
  `not_located`, or which says `evidence_not_kept`. In git, `context.uncommitted_files_outside_the_map` lists up to ten
20
- changed or untracked files, `not_named` the rest. `--instruction FIELD` prints whole any `trimmed_instructions` lists. A
21
- meta-principle audit adds `package_since_last_audit`, `passage_changed` and `other_principles_with_unjudged_changes`.
20
+ changed or untracked files, `not_named` the rest. A meta-principle audit adds `package_since_last_audit`,
21
+ `passage_changed` and `other_principles_with_unjudged_changes`. `logged_requests` shows what captured requests hold.
22
22
 
23
- After a full audit, a member carries `carried_forward`, with its `assessed_at`, an observed one's `observed_at` (or
23
+ After a full audit, a member carries `carried_forward`, its `assessed_at`, an observed one's `observed_at` (or
24
24
  `observed_at_from_assessed_at`), `evidence_changed` and, in git, `file_changed_outside_member`, or `judge_because` with
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;
26
- `carried_forward_instruction` and `judge_because_instruction` explain. One acknowledged with `--member` since carries
27
- `acknowledged_since_last_audit` with `last_audited_commit`, its acknowledgements, lines then and now, or `{"omitted":
28
- "not_found_at_last_audit"}` once moved. A new or changed check needs `review_basis`, kept unverified; an unchanged one
29
- `review_basis` and `review_basis_since`, kept while left as printed, a changed one `last_run_review_basis`.
25
+ `read_the_change`, a whole file's text change `changed_lines`, a moved one `moved_from`; a carried one prints whole if a
26
+ fact fires; `carried_forward_instruction` and `judge_because_instruction` explain. One acknowledged since carries
27
+ `acknowledged_since_last_audit` with `last_audited_commit`, its acknowledgements, lines then and now, or, once moved,
28
+ `not_found_at_last_audit`. A new or changed check needs `review_basis`, kept unverified; an unchanged one `review_basis`
29
+ and `review_basis_since`, kept if left as printed, a changed one `last_run_review_basis`. A plugin member has `source`.
30
30
 
31
31
  ## Prior findings
32
32
 
33
- When the last completed audit deferred or accepted findings, `context.prior_findings` lists them, with
34
- `first_raised_at`, its `waits_on` and `waits_on_since`, changes since as `changed_since_audit`; an older one may claim
35
- `raised_in`, found by `git log --follow`. Each listed finding shows its `evidence`, in git each item with
36
- `changed_since_last_audit` and `found_now`, or `evidence_not_kept` and an `evidence_request` for `problem_evidence`,
37
- whose `replaces` re-points a lost item. Decide each in `prior_finding_decisions` as `still_holds`, `resolved`,
38
- `withdrawn` or `raised_again`; only `resolved` may give `evidence`. Results name `prior_findings_pointers_dropped`,
33
+ When the last completed audit deferred or accepted findings, `context.prior_findings` lists them, with `action`,
34
+ `reason`, `first_raised_at`, `waits_on`, `waits_on_since`, changes since as `changed_since_audit`; older ones may claim
35
+ `raised_in`. Each listed finding shows its `evidence`, in git each item with `changed_since_last_audit` and `found_now`,
36
+ or `evidence_not_kept` and an `evidence_request` for `problem_evidence`, whose `replaces` re-points a lost item. Decide
37
+ each in `prior_finding_decisions` as `still_holds`, `resolved`, `withdrawn` or `raised_again`; only `resolved` may give
38
+ `evidence`. `--as template` adds each `finding_problem`. Results name `prior_findings_pointers_dropped`,
39
39
  `prior_findings_waits_on_dropped`, `prior_findings_evidence_replaced`, `prior_findings_problems_restated`.
40
40
 
41
41
  ## Members to check against the activation
@@ -51,11 +51,11 @@ names or this tool could not determine, and any under an invoked or always activ
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, 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
54
+ describes. It shows `baseline_commit`, `member_lines` (or a large member's `changed_region` or `changed_regions`,
55
+ `context_lines`, `from_line`, `unchanged_lines_skipped` or `read_instead`), `first_changed_lines`, `read_the_change`,
56
+ `check_instruction`, its `deferred_findings` and `accepted_findings`, with `deferred_findings_kept` and
57
+ `change_shown_under` across principles; its `question` asks for `meaning_kept`; `--as template` adds `role` (or `roles`)
58
+ and `answer_with` to read. This tool checks both quotes. A near-miss id gets `unknown_member` and `did_you_mean`. A
59
59
  one-member audit writes the record once its answer is accepted, keeping the edit in `acknowledgements`; commit it. It is
60
60
  refused as `cannot_acknowledge` outside git, while an audit is open, and for a member no completed audit assessed, whose
61
61
  baseline text does not match the audit record, whose check is not the one that audit ran, or whose `check_result` is not
@@ -1,11 +1,11 @@
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 kept out of git 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
1
+ Gives your answer, filled from its template, to the request its `request_id` names; a REQUEST_ID you give must match.
2
+ Pass a JSON FILE kept out of git with `--file FILE`; `--file -` reads stdin. This tool writes audit records at
3
+ `.principles/audits/ID.json`, never member guidance. In a full audit, make each fix after the assessment is accepted and
4
+ before you submit the correction that reports it; earlier fixes cause `stale_request` before an assessment's shape
5
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.
6
+ `audit_completed_since_request`: 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. `set_up_offer`: ask the user `ask_the_user`; on a yes, run `on_yes`.
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.
@@ -22,18 +22,18 @@ text is not judged. An evidence/`recorded_at` location refusal (such as `ambiguo
22
22
  (`invalid_check_result`) retains its code, any `path` and repair, names whose evidence/check failed, and gives `fields`
23
23
  with each `problem` and JSON `pointer` into your answer. `invalid_answer` names fields ending in another template's
24
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
25
+ only a deferral may give `waits_on` text, one line naming whom it waits on to decide what, which `list-open-findings`
26
+ prints; null is allowed on any action. Never send when it was asked. A partial fix may give `unfixed_part`: the rest,
27
+ raised as a new finding. Else `invalid_disposition` names the finding. For a legacy
28
28
  prior finding, `still_holds` may supply `first_raised_at` (that audit's `audited_at`) and `raised_in` (full commit sha)
29
29
  together. Only that commit's `.principles/audits/ID.json` or earlier `.memeplex/audits/ID.json` is read; it must leave
30
30
  the same finding deferred/accepted. Judge identity yourself. Refusals explain repairs: `raised_in_not_found` (also
31
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
- 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 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.
32
+ (date must precede stored time). Completed full audits list own/kept IDs in `deferred_findings` and
33
+ `accepted_findings`, fixed/resolved IDs in `resolved_findings`, each closed prior finding's decision/reason in
34
+ `prior_findings_closed`, and none disagreed/withdrawn. In git, `commits_since_base` lists commits touching each member's
35
+ file; uncommitted fixes have an empty list. `files_to_commit` lists their files; `commit_with` commits only those,
36
+ stopping during an unfinished merge. Replace its `-m` default as `commit_message_to_replace` says.
37
37
  `cited_files_missing` lists missing cited files excluded from `files_to_commit`; record references remain. If HEAD moved
38
38
  without touching a member, `head_moved_past_base` gives `base_commit` and `head`. If its fixes changed a file another
39
39
  principle also maps, `other_principles_with_changed_members` names each such principle and its members in fixed
@@ -46,8 +46,8 @@ what to retain; `show-answer-check --help` covers `carried_assessments_citing_de
46
46
 
47
47
  In git, this tool reads the map at the audit base: fixed dispositions declare roles/checks in `changed_map_entries`,
48
48
  text/additions in `changed_members`, removals in `removed_members`. `invalid_removed_members` rejects invalid removal
49
- claims; `empty_correction_map` requires a survivor/replacement. Source files stay intact.
50
- `claimed_change_missing` rejects unchanged entries; `members_added_awaiting_assessment` lack baselines.
49
+ claims; `empty_correction_map` requires a survivor/replacement. Source files stay intact. `claimed_change_missing`
50
+ rejects unchanged entries, `plugin_member_read_only` plugin members; `members_added_awaiting_assessment` lack baselines.
51
51
  Role/removal claims require git (`map_entries_need_git`). Full rules: correction question, `show-answer-check --help`.
52
52
 
53
53
  For a `start-audit --member` request, `quote_not_found` refuses an `old_line` or `new_line` not a line only its side
@@ -0,0 +1,18 @@
1
+ Use it when you are done capturing the requests the host sends, so later sessions stop filling
2
+ `.principles/request-logging/requests/` with copies of their whole context.
3
+
4
+ It empties the `env` of `.principles/request-logging/settings.json`, the launch file, and lists it under
5
+ `wrote`, so a host started with that file captures nothing. Where request logging was never turned on it writes nothing.
6
+ It deletes no logged request: those already captured stay in the folder, which git ignores. A host already running keeps
7
+ capturing until it is relaunched, which `next_action` says.
8
+
9
+ Before writing, it refuses with `request_logging_unguarded` while the folder exists without its `.gitignore`, and
10
+ with `request_logging_not_ignored` while git does not ignore every file there.
11
+
12
+ With `--for-user`, it undoes request logging turned on in the user's own Claude Code settings, which every session
13
+ they start reads, from the Desktop app and IDEs too. It writes nothing there, since the file is the user's: it prints
14
+ the file as `settings_file`, the entry that is request logging's alone under `remove_from_env`, and under
15
+ `remove_if_added_for_this` the telemetry entries the user may also have set for telemetry of their own, which only they
16
+ can say. It deletes no request of this project's, but prunes the user-level folder's sessions that no project
17
+ registered, as `remove-logged-requests` does, giving only their counts under `pruned`. Every host started since the
18
+ entries were added keeps capturing until it is relaunched.
@@ -0,0 +1,44 @@
1
+ Use it before you capture the requests the host sends, to see which mapped members' text reaches the agent's
2
+ context. The project's first full audit to complete names it in `submit-answer`'s `next_action`, for the agent
3
+ to offer the user, while no request is logged here. A request holds the session's whole working context, the files
4
+ read and every tool result, so it must never be committed: this command sets up a folder git ignores before anything
5
+ is written there.
6
+
7
+ It writes `.principles/request-logging/.gitignore`, holding `*`, unless it is there, so git ignores the folder and
8
+ all it holds, and lists it under `wrote`. Then it asks git whether it ignores the folder's files and every file
9
+ already in it. Outside git, or when git tracks a file there, it refuses with `request_logging_not_ignored` and
10
+ removes what it wrote; its repair says how to make git ignore the folder.
11
+
12
+ Once git confirms it, it writes `.principles/request-logging/settings.json`, the launch file, and lists it
13
+ under `wrote`. Its `env` turns Claude Code's telemetry on with its metrics, logs and traces exporters set to `none`,
14
+ and asks the host to write each request's body under the folder's `requests/`, by its absolute path. Claude Code
15
+ documents reading these variables at launch, from a file passed with `claude --settings`, and ignoring them in a
16
+ project's own settings. A real launch wrote the bodies with the exporters off, read from `--settings` as from
17
+ variables exported in the shell. A logged request holds the user's account email as well as the working context. The
18
+ host writes each file readable by other local users; this command makes the folder, when it is new, readable only by
19
+ its owner.
20
+
21
+ It prints `launch_line`, `claude --settings` and the launch file's path, for the user to start Claude Code with.
22
+ Capture starts only on that launch, so the host must be relaunched with it. It is a line, never an alias, since an
23
+ alias would capture in every project the user starts the host in; each checkout or worktree writes its own launch
24
+ file. `resume_line` is the same line with `--resume`, to keep the conversation. The line starts the host from a
25
+ shell; a host the Desktop app or an IDE starts is not given the file. `next_action` says what a logged request
26
+ holds, that the launch file overrides a telemetry exporter the user set up, for that launch, and that
27
+ `turn-off-request-logging` deletes no logged request. Git ignores the folder, but a backup or an archive of the
28
+ project still holds it.
29
+
30
+ `explain_to_user` is a paragraph for the agent to give the user before the relaunch: what a logged request holds and
31
+ who can read it, that subagents' and side calls' requests are logged too, its disk use, `remove-logged-requests` and
32
+ `turn-off-request-logging`, and that `--resume` keeps the conversation while any relaunch stops background agents.
33
+
34
+ With `--for-user`, it turns request logging on for every session the user starts, from the Desktop app and IDEs too,
35
+ which a launch line cannot reach. It writes nothing in the project. It makes the user-level folder outside every
36
+ repository, readable only by the user, and lists it under `wrote` when it is new. It prints the user's Claude Code
37
+ settings file as `settings_file` and the `env` entries to add to it as `add_to_env`, and never writes that file.
38
+ `add_to_env` leaves out each telemetry exporter the settings already set, reading only the names of their `env`
39
+ entries; it holds every exporter when the file cannot be read, and an exporter set in the shell or a project's
40
+ settings is not read, so `next_action` has you ask the user. Give
41
+ the user `explain_to_user` and get their agreement before they add the entries: every session in every project is then
42
+ logged, and only the sessions of mapped projects, each registered by the session-start hook once the folder exists,
43
+ are kept. Like every request-logging command, it prunes the folder's sessions no project registered, giving only their
44
+ counts under `pruned`. `turn-off-request-logging --for-user` names what to remove.
@@ -1,5 +1,6 @@
1
- Use these requested Markdown outlines to continue the survey; decide which files and rules matter to the task.
2
- Non-Markdown files show their path and size alone, not their contents; open one only if needed.
1
+ Use these requested outlines to continue the survey; decide which files and rules matter to the task.
2
+ Other text, such as a script, is outlined by its whole-line `#` comments and a CI workflow by its jobs and steps; a
3
+ file with neither shows its path and size; open one only if needed.
3
4
  Each inventory.unreadable entry gives the failed path and its repair; ignored files remain unread.
4
5
  The whole result is budgeted. inventory.outlines_cut names files with shortened list items; their
5
6
  `(N more, lines A-B)` entries give the lines to read if needed. inventory.outlines_left_out names files whose
@@ -0,0 +1,11 @@
1
+ Request logging keeps a copy of every request Claude Code sends to the model, under
2
+ `.principles/request-logging/requests/`, so `principles` can show which of your principles' text actually reached
3
+ the agent. Each logged request holds your account email and the session's whole working context: the conversation,
4
+ the files read and every tool result. Requests for subagents and the host's side calls are logged too. The host
5
+ writes each file readable by every user on this machine; this command makes the folder, when it is new, readable
6
+ only by you, which keeps them from other users while it stays so. Each request is a whole copy of the context, so a
7
+ long session's logs reach hundreds of megabytes: `remove-logged-requests` deletes all but the newest five sessions',
8
+ and `turn-off-request-logging` empties the launch file, so a launch with it logs nothing. Capture starts only once
9
+ Claude Code is relaunched with the printed `launch_line`, or with `resume_line`, which adds `--resume` to keep this
10
+ conversation; any relaunch stops the background agents running now, and for that launch, the file sets every
11
+ telemetry exporter you set up to none.
@@ -0,0 +1,10 @@
1
+ Turned on in your own Claude Code settings, request logging keeps a copy of every request Claude Code sends to the
2
+ model, from every session in every project you start, from the terminal, the Desktop app and IDEs alike, until you
3
+ take the entries out and relaunch. Each holds your account email and the session's whole working context: the
4
+ conversation, the files read and every tool result, subagents' and side calls' too. They go to one folder outside
5
+ every repository, readable only by you. Only the sessions of projects mapped with `principles` are kept, each
6
+ registered as it starts: the rest, every session of any other project, are pruned at the next session start in any
7
+ project, or the next request-logging command, which give only how many. Each request is a whole copy of the context,
8
+ so the folder grows by megabytes a session until each project's `remove-logged-requests` trims it. The entries set
9
+ every telemetry exporter to none, overriding one you set up. Agree before you add them; capture starts in each host
10
+ you start or relaunch after the edit. To stop, run `turn-off-request-logging --for-user` and remove what it names.
@@ -0,0 +1,2 @@
1
+ To see whether this principle's members reach the agent at all, and what they cost there, offer the user request
2
+ logging, saying first what its result's `explain_to_user` says: %{command}
@@ -0,0 +1,3 @@
1
+ A request that continues a thread sends only what it adds to the one before, such as a tool result and a reminder
2
+ after it, so a member seen there, and its channel, count only text added then; what the agent held at that point
3
+ is the thread's opening request and every continuation since.
@@ -0,0 +1,2 @@
1
+ No request held its lines, though a host loads its file, so it did not reach the agent in these requests; trust
2
+ this only while the scan read every request through.
@@ -0,0 +1,4 @@
1
+ Each line is a session, in the order its first turn opening was sent: how many turn openings it has, when the first
2
+ and last were sent, and its bytes and input tokens at each, with the change; then the last turn opening's bytes by
3
+ part, and the bytes of mapped members' text that turn opening sent, by principle, the largest three. Input tokens are
4
+ the host's own count, null where its response gave none. Run with --session ID for each turn opening of one session.
@@ -0,0 +1,2 @@
1
+ channel:count is how many requests held the member by that channel: system, system_message, tool_definition and
2
+ reminder are the host loading it; tool_input, tool_result and message_text are the agent sending, getting or writing it; other is the rest of the body; - is none.
@@ -0,0 +1,2 @@
1
+ No request held its lines, and no host loads its file by itself, as with a spec or a script, so its absence is
2
+ expected rather than a gap.
@@ -0,0 +1,2 @@
1
+ Its lines were seen only inside a tool the host lists with deferred loading, whose description the model reads only
2
+ once a tool search loads it.
@@ -0,0 +1 @@
1
+ A request held at least one of its lines where the model reads it.
@@ -0,0 +1,2 @@
1
+ None of its lines is 24 bytes or more, too short to tell apart from common text, so the scan cannot say whether
2
+ it arrived.
@@ -0,0 +1 @@
1
+ A row ending audit changed after an audit judged it: acknowledge it or audit again, as below.
@@ -0,0 +1 @@
1
+ A row ending mapping_commit has no audit yet: audit it, as below.
@@ -0,0 +1 @@
1
+ A row ending pinned is a plugin member with no audit yet: audit it, as below.
@@ -0,0 +1 @@
1
+ %{count} %{members} still listed from an installed plugin, which no commit changes.
@@ -1,2 +1,2 @@
1
- principles: the commits this Bash call brought in changed these mapped members, whose audits wait on an upgrade,
2
- so this copy cannot audit them:
1
+ principles: these mapped members changed since their last record, and their audits wait on an upgrade, so
2
+ this copy cannot audit them:
@@ -1,2 +1,2 @@
1
- principles: the commits this Bash call brought in changed these mapped members, one per line with its
2
- principle, id, newest changing commit, that commit's subject and what it was compared with:
1
+ principles: these mapped members changed since their last record, one per line with its principle, id,
2
+ newest changing commit, that commit's subject and what it was compared with:
@@ -0,0 +1 @@
1
+ This command shows what each needs before your next commit: %{command}
@@ -16,3 +16,4 @@ correction the same way. On a stale_request refusal, start once more. Its templa
16
16
  5. Return at most 600 bytes, nothing else: a sentence on whether the members carry %{id}; a line per finding that
17
17
  needs the user, its id and question; each path under wrote, from the project root; each command next_action offers
18
18
  the user, a line each, from its subcommand on.
19
+ If the result gives set_up_offer, also return, beyond those bytes, its ask_the_user word for word and its on_yes.
@@ -0,0 +1 @@
1
+ Unless the user already answered this in this session, ask: %{why} Shall I set principles up, by mapping a passage, a timer or the setting that enables the plugin?
@@ -1,3 +1,3 @@
1
1
  ## %{heading}
2
2
 
3
- Where `principles` is installed, run `principles list-member-problems --short` at each session start, after a compaction and after each commit that edits a mapped file, and act on what it reports.
3
+ Where you can run `principles` and none of its hooks is wired, even in a checkout, run `principles list-member-problems --short` at session start, after a compaction and after each commit to a mapped file, and act on what it reports.
@@ -0,0 +1,3 @@
1
+ This project's %{path} enables the plugin for every session here, so its enabledPlugins line can be the first
2
+ member. Mapping it writes only .principles/ and edits none of the user's guidance, so a yes asks no edit of the user.
3
+ Map it on a yes, replacing STEP and TRIGGER in its role: %{command}
@@ -1,8 +1,8 @@
1
- These places are mapped as keeping the principles held, each with the role its member gives it:
1
+ These places are mapped as checking the principles between audits, each with the role its member gives it:
2
2
 
3
3
  %{members}
4
4
 
5
- A place keeps them held only through what triggers it: a hook, a timer or a reader. With the user, name which of
5
+ A place checks them only through what triggers it: a hook, a timer or a reader. With the user, name which of
6
6
  the keeping steps each one lacks: running `principles list-member-problems --short` at session start, after a
7
7
  compaction and after each commit that edits a mapped file, and acting on what it reports. The members listed in
8
8
  members_in_entry_files are the ones in an entry file. This tool writes none of the project's guidance.
@@ -1,3 +1,5 @@
1
+ Tell the user first why setting principles up matters: %{why}
2
+
1
3
  Show the user the passage, which suits any entry file, and agree with them where it goes: an entry file that every
2
4
  session of their agents loads. If a passage there already says all of it, map that one instead. If a member listed
3
5
  in members_in_entry_files already says it, the passage is placed and mapped: go on to next_action. This tool writes
@@ -7,8 +9,8 @@ The first member need not be the passage: it can be any file or setting in the p
7
9
  in front of the agent, such as a timer of the project's own, or the committed setting that enables the plugin for
8
10
  the team, its enabledPlugins line. This helps teammates only if they can install the plugin from a marketplace
9
11
  they can access. Map it with a role that names, as STEP, the step it runs and, as TRIGGER, what
10
- starts that step: a hook, a timer or a reader. Mapping it says only that the project names something to keep them
11
- held; this principle's audit judges whether it does.
12
+ starts that step: a hook, a timer or a reader. Mapping it says only that the project names something to check them
13
+ between audits; this principle's audit judges whether it does.
12
14
 
13
15
  To map such a place: %{any_place}
14
16
 
@@ -1,4 +1,4 @@
1
- The passage asks its steps only where `principles` is installed, so a teammate without `principles` is told to do
1
+ The passage asks its steps only where `principles` can be run, so a teammate without `principles` is told to do
2
2
  nothing it cannot, but still loads its %{estimated_tokens} estimated tokens in every session that loads the entry
3
3
  file. Nothing runs the steps for that teammate: the plugin's session-start hook reports only in sessions where the
4
4
  plugin is enabled, and whether a teammate's sessions have it is something this tool cannot see.
@@ -0,0 +1 @@
1
+ Where no `principles` hook is wired, nothing checks these principles between audits: when someone edits a file a principle depends on, such as one every session loads, nobody is told until the next audit, so the principles drift unnoticed. Where the plugin's hooks run, each session start and each commit to a mapped file already tell the agent which members changed, so it re-checks them, but only in sessions that have the plugin. Setting principles up maps what makes every session of the project do that: the committed setting that enables the plugin, a timer, or a passage in the project's instructions that has the agent run the same check where no hook is wired. Its own audit then checks that it still does. So the principles reinforce each other, and stay current as the work changes them. Every other principle depends on this one, sticking to your principles.
@@ -1 +1,2 @@
1
- %{facts} %{raise} in your %{reply} reply; nothing else will.%{command}
1
+ Act on each finding that waits on you. In your %{reply} reply, raise each that waits on %{whom}; nothing else will.
2
+ %{facts} All: %{command}
@@ -0,0 +1,2 @@
1
+ %{counted}. In your first reply, ask to set principles up; on yes, run:
2
+ %{command}
@@ -1,3 +1,2 @@
1
- %{counted} no full audit. Unless your instructions or memory say to skip %{them}, tell the user and start
2
- one background subagent to follow what this prints, not yourself; at your next pause relay its result, or offer the
3
- audit if you could not: %{command}
1
+ %{counted} no full audit. Start one background subagent to follow what this command prints, tell the user, and relay
2
+ its result when it ends: %{command}
@@ -0,0 +1 @@
1
+ In your %{reply} reply, raise each finding that waits on no one; nothing else will. %{facts} All: %{command}