Skip to content

docs(#4718): add ADR 0072 for the pre-script skip-flag convention#5016

Open
waynesun09 wants to merge 2 commits into
mainfrom
adr-agent-pre-script-gating
Open

docs(#4718): add ADR 0072 for the pre-script skip-flag convention#5016
waynesun09 wants to merge 2 commits into
mainfrom
adr-agent-pre-script-gating

Conversation

@waynesun09

Copy link
Copy Markdown
Member

Summary

Records the {AGENT}_SKIP_{THING} skip-flag convention introduced by #5013 / fullsend-ai/agents#175, so it's a documented pattern rather than something reviewed from scratch each time an agent needs it.

Related Issue

Relates to #4718 — specifically rh-hemartin's request that every agent gate expensive setup consistently, not just code/fix.

Why now

rh-hemartin pushed back on the env-var mechanism in #4762 before agreeing it was the right approach, and separately asked for it to be applied consistently across agents. Rather than re-litigate the mechanism on every future PR that needs it, this ADR records the decision once: what the flag naming is, which invocation sets it, why it's a different category from ADR 0049's user-facing config vars, and the scope (apply when an agent actually needs workflow-level gating — not retroactively to agents that don't).

Changes

  • docs/ADRs/0072-pre-script-skip-flag-convention.md — new ADR (Accepted)
  • docs/architecture.md — one-bullet addition under "Agent Harness > Decided:", linking the new ADR (per skills/writing-adrs/SKILL.md's living-document update step)

Testing

  • make lint passes (staged), including lint ADR statuses, lint ADR numbers, lint ADR frontmatter, lint markdown links
  • Followed skills/writing-adrs/SKILL.md checklist: scanned docs/ADRs/ on main + open PRs for in-flight numbers (0070 and 0071 both already claimed by other open PRs — used 0072), used the template, matched frontmatter status to the ## Status heading, no leading zeros in the title number

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 15, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:59 PM UTC · Completed 2:09 PM UTC
Commit: 05871a0 · View workflow run →

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Document pre-script skip-flag convention via ADR 0072

📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Add ADR 0072 documenting the {AGENT}_SKIP_{THING} convention for pre-script gating.
• Clarify how skip flags differ from user-facing config env vars in ADR 0049.
• Update architecture docs to reference the new decision under Agent Harness.
Diagram

graph TD
  A["Reusable workflow (inline pre-check)"] --> B["Shared pre-script"] --> C["fullsend run"]
  C --> D["Harness pre_script"] --> B
  D -."sets when redundant".-> E["{AGENT}_SKIP_{THING} env var"]
  A -."sets when redundant".-> E
  F["ADR 0072 (docs)"] --> E
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Extend ADR 0049 instead of creating a new ADR
  • ➕ Keeps all env-var naming guidance in one place
  • ➕ Avoids adding another ADR to navigate
  • ➖ Conflates user-facing config knobs with internal invocation-context signals
  • ➖ Makes ADR 0049 less focused and harder to apply correctly
2. Document only in architecture.md (no ADR)
  • ➕ Lower process overhead than a formal ADR
  • ➕ Quick to scan in the living architecture doc
  • ➖ Loses explicit decision record (context/options/consequences)
  • ➖ Harder to treat as a stable convention across agents over time

Recommendation: Keep this as a dedicated ADR (as done here) and link it from architecture.md. The skip-flag convention is closely related to env vars but meaningfully different from ADR 0049’s user-facing configuration, and the ADR format is the right place to preserve the rationale, wiring guidance, and scoping rules.

Files changed (2) +63 / -0

Documentation (2) +63 / -0
0072-pre-script-skip-flag-convention.mdAdd ADR 0072 defining '{AGENT}_SKIP_{THING}' pre-script skip flags +57/-0

Add ADR 0072 defining '{AGENT}SKIP{THING}' pre-script skip flags

• Introduces an Accepted ADR documenting when and why pre-scripts may need an invocation-context skip flag. Defines naming, wiring guidance (inline workflow vs harness 'runner_env'), scope limitations, and references to related ADRs and PRs.

docs/ADRs/0072-pre-script-skip-flag-convention.md

architecture.mdLink ADR 0072 from Agent Harness decisions +6/-0

Link ADR 0072 from Agent Harness decisions

• Adds a bullet under the Agent Harness 'Decided' section summarizing the pre-script skip-flag convention and linking to ADR 0072.

docs/architecture.md

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@qodo-code-review

qodo-code-review Bot commented Jul 15, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 📜 Skill insights (2)

Context used
✅ Compliance rules (platform): 54 rules

Grey Divider


Action required

1. ADR 0072 lacks context links 📜 Skill insight ⚙ Maintainability
Description
docs/ADRs/0072-pre-script-skip-flag-convention.md has a long Context section that does not link to
any docs/problems/* documents (despite relates_to listing agent-architecture and
agent-infrastructure) and does not cross-reference related ADRs in Context. This makes the ADR
harder to audit and violates the ADR context cross-referencing expectations.
Code

docs/ADRs/0072-pre-script-skip-flag-convention.md[R22-30]

+## Context
+
+An agent's harness `pre_script` runs once, immediately before sandbox creation, inside `fullsend run`. Some reusable workflows also need a fast pre-check *before* that point, to gate expensive setup (GCP credentials, bot identity, agent-env prep) that would otherwise run unconditionally on invalid input or a redundant retry. `reusable-code.yml` and `reusable-fix.yml` both do this today by calling the same pre-script inline, ahead of `fullsend run` — which means the script runs twice per invocation.
+
+Deleting the inline call is not always an option: for `code`, the inline step's `skipped=` output gates four downstream workflow steps that all run *before* `fullsend run` starts, so the check has to happen there. Running the pre-script's full body twice is wasteful at best (redundant tool installs) and unsafe at worst (repeated GitHub API side effects — label creation, issue comments — from the existing-human-PR check) ([fullsend-ai/fullsend#4718](https://github.com/fullsend-ai/fullsend/issues/4718)).
+
+## Options
+
+**Split into two scripts** (a lightweight inline "gate" script plus a harness-only "prepare" script) avoids a control flag and keeps each script single-purpose, but requires two entry points per agent to keep in sync and a bigger diff to introduce. **Env var skip-flag** reuses the single existing script and existing delivery mechanisms (`runner_env` / workflow step `env:`), at the cost of a conditional block inside the script. Chose the flag: smaller surface area, and it follows precedent — [ADR 0049](0049-agent-configuration-env-var-convention.md) already establishes `{AGENT}_{SETTING_NAME}` env vars as the standard way to signal harness-scoped behavior differences.
Relevance

⭐⭐ Medium

Team sometimes requests ADR cross-references (partially accepted in #2663, #2743); no evidence
requiring problem-doc links in Context.

PR-#2663
PR-#2743

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ADR's Context section contains no links to the related problem docs and no related-ADR
cross-reference, while the frontmatter indicates the relevant problem areas and the text references
ADR 0049 outside Context. This violates the checklist requirements that Context links to problem
docs (instead of restating) and that related ADRs are cross-referenced in Context.

docs/ADRs/0072-pre-script-skip-flag-convention.md[22-27]
docs/ADRs/0072-pre-script-skip-flag-convention.md[4-6]
docs/ADRs/0072-pre-script-skip-flag-convention.md[30-30]
docs/problems/agent-architecture.md[1-12]
docs/problems/agent-infrastructure.md[1-16]
Skill: writing-adrs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
ADR 0072's `## Context` section does not link to the relevant problem docs and does not include an explicit cross-reference to related ADRs, even though the ADR declares `relates_to` entries and relies on ADR 0049.

## Issue Context
- The ADR frontmatter lists `relates_to: agent-architecture, agent-infrastructure`, which correspond to existing problem docs under `docs/problems/`.
- The ADR references ADR 0049 elsewhere, but the compliance rule requires related ADR cross-references in the Context section.

## Fix Focus Areas
- docs/ADRs/0072-pre-script-skip-flag-convention.md[22-30]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

2. ADR 0072 breaks template 📜 Skill insight ⚙ Maintainability
Description
ADR 0072 does not follow docs/ADRs/0000-adr-template.md exactly because it adds an extra `##
References` section and omits the template’s standard status-note comment block. This can cause ADR
lint/template checks and consistency expectations to fail.
Code

docs/ADRs/0072-pre-script-skip-flag-convention.md[R51-57]

+## References
+
+- [fullsend-ai/fullsend#4718](https://github.com/fullsend-ai/fullsend/issues/4718) — originating issue
+- [fullsend-ai/fullsend#5013](https://github.com/fullsend-ai/fullsend/pull/5013), [fullsend-ai/agents#175](https://github.com/fullsend-ai/agents/pull/175) — first implementation (`code`, `fix`)
+- [ADR 0049](0049-agent-configuration-env-var-convention.md) — env var naming precedent
+- [ADR 0024](0024-harness-definitions.md), [ADR 0045](0045-forge-portable-harness-schema.md) — `runner_env` / `env.runner` delivery mechanism
+- [ADR 0031](0031-reusable-workflows-for-action-installed-distribution.md) — reusable workflow structure
Relevance

⭐ Low

Template-exactness/extra sections not enforced; adding “References/Implementation” section was
explicitly rejected in ADR review (#2743).

PR-#2743

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The template enumerates the ADR structure and does not include a ## References section, while ADR
0072 adds ## References and does not include the template’s status-note comment block after `##
Status`. This is a direct mismatch with the template requirement.

docs/ADRs/0000-adr-template.md[14-41]
docs/ADRs/0072-pre-script-skip-flag-convention.md[18-23]
docs/ADRs/0072-pre-script-skip-flag-convention.md[51-57]
Skill: writing-adrs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
ADR 0072 deviates from the required ADR template by adding a non-template `## References` section and not including the template’s standard status-note comment block.

## Issue Context
The compliance checklist requires ADRs to follow `docs/ADRs/0000-adr-template.md` exactly.

## Fix Focus Areas
- docs/ADRs/0072-pre-script-skip-flag-convention.md[18-23]
- docs/ADRs/0072-pre-script-skip-flag-convention.md[51-57]
- docs/ADRs/0000-adr-template.md[14-41]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines +22 to +30
## Context

An agent's harness `pre_script` runs once, immediately before sandbox creation, inside `fullsend run`. Some reusable workflows also need a fast pre-check *before* that point, to gate expensive setup (GCP credentials, bot identity, agent-env prep) that would otherwise run unconditionally on invalid input or a redundant retry. `reusable-code.yml` and `reusable-fix.yml` both do this today by calling the same pre-script inline, ahead of `fullsend run` — which means the script runs twice per invocation.

Deleting the inline call is not always an option: for `code`, the inline step's `skipped=` output gates four downstream workflow steps that all run *before* `fullsend run` starts, so the check has to happen there. Running the pre-script's full body twice is wasteful at best (redundant tool installs) and unsafe at worst (repeated GitHub API side effects — label creation, issue comments — from the existing-human-PR check) ([fullsend-ai/fullsend#4718](https://github.com/fullsend-ai/fullsend/issues/4718)).

## Options

**Split into two scripts** (a lightweight inline "gate" script plus a harness-only "prepare" script) avoids a control flag and keeps each script single-purpose, but requires two entry points per agent to keep in sync and a bigger diff to introduce. **Env var skip-flag** reuses the single existing script and existing delivery mechanisms (`runner_env` / workflow step `env:`), at the cost of a conditional block inside the script. Chose the flag: smaller surface area, and it follows precedent — [ADR 0049](0049-agent-configuration-env-var-convention.md) already establishes `{AGENT}_{SETTING_NAME}` env vars as the standard way to signal harness-scoped behavior differences.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Adr 0072 lacks context links 📜 Skill insight ⚙ Maintainability

docs/ADRs/0072-pre-script-skip-flag-convention.md has a long Context section that does not link to
any docs/problems/* documents (despite relates_to listing agent-architecture and
agent-infrastructure) and does not cross-reference related ADRs in Context. This makes the ADR
harder to audit and violates the ADR context cross-referencing expectations.
Agent Prompt
## Issue description
ADR 0072's `## Context` section does not link to the relevant problem docs and does not include an explicit cross-reference to related ADRs, even though the ADR declares `relates_to` entries and relies on ADR 0049.

## Issue Context
- The ADR frontmatter lists `relates_to: agent-architecture, agent-infrastructure`, which correspond to existing problem docs under `docs/problems/`.
- The ADR references ADR 0049 elsewhere, but the compliance rule requires related ADR cross-references in the Context section.

## Fix Focus Areas
- docs/ADRs/0072-pre-script-skip-flag-convention.md[22-30]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review of #5016 — ADR 0072: pre-script skip-flag convention

Verdict: approve · 1 low finding

Summary

Clean docs-only ADR recording the {AGENT}_SKIP_{THING} skip-flag convention. The second commit addresses the prior review's finding — ADR 0055 is now properly cross-referenced and runner_env is contextualized as legacy. The ADR is well-structured, internally consistent, and correctly scoped.

What was checked

Dimension Result
Correctness ✅ All referenced ADRs (0024, 0031, 0045, 0049, 0055) verified against source. {AGENT}_SKIP_{THING} naming correctly follows ADR 0049's {AGENT}_{SETTING_NAME} syntax. Claims about code and fix agent skip-flag usage verified against reusable-code.yml and reusable-fix.yml. One minor factual inaccuracy in the Context section (see finding below).
Security ✅ No findings — clean docs-only change. No secrets, injection vectors, Unicode steganography, or permission changes.
Intent & coherence ✅ Traces to #4718. Scope matches: one new ADR + one architecture.md bullet. ADR number 0072 is correct (0070 is highest on main; 0071 claimed by open PR). Status is Accepted (correct for a new ADR per AGENTS.md). relates_to references valid problem docs. PR title follows COMMITS.md (docs type).
Style & conventions ✅ Frontmatter structure, section ordering, heading format, and relative link format match recent peer ADRs (0066–0070). The architecture.md bullet matches surrounding formatting.
Docs currency ✅ architecture.md updated in the correct section (Agent Harness > Decided). VitePress ADRs sidebar uses getMarkdownFiles() — auto-discovered, no config change needed. Prior review finding (ADR 0055 reference) addressed in second commit.
Cross-repo contracts ⏭ Skipped — no APIs, schemas, or exported interfaces modified.

Prior review finding status

Finding Status
Missing ADR 0055 reference for env.runner delivery mechanism (low) Addressed — second commit adds ADR 0055 cross-reference in both the Decision section ("runner_env on harnesses not yet migrated per ADR 0055") and the References section.

Findings

1. Context section overstates which gated steps run before fullsend run · low

File: docs/ADRs/0072-pre-script-skip-flag-convention.md (Context section)

The Context section states: "the inline step's skipped= output gates four downstream workflow steps that all run before fullsend run starts." In reusable-code.yml, the four gated steps are: (1) Setup GCP (line 167), (2) Resolve bot identity (line 175), (3) Setup agent environment (line 191), and (4) Run code agent (line 201). Step 4 is fullsend run — it does not run "before fullsend run starts." Only three of the four gated steps run before it; the fourth is the invocation itself.

The ADR's conclusion is still correct — the inline call cannot be removed because its skipped= output gates all four steps, including fullsend run itself. The imprecision is in characterizing all four as running "before" fullsend run.

Suggested follow-up: Rephrase to something like: "gates four downstream workflow steps — three setup steps and the fullsend run invocation itself — so the check has to happen there."

This is not blocking — the decision logic is unaffected.


Reviewed: 2026-07-16 · Re-review of 05871a092318d7 · Dimensions: correctness (opus), security (opus), intent (sonnet), style (sonnet), docs (sonnet) · Challenger pass: orchestrator


Labels: PR adds a new ADR documenting a harness pre-script convention and updates docs/architecture.md

Previous run

Review of #5016 — ADR 0072: pre-script skip-flag convention

Verdict: approve · 1 low finding

Summary

Well-structured ADR that records the {AGENT}_SKIP_{THING} skip-flag convention for pre-scripts that run in both inline (reusable workflow) and harness pre_script contexts. The decision is clear, the scope is well-defined, and the ADR correctly differentiates skip flags from ADR 0049's user-facing config vars.

What was checked

Dimension Result
Correctness ✅ Internal logic is consistent. The {AGENT}_SKIP_{THING} naming genuinely follows ADR 0049's {AGENT}_{SETTING_NAME} syntax. All referenced ADRs (0024, 0031, 0045, 0049) exist. The code/fix examples correctly illustrate the "whichever invocation the pipeline depends on keeps default behavior" principle.
Security ✅ No findings — clean docs-only change. No secrets, injection vectors, or permission changes.
Intent & coherence ✅ Traces to #4718. Scope matches: one new ADR + one architecture.md bullet. ADR number 0072 is correct (0069 is highest on main; 0070–0071 claimed by open PRs). Status is Accepted (correct for a new ADR per AGENTS.md). relates_to references valid problem docs. PR title follows COMMITS.md (docs type).
Style & conventions ✅ Frontmatter structure, section ordering, and relative link format match recent peer ADRs (0067–0069). The architecture.md bullet matches surrounding formatting (no period before the ADR parenthetical, consistent with all other bullets in the section).
Docs currency ✅ architecture.md updated in the correct section (Agent Harness > Decided). VitePress ADRs sidebar uses getMarkdownFiles() — auto-discovered, no config change needed.
Cross-repo contracts ⏭ Skipped — no APIs, schemas, or exported interfaces modified.

Findings

1. Missing ADR 0055 reference for env.runner delivery mechanism · low

File: docs/ADRs/0072-pre-script-skip-flag-convention.md (References section)

The References section credits ADR 0024 and ADR 0045 for "runner_env / env.runner delivery mechanism," but env.runner was introduced by ADR 0055 (which deprecated runner_env). ADR 0024 defines runner_env; ADR 0045 defines the forge-portable schema — neither defines env.runner.

The architecture.md bullet for ADR 0055 (lines 112–116) sits directly above the new ADR 0072 bullet, so readers navigating from architecture.md have the deprecation context. However, readers arriving at the ADR directly would benefit from the reference.

Suggested follow-up: Add [ADR 0055](0055-unified-env-var-delivery.md) to the References line, e.g.:

- [ADR 0024](...), [ADR 0045](...), [ADR 0055](...) — `runner_env` (deprecated) / `env.runner` delivery mechanism

This is not blocking — the surrounding context in architecture.md and ADR 0049 already clarifies the deprecation.


Reviewed: 2026-07-15 · Dimensions: correctness (opus), security (opus), intent (sonnet), style (sonnet), docs (sonnet) · Challenger pass: opus


Labels: PR adds a new ADR documenting a harness pre-script convention and updates docs/architecture.md

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge component/docs User-facing documentation component/harness Agent harness, config, and skills loading labels Jul 15, 2026
waynesun09 added a commit that referenced this pull request Jul 15, 2026
Two fixes from ADR review of #5016:

- Cross-reference ADR 0055 (unified env var delivery, deprecates
  runner_env in favor of env.runner/env.sandbox) instead of naming
  runner_env and env.runner as interchangeable options with no
  guidance on which to prefer.
- Correct a Consequences bullet that implied removing the inline
  call only needs fullsend run to surface pre-script outputs earlier
  — Context already establishes the steps it gates run in an earlier
  workflow step position, so that alone wouldn't be sufficient;
  actually reordering those steps would be required too.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
Records the pattern introduced in #5013/fullsend-ai/agents#175 so the
next agent that needs to gate expensive workflow setup behind a fast
pre-check (per rh-hemartin's request for consistency across agents,
one: an {AGENT}_SKIP_{THING} env var, set on whichever of the two
pre-script call sites should skip the redundant/expensive part.

Distinguishes this from ADR 0049's agent-configuration env vars —
same {AGENT}_{SETTING} syntax, but an internal invocation-context
signal rather than a user-facing behavioral knob, so it belongs in
script/harness comments, not docs/agents/<agent>.md.

Scopes the decision to agents that actually need workflow-level
gating (code, fix today) rather than mandating it retroactively for
agents that don't currently duplicate pre-script execution.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
Two fixes from ADR review of #5016:

- Cross-reference ADR 0055 (unified env var delivery, deprecates
  runner_env in favor of env.runner/env.sandbox) instead of naming
  runner_env and env.runner as interchangeable options with no
  guidance on which to prefer.
- Correct a Consequences bullet that implied removing the inline
  call only needs fullsend run to surface pre-script outputs earlier
  — Context already establishes the steps it gates run in an earlier
  workflow step position, so that alone wouldn't be sufficient;
  actually reordering those steps would be required too.

Assisted-by: Claude
Signed-off-by: Wayne Sun <gsun@redhat.com>
@waynesun09
waynesun09 force-pushed the adr-agent-pre-script-gating branch from 69151a9 to 92318d7 Compare July 16, 2026 21:39
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 16, 2026

Copy link
Copy Markdown

🤖 Review · ❌ Terminated · Started 9:40 PM UTC · Ended 9:50 PM UTC
Commit: 12bd957 · View workflow run →

@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://0aac9916-site.fullsend-ai.workers.dev

Commit: 92318d71cddeb5a8206d36cb68e14f3e04da5de9


## Status

Accepted

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] factual-inaccuracy

Context section states the inline step gates four downstream workflow steps that all run before fullsend run starts. In reusable-code.yml, the fourth gated step (Run code agent, line 201) IS fullsend run — only three of the four steps run before it. The conclusion (inline call cannot be removed) remains correct.

Suggested fix: Rephrase to: gates four downstream workflow steps — three setup steps and the fullsend run invocation itself — so the check has to happen there.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge and removed ready-for-merge All reviewers approved — ready to merge labels Jul 16, 2026
## Context

An agent's harness `pre_script` runs once, immediately before sandbox creation, inside `fullsend run`. Some reusable workflows also need a fast pre-check *before* that point, to gate expensive setup (GCP credentials, bot identity, agent-env prep) that would otherwise run unconditionally on invalid input or a redundant retry. `reusable-code.yml` and `reusable-fix.yml` both do this today by calling the same pre-script inline, ahead of `fullsend run` — which means the script runs twice per invocation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current approach seems to put too much functionality into the GH workflow - this makes it harder to port to other platforms or into the generic "harness-trigger" flow.

We need to consider moving all the dowstream steps into the pre script itself or otherwise into functionality in fullsend run.


## Options

**Split into two scripts** (a lightweight inline "gate" script plus a harness-only "prepare" script) avoids a control flag and keeps each script single-purpose, but requires two entry points per agent to keep in sync and a bigger diff to introduce. **Env var skip-flag** reuses the single existing script and existing delivery mechanisms (`runner_env` / workflow step `env:`), at the cost of a conditional block inside the script. Chose the flag: smaller surface area, and it follows precedent — [ADR 0049](0049-agent-configuration-env-var-convention.md) already establishes `{AGENT}_{SETTING_NAME}` env vars as the standard way to signal harness-scoped behavior differences.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is mixing all the options and decisions into a single dense paragraph, break it apart please - give each option its own paragraph and put the decision and the reasons for it in the decision section where it belongs.


When a pre-script must run in two contexts that need different subsets of its behavior — an inline reusable-workflow step needing only a fast, gating subset, and the harness `pre_script` invocation needing the full script — gate the part that must run exactly once behind a dedicated env var, rather than deleting either call site.

**Naming:** `{AGENT}_SKIP_{THING}`, following [ADR 0049](0049-agent-configuration-env-var-convention.md)'s `{AGENT}_{SETTING_NAME}` syntax. Examples: `CODE_SKIP_EXISTING_PR_CHECK`, `FIX_SKIP_TOOL_INSTALL`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If, while considering environment portability, we still decide that we want to run the script twice and pass varaibles between the two times, then we need to specify the mechanism by which the variables are set (hard-coding this in the workflow YAML is not portable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/docs User-facing documentation component/harness Agent harness, config, and skills loading ready-for-merge All reviewers approved — ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants