principles 0.0.5 → 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 (152) hide show
  1. checksums.yaml +4 -4
  2. data/lib/principles/after_commit_hook_options.rb +4 -1
  3. data/lib/principles/command_line.rb +12 -28
  4. data/lib/principles/command_routes.rb +7 -1
  5. data/lib/principles/controllers/acknowledgement.rb +36 -26
  6. data/lib/principles/controllers/answer.rb +7 -5
  7. data/lib/principles/controllers/assessment.rb +14 -3
  8. data/lib/principles/controllers/audit_completion.rb +3 -1
  9. data/lib/principles/controllers/command.rb +2 -2
  10. data/lib/principles/controllers/correction.rb +3 -1
  11. data/lib/principles/controllers/full_audit_request.rb +1 -1
  12. data/lib/principles/controllers/guidance_search_paths.rb +31 -0
  13. data/lib/principles/controllers/inventory.rb +3 -22
  14. data/lib/principles/controllers/mapping.rb +9 -1
  15. data/lib/principles/controllers/member_addition.rb +65 -0
  16. data/lib/principles/controllers/member_entries.rb +6 -24
  17. data/lib/principles/controllers/member_problems_report.rb +2 -2
  18. data/lib/principles/controllers/members_to_assess.rb +1 -1
  19. data/lib/principles/controllers/meta_principle_setup.rb +1 -1
  20. data/lib/principles/controllers/repoint.rb +5 -2
  21. data/lib/principles/controllers/survey.rb +60 -0
  22. data/lib/principles/data/audit_files.rb +4 -0
  23. data/lib/principles/data/candidate_files_found.rb +48 -13
  24. data/lib/principles/data/command-steps.json +77 -16
  25. data/lib/principles/data/committed_tree.rb +84 -0
  26. data/lib/principles/data/first_parent_log.rb +48 -0
  27. data/lib/principles/data/first_parent_range.rb +122 -0
  28. data/lib/principles/data/git_command.rb +37 -0
  29. data/lib/principles/data/guidance_search_paths_file.rb +107 -0
  30. data/lib/principles/data/map_files.rb +35 -10
  31. data/lib/principles/data/principles_directory.rb +40 -0
  32. data/lib/principles/data/principles_subfolder.rb +39 -16
  33. data/lib/principles/data/project_files.rb +11 -3
  34. data/lib/principles/data/repository.rb +55 -29
  35. data/lib/principles/data/requested_candidate_files.rb +43 -0
  36. data/lib/principles/data/running_version.rb +3 -5
  37. data/lib/principles/data/schemas/acknowledgement-answer.schema.json +4 -5
  38. data/lib/principles/data/schemas/answer-guide.schema.json +255 -63
  39. data/lib/principles/data/schemas/command-steps.schema.json +1 -1
  40. data/lib/principles/data/schemas/correction-answer-guide.schema.json +2 -1
  41. data/lib/principles/data/schemas/correction-answer.schema.json +6 -0
  42. data/lib/principles/data/schemas/guidance-search-paths.schema.json +13 -0
  43. data/lib/principles/data/schemas/member-map-history.schema.json +20 -0
  44. data/lib/principles/data/verified_head.rb +162 -0
  45. data/lib/principles/invocation_options.rb +2 -2
  46. data/lib/principles/models/acknowledgement.rb +28 -6
  47. data/lib/principles/models/acknowledgement_left_as_printed.rb +51 -0
  48. data/lib/principles/models/audit_entry_protecting_map.rb +28 -0
  49. data/lib/principles/models/audit_record.rb +4 -0
  50. data/lib/principles/models/audit_records.rb +34 -8
  51. data/lib/principles/models/candidate_files.rb +17 -6
  52. data/lib/principles/models/candidate_inventory.rb +51 -7
  53. data/lib/principles/models/captured_head.rb +72 -0
  54. data/lib/principles/models/check_since_last_audit.rb +4 -8
  55. data/lib/principles/models/declared_map_changes.rb +25 -9
  56. data/lib/principles/models/declared_member_removals.rb +75 -0
  57. data/lib/principles/models/disposition.rb +4 -2
  58. data/lib/principles/models/fix_only_fields.rb +12 -0
  59. data/lib/principles/models/guidance_search_path.rb +26 -0
  60. data/lib/principles/models/guidance_search_paths.rb +57 -0
  61. data/lib/principles/models/line_span.rb +6 -0
  62. data/lib/principles/models/loaded_files.rb +1 -2
  63. data/lib/principles/models/loading_scope.rb +61 -0
  64. data/lib/principles/models/locator.rb +6 -0
  65. data/lib/principles/models/mapped_principles.rb +39 -37
  66. data/lib/principles/models/member_file.rb +20 -71
  67. data/lib/principles/models/member_history.rb +7 -5
  68. data/lib/principles/models/member_loading_scopes.rb +49 -0
  69. data/lib/principles/models/member_loads.rb +4 -0
  70. data/lib/principles/models/member_mapping_run.rb +30 -0
  71. data/lib/principles/models/member_moves.rb +4 -0
  72. data/lib/principles/models/member_problems.rb +48 -24
  73. data/lib/principles/models/member_region.rb +129 -0
  74. data/lib/principles/models/member_repair_moves.rb +9 -11
  75. data/lib/principles/models/member_snapshots.rb +14 -1
  76. data/lib/principles/models/members_in_consecutive_sections.rb +56 -0
  77. data/lib/principles/models/meta_principle.rb +14 -0
  78. data/lib/principles/models/missing_files.rb +2 -2
  79. data/lib/principles/models/other_templates_placeholders.rb +1 -1
  80. data/lib/principles/models/outline_budget.rb +29 -14
  81. data/lib/principles/models/principle.rb +14 -7
  82. data/lib/principles/models/principle_file_revision.rb +48 -0
  83. data/lib/principles/models/principle_history.rb +46 -19
  84. data/lib/principles/models/principle_lineage.rb +118 -0
  85. data/lib/principles/models/principle_map_revision.rb +39 -0
  86. data/lib/principles/models/principle_mapping_history.rb +132 -0
  87. data/lib/principles/models/principle_members.rb +14 -0
  88. data/lib/principles/models/principle_predecessor.rb +45 -0
  89. data/lib/principles/models/principle_publication.rb +177 -0
  90. data/lib/principles/models/principle_revision.rb +104 -0
  91. data/lib/principles/models/problem_report.rb +17 -5
  92. data/lib/principles/models/project.rb +43 -27
  93. data/lib/principles/models/project_history.rb +45 -25
  94. data/lib/principles/models/record_format.rb +6 -0
  95. data/lib/principles/models/reported_check.rb +2 -1
  96. data/lib/principles/models/sent_answer.rb +10 -0
  97. data/lib/principles/models/survey_search_paths.rb +26 -0
  98. data/lib/principles/models/uncommitted_files.rb +50 -0
  99. data/lib/principles/models/unknown_principle.rb +29 -0
  100. data/lib/principles/positional_arguments.rb +37 -0
  101. data/lib/principles/version.rb +2 -2
  102. data/lib/principles/views/acknowledgement_result.rb +16 -12
  103. data/lib/principles/views/added_member.rb +41 -0
  104. data/lib/principles/views/answered_request.rb +21 -0
  105. data/lib/principles/views/assessment_request.rb +2 -1
  106. data/lib/principles/views/audit_result.rb +21 -26
  107. data/lib/principles/views/candidate_files_result.rb +56 -12
  108. data/lib/principles/views/candidate_outlines_result.rb +25 -0
  109. data/lib/principles/views/consecutive_sections_elsewhere.rb +27 -0
  110. data/lib/principles/views/correction_request.rb +32 -1
  111. data/lib/principles/views/guidance_search_paths_result.rb +26 -0
  112. data/lib/principles/views/json_with_entries_on_lines.rb +12 -4
  113. data/lib/principles/views/map_added_to.rb +56 -2
  114. data/lib/principles/views/map_result.rb +22 -42
  115. data/lib/principles/views/maps_needing_members_or_audit.rb +47 -0
  116. data/lib/principles/views/member_change_since_baseline.rb +2 -1
  117. data/lib/principles/views/member_repairs.rb +2 -1
  118. data/lib/principles/views/new_loading_scope.rb +31 -0
  119. data/lib/principles/views/one_member_check_result_template.rb +25 -21
  120. data/lib/principles/views/principle_read_result.rb +4 -1
  121. data/lib/principles/views/principles_with_no_completed_audit.rb +9 -3
  122. data/lib/principles/views/problem_lines.rb +3 -1
  123. data/lib/principles/views/problem_result.rb +8 -3
  124. data/lib/principles/views/prompts/acknowledge-a-change/run-the-check-and-report-it-passing.md +3 -3
  125. data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md +6 -6
  126. data/lib/principles/views/prompts/assess-every-member/answer-guide.json +67 -43
  127. data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
  128. data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +12 -0
  129. data/lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md +4 -0
  130. data/lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md +6 -0
  131. data/lib/principles/views/prompts/find-a-principle-to-map/choose-an-existing-or-new-principle.md +2 -0
  132. data/lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md +4 -2
  133. data/lib/principles/views/prompts/find-a-principle-to-map/compare-with-mapped-principles.md +11 -0
  134. data/lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md +2 -2
  135. data/lib/principles/views/prompts/find-a-principle-to-map/survey-a-later-range.md +3 -0
  136. data/lib/principles/views/prompts/find-a-principle-to-map/what-each-command-writes.md +4 -4
  137. data/lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md +5 -4
  138. data/lib/principles/views/prompts/learn-what-a-command-does/add-guidance-search-path.md +17 -0
  139. data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +35 -6
  140. data/lib/principles/views/prompts/learn-what-a-command-does/create-principle.md +16 -0
  141. data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +37 -4
  142. data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +5 -4
  143. data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +5 -0
  144. data/lib/principles/views/prompts/learn-what-a-command-does/remove-guidance-search-path.md +13 -0
  145. data/lib/principles/views/prompts/learn-what-a-command-does/remove-principle.md +25 -0
  146. data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +26 -0
  147. data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +21 -0
  148. data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +2 -2
  149. data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +51 -54
  150. data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +7 -0
  151. metadata +55 -4
  152. data/lib/principles/models/candidate_listing.rb +0 -41
