principles 0.0.7 → 0.0.9
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 +409 -0
- data/LICENSE +202 -0
- data/NOTICE +4 -0
- data/README.md +145 -0
- data/exe/principles +20 -0
- data/lib/principles/after_commit_hook_options.rb +2 -2
- data/lib/principles/cli.rb +50 -42
- data/lib/principles/command_line.rb +22 -16
- data/lib/principles/command_routes.rb +20 -6
- data/lib/principles/controllers/acknowledgement.rb +29 -74
- data/lib/principles/controllers/acknowledgements.rb +154 -0
- data/lib/principles/controllers/after_commit_report.rb +44 -0
- data/lib/principles/controllers/answer.rb +48 -18
- data/lib/principles/controllers/answer_phase.rb +20 -3
- data/lib/principles/controllers/assessment.rb +32 -11
- data/lib/principles/controllers/audit.rb +46 -20
- data/lib/principles/controllers/audit_completion.rb +21 -12
- data/lib/principles/controllers/command.rb +13 -12
- data/lib/principles/controllers/correction.rb +15 -7
- data/lib/principles/controllers/first_audit_brief.rb +40 -0
- data/lib/principles/controllers/full_audit_request.rb +41 -82
- data/lib/principles/controllers/hook_setup.rb +49 -0
- data/lib/principles/controllers/inventory.rb +25 -13
- data/lib/principles/controllers/mapping.rb +2 -2
- data/lib/principles/controllers/member_acknowledgement.rb +32 -21
- data/lib/principles/controllers/member_entries.rb +4 -4
- data/lib/principles/controllers/member_problems_report.rb +62 -16
- data/lib/principles/controllers/members_a_commit_changed.rb +3 -3
- data/lib/principles/controllers/members_to_assess.rb +23 -20
- data/lib/principles/controllers/meta_principle_setup.rb +5 -6
- data/lib/principles/controllers/open_correction.rb +42 -0
- data/lib/principles/controllers/parts_to_read.rb +117 -0
- data/lib/principles/controllers/repoint.rb +1 -1
- data/lib/principles/controllers/running_tool.rb +56 -6
- data/lib/principles/controllers/session_start_report.rb +62 -0
- data/lib/principles/controllers/survey.rb +2 -2
- data/lib/principles/data/audit_files.rb +7 -7
- data/lib/principles/data/bounded_file.rb +1 -1
- data/lib/principles/data/candidate_files_found.rb +6 -3
- data/lib/principles/data/command-steps.json +64 -9
- data/lib/principles/data/expected_type.rb +3 -3
- data/lib/principles/data/first_parent_log.rb +1 -1
- data/lib/principles/data/head_reflog.rb +74 -0
- data/lib/principles/data/hook_input.rb +59 -0
- data/lib/principles/data/ignored_by_git.rb +2 -2
- data/lib/principles/data/known_fields.rb +1 -1
- data/lib/principles/data/linked_path.rb +1 -1
- data/lib/principles/data/map_files.rb +2 -2
- data/lib/principles/data/principles_on_path.rb +83 -0
- data/lib/principles/data/principles_subfolder.rb +1 -1
- data/lib/principles/data/project_files.rb +10 -3
- data/lib/principles/data/repository.rb +21 -7
- data/lib/principles/data/running_version.rb +11 -9
- data/lib/principles/data/schema_check.rb +5 -5
- data/lib/principles/data/schemas/acknowledgement-answer.schema.json +86 -21
- data/lib/principles/data/schemas/acknowledgements-answer.schema.json +9 -2
- data/lib/principles/data/schemas/assessment-answer.schema.json +43 -22
- data/lib/principles/data/schemas/audit-record.schema.json +29 -20
- data/lib/principles/data/schemas/command-steps.schema.json +1 -1
- data/lib/principles/data/schemas/correction-answer-guide.schema.json +1 -1
- data/lib/principles/data/schemas/correction-answer.schema.json +9 -9
- data/lib/principles/data/schemas/member-map.schema.json +3 -3
- data/lib/principles/data/schemas/repointing-answer.schema.json +1 -1
- data/lib/principles/error.rb +4 -4
- data/lib/principles/failure_refusal.rb +57 -0
- data/lib/principles/invocation_options.rb +5 -5
- data/lib/principles/launch.rb +49 -0
- data/lib/principles/list_open_findings_options.rb +1 -1
- data/lib/principles/models/accepted_loading.rb +2 -2
- data/lib/principles/models/acknowledged_check.rb +23 -11
- data/lib/principles/models/acknowledgement.rb +34 -18
- data/lib/principles/models/acknowledgement_left_as_printed.rb +7 -15
- data/lib/principles/models/acknowledgement_refusal.rb +25 -10
- data/lib/principles/models/acknowledgements.rb +45 -29
- data/lib/principles/models/acknowledgements_across.rb +68 -0
- data/lib/principles/models/activation.rb +2 -2
- data/lib/principles/models/after_commit_input.rb +115 -0
- data/lib/principles/models/agent_loads.rb +1 -1
- data/lib/principles/models/answer_fields.rb +2 -2
- data/lib/principles/models/answer_place.rb +3 -3
- data/lib/principles/models/answer_text.rb +2 -2
- data/lib/principles/models/answered_time.rb +4 -4
- data/lib/principles/models/assessment_answer.rb +10 -10
- data/lib/principles/models/assessment_basis.rb +2 -2
- data/lib/principles/models/assessment_left_as_printed.rb +1 -1
- data/lib/principles/models/assessment_report.rb +6 -7
- data/lib/principles/models/audit.rb +33 -34
- data/lib/principles/models/audit_record.rb +54 -28
- data/lib/principles/models/audit_records.rb +13 -13
- data/lib/principles/models/audit_start.rb +3 -3
- data/lib/principles/models/audited_member_lines.rb +1 -1
- data/lib/principles/models/candidate_files.rb +18 -10
- data/lib/principles/models/candidate_inventory.rb +6 -6
- data/lib/principles/models/candidate_outline.rb +9 -9
- data/lib/principles/models/carried_assessments.rb +18 -3
- data/lib/principles/models/carried_member.rb +5 -5
- data/lib/principles/models/changed_regions.rb +92 -0
- data/lib/principles/models/check_result_guide.rb +50 -0
- data/lib/principles/models/check_since_last_audit.rb +5 -4
- data/lib/principles/models/cited_files.rb +4 -4
- data/lib/principles/models/command_steps.rb +3 -3
- data/lib/principles/models/commits_brought_in.rb +1 -1
- data/lib/principles/models/commits_since_base.rb +1 -1
- data/lib/principles/models/correction_answer.rb +2 -2
- data/lib/principles/models/correction_basis.rb +7 -7
- data/lib/principles/models/dated_line.rb +1 -2
- data/lib/principles/models/decided_prior_findings.rb +6 -6
- data/lib/principles/models/declared_map_changes.rb +5 -5
- data/lib/principles/models/disposition.rb +21 -21
- data/lib/principles/models/entry_file.rb +1 -1
- data/lib/principles/models/entry_files.rb +1 -1
- data/lib/principles/models/evidence_item.rb +1 -1
- data/lib/principles/models/evidence_lines_since.rb +2 -2
- data/lib/principles/models/evidence_replacements.rb +3 -3
- data/lib/principles/models/finding_write_ups.rb +12 -5
- data/lib/principles/models/findings_left_open.rb +10 -6
- data/lib/principles/models/first_full_audit.rb +32 -0
- data/lib/principles/models/first_raised_claim.rb +1 -1
- data/lib/principles/models/fix_only_fields.rb +1 -1
- data/lib/principles/models/head_moves.rb +66 -0
- data/lib/principles/models/hook_commands.rb +49 -4
- data/lib/principles/models/ignored_candidates.rb +1 -1
- data/lib/principles/models/instruction_named.rb +2 -3
- data/lib/principles/models/json_digest.rb +2 -2
- data/lib/principles/models/json_path_query.rb +1 -1
- data/lib/principles/models/kept_prior_finding.rb +9 -9
- data/lib/principles/models/last_completed_revision.rb +4 -5
- data/lib/principles/models/left_as_printed.rb +2 -2
- data/lib/principles/models/line_diff.rb +113 -0
- data/lib/principles/models/line_span.rb +1 -1
- data/lib/principles/models/list_member_problems_check.rb +4 -4
- data/lib/principles/models/listed_members.rb +7 -9
- data/lib/principles/models/loaded_files.rb +4 -5
- data/lib/principles/models/loading_decision.rb +3 -3
- data/lib/principles/models/loading_facts.rb +1 -1
- data/lib/principles/models/loads_to_check.rb +1 -1
- data/lib/principles/models/located_text.rb +1 -1
- data/lib/principles/models/mapped_principles.rb +2 -2
- data/lib/principles/models/member.rb +31 -4
- data/lib/principles/models/member_assessments.rb +8 -8
- data/lib/principles/models/member_elsewhere.rb +4 -4
- data/lib/principles/models/member_file.rb +4 -4
- data/lib/principles/models/member_grounds.rb +1 -1
- data/lib/principles/models/member_hashes_as_written.rb +1 -1
- data/lib/principles/models/member_lines.rb +29 -61
- data/lib/principles/models/member_loads.rb +2 -2
- data/lib/principles/models/member_moves.rb +1 -1
- data/lib/principles/models/member_problems.rb +14 -15
- data/lib/principles/models/member_repair_moves.rb +15 -9
- data/lib/principles/models/member_sighting.rb +10 -10
- data/lib/principles/models/member_snapshots.rb +1 -1
- data/lib/principles/models/member_state.rb +1 -1
- data/lib/principles/models/members_across_principles.rb +77 -0
- data/lib/principles/models/members_elsewhere.rb +2 -2
- data/lib/principles/models/members_sharing_lines.rb +7 -7
- data/lib/principles/models/meta_principle.rb +11 -4
- data/lib/principles/models/missing_files.rb +3 -3
- data/lib/principles/models/new_findings.rb +4 -4
- data/lib/principles/models/open_correction.rb +57 -0
- data/lib/principles/models/open_finding.rb +45 -31
- data/lib/principles/models/open_findings_elsewhere.rb +2 -2
- data/lib/principles/models/other_principles.rb +2 -2
- data/lib/principles/models/other_templates_placeholders.rb +17 -16
- data/lib/principles/models/outline_budget.rb +7 -7
- data/lib/principles/models/outline_group.rb +1 -1
- data/lib/principles/models/outline_section.rb +2 -2
- data/lib/principles/models/part_named.rb +41 -0
- data/lib/principles/models/placement.rb +2 -2
- data/lib/principles/models/principle.rb +13 -13
- data/lib/principles/models/principle_history.rb +8 -8
- data/lib/principles/models/principle_members.rb +14 -7
- data/lib/principles/models/principles_folder_move.rb +1 -1
- data/lib/principles/models/principles_on_path.rb +29 -0
- data/lib/principles/models/principles_package.rb +3 -3
- data/lib/principles/models/prior_decision_fields.rb +8 -8
- data/lib/principles/models/prior_finding_decision.rb +8 -8
- data/lib/principles/models/prior_finding_outcomes.rb +1 -1
- data/lib/principles/models/prior_findings.rb +5 -5
- data/lib/principles/models/problem_report.rb +26 -8
- data/lib/principles/models/project.rb +31 -19
- data/lib/principles/models/project_history.rb +18 -12
- data/lib/principles/models/quoted_change.rb +8 -8
- data/lib/principles/models/recent_decision.rb +3 -3
- data/lib/principles/models/record_format.rb +16 -10
- data/lib/principles/models/record_judged_against.rb +4 -4
- data/lib/principles/models/recorded_entry.rb +17 -8
- data/lib/principles/models/recorded_finding.rb +9 -9
- data/lib/principles/models/recorded_findings.rb +2 -2
- data/lib/principles/models/recorded_hashes.rb +2 -2
- data/lib/principles/models/recorded_members.rb +13 -13
- data/lib/principles/models/refusal_before_shape.rb +2 -2
- data/lib/principles/models/repoint.rb +3 -3
- data/lib/principles/models/report_hooks.rb +69 -0
- data/lib/principles/models/reported_check.rb +34 -31
- data/lib/principles/models/request_id.rb +18 -6
- data/lib/principles/models/runs_from.rb +7 -2
- data/lib/principles/models/sent_answer.rb +14 -12
- data/lib/principles/models/sent_prior_decisions.rb +1 -1
- data/lib/principles/models/session_start_input.rb +37 -0
- data/lib/principles/models/shape_problems_beside.rb +1 -1
- data/lib/principles/models/skill_loads.rb +1 -1
- data/lib/principles/models/stale_request.rb +59 -0
- data/lib/principles/models/still_holds_restatement.rb +6 -6
- data/lib/principles/models/submitted_answer.rb +1 -1
- data/lib/principles/models/template_placeholders.rb +6 -6
- data/lib/principles/models/text_within.rb +1 -1
- data/lib/principles/models/tracked_paths.rb +38 -0
- data/lib/principles/models/unchecked_members.rb +2 -2
- data/lib/principles/models/uncommitted_files.rb +1 -1
- data/lib/principles/models/uncommitted_outside_the_map.rb +2 -2
- data/lib/principles/models/waits_on.rb +1 -1
- data/lib/principles/models/write_up_opening.rb +5 -5
- data/lib/principles/models/write_up_pointer.rb +3 -3
- data/lib/principles/models/write_up_repoint.rb +2 -3
- data/lib/principles/positional_arguments.rb +13 -6
- data/lib/principles/prose_list.rb +1 -1
- data/lib/principles/session_start_options.rb +1 -1
- data/lib/principles/start_audit_options.rb +46 -12
- data/lib/principles/supported_ruby.rb +24 -7
- data/lib/principles/version.rb +2 -2
- data/lib/principles/views/acknowledged_since_last_audit.rb +2 -2
- data/lib/principles/views/acknowledgement_result.rb +97 -11
- data/lib/principles/views/activation_in_hand.rb +1 -1
- data/lib/principles/views/answered_request.rb +6 -2
- data/lib/principles/views/assessed_members.rb +50 -41
- data/lib/principles/views/assessment_request.rb +39 -36
- data/lib/principles/views/audit_changes.rb +4 -4
- data/lib/principles/views/audit_commit.rb +5 -4
- data/lib/principles/views/audit_result.rb +92 -53
- data/lib/principles/views/candidate_files_result.rb +7 -6
- data/lib/principles/views/check_notes.rb +29 -6
- data/lib/principles/views/check_result_template.rb +45 -34
- data/lib/principles/views/completed_audit_next_step.rb +44 -0
- data/lib/principles/views/context_parts.rb +112 -0
- data/lib/principles/views/correction_request.rb +44 -25
- data/lib/principles/views/diff_since_last_audit.rb +8 -6
- data/lib/principles/views/findings_result.rb +28 -6
- data/lib/principles/views/first_audit_brief.rb +51 -0
- data/lib/principles/views/first_audit_line.rb +45 -0
- data/lib/principles/views/help.rb +4 -4
- data/lib/principles/views/hook_setup_result.rb +91 -0
- data/lib/principles/views/instruction.rb +3 -3
- data/lib/principles/views/invocation.rb +14 -6
- data/lib/principles/views/json_with_entries_on_lines.rb +6 -35
- data/lib/principles/views/landed_since_base.rb +1 -1
- data/lib/principles/views/line_history_since_last_audit.rb +35 -0
- data/lib/principles/views/lines_shared_with_member.rb +6 -6
- data/lib/principles/views/loads_to_check_result.rb +8 -5
- data/lib/principles/views/map_added_to.rb +3 -3
- data/lib/principles/views/map_result.rb +9 -9
- data/lib/principles/views/member_change_since_baseline.rb +44 -23
- data/lib/principles/views/member_lines_beside_text.rb +43 -0
- data/lib/principles/views/member_repairs.rb +3 -2
- data/lib/principles/views/member_row.rb +2 -2
- data/lib/principles/views/members_a_commit_changed.rb +13 -10
- data/lib/principles/views/members_with_no_baseline.rb +3 -3
- data/lib/principles/views/meta_principle_passage.rb +1 -1
- data/lib/principles/views/meta_principle_result.rb +12 -5
- data/lib/principles/views/one_member_check_result_template.rb +7 -7
- data/lib/principles/views/open_findings_elsewhere_result.rb +5 -2
- data/lib/principles/views/open_findings_line.rb +89 -73
- data/lib/principles/views/other_principles_unjudged_result.rb +6 -3
- data/lib/principles/views/outside_the_map_result.rb +5 -2
- data/lib/principles/views/package_since_last_audit_result.rb +29 -6
- data/lib/principles/views/parts_index_result.rb +60 -0
- data/lib/principles/views/principle_read_result.rb +16 -6
- data/lib/principles/views/principle_with_changed_members.rb +1 -1
- data/lib/principles/views/principles_with_no_completed_audit.rb +1 -2
- data/lib/principles/views/printed_json.rb +51 -0
- data/lib/principles/views/printed_principle.rb +1 -1
- data/lib/principles/views/prior_finding_decisions_result.rb +4 -4
- data/lib/principles/views/prior_findings_result.rb +17 -14
- data/lib/principles/views/problem_lines.rb +37 -17
- data/lib/principles/views/problem_result.rb +40 -37
- data/lib/principles/views/prompts/acknowledge-a-change/judge-each-member-once-for-every-principle.md +2 -0
- data/lib/principles/views/prompts/acknowledge-a-change/read-the-deferred-findings-it-keeps.md +1 -0
- data/lib/principles/views/prompts/acknowledge-a-change/resolve-them-in-a-full-audit.md +1 -0
- data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md +3 -3
- data/lib/principles/views/prompts/assess-every-member/confirm-each-write-up-pointer-the-answer-drops.md +2 -0
- data/lib/principles/views/prompts/assess-every-member/have-a-changed-check-reviewed-before-running-it.md +1 -1
- data/lib/principles/views/prompts/assess-every-member/have-a-new-check-reviewed-before-running-it.md +1 -1
- data/lib/principles/views/prompts/assess-every-member/judge-a-carried-assessment-citing-a-decided-finding.md +3 -0
- data/lib/principles/views/prompts/assess-every-member/judge-a-submitted-carried-assessment-citing-a-decided-finding.md +5 -0
- data/lib/principles/views/prompts/assess-every-member/judge-the-keeping-under-the-release-since-the-last-audit.md +1 -1
- data/lib/principles/views/prompts/assess-every-member/keep-the-printed-review-basis-or-replace-it.md +1 -0
- data/lib/principles/views/prompts/assess-every-member/name-the-commit-that-made-the-check.md +1 -0
- data/lib/principles/views/prompts/assess-every-member/read-a-trimmed-instruction-whole.md +1 -1
- data/lib/principles/views/prompts/assess-every-member/read-the-request-in-parts.md +1 -0
- data/lib/principles/views/prompts/assess-every-member/why-each-member-is-judged-again.md +3 -2
- data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -1
- data/lib/principles/views/prompts/dispose-of-each-finding/confirm-each-deferral-written-up-nowhere.md +2 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md +4 -4
- data/lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md +2 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +4 -3
- data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +6 -6
- data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +14 -14
- data/lib/principles/views/prompts/learn-what-a-command-does/list-principles.md +3 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/report-after-commit.md +14 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/report-at-session-start.md +26 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +20 -18
- data/lib/principles/views/prompts/learn-what-a-command-does/show-first-audit-brief.md +19 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-hook-setup.md +13 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md +3 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/show-open-correction.md +12 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +21 -22
- data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +5 -4
- data/lib/principles/views/prompts/report-the-completed-audit/commit-only-what-the-audit-changed.md +2 -2
- data/lib/principles/views/prompts/run-a-first-audit-in-the-background/follow-the-brief.md +18 -0
- data/lib/principles/views/prompts/set-principles-up/offer-the-report-hooks.md +2 -0
- data/lib/principles/views/prompts/set-principles-up/wire-the-report-hooks-with-the-user.md +8 -0
- data/lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md +1 -5
- data/lib/principles/views/prompts/start-a-session/hand-the-first-audit-to-a-subagent.md +3 -0
- data/lib/principles/views/prompts/start-a-session/run-each-command-above.md +1 -0
- data/lib/principles/views/prompts/start-a-session/start-no-second-first-audit.md +2 -0
- data/lib/principles/views/prompts.rb +1 -1
- data/lib/principles/views/read_the_change.rb +36 -0
- data/lib/principles/views/record_waiting_on_an_upgrade.rb +2 -2
- data/lib/principles/views/repoint_result.rb +1 -1
- data/lib/principles/views/report_hooks_offer.rb +25 -0
- data/lib/principles/views/request_part.rb +5 -5
- data/lib/principles/views/request_parts.rb +1 -1
- data/lib/principles/views/session_start_report.rb +46 -0
- data/lib/principles/views/shell_word.rb +1 -1
- data/lib/principles/views/trimmed_instructions_note.rb +30 -0
- data/lib/principles/views/visible_text.rb +1 -1
- data/lib/principles/views/workflow_diagram.rb +1 -1
- data/principles.gemspec +44 -0
- metadata +84 -18
- data/lib/principles/views/prompts/start-a-session/every-loaded-line-costs-every-session.md +0 -1
- data/lib/principles/views/prompts/start-a-session/it-returns-after-each-clear-or-compaction-too.md +0 -1
- data/lib/principles/views/prompts/start-a-session/it-returns-at-each-session-start.md +0 -1
- data/lib/principles/views/prompts/start-a-session/raise-them-at-the-next-pause.md +0 -1
- data/lib/principles/views/prompts/start-a-session/raise-them-before-the-first-task.md +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
This check changed since the last audit ran it
|
|
1
|
+
This check changed since the last audit ran it; show-audit prints the command that
|
|
2
2
|
audit ran, in this member's check_result. Before you run it, have
|
|
3
3
|
the change reviewed by the project's owner, or confirm it against the project's own documentation;
|
|
4
4
|
documentation outside the check's own file counts for more than comments in it.
|
data/lib/principles/views/prompts/assess-every-member/have-a-new-check-reviewed-before-running-it.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
No audit has run this check
|
|
1
|
+
No audit has run this check. Before you run it,
|
|
2
2
|
have it reviewed by the project's owner, or confirm it against the project's own documentation;
|
|
3
3
|
documentation outside the check's own file counts for more than comments in it.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Each member under `carried_assessments_citing_decided_findings` carries forward an assessment whose text names a
|
|
2
|
+
finding this answer decides other than still_holds; the id may be another record's. If the assessment no longer
|
|
3
|
+
holds, replace that member's `carried_forward` with your own assessment, and check the answer again.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Each member under `carried_assessments_citing_decided_findings` carried forward an assessment whose text names a
|
|
2
|
+
finding this answer decided other than still_holds; the id may be another record's. If that assessment no longer
|
|
3
|
+
holds, once this audit completes, start the next full audit and give that member your own assessment in place of
|
|
4
|
+
`carried_forward`:
|
|
5
|
+
%{start_audit}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
`version_at_last_audit` is the version of `principles` this principle's last completed audit ran under, or null when
|
|
2
2
|
no completed audit recorded one, and `version_now` the version running now. A new version can change the session-start
|
|
3
|
-
hook, the skill and the passage `show-meta-principle-passage` proposes,
|
|
3
|
+
hook, the skill and the passage `show-meta-principle-passage` proposes, %{mapped}.
|
|
4
4
|
`passage_changed` says whether that passage's text changed since, or is null when there is nothing to compare it
|
|
5
5
|
with. The project's passage may differ from the one setup proposes, on purpose: placed in its own words, with a step
|
|
6
6
|
left to a section that already carries it. So when the version or the passage changed, compare what each says the
|
data/lib/principles/views/prompts/assess-every-member/keep-the-printed-review-basis-or-replace-it.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
review_basis holds the line its last review rested on, from %{since}: kept as printed, or replace it with a new one.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Commit %{commit} %{verb} this check.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Printed in part: %{fields}. To read one whole, add `--instruction FIELD` to this start-audit.
|
|
1
|
+
Printed in part, enough for this request's cases: %{fields}. To read one whole, add `--instruction FIELD` to this start-audit.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
List this request's parts with their bytes, then print one alone with `--part NAME`: %{index}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Assess each member with `judge_because` afresh. In git, after a full audit, its `read_the_change` shows the edits to its
|
|
2
|
-
file since that audit's base commit; a change to its map entry, its loads or the
|
|
3
|
-
empty diff does not mean nothing changed. Its value says why this audit cannot carry
|
|
2
|
+
lines, or to a whole or moved file, since that audit's base commit; a change to its map entry, its loads or the
|
|
3
|
+
question does not show there, so an empty diff does not mean nothing changed. Its value says why this audit cannot carry
|
|
4
|
+
its last assessment:
|
|
4
5
|
|
|
5
6
|
`not_assessed_before`: no completed audit has assessed it.
|
|
6
7
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"reason": "Why, and what remains",
|
|
15
15
|
"changed_members": [],
|
|
16
16
|
"evidence": [],
|
|
17
|
-
"recorded_at": { "path": "where the project keeps the write-up", "starting_at": "the line that states the problem" },
|
|
17
|
+
"recorded_at": { "path": "where the project keeps the write-up, or set recorded_at null if none", "starting_at": "the line that states the problem" },
|
|
18
18
|
"waits_on": "Whom it waits on, to decide what, in one line, or null"
|
|
19
19
|
},
|
|
20
20
|
"accepted": {
|
data/lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Keep
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
Keep a copy of the assessment you submit outside the project (for `--file -`, its exact stdin bytes) until this
|
|
2
|
+
correction completes the audit: the open record keeps it, and only that copy rebuilds it if the record is lost.
|
|
3
|
+
Once the assessment is submitted, print this correction's answer again at any time, in git or outside it and after
|
|
4
|
+
fixes too, with this read-only command:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
By convention, CLAUDE.md, AGENTS.md
|
|
2
|
-
changed mapped files, and files explicitly selected with --also or recorded guidance search paths.
|
|
1
|
+
By convention, CLAUDE.md, AGENTS.md, .claude rules, skills, agents and settings, and Codex .agents/skills, .codex/hooks.json and .codex/agents, in this project. Also included are Markdown files changed by --commits-after,
|
|
2
|
+
changed mapped files, and files explicitly selected with --also or recorded guidance search paths. Files git
|
|
3
3
|
ignores are named under ignored and not listed to map. The host may still load an ignored file, such
|
|
4
4
|
as personal local settings, which can hold hooks and permissions, and whose hooks show-principle reads for
|
|
5
5
|
named_in_hooks; while it is ignored and uncommitted, an audit refuses a member in it, so a rule only it enforces
|
|
@@ -8,7 +8,7 @@ A map that cannot be read has a `refusal` row with its path and repair instead o
|
|
|
8
8
|
the survey stays available, but resolve that repair before treating a rule as distinct.
|
|
9
9
|
To include other guidance now, repeat `--also GLOB`, quoting each root-relative glob so the shell does not expand it:
|
|
10
10
|
|
|
11
|
-
%{executable} list-candidate-files --also 'guides/**/*.md' --also '
|
|
11
|
+
%{executable} list-candidate-files --also 'guides/**/*.md' --also 'docs/agents/*.md'
|
|
12
12
|
|
|
13
13
|
Recorded globs in `.principles/guidance-search-paths.json` are reused automatically; `recorded_guidance_search_paths`
|
|
14
14
|
lists them when nonempty. `--also` adds temporary selections; `additional_search_paths` counts each normalized glob once
|
|
@@ -61,5 +61,6 @@ one included; this tool does not list it to map, and the host may still load it,
|
|
|
61
61
|
only there. A folder git ignores as a whole is named once under `ignored_folders`, with how many such files it holds,
|
|
62
62
|
rather than file by file. Outside git, `untracked`, `ignored` and `ignored_folders` are left out, since nothing
|
|
63
63
|
checked them.
|
|
64
|
-
A listed
|
|
65
|
-
|
|
64
|
+
A listed symbolic link gives `symlink_to`, the file its links lead to: two names with one `symlink_to` are one file,
|
|
65
|
+
which this list may not name. A skill's `SKILL.md` spelt otherwise, as `skill.md`, gives `skill_file_spelt`, its name;
|
|
66
|
+
a case-sensitive host may not load it.
|
|
@@ -51,13 +51,13 @@ Every refusal exits 1 with a single line of JSON on stderr, the only line this t
|
|
|
51
51
|
whose `code` names it, such as `broken_members` (a member that cannot be found or read), `principles_folder_not_moved`
|
|
52
52
|
(a project state to repair) or `unsupported_ruby` (no supported Ruby runs this tool). Other programs, such as an rbenv
|
|
53
53
|
shim, may write other lines there, and codes may be added: a code a hook does not know is still a refusal to read. A
|
|
54
|
-
usage error exits 2. When it does not refuse, stderr carries what to do next, its commands
|
|
55
|
-
once, and says when there are no maps, or members with no baseline, that an empty
|
|
56
|
-
stays listed until an audit takes it in
|
|
54
|
+
usage error exits 2. When it does not refuse, stderr carries what to do next, its commands naming `--project` if given
|
|
55
|
+
it, else run in the project it names once, and says when there are no maps, or members with no baseline, that an empty
|
|
56
|
+
stdout would hide. A changed member stays listed until an audit takes it in: a notice, not a gate that blocks commits.
|
|
57
57
|
For a post-commit hook, run: %{executable} list-member-problems --short || true
|
|
58
58
|
A heartbeat can compare each line's commit with the last one it reported.
|
|
59
|
-
`--short --session-start SOURCE`, for the session-start hook, prints instead, but on
|
|
60
|
-
|
|
59
|
+
`--short --session-start SOURCE`, for the session-start hook, prints instead the meta-principle's reminder, but on
|
|
60
|
+
`resume`, then each principle's count of changed audited members with a command listing them.
|
|
61
61
|
|
|
62
62
|
`--commits-after COMMIT --hook-event EVENT` is for a Claude Code hook that runs after a Bash call, so a long session
|
|
63
63
|
learns of a member it changed at the commit that changed it, not only at its next start. The plugin's after-commit
|
|
@@ -65,7 +65,7 @@ hook runs it once HEAD moved during the call, with COMMIT the full sha HEAD poin
|
|
|
65
65
|
event, `PostToolUse` or `PostToolUseFailure`. It prints one JSON object, `hookSpecificOutput`, whose `hookEventName`
|
|
66
66
|
is EVENT and whose `additionalContext` names, one row per member in `--short`'s fields, the members whose newest
|
|
67
67
|
changing commit came after COMMIT, of both kinds, then how many other changed members are still listed, this command
|
|
68
|
-
without the options, and a line naming the `/principles` skill as where to start; one waiting
|
|
68
|
+
without the options, and, under the plugin, a line naming the `/principles` skill as where to start; one waiting
|
|
69
69
|
on an upgrade comes apart. It prints nothing when those commits changed no mapped member. A refusal is reported, as
|
|
70
70
|
its code and this command, only when those commits changed `.principles/` or a file a map names, since only then could
|
|
71
71
|
they have caused it; else it prints nothing, and the session-start hook reports it. It exits 0 but for a usage error.
|
|
@@ -59,19 +59,19 @@ twice, `invalid_answer` for a new `recorded_at` without a `reason`, and `uncommi
|
|
|
59
59
|
the last commit. `--member` with it is refused.
|
|
60
60
|
|
|
61
61
|
`--lines` is for deciding whom to tell, as the session-start line asks: it prints each open finding on a line, its
|
|
62
|
-
principle, id
|
|
63
|
-
given with `--short`.
|
|
62
|
+
principle, id, `waits on:` its `waits_on`, `waits on no one named`, or `accepted` for one that waits on no one by
|
|
63
|
+
design, and `open N days` since first raised, with no script over this JSON. It cannot be given with `--short`.
|
|
64
64
|
|
|
65
65
|
`--short` is for a session-start hook, where an open finding would otherwise wait unseen until its principle's next full
|
|
66
|
-
audit. It prints one line instead of JSON, and nothing at all when no finding is open, exiting 0 either way:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
session-start hook prints this line, passing its source.
|
|
66
|
+
audit. It prints one line instead of JSON, and nothing at all when no deferred finding is open, exiting 0 either way:
|
|
67
|
+
how many deferred findings have a `waits_on`, the oldest of them by principle and id with its `waits_on`, cut at a word
|
|
68
|
+
within 80 characters with a parenthesis left open closed, how many have none, and git's `user.name`; then to raise in
|
|
69
|
+
the first reply each that waits on the agent's user, or on no one, since nothing else will, and the command that lists
|
|
70
|
+
them, which one finding's own line needs no command for. The agent judges whether that user is the one named. While
|
|
71
|
+
any open finding's `write_up_opening_reason` is `unavailable`, the line also names that write-up, or the first of them
|
|
72
|
+
with their count, so a pointer that no longer resolves is seen at session start. With `--session-start SOURCE`, one of
|
|
73
|
+
`startup`, `resume`, `clear` and `compact` as Claude Code's SessionStart hook names them, the line for `clear` or
|
|
74
|
+
`compact` asks for the next reply; without it the line is worded for `startup`. For `resume`, whose conversation holds
|
|
75
|
+
the line already, it gives only how many are open, how many whole days the oldest has waited since its
|
|
76
|
+
`first_raised_at`, not `waits_on_since`, which dates only the ask, and the command that prints the line whole. The
|
|
77
|
+
principles plugin's session-start hook prints this line, passing its source.
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
Lists every mapped principle, with its members counted by whether they changed since the last audit.
|
|
2
2
|
Run it to decide which principle to look at or audit.
|
|
3
|
+
To say what principles are in place and what each still waits on, give `--open-findings`, rather than joining
|
|
4
|
+
this list with `list-open-findings`: each row adds `open_findings`, one line per finding its last completed audit
|
|
5
|
+
deferred or accepted, with its id, whom it waits on, or that it is accepted, and how many days it has been open.
|
|
3
6
|
With nothing mapped, `next_action` names `list-candidate-files`, which surveys the project's principles for the user.
|
|
4
7
|
When the `sticking-to-your-principles` map has no members, its row adds `no_members`: setup no longer writes
|
|
5
8
|
that map before its first member, so an earlier setup, or removing its last member, left it. It names the map's
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Run by a hook after each shell call, not by the agent: when the call committed, it names the mapped members those
|
|
2
|
+
commits changed, and the host puts that beside the call's result. It reads the hook's JSON on stdin until stdin closes,
|
|
3
|
+
or until a second passes with nothing more, so a shell that leaves stdin open is not kept waiting; it reads nothing
|
|
4
|
+
from a terminal. It always exits 0, since a host shows the user an error on any other status and gives the agent
|
|
5
|
+
nothing; a failure prints one `principles:` line naming it.
|
|
6
|
+
|
|
7
|
+
It looks at the call's own directory first, then each directory its command changed into with `cd` or ran `git -C` in,
|
|
8
|
+
and reports on the first mapped repository whose HEAD a commit moved during the call: its HEAD reflog was written
|
|
9
|
+
since the call started, and not by a checkout or a reset, which bring in no new commit. The output is the hook's JSON,
|
|
10
|
+
whose `hookSpecificOutput.additionalContext` names each changed member and the `list-member-problems` command that
|
|
11
|
+
shows it, or prints nothing when the commits changed no mapped member. A call that committed nothing costs a few git
|
|
12
|
+
calls and loads nothing else of this tool. A host that gives no call duration, as Codex does not, is read as a call
|
|
13
|
+
that took no time, so a commit made more than a few seconds before a long call ended is left to the next session
|
|
14
|
+
start.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Run by a SessionStart hook, not by the agent: it prints what the agent should act on as a session starts, and the host
|
|
2
|
+
adds that to the agent's context. It reads the hook's JSON on stdin until stdin closes, or until a second passes with
|
|
3
|
+
nothing more, so a shell that leaves stdin open is not kept waiting; it reads nothing from a terminal. It always exits
|
|
4
|
+
0, since a host adds a SessionStart hook's output to the context only on 0, and shows the user an error on any other
|
|
5
|
+
status. In a project with no maps it prints nothing.
|
|
6
|
+
|
|
7
|
+
Otherwise each line it prints starts `principles:`. The first, the meta-principle's reminder, says that what loads at
|
|
8
|
+
session start costs every session's context; a resumed session holds it already, so it is left out when the input's
|
|
9
|
+
`source` is `resume`. Input that is not JSON, or names no source a host sends, is read as a startup. Then one line for
|
|
10
|
+
each principle with a member an audit assessed that changed since, counting them, with the
|
|
11
|
+
`list-member-problems ID --short` command that lists them, and last where to start with them: the principles skill
|
|
12
|
+
under the plugin, else those commands. An edit to a member no audit has assessed is not counted here, since it
|
|
13
|
+
carries no verdict to act on. In git, a line follows for each principle with members no baseline holds yet, as a
|
|
14
|
+
session that ended mid-mapping leaves them, saying which files to commit, or the audit to run when every file is
|
|
15
|
+
committed already. Outside git only an audit gives a baseline, so that line would repeat at every
|
|
16
|
+
session, and is left out. Then a line for each principle whose audit record a later release of principles wrote: this
|
|
17
|
+
copy does not check its members, so none of them is counted, and the line says how to update. Then, while any
|
|
18
|
+
principle awaits its first full audit, one line counting them, naming none, asks the agent to tell the user and start
|
|
19
|
+
one background subagent to follow `show-first-audit-brief`, or to offer the audit at its next pause if it cannot.
|
|
20
|
+
At resume and compact, when one may be running already, it gives the count alone and asks for no second one.
|
|
21
|
+
Last, while any finding an audit deferred or accepted is open, the one line `list-open-findings --short` prints, worded
|
|
22
|
+
for the session's start, and short on resume, whose conversation holds the whole line already.
|
|
23
|
+
|
|
24
|
+
When the maps or members cannot be read, as `list-member-problems` would refuse, it prints instead the refusal's code
|
|
25
|
+
and that command, whose refusal says why and how to repair it, and still exits 0. Stdin that cannot be read is read as
|
|
26
|
+
empty input. Any other failure prints one `principles:` line naming it, and exits 0 too.
|
|
@@ -23,24 +23,26 @@ sentence with hard-wrapped lines joined, or null with the reason. If that line i
|
|
|
23
23
|
pointer before you submit. Nothing is shown until an answer writes a record, so in git a full audit's
|
|
24
24
|
first appears at the answer that completes it.
|
|
25
25
|
|
|
26
|
-
When a full audit's assessment
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
When a full audit's assessment carries a member forward whose kept assessment names a finding the answer decides
|
|
27
|
+
other than still_holds, `carried_assessments_citing_decided_findings` lists it with those `finding_ids`, as a fact
|
|
28
|
+
to judge before you submit: ids repeat across records, so nothing is refused.
|
|
29
|
+
|
|
30
|
+
When a full audit's assessment sets a prior finding's `recorded_at` to null, `prior_findings_pointers_dropped`
|
|
31
|
+
names each finding whose write-up pointer that drops, with the pointer, so you confirm the drop is meant.
|
|
32
|
+
|
|
33
|
+
When a deferred finding the record keeps open gives `recorded_at` null, `next_action`'s first line names it: null
|
|
34
|
+
is allowed when there is nowhere to point, and then `list-open-findings` prints no write-up for it.
|
|
35
|
+
|
|
36
|
+
When a full audit's assessment has findings, `next_action` names the command that prints the correction's answer
|
|
37
|
+
it leads to, `--as template`, with its `request_id` and the `basis` digests filled in, so you never copy them by
|
|
38
|
+
hand; `show-open-correction ID` prints the same answer once the assessment is submitted. Redirect it to a file
|
|
39
|
+
outside the project, such as under `$TMPDIR`, and fill only its `dispositions`: each `action` names the four actions
|
|
40
|
+
and what each adds. Submit it after the assessment, as `next_action` says; the assessment writes the open record the
|
|
41
|
+
correction is checked against. `--as template` refuses with `no_correction_to_fill` an answer that leads to none.
|
|
42
|
+
|
|
43
|
+
`correction_recovery` says to keep a copy of the assessment you submit, or for `--file -` its exact stdin bytes,
|
|
44
|
+
until the correction completes the audit, and ends with `show-open-correction ID`, which prints the correction's
|
|
45
|
+
answer again from the open record once the assessment is submitted, in git or outside it and after fixes too.
|
|
44
46
|
|
|
45
47
|
When a correction's fixed disposition lists `changed_map_entries`, `map_entry_changes` names each such member by
|
|
46
48
|
`member_id`, under its id after any `moved_members`, with each of its `role` and `check` that changed since the
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
A principle's first full audit reads tens of kilobytes, which would crowd the context of a session busy with
|
|
2
|
+
its user's task. This command is for the background subagent that session starts to run that audit instead.
|
|
3
|
+
It writes nothing.
|
|
4
|
+
|
|
5
|
+
With no ID it lists, under `awaiting_first_audit`, the principles `list-member-problems` names as awaiting
|
|
6
|
+
a first full audit, and its `next_action` gives each one's brief command on a line of its own. Leave out any
|
|
7
|
+
your instructions or memory say to skip, and run one.
|
|
8
|
+
|
|
9
|
+
For principle ID it prints `principle`, `brief` and an empty `wrote`. The `brief` is what the subagent follows:
|
|
10
|
+
stop and say so if a principles command would ask the user's permission; read the request with
|
|
11
|
+
`start-audit ID --part index` and each part it names; fill the template `start-audit ID --as template` prints,
|
|
12
|
+
check it with `show-answer-check` and submit it with `submit-answer`; commit nothing and edit no member file,
|
|
13
|
+
in place of the completed result's commit step; and return at most about 600 bytes: a one-sentence conclusion,
|
|
14
|
+
each finding that needs the user, each path written, and the commands the completed result offers the user.
|
|
15
|
+
The session that started it commits the record by its path, or tells the user it is ready to commit.
|
|
16
|
+
|
|
17
|
+
It refuses with `first_audit_completed` once a full audit of principle ID has completed, since its later
|
|
18
|
+
audits start from `list-member-problems`; its repair names the command that lists the principles still
|
|
19
|
+
awaiting a first full audit.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Use it to give a project the reports the principles plugin's hooks give, when this tool is installed as a gem
|
|
2
|
+
without the plugin: at each session's start, what the agent should act on, and after each shell call that commits,
|
|
3
|
+
the mapped members the commit changed. Without them, a changed member goes unseen until someone runs
|
|
4
|
+
`list-member-problems`.
|
|
5
|
+
|
|
6
|
+
It writes nothing. First, when the `principles` on PATH is not this copy, `principles_on_path` says so: none there
|
|
7
|
+
prints its version, so every entry would print its failure line, or another version is first, which the entries would
|
|
8
|
+
run instead; show it to the user before the entries. It prints, under `hosts`, Claude Code's entries first, for its
|
|
9
|
+
gitignored `.claude/settings.local.json`, then Codex's, for `.codex/hooks.json`, each with the `file` they go in, why
|
|
10
|
+
the block is `offered`, and the `entries` to merge into its `hooks`. Each entry runs `principles` as found on PATH,
|
|
11
|
+
so an upgrade leaves it unchanged, and echoes that principles failed to start when it cannot run, instead of failing
|
|
12
|
+
the hook. `next_action` says to write them only once the user agrees, and how to remove them: delete the entries
|
|
13
|
+
whose command starts `principles report-`, as when the plugin is enabled, since the reports would come twice.
|
|
@@ -25,7 +25,9 @@ it has no import, since its text was not read. `passage` gives the passage's tex
|
|
|
25
25
|
`estimated_tokens`, since it loads in every session, and `presumes` says what it asks of a teammate without
|
|
26
26
|
`principles`. `runs_from` says whether this run came from the Claude Code plugin or from the command line, and
|
|
27
27
|
`session_start_hook_in_this_session` whether the plugin's session-start hook, which reports changed members, runs
|
|
28
|
-
in the session this run is part of.
|
|
28
|
+
in the session this run is part of. While it does not, `hook_setup` names `show-hook-setup`, which prints the hook
|
|
29
|
+
entries that report changed members without the plugin. Neither says anything of a teammate's sessions, which this
|
|
30
|
+
tool cannot see, so
|
|
29
31
|
weigh with the user who the passage serves.
|
|
30
32
|
|
|
31
33
|
Run again before the passage is mapped, it proposes the same again. Where the map is already there, it shows the map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Prints the answer to fill for the correction a full audit's assessment with findings opened, which
|
|
2
|
+
`submit-answer` names rather than prints. Print it again whenever you lose it; you need not submit the assessment
|
|
3
|
+
again. It reads principle ID's open audit record and writes nothing.
|
|
4
|
+
|
|
5
|
+
It prints the correction's answer alone: its `request_id` and `basis`, which you hand back unchanged, and one disposition for each finding to fill.
|
|
6
|
+
Redirect it to a file outside the project, such as under `$TMPDIR`, fill only its `dispositions`, and
|
|
7
|
+
submit it with `submit-answer --file FILE`. It prints the same answer in git and outside it, and still
|
|
8
|
+
after you fix members, which leaves the correction current; `submit-answer` checks it as usual.
|
|
9
|
+
|
|
10
|
+
It refuses with `no_open_correction` while none is open to print. With no audit open, or only a completed
|
|
11
|
+
one, its repair names the full audit to start. With an audit open whose record an earlier release wrote,
|
|
12
|
+
which keeps no correction, it says to submit the assessment again, which prints its correction and keeps it.
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
Asks you to assess every member of principle ID and the set as a whole. Run it after mapping
|
|
2
|
-
|
|
1
|
+
Asks you to assess every member of principle ID and the set as a whole. Run it after mapping and when `show-principle`
|
|
2
|
+
reports a member changed, unassessed, locator_lost or unavailable. `--part PART` prints one part, a member's with its
|
|
3
|
+
`text` and `lines_in_text`, an instruction or `response_template` as printed (`part_empty` if empty), `--as template
|
|
4
|
+
--part members/ID` a slot; `--part index` lists `part_command`, each one's `bytes`, whether `this_audit` `judges` or
|
|
5
|
+
`carries_forward` a member, as `read_in_parts` says, `trimmed_instructions`, then `answer_with` and the `next_action`.
|
|
3
6
|
|
|
4
7
|
`start-audit` itself writes nothing. `submit-answer` writes the audit record, `.principles/audits/ID.json`: a full audit
|
|
5
8
|
writes it open when its assessment has findings, completed once it has none or its correction is accepted. In git,
|
|
@@ -17,8 +20,6 @@ other principles' members on its lines, judged by `mapped_elsewhere_instruction`
|
|
|
17
20
|
changed or untracked files, `not_named` the rest. `--instruction FIELD` prints whole any `trimmed_instructions` lists. A
|
|
18
21
|
meta-principle audit adds `package_since_last_audit`, `passage_changed` and `other_principles_with_unjudged_changes`.
|
|
19
22
|
|
|
20
|
-
## Since the last full audit
|
|
21
|
-
|
|
22
23
|
After a full audit, a member carries `carried_forward`, with its `assessed_at`, an observed one's `observed_at` (or
|
|
23
24
|
`observed_at_from_assessed_at`), `evidence_changed` and, in git, `file_changed_outside_member`, or `judge_because` with
|
|
24
25
|
`read_the_change`, a moved one `moved_from`; a carried one prints whole if a fact fires or a finding is open on it;
|
|
@@ -40,29 +41,27 @@ lost item. Decide each in `prior_finding_decisions` as `still_holds`, `resolved`
|
|
|
40
41
|
## Members to check against the activation
|
|
41
42
|
|
|
42
43
|
When the principle's activation is a set of files, `context.loads_to_check_against_activation` lists each member whose
|
|
43
|
-
file Claude Code loads at session start, with its `loads` and `listed_for`, to weigh
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
hook names, and anything under an invoked or always activation or in a one-member audit.
|
|
44
|
+
file Claude Code loads at session start, with its `loads` and `listed_for`, for you to weigh; this tool compares no
|
|
45
|
+
globs, and `not_listed_no_known_carrier` names those with no known carrier. Decide each row in `loading_decisions` as
|
|
46
|
+
`context.loads_to_check_instruction` explains, or it is refused as `incomplete_loading_decisions`. An accepted decision
|
|
47
|
+
is kept as `loading_accepted`, which the next audit shows as `last_accepted`, with `last_accepted.since_accepted` and
|
|
48
|
+
whether `member_text` or `loading` changed. Not listed yet: members loading on files, skills or agents, ones a hook
|
|
49
|
+
names or this tool could not determine, and any under an invoked or always activation or in a one-member audit.
|
|
50
50
|
|
|
51
51
|
## One member's edit: `--member`
|
|
52
52
|
|
|
53
53
|
Use `--member MEMBER` when one member was edited but still says the same thing, as `list-member-problems --help`
|
|
54
|
-
describes
|
|
55
|
-
|
|
56
|
-
`
|
|
57
|
-
|
|
58
|
-
quotes.
|
|
59
|
-
writes the record once its answer is accepted, keeping the edit in
|
|
60
|
-
`cannot_acknowledge` outside git, while an audit is open, and for a member no completed audit assessed, whose
|
|
61
|
-
text does not match the audit record, whose check is not the one that audit ran, or whose `check_result` is not
|
|
62
|
-
run a full audit. A member moved with `move-member` since its baseline carries `evidence_at_baseline`, and one
|
|
54
|
+
describes, or `list-member-problems --short` repeats it until a full audit. It shows `baseline_commit`, `member_lines`
|
|
55
|
+
(or a large member's `changed_region` or `changed_regions`, `context_lines`, `from_line`, `unchanged_lines_skipped` or
|
|
56
|
+
`read_instead`), `first_changed_lines`, `read_the_change`, `check_instruction`, its `deferred_findings` and
|
|
57
|
+
`accepted_findings`, with `deferred_findings_kept` and `change_shown_under` across principles; its `question` asks for
|
|
58
|
+
`meaning_kept`. This tool checks both quotes. A near-miss id is refused as `unknown_member` with `did_you_mean`. A
|
|
59
|
+
one-member audit writes the record once its answer is accepted, keeping the edit in `acknowledgements`; commit it. It is
|
|
60
|
+
refused as `cannot_acknowledge` outside git, while an audit is open, and for a member no completed audit assessed, whose
|
|
61
|
+
baseline text does not match the audit record, whose check is not the one that audit ran, or whose `check_result` is not
|
|
62
|
+
a pass: run a full audit. A member moved with `move-member` since its baseline carries `evidence_at_baseline`, and one a
|
|
63
63
|
full audit's correction fixed carries `audit_base_commit`: judge only the change since `baseline_commit`.
|
|
64
64
|
|
|
65
65
|
## Outside git
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
it, it keeps the prior findings to list again; one opened by an older version of this tool kept none.
|
|
67
|
+
Outside git, the open record also keeps what the audit began from and, until its correction completes, prior findings.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Gives your answer, filled from
|
|
1
|
+
Gives your answer, filled from its template, to the request its `request_id` names; a REQUEST_ID you give must
|
|
2
2
|
match. Pass a JSON FILE outside the project with `--file FILE`; `--file -` reads stdin. This tool writes audit records
|
|
3
3
|
at `.principles/audits/ID.json`, never member guidance. In a full audit, make each fix after the assessment is accepted
|
|
4
4
|
and before you submit the correction that reports it; earlier fixes cause `stale_request` before an assessment's shape
|
|
@@ -40,14 +40,15 @@ principle also maps, `other_principles_with_changed_members` names each such pri
|
|
|
40
40
|
findings' files, by `id` with the `state` `list-member-problems` gives: `changed` when its text now differs from its
|
|
41
41
|
baseline, or `locator_lost` or `unavailable` when the fix broke where this tool finds it, which its `repair_with` on
|
|
42
42
|
`show-principle ID` repairs. Then re-audit that principle, or acknowledge a member's edit with `start-audit ID --member
|
|
43
|
-
MEMBER`. A changed file no fixed finding names is not checked. `
|
|
44
|
-
|
|
43
|
+
MEMBER`. A changed file no fixed finding names is not checked. A correction's `next_action` names `show-open-correction
|
|
44
|
+
ID`, printing its answer, not in this result, to save, edit by hand and submit. `correction_recovery` says
|
|
45
|
+
what to retain; `show-answer-check --help` covers `carried_assessments_citing_decided_findings`.
|
|
45
46
|
|
|
46
47
|
In git, this tool reads the map at the audit base: fixed dispositions declare roles/checks in `changed_map_entries`,
|
|
47
48
|
text/additions in `changed_members`, removals in `removed_members`. `invalid_removed_members` rejects invalid removal
|
|
48
49
|
claims; `empty_correction_map` requires a survivor/replacement. Source files stay intact.
|
|
49
50
|
`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
|
|
51
|
+
Role/removal claims require git (`map_entries_need_git`). Full rules: correction question, `show-answer-check --help`.
|
|
51
52
|
|
|
52
53
|
For a `start-audit --member` request, `quote_not_found` refuses an `old_line` or `new_line` not a line only its side
|
|
53
54
|
holds, or "" where `first_changed_lines` is not, and one left out reads as printed; else it prints `acknowledged`.
|
data/lib/principles/views/prompts/report-the-completed-audit/commit-only-what-the-audit-changed.md
CHANGED
|
@@ -2,5 +2,5 @@ Before using this recipe, inspect the diff for every file in `files_to_commit` a
|
|
|
2
2
|
each change is authorized and respects its ownership. Listing a file here grants no permission.
|
|
3
3
|
Follow the project's existing review, verification and commit-message rules.
|
|
4
4
|
|
|
5
|
-
Commit %{files}, and nothing else staged, with the command
|
|
6
|
-
message as `commit_message_to_replace` says.
|
|
5
|
+
Commit %{files}, and nothing else staged, with the `commit_with` command, after replacing its default `-m`
|
|
6
|
+
message as `commit_message_to_replace` says.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Run the first full audit of %{id} in the background.
|
|
2
|
+
|
|
3
|
+
1. If a principles command would ask the user's permission, run none and return only: offer this audit to the user
|
|
4
|
+
at a pause, since principles would ask.
|
|
5
|
+
|
|
6
|
+
2. Read the request in parts, which costs about the bytes of the whole request and its member files. Type
|
|
7
|
+
part_command and then the part as printed, never in a shell variable. Its parts: %{index}
|
|
8
|
+
|
|
9
|
+
3. Keep every answer file at $TMPDIR/principles-%{id}-answer.json, never in the project. Redirect the template
|
|
10
|
+
below there and edit it, running each member check the request names and no script over this output.
|
|
11
|
+
Check it with show-answer-check, then submit-answer, each with --file and that path; answer a
|
|
12
|
+
correction the same way. On a stale_request refusal, start once more. Its template: %{template}
|
|
13
|
+
|
|
14
|
+
4. Skip the completed result's commit and report: commit nothing, edit no member file.
|
|
15
|
+
|
|
16
|
+
5. Return at most 600 bytes, nothing else: a sentence on whether the members carry %{id}; a line per finding that
|
|
17
|
+
needs the user, its id and question; each path under wrote, from the project root; each command next_action offers
|
|
18
|
+
the user, a line each, from its subcommand on.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Show the user the entries for the host this session runs in, and the file they go in, and write them, merged into
|
|
2
|
+
any hooks the file already has, only once the user agrees. Leave them out of a committed settings file unless
|
|
3
|
+
every teammate has principles installed, since each hook would fail for one who has not. Codex runs them only once
|
|
4
|
+
the user trusts them in /hooks.
|
|
5
|
+
|
|
6
|
+
They run the session-start and after-commit reports that the principles plugin's hooks run. To remove them, as when
|
|
7
|
+
the principles plugin is enabled and the reports would come twice, delete the entries whose command starts
|
|
8
|
+
`principles report-`.
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
%{
|
|
2
|
-
%{when} list %{them}, then raise in one short message any waiting on the user or no one named. Judge by
|
|
3
|
-
context, such as git's user name, whether a named person is your user; if unsure, raise it. Do not raise any
|
|
4
|
-
waiting on someone else, or that you can see you raised in this conversation. Whom %{each} waits on:
|
|
5
|
-
%{command}
|
|
1
|
+
%{facts} %{raise} in your %{reply} reply; nothing else will.%{command}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Run each command above; its output says what to do next.
|
|
@@ -56,7 +56,7 @@ module Principles
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
# The text with each placeholder filled. Text with no values is left as it is, since a prompt may hold a
|
|
59
|
-
# literal %, but one holding a placeholder is refused, so it never reaches the agent unfilled
|
|
59
|
+
# literal %, but one holding a placeholder is refused, so it never reaches the agent unfilled.
|
|
60
60
|
#: (Hash[Symbol, String]) -> String
|
|
61
61
|
def filled(values)
|
|
62
62
|
return format(@text, **values) unless values.empty?
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require_relative "diff_since_last_audit"
|
|
5
|
+
require_relative "line_history_since_last_audit"
|
|
6
|
+
|
|
7
|
+
module Principles
|
|
8
|
+
# What this tool prints, from plain values a controller hands it. views/CLAUDE.md owns the boundary.
|
|
9
|
+
module Views
|
|
10
|
+
# The command a member's read_the_change prints: the history of its own lines when it is handed them, else the
|
|
11
|
+
# diff of its file over its paths.
|
|
12
|
+
class ReadTheChange
|
|
13
|
+
# since is the commit the change is read from; paths are the member's file then and now, once each; lines are
|
|
14
|
+
# its first_line and last_line now, given only when Member#traced_by_lines? says its change reads by them; to
|
|
15
|
+
# is the commit the change ends at, which holds the file as it is now, or nil for HEAD and the files now.
|
|
16
|
+
#: (since: String, paths: Array[String], lines: Hash[String, Integer]?, ?to: String?) -> void
|
|
17
|
+
def initialize(since:, paths:, lines:, to: nil)
|
|
18
|
+
@since = since
|
|
19
|
+
@paths = paths
|
|
20
|
+
@lines = lines
|
|
21
|
+
@to = to
|
|
22
|
+
freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
#: () -> String
|
|
26
|
+
def to_s
|
|
27
|
+
lines = @lines
|
|
28
|
+
return DiffSinceLastAudit.new(last_audited_commit: @since, paths: @paths, to: @to).to_s unless lines
|
|
29
|
+
|
|
30
|
+
LineHistorySinceLastAudit.new(last_audited_commit: @since, path: @paths.fetch(0),
|
|
31
|
+
first_line: lines.fetch("first_line"), last_line: lines.fetch("last_line"),
|
|
32
|
+
to: @to).to_s
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -5,7 +5,7 @@ module Principles
|
|
|
5
5
|
# What this tool prints, from plain values a controller hands it. views/CLAUDE.md owns the boundary.
|
|
6
6
|
module Views
|
|
7
7
|
# One principle whose audit record a later copy wrote, at a format this copy cannot rewrite, so its audits and
|
|
8
|
-
# acknowledgements wait on an upgrade, which list-member-problems states instead of offering them
|
|
8
|
+
# acknowledgements wait on an upgrade, which list-member-problems states instead of offering them. The
|
|
9
9
|
# session-start hook prints its line from --short's stderr, matching "audit record is format N, first written
|
|
10
10
|
# by release", so a reword of that phrase changes the hook too.
|
|
11
11
|
class RecordWaitingOnAnUpgrade
|
|
@@ -32,7 +32,7 @@ module Principles
|
|
|
32
32
|
def beside = { "record_waiting_on_an_upgrade" => to_s }
|
|
33
33
|
|
|
34
34
|
# As list-principles marks the principle's row: the format alone, since its next_action says once how to update,
|
|
35
|
-
# where the whole line on each row repeated it
|
|
35
|
+
# where the whole line on each row repeated it.
|
|
36
36
|
#: () -> Hash[String, Hash[String, untyped]]
|
|
37
37
|
def marker = { "record_waiting_on_an_upgrade" => record_format }
|
|
38
38
|
|