plan
Turns the approved brief into a graph-scoped design, a spec and tracer-bullet tickets with blocking edges, owner roles and pre-agreed test seams in tasks.json, and suggests the lane. Proposes matching Linear issues (written only after an explicit yes). Use when the user says "plan this", "break it down", "write a spec", "make tickets", "design this", or when a run has an approved 01-brief.md but no 02-design.md.
- License 许可
- MIT
- 所属仓库
- varun-singhh/lfg
- 最近更新
- 2026-10-26
- Stars
- ★ 10
- Forks
- 3
01 前言 Front Matter
- name
- plan
- lanes
- [ "standard", "full" ]
- phase
- plan
- reads
- [ "01-brief.md", "GLOSSARY.md", "adr/", "code-review-graph", "graphify", "dev-graph" ]
- author
- Varun Singh
- writes
- [ "02-design.md", "tasks.json", "progress.md" ]
- preflight
- graphs
- description
- Turns the approved brief into a graph-scoped design, a spec and tracer-bullet tickets with blocking edges, owner roles and pre-agreed test seams in tasks.json, and suggests the lane. Proposes matching Linear issues (written only after an explicit yes). Use when the user says "plan this", "break it down", "write a spec", "make tickets", "design this", or when a run has an approved 01-brief.md but no 02-design.md.
- adapted-from
- mattpocock/skills/to-spec + to-tickets + codebase-design (MIT, © 2026 Matt Pocock)
- auto-trigger
- true
03 SKILL.md 正文
Step 0: preflight
- Run
lfg graphs ensure. If it exits non-zero, stop and show its output (only--allow-stalefrom the user overrides). - Run
lfg run path→RUN. If there is no run or noRUN/01-brief.md, stop and suggest/grill. - Run
lfg repo docs→DOCS; readDOCS/GLOSSARY.mdand ADRs touching this area. Use glossary terms everywhere. - Load
lfg rule slice-rulesandlfg rule module-design.
Steps
- Scope from the graph, not the repo. For the brief's nouns:
get_minimal_context_tool→get_impact_radius_tool→get_architecture_overview_tool/get_bridge_nodes_toolif more than one community is involved →graphify explain/pathfor rationale → dev-graphPrinciple/Invariant/Gap/Decisionfor touchedComponents. Read only files the graph points to. - Design (
module-design): which modules change, their interfaces, data flow, and where the seams sit. Prefer existing seams and deepening an existing module over new shallow ones. Look for a prefactor that makes the change easy. In Full lane, if an interface shape is genuinely open, sketch 2–3 distinct options and recommend one. - Test seams. Pick the highest seam(s) that observe each acceptance criterion; fewest seams wins. Each seam gets one line: what it catches, what it misses. Use existing test prior art (
query_graph_tooltests_for). - Tickets (
slice-rules): tracer-bullet vertical slices, prefactor first, each sized for one fresh context, each withdepends_on. Wide mechanical refactors use expand → migrate batches → contract. Assignowner_role(software-engineer, orai-engineerfor prompts/RAG/model calls/evals) and aparallel_group(same letter = no edge between them, can run together). - Lane. Run
lfg lane --jsonand combine it with the radius, communities, new dependencies and touched auth/crypto/PII/payments/migrations/infra. Suggest the higher lane when in doubt; record reasons. Never lower a lane a human set. - Write
RUN/02-design.mdandRUN/tasks.json; updateRUN/progress.md(lane, ticket count, next:/build). Mirror tickets to dev-graph withlfg issue sync-tasks(oneIssueper ticket, carrying its description, steps and verification; never hand-write a stub), then addIssueBlocksIssueedges fordepends_on. - Checkpoint 2: show a short summary: lane + reasons, components, risks, numbered tickets (title · blocked by · what it delivers · seams). Ask: granularity right? edges right? merge/split any? Iterate until approved.
- Linear (checkpoint 7, only if asked). Never create Linear issues on your own. Ask once whether the user wants a Linear issue per ticket; only on yes, show one issue per ticket, blockers first, as exact text (title, what to build, acceptance criteria,
file:symbolrefs; no code blocks, secrets or internal hosts), as sub-issues when the run came from a Linear issue, with native blocking relations. Write only after an explicit yes; then store each Linear id on its ticket. Never modify the parent issue.
Output
RUN/02-design.md: Problem · Solution · Components touched (file:symbol, community) · Data flow (+ Mermaid) · Interfaces & decisions · Test seams · Risks (Principles/Invariants hit) · Lane + reasons · Out of scope. No code snippets except a decision-rich type/schema shape.
RUN/tasks.json (global CLAUDE.md schema + LFG fields):
[{ "id": "csv-001", "description": "Prefactor: extract exporter interface from PDF export",
"priority": 1, "lane": "standard", "owner_role": "software-engineer",
"graph_scope": ["billing/export.PdfExporter"], "depends_on": [], "parallel_group": "A",
"test_seams": [{ "seam": "Exporter.export(invoice)", "catches": "format output", "misses": "HTTP layer" }],
"steps": ["..."], "verification": "Given/When/Then from 01-brief.md #1 passes at the seam",
"acceptance": [1], "linear_id": null, "passes": false, "notes": "" }]
Every acceptance criterion maps to at least one ticket (acceptance) and one seam. passes always starts false.
Rules
- Synthesize; don't re-interview. Ask only for decisions the brief leaves open.
- Never weaken or delete existing
tasks.jsonentries; append or supersede with a note. - No code changes in this stage. Linear writes only after an explicit yes on the exact text.
04 同仓库更多 Skills
wizard
Guided start-to-finish run of the whole pipeline on an idea or a Linear issue. Runs every stage (grill, plan, build, check, secure, pentest, review, ship check, ship packet, learn), explains each one in plain words before and after, and loops failures through /fix until all 8 gates are green (max 3 loops per gate). Use when the user types "/wizard <idea>", "/wizard LIN-123", "/wizard resume", "walk me through everything", "do every step and explain it". Explicit only; never auto-triggered.
why
Explains why code looks the way it does: the commits that shaped a file, a function or a few lines, what each one changed and why, and the issues, tickets and pull requests they mention. Use when the user asks "why is this here?", "why was this changed?", "who added this and what for?", "what's the story behind X?", or is about to change code they don't understand.
which
Looks at graph status, the current run folder, git status and Linear, then tells you the single next skill to run and why. Use when the user says "which skill do I use?", "what now?", "what next?", "where was I?", "I'm lost", or starts a session without saying what they want.
suggest-tests
Suggest tests you should write based on your code. Uses AST parsing to find functions and suggests tests based on code patterns. Use when writing new code or modifying existing code.
spike
Builds a throwaway prototype to answer one design question, in a scratch folder inside the run folder, then deletes it and keeps only the conclusion. Use when the user says "try a quick prototype", "would this approach work?", "spike this", "let me feel this state model", "show me a few UI options", or when a plan has an open question that a cheap working artifact would settle.
ship
Proves the change is shippable and hands it to you: re-runs the green gate, runs the ship check (Docker build, scan, run, smoke test, delete, verify cleanup) and the shipping checklist, then writes COMMIT_MSG.md and PR_BODY.md. Never commits, pushes or deploys. Use when the user says "ship it", "ready for a PR", "prep the commit", "is it shippable?".