principles 0.1.2 → 0.1.4

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 (247) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +132 -0
  3. data/README.md +10 -6
  4. data/lib/principles/command_line.rb +15 -6
  5. data/lib/principles/command_routes.rb +11 -1
  6. data/lib/principles/controllers/acknowledgement.rb +19 -4
  7. data/lib/principles/controllers/acknowledgements.rb +43 -12
  8. data/lib/principles/controllers/after_commit_report.rb +15 -2
  9. data/lib/principles/controllers/assessment.rb +7 -3
  10. data/lib/principles/controllers/audit.rb +17 -8
  11. data/lib/principles/controllers/audit_completion.rb +34 -9
  12. data/lib/principles/controllers/carrier_practices.rb +26 -0
  13. data/lib/principles/controllers/command.rb +31 -3
  14. data/lib/principles/controllers/correction.rb +15 -5
  15. data/lib/principles/controllers/full_audit_request.rb +38 -42
  16. data/lib/principles/controllers/inventory.rb +77 -71
  17. data/lib/principles/controllers/last_record_notice_beside.rb +51 -0
  18. data/lib/principles/controllers/member_acknowledgement.rb +21 -11
  19. data/lib/principles/controllers/member_addition.rb +19 -4
  20. data/lib/principles/controllers/member_entries.rb +25 -6
  21. data/lib/principles/controllers/member_problems_report.rb +26 -6
  22. data/lib/principles/controllers/members_a_commit_changed.rb +14 -5
  23. data/lib/principles/controllers/members_in_logged_requests.rb +52 -0
  24. data/lib/principles/controllers/members_to_assess.rb +24 -7
  25. data/lib/principles/controllers/meta_principle_setup.rb +2 -2
  26. data/lib/principles/controllers/open_correction.rb +3 -2
  27. data/lib/principles/controllers/parts_to_read.rb +46 -5
  28. data/lib/principles/controllers/plugin_member_addition.rb +48 -0
  29. data/lib/principles/controllers/principle_listing.rb +84 -0
  30. data/lib/principles/controllers/request_logging.rb +52 -0
  31. data/lib/principles/controllers/running_tool.rb +45 -17
  32. data/lib/principles/data/branches_bringing_in.rb +52 -0
  33. data/lib/principles/data/changes_since.rb +56 -0
  34. data/lib/principles/data/claude_code_home.rb +58 -0
  35. data/lib/principles/data/command-steps.json +91 -15
  36. data/lib/principles/data/decoded_leaf.rb +63 -0
  37. data/lib/principles/data/head_reflog.rb +13 -2
  38. data/lib/principles/data/kept_line.rb +32 -0
  39. data/lib/principles/data/known_marketplaces.rb +50 -0
  40. data/lib/principles/data/logged_request_matches.rb +138 -0
  41. data/lib/principles/data/logged_request_scan.rb +120 -0
  42. data/lib/principles/data/map_files.rb +18 -4
  43. data/lib/principles/data/plugin_folder.rb +85 -0
  44. data/lib/principles/data/plugin_registry.rb +73 -0
  45. data/lib/principles/data/principles_store.rb +49 -0
  46. data/lib/principles/data/ran.rb +25 -0
  47. data/lib/principles/data/raw_request_filter.rb +61 -0
  48. data/lib/principles/data/repository.rb +34 -27
  49. data/lib/principles/data/request_logging_folder.rb +167 -0
  50. data/lib/principles/data/running_version.rb +1 -1
  51. data/lib/principles/data/schemas/acknowledgement-answer.schema.json +16 -1
  52. data/lib/principles/data/schemas/acknowledgements-answer.schema.json +16 -1
  53. data/lib/principles/data/schemas/assessment-answer.schema.json +8 -0
  54. data/lib/principles/data/schemas/command-steps.schema.json +1 -1
  55. data/lib/principles/data/schemas/correction-answer-guide.schema.json +2 -1
  56. data/lib/principles/data/schemas/correction-answer.schema.json +14 -0
  57. data/lib/principles/data/schemas/member-map.schema.json +10 -1
  58. data/lib/principles/data/string_counts.rb +39 -0
  59. data/lib/principles/data/tools_on_path.rb +25 -0
  60. data/lib/principles/invocation_options.rb +4 -2
  61. data/lib/principles/launch.rb +14 -4
  62. data/lib/principles/models/acknowledged_check.rb +11 -1
  63. data/lib/principles/models/acknowledgement.rb +15 -0
  64. data/lib/principles/models/acknowledgement_placeholders.rb +43 -18
  65. data/lib/principles/models/acknowledgement_refusal.rb +20 -11
  66. data/lib/principles/models/acknowledgements_to_offer.rb +86 -0
  67. data/lib/principles/models/after_commit_input.rb +5 -0
  68. data/lib/principles/models/answer_fields.rb +3 -0
  69. data/lib/principles/models/assessment_basis.rb +10 -3
  70. data/lib/principles/models/audit.rb +10 -10
  71. data/lib/principles/models/audit_record.rb +10 -0
  72. data/lib/principles/models/audit_records.rb +4 -3
  73. data/lib/principles/models/audit_start.rb +9 -0
  74. data/lib/principles/models/authored_locator.rb +33 -0
  75. data/lib/principles/models/candidate_files.rb +23 -3
  76. data/lib/principles/models/candidate_outline.rb +18 -125
  77. data/lib/principles/models/captured_sessions.rb +128 -0
  78. data/lib/principles/models/carrier_kind.rb +79 -0
  79. data/lib/principles/models/cited_files.rb +12 -3
  80. data/lib/principles/models/decided_prior_findings.rb +5 -0
  81. data/lib/principles/models/disposition.rb +38 -7
  82. data/lib/principles/models/disposition_placeholders.rb +27 -7
  83. data/lib/principles/models/disposition_text_field.rb +4 -0
  84. data/lib/principles/models/feature.rb +53 -0
  85. data/lib/principles/models/finding_outcomes.rb +55 -0
  86. data/lib/principles/models/findings_left_open.rb +9 -11
  87. data/lib/principles/models/head_moves.rb +27 -10
  88. data/lib/principles/models/installed_component.rb +55 -0
  89. data/lib/principles/models/installed_plugins.rb +174 -0
  90. data/lib/principles/models/kept_sessions.rb +34 -0
  91. data/lib/principles/models/locator.rb +8 -0
  92. data/lib/principles/models/logged_request_reach.rb +44 -0
  93. data/lib/principles/models/logged_request_scan_completeness.rb +43 -0
  94. data/lib/principles/models/mapped_baseline.rb +46 -0
  95. data/lib/principles/models/maps_holding_file_whole.rb +42 -0
  96. data/lib/principles/models/markdown_text.rb +143 -0
  97. data/lib/principles/models/member.rb +14 -1
  98. data/lib/principles/models/member_entry.rb +56 -0
  99. data/lib/principles/models/member_lines.rb +11 -0
  100. data/lib/principles/models/member_loads.rb +17 -2
  101. data/lib/principles/models/member_problems.rb +45 -42
  102. data/lib/principles/models/member_reach.rb +36 -0
  103. data/lib/principles/models/member_snapshots.rb +23 -4
  104. data/lib/principles/models/member_text_as_sent.rb +31 -0
  105. data/lib/principles/models/member_texts.rb +45 -0
  106. data/lib/principles/models/members_in_logged_requests.rb +240 -0
  107. data/lib/principles/models/missing_files.rb +41 -16
  108. data/lib/principles/models/named_placeholder.rb +17 -7
  109. data/lib/principles/models/nearly_matching_maps.rb +56 -0
  110. data/lib/principles/models/open_correction.rb +5 -0
  111. data/lib/principles/models/open_finding.rb +4 -3
  112. data/lib/principles/models/outline_budget.rb +10 -1
  113. data/lib/principles/models/outline_item.rb +25 -0
  114. data/lib/principles/models/outline_section.rb +15 -4
  115. data/lib/principles/models/part_named.rb +16 -2
  116. data/lib/principles/models/plugin_component.rb +37 -0
  117. data/lib/principles/models/plugin_install.rb +33 -0
  118. data/lib/principles/models/plugin_name.rb +23 -0
  119. data/lib/principles/models/plugin_reference.rb +53 -0
  120. data/lib/principles/models/principle_members.rb +15 -0
  121. data/lib/principles/models/prior_finding_decision.rb +1 -1
  122. data/lib/principles/models/prior_finding_outcomes.rb +12 -1
  123. data/lib/principles/models/problem_report.rb +14 -25
  124. data/lib/principles/models/project.rb +35 -29
  125. data/lib/principles/models/project_history.rb +23 -0
  126. data/lib/principles/models/recorded_members.rb +7 -0
  127. data/lib/principles/models/request_logging.rb +196 -0
  128. data/lib/principles/models/runs_from.rb +0 -5
  129. data/lib/principles/models/script_comments.rb +58 -0
  130. data/lib/principles/models/stale_request.rb +9 -0
  131. data/lib/principles/models/template_placeholders.rb +10 -9
  132. data/lib/principles/models/unfixed_part.rb +82 -0
  133. data/lib/principles/models/unresolved_plugin_members.rb +35 -0
  134. data/lib/principles/models/whole_file_member_read.rb +48 -0
  135. data/lib/principles/models/without_prose.rb +20 -0
  136. data/lib/principles/models/workflow_jobs.rb +92 -0
  137. data/lib/principles/show_members_in_logged_requests_options.rb +27 -0
  138. data/lib/principles/show_principle_options.rb +32 -0
  139. data/lib/principles/version.rb +2 -2
  140. data/lib/principles/views/acknowledged_result.rb +31 -12
  141. data/lib/principles/views/acknowledgement_result.rb +41 -29
  142. data/lib/principles/views/acknowledgement_template_alone.rb +55 -0
  143. data/lib/principles/views/acknowledgements_offered.rb +54 -0
  144. data/lib/principles/views/added_member.rb +22 -6
  145. data/lib/principles/views/answer_in_a_file.rb +16 -16
  146. data/lib/principles/views/assessed_members.rb +18 -7
  147. data/lib/principles/views/assessment_request.rb +8 -3
  148. data/lib/principles/views/audit_changes.rb +14 -8
  149. data/lib/principles/views/audit_findings.rb +34 -0
  150. data/lib/principles/views/audit_result.rb +14 -19
  151. data/lib/principles/views/carrier_checks.rb +40 -0
  152. data/lib/principles/views/carrier_practices_page.rb +49 -0
  153. data/lib/principles/views/completed_audit_findings.rb +33 -0
  154. data/lib/principles/views/completed_audit_next_step.rb +12 -4
  155. data/lib/principles/views/consecutive_sections_elsewhere.rb +4 -0
  156. data/lib/principles/views/context_parts.rb +129 -25
  157. data/lib/principles/views/correction_request.rb +22 -17
  158. data/lib/principles/views/disposition_template.rb +35 -0
  159. data/lib/principles/views/first_audit.rb +29 -15
  160. data/lib/principles/views/first_audit_brief.rb +0 -1
  161. data/lib/principles/views/first_audit_line.rb +4 -5
  162. data/lib/principles/views/invocation.rb +16 -6
  163. data/lib/principles/views/last_record_notice.rb +41 -0
  164. data/lib/principles/views/lines_shared_with_member.rb +16 -22
  165. data/lib/principles/views/logged_request_status_meanings.rb +29 -0
  166. data/lib/principles/views/logged_requests_evidence.rb +69 -0
  167. data/lib/principles/views/map_added_to.rb +14 -12
  168. data/lib/principles/views/map_result.rb +39 -17
  169. data/lib/principles/views/member_change_since_baseline.rb +4 -0
  170. data/lib/principles/views/member_row.rb +13 -4
  171. data/lib/principles/views/member_sets_overlap.rb +31 -0
  172. data/lib/principles/views/members_a_commit_changed.rb +42 -25
  173. data/lib/principles/views/members_changed_during_audit.rb +27 -0
  174. data/lib/principles/views/members_in_logged_requests_result.rb +68 -0
  175. data/lib/principles/views/members_too_short_to_scan.rb +45 -0
  176. data/lib/principles/views/members_with_no_baseline.rb +6 -6
  177. data/lib/principles/views/meta_principle_result.rb +14 -2
  178. data/lib/principles/views/open_findings_line.rb +31 -92
  179. data/lib/principles/views/parts_index_result.rb +9 -5
  180. data/lib/principles/views/principle_read_result.rb +52 -11
  181. data/lib/principles/views/prior_findings_result.rb +9 -1
  182. data/lib/principles/views/problem_facts.rb +5 -3
  183. data/lib/principles/views/problem_lines.rb +32 -6
  184. data/lib/principles/views/problem_result.rb +7 -15
  185. data/lib/principles/views/prompts/answer-any-judgement-request/fill-the-answer-in-a-file.md +1 -1
  186. data/lib/principles/views/prompts/assess-every-member/claim-an-earlier-first-raised-at.md +6 -6
  187. data/lib/principles/views/prompts/assess-every-member/read-a-compact-carried-member.md +9 -8
  188. data/lib/principles/views/prompts/assess-every-member/read-a-flagged-member-s-text-whole.md +3 -0
  189. data/lib/principles/views/prompts/assess-every-member/read-a-judged-member-s-text-whole.md +3 -0
  190. data/lib/principles/views/prompts/assess-every-member/turn-on-request-logging-to-see-what-reaches-context.md +2 -0
  191. data/lib/principles/views/prompts/assess-every-member/weigh-what-reached-the-context.md +7 -0
  192. data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
  193. data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +5 -0
  194. data/lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md +1 -1
  195. data/lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md +1 -1
  196. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-configuration.md +41 -0
  197. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-scripts.md +35 -0
  198. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-instruction-files.md +37 -0
  199. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-other-text-an-agent-reads.md +38 -0
  200. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-rule-files.md +34 -0
  201. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-skills.md +35 -0
  202. data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-subagent-definitions.md +35 -0
  203. data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +50 -51
  204. data/lib/principles/views/prompts/learn-what-a-command-does/change-member-role.md +2 -1
  205. data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +1 -1
  206. data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +32 -32
  207. data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +10 -11
  208. data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +7 -6
  209. data/lib/principles/views/prompts/learn-what-a-command-does/remove-logged-requests.md +16 -0
  210. data/lib/principles/views/prompts/learn-what-a-command-does/remove-member.md +2 -1
  211. data/lib/principles/views/prompts/learn-what-a-command-does/report-at-session-start.md +2 -2
  212. data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +3 -3
  213. data/lib/principles/views/prompts/learn-what-a-command-does/show-audit.md +7 -0
  214. data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +8 -2
  215. data/lib/principles/views/prompts/learn-what-a-command-does/show-carrier-practices.md +13 -0
  216. data/lib/principles/views/prompts/learn-what-a-command-does/show-logged-requests.md +20 -0
  217. data/lib/principles/views/prompts/learn-what-a-command-does/show-members-in-logged-requests.md +48 -0
  218. data/lib/principles/views/prompts/learn-what-a-command-does/show-open-correction.md +1 -1
  219. data/lib/principles/views/prompts/learn-what-a-command-does/show-principle.md +14 -14
  220. data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +27 -27
  221. data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +11 -11
  222. data/lib/principles/views/prompts/learn-what-a-command-does/turn-off-request-logging.md +10 -0
  223. data/lib/principles/views/prompts/learn-what-a-command-does/turn-on-request-logging.md +32 -0
  224. data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +3 -2
  225. data/lib/principles/views/prompts/read-what-reached-the-context/explain-request-logging-to-the-user.md +11 -0
  226. data/lib/principles/views/prompts/read-what-reached-the-context/see-whether-members-reach-the-agent.md +2 -0
  227. data/lib/principles/views/prompts/read-what-reached-the-context/what-absent-means.md +2 -0
  228. data/lib/principles/views/prompts/read-what-reached-the-context/what-not-a-carrier-means.md +2 -0
  229. data/lib/principles/views/prompts/read-what-reached-the-context/what-present-but-not-loaded-means.md +2 -0
  230. data/lib/principles/views/prompts/read-what-reached-the-context/what-present-means.md +1 -0
  231. data/lib/principles/views/prompts/read-what-reached-the-context/what-unmeasurable-means.md +2 -0
  232. data/lib/principles/views/prompts/report-after-a-commit/plugin-members-are-still-listed.md +1 -0
  233. data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members-waiting-on-an-upgrade.md +2 -2
  234. data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members.md +2 -2
  235. data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-what-each-needs-before-the-next-commit.md +1 -0
  236. data/lib/principles/views/prompts/run-a-first-audit-in-the-background/follow-the-brief.md +1 -1
  237. data/lib/principles/views/prompts/set-principles-up/entry-file-passage.md +1 -1
  238. data/lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md +2 -1
  239. data/lib/principles/views/prompts/start-a-session/hand-the-first-audit-to-a-subagent.md +2 -3
  240. data/lib/principles/views/prompts/start-a-session/raise-the-open-findings-waiting-on-no-one.md +1 -0
  241. data/lib/principles/views/request_logging_result.rb +62 -0
  242. data/lib/principles/views/request_part.rb +10 -4
  243. data/lib/principles/views/request_parts.rb +9 -0
  244. data/lib/principles/views/whole_file_elsewhere.rb +30 -0
  245. metadata +101 -4
  246. data/lib/principles/views/prompts/report-after-a-commit/the-principles-skill-is-where-to-start.md +0 -1
  247. data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-each-one.md +0 -1
