principles 0.0.6 → 0.0.8
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 +383 -0
- data/LICENSE +202 -0
- data/NOTICE +4 -0
- data/README.md +111 -0
- data/exe/principles +20 -0
- data/lib/principles/after_commit_hook_options.rb +2 -2
- data/lib/principles/cli.rb +58 -41
- data/lib/principles/command_line.rb +37 -14
- data/lib/principles/command_routes.rb +21 -7
- data/lib/principles/controllers/acknowledgement.rb +50 -118
- data/lib/principles/controllers/acknowledgements.rb +154 -0
- data/lib/principles/controllers/after_commit_report.rb +44 -0
- data/lib/principles/controllers/answer.rb +52 -21
- data/lib/principles/controllers/answer_phase.rb +20 -3
- data/lib/principles/controllers/assessment.rb +41 -28
- data/lib/principles/controllers/audit.rb +59 -15
- data/lib/principles/controllers/audit_completion.rb +25 -12
- data/lib/principles/controllers/command.rb +13 -12
- data/lib/principles/controllers/correction.rb +26 -11
- data/lib/principles/controllers/first_audit_brief.rb +40 -0
- data/lib/principles/controllers/full_audit_request.rb +47 -83
- data/lib/principles/controllers/hook_setup.rb +49 -0
- data/lib/principles/controllers/inventory.rb +10 -8
- data/lib/principles/controllers/mapping.rb +2 -2
- data/lib/principles/controllers/member_acknowledgement.rb +148 -0
- data/lib/principles/controllers/member_entries.rb +4 -4
- data/lib/principles/controllers/member_problems_report.rb +84 -30
- 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 +67 -12
- 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 +14 -7
- data/lib/principles/data/running_version.rb +10 -8
- data/lib/principles/data/schema_check.rb +5 -5
- data/lib/principles/data/schemas/acknowledgement-answer.schema.json +86 -20
- data/lib/principles/data/schemas/acknowledgements-answer.schema.json +95 -0
- data/lib/principles/data/schemas/assessment-answer.schema.json +55 -20
- 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 +14 -62
- 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 +7 -6
- data/lib/principles/launch.rb +49 -0
- data/lib/principles/list_open_findings_options.rb +23 -0
- data/lib/principles/models/accepted_loading.rb +2 -2
- data/lib/principles/models/acknowledged_check.rb +106 -0
- data/lib/principles/models/acknowledgement.rb +51 -53
- data/lib/principles/models/acknowledgement_left_as_printed.rb +18 -5
- data/lib/principles/models/acknowledgement_refusal.rb +25 -10
- data/lib/principles/models/acknowledgements.rb +115 -0
- 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 +12 -3
- 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 +14 -15
- data/lib/principles/models/audit.rb +46 -34
- data/lib/principles/models/audit_record.rb +58 -27
- 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 +19 -10
- 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 +4 -4
- 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 +80 -0
- data/lib/principles/models/listed_members.rb +47 -0
- data/lib/principles/models/loaded_files.rb +4 -5
- data/lib/principles/models/loading_decision.rb +19 -10
- data/lib/principles/models/loading_facts.rb +1 -1
- data/lib/principles/models/loads_to_check.rb +1 -2
- 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 +17 -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 +21 -18
- data/lib/principles/models/member_repair_moves.rb +15 -9
- data/lib/principles/models/member_sighting.rb +12 -15
- 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 +36 -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 +42 -9
- data/lib/principles/models/project.rb +29 -20
- 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 +42 -36
- data/lib/principles/models/request_id.rb +19 -7
- data/lib/principles/models/runs_from.rb +7 -2
- data/lib/principles/models/sent_answer.rb +38 -16
- 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 +15 -7
- data/lib/principles/prose_list.rb +1 -1
- data/lib/principles/session_start_options.rb +3 -3
- data/lib/principles/start_audit_options.rb +54 -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 +137 -17
- 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 +68 -38
- data/lib/principles/views/assessment_request.rb +43 -21
- 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 +100 -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 +51 -39
- 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 +49 -33
- data/lib/principles/views/diff_since_last_audit.rb +8 -6
- data/lib/principles/views/findings_result.rb +33 -1
- 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 +32 -9
- 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 +11 -7
- 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 +61 -0
- data/lib/principles/views/members_a_commit_changed.rb +15 -11
- data/lib/principles/views/members_with_no_baseline.rb +10 -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 +24 -12
- data/lib/principles/views/open_findings_elsewhere_result.rb +5 -2
- data/lib/principles/views/open_findings_line.rb +26 -36
- 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 +5 -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 +70 -45
- data/lib/principles/views/problem_result.rb +75 -43
- 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/report-the-exit-status-its-own-listing-gives.md +3 -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-each-change-keeps-its-meaning.md +8 -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/decide-each-member-loading.md +2 -1
- 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/run-the-check-then-report-it.md +2 -2
- data/lib/principles/views/prompts/assess-every-member/run-the-reviewed-check-and-say-what-its-review-rested-on.md +5 -3
- 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/every-command-and-how-they-chain.md +1 -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 +16 -16
- data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +65 -61
- 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 +22 -20
- 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 +27 -28
- data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +39 -38
- 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 +3 -4
- data/lib/principles/views/prompts/start-a-session/every-loaded-line-costs-every-session.md +1 -0
- 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/start-a-session/start-with-the-principles-skill.md +1 -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 +95 -14
- 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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "assessment-answer.schema.json",
|
|
4
4
|
"title": "Assessment answer",
|
|
5
|
-
"description": "What an agent answers an audit's assessment request with: the request's id and basis, an assessment of each member and of the set, a recent decision, and any findings. Fields this tool does not read are refused, to catch a misspelt field
|
|
5
|
+
"description": "What an agent answers an audit's assessment request with: the request's id and basis, an assessment of each member and of the set, a recent decision, and any findings. Fields this tool does not read are refused, to catch a misspelt field. The rules across fields, such as which members exist, stay in Models::AssessmentAnswer.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": [
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
"basis",
|
|
11
11
|
"member_assessments",
|
|
12
12
|
"collective_assessment",
|
|
13
|
-
"recent_decision"
|
|
14
|
-
"findings"
|
|
13
|
+
"recent_decision"
|
|
15
14
|
],
|
|
16
15
|
"properties": {
|
|
17
16
|
"request_id": {
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
"required": [
|
|
51
50
|
"member_id"
|
|
52
51
|
],
|
|
53
|
-
"description": "A fresh assessment, with assessment, delivery and evidence, or the marker carried_forward: true for a member the request carries forward
|
|
52
|
+
"description": "A fresh assessment, with assessment, delivery and evidence, or the marker carried_forward: true for a member the request carries forward. Models::MemberAssessments refuses an entry that is neither.",
|
|
54
53
|
"properties": {
|
|
55
54
|
"member_id": {
|
|
56
55
|
"type": "string"
|
|
@@ -71,7 +70,7 @@
|
|
|
71
70
|
"observed_at": {
|
|
72
71
|
"type": ["string", "null"],
|
|
73
72
|
"minLength": 1,
|
|
74
|
-
"description": "On an observed delivery only, when the agent saw what observation describes, if that was before this audit; omitted or null, it is this audit's time, so the agent never types a clock time
|
|
73
|
+
"description": "On an observed delivery only, when the agent saw what observation describes, if that was before this audit; omitted or null, it is this audit's time, so the agent never types a clock time. Models::MemberSighting refuses it on not_observed, one not a time to the second as audited_at is, such as 2026-11-01T09:30:00Z, whose UTC offset, such as +05:30, it reads as the same instant in UTC, and one after the answer, and refuses an observation repeated word for word from the last full audit as observation_repeats_last_audit unless it is that audit's date or null."
|
|
75
74
|
},
|
|
76
75
|
"evidence": {
|
|
77
76
|
"type": "array",
|
|
@@ -106,20 +105,22 @@
|
|
|
106
105
|
"required": [
|
|
107
106
|
"command"
|
|
108
107
|
],
|
|
109
|
-
"description": "A member check's result as the agent reports it: the command, exactly as the map names it, its exit_status or, when it could not be run, not_run_reason, and review_basis, one line saying what the review before the run rested on, which an exit_status for a check the stored record did not run needs
|
|
108
|
+
"description": "A member check's result as the agent reports it: the command, exactly as the map names it, its exit_status or, when it could not be run, not_run_reason, and review_basis, one line saying what the review before the run rested on, which an exit_status for a check the stored record did not run needs. Models::AssessmentAnswer refuses any other combination with invalid_check_result.",
|
|
110
109
|
"properties": {
|
|
111
110
|
"command": {
|
|
112
111
|
"type": "string"
|
|
113
112
|
},
|
|
114
113
|
"exit_status": {
|
|
115
114
|
"type": ["integer", "string"],
|
|
116
|
-
"description": "The run's exit status. A string is the template's placeholder, left unfilled, which Models::ReportedCheck reads as not given
|
|
115
|
+
"description": "The run's exit status. A string is the template's placeholder, left unfilled, which Models::ReportedCheck reads as not given."
|
|
117
116
|
},
|
|
118
117
|
"not_run_reason": {
|
|
119
|
-
"type": "string"
|
|
118
|
+
"type": ["string", "null"],
|
|
119
|
+
"description": "Why the check could not be run. Null, as a template to edit prints it, is none."
|
|
120
120
|
},
|
|
121
121
|
"review_basis": {
|
|
122
|
-
"type": "string"
|
|
122
|
+
"type": ["string", "null"],
|
|
123
|
+
"description": "What the review before the run rested on. Null drops an unchanged check's kept line."
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
}
|
|
@@ -128,7 +129,41 @@
|
|
|
128
129
|
},
|
|
129
130
|
"left_as_printed_rule": {
|
|
130
131
|
"type": "string",
|
|
131
|
-
"description": "The note start-audit --as template prints at its head saying how a field left as printed is read, which an answer may send back and Models::AssessmentAnswer ignores, whatever it holds
|
|
132
|
+
"description": "The note start-audit --as template prints at its head saying how a field left as printed is read, which an answer may send back and Models::AssessmentAnswer ignores, whatever it holds."
|
|
133
|
+
},
|
|
134
|
+
"carried_checks_to_run": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": {
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
"description": "The carried members whose check start-audit --as template still asks to run, which an answer may send back and Models::AssessmentAnswer ignores."
|
|
140
|
+
},
|
|
141
|
+
"shared_check_instructions": {
|
|
142
|
+
"type": "array",
|
|
143
|
+
"items": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"required": ["member_ids", "instruction"],
|
|
147
|
+
"properties": {
|
|
148
|
+
"member_ids": {
|
|
149
|
+
"type": "array",
|
|
150
|
+
"items": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"instruction": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"description": "How to run and report the checks of each standing once, with the members it is for, which start-audit --as template prints at its head, and an answer may send back and Models::AssessmentAnswer ignores."
|
|
160
|
+
},
|
|
161
|
+
"check_instructions": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": {
|
|
164
|
+
"type": "string"
|
|
165
|
+
},
|
|
166
|
+
"description": "Each checked member's own lines beside shared_check_instructions, by member id, which start-audit --as template prints at its head, and an answer may send back and Models::AssessmentAnswer ignores."
|
|
132
167
|
},
|
|
133
168
|
"collective_assessment": {
|
|
134
169
|
"type": "string"
|
|
@@ -145,7 +180,7 @@
|
|
|
145
180
|
},
|
|
146
181
|
"evidence": {
|
|
147
182
|
"type": ["array", "string"],
|
|
148
|
-
"description": "Pointers to where the decision is recorded. A string is the template's placeholder, left as printed, which Models::RecentDecision reads as not given
|
|
183
|
+
"description": "Pointers to where the decision is recorded. A string is the template's placeholder, left as printed, which Models::RecentDecision reads as not given.",
|
|
149
184
|
"items": {
|
|
150
185
|
"type": "object",
|
|
151
186
|
"required": [
|
|
@@ -174,7 +209,7 @@
|
|
|
174
209
|
}
|
|
175
210
|
},
|
|
176
211
|
"loading_decisions": {
|
|
177
|
-
"description": "One decision for each member the request lists in loads_to_check_against_activation
|
|
212
|
+
"description": "One decision for each member the request lists in loads_to_check_against_activation. Which decision each needs, and its reason, is checked by Models::LoadsToCheck.",
|
|
178
213
|
"type": "array",
|
|
179
214
|
"items": {
|
|
180
215
|
"type": "object",
|
|
@@ -189,7 +224,7 @@
|
|
|
189
224
|
}
|
|
190
225
|
},
|
|
191
226
|
"prior_finding_decisions": {
|
|
192
|
-
"description": "One decision for each finding the request lists in prior_findings
|
|
227
|
+
"description": "One decision for each finding the request lists in prior_findings. Which decision each needs, and its reason, is checked by Models::PriorFindings.",
|
|
193
228
|
"type": "array",
|
|
194
229
|
"items": {
|
|
195
230
|
"type": "object",
|
|
@@ -204,17 +239,17 @@
|
|
|
204
239
|
"action": { "type": "string" },
|
|
205
240
|
"first_raised_at": {
|
|
206
241
|
"type": "string",
|
|
207
|
-
"description": "On a still_holds decision, an earlier time the finding was first raised: the audited_at of the record that raised_in holds, which Models::FirstRaisedClaim checks
|
|
242
|
+
"description": "On a still_holds decision, an earlier time the finding was first raised: the audited_at of the record that raised_in holds, which Models::FirstRaisedClaim checks."
|
|
208
243
|
},
|
|
209
244
|
"raised_in": {
|
|
210
245
|
"type": "string",
|
|
211
246
|
"pattern": "^([0-9a-f]{40}([0-9a-f]{24})?|With first_raised_at: its record's commit, full sha; else leave)$",
|
|
212
247
|
"x-unmatched-advice": "is not this template's placeholder nor a full commit sha, as an answer filled from another template leaves it: start from this request's response_template",
|
|
213
|
-
"description": "The full sha of the commit whose audit record, at .principles/audits/ID.json or the earlier .memeplex/audits/ID.json, left this finding open at first_raised_at
|
|
248
|
+
"description": "The full sha of the commit whose audit record, at .principles/audits/ID.json or the earlier .memeplex/audits/ID.json, left this finding open at first_raised_at. The one other value is the template's placeholder, word for word, which Models::PriorFindingDecision reads as not given, so only a sha reaches git."
|
|
214
249
|
},
|
|
215
250
|
"waits_on": {
|
|
216
251
|
"type": ["string", "null"],
|
|
217
|
-
"description": "On a still_holds decision that leaves the finding deferred, a new one line saying whom it waits on and to decide what; null drops the one it carried. Leaving it out keeps it
|
|
252
|
+
"description": "On a still_holds decision that leaves the finding deferred, a new one line saying whom it waits on and to decide what; null drops the one it carried. Leaving it out keeps it."
|
|
218
253
|
},
|
|
219
254
|
"recorded_at": {
|
|
220
255
|
"x-type-refusal-advice": {
|
|
@@ -225,7 +260,7 @@
|
|
|
225
260
|
"says": "plus starting_at (or heading) when the file holds more than this finding"
|
|
226
261
|
},
|
|
227
262
|
"type": ["object", "null", "string"],
|
|
228
|
-
"description": "On a still_holds decision, a new pointer to the write-up, or null for none. A string is the template's placeholder, left as printed
|
|
263
|
+
"description": "On a still_holds decision, a new pointer to the write-up, or null for none. A string is the template's placeholder, left as printed.",
|
|
229
264
|
"required": ["path"],
|
|
230
265
|
"additionalProperties": false,
|
|
231
266
|
"properties": {
|
|
@@ -238,7 +273,7 @@
|
|
|
238
273
|
},
|
|
239
274
|
"evidence": {
|
|
240
275
|
"type": ["array", "string"],
|
|
241
|
-
"description": "On a resolved decision, pointers to where the fix shows. A string is the template's placeholder, left as printed, which Models::PriorFindingDecision reads as not given
|
|
276
|
+
"description": "On a resolved decision, pointers to where the fix shows. A string is the template's placeholder, left as printed, which Models::PriorFindingDecision reads as not given.",
|
|
242
277
|
"items": {
|
|
243
278
|
"type": "object",
|
|
244
279
|
"required": ["path"],
|
|
@@ -253,7 +288,7 @@
|
|
|
253
288
|
}
|
|
254
289
|
},
|
|
255
290
|
"problem_evidence": {
|
|
256
|
-
"description": "On a still_holds decision, pointers to where the problem is: for a finding marked evidence_not_kept, its evidence, which the record keeps
|
|
291
|
+
"description": "On a still_holds decision, pointers to where the problem is: for a finding marked evidence_not_kept, its evidence, which the record keeps; for one whose record keeps evidence, each the new place of the kept item named by replaces, its position in the finding's evidence, which must no longer be found. Models::StillHoldsRestatement refuses any other. A string is the template's placeholder, left as printed.",
|
|
257
292
|
"type": ["array", "string"],
|
|
258
293
|
"items": {
|
|
259
294
|
"type": "object",
|
|
@@ -265,7 +300,7 @@
|
|
|
265
300
|
"starting_at": { "type": "string" },
|
|
266
301
|
"ending_at": { "type": "string" },
|
|
267
302
|
"query": { "type": "string" },
|
|
268
|
-
"replaces": { "type": ["integer", "string"], "description": "The position of the kept item it replaces. A string is the template's placeholder, which Models::EvidenceReplacements refuses as naming no item
|
|
303
|
+
"replaces": { "type": ["integer", "string"], "description": "The position of the kept item it replaces. A string is the template's placeholder, which Models::EvidenceReplacements refuses as naming no item." }
|
|
269
304
|
}
|
|
270
305
|
}
|
|
271
306
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "audit-record.schema.json",
|
|
4
4
|
"title": "Audit record",
|
|
5
|
-
"description": "A principle's committed audit record, .principles/audits/ID.json: what the last audit began from, each member's hash when it was assessed, and each finding's outcome. Fields this schema does not name are allowed, so an older version can read a record a newer one wrote
|
|
5
|
+
"description": "A principle's committed audit record, .principles/audits/ID.json: what the last audit began from, each member's hash when it was assessed, and each finding's outcome. Fields this schema does not name are allowed, so an older version can read a record a newer one wrote.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["principle_id", "status", "map_version", "base_commit", "audited_at", "members", "findings"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"format": { "type": "integer", "description": "The record format, raised when a field is added that an older copy would drop on a rewrite. A record without it is older than format 1, and any copy may rewrite it
|
|
10
|
-
"format_first_release": { "type": "string", "minLength": 1, "description": "The first release that wrote this format, which a copy that does not know it names as the update to make
|
|
9
|
+
"format": { "type": "integer", "description": "The record format, raised when a field is added that an older copy would drop on a rewrite. A record without it is older than format 1, and any copy may rewrite it." },
|
|
10
|
+
"format_first_release": { "type": "string", "minLength": 1, "description": "The first release that wrote this format, which a copy that does not know it names as the update to make." },
|
|
11
11
|
"principle_id": { "type": "string", "minLength": 1 },
|
|
12
12
|
"status": { "enum": ["open", "completed"] },
|
|
13
13
|
"map_version": { "type": "string", "minLength": 1 },
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"sha256": { "type": "string", "minLength": 1 },
|
|
23
23
|
"key": { "type": "string", "minLength": 1, "description": "The member's key in the map, when it differs from the id this entry is filed under, because the member has moved." },
|
|
24
24
|
"assessment": {
|
|
25
|
-
"description": "The member's assessment as a full audit's agent gave it, which the next full audit may carry forward while the member and what it was judged on are unchanged
|
|
25
|
+
"description": "The member's assessment as a full audit's agent gave it, which the next full audit may carry forward while the member and what it was judged on are unchanged.",
|
|
26
26
|
"type": "object",
|
|
27
27
|
"required": ["assessment", "delivery", "evidence", "evidence_sha256", "assessed_at", "entry_sha256", "loads_sha256"],
|
|
28
28
|
"properties": {
|
|
29
29
|
"assessment": { "type": "string", "minLength": 1 },
|
|
30
30
|
"delivery": { "type": "string", "minLength": 1 },
|
|
31
31
|
"observation": { "type": "string" },
|
|
32
|
-
"observed_at": { "type": "string", "minLength": 1, "description": "On an observed delivery, when the sighting its observation describes was: the time the agent gave, or else when the assessment was made. Carrying it forward keeps this; a record written before it was kept has none
|
|
32
|
+
"observed_at": { "type": "string", "minLength": 1, "description": "On an observed delivery, when the sighting its observation describes was: the time the agent gave, or else when the assessment was made. Carrying it forward keeps this; a record written before it was kept has none." },
|
|
33
33
|
"evidence": {
|
|
34
34
|
"type": "array",
|
|
35
35
|
"items": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"changed_during_last_audit": { "const": true, "description": "The member changed during this audit, as a fix in its correction changes it, so no assessment read the text recorded here and none is kept." },
|
|
54
54
|
"check_result": {
|
|
55
|
-
"description": "The result the agent reported for the member's check, as of base_commit. This tool never ran it
|
|
55
|
+
"description": "The result the agent reported for the member's check, as of base_commit. This tool never ran it.",
|
|
56
56
|
"type": "object",
|
|
57
57
|
"required": ["command"],
|
|
58
58
|
"properties": {
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"exit_status": { "type": "integer" },
|
|
61
61
|
"not_run_reason": { "type": "string", "minLength": 1 },
|
|
62
62
|
"review_basis": { "type": "string", "minLength": 1 },
|
|
63
|
-
"review_basis_since": { "type": "string", "minLength": 1, "description": "When an earlier audit first kept this review_basis, carried while the check and the line are unchanged. Absent means this record's audited_at; only principles writes it
|
|
63
|
+
"review_basis_since": { "type": "string", "minLength": 1, "description": "When an earlier audit first kept this review_basis, carried while the check and the line are unchanged. Absent means this record's audited_at; only principles writes it." }
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"loading_accepted": {
|
|
67
|
-
"description": "The agent's accepted decision that the member loads as it does under the principle's activation, with its reason and the loads it accepted
|
|
67
|
+
"description": "The agent's accepted decision that the member loads as it does under the principle's activation, with its reason and the loads it accepted.",
|
|
68
68
|
"type": "object",
|
|
69
69
|
"required": ["reason", "loads"],
|
|
70
70
|
"properties": {
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
"acknowledgements": {
|
|
189
|
-
"description": "Changes a one-member audit judged to keep the member's meaning since the last full audit, oldest first
|
|
189
|
+
"description": "Changes a one-member audit judged to keep the member's meaning since the last full audit, oldest first.",
|
|
190
190
|
"type": "array",
|
|
191
191
|
"items": {
|
|
192
192
|
"type": "object",
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
"deferred_findings": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
201
201
|
"accepted_findings": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
202
202
|
"check_result": {
|
|
203
|
-
"description": "The run of the member's check the acknowledgement's answer reported, which passed
|
|
203
|
+
"description": "The run of the member's check the acknowledgement's answer reported, which passed.",
|
|
204
204
|
"type": "object",
|
|
205
205
|
"required": ["command", "exit_status"],
|
|
206
206
|
"properties": {
|
|
@@ -214,9 +214,9 @@
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
|
-
"judged_against": { "type": "string", "minLength": 1, "description": "A digest of the principle's description and the question this tool asked, which every assessment in the record answered
|
|
217
|
+
"judged_against": { "type": "string", "minLength": 1, "description": "A digest of the principle's description and the question this tool asked, which every assessment in the record answered." },
|
|
218
218
|
"principles_package": {
|
|
219
|
-
"description": "On the sticking-to-your-principles record only: the version of principles its audit ran under, and a digest of the passage that version proposes for setup, as printed, by key: entry_file_passage, or, in a record
|
|
219
|
+
"description": "On the sticking-to-your-principles record only: the version of principles its audit ran under, and a digest of the passage that version proposes for setup, as printed, by key: entry_file_passage, or, in a record an earlier release wrote, one key for each passage form it proposed, which its next full audit compares with the version running then.",
|
|
220
220
|
"type": "object",
|
|
221
221
|
"required": ["version", "passage_sha256"],
|
|
222
222
|
"properties": {
|
|
@@ -225,6 +225,15 @@
|
|
|
225
225
|
}
|
|
226
226
|
},
|
|
227
227
|
"base_members": { "type": "object", "additionalProperties": { "type": "string", "minLength": 1 } },
|
|
228
|
+
"correction": {
|
|
229
|
+
"description": "On an open record only: the correction its assessment's findings opened, its request_id and basis, which show-open-correction prints in the answer to fill. A record an earlier release wrote open keeps none.",
|
|
230
|
+
"type": "object",
|
|
231
|
+
"required": ["request_id", "basis"],
|
|
232
|
+
"properties": {
|
|
233
|
+
"request_id": { "type": "string", "minLength": 1 },
|
|
234
|
+
"basis": { "type": "object" }
|
|
235
|
+
}
|
|
236
|
+
},
|
|
228
237
|
"last_completed": { "type": "object", "required": ["principle_id", "status", "audited_at", "members", "findings"] },
|
|
229
238
|
"findings": {
|
|
230
239
|
"type": "array",
|
|
@@ -234,10 +243,10 @@
|
|
|
234
243
|
"properties": {
|
|
235
244
|
"id": { "type": "string", "minLength": 1 },
|
|
236
245
|
"member_ids": { "type": "array", "items": { "type": "string" } },
|
|
237
|
-
"problem": { "type": "string", "description": "The finding's problem as the assessment stated it, at audit time
|
|
246
|
+
"problem": { "type": "string", "description": "The finding's problem as the assessment stated it, at audit time." },
|
|
238
247
|
"evidence": {
|
|
239
248
|
"type": "array",
|
|
240
|
-
"description": "The evidence the assessment raised the finding with, as the answer located it
|
|
249
|
+
"description": "The evidence the assessment raised the finding with, as the answer located it. Absent from a finding recorded before it was kept.",
|
|
241
250
|
"items": {
|
|
242
251
|
"type": "object",
|
|
243
252
|
"required": ["path"],
|
|
@@ -251,12 +260,12 @@
|
|
|
251
260
|
}
|
|
252
261
|
}
|
|
253
262
|
},
|
|
254
|
-
"first_raised_at": { "type": "string", "minLength": 1, "description": "When an earlier audit first raised this finding, kept or raised again since
|
|
255
|
-
"raised_in": { "type": "string", "minLength": 1, "description": "The commit whose record a full audit cited for an earlier first_raised_at, checked to leave this finding open then
|
|
263
|
+
"first_raised_at": { "type": "string", "minLength": 1, "description": "When an earlier audit first raised this finding, kept or raised again since. Absent means this record's audited_at." },
|
|
264
|
+
"raised_in": { "type": "string", "minLength": 1, "description": "The commit whose record a full audit cited for an earlier first_raised_at, checked to leave this finding open then." },
|
|
256
265
|
"action": { "type": "string", "minLength": 1 },
|
|
257
|
-
"reason": { "type": "string", "minLength": 1, "description": "On a finding not fixed, why its answer chose its action, as the correction's disposition or a still_holds decision changing the action gave it, kept by each later audit that keeps the finding
|
|
258
|
-
"waits_on": { "type": "string", "minLength": 1, "description": "On a deferred finding, the one line its answer gave saying whom it waits on and to decide what
|
|
259
|
-
"waits_on_since": { "type": "string", "minLength": 1, "description": "When an earlier audit asked waits_on, carried since. Absent means this record's audited_at; only principles writes it
|
|
266
|
+
"reason": { "type": "string", "minLength": 1, "description": "On a finding not fixed, why its answer chose its action, as the correction's disposition or a still_holds decision changing the action gave it, kept by each later audit that keeps the finding. Absent from a fixed finding and from one recorded before it was kept." },
|
|
267
|
+
"waits_on": { "type": "string", "minLength": 1, "description": "On a deferred finding, the one line its answer gave saying whom it waits on and to decide what." },
|
|
268
|
+
"waits_on_since": { "type": "string", "minLength": 1, "description": "When an earlier audit asked waits_on, carried since. Absent means this record's audited_at; only principles writes it." },
|
|
260
269
|
"recorded_at": {
|
|
261
270
|
"type": "object",
|
|
262
271
|
"required": ["path"],
|
|
@@ -270,7 +279,7 @@
|
|
|
270
279
|
},
|
|
271
280
|
"repointed": {
|
|
272
281
|
"type": "array",
|
|
273
|
-
"description": "Each repoint of recorded_at since the full audit that kept this finding: where it pointed, where it points, when and why
|
|
282
|
+
"description": "Each repoint of recorded_at since the full audit that kept this finding: where it pointed, where it points, when and why. Only principles writes it.",
|
|
274
283
|
"items": {
|
|
275
284
|
"type": "object",
|
|
276
285
|
"required": ["from", "to", "at", "reason"],
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"usage": { "$ref": "#/$defs/prose" },
|
|
73
73
|
"group": { "$ref": "#/$defs/slug" },
|
|
74
74
|
"options": { "type": "array", "uniqueItems": true,
|
|
75
|
-
"items": { "enum": ["description", "path", "section", "starting-at", "ending-at", "query", "role", "check", "file", "short", "session-start", "commits-after", "hook-event", "member", "when-files", "when-invoked", "always", "write-ups", "as", "instruction", "also", "confirm"] } },
|
|
75
|
+
"items": { "enum": ["description", "path", "section", "starting-at", "ending-at", "query", "role", "check", "file", "short", "session-start", "commits-after", "hook-event", "member", "when-files", "when-invoked", "always", "write-ups", "as", "instruction", "part", "also", "confirm", "lines"] } },
|
|
76
76
|
"requires": { "type": "array", "uniqueItems": true, "items": { "enum": ["file"] } },
|
|
77
77
|
"summary": { "$ref": "#/$defs/prose" },
|
|
78
78
|
"help": { "type": "string", "pattern": "^[a-z]+(-[a-z]+)+/[a-z]+(-[a-z]+)+$" },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "correction-answer-guide.schema.json",
|
|
4
4
|
"title": "Correction answer guide",
|
|
5
|
-
"description": "Example shapes the correction request shows, one disposition for each action, beside the template, which leaves each action null for the agent to choose
|
|
5
|
+
"description": "Example shapes the correction request shows, one disposition for each action, beside the template, which leaves each action null for the agent to choose.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["disposition"],
|
|
8
8
|
"additionalProperties": false,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "correction-answer.schema.json",
|
|
4
4
|
"title": "Correction answer",
|
|
5
|
-
"description": "What an agent answers an audit's correction request with: the request's id and basis, one disposition per finding, any members its fixes moved
|
|
5
|
+
"description": "What an agent answers an audit's correction request with: the request's id and basis, one disposition per finding, any members its fixes moved, and in each fix any members whose role or check it changed. Fields this tool does not read are refused, to catch a misspelt field. The rules across fields, such as one disposition per finding, stay in Models::CorrectionAnswer and Models::DeclaredMapChanges.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": [
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"base_commit",
|
|
22
22
|
"map_version",
|
|
23
23
|
"last_completed_revision",
|
|
24
|
-
"findings"
|
|
24
|
+
"findings",
|
|
25
|
+
"assessment_report_sha256"
|
|
25
26
|
],
|
|
26
27
|
"properties": {
|
|
27
28
|
"last_completed_revision": {
|
|
@@ -63,11 +64,11 @@
|
|
|
63
64
|
},
|
|
64
65
|
"problem": {
|
|
65
66
|
"type": "string",
|
|
66
|
-
"description": "The finding's problem as the assessment stated it, carried so the completed record keeps it
|
|
67
|
+
"description": "The finding's problem as the assessment stated it, carried so the completed record keeps it."
|
|
67
68
|
},
|
|
68
69
|
"evidence": {
|
|
69
70
|
"type": "array",
|
|
70
|
-
"description": "The evidence the assessment raised the finding with, carried so the completed record keeps it
|
|
71
|
+
"description": "The evidence the assessment raised the finding with, carried so the completed record keeps it. Absent from a basis printed before it was kept.",
|
|
71
72
|
"items": {
|
|
72
73
|
"type": "object",
|
|
73
74
|
"required": [
|
|
@@ -99,65 +100,16 @@
|
|
|
99
100
|
"recent_decision_paths": {
|
|
100
101
|
"type": "array",
|
|
101
102
|
"items": { "type": "string" },
|
|
102
|
-
"description": "The paths the assessment's recent decision cites as evidence, which the record does not keep, carried so the completed audit asks to commit those that differ from HEAD
|
|
103
|
+
"description": "The paths the assessment's recent decision cites as evidence, which the record does not keep, carried so the completed audit asks to commit those that differ from HEAD. Copy it as the template gives it."
|
|
103
104
|
},
|
|
104
|
-
"
|
|
105
|
-
"type": "
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"type": "object",
|
|
109
|
-
"additionalProperties": false,
|
|
110
|
-
"properties": {
|
|
111
|
-
"check_result": {
|
|
112
|
-
"type": "object",
|
|
113
|
-
"additionalProperties": false,
|
|
114
|
-
"required": [
|
|
115
|
-
"command"
|
|
116
|
-
],
|
|
117
|
-
"properties": {
|
|
118
|
-
"command": {
|
|
119
|
-
"type": "string"
|
|
120
|
-
},
|
|
121
|
-
"exit_status": {
|
|
122
|
-
"type": "integer"
|
|
123
|
-
},
|
|
124
|
-
"not_run_reason": {
|
|
125
|
-
"type": "string"
|
|
126
|
-
},
|
|
127
|
-
"review_basis": {
|
|
128
|
-
"type": "string"
|
|
129
|
-
},
|
|
130
|
-
"review_basis_since": {
|
|
131
|
-
"type": "string"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"loading_accepted": {
|
|
136
|
-
"type": "object",
|
|
137
|
-
"additionalProperties": false,
|
|
138
|
-
"required": [
|
|
139
|
-
"reason",
|
|
140
|
-
"loads"
|
|
141
|
-
],
|
|
142
|
-
"properties": {
|
|
143
|
-
"reason": {
|
|
144
|
-
"type": "string"
|
|
145
|
-
},
|
|
146
|
-
"loads": {
|
|
147
|
-
"type": "object"
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
"assessment": {
|
|
152
|
-
"type": "object",
|
|
153
|
-
"description": "The member's assessment as the assessment gave it, with the grounds it was judged on, which the completed record keeps (D49)."
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
105
|
+
"assessment_report_sha256": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"pattern": "\\A[0-9a-f]{64}\\z",
|
|
108
|
+
"description": "A digest of the assessment the open audit record keeps, which the correction reads back from that record, so it is refused once the record changed or was discarded. Copy it as the template gives it."
|
|
157
109
|
},
|
|
158
110
|
"prior_findings": {
|
|
159
111
|
"type": "object",
|
|
160
|
-
"description": "The assessment's decisions on prior findings, carried so the completed record keeps the ones that still hold
|
|
112
|
+
"description": "The assessment's decisions on prior findings, carried so the completed record keeps the ones that still hold.",
|
|
161
113
|
"required": [
|
|
162
114
|
"kept",
|
|
163
115
|
"closed",
|
|
@@ -187,14 +139,14 @@
|
|
|
187
139
|
"action",
|
|
188
140
|
"reason"
|
|
189
141
|
],
|
|
190
|
-
"description": "changed_members, evidence and reassessment are a fix's; Models::Disposition refuses a fixed disposition missing one, and any other may omit them
|
|
142
|
+
"description": "changed_members, evidence and reassessment are a fix's; Models::Disposition refuses a fixed disposition missing one, and any other may omit them.",
|
|
191
143
|
"properties": {
|
|
192
144
|
"finding_id": {
|
|
193
145
|
"type": "string"
|
|
194
146
|
},
|
|
195
147
|
"action": {
|
|
196
148
|
"type": ["string", "null"],
|
|
197
|
-
"description": "fixed, deferred, accepted or disagreed, which the agent chooses: the template leaves it null, and Models::CorrectionAnswer refuses null or any other value with invalid_disposition
|
|
149
|
+
"description": "fixed, deferred, accepted or disagreed, which the agent chooses: the template leaves it null, and Models::CorrectionAnswer refuses null or any other value with invalid_disposition."
|
|
198
150
|
},
|
|
199
151
|
"reason": {
|
|
200
152
|
"type": "string"
|
|
@@ -283,7 +235,7 @@
|
|
|
283
235
|
},
|
|
284
236
|
"waits_on": {
|
|
285
237
|
"type": ["string", "null"],
|
|
286
|
-
"description": "On a deferral, one line saying whom it waits on and to decide what; null on any disposition. Models::CorrectionAnswer refuses a value on another action, or one not one line
|
|
238
|
+
"description": "On a deferral, one line saying whom it waits on and to decide what; null on any disposition. Models::CorrectionAnswer refuses a value on another action, or one not one line."
|
|
287
239
|
}
|
|
288
240
|
}
|
|
289
241
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "member-map.schema.json",
|
|
4
4
|
"title": "Member map",
|
|
5
|
-
"description": "A principle's committed map, .principles/maps/ID.json: what the principle is, and each member that carries it. Fields this schema does not name are allowed, so an older version can read a map a newer one wrote
|
|
5
|
+
"description": "A principle's committed map, .principles/maps/ID.json: what the principle is, and each member that carries it. Fields this schema does not name are allowed, so an older version can read a map a newer one wrote.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["description", "members"],
|
|
8
8
|
"properties": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": { "type": "string", "minLength": 1 },
|
|
11
11
|
"activation": {
|
|
12
12
|
"type": "object",
|
|
13
|
-
"description": "When the principle's work is in hand, as the agent declared it with change-activation
|
|
13
|
+
"description": "When the principle's work is in hand, as the agent declared it with change-activation: when files matching one of its globs are read or changed, when its work is invoked, or always. change-activation writes files only with when files; a hand-edited map is not yet checked for that.",
|
|
14
14
|
"required": ["when"],
|
|
15
15
|
"additionalProperties": false,
|
|
16
16
|
"properties": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"ending_at": { "type": "string", "minLength": 1 },
|
|
32
32
|
"role": { "type": "string", "minLength": 1 },
|
|
33
33
|
"key": { "type": "string", "minLength": 1, "description": "What the member is known by across moves, which its audit record files its hash under. Absent, it is the member's id. move-member stores the old id here on a member's first move, and add-member gives a member a key of its own when its id is the key of a member that moved away." },
|
|
34
|
-
"check": { "type": "string", "minLength": 1, "description": "The command that enforces this member, which an audit asks the agent to run and report. This tool never runs it
|
|
34
|
+
"check": { "type": "string", "minLength": 1, "description": "The command that enforces this member, which an audit asks the agent to run and report. This tool never runs it." }
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "repointing-answer.schema.json",
|
|
4
4
|
"title": "Repointing answer",
|
|
5
|
-
"description": "What an agent answers a repoint of a principle's open findings' write-ups with
|
|
5
|
+
"description": "What an agent answers a repoint of a principle's open findings' write-ups with: the request's id and basis, then for each finding a new recorded_at, or null to leave it, and a one-line reason. Fields this tool does not read are refused. Models::Repoint locates each new pointer.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["request_id", "basis", "repoints"],
|
data/lib/principles/error.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Principles
|
|
|
10
10
|
|
|
11
11
|
# A command a refusal's repair names for values it holds, such as a member id, left unquoted, since a model
|
|
12
12
|
# cannot quote: the controller prints it through Views::Invocation, the one owner of shell quoting, after its
|
|
13
|
-
# purpose and a colon, on a line of its own
|
|
13
|
+
# purpose and a colon, on a line of its own. options are flags with their values, quoted the same
|
|
14
14
|
# way; usage is this tool's own placeholder text, such as "--role ROLE", left for the agent to fill.
|
|
15
15
|
class RepairCommand
|
|
16
16
|
#: String
|
|
@@ -34,7 +34,7 @@ module Principles
|
|
|
34
34
|
#: Hash[String, untyped]
|
|
35
35
|
attr_reader :payload
|
|
36
36
|
|
|
37
|
-
# fields are the failing JSON pointers of a malformed file or answer, each with what is wrong there
|
|
37
|
+
# fields are the failing JSON pointers of a malformed file or answer, each with what is wrong there.
|
|
38
38
|
#: (String, String, String, ?String?, ?fields: Array[Hash[String, String]]?) -> void
|
|
39
39
|
def initialize(code, message, repair, path = nil, fields: nil)
|
|
40
40
|
super(message)
|
|
@@ -64,7 +64,7 @@ module Principles
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
# This refusal with each of its commands printed by the block, after its purpose, a line each after the repair's
|
|
67
|
-
# text
|
|
67
|
+
# text.
|
|
68
68
|
#: () { (RepairCommand) -> String } -> Error
|
|
69
69
|
def printing_commands(&)
|
|
70
70
|
return self if @commands.empty?
|
|
@@ -75,7 +75,7 @@ module Principles
|
|
|
75
75
|
|
|
76
76
|
# This refusal, when it names under did_you_mean the one mapped id an id it was given nearly matches, with its
|
|
77
77
|
# repair led by the command the block prints for that id; this tool never runs a command on the near miss
|
|
78
|
-
# itself
|
|
78
|
+
# itself. Otherwise this refusal as it is.
|
|
79
79
|
#: () { (String) -> String } -> Error
|
|
80
80
|
def rerun_with_near_miss(&)
|
|
81
81
|
mapped = payload["did_you_mean"] or return self
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require "optparse"
|
|
5
|
+
require_relative "command_line"
|
|
6
|
+
|
|
7
|
+
module Principles
|
|
8
|
+
# The JSON object an agent reads for a failure that is not one of this tool's refusals: a usage error, a file the
|
|
9
|
+
# system would not read or write, or a file of the wrong shape, each with its code and repair.
|
|
10
|
+
class FailureRefusal
|
|
11
|
+
# The repair for a shape error raised from this tool's own code. Such an error cannot say which file was at
|
|
12
|
+
# fault, so the repair names every file a command reads, and blames none.
|
|
13
|
+
SHAPE_REPAIR = "A file this command read is not in the shape this tool writes: the map in " \
|
|
14
|
+
".principles/maps/ID.json, its audit record in .principles/audits/ID.json, or the answer given " \
|
|
15
|
+
"with --file. Compare it with git, or with the answer to fill its request printed, which " \
|
|
16
|
+
"show-open-correction ID prints for a correction."
|
|
17
|
+
|
|
18
|
+
# executable is the invocation a usage error's repair tells the agent to run --help with.
|
|
19
|
+
#: (StandardError, executable: String) -> void
|
|
20
|
+
def initialize(error, executable:)
|
|
21
|
+
@error = error
|
|
22
|
+
@executable = executable
|
|
23
|
+
freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# The exit status: 2 for a usage error, 1 for any other.
|
|
27
|
+
#: () -> Integer
|
|
28
|
+
def status = @error.is_a?(OptionParser::ParseError) ? 2 : 1
|
|
29
|
+
|
|
30
|
+
#: () -> Hash[Symbol, String]
|
|
31
|
+
def payload
|
|
32
|
+
case @error
|
|
33
|
+
when OptionParser::ParseError
|
|
34
|
+
failure(status: "usage_error", code: "invalid_invocation", repair: usage_repair)
|
|
35
|
+
when SystemCallError
|
|
36
|
+
failure(status: "refused", code: "filesystem_error",
|
|
37
|
+
repair: "Check the project path and file permissions, then retry.")
|
|
38
|
+
else
|
|
39
|
+
failure(status: "refused", code: "invalid_shape", repair: SHAPE_REPAIR)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
private
|
|
44
|
+
|
|
45
|
+
# The repair a refused command line carries for the command it names, or the advice to see every command.
|
|
46
|
+
#: () -> String
|
|
47
|
+
def usage_repair
|
|
48
|
+
error = @error
|
|
49
|
+
error.is_a?(CommandLine::UsageRefusal) ? error.repair : "To see every command: #{@executable} --help"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
#: (status: String, code: String, repair: String) -> Hash[Symbol, String]
|
|
53
|
+
def failure(status:, code:, repair:)
|
|
54
|
+
{ status: status, code: code, message: @error.message, repair: repair }
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|