LearnNewsExamplesServices
Frontmatter
id10051
titleEnhance Ticket-Intake Skill: Branch-Before-Code Mandate
stateClosed
labels
enhancementai
assigneestobiu
createdAtApr 17, 2026, 4:16 PM
updatedAtApr 17, 2026, 8:25 PM
githubUrlhttps://github.com/neomjs/neo/issues/10051
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 17, 2026, 8:25 PM

Enhance Ticket-Intake Skill: Branch-Before-Code Mandate

tobiu
tobiu commented on Apr 17, 2026, 4:16 PM

Objective

Add a mandatory "Branch-First" gate to the ticket-intake skill that forces agents to create a feature branch before writing any code, not as a late step before PR creation.

Problem

Current agent behavior pattern observed across multiple sessions:

  1. Agent picks up ticket
  2. Runs ticket intake validation ✅
  3. Starts coding on dev branch
  4. Only creates feature branch right before gh pr create

If the session crashes, Antigravity has API failures, or the agent hits a dead end, dev is left in a dirty state with uncommitted or experimental changes. The next session inherits this mess.

Proposed Fix

Add a Branch-First Gate to the ticket-intake workflow (ticket-intake-workflow.md), inserted between the ROI calculation and code execution:

New Section: "3. Branch-Before-Code Gate"

<h2 class="neo-h2" data-record-id="6">3. Branch-Before-Code Gate</h2>

After passing the Validation Sweep and ROI Calculation, you MUST create a 
feature branch BEFORE writing any code or modifying any files:

git checkout -b agent/[ticket-id]-[descriptor]

This is a non-negotiable safety gate. The `dev` branch must remain clean at 
all times. If a session crashes, the feature branch contains the damage — 
dev has a clean slate for the next session.

You are FORBIDDEN from:
- Running `replace`, `write_file`, or `multi_replace_file_content` on any 
  repository file while on the `dev` branch
- Committing to `dev` directly (already mandated by PR workflow, but 
  reinforced here as the earlier gate)

Acceptance Criteria

  • ticket-intake-workflow.md updated with Branch-Before-Code section
  • Section number adjusted (current Section 3 "Rejection Protocol" becomes Section 4)
  • PR workflow pull-request-workflow.md cross-references the intake branching gate to avoid duplication

Architectural Note

This is a meta-level workflow enhancement — fixing the system that builds the code, not the code itself. The branching mandate already exists in the PR skill but is positioned too late in the pipeline. Moving it upstream to ticket-intake prevents the failure mode entirely.

Origin Session ID: c9bf0d61-a58d-42ba-a030-6426dc5fe270

tobiu added the enhancement label on Apr 17, 2026, 4:16 PM
tobiu added the ai label on Apr 17, 2026, 4:16 PM
tobiu cross-referenced by PR #10052 on Apr 17, 2026, 4:30 PM
tobiu assigned to @tobiu on Apr 17, 2026, 8:09 PM
tobiu referenced in commit 570b2b7 - "chore(ai): add Acceptance Protocol to ticket-intake skill (#10051) on Apr 17, 2026, 8:17 PM
tobiu cross-referenced by PR #10053 on Apr 17, 2026, 8:18 PM
tobiu referenced in commit f83f3eb - "chore(ai): add Acceptance Protocol to ticket-intake skill (#10051) (#10053) on Apr 17, 2026, 8:25 PM
tobiu closed this issue on Apr 17, 2026, 8:25 PM
tobiu cross-referenced by PR #10055 on Apr 17, 2026, 8:36 PM
tobiu cross-referenced by #10058 on Apr 18, 2026, 12:48 AM
tobiu cross-referenced by #10061 on Apr 18, 2026, 4:29 PM
tobiu cross-referenced by PR #10062 on Apr 18, 2026, 4:35 PM