principles 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/principles/after_commit_hook_options.rb +4 -1
- data/lib/principles/cli.rb +9 -0
- data/lib/principles/command_line.rb +31 -30
- data/lib/principles/command_routes.rb +9 -3
- data/lib/principles/controllers/acknowledgement.rb +82 -95
- data/lib/principles/controllers/answer.rb +14 -11
- data/lib/principles/controllers/assessment.rb +27 -24
- data/lib/principles/controllers/audit.rb +24 -4
- data/lib/principles/controllers/audit_completion.rb +10 -4
- data/lib/principles/controllers/command.rb +2 -2
- data/lib/principles/controllers/correction.rb +16 -7
- data/lib/principles/controllers/full_audit_request.rb +8 -3
- data/lib/principles/controllers/guidance_search_paths.rb +31 -0
- data/lib/principles/controllers/inventory.rb +3 -22
- data/lib/principles/controllers/mapping.rb +9 -1
- data/lib/principles/controllers/member_acknowledgement.rb +137 -0
- data/lib/principles/controllers/member_addition.rb +65 -0
- data/lib/principles/controllers/member_entries.rb +6 -24
- data/lib/principles/controllers/member_problems_report.rb +33 -25
- data/lib/principles/controllers/members_to_assess.rb +1 -1
- data/lib/principles/controllers/meta_principle_setup.rb +1 -1
- data/lib/principles/controllers/repoint.rb +5 -2
- data/lib/principles/controllers/survey.rb +60 -0
- data/lib/principles/data/audit_files.rb +4 -0
- data/lib/principles/data/candidate_files_found.rb +48 -13
- data/lib/principles/data/command-steps.json +86 -25
- data/lib/principles/data/committed_tree.rb +84 -0
- data/lib/principles/data/first_parent_log.rb +48 -0
- data/lib/principles/data/first_parent_range.rb +122 -0
- data/lib/principles/data/git_command.rb +37 -0
- data/lib/principles/data/guidance_search_paths_file.rb +107 -0
- data/lib/principles/data/map_files.rb +35 -10
- data/lib/principles/data/principles_directory.rb +40 -0
- data/lib/principles/data/principles_subfolder.rb +39 -16
- data/lib/principles/data/project_files.rb +11 -3
- data/lib/principles/data/repository.rb +55 -29
- data/lib/principles/data/requested_candidate_files.rb +43 -0
- data/lib/principles/data/running_version.rb +3 -5
- data/lib/principles/data/schemas/acknowledgement-answer.schema.json +6 -6
- data/lib/principles/data/schemas/acknowledgements-answer.schema.json +88 -0
- data/lib/principles/data/schemas/answer-guide.schema.json +255 -63
- data/lib/principles/data/schemas/assessment-answer.schema.json +15 -1
- 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 +12 -54
- data/lib/principles/data/schemas/guidance-search-paths.schema.json +13 -0
- data/lib/principles/data/schemas/member-map-history.schema.json +20 -0
- data/lib/principles/data/verified_head.rb +162 -0
- data/lib/principles/invocation_options.rb +5 -4
- data/lib/principles/list_open_findings_options.rb +23 -0
- data/lib/principles/models/acknowledged_check.rb +94 -0
- data/lib/principles/models/acknowledgement.rb +40 -36
- data/lib/principles/models/acknowledgement_left_as_printed.rb +72 -0
- data/lib/principles/models/acknowledgements.rb +99 -0
- data/lib/principles/models/answered_time.rb +9 -0
- data/lib/principles/models/assessment_report.rb +13 -13
- data/lib/principles/models/audit.rb +17 -4
- data/lib/principles/models/audit_entry_protecting_map.rb +28 -0
- data/lib/principles/models/audit_record.rb +9 -0
- data/lib/principles/models/audit_records.rb +34 -8
- data/lib/principles/models/candidate_files.rb +17 -6
- data/lib/principles/models/candidate_inventory.rb +51 -7
- data/lib/principles/models/captured_head.rb +72 -0
- data/lib/principles/models/check_since_last_audit.rb +4 -8
- data/lib/principles/models/correction_basis.rb +14 -5
- data/lib/principles/models/declared_map_changes.rb +25 -9
- data/lib/principles/models/declared_member_removals.rb +75 -0
- data/lib/principles/models/disposition.rb +4 -2
- data/lib/principles/models/fix_only_fields.rb +12 -0
- data/lib/principles/models/guidance_search_path.rb +26 -0
- data/lib/principles/models/guidance_search_paths.rb +57 -0
- data/lib/principles/models/line_span.rb +6 -0
- data/lib/principles/models/list_member_problems_check.rb +80 -0
- data/lib/principles/models/listed_members.rb +49 -0
- data/lib/principles/models/loaded_files.rb +1 -2
- data/lib/principles/models/loading_decision.rb +17 -8
- data/lib/principles/models/loading_scope.rb +61 -0
- data/lib/principles/models/loads_to_check.rb +0 -1
- data/lib/principles/models/locator.rb +6 -0
- data/lib/principles/models/mapped_principles.rb +39 -37
- data/lib/principles/models/member_assessments.rb +11 -2
- data/lib/principles/models/member_file.rb +20 -71
- data/lib/principles/models/member_history.rb +7 -5
- data/lib/principles/models/member_loading_scopes.rb +49 -0
- data/lib/principles/models/member_loads.rb +4 -0
- data/lib/principles/models/member_mapping_run.rb +30 -0
- data/lib/principles/models/member_moves.rb +4 -0
- data/lib/principles/models/member_problems.rb +57 -29
- data/lib/principles/models/member_region.rb +129 -0
- data/lib/principles/models/member_repair_moves.rb +9 -11
- data/lib/principles/models/member_sighting.rb +5 -8
- data/lib/principles/models/member_snapshots.rb +14 -1
- data/lib/principles/models/members_in_consecutive_sections.rb +56 -0
- data/lib/principles/models/meta_principle.rb +14 -0
- data/lib/principles/models/missing_files.rb +2 -2
- data/lib/principles/models/other_templates_placeholders.rb +1 -1
- data/lib/principles/models/outline_budget.rb +29 -14
- data/lib/principles/models/principle.rb +14 -7
- data/lib/principles/models/principle_file_revision.rb +48 -0
- data/lib/principles/models/principle_history.rb +46 -19
- data/lib/principles/models/principle_lineage.rb +118 -0
- data/lib/principles/models/principle_map_revision.rb +39 -0
- data/lib/principles/models/principle_mapping_history.rb +132 -0
- data/lib/principles/models/principle_members.rb +14 -0
- data/lib/principles/models/principle_predecessor.rb +45 -0
- data/lib/principles/models/principle_publication.rb +177 -0
- data/lib/principles/models/principle_revision.rb +104 -0
- data/lib/principles/models/problem_report.rb +36 -9
- data/lib/principles/models/project.rb +47 -30
- data/lib/principles/models/project_history.rb +45 -25
- data/lib/principles/models/record_format.rb +6 -0
- data/lib/principles/models/reported_check.rb +16 -12
- data/lib/principles/models/request_id.rb +1 -1
- data/lib/principles/models/sent_answer.rb +35 -5
- data/lib/principles/models/survey_search_paths.rb +26 -0
- data/lib/principles/models/uncommitted_files.rb +50 -0
- data/lib/principles/models/unknown_principle.rb +29 -0
- data/lib/principles/positional_arguments.rb +38 -0
- data/lib/principles/session_start_options.rb +3 -3
- data/lib/principles/start_audit_options.rb +10 -2
- data/lib/principles/version.rb +2 -2
- data/lib/principles/views/acknowledgement_result.rb +54 -16
- data/lib/principles/views/added_member.rb +41 -0
- data/lib/principles/views/answered_request.rb +21 -0
- data/lib/principles/views/assessed_members.rb +26 -5
- data/lib/principles/views/assessment_request.rb +24 -4
- data/lib/principles/views/audit_result.rb +30 -27
- data/lib/principles/views/candidate_files_result.rb +56 -12
- data/lib/principles/views/candidate_outlines_result.rb +25 -0
- data/lib/principles/views/check_result_template.rb +18 -17
- data/lib/principles/views/consecutive_sections_elsewhere.rb +27 -0
- data/lib/principles/views/correction_request.rb +38 -10
- data/lib/principles/views/findings_result.rb +21 -0
- data/lib/principles/views/guidance_search_paths_result.rb +26 -0
- data/lib/principles/views/invocation.rb +19 -4
- data/lib/principles/views/json_with_entries_on_lines.rb +12 -4
- data/lib/principles/views/loads_to_check_result.rb +3 -2
- data/lib/principles/views/map_added_to.rb +56 -2
- data/lib/principles/views/map_result.rb +22 -42
- data/lib/principles/views/maps_needing_members_or_audit.rb +47 -0
- data/lib/principles/views/member_change_since_baseline.rb +2 -1
- data/lib/principles/views/member_repairs.rb +2 -1
- data/lib/principles/views/member_row.rb +61 -0
- data/lib/principles/views/members_a_commit_changed.rb +2 -1
- data/lib/principles/views/members_with_no_baseline.rb +8 -1
- data/lib/principles/views/new_loading_scope.rb +31 -0
- data/lib/principles/views/one_member_check_result_template.rb +37 -21
- data/lib/principles/views/open_findings_line.rb +2 -1
- data/lib/principles/views/principle_read_result.rb +4 -1
- data/lib/principles/views/principles_with_no_completed_audit.rb +9 -3
- data/lib/principles/views/problem_lines.rb +50 -45
- data/lib/principles/views/problem_result.rb +59 -25
- data/lib/principles/views/prompts/acknowledge-a-change/report-the-exit-status-its-own-listing-gives.md +3 -0
- data/lib/principles/views/prompts/acknowledge-a-change/run-the-check-and-report-it-passing.md +3 -3
- data/lib/principles/views/prompts/acknowledge-a-change/say-whether-each-change-keeps-its-meaning.md +8 -0
- data/lib/principles/views/prompts/acknowledge-a-change/say-whether-the-change-keeps-the-meaning.md +6 -6
- data/lib/principles/views/prompts/assess-every-member/answer-guide.json +67 -43
- data/lib/principles/views/prompts/assess-every-member/decide-each-member-loading.md +2 -1
- data/lib/principles/views/prompts/assess-every-member/run-the-check-then-report-it.md +2 -2
- data/lib/principles/views/prompts/assess-every-member/run-the-reviewed-check-and-say-what-its-review-rested-on.md +5 -3
- data/lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json +1 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +12 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md +4 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md +6 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/choose-an-existing-or-new-principle.md +2 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md +4 -2
- data/lib/principles/views/prompts/find-a-principle-to-map/compare-with-mapped-principles.md +11 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md +2 -2
- data/lib/principles/views/prompts/find-a-principle-to-map/survey-a-later-range.md +3 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/what-each-command-writes.md +4 -4
- data/lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md +5 -4
- data/lib/principles/views/prompts/learn-what-a-command-does/add-guidance-search-path.md +17 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +35 -6
- data/lib/principles/views/prompts/learn-what-a-command-does/create-principle.md +16 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md +1 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +37 -4
- data/lib/principles/views/prompts/learn-what-a-command-does/list-member-problems.md +20 -19
- data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +65 -61
- data/lib/principles/views/prompts/learn-what-a-command-does/move-member.md +5 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/remove-guidance-search-path.md +13 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/remove-principle.md +25 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +33 -7
- data/lib/principles/views/prompts/learn-what-a-command-does/show-candidate-outlines.md +21 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +10 -10
- data/lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md +51 -54
- data/lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md +7 -0
- data/lib/principles/views/prompts/start-a-session/act-on-the-open-findings.md +1 -1
- data/lib/principles/views/prompts/start-a-session/every-loaded-line-costs-every-session.md +1 -0
- data/lib/principles/views/prompts/start-a-session/start-with-the-principles-skill.md +1 -0
- metadata +67 -4
- data/lib/principles/models/candidate_listing.rb +0 -41
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
Then run it in the project, replace
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Then run it in the project, replace exit_status with its exit status, an integer, and replace review_basis with what
|
|
2
|
+
the review rested on, in one line, such as who reviewed it or the document that confirms it; for your own review,
|
|
3
|
+
"Self-reviewed by the agent: <what you checked it against>". This tool keeps that line and cannot verify it. If it
|
|
4
|
+
was not run, including when no review was possible, write why in not_run_reason instead, and leave exit_status and
|
|
5
|
+
review_basis as printed.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"action": "fixed",
|
|
5
5
|
"reason": "What you changed, in one line",
|
|
6
6
|
"changed_members": ["the id of each member the fix changed"],
|
|
7
|
+
"removed_members": ["the id of each member the fix removed from the map"],
|
|
7
8
|
"evidence": [{ "path": "a project file", "starting_at": "text that occurs once in the fixed passage" }],
|
|
8
9
|
"reassessment": "How the changed member reads now, and any check you ran on it",
|
|
9
10
|
"recorded_at": null
|
|
@@ -23,3 +23,15 @@ If the fix is to map a member the finding says is missing, add it with `add-memb
|
|
|
23
23
|
changed. No assessment has read it, so the record gives it no baseline: the completed result names it under
|
|
24
24
|
`members_added_awaiting_assessment`, and the next full audit assesses it. Outside git, a member added now is refused:
|
|
25
25
|
defer the finding and add the member after the audit.
|
|
26
|
+
|
|
27
|
+
If the fix removes obsolete guidance from the map, use `remove-member`, keeping its source file, then list its
|
|
28
|
+
original id in that fixed disposition's optional `removed_members`. In git, the union of those lists must explain
|
|
29
|
+
exactly the map removals; repeated claims are allowed. Each removed id must exist at the audit base, be absent now,
|
|
30
|
+
and appear in neither `moved_members` nor `changed_map_entries`. `changed_members` names current text changes; leave
|
|
31
|
+
it empty for a removal-only fix. Give a substantive reassessment and at least one located evidence pointer about
|
|
32
|
+
the remaining guidance for a fix with only removals. This tool checks the pointer, while you judge its relevance.
|
|
33
|
+
Leave a survivor or add a replacement; a new member still awaits assessment. Existing findings keep their original
|
|
34
|
+
member attribution and age even when their member was removed. An empty endpoint cannot complete this correction:
|
|
35
|
+
retain the correction packet and restore the map entries before reconsidering or deferring, or explicitly deactivate
|
|
36
|
+
the principle while retaining its previous audit history. A removal grants no permission to delete a source file.
|
|
37
|
+
Non-fixed dispositions omit `removed_members` or leave it empty. Without git, map removals cannot be verified.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
Keep the exact original assessment you submit (or the exact stdin bytes for `--file -`) and this correction
|
|
2
|
+
packet before changing members. Save copies outside the project, including the correction's request_id,
|
|
3
|
+
basis and response_template or correction_template, and fill only its dispositions. Git cannot reconstruct
|
|
4
|
+
your assessment judgements.
|
data/lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
After the table, ask where else this repository keeps guidance agents follow, including other harness folders,
|
|
2
|
+
linked documents, templates and executable checks. You judge which files carry principles; this inventory does not
|
|
3
|
+
establish that a host loads them. To include a location in a read-only survey now, repeat --also with a quoted
|
|
4
|
+
root-relative glob. This option does not record the location for later surveys.
|
|
5
|
+
After the table, record chosen search paths with add-guidance-search-path; remove-guidance-search-path stops recording one.
|
|
6
|
+
Saved search paths are included automatically and named in recorded_guidance_search_paths when nonempty.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
Survey this project's principles: the rules that several pieces of its agent guidance reinforce together. Read
|
|
2
|
-
each listed file's outline, description and opening line printed here, not the files themselves.
|
|
2
|
+
each listed Markdown file's outline, description and opening line printed here, not the files themselves.
|
|
3
|
+
For a selected non-Markdown file listed by path and size, inspect that file only if needed to judge the rule it
|
|
4
|
+
enforces; listing it does not show its contents. Show the user one
|
|
3
5
|
table, with a row for each principle: a name of a word or two, a one-line description, and the files and sections
|
|
4
6
|
that carry it. Members can also be rules, skills, hooks, reminders, scripts, data files or build checks anywhere in
|
|
5
|
-
the project;
|
|
7
|
+
the project; inventory.scope states what this survey covers. Ask nothing and write nothing until the table is shown. If
|
|
6
8
|
nothing here reinforces a principle, say so and stop.
|
|
7
9
|
|
|
8
10
|
Under the table, name the files that look ticket-local or boilerplate, such as one task's notes or a template left
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Survey this project's principles using each listed Markdown file's outline, description and opening line printed here,
|
|
2
|
+
not the files themselves. For a selected non-Markdown file listed by path and size, inspect that file only if needed
|
|
3
|
+
to judge the rule it enforces; listing it does not show its contents.
|
|
4
|
+
Compare each rule with the id and description in mapped_principles: is it a facet of
|
|
5
|
+
an existing principle, another member carrying that principle, or a distinct principle?
|
|
6
|
+
A row with a refusal has no readable description: resolve its repair before deciding a rule is distinct. You judge; do not create
|
|
7
|
+
a separate map for each wording or file. Show the user one table of principles, each with its description,
|
|
8
|
+
carrying files and sections, and the existing map it belongs to or why it is distinct.
|
|
9
|
+
Ask nothing and write nothing until the table is shown. If nothing here reinforces a principle, say so and stop.
|
|
10
|
+
|
|
11
|
+
Under the table, name ticket-local or boilerplate files with why they may be left out.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
This project is too big for every outline to fit, so each file under inventory.outlines_left_out prints its path
|
|
2
|
-
and size alone.
|
|
3
|
-
|
|
2
|
+
and size alone. Where the survey needs one, run show-candidate-outlines PATH... with those literal paths.
|
|
3
|
+
Request fewer paths at once if that result also leaves outlines out.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
The outlines of the files the range changed print %{bytes} B on their own, past the budget, so this result passes
|
|
2
|
+
it too. Which of them to survey is your call: name a later REV, so fewer commits are surveyed, or read the outlines
|
|
3
|
+
of the files the change is about and leave the rest.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
This command wrote nothing.
|
|
2
|
-
|
|
3
|
-
.principles/audits/ID.json
|
|
4
|
-
edits none of the project's guidance.
|
|
1
|
+
This command wrote nothing. Map commands write %{map_file}.
|
|
2
|
+
add-guidance-search-path and remove-guidance-search-path write only .principles/guidance-search-paths.json.
|
|
3
|
+
Audit start/submit steps write only .principles/audits/ID.json; wrote names any changed record.
|
|
4
|
+
Commit changed records. list/show commands write nothing. This tool edits none of the project's guidance.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
By convention, CLAUDE.md, AGENTS.md and .claude rules, skills, agents and settings in this project. Also included are Markdown files changed by --commits-after,
|
|
2
|
+
changed mapped files, and files explicitly selected with --also or recorded guidance search paths. Explicit glob matching respects internal, package and nested-project traversal boundaries. Files git
|
|
3
|
+
ignores are named under ignored and not listed to map. The host may still load an ignored file, such
|
|
3
4
|
as personal local settings, which can hold hooks and permissions, and whose hooks show-principle reads for
|
|
4
5
|
named_in_hooks; while it is ignored and uncommitted, an audit refuses a member in it, so a rule only it enforces
|
|
5
6
|
stays outside every audited map. Markdown and settings files are listed by name, except that a skill lists only its
|
|
6
|
-
SKILL.md, the file the harness loads. Any other file there, such as a skill's references, templates or scripts, is
|
|
7
|
-
counted under its directory in other_files_by_directory, so read one when it may hold a member. Members elsewhere in
|
|
7
|
+
SKILL.md, the file the harness loads, unless explicitly selected with --also, recorded search paths or the commit range. Any other file there, such as a skill's references, templates or scripts, is
|
|
8
|
+
counted under its directory in other_files_by_directory, so read one when it may hold a member. Explicit selections list other text files by path and size, without Markdown outlines. Members elsewhere in
|
|
8
9
|
the project are just as valid, and often the strongest: git hooks, CI workflows and executable scripts enforce a
|
|
9
10
|
principle, where instructions only state it. Look there too, and add any that reinforce the principle. Nothing is
|
|
10
11
|
executed; delivery is not observed.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
After showing the user the principles table, save where to look for this project's agent instructions and checks.
|
|
2
|
+
A guidance search path selects files for a survey; it does not map a principle or establish host delivery.
|
|
3
|
+
Use list-candidate-files --also with a quoted project-relative file pattern to try a selection before recording it.
|
|
4
|
+
|
|
5
|
+
%{executable} add-guidance-search-path 'guides/**/*.md'
|
|
6
|
+
|
|
7
|
+
Writes only `.principles/guidance-search-paths.json`, in the selected project's store; commit it as it changes.
|
|
8
|
+
The glob is normalized as --also normalizes it. A duplicate addition returns `unchanged` with an empty `wrote` list
|
|
9
|
+
and leaves existing bytes untouched. `recorded_guidance_search_paths` gives the normalized stored list; `next_action`
|
|
10
|
+
prints a read-only survey; later surveys automatically include recorded locations without repeating --also.
|
|
11
|
+
No map, audit record or guidance file is changed, and nothing is executed.
|
|
12
|
+
|
|
13
|
+
Blank, absolute or parent-traversing patterns are refused as `invalid_guidance_search_path`. Invalid JSON or schema
|
|
14
|
+
is refused as `unparseable_guidance_search_paths` or `invalid_guidance_search_paths`; `newer_guidance_search_paths` asks for
|
|
15
|
+
an upgrade while preserving the newer file. A linked store or configuration is refused as `symlinked_directory`
|
|
16
|
+
or `symlinked_guidance_search_paths`, including a dangling link. `guidance_search_paths_io_error` reports an unreadable
|
|
17
|
+
or unwritable store; repair it before retrying. A missing file is an empty list, not a reason to hide an access error.
|
|
@@ -8,6 +8,34 @@ how to show it, what to do next and, while a correction may be open, how a fix c
|
|
|
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
9
|
mapped in one sitting do not each repeat them.
|
|
10
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
|
+
|
|
11
39
|
When the new member shares a line with members already mapped, `added` names them, so you see that one
|
|
12
40
|
edit there will show as a change to each: `overlaps` lists those in this principle, and `mapped_elsewhere`
|
|
13
41
|
those in other principles, each with its principle, its id, the role it plays there and its `first_line` and
|
|
@@ -30,12 +58,13 @@ The location flags narrow the member; omit them for a whole file. Give both to t
|
|
|
30
58
|
|
|
31
59
|
- `--section HEADING`: a Markdown heading's exact text without its # marks. The section runs to the next
|
|
32
60
|
heading of the same or a higher level.
|
|
33
|
-
- `--starting-at TEXT`:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
61
|
+
- `--starting-at TEXT`: one literal opening; without `--ending-at TEXT`, the passage ends at its line's end.
|
|
62
|
+
A new literal ending must occur once after the complete opening in the selected region; overlapping matches count.
|
|
63
|
+
`ambiguous_passage_end` refuses before writing, with exact `eligible_ending_count`, up to five `ending_candidates`
|
|
64
|
+
(1-based line/character column), and `ending_candidates_omitted`. Quote more specific closing text.
|
|
65
|
+
Existing stored members and evidence use the first ending with unchanged hashes; only new add/move is stricter.
|
|
66
|
+
The member's id ends with `@TEXT`; `change-member-role` and `start-audit --member` take it.
|
|
67
|
+
This tool quotes it in each command it prints. For manual typing, choose short TEXT without backticks, quotes or `$`.
|
|
39
68
|
- `--query '$.FIELD'`: one top-level field of a Markdown file's frontmatter, such as `$.description`,
|
|
40
69
|
which is what makes a skill or subagent load. A query is standard JSONPath, so a name with a hyphen
|
|
41
70
|
goes in brackets: `$['allowed-tools']`. The member is the field's lines as the file writes them:
|
|
@@ -2,5 +2,21 @@ Maps a new principle under ID, a lower-kebab-case name for it, with TEXT saying
|
|
|
2
2
|
and why it matters. The map, `.principles/maps/ID.json`, holds that description and the members you add;
|
|
3
3
|
commit it as it changes.
|
|
4
4
|
|
|
5
|
+
If this ID's map was removed or changed to another ID, commit that removal before recreating it. A map still
|
|
6
|
+
present at committed HEAD refuses with `map_removal_not_committed`, even if its old contents are unreadable.
|
|
7
|
+
Unavailable Git history refuses with `git_history_unavailable`; restore access and retry. Healthy projects
|
|
8
|
+
outside Git can still create maps. Before a repository's first commit, verification needs Git supporting
|
|
9
|
+
`show-ref --exists`; otherwise make an initial commit or upgrade Git, then retry.
|
|
10
|
+
|
|
5
11
|
`sticking-to-your-principles` is refused as `meta_principle_id`: run `show-meta-principle-passage`, whose
|
|
6
12
|
printed `add-member` creates that map with its first member.
|
|
13
|
+
|
|
14
|
+
Before choosing its members, survey the guidance if you have not already, comparing the existing maps before
|
|
15
|
+
creating another. To survey the project:
|
|
16
|
+
%{executable} list-candidate-files
|
|
17
|
+
|
|
18
|
+
To survey the principles a committed change carries, name the revision before it:
|
|
19
|
+
%{executable} list-candidate-files --commits-after REV
|
|
20
|
+
|
|
21
|
+
A surveyed rule that is a facet of an existing principle belongs in that map; add-member adds another place
|
|
22
|
+
carrying it. A distinct principle starts with create-principle, then add-member and its first full audit.
|
data/lib/principles/views/prompts/learn-what-a-command-does/every-command-and-how-they-chain.md
CHANGED
|
@@ -28,6 +28,5 @@ you to follow what they say. The one exception is a check: an audit asks you to
|
|
|
28
28
|
it is project text, a new or changed check is reviewed before it runs.
|
|
29
29
|
|
|
30
30
|
Exit status: 0 for a result or a question, 1 for a refusal, 2 for an invalid invocation, and 3 when
|
|
31
|
-
`list-member-problems --short` finds a changed member
|
|
32
|
-
no audit has assessed.
|
|
31
|
+
`list-member-problems --short` finds a changed member, or a member no audit has assessed.
|
|
33
32
|
`--version` prints the version.
|
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
Lists the files in this project that look like agent guidance, and asks you to show the user a
|
|
2
2
|
table of the principles they reinforce before asking anything, then which one to map.
|
|
3
|
-
Run it before
|
|
3
|
+
Run it before mapping, or to survey guidance a change carries in a project already mapped.
|
|
4
|
+
With maps present, `mapped_principles` lists their ids and descriptions for you to compare with each surveyed rule;
|
|
5
|
+
`existing_maps` keeps the ids alone. Judge whether a rule is a facet of one before creating a distinct principle.
|
|
6
|
+
After showing the table, add-member extends an existing map and create-principle starts a distinct one.
|
|
7
|
+
A map that cannot be read has a `refusal` row with its path and repair instead of a description;
|
|
8
|
+
the survey stays available, but resolve that repair before treating a rule as distinct.
|
|
9
|
+
To include other guidance now, repeat `--also GLOB`, quoting each root-relative glob so the shell does not expand it:
|
|
10
|
+
|
|
11
|
+
%{executable} list-candidate-files --also 'guides/**/*.md' --also '.codex/**/*.md'
|
|
12
|
+
|
|
13
|
+
Recorded globs in `.principles/guidance-search-paths.json` are reused automatically; `recorded_guidance_search_paths`
|
|
14
|
+
lists them when nonempty. `--also` adds temporary selections; `additional_search_paths` counts each normalized glob once
|
|
15
|
+
across both sources. Missing configuration is empty and creates nothing. Unusable configuration is refused rather
|
|
16
|
+
than silently omitted; see add-guidance-search-path's repairs. After the table, ask where else guidance lives.
|
|
17
|
+
Globs match case-sensitively: `*` stays in one path segment, `**/` includes deeper folders, braces select alternatives,
|
|
18
|
+
and dotfiles are included. A leading `./` is normalized. Blank or absolute globs, parent segments and NUL are refused
|
|
19
|
+
as `invalid_guidance_search_path`. The inventory still skips internal stores, installed-package folders and nested Git
|
|
20
|
+
projects, and does not traverse symlinked folders. `additional_search_paths` gives each normalized `glob` and its
|
|
21
|
+
`matched_files` count within those boundaries, before ignore/readability filtering; zero means no eligible match,
|
|
22
|
+
not proof that no guidance exists elsewhere. Ignored matches remain unread under ignored facts; other unreadable
|
|
23
|
+
matches give per-path refusals. Overlapping globs list a file only once. Explicit selections are named even inside
|
|
24
|
+
skills: Markdown receives an outline subject to the budget and test-data exclusions, while other text files give
|
|
25
|
+
path and size. They are never executed, and listing does not establish host delivery.
|
|
26
|
+
`--commits-after REV` names the commit a change starts after, as a sha, a branch or `HEAD~3`, for a survey of the
|
|
27
|
+
principles that change carries. The files the commits after REV changed, up to HEAD, list first, each marked
|
|
28
|
+
`changed_in_range`, with any Markdown file they changed outside the places hosts load and any changed file already
|
|
29
|
+
named in a readable principle map. Range-selected Markdown references inside skills are outlined too; a mapped
|
|
30
|
+
non-Markdown file is named by path and size, never executed. Unmapped application code is not included just because
|
|
31
|
+
it changed. Selection compares the map's literal member paths; a change only to a symlink target is not promised
|
|
32
|
+
to select every mapped alias. Every other candidate follows,
|
|
33
|
+
as without it. Past the budget, every other file's outline is left out before theirs is cut, and theirs is never
|
|
34
|
+
left out, as an entry file's is not; when they alone pass the budget, `range_outlines_bytes` gives what they print and
|
|
35
|
+
the question asks you to name a later REV or choose which to survey. `uncommitted` names each Markdown file that differs from HEAD or is untracked,
|
|
36
|
+
since no commit in the range holds it yet: survey it yourself if the change includes it. Outside git it refuses with
|
|
37
|
+
`range_needs_git`, and a REV git resolves to no commit refuses with `unknown_revision`, naming it under `revision`.
|
|
4
38
|
Each listed Markdown file, except those under `possibly_test_data`, gives its `outline`: its headings in order, as
|
|
5
39
|
Markdown, outside code fences, and under each its top-level list items, an item by its bold lead or its first 60
|
|
6
40
|
characters, at most 20 a heading. One with frontmatter gives its `description` too, and leaves the frontmatter
|
|
@@ -17,9 +51,8 @@ The root CLAUDE.md and AGENTS.md go after every other file, and keep their outli
|
|
|
17
51
|
whose outline lines were cut; a file whose only cut is its description is not named, since its text says so. Under
|
|
18
52
|
each heading of a cut file, `(N more, lines A-B)`, or `(N more under M headings, lines A-B)`, says how many items
|
|
19
53
|
its section held and which lines of the file hold it, so read just those lines where the survey needs them, not the
|
|
20
|
-
whole file. `outlines_left_out` names
|
|
21
|
-
outlines
|
|
22
|
-
always keep an outline, so on their own they can still print past the budget.
|
|
54
|
+
whole file. `outlines_left_out` names files at path and size alone. Run `show-candidate-outlines PATH...` for needed
|
|
55
|
+
outlines; request fewer paths if it omits any. Root CLAUDE.md and AGENTS.md keep outlines even past the budget.
|
|
23
56
|
In git, `untracked` names each listed file git does not track, and
|
|
24
57
|
each file a listed link leads to that git does not track: it loads into context all the same, but start-audit
|
|
25
58
|
refuses a member in it, or read through a link to it, until the file is committed, so ask the project's
|
|
@@ -24,38 +24,40 @@ so a completed audit gives each one; or `not_committed`, where no commit holds t
|
|
|
24
24
|
so committing those of the map and the member's file that differ from HEAD or are untracked gives it one,
|
|
25
25
|
and when every one is committed already, a completed audit gives it one. `next_action` names that audit, or those
|
|
26
26
|
files.
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
`
|
|
27
|
+
`no_completed_audit` names readable maps without a completed full audit, even uncommitted. `next_action` counts them
|
|
28
|
+
before baselines without judging meaning or completeness. `empty_maps` names maps with no members, even after an audit.
|
|
29
|
+
Add a member first if empty; commit required files before an audit. Unknown/newer records keep upgrade/refusal guidance.
|
|
30
|
+
`awaiting_first_audit` retains its baseline prerequisite: in git a commit holds the map or an audit is open;
|
|
31
|
+
outside git the audit supplies the baseline. Audited maps' added-member lines remain.
|
|
31
32
|
This tool compares text, not meaning. When a change alters what a member says, or its check changed, run a full
|
|
32
33
|
audit with `start-audit ID`. When the member still says the same thing, a completed full audit has judged it and ran
|
|
33
34
|
its check, if any, in git, acknowledge it with `start-audit ID --member MEMBER`; `next_action` offers that only where
|
|
34
|
-
it applies, as one command per
|
|
35
|
+
it applies, as one command per principle giving `--member` for each such member, quoted for a shell.
|
|
35
36
|
`records_waiting_on_an_upgrade`: principles whose record a later copy wrote, changes marked `waiting_on_an_upgrade`.
|
|
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`),
|
|
42
|
-
|
|
42
|
+
(or `uncommitted`), whose subject and earlier commits the JSON result's `history` gives, and what it was compared
|
|
43
|
+
with: `audit` when an audit or acknowledgement assessed its text, or `mapping_commit`
|
|
43
44
|
when no audit has, so only the commit that mapped it 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
|
-
member. The commands `next_action` prints carry each id exactly.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
session-start hook can leave exit 4 and `mapping_commit` rows out, while a post-commit hook still sees each edit.
|
|
47
|
+
member. The commands `next_action` prints carry each id exactly. After the rows, a line for each principle with members
|
|
48
|
+
no audit has assessed gives its id and `N never assessed`. It exits 0 when no member this copy can act on changed, as
|
|
49
|
+
when each change waits on an upgrade, and 3 when it prints a row or a count.
|
|
50
50
|
Every refusal exits 1 with a single line of JSON on stderr, the only line this tool writes there when it refuses,
|
|
51
51
|
whose `code` names it, such as `broken_members` (a member that cannot be found or read), `principles_folder_not_moved`
|
|
52
52
|
(a project state to repair) or `unsupported_ruby` (no supported Ruby runs this tool). Other programs, such as an rbenv
|
|
53
53
|
shim, may write other lines there, and codes may be added: a code a hook does not know is still a refusal to read. A
|
|
54
|
-
usage error exits 2. When it does not refuse, stderr carries what to do next,
|
|
55
|
-
members with no baseline, that an empty stdout would hide. A changed member
|
|
56
|
-
so use it as a notice rather than a gate that blocks commits.
|
|
54
|
+
usage error exits 2. When it does not refuse, stderr carries what to do next, its commands run in the project it names
|
|
55
|
+
once, and says when there are no maps, or members with no baseline, that an empty stdout would hide. A changed member
|
|
56
|
+
stays listed until an audit takes it in, so use it as a notice rather than a gate that blocks commits.
|
|
57
57
|
For a post-commit hook, run: %{executable} list-member-problems --short || true
|
|
58
58
|
A heartbeat can compare each line's commit with the last one it reported.
|
|
59
|
+
`--short --session-start SOURCE`, for the session-start hook, prints instead, but on `resume`, that every loaded line
|
|
60
|
+
costs every session, then each principle's count of changed audited members with a command listing them.
|
|
59
61
|
|
|
60
62
|
`--commits-after COMMIT --hook-event EVENT` is for a Claude Code hook that runs after a Bash call, so a long session
|
|
61
63
|
learns of a member it changed at the commit that changed it, not only at its next start. The plugin's after-commit
|
|
@@ -68,8 +70,7 @@ on an upgrade comes apart. It prints nothing when those commits changed no mappe
|
|
|
68
70
|
its code and this command, only when those commits changed `.principles/` or a file a map names, since only then could
|
|
69
71
|
they have caused it; else it prints nothing, and the session-start hook reports it. It exits 0 but for a usage error.
|
|
70
72
|
|
|
71
|
-
A member edited without changing what it says is listed at every commit until an audit takes the edit in. A member
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
instead of a full audit.
|
|
73
|
+
A member edited without changing what it says is listed at every commit until an audit takes the edit in. A member still
|
|
74
|
+
says the same thing after a fixed typo, a reworded sentence or a renumbered citation; an added, dropped, reversed,
|
|
75
|
+
narrowed or widened rule changes what it says. When one member was edited but still says the same thing, and a completed
|
|
76
|
+
full audit has judged it, take in just that edit with `start-audit ID --member MEMBER` instead of a full audit.
|
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
Lists each finding that the last completed audit of principle ID, or of every principle when ID is left out,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
`
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
`
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
record until its correction completes, and that record keeps the last completed one: while it is open, this lists
|
|
16
|
-
the findings that completed audit left open, not the open audit's own. A record a later copy wrote that this copy
|
|
1
|
+
Lists each finding that the last completed audit of principle ID, or of every principle when ID is left out, deferred or
|
|
2
|
+
accepted. Each finding carries its principle, its `finding_id` in that audit, its `member_ids`, its `problem` as the
|
|
3
|
+
assessment stated it at audit time, its `action` with the `reason` its answer gave, the `audited_at` of that audit, its
|
|
4
|
+
`first_raised_at`, and `recorded_at`: where the agent wrote it up, which keeps why it waits. A `recorded_at` of null
|
|
5
|
+
means it was never written up. `first_raised_at` is when the audit that first raised the finding was made, kept by each
|
|
6
|
+
later audit that keeps the finding, so it shows how long the finding has waited. For a finding first raised before this
|
|
7
|
+
tool kept the field, it is a lower bound: the time of the earliest audit that kept it, until a full audit's
|
|
8
|
+
`still_holds` decision claims the earlier time with `raised_in`, the commit whose record first held the finding, as
|
|
9
|
+
`start-audit --help` says. A finding dated that way also carries `raised_in`. A deferral whose audit said what it waits
|
|
10
|
+
on also carries `waits_on`, that one line, and `waits_on_since`, when the audit that made that ask was made. It is what
|
|
11
|
+
was asked then, and of whom; the next full audit asks the agent to confirm it, so check that it still holds before
|
|
12
|
+
chasing it. `findings` is empty when none are open. Outside git, an audit whose assessment raised findings is saved as
|
|
13
|
+
an open record until its correction completes, and that record keeps the last completed one: while it is open, this
|
|
14
|
+
lists the findings that completed audit left open, not the open audit's own. A record a later copy wrote that this copy
|
|
17
15
|
cannot read is refused as `newer_audit_record` when its ID is given; else `records_waiting_on_an_upgrade` names it.
|
|
18
16
|
|
|
19
17
|
Open means deferred or accepted, as `action` says: not fixed, and waiting for the next full audit to decide it. A
|
|
20
|
-
finding recorded as fixed or disagreed was decided, and `show-audit ID` shows those. A record written before
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
finding recorded as fixed or disagreed was decided, and `show-audit ID` shows those. A record written before this tool
|
|
19
|
+
kept each finding's problem has none, and one written before it kept the reason has no `reason`; its finding is
|
|
20
|
+
described, and why it was left open, only where `recorded_at` points. A finding carries `evidence`, the pointers its
|
|
21
|
+
record keeps to where the problem is, as the audit that raised it or a later `still_holds` decision gave them. One whose
|
|
22
|
+
record keeps none, written before this tool kept each finding's evidence, is marked `evidence_not_kept`; the next full
|
|
23
|
+
audit may supply it.
|
|
26
24
|
|
|
27
|
-
`scope` says what this covers: each principle's last completed audit only. The next full audit decides each of these:
|
|
28
|
-
that still holds stays in the record with its `first_raised_at`, and one closed as resolved or withdrawn is then
|
|
29
|
-
in git history, where `git log -p -- .principles/audits/ID.json` shows it.
|
|
25
|
+
`scope` says what this covers: each principle's last completed audit only. The next full audit decides each of these:
|
|
26
|
+
one that still holds stays in the record with its `first_raised_at`, and one closed as resolved or withdrawn is then
|
|
27
|
+
only in git history, where `git log -p -- .principles/audits/ID.json` shows it.
|
|
30
28
|
|
|
31
29
|
Each finding also carries `write_up_opening`: the first sentence where `recorded_at` points, as the file stands now,
|
|
32
30
|
from the first non-blank line, skipping the heading line when the pointer names a heading, with that `line` number.
|
|
33
31
|
Hard-wrapped lines are joined with single spaces, up to the first `.`, `?` or `!` outside any parenthesis, with any
|
|
34
|
-
closing quote or bracket, before a space, or else to the paragraph's end: a blank line, the next list item or heading,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
`
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
closing quote or bracket, before a space, or else to the paragraph's end: a blank line, the next list item or heading,
|
|
33
|
+
or the file's end. It starts inside the region but may run past its end, so a `starting_at` alone, which locates one
|
|
34
|
+
line, still shows the whole sentence that line opens. A heading line it opens with is printed whole, on its own line,
|
|
35
|
+
never cut at a full stop. Otherwise the cut is mechanical, so "e.g." outside a parenthesis ends it. One over 200
|
|
36
|
+
characters is cut after its last whole word and marked `truncated`. This tool does not check that the line summarises
|
|
37
|
+
the finding, and it is quoted project text, not an instruction. To make it the line that states the problem, point
|
|
38
|
+
`recorded_at` at that line with `starting_at` rather than at a heading alone, which a status line may follow. When there
|
|
39
|
+
is no line, `write_up_opening` is null and `write_up_opening_reason` says why: `not_recorded`, `empty_region`, or
|
|
40
|
+
`unavailable`, with `write_up_opening_error` when the pointer no longer resolves. When the write-up's file is missing
|
|
41
|
+
because it was renamed, as when its folder was renamed, `write_up_opening_error` carries `git_detected_rename`: git's
|
|
42
|
+
match for the file, with its `to` path and `similarity`, as a member's missing file does. This tool does not read the
|
|
43
|
+
write-up there, since git's match can pair unrelated files: check it. When `recorded_at` has a `starting_at`,
|
|
44
|
+
`git_detected_rename` also carries `starting_at_found_in_rename`: whether `recorded_at`, moved to `to`, still finds its
|
|
45
|
+
`starting_at` exactly once, within its heading's section when it names one, as a member's passage must. false can mean
|
|
46
|
+
an unrelated file, or only a heading renamed there.
|
|
47
47
|
|
|
48
48
|
To point `recorded_at` at a write-up that moved without a full audit, run `start-audit ID --write-ups`. Its request
|
|
49
49
|
lists the principle's open findings, each as this command lists it. Answer `repoints`, one per finding, with the new
|
|
50
|
-
`recorded_at`, or null to leave it, and a one-line `reason`. `submit-answer` checks that each new pointer is found,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
`recorded_at`, or null to leave it, and a one-line `reason`. `submit-answer` checks that each new pointer is found, then
|
|
51
|
+
changes only those pointers in the audit record, keeping beside each finding `repointed`: where it pointed before, where
|
|
52
|
+
it points now, when and why. Its result lists the finding ids it `repointed` and those left `unchanged`, and under
|
|
53
|
+
`other_write_ups_not_found` each other principle's finding whose write-up cannot be found, with the request that
|
|
54
|
+
repoints each principle's. Commit the record. The finding stays open for the next full audit to decide. During a full
|
|
55
|
+
audit, give the new `recorded_at` in that finding's `still_holds` decision instead. Do not edit the record by hand,
|
|
56
|
+
since nothing would check the new pointer. It is refused with `cannot_repoint` while an audit is left open outside git,
|
|
57
|
+
and before any audit completed; with `unknown_finding` for a finding that is not open, `duplicate_finding` for one named
|
|
58
|
+
twice, `invalid_answer` for a new `recorded_at` without a `reason`, and `uncommitted_files` while its file differs from
|
|
59
|
+
the last commit. `--member` with it is refused.
|
|
60
60
|
|
|
61
|
-
`--
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
`--lines` is for deciding whom to tell, as the session-start line asks: it prints each open finding on a line, its
|
|
62
|
+
principle, id and `waits on:` its `waits_on`, or `waits on no one named`, with no script over this JSON. It cannot be
|
|
63
|
+
given with `--short`.
|
|
64
|
+
|
|
65
|
+
`--short` is for a session-start hook, where an open finding would otherwise wait unseen until its principle's next full
|
|
66
|
+
audit. It prints one line instead of JSON, and nothing at all when no finding is open, exiting 0 either way: how many
|
|
67
|
+
findings are open, how many whole days the oldest has waited since its `first_raised_at`, that finding's principle and
|
|
68
|
+
id, its `waits_on` when it has one, cut at a word within 80 characters with a parenthesis left open closed, how many of
|
|
69
|
+
several have no `waits_on`, and the command that lists them. While any open finding's `write_up_opening_reason` is
|
|
70
|
+
`unavailable`, the line also names that write-up, or the first of them with their count, so a pointer that no longer
|
|
71
|
+
resolves is seen at session start. With `--session-start SOURCE`, one of `startup`, `resume`, `clear` and `compact` as
|
|
72
|
+
Claude Code's SessionStart hook names them, the line for `clear` or `compact` says it returns after each clear or
|
|
73
|
+
compaction too, asking at the next pause rather than before the user's first task; without it the line is worded for
|
|
74
|
+
`startup`. For `resume`, whose conversation holds the line already, it gives only the findings and the command that
|
|
75
|
+
prints it whole. The days run from `first_raised_at`, not `waits_on_since`, which dates only the ask. For a finding
|
|
76
|
+
raised before this tool kept the field the days are a lower bound, as `first_raised_at` is. The principles plugin's
|
|
77
|
+
session-start hook prints this line, passing its source.
|
|
@@ -6,6 +6,11 @@ does not guess the new path: find it with git or by reading the project. The loc
|
|
|
6
6
|
and replace the old ones whole, so `--path` alone makes the member the whole file. MEMBER is the id `show-principle`
|
|
7
7
|
lists. The result says which lines the member now spans.
|
|
8
8
|
|
|
9
|
+
A new literal `--ending-at` must occur once after the complete opening in the selected region; overlapping matches count.
|
|
10
|
+
`ambiguous_passage_end` refuses before writing: exact `eligible_ending_count`, up to five `ending_candidates` with
|
|
11
|
+
1-based line/character columns, and `ending_candidates_omitted`. Quote more specific closing text.
|
|
12
|
+
Existing stored members and evidence keep the first ending and their hashes; only new add/move is stricter.
|
|
13
|
+
|
|
9
14
|
An id no member has is refused with `unknown_member`. When it differs from one mapped id only in case, spacing,
|
|
10
15
|
dashes or quotes, the refusal names that id under `did_you_mean` and starts its repair with this command run on it
|
|
11
16
|
instead. This tool never acts on the near miss: check that it is the member you meant before you run it.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Remove a recorded survey location when it no longer identifies this project's guidance. Use the exact normalized
|
|
2
|
+
glob from `recorded_guidance_search_paths`, not a member id or text location.
|
|
3
|
+
|
|
4
|
+
%{executable} remove-guidance-search-path 'guides/**/*.md'
|
|
5
|
+
|
|
6
|
+
Writes only `.principles/guidance-search-paths.json`; commit it. The last removal retains a valid empty configuration.
|
|
7
|
+
The result gives the remaining `recorded_guidance_search_paths`, its `wrote` file and a read-only survey in `next_action`.
|
|
8
|
+
It never removes guidance files, principle maps or audit records. Later surveys automatically use the remaining
|
|
9
|
+
recorded locations; a removed glob stops that extra selection, while conventional and temporary selections still apply.
|
|
10
|
+
|
|
11
|
+
An absent selection is refused as `unknown_guidance_search_path`, with the recorded list to choose from, without
|
|
12
|
+
creating configuration. Invalid globs, malformed or newer configuration, linked files and I/O errors are refused
|
|
13
|
+
as add-guidance-search-path describes; restore or upgrade the store instead of replacing its contents by hand.
|