principles 0.1.4 → 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.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -1
  3. data/exe/principles +1 -1
  4. data/lib/principles/cli.rb +9 -10
  5. data/lib/principles/command_routes.rb +7 -1
  6. data/lib/principles/controllers/carrier_edit_report.rb +40 -0
  7. data/lib/principles/controllers/command.rb +7 -3
  8. data/lib/principles/controllers/context_budget.rb +61 -0
  9. data/lib/principles/controllers/inventory.rb +3 -2
  10. data/lib/principles/controllers/member_addition.rb +1 -1
  11. data/lib/principles/controllers/member_entries.rb +30 -38
  12. data/lib/principles/controllers/member_entry_changes.rb +71 -0
  13. data/lib/principles/controllers/member_problems_report.rb +1 -1
  14. data/lib/principles/controllers/members_in_logged_requests.rb +5 -5
  15. data/lib/principles/controllers/members_to_assess.rb +11 -1
  16. data/lib/principles/controllers/meta_principle_setup.rb +10 -2
  17. data/lib/principles/controllers/parts_to_read.rb +2 -1
  18. data/lib/principles/controllers/plugin_member_addition.rb +4 -4
  19. data/lib/principles/controllers/request_logging.rb +17 -4
  20. data/lib/principles/controllers/running_tool.rb +19 -5
  21. data/lib/principles/controllers/session_start_report.rb +26 -2
  22. data/lib/principles/data/captured_requests.rb +118 -0
  23. data/lib/principles/data/carrier_page_markers.rb +38 -0
  24. data/lib/principles/data/claude_code_home.rb +17 -0
  25. data/lib/principles/data/command-steps.json +59 -19
  26. data/lib/principles/data/kept_line.rb +14 -7
  27. data/lib/principles/data/logged_request_matches.rb +23 -17
  28. data/lib/principles/data/logged_request_scan.rb +79 -11
  29. data/lib/principles/data/map_files.rb +1 -1
  30. data/lib/principles/data/project_files.rb +15 -0
  31. data/lib/principles/data/request_logging_folder.rb +42 -74
  32. data/lib/principles/data/request_shape.rb +33 -0
  33. data/lib/principles/data/running_version.rb +1 -1
  34. data/lib/principles/data/schemas/command-steps.schema.json +1 -1
  35. data/lib/principles/data/schemas/member-map.schema.json +2 -0
  36. data/lib/principles/data/settings_env_keys.rb +26 -0
  37. data/lib/principles/data/user_request_logging_folder.rb +73 -0
  38. data/lib/principles/invocation_options.rb +4 -4
  39. data/lib/principles/launch.rb +15 -6
  40. data/lib/principles/models/captured_sessions.rb +53 -15
  41. data/lib/principles/models/carrier_edit_input.rb +56 -0
  42. data/lib/principles/models/carrier_pages_shown.rb +28 -0
  43. data/lib/principles/models/carved_message_bytes.rb +115 -0
  44. data/lib/principles/models/context_parts.rb +59 -0
  45. data/lib/principles/models/declared_map_changes.rb +22 -13
  46. data/lib/principles/models/dropped_thinking.rb +73 -0
  47. data/lib/principles/models/feature.rb +2 -1
  48. data/lib/principles/models/installed_component.rb +3 -3
  49. data/lib/principles/models/logged_request_reach.rb +19 -11
  50. data/lib/principles/models/map_format_raise.rb +28 -0
  51. data/lib/principles/models/mapped_principles.rb +2 -1
  52. data/lib/principles/models/member.rb +6 -1
  53. data/lib/principles/models/member_justification.rb +52 -0
  54. data/lib/principles/models/member_problems.rb +2 -1
  55. data/lib/principles/models/member_reach.rb +28 -5
  56. data/lib/principles/models/member_snapshots.rb +11 -0
  57. data/lib/principles/models/members_by_part.rb +67 -0
  58. data/lib/principles/models/members_in_logged_requests.rb +56 -17
  59. data/lib/principles/models/meta_principle.rb +4 -4
  60. data/lib/principles/models/part_token_estimates.rb +60 -0
  61. data/lib/principles/models/plugin_enabled_in_project_settings.rb +61 -0
  62. data/lib/principles/models/principle.rb +7 -4
  63. data/lib/principles/models/principle_members.rb +7 -0
  64. data/lib/principles/models/project.rb +20 -31
  65. data/lib/principles/models/project_harness.rb +48 -0
  66. data/lib/principles/models/report_hooks.rb +9 -4
  67. data/lib/principles/models/request_channel.rb +62 -0
  68. data/lib/principles/models/request_kind.rb +62 -0
  69. data/lib/principles/models/request_logging.rb +107 -72
  70. data/lib/principles/models/request_logging_guard.rb +84 -0
  71. data/lib/principles/models/request_time.rb +46 -0
  72. data/lib/principles/models/session_registry.rb +61 -0
  73. data/lib/principles/models/session_start_input.rb +11 -2
  74. data/lib/principles/models/session_trend.rb +36 -0
  75. data/lib/principles/models/turn_opening.rb +83 -0
  76. data/lib/principles/models/turn_position.rb +43 -0
  77. data/lib/principles/models/user_logged_requests.rb +90 -0
  78. data/lib/principles/models/user_settings_entries.rb +49 -0
  79. data/lib/principles/version.rb +2 -2
  80. data/lib/principles/views/assessed_members.rb +4 -4
  81. data/lib/principles/views/assessment_request.rb +6 -3
  82. data/lib/principles/views/audit_result.rb +13 -6
  83. data/lib/principles/views/candidate_files_result.rb +1 -1
  84. data/lib/principles/views/carrier_edit_denial.rb +36 -0
  85. data/lib/principles/views/context_budget_result.rb +99 -0
  86. data/lib/principles/views/correction_request.rb +11 -1
  87. data/lib/principles/views/hook_setup_result.rb +3 -1
  88. data/lib/principles/views/logged_requests_evidence.rb +18 -3
  89. data/lib/principles/views/map_format_raised.rb +28 -0
  90. data/lib/principles/views/map_result.rb +7 -6
  91. data/lib/principles/views/maps_needing_members_or_audit.rb +1 -1
  92. data/lib/principles/views/members_in_logged_requests_result.rb +75 -20
  93. data/lib/principles/views/meta_principle_result.rb +38 -13
  94. data/lib/principles/views/problem_lines.rb +22 -0
  95. data/lib/principles/views/prompts/assess-every-member/ask-whether-a-member-seen-only-as-read-is-loaded.md +3 -0
  96. data/lib/principles/views/prompts/assess-every-member/ask-whether-each-reason-holds.md +2 -0
  97. data/lib/principles/views/prompts/assess-every-member/judge-the-keeping-against-the-other-principles.md +2 -0
  98. data/lib/principles/views/prompts/assess-every-member/weigh-what-reached-the-context.md +2 -2
  99. data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -1
  100. data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +1 -1
  101. data/lib/principles/views/prompts/dispose-of-each-finding/read-the-carrier-page-before-fixing.md +1 -0
  102. data/lib/principles/views/prompts/edit-a-carrier/read-the-page-before-the-first-edit.md +2 -0
  103. data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +19 -20
  104. data/lib/principles/views/prompts/learn-what-a-command-does/change-member-name.md +12 -0
  105. data/lib/principles/views/prompts/learn-what-a-command-does/change-member-reason.md +12 -0
  106. data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md +1 -1
  107. data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +4 -4
  108. data/lib/principles/views/prompts/learn-what-a-command-does/remove-logged-requests.md +7 -1
  109. data/lib/principles/views/prompts/learn-what-a-command-does/report-at-session-start.md +7 -3
  110. data/lib/principles/views/prompts/learn-what-a-command-does/report-before-carrier-edit.md +13 -0
  111. data/lib/principles/views/prompts/learn-what-a-command-does/show-context-budget.md +69 -0
  112. data/lib/principles/views/prompts/learn-what-a-command-does/show-hook-setup.md +4 -4
  113. data/lib/principles/views/prompts/learn-what-a-command-does/show-logged-requests.md +4 -2
  114. data/lib/principles/views/prompts/learn-what-a-command-does/show-members-in-logged-requests.md +21 -7
  115. data/lib/principles/views/prompts/learn-what-a-command-does/show-meta-principle-passage.md +13 -10
  116. data/lib/principles/views/prompts/learn-what-a-command-does/show-principle.md +5 -5
  117. data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +7 -7
  118. data/lib/principles/views/prompts/learn-what-a-command-does/turn-off-request-logging.md +8 -0
  119. data/lib/principles/views/prompts/learn-what-a-command-does/turn-on-request-logging.md +12 -0
  120. data/lib/principles/views/prompts/read-what-reached-the-context/explain-user-request-logging-to-the-user.md +10 -0
  121. data/lib/principles/views/prompts/read-what-reached-the-context/what-a-thread-continuation-holds.md +3 -0
  122. data/lib/principles/views/prompts/read-what-reached-the-context/what-each-context-budget-line-says.md +4 -0
  123. data/lib/principles/views/prompts/read-what-reached-the-context/what-each-member-line-says.md +2 -0
  124. data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-audit-asks-to-acknowledge-or-audit-again.md +1 -0
  125. data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-mapping-commit-asks-for-an-audit.md +1 -0
  126. data/lib/principles/views/prompts/report-after-a-commit/a-row-ending-pinned-asks-for-an-audit.md +1 -0
  127. data/lib/principles/views/prompts/run-a-first-audit-in-the-background/follow-the-brief.md +1 -0
  128. data/lib/principles/views/prompts/set-principles-up/ask-to-set-principles-up-after-an-audit.md +1 -0
  129. data/lib/principles/views/prompts/set-principles-up/entry-file-passage.md +1 -1
  130. data/lib/principles/views/prompts/set-principles-up/map-the-enabling-line-at-no-edit.md +3 -0
  131. data/lib/principles/views/prompts/set-principles-up/name-the-step-each-member-lacks.md +2 -2
  132. data/lib/principles/views/prompts/set-principles-up/place-the-passage-with-the-user.md +4 -2
  133. data/lib/principles/views/prompts/set-principles-up/what-the-passage-presumes.md +1 -1
  134. data/lib/principles/views/prompts/set-principles-up/why-set-principles-up.md +1 -0
  135. data/lib/principles/views/prompts/start-a-session/ask-to-set-principles-up.md +2 -0
  136. data/lib/principles/views/prompts/start-a-session/name-the-principles-nothing-checks.md +1 -0
  137. data/lib/principles/views/request_logging_result.rb +48 -2
  138. data/lib/principles/views/set_up_offer_line.rb +43 -0
  139. metadata +55 -3
  140. data/lib/principles/views/prompts/set-principles-up/keep-them-held-between-audits.md +0 -2