@@ -116,26 +116,18 @@ module Principles
116
116
  # names members a one-member audit may judge, one acknowledgement for all of them, filled and shell-quoted so
117
117
  # the agent types no id, after one lead saying when to audit in full instead; the full audit for a principle
118
118
  # with a changed member no acknowledgement may judge, with no condition, as nothing else applies to it. None for
119
- # a principle in waits, whose audits wait on an upgrade.
120
- #: (Hash[String, untyped], Hash[Array[String], Array[String]], Array[String]) -> String?
119
+ # a principle in waits, whose audits wait on an upgrade, nor one awaiting its first full audit, whose audit
120
+ # unaudited_action names already.
121
+ #: (Hash[String, untyped], AcknowledgementsOffered, Array[String]) -> String?
121
122
  def changed_action(report, acknowledgeable, waits)
122
- changed = report.fetch("members").group_by { it.fetch("principle") }.except(*waits)
123
- acknowledging = acknowledgeable.map { |ids, members| acknowledge_line(ids, members) }
124
- full = changed.filter_map { |id, members| full_audit_line(id, members, acknowledged_in(acknowledgeable, id)) }
123
+ changed = report.fetch("members").group_by { it.fetch("principle") }
124
+ .except(*waits, *report.fetch("awaiting_first_audit", []))
125
+ full = changed.filter_map { |id, members| full_audit_line(id, members, acknowledgeable.members_of(id)) }
126
+ acknowledging = acknowledgeable.lines(@invocation)
125
127
  lines = [*(ACKNOWLEDGE_LEAD unless acknowledging.empty?), *acknowledging, *full]
