Work on issue $ARGUMENTS
Execute the five-phase workflow for this Linear issue. Follow each phase in order. Do not skip phases.
Phase 0 - Scope check
Before any work, verify this issue is in scope.
- •Fetch the issue from Linear using MCP (
get_issuewith the issue identifier). - •Check eligibility:
- •The issue must be an epic (has children), OR a child of an in-scope epic
- •The issue must be front-end work (belongs to the Website project, or its content clearly relates to front-end/theme configuration)
- •If the issue is out of scope:
- •Report to the user: "Issue [ID] - [Title] is out of scope. Reason: [back-end / not an epic / not front-end]"
- •If
.claude/ticket-map.mdexists, add the issue to the "Out of scope" section with the reason - •Stop. Do not proceed to Phase 1.
- •If
.claude/ticket-map.mdexists, check if this issue is already listed under "Out of scope". If so, report it and stop.
Phase 1 - Setup
- •If
.claude/ticket-map.mdexists, read it for context. - •Extract the issue title, description, parent issue (if any), and the git branch name from Linear.
- •Determine the branch base:
- •If this issue has a parent issue, it is a child. The base branch is the parent's branch.
- •If this issue has no parent, it is a parent. The base branch is
main.
- •If this is a child issue, verify the parent branch exists locally and on the remote. If it does not:
- •Fetch the parent issue from Linear to get its branch name
- •Create the parent branch from
main - •Push it to the remote
- •Create a draft PR for the parent (targeting
main)
- •Create the issue branch using the Linear-suggested branch name, based off the correct base branch.
- •Push the branch to the remote.
- •Create a draft PR:
- •Child issue PR targets the parent branch
- •Parent issue PR targets
main - •PR title matches the issue title
- •PR body references the Linear issue ID
- •Attach the PR link to the Linear issue using
update_issuewith thelinksparameter (URL and title of the PR). - •Update the Linear issue status to "In Progress".
- •If
.claude/ticket-map.mdexists, update the row for this issue with the branch name and PR number.
See git-workflow.md for detailed conventions.
Phase 2 - Analysis
- •Read the full issue description from Linear.
- •Read all comments on the issue using
list_comments. - •If the description contains images, use
extract_imagesto view them. - •Summarize:
- •What needs to be done (requirements)
- •How to verify it is done (acceptance criteria)
- •Scope boundaries (what is and is not included)
- •Present the summary to the user and wait for confirmation before proceeding.
Phase 2.5 - Context check
After the user confirms the analysis, ask if there is any additional context needed before research begins. Examples of what might be needed:
- •External URLs (app store links, documentation pages, third-party services)
- •Specific assets (images, logos, icons) not yet uploaded
- •Design references or mockups
- •Content that needs to be written or provided
- •Dependencies on other issues or systems
If the user provides context, incorporate it into the requirements before proceeding to Phase 3. If they have nothing to add, proceed immediately.
Phase 3 - Research
Prior knowledge
- •If
docs/horizon-research/horizon-components.mdexists, read it. This is the compiled reference of all prior Horizon research. - •Pass relevant sections of this reference to the Explore subagent(s) as prior knowledge so they can skip already-known components and focus on gaps.
Lightweight path
- •Check if the issue only involves JSON file changes (templates, config, locales) and the relevant section/block types are already documented in
docs/horizon-research/horizon-components.md. If so, skip the full Explore agent research - read the existing reference and go straight to formulating the implementation approach at the decision point (step 6).
Research execution (full path)
- •Spawn Explore subagent(s) to:
- •Search the codebase for existing sections, blocks, templates, and config that are relevant to this issue
- •Use the Shopify MCP tools (
search_docs_chunks,fetch_full_docs,learn_shopify_api) to look up Horizon theme capabilities that match the requirements - •Build on prior knowledge rather than re-discovering known components
- •Synthesize the findings:
- •Which Horizon components match the requirements
- •What configuration options are available (settings, blocks, presets)
- •What gaps exist (requirements that Horizon does not cover natively)
Research artifact
- •After synthesis, delegate to a general-purpose subagent to:
- •Create
docs/horizon-research/directory if it does not exist - •Write a per-issue research file at
docs/horizon-research/research-[ISSUE-ID].mdwith:- •Horizon components identified (section type, purpose, key settings, blocks, what it is useful for)
- •Configuration approach recommended for this issue
- •Gaps found (things Horizon does not provide natively)
- •Update
docs/horizon-research/horizon-components.mdby merging any newly discovered components, settings, or use cases. Add a "Used in: [ISSUE-ID]" reference. Do not duplicate entries that already exist - only add new information.
- •Create
Decision point
- •Decision point:
- •If research is conclusive - Present the implementation approach (which JSON files to modify, what sections/blocks to add/configure) and wait for user approval.
- •If research is inconclusive - Present what was found, explain the gaps clearly, and ask the user for guidance. Do NOT proceed to implementation.
Important: This milestone is configuration only. Research looks for existing Horizon components to configure through JSON. Do not propose Liquid, CSS, or JS edits.
Phase 4 - Implementation
Only proceed if Phase 3 produced a clear, user-approved approach.
- •Delegate implementation to a general-purpose subagent. Provide it with:
- •The approved implementation approach from Phase 3
- •The specific files to modify
- •The issue ID for commit messages
- •The subagent should:
- •Add or update JSON files only (templates, config, locales)
- •Commit incrementally with descriptive messages referencing the issue ID (e.g. "feat(ISS-101): add hero section to homepage template")
- •Follow the conventions in CLAUDE.md and
.claude/rules/
- •After implementation, update the PR description with a summary of changes made.
Phase 5 - Validation
- •Run
npm run check(Shopify theme linter) via a Bash subagent. - •Use the Shopify MCP
validate_themetool on all modified files. - •Review changes against the acceptance criteria from Phase 2.
- •Check modified files against relevant accessibility standards in
.claude/rules/*-accessibility.md. - •Compile a validation report.
- •Decision point:
- •If validation passes - Mark the PR as ready for review. Update the Linear issue status to "In Review". Update the ticket map if it exists. Report success to the user.
- •If validation fails - List the specific failures. Loop back to Phase 4 to fix them.
After "In Review", the human takes over for visual and functional verification.
See validation-checklist.md for the full checklist.