@@ -27,17 +27,20 @@ The location flags narrow the member; omit them for a whole file. Give both to t
27
27
  its `key:` line and the indented or list lines after it. So respelling the key counts as a change,
28
28
  as does editing its value. A query takes no other location flag.
29
29
 
30
- `--check COMMAND` names the command that enforces this member, such as the build task that fails on a broken rule.
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.
31
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
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`.
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`.
34
38
 
35
39
  If the keeping principle's map was removed, commit that removal before its first add-member recreates it.
36
40
  `map_removal_not_committed` refuses while its map is at committed HEAD, `git_history_unavailable` when unverifiable.
37
41
 
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.
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.
41
44
 
42
45
  `added.new_loading_scope` appears when this member has known literal loading-scope qualifiers not already mapped,
43
46
  and at least one prior known scope differs. `scope` and `already_mapped` (grouped `member_ids`) show the new and
@@ -61,17 +64,13 @@ principles; location alone does not decide. Unreadable or unknown audit or membe
61
64
  least two thirds of `members_in_either`. Either asks whether each should hold only the passages that carry it
62
65
  (move-member) or they are one principle: add one map's members to the other, then remove-principle.
63
66
 
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.
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`.
@@ -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; this tool prints its commands that way.
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,10 +51,10 @@ and 3 when it prints a row or a count. Every refusal exits 1 with a single line
51
51
  tool writes there when it refuses, whose `code` names it, such as `broken_members` (a member that cannot be found or
52
52
  read), `principles_folder_not_moved` (a project state to repair) or `unsupported_ruby` (no supported Ruby runs this
53
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.
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.
58
58
  For a post-commit hook, run: %{executable} list-member-problems --short || true
59
59
  A heartbeat can compare each line's commit with the last one it reported.
60
60
  `--short --session-start SOURCE`, for the session-start hook, prints one line instead: a changed principle's count
@@ -13,4 +13,10 @@ each request file the index does not name, which `show-logged-requests` counts a
13
13
  written before every kept session's file; with `--keep-sessions 0` every such file stays, since one may belong to a
14
14
  session still running.
15
15
 
16
- Its result lists what it deleted under `removed`; `wrote` is empty.
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.
@@ -16,9 +16,13 @@ baseline, so that line would repeat at every session, and is left out. Then a li
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
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
- for no second one. Last, while any finding an audit deferred or accepted is open, the one line `list-open-findings
21
- --short` prints, worded for the session's start, and short on resume, whose conversation holds the whole line already.
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.
@@ -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, and after each shell call that commits,
3
- the mapped members the commit changed. Without them, a changed member goes unseen until someone runs
4
- `list-member-problems`.
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.
@@ -8,8 +8,10 @@ It writes nothing. It refuses with `request_logging_unguarded` while `.principle
8
8
  without its `.gitignore`, and with `request_logging_not_ignored` while git does not ignore every file there, before
9
9
  reading a logged request.
10
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`.
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.
13
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.
14
16
 
15
17
  It never says whether the session you run in is capturing: the host's telemetry variables never reach your shell, so
@@ -14,18 +14,31 @@ installing it, then run the command again.
14
14
  It opens with `members_by_status`, how many members have each status, every status named. Then it prints
15
15
  `members`, one entry per mapped member: its `principle`, its `member` key, then, for a member moved since it was
16
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
17
+ held its lines, `channels`, how many of them held it by each `channel` below, its `most_bytes` in one, and the
18
+ `segments` it was seen in. That stays within a tool result however
18
19
  many requests are logged. `--places` prints instead, under `seen`, each place its lines were found, which grows with
19
20
  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
21
+ as `unknown_member`, with any key it is spelled like as `did_you_mean`, each member's places in the order their
22
+ requests were sent, those with no time last: the `request` file, `request_at`, when it was sent, in ISO 8601 UTC from
23
+ the host's index, or null where its index line gives no time; for a request no index line names, `request_at` is
24
+ when its file was written instead, a little after it was sent, and `request_at_from` says `file_written`; the `query_source` the host's index gives it, its `request_kind`, for a `model_turn` its `turn_position`, the
25
+ JSON `path` inside the request, the `segment` (`reminder` inside a system reminder, `plain` elsewhere), the `channel` it came by, which tells the host loading a member from the agent reading or quoting it: `system`, the system prompt, `system_message`, a message whose role is system, which the host adds, as its skill listing, `tool_definition`, a tool the request lists, `reminder`, a system reminder the host added to a message or a tool result, `tool_input`, what the agent sent a tool, `tool_result`, what a tool gave back, a command's printed output among them, and `message_text`, other text in any other message, whoever wrote it, or `other` anywhere else; the
22
26
  `share` of the member's lines found there, the `count` of their occurrences there, the `offsets` at which each
23
27
  starts, in bytes into the string at `path`, and their `bytes`, every occurrence counted, since a line sent twice
24
28
  costs its bytes twice. A member is measured by its lines of 24 bytes or more, with leading indentation stripped.
25
29
  While requests are logged here, `list-member-problems` names each member with no such line under
26
30
  `too_short_to_scan`, an `unmeasurable` one here, with the `move-member` that widens it. `orphans` counts the
27
31
  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
32
+ succeeds. `requests_by_kind` counts the requests read through as `model_turn`, a turn of the agent's own, `side_call`, a
33
+ call the host made on its behalf, such as a summary, under the same `query_source`, and `unclassified`, neither;
34
+ `kind_heuristic` says how each was told, since the host does not say: a request continuing a thread is a model
35
+ turn, any other under a listed side-call source is a side call, a list observed on one log, and any other request
36
+ is told by its shape; weigh a member missing from side calls as no gap. `model_turns_by_position` counts the model turns, each place's `turn_position`, as `turn_opening`, a request
37
+ that opens one of the agent's turns, `mid_turn`, one sent after a tool result, and `unclassified`, neither;
38
+ `model_turns_by_query_source` counts them by each `query_source` the host's index gives, a request it gives none
39
+ under `orphan`. `position_heuristic` says how each was told. `what_a_continuation_holds` says that a request
40
+ continuing a thread holds only what it added, so a member's places and channels there count that text alone.
41
+ `quoting_requests` names the
29
42
  requests that name a captured request file, where the agent read or named one, so what was seen there may
30
43
  be a quote of an earlier request rather than what the host loaded. `unreadable` names each request the scan could
31
44
  not read, by its `request` file and its `reason`: `not_whole_json` for one that is not whole JSON, such as one a
@@ -40,9 +53,10 @@ Nothing from a request's text is printed, and `wrote` is empty.
40
53
 
41
54
  `--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
55
  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,
56
+ request, then the requests by kind and the model turns by position, in all and by query_source as `source opening/mid/unclassified`; then what a continuation holds; then what each member line says; then one tab-separated line a member, with its status, principle, member key, followed by `(now ID)` once
57
+ moved, the segments it was seen in, and its requests by channel as `channel:count`, each
45
58
  or `-` for none.
46
59
 
47
60
  `status_meanings` says once what each `status` means, `not_a_carrier` first. A full audit's `logged_requests` part
48
- prints it too.
61
+ prints it too, with `model_turns_by_position`, `model_turns_by_query_source`, `position_heuristic` and
62
+ `what_a_continuation_holds`.
@@ -1,17 +1,20 @@
1
- Nothing keeps a project's principles held between audits: `principles` reports a changed member, but nothing in the
2
- project's guidance tells an agent to act on that report, so the drift waits until someone thinks to audit. This
3
- command shows the map of `sticking-to-your-principles`, the principle that does that keeping, with its description and
4
- an activation for all work. Run it to set principles up, once a first principle is mapped and audited. It writes
5
- nothing: no map, and none of the project's guidance. While `already_mapped` is false, `map_file` and `map` are the map the printed `add-member`
6
- creates, with the passage as its first member, so no map without members waits while the passage waits to be placed.
1
+ Between audits, only a session with a `principles` hook checks a project's principles: the hook reports a changed
2
+ member, but nothing in the project's guidance has every session act on that report, so the drift waits until
3
+ someone thinks to audit. This command shows the map of `sticking-to-your-principles`, the principle that does that
4
+ keeping, with its description and an activation for all work. Run it to set principles up, once a first principle
5
+ is mapped and audited. It writes nothing: no map, and none of the project's guidance. While `already_mapped` is
6
+ false, `map_file` and `map` are the map the printed `add-member` creates, with the passage as its first member, so no
7
+ map without members waits while the passage waits to be placed.
7
8
 
8
9
  The first member need not be the passage. Any file or setting in the project that keeps the principles in front of
9
10
  the agent can be, such as a timer of the project's own, or the committed setting that enables the plugin for the team,
10
11
  its `enabledPlugins` line. This helps teammates only if they can install the plugin from a marketplace they can
11
12
  access. Map it with the other `add-member` the question prints, whose role names the step it runs
12
- and what starts it, a hook, a timer or a reader. A completed full audit's `next_action` offers this
13
- command until the map has a member, of any kind. A mapped member says only that the project names
14
- something to keep the principles held; this principle's audit judges whether it does. An owner who enables the
13
+ and what starts it, a hook, a timer or a reader. Where `.claude/settings.json` enables the plugin,
14
+ `enabled_in_project_settings` gives its `path` and the `starting_at` that locates its line, and the question says that
15
+ mapping it writes only `.principles/`. A completed full audit's `set_up_offer` asks the user, and each session start
16
+ repeats the ask, until the map has a member, of any kind. A mapped member says only that the project names
17
+ something to check the principles between audits; this principle's audit judges whether it does. An owner who enables the
15
18
  plugin only at user scope has nothing in the project to map: the question says so, and names the two ways on, to
16
19
  commit the project-scope enablement and map its line, or to leave principles not set up for now.
17
20
 
@@ -47,7 +50,7 @@ passage's member carries no check, since a command stored in the map runs on eve
47
50
 
48
51
  `existing_principles` lists the project's other principles as `list-principles` does. While there are none,
49
52
  `next_action` leads to `list-candidate-files` to map the first, since this principle's first full audit has nothing
