principles 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +151 -1
- data/README.md +10 -6
- data/exe/principles +1 -1
- data/lib/principles/cli.rb +9 -10
- data/lib/principles/command_line.rb +15 -6
- data/lib/principles/command_routes.rb +18 -2
- data/lib/principles/controllers/acknowledgement.rb +19 -4
- data/lib/principles/controllers/acknowledgements.rb +43 -12
- data/lib/principles/controllers/after_commit_report.rb +15 -2
- data/lib/principles/controllers/assessment.rb +7 -3
- data/lib/principles/controllers/audit.rb +17 -8
- data/lib/principles/controllers/audit_completion.rb +34 -9
- data/lib/principles/controllers/carrier_edit_report.rb +40 -0
- data/lib/principles/controllers/carrier_practices.rb +26 -0
- data/lib/principles/controllers/command.rb +36 -5
- data/lib/principles/controllers/context_budget.rb +61 -0
- data/lib/principles/controllers/correction.rb +15 -5
- data/lib/principles/controllers/full_audit_request.rb +38 -42
- data/lib/principles/controllers/inventory.rb +78 -71
- data/lib/principles/controllers/last_record_notice_beside.rb +51 -0
- data/lib/principles/controllers/member_addition.rb +20 -5
- data/lib/principles/controllers/member_entries.rb +50 -39
- data/lib/principles/controllers/member_entry_changes.rb +71 -0
- data/lib/principles/controllers/member_problems_report.rb +26 -6
- data/lib/principles/controllers/members_a_commit_changed.rb +14 -5
- data/lib/principles/controllers/members_in_logged_requests.rb +52 -0
- data/lib/principles/controllers/members_to_assess.rb +35 -8
- data/lib/principles/controllers/meta_principle_setup.rb +12 -4
- data/lib/principles/controllers/open_correction.rb +3 -2
- data/lib/principles/controllers/parts_to_read.rb +48 -6
- data/lib/principles/controllers/plugin_member_addition.rb +48 -0
- data/lib/principles/controllers/principle_listing.rb +84 -0
- data/lib/principles/controllers/request_logging.rb +65 -0
- data/lib/principles/controllers/running_tool.rb +55 -15
- data/lib/principles/controllers/session_start_report.rb +26 -2
- data/lib/principles/data/branches_bringing_in.rb +52 -0
- data/lib/principles/data/captured_requests.rb +118 -0
- data/lib/principles/data/carrier_page_markers.rb +38 -0
- data/lib/principles/data/changes_since.rb +56 -0
- data/lib/principles/data/claude_code_home.rb +75 -0
- data/lib/principles/data/command-steps.json +139 -23
- data/lib/principles/data/decoded_leaf.rb +63 -0
- data/lib/principles/data/head_reflog.rb +13 -2
- data/lib/principles/data/kept_line.rb +39 -0
- data/lib/principles/data/known_marketplaces.rb +50 -0
- data/lib/principles/data/logged_request_matches.rb +144 -0
- data/lib/principles/data/logged_request_scan.rb +188 -0
- data/lib/principles/data/map_files.rb +18 -4
- data/lib/principles/data/plugin_folder.rb +85 -0
- data/lib/principles/data/plugin_registry.rb +73 -0
- data/lib/principles/data/principles_store.rb +49 -0
- data/lib/principles/data/project_files.rb +15 -0
- data/lib/principles/data/ran.rb +25 -0
- data/lib/principles/data/raw_request_filter.rb +61 -0
- data/lib/principles/data/repository.rb +29 -27
- data/lib/principles/data/request_logging_folder.rb +135 -0
- data/lib/principles/data/request_shape.rb +33 -0
- data/lib/principles/data/running_version.rb +1 -1
- data/lib/principles/data/schemas/acknowledgement-answer.schema.json +16 -1
- data/lib/principles/data/schemas/acknowledgements-answer.schema.json +16 -1
- data/lib/principles/data/schemas/assessment-answer.schema.json +8 -0
- data/lib/principles/data/schemas/command-steps.schema.json +1 -1
- data/lib/principles/data/schemas/correction-answer-guide.schema.json +2 -1
- data/lib/principles/data/schemas/correction-answer.schema.json +14 -0
- data/lib/principles/data/schemas/member-map.schema.json +12 -1
- data/lib/principles/data/settings_env_keys.rb +26 -0
- data/lib/principles/data/string_counts.rb +39 -0
- data/lib/principles/data/tools_on_path.rb +25 -0
- data/lib/principles/data/user_request_logging_folder.rb +73 -0
- data/lib/principles/invocation_options.rb +5 -3
- data/lib/principles/launch.rb +29 -10
- data/lib/principles/models/acknowledged_check.rb +11 -1
- data/lib/principles/models/acknowledgement.rb +5 -0
- data/lib/principles/models/acknowledgement_refusal.rb +20 -11
- data/lib/principles/models/acknowledgements_to_offer.rb +86 -0
- data/lib/principles/models/after_commit_input.rb +5 -0
- data/lib/principles/models/answer_fields.rb +3 -0
- data/lib/principles/models/assessment_basis.rb +10 -3
- data/lib/principles/models/audit.rb +10 -10
- data/lib/principles/models/audit_record.rb +10 -0
- data/lib/principles/models/audit_records.rb +4 -3
- data/lib/principles/models/audit_start.rb +9 -0
- data/lib/principles/models/authored_locator.rb +33 -0
- data/lib/principles/models/candidate_files.rb +23 -3
- data/lib/principles/models/candidate_outline.rb +18 -125
- data/lib/principles/models/captured_sessions.rb +166 -0
- data/lib/principles/models/carrier_edit_input.rb +56 -0
- data/lib/principles/models/carrier_kind.rb +79 -0
- data/lib/principles/models/carrier_pages_shown.rb +28 -0
- data/lib/principles/models/carved_message_bytes.rb +115 -0
- data/lib/principles/models/cited_files.rb +12 -3
- data/lib/principles/models/context_parts.rb +59 -0
- data/lib/principles/models/decided_prior_findings.rb +5 -0
- data/lib/principles/models/declared_map_changes.rb +22 -13
- data/lib/principles/models/disposition.rb +37 -6
- data/lib/principles/models/disposition_placeholders.rb +12 -0
- data/lib/principles/models/disposition_text_field.rb +4 -0
- data/lib/principles/models/dropped_thinking.rb +73 -0
- data/lib/principles/models/feature.rb +54 -0
- data/lib/principles/models/finding_outcomes.rb +55 -0
- data/lib/principles/models/findings_left_open.rb +9 -11
- data/lib/principles/models/head_moves.rb +27 -10
- data/lib/principles/models/installed_component.rb +55 -0
- data/lib/principles/models/installed_plugins.rb +174 -0
- data/lib/principles/models/kept_sessions.rb +34 -0
- data/lib/principles/models/locator.rb +8 -0
- data/lib/principles/models/logged_request_reach.rb +52 -0
- data/lib/principles/models/logged_request_scan_completeness.rb +43 -0
- data/lib/principles/models/map_format_raise.rb +28 -0
- data/lib/principles/models/mapped_baseline.rb +46 -0
- data/lib/principles/models/mapped_principles.rb +2 -1
- data/lib/principles/models/maps_holding_file_whole.rb +42 -0
- data/lib/principles/models/markdown_text.rb +143 -0
- data/lib/principles/models/member.rb +19 -1
- data/lib/principles/models/member_entry.rb +56 -0
- data/lib/principles/models/member_justification.rb +52 -0
- data/lib/principles/models/member_lines.rb +11 -0
- data/lib/principles/models/member_loads.rb +17 -2
- data/lib/principles/models/member_problems.rb +46 -42
- data/lib/principles/models/member_reach.rb +59 -0
- data/lib/principles/models/member_snapshots.rb +34 -4
- data/lib/principles/models/member_text_as_sent.rb +31 -0
- data/lib/principles/models/member_texts.rb +45 -0
- data/lib/principles/models/members_by_part.rb +67 -0
- data/lib/principles/models/members_in_logged_requests.rb +279 -0
- data/lib/principles/models/meta_principle.rb +4 -4
- data/lib/principles/models/missing_files.rb +41 -16
- data/lib/principles/models/nearly_matching_maps.rb +56 -0
- data/lib/principles/models/open_correction.rb +5 -0
- data/lib/principles/models/open_finding.rb +4 -3
- data/lib/principles/models/outline_budget.rb +10 -1
- data/lib/principles/models/outline_item.rb +25 -0
- data/lib/principles/models/outline_section.rb +15 -4
- data/lib/principles/models/part_named.rb +16 -2
- data/lib/principles/models/part_token_estimates.rb +60 -0
- data/lib/principles/models/plugin_component.rb +37 -0
- data/lib/principles/models/plugin_enabled_in_project_settings.rb +61 -0
- data/lib/principles/models/plugin_install.rb +33 -0
- data/lib/principles/models/plugin_name.rb +23 -0
- data/lib/principles/models/plugin_reference.rb +53 -0
- data/lib/principles/models/principle.rb +7 -4
- data/lib/principles/models/principle_members.rb +22 -0
- data/lib/principles/models/prior_finding_decision.rb +1 -1
- data/lib/principles/models/prior_finding_outcomes.rb +12 -1
- data/lib/principles/models/problem_report.rb +14 -25
- data/lib/principles/models/project.rb +51 -56
- data/lib/principles/models/project_harness.rb +48 -0
- data/lib/principles/models/project_history.rb +19 -5
- data/lib/principles/models/recorded_members.rb +7 -0
- data/lib/principles/models/report_hooks.rb +9 -4
- data/lib/principles/models/request_channel.rb +62 -0
- data/lib/principles/models/request_kind.rb +62 -0
- data/lib/principles/models/request_logging.rb +231 -0
- data/lib/principles/models/request_logging_guard.rb +84 -0
- data/lib/principles/models/request_time.rb +46 -0
- data/lib/principles/models/runs_from.rb +0 -5
- data/lib/principles/models/script_comments.rb +58 -0
- data/lib/principles/models/session_registry.rb +61 -0
- data/lib/principles/models/session_start_input.rb +11 -2
- data/lib/principles/models/session_trend.rb +36 -0
- data/lib/principles/models/stale_request.rb +9 -0
- data/lib/principles/models/turn_opening.rb +83 -0
- data/lib/principles/models/turn_position.rb +43 -0
- data/lib/principles/models/unfixed_part.rb +82 -0
- data/lib/principles/models/unresolved_plugin_members.rb +35 -0
- data/lib/principles/models/user_logged_requests.rb +90 -0
- data/lib/principles/models/user_settings_entries.rb +49 -0
- data/lib/principles/models/whole_file_member_read.rb +48 -0
- data/lib/principles/models/without_prose.rb +20 -0
- data/lib/principles/models/workflow_jobs.rb +92 -0
- data/lib/principles/show_members_in_logged_requests_options.rb +27 -0
- data/lib/principles/show_principle_options.rb +32 -0
- data/lib/principles/version.rb +2 -2
- data/lib/principles/views/acknowledged_result.rb +31 -12
- data/lib/principles/views/acknowledgement_result.rb +18 -13
- data/lib/principles/views/acknowledgement_template_alone.rb +55 -0
- data/lib/principles/views/acknowledgements_offered.rb +54 -0
- data/lib/principles/views/added_member.rb +22 -6
- data/lib/principles/views/answer_in_a_file.rb +15 -15
- data/lib/principles/views/assessed_members.rb +19 -8
- data/lib/principles/views/assessment_request.rb +14 -6
- data/lib/principles/views/audit_changes.rb +14 -8
- data/lib/principles/views/audit_findings.rb +34 -0
- data/lib/principles/views/audit_result.rb +26 -24
- data/lib/principles/views/candidate_files_result.rb +1 -1
- data/lib/principles/views/carrier_checks.rb +40 -0
- data/lib/principles/views/carrier_edit_denial.rb +36 -0
- data/lib/principles/views/carrier_practices_page.rb +49 -0
- data/lib/principles/views/completed_audit_findings.rb +33 -0
- data/lib/principles/views/completed_audit_next_step.rb +12 -4
- data/lib/principles/views/consecutive_sections_elsewhere.rb +4 -0
- data/lib/principles/views/context_budget_result.rb +99 -0
- data/lib/principles/views/context_parts.rb +129 -25
- data/lib/principles/views/correction_request.rb +32 -17
- data/lib/principles/views/disposition_template.rb +35 -0
- data/lib/principles/views/first_audit.rb +29 -15
- data/lib/principles/views/first_audit_line.rb +4 -5
- data/lib/principles/views/hook_setup_result.rb +3 -1
- data/lib/principles/views/invocation.rb +14 -5
- data/lib/principles/views/last_record_notice.rb +41 -0
- data/lib/principles/views/lines_shared_with_member.rb +16 -22
- data/lib/principles/views/logged_request_status_meanings.rb +29 -0
- data/lib/principles/views/logged_requests_evidence.rb +84 -0
- data/lib/principles/views/map_added_to.rb +14 -12
- data/lib/principles/views/map_format_raised.rb +28 -0
- data/lib/principles/views/map_result.rb +41 -18
- data/lib/principles/views/maps_needing_members_or_audit.rb +1 -1
- data/lib/principles/views/member_change_since_baseline.rb +4 -0
- data/lib/principles/views/member_row.rb +13 -4
- data/lib/principles/views/member_sets_overlap.rb +31 -0
- data/lib/principles/views/members_a_commit_changed.rb +42 -25
- data/lib/principles/views/members_changed_during_audit.rb +27 -0
- data/lib/principles/views/members_in_logged_requests_result.rb +123 -0
- data/lib/principles/views/members_too_short_to_scan.rb +45 -0
- data/lib/principles/views/members_with_no_baseline.rb +6 -6
- data/lib/principles/views/meta_principle_result.rb +52 -15
- data/lib/principles/views/open_findings_line.rb +31 -92
- data/lib/principles/views/parts_index_result.rb +9 -5
- data/lib/principles/views/principle_read_result.rb +52 -11
- data/lib/principles/views/prior_findings_result.rb +9 -1
- data/lib/principles/views/problem_facts.rb +5 -3
- data/lib/principles/views/problem_lines.rb +54 -6
- data/lib/principles/views/problem_result.rb +7 -15
- data/lib/principles/views/prompts/assess-every-member/ask-whether-a-member-seen-only-as-read-is-loaded.md +3 -0
- data/lib/principles/views/prompts/assess-every-member/ask-whether-each-reason-holds.md +2 -0
- data/lib/principles/views/prompts/assess-every-member/claim-an-earlier-first-raised-at.md +6 -6
- data/lib/principles/views/prompts/assess-every-member/judge-the-keeping-against-the-other-principles.md +2 -0
- data/lib/principles/views/prompts/assess-every-member/read-a-compact-carried-member.md +9 -8
- data/lib/principles/views/prompts/assess-every-member/read-a-flagged-member-s-text-whole.md +3 -0
- data/lib/principles/views/prompts/assess-every-member/read-a-judged-member-s-text-whole.md +3 -0
- data/lib/principles/views/prompts/assess-every-member/turn-on-request-logging-to-see-what-reaches-context.md +2 -0
- data/lib/principles/views/prompts/assess-every-member/weigh-what-reached-the-context.md +7 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +6 -1
- data/lib/principles/views/prompts/dispose-of-each-finding/read-the-carrier-page-before-fixing.md +1 -0
- data/lib/principles/views/prompts/edit-a-carrier/read-the-page-before-the-first-edit.md +2 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/read-a-cut-section-back.md +1 -1
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-configuration.md +41 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-hook-scripts.md +35 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-instruction-files.md +37 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-other-text-an-agent-reads.md +38 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-rule-files.md +34 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-skills.md +35 -0
- data/lib/principles/views/prompts/follow-each-carriers-best-practices/practices-for-subagent-definitions.md +35 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +49 -51
- data/lib/principles/views/prompts/learn-what-a-command-does/change-member-name.md +12 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/change-member-reason.md +12 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/change-member-role.md +2 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md +1 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +1 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +32 -32
- data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +10 -11
- data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +7 -6
- data/lib/principles/views/prompts/learn-what-a-command-does/remove-logged-requests.md +22 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/remove-member.md +2 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/report-at-session-start.md +8 -4
- data/lib/principles/views/prompts/learn-what-a-command-does/report-before-carrier-edit.md +13 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-audit.md +7 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +8 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/show-carrier-practices.md +13 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-context-budget.md +69 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-hook-setup.md +4 -4
- data/lib/principles/views/prompts/learn-what-a-command-does/show-logged-requests.md +22 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-members-in-logged-requests.md +62 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md +13 -10
- data/lib/principles/views/prompts/learn-what-a-command-does/show-principle.md +16 -16
- data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +27 -27
- data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +17 -17
- data/lib/principles/views/prompts/learn-what-a-command-does/turn-off-request-logging.md +18 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/turn-on-request-logging.md +44 -0
- data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +3 -2
- data/lib/principles/views/prompts/read-what-reached-the-context/explain-request-logging-to-the-user.md +11 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/explain-user-request-logging-to-the-user.md +10 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/see-whether-members-reach-the-agent.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-a-thread-continuation-holds.md +3 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-absent-means.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-each-context-budget-line-says.md +4 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-each-member-line-says.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-not-a-carrier-means.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-present-but-not-loaded-means.md +2 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-present-means.md +1 -0
- data/lib/principles/views/prompts/read-what-reached-the-context/what-unmeasurable-means.md +2 -0
- data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-audit-asks-to-acknowledge-or-audit-again.md +1 -0
- data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-mapping-commit-asks-for-an-audit.md +1 -0
- data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-pinned-asks-for-an-audit.md +1 -0
- data/lib/principles/views/prompts/report-after-a-commit/plugin-members-are-still-listed.md +1 -0
- data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members-waiting-on-an-upgrade.md +2 -2
- data/lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members.md +2 -2
- data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-what-each-needs-before-the-next-commit.md +1 -0
- data/lib/principles/views/prompts/run-a-first-audit-in-the-background/follow-the-brief.md +1 -0
- data/lib/principles/views/prompts/set-principles-up/ask-to-set-principles-up-after-an-audit.md +1 -0
- data/lib/principles/views/prompts/set-principles-up/entry-file-passage.md +1 -1
- data/lib/principles/views/prompts/set-principles-up/map-the-enabling-line-at-no-edit.md +3 -0
- data/lib/principles/views/prompts/set-principles-up/name-the-step-each-member-lacks.md +2 -2
- data/lib/principles/views/prompts/set-principles-up/place-the-passage-with-the-user.md +4 -2
- data/lib/principles/views/prompts/set-principles-up/what-the-passage-presumes.md +1 -1
- data/lib/principles/views/prompts/set-principles-up/why-set-principles-up.md +1 -0
- data/lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md +2 -1
- data/lib/principles/views/prompts/start-a-session/ask-to-set-principles-up.md +2 -0
- data/lib/principles/views/prompts/start-a-session/hand-the-first-audit-to-a-subagent.md +2 -3
- data/lib/principles/views/prompts/start-a-session/name-the-principles-nothing-checks.md +1 -0
- data/lib/principles/views/prompts/start-a-session/raise-the-open-findings-waiting-on-no-one.md +1 -0
- data/lib/principles/views/request_logging_result.rb +108 -0
- data/lib/principles/views/request_part.rb +10 -4
- data/lib/principles/views/request_parts.rb +9 -0
- data/lib/principles/views/set_up_offer_line.rb +43 -0
- data/lib/principles/views/whole_file_elsewhere.rb +30 -0
- metadata +154 -5
- data/lib/principles/views/prompts/report-after-a-commit/the-principles-skill-is-where-to-start.md +0 -1
- data/lib/principles/views/prompts/report-after-a-commit/this-command-shows-each-one.md +0 -1
- data/lib/principles/views/prompts/set-principles-up/keep-them-held-between-audits.md +0 -2
|
@@ -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,50 @@ 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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
30
|
+
A new member needs `--name NAME`, its intent shown first in output, never a lookup key, and `--reason REASON`,
|
|
31
|
+
why its carrier puts the principle in context only when its work is in hand, ending in what would show it false by
|
|
32
|
+
host channel or `seen_only_as_read`; else `unjustified_member`. `format_raised` says if they raise the map to format 5.
|
|
33
|
+
|
|
34
|
+
`--check COMMAND` names the command that enforces this member, such as a build task that fails on a broken rule.
|
|
35
|
+
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
|
|
36
|
+
status. It is reviewed first once added or changed. This tool stores the command and never runs it. Change it later
|
|
37
|
+
with `change-member-check`.
|
|
38
|
+
|
|
39
|
+
If the keeping principle's map was removed, commit that removal before its first add-member recreates it.
|
|
40
|
+
`map_removal_not_committed` refuses while its map is at committed HEAD, `git_history_unavailable` when unverifiable.
|
|
41
|
+
|
|
42
|
+
While one or two members are mapped and no full audit is known to have completed, that reminder asks whether every
|
|
43
|
+
carrier is included and whether a member belongs to another principle: a question, not a minimum size or a merge.
|
|
44
|
+
|
|
45
|
+
`added.new_loading_scope` appears when this member has known literal loading-scope qualifiers not already mapped,
|
|
46
|
+
and at least one prior known scope differs. `scope` and `already_mapped` (grouped `member_ids`) show the new and
|
|
47
|
+
prior facts. `loading_basis` is `host: claude_code`, `kind: documented_prediction`, `session_start_assumption:
|
|
48
|
+
project_root`; it is not observed delivery or a Codex derivation. The question asks whether carriers will be
|
|
49
|
+
available where the principle applies, or should link to another carrier. This cue does not depend on audit history
|
|
50
|
+
or the per-sitting reminder; adding another member in an already represented scope does not repeat it.
|
|
51
|
+
The projection keeps when, context, invoked_by, skill_part and description qualifiers, with literal files and
|
|
52
|
+
paths_field lines in their original order; it excludes sizes and hook references and does not interpret globs.
|
|
53
|
+
`not_loaded` is a known no-load prediction. `not_determined` and `no_known_carrier`, even nested, are unclassified:
|
|
54
|
+
`not_compared` lists each unclassified `member_id` and `scope` only beside a positive hint, never as evidence
|
|
55
|
+
of equal scope, difference or delivery. Unknown new scopes or only unknown prior scopes give no new-scope field or cue.
|
|
56
|
+
|
|
57
|
+
`added.consecutive_sections_elsewhere` names other maps' members in consecutive complete Markdown sections of the
|
|
58
|
+
same underlying file (heading locators alone, meeting without overlap or gap), with path, role and current lines,
|
|
59
|
+
only while every named map lacks a completed full audit. The question asks whether they carry one rule or distinct
|
|
60
|
+
principles; location alone does not decide. Unreadable or unknown audit or member facts are left out.
|
|
61
|
+
|
|
62
|
+
`added.whole_file_elsewhere` lists other principles holding the new whole-file member's file whole, by path or link.
|
|
63
|
+
`added.member_sets_overlap` gives each other map sharing, by member id, the new member and one more, `shared`, and at
|
|
64
|
+
least two thirds of `members_in_either`. Either asks whether each should hold only the passages that carry it
|
|
65
|
+
(move-member) or they are one principle: add one map's members to the other, then remove-principle.
|
|
66
|
+
|
|
67
|
+
When the new member shares a line with members already mapped, `added` names them, since one edit there shows as a
|
|
68
|
+
change to each: `overlaps` lists those in this principle, and `mapped_elsewhere` those in other principles, each with
|
|
69
|
+
its principle, its id, its role there and its `first_line` and `last_line`, a linked file's under the path it was
|
|
70
|
+
mapped by. Check that your role fits beside theirs. A member spanning exactly the new member's lines is marked: in
|
|
71
|
+
this principle by `same_lines_as`, in another by `"same_lines": true`. Equal lines may still differ within a line, so
|
|
72
|
+
decide whether they are one member mapped twice, and keep one, or two meant to share those lines, and say why in the
|
|
73
|
+
role. A `mapped_elsewhere` entry holding all the new member's lines gives `"spans_these_lines": true`, and one lying
|
|
74
|
+
within them `"within_these_lines": true`. An edit to the held text edits the holder; one outside the shared lines
|
|
75
|
+
reaches only the holder. Where two share a first or last line, a passage can start or end partway through it, so the
|
|
76
|
+
question asks you to check the text there, unless the holder is a whole file. Each field is listed only when there are some.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Renames MEMBER of principle ID to NAME, the short name that states its intent and leads it in output. Use it to name a
|
|
2
|
+
member mapped before members had names, or one whose name no longer says what it makes the agent do. MEMBER is the id
|
|
3
|
+
`show-principle` lists, never a name: a name is for reading, so renaming a member breaks no printed command, and its
|
|
4
|
+
key stays. The next full audit judges it again, as after a role change. The result prints under `member` its id and
|
|
5
|
+
new name. A name makes the map format 5: older versions refuse it, and
|
|
6
|
+
`format_raised` says so when this change raised it.
|
|
7
|
+
|
|
8
|
+
Run during a full audit, between an accepted assessment and its correction, to fix a finding in the map: list MEMBER
|
|
9
|
+
in the `changed_map_entries` of the fixed disposition it fixes, and submit the correction.
|
|
10
|
+
|
|
11
|
+
An id no member has is refused with `unknown_member`, a name included; a near miss is named under `did_you_mean`, as
|
|
12
|
+
for `change-member-role`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Replaces the reason of MEMBER of principle ID with REASON: why its carrier and place put the principle in context when
|
|
2
|
+
its work is in hand and keep it out otherwise, ending in the observation that would show it false, by host channel or
|
|
3
|
+
`seen_only_as_read`. Use it when an audit finds the reason false or missing, or the member moved to another carrier.
|
|
4
|
+
MEMBER is the id `show-principle` lists. The result prints under `member` its id and new reason. A reason makes the
|
|
5
|
+
map format 5: older versions refuse it, and `format_raised` says so when this change raised it. The next full audit
|
|
6
|
+
judges the member again, as after a role change.
|
|
7
|
+
|
|
8
|
+
Run during a full audit, between an accepted assessment and its correction, to fix a finding in the map: list MEMBER
|
|
9
|
+
in the `changed_map_entries` of the fixed disposition it fixes, and submit the correction.
|
|
10
|
+
|
|
11
|
+
An id no member has is refused with `unknown_member`; a near miss is named under `did_you_mean`, as for
|
|
12
|
+
`change-member-role`.
|
|
@@ -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
|
data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md
CHANGED
|
@@ -10,7 +10,7 @@ holds everything you judge under `context`, its `question` included; one whose `
|
|
|
10
10
|
|
|
11
11
|
Usage: %{executable} [--project PATH] COMMAND [ARGUMENTS]
|
|
12
12
|
%{project_selection}
|
|
13
|
-
An argument that starts with `-`, such as the path `-x.md`, goes after `--`, which ends the options, so put every option, `--project` too, before it;
|
|
13
|
+
An argument that starts with `-`, such as the path `-x.md`, goes after `--`, which ends the options, so put every option, `--project` too, before it; it prints commands that way, and under `bundle exec` with the same prefix.
|
|
14
14
|
|
|
15
15
|
Explicit selection can establish an independent project inside a monorepo. Without it, discovery stops at the nearest
|
|
16
16
|
Git repository or worktree boundary; the current directory is used for first setup when no enclosing store exists.
|
|
@@ -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,
|
|
54
|
-
|
|
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,
|
|
55
|
+
after a line on each row's last field, its commands naming `--project` if given it, else run in the project it names
|
|
56
|
+
once, and says when there are no maps, or members with no baseline, that an empty stdout would hide, else `Nothing
|
|
57
|
+
changed (N members).` A changed member stays listed until an audit takes it in: a notice, not a gate on 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,22 @@
|
|
|
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
|
+
With request logging on in the user's own settings, the host writes every project's requests to one user-level
|
|
17
|
+
folder, and this command keeps only the sessions registered to this project there. It also removes each session
|
|
18
|
+
there that no project's session-start hook registered, with its files, leaving any request the index does not name,
|
|
19
|
+
and gives only their counts under `pruned`: `sessions`, `files` and `bytes`, never which, since they are other
|
|
20
|
+
projects' sessions. It prunes nothing while any project's registry cannot be read.
|
|
21
|
+
|
|
22
|
+
Its result lists what it deleted for this project 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,10 +15,14 @@ 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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 for no second one. Then, while a
|
|
20
|
+
full audit has completed and nothing in the project has every session check the principles, at startup and clear
|
|
21
|
+
one line counting the audited principles asks the agent to offer setting principles up in its first reply, with
|
|
22
|
+
`show-meta-principle-passage` to run on a yes; at resume and compact it gives the count alone, asking nothing. It
|
|
23
|
+
records no decline, and repeats until setup. Last, while any finding an audit deferred or accepted is open, the one line
|
|
24
|
+
`list-open-findings --short` prints, worded for the session's start, and short on resume, whose conversation holds the
|
|
25
|
+
whole line already.
|
|
22
26
|
|
|
23
27
|
When the maps or members cannot be read, as `list-member-problems` would refuse, it prints instead the refusal's code
|
|
24
28
|
and that command, whose refusal says why and how to repair it, and still exits 0. Stdin that cannot be read is read as
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Run by a PreToolUse hook on Edit and Write, not by the agent: an agent edits a skill, a rule or an instruction file by
|
|
2
|
+
habit, without reading that kind's practices, so the first such edit in a session is stopped once and pointed at the
|
|
3
|
+
page. A hook's added context reaches the agent only after the tool has run, but a denial's reason reaches it before
|
|
4
|
+
it retries, so this denies rather than adds. It reads the hook's JSON on stdin and always exits 0.
|
|
5
|
+
|
|
6
|
+
When the file is in the project and of a carrier kind a host loads by itself, `instructions`, `rule`, `skill`,
|
|
7
|
+
`subagent` or `hook_configuration`, and this session has not been pointed at that kind yet, it prints the hook's JSON
|
|
8
|
+
with `hookSpecificOutput.permissionDecision` `deny` and a `permissionDecisionReason` naming `show-carrier-practices
|
|
9
|
+
KIND` and asking for the same edit again. It leaves an empty marker for that session and kind under
|
|
10
|
+
`principles-carrier-pages` in the temporary folder, outside the project, so the retry and every later edit of that
|
|
11
|
+
kind go through, and a new session asks again. Any other call, input it cannot read, and a folder it cannot write
|
|
12
|
+
print nothing, and the edit goes through. A script a hook runs is not recognised here, since the path alone does not
|
|
13
|
+
show it.
|
|
@@ -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,69 @@
|
|
|
1
|
+
Use it to see how much of each turn's context the host loads before the work starts. Every turn opens with a
|
|
2
|
+
request that carries the whole context again: the system prompt, the tool definitions and every message so far. This
|
|
3
|
+
command reads the logged requests and measures each turn opening. It writes nothing.
|
|
4
|
+
|
|
5
|
+
A captured request holds the session's whole working context and the user's account email, so the command prints
|
|
6
|
+
counts and ids alone, never text from a request. It refuses with `request_logging_unguarded` while the folder's
|
|
7
|
+
`.gitignore` is gone, and with `request_logging_not_ignored` while git does not ignore every path there. It runs
|
|
8
|
+
`jq` to find the turn openings, and refuses with `fast_tools_missing` while `jq` is not on PATH. It reads every
|
|
9
|
+
logged request to find them, so it takes longer as the log grows.
|
|
10
|
+
|
|
11
|
+
`sessions` lists each session by `session_id`, in the order its first turn opening was sent, a turn opening being
|
|
12
|
+
a request that opened one of the agent's turns; a request that is not whole JSON is left out, as it cannot be read.
|
|
13
|
+
Each session gives its `trend`, its `last_turn_opening`, with the `members` it sent, and
|
|
14
|
+
`members_across_turn_openings`, so the bare command is bounded by the sessions logged, not by their turns. A turn
|
|
15
|
+
opening gives:
|
|
16
|
+
- `request`, the logged request file;
|
|
17
|
+
- `request_at`, when it was sent, in ISO 8601 UTC from the host's index;
|
|
18
|
+
- `bytes`, its system prompt, tool definitions and messages, each written as compact JSON, its other keys left out;
|
|
19
|
+
- `dropped_bytes`, the bytes left out of `bytes` for the thinking blocks its response says the server dropped, which
|
|
20
|
+
cost no tokens;
|
|
21
|
+
- `input_tokens`, the host's own count from its response: input, cache-read and cache-creation tokens together. It is
|
|
22
|
+
null, never 0, where the folder holds no response file the index names for it, or that response gives no `usage`.
|
|
23
|
+
- `bytes_per_token`, its `bytes` for each of those tokens, to two places, or null without them;
|
|
24
|
+
- `parts`, its bytes split by what they hold, each `part` with its `bytes`, summing to the request's: the
|
|
25
|
+
`system_prompt`, the `tool_definitions`, the `deferred_tool_definitions`, those of the tools the host defers
|
|
26
|
+
loading, sent whole though the model sees one only once a tool search loads it, the `reminders` the host added to
|
|
27
|
+
messages and tool results, tags included, the `system_notices`, messages whose role is system, and the
|
|
28
|
+
`conversation`, the rest of every message so far, what the agent sent a tool included. Each system notice's `kind`
|
|
29
|
+
is `resent` where the same text was sent earlier in the request, and `first_sent` otherwise; it is told by comparing
|
|
30
|
+
texts, never by reading them. Each part's `estimated_tokens` is an estimate, not the host's count: the host counts
|
|
31
|
+
tokens for the whole request only. It is the part's share of `input_tokens` by bytes, at that request's own
|
|
32
|
+
`bytes_per_token`, rounded so the parts' estimates sum to `input_tokens` exactly, and null where `input_tokens` is.
|
|
33
|
+
Thinking text and JSON tool schemas can take more bytes a token than prose, so read a part's estimate as roughly
|
|
34
|
+
right, not exact. The host does not say whether it counts deferred tools' definitions as input; a fit of input
|
|
35
|
+
tokens against bytes across one log's turn openings gave about 0.25 tokens a deferred byte against 0.31 for the
|
|
36
|
+
rest, so they appear to be counted, and take their share.
|
|
37
|
+
- `members`, the bytes of mapped members' text it sent, by `principle` and by the `part` they were
|
|
38
|
+
sent in, the principle's ids and counts alone: `members`, how many of its mapped members were seen there, each once
|
|
39
|
+
however often it was sent, and `bytes`, every occurrence's bytes, since each was sent and costs its share. Those
|
|
40
|
+
bytes are inside that part's `bytes`, not added to them, and count the text's own bytes, where a part counts it as
|
|
41
|
+
JSON writes it, so a quote or a line break in it costs its part a byte more than it adds here. They are found as
|
|
42
|
+
`show-members-in-logged-requests` finds them, by each member's lines long enough to tell apart, so a member with
|
|
43
|
+
none is not counted, and a line two members share counts for each.
|
|
44
|
+
|
|
45
|
+
A session's `members_across_turn_openings` are the same, summed over all its turn openings. A member is resent at
|
|
46
|
+
every turn opening, so this sum grows with the session's turns; the last turn opening's `members` are the load in
|
|
47
|
+
context now, beside its parts.
|
|
48
|
+
|
|
49
|
+
Each session's `trend` runs from its first turn opening to its last: `from` and `to`, when each was sent;
|
|
50
|
+
`turn_openings`, how many there were; and its `bytes` and `input_tokens`, each with its `first`, its `last` and its
|
|
51
|
+
`change`, null where either end is null.
|
|
52
|
+
|
|
53
|
+
A turn opening no index line names, as when the host logged a request but not its index line, has no session,
|
|
54
|
+
send time or response. Such turn openings come last, together, with a `session_id` of null and no order among
|
|
55
|
+
them, so their `trend` has null times and tokens. `--short` labels their line `no session` and gives one of them by
|
|
56
|
+
part. `--session` cannot name them.
|
|
57
|
+
|
|
58
|
+
`--session ID` shows that session alone, with `turn_openings`, each of its turn openings in the order sent. It refuses
|
|
59
|
+
with `unknown_session` where no turn opening was sent in it, listing the `sessions` there are, since an empty list
|
|
60
|
+
would read as a session with no turns.
|
|
61
|
+
|
|
62
|
+
`--short` prints the same facts as the bare command, a line a session, for reading at a glance: a line saying what
|
|
63
|
+
each line holds, then one line a session, in the same order: its trend, then its last turn opening's bytes by part, a
|
|
64
|
+
part's kinds together, and its last turn opening's `members`' bytes by principle, the largest three and how many more.
|
|
65
|
+
A null shows as null. With `--session`, it prints that session's line alone.
|
|
66
|
+
|
|
67
|
+
A request that continues a thread, or follows a tool result, sends only what it adds, so it is not measured here.
|
|
68
|
+
|
|
69
|
+
It lists no file under `wrote`, as a read.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Use it to give a project the reports the principles plugin's hooks give, when this tool is installed as a gem
|
|
2
|
-
without the plugin: at each session's start, what the agent should act on,
|
|
3
|
-
the mapped members the commit changed
|
|
4
|
-
`list-member-problems`.
|
|
2
|
+
without the plugin: at each session's start, what the agent should act on, after each shell call that commits,
|
|
3
|
+
the mapped members the commit changed, and, on Claude Code, before a session's first edit of each carrier kind, that
|
|
4
|
+
kind's practices page. Without them, a changed member goes unseen until someone runs `list-member-problems`.
|
|
5
5
|
|
|
6
6
|
It writes nothing. First, when the `principles` on PATH is not this copy, `principles_on_path` says so: none there
|
|
7
7
|
prints its version, so every entry would print its failure line, or another version is first, which the entries would
|
|
@@ -9,5 +9,5 @@ run instead; show it to the user before the entries. It prints, under `hosts`, C
|
|
|
9
9
|
gitignored `.claude/settings.local.json`, then Codex's, for `.codex/hooks.json`, each with the `file` they go in, why
|
|
10
10
|
the block is `offered`, and the `entries` to merge into its `hooks`. Each entry runs `principles` as found on PATH,
|
|
11
11
|
so an upgrade leaves it unchanged, and echoes that principles failed to start when it cannot run, instead of failing
|
|
12
|
-
the hook. `next_action` says to write them only once the user agrees, and how to remove them: delete the entries
|
|
12
|
+
the hook; the one before an edit says nothing then, and lets the edit through. `next_action` says to write them only once the user agrees, and how to remove them: delete the entries
|
|
13
13
|
whose command starts `principles report-`, as when the plugin is enabled, since the reports would come twice.
|
|
@@ -0,0 +1,22 @@
|
|
|
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, by when its first request was sent, with its
|
|
12
|
+
`session_id`, its `requests`, the `files` its requests and their responses fill, their `bytes`, and
|
|
13
|
+
`first_request_at` and `last_request_at`, in ISO 8601 UTC from the index's timestamps; a session none of whose lines
|
|
14
|
+
gives a time has null for both and comes last, in the order the index first names it.
|
|
15
|
+
`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.
|
|
16
|
+
|
|
17
|
+
It never says whether the session you run in is capturing: the host's telemetry variables never reach your shell, so
|
|
18
|
+
judge that from the sessions and their sizes.
|
|
19
|
+
|
|
20
|
+
`newest` names, under `request_written_at`, when the newest request file was written, in UTC, and under
|
|
21
|
+
`session_id`, the session of the index's newest line; each is null before there is one. Compare the time with now to
|
|
22
|
+
judge whether requests still arrive.
|