principles 0.0.1 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/lib/principles/cli.rb +10 -2
  3. data/lib/principles/command_line.rb +46 -35
  4. data/lib/principles/command_routes.rb +4 -3
  5. data/lib/principles/controllers/acknowledgement.rb +84 -18
  6. data/lib/principles/controllers/answer.rb +56 -125
  7. data/lib/principles/controllers/answer_phase.rb +54 -0
  8. data/lib/principles/controllers/assessment.rb +132 -0
  9. data/lib/principles/controllers/audit.rb +45 -140
  10. data/lib/principles/controllers/audit_completion.rb +8 -8
  11. data/lib/principles/controllers/command.rb +29 -14
  12. data/lib/principles/controllers/correction.rb +23 -13
  13. data/lib/principles/controllers/full_audit_request.rb +190 -0
  14. data/lib/principles/controllers/inventory.rb +46 -79
  15. data/lib/principles/controllers/mapping.rb +3 -3
  16. data/lib/principles/controllers/member_entries.rb +24 -12
  17. data/lib/principles/controllers/member_problems_report.rb +79 -0
  18. data/lib/principles/controllers/members_a_commit_changed.rb +12 -3
  19. data/lib/principles/controllers/members_to_assess.rb +35 -20
  20. data/lib/principles/controllers/meta_principle_setup.rb +5 -5
  21. data/lib/principles/controllers/repoint.rb +19 -23
  22. data/lib/principles/controllers/running_tool.rb +1 -1
  23. data/lib/principles/data/audit_files.rb +11 -7
  24. data/lib/principles/data/bounded_file.rb +20 -4
  25. data/lib/principles/data/command-steps.json +14 -13
  26. data/lib/principles/data/map_files.rb +2 -2
  27. data/lib/principles/data/principles_subfolder.rb +8 -1
  28. data/lib/principles/data/project_files.rb +12 -15
  29. data/lib/principles/data/project_root.rb +48 -0
  30. data/lib/principles/data/schema_check.rb +39 -11
  31. data/lib/principles/data/schemas/acknowledgement-answer.schema.json +17 -3
  32. data/lib/principles/data/schemas/answer-guide.schema.json +5 -10
  33. data/lib/principles/data/schemas/assessment-answer.schema.json +18 -9
  34. data/lib/principles/data/schemas/audit-record.schema.json +13 -1
  35. data/lib/principles/data/schemas/command-steps.schema.json +2 -1
  36. data/lib/principles/data/schemas/correction-answer.schema.json +2 -3
  37. data/lib/principles/invocation_options.rb +1 -1
  38. data/lib/principles/models/acknowledgement.rb +73 -84
  39. data/lib/principles/models/acknowledgement_refusal.rb +90 -0
  40. data/lib/principles/models/answer_place.rb +4 -0
  41. data/lib/principles/models/assessment_answer.rb +19 -17
  42. data/lib/principles/models/assessment_left_as_printed.rb +81 -0
  43. data/lib/principles/models/audit.rb +24 -15
  44. data/lib/principles/models/audit_record.rb +19 -20
  45. data/lib/principles/models/audit_records.rb +77 -4
  46. data/lib/principles/models/audit_start.rb +3 -3
  47. data/lib/principles/models/candidate_files.rb +30 -7
  48. data/lib/principles/models/candidate_inventory.rb +23 -6
  49. data/lib/principles/models/candidate_listing.rb +12 -3
  50. data/lib/principles/models/candidate_outline.rb +195 -0
  51. data/lib/principles/models/carried_assessments.rb +1 -1
  52. data/lib/principles/models/carried_member.rb +42 -0
  53. data/lib/principles/models/check_since_last_audit.rb +22 -9
  54. data/lib/principles/models/command_steps.rb +17 -1
  55. data/lib/principles/models/correction_basis.rb +1 -1
  56. data/lib/principles/models/decided_prior_findings.rb +9 -19
  57. data/lib/principles/models/declared_map_changes.rb +13 -12
  58. data/lib/principles/models/disposition.rb +28 -24
  59. data/lib/principles/models/evidence_replacements.rb +8 -1
  60. data/lib/principles/models/fix_only_fields.rb +67 -0
  61. data/lib/principles/models/frontmatter_fields.rb +9 -8
  62. data/lib/principles/models/instruction_named.rb +35 -0
  63. data/lib/principles/models/kept_prior_finding.rb +12 -7
  64. data/lib/principles/models/left_as_printed.rb +39 -0
  65. data/lib/principles/models/loaded_files.rb +5 -3
  66. data/lib/principles/models/loading_decision.rb +9 -2
  67. data/lib/principles/models/{member_maps.rb → mapped_principles.rb} +15 -15
  68. data/lib/principles/models/member.rb +1 -1
  69. data/lib/principles/models/member_assessments.rb +32 -9
  70. data/lib/principles/models/member_file.rb +35 -11
  71. data/lib/principles/models/member_grounds.rb +2 -2
  72. data/lib/principles/models/member_hashes_as_written.rb +44 -0
  73. data/lib/principles/models/member_lines.rb +63 -15
  74. data/lib/principles/models/member_moves.rb +3 -3
  75. data/lib/principles/models/member_problems.rb +50 -24
  76. data/lib/principles/models/member_repair_moves.rb +54 -0
  77. data/lib/principles/models/members_sharing_lines.rb +3 -3
  78. data/lib/principles/models/missing_files.rb +2 -2
  79. data/lib/principles/models/new_findings.rb +55 -0
  80. data/lib/principles/models/open_finding.rb +23 -13
  81. data/lib/principles/models/open_findings_elsewhere.rb +4 -0
  82. data/lib/principles/models/other_principles.rb +1 -1
  83. data/lib/principles/models/other_templates_placeholders.rb +113 -0
  84. data/lib/principles/models/outline_budget.rb +127 -0
  85. data/lib/principles/models/outline_group.rb +31 -0
  86. data/lib/principles/models/outline_section.rb +56 -0
  87. data/lib/principles/models/{member_map.rb → principle.rb} +45 -40
  88. data/lib/principles/models/{member_map_history.rb → principle_history.rb} +38 -15
  89. data/lib/principles/models/{map_members.rb → principle_members.rb} +15 -4
  90. data/lib/principles/models/prior_decision_fields.rb +47 -0
  91. data/lib/principles/models/prior_finding_decision.rb +38 -7
  92. data/lib/principles/models/prior_finding_outcomes.rb +10 -3
  93. data/lib/principles/models/prior_findings.rb +1 -1
  94. data/lib/principles/models/problem_report.rb +7 -3
  95. data/lib/principles/models/project.rb +22 -17
  96. data/lib/principles/models/project_history.rb +2 -2
  97. data/lib/principles/models/quoted_change.rb +137 -0
  98. data/lib/principles/models/recent_decision.rb +90 -0
  99. data/lib/principles/models/record_format.rb +109 -0
  100. data/lib/principles/models/recorded_entry.rb +6 -0
  101. data/lib/principles/models/recorded_finding.rb +4 -0
  102. data/lib/principles/models/recorded_hashes.rb +43 -0
  103. data/lib/principles/models/recorded_members.rb +33 -16
  104. data/lib/principles/models/refusal_before_shape.rb +21 -0
  105. data/lib/principles/models/repoint.rb +13 -0
  106. data/lib/principles/models/reported_check.rb +66 -24
  107. data/lib/principles/models/request_id.rb +24 -4
  108. data/lib/principles/models/sent_answer.rb +51 -0
  109. data/lib/principles/models/sent_prior_decisions.rb +31 -0
  110. data/lib/principles/models/shape_problems_beside.rb +40 -0
  111. data/lib/principles/models/still_holds_restatement.rb +7 -10
  112. data/lib/principles/models/submitted_answer.rb +34 -0
  113. data/lib/principles/models/template_placeholders.rb +71 -0
  114. data/lib/principles/models/text_within.rb +55 -0
  115. data/lib/principles/models/unchecked_members.rb +76 -0
  116. data/lib/principles/models/write_up_opening.rb +21 -4
  117. data/lib/principles/session_start_options.rb +29 -0
  118. data/lib/principles/start_audit_options.rb +52 -0
  119. data/lib/principles/version.rb +2 -2
  120. data/lib/principles/views/acknowledgement_result.rb +15 -7
  121. data/lib/principles/views/answer_head.rb +29 -0
  122. data/lib/principles/views/assessed_members.rb +129 -0
  123. data/lib/principles/views/assessment_request.rb +139 -78
  124. data/lib/principles/views/audit_result.rb +55 -42
  125. data/lib/principles/views/candidate_files_result.rb +41 -19
  126. data/lib/principles/views/check_notes.rb +44 -0
  127. data/lib/principles/views/check_result_template.rb +42 -30
  128. data/lib/principles/views/correction_request.rb +64 -0
  129. data/lib/principles/views/first_audit.rb +71 -0
  130. data/lib/principles/views/help.rb +3 -2
  131. data/lib/principles/views/instruction.rb +74 -0
  132. data/lib/principles/views/json_with_entries_on_lines.rb +51 -0
  133. data/lib/principles/views/loads_to_check_result.rb +13 -6
  134. data/lib/principles/views/map_added_to.rb +31 -0
  135. data/lib/principles/views/map_result.rb +38 -23
  136. data/lib/principles/views/member_change_since_baseline.rb +22 -5
  137. data/lib/principles/views/member_repairs.rb +21 -52
  138. data/lib/principles/views/members_a_commit_changed.rb +40 -10
  139. data/lib/principles/views/meta_principle_result.rb +3 -14
  140. data/lib/principles/views/one_member_check_result_template.rb +43 -0
  141. data/lib/principles/views/open_findings_elsewhere_result.rb +3 -3
  142. data/lib/principles/views/open_findings_line.rb +77 -23
  143. data/lib/principles/views/principle_read_result.rb +37 -28
  144. data/lib/principles/views/prior_finding_decisions_result.rb +13 -14
  145. data/lib/principles/views/prior_findings_result.rb +30 -18
  146. data/lib/principles/views/problem_lines.rb +14 -11
  147. data/lib/principles/views/problem_result.rb +30 -16
  148. data/lib/principles/views/prompts/acknowledge-a-change/run-the-check-and-report-it-passing.md +3 -0
  149. data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md +6 -12
  150. data/lib/principles/views/prompts/assess-every-member/answer-guide.json +5 -10
  151. data/lib/principles/views/prompts/assess-every-member/assess-each-member-and-the-set.md +0 -4
  152. data/lib/principles/views/prompts/assess-every-member/claim-an-earlier-first-raised-at.md +7 -0
  153. data/lib/principles/views/prompts/assess-every-member/decide-each-prior-finding.md +6 -17
  154. data/lib/principles/views/prompts/assess-every-member/have-a-changed-check-reviewed-before-running-it.md +2 -2
  155. data/lib/principles/views/prompts/assess-every-member/have-a-new-check-reviewed-before-running-it.md +1 -1
  156. data/lib/principles/views/prompts/assess-every-member/judge-the-set-with-carried-assessments.md +5 -10
  157. data/lib/principles/views/prompts/assess-every-member/keep-or-change-what-a-deferral-waits-on.md +4 -0
  158. data/lib/principles/views/prompts/assess-every-member/read-a-compact-carried-member.md +8 -0
  159. data/lib/principles/views/prompts/assess-every-member/read-a-trimmed-instruction-whole.md +1 -0
  160. data/lib/principles/views/prompts/assess-every-member/review-a-new-or-changed-check-before-running-it.md +9 -0
  161. data/lib/principles/views/prompts/assess-every-member/run-the-check-then-report-it.md +2 -2
  162. data/lib/principles/views/prompts/assess-every-member/run-the-reviewed-check-and-say-what-its-review-rested-on.md +3 -6
  163. data/lib/principles/views/prompts/assess-every-member/say-what-observed-means.md +4 -0
  164. data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +5 -4
  165. data/lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-after-the-table.md +1 -0
  166. data/lib/principles/views/prompts/find-a-principle-to-map/ask-which-principle-to-map.md +2 -0
  167. data/lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md +9 -5
  168. data/lib/principles/views/prompts/find-a-principle-to-map/leave-test-data-out-of-the-survey.md +1 -0
  169. data/lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md +3 -0
  170. data/lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md +3 -0
  171. data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +4 -1
  172. data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md +7 -2
  173. data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +21 -6
  174. data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +25 -23
  175. data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +18 -16
  176. data/lib/principles/views/prompts/learn-what-a-command-does/list-principles.md +4 -2
  177. data/lib/principles/views/prompts/learn-what-a-command-does/select-the-project-root.md +1 -0
  178. data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +7 -1
  179. data/lib/principles/views/prompts/learn-what-a-command-does/show-audit.md +3 -1
  180. data/lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md +7 -6
  181. data/lib/principles/views/prompts/learn-what-a-command-does/show-principle.md +12 -12
  182. data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +30 -30
  183. data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +39 -39
  184. data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members-waiting-on-an-upgrade.md +2 -0
  185. data/lib/principles/views/prompts/report-after-a-commit/the-principles-skill-is-where-to-start.md +1 -0
  186. data/lib/principles/views/prompts/report-the-completed-audit/commit-only-what-the-audit-changed.md +4 -0
  187. data/lib/principles/views/prompts/set-principles-up/first-keeping-audit-after-own-principle.md +10 -0
  188. data/lib/principles/views/prompts/set-principles-up/keep-them-held-between-audits.md +2 -0
  189. data/lib/principles/views/prompts/set-principles-up/name-the-step-each-member-lacks.md +2 -0
  190. data/lib/principles/views/prompts/set-principles-up/place-the-passage-with-the-user.md +11 -7
  191. data/lib/principles/views/prompts/start-a-session/see-the-earlier-line.md +2 -0
  192. data/lib/principles/views/record_waiting_on_an_upgrade.rb +54 -0
  193. data/lib/principles/views/request_part.rb +26 -6
  194. data/lib/principles/views/request_parts.rb +8 -0
  195. metadata +69 -9
  196. data/lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-before-mapping.md +0 -1
  197. data/lib/principles/views/prompts/set-principles-up/set-up-first.md +0 -2
