From c58390c168288596d6eb97f126f3bf9623403c25 Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Sun, 11 Oct 2026 00:35:16 +0100 Subject: [PATCH] GH#34296: fix(lint): resolve headless prompt defaults from agents root for deployed bundles --- .agents/scripts/prompt-command-policy-lint.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.agents/scripts/prompt-command-policy-lint.py b/.agents/scripts/prompt-command-policy-lint.py index 8d0ab3dbaf..083a19aa6a 100644 --- a/.agents/scripts/prompt-command-policy-lint.py +++ b/.agents/scripts/prompt-command-policy-lint.py @@ -14,12 +14,15 @@ from typing import Iterator SCRIPT_DIR = Path(__file__).resolve().parent -REPO_ROOT = SCRIPT_DIR.parent.parent +# The agents root is `.agents/` in a source checkout and `agents/` in a +# deployed runtime bundle; resolve defaults from it, like --policy (GH#34296). +AGENTS_DIR = SCRIPT_DIR.parent +REPO_ROOT = AGENTS_DIR.parent # Proven headless OpenCode entry points: pulse-wrapper-cycle.sh launches these. # Do not expand this list to interactive documentation without execution evidence. HEADLESS_PROMPTS = ( - ".agents/workflows/pulse.md", - ".agents/workflows/pulse-sweep.md", + "workflows/pulse.md", + "workflows/pulse-sweep.md", ) FENCE = re.compile(r"^ {0,3}(`{3,}|~{3,})(.*)$") @@ -112,10 +115,10 @@ def main() -> int: ) parser.add_argument( "--policy", type=Path, - default=SCRIPT_DIR.parent / "configs/command-policy.json", + default=AGENTS_DIR / "configs/command-policy.json", ) args = parser.parse_args() - files = args.files or [REPO_ROOT / name for name in HEADLESS_PROMPTS] + files = args.files or [AGENTS_DIR / name for name in HEADLESS_PROMPTS] passed = True for path in files: try: