principles 0.1.3 → 0.1.4
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 +120 -0
- data/README.md +10 -6
- data/lib/principles/command_line.rb +15 -6
- data/lib/principles/command_routes.rb +11 -1
- data/lib/principles/controllers/acknowledgement.rb +19 -4
- data/lib/principles/controllers/acknowledgements.rb +43 -12
- data/lib/principles/controllers/after_commit_report.rb +15 -2
- data/lib/principles/controllers/assessment.rb +7 -3
- data/lib/principles/controllers/audit.rb +17 -8
- data/lib/principles/controllers/audit_completion.rb +34 -9
- data/lib/principles/controllers/carrier_practices.rb +26 -0
- data/lib/principles/controllers/command.rb +29 -2
- data/lib/principles/controllers/correction.rb +15 -5
- data/lib/principles/controllers/full_audit_request.rb +38 -42
- data/lib/principles/controllers/inventory.rb +77 -71
- data/lib/principles/controllers/last_record_notice_beside.rb +51 -0
- data/lib/principles/controllers/member_addition.rb +19 -4
- data/lib/principles/controllers/member_entries.rb +25 -6
- data/lib/principles/controllers/member_problems_report.rb +26 -6
- data/lib/principles/controllers/members_a_commit_changed.rb +14 -5
- data/lib/principles/controllers/members_in_logged_requests.rb +52 -0
- data/lib/principles/controllers/members_to_assess.rb +24 -7
- data/lib/principles/controllers/meta_principle_setup.rb +2 -2
- data/lib/principles/controllers/open_correction.rb +3 -2
- data/lib/principles/controllers/parts_to_read.rb +46 -5
- data/lib/principles/controllers/plugin_member_addition.rb +48 -0
- data/lib/principles/controllers/principle_listing.rb +84 -0
- data/lib/principles/controllers/request_logging.rb +52 -0
- data/lib/principles/controllers/running_tool.rb +39 -13
- data/lib/principles/data/branches_bringing_in.rb +52 -0
- data/lib/principles/data/changes_since.rb +56 -0
- data/lib/principles/data/claude_code_home.rb +58 -0
- data/lib/principles/data/command-steps.json +91 -15
- data/lib/principles/data/decoded_leaf.rb +63 -0
- data/lib/principles/data/head_reflog.rb +13 -2
- data/lib/principles/data/kept_line.rb +32 -0
- data/lib/principles/data/known_marketplaces.rb +50 -0
- data/lib/principles/data/logged_request_matches.rb +138 -0
- data/lib/principles/data/logged_request_scan.rb +120 -0
- data/lib/principles/data/map_files.rb +18 -4
- data/lib/principles/data/plugin_folder.rb +85 -0
- data/lib/principles/data/plugin_registry.rb +73 -0
- data/lib/principles/data/principles_store.rb +49 -0
- data/lib/principles/data/ran.rb +25 -0
- data/lib/principles/data/raw_request_filter.rb +61 -0
- data/lib/principles/data/repository.rb +29 -27
- data/lib/principles/data/request_logging_folder.rb +167 -0
- data/lib/principles/data/running_version.rb +1 -1
- data/lib/principles/data/schemas/acknowledgement-answer.schema.json +16 -1
- data/lib/principles/data/schemas/acknowledgements-answer.schema.json +16 -1
- data/lib/principles/data/schemas/assessment-answer.schema.json +8 -0
- data/lib/principles/data/schemas/command-steps.schema.json +1 -1
- data/lib/principles/data/schemas/correction-answer-guide.schema.json +2 -1
- data/lib/principles/data/schemas/correction-answer.schema.json +14 -0
- data/lib/principles/data/schemas/member-map.schema.json +10 -1
- data/lib/principles/data/string_counts.rb +39 -0
- data/lib/principles/data/tools_on_path.rb +25 -0
- data/lib/principles/invocation_options.rb +4 -2
- data/lib/principles/launch.rb +14 -4
- data/lib/principles/models/acknowledged_check.rb +11 -1
- data/lib/principles/models/acknowledgement.rb +5 -0
- data/lib/principles/models/acknowledgement_refusal.rb +20 -11
- data/lib/principles/models/acknowledgements_to_offer.rb +86 -0
- data/lib/principles/models/after_commit_input.rb +5 -0
- data/lib/principles/models/answer_fields.rb +3 -0
- data/lib/principles/models/assessment_basis.rb +10 -3
- data/lib/principles/models/audit.rb +10 -10
- data/lib/principles/models/audit_record.rb +10 -0
- data/lib/principles/models/audit_records.rb +4 -3
- data/lib/principles/models/audit_start.rb +9 -0
- data/lib/principles/models/authored_locator.rb +33 -0
- data/lib/principles/models/candidate_files.rb +23 -3
- data/lib/principles/models/candidate_outline.rb +18 -125
- data/lib/principles/models/captured_sessions.rb +128 -0
- data/lib/principles/models/carrier_kind.rb +79 -0
- data/lib/principles/models/cited_files.rb +12 -3
- data/lib/principles/models/decided_prior_findings.rb +5 -0
- data/lib/principles/models/disposition.rb +37 -6
- data/lib/principles/models/disposition_placeholders.rb +12 -0
- data/lib/principles/models/disposition_text_field.rb +4 -0
- data/lib/principles/models/feature.rb +53 -0
- data/lib/principles/models/finding_outcomes.rb +55 -0
- data/lib/principles/models/findings_left_open.rb +9 -11
- data/lib/principles/models/head_moves.rb +27 -10
- data/lib/principles/models/installed_component.rb +55 -0
- data/lib/principles/models/installed_plugins.rb +174 -0
- data/lib/principles/models/kept_sessions.rb +34 -0
- data/lib/principles/models/locator.rb +8 -0
- data/lib/principles/models/logged_request_reach.rb +44 -0
- data/lib/principles/models/logged_request_scan_completeness.rb +43 -0
- data/lib/principles/models/mapped_baseline.rb +46 -0
- data/lib/principles/models/maps_holding_file_whole.rb +42 -0
- data/lib/principles/models/markdown_text.rb +143 -0
- data/lib/principles/models/member.rb +14 -1
- data/lib/principles/models/member_entry.rb +56 -0
- data/lib/principles/models/member_lines.rb +11 -0
- data/lib/principles/models/member_loads.rb +17 -2
- data/lib/principles/models/member_problems.rb +45 -42
- data/lib/principles/models/member_reach.rb +36 -0
- data/lib/principles/models/member_snapshots.rb +23 -4
- data/lib/principles/models/member_text_as_sent.rb +31 -0
- data/lib/principles/models/member_texts.rb +45 -0
- data/lib/principles/models/members_in_logged_requests.rb +240 -0
- data/lib/principles/models/missing_files.rb +41 -16
- data/lib/principles/models/nearly_matching_maps.rb +56 -0
- data/lib/principles/models/open_correction.rb +5 -0
- data/lib/principles/models/open_finding.rb +4 -3
- data/lib/principles/models/outline_budget.rb +10 -1
- data/lib/principles/models/outline_item.rb +25 -0
- data/lib/principles/models/outline_section.rb +15 -4
- data/lib/principles/models/part_named.rb +16 -2
- data/lib/principles/models/plugin_component.rb +37 -0
- data/lib/principles/models/plugin_install.rb +33 -0
- data/lib/principles/models/plugin_name.rb +23 -0
- data/lib/principles/models/plugin_reference.rb +53 -0
- data/lib/principles/models/principle_members.rb +15 -0
- data/lib/principles/models/prior_finding_decision.rb +1 -1
- data/lib/principles/models/prior_finding_outcomes.rb +12 -1
- data/lib/principles/models/problem_report.rb +14 -25
- data/lib/principles/models/project.rb +35 -29
- data/lib/principles/models/project_history.rb +19 -5
- data/lib/principles/models/recorded_members.rb +7 -0
- data/lib/principles/models/request_logging.rb +196 -0
- data/lib/principles/models/runs_from.rb +0 -5
- data/lib/principles/models/script_comments.rb +58 -0
- data/lib/principles/models/stale_request.rb +9 -0
- data/lib/principles/models/unfixed_part.rb +82 -0
- data/lib/principles/models/unresolved_plugin_members.rb +35 -0
- data/lib/principles/models/whole_file_member_read.rb +48 -0
- data/lib/principles/models/without_prose.rb +20 -0
- data/lib/principles/models/workflow_jobs.rb +92 -0
- data/lib/principles/show_members_in_logged_requests_options.rb +27 -0
- data/lib/principles/show_principle_options.rb +32 -0
- data/lib/principles/version.rb +2 -2
- data/lib/principles/views/acknowledged_result.rb +31 -12
- data/lib/principles/views/acknowledgement_result.rb +18 -13
- data/lib/principles/views/acknowledgement_template_alone.rb +55 -0
- data/lib/principles/views/acknowledgements_offered.rb +54 -0
- data/lib/principles/views/added_member.rb +22 -6
- data/lib/principles/views/answer_in_a_file.rb +15 -15
- data/lib/principles/views/assessed_members.rb +18 -7
- data/lib/principles/views/assessment_request.rb +8 -3
- data/lib/principles/views/audit_changes.rb +14 -8
- data/lib/principles/views/audit_findings.rb +34 -0
- data/lib/principles/views/audit_result.rb +14 -19
- data/lib/principles/views/carrier_checks.rb +40 -0
- data/lib/principles/views/carrier_practices_page.rb +49 -0
- data/lib/principles/views/completed_audit_findings.rb +33 -0
- data/lib/principles/views/completed_audit_next_step.rb +12 -4
- data/lib/principles/views/consecutive_sections_elsewhere.rb +4 -0
- data/lib/principles/views/context_parts.rb +129 -25
- data/lib/principles/views/correction_request.rb +21 -16
- data/lib/principles/views/disposition_template.rb +35 -0
- data/lib/principles/views/first_audit.rb +29 -15
- data/lib/principles/views/first_audit_line.rb +4 -5
- data/lib/principles/views/invocation.rb +14 -5
- data/lib/principles/views/last_record_notice.rb +41 -0
- data/lib/principles/views/lines_shared_with_member.rb +16 -22
- data/lib/principles/views/logged_request_status_meanings.rb +29 -0
- data/lib/principles/views/logged_requests_evidence.rb +69 -0
- data/lib/principles/views/map_added_to.rb +14 -12
- data/lib/principles/views/map_result.rb +39 -17
- data/lib/principles/views/member_change_since_baseline.rb +4 -0
- data/lib/principles/views/member_row.rb +13 -4
- data/lib/principles/views/member_sets_overlap.rb +31 -0
- data/lib/principles/views/members_a_commit_changed.rb +42 -25
- data/lib/principles/views/members_changed_during_audit.rb +27 -0
- data/lib/principles/views/members_in_logged_requests_result.rb +68 -0
- data/lib/principles/views/members_too_short_to_scan.rb +45 -0
- data/lib/principles/views/members_with_no_baseline.rb +6 -6
- data/lib/principles/views/meta_principle_result.rb +14 -2
- data/lib/principles/views/open_findings_line.rb +31 -92
- data/lib/principles/views/parts_index_result.rb +9 -5
- data/lib/principles/views/principle_read_result.rb +52 -11
- data/lib/principles/views/prior_findings_result.rb +9 -1
- data/lib/principles/views/problem_facts.rb +5 -3
- data/lib/principles/views/problem_lines.rb +32 -6
- data/lib/principles/views/problem_result.rb +7 -15
- data/lib/principles/views/prompts/assess-every-member/claim-an-earlier-first-raised-at.md +6 -6
- data/lib/principles/views/prompts/assess-every-member/read-a-compact-carried-member.md +9 -8
- data/lib/principles/views/prompts/assess-every-member/read-a-flagged-member-s-text-whole.md +3 -0
- data/lib/principles/views/prompts/assess-every-member/read-a-judged-member-s-text-whole.md +3 -0
- data/lib/principles/views/prompts/assess-every-member/turn-on-request-logging-to-see-what-reaches-context.md +2 -0
- data/lib/principles/views/prompts/assess-every-member/weigh-what-reached-the-context.md +7 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +5 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md +1 -1
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-configuration.md +41 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-scripts.md +35 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-instruction-files.md +37 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-other-text-an-agent-reads.md +38 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-rule-files.md +34 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-skills.md +35 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-subagent-definitions.md +35 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +50 -51
- data/lib/principles/views/prompts/learn-what-a-command-does/change-member-role.md +2 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +1 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +32 -32
- data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +10 -11
- data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +7 -6
- data/lib/principles/views/prompts/learn-what-a-command-does/remove-logged-requests.md +16 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/remove-member.md +2 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/report-at-session-start.md +2 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/show-audit.md +7 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +8 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/show-carrier-practices.md +13 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-logged-requests.md +20 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-members-in-logged-requests.md +48 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-principle.md +14 -14
- data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +27 -27
- data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +10 -10
- data/lib/principles/views/prompts/learn-what-a-command-does/turn-off-request-logging.md +10 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/turn-on-request-logging.md +32 -0
- data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +3 -2
- data/lib/principles/views/prompts/read-what-reached-the-context/explain-request-logging-to-the-user.md +11 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/see-whether-members-reach-the-agent.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-absent-means.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-not-a-carrier-means.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-present-but-not-loaded-means.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-present-means.md +1 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-unmeasurable-means.md +2 -0
- data/lib/principles/views/prompts/report-after-a-commit/plugin-members-are-still-listed.md +1 -0
- data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members-waiting-on-an-upgrade.md +2 -2
- data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members.md +2 -2
- data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-what-each-needs-before-the-next-commit.md +1 -0
- data/lib/principles/views/prompts/set-principles-up/entry-file-passage.md +1 -1
- data/lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md +2 -1
- data/lib/principles/views/prompts/start-a-session/hand-the-first-audit-to-a-subagent.md +2 -3
- data/lib/principles/views/prompts/start-a-session/raise-the-open-findings-waiting-on-no-one.md +1 -0
- data/lib/principles/views/request_logging_result.rb +62 -0
- data/lib/principles/views/request_part.rb +10 -4
- data/lib/principles/views/request_parts.rb +9 -0
- data/lib/principles/views/whole_file_elsewhere.rb +30 -0
- metadata +101 -4
- data/lib/principles/views/prompts/report-after-a-commit/the-principles-skill-is-where-to-start.md +0 -1
- data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-each-one.md +0 -1
|
@@ -6,53 +6,8 @@ and activation `show-meta-principle-passage` shows, and that member. That result
|
|
|
6
6
|
activation it wrote under `map_created`; a later add-member has no `map_created`. Its question says to commit the map,
|
|
7
7
|
how to show it, what to do next and, while a correction may be open, how a fix claims the member, only with a
|
|
8
8
|
principle's first member or, in git once it has a commit, while the map file is as last committed, so members
|
|
9
|
-
mapped in one sitting do not each repeat them.
|
|
10
|
-
|
|
11
|
-
If the keeping principle's map was removed, commit that removal before its first add-member recreates it.
|
|
12
|
-
`map_removal_not_committed` refuses while its map path remains at committed HEAD; `git_history_unavailable`
|
|
13
|
-
refuses when that history cannot be verified. Existing-map additions keep their ordinary behavior.
|
|
14
|
-
|
|
15
|
-
When one or two members are mapped and this copy knows no full audit has completed, that reminder asks whether
|
|
16
|
-
every carrier is included and whether a member belongs to another principle. This is a question, not a minimum
|
|
17
|
-
map size or a merge decision; unreadable/newer audit state does not count as known absence.
|
|
18
|
-
|
|
19
|
-
`added.new_loading_scope` appears when this member has known literal loading-scope qualifiers not already mapped,
|
|
20
|
-
and at least one prior known scope differs. `scope` and `already_mapped` (grouped `member_ids`) show the new and
|
|
21
|
-
prior facts. `loading_basis` is `host: claude_code`, `kind: documented_prediction`,
|
|
22
|
-
`session_start_assumption: project_root`; it is not observed delivery or a Codex derivation.
|
|
23
|
-
The question asks whether carriers will be available where
|
|
24
|
-
the principle applies, or should link to another carrier. This cue does not depend on audit history or the
|
|
25
|
-
per-sitting reminder; adding another member in an already represented scope does not repeat it.
|
|
26
|
-
The projection keeps when, context, invoked_by, skill_part and description qualifiers, with literal files and
|
|
27
|
-
paths_field lines in their original order; it excludes sizes and hook references and does not interpret globs.
|
|
28
|
-
`not_loaded` is a known no-load prediction. `not_determined` and `no_known_carrier`, even nested, are unclassified:
|
|
29
|
-
`not_compared` lists each unclassified `member_id` and `scope` only beside a positive hint, never as evidence
|
|
30
|
-
of equal scope, difference or delivery.
|
|
31
|
-
Unknown new scopes or only unknown prior scopes give no new-scope field or cue.
|
|
32
|
-
|
|
33
|
-
`added.consecutive_sections_elsewhere` names other maps' members in consecutive complete Markdown sections
|
|
34
|
-
of the same underlying file, with their path, role and current lines, only when all named maps lack a completed
|
|
35
|
-
full audit. Only heading locators without passage/query qualifiers qualify; spans meet without overlap or a gap.
|
|
36
|
-
The question asks whether they carry one rule or distinct principles; location alone does not decide.
|
|
37
|
-
Unreadable/unknown audit or member facts are omitted, and an empty group and its note are absent.
|
|
38
|
-
|
|
39
|
-
When the new member shares a line with members already mapped, `added` names them, so you see that one
|
|
40
|
-
edit there will show as a change to each: `overlaps` lists those in this principle, and `mapped_elsewhere`
|
|
41
|
-
those in other principles, each with its principle, its id, the role it plays there and its `first_line` and
|
|
42
|
-
`last_line`, since this page does not show another principle's members. A member mapped through a symbolic
|
|
43
|
-
link to the same file is listed too, under the path it was mapped by, since an edit through either name
|
|
44
|
-
changes both. Check that the role
|
|
45
|
-
you gave fits beside theirs. A member that spans exactly the new member's lines is marked too: in this
|
|
46
|
-
principle by `same_lines_as`, listing those of `overlaps`, and in another by `"same_lines": true` on its
|
|
47
|
-
`mapped_elsewhere` entry. Equal lines may still differ within a line, so decide whether they are one member
|
|
48
|
-
mapped twice under different ids, and keep one, or two meant to share those lines, and say why in the role.
|
|
49
|
-
A `mapped_elsewhere` entry whose lines include all of the new member's gives `"spans_these_lines": true`,
|
|
50
|
-
and one whose lines all lie within the new member's gives `"within_these_lines": true`. One sharing only some
|
|
51
|
-
of the lines is marked neither way. Every edit to the held member's text is an edit to the holding one, and an
|
|
52
|
-
edit outside the shared lines reaches only the holding one. These are lines, not text: where two share a first
|
|
53
|
-
or last line, a passage can start or end partway through it, so the question asks you to check the text there,
|
|
54
|
-
unless the holding member is a whole file, which holds every line's text.
|
|
55
|
-
The result lists each field only when there are some.
|
|
9
|
+
mapped in one sitting do not each repeat them. `--plugin NAME@MARKETPLACE` maps PATH inside an installed
|
|
10
|
+
plugin, whole and read-only, refusing a location flag (`plugin_member_located`); audits compare its pinned hash.
|
|
56
11
|
|
|
57
12
|
The location flags narrow the member; omit them for a whole file. Give both to take a passage within a section:
|
|
58
13
|
|
|
@@ -72,7 +27,51 @@ The location flags narrow the member; omit them for a whole file. Give both to t
|
|
|
72
27
|
its `key:` line and the indented or list lines after it. So respelling the key counts as a change,
|
|
73
28
|
as does editing its value. A query takes no other location flag.
|
|
74
29
|
|
|
75
|
-
`--check COMMAND` names the command that enforces this member, such as the build task that fails on a
|
|
76
|
-
|
|
77
|
-
added or changed asks for it to be reviewed before it runs. This tool
|
|
78
|
-
it. Change it later with `change-member-check`.
|
|
30
|
+
`--check COMMAND` names the command that enforces this member, such as the build task that fails on a broken rule.
|
|
31
|
+
Each audit asks you to run it and report its exit status. A check passes when it exits 0 and fails on any other exit
|
|
32
|
+
status. The first audit after a check is added or changed asks for it to be reviewed before it runs. This tool
|
|
33
|
+
stores the command and never runs it. Change it later with `change-member-check`.
|
|
34
|
+
|
|
35
|
+
If the keeping principle's map was removed, commit that removal before its first add-member recreates it.
|
|
36
|
+
`map_removal_not_committed` refuses while its map is at committed HEAD, `git_history_unavailable` when unverifiable.
|
|
37
|
+
|
|
38
|
+
When one or two members are mapped and this copy knows no full audit has completed, that reminder asks whether
|
|
39
|
+
every carrier is included and whether a member belongs to another principle. This is a question, not a minimum
|
|
40
|
+
map size or a merge decision; unreadable/newer audit state does not count as known absence.
|
|
41
|
+
|
|
42
|
+
`added.new_loading_scope` appears when this member has known literal loading-scope qualifiers not already mapped,
|
|
43
|
+
and at least one prior known scope differs. `scope` and `already_mapped` (grouped `member_ids`) show the new and
|
|
44
|
+
prior facts. `loading_basis` is `host: claude_code`, `kind: documented_prediction`, `session_start_assumption:
|
|
45
|
+
project_root`; it is not observed delivery or a Codex derivation. The question asks whether carriers will be
|
|
46
|
+
available where the principle applies, or should link to another carrier. This cue does not depend on audit history
|
|
47
|
+
or the per-sitting reminder; adding another member in an already represented scope does not repeat it.
|
|
48
|
+
The projection keeps when, context, invoked_by, skill_part and description qualifiers, with literal files and
|
|
49
|
+
paths_field lines in their original order; it excludes sizes and hook references and does not interpret globs.
|
|
50
|
+
`not_loaded` is a known no-load prediction. `not_determined` and `no_known_carrier`, even nested, are unclassified:
|
|
51
|
+
`not_compared` lists each unclassified `member_id` and `scope` only beside a positive hint, never as evidence
|
|
52
|
+
of equal scope, difference or delivery. Unknown new scopes or only unknown prior scopes give no new-scope field or cue.
|
|
53
|
+
|
|
54
|
+
`added.consecutive_sections_elsewhere` names other maps' members in consecutive complete Markdown sections of the
|
|
55
|
+
same underlying file (heading locators alone, meeting without overlap or gap), with path, role and current lines,
|
|
56
|
+
only while every named map lacks a completed full audit. The question asks whether they carry one rule or distinct
|
|
57
|
+
principles; location alone does not decide. Unreadable or unknown audit or member facts are left out.
|
|
58
|
+
|
|
59
|
+
`added.whole_file_elsewhere` lists other principles holding the new whole-file member's file whole, by path or link.
|
|
60
|
+
`added.member_sets_overlap` gives each other map sharing, by member id, the new member and one more, `shared`, and at
|
|
61
|
+
least two thirds of `members_in_either`. Either asks whether each should hold only the passages that carry it
|
|
62
|
+
(move-member) or they are one principle: add one map's members to the other, then remove-principle.
|
|
63
|
+
|
|
64
|
+
When the new member shares a line with members already mapped, `added` names them, so you see that one edit there
|
|
65
|
+
will show as a change to each: `overlaps` lists those in this principle, and `mapped_elsewhere` those in other
|
|
66
|
+
principles, each with its principle, its id, its role there and its `first_line` and `last_line`, which this page
|
|
67
|
+
does not otherwise show; one mapped through a symbolic link to the same file is listed under the path it was mapped
|
|
68
|
+
by. Check that the role you gave fits beside theirs. A member spanning exactly the new member's lines is marked too:
|
|
69
|
+
in this principle by `same_lines_as`, listing those of `overlaps`, and in another by `"same_lines": true` on its
|
|
70
|
+
`mapped_elsewhere` entry. Equal lines may still differ within a line, so decide whether they are one member mapped
|
|
71
|
+
twice under different ids, and keep one, or two meant to share those lines, and say why in the role. A
|
|
72
|
+
`mapped_elsewhere` entry whose lines include all of the new member's gives `"spans_these_lines": true`, and one whose
|
|
73
|
+
lines all lie within the new member's gives `"within_these_lines": true`; one sharing only some is marked neither way.
|
|
74
|
+
Every edit to the held member's text is an edit to the holding one, and an edit outside the shared lines reaches only
|
|
75
|
+
the holding one. These are lines, not text: where two share a first or last line, a passage can start or end partway
|
|
76
|
+
through it, so the question asks you to check the text there, unless the holding member is a whole file, which holds
|
|
77
|
+
every line's text. Each field is listed only when there are some.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
Replaces the role of MEMBER of principle ID with ROLE. MEMBER is the id `show-principle` lists.
|
|
1
|
+
Replaces the role of MEMBER of principle ID with ROLE. MEMBER is the id `show-principle` lists. The result prints
|
|
2
|
+
under `member` its id and new role, not the whole map: `show-principle` shows the rest.
|
|
2
3
|
|
|
3
4
|
Run during a full audit, between an accepted assessment and its correction, to fix a finding in the map: list MEMBER
|
|
4
5
|
in the `changed_map_entries` of the fixed disposition it fixes, and submit the correction. This tool prints both
|
|
@@ -51,7 +51,7 @@ characters, lines A-B)`; then list items; then headings below the second level f
|
|
|
51
51
|
The root CLAUDE.md and AGENTS.md go after every other file, and keep their outlines. `outlines_cut` names each file
|
|
52
52
|
whose outline lines were cut; a file whose only cut is its description is not named, since its text says so. Under
|
|
53
53
|
each heading of a cut file, `(N more, lines A-B)`, or `(N more under M headings, lines A-B)`, says how many items
|
|
54
|
-
|
|
54
|
+
it leaves out and which lines of the file hold them, so read just those lines where the survey needs them, not the
|
|
55
55
|
whole file. `outlines_left_out` names files at path and size alone. Run `show-candidate-outlines PATH...` for needed
|
|
56
56
|
outlines; request fewer paths if it omits any. In git, `untracked` names each listed file git does not track, and
|
|
57
57
|
each file a listed link leads to that git does not track: it loads into context all the same, but start-audit
|
|
@@ -6,9 +6,9 @@ It refuses with `broken_members` while any member cannot be found or read, or a
|
|
|
6
6
|
own check can stop on its exit status. Each member the refusal lists carries its own refusal and `repair_with`: a
|
|
7
7
|
`move-member`, if it moved; for a section or passage, a second `move-member --path NEW_PATH`, if its text moved into
|
|
8
8
|
another file; or a `remove-member`, if it is gone. When its file was renamed, the move is `move-member --path
|
|
9
|
-
NEW_PATH`, which keeps its audit. `missing_files` groups
|
|
10
|
-
`git_detected_rename
|
|
11
|
-
|
|
9
|
+
NEW_PATH`, which keeps its audit. `missing_files` groups each unreadable file's members, and the refusal's `repair`
|
|
10
|
+
says once how to repair them. Its `git_detected_rename`, git's match for the path, gives `to`, `similarity` and
|
|
11
|
+
`deleted_in`: check it before you fill in `NEW_PATH`. Its `on_branches` names a local branch bringing the file in.
|
|
12
12
|
|
|
13
13
|
Otherwise it lists each changed member with `since`: whether it was compared with the last audit (`audit`) or with
|
|
14
14
|
the commit that mapped the member where it is (`mapping_commit`), and that commit, and `history`: the commits after
|
|
@@ -19,10 +19,9 @@ follows a member that `move-member --path` moved to a renamed file. A merge is c
|
|
|
19
19
|
`unchanged` for a member as its last audit or acknowledgement recorded it, `unchanged_since_mapping` for one compared
|
|
20
20
|
only with the commit that mapped it, which no audit has assessed, and `no_baseline` for a member with no earlier text.
|
|
21
21
|
`no_baseline_because` says why, for each principle with one: `outside_git`, where no completed audit assessed it,
|
|
22
|
-
so a completed audit gives each one; or `not_committed`, where no commit holds the member where its map places it,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
files.
|
|
22
|
+
so a completed audit gives each one; or `not_committed`, where no commit holds the member where its map places it, so
|
|
23
|
+
committing those of the map and the member's file that differ from HEAD or are untracked gives it one, and when every
|
|
24
|
+
one is committed already, a completed audit gives it one. `next_action` names that audit, or those files.
|
|
26
25
|
`no_completed_audit` names readable maps without a completed full audit, even uncommitted. `next_action` counts them
|
|
27
26
|
before baselines without judging meaning or completeness. `empty_maps` names maps with no members, even after an audit.
|
|
28
27
|
Add a member first if empty; commit required files before an audit. Unknown/newer records keep upgrade/refusal guidance.
|
|
@@ -33,43 +32,44 @@ audit with `start-audit ID`. When the member still says the same thing, a comple
|
|
|
33
32
|
its check, if any, in git, acknowledge it with `start-audit ID --member MEMBER`; `next_action` offers that only where
|
|
34
33
|
it applies, as one command per principle giving `--member` for each such member, quoted for a shell.
|
|
35
34
|
`records_waiting_on_an_upgrade`: principles whose record a later copy wrote, changes marked `waiting_on_an_upgrade`.
|
|
35
|
+
A plugin's member (`add-member --plugin`) is compared with its map's `pinned` hash until an audit, `source` naming
|
|
36
|
+
the version installed; `plugin_unresolved`, and an uncounted `--short` row, name one no plugin gives and its `reason`.
|
|
36
37
|
|
|
37
38
|
Run it after a commit that touches a mapped member's file, and at the start of a session.
|
|
38
39
|
|
|
39
40
|
`--short` is for a git hook or a heartbeat that acts on an exit status and short lines alone. It prints one line per
|
|
40
41
|
changed member on stdout, with these tab-separated fields: its principle, its id, the newest commit that changed it
|
|
41
|
-
(or `uncommitted`), whose subject and earlier commits `--history` adds to the JSON
|
|
42
|
-
with: `audit` when an audit or acknowledgement assessed its text, or `mapping_commit`
|
|
43
|
-
when no audit has, so only
|
|
42
|
+
(or `uncommitted`, or a plugin's `version:` installed), whose subject and earlier commits `--history` adds to the JSON
|
|
43
|
+
result, and what it was compared with: `audit` when an audit or acknowledgement assessed its text, or `mapping_commit`
|
|
44
|
+
or `pinned` when no audit has, so only its mapping gives a baseline, then `waiting_on_an_upgrade` for one compared
|
|
44
45
|
with hashes a later copy wrote. Members compared with an audit come first. Control and invisible characters in a field
|
|
45
46
|
are written as `\uXXXX`, so an id holding such a character is escaped for display: copied from a row, it names no
|
|
46
47
|
member. The commands `next_action` prints carry each id exactly. After the rows, a line for each principle with members
|
|
47
|
-
no audit has assessed gives its id and `N never assessed`. It exits 0 when
|
|
48
|
-
|
|
49
|
-
Every refusal exits 1 with a single line of JSON on stderr, the only line this
|
|
50
|
-
whose `code` names it, such as `broken_members` (a member that cannot be found or
|
|
51
|
-
(a project state to repair) or `unsupported_ruby` (no supported Ruby runs this
|
|
52
|
-
shim, may write other lines there, and codes may be added: a code a hook does
|
|
53
|
-
usage error exits 2. When it does not refuse, stderr carries what to do next, its
|
|
54
|
-
it, else run in the project it names once, and says when there are no maps, or
|
|
55
|
-
|
|
48
|
+
no audit has assessed gives its id and `N never assessed`. It exits 0 when nothing this copy can act on changed, as when
|
|
49
|
+
a change waits on an upgrade, its plugin is unresolved or a member has no baseline yet, as one added and not committed,
|
|
50
|
+
and 3 when it prints a row or a count. Every refusal exits 1 with a single line of JSON on stderr, the only line this
|
|
51
|
+
tool writes there when it refuses, whose `code` names it, such as `broken_members` (a member that cannot be found or
|
|
52
|
+
read), `principles_folder_not_moved` (a project state to repair) or `unsupported_ruby` (no supported Ruby runs this
|
|
53
|
+
tool). Other programs, such as an rbenv shim, may write other lines there, and codes may be added: a code a hook does
|
|
54
|
+
not know is still a refusal to read. A usage error exits 2. When it does not refuse, stderr carries what to do next, its
|
|
55
|
+
commands naming `--project` if given it, else run in the project it names once, and says when there are no maps, or
|
|
56
|
+
members with no baseline, that an empty stdout would hide, else `Nothing changed (N members).` A changed member stays
|
|
57
|
+
listed until an audit takes it in: a notice, not a gate that blocks commits.
|
|
56
58
|
For a post-commit hook, run: %{executable} list-member-problems --short || true
|
|
57
59
|
A heartbeat can compare each line's commit with the last one it reported.
|
|
58
60
|
`--short --session-start SOURCE`, for the session-start hook, prints one line instead: a changed principle's count
|
|
59
61
|
and this command for it, to run before the user's task, or, for several, their count and `--short`, which lists them.
|
|
60
62
|
|
|
61
63
|
`--commits-after COMMIT --hook-event EVENT` is for a Claude Code hook that runs after a Bash call, so a long session
|
|
62
|
-
learns of a member it changed at the commit that changed it, not only at its next start. The plugin's after-commit
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
learns of a member it changed at the commit that changed it, not only at its next start. The plugin's after-commit hook
|
|
65
|
+
runs it once HEAD moved during the call, with COMMIT the full sha HEAD pointed at before, and EVENT the hook's event,
|
|
66
|
+
`PostToolUse` or `PostToolUseFailure`. It prints one JSON object, `hookSpecificOutput`, whose `hookEventName` is EVENT
|
|
67
|
+
and whose `additionalContext` names, one row per member in `--short`'s fields, the members whose newest changing commit
|
|
68
|
+
came after COMMIT, of both kinds, then how many other changed members are still listed, a plugin's apart, and this
|
|
69
|
+
command with `--short`, which shows what each needs before the next commit; one waiting on an upgrade comes apart. It
|
|
70
|
+
prints nothing when those commits changed no mapped member. A refusal is reported, as its code and this command, only
|
|
71
|
+
when those commits changed `.principles/` or a file a map names, since only then could they have caused it; else it
|
|
72
|
+
prints nothing, and the session-start hook reports it. It exits 0 but for a usage error.
|
|
71
73
|
|
|
72
|
-
A member
|
|
73
|
-
|
|
74
|
-
narrowed or widened rule changes what it says. When one member was edited but still says the same thing, and a completed
|
|
75
|
-
full audit has judged it, take in just that edit with `start-audit ID --member MEMBER` instead of a full audit.
|
|
74
|
+
A member still says the same thing after a fixed typo, a reworded sentence or a renumbered citation; an added,
|
|
75
|
+
dropped, reversed, narrowed or widened rule changes what it says.
|
|
@@ -63,14 +63,13 @@ design, and `open N days` since first raised, with no script over this JSON. It
|
|
|
63
63
|
|
|
64
64
|
`--short` is for a session-start hook, where an open finding would otherwise wait unseen until its principle's next full
|
|
65
65
|
audit. It prints one line instead of JSON, and nothing at all when no deferred finding is open, exiting 0 either way:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
`
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
principles plugin's session-start hook prints this line, passing its source.
|
|
66
|
+
first, while any finding has a `waits_on`, to act on each that waits on the agent itself, then to raise in the first
|
|
67
|
+
reply each that waits on a person, or on no one, since nothing else will; then how many deferred findings have a
|
|
68
|
+
`waits_on`, how many have none, how many whole days the oldest has waited, and the `--lines` command that lists whom
|
|
69
|
+
each waits on. The agent judges from each `waits_on` whether it names itself or a person. While any open finding's `write_up_opening_reason` is `unavailable`, the line also names that write-up, or the
|
|
70
|
+
first of them with their count, so a pointer that no longer resolves is seen at session start. With `--session-start
|
|
71
|
+
SOURCE`, one of `startup`, `resume`, `clear` and `compact` as Claude Code's SessionStart hook names them, the line for
|
|
72
|
+
`clear` or `compact` asks for the next reply; without it the line is worded for `startup`. For `resume`, whose
|
|
73
|
+
conversation holds the line already, it gives only how many deferred findings are open, the oldest by principle and id,
|
|
74
|
+
how many whole days it has waited since its `first_raised_at`, not `waits_on_since`, which dates only the ask, and the
|
|
75
|
+
command that prints the line whole. The principles plugin's session-start hook prints this line, passing its source.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Points MEMBER of principle ID at a new place, keeping its role and the key its audit is filed under. Use it when a
|
|
2
|
-
heading was renamed, a passage's anchor was lost, or the member should be narrower or wider, as when a passage was
|
|
3
|
-
|
|
4
|
-
`--path PATH`, with the member's own `--section`, passage or `--query` flags, so it keeps its last audit. This tool
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
lists. The result
|
|
2
|
+
heading was renamed, a passage's anchor was lost, or the member should be narrower or wider, as when a passage was cut
|
|
3
|
+
short. When the member's file was renamed or moved, or its text moved into another file, give that path with
|
|
4
|
+
`--path PATH`, with the member's own `--section`, passage or `--query` flags, so it keeps its last audit. This tool does
|
|
5
|
+
not guess the new path: find it with git or by reading the project. The location flags are as for `add-member` and
|
|
6
|
+
replace the old ones whole, so `--path` alone makes the member the whole file, and `--ending-at` alone is refused: give
|
|
7
|
+
the opening with `--starting-at` again. MEMBER is the id `show-principle` lists. The result prints the member's new id
|
|
8
|
+
and place under `member`, with the lines it now spans, but not its role or the whole map: `show-principle` shows those.
|
|
8
9
|
|
|
9
10
|
A new literal `--ending-at` must occur once after the complete opening in the selected region; overlapping matches count.
|
|
10
11
|
`ambiguous_passage_end` refuses before writing: exact `eligible_ending_count`, up to five `ending_candidates` with
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Use it when `show-logged-requests` shows the folder holding more sessions than you still need: each request copies
|
|
2
|
+
the session's whole context, so old sessions fill the disk and keep old context on it.
|
|
3
|
+
|
|
4
|
+
`--keep-sessions N` says how many of the newest sessions to keep, a whole number, 0 keeping none; without it, 5.
|
|
5
|
+
It refuses with `invalid_keep_sessions` any other value. Before deleting anything it also refuses with
|
|
6
|
+
`request_logging_unguarded` while the folder exists without its `.gitignore`, and with
|
|
7
|
+
`request_logging_not_ignored` while git does not ignore every file there.
|
|
8
|
+
|
|
9
|
+
It ranks the sessions by their newest line in `requests/index.jsonl`, comparing the timestamps as text, and deletes
|
|
10
|
+
the request and response files the index names for every session older than the newest N. It keeps the index, the
|
|
11
|
+
launch file, any file a kept session also names, and any file the index names outside `requests/`. It also deletes
|
|
12
|
+
each request file the index does not name, which `show-logged-requests` counts as `orphan_requests`, once it was
|
|
13
|
+
written before every kept session's file; with `--keep-sessions 0` every such file stays, since one may belong to a
|
|
14
|
+
session still running.
|
|
15
|
+
|
|
16
|
+
Its result lists what it deleted under `removed`; `wrote` is empty.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Takes MEMBER out of principle ID. MEMBER is the id `show-principle` lists. The member's file is not
|
|
2
|
-
touched.
|
|
2
|
+
touched. It prints the id it removed as `member_removed` and how many members are left as `members_left`, not the
|
|
3
|
+
map; `show-principle ID` lists them.
|
|
3
4
|
|
|
4
5
|
An id no member has is refused with `unknown_member`. When it differs from one mapped id only in case, spacing, dashes
|
|
5
6
|
or quotes, or is the heading or passage of exactly one mapped id given without its path, the refusal names that id under
|
|
@@ -15,8 +15,8 @@ which files to commit, or the audit to run when every file is committed already.
|
|
|
15
15
|
baseline, so that line would repeat at every session, and is left out. Then a line for each principle whose audit record
|
|
16
16
|
a later release of principles wrote: this copy does not check its members, so none of them is counted, and the line says
|
|
17
17
|
how to update. Then, while any principle awaits its first full audit, one line counting them, naming none, asks the
|
|
18
|
-
agent to
|
|
19
|
-
|
|
18
|
+
agent to start one background subagent to follow `show-first-audit-brief`, tell the user, and relay its result. At
|
|
19
|
+
resume and compact, when one may be running already, it gives the count alone and asks
|
|
20
20
|
for no second one. Last, while any finding an audit deferred or accepted is open, the one line `list-open-findings
|
|
21
21
|
--short` prints, worded for the session's start, and short on resume, whose conversation holds the whole line already.
|
|
22
22
|
|
|
@@ -2,6 +2,13 @@ Shows the record of principle ID's last audit: whether it is open or completed,
|
|
|
2
2
|
from, each member's hash and each finding's members and disposition. Run it when a completed result
|
|
3
3
|
points here with `full_record`.
|
|
4
4
|
|
|
5
|
+
When you need only what the last audit found, as when filling a full audit's `recent_decision`, add
|
|
6
|
+
`--findings`: it prints the record's `principle_id`, `status`, `base_commit`, `audited_at` and `findings`
|
|
7
|
+
alone, without the members it judged, and for an open record the same of the last completed audit it keeps,
|
|
8
|
+
under `last_completed`. `base_commit` is the commit the audit began from, whose text its findings'
|
|
9
|
+
evidence names; the fix of a fixed finding landed after it. A completed record keeps no `last_completed`,
|
|
10
|
+
so an earlier audit's findings are then only in git: git log -p -- .principles/audits/ID.json shows them.
|
|
11
|
+
|
|
5
12
|
A full audit keeps each member's `assessment` as you gave it: the `assessment`, `delivery`, any
|
|
6
13
|
`observation` and the `evidence`, with `evidence_sha256`, the hash of each evidence item's text then,
|
|
7
14
|
`assessed_at`, and `entry_sha256` and `loads_sha256`, digests of the member's map entry and of when it
|
|
@@ -11,8 +11,14 @@ on ignored links or targets. Their contents are not read. No success is inferred
|
|
|
11
11
|
|
|
12
12
|
`inventory.files` uses the survey's entries: `path`, `characters`, and `symlink_to` when linked. Markdown gives
|
|
13
13
|
`outline`, with its headings and top-level list items, and any `description` and `opening_line` as in
|
|
14
|
-
list-candidate-files. Explicitly requested test-data files and skill references receive outlines too: you chose
|
|
15
|
-
|
|
14
|
+
list-candidate-files. Explicitly requested test-data files and skill references receive outlines too: you chose them,
|
|
15
|
+
and you judge relevance. A CI workflow in `.github/workflows/` gives each job, `job ID: NAME`, followed by its steps,
|
|
16
|
+
each by its name or else what it runs or uses; one whose YAML does not parse gives path and size alone. Other text, such
|
|
17
|
+
as a script or a hook, gives its whole-line `#` comments as its `outline`, where such a file states the rule it
|
|
18
|
+
enforces, its shebang and Ruby magic comments (`frozen_string_literal`, `typed`, `encoding`, `coding`, `warn_indent`,
|
|
19
|
+
`shareable_constant_value`) left out; text with none gives path and size alone. Past 20 items under one heading, or 20
|
|
20
|
+
comments, `(N more, lines A-B)` gives the lines from the first left out to the section's end. Open a file only if
|
|
21
|
+
needed.
|
|
16
22
|
|
|
17
23
|
The full rendered result uses the survey's byte budget. `outlines_cut` names shortened outlines, whose line-range
|
|
18
24
|
markers show where to read needed items. `outlines_left_out` names files whose outlines were omitted: request
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
An edit made by habit can make an always-loaded file heavier, put a task's rule where every session reads it, or
|
|
2
|
+
leave a "never" with no reason. Run this command before you judge or edit a member when you want more than the
|
|
3
|
+
one-paragraph check for its carrier kind: it prints that kind's page of practices, a few kilobytes. It writes
|
|
4
|
+
nothing.
|
|
5
|
+
|
|
6
|
+
KIND is one of `instructions` (`CLAUDE.md`, `AGENTS.md` and their kin), `rule` (a `.claude/rules` file), `skill`,
|
|
7
|
+
`subagent`, `hook_configuration` (a settings or hooks file), `hook_script` (a file a hook command runs) and `none`,
|
|
8
|
+
the page for any other text an agent reads, such as a docs page or text a program prints into context.
|
|
9
|
+
|
|
10
|
+
It prints `carrier`, `practices`, the page as Markdown, and an empty `wrote`.
|
|
11
|
+
Each point on a page says which host it holds for when it holds for only one.
|
|
12
|
+
|
|
13
|
+
It refuses with `unknown_carrier_kind` a kind it has no page for, and its repair names each kind it has.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Use it after request logging was turned on and the host relaunched with the launch line, to see what was
|
|
2
|
+
captured: whether requests arrive, from which sessions, and how much of the disk they take. A long session writes
|
|
3
|
+
its whole context with every request, so the folder can grow fast. A logged request holds the user's account email as well
|
|
4
|
+
as the working context, and the host writes its files readable by other local users, behind a folder
|
|
5
|
+
`turn-on-request-logging` makes readable only by its owner.
|
|
6
|
+
|
|
7
|
+
It writes nothing. It refuses with `request_logging_unguarded` while `.principles/request-logging/` exists
|
|
8
|
+
without its `.gitignore`, and with `request_logging_not_ignored` while git does not ignore every file there, before
|
|
9
|
+
reading a logged request.
|
|
10
|
+
|
|
11
|
+
`sessions` lists each session the host's `requests/index.jsonl` names, in the order it first names them, with its
|
|
12
|
+
`session_id`, its `requests`, the `files` its requests and their responses fill, and their `bytes`.
|
|
13
|
+
`orphan_requests` counts the request `files` no index line names, and their `bytes`; judge why from the session. An index line that is not a JSON object naming a session and its files is left out.
|
|
14
|
+
|
|
15
|
+
It never says whether the session you run in is capturing: the host's telemetry variables never reach your shell, so
|
|
16
|
+
judge that from the sessions and their sizes.
|
|
17
|
+
|
|
18
|
+
`newest` names, under `request_written_at`, when the newest request file was written, in UTC, and under
|
|
19
|
+
`session_id`, the session of the index's newest line; each is null before there is one. Compare the time with now to
|
|
20
|
+
judge whether requests still arrive.
|
data/lib/principles/views/prompts/learn-what-a-command-does/show-members-in-logged-requests.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
A member can be mapped and audited yet never reach the agent, or reach it in every request at a cost nobody
|
|
2
|
+
chose. This command is for seeing what actually reached the context: it reads the logged requests and
|
|
3
|
+
reports which mapped members' text each one holds. It writes nothing.
|
|
4
|
+
|
|
5
|
+
A captured request holds the session's whole working context and the user's account email, and the host writes its
|
|
6
|
+
file readable by other local users, so the command reads none while git might commit one. It refuses with
|
|
7
|
+
`request_logging_unguarded` while the folder's `.gitignore` is gone, and with `request_logging_not_ignored` while git
|
|
8
|
+
does not ignore every path there.
|
|
9
|
+
|
|
10
|
+
It runs `jq` and `rg` over the captured requests, with no slower fallback. While either is not on PATH it
|
|
11
|
+
refuses with `fast_tools_missing`, naming the missing tool and what it does here; ask the user before
|
|
12
|
+
installing it, then run the command again.
|
|
13
|
+
|
|
14
|
+
It opens with `members_by_status`, how many members have each status, every status named. Then it prints
|
|
15
|
+
`members`, one entry per mapped member: its `principle`, its `member` key, then, for a member moved since it was
|
|
16
|
+
mapped, its `id`, where it is now, since its key names where it was, then its `status`, the `seen_in` requests that
|
|
17
|
+
held its lines, its `most_bytes` in one, and the `segments` it was seen in. That stays within a tool result however
|
|
18
|
+
many requests are logged. `--places` prints instead, under `seen`, each place its lines were found, which grows with
|
|
19
|
+
every request, and `--member KEY`, given once a member, the same for those members alone, refusing a key no map holds
|
|
20
|
+
as `unknown_member`, with any key it is spelled like as `did_you_mean`: the `request` file, the `query_source` the host's index gives it, the
|
|
21
|
+
JSON `path` inside the request, the `segment` (`reminder` inside a system reminder, `plain` elsewhere), the
|
|
22
|
+
`share` of the member's lines found there, the `count` of their occurrences there, the `offsets` at which each
|
|
23
|
+
starts, in bytes into the string at `path`, and their `bytes`, every occurrence counted, since a line sent twice
|
|
24
|
+
costs its bytes twice. A member is measured by its lines of 24 bytes or more, with leading indentation stripped.
|
|
25
|
+
While requests are logged here, `list-member-problems` names each member with no such line under
|
|
26
|
+
`too_short_to_scan`, an `unmeasurable` one here, with the `move-member` that widens it. `orphans` counts the
|
|
27
|
+
captured requests the host's index gives no `query_source`, since it writes an index line only once the response
|
|
28
|
+
succeeds. `quoting_requests` names the
|
|
29
|
+
requests that name a captured request file, where the agent read or named one, so what was seen there may
|
|
30
|
+
be a quote of an earlier request rather than what the host loaded. `unreadable` names each request the scan could
|
|
31
|
+
not read, by its `request` file and its `reason`: `not_whole_json` for one that is not whole JSON, such as one a
|
|
32
|
+
host left truncated, and `not_decoded` for whole JSON the scan stops at, such as a list rather than a request,
|
|
33
|
+
or a request the scan did not decode to its end, such as one the host rewrote while it read.
|
|
34
|
+
Such a request is not scanned at all, rather than in part, so a member it held is not counted.
|
|
35
|
+
`completeness` says how much the scan read: the requests `captured`, those under `unreadable` too, the `leaves`,
|
|
36
|
+
strings, in those it decoded, and `complete`, true only when it read every request through. A full audit's
|
|
37
|
+
`requests` and every `seen_in` count only the requests read through, the captured ones less the unreadable. Read an
|
|
38
|
+
`absent` as proven only while `complete` is true.
|
|
39
|
+
Nothing from a request's text is printed, and `wrote` is empty.
|
|
40
|
+
|
|
41
|
+
`--short` prints lines instead of JSON, and no `status_meanings`, to read before or in place of the whole result: first the counts by status,
|
|
42
|
+
then the requests captured, whether the scan was complete, how many requests were unreadable and how many quote a logged
|
|
43
|
+
request; then one tab-separated line a member, with its status, principle, member key, followed by `(now ID)` once
|
|
44
|
+
moved, and the segments it was seen in,
|
|
45
|
+
or `-` for none.
|
|
46
|
+
|
|
47
|
+
`status_meanings` says once what each `status` means, `not_a_carrier` first. A full audit's `logged_requests` part
|
|
48
|
+
prints it too.
|
|
@@ -2,17 +2,18 @@ Shows each member of principle ID, where its text is now and whether it changed
|
|
|
2
2
|
member is changed, unassessed, locator_lost or unavailable. A member that is locator_lost or unavailable carries
|
|
3
3
|
`repair_with`: a `move-member` with its `NEW_PATH`, `HEADING` or `QUERY` to fill in, for a section or passage a
|
|
4
4
|
second `move-member` for text moved into another file, and a `remove-member`. Run the one that fits;
|
|
5
|
-
`next_action` names those members.
|
|
5
|
+
`next_action` names those members. A member from an installed plugin carries `source`, with `read_only: true`;
|
|
6
|
+
one no installed plugin gives is `plugin_unresolved`, with its `reason` and no `repair_with`. `--member MEMBER_ID`
|
|
7
|
+
prints that member alone, its `last_assessment` and any `last_acknowledgement` since; an unknown id is `unknown_member`.
|
|
6
8
|
|
|
7
|
-
Each member's `loads` says, for each host this tool derives,
|
|
8
|
-
context. Only `claude_code` is derived; Codex is not yet.
|
|
9
|
-
|
|
9
|
+
`--loads` adds each member's `loads` and the rest below. Each member's `loads` says, for each host this tool derives,
|
|
10
|
+
when that host loads the member's file into the agent's context. Only `claude_code` is derived; Codex is not yet.
|
|
11
|
+
It follows Claude Code's documented loading by path, for a session at the project root, not what loaded in one:
|
|
10
12
|
|
|
11
13
|
- `session_start`: the project's `CLAUDE.md`, `.claude/CLAUDE.md` or `CLAUDE.local.md`, in every session.
|
|
12
14
|
- `on_files` with `files`: one of those files in a folder below the root, once a file in that folder is read,
|
|
13
15
|
written or edited.
|
|
14
|
-
- `session_start` too: a rule in `.claude/rules/`, or a folder within it,
|
|
15
|
-
frontmatter.
|
|
16
|
+
- `session_start` too: a rule in `.claude/rules/`, or a folder within it, with no `paths` field in its frontmatter.
|
|
16
17
|
- `on_files` with `paths_field`: a rule with a `paths` field, once a file it matches is read, written or edited.
|
|
17
18
|
`paths_field` is the field's lines as written; this tool does not read the globs, so read them yourself.
|
|
18
19
|
- `on_invocation`: a skill's `SKILL.md` in `.claude/skills/NAME/`, whose body loads when the skill is invoked.
|
|
@@ -32,7 +33,7 @@ from the file's path alone, for a session started at the project root, not what
|
|
|
32
33
|
a note kept beside the agents, is `not_determined`.
|
|
33
34
|
- `not_determined`: This tool knows the file is a rule, a skill or an agent but not when it loads.
|
|
34
35
|
`frontmatter_refused` names the code this tool refused its frontmatter with, so read the frontmatter; `not_derived`
|
|
35
|
-
names a kind it does not derive yet, such as a rules folder below the project root.
|
|
36
|
+
names a kind it does not derive yet, such as a rules folder below the project root or a plugin's file.
|
|
36
37
|
- `no_known_carrier`: This tool knows no Claude Code facility that loads this path by itself. An `@` import from
|
|
37
38
|
another instruction file, or a user-level file, may still load it; read the importing file to check.
|
|
38
39
|
|
|
@@ -56,13 +57,12 @@ an unreadable file is not taken for one without hooks.
|
|
|
56
57
|
divided by four, rounded up, not a tokenizer count. These are source measurements, not injected context sizes:
|
|
57
58
|
host processing and imports can change what reaches context. A skill's body waits for invocation; an agent's
|
|
58
59
|
body goes to its subagent. A `loads` without `context` refers to the main session.
|
|
59
|
-
`member_bytes` and `member_tokens` measure the member's own lines, equalling the file values for a whole-file
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Before narrowing a section to save its `member_bytes`, check whose lines they are.
|
|
60
|
+
`member_bytes` and `member_tokens` measure the member's own lines, equalling the file values for a whole-file member,
|
|
61
|
+
omitted when this tool cannot find the member. Before narrowing a section to save them, check whose lines they are:
|
|
62
|
+
`overlaps` names this principle's members sharing a line with it, `same_lines_as` those spanning exactly its lines,
|
|
63
|
+
and `mapped_elsewhere` other principles' members, each with its role, `first_line`, `last_line`, and `same_lines` when
|
|
64
|
+
spanning exactly the same lines, `spans_these_lines` when its lines include all of this member's, or
|
|
65
|
+
`within_these_lines` when they all lie within this member's. Each is left out when none shares a line.
|
|
66
66
|
|
|
67
67
|
Adding members' sizes counts a shared file once per member. `loading_basis` qualifies the aggregates below:
|
|
68
68
|
`host: claude_code`, `kind: documented_prediction`, `session_start_assumption: project_root`; not observed delivery
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Asks you to assess every member of principle ID and the set
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
`
|
|
1
|
+
Asks you to assess every member of principle ID and the set, after mapping or when `show-principle` reports one changed
|
|
2
|
+
or unassessed. `--part PART` prints parts, sized in `part_bytes`: a member's with `text` and `lines_in_text`, or a whole
|
|
3
|
+
file's `text_part`: `read_with`, `bytes`, `read_whole`; `response_template` bare or `part_empty`; `--as template --part
|
|
4
|
+
members/ID` slots. `--part index`: `part_command`, `bytes` or `bytes_unknown`, `this_audit`: `judges` (ids: `--part
|
|
5
|
+
judged_members`)/`carries_forward`, `trimmed_instructions`, `answer_with` and `next_action`, per `read_in_parts`.
|
|
6
6
|
|
|
7
7
|
`start-audit` itself writes nothing. `submit-answer` writes the audit record, `.principles/audits/ID.json`: a full audit
|
|
8
8
|
writes it open when its assessment has findings, completed once it has none or its correction is accepted. In git,
|
|
@@ -12,30 +12,30 @@ edited `basis`, whose `basis.last_completed_revision` names the record it follow
|
|
|
12
12
|
problem no completed audit recorded and fixed before `start-audit` is not recorded, and a deferred or accepted finding
|
|
13
13
|
fixed since is decided `resolved`. To record one, commit a revert, run the audit, and redo it in the correction.
|
|
14
14
|
|
|
15
|
-
It refuses with `broken_members` while a member cannot be found or read,
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
It refuses with `broken_members` while a member cannot be found or read, by file in `missing_files`. A checked member
|
|
16
|
+
carries `check_since_last_audit`, and `check_hidden_characters` if its check hides any. `mapped_elsewhere` shows other
|
|
17
|
+
principles' members on its lines, judged by `mapped_elsewhere_instruction`, with `open_finding_ids` from
|
|
18
18
|
`open_findings_elsewhere`, whose `evidence` items say `shares_lines_with`, `shares_no_lines`, `whole_file` or
|
|
19
19
|
`not_located`, or which says `evidence_not_kept`. In git, `context.uncommitted_files_outside_the_map` lists up to ten
|
|
20
|
-
changed or untracked files, `not_named` the rest.
|
|
21
|
-
|
|
20
|
+
changed or untracked files, `not_named` the rest. A meta-principle audit adds `package_since_last_audit`,
|
|
21
|
+
`passage_changed` and `other_principles_with_unjudged_changes`. `logged_requests` shows what captured requests hold.
|
|
22
22
|
|
|
23
|
-
After a full audit, a member carries `carried_forward`,
|
|
23
|
+
After a full audit, a member carries `carried_forward`, its `assessed_at`, an observed one's `observed_at` (or
|
|
24
24
|
`observed_at_from_assessed_at`), `evidence_changed` and, in git, `file_changed_outside_member`, or `judge_because` with
|
|
25
|
-
`read_the_change`, a moved one `moved_from`; a carried one prints whole if a
|
|
26
|
-
`carried_forward_instruction` and `judge_because_instruction` explain. One acknowledged
|
|
27
|
-
`acknowledged_since_last_audit` with `last_audited_commit`, its acknowledgements, lines then and now, or
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
`read_the_change`, a whole file's text change `changed_lines`, a moved one `moved_from`; a carried one prints whole if a
|
|
26
|
+
fact fires; `carried_forward_instruction` and `judge_because_instruction` explain. One acknowledged since carries
|
|
27
|
+
`acknowledged_since_last_audit` with `last_audited_commit`, its acknowledgements, lines then and now, or, once moved,
|
|
28
|
+
`not_found_at_last_audit`. A new or changed check needs `review_basis`, kept unverified; an unchanged one `review_basis`
|
|
29
|
+
and `review_basis_since`, kept if left as printed, a changed one `last_run_review_basis`. A plugin member has `source`.
|
|
30
30
|
|
|
31
31
|
## Prior findings
|
|
32
32
|
|
|
33
|
-
When the last completed audit deferred or accepted findings, `context.prior_findings` lists them, with
|
|
34
|
-
`first_raised_at`,
|
|
35
|
-
`raised_in
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`
|
|
33
|
+
When the last completed audit deferred or accepted findings, `context.prior_findings` lists them, with `action`,
|
|
34
|
+
`reason`, `first_raised_at`, `waits_on`, `waits_on_since`, changes since as `changed_since_audit`; older ones may claim
|
|
35
|
+
`raised_in`. Each listed finding shows its `evidence`, in git each item with `changed_since_last_audit` and `found_now`,
|
|
36
|
+
or `evidence_not_kept` and an `evidence_request` for `problem_evidence`, whose `replaces` re-points a lost item. Decide
|
|
37
|
+
each in `prior_finding_decisions` as `still_holds`, `resolved`, `withdrawn` or `raised_again`; only `resolved` may give
|
|
38
|
+
`evidence`. `--as template` adds each `finding_problem`. Results name `prior_findings_pointers_dropped`,
|
|
39
39
|
`prior_findings_waits_on_dropped`, `prior_findings_evidence_replaced`, `prior_findings_problems_restated`.
|
|
40
40
|
|
|
41
41
|
## Members to check against the activation
|
|
@@ -51,11 +51,11 @@ names or this tool could not determine, and any under an invoked or always activ
|
|
|
51
51
|
## One member's edit: `--member`
|
|
52
52
|
|
|
53
53
|
Use `--member MEMBER` when one member was edited but still says the same thing, as `list-member-problems --help`
|
|
54
|
-
describes
|
|
55
|
-
|
|
56
|
-
`
|
|
57
|
-
`
|
|
58
|
-
`
|
|
54
|
+
describes. It shows `baseline_commit`, `member_lines` (or a large member's `changed_region` or `changed_regions`,
|
|
55
|
+
`context_lines`, `from_line`, `unchanged_lines_skipped` or `read_instead`), `first_changed_lines`, `read_the_change`,
|
|
56
|
+
`check_instruction`, its `deferred_findings` and `accepted_findings`, with `deferred_findings_kept` and
|
|
57
|
+
`change_shown_under` across principles; its `question` asks for `meaning_kept`; `--as template` adds `role` (or `roles`)
|
|
58
|
+
and `answer_with` to read. This tool checks both quotes. A near-miss id gets `unknown_member` and `did_you_mean`. A
|
|
59
59
|
one-member audit writes the record once its answer is accepted, keeping the edit in `acknowledgements`; commit it. It is
|
|
60
60
|
refused as `cannot_acknowledge` outside git, while an audit is open, and for a member no completed audit assessed, whose
|
|
61
61
|
baseline text does not match the audit record, whose check is not the one that audit ran, or whose `check_result` is not
|