Skip to content

fix(agents): shorten branch-plan-task description to invocation scope - #1995

Merged
tvna merged 4 commits into
mainfrom
claude/focused-fermat-c18ox6
Sep 13, 2026
Merged

fix(agents): shorten branch-plan-task description to invocation scope#1995
tvna merged 4 commits into
mainfrom
claude/focused-fermat-c18ox6

Conversation

@tvna

@tvna tvna commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

Shortens agents/branch-plan-task.md's frontmatter description to
invocation-scope content only, fixing the 102-character YAML plain-scalar
truncation tracked in #1982.

Facts

Assumptions

Risk / blast radius

  • User-visible: the shortened description is what every consumer of the
    gitapex:branch-plan-task / branch-plan-task agent-type listing sees
    from now on (Claude Code and, via the sync generator, OpenCode).
    Intentional, not incidental.
  • No behavior change: nothing in agents/branch-plan-task.md's body,
    tool restrictions, or Sanctioned call sites list changes -- only the
    frontmatter summary text (plus documentation fixes from two Step 8
    review rounds, see Execution log).

Rollback

git revert the merge commit(s) -- single-line/small text changes, exact
prior text restored, no follow-up steps needed.

Verification

Acceptance Criteria Map (from #1982, "Decided approach" section):

Criterion Interpretation Planned ops Proof method Residual risk
description must contain only "when invoked" content Keep "what it is + the two sanctioned call sites"; delete the rationale clause and the negative-constraint clause Replace agents/branch-plan-task.md line 3 description value YAML round-trip: parsed description == raw text, no # present -- PASS, confirmed against the merged commit (256/256 chars, no #) #1982's unaudited skills/*/SKILL.md frontmatter risk is unchanged; hooks/gitapex_sync_opencode.py out of scope, unaffected

Commands run against the current head commit (72af1888):

$ python3 -c "import yaml; ..."   # round-trip check: raw==parsed==256, no '#' -- PASS
$ uv run --frozen python3 -m pytest tests/test_gitapex_sync_opencode.py -q
31 passed
$ uv run --frozen python3 -m ruff check tests/test_gitapex_sync_opencode.py agents/branch-plan-task.md docs/gitapex/plans/2026-09-13-claude-focused-fermat-c18ox6.md
All checks passed!
$ uv run --frozen python3 .github/scripts/gitapex_gate_local_preflight.py
local preflight: all 49 wired gate(s) passed.
$ uv run --frozen python3 .github/scripts/gitapex_gate_behind_base.py
OK: up to date with origin/main (4 commit(s) ahead).

Full repo suite also run in the dispatched task's own worktree before merge: uv run --frozen python3 -m pytest --no-cov -q -- 9161 passed. CI on the current head: all 34 checks green except independent-review-pending (this section is what satisfies it).

Checklist

  • Tests pass locally
  • Docs updated if behavior changed -- N/A, frontmatter-only change, no docs describe this description's exact wording
  • Issue number cited in every commit
  • If this PR adds/modifies a skills/*/SKILL.md, a docs/superpowers/specs/*.md design doc, a security-relevant skill, or a deterministic checker script (skills/*/scripts/*.py, evals/scripts/*.py, .github/scripts/*.py), a ## Skill audit evidence section discloses the required verdicts/waivers -- N/A, no such file touched
  • If this PR adds a new Kept-edit-log entry to any evals/*/split.md, that entry discloses a Transfer check line -- N/A
  • If this PR adds or increases a skills/*/SKILL.md's Stop-boundary bullets or named dispatch branches, evals/<skill>/tasks/*.yaml gained at least as many new fixtures -- N/A

Merge gate: independent review

This PR is also subject to the independent-review-pending required
status check (see .github/workflows/independent-review-pending.yml /
.github/scripts/gitapex_gate_independent_review_pending.py). It stays
pending/failing until a ## Independent review verdict section naming
this PR's current head commit is recorded in this body --
drafting-a-pr-to-merge's own Step 8 records it once its independent
review completes. There is nothing for you to do here now: do not
pre-fill this section yourself, and do not remove this note.

Independent review verdict

  • Verdict: CLEAN
  • Verified commit: 72af188

Outer layer (GitHub-native reviewer): requested a GitHub Copilot review
via request_copilot_review (no confirmation this repository has Copilot
review enabled -- no reviewer entry appeared in get_reviews afterward).
Disclosed per this skill's own asymmetric-guarantee note: Copilot's
review, if it runs, is Comment-only with no pass/fail signal of its own,
weaker than the "Claude Code Review" App's severity summary; this
repository's own installation of that App was not confirmed by the
operator, so it was not used. Not waited for; no response has arrived.

Inner layer: a fresh reviewing-an-artifact pass (effort: low), since
this PR's own Execution log carries no TaskCompleted entry matching
this exact head SHA with a run_id. Ran a 5-axis fan-out (correctness,
blast-radius, reuse-and-simplification, convention, security) against
the diff at head 7cd6436241ae936cee48c8cd5f6c4d4fd2f389ef:

  • Correctness: 1 confirmed finding -- the plan doc's "No other line in
    the file changes" claim was false (a Step 8 follow-up fix also
    changed the file body). Fixed in 72af1888.
  • Blast-radius: 2 findings. (a) Confirmed -- the plan doc's "already
    appears... (line 53)" claim overclaimed what was actually preserved
    and where. Fixed in 72af1888. (b) .claude/agents/branch-plan-task.md
    (a separate, intentionally-maintained project-local deployment
    variant) carries the identical #1476 truncation hazard. Not a
    defect in this diff -- pre-existing, out of issue fix(agents): branch-plan-task's description is truncated 102 characters by a YAML plain-scalar comment marker #1982's own scope,
    and already disclosed in this PR's Residual risk section; a new,
    separate issue is being filed for it rather than folding it in here.
  • Reuse-and-simplification: no confirmed findings (two low-confidence
    cosmetic notes, below the low-effort confidence bar).
  • Convention: 1 confirmed finding -- the plan doc's filename did not
    follow the documented docs/gitapex/plans/<date>-<branch-name>.md
    shape. Fixed in 72af1888 (renamed to
    2026-09-13-claude-focused-fermat-c18ox6.md).
  • Security: 0 confirmed findings. 1 disclosed unconfirmed-concern
    (security-tier, reported per this skill's own unconditional rule
    regardless of confidence): shortening the description reduces
    at-a-glance visibility into this deployment variant's weaker
    (prompt-only, no embedded hook) enforcement posture for a downstream
    reader who only skims the description: field. The full caveat
    remains intact in this same file's own body and cross-referenced
    correctly (see the correctness/blast-radius fixes above); this is a
    knowingly-accepted trade-off per the issue author's own recorded
    "Decided approach", not a new gap this diff introduces.

All three confirmed findings above were fixed and verified (ruff,
ASCII-only scan, plans-traceability CI check, and re-grep for stale
references) in commit 72af1888, the PR's current head. Step 1
re-classified the incremental fix diff (7cd64362 to 72af1888, prose
and a rename only, no code, no security-tier signal) as safe, per this
skill's own Step 1 rule -- no further fan-out was run against it.

Zero confirmed findings stand against the current head. The disclosed
unconfirmed-concern and the out-of-scope sibling-file observation are
recorded above rather than silently dropped, per this skill's own
never-silently-fold rule, but do not block this outcome.

Execution log

  • PlanApproved -- Branch Plan and ACM for fix(agents): branch-plan-task's description is truncated 102 characters by a YAML plain-scalar comment marker #1982 approved in-session by
    the issue author/repo OWNER (2026-09-13). Re-verification marker
    recorded on fix(agents): branch-plan-task's description is truncated 102 characters by a YAML plain-scalar comment marker #1982.
  • TaskStarted -- task-1-shorten-branch-plan-task-description dispatched
    to a worktree-isolated branch-plan-task subagent (2026-09-13).
  • Screening: gitapex_check_canonical_governance_paths.py returned
    no-match (needs full-diff review); review-persona ran
    screening-a-low-trust-contribution checks 2-8 -- checks 2, 4-8 PASS;
    check 3 hard-flagged (diff modifies the governance/trust-anchor file
    agents/branch-plan-task.md) by that check's own unconditional design.
    Commit-message provenance scan: PASS (1 commit, clean).
  • Human escalation per Step 7's failure-dispatch rule for a screening
    flag: presented the flag plus the fact the diff exactly matches the
    issue-author/repo-OWNER's own already-approved 256-char text; the
    owner confirmed proceeding with the merge in-session (2026-09-13).
  • TaskCompleted -- task commit 7d10be52 cherry-picked onto the shared
    branch as 59fc3f14 and pushed. origin/main drift check: clean.
  • Step 8 refactor/simplify pass (branch-plan-task, worktree-isolated):
    no behavior-preserving simplification needed; flagged one
    behavior-affecting finding out of its own scope (see next line).
  • Step 8 independent adversarial review (review-persona): 2 findings.
    (1) agents/branch-plan-task.md line 74 pointed to "the reference
    cited above", but that citation was the exact clause this PR's
    description edit removed -- a dangling pointer. Fixed: now cites
    skills/executing-a-branch-plan/references/threat-model-and-authorization.md
    explicitly. (2) tests/test_gitapex_sync_opencode.py's docstring still
    described the truncation defect as present/tracked-separately; updated
    to past tense since this PR fixes it. Both fixed in commit 7cd64362,
    pushed; origin/main drift re-checked clean after the fix round.
    (3) A third, out-of-scope observation: .claude/agents/branch-plan-task.md
    (a separate, intentionally-maintained project-local deployment variant
    carrying its own embedded enforcement hooks) has the identical #1476
    truncation hazard in its own description. Confirmed with the repo
    owner in-session that the two files are deliberately different
    variants, not duplicates, and that this is real but out of fix(agents): branch-plan-task's description is truncated 102 characters by a YAML plain-scalar comment marker #1982's
    scope -- routed to a new, separate issue rather than folded into this
    PR.
  • StageCompleted -- Step 8 clean (both confirmed findings fixed and
    verified), marking this PR ready for review.
  • drafting-a-pr-to-merge Step 8: fresh reviewing-an-artifact pass
    (5-axis, low effort) against head 7cd64362 found 3 more confirmed
    findings and 1 disclosed unconfirmed-concern (see Independent review
    verdict above); all 3 confirmed findings fixed and pushed as
    72af1888. origin/main drift re-checked clean.

Related Issue

Closes #1982

Adds the executing-a-branch-plan Task Decomposition doc for the
single-task fix (shorten agents/branch-plan-task.md's frontmatter
description to invocation-scope content only).

Fixes #1982
@tvna
tvna deployed to ruleset-verify September 13, 2026 15:44 — with GitHub Actions Active
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: d0d18f75-848a-43b5-8c06-0aa18e2f5cff


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

tvna commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

The independent-review-pending check failing right now is expected, not a defect.

This PR is still under active execution by the executing-a-branch-plan skill (see the branch-plan-executing label) for #1982. Per the "Merge gate: independent review" note already in this PR's body, that check stays pending/failing until this skill's own Step 8 mandatory refactor/adversarial-review pass completes and records a ## Independent review verdict section here. No action needed on this check until then; it will resolve once Step 8/9 land.


Generated by Claude Code

@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.57%. Comparing base (9838da1) to head (72af188).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1995   +/-   ##
=======================================
  Coverage   99.57%   99.57%           
=======================================
  Files         171      171           
  Lines       29071    29071           
  Branches     3558     3558           
=======================================
  Hits        28948    28948           
  Misses        123      123           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Trim the description value to 256 characters, keeping what it is plus
the two sanctioned call sites, and dropping the rationale clause whose
"issue #1476" substring (a space followed by #) triggered YAML
plain-scalar comment truncation.

Fixes #1982
@tvna
tvna deployed to ruleset-verify September 13, 2026 15:55 — with GitHub Actions Active
Two findings from executing-a-branch-plan Step 8's independent
adversarial review of the branch-plan-task.md description shortening:

- agents/branch-plan-task.md line 74 pointed back to "the reference
  cited above", but that citation (threat-model-and-authorization.md)
  was the exact clause the description-shortening removed, leaving a
  dangling pointer. Cites the path explicitly instead.
- tests/test_gitapex_sync_opencode.py's docstring still described the
  truncation defect as present and "tracked separately"; it is now
  fixed by this same change, so the docstring is updated to past tense.

Refs #1982
@tvna
tvna deployed to ruleset-verify September 13, 2026 16:09 — with GitHub Actions Active
@tvna
tvna marked this pull request as ready for review September 13, 2026 16:10
@tvna tvna removed the branch-plan-executing label Sep 13, 2026 — with Claude
drafting-a-pr-to-merge Step 8's inner-layer fresh review (5-axis
fan-out) surfaced three real issues in the plan doc, fixed here:

- Rename to the documented docs/gitapex/plans/<date>-<branch-name>.md
  shape (convention finding): was a descriptive slug not matching the
  actual branch name.
- Correct an inaccurate "no other line changes" claim (correctness
  finding): a Step 8 follow-up fix also touched the file body.
- Correct an imprecise "dropped text already appears at line 53" claim
  (blast-radius finding): only one of the two dropped citations was
  already there; the other was restored by the Step 8 fix, not
  preserved by the original task.
- Disclose the separately-tracked .claude/agents/branch-plan-task.md
  sibling-file hazard in Residual risk (blast-radius finding), which
  the doc previously omitted.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(agents): branch-plan-task's description is truncated 102 characters by a YAML plain-scalar comment marker

2 participants