@@ -0,0 +1,2 @@
1
+ principles: the commits this Bash call brought in changed these mapped members, whose audits wait on an upgrade,
2
+ so this copy cannot audit them:
@@ -0,0 +1 @@
1
+ The principles skill, /principles, is where to start with these members; each command's output says what to do next.
@@ -1,2 +1,6 @@
1
+ Before using this recipe, inspect the diff for every file in `files_to_commit` and confirm that committing
2
+ each change is authorized and respects its ownership. Listing a file here grants no permission.
3
+ Follow the project's existing review, verification and commit-message rules.
4
+
1
5
  Commit %{files}, and nothing else staged, with the command that ends this line, after replacing its default `-m`
2
6
  message as `commit_message_to_replace` says. Commit with: %{command}
@@ -0,0 +1,10 @@
1
+ %{baseline}
2
+
3
+ This principle's first full audit judges whether the keeping works, so leave it until one of the project's own
4
+ principles is mapped.
5
+
6
+ To find the first of them: %{find}
7
+
8
+ Once a principle of the project's own is mapped, start this principle's first full audit when you choose.
9
+
10
+ To start it: %{audit}
@@ -0,0 +1,2 @@
1
+ To keep the principles held between audits, set principles up by mapping a passage, a timer or the setting that
2
+ enables the plugin: %{command}
@@ -10,6 +10,8 @@ members_in_entry_files are the ones in an entry file. This tool writes none of t
10
10
  Where a step is missing, the passage is one way to add it, at %{estimated_tokens} estimated tokens in every session
