principles 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/lib/principles/after_commit_hook_options.rb +4 -1
  3. data/lib/principles/cli.rb +3 -1
  4. data/lib/principles/command_line.rb +38 -26
  5. data/lib/principles/command_routes.rb +11 -4
  6. data/lib/principles/controllers/acknowledgement.rb +93 -17
  7. data/lib/principles/controllers/answer.rb +45 -76
  8. data/lib/principles/controllers/answer_phase.rb +54 -0
  9. data/lib/principles/controllers/assessment.rb +46 -11
  10. data/lib/principles/controllers/audit.rb +17 -6
  11. data/lib/principles/controllers/audit_completion.rb +9 -5
  12. data/lib/principles/controllers/command.rb +5 -4
  13. data/lib/principles/controllers/correction.rb +22 -10
  14. data/lib/principles/controllers/full_audit_request.rb +11 -1
  15. data/lib/principles/controllers/guidance_search_paths.rb +31 -0
  16. data/lib/principles/controllers/inventory.rb +15 -29
  17. data/lib/principles/controllers/mapping.rb +9 -1
  18. data/lib/principles/controllers/member_addition.rb +65 -0
  19. data/lib/principles/controllers/member_entries.rb +6 -24
  20. data/lib/principles/controllers/member_problems_report.rb +13 -6
  21. data/lib/principles/controllers/members_a_commit_changed.rb +2 -1
  22. data/lib/principles/controllers/members_to_assess.rb +21 -13
  23. data/lib/principles/controllers/meta_principle_setup.rb +1 -1
  24. data/lib/principles/controllers/repoint.rb +22 -23
  25. data/lib/principles/controllers/survey.rb +60 -0
  26. data/lib/principles/data/audit_files.rb +4 -0
  27. data/lib/principles/data/bounded_file.rb +9 -4
  28. data/lib/principles/data/candidate_files_found.rb +48 -13
  29. data/lib/principles/data/command-steps.json +85 -24
  30. data/lib/principles/data/committed_tree.rb +84 -0
  31. data/lib/principles/data/first_parent_log.rb +48 -0
  32. data/lib/principles/data/first_parent_range.rb +122 -0
  33. data/lib/principles/data/git_command.rb +37 -0
  34. data/lib/principles/data/guidance_search_paths_file.rb +107 -0
  35. data/lib/principles/data/map_files.rb +35 -10
  36. data/lib/principles/data/principles_directory.rb +40 -0
  37. data/lib/principles/data/principles_subfolder.rb +39 -16
  38. data/lib/principles/data/project_files.rb +22 -11
  39. data/lib/principles/data/repository.rb +55 -29
  40. data/lib/principles/data/requested_candidate_files.rb +43 -0
  41. data/lib/principles/data/running_version.rb +3 -5
  42. data/lib/principles/data/schema_check.rb +16 -6
  43. data/lib/principles/data/schemas/acknowledgement-answer.schema.json +18 -5
  44. data/lib/principles/data/schemas/answer-guide.schema.json +255 -68
  45. data/lib/principles/data/schemas/audit-record.schema.json +10 -1
  46. data/lib/principles/data/schemas/command-steps.schema.json +2 -1
  47. data/lib/principles/data/schemas/correction-answer-guide.schema.json +2 -1
  48. data/lib/principles/data/schemas/correction-answer.schema.json +6 -0
  49. data/lib/principles/data/schemas/guidance-search-paths.schema.json +13 -0
  50. data/lib/principles/data/schemas/member-map-history.schema.json +20 -0
  51. data/lib/principles/data/verified_head.rb +162 -0
  52. data/lib/principles/invocation_options.rb +3 -3
  53. data/lib/principles/models/acknowledgement.rb +95 -84
  54. data/lib/principles/models/acknowledgement_left_as_printed.rb +51 -0
  55. data/lib/principles/models/acknowledgement_refusal.rb +90 -0
  56. data/lib/principles/models/answer_place.rb +4 -0
  57. data/lib/principles/models/assessment_answer.rb +0 -45
  58. data/lib/principles/models/assessment_left_as_printed.rb +81 -0
  59. data/lib/principles/models/audit_entry_protecting_map.rb +28 -0
  60. data/lib/principles/models/audit_record.rb +12 -16
  61. data/lib/principles/models/audit_records.rb +52 -23
  62. data/lib/principles/models/candidate_files.rb +44 -10
  63. data/lib/principles/models/candidate_inventory.rb +69 -8
  64. data/lib/principles/models/candidate_outline.rb +195 -0
  65. data/lib/principles/models/captured_head.rb +72 -0
  66. data/lib/principles/models/carried_member.rb +42 -0
  67. data/lib/principles/models/check_since_last_audit.rb +20 -11
  68. data/lib/principles/models/command_steps.rb +17 -1
  69. data/lib/principles/models/declared_map_changes.rb +29 -12
  70. data/lib/principles/models/declared_member_removals.rb +75 -0
  71. data/lib/principles/models/disposition.rb +4 -2
  72. data/lib/principles/models/fix_only_fields.rb +12 -0
  73. data/lib/principles/models/frontmatter_fields.rb +9 -8
  74. data/lib/principles/models/guidance_search_path.rb +26 -0
  75. data/lib/principles/models/guidance_search_paths.rb +57 -0
  76. data/lib/principles/models/instruction_named.rb +35 -0
  77. data/lib/principles/models/left_as_printed.rb +39 -0
  78. data/lib/principles/models/line_span.rb +6 -0
  79. data/lib/principles/models/loaded_files.rb +1 -2
  80. data/lib/principles/models/loading_scope.rb +61 -0
  81. data/lib/principles/models/locator.rb +6 -0
  82. data/lib/principles/models/mapped_principles.rb +39 -37
  83. data/lib/principles/models/member_assessments.rb +9 -31
  84. data/lib/principles/models/member_file.rb +20 -47
  85. data/lib/principles/models/member_hashes_as_written.rb +10 -6
  86. data/lib/principles/models/member_history.rb +7 -5
  87. data/lib/principles/models/member_lines.rb +63 -15
  88. data/lib/principles/models/member_loading_scopes.rb +49 -0
  89. data/lib/principles/models/member_loads.rb +4 -0
  90. data/lib/principles/models/member_mapping_run.rb +30 -0
  91. data/lib/principles/models/member_moves.rb +4 -0
  92. data/lib/principles/models/member_problems.rb +63 -33
  93. data/lib/principles/models/member_region.rb +129 -0
  94. data/lib/principles/models/member_repair_moves.rb +52 -0
  95. data/lib/principles/models/member_snapshots.rb +14 -1
  96. data/lib/principles/models/members_in_consecutive_sections.rb +56 -0
  97. data/lib/principles/models/meta_principle.rb +14 -0
  98. data/lib/principles/models/missing_files.rb +2 -2
  99. data/lib/principles/models/open_findings_elsewhere.rb +4 -0
  100. data/lib/principles/models/other_templates_placeholders.rb +81 -42
  101. data/lib/principles/models/outline_budget.rb +142 -0
  102. data/lib/principles/models/outline_group.rb +31 -0
  103. data/lib/principles/models/outline_section.rb +56 -0
  104. data/lib/principles/models/principle.rb +14 -7
  105. data/lib/principles/models/principle_file_revision.rb +48 -0
  106. data/lib/principles/models/principle_history.rb +46 -19
  107. data/lib/principles/models/principle_lineage.rb +118 -0
  108. data/lib/principles/models/principle_map_revision.rb +39 -0
  109. data/lib/principles/models/principle_mapping_history.rb +132 -0
  110. data/lib/principles/models/principle_members.rb +25 -0
  111. data/lib/principles/models/principle_predecessor.rb +45 -0
  112. data/lib/principles/models/principle_publication.rb +177 -0
  113. data/lib/principles/models/principle_revision.rb +104 -0
  114. data/lib/principles/models/prior_decision_fields.rb +3 -2
  115. data/lib/principles/models/prior_finding_decision.rb +14 -4
  116. data/lib/principles/models/problem_report.rb +17 -5
  117. data/lib/principles/models/project.rb +46 -39
  118. data/lib/principles/models/project_history.rb +45 -25
  119. data/lib/principles/models/quoted_change.rb +137 -0
  120. data/lib/principles/models/record_format.rb +12 -2
  121. data/lib/principles/models/recorded_entry.rb +6 -0
  122. data/lib/principles/models/recorded_hashes.rb +7 -3
  123. data/lib/principles/models/recorded_members.rb +27 -15
  124. data/lib/principles/models/refusal_before_shape.rb +21 -0
  125. data/lib/principles/models/repoint.rb +13 -0
  126. data/lib/principles/models/reported_check.rb +5 -14
  127. data/lib/principles/models/sent_answer.rb +61 -0
  128. data/lib/principles/models/shape_problems_beside.rb +40 -0
  129. data/lib/principles/models/submitted_answer.rb +34 -0
  130. data/lib/principles/models/survey_search_paths.rb +26 -0
  131. data/lib/principles/models/template_placeholders.rb +34 -4
  132. data/lib/principles/models/text_within.rb +55 -0
  133. data/lib/principles/models/unchecked_members.rb +76 -0
  134. data/lib/principles/models/uncommitted_files.rb +50 -0
  135. data/lib/principles/models/unknown_principle.rb +29 -0
  136. data/lib/principles/models/write_up_opening.rb +21 -4
  137. data/lib/principles/positional_arguments.rb +37 -0
  138. data/lib/principles/session_start_options.rb +2 -2
  139. data/lib/principles/start_audit_options.rb +19 -4
  140. data/lib/principles/version.rb +2 -2
  141. data/lib/principles/views/acknowledgement_result.rb +23 -11
  142. data/lib/principles/views/added_member.rb +41 -0
  143. data/lib/principles/views/answered_request.rb +21 -0
  144. data/lib/principles/views/assessed_members.rb +43 -10
  145. data/lib/principles/views/assessment_request.rb +91 -31
  146. data/lib/principles/views/audit_result.rb +40 -28
  147. data/lib/principles/views/candidate_files_result.rb +85 -19
  148. data/lib/principles/views/candidate_outlines_result.rb +25 -0
  149. data/lib/principles/views/check_notes.rb +44 -0
  150. data/lib/principles/views/check_result_template.rb +14 -23
  151. data/lib/principles/views/consecutive_sections_elsewhere.rb +27 -0
  152. data/lib/principles/views/correction_request.rb +32 -1
  153. data/lib/principles/views/guidance_search_paths_result.rb +26 -0
  154. data/lib/principles/views/instruction.rb +74 -0
  155. data/lib/principles/views/json_with_entries_on_lines.rb +59 -0
  156. data/lib/principles/views/loads_to_check_result.rb +2 -2
  157. data/lib/principles/views/map_added_to.rb +56 -2
  158. data/lib/principles/views/map_result.rb +23 -43
  159. data/lib/principles/views/maps_needing_members_or_audit.rb +47 -0
  160. data/lib/principles/views/member_change_since_baseline.rb +23 -5
  161. data/lib/principles/views/member_repairs.rb +22 -52
  162. data/lib/principles/views/members_a_commit_changed.rb +16 -6
  163. data/lib/principles/views/new_loading_scope.rb +31 -0
  164. data/lib/principles/views/one_member_check_result_template.rb +47 -0
  165. data/lib/principles/views/open_findings_elsewhere_result.rb +3 -3
  166. data/lib/principles/views/open_findings_line.rb +77 -23
  167. data/lib/principles/views/principle_read_result.rb +24 -29
  168. data/lib/principles/views/principles_with_no_completed_audit.rb +9 -3
  169. data/lib/principles/views/prior_findings_result.rb +23 -15
  170. data/lib/principles/views/problem_lines.rb +3 -1
  171. data/lib/principles/views/problem_result.rb +8 -3
  172. data/lib/principles/views/prompts/acknowledge-a-change/run-the-check-and-report-it-passing.md +3 -0
  173. data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md +6 -12
  174. data/lib/principles/views/prompts/assess-every-member/answer-guide.json +67 -48
  175. data/lib/principles/views/prompts/assess-every-member/assess-each-member-and-the-set.md +0 -4
  176. data/lib/principles/views/prompts/assess-every-member/claim-an-earlier-first-raised-at.md +7 -0
  177. data/lib/principles/views/prompts/assess-every-member/decide-each-prior-finding.md +4 -16
  178. data/lib/principles/views/prompts/assess-every-member/judge-the-set-with-carried-assessments.md +5 -10
  179. data/lib/principles/views/prompts/assess-every-member/keep-or-change-what-a-deferral-waits-on.md +4 -0
  180. data/lib/principles/views/prompts/assess-every-member/read-a-compact-carried-member.md +8 -0
  181. data/lib/principles/views/prompts/assess-every-member/read-a-trimmed-instruction-whole.md +1 -0
  182. data/lib/principles/views/prompts/assess-every-member/review-a-new-or-changed-check-before-running-it.md +9 -0
  183. data/lib/principles/views/prompts/assess-every-member/say-what-observed-means.md +4 -0
  184. data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
  185. data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +16 -3
  186. data/lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md +4 -0
  187. data/lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md +6 -0
  188. data/lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-after-the-table.md +1 -0
  189. data/lib/principles/views/prompts/find-a-principle-to-map/ask-which-principle-to-map.md +2 -0
  190. data/lib/principles/views/prompts/find-a-principle-to-map/choose-an-existing-or-new-principle.md +2 -0
  191. data/lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md +11 -5
  192. data/lib/principles/views/prompts/find-a-principle-to-map/compare-with-mapped-principles.md +11 -0
  193. data/lib/principles/views/prompts/find-a-principle-to-map/leave-test-data-out-of-the-survey.md +1 -0
  194. data/lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md +3 -0
  195. data/lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md +3 -0
  196. data/lib/principles/views/prompts/find-a-principle-to-map/survey-a-later-range.md +3 -0
  197. data/lib/principles/views/prompts/find-a-principle-to-map/what-each-command-writes.md +4 -4
  198. data/lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md +5 -4
  199. data/lib/principles/views/prompts/learn-what-a-command-does/add-guidance-search-path.md +17 -0
  200. data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +35 -6
  201. data/lib/principles/views/prompts/learn-what-a-command-does/create-principle.md +16 -0
  202. data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +55 -7
  203. data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +9 -8
  204. data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +10 -11
  205. data/lib/principles/views/prompts/learn-what-a-command-does/list-principles.md +1 -2
  206. data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +5 -0
  207. data/lib/principles/views/prompts/learn-what-a-command-does/remove-guidance-search-path.md +13 -0
  208. data/lib/principles/views/prompts/learn-what-a-command-does/remove-principle.md +25 -0
  209. data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +27 -1
  210. data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +21 -0
  211. data/lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md +5 -5
  212. data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +24 -24
  213. data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +51 -54
  214. data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +7 -0
  215. data/lib/principles/views/prompts/report-after-a-commit/the-principles-skill-is-where-to-start.md +1 -0
  216. data/lib/principles/views/prompts/set-principles-up/keep-them-held-between-audits.md +2 -0
  217. data/lib/principles/views/prompts/set-principles-up/name-the-step-each-member-lacks.md +2 -0
  218. data/lib/principles/views/prompts/set-principles-up/place-the-passage-with-the-user.md +9 -6
  219. data/lib/principles/views/prompts/start-a-session/see-the-earlier-line.md +2 -0
  220. data/lib/principles/views/record_waiting_on_an_upgrade.rb +3 -3
  221. data/lib/principles/views/request_part.rb +16 -8
  222. data/lib/principles/views/request_parts.rb +4 -0
  223. metadata +92 -7
  224. data/lib/principles/models/candidate_listing.rb +0 -32
  225. data/lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-before-mapping.md +0 -1
  226. data/lib/principles/views/prompts/report-after-a-commit/the-map-and-audit-skill-says-how-to-audit-these-members.md +0 -1
  227. data/lib/principles/views/prompts/set-principles-up/set-up-first.md +0 -2
@@ -0,0 +1,3 @@
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
3
+ the survey needs a cut section's items, read just those lines of the file, not the whole file.
@@ -0,0 +1,3 @@
1
+ This project is too big for every outline to fit, so each file under inventory.outlines_left_out prints its path
2
+ and size alone. Where the survey needs one, run show-candidate-outlines PATH... with those literal paths.
3
+ Request fewer paths at once if that result also leaves outlines out.
@@ -0,0 +1,3 @@
1
+ The outlines of the files the range changed print %{bytes} B on their own, past the budget, so this result passes
2
+ it too. Which of them to survey is your call: name a later REV, so fewer commits are surveyed, or read the outlines
3
+ of the files the change is about and leave the rest.
@@ -1,4 +1,4 @@
1
- This command wrote nothing. Commands starting create, change, add, move or remove write %{map_file},
2
- a map to commit as it changes, so the project's history shows each change and can undo it. Commands starting start or submit write only
3
- .principles/audits/ID.json, when an audit completes, for the project to commit. Commands starting list or show write nothing. This tool
4
- edits none of the project's guidance.
1
+ This command wrote nothing. Map commands write %{map_file}.
2
+ add-guidance-search-path and remove-guidance-search-path write only .principles/guidance-search-paths.json.
3
+ Audit start/submit steps write only .principles/audits/ID.json; wrote names any changed record.
4
+ Commit changed records. list/show commands write nothing. This tool edits none of the project's guidance.
@@ -1,10 +1,11 @@
1
- Only CLAUDE.md, AGENTS.md and .claude rules, skills, agents and settings in this project, leaving out files git
2
- ignores, which in git are named under ignored and not listed to map. The host may still load an ignored file, such
1
+ By convention, CLAUDE.md, AGENTS.md and .claude rules, skills, agents and settings in this project. Also included are Markdown files changed by --commits-after,
2
+ changed mapped files, and files explicitly selected with --also or recorded guidance search paths. Explicit glob matching respects internal, package and nested-project traversal boundaries. Files git
3
+ ignores are named under ignored and not listed to map. The host may still load an ignored file, such
3
4
  as personal local settings, which can hold hooks and permissions, and whose hooks show-principle reads for