126
128
  lines.empty? ? nil : lines.join("\n")
127
129
  end
128
130
 
129
- # The acknowledgement of every member in members by the principles ids names, each of those it maps.
130
- #: (Array[String], Array[String]) -> String
131
- def acknowledge_line(ids, members)
132
- @invocation.listed_in_project("start-audit", ids, options: members.flat_map { ["--member", it] })
133
- end
134
-
135
- # The members an acknowledgement in acknowledgeable takes in for principle id.
136
- #: (Hash[Array[String], Array[String]], String) -> Array[String]
137
- def acknowledged_in(acknowledgeable, id) = acknowledgeable.select { |ids, _| ids.include?(id) }.values.flatten
138
-
139
131
  # The full audit of principle id, for its changed members no acknowledgement may judge, or nil when the
140
132
  # acknowledgement takes in every one.
141
133
  #: (String, Array[Hash[String, untyped]], Array[String]) -> String?
@@ -1,4 +1,4 @@
1
- Save the answer alone in a file outside the project, at this full path, the same from every shell: %{save}
1
+ Save the answer alone in a file kept out of git, at this full path, the same from every shell: %{save}
2
2
 
3
3
  Fill %{what} with your own file-edit tool, not a shell heredoc; JSON escapes only a double quote, a backslash and a line
4
4
  break, as \", \\ and \n, never an apostrophe.
@@ -1,7 +1,7 @@
1
1
  A finding kept from records written before this tool kept `first_raised_at` is dated late. When the record's git