11
11
  that loads the entry file it goes in.
12
12
 
13
+ Place the passage exactly as printed, adding nothing to it and changing none of its words.
14
+
13
15
  Once the passage is placed, map it: %{command}
14
16
 
15
17
  To map another place that runs a missing step, giving as STEP the step it runs and as TRIGGER what starts it: %{any_place}
@@ -5,26 +5,30 @@ none of the project's guidance.
5
5
 
6
6
  The first member need not be the passage: it can be any file or setting in the project that keeps the principles
7
7
  in front of the agent, such as a timer of the project's own, or the committed setting that enables the plugin for
8
- the team, its enabledPlugins line. Map it with a role that names, as STEP, the step it runs and, as TRIGGER, what
8
+ the team, its enabledPlugins line. This helps teammates only if they can install the plugin from a marketplace
9
+ they can access. Map it with a role that names, as STEP, the step it runs and, as TRIGGER, what
9
10
  starts that step: a hook, a timer or a reader. Mapping it says only that the project names something to keep them
10
11
  held; this principle's audit judges whether it does.
11
12
 
12
13
  To map such a place: %{any_place}
13
14
 
14
15
  Where the owner enables the plugin only at user scope, the project has nothing to map for it. Say so, and name the
15
- two ways on: commit the project-scope enablement and map its line, or leave the "Set principles up first" line
16
- standing.
16
+ two ways on: commit the project-scope enablement and map its line, or leave principles not set up for now.
17
17
 