4
5
  named_in_hooks; while it is ignored and uncommitted, an audit refuses a member in it, so a rule only it enforces
5
6
  stays outside every audited map. Markdown and settings files are listed by name, except that a skill lists only its
6
- SKILL.md, the file the harness loads. Any other file there, such as a skill's references, templates or scripts, is
7
- counted under its directory in other_files_by_directory, so read one when it may hold a member. Members elsewhere in
7
+ SKILL.md, the file the harness loads, unless explicitly selected with --also, recorded search paths or the commit range. Any other file there, such as a skill's references, templates or scripts, is
8
+ counted under its directory in other_files_by_directory, so read one when it may hold a member. Explicit selections list other text files by path and size, without Markdown outlines. Members elsewhere in
8
9
  the project are just as valid, and often the strongest: git hooks, CI workflows and executable scripts enforce a
9
10
  principle, where instructions only state it. Look there too, and add any that reinforce the principle. Nothing is
10
11
  executed; delivery is not observed.
@@ -0,0 +1,17 @@
1
+ After showing the user the principles table, save where to look for this project's agent instructions and checks.
2
+ A guidance search path selects files for a survey; it does not map a principle or establish host delivery.
3
+ Use list-candidate-files --also with a quoted project-relative file pattern to try a selection before recording it.
4
+
5
+ %{executable} add-guidance-search-path 'guides/**/*.md'
6
+
7
+ Writes only `.principles/guidance-search-paths.json`, in the selected project's store; commit it as it changes.
8
+ The glob is normalized as --also normalizes it. A duplicate addition returns `unchanged` with an empty `wrote` list
9
+ and leaves existing bytes untouched. `recorded_guidance_search_paths` gives the normalized stored list; `next_action`
10
+ prints a read-only survey; later surveys automatically include recorded locations without repeating --also.
11
+ No map, audit record or guidance file is changed, and nothing is executed.
12
+
13
+ Blank, absolute or parent-traversing patterns are refused as `invalid_guidance_search_path`. Invalid JSON or schema
14
+ is refused as `unparseable_guidance_search_paths` or `invalid_guidance_search_paths`; `newer_guidance_search_paths` asks for
15
+ an upgrade while preserving the newer file. A linked store or configuration is refused as `symlinked_directory`
16
+ or `symlinked_guidance_search_paths`, including a dangling link. `guidance_search_paths_io_error` reports an unreadable
17
+ or unwritable store; repair it before retrying. A missing file is an empty list, not a reason to hide an access error.
@@ -8,6 +8,34 @@ how to show it, what to do next and, while a correction may be open, how a fix c
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
9
  mapped in one sitting do not each repeat them.