2
- history shows an earlier version leaving it open, at `.principles/audits/` or the folder's earlier name
3
- `.memeplex/audits/`, and you judge it the same finding, give `first_raised_at`, that version's `audited_at`, with
4
- `raised_in`, the full sha of the commit holding it, in its `still_holds` decision. This tool reads the record at
5
- that commit only, and refuses the claim unless that version leaves a finding with the same id deferred or accepted,
6
- its `audited_at` equals the claimed time, and the time is earlier than the one stored; whether it is the same
7
- finding is yours to judge.
2
+ history, which `git log --follow` on it lists, shows an earlier version leaving it open, at `.principles/audits/` or
3
+ the folder's earlier name `.memeplex/audits/`, and you judge it the same finding, give `first_raised_at`, that
4
+ version's `audited_at`, with `raised_in`, the full sha of the commit holding it, in its `still_holds` decision. This
5
+ tool reads the record at that commit only, and refuses the claim unless that version leaves a finding with the same
6
+ id deferred or accepted, its `audited_at` equals the claimed time, and the time is earlier than the one stored;
7
+ whether it is the same finding is yours to judge.
@@ -1,8 +1,9 @@
1
- When judging the set needs what a carried member was judged to say, run `show-audit` with this principle's id: a compact
2
- one prints no assessment. A carried member shows only its `assessed_at`, the facts that say what moved around it, and
3
- any check, whose `check_result` its template still asks for, unless one of those facts fires: then it prints whole, with
4
- its stored assessment and evidence. It prints whole when `evidence_changed` or `file_changed_outside_member` is true,
5
- when a `mapped_elsewhere` entry names `open_finding_ids`, and when this principle leaves a finding open on it: its
6
- `open_finding_ids` names that finding, the same one the prior findings list. An observed delivery's `observed_at` stays,
7
- since it says how old its sighting is: judge the member again when that sighting is too old to stand behind. Replace a
8
- marker with a fresh assessment whenever you no longer stand behind the one carried.
1
+ When judging the set needs what a carried member was judged to say, run `show-audit` with this principle's id, which
2
+ prints that member's stored assessment. A carried member here shows only its `assessed_at`, the facts that say what
3
+ moved around it, and any check, whose `check_result` its template still asks for, unless one of those facts fires: then
4
+ it prints whole, with its stored assessment and evidence. It prints whole when `evidence_changed` or
5
+ `file_changed_outside_member` is true, when a `mapped_elsewhere` entry names `open_finding_ids`, and when this principle
6
+ leaves a finding open on it: its `open_finding_ids` names that finding, the same one the prior findings list. An
7
+ observed delivery's `observed_at` stays, since it says how old its sighting is: judge the member again when that
8
+ sighting is too old to stand behind. Replace a marker with a fresh assessment whenever you no longer stand behind the
9
+ one carried.
@@ -0,0 +1,3 @@
1
+ A fact fires on this carried member, so decide whether to judge it again. If you judge it again, run `read_with` and
2
+ read its text whole as a step of that judgement, starting from its evidence and its `mapped_elsewhere` passages: a line
3
+ a change elsewhere left stale shows in no diff.
@@ -0,0 +1,3 @@
1
+ Run `read_with` and read this member's text whole, as a step of judging it, not an extra: a line a change elsewhere
2
+ left stale shows in no diff. Start from its last assessment's evidence and its `mapped_elsewhere` passages, then ask
3
+ whether the whole member still carries this principle.
@@ -0,0 +1,2 @@
1
+ No request is logged here, so nothing shows which members reach the agent's context; to
2
+ capture them: %{turn_on}
@@ -0,0 +1,7 @@
1
+ Weigh what reached the context. `members` lists every member this request lists, those marked `carried_forward`
2
+ too, whose text has not changed since the last audit but may still never reach the agent. `seen_in` counts the
3
+ captured requests that held a member's lines, of the `requests` beside `members`, every captured request the scan
4
+ read through, and `most_bytes` is the most of them one request held; `unreadable`, when printed, counts requests that
5
+ could not be read. `detail_with` shows where one member was seen, given its `member` as KEY. Did a member seen in no request carry its principle to the agent at all? Is a member seen in every
6
+ request worth its bytes in every session? Say so in the member's assessment where it changes your judgement, and for
7
+ a carried member in `collective_assessment`.
@@ -4,6 +4,7 @@
4
4
  "action": "fixed",
5
5
  "reason": "What you changed, in one line",
6
6
  "changed_members": ["the id of each member the fix changed"],
7
+ "changed_map_entries": ["the id of each member whose role or check the fix changed"],
7
8
  "removed_members": ["the id of each member the fix removed from the map"],
8
9
  "evidence": [{ "path": "a project file", "starting_at": "text that occurs once in the fixed passage" }],
9
10
  "reassessment": "How the changed member reads now, and any check you ran on it",