18
- Where only a reader enforces a step, with no hook or timer that runs it, say so in what you place.
18
+ Where only a reader enforces a step, with no hook or timer that runs it, say so in a sentence of its own after
19
+ the passage.
19
20
 
20
21
  Where the project says how a teammate gets `principles`, such as an install section or a setup note, link to it in
21
- what you place. Say in a few words what `principles` is, so a teammate knows what the passage and any link lead to.
22
- Where the project says nowhere how to get it, tell the user that a teammate who reads the passage cannot act on it
23
- without that.
22
+ a sentence of its own after the passage. Say in a few words what `principles` is, so a teammate knows what the
23
+ passage and any link lead to. Where the project says nowhere how to get it, tell the user that a teammate who reads
24
+ the passage cannot act on it without that.
24
25
 
25
26
  Where a passage the project already has carries one of the proposed passage's steps, leave that step out and map
26
27
  that passage too, so each rule is said once, giving its file as PATH and its heading as HEADING: %{existing}
27
28
 
29
+ Place the passage exactly as printed, adding nothing to it and changing none of its words. Anything else you
30
+ say goes in a sentence of its own after it, which the user agrees to with the passage.
31
+
28
32
  Once the passage is in the file, map it: %{command}
29
33
 
30
34
  That command names the heading the passage is proposed under; where you placed it under another heading, give
@@ -0,0 +1,2 @@
1
+ %{findings}.%{write_ups} An earlier line like this one in this conversation says what to do; if there is none, run
2
+ %{command}
@@ -0,0 +1,54 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ module Principles
5
+ # What this tool prints, from plain values a controller hands it. views/CLAUDE.md owns the boundary.
6
+ module Views
7
+ # One principle whose audit record a later copy wrote, at a format this copy cannot rewrite, so its audits and
8
+ # acknowledgements wait on an upgrade, which list-member-problems states instead of offering them (D85, V8). The
9
+ # session-start hook prints its line from --short's stderr, matching "audit record is format N, first written
10
+ # by release", so a reword of that phrase changes the hook too.
11
+ class RecordWaitingOnAnUpgrade
12
+ # newest is the newest format this copy rewrites; update says how to update, whatever copy runs.
13
+ #: (principle: String, format: Integer, first_release: String, newest: Integer, update: String) -> void
14
+ def initialize(principle:, format:, first_release:, newest:, update:)
15
+ @principle = principle
16
+ @format = format
17
+ @first_release = first_release
18
+ @newest = newest
19
+ @update = update
20
+ freeze
21
+ end
22
+
23
+ #: String
24
+ attr_reader :principle
25
+
26
+ # As list-member-problems lists it under records_waiting_on_an_upgrade.
27
+ #: () -> Hash[String, untyped]
28
+ def to_h = { "principle" => @principle, **record_format }
29
+
30
+ # As show-audit prints it beside the record.
31
+ #: () -> Hash[String, String]
32
+ def beside = { "record_waiting_on_an_upgrade" => to_s }
33
+
34
+ # As list-principles marks the principle's row: the format alone, since its next_action says once how to update,
35
+ # where the whole line on each row repeated it (#1081).
36
+ #: () -> Hash[String, Hash[String, untyped]]
37
+ def marker = { "record_waiting_on_an_upgrade" => record_format }
38
+
39
+ # How to update so this copy can read the record, as one sentence.
40
+ #: () -> String
41
+ def update = "#{@update}."
42
+
43
+ # The record's format and the release that first wrote it.
44
+ #: () -> Hash[String, untyped]
45
+ def record_format = { "format" => @format, "format_first_release" => @first_release }
46
+
47
+ #: () -> String
48
+ def to_s
49
+ "#{@principle}'s audit record is format #{@format}, first written by release #{@first_release}; this copy " \
50
+ "rewrites up to format #{@newest}, so its audits and acknowledgements wait on an upgrade. #{update}"
51
+ end
52
+ end
53
+ end
54
+ end
@@ -1,6 +1,8 @@
1
1
  # typed: strict
2
2
  # frozen_string_literal: true
3
3
 
4
+ require_relative "instruction"
5
+
4
6
  module Principles
5
7
  # What this tool prints, from plain values a controller hands it. views/CLAUDE.md owns the boundary.
6
8
  module Views
@@ -8,19 +10,37 @@ module Principles
8
10
  # to check against the activation (#355): what the agent reads of it, its list and the instruction for it, and
9
11
  # the slots it adds to the answer's template, which the request builds in where each belongs (D60).
10
12
  class RequestPart
11
- # What the agent reads of this part: its list, then the instruction for deciding it.
12
- #: Hash[String, untyped]
13
- attr_reader :shown
14
13
  # The slots this part adds to the answer's template.
15
14
  #: Hash[String, untyped]
16
15
  attr_reader :slots
16
+ # The instructions for deciding this part, each printed after its list (D81 step 2).
17
+ #: Array[Instruction]
18
+ attr_reader :instructions
17
19
 
18
- #: (shown: Hash[String, untyped], slots: Hash[String, untyped]) -> void
19
- def initialize(shown:, slots:)
20
- @shown = shown
20
+ # listed is what the agent reads of this part before its instructions. help is, by slot, the placeholder text
21
+ # each of its entries carries in the answer printed alone, where no instruction is printed beside it to say
22
+ # what each field takes (D81 step 1).
23
+ #: (shown: Hash[String, untyped], slots: Hash[String, untyped], ?instructions: Array[Instruction],
24
+ #| ?help: Hash[String, Hash[String, untyped]]) -> void
25
+ def initialize(shown:, slots:, instructions: [], help: {})
26
+ @listed = shown
21
27
  @slots = slots
28
+ @instructions = instructions
29
+ @help = help
22
30
  freeze
23
31
  end
32
+
33
+ # What the agent reads of this part: its list, then each instruction as the request prints it.
34
+ #: () -> Hash[String, untyped]
35
+ def shown = @instructions.reduce(@listed) { |all, instruction| all.merge(instruction.printed) }
36
+
37
+ # The slots, each entry with its help in place of the fields the agent fills.
38
+ #: () -> Hash[String, untyped]
39
+ def slots_to_fill
40
+ @slots.to_h do |name, entries|
41
+ [name, entries.map { |entry| entry.merge(@help.fetch(name, {})) }]
42
+ end
43
+ end
24
44
  end
25
45
  end
26
46
  end
@@ -18,9 +18,17 @@ module Principles
18
18
  #: (Hash[String, untyped]) -> Hash[String, untyped]
19
19
  def shown_after(entries) = @parts.reduce(entries) { |all, part| all.merge(part.shown) }
20
20
 
21
+ # Every part's instructions, in order.
22
+ #: () -> Array[Instruction]
23
+ def instructions = @parts.flat_map(&:instructions)
24
+
21
25
  # template, with each part's slots added after its own entries, in order.
22
26
  #: (Hash[String, untyped]) -> Hash[String, untyped]
23
27
  def slotted_after(template) = @parts.reduce(template) { |all, part| all.merge(part.slots) }
28
+
29
+ # template, with each part's slots added after its own entries, in order, each carrying its help.
30
+ #: (Hash[String, untyped]) -> Hash[String, untyped]
31
+ def filled_after(template) = @parts.reduce(template) { |all, part| all.merge(part.slots_to_fill) }
24
32
  end
25
33
  end
26
34
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: principles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sidu Ponnappa
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
10
+ date: 2026-11-16 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: |
13
13
  Principles helps teams keep an agent's operating guidance consistent as their harness evolves.
@@ -32,14 +32,18 @@ files:
32
32
  - lib/principles/command_routes.rb
33
33
  - lib/principles/controllers/acknowledgement.rb
34
34
  - lib/principles/controllers/answer.rb
35
+ - lib/principles/controllers/answer_phase.rb
36
+ - lib/principles/controllers/assessment.rb
35
37
  - lib/principles/controllers/audit.rb
36
38
  - lib/principles/controllers/audit_completion.rb
37
39
  - lib/principles/controllers/command.rb
38
40
  - lib/principles/controllers/correction.rb
41
+ - lib/principles/controllers/full_audit_request.rb
39
42
  - lib/principles/controllers/help.rb
40
43
  - lib/principles/controllers/inventory.rb
41
44
  - lib/principles/controllers/mapping.rb
42
45
  - lib/principles/controllers/member_entries.rb
46
+ - lib/principles/controllers/member_problems_report.rb
43
47
  - lib/principles/controllers/members_a_commit_changed.rb
44
48
  - lib/principles/controllers/members_to_assess.rb
45
49
  - lib/principles/controllers/meta_principle_setup.rb
@@ -59,6 +63,7 @@ files:
59
63
  - lib/principles/data/principle_id.rb
60
64
  - lib/principles/data/principles_subfolder.rb
61
65
  - lib/principles/data/project_files.rb
66
+ - lib/principles/data/project_root.rb
62
67
  - lib/principles/data/repository.rb
63
68
  - lib/principles/data/running_version.rb
64
69
  - lib/principles/data/schema_check.rb
@@ -75,6 +80,7 @@ files:
75
80
  - lib/principles/invocation_options.rb
76
81
  - lib/principles/models/accepted_loading.rb
77
82
  - lib/principles/models/acknowledgement.rb
83
+ - lib/principles/models/acknowledgement_refusal.rb
78
84
  - lib/principles/models/activation.rb
79
85
  - lib/principles/models/agent_loads.rb
80
86
  - lib/principles/models/answer_fields.rb
@@ -83,6 +89,7 @@ files:
83
89
  - lib/principles/models/answered_time.rb
84
90
  - lib/principles/models/assessment_answer.rb
85
91
  - lib/principles/models/assessment_basis.rb
92
+ - lib/principles/models/assessment_left_as_printed.rb
86
93
  - lib/principles/models/assessment_report.rb
