Skip to content

[#1052 C+E] dev-lead prompt guardrail (no undeclared channel-stub input forward) + codify in AGENTS.md & org ci-standards #1254

Closed

Description

@don-petry

Split 2 of 4 of #1052 (channel-skew prevention). Parts C + E — encode the rule so the agent stops at the source and the standard is codified org-wide. Independent of the CI-guard scripts (no lint.yml / script overlap), so it runs in parallel with Part A (#1253).

Part C — dev-lead prompt guardrail + sequencing

  • Mirror the existing "never SHA-pin a first-party channel ref" guardrail (prompts/dev-lead/*.md, guarded by tests/dev-lead/unit/test_channel_ref_guardrail.bats): add to the feedback/implementation prompts an explicit rule — never add or modify a with: forward on a channel-pinned caller stub to pass an input the pinned channel does not yet declare.
  • Encode the sequencing for a new workflow_call input: (1) land it in the reusable, (2) promote the pinned channel via cut-release.sh --channel to a commit that declares it, then (3) teach the stub to forward it.
  • Add a bats guard (tests/dev-lead/unit/test_channel_stub_forward_guardrail.bats) asserting the text is present in the relevant prompts.

Part E — codify the standards (REQUIRED)

  • AGENTS.md (this repo): extend the "Release channel tags & the mutable-ref exception" section with a new subsection — "Caller-stub input forwarding across channel pins" — stating the rule and the input-change sequencing, cross-referencing the Part A guard. Cross-reference it from the "Workflow Files" thin-caller-stub bullets.
  • Org-wide standard petry-projects/.github/standards/ci-standards.md: add the canonical org rule so it applies to all consumer repos. If editing petry-projects/.github is outside this task's write scope, open a companion PR/issue against petry-projects/.github and link it here — do not silently drop the org-standard update.

Acceptance

  • Prompt guardrail present + bats guard green; AGENTS.md updated; standards/ci-standards.md updated or a linked companion PR against petry-projects/.github.

Parent: #1052.

Activity

  1. don-petry commented on Jul 15, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead Implementation Plan

    Issue: #1254 — [#1052 C+E] dev-lead prompt guardrail (no undeclared channel-stub input forward) + codify in AGENTS.md & org ci-standards

    Scope

    Add a dev-lead prompt guardrail forbidding the agent from adding/modifying a with: forward on a channel-pinned caller stub to pass an input the pinned channel does not yet declare (with the correct land→promote→forward sequencing), and codify the rule in AGENTS.md + org ci-standards.

    Implementation Checklist (Part C)

    • tests/dev-lead/unit/test_channel_stub_forward_guardrail.bats — new bats guard (written first, red)
    • prompts/dev-lead/fix-reviews.md — add guardrail blockquote
    • prompts/dev-lead/review-changes.md — add guardrail blockquote
    • prompts/dev-lead/fix-bot-comment.md — add guardrail blockquote
    • prompts/dev-lead/on-mention.md — add guardrail blockquote
    • prompts/dev-lead/fix-issue.md — add guardrail blockquote (implementation prompt)
    • prompts/dev-lead/fix-ci.md — add guardrail blockquote (implementation/remediation prompt)

    Implementation Checklist (Part E)

    Tests to Write

    • Guardrail text present in every relevant prompt
    • Guardrail names the land→promote→forward sequencing and cut-release.sh --channel
    • Guardrail cites the AGENTS.md mutable-ref exception section

    Test Command

    bats tests/dev-lead/unit/ (also bash .dev-lead/scripts/dev-lead-lint.sh + shellcheck scripts/*.sh)

  2. don-petry commented on Jul 15, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: Implementation Complete

    Plan Execution

    • Part C — new bats guard tests/dev-lead/unit/test_channel_stub_forward_guardrail.bats (written red-first)
    • Part C — guardrail + land→promote→forward sequencing added to the feedback/implementation prompts
    • Part E — AGENTS.md: new subsection "Caller-stub input forwarding across channel pins" + cross-refs from the thin-caller-stub bullets
    • Part E — org standard: linked companion issue opened (editing petry-projects/.github is outside this run's write scope)

    New guard test output

    1..3
    ok 1 channel-stub-forward guardrail: present in every relevant prompt (#1254)
    ok 2 channel-stub-forward guardrail: names the land -> promote -> forward sequencing (#1254)
    ok 3 channel-stub-forward guardrail: cross-references the AGENTS.md subsection (#1254)
    

    Verification

    • bats tests/dev-lead/unit/ — 642 pass. One unrelated failure (test_engine_mcp.bats:360, an MCP debug-handshake test) reproduces on a clean tree with all my changes stashed → pre-existing/environmental, not a regression from this markdown-only change.
    • bash .dev-lead/scripts/dev-lead-lint.sh — all checks passed (shellcheck on 86 files + 4 agent profiles + CODEOWNERS).
    • tests/dev-lead/integration/test_prompt_coverage.sh — PASS (all prompt variable declarations valid).

    Files Changed

    • tests/dev-lead/unit/test_channel_stub_forward_guardrail.bats (new): asserts the guardrail text, the cut-release.sh --channel sequencing, and the AGENTS.md subsection cross-ref are present in all 6 relevant prompts.
    • prompts/dev-lead/{fix-issue,fix-ci,fix-reviews,review-changes,fix-bot-comment,on-mention}.md: added the "never forward an undeclared input across a channel pin" guardrail + 3-step sequencing.
    • AGENTS.md: new subsection under "Release channel tags & the mutable-ref exception" (rule + sequencing + Part A guard [#1052 A] CI guard: forwarded caller inputs ⊆ declared inputs at the pinned @ref (+ #1034 regression) #1253 cross-ref + promotion pointer); cross-referenced from the dev-lead.yml and auto-rebase.yml thin-caller-stub bullets.

    Org-standard companion (Part E)

    Editing petry-projects/.github/standards/ci-standards.md is outside this dev-lead run's write scope (only this repo's branch is committed by CI), so the org-wide rule is tracked in a linked companion issue — not silently dropped:

    Notes

  3. added a commit that references this issue on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-leadFor dev-lead agent pickupenhancementFeature requests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions