principles 0.0.11 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -0
- data/lib/principles/controllers/answer.rb +2 -2
- data/lib/principles/controllers/assessment.rb +19 -3
- data/lib/principles/controllers/audit.rb +14 -4
- data/lib/principles/controllers/full_audit_request.rb +16 -10
- data/lib/principles/controllers/guidance_search_paths.rb +1 -1
- data/lib/principles/controllers/member_addition.rb +4 -1
- data/lib/principles/controllers/member_problems_report.rb +7 -6
- data/lib/principles/controllers/open_finding_decisions.rb +66 -0
- data/lib/principles/controllers/running_tool.rb +22 -5
- data/lib/principles/controllers/survey.rb +3 -2
- data/lib/principles/data/candidate_files_found.rb +6 -4
- data/lib/principles/data/command-steps.json +17 -17
- data/lib/principles/data/committed_texts.rb +58 -0
- data/lib/principles/data/first_parent_log.rb +50 -10
- data/lib/principles/data/json_text.rb +5 -1
- data/lib/principles/data/parser_message.rb +61 -0
- data/lib/principles/data/project_files.rb +4 -2
- data/lib/principles/data/repository.rb +29 -37
- data/lib/principles/data/running_version.rb +1 -1
- data/lib/principles/data/schemas/audit-record.schema.json +15 -0
- data/lib/principles/data/schemas/command-steps.schema.json +1 -1
- data/lib/principles/data/schemas/{repointing-answer.schema.json → deciding-answer.schema.json} +12 -6
- data/lib/principles/data/working_tree_changes.rb +62 -0
- data/lib/principles/invocation_options.rb +1 -1
- data/lib/principles/launch.rb +5 -3
- data/lib/principles/models/after_commit_input.rb +1 -0
- data/lib/principles/models/assessment_basis.rb +1 -1
- data/lib/principles/models/audit.rb +23 -3
- data/lib/principles/models/audit_entry_protecting_map.rb +1 -0
- data/lib/principles/models/audit_record.rb +5 -14
- data/lib/principles/models/audit_records.rb +1 -1
- data/lib/principles/models/audited_member_lines.rb +1 -1
- data/lib/principles/models/candidate_files.rb +1 -1
- data/lib/principles/models/candidate_inventory.rb +19 -9
- data/lib/principles/models/candidate_outline.rb +1 -1
- data/lib/principles/models/changed_regions.rb +1 -1
- data/lib/principles/models/command_steps.rb +1 -2
- data/lib/principles/models/correction_basis.rb +1 -1
- data/lib/principles/models/declared_map_changes.rb +1 -2
- data/lib/principles/models/finding_decision.rb +84 -0
- data/lib/principles/models/finding_write_ups.rb +2 -1
- data/lib/principles/models/first_full_audit.rb +1 -0
- data/lib/principles/models/frontmatter_fields.rb +1 -1
- data/lib/principles/models/guidance_search_path.rb +1 -1
- data/lib/principles/models/guidance_search_paths.rb +5 -1
- data/lib/principles/models/head_moves.rb +1 -0
- data/lib/principles/models/ignored_candidates.rb +1 -1
- data/lib/principles/models/instruction_named.rb +1 -1
- data/lib/principles/models/json_path_query.rb +1 -1
- data/lib/principles/models/json_path_selectors.rb +1 -1
- data/lib/principles/models/json_path_string.rb +1 -1
- data/lib/principles/models/last_completed_revision.rb +1 -1
- data/lib/principles/models/line_diff.rb +1 -1
- data/lib/principles/models/line_span.rb +1 -1
- data/lib/principles/models/loading_scope.rb +1 -0
- data/lib/principles/models/located_text.rb +1 -1
- data/lib/principles/models/map_change.rb +66 -0
- data/lib/principles/models/mapped_principles.rb +4 -0
- data/lib/principles/models/markdown_file.rb +22 -1
- data/lib/principles/models/member.rb +1 -1
- data/lib/principles/models/member_elsewhere.rb +1 -1
- data/lib/principles/models/member_file.rb +6 -1
- data/lib/principles/models/member_hashes_as_written.rb +2 -2
- data/lib/principles/models/member_history.rb +1 -1
- data/lib/principles/models/member_lines.rb +1 -1
- data/lib/principles/models/member_loading_scopes.rb +1 -0
- data/lib/principles/models/member_mapping_run.rb +4 -4
- data/lib/principles/models/member_moves.rb +1 -2
- data/lib/principles/models/member_problems.rb +5 -1
- data/lib/principles/models/member_region.rb +1 -1
- data/lib/principles/models/members_elsewhere.rb +1 -1
- data/lib/principles/models/members_in_consecutive_sections.rb +1 -0
- data/lib/principles/models/members_sharing_lines.rb +1 -1
- data/lib/principles/models/misspelt_member_id.rb +1 -1
- data/lib/principles/models/open_finding.rb +4 -3
- data/lib/principles/models/open_findings_decision.rb +124 -0
- data/lib/principles/models/open_findings_elsewhere.rb +1 -1
- data/lib/principles/models/other_templates_placeholders.rb +1 -0
- data/lib/principles/models/outline_budget.rb +1 -1
- data/lib/principles/models/outline_group.rb +1 -1
- data/lib/principles/models/outline_section.rb +1 -1
- data/lib/principles/models/part_named.rb +1 -1
- data/lib/principles/models/plain_text_file.rb +1 -1
- data/lib/principles/models/principle_history.rb +3 -3
- data/lib/principles/models/principle_members.rb +1 -1
- data/lib/principles/models/problem_report.rb +26 -3
- data/lib/principles/models/project.rb +8 -3
- data/lib/principles/models/project_at_commit.rb +9 -19
- data/lib/principles/models/project_history.rb +8 -0
- data/lib/principles/models/prose_line.rb +36 -0
- data/lib/principles/models/record_format.rb +17 -4
- data/lib/principles/models/recorded_finding.rb +47 -7
- data/lib/principles/models/recorded_findings.rb +7 -7
- data/lib/principles/models/recorded_hashes.rb +1 -1
- data/lib/principles/models/recorded_members.rb +6 -8
- data/lib/principles/models/report_hooks.rb +1 -0
- data/lib/principles/models/request_id.rb +2 -2
- data/lib/principles/models/sent_answer.rb +1 -0
- data/lib/principles/models/session_start_input.rb +1 -0
- data/lib/principles/models/stale_request.rb +22 -8
- data/lib/principles/models/submitted_answer.rb +1 -1
- data/lib/principles/models/survey_search_paths.rb +13 -5
- data/lib/principles/models/text_within.rb +1 -1
- data/lib/principles/models/unchecked_members.rb +1 -0
- data/lib/principles/models/uncommitted_outside_the_map.rb +1 -1
- data/lib/principles/models/unknown_principle.rb +1 -0
- data/lib/principles/models/write_up_opening.rb +5 -31
- data/lib/principles/models/write_up_pointer.rb +2 -1
- data/lib/principles/start_audit_options.rb +25 -18
- data/lib/principles/version.rb +2 -2
- data/lib/principles/views/acknowledgement_result.rb +12 -9
- data/lib/principles/views/added_member.rb +10 -1
- data/lib/principles/views/answer_in_a_file.rb +16 -4
- data/lib/principles/views/assessment_answer_guide.rb +59 -0
- data/lib/principles/views/assessment_request.rb +2 -26
- data/lib/principles/views/audit_result.rb +15 -6
- data/lib/principles/views/candidate_files_result.rb +24 -13
- data/lib/principles/views/context_parts.rb +40 -9
- data/lib/principles/views/correction_request.rb +8 -5
- data/lib/principles/views/first_audit_brief.rb +2 -1
- data/lib/principles/views/guidance_search_paths_result.rb +13 -6
- data/lib/principles/views/invocation.rb +14 -4
- data/lib/principles/views/json_on_one_line.rb +18 -0
- data/lib/principles/views/open_findings_decision_result.rb +60 -0
- data/lib/principles/views/problem_facts.rb +46 -0
- data/lib/principles/views/problem_result.rb +42 -31
- data/lib/principles/views/prompts/answer-any-judgement-request/fill-the-answer-in-a-file.md +1 -1
- data/lib/principles/views/prompts/assess-every-member/read-the-request-in-parts.md +2 -1
- data/lib/principles/views/prompts/decide-open-findings/give-only-what-changed-of-each.md +6 -0
- data/lib/principles/views/prompts/dispose-of-each-finding/confirm-each-deferral-written-up-nowhere.md +2 -1
- data/lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md +2 -2
- data/lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md +1 -1
- data/lib/principles/views/prompts/find-a-principle-to-map/ask-in-this-order-after-the-table.md +1 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner.md +1 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/ask-which-principle-to-map.md +2 -2
- data/lib/principles/views/prompts/find-a-principle-to-map/choose-an-existing-or-new-principle.md +3 -2
- data/lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md +2 -2
- data/lib/principles/views/prompts/find-a-principle-to-map/compare-with-mapped-principles.md +2 -2
- data/lib/principles/views/prompts/find-a-principle-to-map/group-rules-into-principles.md +3 -0
- data/lib/principles/views/prompts/find-a-principle-to-map/where-a-survey-with-only-looks.md +4 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/add-guidance-search-path.md +2 -1
- data/lib/principles/views/prompts/learn-what-a-command-does/add-member.md +1 -0
- data/lib/principles/views/prompts/learn-what-a-command-does/list-candidate-files.md +12 -12
- data/lib/principles/views/prompts/learn-what-a-command-does/list-open-findings.md +11 -12
- data/lib/principles/views/prompts/learn-what-a-command-does/show-answer-check.md +2 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/show-open-correction.md +2 -2
- data/lib/principles/views/prompts/learn-what-a-command-does/start-audit.md +8 -8
- data/lib/principles/views/prompts/run-a-first-audit-in-the-background/follow-the-brief.md +1 -1
- metadata +20 -9
- data/lib/principles/controllers/repoint.rb +0 -67
- data/lib/principles/models/repoint.rb +0 -125
- data/lib/principles/models/write_up_repoint.rb +0 -38
- data/lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner-after-the-table.md +0 -1
- data/lib/principles/views/prompts/repoint-write-ups/point-each-moved-write-up-at-its-new-place.md +0 -10
- data/lib/principles/views/repoint_result.rb +0 -80
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
Deferred with recorded_at null: %{finding_ids}. That is allowed when there is nowhere to point; the record then
|
|
2
|
-
keeps no
|
|
2
|
+
keeps no pointer, so list-open-findings prints no write-up. If one is written up in a project file, point its
|
|
3
|
+
recorded_at there and check again; if it is written up outside the project, such as in an issue, give its link in its reason.
|
|
@@ -4,9 +4,9 @@ fixed finding needs an actual change to its members, evidence and a reassessment
|
|
|
4
4
|
template gives a `reason` or a fix's `reassessment` with your own words, and do not copy an `answer_guide`
|
|
5
5
|
sample into the field it illustrates, `waits_on` included; either one sent back unchanged is refused. Keep the project's
|
|
6
6
|
owner-approval process; this tool edits nothing. The audit record keeps each finding's members, its
|
|
7
|
-
`problem` as you stated it and
|
|
7
|
+
`problem` as you stated it, its disposition and your reason, and `list-open-findings` prints the reason. So when you write a finding up somewhere the project keeps, such as a ticket
|
|
8
8
|
or a notes file, set its `recorded_at` to that place, as `{"path": ..., "heading": ...}` or with
|
|
9
|
-
`starting_at`, and the record keeps the pointer in the
|
|
9
|
+
`starting_at`, and the record keeps the pointer. When the write-up is outside the project, such as an issue or a tracker comment, leave `recorded_at` null and give its link in the `reason`. Leave it null when there is nowhere to point. `list-open-findings` prints the first non-blank line where `recorded_at` points, so open a write-up with one line saying what the finding is. Point with `starting_at` at the line that states the problem, rather than at a heading alone, since a heading is often followed by a status line or is shared by several findings.
|
|
10
10
|
When a deferral waits on someone, set its `waits_on` to one line saying whom it waits on and to decide what, such as
|
|
11
11
|
"<person>, to approve a CI change", and keep the reason in the write-up. Leave it null when it waits on no one in
|
|
12
12
|
particular. Only a deferral may give one, and this tool records when it was asked.
|
data/lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Ask where else this repository keeps guidance agents follow, including other harness folders,
|
|
2
2
|
linked documents, templates and executable checks. You judge which files carry principles; this inventory does not
|
|
3
3
|
establish that a host loads them. To include a location in a read-only survey now, repeat --also with a quoted
|
|
4
4
|
root-relative glob. This option does not record the location for later surveys.
|
data/lib/principles/views/prompts/find-a-principle-to-map/ask-in-this-order-after-the-table.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
After the table, in this order:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Ask the project's owner
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
sentence of your own.
|
|
1
|
+
Ask the user which principle to map first, or whether to map them all. Give each a lower-kebab-case id, and describe
|
|
2
|
+
it in one sentence of your own.
|
data/lib/principles/views/prompts/find-a-principle-to-map/choose-an-existing-or-new-principle.md
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Ask which existing principle to extend with add-member, or which distinct principle to map with create-principle, or
|
|
2
|
+
whether to map them all. For a new map, choose a lower-kebab-case id and describe what the principle is and why it
|
|
3
|
+
matters.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
Survey this project's principles: the
|
|
1
|
+
Survey this project's principles: the intents that several pieces of its agent guidance carry together. Read
|
|
2
2
|
each listed Markdown file's outline, description and opening line printed here, not the files themselves.
|
|
3
3
|
For a selected non-Markdown file listed by path and size, inspect that file only if needed to judge the rule it
|
|
4
4
|
enforces; listing it does not show its contents. Show the user one
|
|
5
5
|
table, with a row for each principle: a name of a word or two, a one-line description, and the files and sections
|
|
6
|
-
that carry it. Members can also be
|
|
6
|
+
that carry it. Members can also be rule files, skills, hooks, reminders, scripts, data files or build checks anywhere in
|
|
7
7
|
the project; inventory.scope states what this survey covers. Ask nothing and write nothing until the table is shown. If
|
|
8
8
|
nothing here reinforces a principle, say so and stop.
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Survey this project's principles using each listed Markdown file's outline, description and opening line printed here,
|
|
2
2
|
not the files themselves. For a selected non-Markdown file listed by path and size, inspect that file only if needed
|
|
3
3
|
to judge the rule it enforces; listing it does not show its contents.
|
|
4
|
-
Compare each
|
|
4
|
+
Compare each principle you found with the id and description in mapped_principles: is it a facet of
|
|
5
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
|
|
6
|
+
A row with a refusal has no readable description: resolve its repair before deciding a principle is distinct. You judge; do not create
|
|
7
7
|
a separate map for each wording or file. Show the user one table of principles, each with its description,
|
|
8
8
|
carrying files and sections, and the existing map it belongs to or why it is distinct.
|
|
9
9
|
Ask nothing and write nothing until the table is shown. If nothing here reinforces a principle, say so and stop.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Group rules under the intent they serve, each place that states or enforces one a member of that principle: split a
|
|
2
|
+
hub file, such as a CI workflow, by passage; pair a rule's statement with what enforces it, such as a hook or a check;
|
|
3
|
+
and map a lone rule as a member of the principle it serves, not as a principle.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
Only the files the --only globs match, within the folders a survey walks: the places hosts load by convention and the
|
|
2
|
+
recorded guidance search paths are left out, since a survey without --only lists them. Files git ignores are named
|
|
3
|
+
under ignored and not listed to map. Other text files are listed by path and size, without Markdown outlines. Nothing
|
|
4
|
+
is executed; delivery is not observed.
|
|
@@ -7,7 +7,8 @@ Use list-candidate-files --also with a quoted project-relative file pattern to t
|
|
|
7
7
|
Writes only `.principles/guidance-search-paths.json`, in the selected project's store; commit it as it changes.
|
|
8
8
|
The glob is normalized as --also normalizes it. A duplicate addition returns `unchanged` with an empty `wrote` list
|
|
9
9
|
and leaves existing bytes untouched. `recorded_guidance_search_paths` gives the normalized stored list; `next_action`
|
|
10
|
-
prints a read-only survey
|
|
10
|
+
prints a read-only survey of just the files an added glob matches, with list-candidate-files --only, since the rest
|
|
11
|
+
were surveyed before; later surveys automatically include recorded locations without repeating --also.
|
|
11
12
|
No map, audit record or guidance file is changed, and nothing is executed.
|
|
12
13
|
|
|
13
14
|
Blank, absolute or parent-traversing patterns are refused as `invalid_guidance_search_path`. Invalid JSON or schema
|
|
@@ -59,6 +59,7 @@ The location flags narrow the member; omit them for a whole file. Give both to t
|
|
|
59
59
|
- `--section HEADING`: a Markdown heading's exact text without its # marks. The section runs to the next
|
|
60
60
|
heading of the same or a higher level.
|
|
61
61
|
- `--starting-at TEXT`: one literal opening; without `--ending-at TEXT`, the passage ends at its line's end.
|
|
62
|
+
In Markdown, `added.continues_to_line` is the last line of a paragraph or list item that runs on past it.
|
|
62
63
|
A new literal ending must occur once after the complete opening in the selected region; overlapping matches count.
|
|
63
64
|
`ambiguous_passage_end` refuses before writing, with exact `eligible_ending_count`, up to five `ending_candidates`
|
|
64
65
|
(1-based line/character column), and `ending_candidates_omitted`. Quote more specific closing text.
|
|
@@ -11,9 +11,11 @@ To include other guidance now, repeat `--also GLOB`, quoting each root-relative
|
|
|
11
11
|
%{executable} list-candidate-files --also 'guides/**/*.md' --also 'docs/agents/*.md'
|
|
12
12
|
|
|
13
13
|
Recorded globs in `.principles/guidance-search-paths.json` are reused automatically; `recorded_guidance_search_paths`
|
|
14
|
-
lists them when nonempty. `--
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
lists them when nonempty. Repeated `--only GLOB` lists just the files its globs match, leaving out the places hosts
|
|
15
|
+
load by convention and the recorded globs, so a survey after recording a search path reads only what it adds.
|
|
16
|
+
`--also` adds temporary selections; `additional_search_paths` counts each normalized glob once across both sources.
|
|
17
|
+
Missing configuration is empty and creates nothing. Unusable configuration is refused rather than silently omitted;
|
|
18
|
+
see add-guidance-search-path's repairs. After the table, ask where else guidance lives.
|
|
17
19
|
Globs match case-sensitively: `*` stays in one path segment, `**/` includes deeper folders, braces select alternatives,
|
|
18
20
|
and dotfiles are included. A leading `./` is normalized. Blank or absolute globs, parent segments and NUL are refused
|
|
19
21
|
as `invalid_guidance_search_path`. The inventory still skips internal stores, installed-package folders and nested Git
|
|
@@ -35,13 +37,12 @@ left out, as an entry file's is not; when they alone pass the budget, `range_out
|
|
|
35
37
|
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
38
|
since no commit in the range holds it yet: survey it yourself if the change includes it. Outside git it refuses with
|
|
37
39
|
`range_needs_git`, and a REV git resolves to no commit refuses with `unknown_revision`, naming it under `revision`.
|
|
38
|
-
Each listed Markdown file, except those under `possibly_test_data`, gives its `outline
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
headings, lists, tables and code, ending at its last sentence
|
|
43
|
-
|
|
44
|
-
then asks you to name, under the table, the files that look ticket-local or boilerplate.
|
|
40
|
+
Each listed Markdown file, except those under `possibly_test_data`, gives its `outline`. `outline` is a flat list of
|
|
41
|
+
strings, one per line, in the file's order, with no keys: each heading outside code fences as Markdown, `## Name`,
|
|
42
|
+
then its top-level list items, `- item`, each by its bold lead or first 60 characters, at most 20 a heading. One
|
|
43
|
+
with frontmatter gives its `description` too, and leaves the frontmatter out of its outline. `opening_line` is the
|
|
44
|
+
file's first prose paragraph, its lines joined, outside headings, lists, tables and code, ending at its last sentence
|
|
45
|
+
end within 160 characters, or else cut on a word. Read the outlines rather than the files; no script is needed.
|
|
45
46
|
The result keeps to a byte budget under Claude Code's inline limit for a tool result, so it arrives inline rather
|
|
46
47
|
than as a saved file, each file's entry on a line of its own. Past the budget, it cuts one file at a time, making
|
|
47
48
|
each cut across the files before the next: a `description` over 300 characters ends at a sentence end, then `(N more
|
|
@@ -52,8 +53,7 @@ whose outline lines were cut; a file whose only cut is its description is not na
|
|
|
52
53
|
each heading of a cut file, `(N more, lines A-B)`, or `(N more under M headings, lines A-B)`, says how many items
|
|
53
54
|
its section held and which lines of the file hold it, so read just those lines where the survey needs them, not the
|
|
54
55
|
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.
|
|
56
|
-
In git, `untracked` names each listed file git does not track, and
|
|
56
|
+
outlines; request fewer paths if it omits any. In git, `untracked` names each listed file git does not track, and
|
|
57
57
|
each file a listed link leads to that git does not track: it loads into context all the same, but start-audit
|
|
58
58
|
refuses a member in it, or read through a link to it, until the file is committed, so ask the project's
|
|
59
59
|
owner before mapping one. `ignored` names each file in those places that git ignores, by any ignore file, a global
|
|
@@ -45,18 +45,17 @@ write-up there, since git's match can pair unrelated files: check it. When `reco
|
|
|
45
45
|
`starting_at` exactly once, within its heading's section when it names one, as a member's passage must. false can mean
|
|
46
46
|
an unrelated file, or only a heading renamed there.
|
|
47
47
|
|
|
48
|
-
To
|
|
49
|
-
lists the principle's open findings
|
|
50
|
-
`
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
the last commit. `--member` with it is refused.
|
|
48
|
+
To change what an open finding waits on, its action or its write-up without a full audit, run `start-audit ID
|
|
49
|
+
--open-findings`, which lists the principle's open findings as this command does; its `decisions` template names each by
|
|
50
|
+
`finding_id` alone, printed bare by `--as template` under `decision_fields`, which names each field a decision may give
|
|
51
|
+
and what it means, and which the answer may send back unread; `--write-ups`, which it replaces, is refused with
|
|
52
|
+
`replaced_option`. Give only what changes, each with a one-line `reason`; an `action` closing a finding is a full
|
|
53
|
+
audit's. `submit-answer` keeps each change beside its finding, and lists the ids it `changed` under
|
|
54
|
+
`open_findings_decided`, and under `other_write_ups_not_found` each other principle's finding whose write-up cannot be
|
|
55
|
+
found. Commit the record; the next full audit decides the finding. It is refused with `cannot_decide_open_findings`
|
|
56
|
+
while an audit is left open outside git, and before any audit completed; with `unknown_finding` for a finding that is
|
|
57
|
+
not open, `duplicate_finding` for one named twice, `invalid_answer` for a change without a `reason`, and
|
|
58
|
+
`uncommitted_files` while its file differs from the last commit.
|
|
60
59
|
|
|
61
60
|
`--lines` is for deciding whom to tell, as the session-start line asks: it prints each open finding on a line, its
|
|
62
61
|
principle, id, `waits on:` its `waits_on`, `waits on no one named`, or `accepted` for one that waits on no one by
|
|
@@ -35,8 +35,8 @@ is allowed when there is nowhere to point, and then `list-open-findings` prints
|
|
|
35
35
|
|
|
36
36
|
When a full audit's assessment has findings, `next_action` names the command that prints the correction's answer
|
|
37
37
|
it leads to, `--as template`, with its `request_id` and the `basis` digests filled in, so you never copy them by
|
|
38
|
-
hand; `show-open-correction ID` prints the same answer once the assessment is submitted. Redirect it to
|
|
39
|
-
outside the project,
|
|
38
|
+
hand; `show-open-correction ID` prints the same answer once the assessment is submitted. Redirect it to the file
|
|
39
|
+
`next_action` names by its full path, outside the project, and fill only its `dispositions`: each `action` names the four actions
|
|
40
40
|
and what each adds. Submit it after the assessment, as `next_action` says; the assessment writes the open record the
|
|
41
41
|
correction is checked against. `--as template` refuses with `no_correction_to_fill` an answer that leads to none.
|
|
42
42
|
|
|
@@ -3,8 +3,8 @@ Prints the answer to fill for the correction a full audit's assessment with find
|
|
|
3
3
|
again. It reads principle ID's open audit record and writes nothing.
|
|
4
4
|
|
|
5
5
|
It prints the correction's answer alone: its `request_id` and `basis`, which you hand back unchanged, and one disposition for each finding to fill.
|
|
6
|
-
Redirect it to
|
|
7
|
-
submit it with `submit-answer --file
|
|
6
|
+
Redirect it to the file `submit-answer`'s `next_action` names by its full path, outside the project, fill only
|
|
7
|
+
its `dispositions`, and submit it with `submit-answer --file` and that path. It prints the same answer in git and outside it, and still
|
|
8
8
|
after you fix members, which leaves the correction current; `submit-answer` checks it as usual.
|
|
9
9
|
|
|
10
10
|
It refuses with `no_open_correction` while none is open to print. With no audit open, or only a completed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Asks you to assess every member of principle ID and the set
|
|
2
|
-
|
|
1
|
+
Asks you to assess every member of principle ID and the set. Run it after mapping and when `show-principle` reports a
|
|
2
|
+
member changed, unassessed, locator_lost or unavailable. `--part PART` prints parts, sized in `part_bytes`: a member's
|
|
3
3
|
with its `text` and `lines_in_text`, an instruction as printed or `response_template` bare (`part_empty` if empty),
|
|
4
4
|
`--as template --part members/ID` slots; `--part index` lists `part_command`, their `bytes`, whether `this_audit`
|
|
5
5
|
`judges` or `carries_forward` a member, `trimmed_instructions`, `answer_with` and `next_action`, per `read_in_parts`.
|
|
@@ -30,12 +30,12 @@ After a full audit, a member carries `carried_forward`, with its `assessed_at`,
|
|
|
30
30
|
|
|
31
31
|
## Prior findings
|
|
32
32
|
|
|
33
|
-
When the last completed audit deferred or accepted findings, `context.prior_findings` lists them, with
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
and `found_now`, or `evidence_not_kept` and an `evidence_request` for `problem_evidence`,
|
|
37
|
-
lost item. Decide each in `prior_finding_decisions` as `still_holds`, `resolved`,
|
|
38
|
-
`
|
|
33
|
+
When the last completed audit deferred or accepted findings, `context.prior_findings` lists them, with
|
|
34
|
+
`first_raised_at`, its `waits_on` and `waits_on_since`, changes since as `changed_since_audit`; an older one may claim
|
|
35
|
+
`raised_in`, found by `git log --follow`. Each listed finding shows its `evidence`, in git each item with
|
|
36
|
+
`changed_since_last_audit` and `found_now`, or `evidence_not_kept` and an `evidence_request` for `problem_evidence`,
|
|
37
|
+
whose `replaces` re-points a lost item. Decide each in `prior_finding_decisions` as `still_holds`, `resolved`,
|
|
38
|
+
`withdrawn` or `raised_again`; only `resolved` may give `evidence`. Results name `prior_findings_pointers_dropped`,
|
|
39
39
|
`prior_findings_waits_on_dropped`, `prior_findings_evidence_replaced`, `prior_findings_problems_restated`.
|
|
40
40
|
|
|
41
41
|
## Members to check against the activation
|
|
@@ -6,7 +6,7 @@ at a pause, since principles would ask.
|
|
|
6
6
|
2. Read the request in parts, which costs about the bytes of the whole request and its member files. Type
|
|
7
7
|
part_command and then the part as printed, never in a shell variable. Its parts: %{index}
|
|
8
8
|
|
|
9
|
-
3. Keep every answer file at
|
|
9
|
+
3. Keep every answer file at %{answer_file}, never in the project. Redirect the template
|
|
10
10
|
below there and edit it, running each member check the request names and no script over this output.
|
|
11
11
|
Check it with show-answer-check, then submit-answer, each with --file and that path; answer a
|
|
12
12
|
correction the same way. On a stale_request refusal, start once more. Its template: %{template}
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: principles
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sidu Ponnappa
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-11-
|
|
10
|
+
date: 2026-11-24 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: |
|
|
13
13
|
A harness configuration framework that keeps every part of your Claude Code agent's harness in alignment.
|
|
@@ -60,8 +60,8 @@ files:
|
|
|
60
60
|
- lib/principles/controllers/members_to_assess.rb
|
|
61
61
|
- lib/principles/controllers/meta_principle_setup.rb
|
|
62
62
|
- lib/principles/controllers/open_correction.rb
|
|
63
|
+
- lib/principles/controllers/open_finding_decisions.rb
|
|
63
64
|
- lib/principles/controllers/parts_to_read.rb
|
|
64
|
-
- lib/principles/controllers/repoint.rb
|
|
65
65
|
- lib/principles/controllers/running_tool.rb
|
|
66
66
|
- lib/principles/controllers/session_start_report.rb
|
|
67
67
|
- lib/principles/controllers/survey.rb
|
|
@@ -70,6 +70,7 @@ files:
|
|
|
70
70
|
- lib/principles/data/candidate_files_found.rb
|
|
71
71
|
- lib/principles/data/command-steps.json
|
|
72
72
|
- lib/principles/data/command_steps_file.rb
|
|
73
|
+
- lib/principles/data/committed_texts.rb
|
|
73
74
|
- lib/principles/data/committed_tree.rb
|
|
74
75
|
- lib/principles/data/expected_type.rb
|
|
75
76
|
- lib/principles/data/first_parent_log.rb
|
|
@@ -83,6 +84,7 @@ files:
|
|
|
83
84
|
- lib/principles/data/known_fields.rb
|
|
84
85
|
- lib/principles/data/linked_path.rb
|
|
85
86
|
- lib/principles/data/map_files.rb
|
|
87
|
+
- lib/principles/data/parser_message.rb
|
|
86
88
|
- lib/principles/data/principle_id.rb
|
|
87
89
|
- lib/principles/data/principles_directory.rb
|
|
88
90
|
- lib/principles/data/principles_on_path.rb
|
|
@@ -101,11 +103,12 @@ files:
|
|
|
101
103
|
- lib/principles/data/schemas/command-steps.schema.json
|
|
102
104
|
- lib/principles/data/schemas/correction-answer-guide.schema.json
|
|
103
105
|
- lib/principles/data/schemas/correction-answer.schema.json
|
|
106
|
+
- lib/principles/data/schemas/deciding-answer.schema.json
|
|
104
107
|
- lib/principles/data/schemas/guidance-search-paths.schema.json
|
|
105
108
|
- lib/principles/data/schemas/member-map-history.schema.json
|
|
106
109
|
- lib/principles/data/schemas/member-map.schema.json
|
|
107
|
-
- lib/principles/data/schemas/repointing-answer.schema.json
|
|
108
110
|
- lib/principles/data/verified_head.rb
|
|
111
|
+
- lib/principles/data/working_tree_changes.rb
|
|
109
112
|
- lib/principles/error.rb
|
|
110
113
|
- lib/principles/failure_refusal.rb
|
|
111
114
|
- lib/principles/invocation_options.rb
|
|
@@ -163,6 +166,7 @@ files:
|
|
|
163
166
|
- lib/principles/models/evidence_item.rb
|
|
164
167
|
- lib/principles/models/evidence_lines_since.rb
|
|
165
168
|
- lib/principles/models/evidence_replacements.rb
|
|
169
|
+
- lib/principles/models/finding_decision.rb
|
|
166
170
|
- lib/principles/models/finding_write_ups.rb
|
|
167
171
|
- lib/principles/models/findings_left_open.rb
|
|
168
172
|
- lib/principles/models/first_full_audit.rb
|
|
@@ -194,6 +198,7 @@ files:
|
|
|
194
198
|
- lib/principles/models/locate_refusal.rb
|
|
195
199
|
- lib/principles/models/located_text.rb
|
|
196
200
|
- lib/principles/models/locator.rb
|
|
201
|
+
- lib/principles/models/map_change.rb
|
|
197
202
|
- lib/principles/models/mapped_principles.rb
|
|
198
203
|
- lib/principles/models/markdown_file.rb
|
|
199
204
|
- lib/principles/models/member.rb
|
|
@@ -225,6 +230,7 @@ files:
|
|
|
225
230
|
- lib/principles/models/new_findings.rb
|
|
226
231
|
- lib/principles/models/open_correction.rb
|
|
227
232
|
- lib/principles/models/open_finding.rb
|
|
233
|
+
- lib/principles/models/open_findings_decision.rb
|
|
228
234
|
- lib/principles/models/open_findings_elsewhere.rb
|
|
229
235
|
- lib/principles/models/other_principles.rb
|
|
230
236
|
- lib/principles/models/other_templates_placeholders.rb
|
|
@@ -255,6 +261,7 @@ files:
|
|
|
255
261
|
- lib/principles/models/project.rb
|
|
256
262
|
- lib/principles/models/project_at_commit.rb
|
|
257
263
|
- lib/principles/models/project_history.rb
|
|
264
|
+
- lib/principles/models/prose_line.rb
|
|
258
265
|
- lib/principles/models/quoted_change.rb
|
|
259
266
|
- lib/principles/models/recent_decision.rb
|
|
260
267
|
- lib/principles/models/record_format.rb
|
|
@@ -265,7 +272,6 @@ files:
|
|
|
265
272
|
- lib/principles/models/recorded_hashes.rb
|
|
266
273
|
- lib/principles/models/recorded_members.rb
|
|
267
274
|
- lib/principles/models/refusal_before_shape.rb
|
|
268
|
-
- lib/principles/models/repoint.rb
|
|
269
275
|
- lib/principles/models/report_hooks.rb
|
|
270
276
|
- lib/principles/models/reported_check.rb
|
|
271
277
|
- lib/principles/models/request_id.rb
|
|
@@ -291,7 +297,6 @@ files:
|
|
|
291
297
|
- lib/principles/models/waits_on.rb
|
|
292
298
|
- lib/principles/models/write_up_opening.rb
|
|
293
299
|
- lib/principles/models/write_up_pointer.rb
|
|
294
|
-
- lib/principles/models/write_up_repoint.rb
|
|
295
300
|
- lib/principles/positional_arguments.rb
|
|
296
301
|
- lib/principles/prose_list.rb
|
|
297
302
|
- lib/principles/session_start_options.rb
|
|
@@ -307,6 +312,7 @@ files:
|
|
|
307
312
|
- lib/principles/views/answer_in_a_file.rb
|
|
308
313
|
- lib/principles/views/answered_request.rb
|
|
309
314
|
- lib/principles/views/assessed_members.rb
|
|
315
|
+
- lib/principles/views/assessment_answer_guide.rb
|
|
310
316
|
- lib/principles/views/assessment_request.rb
|
|
311
317
|
- lib/principles/views/audit_changes.rb
|
|
312
318
|
- lib/principles/views/audit_commit.rb
|
|
@@ -329,6 +335,7 @@ files:
|
|
|
329
335
|
- lib/principles/views/hook_setup_result.rb
|
|
330
336
|
- lib/principles/views/instruction.rb
|
|
331
337
|
- lib/principles/views/invocation.rb
|
|
338
|
+
- lib/principles/views/json_on_one_line.rb
|
|
332
339
|
- lib/principles/views/json_with_entries_on_lines.rb
|
|
333
340
|
- lib/principles/views/landed_since_base.rb
|
|
334
341
|
- lib/principles/views/line_history_since_last_audit.rb
|
|
@@ -347,6 +354,7 @@ files:
|
|
|
347
354
|
- lib/principles/views/meta_principle_result.rb
|
|
348
355
|
- lib/principles/views/new_loading_scope.rb
|
|
349
356
|
- lib/principles/views/one_member_check_result_template.rb
|
|
357
|
+
- lib/principles/views/open_findings_decision_result.rb
|
|
350
358
|
- lib/principles/views/open_findings_elsewhere_result.rb
|
|
351
359
|
- lib/principles/views/open_findings_line.rb
|
|
352
360
|
- lib/principles/views/other_principles_unjudged_result.rb
|
|
@@ -360,6 +368,7 @@ files:
|
|
|
360
368
|
- lib/principles/views/printed_principle.rb
|
|
361
369
|
- lib/principles/views/prior_finding_decisions_result.rb
|
|
362
370
|
- lib/principles/views/prior_findings_result.rb
|
|
371
|
+
- lib/principles/views/problem_facts.rb
|
|
363
372
|
- lib/principles/views/problem_lines.rb
|
|
364
373
|
- lib/principles/views/problem_result.rb
|
|
365
374
|
- lib/principles/views/prompts.rb
|
|
@@ -406,16 +415,19 @@ files:
|
|
|
406
415
|
- lib/principles/views/prompts/assess-every-member/say-what-observed-means.md
|
|
407
416
|
- lib/principles/views/prompts/assess-every-member/uncommitted-files-outside-the-map.md
|
|
408
417
|
- lib/principles/views/prompts/assess-every-member/why-each-member-is-judged-again.md
|
|
418
|
+
- lib/principles/views/prompts/decide-open-findings/give-only-what-changed-of-each.md
|
|
409
419
|
- lib/principles/views/prompts/dispose-of-each-finding/answer-guide.json
|
|
410
420
|
- lib/principles/views/prompts/dispose-of-each-finding/confirm-each-deferral-written-up-nowhere.md
|
|
411
421
|
- lib/principles/views/prompts/dispose-of-each-finding/fix-or-record-each-finding.md
|
|
412
422
|
- lib/principles/views/prompts/dispose-of-each-finding/retain-assessment-and-correction.md
|
|
413
423
|
- lib/principles/views/prompts/find-a-principle-to-map/ask-about-other-guidance-search-paths.md
|
|
414
|
-
- lib/principles/views/prompts/find-a-principle-to-map/ask-
|
|
424
|
+
- lib/principles/views/prompts/find-a-principle-to-map/ask-in-this-order-after-the-table.md
|
|
425
|
+
- lib/principles/views/prompts/find-a-principle-to-map/ask-the-owner.md
|
|
415
426
|
- lib/principles/views/prompts/find-a-principle-to-map/ask-which-principle-to-map.md
|
|
416
427
|
- lib/principles/views/prompts/find-a-principle-to-map/choose-an-existing-or-new-principle.md
|
|
417
428
|
- lib/principles/views/prompts/find-a-principle-to-map/choose-one-principle.md
|
|
418
429
|
- lib/principles/views/prompts/find-a-principle-to-map/compare-with-mapped-principles.md
|
|
430
|
+
- lib/principles/views/prompts/find-a-principle-to-map/group-rules-into-principles.md
|
|
419
431
|
- lib/principles/views/prompts/find-a-principle-to-map/leave-test-data-out-of-the-survey.md
|
|
420
432
|
- lib/principles/views/prompts/find-a-principle-to-map/owner-ask-ignored-folders.md
|
|
421
433
|
- lib/principles/views/prompts/find-a-principle-to-map/owner-ask-ignored.md
|
|
@@ -425,6 +437,7 @@ files:
|
|
|
425
437
|
- lib/principles/views/prompts/find-a-principle-to-map/read-left-out-files.md
|
|
426
438
|
- lib/principles/views/prompts/find-a-principle-to-map/survey-a-later-range.md
|
|
427
439
|
- lib/principles/views/prompts/find-a-principle-to-map/what-each-command-writes.md
|
|
440
|
+
- lib/principles/views/prompts/find-a-principle-to-map/where-a-survey-with-only-looks.md
|
|
428
441
|
- lib/principles/views/prompts/find-a-principle-to-map/where-the-inventory-looks.md
|
|
429
442
|
- lib/principles/views/prompts/learn-what-a-command-does/add-guidance-search-path.md
|
|
430
443
|
- lib/principles/views/prompts/learn-what-a-command-does/add-member.md
|
|
@@ -457,7 +470,6 @@ files:
|
|
|
457
470
|
- lib/principles/views/prompts/learn-what-a-command-does/start-audit.md
|
|
458
471
|
- lib/principles/views/prompts/learn-what-a-command-does/submit-answer.md
|
|
459
472
|
- lib/principles/views/prompts/read-requested-outlines/continue-the-survey.md
|
|
460
|
-
- lib/principles/views/prompts/repoint-write-ups/point-each-moved-write-up-at-its-new-place.md
|
|
461
473
|
- lib/principles/views/prompts/report-after-a-commit/it-refused-after-the-commits-touched-the-maps.md
|
|
462
474
|
- lib/principles/views/prompts/report-after-a-commit/others-are-still-listed.md
|
|
463
475
|
- lib/principles/views/prompts/report-after-a-commit/the-commits-changed-these-members-waiting-on-an-upgrade.md
|
|
@@ -484,7 +496,6 @@ files:
|
|
|
484
496
|
- lib/principles/views/prompts/start-a-session/start-no-second-first-audit.md
|
|
485
497
|
- lib/principles/views/read_the_change.rb
|
|
486
498
|
- lib/principles/views/record_waiting_on_an_upgrade.rb
|
|
487
|
-
- lib/principles/views/repoint_result.rb
|
|
488
499
|
- lib/principles/views/report_hooks_offer.rb
|
|
489
500
|
- lib/principles/views/request_part.rb
|
|
490
501
|
- lib/principles/views/request_parts.rb
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# typed: strict
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
require "time"
|
|
5
|
-
require_relative "answer_phase"
|
|
6
|
-
require_relative "../models/finding_write_ups"
|
|
7
|
-
require_relative "../models/repoint"
|
|
8
|
-
require_relative "../views/repoint_result"
|
|
9
|
-
|
|
10
|
-
require_relative "../views/answered_request"
|
|
11
|
-
|
|
12
|
-
module Principles
|
|
13
|
-
# Each runs one command: reads models, applies their rules and prints through a view.
|
|
14
|
-
# controllers/CLAUDE.md owns the boundary.
|
|
15
|
-
module Controllers
|
|
16
|
-
# A repoint of a principle's open findings' write-ups: start-audit ID --write-ups lists each open finding
|
|
17
|
-
# with where its write-up is now, and submit-answer points the recorded_at the agent gives in the audit record.
|
|
18
|
-
class Repoint < AnswerPhase
|
|
19
|
-
# The request for principle id's open findings.
|
|
20
|
-
#: (String) -> Hash[String, untyped]
|
|
21
|
-
def start(id)
|
|
22
|
-
naming_the_executable do
|
|
23
|
-
record = @audit_records.find(id)
|
|
24
|
-
repoint = repoint_of(id, record)
|
|
25
|
-
findings = Models::FindingWriteUps.of(@project, [record].compact).listed
|
|
26
|
-
view.request(request_id: repoint.request_id.to_s, principle_id: id, revision: repoint.revision,
|
|
27
|
-
findings: findings).merge("wrote" => [])
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# The result of answering, and the record it changes, not yet written, which the repoint refuses once the last
|
|
32
|
-
# completed record changed after the request was printed, unless it writes nothing.
|
|
33
|
-
# @override
|
|
34
|
-
#: (Models::SubmittedAnswer) -> [Views::AnsweredRequest, Array[Models::AuditRecord]]
|
|
35
|
-
def answered(submitted)
|
|
36
|
-
id = submitted.request_id.principle_id
|
|
37
|
-
response = submitted.response
|
|
38
|
-
repoint = repoint_of(id, @audit_records.find(id))
|
|
39
|
-
repointed, changes = repoint.writable(response, records: @audit_records, at: Time.now.utc.iso8601) do |locator|
|
|
40
|
-
snapshot(locator)
|
|
41
|
-
end
|
|
42
|
-
[Views::AnsweredRequest.new(view.repointed(principle_id: id, file: @audit_records.file(id),
|
|
43
|
-
outcome: outcome(repoint, repointed))), changes]
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
private
|
|
47
|
-
|
|
48
|
-
# The repoint of principle id's open findings, as its record holds them.
|
|
49
|
-
#: (String, Models::AuditRecord?) -> Models::Repoint
|
|
50
|
-
def repoint_of(id, record) = Models::Repoint.new(principle_id: id, record: record, history: @history)
|
|
51
|
-
|
|
52
|
-
# What the repoint did, and each other principle's open finding whose write-up cannot be found (T16).
|
|
53
|
-
#: (Models::Repoint, Models::AuditRecord) -> Views::RepointResult::Outcome
|
|
54
|
-
def outcome(repoint, repointed)
|
|
55
|
-
others = @audit_records.of(@principles.ids - [repointed.principle_id])
|
|
56
|
-
Views::RepointResult::Outcome.new(repointed: repoint.moved_ids(repointed),
|
|
57
|
-
unchanged: repoint.unchanged_ids(repointed),
|
|
58
|
-
not_found_elsewhere: Models::FindingWriteUps.of(@project, others).not_found)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
#: () -> Views::RepointResult
|
|
62
|
-
def view
|
|
63
|
-
Views::RepointResult.new(invocation)
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|