87
94
  - lib/principles/models/audit.rb
88
95
  - lib/principles/models/audit_record.rb
@@ -92,7 +99,9 @@ files:
92
99
  - lib/principles/models/candidate_files.rb
93
100
  - lib/principles/models/candidate_inventory.rb
94
101
  - lib/principles/models/candidate_listing.rb
102
+ - lib/principles/models/candidate_outline.rb
95
103
  - lib/principles/models/carried_assessments.rb
104
+ - lib/principles/models/carried_member.rb
96
105
  - lib/principles/models/check_since_last_audit.rb
97
106
  - lib/principles/models/cited_files.rb
98
107
  - lib/principles/models/command_steps.rb
@@ -112,15 +121,18 @@ files:
112
121
  - lib/principles/models/finding_write_ups.rb
113
122
  - lib/principles/models/findings_left_open.rb
114
123
  - lib/principles/models/first_raised_claim.rb
124
+ - lib/principles/models/fix_only_fields.rb
115
125
  - lib/principles/models/frontmatter_fields.rb
116
126
  - lib/principles/models/hook_commands.rb
117
127
  - lib/principles/models/ignored_candidates.rb
128
+ - lib/principles/models/instruction_named.rb
118
129
  - lib/principles/models/json_digest.rb
119
130
  - lib/principles/models/json_path_query.rb
120
131
  - lib/principles/models/json_path_selectors.rb
121
132
  - lib/principles/models/json_path_string.rb
122
133
  - lib/principles/models/kept_prior_finding.rb
123
134
  - lib/principles/models/last_completed_revision.rb
135
+ - lib/principles/models/left_as_printed.rb
124
136
  - lib/principles/models/line_span.rb
125
137
  - lib/principles/models/loaded_files.rb
126
138
  - lib/principles/models/loading_decision.rb
@@ -129,21 +141,20 @@ files:
129
141
  - lib/principles/models/locate_refusal.rb
130
142
  - lib/principles/models/located_text.rb
131
143
  - lib/principles/models/locator.rb
132
- - lib/principles/models/map_members.rb
144
+ - lib/principles/models/mapped_principles.rb
133
145
  - lib/principles/models/markdown_file.rb
134
146
  - lib/principles/models/member.rb
135
147
  - lib/principles/models/member_assessments.rb
136
148
  - lib/principles/models/member_elsewhere.rb
137
149
  - lib/principles/models/member_file.rb
138
150
  - lib/principles/models/member_grounds.rb
151
+ - lib/principles/models/member_hashes_as_written.rb
139
152
  - lib/principles/models/member_history.rb
140
153
  - lib/principles/models/member_lines.rb
141
154
  - lib/principles/models/member_loads.rb
142
- - lib/principles/models/member_map.rb
143
- - lib/principles/models/member_map_history.rb
144
- - lib/principles/models/member_maps.rb
145
155
  - lib/principles/models/member_moves.rb
146
156
  - lib/principles/models/member_problems.rb
157
+ - lib/principles/models/member_repair_moves.rb
147
158
  - lib/principles/models/member_sighting.rb
148
159
  - lib/principles/models/member_snapshots.rb
149
160
  - lib/principles/models/member_state.rb
@@ -152,55 +163,86 @@ files:
152
163
  - lib/principles/models/meta_principle.rb
153
164
  - lib/principles/models/missing_files.rb
154
165
  - lib/principles/models/misspelt_member_id.rb
166
+ - lib/principles/models/new_findings.rb
155
167
  - lib/principles/models/open_finding.rb
156
168
  - lib/principles/models/open_findings_elsewhere.rb
157
169
  - lib/principles/models/other_principles.rb
170
+ - lib/principles/models/other_templates_placeholders.rb
171
+ - lib/principles/models/outline_budget.rb
172
+ - lib/principles/models/outline_group.rb
173
+ - lib/principles/models/outline_section.rb
158
174
  - lib/principles/models/placement.rb
159
175
  - lib/principles/models/plain_text_file.rb
176
+ - lib/principles/models/principle.rb
177
+ - lib/principles/models/principle_history.rb
178
+ - lib/principles/models/principle_members.rb
160
179
  - lib/principles/models/principles_folder_move.rb
161
180
  - lib/principles/models/principles_package.rb
181
+ - lib/principles/models/prior_decision_fields.rb
162
182
  - lib/principles/models/prior_finding_decision.rb
163
183
  - lib/principles/models/prior_finding_outcomes.rb
164
184
  - lib/principles/models/prior_findings.rb
165
185
  - lib/principles/models/problem_report.rb
166
186
  - lib/principles/models/project.rb
167
187
  - lib/principles/models/project_history.rb
188
+ - lib/principles/models/quoted_change.rb
189
+ - lib/principles/models/recent_decision.rb
190
+ - lib/principles/models/record_format.rb
168
191
  - lib/principles/models/record_judged_against.rb
169
192
  - lib/principles/models/recorded_entry.rb
170
193
  - lib/principles/models/recorded_finding.rb
171
194
  - lib/principles/models/recorded_findings.rb
195
+ - lib/principles/models/recorded_hashes.rb
172
196
  - lib/principles/models/recorded_members.rb
197
+ - lib/principles/models/refusal_before_shape.rb
173
198
  - lib/principles/models/repoint.rb
174
199
  - lib/principles/models/reported_check.rb
175
200
  - lib/principles/models/request_id.rb
176
201
  - lib/principles/models/runs_from.rb
