principles 0.0.1 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/principles/cli.rb +10 -2
- data/lib/principles/command_line.rb +46 -35
- data/lib/principles/command_routes.rb +4 -3
- data/lib/principles/controllers/acknowledgement.rb +84 -18
- data/lib/principles/controllers/answer.rb +56 -125
- data/lib/principles/controllers/answer_phase.rb +54 -0
- data/lib/principles/controllers/assessment.rb +132 -0
- data/lib/principles/controllers/audit.rb +45 -140
- data/lib/principles/controllers/audit_completion.rb +8 -8
- data/lib/principles/controllers/command.rb +29 -14
- data/lib/principles/controllers/correction.rb +23 -13
- data/lib/principles/controllers/full_audit_request.rb +190 -0
- data/lib/principles/controllers/inventory.rb +46 -79
- data/lib/principles/controllers/mapping.rb +3 -3
- data/lib/principles/controllers/member_entries.rb +24 -12
- data/lib/principles/controllers/member_problems_report.rb +79 -0
- data/lib/principles/controllers/members_a_commit_changed.rb +12 -3
- data/lib/principles/controllers/members_to_assess.rb +35 -20
- data/lib/principles/controllers/meta_principle_setup.rb +5 -5
- data/lib/principles/controllers/repoint.rb +19 -23
- data/lib/principles/controllers/running_tool.rb +1 -1
- data/lib/principles/data/audit_files.rb +11 -7
- data/lib/principles/data/bounded_file.rb +20 -4
- data/lib/principles/data/command-steps.json +14 -13
- data/lib/principles/data/map_files.rb +2 -2
- data/lib/principles/data/principles_subfolder.rb +8 -1
- data/lib/principles/data/project_files.rb +12 -15
- data/lib/principles/data/project_root.rb +48 -0
- data/lib/principles/data/schema_check.rb +39 -11
- data/lib/principles/data/schemas/acknowledgement-answer.schema.json +17 -3
- data/lib/principles/data/schemas/answer-guide.schema.json +5 -10
- data/lib/principles/data/schemas/assessment-answer.schema.json +18 -9
- data/lib/principles/data/schemas/audit-record.schema.json +13 -1
- data/lib/principles/data/schemas/command-steps.schema.json +2 -1
- data/lib/principles/data/schemas/correction-answer.schema.json +2 -3
- data/lib/principles/invocation_options.rb +1 -1
- data/lib/principles/models/acknowledgement.rb +73 -84
- data/lib/principles/models/acknowledgement_refusal.rb +90 -0
- data/lib/principles/models/answer_place.rb +4 -0
- data/lib/principles/models/assessment_answer.rb +19 -17
- data/lib/principles/models/assessment_left_as_printed.rb +81 -0
- data/lib/principles/models/audit.rb +24 -15
- data/lib/principles/models/audit_record.rb +19 -20
- data/lib/principles/models/audit_records.rb +77 -4
- data/lib/principles/models/audit_start.rb +3 -3
- data/lib/principles/models/candidate_files.rb +30 -7
- data/lib/principles/models/candidate_inventory.rb +23 -6
- data/lib/principles/models/candidate_listing.rb +12 -3
- data/lib/principles/models/candidate_outline.rb +195 -0
- data/lib/principles/models/carried_assessments.rb +1 -1
- data/lib/principles/models/carried_member.rb +42 -0
- data/lib/principles/models/check_since_last_audit.rb +22 -9
- data/lib/principles/models/command_steps.rb +17 -1
- data/lib/principles/models/correction_basis.rb +1 -1
- data/lib/principles/models/decided_prior_findings.rb +9 -19
- data/lib/principles/models/declared_map_changes.rb +13 -12
- data/lib/principles/models/disposition.rb +28 -24
- data/lib/principles/models/evidence_replacements.rb +8 -1
- data/lib/principles/models/fix_only_fields.rb +67 -0
- data/lib/principles/models/frontmatter_fields.rb +9 -8
- data/lib/principles/models/instruction_named.rb +35 -0
- data/lib/principles/models/kept_prior_finding.rb +12 -7
- data/lib/principles/models/left_as_printed.rb +39 -0
- data/lib/principles/models/loaded_files.rb +5 -3
- data/lib/principles/models/loading_decision.rb +9 -2
- data/lib/principles/models/{member_maps.rb → mapped_principles.rb} +15 -15
- data/lib/principles/models/member.rb +1 -1
- data/lib/principles/models/member_assessments.rb +32 -9
- data/lib/principles/models/member_file.rb +35 -11
- data/lib/principles/models/member_grounds.rb +2 -2
- data/lib/principles/models/member_hashes_as_written.rb +44 -0
- data/lib/principles/models/member_lines.rb +63 -15
- data/lib/principles/models/member_moves.rb +3 -3
- data/lib/principles/models/member_problems.rb +50 -24
- data/lib/principles/models/member_repair_moves.rb +54 -0
- data/lib/principles/models/members_sharing_lines.rb +3 -3
- data/lib/principles/models/missing_files.rb +2 -2
- data/lib/principles/models/new_findings.rb +55 -0
- data/lib/principles/models/open_finding.rb +23 -13
- data/lib/principles/models/open_findings_elsewhere.rb +4 -0
- data/lib/principles/models/other_principles.rb +1 -1
- data/lib/principles/models/other_templates_placeholders.rb +113 -0
- data/lib/principles/models/outline_budget.rb +127 -0
- data/lib/principles/models/outline_group.rb +31 -0
- data/lib/principles/models/outline_section.rb +56 -0
- data/lib/principles/models/{member_map.rb → principle.rb} +45 -40
- data/lib/principles/models/{member_map_history.rb → principle_history.rb} +38 -15
- data/lib/principles/models/{map_members.rb → principle_members.rb} +15 -4
- data/lib/principles/models/prior_decision_fields.rb +47 -0
- data/lib/principles/models/prior_finding_decision.rb +38 -7
- data/lib/principles/models/prior_finding_outcomes.rb +10 -3
- data/lib/principles/models/prior_findings.rb +1 -1
- data/lib/principles/models/problem_report.rb +7 -3
- data/lib/principles/models/project.rb +22 -17
- data/lib/principles/models/project_history.rb +2 -2
- data/lib/principles/models/quoted_change.rb +137 -0
- data/lib/principles/models/recent_decision.rb +90 -0
- data/lib/principles/models/record_format.rb +109 -0
- data/lib/principles/models/recorded_entry.rb +6 -0
- data/lib/principles/models/recorded_finding.rb +4 -0
- data/lib/principles/models/recorded_hashes.rb +43 -0
- data/lib/principles/models/recorded_members.rb +33 -16
- data/lib/principles/models/refusal_before_shape.rb +21 -0
- data/lib/principles/models/repoint.rb +13 -0
- data/lib/principles/models/reported_check.rb +66 -24
- data/lib/principles/models/request_id.rb +24 -4
- data/lib/principles/models/sent_answer.rb +51 -0
- data/lib/principles/models/sent_prior_decisions.rb +31 -0
- data/lib/principles/models/shape_problems_beside.rb +40 -0
- data/lib/principles/models/still_holds_restatement.rb +7 -10
- data/lib/principles/models/submitted_answer.rb +34 -0
- data/lib/principles/models/template_placeholders.rb +71 -0
- data/lib/principles/models/text_within.rb +55 -0
- data/lib/principles/models/unchecked_members.rb +76 -0
- data/lib/principles/models/write_up_opening.rb +21 -4
- data/lib/principles/session_start_options.rb +29 -0
- data/lib/principles/start_audit_options.rb +52 -0
- data/lib/principles/version.rb +2 -2
- data/lib/principles/views/acknowledgement_result.rb +15 -7
- data/lib/principles/views/answer_head.rb +29 -0
- data/lib/principles/views/assessed_members.rb +129 -0
- data/lib/principles/views/assessment_request.rb +139 -78
- data/lib/principles/views/audit_result.rb +55 -42
- data/lib/principles/views/candidate_files_result.rb +41 -19
- data/lib/principles/views/check_notes.rb +44 -0
- data/lib/principles/views/check_result_template.rb +42 -30
- data/lib/principles/views/correction_request.rb +64 -0
- data/lib/principles/views/first_audit.rb +71 -0
- data/lib/principles/views/help.rb +3 -2
- data/lib/principles/views/instruction.rb +74 -0
- data/lib/principles/views/json_with_entries_on_lines.rb +51 -0
- data/lib/principles/views/loads_to_check_result.rb +13 -6
- data/lib/principles/views/map_added_to.rb +31 -0
- data/lib/principles/views/map_result.rb +38 -23
- data/lib/principles/views/member_change_since_baseline.rb +22 -5
- data/lib/principles/views/member_repairs.rb +21 -52
- data/lib/principles/views/members_a_commit_changed.rb +40 -10
- data/lib/principles/views/meta_principle_result.rb +3 -14
- data/lib/principles/views/one_member_check_result_template.rb +43 -0
- data/lib/principles/views/open_findings_elsewhere_result.rb +3 -3
- data/lib/principles/views/open_findings_line.rb +77 -23
- data/lib/principles/views/principle_read_result.rb +37 -28
- data/lib/principles/views/prior_finding_decisions_result.rb +13 -14
- data/lib/principles/views/prior_findings_result.rb +30 -18
- data/lib/principles/views/problem_lines.rb +14 -11
- data/lib/principles/views/problem_result.rb +30 -16
- data/lib/principles/views/prompts/acknowledge-a-change/run-the-check-and-report-it-passing.md +3 -0
- data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md +6 -12
- data/lib/principles/views/prompts/assess-every-member/answer-guide.json +5 -10
- data/lib/principles/views/prompts/assess-every-member/assess-each-member-and-the-set.md +0 -4
- data/lib/principles/views/prompts/assess-every-member/claim-an-earlier-first-raised-at.md +7 -0
- data/lib/principles/views/prompts/assess-every-member/decide-each-prior-finding.md +6 -17
- data/lib/principles/views/prompts/assess-every-member/have-a-changed-check-reviewed-before-running-it.md +2 -2
- 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-the-set-with-carried-assessments.md +5 -10
- data/lib/principles/views/prompts/assess-every-member/keep-or-change-what-a-deferral-waits-on.md +4 -0
- data/lib/principles/views/prompts/assess-every-member/read-a-compact-carried-member.md +8 -0
- data/lib/principles/views/prompts/assess-every-member/read-a-trimmed-instruction-whole.md +1 -0
- data/lib/principles/views/prompts/assess-every-member/review-a-new-or-changed-check-before-running-it.md +9 -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 +3 -6
- data/lib/principles/views/prompts/assess-every-member/say-what-observed-means.md +4 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +5 -4
- data/lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-after-the-table.md +1 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/ask-which-principle-to-map.md +2 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md +9 -5
- data/lib/principles/views/prompts/find-a-principle-to-map/leave-test-data-out-of-the-survey.md +1 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md +3 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md +3 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +4 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md +7 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +21 -6
- data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +25 -23
- data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +18 -16
- data/lib/principles/views/prompts/learn-what-a-command-does/list-principles.md +4 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/select-the-project-root.md +1 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +7 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/show-audit.md +3 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md +7 -6
- data/lib/principles/views/prompts/learn-what-a-command-does/show-principle.md +12 -12
- data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +30 -30
- data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +39 -39
- data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members-waiting-on-an-upgrade.md +2 -0
- data/lib/principles/views/prompts/report-after-a-commit/the-principles-skill-is-where-to-start.md +1 -0
- data/lib/principles/views/prompts/report-the-completed-audit/commit-only-what-the-audit-changed.md +4 -0
- data/lib/principles/views/prompts/set-principles-up/first-keeping-audit-after-own-principle.md +10 -0
- data/lib/principles/views/prompts/set-principles-up/keep-them-held-between-audits.md +2 -0
- data/lib/principles/views/prompts/set-principles-up/name-the-step-each-member-lacks.md +2 -0
- data/lib/principles/views/prompts/set-principles-up/place-the-passage-with-the-user.md +11 -7
- data/lib/principles/views/prompts/start-a-session/see-the-earlier-line.md +2 -0
- data/lib/principles/views/record_waiting_on_an_upgrade.rb +54 -0
- data/lib/principles/views/request_part.rb +26 -6
- data/lib/principles/views/request_parts.rb +8 -0
- metadata +69 -9
- data/lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-before-mapping.md +0 -1
- data/lib/principles/views/prompts/set-principles-up/set-up-first.md +0 -2
|
@@ -5,6 +5,8 @@ require_relative "invocation"
|
|
|
5
5
|
require_relative "printed_principle"
|
|
6
6
|
require_relative "member_repairs"
|
|
7
7
|
require_relative "prompts"
|
|
8
|
+
require_relative "record_waiting_on_an_upgrade"
|
|
9
|
+
require_relative "../prose_list"
|
|
8
10
|
|
|
9
11
|
module Principles
|
|
10
12
|
# What this tool prints, from plain values a controller hands it. views/CLAUDE.md owns the boundary.
|
|
@@ -18,31 +20,27 @@ module Principles
|
|
|
18
20
|
freeze
|
|
19
21
|
end
|
|
20
22
|
|
|
21
|
-
# show-principle: each member with where its text is now and its freshness, and each member
|
|
22
|
-
#
|
|
23
|
+
# show-principle: each member with where its text is now and its freshness, and each member repairs names, those
|
|
24
|
+
# an audit would refuse, with its repair_with commands, from the moves repairs gives it (#272).
|
|
23
25
|
# hook_settings_not_read names each project settings file whose hooks this tool could not read (#491).
|
|
24
26
|
# loaded_files lists each file the members load once, with the total of those loading at session start (#483).
|
|
25
|
-
#: (PrintedPrinciple,
|
|
26
|
-
#| ?
|
|
27
|
-
|
|
27
|
+
#: (PrintedPrinciple, repairs: Hash[String, Array[Hash[String, untyped]]],
|
|
28
|
+
#| ?hook_settings_not_read: Array[Hash[String, String]], ?loaded_files: Hash[String, untyped])
|
|
29
|
+
#| -> Hash[String, untyped]
|
|
30
|
+
def shown(principle, repairs:, hook_settings_not_read: [], loaded_files: {})
|
|
28
31
|
unread = hook_settings_not_read.empty? ? {} : { "hook_settings_not_read" => hook_settings_not_read }
|
|
29
32
|
{ "id" => principle.id, "map_file" => principle.file, **principle.declared,
|
|
30
|
-
"members" => principle.members.map { |member| repaired(principle.id, member,
|
|
31
|
-
**loaded_files, **unread, "next_action" => shown_next_action(principle,
|
|
33
|
+
"members" => principle.members.map { |member| repaired(principle.id, member, repairs) },
|
|
34
|
+
**loaded_files, **unread, "next_action" => shown_next_action(principle, repairs.keys) }
|
|
32
35
|
end
|
|
33
36
|
|
|
34
|
-
# list-principles: each entry is { "id", "description", "members_by_freshness" }.
|
|
35
|
-
#
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"To see a principle's members: #{@invocation.in_project("show-principle", usage: "ID")}\n" \
|
|
42
|
-
"To audit it: #{@invocation.in_project("start-audit", usage: "ID")}"
|
|
43
|
-
end
|
|
44
|
-
first = set_up ? [] : [set_up_first]
|
|
45
|
-
{ "principles" => entries, "next_action" => [*first, next_action].join("\n") }
|
|
37
|
+
# list-principles: each entry is { "id", "description", "members_by_freshness" }. waiting is each principle whose
|
|
38
|
+
# audits wait on an upgrade, which it names, with how to update said once, and an audit is offered only when one
|
|
39
|
+
# is left to audit (#1067, #1081).
|
|
40
|
+
#: (Array[Hash[String, untyped]], ?waiting: Array[RecordWaitingOnAnUpgrade], ?one_to_audit: bool)
|
|
41
|
+
#| -> Hash[String, untyped]
|
|
42
|
+
def listing(entries, waiting: [], one_to_audit: true)
|
|
43
|
+
{ "principles" => entries, "next_action" => listed_next_action(entries, waiting, one_to_audit).join("\n") }
|
|
46
44
|
end
|
|
47
45
|
|
|
48
46
|
# list-principles' note on the meta-principle's map, kept in file, when it has no members, with the two ways on
|
|
@@ -57,17 +55,28 @@ module Principles
|
|
|
57
55
|
|
|
58
56
|
private
|
|
59
57
|
|
|
60
|
-
#
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
# What list-principles' next_action offers: mapping one when none is listed, else showing one,
|
|
59
|
+
# auditing one when one is left to audit, and the principles whose audits wait on an upgrade.
|
|
60
|
+
#: (Array[Hash[String, untyped]], Array[RecordWaitingOnAnUpgrade], bool) -> Array[String]
|
|
61
|
+
def listed_next_action(entries, waiting, one_to_audit)
|
|
62
|
+
return ["To map one, start with: #{@invocation.in_project("list-candidate-files")}"] if entries.empty?
|
|
63
|
+
|
|
64
|
+
audit = "To audit it: #{@invocation.in_project("start-audit", usage: "ID")}" if one_to_audit
|
|
65
|
+
waits = waited_on(waiting) unless waiting.empty?
|
|
66
|
+
["To see a principle's members: #{@invocation.in_project("show-principle", usage: "ID")}", audit, waits].compact
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# The principles whose audits wait on an upgrade, and how to update, once for each way the records name.
|
|
70
|
+
#: (Array[RecordWaitingOnAnUpgrade]) -> String
|
|
71
|
+
def waited_on(waiting)
|
|
72
|
+
["The audits of #{ProseList.new(waiting.map(&:principle))} wait on an upgrade.", *waiting.map(&:update).uniq]
|
|
73
|
+
.join(" ")
|
|
65
74
|
end
|
|
66
75
|
|
|
67
|
-
# member, with its repairs when
|
|
68
|
-
#: (String, Hash[String, untyped], Array[String]) -> Hash[String, untyped]
|
|
69
|
-
def repaired(id, member,
|
|
70
|
-
MemberRepairs.new(@invocation).beside(id, member,
|
|
76
|
+
# member, with its repairs when repairs names it.
|
|
77
|
+
#: (String, Hash[String, untyped], Hash[String, Array[Hash[String, untyped]]]) -> Hash[String, untyped]
|
|
78
|
+
def repaired(id, member, repairs)
|
|
79
|
+
MemberRepairs.new(@invocation).beside(id, member, repairs[member.fetch("id")])
|
|
71
80
|
end
|
|
72
81
|
|
|
73
82
|
# Repair each member in broken, the ids of those an audit would refuse; otherwise audit when one changed or was
|
|
@@ -6,29 +6,28 @@ module Principles
|
|
|
6
6
|
module Views
|
|
7
7
|
# How a completed full audit's result says what it decided about each prior finding (D35).
|
|
8
8
|
class PriorFindingDecisionsResult
|
|
9
|
-
# kept_ids are the prior findings it kept and closed those it closed;
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
# kept_ids are the prior findings it kept and closed those it closed; changed is what the decisions changed of
|
|
10
|
+
# the findings kept, each list by the name the result gives it after prior_findings_: pointers_dropped, any
|
|
11
|
+
# pointer a decision dropped (#374), waits_on_dropped, any waits_on it dropped, with null or by accepting it
|
|
12
|
+
# (D52), evidence_replaced, each kept evidence item a decision gave a new place, as it was and is now (D70), and
|
|
13
|
+
# problems_restated, each problem a decision restated, as it was and is now (D82).
|
|
14
|
+
#: (kept_ids: Array[String], closed: Array[Hash[String, untyped]],
|
|
15
|
+
#| changed: Hash[String, Array[Hash[String, untyped]]]) -> void
|
|
16
|
+
def initialize(kept_ids:, closed:, changed:)
|
|
15
17
|
@kept_ids = kept_ids
|
|
16
18
|
@closed = closed
|
|
17
|
-
@
|
|
18
|
-
@waits_on_dropped = waits_on_dropped
|
|
19
|
-
@evidence_replaced = evidence_replaced
|
|
19
|
+
@changed = changed
|
|
20
20
|
freeze
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
# output, with these decisions added; unchanged when there were no
|
|
23
|
+
# output, with these decisions added, and each list of changes that is not empty; unchanged when there were no
|
|
24
|
+
# prior findings to decide.
|
|
24
25
|
#: (Hash[String, untyped]) -> Hash[String, untyped]
|
|
25
26
|
def added_to(output)
|
|
26
27
|
return output if @kept_ids.empty? && @closed.empty?
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
decided = decided.merge("prior_findings_waits_on_dropped" => @waits_on_dropped) unless @waits_on_dropped.empty?
|
|
31
|
-
@evidence_replaced.empty? ? decided : decided.merge("prior_findings_evidence_replaced" => @evidence_replaced)
|
|
29
|
+
changes = @changed.reject { |_, list| list.empty? }.transform_keys { |name| "prior_findings_#{name}" }
|
|
30
|
+
output.merge("prior_findings_kept" => @kept_ids, "prior_findings_closed" => @closed, **changes)
|
|
32
31
|
end
|
|
33
32
|
end
|
|
34
33
|
end
|
|
@@ -11,9 +11,12 @@ module Principles
|
|
|
11
11
|
class PriorFindingsResult
|
|
12
12
|
# prior is each finding the last audit deferred or accepted, as the request lists it; last_audited_commit is the
|
|
13
13
|
# commit each evidence item's changed_since_last_audit compares against, or nil when none says (#858).
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
# placeholders is the text the answer printed alone gives the decision, naming what it may be (#746), and each
|
|
15
|
+
# field a decision may give, which an answer leaves as printed to give none (#994).
|
|
16
|
+
#: (Array[Hash[String, untyped]], placeholders: Hash[String, untyped], ?last_audited_commit: String?) -> void
|
|
17
|
+
def initialize(prior, placeholders:, last_audited_commit: nil)
|
|
16
18
|
@prior = prior
|
|
19
|
+
@placeholders = placeholders
|
|
17
20
|
@last_audited_commit = last_audited_commit
|
|
18
21
|
freeze
|
|
19
22
|
end
|
|
@@ -24,9 +27,10 @@ module Principles
|
|
|
24
27
|
def part
|
|
25
28
|
return if @prior.empty?
|
|
26
29
|
|
|
27
|
-
RequestPart.new(shown: { "prior_findings" => @prior.map { |finding| shown(finding) },
|
|
28
|
-
|
|
29
|
-
slots: { "prior_finding_decisions" => @prior.map { |finding| decision(finding) } }
|
|
30
|
+
RequestPart.new(shown: { "prior_findings" => @prior.map { |finding| shown(finding) } },
|
|
31
|
+
instructions: [Instruction.new("prior_findings_instruction", instruction)],
|
|
32
|
+
slots: { "prior_finding_decisions" => @prior.map { |finding| decision(finding) } },
|
|
33
|
+
help: { "prior_finding_decisions" => @placeholders })
|
|
30
34
|
end
|
|
31
35
|
|
|
32
36
|
private
|
|
@@ -48,27 +52,35 @@ module Principles
|
|
|
48
52
|
evidence_not_kept?(finding) ? decision.merge("problem_evidence" => []) : decision
|
|
49
53
|
end
|
|
50
54
|
|
|
51
|
-
# How to decide the prior findings, naming each one's id, so a new finding is given another (#420),
|
|
52
|
-
#
|
|
53
|
-
|
|
55
|
+
# How to decide the prior findings, naming each one's id, so a new finding is given another (#420), each
|
|
56
|
+
# paragraph with whether its case holds: how to keep what a deferral waits on holds only when one carries waits_on
|
|
57
|
+
# (#983), how to claim an earlier first_raised_at never, since no fact marks a finding dated late, so it is read
|
|
58
|
+
# whole (#983), and how to give the evidence a finding's record lacks only when one is marked so (D61, D64).
|
|
59
|
+
#: () -> Array[[String, bool]]
|
|
54
60
|
def instruction
|
|
55
61
|
ids = @prior.map { |finding| finding.fetch("finding_id") }.join(", ")
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
decide = Prompts.text("assess-every-member/decide-each-prior-finding", ids: ids).split("\n\n")
|
|
63
|
+
[*decide.map { [it, true] },
|
|
64
|
+
[Prompts.text("assess-every-member/keep-or-change-what-a-deferral-waits-on"), waits_on?],
|
|
65
|
+
[Prompts.text("assess-every-member/claim-an-earlier-first-raised-at"), false], *evidence_since,
|
|
66
|
+
[Prompts.text("assess-every-member/give-the-evidence-a-prior-finding-lacks"), marked_evidence_not_kept?]]
|
|
59
67
|
end
|
|
60
68
|
|
|
61
|
-
# How to read each evidence item's changed_since_last_audit, naming the commit it compares against, only
|
|
62
|
-
# item carries it (#858, D61).
|
|
63
|
-
#: () -> Array[String]
|
|
69
|
+
# How to read each evidence item's changed_since_last_audit, naming the commit it compares against, holding only
|
|
70
|
+
# when an item carries it (#858, D61); none when no commit is named to compare against.
|
|
71
|
+
#: () -> Array[[String, bool]]
|
|
64
72
|
def evidence_since
|
|
65
|
-
|
|
66
|
-
return [] unless said && @last_audited_commit
|
|
73
|
+
return [] unless @last_audited_commit
|
|
67
74
|
|
|
68
|
-
[
|
|
69
|
-
|
|
75
|
+
said = @prior.any? { |finding| finding["evidence"]&.any? { it.key?("changed_since_last_audit") } }
|
|
76
|
+
[[Prompts.text("assess-every-member/read-whether-each-prior-finding-s-evidence-changed",
|
|
77
|
+
commit: @last_audited_commit), said]]
|
|
70
78
|
end
|
|
71
79
|
|
|
80
|
+
# Whether any prior finding carries a waits_on line (D52).
|
|
81
|
+
#: () -> bool
|
|
82
|
+
def waits_on? = @prior.any? { |finding| finding["waits_on"] }
|
|
83
|
+
|
|
72
84
|
#: () -> bool
|
|
73
85
|
def marked_evidence_not_kept? = @prior.any? { |finding| evidence_not_kept?(finding) }
|
|
74
86
|
|
|
@@ -30,13 +30,14 @@ module Principles
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# report is list-member-problems' JSON result: its "members", "counts" and "next_action".
|
|
33
|
-
# assessed_change says whether a member an audit assessed changed,
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
# assessed_change says whether a member an audit assessed changed, and unassessed_change whether a member no
|
|
34
|
+
# audit assessed was edited since mapping; the model decides both, so the status follows from them alone.
|
|
35
|
+
#: (Hash[String, untyped], nothing_changed: String, assessed_change: bool, unassessed_change: bool) -> Lines
|
|
36
|
+
def short(report, nothing_changed:, assessed_change:, unassessed_change:)
|
|
36
37
|
members = report.fetch("members")
|
|
37
38
|
Lines.new(stdout: members.map { |member| "#{row(member)}\n" }.join,
|
|
38
39
|
stderr: notes(report, nothing_changed).map { |note| "#{note}\n" }.join,
|
|
39
|
-
status: status(
|
|
40
|
+
status: status(assessed_change, unassessed_change))
|
|
40
41
|
end
|
|
41
42
|
|
|
42
43
|
# One changed member's row, its fields tab-separated: its principle, id, newest commit that changed it (or
|
|
@@ -47,17 +48,18 @@ module Principles
|
|
|
47
48
|
history = member.fetch("history", {})
|
|
48
49
|
newest = history.fetch("commits", []).first
|
|
49
50
|
fields = [member.fetch("principle"), member.fetch("id"), newest ? newest.fetch("commit") : "uncommitted",
|
|
50
|
-
newest ? described(newest, history) : "not committed yet", member.dig("since", "baseline")
|
|
51
|
+
newest ? described(newest, history) : "not committed yet", member.dig("since", "baseline"),
|
|
52
|
+
*("waiting_on_an_upgrade" if member["waiting_on_an_upgrade"])]
|
|
51
53
|
fields.map { |field| VisibleText.new(field.to_s).to_s }.join("\t")
|
|
52
54
|
end
|
|
53
55
|
|
|
54
56
|
private
|
|
55
57
|
|
|
56
|
-
#: (
|
|
57
|
-
def status(
|
|
58
|
-
return
|
|
58
|
+
#: (bool, bool) -> Integer
|
|
59
|
+
def status(assessed_change, unassessed_change)
|
|
60
|
+
return CHANGED if assessed_change
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
unassessed_change ? UNASSESSED_ONLY : 0
|
|
61
63
|
end
|
|
62
64
|
|
|
63
65
|
# The newest commit's subject, with how many earlier commits changed the member, and whether it changed
|
|
@@ -72,10 +74,11 @@ module Principles
|
|
|
72
74
|
end
|
|
73
75
|
|
|
74
76
|
# What the agent does next, and what an empty stdout would otherwise hide: no maps, or, in next_action,
|
|
75
|
-
# each principle's members with no baseline to compare with and what gives them one (#564)
|
|
77
|
+
# each principle's members with no baseline to compare with and what gives them one (#564), and each
|
|
78
|
+
# principle waiting on an upgrade, whose members are not counted, so they leave counts empty (D85, V8).
|
|
76
79
|
#: (Hash[String, untyped], String) -> Array[String]
|
|
77
80
|
def notes(report, nothing_changed)
|
|
78
|
-
[(NO_MAPS if report.fetch("counts").empty?),
|
|
81
|
+
[(NO_MAPS if report.fetch("counts").empty? && !report.key?("records_waiting_on_an_upgrade")),
|
|
79
82
|
(report.fetch("next_action") unless report.fetch("next_action") == nothing_changed),
|
|
80
83
|
("Details: #{@invocation.in_project("list-member-problems")}" unless report.fetch("members").empty?)].compact
|
|
81
84
|
end
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
require_relative "invocation"
|
|
5
5
|
require_relative "members_with_no_baseline"
|
|
6
6
|
require_relative "principles_with_no_completed_audit"
|
|
7
|
+
require_relative "record_waiting_on_an_upgrade"
|
|
7
8
|
|
|
8
9
|
module Principles
|
|
9
10
|
# What this tool prints, from plain values a controller hands it. views/CLAUDE.md owns the boundary.
|
|
@@ -25,26 +26,39 @@ module Principles
|
|
|
25
26
|
# report holds "members", the changed members, and "counts"; not_read names older files left unread;
|
|
26
27
|
# no_baseline_files names, by principle, the files to commit so its members with no baseline gain one.
|
|
27
28
|
# acknowledgeable names, by principle, the changed members a one-member audit may judge (#626, D56).
|
|
29
|
+
# waiting names each principle whose record a later copy wrote, whose members are not checked (D85, V8).
|
|
28
30
|
#: (Hash[String, untyped], ?not_read: Array[String], ?no_baseline_files: Hash[String, Array[String]],
|
|
29
|
-
#| ?acknowledgeable: Hash[String, Array[String]]
|
|
30
|
-
|
|
31
|
+
#| ?acknowledgeable: Hash[String, Array[String]], ?waiting: Array[RecordWaitingOnAnUpgrade])
|
|
32
|
+
#| -> Hash[String, untyped]
|
|
33
|
+
def checked(report, not_read: [], no_baseline_files: {}, acknowledgeable: {}, waiting: [])
|
|
31
34
|
unless not_read.empty?
|
|
32
35
|
report = report.merge("not_read" => not_read.map { |file| { "file" => file, "because" => OLDER_STATE } })
|
|
33
36
|
end
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
report.merge("next_action" => action.empty? ? NOTHING_CHANGED : action)
|
|
37
|
+
report = report.merge("records_waiting_on_an_upgrade" => waiting.map(&:to_h)) unless waiting.empty?
|
|
38
|
+
report.merge("next_action" => next_action(report, no_baseline_files:, acknowledgeable:, waiting:))
|
|
37
39
|
end
|
|
38
40
|
|
|
39
41
|
private
|
|
40
42
|
|
|
43
|
+
# What to do next for report, each kind of action on lines of its own, or NOTHING_CHANGED when none applies.
|
|
44
|
+
#: (Hash[String, untyped], no_baseline_files: Hash[String, Array[String]],
|
|
45
|
+
#| acknowledgeable: Hash[String, Array[String]], waiting: Array[RecordWaitingOnAnUpgrade]) -> String
|
|
46
|
+
def next_action(report, no_baseline_files:, acknowledgeable:, waiting:)
|
|
47
|
+
waits = waiting.map(&:principle)
|
|
48
|
+
action = [changed_action(report, acknowledgeable, waits), unaudited_action(report, waits),
|
|
49
|
+
*no_baseline_actions(report, no_baseline_files).map(&:to_s), *waiting.map(&:to_s)].compact.join("\n")
|
|
50
|
+
action.empty? ? NOTHING_CHANGED : action
|
|
51
|
+
end
|
|
52
|
+
|
|
41
53
|
# For each principle with a changed member, its audits, each command ending its own line (#568): where
|
|
42
54
|
# acknowledgeable names a member a one-member audit may judge, that audit for each such member, filled and
|
|
43
55
|
# shell-quoted so the agent types no id (#626, D56), then the full audit, each with when to use it; elsewhere
|
|
44
|
-
# the full audit alone, with no condition, as nothing else applies (#633).
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
56
|
+
# the full audit alone, with no condition, as nothing else applies (#633). None for a principle in waits, whose
|
|
57
|
+
# audits wait on an upgrade (#1066).
|
|
58
|
+
#: (Hash[String, untyped], Hash[String, Array[String]], Array[String]) -> String?
|
|
59
|
+
def changed_action(report, acknowledgeable, waits)
|
|
60
|
+
principles = report.fetch("members").map { |member| member.fetch("principle") }.uniq - waits
|
|
61
|
+
audits = principles.flat_map do |id|
|
|
48
62
|
full = @invocation.in_project("start-audit", id)
|
|
49
63
|
members = acknowledgeable.fetch(id, [])
|
|
50
64
|
next "Audit #{id} in full to judge its changed members: #{full}" if members.empty?
|
|
@@ -64,11 +78,11 @@ module Principles
|
|
|
64
78
|
|
|
65
79
|
# Members compared only with the commit that mapped them have never been assessed, so neither "changed" nor
|
|
66
80
|
# "unchanged" says whether they carry their principle: those added to an audited principle by principle, and
|
|
67
|
-
# every principle awaiting its first full audit in one line (D58, #731).
|
|
68
|
-
#: (Hash[String, untyped]) -> String?
|
|
69
|
-
def unaudited_action(report)
|
|
81
|
+
# every principle awaiting its first full audit in one line (D58, #731), but those in waits (#1066).
|
|
82
|
+
#: (Hash[String, untyped], Array[String]) -> String?
|
|
83
|
+
def unaudited_action(report, waits)
|
|
70
84
|
awaiting = report.fetch("awaiting_first_audit", [])
|
|
71
|
-
lines = [added_members_action(report, awaiting)]
|
|
85
|
+
lines = [added_members_action(report, awaiting + waits)]
|
|
72
86
|
unless awaiting.empty?
|
|
73
87
|
audits = awaiting.map { |id| @invocation.in_project("start-audit", id) }
|
|
74
88
|
lines << PrinciplesWithNoCompletedAudit.new(ids: awaiting, audits:).to_s
|
|
@@ -77,10 +91,10 @@ module Principles
|
|
|
77
91
|
end
|
|
78
92
|
|
|
79
93
|
# Each principle's members no audit has assessed, on its own line with its audit, but for the principles
|
|
80
|
-
# awaiting their first full audit.
|
|
94
|
+
# left_out names: those awaiting their first full audit, and those whose audits wait on an upgrade.
|
|
81
95
|
#: (Hash[String, untyped], Array[String]) -> String?
|
|
82
|
-
def added_members_action(report,
|
|
83
|
-
unseen = report.fetch("compared_with", {}).except(*
|
|
96
|
+
def added_members_action(report, left_out)
|
|
97
|
+
unseen = report.fetch("compared_with", {}).except(*left_out).filter_map do |id, counts|
|
|
84
98
|
count = counts.fetch("mapping_commit", 0)
|
|
85
99
|
next unless count.positive?
|
|
86
100
|
|
data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
Read the change
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
the member as it read at the baseline as `old_line`, and one as it reads now as `new_line`. From a long line, such
|
|
8
|
-
as a JSON string field, quote instead at least 30 characters that include the edit, which the member on the other
|
|
9
|
-
side of the change does not hold. When the meaning
|
|
10
|
-
changed, or you are unsure, run a full audit instead. An acknowledgement covers only this change, and the next full
|
|
11
|
-
audit lists every acknowledgement made since the last one. Any deferred finding on the member stays deferred and is
|
|
12
|
-
named beside the acknowledgement.
|
|
1
|
+
Read the change in member_lines, or by running read_the_change. Answer `meaning_kept: true` only when the member still
|
|
2
|
+
says the same thing. A member still says the same thing after a fixed typo, a reworded sentence or a renumbered
|
|
3
|
+
citation; an added, dropped, reversed, narrowed or widened rule changes what it says. When it changed, or you are
|
|
4
|
+
unsure, run a full audit instead. Give a one-line `reason` in your own words. The template quotes
|
|
5
|
+
`first_changed_lines` as `old_line` and `new_line`: keep them, or quote another changed line of each side, or 30
|
|
6
|
+
characters of one that include the edit.
|
|
@@ -49,15 +49,10 @@
|
|
|
49
49
|
},
|
|
50
50
|
"reassessment": "Give a reassessment only for a fixed finding; omit it for deferred, accepted or disagreed.",
|
|
51
51
|
"check_result": {
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"not_run": {
|
|
58
|
-
"command": "the member's check, exactly as context.members lists it",
|
|
59
|
-
"not_run_reason": "Why you could not run it here, such as a missing tool or a sandbox"
|
|
60
|
-
},
|
|
61
|
-
"limits": "Give a checked member's check_result in its own entry in member_assessments, where the template starts it, and none for a member without a check. A check whose check_since_last_audit status is new or changed has not been run by an audit, and anyone who can commit to the project can change it: before you run it, have it reviewed by the project's owner, or confirm it against the project's own documentation, where documentation outside the check's own file counts for more than comments in it, and otherwise report not_run_reason. Beside the exit status of a new or changed check, say in review_basis, in one line, what that review rested on, such as who reviewed it or the document that confirms it; if you did the review yourself, such as confirming against the documentation a check you changed, say so: \"Self-reviewed by the agent: <what you checked it against>\"; if no record of it was kept, say that the basis was not kept. This tool keeps the line and cannot verify it. You may give one beside not_run_reason or for an unchanged check too. A member that names a check asks for it to run at each full audit, however long it takes; if it is too slow to run at every audit, say so as a finding rather than skip it. Do not count on a permission prompt to show the command to anyone first. unchanged means an earlier audit ran this same command, not that it is safe: the audit record is committed too, and can be changed beside the check. Run the command in the project before you report its exit status: nothing runs it automatically, and nothing confirms that a reported run happened, that it ran on the files as they are now, or that the status is the one it returned. A failing check is a fact for your assessment; whether the member delivers stays your judgement."
|
|
52
|
+
"command": "the member's check, exactly as context.members lists it",
|
|
53
|
+
"exit_status": 0,
|
|
54
|
+
"review_basis": "One line saying what the review before the run rested on; needed beside exit_status when check_since_last_audit is new or changed",
|
|
55
|
+
"not_run_reason": "Instead of exit_status, when you could not run it here: why, such as a missing tool or a sandbox",
|
|
56
|
+
"limits": "Give a checked member's check_result in its own entry in member_assessments, where the template starts it, and none for a member without a check. A member that names a check asks for it to run at each full audit, however long it takes; if it is too slow to run at every audit, say so as a finding rather than skip it. Do not count on a permission prompt to show the command to anyone first. unchanged means an earlier audit ran this same command, not that it is safe: the audit record is committed too, and can be changed beside the check. Run the command in the project before you report its exit status: nothing runs it automatically, and nothing confirms that a reported run happened, that it ran on the files as they are now, or that the status is the one it returned. A failing check is a fact for your assessment; whether the member delivers stays your judgement."
|
|
62
57
|
}
|
|
63
58
|
}
|
|
@@ -6,7 +6,3 @@ each other, is any member never consulted or never updated, do any contradict? C
|
|
|
6
6
|
you recently made under this principle against the members' own words, or record why none is
|
|
7
7
|
available. Each finding needs a consequence and a concrete proposed action. Never treat plausible
|
|
8
8
|
source as observed operation.
|
|
9
|
-
Observed means you saw the member's mechanism act in this project, on a real input, or read a record
|
|
10
|
-
of it acting, such as a log or a build run. Reading its source or configuration is not observing it.
|
|
11
|
-
When you saw only part of what it does, for example a check accepting good input but never rejecting
|
|
12
|
-
bad input, mark it observed for what you saw and say which part you did not see.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
A finding kept from records written before this tool kept `first_raised_at` is dated late. When the record's git
|
|
2
|
+
history shows an earlier version leaving it open, at `.principles/audits/` or the folder's earlier name
|
|
3
|
+
`.memeplex/audits/`, and you judge it the same finding, give `first_raised_at`, that version's `audited_at`, with
|
|
4
|
+
`raised_in`, the full sha of the commit holding it, in its `still_holds` decision. This tool reads the record at
|
|
5
|
+
that commit only, and refuses the claim unless that version leaves a finding with the same id deferred or accepted,
|
|
6
|
+
its `audited_at` equals the claimed time, and the time is earlier than the one stored; whether it is the same
|
|
7
|
+
finding is yours to judge.
|
|
@@ -5,15 +5,9 @@ member is `current`, `changed` or `removed` since that audit. Read its write-up
|
|
|
5
5
|
there is one. A finding marked `text_not_kept` has no statement; judge it from its members.
|
|
6
6
|
|
|
7
7
|
Decide `still_holds` to keep it. Give `recorded_at` to point at a new write-up, and `problem`, one line, when the
|
|
8
|
-
finding is marked `text_not_kept
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
A deferral may carry `waits_on`, the one line an earlier audit gave saying whom it waits on and to decide what, and
|
|
12
|
-
`waits_on_since`, when that was asked. Check that the same person still owes the same decision: leave `waits_on` out
|
|
13
|
-
of a `still_holds` decision to keep it as asked then, give a new line when the ask changed, or null when it waits on
|
|
14
|
-
no one now. A `still_holds` decision may also give a deferral without one its first `waits_on` line; its
|
|
15
|
-
`waits_on_since` is then this audit, while `first_raised_at` keeps how long the finding has waited. A null, or
|
|
16
|
-
making the finding `accepted`, drops it, and the completed result names what it dropped.
|
|
8
|
+
finding is marked `text_not_kept` or to restate its problem when a term in it was renamed or a fact it names moved,
|
|
9
|
+
since a different problem is a new finding; the record keeps its `first_raised_at`, so leave that field out unless an
|
|
10
|
+
earlier record held the same finding; to claim that, read this field whole.
|
|
17
11
|
|
|
18
12
|
To change its `action`, give `action`, `deferred` or `accepted`, with a one-line `reason`. A deferral also gives
|
|
19
13
|
`recorded_at`, or null when it is written up nowhere; a null drops any pointer the finding had, and the completed
|
|
@@ -26,13 +20,8 @@ Decide `raised_again` with `as` set to the id of a new finding in this assessmen
|
|
|
26
20
|
audit, which keeps when it was first raised. Two raised again as one new finding are refused: to merge them, raise
|
|
27
21
|
one again and close the others as `withdrawn`, with a reason naming the new finding.
|
|
28
22
|
|
|
29
|
-
A finding kept from records written before this tool kept `first_raised_at` is dated late. When the record's git
|
|
30
|
-
history shows an earlier version leaving it open, at `.principles/audits/` or the folder's earlier name
|
|
31
|
-
`.memeplex/audits/`, and you judge it the same finding, give `first_raised_at`, that version's `audited_at`, with
|
|
32
|
-
`raised_in`, the full sha of the commit holding it, in its `still_holds` decision. This tool reads the record at
|
|
33
|
-
that commit only, and refuses the claim unless that version leaves a finding with the same id deferred or accepted,
|
|
34
|
-
its `audited_at` equals the claimed time, and the time is earlier than the one stored; whether it is the same
|
|
35
|
-
finding is yours to judge.
|
|
36
|
-
|
|
37
23
|
A new finding may not reuse the id of a prior finding you keep. The prior findings are %{ids}, so give new findings
|
|
38
24
|
other ids.
|
|
25
|
+
|
|
26
|
+
A `still_holds` decision may give a deferral without one its first `waits_on` line, saying whom it waits on and to
|
|
27
|
+
decide what; its `waits_on_since` is then this audit, while `first_raised_at` keeps how long the finding has waited.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
This check changed since the last audit ran it
|
|
2
|
-
|
|
1
|
+
This check changed since the last audit ran it%{changed_in}; show-audit prints the command that
|
|
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%{set_in}. 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.
|
data/lib/principles/views/prompts/assess-every-member/judge-the-set-with-carried-assessments.md
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
Each member with `carried_forward` is unchanged since the last full audit judged it: its text, its map
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
assessment is a fact about an earlier reading, not a check of the member now: `evidence_changed` and
|
|
7
|
-
`file_changed_outside_member` say what moved around it, and an observed delivery's `observed_at` says how
|
|
8
|
-
old its sighting is: judge the member again when that sighting is too old to stand behind. Replace a marker with a fresh assessment
|
|
9
|
-
whenever you no longer stand behind the one carried. A member with a check still needs its
|
|
10
|
-
`check_result`.
|
|
1
|
+
Each member with `carried_forward` is unchanged since the last full audit judged it: its text, its map entry and when it
|
|
2
|
+
loads are the same, and so are the description and this question. Its template entry is the marker `{"member_id",
|
|
3
|
+
"carried_forward": true}`, which keeps that assessment and its date. Judge afresh each member with `judge_because`, as
|
|
4
|
+
`judge_because_instruction` says. Then judge the set with the carried members in view, since a changed member can change
|
|
5
|
+
how the rest reinforce each other.
|
data/lib/principles/views/prompts/assess-every-member/keep-or-change-what-a-deferral-waits-on.md
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
A deferral may carry `waits_on`, the one line an earlier audit gave saying whom it waits on and to decide what, and
|
|
2
|
+
`waits_on_since`, when that was asked. Check that the same person still owes the same decision: leave `waits_on` out
|
|
3
|
+
of a `still_holds` decision to keep it as asked then, give a new line when the ask changed, or null when it waits on
|
|
4
|
+
no one now. A null, or making the finding `accepted`, drops it, and the completed result names what it dropped.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
When judging the set needs what a carried member was judged to say, run `show-audit` with this principle's id: a compact
|
|
2
|
+
one prints no assessment. A carried member shows only its `assessed_at`, the facts that say what moved around it, and
|
|
3
|
+
any check, whose `check_result` its template still asks for, unless one of those facts fires: then it prints whole, with
|
|
4
|
+
its stored assessment and evidence. It prints whole when `evidence_changed` or `file_changed_outside_member` is true,
|
|
5
|
+
when a `mapped_elsewhere` entry names `open_finding_ids`, and when this principle leaves a finding open on it: its
|
|
6
|
+
`open_finding_ids` names that finding, the same one the prior findings list. An observed delivery's `observed_at` stays,
|
|
7
|
+
since it says how old its sighting is: judge the member again when that sighting is too old to stand behind. Replace a
|
|
8
|
+
marker with a fresh assessment whenever you no longer stand behind the one carried.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Printed in part: %{fields}. To read one whole, add `--instruction FIELD` to this start-audit.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
A check whose check_since_last_audit status is new or changed has not been run by an audit, and anyone who can
|
|
2
|
+
commit to the project can change it: before you run it, have it reviewed by the project's owner, or confirm it
|
|
3
|
+
against the project's own documentation, where documentation outside the check's own file counts for more than
|
|
4
|
+
comments in it, and otherwise report not_run_reason. Beside the exit status of a new or changed check, say in
|
|
5
|
+
review_basis, in one line, what that review rested on, such as who reviewed it or the document that confirms it; if
|
|
6
|
+
you did the review yourself, such as confirming against the documentation a check you changed, say so:
|
|
7
|
+
"Self-reviewed by the agent: <what you checked it against>"; if no record of it was kept, say that the basis was not
|
|
8
|
+
kept. This tool keeps the line and cannot verify it. You may give one beside not_run_reason or for an unchanged
|
|
9
|
+
check too.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Run the command in the project, then replace this
|
|
2
|
-
|
|
1
|
+
Run the command in the project, then replace this text with its exit status, an integer. If it could not be
|
|
2
|
+
run, write why in not_run_reason instead, and leave this text as printed.
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
Then run it in the project
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
you changed, say so: "Self-reviewed by the agent: <what you checked it against>". This tool keeps
|
|
5
|
-
that line and cannot verify it.
|
|
6
|
-
Keep this field only to say why it was not run, including that no review was possible.
|
|
1
|
+
Then run it in the project, replace this text with its exit status, an integer, and replace review_basis with
|
|
2
|
+
what the review rested on. This tool keeps that line and cannot verify it. If it was not run, including when no
|
|
3
|
+
review was possible, write why in not_run_reason instead, and leave this text and review_basis as printed.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
Observed means you saw the member's mechanism act in this project, on a real input, or read a record
|
|
2
|
+
of it acting, such as a log or a build run. Reading its source or configuration is not observing it.
|
|
3
|
+
When you saw only part of what it does, for example a check accepting good input but never rejecting
|
|
4
|
+
bad input, mark it observed for what you saw and say which part you did not see.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Address each finding with an authorised edit, or record it as deferred, accepted or disagreed. The
|
|
2
|
-
template leaves each `action`
|
|
2
|
+
template leaves each `action` as a placeholder: set it to fixed, deferred, accepted or disagreed for each finding. A
|
|
3
3
|
fixed finding needs an actual change to its members, evidence and a reassessment. Replace each placeholder the
|
|
4
4
|
template gives a `reason` or a fix's `reassessment` with your own words, and do not copy an `answer_guide`
|
|
5
5
|
sample into the field it illustrates, `waits_on` included; either one sent back unchanged is refused. Keep the project's
|
|
@@ -10,9 +10,10 @@ or a notes file, set its `recorded_at` to that place, as `{"path": ..., "heading
|
|
|
10
10
|
When a deferral waits on someone, set its `waits_on` to one line saying whom it waits on and to decide what, such as
|
|
11
11
|
"<person>, to approve a CI change", and keep the reason in the write-up. Leave it null when it waits on no one in
|
|
12
12
|
particular. Only a deferral may give one, and this tool records when it was asked.
|
|
13
|
-
If a fix rewrites the heading or the quoted text that locates a member,
|
|
14
|
-
`move-member`, then list the move in the answer as
|
|
15
|
-
|
|
13
|
+
If a fix rewrites the heading or the quoted text that locates a member, or the member's passage should be narrower
|
|
14
|
+
or wider, move the member with `move-member`, then list the move in the answer as
|
|
15
|
+
`"moved_members": [{"from": OLD_ID, "to": NEW_ID}]`, or `[{"from": ID, "to": ID}]` when the move kept its id, and
|
|
16
|
+
name the id after the move in the finding's `changed_members`. In git, the move is checked against the map
|
|
16
17
|
the audit began from.
|
|
17
18
|
If the fix is to a member's role or check in the map, make it with `change-member-role` or `change-member-check`
|
|
18
19
|
and list the member's id in the finding's `changed_map_entries`. In git, the change is checked against the map the
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
After the table, ask the project's owner:
|