pullfrog 0.1.43 → 0.1.44

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.
package/dist/internal.js CHANGED
@@ -632,16 +632,8 @@ function formatMcpToolRef(agentId, toolName) {
632
632
  // agents/reviewer.ts
633
633
  var REVIEWER_AGENT_NAME = "reviewfrog";
634
634
 
635
- // utils/promptProfile.ts
636
- function promptProfile() {
637
- return process.env.PULLFROG_PROMPT_PROFILE === "full" ? "full" : "lean";
638
- }
639
- function byProfile(lean, full) {
640
- return promptProfile() === "lean" ? lean : full;
641
- }
642
-
643
635
  // modes.ts
644
- var PR_SUMMARY_FORMAT_LEAN = `### Default format
636
+ var PR_SUMMARY_FORMAT = `### Default format
645
637
 
646
638
  The body has at most three parts, in this order:
647
639
 
@@ -673,7 +665,6 @@ line callout as POTENTIALLY STALE and re-diff before acting on it.
673
665
  - Reviewed commits:
674
666
  - {sha_short} \u2014 {commit_subject}
675
667
  - Prior pullfrog review: none or {prior_sha_short} ({prior_review_html_url})
676
- - Submitted at: {iso_timestamp}
677
668
  -->
678
669
  \`\`\`
679
670
 
@@ -703,150 +694,6 @@ Every body \`### \` section carries one; an inline comment carries one when its
703
694
  The 4-backtick fence lets the block hold its own 3-backtick fences and stay one-click copyable. Skip the optional sections when they'd add nothing.
704
695
 
705
696
  Backtick-wrap identifiers and file names. Don't repeat diff content, don't include raw \`+123 / -45\` stats, no changelog, no horizontal rules, and no \`### Key changes\` / \`### Issues found\` / \`<b>TL;DR</b>\` heading \u2014 each \`### \` heading IS the issue.`;
706
- var PR_SUMMARY_FORMAT_FULL = `### Default format
707
-
708
- The body has at most three parts in this exact order:
709
-
710
- 1. **Reviewed changes preamble** \u2014 one bolded inline lead-in describing what was reviewed in this run, a bullet list of the substantive changes, and an HTML comment carrying review metadata for downstream agents.
711
- 2. **Cross-cutting issue sections** (zero or more) \u2014 one \`### \` heading per concern, with a human-readable problem write-up and a collapsed \`<details>Technical details</details>\` block underneath.
712
- 3. **\`### \u2139\uFE0F Nitpicks\`** at the very bottom (only if there are nits worth surfacing in the body) \u2014 a flat bullet list, no technical-details block.
713
-
714
- Inline-vs-body split: concerns that anchor to a specific line go inline (use the \`comments\` parameter). Body \`### \` sections are reserved for concerns that **have no line to anchor to** \u2014 typically because the concern is about *absence* (something the diff should have done but didn't), *sequencing* (rollout / deletion / migration order), *design decisions only the human can make*, or *scope questions the diff implicitly raises but doesn't address*. A concern that anchors to a line but has broad implications still goes inline (use the technical-details block there to capture the implications \u2014 see Inline technical details below). If you found no non-anchorable concerns, the body has zero \`### \` issue sections \u2014 just the preamble + metadata.
715
-
716
- ## 1. Reviewed changes preamble
717
-
718
- Open with a single bolded inline lead-in followed immediately by the bullet list (no \`### Key changes\` heading, no \`<b>TL;DR</b>\`):
719
-
720
- \`\`\`
721
- **Reviewed changes** \u2014 one sentence on what was reviewed in this run. For Review (initial), this is what the PR does and why. For IncrementalReview, this is what changed since the prior pullfrog review. Focus on intent, not mechanics.
722
-
723
- - **Short human-readable title** \u2014 1 sentence per substantive change. Write a short prose phrase; when you name a file, type, or function, put that name in backticks (e.g. **Add \\\`TodoTracker\\\` for live checklists**). A reviewer should understand the full reviewed scope from this list alone \u2014 this IS the dispassionate "what was reviewed and what changed" overview, so cover the substantive changes, not just the loudest ones.
724
-
725
- <!--
726
- Pullfrog review metadata \u2014 for any agent (or human-with-agent) reading this
727
- review. Incorporate the fields below into your understanding of the context
728
- this review was made in. The findings below were written against
729
- {head_sha_short}; if new commits have landed on {head_ref} since this review
730
- was submitted, treat any specific bug, file, or line callout as POTENTIALLY
731
- STALE \u2014 re-diff against {head_sha_short} (or trigger a fresh review) and
732
- factor commits past {head_sha_short} into your understanding of the current
733
- state before acting on findings.
734
-
735
- - Mode: Review (initial) or IncrementalReview (delta against prior pullfrog review)
736
- - Files reviewed: {file_count}
737
- - Commits reviewed: {commit_count}
738
- - Base: {base_ref} ({base_sha_short})
739
- - Head: {head_ref} ({head_sha_short})
740
- - Reviewed commits:
741
- - {sha_short} \u2014 {commit_subject}
742
- - ...
743
- - Prior pullfrog review: none or {prior_sha_short} ({prior_review_html_url})
744
- - Submitted at: {iso_timestamp}
745
- -->
746
- \`\`\`
747
-
748
- Pull every metadata field from the \`checkout_pr\` tool's response \u2014 file count, commit count, base/head ref + SHA, the commit list. For \`IncrementalReview\` runs, populate \`Prior pullfrog review\` with the prior review's commit_id (short SHA) and \`html_url\` from \`list_pull_request_reviews\`.
749
-
750
- ## 2. Cross-cutting issue sections (zero or more)
751
-
752
- For each cross-cutting concern, one \`### \` section. Use this exact shape:
753
-
754
- \`\`\`
755
- ### {emoji} {short, descriptive title \u2014 what's wrong, not what to do}
756
-
757
- {Human-readable problem write-up. Describes the PROBLEM only \u2014 what's broken, what the symptom is, what the blast radius is. NO asks, NO suggested fixes, NO "the right thing to do is...". Asks and fixes live in the technical-details block below; the visible part is for the human to *understand* the problem, not to implement it.}
758
-
759
- <details><summary>Technical details</summary>
760
-
761
- \\\`\\\`\\\`\\\`markdown
762
- # {title repeated}
763
-
764
- ## Affected sites
765
- - {file path:line} \u2014 {what's wrong there}
766
- - ...
767
-
768
- ## Required outcome
769
- - {what the fix needs to achieve, not how to achieve it}
770
- - ...
771
-
772
- ## Suggested approach (optional)
773
- {When the fix shape is non-obvious, sketch one or more reasonable directions. Skip when the outcome alone makes the fix obvious.}
774
-
775
- ## Open questions for the human (optional)
776
- - {Any decision an implementing agent shouldn't make unilaterally \u2014 pricing thresholds, breaking-change policy, naming, scope of follow-up.}
777
- \\\`\\\`\\\`\\\`
778
-
779
- </details>
780
- \`\`\`
781
-
782
- Concrete example of the visible part of a non-anchored section (technical-details block unchanged from the template above):
783
-
784
- \`\`\`
785
- ### \u2139\uFE0F Legacy \`opencode.ts\` has no documented deletion plan
786
-
787
- The v2 harness lands alongside the v1 file and imports one helper from it. Worth a follow-up issue or a TODO so the next maintainer doesn't have to re-derive the cleanup plan.
788
- \`\`\`
789
-
790
- The example's value is its *shape*: a finding about absence (no deletion plan), not a line-anchored bug. Body sections live or die on whether the concern genuinely doesn't fit on a line.
791
-
792
- **Heading severity emoji** \u2014 every \`### \` heading carries one:
793
-
794
- - \u{1F6A8} critical \u2014 blocks merge (data loss, security, broken core flow)
795
- - \u26A0\uFE0F important \u2014 must address before merging (regression, missing validation, incorrect behavior)
796
- - \u2139\uFE0F informational \u2014 surfaced for awareness; mergeable as-is
797
-
798
- **Visible problem write-up rules:**
799
-
800
- - **No asks, no suggested fixes** in the visible part. The visible portion describes the problem; the technical-details block describes the fix shape and any open questions. The exception: a fix so self-evident that NOT stating it would be weird (e.g. "the typo is missing an 'r'") \u2014 in that case, fold it into the problem statement and skip the suggested-approach block in technical details too.
801
- - **Never two successive plain paragraphs.** Every transition between block-level elements must alternate prose with structure: paragraph \u2192 bullet list \u2192 paragraph; paragraph \u2192 code fence \u2192 bullet list; paragraph \u2192 table \u2192 paragraph. Two consecutive paragraphs in a row create a wall of text that's impossible to digest. If you catch yourself writing one, find a way to split it: pull a list out of it, drop a 2-3 line code fence between them, or merge them into a single tighter paragraph.
802
- - **Per-paragraph budget:** ~3 sentences max. Past that, you're explaining where you should be structuring.
803
- - **Identifier discipline still applies** in the visible part. Lead with behavior in plain English; name an identifier only when it's the subject of the concern or a public surface a reader would recognize. The technical-details block is where dense identifier references belong.
804
-
805
- **Technical-details block rules:**
806
-
807
- - Wrapped in a 4-backtick markdown fence (\`\\\`\\\`\\\`\\\`markdown ... \\\`\\\`\\\`\\\`\`) so it's visually distinct, one-click copyable, and can contain its own 3-backtick code fences without escape gymnastics. The contents are agent-readable \u2014 a fix-agent will pull the body down and use this block as the brief.
808
- - File paths and \`file:line\` refs are encouraged (and necessary) \u2014 the next agent uses these to navigate. Identifier density is fine here.
809
- - Slightly more verbose than the absolute minimum is OK when it materially helps the next agent: a small code snippet showing the symptom, a short table of mismatched key/column pairs, a one-paragraph "why CI doesn't catch it" note. Skip massive regression-test scaffolding or full route rewrites \u2014 the implementing agent writes those.
810
- - Use the four standard sections (\`Affected sites\`, \`Required outcome\`, optional \`Suggested approach\`, optional \`Open questions for the human\`). Skip the optional sections when they wouldn't add anything.
811
-
812
- ## Inline technical details
813
-
814
- Inline comments are short (~2-3 sentences) by default. When an inline finding has broader implications worth recording for a fix-agent \u2014 e.g. a localized bug whose proper fix requires touching several files, or where the right fix depends on a design decision the human needs to make \u2014 append a collapsed \`<details><summary>Technical details</summary>\` block to the inline comment's body. Same shape as the body-section technical-details block (4-backtick fenced markdown, \`## Affected sites\` / \`## Required outcome\` / optional \`## Suggested approach\` / optional \`## Open questions for the human\`).
815
-
816
- GitHub renders the same markdown parser in inline comments as in the review body, so the collapsed-details affordance works the same way. The visible part of the inline comment stays scannable; the depth is one click away for any agent that needs it.
817
-
818
- ## 3. \`### \u2139\uFE0F Nitpicks\` (optional, last section)
819
-
820
- Only when there are nits that for some reason can't be inlined. Filepaths in nit text are fine \u2014 these are simple enough that a human or agent reads once and acts. No technical-details block.
821
-
822
- \`\`\`
823
- ### \u2139\uFE0F Nitpicks
824
-
825
- - {nit, with file path inline if useful, \u2264 ~200 chars}
826
- - ...
827
- \`\`\`
828
-
829
- ## Inline comment shape
830
-
831
- Inline comments use the same severity framing as body \`### \` sections, scaled down for line-anchored use:
832
-
833
- - **Lead with a 1-2 sentence problem statement.** The reader is looking at the line in question, so don't restate what the line says \u2014 describe what's wrong with it. Optionally prefix the visible line with a severity emoji (\u{1F6A8} / \u26A0\uFE0F / \u2139\uFE0F) when severity isn't obvious from context.
834
- - **Optional \`<details><summary>Technical details</summary>...</details>\` collapsible** for findings whose technical context (longer file:line references, related-code snippets, suggested approach, regression-risk notes) would overwhelm the human-readable lead-in. Same agent-readable purpose, same 4-backtick fence shape, and same 4-section structure as the body's technical-details block \u2014 see *Inline technical details* above. Encouraged whenever the depth helps a downstream fix-agent; don't force one when the inline lead-in already says everything.
835
- - **Visible portion \u2264 2-3 sentences.** If you find yourself writing more, that's the cue to split the depth into the \`Technical details\` collapsible.
836
-
837
- ## Body-wide rules
838
-
839
- - **Inline-vs-body discipline (repeated for emphasis):** anything that anchors to a specific line goes inline (with a \`<details>Technical details</details>\` block when the implications are broad). The body is for non-anchorable concerns only \u2014 absence, sequencing, design decisions, scope questions, architectural risk.
840
- - **No \`### Issues found\` heading** above the issue sections \u2014 each \`### \` heading IS the issue.
841
- - **Severity emoji on every \`### \` heading** (\u{1F6A8} / \u26A0\uFE0F / \u2139\uFE0F). No emoji on the preamble lead-in or anywhere else.
842
- - **GitHub block-level rendering**: GitHub's markdown parser requires a blank line between ALL block-level elements (HTML tags like \`<br/>\`, \`<sub>\`, \`<details>\`, \`<b>\` and markdown syntax like headings, lists, blockquotes, code fences, paragraphs). Without a blank line, GitHub treats following content as a continuation of the HTML block and renders markdown syntax as literal text. ALWAYS separate block-level elements with a blank line.
843
- - **Backtick-wrap** every variable, identifier, or file name when you mention one (in either visible or technical-details portions).
844
- - **Don't repeat diff content**, don't include raw \`+123 / -45\` stats, don't include a changelog section, don't use horizontal rules (\`---\`).
845
- - **Pull file/commit counts from \`checkout_pr\` metadata** \u2014 never count manually.
846
- - **Legacy headings REMOVED.** Do not use \`### Key changes\`, \`### Issues found\`, \`<b>TL;DR</b>\`, or \`<sub><b>Summary</b>\`. The new structure subsumes them.`;
847
- function prSummaryFormat() {
848
- return byProfile(PR_SUMMARY_FORMAT_LEAN, PR_SUMMARY_FORMAT_FULL);
849
- }
850
697
  function computeModes(agentId, signedCommits = false) {
851
698
  const t = (toolName) => formatMcpToolRef(agentId, toolName);
852
699
  const commitStep = signedCommits ? `commit via \`${t("commit_changes")}\` \u2014 it lands a GitHub-signed commit directly on the remote branch (no push step)` : `commit locally via shell (\`git add . && git commit -m "..."\`)`;
@@ -870,8 +717,7 @@ function computeModes(agentId, signedCommits = false) {
870
717
  - plan your approach before writing code: identify which files need to change, key design decisions, and edge cases. for non-trivial changes, consider whether there's a more elegant approach.
871
718
  - run relevant tests/lints before committing
872
719
 
873
- 5. **self-review**: ${byProfile(
874
- `unless the diff has no behavioral surface at all \u2014 docs, comments, whitespace, import reordering, lockfile or generated-code regeneration, a mechanical rename, a trusted dep patch bump \u2014 dispatch the \`${REVIEWER_AGENT_NAME}\` subagent to review it with fresh eyes against YOUR TASK. Line count is not the signal: a one-line change to auth, money, SQL, a comparison operator, a redirect, or a config default earns a pass. When in doubt, run it \u2014 a false-positive dispatch costs cents, a missed bug costs much more.
720
+ 5. **self-review**: unless the diff has no behavioral surface at all \u2014 docs, comments, whitespace, import reordering, lockfile or generated-code regeneration, a mechanical rename, a trusted dep patch bump \u2014 dispatch the \`${REVIEWER_AGENT_NAME}\` subagent to review it with fresh eyes against YOUR TASK. Line count is not the signal: a one-line change to auth, money, SQL, a comparison operator, a redirect, or a config default earns a pass. When in doubt, run it \u2014 a false-positive dispatch costs cents, a missed bug costs much more.
875
721
 
876
722
  Before dispatching, make \`origin/<base>\` available: \`git fetch --no-tags --deepen=1000 origin <base>:refs/remotes/origin/<base>\`. The explicit destination refspec is required \u2014 a shallow single-branch checkout otherwise only updates \`FETCH_HEAD\` and never creates the tracking ref. The reviewer is read-only by contract, so fetching is your job.
877
723
 
@@ -879,60 +725,7 @@ function computeModes(agentId, signedCommits = false) {
879
725
 
880
726
  Give it the diff and the task, nothing else. Do not summarize what you implemented, curate a reading list of files, or pre-shape the output with a severity schema \u2014 each biases the reviewer toward validating your solution instead of questioning it. Where the diff rests on third-party API, SDK, framework, or DB-engine semantics, tell it to verify load-bearing claims by web search and quote sources.
881
727
 
882
- Treat what comes back as hypotheses, not directives: verify each against the code before applying, and reject findings that would add ceremony without correctness \u2014 defensive checks for cases that cannot happen, single-use abstractions, comments restating code, tautological tests. After applying what you accept, re-read your own diff and revert anything that turned out to be bloat. Then ${commitStep}.`,
883
- `judgment call \u2014 does YOUR diff warrant a fresh-eyes pass?
884
-
885
- Skip self-review (commit directly) when the diff is **genuinely trivial**:
886
- - doc typos, comment-only edits, whitespace/format-only, import reordering
887
- - lockfile or generated-code regeneration, mechanical rename whose only effect is import-path updates (size of diff is irrelevant \u2014 read the *shape*, not the line count)
888
- - low-risk dep patch bump from a trusted source
889
-
890
- Run self-review when the diff has **any behavioral surface, however small**:
891
- - 1-line changes to SQL operators / comparison logic / regexes / redirects / HTTP methods / response codes
892
- - any change to money / tax / currency / billing / fee / refund / payout calculations or constants
893
- - any change to auth / permissions / roles / sessions / tokens / signature verification
894
- - any change to feature-flag defaults, retry counts, timeouts, rate limits, batch sizes
895
- - new endpoints, new code paths, new error branches \u2014 even small ones
896
- - mixed diffs (whitespace + a single semantic line) \u2014 the semantic line still triggers self-review
897
- - anything you're uncertain about
898
-
899
- Tie-breaker: when in doubt, run self-review. One false-positive subagent dispatch costs cents; one false-negative shipped bug costs much more. There's no value in dispatching for a typo, but there's also no excuse for skipping on a 1-line change to a billing path.
900
-
901
- Otherwise delegate the \`${REVIEWER_AGENT_NAME}\` subagent to review your diff with fresh eyes against YOUR TASK. The subagent's baked-in system prompt enforces a non-mutative + non-recursive contract: read-only file/search/web tools and read-only MCP queries only; no writes, shell side effects, state-changing MCP calls, or nested subagent dispatch. Enforcement is prose-only \u2014 restate the constraint in your dispatch instructions and do not relax it.
902
-
903
- Before dispatching, ensure \`origin/<base>\` is locally available \u2014 the runner is often a shallow single-branch \`actions/checkout\` (depth=1, head-only refspec), and the reviewer's \`git diff --merge-base origin/<base>\` will fail with \`ambiguous argument\` or \`no merge base\` otherwise. Run \`git fetch --no-tags --deepen=1000 origin <base>:refs/remotes/origin/<base>\` once (the explicit destination refspec is required \u2014 a shallow single-branch checkout configures a head-only refspec, so a bare \`origin <base>\` only updates \`FETCH_HEAD\` and never creates the \`origin/<base>\` tracking ref); it's a no-op if the ref already has enough history. (The reviewer is read-only by contract, so it cannot do this itself \u2014 fetching is the orchestrator's job.)
904
-
905
- Compose your \`${REVIEWER_AGENT_NAME}\` dispatch prompt using this template verbatim, substituting the \`<...>\` placeholders. The preamble aligns the orchestrator side of the dispatch contract with the reviewer's baked-in system prompt \u2014 both ends say the same thing about where the work lives and what to do on an empty diff.
906
-
907
- \`\`\`
908
- ## What you're reviewing
909
- This is a PRE-COMMIT Build-mode self-review. The work to review lives in the working tree (uncommitted), NOT in committed history.
910
-
911
- Branch: <branch> (off <base>)
912
- Canonical diff command: git diff --merge-base origin/<base>
913
-
914
- Use \`--merge-base\` (single MCP \`git\` call, no shell substitution required). NOT bare \`git diff origin/<base>\` or two-dot \`git diff origin/<base>..HEAD\` \u2014 the symmetric forms include the inverse of every commit landed on \`<base>\` since this branch forked, which is noise (and the git tool will reject those forms when the divergence is detected). \`origin/<base>...HEAD\` (three-dot) and \`--cached\` both miss the uncommitted edits self-review runs on, so they're also wrong here.
915
-
916
- If the merge-base diff returns empty, treat it as "no changes \u2014 nothing to review" and stop per your system prompt. Do not search for the work elsewhere.
917
-
918
- ## Your task
919
- <YOUR TASK content>
920
-
921
- ## Build-phase failures
922
- <tight summary \u2014 what broke, root cause, the fix \u2014 or "no build-phase failures">
923
- \`\`\`
924
-
925
- Follow the template with the diff content (\`git diff --merge-base origin/<base-branch>\` \u2014 single MCP \`git\` call, captures committed + staged + unstaged, excludes base-branch progress) and your task brief. Instruct the subagent to flag bugs, logic errors, missing edge cases, gaps between request and diff, and unintended changes.
926
-
927
- Delegation + research discipline (distilled from \`/anneal\` canonical \u2014 these are codified learnings from many review rounds, not theoretical best practices):
928
- - Do NOT summarize what you implemented \u2014 that biases the subagent toward validating the shape of your solution rather than questioning it.
929
- - Do NOT curate a reading list of files. Let the subagent discover scope from the diff and codebase.
930
- - Do NOT pre-shape output with a severity / category schema. That leaks your hypotheses; severity is your call during evaluation.
931
- - Do NOT defect-hunt the diff yourself in parallel with the subagent. Your role is dispatch + evaluation; doing the review yourself reintroduces the implementation bias the subagent is meant to mitigate.
932
- - For diffs that rely on third-party API contracts, SDK semantics, framework directives, or DB engine specifics, instruct the subagent to verify load-bearing claims via web search and quote source URLs rather than trust training data \u2014 this is the single most common review-quality failure mode.
933
-
934
- Be **discerning** about what comes back. The reviewer is an AI subagent and is fallible \u2014 treat every finding as a hypothesis, not a directive, and **verify each one yourself** against the diff and the code before deciding whether to apply. You are searching for a solution that is **complete, minimal, and elegant** \u2014 you may need to think hard to find it. Do not over-engineer, do not be over-defensive, **do not write AI slop**. Reviewers bias toward *recommending additions*, and that bias has a recognizable slop texture: defensive checks for cases that cannot happen, extra logging, new abstractions used once, comments restating code, tests asserting tautologies, "just-in-case" guards, error handlers for cases the type system already rules out. Reject those. For each surviving finding, ask: would applying it leave the code more sound, correct, AND elegant? Two-out-of-three means look harder for a fix that gets all three before settling. After applying the fixes you accept, re-read your diff and be discerning about what *you just changed*: if any fix turned out to be bloat in context, revert it. Then verify only intended changes are present, no debug artifacts or commented-out code remain, no unrelated files were modified. Then ${commitStep}.`
935
- )}
728
+ Treat what comes back as hypotheses, not directives: verify each against the code before applying, and reject findings that would add ceremony without correctness \u2014 defensive checks for cases that cannot happen, single-use abstractions, comments restating code, tautological tests. After applying what you accept, re-read your own diff and revert anything that turned out to be bloat. Then ${commitStep}.
936
729
 
937
730
  6. **finalize**:
938
731
  - ${finalizeStep} (see *SYSTEM* Git rules if this fails \u2014 prepush errors are usually the repo's tests/lint, not infra timeouts)
@@ -985,7 +778,7 @@ For simple, well-defined tasks, skip the plan phase and go straight to build.`
985
778
  //
986
779
  // Severity categorization is split across two surfaces: the opening
987
780
  // callout (CAUTION/IMPORTANT/ℹ️/✅) sets the review's overall tier, and
988
- // per-bullet emoji prefixes (🚨/⚠️/ℹ️ in prSummaryFormat()) tag
781
+ // per-bullet emoji prefixes (🚨/⚠️/ℹ️ in PR_SUMMARY_FORMAT) tag
989
782
  // individual points inside summary sections — scoping severity to the
990
783
  // specific bullet rather than the whole section keeps a section that
991
784
  // mixes a 🚨 and an ℹ️ from being mislabeled by either of them.
@@ -998,8 +791,9 @@ For simple, well-defined tasks, skip the plan phase and go straight to build.`
998
791
 
999
792
  2. **checkout**: call \`${t("checkout_pr")}\` \u2014 this returns PR metadata, a \`diffPath\`, and a supplemental \`impactPath\` when change-impact extraction is enabled. read the complete raw diff end-to-end, beginning with the TOC and using its file line ranges as your coverage checklist. only after that, use \`impactPath\` as an explicitly incomplete list of reference leads; it never replaces raw-diff reading or establishes coverage.
1000
793
 
1001
- ${byProfile(
1002
- `3. **triage**: orient yourself on the PR \u2014 identify *what kind of thing this is* (domain it touches, seams it crosses, external contracts it depends on, user-facing surfaces it changes). pull as much context as you need to render a confident, well-grounded review: read related files, grep for callers of changed symbols, check tests that exercise the touched paths, fetch related GitHub state. **you are the synthesizer** \u2014 never delegate understanding to subagents.
794
+ 3. **triage**: orient yourself on the PR \u2014 identify *what kind of thing this is* (domain it touches, seams it crosses, external contracts it depends on, user-facing surfaces it changes). pull as much context as you need to render a confident, well-grounded review: read related files, grep for callers of changed symbols, check tests that exercise the touched paths, fetch related GitHub state. **you are the synthesizer** \u2014 never delegate understanding to subagents.
795
+
796
+ when the diff adds or changes a test, check that it can actually fail: a test that would still pass with the bug present is theatre, not coverage. the usual tell is a loose assertion standing where an exact one belongs \u2014 \`>=\` or a truthiness check over an expected value, or a snapshot that absorbs whatever it is handed. read the assertion against the behavior it claims to pin, not against whether it currently passes.
1003
797
 
1004
798
  skip the deeper pass and submit a \`No new issues found.\` review per step 7 only when the diff has **no behavioral surface at all** \u2014 doc typos, whitespace/formatting, lockfile or generated-code regeneration, a mechanical rename whose only effect is import-path updates. line count is not the signal: a one-line change to auth, money, SQL, a comparison operator, a redirect, or a config default is not trivial.
1005
799
 
@@ -1020,80 +814,7 @@ ${byProfile(
1020
814
  - if the question touches third-party API, SDK, or framework contracts, instruct the subagent to verify load-bearing claims via web search and quote source URLs rather than trust training data. action runs are non-interactive \u2014 nobody is in the loop to catch "I'm pretty sure Stripe does X."
1021
815
  - ask for findings with file paths and NEW line numbers from the diff so you can validate and anchor them.
1022
816
 
1023
- delegation discipline: do NOT summarize the PR for them (a lossy summary biases toward a validation frame; the raw diff is the source), do NOT hand them a curated reading list, do NOT pre-shape their output with a finding schema, and do NOT mention the other specialists \u2014 independence is the point, and overlapping findings are a strong signal.`,
1024
- `3. **triage**: orient yourself on the PR \u2014 identify *what kind of thing this is* (domain it touches, seams it crosses, external contracts it depends on, user-facing surfaces it changes). pull as much context as you need to render a confident, well-grounded review: read related files, grep for callers of changed symbols, check tests that exercise the touched paths, fetch related GitHub state. **you are the synthesizer** \u2014 never delegate understanding to subagents.
1025
-
1026
- if the PR is **genuinely trivial**, skip specialists entirely and submit a \`No new issues found.\` review per step 7.
1027
-
1028
- "Genuinely trivial" (skip):
1029
- - single-word doc typo, whitespace/format-only, comment-only across any number of files
1030
- - lockfile or generated-code regeneration (size of diff is irrelevant \u2014 read the *shape*)
1031
- - mechanical rename whose only effect is import-path updates
1032
- - low-risk dep patch bump
1033
-
1034
- "Looks trivial but isn't" (do **NOT** skip \u2014 small diff, big blast radius):
1035
- - any 1-line change to SQL / regex / auth / billing / permission / signature-verification code
1036
- - flipping a feature-flag default, default config value, or retry/timeout constant
1037
- - changing a money/tax/currency/fee constant by any amount
1038
- - changing an HTTP method, redirect URL, response code, or status enum
1039
- - tightening or loosening a comparison operator (\`<\` \u2194 \`<=\`, \`==\` \u2194 \`!=\`)
1040
- - renaming a public API surface (still trivial in shape, but needs an impact lens)
1041
- - adding a new direct dependency (supply-chain surface)
1042
- - any "typo fix" in user-facing copy that changes meaning ("approved" \u2192 "denied")
1043
- - mixed diffs where a semantic 1-liner is buried in whitespace/formatting changes
1044
-
1045
- 4. **specialist decision \u2014 minimum hypothesis coverage**.
1046
-
1047
- After full-diff coverage and triage, identify the load-bearing questions you still cannot resolve confidently yourself. A specialist hypothesis is load-bearing only when its answer could yield an actionable finding that changes the review disposition and warrants independent investigation, and falsifiable only when the specialist can return evidence that supports or refutes it. Generic requests for extra confidence, polish, or "another look" do not qualify.
1048
-
1049
- Route the **minimum number of \`${REVIEWER_AGENT_NAME}\` specialists** needed to cover those unresolved hypotheses. Most reviews need **0 or 1**:
1050
- - dispatch 0 when you can resolve every disposition-changing question directly
1051
- - dispatch 1 when exactly one falsifiable, load-bearing hypothesis warrants independent investigation
1052
- - dispatch 2+ in parallel when multiple orthogonal load-bearing hypotheses remain, or when the user explicitly requests an exhaustive or multi-angle review
1053
-
1054
- **There is NO one-specialist cap or fixed maximum.** Cover every orthogonal load-bearing hypothesis that remains; do not collapse multiple real questions into one broad prompt just to reduce the count. There is also no file-count, line-count, schema, quota, or hard-budget threshold \u2014 diff size is not a proxy for review uncertainty.
1055
-
1056
- The primary reviewer remains responsible for reading the complete raw diff, investigating surrounding code, validating every returned finding, and synthesizing the final review. Specialist reads supplement that work; they never replace it or satisfy the primary's diff-coverage obligation.
1057
-
1058
- Specialist hypotheses can draw on two kinds of framing:
1059
- - **themed lenses** \u2014 a perspective applied across the whole diff (correctness, security, user-journey, performance, etc.).
1060
- - **subsystem lenses** \u2014 a domain-scoped frame for high-stakes subsystems the PR touches (e.g. "the auth lens", "the billing lens", "the schema-migration lens"). **for high-stakes domains, lead with the subsystem lens rather than the generic themed equivalent** \u2014 "billing-subsystem" outperforms "correctness on billing code" because the framing primes the subagent to remember domain-specific failure modes (double-charges, refund races, currency rounding, dispute flows) the generic lens misses.
1061
-
1062
- starter menu for identifying hypotheses (combine, omit, or invent your own; do not dispatch a bare menu label without a falsifiable question):
1063
- - **correctness & invariants** \u2014 bugs, races, error handling, edge cases, state-machine boundaries
1064
- - **impact** \u2014 stale references in code/tests/docs/configs/UI after rename/remove
1065
- - **research-validated assumptions** \u2014 third-party API contracts, SDK semantics, framework directives, version-gated behavior. **only pick when the PR's correctness depends on the contract behaving a specific way** \u2014 not when the API is merely used. The bar is "if the third-party contract differs from what the diff assumes, the PR is incorrect." When dispatched, the subagent must verify load-bearing claims via web search and quote source URLs.
1066
- - **security** \u2014 new endpoints, authZ, input validation, secrets handling, replay/CSRF/injection, cross-tenant isolation
1067
- - **user-journey** \u2014 UX-touching flows: walk through happy path and failure modes as a user
1068
- - **operational readiness** \u2014 observability, alerting, migrations (forward + rollback), feature flags, on-call burden
1069
- - **integration & cross-cutting** \u2014 API contracts between modules, backward-compat of public surfaces, multi-service ordering
1070
- - **test integrity** \u2014 meaningful coverage for the changed behavior; deterministic; no shared-state pollution
1071
- - **performance** \u2014 N+1 queries, hot-path allocation, latency budgets, index coverage
1072
- - **holistic** \u2014 does the PR make sense as a whole? symmetric flows (delete for every create, rollback for every migration)?
1073
- - **subsystem lenses** (invent as the PR demands) \u2014 auth, billing, payments, schema migration, webhooks, secrets, RBAC, multi-tenant isolation, cron/scheduling, etc.
1074
-
1075
- The only subagent type is \`${REVIEWER_AGENT_NAME}\` \u2014 used for lens judgment work ("is this safe / correct / well-tested?"), runs on a mid-tier model.
1076
-
1077
- 5. **dispatch specialists (only if step 4 found unresolved hypotheses)**: dispatch one \`${REVIEWER_AGENT_NAME}\` for one hypothesis. For 2+ hypotheses, emit every Task tool_use block **IN A SINGLE ASSISTANT TURN** before reading any result so the investigations run in parallel rather than serially.
1078
-
1079
- \u2705 Right multi-specialist pattern: one assistant turn with N Task tool_use blocks \u2192 wait \u2192 N results arrive together \u2192 aggregate.
1080
- \u274C Wrong multi-specialist pattern: Task(hypothesis A) \u2192 wait for A \u2192 Task(hypothesis B).
1081
-
1082
- You can also include your own \`read\` / \`grep\` / \`webfetch\` calls in the SAME turn as the parallel \`${REVIEWER_AGENT_NAME}\` dispatches \u2014 concurrent context-pulling on the orchestrator side runs in parallel with the lens fan-out and costs zero extra wall time.
1083
-
1084
- if a specialist errors out, times out, or returns nothing usable, retry it once with the same hypothesis. if it still fails, attempt to resolve the hypothesis yourself; if it remains disposition-changing and unresolved, surface the limitation and do not approve. each specialist gets:
1085
- - **the absolute \`diffPath\` (and \`incrementalDiffPath\` if available) from step 2's \`${t("checkout_pr")}\` return, named verbatim in the dispatch prompt** (e.g. \`diffPath: /tmp/pullfrog-XXXX/pr-NNN-SHA.diff\`). the reviewer's baked-in system prompt selects its FIRST action on this token \u2014 paraphrasing ("review the diff", "look at this PR") sends it down the \`git diff origin/<base>\` fallback, which fails on shallow GHA checkouts. the subagent \`read\`s those files for scope; it must NOT re-derive the diff via \`git diff\` (bare \`git diff origin/<base>\` is symmetric and pulls in the inverse of any commits that landed on \`<base>\` since the branch forked \u2014 pure noise, and the git tool rejects it). reading and codebase exploration are still its job.
1086
- - **exactly one falsifiable hypothesis with explicit scope boundaries** \u2014 ask for evidence that supports or refutes it, never a broad "review for X, Y, and Z" prompt
1087
- - **a Task \`description\` set to a short hypothesis label** (e.g. \`"webhook-replay"\`, \`"billing-rounding"\`) \u2014 the harness reads this field to label the subagent's log lines so parallel runs can be told apart in CI output. without it, every subagent shows up as \`subagent#N\`.
1088
- - if the lens touches external contracts, instruct the subagent to verify load-bearing claims via web search rather than trust training data, and to quote source URLs in its reasoning. action runs are non-interactive \u2014 there's no human in the loop to catch "I'm pretty sure Stripe does X."
1089
- - ask the subagent to report findings with file paths and NEW line numbers from the diff so you can validate and anchor them. you must still read the complete diff yourself.
1090
-
1091
- delegation discipline:
1092
- - do NOT summarize the PR for them (a lossy summary biases toward a validation frame; the raw diff is the source)
1093
- - do NOT hand them a curated reading list (let them discover scope)
1094
- - do NOT pre-shape their output with a finding schema
1095
- - do NOT mention the other lenses (independence is the point \u2014 overlapping findings are a strong signal)`
1096
- )}
817
+ delegation discipline: do NOT summarize the PR for them (a lossy summary biases toward a validation frame; the raw diff is the source), do NOT hand them a curated reading list, do NOT pre-shape their output with a finding schema, and do NOT mention the other specialists \u2014 independence is the point, and overlapping findings are a strong signal.
1097
818
 
1098
819
  6. **aggregate & draft**: when specialist results land, merge findings; de-dup overlaps (two specialists catching the same issue = higher-confidence signal); trace each finding yourself before accepting it. drop praise, style preferences, speculative/unverified claims, findings about pre-existing code unrelated to the PR (heuristic: if the finding's root cause lives in lines this PR added or modified, it's in scope; otherwise drop unless the PR plausibly introduced or amplified the regression), and anything not actionable. also drop **bloat-shaped findings** \u2014 proposed fixes that would add defensive checks for cases that can't happen, abstractions used once, comments restating obvious code, tests asserting tautologies, or "just-in-case" guards. subagents are fallible and bias toward recommending changes; the bar for an actionable inline comment is sound + correct + elegant. recommending a change that improves only one of the three (or worse, degrades elegance to nominally improve correctness) makes the codebase worse, not better.
1099
820
 
@@ -1127,7 +848,7 @@ ${byProfile(
1127
848
  - **no actionable issues**:
1128
849
  \`approved: true\`. Body opens with \`> \u2705 No new issues found.\\n\\n\` followed by the PR summary.
1129
850
 
1130
- ${prSummaryFormat()}`
851
+ ${PR_SUMMARY_FORMAT}`
1131
852
  },
1132
853
  // IncrementalReview shares Review's minimum hypothesis-covering specialist
1133
854
  // routing and body format, scoped to the incremental delta against the
@@ -1161,8 +882,9 @@ ${prSummaryFormat()}`
1161
882
 
1162
883
  The remaining open threads feed step 8's dedup filter \u2014 anything already flagged and unchanged by the new commits should not be re-raised. The rolling PR summary snapshot is the durable record of retire activity; you don't need to surface it in the review body.
1163
884
 
1164
- ${byProfile(
1165
- `5. **triage**: orient on the *incremental* changes \u2014 domain, seams, external contracts, user-facing surfaces. pull as much context as you need to render a confident review: read related files, grep for callers of changed symbols, check tests that exercise the touched paths. **you are the synthesizer.**
885
+ 5. **triage**: orient on the *incremental* changes \u2014 domain, seams, external contracts, user-facing surfaces. pull as much context as you need to render a confident review: read related files, grep for callers of changed symbols, check tests that exercise the touched paths. **you are the synthesizer.**
886
+
887
+ a test added or changed in this delta must be able to fail \u2014 one that would still pass with the bug present is theatre, not coverage. the tell is a loose assertion where an exact one belongs (\`>=\` or a truthiness check over an expected value, a snapshot that absorbs whatever it is handed).
1166
888
 
1167
889
  skip the deeper pass and jump to step 10's non-substantive path (do NOT submit a review) only when the incremental changes have **no behavioral surface at all** \u2014 formatting, comment tweaks, import reordering, lockfile regen, a mechanical rename of import paths. line count is not the signal: a one-line change to auth, money, SQL, a comparison operator, a redirect, or a config default is not trivial.
1168
890
 
@@ -1183,50 +905,7 @@ ${byProfile(
1183
905
  - if the question touches third-party API, SDK, or framework contracts, instruct the subagent to verify load-bearing claims via web search and quote source URLs.
1184
906
  - ask for findings with file paths and NEW line numbers from the full PR diff so you can validate and anchor them.
1185
907
 
1186
- delegation discipline: do NOT summarize the changes for them (a lossy summary biases toward a validation frame; the raw diff is the source), do NOT hand them a curated reading list, do NOT pre-shape their output with a finding schema, and do NOT mention the other specialists \u2014 independence is the point.`,
1187
- `5. **triage**: orient on the *incremental* changes \u2014 domain, seams, external contracts, user-facing surfaces. pull as much context as you need to render a confident review: read related files, grep for callers of changed symbols, check tests that exercise the touched paths. **you are the synthesizer.**
1188
-
1189
- if the incremental changes are **genuinely trivial**, skip specialists entirely and jump to step 10's non-substantive path (do NOT submit a review).
1190
-
1191
- "Genuinely trivial" (skip): formatting/comment tweaks, import reordering, lockfile regen, mechanical rename of import paths, whitespace-only.
1192
- "Looks trivial but isn't" (do NOT skip \u2014 same anti-patterns as Review mode): 1-line changes to SQL/regex/auth/billing/permissions/signature-verification code; flipping feature-flag defaults or retry/timeout constants; money/tax/HTTP-method/redirect changes; tightening or loosening a comparison operator; mixed diffs with a semantic line buried in formatting.
1193
- When unsure, treat as non-trivial.
1194
-
1195
- 6. **specialist decision \u2014 minimum hypothesis coverage**.
1196
-
1197
- After full-diff coverage and triage, identify the load-bearing questions about the incremental changes that you still cannot resolve confidently yourself. A specialist hypothesis is load-bearing only when its answer could yield an actionable new finding that changes the review disposition and warrants independent investigation, and falsifiable only when the specialist can return evidence that supports or refutes it. Generic requests for extra confidence, polish, or "another look" do not qualify.
1198
-
1199
- Route the **minimum number of \`${REVIEWER_AGENT_NAME}\` specialists** needed to cover those unresolved hypotheses. Most incremental reviews need **0 or 1**, especially thread-reply re-reviews:
1200
- - dispatch 0 when you can resolve every disposition-changing question directly
1201
- - dispatch 1 when exactly one falsifiable, load-bearing hypothesis warrants independent investigation
1202
- - dispatch 2+ in parallel when multiple orthogonal load-bearing hypotheses remain, or when the user explicitly requests an exhaustive or multi-angle review
1203
-
1204
- **There is NO one-specialist cap or fixed maximum.** Cover every orthogonal load-bearing hypothesis that remains; do not collapse multiple real questions into one broad prompt just to reduce the count. There is also no file-count, line-count, schema, quota, or hard-budget threshold \u2014 diff size is not a proxy for review uncertainty.
1205
-
1206
- The primary reviewer remains responsible for reading the complete raw full diff plus the incremental diff, investigating surrounding code, validating every returned finding, and synthesizing the final review. Specialist reads supplement that work; they never replace it or satisfy the primary's diff-coverage obligation.
1207
-
1208
- Specialist hypotheses can draw on Review mode's themed or subsystem framings, but every dispatch must turn the framing into one falsifiable question with explicit scope boundaries.
1209
-
1210
- 7. **dispatch specialists (only if step 6 found unresolved hypotheses)**: dispatch one \`${REVIEWER_AGENT_NAME}\` for one hypothesis. For 2+ hypotheses, emit every Task tool_use block **IN A SINGLE ASSISTANT TURN** before reading any result so the investigations run in parallel rather than serially.
1211
-
1212
- \u2705 Right multi-specialist pattern: one assistant turn with N Task tool_use blocks \u2192 wait \u2192 N results arrive together \u2192 aggregate.
1213
- \u274C Wrong multi-specialist pattern: Task(hypothesis A) \u2192 wait for A \u2192 Task(hypothesis B).
1214
-
1215
- You can also include your own \`read\` / \`grep\` / \`webfetch\` calls in the SAME turn as the parallel \`${REVIEWER_AGENT_NAME}\` dispatches.
1216
-
1217
- if a specialist errors out, times out, or returns nothing usable, retry it once with the same hypothesis. if it still fails, attempt to resolve the hypothesis yourself; if it remains disposition-changing and unresolved, surface the limitation and do not approve. each specialist gets:
1218
- - **the absolute diff path(s) from step 2's \`${t("checkout_pr")}\` return, named verbatim in the dispatch prompt.** when \`incrementalDiffPath\` is present, name BOTH (\`incrementalDiffPath: /tmp/.../pr-NNN-SHA-incremental.diff\` then \`diffPath: /tmp/.../pr-NNN-SHA.diff\`) \u2014 the reviewer's baked-in prompt reads incremental first and uses full for context; when only \`diffPath\` exists, name it alone. the subagent \`read\`s those files; it must NOT re-derive via \`git diff\` (bare \`git diff origin/<base>\` is symmetric and pulls in the inverse of base-branch progress \u2014 pure noise, and the git tool rejects it), and paraphrasing ("review the new commits") sends it down that fallback, which also fails on shallow GHA checkouts. do NOT tell them to skip pre-existing issues \u2014 that suppresses regressions the new commits amplified; the "issues must be NEW" filter lives at aggregation time (step 8), not in the subagent prompt.
1219
- - **exactly one falsifiable hypothesis with explicit scope boundaries** \u2014 ask for evidence that supports or refutes it, never a broad "review for X, Y, and Z" prompt
1220
- - **a Task \`description\` set to a short hypothesis label** \u2014 the harness reads this field to label log lines so parallel runs can be told apart.
1221
- - if the lens touches external contracts, instruct the subagent to verify load-bearing claims via web search and quote source URLs.
1222
- - ask the subagent to report findings with file paths and NEW line numbers from the full PR diff so you can validate and anchor them. you must still read the complete incremental and full diff scope yourself.
1223
-
1224
- delegation discipline:
1225
- - do NOT summarize the changes for them (a lossy summary biases toward a validation frame; the raw diff is the source)
1226
- - do NOT hand them a curated reading list (let them discover scope)
1227
- - do NOT pre-shape their output with a finding schema
1228
- - do NOT mention the other lenses (independence is the point)`
1229
- )}
908
+ delegation discipline: do NOT summarize the changes for them (a lossy summary biases toward a validation frame; the raw diff is the source), do NOT hand them a curated reading list, do NOT pre-shape their output with a finding schema, and do NOT mention the other specialists \u2014 independence is the point.
1230
909
 
1231
910
  8. **aggregate, draft, self-critique**: merge findings (yours + output from every specialist you dispatched); de-dup overlaps; trace each finding yourself. drop praise, style preferences, speculative/unverified claims, findings about pre-existing code unrelated to the new commits, anything not actionable, and anything that re-states prior review feedback (heuristic: if the finding's root cause lives in lines the *new commits* added or modified, it's in scope; otherwise drop). also drop **bloat-shaped findings** \u2014 proposed fixes that would add defensive checks for cases that can't happen, abstractions used once, comments restating obvious code, tests asserting tautologies, or "just-in-case" guards. subagents are fallible and bias toward recommending changes; the bar for an actionable inline comment is sound + correct + elegant. recommending a change that improves only one of the three (or degrades elegance to nominally improve correctness) makes the codebase worse, not better. To compute "lines the new commits added or modified": if \`incrementalDiffPath\` from step 2 is present, use it directly. Otherwise, take the prior Pullfrog review's \`commit_id\` (returned alongside each entry from \`${t("list_pull_request_reviews")}\` in step 4) and run \`git diff <prior-review-sha>..HEAD\` to isolate the lines added since that review.
1232
911
 
@@ -1249,7 +928,7 @@ ${byProfile(
1249
928
  - ELSE IF INFORMATIONAL OBSERVATIONS (mergeable as-is, but worth surfacing \u2014 e.g. prior feedback addressed cleanly with one minor stale doc reference, or a noteworthy positive observation): call \`${t("create_pull_request_review")}\` with \`approved: true\`, NO inline comments, and the review body. body opens with \`> \u2705 No new issues found.\\n\\n\` (or similar friendly green opener), followed by the PR summary using the default format below. If a point is concrete enough to anchor to a line, downgrade the whole review to "minor suggestions only" (\`approved: false\`) instead \u2014 the \u2705 signals "no action needed", which contradicts an actionable anchor.
1250
929
  - ELSE IF NO NEW ISSUES, SUBSTANTIVE CHANGES (new functionality, behavior changes, or fixes to prior review feedback): call \`${t("create_pull_request_review")}\` to create a PR review. If all previous reviews have been properly addressed and no new issues were discovered, set \`approved: true\`. body opens with \`> \u2705 No new issues found.\\n\\n\`, followed by the PR summary using the default format below.
1251
930
 
1252
- ${prSummaryFormat()}`
931
+ ${PR_SUMMARY_FORMAT}`
1253
932
  },
1254
933
  {
1255
934
  name: "Plan",
package/dist/modes.d.ts CHANGED
@@ -4,11 +4,6 @@ export interface Mode {
4
4
  description: string;
5
5
  prompt?: string | undefined;
6
6
  }
7
- /**
8
- * Must stay a function, not a const: the profile is chosen from `process.env`
9
- * inside `main()`, long after this module is imported.
10
- */
11
- export declare function prSummaryFormat(): string;
12
7
  export declare function computeModes(agentId: AgentId, signedCommits?: boolean): Mode[];
13
8
  export declare const modes: Mode[];
14
9
  /**
@@ -120,6 +120,7 @@ export interface ToolState {
120
120
  lastProgressBody?: string;
121
121
  wasUpdated?: boolean;
122
122
  finalSummaryWritten?: boolean;
123
+ standaloneCommentId?: number;
123
124
  existingPlanCommentId?: number;
124
125
  previousPlanBody?: string;
125
126
  summaryFilePath?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "pullfrog": "dist/cli.mjs",
@@ -1,19 +0,0 @@
1
- /**
2
- * Which instruction profile a run assembles.
3
- *
4
- * `full` reproduces the prompt as of 2026-07-28 byte-for-byte; `lean` is the cut that trusts the
5
- * model's own judgement instead of enumerating every case. Read from env (not run context) so a
6
- * single deployed build can serve both arms of an A/B.
7
- *
8
- * Anything other than `full` resolves to `lean`, so a typo'd value lands in the treatment arm
9
- * silently — `logRunStartup` prints the RESOLVED arm for exactly that reason.
10
- *
11
- * Prefer driving the arm from the workflow `env:` block over `unsafe_overrides`: the override path
12
- * runs `core.setSecret()` on every applied value (`overrides.ts`), and the runner then
13
- * substring-masks that value everywhere downstream, so `full` turns `successfully` into
14
- * `success***y` and corrupts the very logs an A/B reads.
15
- */
16
- export type PromptProfile = "lean" | "full";
17
- export declare function promptProfile(): PromptProfile;
18
- /** Pick between the two profiles' text. Keeps the branch legible at each cut site. */
19
- export declare function byProfile(lean: string, full: string): string;