202
+ - lib/principles/models/sent_answer.rb
203
+ - lib/principles/models/sent_prior_decisions.rb
204
+ - lib/principles/models/shape_problems_beside.rb
177
205
  - lib/principles/models/skill_loads.rb
178
206
  - lib/principles/models/still_holds_restatement.rb
207
+ - lib/principles/models/submitted_answer.rb
208
+ - lib/principles/models/template_placeholders.rb
179
209
  - lib/principles/models/text_size.rb
210
+ - lib/principles/models/text_within.rb
211
+ - lib/principles/models/unchecked_members.rb
180
212
  - lib/principles/models/uncommitted_outside_the_map.rb
181
213
  - lib/principles/models/waits_on.rb
182
214
  - lib/principles/models/write_up_opening.rb
183
215
  - lib/principles/models/write_up_pointer.rb
184
216
  - lib/principles/models/write_up_repoint.rb
185
217
  - lib/principles/prose_list.rb
218
+ - lib/principles/session_start_options.rb
219
+ - lib/principles/start_audit_options.rb
186
220
  - lib/principles/supported_ruby.rb
187
221
  - lib/principles/version.rb
188
222
  - lib/principles/views/acknowledged_since_last_audit.rb
189
223
  - lib/principles/views/acknowledgement_result.rb
190
224
  - lib/principles/views/activation_in_hand.rb
225
+ - lib/principles/views/answer_head.rb
226
+ - lib/principles/views/assessed_members.rb
191
227
  - lib/principles/views/assessment_request.rb
192
228
  - lib/principles/views/audit_changes.rb
193
229
  - lib/principles/views/audit_commit.rb
194
230
  - lib/principles/views/audit_result.rb
195
231
  - lib/principles/views/candidate_files_result.rb
232
+ - lib/principles/views/check_notes.rb
196
233
  - lib/principles/views/check_result_template.rb
234
+ - lib/principles/views/correction_request.rb
197
235
  - lib/principles/views/diff_since_last_audit.rb
198
236
  - lib/principles/views/findings_result.rb
237
+ - lib/principles/views/first_audit.rb
199
238
  - lib/principles/views/help.rb
239
+ - lib/principles/views/instruction.rb
200
240
  - lib/principles/views/invocation.rb
241
+ - lib/principles/views/json_with_entries_on_lines.rb
201
242
  - lib/principles/views/landed_since_base.rb
202
243
  - lib/principles/views/lines_shared_with_member.rb
203
244
  - lib/principles/views/loads_to_check_result.rb
245
+ - lib/principles/views/map_added_to.rb
204
246
  - lib/principles/views/map_result.rb
205
247
  - lib/principles/views/member_change_since_baseline.rb
206
248
  - lib/principles/views/member_repairs.rb
@@ -208,6 +250,7 @@ files:
208
250
  - lib/principles/views/members_with_no_baseline.rb
209
251
  - lib/principles/views/meta_principle_passage.rb
210
252
  - lib/principles/views/meta_principle_result.rb
253
+ - lib/principles/views/one_member_check_result_template.rb
211
254
  - lib/principles/views/open_findings_elsewhere_result.rb
212
255
  - lib/principles/views/open_findings_line.rb
213
256
  - lib/principles/views/other_principles_unjudged_result.rb
@@ -222,11 +265,13 @@ files:
222
265
  - lib/principles/views/problem_lines.rb
223
266
  - lib/principles/views/problem_result.rb
224
267
  - lib/principles/views/prompts.rb
268
+ - lib/principles/views/prompts/acknowledge-a-change/run-the-check-and-report-it-passing.md
225
269
  - lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md
226
270
  - lib/principles/views/prompts/answer-any-judgement-request/what-a-self-audit-cannot-show.md
227
271
  - lib/principles/views/prompts/assess-every-member/answer-guide.json
228
272
  - lib/principles/views/prompts/assess-every-member/assess-each-member-and-the-set.md
229
273
  - lib/principles/views/prompts/assess-every-member/check-roles-other-principles-give-these-lines.md
274
+ - lib/principles/views/prompts/assess-every-member/claim-an-earlier-first-raised-at.md
230
275
  - lib/principles/views/prompts/assess-every-member/decide-each-member-loading.md
231
276
  - lib/principles/views/prompts/assess-every-member/decide-each-prior-finding.md
232
277
  - lib/principles/views/prompts/assess-every-member/give-problem-evidence-at-still-holds.md
@@ -238,22 +283,31 @@ files:
238
283
  - lib/principles/views/prompts/assess-every-member/judge-the-keeping-against-the-other-principles.md
239
284
  - lib/principles/views/prompts/assess-every-member/judge-the-keeping-under-the-release-since-the-last-audit.md
240
285
  - lib/principles/views/prompts/assess-every-member/judge-the-set-with-carried-assessments.md
286
+ - lib/principles/views/prompts/assess-every-member/keep-or-change-what-a-deferral-waits-on.md
241
287
  - lib/principles/views/prompts/assess-every-member/keep-the-last-review-basis-unless-you-give-a-new-one.md
242
288
  - lib/principles/views/prompts/assess-every-member/name-another-principles-open-finding-rather-than-raise-it.md
289
+ - lib/principles/views/prompts/assess-every-member/read-a-compact-carried-member.md
290
+ - lib/principles/views/prompts/assess-every-member/read-a-trimmed-instruction-whole.md
243
291
  - lib/principles/views/prompts/assess-every-member/read-whether-each-prior-finding-s-evidence-changed.md
