factory-entry
Load a Linear issue into context and enter plan mode for a focused session
Files1
View on GitHubSKILL.mdskills/factory-entry/SKILL.md
GitHubYou're starting a focused work session on a single Linear issue. Load its context, summarize it, and enter plan mode so the user can sign off before you start coding.
Invocation input: the issue identifier. Accept either the full form (NON-45) or just the number (45). If numeric, prepend the team key from the project configuration.
What to do
Read project configuration. Prefer
.factory-kit/linear.json; use legacy.claude/linear.jsononly as a migration fallback. If neither exists, stop and direct the user to the setup-linear workflow. PullteamKeyfor ID resolution.Resolve the identifier. If the invocation input is numeric, construct
<teamKey>-<num>(e.g.,45→NON-45). If already inKEY-NNform, use it as-is.Fetch the issue through the connected Linear integration. Include comments and linked sub-issues if available.
Fetch the project through the Linear integration if the issue belongs to one and you haven't loaded it yet this session.
Read the working state that
factory-log.mdkeeps: the attached working doc (its Now block first), and any comments on the doc or the issue posted since the last session. For each reply that answers a Needs you item, runfactory-log resolvebefore planning. If the doc already has a## Plan, revise it; don't rewrite it from scratch.Prep first. Run
factory-prep.mdon the issue. It returns at once if neither the ticket nor the cited code changed, re-judges the verdict if either did, and does the full prep if there is none. Plan on top of its verdict: Split or Blocked means stop and surface it before planning; Needs decision means plan around the open items.Check blockers. If the issue has open
blockedByrelations, list them and warn loudly before proceeding. Ask whether the user wants to continue or pick a different ticket.Summarize for context (≤ 250 words). Use this shape — bold labels, short lines, omit any section that's empty:
- Issue:
<KEY-N> — title+ priority + current state - Outcome: one sentence on what "done" observably looks like. If the issue lacks a clear outcome, say so — that's the first thing to fix.
- Scope: the unchecked acceptance criteria / open checkboxes
- Encoded constraints: anything in the description or comments that locks an approach — name the underlying force (compliance, perf budget, prior decision), not just the rule
- Customer voice: if user feedback is quoted in the issue or linked, surface the raw words — don't paraphrase
- Open design calls: "decide during build" items worth resolving up front
- Context graph: parent, sub-issues, blockedBy/blocks, linked PRs, design docs — IDs + titles only. This is the issue's place in the wider decision graph; if it looks isolated, flag it as a yellow flag.
- Issue:
Flag issue quality (brief — one line if everything is fine). Linear's house style is: short title with a concrete outcome, body only as long as needed. If the issue is missing a clear outcome, written as a user story, or sitting orphaned with no context links, name it. Don't fix it silently — surface it so the user can decide whether to rewrite before designing the change.
Offer one learn slice (only if
~/.factory/learner/profile.mdexists). Read the active track's current rung, find the one slice of this ticket that fits it (usually a test, a state table or an invariant), and offer it in one line: "Learn slice: you write<what>in<file>(Rung N). Take it?" If accepted, mark that slice in the plan as the operator's, to run throughfactory-learn.mdwhen the build reaches it. If declined, drop it silently. Never offer more than one.State model first (stateful or frontend changes only). Prep wrote the current → target model; refine it to the concrete props type and state union with
factory-log state, so the operator can review the union before approving the plan.Enter planning mode. Use the host's planning capability when available. Otherwise, present the implementation plan in chat and stop for explicit approval. Do not start coding before approval.
On approval, write the plan to Linear. Move the issue to
states.inProgressif it isn't there yet, runfactory-log planandfactory-log now, then set the agent-state label from the Now block perfactory-log.md's Agent state rule:Needs decisionif Needs you still has items, otherwiseWorking. Approving the plan doesn't answer outstanding questions. From then on, keep the Now block current; findings go to the doc as one line each, and operator-owned questions go under Needs you. Neither goes into terminal prose or comment threads.
Style
Follow factory-voice.md. The reader is you, two minutes from now, about to design the change — give yourself what you'd need to make calls. Surface non-obvious constraints (invariants, prior decisions, blocking relations) at the top, not buried. No marketing copy, no hedging. If a constraint locks the design, name the principle behind it, not just the rule.