principles 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +151 -1
- data/README.md +10 -6
- data/exe/principles +1 -1
- data/lib/principles/cli.rb +9 -10
- data/lib/principles/command_line.rb +15 -6
- data/lib/principles/command_routes.rb +18 -2
- data/lib/principles/controllers/acknowledgement.rb +19 -4
- data/lib/principles/controllers/acknowledgements.rb +43 -12
- data/lib/principles/controllers/after_commit_report.rb +15 -2
- data/lib/principles/controllers/assessment.rb +7 -3
- data/lib/principles/controllers/audit.rb +17 -8
- data/lib/principles/controllers/audit_completion.rb +34 -9
- data/lib/principles/controllers/carrier_edit_report.rb +40 -0
- data/lib/principles/controllers/carrier_practices.rb +26 -0
- data/lib/principles/controllers/command.rb +36 -5
- data/lib/principles/controllers/context_budget.rb +61 -0
- data/lib/principles/controllers/correction.rb +15 -5
- data/lib/principles/controllers/full_audit_request.rb +38 -42
- data/lib/principles/controllers/inventory.rb +78 -71
- data/lib/principles/controllers/last_record_notice_beside.rb +51 -0
- data/lib/principles/controllers/member_addition.rb +20 -5
- data/lib/principles/controllers/member_entries.rb +50 -39
- data/lib/principles/controllers/member_entry_changes.rb +71 -0
- data/lib/principles/controllers/member_problems_report.rb +26 -6
- data/lib/principles/controllers/members_a_commit_changed.rb +14 -5
- data/lib/principles/controllers/members_in_logged_requests.rb +52 -0
- data/lib/principles/controllers/members_to_assess.rb +35 -8
- data/lib/principles/controllers/meta_principle_setup.rb +12 -4
- data/lib/principles/controllers/open_correction.rb +3 -2
- data/lib/principles/controllers/parts_to_read.rb +48 -6
- data/lib/principles/controllers/plugin_member_addition.rb +48 -0
- data/lib/principles/controllers/principle_listing.rb +84 -0
- data/lib/principles/controllers/request_logging.rb +65 -0
- data/lib/principles/controllers/running_tool.rb +55 -15
- data/lib/principles/controllers/session_start_report.rb +26 -2
- data/lib/principles/data/branches_bringing_in.rb +52 -0
- data/lib/principles/data/captured_requests.rb +118 -0
- data/lib/principles/data/carrier_page_markers.rb +38 -0
- data/lib/principles/data/changes_since.rb +56 -0
- data/lib/principles/data/claude_code_home.rb +75 -0
- data/lib/principles/data/command-steps.json +139 -23
- data/lib/principles/data/decoded_leaf.rb +63 -0
- data/lib/principles/data/head_reflog.rb +13 -2
- data/lib/principles/data/kept_line.rb +39 -0
- data/lib/principles/data/known_marketplaces.rb +50 -0
- data/lib/principles/data/logged_request_matches.rb +144 -0
- data/lib/principles/data/logged_request_scan.rb +188 -0
- data/lib/principles/data/map_files.rb +18 -4
- data/lib/principles/data/plugin_folder.rb +85 -0
- data/lib/principles/data/plugin_registry.rb +73 -0
- data/lib/principles/data/principles_store.rb +49 -0
- data/lib/principles/data/project_files.rb +15 -0
- data/lib/principles/data/ran.rb +25 -0
- data/lib/principles/data/raw_request_filter.rb +61 -0
- data/lib/principles/data/repository.rb +29 -27
- data/lib/principles/data/request_logging_folder.rb +135 -0
- data/lib/principles/data/request_shape.rb +33 -0
- data/lib/principles/data/running_version.rb +1 -1
- data/lib/principles/data/schemas/acknowledgement-answer.schema.json +16 -1
- data/lib/principles/data/schemas/acknowledgements-answer.schema.json +16 -1
- data/lib/principles/data/schemas/assessment-answer.schema.json +8 -0
- data/lib/principles/data/schemas/command-steps.schema.json +1 -1
- data/lib/principles/data/schemas/correction-answer-guide.schema.json +2 -1
- data/lib/principles/data/schemas/correction-answer.schema.json +14 -0
- data/lib/principles/data/schemas/member-map.schema.json +12 -1
- data/lib/principles/data/settings_env_keys.rb +26 -0
- data/lib/principles/data/string_counts.rb +39 -0
- data/lib/principles/data/tools_on_path.rb +25 -0
- data/lib/principles/data/user_request_logging_folder.rb +73 -0
- data/lib/principles/invocation_options.rb +5 -3
- data/lib/principles/launch.rb +29 -10
- data/lib/principles/models/acknowledged_check.rb +11 -1
- data/lib/principles/models/acknowledgement.rb +5 -0
- data/lib/principles/models/acknowledgement_refusal.rb +20 -11
- data/lib/principles/models/acknowledgements_to_offer.rb +86 -0
- data/lib/principles/models/after_commit_input.rb +5 -0
- data/lib/principles/models/answer_fields.rb +3 -0
- data/lib/principles/models/assessment_basis.rb +10 -3
- data/lib/principles/models/audit.rb +10 -10
- data/lib/principles/models/audit_record.rb +10 -0
- data/lib/principles/models/audit_records.rb +4 -3
- data/lib/principles/models/audit_start.rb +9 -0
- data/lib/principles/models/authored_locator.rb +33 -0
- data/lib/principles/models/candidate_files.rb +23 -3
- data/lib/principles/models/candidate_outline.rb +18 -125
- data/lib/principles/models/captured_sessions.rb +166 -0
- data/lib/principles/models/carrier_edit_input.rb +56 -0
- data/lib/principles/models/carrier_kind.rb +79 -0
- data/lib/principles/models/carrier_pages_shown.rb +28 -0
- data/lib/principles/models/carved_message_bytes.rb +115 -0
- data/lib/principles/models/cited_files.rb +12 -3
- data/lib/principles/models/context_parts.rb +59 -0
- data/lib/principles/models/decided_prior_findings.rb +5 -0
- data/lib/principles/models/declared_map_changes.rb +22 -13
- data/lib/principles/models/disposition.rb +37 -6
- data/lib/principles/models/disposition_placeholders.rb +12 -0
- data/lib/principles/models/disposition_text_field.rb +4 -0
- data/lib/principles/models/dropped_thinking.rb +73 -0
- data/lib/principles/models/feature.rb +54 -0
- data/lib/principles/models/finding_outcomes.rb +55 -0
- data/lib/principles/models/findings_left_open.rb +9 -11
- data/lib/principles/models/head_moves.rb +27 -10
- data/lib/principles/models/installed_component.rb +55 -0
- data/lib/principles/models/installed_plugins.rb +174 -0
- data/lib/principles/models/kept_sessions.rb +34 -0
- data/lib/principles/models/locator.rb +8 -0
- data/lib/principles/models/logged_request_reach.rb +52 -0
- data/lib/principles/models/logged_request_scan_completeness.rb +43 -0
- data/lib/principles/models/map_format_raise.rb +28 -0
- data/lib/principles/models/mapped_baseline.rb +46 -0
- data/lib/principles/models/mapped_principles.rb +2 -1
- data/lib/principles/models/maps_holding_file_whole.rb +42 -0
- data/lib/principles/models/markdown_text.rb +143 -0
- data/lib/principles/models/member.rb +19 -1
- data/lib/principles/models/member_entry.rb +56 -0
- data/lib/principles/models/member_justification.rb +52 -0
- data/lib/principles/models/member_lines.rb +11 -0
- data/lib/principles/models/member_loads.rb +17 -2
- data/lib/principles/models/member_problems.rb +46 -42
- data/lib/principles/models/member_reach.rb +59 -0
- data/lib/principles/models/member_snapshots.rb +34 -4
- data/lib/principles/models/member_text_as_sent.rb +31 -0
- data/lib/principles/models/member_texts.rb +45 -0
- data/lib/principles/models/members_by_part.rb +67 -0
- data/lib/principles/models/members_in_logged_requests.rb +279 -0
- data/lib/principles/models/meta_principle.rb +4 -4
- data/lib/principles/models/missing_files.rb +41 -16
- data/lib/principles/models/nearly_matching_maps.rb +56 -0
- data/lib/principles/models/open_correction.rb +5 -0
- data/lib/principles/models/open_finding.rb +4 -3
- data/lib/principles/models/outline_budget.rb +10 -1
- data/lib/principles/models/outline_item.rb +25 -0
- data/lib/principles/models/outline_section.rb +15 -4
- data/lib/principles/models/part_named.rb +16 -2
- data/lib/principles/models/part_token_estimates.rb +60 -0
- data/lib/principles/models/plugin_component.rb +37 -0
- data/lib/principles/models/plugin_enabled_in_project_settings.rb +61 -0
- data/lib/principles/models/plugin_install.rb +33 -0
- data/lib/principles/models/plugin_name.rb +23 -0
- data/lib/principles/models/plugin_reference.rb +53 -0
- data/lib/principles/models/principle.rb +7 -4
- data/lib/principles/models/principle_members.rb +22 -0
- data/lib/principles/models/prior_finding_decision.rb +1 -1
- data/lib/principles/models/prior_finding_outcomes.rb +12 -1
- data/lib/principles/models/problem_report.rb +14 -25
- data/lib/principles/models/project.rb +51 -56
- data/lib/principles/models/project_harness.rb +48 -0
- data/lib/principles/models/project_history.rb +19 -5
- data/lib/principles/models/recorded_members.rb +7 -0
- data/lib/principles/models/report_hooks.rb +9 -4
- data/lib/principles/models/request_channel.rb +62 -0
- data/lib/principles/models/request_kind.rb +62 -0
- data/lib/principles/models/request_logging.rb +231 -0
- data/lib/principles/models/request_logging_guard.rb +84 -0
- data/lib/principles/models/request_time.rb +46 -0
- data/lib/principles/models/runs_from.rb +0 -5
- data/lib/principles/models/script_comments.rb +58 -0
- data/lib/principles/models/session_registry.rb +61 -0
- data/lib/principles/models/session_start_input.rb +11 -2
- data/lib/principles/models/session_trend.rb +36 -0
- data/lib/principles/models/stale_request.rb +9 -0
- data/lib/principles/models/turn_opening.rb +83 -0
- data/lib/principles/models/turn_position.rb +43 -0
- data/lib/principles/models/unfixed_part.rb +82 -0
- data/lib/principles/models/unresolved_plugin_members.rb +35 -0
- data/lib/principles/models/user_logged_requests.rb +90 -0
- data/lib/principles/models/user_settings_entries.rb +49 -0
- data/lib/principles/models/whole_file_member_read.rb +48 -0
- data/lib/principles/models/without_prose.rb +20 -0
- data/lib/principles/models/workflow_jobs.rb +92 -0
- data/lib/principles/show_members_in_logged_requests_options.rb +27 -0
- data/lib/principles/show_principle_options.rb +32 -0
- data/lib/principles/version.rb +2 -2
- data/lib/principles/views/acknowledged_result.rb +31 -12
- data/lib/principles/views/acknowledgement_result.rb +18 -13
- data/lib/principles/views/acknowledgement_template_alone.rb +55 -0
- data/lib/principles/views/acknowledgements_offered.rb +54 -0
- data/lib/principles/views/added_member.rb +22 -6
- data/lib/principles/views/answer_in_a_file.rb +15 -15
- data/lib/principles/views/assessed_members.rb +19 -8
- data/lib/principles/views/assessment_request.rb +14 -6
- data/lib/principles/views/audit_changes.rb +14 -8
- data/lib/principles/views/audit_findings.rb +34 -0
- data/lib/principles/views/audit_result.rb +26 -24
- data/lib/principles/views/candidate_files_result.rb +1 -1
- data/lib/principles/views/carrier_checks.rb +40 -0
- data/lib/principles/views/carrier_edit_denial.rb +36 -0
- data/lib/principles/views/carrier_practices_page.rb +49 -0
- data/lib/principles/views/completed_audit_findings.rb +33 -0
- data/lib/principles/views/completed_audit_next_step.rb +12 -4
- data/lib/principles/views/consecutive_sections_elsewhere.rb +4 -0
- data/lib/principles/views/context_budget_result.rb +99 -0
- data/lib/principles/views/context_parts.rb +129 -25
- data/lib/principles/views/correction_request.rb +32 -17
- data/lib/principles/views/disposition_template.rb +35 -0
- data/lib/principles/views/first_audit.rb +29 -15
- data/lib/principles/views/first_audit_line.rb +4 -5
- data/lib/principles/views/hook_setup_result.rb +3 -1
- data/lib/principles/views/invocation.rb +14 -5
- data/lib/principles/views/last_record_notice.rb +41 -0
- data/lib/principles/views/lines_shared_with_member.rb +16 -22
- data/lib/principles/views/logged_request_status_meanings.rb +29 -0
- data/lib/principles/views/logged_requests_evidence.rb +84 -0
- data/lib/principles/views/map_added_to.rb +14 -12
- data/lib/principles/views/map_format_raised.rb +28 -0
- data/lib/principles/views/map_result.rb +41 -18
- data/lib/principles/views/maps_needing_members_or_audit.rb +1 -1
- data/lib/principles/views/member_change_since_baseline.rb +4 -0
- data/lib/principles/views/member_row.rb +13 -4
- data/lib/principles/views/member_sets_overlap.rb +31 -0
- data/lib/principles/views/members_a_commit_changed.rb +42 -25
- data/lib/principles/views/members_changed_during_audit.rb +27 -0
- data/lib/principles/views/members_in_logged_requests_result.rb +123 -0
- data/lib/principles/views/members_too_short_to_scan.rb +45 -0
- data/lib/principles/views/members_with_no_baseline.rb +6 -6
- data/lib/principles/views/meta_principle_result.rb +52 -15
- data/lib/principles/views/open_findings_line.rb +31 -92
- data/lib/principles/views/parts_index_result.rb +9 -5
- data/lib/principles/views/principle_read_result.rb +52 -11
- data/lib/principles/views/prior_findings_result.rb +9 -1
- data/lib/principles/views/problem_facts.rb +5 -3
- data/lib/principles/views/problem_lines.rb +54 -6
- data/lib/principles/views/problem_result.rb +7 -15
- data/lib/principles/views/prompts/assess-every-member/ask-whether-a-member-seen-only-as-read-is-loaded.md +3 -0
- data/lib/principles/views/prompts/assess-every-member/ask-whether-each-reason-holds.md +2 -0
- data/lib/principles/views/prompts/assess-every-member/claim-an-earlier-first-raised-at.md +6 -6
- data/lib/principles/views/prompts/assess-every-member/judge-the-keeping-against-the-other-principles.md +2 -0
- data/lib/principles/views/prompts/assess-every-member/read-a-compact-carried-member.md +9 -8
- data/lib/principles/views/prompts/assess-every-member/read-a-flagged-member-s-text-whole.md +3 -0
- data/lib/principles/views/prompts/assess-every-member/read-a-judged-member-s-text-whole.md +3 -0
- data/lib/principles/views/prompts/assess-every-member/turn-on-request-logging-to-see-what-reaches-context.md +2 -0
- data/lib/principles/views/prompts/assess-every-member/weigh-what-reached-the-context.md +7 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +6 -1
- data/lib/principles/views/prompts/dispose-of-each-finding/read-the-carrier-page-before-fixing.md +1 -0
- data/lib/principles/views/prompts/edit-a-carrier/read-the-page-before-the-first-edit.md +2 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md +1 -1
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-configuration.md +41 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-scripts.md +35 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-instruction-files.md +37 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-other-text-an-agent-reads.md +38 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-rule-files.md +34 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-skills.md +35 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-subagent-definitions.md +35 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +49 -51
- data/lib/principles/views/prompts/learn-what-a-command-does/change-member-name.md +12 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/change-member-reason.md +12 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/change-member-role.md +2 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md +1 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +1 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +32 -32
- data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +10 -11
- data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +7 -6
- data/lib/principles/views/prompts/learn-what-a-command-does/remove-logged-requests.md +22 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/remove-member.md +2 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/report-at-session-start.md +8 -4
- data/lib/principles/views/prompts/learn-what-a-command-does/report-before-carrier-edit.md +13 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-audit.md +7 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +8 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/show-carrier-practices.md +13 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-context-budget.md +69 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-hook-setup.md +4 -4
- data/lib/principles/views/prompts/learn-what-a-command-does/show-logged-requests.md +22 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-members-in-logged-requests.md +62 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md +13 -10
- data/lib/principles/views/prompts/learn-what-a-command-does/show-principle.md +16 -16
- data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +27 -27
- data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +17 -17
- data/lib/principles/views/prompts/learn-what-a-command-does/turn-off-request-logging.md +18 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/turn-on-request-logging.md +44 -0
- data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +3 -2
- data/lib/principles/views/prompts/read-what-reached-the-context/explain-request-logging-to-the-user.md +11 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/explain-user-request-logging-to-the-user.md +10 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/see-whether-members-reach-the-agent.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-a-thread-continuation-holds.md +3 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-absent-means.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-each-context-budget-line-says.md +4 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-each-member-line-says.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-not-a-carrier-means.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-present-but-not-loaded-means.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-present-means.md +1 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-unmeasurable-means.md +2 -0
- data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-audit-asks-to-acknowledge-or-audit-again.md +1 -0
- data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-mapping-commit-asks-for-an-audit.md +1 -0
- data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-pinned-asks-for-an-audit.md +1 -0
- data/lib/principles/views/prompts/report-after-a-commit/plugin-members-are-still-listed.md +1 -0
- data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members-waiting-on-an-upgrade.md +2 -2
- data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members.md +2 -2
- data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-what-each-needs-before-the-next-commit.md +1 -0
- data/lib/principles/views/prompts/run-a-first-audit-in-the-background/follow-the-brief.md +1 -0
- data/lib/principles/views/prompts/set-principles-up/ask-to-set-principles-up-after-an-audit.md +1 -0
- data/lib/principles/views/prompts/set-principles-up/entry-file-passage.md +1 -1
- data/lib/principles/views/prompts/set-principles-up/map-the-enabling-line-at-no-edit.md +3 -0
- data/lib/principles/views/prompts/set-principles-up/name-the-step-each-member-lacks.md +2 -2
- data/lib/principles/views/prompts/set-principles-up/place-the-passage-with-the-user.md +4 -2
- data/lib/principles/views/prompts/set-principles-up/what-the-passage-presumes.md +1 -1
- data/lib/principles/views/prompts/set-principles-up/why-set-principles-up.md +1 -0
- data/lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md +2 -1
- data/lib/principles/views/prompts/start-a-session/ask-to-set-principles-up.md +2 -0
- data/lib/principles/views/prompts/start-a-session/hand-the-first-audit-to-a-subagent.md +2 -3
- data/lib/principles/views/prompts/start-a-session/name-the-principles-nothing-checks.md +1 -0
- data/lib/principles/views/prompts/start-a-session/raise-the-open-findings-waiting-on-no-one.md +1 -0
- data/lib/principles/views/request_logging_result.rb +108 -0
- data/lib/principles/views/request_part.rb +10 -4
- data/lib/principles/views/request_parts.rb +9 -0
- data/lib/principles/views/set_up_offer_line.rb +43 -0
- data/lib/principles/views/whole_file_elsewhere.rb +30 -0
- metadata +154 -5
- data/lib/principles/views/prompts/report-after-a-commit/the-principles-skill-is-where-to-start.md +0 -1
- data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-each-one.md +0 -1
- data/lib/principles/views/prompts/set-principles-up/keep-them-held-between-audits.md +0 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc9eb3a41733a35a59cf92549d903b5ca30cf42b084dfb54246290b869305581
|
|
4
|
+
data.tar.gz: 38c90caf956f52edf5c81b88840c476c94e21cf2ee710ea042bded8665578992
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a02354af85a5b704dc73ebae2b2ddd5e82ca61a81ad1bd0c16d496c7ab0dd488b7852302be074c507734361f46bcf80bdff2336f7c430de921c1e2a419d5431
|
|
7
|
+
data.tar.gz: 75e515013dd56a892e2fdbdac2d612455933b7d5800efbb3c8122388d962afa57f3caa3474b3bc0f732f42aba1443f03c722ce01e81633e557eacbaaccaf1aa8
|
data/CHANGELOG.md
CHANGED
|
@@ -8,11 +8,161 @@ Write each entry for the person deciding whether to upgrade: whoever runs agents
|
|
|
8
8
|
2. Then say how they get it, naming the command or option they or their agent will use.
|
|
9
9
|
3. Give the measured effect as a plain comparison, such as "about a tenth of the bytes" or "one answer instead of one per principle", where the change or its commits measure it.
|
|
10
10
|
|
|
11
|
-
The agent's mechanics are the means, never the lead: do not open with "An agent no longer…". Leave refusal codes, field names and JSON shapes to the help text unless the reader must act on one; mark a breaking change "**Breaking:**", before or after the lead, and say what to change. Word a change with no user-visible effect for contributors. Claim only value the change or its commits show; never invent it. At release, use the actual version and `YYYY-MM-DD` date; never infer publication from a version bump. Preserve released history.
|
|
11
|
+
The agent's mechanics are the means, never the lead: do not open with "An agent no longer…". Leave refusal codes, field names and JSON shapes to the help text unless the reader must act on one; mark a breaking change "**Breaking:**", before or after the lead, and say what to change. Word a change with no user-visible effect for contributors. Claim only value the change or its commits show; never invent it. At release, use the actual version and `YYYY-MM-DD` date; never infer publication from a version bump. At the cut, each lead maps to a passed claim in the release file, `releases/<version>.md`, which is not published, or the lead is cut. Preserve released history.
|
|
12
12
|
-->
|
|
13
13
|
|
|
14
14
|
## Unreleased
|
|
15
15
|
|
|
16
|
+
## [0.1.5] - 2026-11-30
|
|
17
|
+
|
|
18
|
+
**0.1.5: know which of your principles actually reach your agent.** Until now, a rule your agent merely opened looked exactly like one Claude Code loads into every turn, so a principle could look covered when it never reached the agent. 0.1.5 tells the two apart, shows what each turn's context is spent on, and asks every place a principle lives why it is there.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **See whether a principle's text was loaded by Claude Code or only read by your agent.** `principles show-members-in-logged-requests` counts how each place's text arrived, such as `system 1, reminder 40, tool_result 3`: `system` and `reminder` mean Claude Code loaded it, `tool_result` means your agent read it. It lists places in the order their requests were sent, and labels each request a turn's first, a mid-turn request, a side request such as the summary while you're away, or unclassified, so a principle absent from a side request no longer reads as one that failed to load. While your requests are logged, a full audit names each place your agent only read and asks whether Claude Code really loads it. A mid-turn request is logged with only what it added, so a principle absent there tells you nothing, and a `system` count can include text your agent quoted from another agent's report.
|
|
23
|
+
|
|
24
|
+
- **See where your context goes before your agent does any work.** `principles show-context-budget` splits the first request of each turn into the system prompt, tool definitions, reminders and conversation, and shows how much of it your principles take; `--short` gives one line a session. It reads your whole request log, so it is slow on a big one: about 45 seconds on our log of 13,077 files.
|
|
25
|
+
|
|
26
|
+
- **Turn request logging on once, in your own settings, instead of with a flag on every launch.** `principles turn-on-request-logging --for-user` prints the lines to add to your own Claude Code settings, once your agent has asked you, and never writes them itself; other projects' requests are deleted when a session next starts in a project that uses `principles`. We have not yet checked it from the Desktop app or a signed-in launch, and an install without the plugin's hooks keeps no sessions.
|
|
27
|
+
|
|
28
|
+
- **Once an audit has shown it's worth it, your agent offers to keep your principles checked between audits.** A completed full audit asks your agent to put the question to you, with the reason: where no `principles` hook is wired, nothing notices an edit to a file a principle depends on until the next audit. Until you set it up, each new session adds one line of under 200 bytes while the plugin's hooks run; a gem-only install, or a project with nothing mapped, gets no such line.
|
|
29
|
+
|
|
30
|
+
- **Your agent reads how to write a kind of file before it first edits one.** The plugin's new hook stops your agent's first edit of a `CLAUDE.md`, rule, skill, subagent or hook once for each of those kinds in a session, with a short reason pointing at `principles show-carrier-practices KIND`, then lets the retry through. `principles show-hook-setup` gives the same hook to a project without the plugin. We saw this by running the hook directly, not yet in a live Claude Code session.
|
|
31
|
+
|
|
32
|
+
- **Every place a principle lives is now asked why it is there.** `principles add-member` refuses a new member without a short `--name` and a `--reason`: when that file puts the principle in front of your agent, and what would prove that wrong. Each full audit asks whether every reason still holds and every place earns its bytes; we have not yet seen one catch a wrong reason. **Breaking:** scripts that call `add-member` must pass both, and 0.1.4 or earlier refuses a map that carries a name or reason, asking you to upgrade, so upgrade every copy that reads it first.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **`principles list-member-problems --short` says what each row needs.** Before its commands, it prints a line for each kind of row it shows, saying which to acknowledge and which to audit again.
|
|
37
|
+
|
|
38
|
+
- **The plugin's skill no longer sends your agent to a file kind the command refuses.** Its checklist named a `hook` kind that `show-carrier-practices` rejects; it now names `hook_configuration` and `hook_script`, and its always-loaded description drops a word the reader could not unpack.
|
|
39
|
+
|
|
40
|
+
- **A teammate without `principles` is no longer told to run it.** The passage `principles show-meta-principle-passage` proposes for your `CLAUDE.md` asks for its checks only where `principles` can run and none of its hooks is wired, a checkout included.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **Commands `principles` prints work when pasted, even under Bundler.** Run from a checkout with `bundle exec`, the commands it prints now start with `BUNDLE_GEMFILE=… bundle exec`, so a fresh shell runs them as you did.
|
|
45
|
+
|
|
46
|
+
## [0.1.4] - 2026-11-28
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- **Request logging gets a folder git ignores before anything is written there, so a captured request, which holds the session's whole context, cannot be committed by mistake.** `principles turn-on-request-logging` sets up `.principles/request-logging/`, refusing and leaving nothing behind when git cannot confirm it ignores that folder, writes the launch file that asks Claude Code to write each request it sends there, and prints the `claude --settings` line to start it with, and the same line with `--resume` to keep your conversation; `principles turn-off-request-logging` empties it again and keeps every logged request. `principles show-logged-requests` shows each captured session's requests, files and bytes, the request files its index does not name, and when the newest request was written. A logged request holds your account email as well as the session's context. Claude Code writes each file readable by other local users, so the folder is made readable only by you. The result includes `explain_to_user`, a paragraph your agent gives you before you relaunch: what is logged, who can read it, its disk use, and how to clean up or turn it off. Known limit: scanning the logged requests takes longer as the log grows, about 17 s for one audit part at 3,300 requests, so prune it with `principles remove-logged-requests`.
|
|
51
|
+
|
|
52
|
+
- **Filling in a full audit's recent decision costs a few hundred bytes of context, not the whole audit record.** `principles show-audit ID --findings` prints the record's findings with its status, base commit and date, and those of the last completed audit an open record keeps, leaving out every member's assessment: 714 bytes instead of 17,826 for one record in this project.
|
|
53
|
+
|
|
54
|
+
- **A finding your agent fixes only in part is recorded as fixed, with the rest kept open, so the next audit does not judge the fixed half again.** In a correction, a fixed disposition may give `unfixed_part`: the problem still left, deferred or accepted with its reason. The audit record keeps the finding fixed and raises that part as a new finding of the same members, where before the whole finding had to be deferred. An unfixed part whose problem or reason is blank, or left as the correction's question prints it, is refused with the field to write, so no empty finding is recorded.
|
|
55
|
+
|
|
56
|
+
- **The members a large audit must judge are listed in one call, with no script to write.** `principles start-audit ID --part judged_members` prints the id of each member the audit judges, one a line, rather than leaving the agent to pull them out of the index, where each one's verdict sits on the line after its part.
|
|
57
|
+
|
|
58
|
+
- **See which of your principles' text actually reached the agent, rather than what was predicted to.** `principles show-members-in-logged-requests` scans the logged requests with `jq` and `rg`, opens with how many members have each status and what each status means, then gives each mapped member's reach: how many requests held its lines, its most bytes in one and the segments they were in, within a tool result on this project's 2,464 requests (`--short` prints one line a member). A member moved since it was mapped is named where it is now, beside the key it was mapped under. While requests are logged, `principles list-member-problems` names each member too short to find in one, with the `move-member` that widens it, so no member stays unmeasurable unnoticed. `--places`, or `--member KEY` for chosen members, reports where its lines were seen: the request, its `query_source`, the place in the request, the share of the member's lines there and their bytes. It prints no text from a request, refuses while the request-logging folder is not ignored by git, and asks you to install `jq` or `rg` when either is missing. A request it cannot read through is named with its reason rather than read in part or counted as holding nothing, and an empty string in a request no longer hides every string after it from the scan. A member that is a skill's frontmatter description is measured by its value, as the host lists it, so it no longer reads `absent` beside the host's own listing of that skill. It also says whether it read every captured request through, how many requests were `captured`, unreadable ones included, and how many strings it read, so a member reported absent is trusted only when the scan is complete; a full audit's `requests` and each `seen_in` count only the requests read through. Each place counts every occurrence of a member's lines and gives the byte offset of each, so text sent twice in one request shows its cost twice. The scan runs in well under half the time it took: 18 s instead of 42 s on this project's 971 captured requests.
|
|
59
|
+
|
|
60
|
+
- **A full audit now shows whether each of a principle's members reached the agent, and what it cost there. A principle whose text never loads, or loads into every request, is caught at the audit.** Once requests are logged, `principles start-audit ID` prints, for each member its request lists, those carried forward from the last audit marked `carried_forward`, how many captured requests held its text and the most bytes one request held, and asks your agent to weigh both. Until any is captured, it names `principles turn-on-request-logging`. The project's first completed full audit names it too, for your agent to offer you. A missing `jq` or `rg`, or a request-logging folder git might commit, is stated without stopping the audit. The part costs about 600 bytes plus about 120 per member, measured on this project's largest audit request. Its `detail_with` leads to one member's places with `show-members-in-logged-requests --member KEY`.
|
|
61
|
+
|
|
62
|
+
- **Old logged requests stop filling the disk and keeping stale copies of whole sessions' context.** `principles remove-logged-requests` deletes the request and response files the request index names for every captured session but the newest five, or as many as `--keep-sessions N` says. It also deletes request files the index does not name once they are older than every kept session's files. It keeps the index, the launch file and any file a kept session also names, and refuses before deleting anything while git does not ignore the folder.
|
|
63
|
+
|
|
64
|
+
- **Fixes to a `CLAUDE.md`, rule, skill, subagent or hook follow that kind of file's own practices, so a fix can leave the file leaner rather than heavier: in this project, one rule that loads on every code read fell from 917 to 544 bytes.** `principles show-carrier-practices KIND` prints a page of a few kilobytes for one kind of carrier, distilled from realfast's guides and marked by the host each point holds for, and nothing else: no note of its source guide or version, which an agent reading it could not act on. A full audit's `start-audit` request names, once for each kind its members are in, a short check of that kind's practices and its page's size, and once for them all the command that prints a page, beside the question rather than in it, so carried assessments still carry. The correction request that follows an assessment with findings names the checks for its findings' members' kinds, before the edit.
|
|
65
|
+
|
|
66
|
+
- **A rule your project carries in CI, a script or a hook is found by the survey, not only those under Markdown headings.** `principles show-candidate-outlines PATH...` outlines a requested GitHub Actions workflow by its jobs and steps, and a script by its `#` comment lines, where each says the rule it enforces, within the survey's byte budget.
|
|
67
|
+
|
|
68
|
+
- **A hub file mapped whole into several principles is caught as it is mapped, not after every edit to it has reopened each one.** When `principles add-member` maps a whole file that other principles already hold whole, by its path or a link, or makes two maps' members nearly the same (two or more shared, and at least two thirds of all their members), it names them and asks whether each should hold only the passages that carry it or the principles are one, to be joined.
|
|
69
|
+
|
|
70
|
+
- **One member can be recalled in one call.** `principles show-principle ID --member M` prints that member alone: its role, place, check, lines, freshness, last assessment and any acknowledgement since, about a sixteenth of the whole principle's output on a large one.
|
|
71
|
+
|
|
72
|
+
- **A rule your project relies on from an installed Claude Code plugin is now held with your own, so a plugin update that changes it is caught and audited instead of drifting unseen.** `principles add-member ID PATH --plugin NAME@MARKETPLACE --role ROLE` maps a file inside an installed plugin, read-only, pinning the text it had. `list-member-problems` lists it as changed only when its text changes, not on every version bump, and a full audit then judges it with the project's own members; a fix is made on the project's side, never in the plugin. Where a teammate lacks the plugin, its members are reported as unresolved with the reason and the rest of the project's principles still report. After a commit, the report counts such a member apart, as one no commit changes. `add-member --plugin` maps a whole file and refuses `--query`, `--section`, `--starting-at` and `--ending-at`; only a user-scope plugin install is read outside its own project.
|
|
73
|
+
|
|
74
|
+
### Changed
|
|
75
|
+
|
|
76
|
+
- **A completed audit's result and default commit subject now say which findings wait on a decision and which the owner accepted.** `principles submit-answer` lists them as `deferred_findings` and `accepted_findings`, and its default commit subject reads "N resolved, N deferred, N accepted", where both were counted together as open. **Breaking:** anything reading `open_findings` from a completed result reads those two fields instead.
|
|
77
|
+
|
|
78
|
+
- **Deciding whether an earlier finding still holds takes one read, not two.** A full audit's `principles start-audit ID` now gives each prior finding's reason beside its action, which for an accepted finding is the owner's ruling, where before the agent ran `principles show-audit ID --findings` to find it. It costs the reason's own bytes: 292 on a request of about 29 KB with two accepted findings in this project.
|
|
79
|
+
|
|
80
|
+
- **For contributors: a command that deletes files cannot ship without naming them.** The build now fails when any `remove-` command leaves a file it deleted out of its `removed` list, so your agent can check what was deleted rather than trust the command's name.
|
|
81
|
+
|
|
82
|
+
- **A full audit no longer prints the whole text of a large file it is not judging.** `principles start-audit ID --part members/ID` gives a whole-file member the audit carries forward a `text_part` instead: the command that prints its text and that text's size, so the agent reads it only if it chooses to, or, when a fact says to judge it again, reads it whole if it does. On this project's largest member that part fell from about 52 KB to under 6 KB. A whole file the audit judges names the same part and says to read it whole as a step of the judgement; when its text changed, its part shows only the changed lines, not the whole file again, and leaves even those out once they would pass half the file.
|
|
83
|
+
|
|
84
|
+
- **A deferral raised again keeps where it waits.** A correction template for a finding raised again from an earlier deferral starts with that deferral's recorded time and who it waits on, so they are not retyped.
|
|
85
|
+
|
|
86
|
+
- **Editing a map prints only what changed.** `principles move-member` and `principles change-member-role` print the changed member, not the whole map, about a tenth of what they printed on a large principle. `principles remove-member` prints the id it removed and how many members are left, where it printed every remaining member: 7.9 KB on a 17-member principle.
|
|
87
|
+
|
|
88
|
+
- **An acknowledgement's repair is the step that clears it.** A `check_result` on a member with no check is refused with a repair that removes it, and `principles list-member-problems --short` says to acknowledge last a member whose check is that command itself, naming only the members to settle first.
|
|
89
|
+
|
|
90
|
+
- **An open correction is resumed, not started over.** `principles start-audit ID` on a principle whose correction is still open names `principles show-open-correction ID` as the way back to it.
|
|
91
|
+
|
|
92
|
+
- **An acknowledgement can be filled with no script.** `principles start-audit ID --member M --as template` shows each member's role beside its slot and the exact `submit-answer` command for the answer.
|
|
93
|
+
|
|
94
|
+
- **A session with the plugin runs the member check once, not twice.** The passage `principles show-meta-principle-passage` proposes for CLAUDE.md and AGENTS.md now says it is for installs without the principles hooks.
|
|
95
|
+
|
|
96
|
+
- **A shell call that commits nothing no longer starts Ruby.** The plugin marks each Bash call before it runs, and after it checks in the shell alone whether HEAD moved, in about 10 ms, starting `principles` only when it did.
|
|
97
|
+
|
|
98
|
+
- **A member whose file is only on another local branch is not pushed toward removal.** When a missing file is on a local branch not yet merged, `principles list-member-problems` names that branch and offers to keep the member until it merges.
|
|
99
|
+
|
|
100
|
+
- **A deferral recorded with no write-up learns it may point at an issue.** Its repair names both forms, `{"url": …}` and `{"path": …, "heading": …}`.
|
|
101
|
+
|
|
102
|
+
- **A prior finding can be decided from the audit template alone.** `principles start-audit ID --as template` shows each prior finding's problem beside its decision.
|
|
103
|
+
|
|
104
|
+
- **An acknowledgement says which findings it leaves open.** After one is accepted, for one member, several, or one across principles, its result names the open findings on those members and the full audit that decides them.
|
|
105
|
+
|
|
106
|
+
- **`principles add-member --help` says what a check's exit status means:** a `--check` passes when it exits 0 and fails on any other exit.
|
|
107
|
+
|
|
108
|
+
- **`principles add-member --help` gives its flags right after what the command does,** not after four thousand bytes of explanation.
|
|
109
|
+
|
|
110
|
+
- **`principles show-principle` leaves out when each member file loads unless asked with `--loads`,** about a sixth shorter on a large principle.
|
|
111
|
+
|
|
112
|
+
- **No hook setup is offered before a principle is mapped.** `principles show-meta-principle-passage` makes that offer only once a map exists.
|
|
113
|
+
|
|
114
|
+
- **A missing file costs its repair once.** `principles list-member-problems` gives a missing file's repair beside the file, not again on every member it held.
|
|
115
|
+
|
|
116
|
+
- **Each session starts with shorter, clearer lines from `principles`, each with one thing to do, and your agent stops raising at every session start open audit findings it could act on itself.** The open-findings line `principles report-at-session-start` prints says to act on each finding that waits on the agent, such as its own session, a task or a ticket, and to raise in its first reply only those that wait on a person or on no one; it counts the same findings after a resume as at startup, and no longer prints git's `user.name`. The first-audit line asks once to hand the audit to a background subagent, at about two thirds of its length, and the after-commit line names only `principles list-member-problems --short` to run before the next commit.
|
|
117
|
+
|
|
118
|
+
- **Mapping a file other principles' members already share costs nearly a quarter less context.** `principles add-member` says once what an edit reaches when members elsewhere span or lie within the new member's lines, rather than once for each of them, since `mapped_elsewhere` already names each: mapping a script eleven other members share printed 7,367 bytes instead of 9,625. When one add both maps a file other principles hold whole and makes two maps' members nearly the same, it asks whether to scope or join them once, not twice in a row.
|
|
119
|
+
|
|
120
|
+
- **The commands that log each request name what they do: Claude Code logs the requests, and `principles` only switches its logging and reads what it wrote.** They are `principles turn-on-request-logging`, `turn-off-request-logging`, `show-logged-requests`, `show-members-in-logged-requests` and `remove-logged-requests`, and they write only in `.principles/request-logging/`, whose launch file is `settings.json`. No release shipped their earlier context-snapshot names. **Breaking:** if you turned capture on running `principles` from source, run `principles turn-on-request-logging` again and relaunch with the `claude --settings` line it prints, which names the new settings path; to keep earlier captures, first `mv .principles/context-snapshots .principles/request-logging` and rename `capture-settings.json` in it to `settings.json`. **Breaking** for a reader of `show-members-in-logged-requests`' JSON from source: its completeness count `requests` is now `captured`, and by default it prints each member's reach, with places only under `--places` or `--member KEY`.
|
|
121
|
+
|
|
122
|
+
- **A full audit's request, part by part, and submit-answer no longer wait on the scan of captured requests.** Only the whole request, its `logged_requests` part and its index read them; `start-audit ID --part question`, `--as template` and `submit-answer` take about a second here instead of five.
|
|
123
|
+
|
|
124
|
+
### Fixed
|
|
125
|
+
|
|
126
|
+
- **A completed audit that changed nothing no longer sends your agent into a second full audit.** The result of `principles submit-answer` asks for the principle's audit again only when one of its members changed during the audit, where before every completed result ended with that request.
|
|
127
|
+
|
|
128
|
+
- **Adding the first keeping member to a project that already maps its own principles now leads straight to the keeping audit, instead of sending your agent back to find a first principle.** `principles add-member sticking-to-your-principles` ends with the `start-audit` command for it whenever another principle is mapped, as `show-meta-principle-passage` already did; a project with no other principle still hears to map one first.
|
|
129
|
+
|
|
130
|
+
- **An answer saved where a request said still submits after a commit lands in between.** The file `start-audit` and `show-open-correction` name for an answer is now named by its principle and phase alone, so a request printed again after HEAD moved, with a new request id, saves to and submits from the same file as the first.
|
|
131
|
+
|
|
132
|
+
- **The after-commit report no longer says a shell call made commits it did not make.** It now says the members it names changed since their last record, which stays true when it repeats a commit made just before a call that committed nothing.
|
|
133
|
+
|
|
134
|
+
- **Two members checked by `list-member-problems --short` in different principles no longer block each other.** It offers them as one acknowledgement across their principles, last, which can pass.
|
|
135
|
+
|
|
136
|
+
- **A crash at session start is no longer reported as a missing Ruby.** The session-start hook names the exit status and the command that shows the error, and asks for Ruby only when none was found or it is too old.
|
|
137
|
+
|
|
138
|
+
- **A commit in a scratch clone no longer raises a member notice.** The after-commit hook reports only commits in the session's project and its worktrees, not in any other repository a shell call commits in.
|
|
139
|
+
|
|
140
|
+
- **A large audit read part by part keeps one request and one answer file while other work lands.** The request id of `principles start-audit ID` and its `--part` calls now changes only when a commit changes the map or a file the audit reads, not on every commit.
|
|
141
|
+
|
|
142
|
+
- **A part name copied from the audit index works as printed.** `principles start-audit ID --part NAME` now accepts a name exactly as `--part index` prints it, quotes and all, so a name with spaces is no longer refused.
|
|
143
|
+
|
|
144
|
+
- **The `principles` skill no longer asks to be loaded after every commit to a mapped file.** Its always-loaded description drops that trigger, leaving `principles list-member-problems --short` as the one step after a commit, and is 41 bytes shorter.
|
|
145
|
+
|
|
146
|
+
- **One command to start a principle's first audit, not two.** Before a principle's first full audit, `principles list-member-problems --short` no longer also prints a second line asking for a full audit of its changed members.
|
|
147
|
+
|
|
148
|
+
- **A passage of a YAML file mapped by an indented key gets an id you can type and read.** `principles add-member --starting-at` quoted with a leading indent, such as `" gate:"`, stores the opening without it when the rest still names one place, so the member's id is `ci.yml@gate:` rather than one with two hidden spaces; members already mapped keep their ids.
|
|
149
|
+
|
|
150
|
+
- **A rule written as a script's comment can be mapped from its outline in one step.** `principles show-candidate-outlines` prints each whole-line comment of a script or hook in full, where it cut each at about 60 characters, so a line could not be quoted as `--starting-at` without opening the file. Its question no longer says such files show their path and size alone, and a Ruby file's magic comments, such as `frozen_string_literal`, are left out. Past 20 comments or list items under a heading, the outline says which lines hold the rest, as it already did for the outlines the byte budget cut, so the agent reads only those lines instead of the whole file. Such an outline is named under `outlines_cut` too, where before only an outline the byte budget cut was, so a shortened outline is never taken for the whole.
|
|
151
|
+
|
|
152
|
+
- **`principles move-member --help` says that `--ending-at` alone is refused, so your agent gives the passage's opening again instead of learning it from the refusal.**
|
|
153
|
+
|
|
154
|
+
- **Audit answers land in your project's ignored `tmp/` folder whenever git ignores what is saved there, not only when it ignores the folder itself.** A project whose `.gitignore` ignores `tmp/`'s contents but tracks a file inside it, such as `/tmp/*` beside a tracked note, had its answers sent to the system temporary folder; `principles` now asks git about the answer file's own path.
|
|
155
|
+
|
|
156
|
+
- **An acknowledgement's answer file keeps one path, so a saved answer is not left behind under another name.** `principles start-audit ID --member …` names it `principles-ID.acknowledgement-answer.json` for one member or several, where several members' requests said `acknowledgements`.
|
|
157
|
+
|
|
158
|
+
- **An agent filling a full audit's answer on its own knows why each member is judged afresh rather than carried.** `principles start-audit ID --as template` now names each fresh member's `judge_because`, such as `text_changed` or `not_assessed_before`, in its slot, as the whole request already did: about 30 bytes a judged member. The answer may send it back or drop it.
|
|
159
|
+
|
|
160
|
+
- **A fix to a member's role or check is declared on the first try, not after a refusal.** The correction that `principles submit-answer` prints now shows `changed_map_entries` in its answer guide and in each finding's template, the field the refusal of an undeclared map change asks for.
|
|
161
|
+
|
|
162
|
+
- **A clean check now says so, so your agent no longer mistakes silence for a run that failed to print.** When `principles list-member-problems --short` has nothing to report, it prints one line on stderr, such as `Nothing changed (131 members).`, about 30 bytes instead of none; stdout stays empty for a hook or script that acts on its rows, and the session-start output is unchanged.
|
|
163
|
+
|
|
164
|
+
- **`principles list-member-problems --help` states that it exits 0 while a newly added member waits for its first commit,** as when a change waits on an upgrade or its plugin is unresolved, so a hook or script reading its exit status knows what 0 means.
|
|
165
|
+
|
|
16
166
|
## [0.1.3] - 2026-11-24
|
|
17
167
|
|
|
18
168
|
### Changed
|
data/README.md
CHANGED
|
@@ -6,20 +6,22 @@
|
|
|
6
6
|
|
|
7
7
|
**Tighter harness, longer running agents: trust the principles, loosen the supervision.**
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Every time your agent goes off the rails, you add a line somewhere. A rule in `CLAUDE.md`. A note in a skill. A check in a hook. A few days in, the same rule lives in five places, worded five slightly different ways, and nobody, not you and not your agent, knows which one wins.
|
|
10
|
+
|
|
11
|
+
So you're forced to always watch your agent, because you can't trust it. That's harness drift.
|
|
10
12
|
|
|
11
13
|
https://github.com/user-attachments/assets/8bd9d6cb-893e-4422-86f0-ecad91af5aa9
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
`principles` gives your agent a map of every place each of its operating principles lives: `CLAUDE.md` and `AGENTS.md`, rule files, skills, subagents and hooks. When any of those places changes, it tells your agent which principle is affected and has it read them together, settle what disagrees and record the result. The CLI keeps the books; your agent does the judging. You do less babysitting.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
## Who is this for?
|
|
16
18
|
|
|
17
19
|
You'll get the most from it when:
|
|
18
20
|
|
|
19
|
-
- a team of people and their agents use the same harness and repo to do their work and need to establish shared
|
|
20
|
-
- your agents _need_ to run for long stretches, and need their operating principles reinforced consistently across CLAUDE.md
|
|
21
|
+
- a team of people and their agents use the same harness and repo to do their work, and need to establish shared SOPs that all of them follow;
|
|
22
|
+
- your agents _need_ to run for long stretches, and need their operating principles reinforced consistently across `CLAUDE.md`/`AGENTS.md`, rules, skills, subagents, hooks and all the rest of the context management vectors a harness provides.
|
|
21
23
|
|
|
22
|
-
If your project has a single `CLAUDE.md` at its root, `principles` is overkill. You can read that one file and keep it consistent yourself. Come back when your rules start to spread.
|
|
24
|
+
If your project has a single `CLAUDE.md` or `AGENTS.md` at its root, `principles` is overkill. You can read that one file and keep it consistent yourself. Come back when your rules start to spread.
|
|
23
25
|
|
|
24
26
|
Here is one of *realfast*'s projects, where an agent answers which principles are in place, how many places carry each, and which findings are still open:
|
|
25
27
|
|
|
@@ -27,6 +29,8 @@ Here is one of *realfast*'s projects, where an agent answers which principles ar
|
|
|
27
29
|
|
|
28
30
|
## Install
|
|
29
31
|
|
|
32
|
+
Claude Code is fully supported. Codex is mostly supported and Pi is coming soon.
|
|
33
|
+
|
|
30
34
|
In Claude Code, add this repository as a plugin marketplace, install the plugin, reload your plugins, and start:
|
|
31
35
|
|
|
32
36
|
```
|
data/exe/principles
CHANGED
data/lib/principles/cli.rb
CHANGED
|
@@ -20,20 +20,19 @@ module Principles
|
|
|
20
20
|
|
|
21
21
|
# Runs one invocation and returns its exit status: 0 for a result, 1 for a refusal, 2 for a usage error, and 3
|
|
22
22
|
# when list-member-problems --short finds a member an audit assessed changed, or 4 when it finds only edits to
|
|
23
|
-
# members no audit has assessed.
|
|
24
|
-
# names
|
|
25
|
-
#: (Array[String], ?IO, ?IO, ?IO, ?
|
|
26
|
-
def self.run(argv, stdout = $stdout, stderr = $stderr, stdin = $stdin,
|
|
27
|
-
|
|
28
|
-
new(stdout, stderr, stdin, executable: executable).run(argv)
|
|
23
|
+
# members no audit has assessed. launch is how the entry point launched this run: the command every printed
|
|
24
|
+
# command names, and the Gemfile bundler runs it under, if any.
|
|
25
|
+
#: (Array[String], ?IO, ?IO, ?IO, ?launch: Launch) -> Integer
|
|
26
|
+
def self.run(argv, stdout = $stdout, stderr = $stderr, stdin = $stdin, launch: Launch.new)
|
|
27
|
+
new(stdout, stderr, stdin, launch:).run(argv)
|
|
29
28
|
end
|
|
30
29
|
|
|
31
|
-
#: (IO, IO, IO,
|
|
32
|
-
def initialize(stdout, stderr, stdin,
|
|
30
|
+
#: (IO, IO, IO, launch: Launch) -> void
|
|
31
|
+
def initialize(stdout, stderr, stdin, launch:)
|
|
33
32
|
@stdout = stdout
|
|
34
33
|
@stderr = stderr
|
|
35
34
|
@stdin = stdin
|
|
36
|
-
@
|
|
35
|
+
@launch = launch
|
|
37
36
|
end
|
|
38
37
|
|
|
39
38
|
#: (Array[String]) -> Integer
|
|
@@ -152,7 +151,7 @@ module Principles
|
|
|
152
151
|
|
|
153
152
|
# This run of the tool, as its entry point launched it.
|
|
154
153
|
#: () -> Controllers::RunningTool
|
|
155
|
-
def running_tool =
|
|
154
|
+
def running_tool = @launch.running_tool
|
|
156
155
|
|
|
157
156
|
# The version of this tool that is running, as --version prints it.
|
|
158
157
|
#: () -> String
|
|
@@ -6,7 +6,9 @@ require_relative "invocation_options"
|
|
|
6
6
|
require_relative "after_commit_hook_options"
|
|
7
7
|
require_relative "session_start_options"
|
|
8
8
|
require_relative "list_open_findings_options"
|
|
9
|
+
require_relative "show_members_in_logged_requests_options"
|
|
9
10
|
require_relative "list_principles_options"
|
|
11
|
+
require_relative "show_principle_options"
|
|
10
12
|
require_relative "start_audit_options"
|
|
11
13
|
require_relative "models/command_steps"
|
|
12
14
|
require_relative "prose_list"
|
|
@@ -161,17 +163,24 @@ module Principles
|
|
|
161
163
|
end
|
|
162
164
|
|
|
163
165
|
# Options checked together, each set owning what is wrong with it as given: --session-start, the
|
|
164
|
-
# after-commit hook's pair on the command it runs, the audit start-audit begins
|
|
165
|
-
# list-open-findings and list-principles print; the first
|
|
166
|
+
# after-commit hook's pair on the command it runs, the audit start-audit begins, the one member show-principle
|
|
167
|
+
# prints and the forms list-open-findings, show-members-in-logged-requests and list-principles print; the first
|
|
168
|
+
# fault is refused.
|
|
166
169
|
#: (String) -> void
|
|
167
170
|
def check_combined_options(name)
|
|
171
|
+
fault = option_sets(name).filter_map(&:fault).first or return
|
|
172
|
+
raise UsageRefusal.new(fault, help_repair(name))
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Each set of options checked together for command name, in the order their faults are refused.
|
|
176
|
+
#: (String) -> Array[untyped]
|
|
177
|
+
def option_sets(name)
|
|
168
178
|
hook = (AfterCommitHookOptions.new(@options) if name == AfterCommitHookOptions::COMMAND)
|
|
169
179
|
principles = (ListPrinciplesOptions.new(@options) if name == ListPrinciplesOptions::COMMAND)
|
|
180
|
+
principle = (ShowPrincipleOptions.new(@options) if name == ShowPrincipleOptions::COMMAND)
|
|
170
181
|
start_audit = StartAuditOptions.new(@options, several_ids: several_ids?(name))
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
fault = sets.filter_map(&:fault).first or return
|
|
174
|
-
raise UsageRefusal.new(fault, help_repair(name))
|
|
182
|
+
[SessionStartOptions.new(@options), hook, start_audit, ListOpenFindingsOptions.new(@options),
|
|
183
|
+
ShowMembersInLoggedRequestsOptions.new(@options), principles, principle].compact
|
|
175
184
|
end
|
|
176
185
|
|
|
177
186
|
# Whether command name is start-audit given more than one principle id.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
require_relative "controllers/inventory"
|
|
5
|
+
require_relative "controllers/principle_listing"
|
|
5
6
|
require_relative "controllers/survey"
|
|
6
7
|
require_relative "controllers/guidance_search_paths"
|
|
7
8
|
require_relative "controllers/member_problems_report"
|
|
@@ -14,7 +15,12 @@ require_relative "controllers/open_correction"
|
|
|
14
15
|
require_relative "controllers/first_audit_brief"
|
|
15
16
|
require_relative "controllers/session_start_report"
|
|
16
17
|
require_relative "controllers/after_commit_report"
|
|
18
|
+
require_relative "controllers/carrier_edit_report"
|
|
17
19
|
require_relative "controllers/hook_setup"
|
|
20
|
+
require_relative "controllers/request_logging"
|
|
21
|
+
require_relative "controllers/members_in_logged_requests"
|
|
22
|
+
require_relative "controllers/context_budget"
|
|
23
|
+
require_relative "controllers/carrier_practices"
|
|
18
24
|
|
|
19
25
|
module Principles
|
|
20
26
|
# Every command this tool runs, each with its route: the positional words it takes, which CommandLine parses, and
|
|
@@ -46,7 +52,7 @@ module Principles
|
|
|
46
52
|
"show-candidate-outlines" => Route.new(Controllers::Survey, ["path..."]),
|
|
47
53
|
"add-guidance-search-path" => Route.new(Controllers::GuidanceSearchPaths, %w[glob]),
|
|
48
54
|
"remove-guidance-search-path" => Route.new(Controllers::GuidanceSearchPaths, %w[glob]),
|
|
49
|
-
"list-principles" => Route.new(Controllers::
|
|
55
|
+
"list-principles" => Route.new(Controllers::PrincipleListing, []),
|
|
50
56
|
"list-member-problems" => Route.new(Controllers::MemberProblemsReport, %w[id?]),
|
|
51
57
|
"show-principle" => Route.new(Controllers::Inventory, %w[id]),
|
|
52
58
|
"show-audit" => Route.new(Controllers::Audit, %w[id]),
|
|
@@ -59,6 +65,8 @@ module Principles
|
|
|
59
65
|
"add-member" => Route.new(Controllers::MemberEntries, %w[id path]),
|
|
60
66
|
"move-member" => Route.new(Controllers::MemberEntries, %w[id member]),
|
|
61
67
|
"change-member-role" => Route.new(Controllers::MemberEntries, %w[id member]),
|
|
68
|
+
"change-member-name" => Route.new(Controllers::MemberEntries, %w[id member]),
|
|
69
|
+
"change-member-reason" => Route.new(Controllers::MemberEntries, %w[id member]),
|
|
62
70
|
"change-member-check" => Route.new(Controllers::MemberEntries, %w[id member]),
|
|
63
71
|
"remove-member-check" => Route.new(Controllers::MemberEntries, %w[id member]),
|
|
64
72
|
"remove-member" => Route.new(Controllers::MemberEntries, %w[id member]),
|
|
@@ -68,8 +76,16 @@ module Principles
|
|
|
68
76
|
"show-open-correction" => Route.new(Controllers::OpenCorrection, %w[id]),
|
|
69
77
|
"show-first-audit-brief" => Route.new(Controllers::FirstAuditBrief, %w[id?]),
|
|
70
78
|
"show-hook-setup" => Route.new(Controllers::HookSetup, []),
|
|
79
|
+
"turn-on-request-logging" => Route.new(Controllers::RequestLogging, []),
|
|
80
|
+
"show-members-in-logged-requests" => Route.new(Controllers::MembersInLoggedRequests, []),
|
|
81
|
+
"show-context-budget" => Route.new(Controllers::ContextBudget, []),
|
|
82
|
+
"turn-off-request-logging" => Route.new(Controllers::RequestLogging, []),
|
|
83
|
+
"show-logged-requests" => Route.new(Controllers::RequestLogging, []),
|
|
84
|
+
"remove-logged-requests" => Route.new(Controllers::RequestLogging, []),
|
|
85
|
+
"show-carrier-practices" => Route.new(Controllers::CarrierPractices, %w[kind]),
|
|
71
86
|
"report-at-session-start" => Route.new(Controllers::SessionStartReport, [], reads_hook_input: true),
|
|
72
|
-
"report-after-commit" => Route.new(Controllers::AfterCommitReport, [], reads_hook_input: true)
|
|
87
|
+
"report-after-commit" => Route.new(Controllers::AfterCommitReport, [], reads_hook_input: true),
|
|
88
|
+
"report-before-carrier-edit" => Route.new(Controllers::CarrierEditReport, [], reads_hook_input: true)
|
|
73
89
|
}.freeze #: Hash[String, Route]
|
|
74
90
|
|
|
75
91
|
# Each command's positional arguments, in order, as CommandLine takes them.
|
|
@@ -10,6 +10,7 @@ require_relative "../models/acknowledgement_placeholders"
|
|
|
10
10
|
require_relative "../models/reported_check"
|
|
11
11
|
require_relative "../views/acknowledged_result"
|
|
12
12
|
require_relative "../views/acknowledgement_result"
|
|
13
|
+
require_relative "../views/acknowledgement_template_alone"
|
|
13
14
|
|
|
14
15
|
module Principles
|
|
15
16
|
# Each runs one command: reads models, applies their rules and prints through a view.
|
|
@@ -23,8 +24,9 @@ module Principles
|
|
|
23
24
|
def start(id, member_id)
|
|
24
25
|
naming_the_executable(rerun: one_member_audit(id)) do
|
|
25
26
|
member = of(id, member_id)
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
request_id = member.acknowledgement.request_id
|
|
28
|
+
view.request(request_id: request_id.to_s, principle_id: id, asked: member.asked,
|
|
29
|
+
answer_file: answer_file(request_id)).merge("wrote" => [])
|
|
28
30
|
end
|
|
29
31
|
end
|
|
30
32
|
|
|
@@ -33,7 +35,10 @@ module Principles
|
|
|
33
35
|
def to_fill(id, member_id)
|
|
34
36
|
naming_the_executable(rerun: one_member_audit(id)) do
|
|
35
37
|
member = of(id, member_id)
|
|
36
|
-
|
|
38
|
+
asked = member.asked
|
|
39
|
+
request_id = member.acknowledgement.request_id
|
|
40
|
+
alone.of(view.answer_to_fill(request_id: request_id.to_s, asked:), [asked],
|
|
41
|
+
answer_file: answer_file(request_id))
|
|
37
42
|
end
|
|
38
43
|
end
|
|
39
44
|
|
|
@@ -43,7 +48,8 @@ module Principles
|
|
|
43
48
|
def answered(submitted)
|
|
44
49
|
id = submitted.request_id.principle_id
|
|
45
50
|
member = answering(submitted)
|
|
46
|
-
[accepted_view.acknowledged(principle_id: id, member_id: member.member.id, file: @audit_records.file(id)
|
|
51
|
+
[accepted_view.acknowledged(principle_id: id, member_id: member.member.id, file: @audit_records.file(id),
|
|
52
|
+
open_findings: member.acknowledgement.open_finding_ids),
|
|
47
53
|
[accepted(member, submitted.response)]]
|
|
48
54
|
end
|
|
49
55
|
|
|
@@ -113,6 +119,15 @@ module Principles
|
|
|
113
119
|
Views::AcknowledgementResult.new(invocation)
|
|
114
120
|
end
|
|
115
121
|
|
|
122
|
+
# The file the answer to request_id is saved in, named by the principle the id names and "acknowledgement",
|
|
123
|
+
# whatever the member count, so the path does not change with the phase, acknowledgement or acknowledgements.
|
|
124
|
+
#: (Models::RequestId) -> String
|
|
125
|
+
def answer_file(request_id) = invocation.answer_file(request_id.principle_id, "acknowledgement")
|
|
126
|
+
|
|
127
|
+
# The view of the answer to fill as the template printed alone gives it.
|
|
128
|
+
#: () -> Views::AcknowledgementTemplateAlone
|
|
129
|
+
def alone = Views::AcknowledgementTemplateAlone.new(invocation)
|
|
130
|
+
|
|
116
131
|
# The view of an accepted answer.
|
|
117
132
|
#: () -> Views::AcknowledgedResult
|
|
118
133
|
def accepted_view = Views::AcknowledgedResult.new(invocation)
|
|
@@ -20,11 +20,13 @@ module Principles
|
|
|
20
20
|
def several(id, member_ids, to_fill:)
|
|
21
21
|
naming_the_executable(rerun: one_member_audit(id)) do
|
|
22
22
|
members = member_ids.map { of(id, it) }
|
|
23
|
-
|
|
23
|
+
request = several_of(id, members).request_id
|
|
24
|
+
request_id = request.to_s
|
|
24
25
|
asked = members.map(&:asked)
|
|
25
|
-
|
|
26
|
+
file = answer_file(request)
|
|
27
|
+
next alone.of(view.several_to_fill(request_id:, members: asked), asked, answer_file: file) if to_fill
|
|
26
28
|
|
|
27
|
-
view.several_request(request_id:, principle_id: id, members: asked).merge("wrote" => [])
|
|
29
|
+
view.several_request(request_id:, principle_id: id, members: asked, answer_file: file).merge("wrote" => [])
|
|
28
30
|
end
|
|
29
31
|
end
|
|
30
32
|
|
|
@@ -34,11 +36,12 @@ module Principles
|
|
|
34
36
|
def across(ids, member_ids, to_fill:)
|
|
35
37
|
naming_the_executable(rerun: across_audit(ids, member_ids)) do
|
|
36
38
|
by_principle = members_by_principle(ids, member_ids)
|
|
37
|
-
|
|
39
|
+
request = across_of(by_principle).request_id
|
|
38
40
|
principles = by_principle.transform_values { it.map(&:asked) }
|
|
39
|
-
next
|
|
41
|
+
next across_to_fill(request, principles) if to_fill
|
|
40
42
|
|
|
41
|
-
view.across_request(request_id
|
|
43
|
+
view.across_request(request_id: request.to_s, principles:, answer_file: answer_file(request),
|
|
44
|
+
keeping_deferred: keeping_deferred(by_principle))
|
|
42
45
|
.merge("wrote" => [])
|
|
43
46
|
end
|
|
44
47
|
end
|
|
@@ -49,15 +52,28 @@ module Principles
|
|
|
49
52
|
def answered(submitted)
|
|
50
53
|
return across_answered(submitted) if submitted.response.fetch("basis").key?("principle_ids")
|
|
51
54
|
|
|
55
|
+
several_answered(submitted)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
private
|
|
59
|
+
|
|
60
|
+
# The answer alone to request, for principles' members, as start-audit --as template prints it.
|
|
61
|
+
#: (Models::RequestId, Hash[String, Array[Hash[Symbol, untyped]]]) -> Hash[String, untyped]
|
|
62
|
+
def across_to_fill(request, principles)
|
|
63
|
+
alone.across(view.across_to_fill(request_id: request.to_s, principles:), principles,
|
|
64
|
+
answer_file: answer_file(request))
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# The result of answering a request for several of one principle's members, and its record.
|
|
68
|
+
#: (Models::SubmittedAnswer) -> [Views::AnsweredRequest, Array[Models::AuditRecord]]
|
|
69
|
+
def several_answered(submitted)
|
|
52
70
|
id = submitted.request_id.principle_id
|
|
53
71
|
several, members = answering_several(submitted)
|
|
54
72
|
[accepted_view.several_acknowledged(principle_id: id, member_ids: members.map { it.member.id },
|
|
55
|
-
file: @audit_records.file(id)),
|
|
73
|
+
file: @audit_records.file(id), open_findings: open_findings(members)),
|
|
56
74
|
[all_accepted(several, members, submitted.response)]]
|
|
57
75
|
end
|
|
58
76
|
|
|
59
|
-
private
|
|
60
|
-
|
|
61
77
|
# The principles in by_principle with a member whose acknowledgement keeps a deferred finding.
|
|
62
78
|
#: (Hash[String, Array[MemberAcknowledgement]]) -> Array[String]
|
|
63
79
|
def keeping_deferred(by_principle)
|
|
@@ -69,13 +85,28 @@ module Principles
|
|
|
69
85
|
#: (Models::SubmittedAnswer) -> [Views::AnsweredRequest, Array[Models::AuditRecord]]
|
|
70
86
|
def across_answered(submitted)
|
|
71
87
|
across, by_principle = answering_across(submitted.response.fetch("basis"), submitted.request_id)
|
|
72
|
-
records = across
|
|
88
|
+
records = across_records(across, by_principle, submitted.response)
|
|
89
|
+
files = by_principle.keys.to_h { [it, @audit_records.file(it)] }
|
|
90
|
+
[accepted_view.across_acknowledged(member_ids: across.member_ids, files:,
|
|
91
|
+
open_findings: by_principle.transform_values { open_findings(it) }),
|
|
92
|
+
records]
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Each principle's record with the acknowledgements response gives its members in by_principle, once the answer
|
|
96
|
+
# holds for every one of them.
|
|
97
|
+
#: (Models::AcknowledgementsAcross, Hash[String, Array[MemberAcknowledgement]], untyped)
|
|
98
|
+
#| -> Array[Models::AuditRecord]
|
|
99
|
+
def across_records(across, by_principle, response)
|
|
100
|
+
across.accepted(response) do |id, several, answer|
|
|
73
101
|
all_accepted(several, by_principle.fetch(id), answer, acknowledging: across.acknowledging)
|
|
74
102
|
end
|
|
75
|
-
files = by_principle.keys.to_h { [it, @audit_records.file(it)] }
|
|
76
|
-
[accepted_view.across_acknowledged(member_ids: across.member_ids, files:), records]
|
|
77
103
|
end
|
|
78
104
|
|
|
105
|
+
# The ids of the findings the last audit left open on members, which accepting their acknowledgements leaves
|
|
106
|
+
# open, each once, since a finding may name several of them.
|
|
107
|
+
#: (Array[MemberAcknowledgement]) -> Array[String]
|
|
108
|
+
def open_findings(members) = members.flat_map { it.acknowledgement.open_finding_ids }.uniq
|
|
109
|
+
|
|
79
110
|
# The members each principle basis names maps, refused when a later copy wrote any of their records, or as stale
|
|
80
111
|
# unless their request is still the one request_id names.
|
|
81
112
|
#: (Hash[String, untyped], Models::RequestId)
|
|
@@ -14,6 +14,19 @@ module Principles
|
|
|
14
14
|
# in the order Models::HeadMoves names them, whose commits changed a mapped member, the hook's JSON naming them,
|
|
15
15
|
# as list-member-problems --commits-after prints it; or nothing. It exits 0 whatever it finds.
|
|
16
16
|
class AfterCommitReport < Command
|
|
17
|
+
# The project at a repository's root on this machine.
|
|
18
|
+
PROJECT_AT = ->(root) { Models::Project.at(root) } #: ^(String) -> Models::Project
|
|
19
|
+
|
|
20
|
+
# git_at gives what git says of a directory, as Models::HeadMoves asks it, and project_at the project at a
|
|
21
|
+
# repository's root.
|
|
22
|
+
#: (Models::Project, tool: RunningTool, ?git_at: ^(String) -> untyped,
|
|
23
|
+
#| ?project_at: ^(String) -> Models::Project) -> void
|
|
24
|
+
def initialize(project, tool:, git_at: Models::HeadMoves::GIT_AT, project_at: PROJECT_AT)
|
|
25
|
+
super(project, tool:)
|
|
26
|
+
@git_at = git_at
|
|
27
|
+
@project_at = project_at
|
|
28
|
+
end
|
|
29
|
+
|
|
17
30
|
#: (String, String?, Hash[String, untyped]) -> untyped
|
|
18
31
|
def call(command, _id, options)
|
|
19
32
|
naming_the_executable do
|
|
@@ -22,7 +35,7 @@ module Principles
|
|
|
22
35
|
input = Models::AfterCommitInput.read(options["stdin"].to_s, ENV.to_h, clock: Time.now.to_i, home: Dir.home,
|
|
23
36
|
pwd: Dir.pwd)
|
|
24
37
|
event = input.event
|
|
25
|
-
event ? reported(event, Models::HeadMoves.new(input).to_a) : Views::MembersACommitChanged::NOTHING
|
|
38
|
+
event ? reported(event, Models::HeadMoves.new(input, @git_at).to_a) : Views::MembersACommitChanged::NOTHING
|
|
26
39
|
end
|
|
27
40
|
end
|
|
28
41
|
|
|
@@ -32,7 +45,7 @@ module Principles
|
|
|
32
45
|
#: (String, Array[Models::HeadMoves::Move]) -> Views::Lines
|
|
33
46
|
def reported(event, moves)
|
|
34
47
|
moves.each do |move|
|
|
35
|
-
lines = MemberProblemsReport.new(
|
|
48
|
+
lines = MemberProblemsReport.new(@project_at.call(move.root), tool: @tool)
|
|
36
49
|
.call("list-member-problems", nil,
|
|
37
50
|
{ "hook_event" => event, "commits_after" => move.before })
|
|
38
51
|
return lines unless lines.stdout.empty?
|
|
@@ -83,7 +83,8 @@ module Principles
|
|
|
83
83
|
# when that explains it.
|
|
84
84
|
#: (Models::RequestId, Models::Audit, Models::AssessmentBasis) -> Models::PriorFindings
|
|
85
85
|
def prior_unless_stale(request_id, audit, basis)
|
|
86
|
-
audit.check_assessment_request(request_id, basis:
|
|
86
|
+
audit.check_assessment_request(request_id, basis: audited_basis(basis, audit.map),
|
|
87
|
+
committed: committed(basis.base, audit.map),
|
|
87
88
|
record: @audit_records.find(audit.id),
|
|
88
89
|
loads: loads_to_check(audit)) { map_at(audit.id, basis.base) }
|
|
89
90
|
end
|
|
@@ -155,8 +156,11 @@ module Principles
|
|
|
155
156
|
#: (Models::CorrectionBasis, Models::Audit, Array[untyped]) -> Views::CorrectionRequest
|
|
156
157
|
def request_to_correct(basis, audit, findings)
|
|
157
158
|
head = Views::AnswerHead.new(request_id: basis.request_id(audit.id, audit.now).to_s, basis: basis.to_h)
|
|
158
|
-
Views::
|
|
159
|
-
|
|
159
|
+
disposition = Views::DispositionTemplate.new(Models::DispositionPlaceholders::TEMPLATE_PLACEHOLDERS,
|
|
160
|
+
basis.prior_decided.deferrals_raised_again)
|
|
161
|
+
checks = carrier_checks(audit.map, findings.flat_map { it.fetch("member_ids") }.uniq)
|
|
162
|
+
Views::CorrectionRequest.new(head: head, principle_id: audit.id, findings: findings, disposition:,
|
|
163
|
+
carrier_checks: checks)
|
|
160
164
|
end
|
|
161
165
|
|
|
162
166
|
# The open record that keeps the assessment, and outside git what the audit began from, and the last completed
|