@@ -11,6 +11,11 @@ or a notes file, set its `recorded_at` to that place, as `{"path": ..., "heading
11
11
  When a deferral waits on someone, set its `waits_on` to one line saying whom it waits on and to decide what, such as
12
12
  "<person>, to approve a CI change", and keep the reason in the write-up. Leave it null when it waits on no one in
13
13
  particular. Only a deferral may give one, and this tool records when it was asked.
14
+ If a fix settles only part of a finding, keep it fixed and give the rest as its `unfixed_part`, rather than deferring
15
+ the whole finding:
16
+ `{"id": NEW_ID, "problem": ..., "action": "deferred", "reason": ..., "recorded_at": ..., "waits_on": ...}`, or
17
+ `"action": "accepted"`. The record keeps the finding fixed and raises that part as a new finding of the same members,
18
+ under an id no other finding has.
14
19
  If a fix rewrites the heading or the quoted text that locates a member, or the member's passage should be narrower
15
20
  or wider, move the member with `move-member`, then list the move in the answer as
16
21
  `"moved_members": [{"from": OLD_ID, "to": NEW_ID}]`, or `[{"from": ID, "to": ID}]` when the move kept its id, and
@@ -1,4 +1,4 @@
1
- Keep a copy of the assessment you submit outside the project (for `--file -`, its exact stdin bytes) until this
1
+ Keep a copy of the assessment you submit where git never commits it (for `--file -`, its exact stdin bytes) until this
2
2
  correction completes the audit: the open record keeps it, and only that copy rebuilds it if the record is lost.
3
3
  Once the assessment is submitted, print this correction's answer again at any time, in git or outside it and after
4
4
  fixes too, with this read-only command:
@@ -1,3 +1,3 @@
1
1
  To keep this result short, the list items of each file under inventory.outlines_cut are cut: under each of
2
- its headings, `(N more, lines A-B)` says how many items the section held and which lines of the file hold it. Where
2
+ its headings, `(N more, lines A-B)` says how many items it leaves out and which lines of the file hold them. Where
3
3
  the survey needs a cut section's items, read just those lines of the file, not the whole file.
@@ -0,0 +1,41 @@
1
+ # Hook configuration: the right event and matcher, and output the agent needs
2
+
3
+ A hook entry decides when a command runs and whether its output reaches the
4
+ agent. Ask: does this event fire only when the work needs it, and is the matcher
5
+ as narrow as it can be? On a session-start or prompt event, is every byte it
6
+ prints worth paying for in every session? Is it a hook because the action must
7
+ always happen, not a preference? Does the command path resolve from any working
8
+ directory and worktree? Is it registered once?
9
+
10
+ ## What reaches context, and when
11
+ - On session start and prompt submission, plain stdout and `additionalContext` are added as context the agent reads. Session start runs every session and after each compaction, so its output is an always-loaded carrier: keep it short, and put static text in the instructions file instead. (both)
12
+ - Output over the host's cap is saved to a file and the agent gets a preview. Do not rely on the agent reading the rest. (both)
13
+ - A pre-compaction hook's stdout instructs the summariser, not the agent; to brief the resumed agent, use session start with the `compact` source. (both)
14
+ - On other events, stdout on exit 0 is mostly not shown to the agent, and stderr on exit 0 never is. (Claude Code)
15
+ - Stop expects JSON on exit 0; plain text there is invalid. (Codex)
16
+
17
+ ## Exit status and failure
18
+ - Exit 2 blocks on events that can block, with stderr as the reason. Exit 1 is a non-blocking error, not a block: a policy hook must exit 2. (Claude Code)
19
+ - On a pre-tool event, an error, timeout or malformed response can let the tool run. Treat tool hooks as a guardrail, not a complete boundary. (Codex)
20
+ - A failing hook fails open by default; opt into blocking on failure only where a missed check is worse than a stalled session. (Claude Code)
21
+ - A Stop hook that blocks keeps the agent working; a hook that cannot run there traps it. Make sure it can always start.
22
+
23
+ ## Matchers and paths
24
+ - A matcher of plain names is exact; one with other characters is an unanchored regular expression, so `Edit.*` also matches other tools. Anchor with `^` and `$`. (Claude Code)
25
+ - Matchers are regular expressions, and some events ignore them. (Codex)
26
+ - Reference scripts from the project root variable. It stays at the main checkout when the session enters a worktree. (Claude Code)
27
+ - Commands run in the session's working directory, which may be a subdirectory; resolve scripts from the git root. (Codex)
28
+ - The same command registered in two files runs twice. Keep one format per layer. (Codex)
29
+
30
+ ## Is a hook the right carrier
31
+ - A hook is right for what must happen every time: a block, a gate, a check. A preference belongs in instructions.
32
+ - Prompt and agent hooks ask another model, so they are not deterministic. (Claude Code)
33
+ - Codex parses prompt and agent handlers but skips them. (Codex)
34
+ - Project hooks must be reviewed and trusted before they run, and a changed hook is skipped until trusted again. (Codex)
35
+ - Hooks for an event run in parallel; one cannot stop another starting. (both)
36
+ - Never block compaction: blocked at the context limit, the request fails. (Claude Code)
37
+ - Command hooks time out after ten minutes by default, and prompt-submission hooks after 30 seconds. Set a short `timeout`: a slow hook stalls the session. (Claude Code)
38
+
39
+ Sources: [hooks reference](https://code.claude.com/docs/en/hooks),
40
+ [hooks guide](https://code.claude.com/docs/en/hooks-guide),
41
+ [Codex hooks](https://developers.openai.com/codex/hooks).
@@ -0,0 +1,35 @@
1
+ # Hook scripts: quiet, fast, deterministic, and safe when they fail
2
+
3
+ What a hook script prints may land in the agent's context, on every event it
4
+ matches. Ask: does it print nothing when there is nothing to act on? Is each
5
+ line it prints short, specific and actionable? Does it give the same output for
6
+ the same state, with no network or slow work in the hot path? Does its exit
7
+ status mean what the host reads it as, and what happens when it crashes, times
8
+ out or a tool it calls is missing?
9
+
10
+ ## What it prints
11
+ - Silence is the default. A line printed when nothing needs doing teaches the agent to skim every later line.
12
+ - Print the fact and the next action, in one or two lines: the file, the check that failed, the command to run. Not a banner, a preamble or a restatement of the instructions file.
13
+ - On session start, every byte is paid in every session and again after each compaction. Point to a command or file the agent can read when needed rather than inlining a page. (both)
14
+ - Plain text and JSON are read differently. Print exactly one JSON object, with nothing else on stdout, or plain text, never a mix. (Claude Code)
15
+ - Diagnostics go to stderr or a log. On exit 0 the agent never sees stderr. (Claude Code)
16
+ - Never print secrets: oversized output is written to disk. (both)
17
+
18
+ ## Exit status
19
+ - Exit 0 for success, including when the script chose to say nothing.
20
+ - Exit 2, with the reason on stderr, to block an action that can be blocked. Exit 1 does not block. (Claude Code)
21
+ - On a Stop event, a block tells the agent to keep working, using the reason as its next prompt. Make that reason a concrete task. (both)
22
+
23
+ ## Determinism and speed
24
+ - Same input and state, same output. A script that varies by clock, randomness or network is hard to trust and harder to test.
25
+ - Session-start and prompt hooks block the session until they finish. Keep the work small, cache what is costly, and push slow or optional work to a background run whose output does not gate anything. (both)
26
+ - Read the event's JSON from stdin rather than guessing from the environment. Do not depend on the transcript's format; it is not a stable interface. (Codex)
27
+
28
+ ## Failing safe
29
+ - Decide per script which way failure should fall. A reminder fails open and silent. A safety block should fail closed, but only if the script cannot trap the agent.
30
+ - Guard against a missing interpreter, a missing tool or a path from the wrong directory: resolve paths from the project root, check dependencies, and say plainly what is wrong in one line.
31
+ - With blocking on failure set, a crash on a Stop or completion event keeps the agent looping on a hook it cannot repair. Test that path. (Claude Code)
32
+ - Test the script by running the real trigger and reading what reached the agent, not only by running it by hand.
33
+
34
+ Sources: [hooks reference](https://code.claude.com/docs/en/hooks),
35
+ [Codex hooks](https://developers.openai.com/codex/hooks).
@@ -0,0 +1,37 @@
1
+ # Instruction files: few lines, each owned once and checkable
2
+
3
+ A root file loads in every session, a nested one only for work in its folder,
4
+ so each line costs every task in its scope. Ask: would the agent err without
5
+ the line, or could it read this from the repository when needed? Does another
6
+ file own this rule, so this copy will drift? Does the line name something
7
+ checkable, a command, path or value, and say why? Does it belong here, or in a
8
+ scoped rule, a skill or one directory's own file? Does any line describe
9
+ something that no longer exists?
10
+
11
+ ## What loads, and what it costs
12
+ - The root file, the local file, the user file and every rule file without `paths:` load at launch in every session, and the root and unscoped rules are re-read after compaction. (Claude Code)
13
+ - A nested `CLAUDE.md` loads only once the agent reads or edits a file in its directory, so it is the cheap home for one directory's facts. (Claude Code)
14
+ - Codex joins the `AGENTS.md` files from the project root down to the working directory once at start, later files winning, and stops at a byte cap. A nested file is not deferred there. (Codex)
15
+ - An `@` import is expanded into context with its parent: it organises a file but saves nothing. Mention a path in backticks to point at it without loading it. (Claude Code)
16
+ - Anthropic's target is under 200 lines per file. Count words as well: a few long lines can hide a large cost.
17
+
18
+ ## Route each line by how it is used
19
+ - A fact or standing rule for every session goes in the root file. A topic for one part of the tree goes in a path-scoped rule. Steps you run in order belong in a skill or in a page a rule names. One piece of work's facts go in its working folder.
20
+ - Leave out what the agent learns by reading the code and would look up anyway. Keep exact commands, places where the code misleads, decisions the repository does not record, and anything corrected twice.
21
+ - Treat a new line as a displacement: find its home before finding room, and cut a line that outlived its subject first.
22
+
23
+ ## Wording
24
+ - Give each rule one owner and link to it from elsewhere. Copies drift, and the agent settles a contradiction arbitrarily. Check that every link resolves.
25
+ - Name the checkable thing and the reason: "run `rake lint` before committing; CI rejects unformatted files" lets the agent judge cases the line never names, where "keep code tidy" gives it nothing to act on.
26
+ - Write the plain imperative. Attach to each "never" the case it covers and why. Capitals and stacked emphasis make current models over-apply a rule.
27
+ - Give one canonical example, not a catalogue of variants.
28
+ - If a rule may not be skipped, enforce it with a hook, a permission denial or a failing check. These files are advisory context, not enforcement.
29
+
30
+ ## Keep it true
31
+ - Reconcile the instructions in the same change that renames, moves or retires what they describe. A stale line misleads every session.
32
+ - Put why a rule exists in the commit message that adds it, not in a maintainer note in the file.
33
+ - Confirm what actually loaded rather than assuming: the context view lists the memory files. (Claude Code)
34
+
35
+ Sources: [memory](https://code.claude.com/docs/en/memory),
36
+ [best practices](https://code.claude.com/docs/en/best-practices),
37
+ [AGENTS.md in Codex](https://developers.openai.com/codex/guides/agents-md).
@@ -0,0 +1,38 @@
1
+ # Other text an agent reads: clear, minimal, checkable, at the right altitude
2
+
3
+ Judge this text by how it reaches the agent. If a program or hook puts it in
4
+ context in a way the path does not show, judge it as that carrier and apply its
5
+ practices. Then ask: does each line earn its place, leading with the action? Is
6
+ it pitched as a rule the agent can apply, neither a keystroke script nor a
7
+ platitude? Does each step end in evidence the agent can show? Does a rule that
8
+ must always hold have a mechanism, not louder words?
9
+
10
+ ## How it loads decides what it costs
11
+ - A page the agent opens when a rule names it costs nothing until then. Keep it that way: point to it by path, and do not import or paste it into an always-loaded file.
12
+ - Text a program prints into context, such as a command's prompt or a monitor's message, is a carrier too. If it prints every session or on every tick, treat it as always-loaded: short, quiet when nothing needs doing, and pointing to a command for depth.
13
+ - A subagent sees only its brief and the files it loads. A step that hands work over puts everything needed in the brief. (Claude Code)
14
+ - After compaction, only the start of a long loaded body may survive. Put the instructions that hold throughout at the top. (Claude Code)
15
+
16
+ ## Altitude and length
17
+ - Too low is a brittle list of exact commands that breaks when the setting differs. Too high is advice with no concrete signal. Aim for a rule and a discriminator the agent can apply to a case nobody foresaw.
18
+ - Current models need less: a brief instruction steers most behaviour. Text written for older models is often too prescriptive. (both)
19
+ - Minimal is not short. Keep what the agent needs to act; move the long why into the reference page the steps point to.
20
+
21
+ ## Clarity
22
+ - Open with the action and its result; history can wait. Use numbered steps where order matters.
23
+ - Apply the colleague test: could a capable reader with only this text open carry it out?
24
+ - Use plain wording. Say what each "never" covers and why, so the agent can see when a case falls outside it. Stacked emphasis causes over-application.
25
+ - One canonical example teaches the pattern; a catalogue of variants teaches that everything is a special case.
26
+
27
+ ## Verification
28
+ - End each step with a done-signal: a path that exists, a URL, an exit status, output to paste back. An instruction without one is easy to skip.
29
+ - Request proof and a brief summary, not a transcript of reasoning.
30
+ - Only a separate check confirms a claim, such as a fresh-context reviewer or a test run before and after, not by its author's account.
31
+
32
+ ## Mechanism
33
+ - Text is weighed, not obeyed. A rule that must fire every time needs a hook, a permission denial or a build that fails without it. Another model's verdict informs a person; it does not gate the work.
34
+ - Corrected twice on the same rule, change the mechanism, not the sentence.
35
+
36
+ Sources: [best practices](https://code.claude.com/docs/en/best-practices),
37
+ [prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices),
38
+ [context engineering](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents).
@@ -0,0 +1,34 @@
1
+ # Rule files: one topic, scoped to the files it governs
2
+
3
+ A rule without `paths:` loads in every session like the root instructions, so
4
+ ask first whether it can be scoped. Does the file hold one topic, named in full
5
+ by its filename? Do its globs, quoted and in the documented forms, match the
6
+ files where the behaviour happens, and does the frontmatter parse? Is anything
7
+ in it needed before the first matching file is read or after a compaction? Does
8
+ it copy a page it could point to instead?
9
+
10
+ ## When a rule loads
11
+ - An unscoped rule loads at launch with the same weight as the project instructions and is re-read after compaction, so it spends the always-loaded budget. (Claude Code)
12
+ - A scoped rule loads when the agent opens, creates or changes a matching file, including a single-file read through the shell such as `cat`. It arrives as conversation, so compaction summarises it away until the next matching touch. (Claude Code)
13
+ - Listing a directory, grepping, globbing or writing a file through a shell heredoc are not documented triggers. Do not scope a rule whose duty starts there. (Claude Code)
14
+ - A rule that arrives with the first write of a new file cannot shape that write. Put guidance needed before the file exists in an unscoped line.
15
+ - Subagents pick up matching scoped rules the same way when they work with those files. (Claude Code)
16
+
17
+ ## Frontmatter and globs
18
+ - `paths` is the only field read; any other is ignored without warning. (Claude Code)
19
+ - If the YAML fails to parse, the rule loads as if it had no `paths`, in every session. Check the header after each edit; the debug log shows the parse error. (Claude Code)
20
+ - Quote every glob. Prefer `dir/**/*` and `**/*.ext`. A mid-path `**` is not shown in the docs, so prove it fires before relying on it, for example through the instructions-loaded hook event.
21
+ - Project globs resolve from the directory holding `.claude`; user rules resolve from the session's working directory. (Claude Code)
22
+
23
+ ## What to put in it
24
+ - One topic per file, with a filename that tells a reader its subject unopened.
25
+ - Standing checks for that topic, worded so they can be verified, each "never" with its scope and reason. A procedure belongs in a skill or a page.
26
+ - Where a page already owns the content, the rule only points: one sentence of rule, the moment to open it, and where it lives, as a link or in backticks. An `@` import pulls the whole page in, which undoes the point.
27
+ - Team conventions go in the project's rules. A personal rule must not restate or contradict one; neither overrides the other, so the agent may follow either. (Claude Code)
28
+ - A loaded rule over the per-file size limit is cut to its start. Keep each file well under it. (Claude Code)
29
+ - Record the reason for a rule's scope in the commit message, not in a comment in the file.
30
+ - Rules are guidance. A rule that must always hold needs a hook, a permission or a failing check.
31
+
32
+ Sources: [memory and rules](https://code.claude.com/docs/en/memory),
33
+ [context window](https://code.claude.com/docs/en/context-window),
34
+ [hooks](https://code.claude.com/docs/en/hooks).
@@ -0,0 +1,35 @@
1
+ # Skills: a description that wins selection, a lean body behind it
2
+
3
+ Every listed skill's name and description cost context on every turn, and the
4
+ description alone decides whether the body loads. Ask: does the description say
5
+ what the skill does and the concrete situations that should load it, in the
6
+ third person? Should a person invoke it by name instead, keeping it out of the
7
+ listing? Is the body lean, with detail one link away? Does the body explain why
8
+ rather than shout? Is this a skill at all, or a hook or a rule?
9
+
10
+ ## What loads, and what it costs
11
+ - Names and descriptions sit in a listing shared by every personal, project and plugin skill, within a character budget scaled to the context window. When it overflows, the least used descriptions are dropped first, and a skill shown with no description rarely fires. (Claude Code)
12
+ - Each description is cut at a per-skill cap in the listing. Put what and when first. (Claude Code)
13
+ - A skill marked for manual invocation only keeps its description out of the listing. Use it for anything a person starts by name. (Claude Code)
14
+ - Once loaded, the body stays in context across turns, and only its opening part is re-attached after compaction. Put the standing instructions at the top. (Claude Code)
15
+ - Measure the listing's size after adding a skill rather than trusting a count; the docs set no limit by number of skills.
16
+
17
+ ## The description
18
+ - Name the situations that should load it, not only the capability. Include the entry modes the model will miss: a task handed over without any triggering verb, or an edit that starts in an adjacent file.
19
+ - Write in the third person. Mixed point of view hurts discovery.
20
+ - Skills tend to under-fire, so a little insistence belongs here, in the description. Keep the body calm.
21
+ - Trivial one-step requests may never load a skill. For file types the skill must always govern, add `paths:` globs, and check that the host version honours them. (Claude Code)
22
+ - Keep the frontmatter valid YAML; a folded block avoids escaping trouble with colons and quotes. Respect the length limits on name and description.
23
+
24
+ ## The body
25
+ - Keep it under about 500 lines. Move depth into sibling files linked directly from the body, never a chain of links.
26
+ - Spend lines only on what the model cannot infer: the project's cadence, gates and prohibitions. Cut any line whose removal would cause no mistake.
27
+ - Use the imperative and give reasons. All-caps rules are a sign to explain instead.
28
+ - Name the skill for the activity it governs, lowercase with hyphens, a gerund preferred; never `helper`, `utils` or `tools`.
29
+
30
+ ## Choosing the carrier
31
+ - Procedural knowledge applied while working: a skill. A side effect that must always fire: a hook, which does its own work and never starts a skill. A heavy isolated job: a subagent or a forked skill. A rule for every session: the instructions file. (Claude Code)
32
+ - Prove a change with a trigger test recorded before and after: it fires on the missed case and stays quiet on near misses.
33
+
34
+ Sources: [skills](https://code.claude.com/docs/en/skills),
35
+ [skill authoring](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices).
@@ -0,0 +1,35 @@
1
+ # Subagent definitions: shared instructions only, for a worker spawned often
2
+
3
+ The description sits in the parent's context and steers delegation; the body is
4
+ the worker's whole system prompt. Ask: is this worker spawned repeatedly with
5
+ the same instructions, or is it a one-off prompt or a skill? Does the
6
+ description say what it does and who spawns it, without inviting unwanted
7
+ automatic use? Does the body hold only what every spawn shares, without
8
+ restating project instructions or a runbook's steps? Are tools, model and
9
+ isolation set deliberately?
10
+
11
+ ## What loads where
12
+ - The body becomes the worker's system prompt, in place of the host's own. The worker also gets the spawn prompt and the project instructions, but not the parent's conversation, loaded skills or files read. (Claude Code)
13
+ - Some built-in workers, and a type set to omit them, start without the project instructions, so their spawn prompt must carry any rule the work depends on. (Claude Code)
14
+ - Each type's description is listed to the parent so it can delegate. Keep it short and specific; every word is paid in the parent session.
15
+ - An edited definition is picked up within seconds without a restart. If a new type is refused by name, spawn a general-purpose worker told to read the file first. (Claude Code)
16
+
17
+ ## The description
18
+ - State the worker's job and the runbook or role that starts it. Leave out invitations to use it proactively when a runbook spawns it by name; keeping the description narrow is all that stops unwanted delegation. (Claude Code)
19
+ - Keep `name` unique: a project type outranks a user type of the same name. (Claude Code)
20
+
21
+ ## The body and the spawn prompt
22
+ - The body carries the standing instructions every spawn shares: what to check, how to report back, where to stop.
23
+ - Where a runbook owns the procedure, name its section and tell the worker to run it. A copy of the steps drifts.
24
+ - Do not restate the project instructions or rule files; the worker loads them.
25
+ - The spawn prompt carries what differs per task: the objective, the output format, the tools and sources, and the boundaries. Thin briefs cause duplicated work and gaps.
26
+
27
+ ## Frontmatter
28
+ - Spell each field exactly as the reference table does; an unknown field is ignored silently. A file without `name` is treated as documentation and never reported. Validate after editing. (Claude Code)
29
+ - Grant only the tools the job needs. A worker cannot ask the person a question; decisions that belong to a person come back to the parent. A background worker loses most built-in tools. (Claude Code)
30
+ - No field limits which paths a worker may write. A write fence is either a file list in the brief or a pre-tool hook. (Claude Code)
31
+ - A model passed at spawn beats the file's `model`. Set `model` in the definition where the job depends on it, and do not override it by habit. (Claude Code)
32
+ - A worktree-isolated worker starts from the default branch, not the parent's head, and an unchanged worktree is removed. Move it to the right branch first. (Claude Code)
33
+
34
+ Sources: [subagents](https://code.claude.com/docs/en/sub-agents),
35
+ [extension overview](https://code.claude.com/docs/en/features-overview).
@@ -6,53 +6,8 @@ and activation `show-meta-principle-passage` shows, and that member. That result
6
6
  activation it wrote under `map_created`; a later add-member has no `map_created`. Its question says to commit the map,
7
7
  how to show it, what to do next and, while a correction may be open, how a fix claims the member, only with a
8
8
  principle's first member or, in git once it has a commit, while the map file is as last committed, so members
9
- mapped in one sitting do not each repeat them.
10
-
11
- If the keeping principle's map was removed, commit that removal before its first add-member recreates it.
12
- `map_removal_not_committed` refuses while its map path remains at committed HEAD; `git_history_unavailable`
13
- refuses when that history cannot be verified. Existing-map additions keep their ordinary behavior.
14
-
15
- When one or two members are mapped and this copy knows no full audit has completed, that reminder asks whether
16
- every carrier is included and whether a member belongs to another principle. This is a question, not a minimum
17
- map size or a merge decision; unreadable/newer audit state does not count as known absence.
18
-
19
- `added.new_loading_scope` appears when this member has known literal loading-scope qualifiers not already mapped,
20
- and at least one prior known scope differs. `scope` and `already_mapped` (grouped `member_ids`) show the new and
21
- prior facts. `loading_basis` is `host: claude_code`, `kind: documented_prediction`,
22
- `session_start_assumption: project_root`; it is not observed delivery or a Codex derivation.
23
- The question asks whether carriers will be available where
24
- the principle applies, or should link to another carrier. This cue does not depend on audit history or the
25
- per-sitting reminder; adding another member in an already represented scope does not repeat it.
26
- The projection keeps when, context, invoked_by, skill_part and description qualifiers, with literal files and
27
- paths_field lines in their original order; it excludes sizes and hook references and does not interpret globs.
28
- `not_loaded` is a known no-load prediction. `not_determined` and `no_known_carrier`, even nested, are unclassified:
29
- `not_compared` lists each unclassified `member_id` and `scope` only beside a positive hint, never as evidence
30
- of equal scope, difference or delivery.
31
- Unknown new scopes or only unknown prior scopes give no new-scope field or cue.
32
-
33
- `added.consecutive_sections_elsewhere` names other maps' members in consecutive complete Markdown sections
34
- of the same underlying file, with their path, role and current lines, only when all named maps lack a completed
35
- full audit. Only heading locators without passage/query qualifiers qualify; spans meet without overlap or a gap.
36
- The question asks whether they carry one rule or distinct principles; location alone does not decide.
37
- Unreadable/unknown audit or member facts are omitted, and an empty group and its note are absent.
38
-
39
- When the new member shares a line with members already mapped, `added` names them, so you see that one
40
- edit there will show as a change to each: `overlaps` lists those in this principle, and `mapped_elsewhere`
41
- those in other principles, each with its principle, its id, the role it plays there and its `first_line` and
42
- `last_line`, since this page does not show another principle's members. A member mapped through a symbolic
43
- link to the same file is listed too, under the path it was mapped by, since an edit through either name
44
- changes both. Check that the role
45
- you gave fits beside theirs. A member that spans exactly the new member's lines is marked too: in this
46
- principle by `same_lines_as`, listing those of `overlaps`, and in another by `"same_lines": true` on its
47
- `mapped_elsewhere` entry. Equal lines may still differ within a line, so decide whether they are one member
48
- mapped twice under different ids, and keep one, or two meant to share those lines, and say why in the role.
49
- A `mapped_elsewhere` entry whose lines include all of the new member's gives `"spans_these_lines": true`,
50
- and one whose lines all lie within the new member's gives `"within_these_lines": true`. One sharing only some
51
- of the lines is marked neither way. Every edit to the held member's text is an edit to the holding one, and an
52
- edit outside the shared lines reaches only the holding one. These are lines, not text: where two share a first
53
- or last line, a passage can start or end partway through it, so the question asks you to check the text there,
54
- unless the holding member is a whole file, which holds every line's text.
55
- The result lists each field only when there are some.
9
+ mapped in one sitting do not each repeat them. `--plugin NAME@MARKETPLACE` maps PATH inside an installed
10
+ plugin, whole and read-only, refusing a location flag (`plugin_member_located`); audits compare its pinned hash.
56
11
 
57
12
  The location flags narrow the member; omit them for a whole file. Give both to take a passage within a section:
58
13
 
@@ -72,7 +27,51 @@ The location flags narrow the member; omit them for a whole file. Give both to t
72
27
  its `key:` line and the indented or list lines after it. So respelling the key counts as a change,
73
28
  as does editing its value. A query takes no other location flag.
74
29
 
75
- `--check COMMAND` names the command that enforces this member, such as the build task that fails on a
76
- broken rule. Each audit asks you to run it and report its exit status. The first audit after a check is
77
- added or changed asks for it to be reviewed before it runs. This tool stores the command and never runs
78
- it. Change it later with `change-member-check`.
30
+ `--check COMMAND` names the command that enforces this member, such as the build task that fails on a broken rule.
31
+ Each audit asks you to run it and report its exit status. A check passes when it exits 0 and fails on any other exit
32
+ status. The first audit after a check is added or changed asks for it to be reviewed before it runs. This tool
33
+ stores the command and never runs it. Change it later with `change-member-check`.
34
+
35
+ If the keeping principle's map was removed, commit that removal before its first add-member recreates it.
36
+ `map_removal_not_committed` refuses while its map is at committed HEAD, `git_history_unavailable` when unverifiable.
37
+
38
+ When one or two members are mapped and this copy knows no full audit has completed, that reminder asks whether
39
+ every carrier is included and whether a member belongs to another principle. This is a question, not a minimum
40
+ map size or a merge decision; unreadable/newer audit state does not count as known absence.
41
+
42
+ `added.new_loading_scope` appears when this member has known literal loading-scope qualifiers not already mapped,
43
+ and at least one prior known scope differs. `scope` and `already_mapped` (grouped `member_ids`) show the new and
44
+ prior facts. `loading_basis` is `host: claude_code`, `kind: documented_prediction`, `session_start_assumption:
45
+ project_root`; it is not observed delivery or a Codex derivation. The question asks whether carriers will be
46
+ available where the principle applies, or should link to another carrier. This cue does not depend on audit history
47
+ or the per-sitting reminder; adding another member in an already represented scope does not repeat it.
48
+ The projection keeps when, context, invoked_by, skill_part and description qualifiers, with literal files and
49
+ paths_field lines in their original order; it excludes sizes and hook references and does not interpret globs.
50
+ `not_loaded` is a known no-load prediction. `not_determined` and `no_known_carrier`, even nested, are unclassified:
51
+ `not_compared` lists each unclassified `member_id` and `scope` only beside a positive hint, never as evidence
52
+ of equal scope, difference or delivery. Unknown new scopes or only unknown prior scopes give no new-scope field or cue.
53
+
54
+ `added.consecutive_sections_elsewhere` names other maps' members in consecutive complete Markdown sections of the
55
+ same underlying file (heading locators alone, meeting without overlap or gap), with path, role and current lines,
56
+ only while every named map lacks a completed full audit. The question asks whether they carry one rule or distinct
57
+ principles; location alone does not decide. Unreadable or unknown audit or member facts are left out.
58
+
59
+ `added.whole_file_elsewhere` lists other principles holding the new whole-file member's file whole, by path or link.
60
+ `added.member_sets_overlap` gives each other map sharing, by member id, the new member and one more, `shared`, and at
61
+ least two thirds of `members_in_either`. Either asks whether each should hold only the passages that carry it
62
+ (move-member) or they are one principle: add one map's members to the other, then remove-principle.
63
+
64
+ When the new member shares a line with members already mapped, `added` names them, so you see that one edit there
65
+ will show as a change to each: `overlaps` lists those in this principle, and `mapped_elsewhere` those in other
66
+ principles, each with its principle, its id, its role there and its `first_line` and `last_line`, which this page
67
+ does not otherwise show; one mapped through a symbolic link to the same file is listed under the path it was mapped
68
+ by. Check that the role you gave fits beside theirs. A member spanning exactly the new member's lines is marked too:
69
+ in this principle by `same_lines_as`, listing those of `overlaps`, and in another by `"same_lines": true` on its
70
+ `mapped_elsewhere` entry. Equal lines may still differ within a line, so decide whether they are one member mapped
71
+ twice under different ids, and keep one, or two meant to share those lines, and say why in the role. A
72
+ `mapped_elsewhere` entry whose lines include all of the new member's gives `"spans_these_lines": true`, and one whose
73
+ lines all lie within the new member's gives `"within_these_lines": true`; one sharing only some is marked neither way.
74
+ Every edit to the held member's text is an edit to the holding one, and an edit outside the shared lines reaches only
75
+ the holding one. These are lines, not text: where two share a first or last line, a passage can start or end partway
76
+ through it, so the question asks you to check the text there, unless the holding member is a whole file, which holds
77
+ every line's text. Each field is listed only when there are some.
@@ -1,4 +1,5 @@
1
- Replaces the role of MEMBER of principle ID with ROLE. MEMBER is the id `show-principle` lists.
1
+ Replaces the role of MEMBER of principle ID with ROLE. MEMBER is the id `show-principle` lists. The result prints
2
+ under `member` its id and new role, not the whole map: `show-principle` shows the rest.
2
3
 
3
4
  Run during a full audit, between an accepted assessment and its correction, to fix a finding in the map: list MEMBER
4
5
  in the `changed_map_entries` of the fixed disposition it fixes, and submit the correction. This tool prints both
@@ -51,7 +51,7 @@ characters, lines A-B)`; then list items; then headings below the second level f
51
51
  The root CLAUDE.md and AGENTS.md go after every other file, and keep their outlines. `outlines_cut` names each file
52
52
  whose outline lines were cut; a file whose only cut is its description is not named, since its text says so. Under
53
53
  each heading of a cut file, `(N more, lines A-B)`, or `(N more under M headings, lines A-B)`, says how many items
54
- its section held and which lines of the file hold it, so read just those lines where the survey needs them, not the
54
+ it leaves out and which lines of the file hold them, so read just those lines where the survey needs them, not the
55
55
  whole file. `outlines_left_out` names files at path and size alone. Run `show-candidate-outlines PATH...` for needed
56
56
  outlines; request fewer paths if it omits any. In git, `untracked` names each listed file git does not track, and
57
57
  each file a listed link leads to that git does not track: it loads into context all the same, but start-audit