10
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
+
11
39
  When the new member shares a line with members already mapped, `added` names them, so you see that one
12
40
  edit there will show as a change to each: `overlaps` lists those in this principle, and `mapped_elsewhere`
13
41
  those in other principles, each with its principle, its id, the role it plays there and its `first_line` and
@@ -30,12 +58,13 @@ The location flags narrow the member; omit them for a whole file. Give both to t
30
58
 
31
59
  - `--section HEADING`: a Markdown heading's exact text without its # marks. The section runs to the next
32
60
  heading of the same or a higher level.
33
- - `--starting-at TEXT`: a passage starting at TEXT, which must occur once. It runs to the end of that
34
- line, or with `--ending-at TEXT` to the end of the first TEXT after it. `--ending-at` matches text,
35
- not whole lines, so quote enough of it. The member's id ends with `@TEXT`, and later commands such as
36
- `change-member-role` and `start-audit --member` take that id. This tool quotes it in each command it
37
- prints, but you may type it yourself, so choose a short TEXT without backticks, quotes or `$`,
38
- which a shell would need quoted.
61
+ - `--starting-at TEXT`: one literal opening; without `--ending-at TEXT`, the passage ends at its line's end.
62
+ A new literal ending must occur once after the complete opening in the selected region; overlapping matches count.
63
+ `ambiguous_passage_end` refuses before writing, with exact `eligible_ending_count`, up to five `ending_candidates`
64
+ (1-based line/character column), and `ending_candidates_omitted`. Quote more specific closing text.
65
+ Existing stored members and evidence use the first ending with unchanged hashes; only new add/move is stricter.
66
+ The member's id ends with `@TEXT`; `change-member-role` and `start-audit --member` take it.
67
+ This tool quotes it in each command it prints. For manual typing, choose short TEXT without backticks, quotes or `$`.
39
68
  - `--query '$.FIELD'`: one top-level field of a Markdown file's frontmatter, such as `$.description`,
40
69
  which is what makes a skill or subagent load. A query is standard JSONPath, so a name with a hyphen
41
70
  goes in brackets: `$['allowed-tools']`. The member is the field's lines as the file writes them:
@@ -2,5 +2,21 @@ Maps a new principle under ID, a lower-kebab-case name for it, with TEXT saying
2
2
  and why it matters. The map, `.principles/maps/ID.json`, holds that description and the members you add;
3
3
  commit it as it changes.
4
4
 
5
+ If this ID's map was removed or changed to another ID, commit that removal before recreating it. A map still
6
+ present at committed HEAD refuses with `map_removal_not_committed`, even if its old contents are unreadable.
7
+ Unavailable Git history refuses with `git_history_unavailable`; restore access and retry. Healthy projects
8
+ outside Git can still create maps. Before a repository's first commit, verification needs Git supporting
9
+ `show-ref --exists`; otherwise make an initial commit or upgrade Git, then retry.
10
+
5
11
  `sticking-to-your-principles` is refused as `meta_principle_id`: run `show-meta-principle-passage`, whose
6
12
  printed `add-member` creates that map with its first member.
13
+
14
+ Before choosing its members, survey the guidance if you have not already, comparing the existing maps before
15
+ creating another. To survey the project:
16
+ %{executable} list-candidate-files
17
+
18
+ To survey the principles a committed change carries, name the revision before it:
19
+ %{executable} list-candidate-files --commits-after REV
20
+
21
+ A surveyed rule that is a facet of an existing principle belongs in that map; add-member adds another place
22
+ carrying it. A distinct principle starts with create-principle, then add-member and its first full audit.
@@ -1,5 +1,58 @@
1
- Lists the files in this project that look like agent guidance, and asks you to choose one principle they reinforce.
2
- Run it before any of the project's own principles is mapped.
1
+ Lists the files in this project that look like agent guidance, and asks you to show the user a
2
+ table of the principles they reinforce before asking anything, then which one to map.
3
+ Run it before mapping, or to survey guidance a change carries in a project already mapped.
4
+ With maps present, `mapped_principles` lists their ids and descriptions for you to compare with each surveyed rule;
5
+ `existing_maps` keeps the ids alone. Judge whether a rule is a facet of one before creating a distinct principle.
6
+ After showing the table, add-member extends an existing map and create-principle starts a distinct one.
7
+ A map that cannot be read has a `refusal` row with its path and repair instead of a description;
8
+ the survey stays available, but resolve that repair before treating a rule as distinct.
9
+ To include other guidance now, repeat `--also GLOB`, quoting each root-relative glob so the shell does not expand it:
10
+
11
+ %{executable} list-candidate-files --also 'guides/**/*.md' --also '.codex/**/*.md'
12
+
13
+ Recorded globs in `.principles/guidance-search-paths.json` are reused automatically; `recorded_guidance_search_paths`
14
+ lists them when nonempty. `--also` adds temporary selections; `additional_search_paths` counts each normalized glob once
15
+ across both sources. Missing configuration is empty and creates nothing. Unusable configuration is refused rather
16
+ than silently omitted; see add-guidance-search-path's repairs. After the table, ask where else guidance lives.
17
+ Globs match case-sensitively: `*` stays in one path segment, `**/` includes deeper folders, braces select alternatives,
18
+ and dotfiles are included. A leading `./` is normalized. Blank or absolute globs, parent segments and NUL are refused
19
+ as `invalid_guidance_search_path`. The inventory still skips internal stores, installed-package folders and nested Git
20
+ projects, and does not traverse symlinked folders. `additional_search_paths` gives each normalized `glob` and its
21
+ `matched_files` count within those boundaries, before ignore/readability filtering; zero means no eligible match,
22
+ not proof that no guidance exists elsewhere. Ignored matches remain unread under ignored facts; other unreadable
23
+ matches give per-path refusals. Overlapping globs list a file only once. Explicit selections are named even inside
24
+ skills: Markdown receives an outline subject to the budget and test-data exclusions, while other text files give
25
+ path and size. They are never executed, and listing does not establish host delivery.
26
+ `--commits-after REV` names the commit a change starts after, as a sha, a branch or `HEAD~3`, for a survey of the
27
+ principles that change carries. The files the commits after REV changed, up to HEAD, list first, each marked
28
+ `changed_in_range`, with any Markdown file they changed outside the places hosts load and any changed file already
29
+ named in a readable principle map. Range-selected Markdown references inside skills are outlined too; a mapped
30
+ non-Markdown file is named by path and size, never executed. Unmapped application code is not included just because
31
+ it changed. Selection compares the map's literal member paths; a change only to a symlink target is not promised
32
+ to select every mapped alias. Every other candidate follows,
33
+ as without it. Past the budget, every other file's outline is left out before theirs is cut, and theirs is never
34
+ left out, as an entry file's is not; when they alone pass the budget, `range_outlines_bytes` gives what they print and
35
+ the question asks you to name a later REV or choose which to survey. `uncommitted` names each Markdown file that differs from HEAD or is untracked,
36
+ since no commit in the range holds it yet: survey it yourself if the change includes it. Outside git it refuses with
37
+ `range_needs_git`, and a REV git resolves to no commit refuses with `unknown_revision`, naming it under `revision`.
38
+ Each listed Markdown file, except those under `possibly_test_data`, gives its `outline`: its headings in order, as
39
+ Markdown, outside code fences, and under each its top-level list items, an item by its bold lead or its first 60
40
+ characters, at most 20 a heading. One with frontmatter gives its `description` too, and leaves the frontmatter
41
+ out of its outline. `opening_line` is the file's first prose paragraph, its hard-wrapped lines joined, outside
42
+ headings, lists, tables and code, ending at its last sentence end within 160 characters, or else cut on a word. Read
43
+ the outlines for the survey rather than the files, so you need no script to take headings out of them. The question
44
+ then asks you to name, under the table, the files that look ticket-local or boilerplate.
45
+ The result keeps to a byte budget under Claude Code's inline limit for a tool result, so it arrives inline rather
46
+ than as a saved file, each file's entry on a line of its own. Past the budget, it cuts one file at a time, making
47
+ each cut across the files before the next: a `description` over 300 characters ends at a sentence end, then `(N more
48
+ characters, lines A-B)`; then list items; then headings below the second level fold into the one above; then a described file's
49
+ `opening_line` is left out; last, a file prints its path and size alone. Described files go first, then the deepest.
50
+ The root CLAUDE.md and AGENTS.md go after every other file, and keep their outlines. `outlines_cut` names each file
51
+ whose outline lines were cut; a file whose only cut is its description is not named, since its text says so. Under
52
+ each heading of a cut file, `(N more, lines A-B)`, or `(N more under M headings, lines A-B)`, says how many items
53
+ its section held and which lines of the file hold it, so read just those lines where the survey needs them, not the
54
+ whole file. `outlines_left_out` names files at path and size alone. Run `show-candidate-outlines PATH...` for needed
55
+ outlines; request fewer paths if it omits any. Root CLAUDE.md and AGENTS.md keep outlines even past the budget.
3
56
  In git, `untracked` names each listed file git does not track, and