50
- to keep held yet. Once there are, it leads to that audit. In git, committing the map and the entry file is the
53
+ to check yet. Once there are, it leads to that audit. In git, committing the map and the entry file is the
51
54
  passage member's baseline; outside git, that first full audit gives it one.
52
55
 
53
56
  Example:
@@ -1,10 +1,10 @@
1
1
  Shows each member of principle ID, where its text is now and whether it changed since the last audit. Audit when a
2
2
  member is changed, unassessed, locator_lost or unavailable. A member that is locator_lost or unavailable carries
3
- `repair_with`: a `move-member` with its `NEW_PATH`, `HEADING` or `QUERY` to fill in, for a section or passage a
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. 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`.
3
+ `repair_with`: a `move-member` with its `NEW_PATH`, `HEADING` or `QUERY` to fill in, for a section or passage a second
4
+ `move-member` for text moved into another file, and a `remove-member`. Run the one that fits; `next_action` names those
5
+ members. A member from an installed plugin carries `source`, with `read_only: true`; one no installed plugin gives is
6
+ `plugin_unresolved`, with its `reason` and no `repair_with`. `--member MEMBER_ID` prints that member alone, its
7
+ `last_assessment` and any `last_acknowledgement` since; an unknown id is `unknown_member`. A `name` leads its member.
8
8
 
9
9
  `--loads` adds each member's `loads` and the rest below. Each member's `loads` says, for each host this tool derives,
10
10
  when that host loads the member's file into the agent's context. Only `claude_code` is derived; Codex is not yet.
@@ -1,11 +1,11 @@
1
- Gives your answer, filled from its template, to the request its `request_id` names; a REQUEST_ID you give must
2
- match. Pass a JSON FILE kept out of git with `--file FILE`; `--file -` reads stdin. This tool writes audit records
3
- at `.principles/audits/ID.json`, never member guidance. In a full audit, make each fix after the assessment is accepted
4
- and before you submit the correction that reports it; earlier fixes cause `stale_request` before an assessment's shape
1
+ Gives your answer, filled from its template, to the request its `request_id` names; a REQUEST_ID you give must match.
2
+ Pass a JSON FILE kept out of git with `--file FILE`; `--file -` reads stdin. This tool writes audit records at
3
+ `.principles/audits/ID.json`, never member guidance. In a full audit, make each fix after the assessment is accepted and
4
+ before you submit the correction that reports it; earlier fixes cause `stale_request` before an assessment's shape
5
5
  check. A completed full audit or acknowledgement after an assessment/correction request causes
6
- `audit_completed_since_request`, protecting the newer record and its findings: run `list-open-findings ID`, then start
7
- again. Keep `basis` unchanged; `last_completed_revision` identifies its preceding record. An identical completed-answer
8
- retry writes nothing; an assessment whose correction completed is refused.
6
+ `audit_completed_since_request`: run `list-open-findings ID`, then start again. Keep `basis` unchanged;
7
+ `last_completed_revision` identifies its preceding record. An identical completed-answer retry writes nothing; an
8
+ assessment whose correction completed is refused. `set_up_offer`: ask the user `ask_the_user`; on a yes, run `on_yes`.
9
9
 
10
10
  After prior request checks, a Git-based assessment/correction expires at a committed current-ID map gap on captured
11
11
  HEAD's first-parent line (`stale_request`), even after identical recreation; start anew. Unrelated commits are allowed.
@@ -8,3 +8,11 @@ capturing until it is relaunched, which `next_action` says.
8
8
 
9
9
  Before writing, it refuses with `request_logging_unguarded` while the folder exists without its `.gitignore`, and
10
10
  with `request_logging_not_ignored` while git does not ignore every file there.
11
+
12
+ With `--for-user`, it undoes request logging turned on in the user's own Claude Code settings, which every session
13
+ they start reads, from the Desktop app and IDEs too. It writes nothing there, since the file is the user's: it prints
14
+ the file as `settings_file`, the entry that is request logging's alone under `remove_from_env`, and under
15
+ `remove_if_added_for_this` the telemetry entries the user may also have set for telemetry of their own, which only they
16
+ can say. It deletes no request of this project's, but prunes the user-level folder's sessions that no project
17
+ registered, as `remove-logged-requests` does, giving only their counts under `pruned`. Every host started since the
18
+ entries were added keeps capturing until it is relaunched.
@@ -30,3 +30,15 @@ project still holds it.
30
30
  `explain_to_user` is a paragraph for the agent to give the user before the relaunch: what a logged request holds and
31
31
  who can read it, that subagents' and side calls' requests are logged too, its disk use, `remove-logged-requests` and
32
32
  `turn-off-request-logging`, and that `--resume` keeps the conversation while any relaunch stops background agents.
33
+
34
+ With `--for-user`, it turns request logging on for every session the user starts, from the Desktop app and IDEs too,
35
+ which a launch line cannot reach. It writes nothing in the project. It makes the user-level folder outside every
36
+ repository, readable only by the user, and lists it under `wrote` when it is new. It prints the user's Claude Code
37
+ settings file as `settings_file` and the `env` entries to add to it as `add_to_env`, and never writes that file.
38
+ `add_to_env` leaves out each telemetry exporter the settings already set, reading only the names of their `env`
39
+ entries; it holds every exporter when the file cannot be read, and an exporter set in the shell or a project's
40
+ settings is not read, so `next_action` has you ask the user. Give
41
+ the user `explain_to_user` and get their agreement before they add the entries: every session in every project is then
42
+ logged, and only the sessions of mapped projects, each registered by the session-start hook once the folder exists,
43
+ are kept. Like every request-logging command, it prunes the folder's sessions no project registered, giving only their
44
+ counts under `pruned`. `turn-off-request-logging --for-user` names what to remove.
@@ -0,0 +1,10 @@
1
+ Turned on in your own Claude Code settings, request logging keeps a copy of every request Claude Code sends to the
2
+ model, from every session in every project you start, from the terminal, the Desktop app and IDEs alike, until you
3
+ take the entries out and relaunch. Each holds your account email and the session's whole working context: the
4
+ conversation, the files read and every tool result, subagents' and side calls' too. They go to one folder outside
5
+ every repository, readable only by you. Only the sessions of projects mapped with `principles` are kept, each
6
+ registered as it starts: the rest, every session of any other project, are pruned at the next session start in any
7
+ project, or the next request-logging command, which give only how many. Each request is a whole copy of the context,
8
+ so the folder grows by megabytes a session until each project's `remove-logged-requests` trims it. The entries set
9
+ every telemetry exporter to none, overriding one you set up. Agree before you add them; capture starts in each host
10
+ you start or relaunch after the edit. To stop, run `turn-off-request-logging --for-user` and remove what it names.
@@ -0,0 +1,3 @@
1
+ A request that continues a thread sends only what it adds to the one before, such as a tool result and a reminder
2
+ after it, so a member seen there, and its channel, count only text added then; what the agent held at that point
3
+ is the thread's opening request and every continuation since.
@@ -0,0 +1,4 @@
1
+ Each line is a session, in the order its first turn opening was sent: how many turn openings it has, when the first
2
+ and last were sent, and its bytes and input tokens at each, with the change; then the last turn opening's bytes by
3
+ part, and the bytes of mapped members' text that turn opening sent, by principle, the largest three. Input tokens are
4
+ the host's own count, null where its response gave none. Run with --session ID for each turn opening of one session.
@@ -0,0 +1,2 @@
1
+ channel:count is how many requests held the member by that channel: system, system_message, tool_definition and
2
+ reminder are the host loading it; tool_input, tool_result and message_text are the agent sending, getting or writing it; other is the rest of the body; - is none.
@@ -0,0 +1 @@
1
+ A row ending audit changed after an audit judged it: acknowledge it or audit again, as below.
@@ -0,0 +1 @@
1
+ A row ending mapping_commit has no audit yet: audit it, as below.
@@ -0,0 +1 @@
1
+ A row ending pinned is a plugin member with no audit yet: audit it, as below.
@@ -16,3 +16,4 @@ correction the same way. On a stale_request refusal, start once more. Its templa
16
16
  5. Return at most 600 bytes, nothing else: a sentence on whether the members carry %{id}; a line per finding that
17
17
  needs the user, its id and question; each path under wrote, from the project root; each command next_action offers
18
18
  the user, a line each, from its subcommand on.
19
+ If the result gives set_up_offer, also return, beyond those bytes, its ask_the_user word for word and its on_yes.
@@ -0,0 +1 @@
1
+ Unless the user already answered this in this session, ask: %{why} Shall I set principles up, by mapping a passage, a timer or the setting that enables the plugin?
@@ -1,3 +1,3 @@
1
1
  ## %{heading}
2
2
 
3
- Where `principles` is installed without its hooks, run `principles list-member-problems --short` at session start, after a compaction and after each commit to a mapped file, and act on what it reports.
3
+ Where you can run `principles` and none of its hooks is wired, even in a checkout, run `principles list-member-problems --short` at session start, after a compaction and after each commit to a mapped file, and act on what it reports.
@@ -0,0 +1,3 @@
1
+ This project's %{path} enables the plugin for every session here, so its enabledPlugins line can be the first
2
+ member. Mapping it writes only .principles/ and edits none of the user's guidance, so a yes asks no edit of the user.
3
+ Map it on a yes, replacing STEP and TRIGGER in its role: %{command}
@@ -1,8 +1,8 @@
1
- These places are mapped as keeping the principles held, each with the role its member gives it:
1
+ These places are mapped as checking the principles between audits, each with the role its member gives it:
2
2
 
3
3
  %{members}
4
4
 
5
- A place keeps them held only through what triggers it: a hook, a timer or a reader. With the user, name which of
5
+ A place checks them only through what triggers it: a hook, a timer or a reader. With the user, name which of
6
6
  the keeping steps each one lacks: running `principles list-member-problems --short` at session start, after a
7
7
  compaction and after each commit that edits a mapped file, and acting on what it reports. The members listed in
8
8
  members_in_entry_files are the ones in an entry file. This tool writes none of the project's guidance.
@@ -1,3 +1,5 @@
1
+ Tell the user first why setting principles up matters: %{why}
2
+
1
3
  Show the user the passage, which suits any entry file, and agree with them where it goes: an entry file that every
2
4
  session of their agents loads. If a passage there already says all of it, map that one instead. If a member listed
3
5
  in members_in_entry_files already says it, the passage is placed and mapped: go on to next_action. This tool writes
@@ -7,8 +9,8 @@ The first member need not be the passage: it can be any file or setting in the p
7
9
  in front of the agent, such as a timer of the project's own, or the committed setting that enables the plugin for
8
10
  the team, its enabledPlugins line. This helps teammates only if they can install the plugin from a marketplace
9
11
  they can access. Map it with a role that names, as STEP, the step it runs and, as TRIGGER, what
10
- starts that step: a hook, a timer or a reader. Mapping it says only that the project names something to keep them
11
- held; this principle's audit judges whether it does.
12
+ starts that step: a hook, a timer or a reader. Mapping it says only that the project names something to check them
13
+ between audits; this principle's audit judges whether it does.
12
14
 
13
15
  To map such a place: %{any_place}
14
16
 
@@ -1,4 +1,4 @@
1
- The passage asks its steps only where `principles` is installed, so a teammate without `principles` is told to do
1
+ The passage asks its steps only where `principles` can be run, so a teammate without `principles` is told to do
2
2
  nothing it cannot, but still loads its %{estimated_tokens} estimated tokens in every session that loads the entry
3
3
  file. Nothing runs the steps for that teammate: the plugin's session-start hook reports only in sessions where the
4
4
  plugin is enabled, and whether a teammate's sessions have it is something this tool cannot see.
@@ -0,0 +1 @@
1
+ Where no `principles` hook is wired, nothing checks these principles between audits: when someone edits a file a principle depends on, such as one every session loads, nobody is told until the next audit, so the principles drift unnoticed. Where the plugin's hooks run, each session start and each commit to a mapped file already tell the agent which members changed, so it re-checks them, but only in sessions that have the plugin. Setting principles up maps what makes every session of the project do that: the committed setting that enables the plugin, a timer, or a passage in the project's instructions that has the agent run the same check where no hook is wired. Its own audit then checks that it still does. So the principles reinforce each other, and stay current as the work changes them. Every other principle depends on this one, sticking to your principles.
@@ -0,0 +1,2 @@
1
+ %{counted}. In your first reply, ask to set principles up; on yes, run:
2
+ %{command}