292
+ - lib/principles/views/prompts/assess-every-member/review-a-new-or-changed-check-before-running-it.md
244
293
  - lib/principles/views/prompts/assess-every-member/run-a-named-check-at-every-full-audit.md
245
294
  - lib/principles/views/prompts/assess-every-member/run-the-check-then-report-it.md
246
295
  - lib/principles/views/prompts/assess-every-member/run-the-reviewed-check-and-say-what-its-review-rested-on.md
296
+ - lib/principles/views/prompts/assess-every-member/say-what-observed-means.md
247
297
  - lib/principles/views/prompts/assess-every-member/uncommitted-files-outside-the-map.md
248
298
  - lib/principles/views/prompts/assess-every-member/why-each-member-is-judged-again.md
249
299
  - lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json
250
300
  - lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md
251
- - lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-before-mapping.md
301
+ - lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-after-the-table.md
302
+ - lib/principles/views/prompts/find-a-principle-to-map/ask-which-principle-to-map.md
252
303
  - lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md
304
+ - lib/principles/views/prompts/find-a-principle-to-map/leave-test-data-out-of-the-survey.md
253
305
  - lib/principles/views/prompts/find-a-principle-to-map/owner-ask-ignored-folders.md
254
306
  - lib/principles/views/prompts/find-a-principle-to-map/owner-ask-ignored.md
255
307
  - lib/principles/views/prompts/find-a-principle-to-map/owner-ask-possibly-test-data.md
256
308
  - lib/principles/views/prompts/find-a-principle-to-map/owner-ask-untracked.md
309
+ - lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md
310
+ - lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md
257
311
  - lib/principles/views/prompts/find-a-principle-to-map/what-each-command-writes.md
258
312
  - lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md
259
313
  - lib/principles/views/prompts/learn-what-a-command-does/add-member.md
@@ -270,6 +324,7 @@ files:
270
324
  - lib/principles/views/prompts/learn-what-a-command-does/move-member.md
271
325
  - lib/principles/views/prompts/learn-what-a-command-does/remove-member-check.md
272
326
  - lib/principles/views/prompts/learn-what-a-command-does/remove-member.md
327
+ - lib/principles/views/prompts/learn-what-a-command-does/select-the-project-root.md
273
328
  - lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md
274
329
  - lib/principles/views/prompts/learn-what-a-command-does/show-audit.md
275
330
  - lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md
@@ -279,21 +334,26 @@ files:
279
334
  - lib/principles/views/prompts/repoint-write-ups/point-each-moved-write-up-at-its-new-place.md
280
335
  - lib/principles/views/prompts/report-after-a-commit/it-refused-after-the-commits-touched-the-maps.md
281
336
  - lib/principles/views/prompts/report-after-a-commit/others-are-still-listed.md
337
+ - lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members-waiting-on-an-upgrade.md
282
338
  - lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members.md
339
+ - lib/principles/views/prompts/report-after-a-commit/the-principles-skill-is-where-to-start.md
283
340
  - lib/principles/views/prompts/report-after-a-commit/this-command-shows-each-one.md
284
341
  - lib/principles/views/prompts/report-the-completed-audit/commit-only-what-the-audit-changed.md
285
342
  - lib/principles/views/prompts/report-the-completed-audit/replace-the-default-commit-message.md
286
343
  - lib/principles/views/prompts/report-the-completed-audit/what-completion-means.md
287
344
  - lib/principles/views/prompts/set-principles-up/entry-file-passage.md
345
+ - lib/principles/views/prompts/set-principles-up/first-keeping-audit-after-own-principle.md
346
+ - lib/principles/views/prompts/set-principles-up/keep-them-held-between-audits.md
288
347
  - lib/principles/views/prompts/set-principles-up/name-the-step-each-member-lacks.md
289
348
  - lib/principles/views/prompts/set-principles-up/place-the-passage-with-the-user.md
290
- - lib/principles/views/prompts/set-principles-up/set-up-first.md
291
349
  - lib/principles/views/prompts/set-principles-up/what-the-passage-presumes.md
292
350
  - lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md
293
351
  - lib/principles/views/prompts/start-a-session/it-returns-after-each-clear-or-compaction-too.md
294
352
  - lib/principles/views/prompts/start-a-session/it-returns-at-each-session-start.md
295
353
  - lib/principles/views/prompts/start-a-session/raise-them-at-the-next-pause.md
296
354
  - lib/principles/views/prompts/start-a-session/raise-them-before-the-first-task.md
355
+ - lib/principles/views/prompts/start-a-session/see-the-earlier-line.md
356
+ - lib/principles/views/record_waiting_on_an_upgrade.rb
297
357
  - lib/principles/views/repoint_result.rb
298
358
  - lib/principles/views/request_part.rb
299
359
  - lib/principles/views/request_parts.rb
@@ -320,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
320
380
  - !ruby/object:Gem::Version
321
381
  version: '0'
322
382
  requirements: []
323
- rubygems_version: 3.6.9
383
+ rubygems_version: 3.6.2
324
384
  specification_version: 4
325
385
  summary: Maps and audits agent guidance to catch harness drift and debt
326
386
  test_files: []
@@ -1 +0,0 @@
1
- Before mapping, ask the project's owner:
@@ -1,2 +0,0 @@
1
- Set principles up first, mapping a passage, a timer or the setting that enables the plugin as what keeps them held
2
- between audits: %{command}