4
57
  each file a listed link leads to that git does not track: it loads into context all the same, but start-audit
5
58
  refuses a member in it, or read through a link to it, until the file is committed, so ask the project's
@@ -10,8 +63,3 @@ rather than file by file. Outside git, `untracked`, `ignored` and `ignored_folde
10
63
  checked them.
11
64
  A listed file that is a symbolic link gives `symlink_to`, the file its links lead to, so two names with the same
12
65
  `symlink_to` are one file, and the file itself may be one this list does not name.
13
-
14
- While principles is not set up, `next_action` names `show-meta-principle-passage`, to run before the `create-principle`
15
- in `answer_with`: it writes nothing, and proposes the passage that keeps the others held between audits, and the
16
- add-member that maps it. It is a recommendation, and nothing refuses `create-principle` without it. Once that map
17
- exists, `next_action` is left out.
@@ -24,13 +24,14 @@ so a completed audit gives each one; or `not_committed`, where no commit holds t
24
24
  so committing those of the map and the member's file that differ from HEAD or are untracked gives it one,
25
25
  and when every one is committed already, a completed audit gives it one. `next_action` names that audit, or those
26
26
  files.
27
- `awaiting_first_audit` names the principles no full audit has completed yet, so whether their members carry them is
28
- unknown, and `next_action` names them all in one line, then each one's `start-audit` on a line of its own,
29
- ready to run. In git a principle joins it once a commit holds its map, or its first audit is open. Outside git its first audit is what gives its members a baseline, so it has no
30
- `no_baseline_because`. Members added to a principle since its last full audit keep a line of their own.
31
- This tool compares text, not meaning. When a change alters what a member says, or the member has a check, run a
32
- full audit with `start-audit ID`. When the member still says the same thing, has no check, and a completed full audit
33
- has judged it, in git, acknowledge it with `start-audit ID --member MEMBER`; `next_action` offers that only where
27
+ `no_completed_audit` names readable maps without a completed full audit, even uncommitted. `next_action` counts them
28
+ before baselines without judging meaning or completeness. `empty_maps` names maps with no members, even after an audit.
29
+ Add a member first if empty; commit required files before an audit. Unknown/newer records keep upgrade/refusal guidance.
30
+ `awaiting_first_audit` retains its baseline prerequisite: in git a commit holds the map or an audit is open;
31
+ outside git the audit supplies the baseline. Audited maps' added-member lines remain.
32
+ This tool compares text, not meaning. When a change alters what a member says, or its check changed, run a full
33
+ audit with `start-audit ID`. When the member still says the same thing, a completed full audit has judged it and ran
34
+ its check, if any, in git, acknowledge it with `start-audit ID --member MEMBER`; `next_action` offers that only where
34
35
  it applies, as one command per such member with its id filled in and quoted for a shell.
35
36
  `records_waiting_on_an_upgrade`: principles whose record a later copy wrote, changes marked `waiting_on_an_upgrade`.
36
37
 
@@ -63,7 +64,7 @@ hook runs it once HEAD moved during the call, with COMMIT the full sha HEAD poin
63
64
  event, `PostToolUse` or `PostToolUseFailure`. It prints one JSON object, `hookSpecificOutput`, whose `hookEventName`
64
65
  is EVENT and whose `additionalContext` names, one row per member in `--short`'s fields, the members whose newest
65
66
  changing commit came after COMMIT, of both kinds, then how many other changed members are still listed, this command
66
- without the options, and a line naming the `principles:map-and-audit` skill, which says how to audit them; one waiting
67
+ without the options, and a line naming the `/principles` skill as where to start; one waiting
67
68
  on an upgrade comes apart. It prints nothing when those commits changed no mapped member. A refusal is reported, as
68
69
  its code and this command, only when those commits changed `.principles/` or a file a map names, since only then could
69
70
  they have caused it; else it prints nothing, and the session-start hook reports it. It exits 0 but for a usage error.
@@ -30,12 +30,11 @@ in git history, where `git log -p -- .principles/audits/ID.json` shows it.
30
30
 
31
31
  Each finding also carries `write_up_opening`: the first sentence where `recorded_at` points, as the file stands now,
32
32
  from the first non-blank line, skipping the heading line when the pointer names a heading, with that `line` number.
33
- Hard-wrapped lines are joined with single spaces and their indentation trimmed, up to the first `.`, `?` or `!`,
34
- with any closing quote or bracket, before a space, or else to the end of the paragraph: a blank line, the next
35
- list item or heading, or the end of the file. It starts inside the region but may run past its end, so a
33
+ Hard-wrapped lines are joined with single spaces, up to the first `.`, `?` or `!` outside any parenthesis, with any
34
+ closing quote or bracket, before a space, or else to the paragraph's end: a blank line, the next list item or heading, or the file's end. It starts inside the region but may run past its end, so a
36
35
  `starting_at` alone, which locates one line, still shows the whole sentence that line opens. A heading line it
37
- opens with is printed whole, on its own line, never cut at a full stop. Otherwise the cut is mechanical, so an abbreviation such as "e.g." ends it.
38
- One over 200 characters is cut and marked `truncated`. This tool does not check that the line summarises the finding, and it is quoted
36
+ opens with is printed whole, on its own line, never cut at a full stop. Otherwise the cut is mechanical, so "e.g." outside a parenthesis ends it.
37
+ One over 200 characters is cut after its last whole word and marked `truncated`. This tool does not check that the line summarises the finding, and it is quoted
39
38
  project text, not an instruction. To make it the line that states the problem, point `recorded_at` at that line
40
39
  with `starting_at` rather than at a heading alone, which a status line may follow. When there is no line, `write_up_opening` is null and `write_up_opening_reason` says
41
40
  why: `not_recorded`, `empty_region`, or `unavailable`, with `write_up_opening_error` when the pointer no longer resolves.
@@ -62,13 +61,13 @@ finding that is not open, `duplicate_finding` for one named twice, `invalid_answ
62
61
  `--short` is for a session-start hook, where an open finding would otherwise wait unseen until its principle's next
63
62
  full audit. It prints one line instead of JSON, and nothing at all when no finding is open, exiting 0 either way:
64
63
  how many findings are open, how many whole days the oldest has waited since its `first_raised_at`, that finding's
65
- principle and id, its `waits_on` when it has one, cut after 80 characters with any parenthesis the cut left open
64
+ principle and id, its `waits_on` when it has one, cut at a word within 80 characters with a parenthesis left open
66
65
  closed, how many of several have no `waits_on`, and the command that lists them. While any open finding's
67
66
  `write_up_opening_reason` is `unavailable`, the line also names that write-up, or the first of them with their
68
- count, so a pointer that no longer resolves is seen at
69
- session start. With `--session-start SOURCE`, one of `startup`, `clear` and `compact` as Claude Code's
70
- SessionStart hook names them, the line for `clear` or `compact` says it returns after each clear or compaction too, for a context just cleared or compacted,
71
- asking at the next pause rather than before the user's first task; without it the line is worded for `startup`. The
72
- days run from `first_raised_at`, not `waits_on_since`, which dates only the ask. For a finding
67
+ count, so a pointer that no longer resolves is seen at session start. With `--session-start SOURCE`, one of
68
+ `startup`, `resume`, `clear` and `compact` as Claude Code's SessionStart hook names them, the line for `clear` or
69
+ `compact` says it returns after each clear or compaction too, asking at the next pause rather than before the user's
70
+ first task; without it the line is worded for `startup`. For `resume`, whose conversation holds the line already, it
71
+ gives only the findings and the command that prints it whole. The days run from `first_raised_at`, not `waits_on_since`, which dates only the ask. For a finding
73
72
  raised before this tool kept the field the days are a lower bound, as `first_raised_at` is. The principles
74
73
  plugin's session-start hook prints this line, passing its source.
@@ -1,7 +1,6 @@
1
1
  Lists every mapped principle, with its members counted by whether they changed since the last audit.
2
2
  Run it to decide which principle to look at or audit.
3
- Until the `sticking-to-your-principles` map has a member, `next_action` names `show-meta-principle-passage` first,
4
- the command that writes nothing: it proposes the passage that keeps the others held between audits, and the add-member that maps it.
3
+ With nothing mapped, `next_action` names `list-candidate-files`, which surveys the project's principles for the user.
5
4
  When the `sticking-to-your-principles` map has no members, its row adds `no_members`: setup no longer writes
6
5
  that map before its first member, so an earlier setup, or removing its last member, left it. It names the map's
7
6
  file to remove, and the command whose printed add-member adds its first member.
@@ -6,6 +6,11 @@ does not guess the new path: find it with git or by reading the project. The loc
6
6
  and replace the old ones whole, so `--path` alone makes the member the whole file. MEMBER is the id `show-principle`
7
7
  lists. The result says which lines the member now spans.
8
8
 
9
+ A new literal `--ending-at` must occur once after the complete opening in the selected region; overlapping matches count.
10
+ `ambiguous_passage_end` refuses before writing: exact `eligible_ending_count`, up to five `ending_candidates` with
11
+ 1-based line/character columns, and `ending_candidates_omitted`. Quote more specific closing text.
12
+ Existing stored members and evidence keep the first ending and their hashes; only new add/move is stricter.
13
+
9
14
  An id no member has is refused with `unknown_member`. When it differs from one mapped id only in case, spacing,
10
15
  dashes or quotes, the refusal names that id under `did_you_mean` and starts its repair with this command run on it
11
16
  instead. This tool never acts on the near miss: check that it is the member you meant before you run it.
@@ -0,0 +1,13 @@
1
+ Remove a recorded survey location when it no longer identifies this project's guidance. Use the exact normalized
2
+ glob from `recorded_guidance_search_paths`, not a member id or text location.
3
+
4
+ %{executable} remove-guidance-search-path 'guides/**/*.md'
5
+
6
+ Writes only `.principles/guidance-search-paths.json`; commit it. The last removal retains a valid empty configuration.
7
+ The result gives the remaining `recorded_guidance_search_paths`, its `wrote` file and a read-only survey in `next_action`.
8
+ It never removes guidance files, principle maps or audit records. Later surveys automatically use the remaining
9
+ recorded locations; a removed glob stops that extra selection, while conventional and temporary selections still apply.
10
+
11
+ An absent selection is refused as `unknown_guidance_search_path`, with the recorded list to choose from, without
12
+ creating configuration. Invalid globs, malformed or newer configuration, linked files and I/O errors are refused
13
+ as add-guidance-search-path describes; restore or upgrade the store instead of replacing its contents by hand.
@@ -0,0 +1,25 @@
1
+ Remove an obsolete map after its rules have been consolidated or split using change-description, add-member
2
+ and remove-member. The agent decides which rules belong together; this command never merges principles or
3
+ transfers findings. It removes only `.principles/maps/ID.json`, leaving member files and audit history alone.
4
+
5
+ Without `--confirm`, removal is permitted only when there is no current audit entry. That is not a claim
6
+ that the principle was never audited: version control may retain older records. Any current entry protects
7
+ the map, including an open, invalid, newer or dangling entry; `principle_has_audit_record` refuses removal.
8
+
9
+ Use `--confirm` only after deciding that this exact map should leave routine active-map reports. Confirmation
10
+ removes only the map; it preserves the audit entry byte-for-byte and does not resolve retained findings.
11
+ It does not require a readable record, upgrade it or repair a link. Inspect a readable retained record with
12
+ `show-audit ID`; invalid, newer or linked entries may require diagnosis before that read succeeds.
13
+ An access failure while checking for a current audit entry still refuses even with confirmation.
14
+
15
+ The result's `status` is `removed`; `principle_id` identifies it. `removed` lists the exact deleted map path,
16
+ while `wrote` is empty because no file was written. `next_action` names list-principles. In Git, commit the
17
+ removal if the map was tracked; an untracked map's removal needs no Git commit. No Git history is rewritten.
18
+ Before recreating a tracked map's ID, commit its removal: creation refuses while that map path remains at
19
+ committed HEAD. Once absent there, recreation uses its retained audit record as before; use a distinct ID for a distinct principle.
20
+
21
+ Missing or invalid IDs refuse without changes. Linked store parents and final map links refuse rather than
22
+ unlinking a target. Nonregular entries refuse with `not_a_file`. If access prevents checking for an audit entry, the command refuses with
23
+ `store_entry_unreadable`; an entry disappearing after validation or a failed unlink gives `store_remove_failed`. Restore access
24
+ or the intended regular file before retrying. This command does not provide an atomic compare-and-delete
25
+ against concurrent external edits. A final linked map refuses with `symlinked_store_file`.
@@ -1,9 +1,22 @@
1
- Checks your answer to request REQUEST exactly as `submit-answer` would, and writes nothing. It prints
1
+ Checks your answer to request REQUEST_ID exactly as `submit-answer` would, and writes nothing. It prints
2
2
  the refusal `submit-answer` would give, such as a passage that matches twice, or `answer_acceptable`
3
3
  with the files submitting would write. Use it instead of searching the project yourself before you
4
4
  submit. Pass `--file FILE`, naming the answer written to a FILE outside the project; `--file -` reads it from stdin
5
5
  instead. Its `next_action` ends with `submit-answer`, giving the same `--file` value again.
6
6
 
7
+ The same current-ID history checks apply to assessment/correction answers with a Git base. For their
8
+ `stale_request` and `git_history_unavailable` conditions and repairs:
9
+ %{executable} submit-answer --help
10
+
11
+ For a correction removing obsolete guidance from the map, each fixed disposition may give `removed_members`:
12
+ the original member ids actually removed with `remove-member`, leaving source files intact. The declaration is
13
+ checked against the original Git map. `invalid_removed_members` refuses unknown, still-present or conflicting
14
+ claims; `empty_correction_map` refuses a result without a survivor or replacement. A removal-only fix leaves
15
+ `changed_members` empty and supplies a substantive reassessment and located evidence about remaining guidance.
16
+ Restore entries before reconsidering or deferring an emptied map, preserving the unsubmitted correction packet;
17
+ explicit deactivation retains previous audit history. This preview never writes. The correction question and its
18
+ answer guide give the full declaration contract, including repeated claims and exact Git map reconstruction.
19
+
7
20
  When the answer would write a record that keeps findings open with a write-up, `open_findings_will_print`
8
21
  names each by `finding_id` with what `list-open-findings` will print for it as its `write_up_opening`, its first
9
22
  sentence with hard-wrapped lines joined, or null with the reason. If that line is a bare heading rather than the finding, move the write-up or the
@@ -16,6 +29,19 @@ project, such as under `$TMPDIR`, and fill only its `dispositions`: each `action
16
29
  each adds. Submit it after the assessment, as `next_action` says; outside git the assessment writes the open record
17
30
  the correction is checked against.
18
31
 
32
+ `correction_recovery` explains what to keep before changing members: the exact original assessment you submit,
33
+ including its request_id and basis, and the returned correction packet with its response_template or
34
+ correction_template. Save both outside the project before fixes. For `--file -`, retain the exact stdin bytes
35
+ and supply them again. In Git, after submitting the assessment, recover a lost correction while its request
36
+ inputs remain unchanged by checking the original assessment request with its original answer file again:
37
+
38
+ `%{executable} show-answer-check ORIGINAL_ASSESSMENT_REQUEST_ID --file ORIGINAL_ASSESSMENT_FILE`
39
+
40
+ The result gives the same correction_template and writes nothing. Changed audited members, a completed audit
41
+ or a newer record can refuse replay; recovery after fixes is not promised. Preserve the correction packet
42
+ before editing rather than starting a fresh assessment to reconstruct missing judgements. Outside Git, this
43
+ replay route is not established; retain the original packets.
44
+
19
45
  When a correction's fixed disposition lists `changed_map_entries`, `map_entry_changes` names each such member by
20
46
  `member_id`, under its id after any `moved_members`, with each of its `role` and `check` that changed since the
21
47
  audit began, as `was` and `now`; a removed check is `now` null. Read it before you submit: a change listed that
@@ -0,0 +1,21 @@
1
+ Recover the outlines a survey left out without scanning the project again. Give one or more literal file paths:
2
+
3
+ %{executable} show-candidate-outlines guides/names.md guides/checks.md
4
+
5
+ The command reads only those files, without glob expansion or recorded guidance search paths. Leading `./` is
6
+ removed; repeated paths are listed once, in path order. Paths must resolve to regular UTF-8 text files inside
7
+ the selected project, through any symbolic links too. Each failed path appears under `inventory.unreadable`
8
+ with its `code`, `message`, `repair` and `path`; other requested files still succeed, with exit 0 and `wrote: []`.
9
+ No paths is a usage refusal, exit 2. In git, `ignored` names unread requests, including aliases whose text depends
10
+ on ignored links or targets. Their contents are not read. No success is inferred for a refused or ignored file.
11
+
12
+ `inventory.files` uses the survey's entries: `path`, `characters`, and `symlink_to` when linked. Markdown gives
13
+ `outline`, with its headings and top-level list items, and any `description` and `opening_line` as in
14
+ list-candidate-files. Explicitly requested test-data files and skill references receive outlines too: you chose
15
+ them, and you judge relevance. Non-Markdown text gives path and size alone; open it only if needed.
16
+
17
+ The full rendered result uses the survey's byte budget. `outlines_cut` names shortened outlines, whose line-range
18
+ markers show where to read needed items. `outlines_left_out` names files whose outlines were omitted: request
19
+ fewer paths to recover them. Root entry files retain their outlines and can exceed the budget on their own;
20
+ if one file is still too large, read only its needed headings or line ranges. A result with cuts or omissions
21
+ is incomplete; never treat it as a complete reading of the requested files.
@@ -1,19 +1,19 @@
1
1
  Nothing keeps a project's principles held between audits: `principles` reports a changed member, but nothing in the
2
2
  project's guidance tells an agent to act on that report, so the drift waits until someone thinks to audit. This
3
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 first, when setting principles up. It writes nothing: no map, and none of the
5
- project's guidance. While `already_mapped` is false, `map_file` and `map` are the map the printed `add-member`
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
6
  creates, with the passage as its first member, so no map without members waits while the passage waits to be placed.
7
7
 
8
8
  The first member need not be the passage. Any file or setting in the project that keeps the principles in front of
9
9
  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
10
  its `enabledPlugins` line. This helps teammates only if they can install the plugin from a marketplace they can
11
11
  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. `list-principles` and `list-candidate-files` print the
13
- `Set principles up first` line until the map has a member, of any kind. A mapped member says only that the project names
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
14
  something to keep the principles held; this principle's audit judges whether it does. An owner who enables the
15
15
  plugin only at user scope has nothing in the project to map: the question says so, and names the two ways on, to
16
- commit the project-scope enablement and map its line, or to leave the line standing.
16
+ commit the project-scope enablement and map its line, or to leave principles not set up for now.
17
17
 
18
18
  It proposes one short passage, the same for any entry file every session loads, worded for a reader who may not
19
19
  have `principles` installed, and reports, under `entry_files`, whether `CLAUDE.md` and `AGENTS.md` exist and, as
@@ -9,23 +9,23 @@ before you submit the correction that reports it, or the assessment is refused a
9
9
  now: a problem no completed audit recorded and fixed before `start-audit` is not recorded, and a deferred or accepted
10
10
  finding fixed since is decided `resolved`. To record one, commit a revert, run the audit, and redo it in the correction.
11
11
 
12
- It refuses with `broken_members` while any member cannot be found or read; `missing_files` groups them by file. A member
13
- with a check carries `check_since_last_audit`, and `check_hidden_characters` when its check hides characters.
14
- `mapped_elsewhere` shows other principles' members on its lines, judged as `mapped_elsewhere_instruction` says, with
15
- `open_finding_ids` from `open_findings_elsewhere`, whose `evidence` items say `shares_lines_with`, `shares_no_lines`,
16
- `whole_file` or `not_located`, or which says `evidence_not_kept`. In git, `context.uncommitted_files_outside_the_map`
17
- lists up to ten files outside the map that differ from the base commit or are untracked, `not_named` counting the rest.
18
- A meta-principle audit adds `package_since_last_audit`, `passage_changed` and `other_principles_with_unjudged_changes`.
12
+ It refuses with `broken_members` while a member cannot be found or read, grouped by file in `missing_files`. A checked
13
+ member carries `check_since_last_audit`, and `check_hidden_characters` if its check hides any. `mapped_elsewhere` shows
14
+ other principles' members on its lines, judged by `mapped_elsewhere_instruction`, with `open_finding_ids` from
15
+ `open_findings_elsewhere`, whose `evidence` items say `shares_lines_with`, `shares_no_lines`, `whole_file` or
16
+ `not_located`, or which says `evidence_not_kept`. In git, `context.uncommitted_files_outside_the_map` lists up to ten
17
+ changed or untracked files, `not_named` the rest. `--instruction FIELD` prints whole any `trimmed_instructions` lists. A
18
+ meta-principle audit adds `package_since_last_audit`, `passage_changed` and `other_principles_with_unjudged_changes`.
19
19
 
20
20
  ## Since the last full audit
21
21
 
22
- After a full audit, each member carries `carried_forward`, with its `assessed_at`, an observed one's `observed_at` (or
23
- `observed_at_from_assessed_at`), `evidence_changed` and, in git, `file_changed_outside_member`, or else `judge_because`
24
- with `read_the_change`, and a moved one `moved_from`; `carried_forward_instruction` and `judge_because_instruction`
25
- explain them. One acknowledged with `--member` since carries `acknowledged_since_last_audit`, with that audit's
26
- `last_audited_commit`, each acknowledgement and its lines then and now, or `{"omitted": "not_found_at_last_audit"}` when
27
- it has moved. A new or changed check's exit status needs `review_basis`, kept unverified. An unchanged check shows its
28
- `review_basis` and `review_basis_since`, kept while the template's is as printed, a changed one `last_run_review_basis`.
22
+ After a full audit, a member carries `carried_forward`, with its `assessed_at`, an observed one's `observed_at` (or
23
+ `observed_at_from_assessed_at`), `evidence_changed` and, in git, `file_changed_outside_member`, or `judge_because` with
24
+ `read_the_change`, a moved one `moved_from`; a carried one prints whole if a fact fires or a finding is open on it;
25
+ `carried_forward_instruction` and `judge_because_instruction` explain. One acknowledged with `--member` since carries
26
+ `acknowledged_since_last_audit` with `last_audited_commit`, its acknowledgements, lines then and now, or `{"omitted":
27
+ "not_found_at_last_audit"}` once moved. A new or changed check needs `review_basis`, kept unverified; an unchanged one
28
+ `review_basis` and `review_basis_since`, kept while left as printed, a changed one `last_run_review_basis`.
29
29
 
30
30
  ## Prior findings
31
31
 
@@ -51,16 +51,16 @@ hook names, and anything under an invoked or always activation or in a one-membe
51
51
  ## One member's edit: `--member`
52
52
 
53
53
  Use `--member MEMBER` when one member was edited but still says the same thing, as `list-member-problems --help`
54
- describes; without it, `list-member-problems --short` reports the edit at every commit until a full audit. Its request
55
- shows the `baseline_commit` it was last judged at, `member_lines` then and now (or a long member's `changed_region`,
56
- `context_lines` and `from_line`, or `read_instead`), `read_the_change` and the member's `deferred_findings` and
57
- `accepted_findings`, which stay; its `question` asks for `meaning_kept`. This tool checks both quotes. An id near a
58
- mapped one is refused with `unknown_member`, naming the mapped one under `did_you_mean`. A one-member audit writes the
59
- record once its answer is accepted, keeping the edit in the member's `acknowledgements`; commit it. It is refused with
60
- `cannot_acknowledge` outside git, while an audit is open, and for a member no completed audit assessed or whose text at
61
- its baseline commit does not match the audit record; until built, it is refused for a member with a check: run a full
62
- audit. A member moved with `move-member` since its baseline carries `evidence_at_baseline`, and one the last full
63
- audit's correction fixed carries `audit_base_commit`: judge only the change since `baseline_commit`.
54
+ describes; without it, `list-member-problems --short` repeats the edit until a full audit. Its request shows the
55
+ `baseline_commit` it was last judged at, `member_lines` then and now (or a large member's `changed_region`,
56
+ `context_lines` and `from_line`, or `read_instead`), `first_changed_lines`, `read_the_change`, `check_instruction` and
57
+ the member's `deferred_findings` and `accepted_findings`; its `question` asks for `meaning_kept`. This tool checks both
58
+ quotes. An id near a mapped one is refused with `unknown_member`, naming it under `did_you_mean`. A one-member audit
59
+ writes the record once its answer is accepted, keeping the edit in its `acknowledgements`; commit it. It is refused with
60
+ `cannot_acknowledge` outside git, while an audit is open, and for a member no completed audit assessed, whose baseline
61
+ text does not match the audit record, whose check is not the one that audit ran, or whose `check_result` is not a pass:
62
+ run a full audit. A member moved with `move-member` since its baseline carries `evidence_at_baseline`, and one the last
63
+ full audit's correction fixed carries `audit_base_commit`: judge only the change since `baseline_commit`.
64
64
 
65
65
  ## Outside git
66
66