@@ -1,56 +1,53 @@
1
- Gives your answer to request REQUEST_ID from its `response_template`. Pass a JSON FILE outside the project with `--file
2
- FILE`; `--file -` reads stdin. This tool writes audit records at `.principles/audits/ID.json`, never member guidance. In
3
- a full audit, make each fix after the assessment is accepted and before you submit the correction that reports it: an
4
- earlier fix changes a member the request was computed from: `stale_request`, checked before an assessment's shape. If
5
- another full audit of the principle completed, or a member was acknowledged, after an assessment or correction request
6
- was printed, its answer is refused as `audit_completed_since_request`, since it would replace the newer record and drop
7
- what it left open: run `list-open-findings ID`, then start the audit again. Copy the basis unchanged: its
8
- `last_completed_revision` says which record its request was printed after. The same answer submitted again after it
9
- completed the audit writes nothing, and is accepted; an assessment whose correction completed the audit is refused
10
- instead, since it would print a new correction. An observed assessment may give `observed_at`, when you saw what
11
- `observation` describes, as a UTC time like `2026-11-01T09:30:00Z`; none or null dates it at this audit's time. When the
12
- sighting is a dated record you read during this audit, `observed_at` is the record's date, not when you read it. Another
13
- form, a time after the answer, or any on a not_observed one, even null, is refused as `invalid_answer`. An `observation`
14
- judged afresh copying the last full audit's word for word is refused as `observation_repeats_last_audit` unless
15
- `observed_at` is the date it names or null: the date if you kept that sighting; reword a later one, null if in this
16
- audit. It checks no reworded text. When this tool cannot place a piece of evidence or a `recorded_at`, such as a quote
17
- that occurs twice (`ambiguous_passage`), or refuses a `check_result` (`invalid_check_result`), the refusal keeps its
18
- code, any `path` and repair, starts its message with whose it is, such as "Finding F1" or "Member CLAUDE.md#Names", and
19
- gives `fields`, each with its `problem` and the JSON `pointer` into your answer. Text ending like a placeholder ("Leave
20
- as printed ...", "else leave", "else kept") that this template did not print is another template's: one `invalid_answer`
21
- names each field; start from this `response_template`, or reword your own text's ending. The correction template leaves
22
- each `action` its placeholder: choose fixed, deferred, accepted or disagreed; one left so or unknown is refused as
23
- `invalid_disposition`, naming the finding. A deferred disposition may give `waits_on`, one line saying whom the finding
24
- waits on and to decide what, such as "<person>, to approve a CI change", which `list-open-findings` prints. Null,
25
- accepted on any disposition, says it waits on no one; a line on any other action, or one that spans lines, is refused as
26
- `invalid_disposition`. This tool records when it was asked; never send that time. A full audit's `still_holds` decision
27
- on a prior finding may give `first_raised_at` with `raised_in`, the full sha of a commit whose audit record, at
28
- `.principles/audits/ID.json` or the earlier `.memeplex/audits/ID.json`, left the same finding open then, deferred or
29
- accepted, with `first_raised_at` that record's `audited_at`, to date a finding from records older than the field. Give
30
- both or neither; this tool reads only that commit, and whether it is the same finding is yours to judge. A claim it
31
- cannot confirm is refused, saying why and how to repair it: `raised_in_not_found`, as outside git,
32
- `raised_in_unreadable`, `raised_in_lacks_finding`, `raised_in_time_differs`, or `first_raised_not_earlier` when it is
33
- not earlier than the time stored. A completed full audit's `open_findings` are the ids `list-open-findings` will list,
34
- its own and kept prior ones, deferred or accepted; `resolved_findings`, those fixed now and prior ones decided resolved.
35
- A disagreed or withdrawn finding is in neither; `prior_findings_closed` gives each prior one closed, with its decision
36
- and reason. In git, `commits_since_base` lists by member id the commits since the base touching its file; an uncommitted
37
- fix shows an empty list, `files_to_commit` names its file, and `commit_with`, its `-m` default replaced as
38
- `commit_message_to_replace` says, commits only those, stopping during an unfinished merge. In or out of git,
39
- `cited_files_missing` names each file the record cites that no longer exists, which `files_to_commit` leaves out though
40
- the record still points at it. If HEAD moved but no commit touched one, `head_moved_past_base` gives `base_commit` and
41
- `head`. If its fixes changed a file another principle also maps, `other_principles_with_changed_members` names each such
42
- principle and its members in fixed findings' files, by `id` with the `state` `list-member-problems` gives: `changed`
43
- when its text now differs from its baseline, or `locator_lost` or `unavailable` when the fix broke where this tool finds
44
- it, which its `repair_with` on `show-principle ID` repairs. Then re-audit that principle, or acknowledge a member's edit
45
- with `start-audit ID --member MEMBER`. A changed file no fixed finding names is not checked.
1
+ Gives your answer to request REQUEST_ID from its `response_template`. Pass a JSON FILE outside the project with
2
+ `--file FILE`; `--file -` reads stdin. This tool writes audit records at `.principles/audits/ID.json`, never member
3
+ guidance. In a full audit, make each fix after the assessment is accepted and before you submit the correction that
4
+ reports it; earlier fixes cause `stale_request` before an assessment's shape check. A completed full audit or
5
+ acknowledgement after an assessment/correction request causes `audit_completed_since_request`, protecting the newer
6
+ record and its findings: run `list-open-findings ID`, then start again. Keep `basis` unchanged;
7
+ `last_completed_revision` identifies its preceding record. An identical completed-answer retry writes nothing; an
8
+ assessment whose correction completed is refused.
46
9
 
47
- A fix changing a member's role or check with `change-member-role` or `change-member-check` lists its id, after any move,
48
- in `changed_map_entries`, which only a fixed disposition may list, and may leave `changed_members` empty. A fix mapping
49
- a missing member with `add-member` names it in `changed_members`. In git, this tool reads the map the audit began from
50
- and refuses with `stale_map` when anything else changed, a removal too, after any `moved_members`, and
51
- `claimed_change_missing` when a listed role and check are as they were; `files_to_commit` names the map. An added member
52
- gets no baseline: `members_added_awaiting_assessment` names it for the next full audit. Outside git, defer the finding:
53
- an entry is refused as `map_entries_need_git`, an added member as `stale_map`.
10
+ After prior request checks, a Git-based assessment/correction expires at a committed current-ID map gap on captured
11
+ HEAD's first-parent line (`stale_request`), even after identical recreation; start anew. Unrelated commits are allowed.
12
+ Unverifiable continuity (missing history/tree or base off that line) gives `git_history_unavailable`: restore complete
13
+ history/access or start a new audit on this branch. Requests with no Git base keep their existing behavior.
54
14
 
55
- For a `start-audit --member` request, `quote_not_found` refuses an `old_line` or `new_line` that is not a line only its
56
- side holds, or is "" where `first_changed_lines` is not; else it prints `acknowledged`, the record in `files_to_commit`.
15
+ An observed assessment may give `observed_at`, the sighting's UTC time (for example `2026-11-01T09:30:00Z`); absent or
16
+ null uses this audit's time. When the sighting is a dated record you read during this audit, `observed_at` is the
17
+ record's date, not when you read it. Wrong format, dates after the answer or any date on not_observed, even null,
18
+ cause `invalid_answer`. An observation judged afresh that copies the last audit word-for-word causes
19
+ `observation_repeats_last_audit` unless `observed_at` matches that sighting or is null. Keep its date for a retained
20
+ sighting; reword a later one, using null for this audit. Reworded text is not judged. An evidence/`recorded_at`
21
+ location refusal (such as `ambiguous_passage`) or `check_result` refusal (`invalid_check_result`) retains its code,
22
+ any `path` and repair, names whose evidence/check failed, and gives `fields` with each `problem` and JSON `pointer`
23
+ into your answer. `invalid_answer` names fields ending in another template's placeholder; use this template or reword
24
+ the ending. Set correction `action` to fixed, deferred, accepted or disagreed; else `invalid_disposition` names the
25
+ finding. A deferred disposition may give `waits_on`, one line naming whom it waits on and to decide what, printed by
26
+ `list-open-findings`. Null is allowed on any action; text on another action or multiple lines causes
27
+ `invalid_disposition`. The tool records when it was asked; never send that time. For a legacy prior finding,
28
+ `still_holds` may supply `first_raised_at` (that audit's `audited_at`) and `raised_in` (full commit sha) together.
29
+ Only that commit's `.principles/audits/ID.json` or earlier `.memeplex/audits/ID.json` is read; it must leave the same
30
+ finding deferred/accepted. Judge identity yourself. Refusals explain repairs: `raised_in_not_found` (also outside
31
+ git), `raised_in_unreadable`, `raised_in_lacks_finding`, `raised_in_time_differs`, `first_raised_not_earlier` (date
32
+ must precede stored time). Completed full audits list own/kept deferred or accepted IDs in `open_findings`,
33
+ fixed/resolved IDs in `resolved_findings`, and each closed prior finding's decision/reason in `prior_findings_closed`.
34
+ Disagreed/withdrawn findings are in neither open nor resolved. In git, `commits_since_base` lists commits touching
35
+ each member's file; uncommitted fixes have an empty list. `files_to_commit` lists their files; `commit_with` commits
36
+ only those, stopping during an unfinished merge. Replace its `-m` default as `commit_message_to_replace` says.
37
+ `cited_files_missing` lists missing cited files excluded from `files_to_commit`; record references remain. If HEAD
38
+ moved without touching a member, `head_moved_past_base` gives `base_commit` and `head`. If its fixes changed a file
39
+ another principle also maps, `other_principles_with_changed_members` names each such principle and its members in
40
+ fixed findings' files, by `id` with the `state` `list-member-problems` gives: `changed` when its text now differs from
41
+ its baseline, or `locator_lost` or `unavailable` when the fix broke where this tool finds it, which its `repair_with`
42
+ on `show-principle ID` repairs. Then re-audit that principle, or acknowledge a member's edit with `start-audit ID
43
+ --member MEMBER`. A changed file no fixed finding names is not checked. `correction_recovery` says what to retain
44
+ before fixes; see `show-answer-check --help` for unchanged-input Git replay.
45
+
46
+ In git, this tool reads the map at the audit base: fixed dispositions declare roles/checks in `changed_map_entries`,
47
+ text/additions in `changed_members`, removals in `removed_members`. `invalid_removed_members` rejects invalid removal
48
+ claims; `empty_correction_map` requires a survivor/replacement. Source files stay intact.
49
+ `claimed_change_missing` rejects unchanged entries; `members_added_awaiting_assessment` lack baselines.
50
+ Role/removal claims require git (`map_entries_need_git`). Full rules: correction question and `show-answer-check --help`.
51
+
52
+ For a `start-audit --member` request, `quote_not_found` refuses an `old_line` or `new_line` not a line only its side
53
+ holds, or "" where `first_changed_lines` is not, and one left out reads as printed; else it prints `acknowledged`.
@@ -0,0 +1,7 @@
1
+ Use these requested Markdown outlines to continue the survey; decide which files and rules matter to the task.
2
+ Non-Markdown files show their path and size alone, not their contents; open one only if needed.
3
+ Each inventory.unreadable entry gives the failed path and its repair; ignored files remain unread.
4
+ The whole result is budgeted. inventory.outlines_cut names files with shortened list items; their
5
+ `(N more, lines A-B)` entries give the lines to read if needed. inventory.outlines_left_out names files whose
6
+ outlines are omitted, so the request is incomplete. Run show-candidate-outlines with fewer paths to recover
7
+ needed outlines. If one file still exceeds the budget, read only the needed headings or line ranges from it.
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.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sidu Ponnappa
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-11-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 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.
@@ -39,9 +39,11 @@ files:
39
39
  - lib/principles/controllers/command.rb
40
40
  - lib/principles/controllers/correction.rb
41
41
  - lib/principles/controllers/full_audit_request.rb
42
+ - lib/principles/controllers/guidance_search_paths.rb
42
43
  - lib/principles/controllers/help.rb
43
44
  - lib/principles/controllers/inventory.rb
44
45
  - lib/principles/controllers/mapping.rb
46
+ - lib/principles/controllers/member_addition.rb
45
47
  - lib/principles/controllers/member_entries.rb
46
48
  - lib/principles/controllers/member_problems_report.rb
47
49
  - lib/principles/controllers/members_a_commit_changed.rb
@@ -49,22 +51,30 @@ files:
49
51
  - lib/principles/controllers/meta_principle_setup.rb
50
52
  - lib/principles/controllers/repoint.rb
51
53
  - lib/principles/controllers/running_tool.rb
54
+ - lib/principles/controllers/survey.rb
52
55
  - lib/principles/data/audit_files.rb
53
56
  - lib/principles/data/bounded_file.rb
54
57
  - lib/principles/data/candidate_files_found.rb
55
58
  - lib/principles/data/command-steps.json
56
59
  - lib/principles/data/command_steps_file.rb
60
+ - lib/principles/data/committed_tree.rb
57
61
  - lib/principles/data/expected_type.rb
62
+ - lib/principles/data/first_parent_log.rb
63
+ - lib/principles/data/first_parent_range.rb
64
+ - lib/principles/data/git_command.rb
65
+ - lib/principles/data/guidance_search_paths_file.rb
58
66
  - lib/principles/data/ignored_by_git.rb
59
67
  - lib/principles/data/json_text.rb
60
68
  - lib/principles/data/known_fields.rb
61
69
  - lib/principles/data/linked_path.rb
62
70
  - lib/principles/data/map_files.rb
63
71
  - lib/principles/data/principle_id.rb
72
+ - lib/principles/data/principles_directory.rb
64
73
  - lib/principles/data/principles_subfolder.rb
65
74
  - lib/principles/data/project_files.rb
66
75
  - lib/principles/data/project_root.rb
67
76
  - lib/principles/data/repository.rb
77
+ - lib/principles/data/requested_candidate_files.rb
68
78
  - lib/principles/data/running_version.rb
69
79
  - lib/principles/data/schema_check.rb
70
80
  - lib/principles/data/schemas/acknowledgement-answer.schema.json
@@ -74,12 +84,16 @@ files:
74
84
  - lib/principles/data/schemas/command-steps.schema.json
75
85
  - lib/principles/data/schemas/correction-answer-guide.schema.json
76
86
  - lib/principles/data/schemas/correction-answer.schema.json
87
+ - lib/principles/data/schemas/guidance-search-paths.schema.json
88
+ - lib/principles/data/schemas/member-map-history.schema.json
77
89
  - lib/principles/data/schemas/member-map.schema.json
78
90
  - lib/principles/data/schemas/repointing-answer.schema.json
91
+ - lib/principles/data/verified_head.rb
79
92
  - lib/principles/error.rb
80
93
  - lib/principles/invocation_options.rb
81
94
  - lib/principles/models/accepted_loading.rb
82
95
  - lib/principles/models/acknowledgement.rb
96
+ - lib/principles/models/acknowledgement_left_as_printed.rb
83
97
  - lib/principles/models/acknowledgement_refusal.rb
84
98
  - lib/principles/models/activation.rb
85
99
  - lib/principles/models/agent_loads.rb
@@ -92,14 +106,15 @@ files:
92
106
  - lib/principles/models/assessment_left_as_printed.rb
93
107
  - lib/principles/models/assessment_report.rb
94
108
  - lib/principles/models/audit.rb
109
+ - lib/principles/models/audit_entry_protecting_map.rb
95
110
  - lib/principles/models/audit_record.rb
96
111
  - lib/principles/models/audit_records.rb
97
112
  - lib/principles/models/audit_start.rb
98
113
  - lib/principles/models/audited_member_lines.rb
99
114
  - lib/principles/models/candidate_files.rb
100
115
  - lib/principles/models/candidate_inventory.rb
101
- - lib/principles/models/candidate_listing.rb
102
116
  - lib/principles/models/candidate_outline.rb
117
+ - lib/principles/models/captured_head.rb
103
118
  - lib/principles/models/carried_assessments.rb
104
119
  - lib/principles/models/carried_member.rb
105
120
  - lib/principles/models/check_since_last_audit.rb
@@ -112,6 +127,7 @@ files:
112
127
  - lib/principles/models/dated_line.rb
113
128
  - lib/principles/models/decided_prior_findings.rb
114
129
  - lib/principles/models/declared_map_changes.rb
130
+ - lib/principles/models/declared_member_removals.rb
115
131
  - lib/principles/models/disposition.rb
116
132
  - lib/principles/models/entry_file.rb
117
133
  - lib/principles/models/entry_files.rb
@@ -123,6 +139,8 @@ files:
123
139
  - lib/principles/models/first_raised_claim.rb
124
140
  - lib/principles/models/fix_only_fields.rb
125
141
  - lib/principles/models/frontmatter_fields.rb
142
+ - lib/principles/models/guidance_search_path.rb
143
+ - lib/principles/models/guidance_search_paths.rb
126
144
  - lib/principles/models/hook_commands.rb
127
145
  - lib/principles/models/ignored_candidates.rb
128
146
  - lib/principles/models/instruction_named.rb
@@ -137,6 +155,7 @@ files:
137
155
  - lib/principles/models/loaded_files.rb
138
156
  - lib/principles/models/loading_decision.rb
139
157
  - lib/principles/models/loading_facts.rb
158
+ - lib/principles/models/loading_scope.rb
140
159
  - lib/principles/models/loads_to_check.rb
141
160
  - lib/principles/models/locate_refusal.rb
142
161
  - lib/principles/models/located_text.rb
@@ -151,14 +170,18 @@ files:
151
170
  - lib/principles/models/member_hashes_as_written.rb
152
171
  - lib/principles/models/member_history.rb
153
172
  - lib/principles/models/member_lines.rb
173
+ - lib/principles/models/member_loading_scopes.rb
154
174
  - lib/principles/models/member_loads.rb
175
+ - lib/principles/models/member_mapping_run.rb
155
176
  - lib/principles/models/member_moves.rb
156
177
  - lib/principles/models/member_problems.rb
178
+ - lib/principles/models/member_region.rb
157
179
  - lib/principles/models/member_repair_moves.rb
158
180
  - lib/principles/models/member_sighting.rb
159
181
  - lib/principles/models/member_snapshots.rb
160
182
  - lib/principles/models/member_state.rb
161
183
  - lib/principles/models/members_elsewhere.rb
184
+ - lib/principles/models/members_in_consecutive_sections.rb
162
185
  - lib/principles/models/members_sharing_lines.rb
163
186
  - lib/principles/models/meta_principle.rb
164
187
  - lib/principles/models/missing_files.rb
@@ -174,8 +197,15 @@ files:
174
197
  - lib/principles/models/placement.rb
175
198
  - lib/principles/models/plain_text_file.rb
176
199
  - lib/principles/models/principle.rb
200
+ - lib/principles/models/principle_file_revision.rb
177
201
  - lib/principles/models/principle_history.rb
202
+ - lib/principles/models/principle_lineage.rb
203
+ - lib/principles/models/principle_map_revision.rb
204
+ - lib/principles/models/principle_mapping_history.rb
178
205
  - lib/principles/models/principle_members.rb
206
+ - lib/principles/models/principle_predecessor.rb
207
+ - lib/principles/models/principle_publication.rb
208
+ - lib/principles/models/principle_revision.rb
179
209
  - lib/principles/models/principles_folder_move.rb
180
210
  - lib/principles/models/principles_package.rb
181
211
  - lib/principles/models/prior_decision_fields.rb
@@ -205,15 +235,19 @@ files:
205
235
  - lib/principles/models/skill_loads.rb
206
236
  - lib/principles/models/still_holds_restatement.rb
207
237
  - lib/principles/models/submitted_answer.rb
238
+ - lib/principles/models/survey_search_paths.rb
208
239
  - lib/principles/models/template_placeholders.rb
209
240
  - lib/principles/models/text_size.rb
210
241
  - lib/principles/models/text_within.rb
211
242
  - lib/principles/models/unchecked_members.rb
243
+ - lib/principles/models/uncommitted_files.rb
212
244
  - lib/principles/models/uncommitted_outside_the_map.rb
245
+ - lib/principles/models/unknown_principle.rb
213
246
  - lib/principles/models/waits_on.rb
214
247
  - lib/principles/models/write_up_opening.rb
215
248
  - lib/principles/models/write_up_pointer.rb
216
249
  - lib/principles/models/write_up_repoint.rb
250
+ - lib/principles/positional_arguments.rb
217
251
  - lib/principles/prose_list.rb
218
252
  - lib/principles/session_start_options.rb
219
253
  - lib/principles/start_audit_options.rb
@@ -222,19 +256,24 @@ files:
222
256
  - lib/principles/views/acknowledged_since_last_audit.rb
223
257
  - lib/principles/views/acknowledgement_result.rb
224
258
  - lib/principles/views/activation_in_hand.rb
259
+ - lib/principles/views/added_member.rb
225
260
  - lib/principles/views/answer_head.rb
261
+ - lib/principles/views/answered_request.rb
226
262
  - lib/principles/views/assessed_members.rb
227
263
  - lib/principles/views/assessment_request.rb
228
264
  - lib/principles/views/audit_changes.rb
229
265
  - lib/principles/views/audit_commit.rb
230
266
  - lib/principles/views/audit_result.rb
231
267
  - lib/principles/views/candidate_files_result.rb
268
+ - lib/principles/views/candidate_outlines_result.rb
232
269
  - lib/principles/views/check_notes.rb
233
270
  - lib/principles/views/check_result_template.rb
271
+ - lib/principles/views/consecutive_sections_elsewhere.rb
234
272
  - lib/principles/views/correction_request.rb
235
273
  - lib/principles/views/diff_since_last_audit.rb
236
274
  - lib/principles/views/findings_result.rb
237
275
  - lib/principles/views/first_audit.rb
276
+ - lib/principles/views/guidance_search_paths_result.rb
238
277
  - lib/principles/views/help.rb
239
278
  - lib/principles/views/instruction.rb
240
279
  - lib/principles/views/invocation.rb
@@ -244,12 +283,14 @@ files:
244
283
  - lib/principles/views/loads_to_check_result.rb
245
284
  - lib/principles/views/map_added_to.rb
246
285
  - lib/principles/views/map_result.rb
286
+ - lib/principles/views/maps_needing_members_or_audit.rb
247
287
  - lib/principles/views/member_change_since_baseline.rb
248
288
  - lib/principles/views/member_repairs.rb
249
289
  - lib/principles/views/members_a_commit_changed.rb
250
290
  - lib/principles/views/members_with_no_baseline.rb
251
291
  - lib/principles/views/meta_principle_passage.rb
252
292
  - lib/principles/views/meta_principle_result.rb
293
+ - lib/principles/views/new_loading_scope.rb
253
294
  - lib/principles/views/one_member_check_result_template.rb
254
295
  - lib/principles/views/open_findings_elsewhere_result.rb
255
296
  - lib/principles/views/open_findings_line.rb
@@ -298,9 +339,13 @@ files:
298
339
  - lib/principles/views/prompts/assess-every-member/why-each-member-is-judged-again.md
299
340
  - lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json
300
341
  - lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md
342
+ - lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md
343
+ - lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md
301
344
  - lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-after-the-table.md
302
345
  - lib/principles/views/prompts/find-a-principle-to-map/ask-which-principle-to-map.md
346
+ - lib/principles/views/prompts/find-a-principle-to-map/choose-an-existing-or-new-principle.md
303
347
  - lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md
348
+ - lib/principles/views/prompts/find-a-principle-to-map/compare-with-mapped-principles.md
304
349
  - lib/principles/views/prompts/find-a-principle-to-map/leave-test-data-out-of-the-survey.md
305
350
  - lib/principles/views/prompts/find-a-principle-to-map/owner-ask-ignored-folders.md
306
351
  - lib/principles/views/prompts/find-a-principle-to-map/owner-ask-ignored.md
@@ -308,8 +353,10 @@ files:
308
353
  - lib/principles/views/prompts/find-a-principle-to-map/owner-ask-untracked.md
309
354
  - lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md
310
355
  - lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md
356
+ - lib/principles/views/prompts/find-a-principle-to-map/survey-a-later-range.md
311
357
  - lib/principles/views/prompts/find-a-principle-to-map/what-each-command-writes.md
312
358
  - lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md
359
+ - lib/principles/views/prompts/learn-what-a-command-does/add-guidance-search-path.md
313
360
  - lib/principles/views/prompts/learn-what-a-command-does/add-member.md
314
361
  - lib/principles/views/prompts/learn-what-a-command-does/change-activation.md
315
362
  - lib/principles/views/prompts/learn-what-a-command-does/change-description.md
@@ -322,15 +369,19 @@ files:
322
369
  - lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md
323
370
  - lib/principles/views/prompts/learn-what-a-command-does/list-principles.md
324
371
  - lib/principles/views/prompts/learn-what-a-command-does/move-member.md
372
+ - lib/principles/views/prompts/learn-what-a-command-does/remove-guidance-search-path.md
325
373
  - lib/principles/views/prompts/learn-what-a-command-does/remove-member-check.md
326
374
  - lib/principles/views/prompts/learn-what-a-command-does/remove-member.md
375
+ - lib/principles/views/prompts/learn-what-a-command-does/remove-principle.md
327
376
  - lib/principles/views/prompts/learn-what-a-command-does/select-the-project-root.md
328
377
  - lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md
329
378
  - lib/principles/views/prompts/learn-what-a-command-does/show-audit.md
379
+ - lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md
330
380
  - lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md
331
381
  - lib/principles/views/prompts/learn-what-a-command-does/show-principle.md
332
382
  - lib/principles/views/prompts/learn-what-a-command-does/start-audit.md
333
383
  - lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md
384
+ - lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md
334
385
  - lib/principles/views/prompts/repoint-write-ups/point-each-moved-write-up-at-its-new-place.md
335
386
  - lib/principles/views/prompts/report-after-a-commit/it-refused-after-the-commits-touched-the-maps.md
336
387
  - lib/principles/views/prompts/report-after-a-commit/others-are-still-listed.md
@@ -380,7 +431,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
380
431
  - !ruby/object:Gem::Version
381
432
  version: '0'
382
433
  requirements: []
383
- rubygems_version: 3.6.2
434
+ rubygems_version: 3.6.9
384
435
  specification_version: 4
385
436
  summary: Maps and audits agent guidance to catch harness drift and debt
386
437
  test_files: []
@@ -1,41 +0,0 @@
1
- # typed: strict
2
- # frozen_string_literal: true
3
-
4
- require_relative "candidate_files"
5
- require_relative "ignored_candidates"
6
-
7
- module Principles
8
- # The domain logic, and the mediation of persistence. models/CLAUDE.md owns the boundary.
9
- module Models
10
- # The inventory of candidate files as list-candidate-files lists it: the instruction files agent hosts load
11
- # by convention, the other files counted by directory, the listed files that look like test data, and in git
12
- # the ignored ones, unread, each folder git ignores counted once.
13
- class CandidateListing
14
- #: (Hash[String, untyped], text_of: ^(String) -> String) -> void
15
- def initialize(inventory, text_of:)
16
- @inventory = inventory
17
- @text_of = text_of
18
- freeze
19
- end
20
-
21
- #: () -> Hash[String, untyped]
22
- def to_h
23
- listed = @inventory.except("ignored", "ignored_ancestor_folders")
24
- .merge(files.listing(@inventory.fetch("possibly_test_data")))
25
- return listed unless @inventory.key?("ignored")
26
-
27
- listed.merge(IgnoredCandidates.new(paths: @inventory.fetch("ignored"),
28
- folders: @inventory.fetch("ignored_ancestor_folders")).listing)
29
- end
30
-
31
- # The outline of each listed file the survey reads, by path.
32
- #: () -> Hash[String, CandidateOutline]
33
- def outlines = files.outlines(@inventory.fetch("possibly_test_data"))
34
-
35
- private
36
-
37
- #: () -> CandidateFiles
38
- def files = CandidateFiles.new(@inventory.fetch("files"), text_of: @text_of)
39
- end
40
- end
41
- end