feat(skills/code-agent): ticket-driven mode (plan-first carve-out) (closes #73)#74
Merged
Merged
Conversation
…loses #73) Single-file SKILL.md update. No tool signatures, scripts, or scaffold templates change. The EXECUTE mantra is preserved for direct user requests; a planning carve-out is added for ticket-driven mode. Frontmatter: - Added "ticket-driven" tag. ABSOLUTE RULES: - Rules 1, 2, 3, 5: reworded with explicit ticket-driven carve-outs (rule 1 allows "tool calls OR a structured plan presentation"; rule 3 carves an exception for high-complexity or risky plans; rule 5 spells out the canonical plan → present → confirm → write → test → commit → push → PR sequence). - Rules 4, 6, 7: preserved verbatim. New "Ticket-Driven Mode" section (between Iteration Rules and Full-Stack Architecture): - Trigger criteria (3 signals: linear_*/github_get_issue origin, ticket-id pattern in user message, pasted ticket structure). - 8-step required sequence including the open_questions-cannot-resolve → comment-and-stop rule. - Plan-adherence contract: regenerate the plan rather than drift; if writing files outside the plan, stop and re-plan. - "What this does NOT change" — direct requests still follow the one-shot rules; framework conventions unchanged; tool signatures unchanged. New "Ticket-Driven Implementation" sub-flow in One-Shot Workflow: - 12-step canonical sequence from linear_get_issue through linear_add_comment, explicitly forbidding code_agent_scaffold. Tool Reference: - Added a pointer row at the top for code_plan_create (from the code-plan skill) with a clarifying note that it's a sibling-skill hard prerequisite for ticket-driven mode. Safety: - "Do not create git commits unless explicitly asked" → "Do not create git commits unless the request requires them. Direct one-shot scaffolds typically do not commit. Ticket-driven flows always commit and PR — that's the whole point." Resolves the contradiction with the new ticket-driven flow. No new tools added. No `mode` parameter. Mode is inferred from conversation context as documented in the Trigger section. The code-agent tool surface is byte-identical to today. go test ./forge-skills/... — all green (15 skills, TestEmbeddedRegistry_LoadContent still finds "## Tool:" headings). golangci-lint clean. No script changes → shellcheck not needed. References merged work this skill depends on: - PR #67 (linear) — provides linear_get_issue / linear_add_comment - PR #69 (code-plan) — provides code_plan_create - PR #71 (github update) — provides github_branch_name_from_ticket and ticket_id/ticket_url params on github_create_pr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Single-file SKILL.md update to the existing
code-agentskill. No tool signatures, scripts, or scaffold templates change — the entire diff is in the system-prompt body. The EXECUTE mantra is preserved for direct user requests; a planning carve-out is added for ticket-driven mode.Closes #73.
What changed
forge-skills/local/embedded/code-agent/SKILL.md(+67 / −5):1. Frontmatter
Added
ticket-driventotags. Nothing else touched (bins,egress_domains,timeout_hint,denied_tools, etc. all preserved).2. ABSOLUTE RULES
code_plan_create+ plan presentationcomplexity: \"high\"or non-emptyrisksaftercode_plan_create3. New "Ticket-Driven Mode" section
Placed exactly where the issue specified — between Iteration Rules and Full-Stack Architecture. Contents:
linear_*/github_get_issue, ticket-id pattern in user message, pasted ticket structure4. New "Ticket-Driven Implementation" sub-flow
Added as the fourth sub-flow under One-Shot Workflow (after New Project / Existing Codebase / Modify Existing). 12-step canonical sequence from
linear_get_issuethroughlinear_add_comment, with an explicit "Do NOT callcode_agent_scaffold" closer.5. Tool Reference table
Added one pointer row at the top for
code_plan_createflagged as living in the siblingcode-planskill, plus a clarifying note below the table: "In ticket-driven mode thecode-planskill is a hard prerequisite." No## Tool: code_plan_*heading added to this file — the pointer is in the reference table only, preserving the single-skill ownership of each tool.6. Safety bullet
Resolves the contradiction with the new flow.
Verification
grep -c '^## Ticket-Driven Mode$' SKILL.md→ 1 (exactly one new section heading)grep -c '^### Ticket-Driven Implementation$' SKILL.md→ 1## Tool: code_agent_*headings preserved (scaffold, write, read, edit, run)## Tool: code_plan_*headings — pointer is table-only, no scope leakagego test ./forge-skills/...— all green (15 skills,TestEmbeddedRegistry_LoadContentstill finds## Tool:headings)golangci-lint run ./forge-skills/...— 0 issuesshellchecknot run (no surface)forge buildagainst a test agent withcode-agentenabled produces a system prompt containing "Ticket-Driven Mode" —jq '.system_prompt' .forge-output/agent-spec.json | grep -c 'Ticket-Driven Mode'→ expected1Out of scope per #73
modeparameter — mode is inferred from conversation context as documentedPrerequisite stack (all merged)
linear_get_issue/linear_add_commentreferenced in the required sequencecode_plan_create— hard prerequisite for ticket-driven modegithub_branch_name_from_ticket+ ticket-awaregithub_create_prreferenced in the 12-step sub-flowTogether with this PR, the canonical ticket → plan → branch → write → test → commit → PR → comment flow is fully wired across the four skills.