ln-220-story-coordinator by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-220-story-coordinator路径: 文件路径(
shared/、references/、../ln-*)是相对于技能仓库根目录的。如果在当前工作目录未找到,请定位此 SKILL.md 文件所在的目录并向上返回一级以找到仓库根目录。如果缺少shared/目录,请通过 WebFetch 从https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}获取文件。
协调一个或多个史诗的故事创建(CREATE)、重新规划(REPLAN)和追加(ADD),为每个史诗产出 5-10 个用户故事,包含标准研究、分解优先模式、多史诗路由,并委托给 ln-221/ln-222 工作器。
在以下情况下使用:
关键原则: 首先构建理想的故事计划,然后检查现有故事以确定模式:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
原理: 确保基于当前史诗需求进行一致的故事分解,独立于现有故事结构(可能已过时)。
强制阅读: 加载 shared/references/numbering_conventions.md 以了解故事编号规则(跨史诗的 US001 顺序编号,无 Story 0)。
强制阅读: 加载 shared/references/creation_quality_checklist.md §故事创建清单,以了解 ln-310 将强制执行的有效性标准。
| 输入 | 必需 | 来源 | 描述 |
|---|---|---|---|
epicId | 是 | 参数、看板、用户 | 要处理的主要史诗 |
解析: 史诗解析链。状态过滤器: 活跃(已规划/已开始)多史诗: 如果理想计划(阶段 3)产生的故事不适合已解析的史诗,阶段 3 步骤 8 会自动将它们路由到正确的史诗(或内联创建存根史诗)。
强制阅读: 加载 shared/references/tools_config_guide.md、shared/references/storage_mode_detection.md、shared/references/input_resolution_pattern.md
提取:task_provider = 任务管理 → 提供者
目标: 收集故事规划所需的上下文(史诗详情、规划问题、前端上下文、备用文档、用户输入)
步骤 1:发现(自动)
从 docs/tasks/kanban_board.md 自动发现:
get_project(query="Epic N") → 获取完整的史诗文档Read("docs/tasks/epics/epic-{N}-*/epic.md") → 加载基于文件的史诗步骤 2:加载活跃史诗元数据
从 docs/tasks/kanban_board.md 加载所有活跃史诗 → 史诗概览部分:
allEpics[] 用于阶段 3 史诗路由(步骤 8)步骤 3:提取规划信息(自动)
解析史诗结构以获取故事规划问题:
| 问题 | 提取来源 |
|---|---|
| Q1 - 用户/角色 | 史诗目标("启用 [角色]...")+ 包含范围(用户角色) |
| Q2 - 他们想要什么 | 史诗包含范围(功能)+ 功能需求 |
| Q3 - 为什么重要 | 史诗成功标准(指标)+ 目标(商业价值) |
| Q4 - 哪个史诗 | 已从步骤 1 获取 |
| Q5 - 主要验收标准 | 从史诗包含范围功能推导 → 可测试的场景 |
| Q6 - 应用类型 | 史诗技术说明(提及 UI/API)→ 默认:API |
步骤 4:前端研究(可选)
触发条件: 如果步骤 3 后 Q2(功能)或 Q5(验收标准)缺失
流程:
Glob **/*.html、src/**/*.html备用方案: 如果没有 HTML → 跳转到步骤 5
步骤 5:备用搜索链
目标: 在询问用户之前填充缺失的 Q1-Q6。
对于步骤 3-4 后没有答案的每个问题:
| 问题 | 备用搜索 |
|---|---|
| Q1(用户/角色) | 搜索 requirements.md 中的 "用户角色"、"参与者" → 如果未找到则默认为 "用户" |
| Q3(为什么重要) | 搜索 requirements.md 中的 "业务目标"、"目标" → 从史诗成功标准推断 |
| Q6(应用类型) | 搜索 tech_stack.md 中的 "前端"、"后端"、"API" → 默认 "API" |
跳过: Q2、Q5(史诗 + HTML 是事实来源)、Q4(已知)
步骤 6:用户输入(仅在缺失时)
如果步骤 3 + 4 + 5 后仍然缺失:
如果所有问题都已从史诗或 HTML 或备用方案中得到解答: 跳过用户提示,进入阶段 2
输出: 完整的上下文(史诗详情、下一个故事编号、Q1-Q6 答案)
强制阅读: 加载 shared/references/research_methodology.md、shared/references/research_tool_fallback.md、shared/references/documentation_creation.md
目标: 在故事生成之前研究行业标准/模式。
流程:
shared/references/documentation_creation.md 技术栈表ref_search_documentation(query="[前缀] [领域] RFC 标准规范")ref_search_documentation(query="[前缀] [领域] 架构模式 最佳实践")Glob("docs/guides/*.md") → 按领域匹配docs/research/rsh-{NNN}-{slug}.md 根据 shared/references/documentation_creation.md 命名规则输出契约: 阶段 2 必须返回 { standards_research: string, file_path: string } — 为史诗中的所有故事缓存。
跳过条件: 技术说明中无标准、简单的增删改查、明确跳过 时间限制: 10-15 分钟
目标: 构建理想的故事计划,确定执行模式
故事分组指南:
每个故事 = 一个用户功能的垂直切片(端到端:UI → API → 服务 → DB)。大小限制根据 creation_quality_checklist.md #9。
| 模式 | 示例 | 判定 |
|---|---|---|
| 垂直切片(1 个用户旅程) | "用户注册"(表单→API→DB→邮件) | 好的故事 |
| 水平切片(1 个层级) | "创建用户表"、"注册 API 端点" | 不好 → 任务,非故事 |
| 增量数据库(每个故事) | "产品搜索" → 创建产品表 | 好 |
| 大爆炸式数据库(全部预先创建) | "设置数据库" → 创建 50 个表 | 不好 → 无用户价值 |
构建理想计划(自动):
阐明真实目标: 强制阅读: shared/references/goal_articulation_gate.md — 用一句话说明此史诗的真实目标(正在启用的用户功能,而非"创建故事")。验证:分解是否服务于这个目标?
分析史诗范围: 审查史诗包含范围中的功能,识别用户功能
范围极简主义关卡(强制):
分析史诗范围后,在生成故事之前挑战总体设计。每个测试都是通过/失败。
| 测试 | 规则 | 失败操作 |
|---|---|---|
| 购物车测试 | 用一句话陈述能够交付史诗目标的最简单设计。如果无法做到 — 范围太广,拆分史诗。 | 停止。返回史诗协调器进行拆分。 |
| 验收标准数量测试 | 所有故事中预计的验收标准数量:总数除以故事数量。如果平均每个故事 > 5 — 范围过大。 | 减少:削减推测性的验收标准,直到平均 <= 5。 |
| 验收标准纯度测试 | 每个验收标准必须描述可观察的用户行为(给定用户执行 X,然后用户看到 Y)。描述系统内部(查找优先级、缓存层、端点 URL)的验收标准是技术说明,而非验收标准。 | 移至技术说明。 |
| 功能捆绑测试 | 史诗目标是否包含连接不同功能的 "和"、"&"、"+"?每个不同的功能 = 单独的故事。标题 "X 和 Y" = 至少 2 个故事。 | 拆分为单独的故事。 |
| 研究防火墙 | 标准研究(阶段 2)仅用于告知技术说明。研究绝不能添加验收标准、端点或功能。验收标准仅来自史诗包含范围。 | 移除由研究驱动的验收标准。 |
反模式(真实示例):
* 故事 "翻译记忆库和响应缓存" → 失败功能捆绑测试(2 个不同功能捆绑)
* 10 个包含 "5 级查找优先级" 的验收标准 → 失败验收标准纯度测试(系统架构,非用户行为)
* 研究发现 "行业在 75% 时进行分段匹配" → 为此添加了验收标准 → 失败研究防火墙(不在史诗包含范围内)
通过: 所有 5 个测试通过 → 进入步骤 4。任何失败: 在继续之前修复。不要从范围过大的计划生成故事。
确定故事数量:
故事大小: 根据 creation_quality_checklist.md #9 限制。超出范围 → 拆分或合并。
在"脑海中"构建理想计划:
每个故事:角色 + 功能 + 商业价值
每个故事:根据清单 #4 的可测试验收标准(3-5 个验收标准,仅限用户行为)
故事按依赖关系排序(根据清单 #18 无前向依赖)
每个故事:存在测试策略部分,但为空(测试稍后由测试规划器计划)
每个故事:技术说明(架构、集成、来自阶段 2 的标准研究、指南链接)
研究防火墙(根据步骤 3): 研究 → 仅用于技术说明,绝不用于验收标准
每个故事:orchestratorBrief 用于 ln-1000 流水线负责人:
orchestratorBrief: {
tech: "<来自史诗上下文的技术、框架、关键库>", keyFiles: "<2-5 个受影响最大的文件/目录>", approach: "<一行实现策略>", complexity: "低|中|高(<原因>)" }
验收标准质量验证: 根据 creation_quality_checklist.md #4 的规则。工作器(ln-221、ln-222)必须验证。
INVEST 评分(每个故事 0-6 分): 根据 creation_quality_checklist.md INVEST 标准验证(已加载)。关卡:评分 ≥ 4 → 继续,< 4 → 返工。
目标: 确保理想计划中的每个故事都分配给正确的史诗。处理多史诗请求和缺失的史诗。
流程: 路由始终运行(关键词匹配成本低)。标记后,如果所有故事都匹配 resolvedEpicId → 单史诗快速路径(常见情况)。
路由(多个活跃史诗):
FOR EACH Story in IDEAL plan:
1. Compare Story domain/capability keywords vs resolved Epic Scope In
- IF match → tag Story with resolvedEpicId
2. ELSE compare vs allEpics[] scopes (load Epic descriptions on-demand for ambiguous matches)
- IF matches another Epic → tag with that epicId
- IF matches NO Epic → tag as NEEDS_NEW_EPIC
ANALYZE tags:
- ALL resolvedEpicId → SINGLE-EPIC (proceed as before)
- Mixed tags → MULTI-EPIC:
a. Group: epicGroups = {epicId: Story[]}
b. Show ROUTING PREVIEW (see format below)
c. User confirms or reassigns Stories
d. NEEDS_NEW_EPIC Stories → create stub Epic inline:
1. Read kanban_board.md → Next Epic Number, teamId
2. Create Epic (Linear: save_project, File: mkdir + Write minimal epic.md)
3. Update kanban_board.md: increment Next Epic Number, add Epic Story Counters row, add to Epics Overview → Active
4. Assign returned epicId to tagged Stories
路由预览格式:
EPIC ROUTING PREVIEW
Epic 7 (OAuth Authentication): 4 Stories
- US004: Register OAuth client
- US005: Request access token
- US006: Validate token
- US007: Refresh token
Epic 12 (User Management): 2 Stories
- US008: User profile settings
- US009: Account deletion
NEW EPIC NEEDED: 1 Story
- US010: Payment webhook handler
Suggested domain: Payment Processing
Confirm routing? (or reassign Stories between Epics)
输出: epicGroups — 从 epicId 到 Story[] 的映射(对于单史诗:一个包含所有故事的组)
目标: 根据现有故事和用户意图确定执行模式,针对阶段 3 路由中的每个史诗组。
流程: 对于 epicGroups 中的每个 epicGroup,查询任务提供者以获取现有故事:
如果 task_provider == "linear":
list_issues(project=epicGroup.epicId, label="user-story")
否则(文件模式):
Glob("docs/tasks/epics/epic-{N}-*/stories/*/story.md")
模式检测(每个 epicGroup):
分析用户请求 中的关键词:
决策矩阵:
| 条件 | 模式 | 委托给 |
|---|---|---|
| 数量 = 0 | 创建 | 阶段 5a:ln-221-story-creator |
| 数量 ≥ 1 且包含添加关键词 | 添加 | 阶段 5c:ln-221-story-creator(追加模式) |
| 数量 ≥ 1 且包含重新规划关键词 | 重新规划 | 阶段 5b:ln-222-story-replanner |
| 数量 ≥ 1 且不明确 | 询问用户 | "添加新故事还是修订计划?" |
重要: 协调器仅加载元数据(ID、标题、状态)。工作器在需要时加载完整描述(以提高令牌效率)。
输出: epicGroupModes — 每个组的从 epicId 到 {模式, 现有数量, 史诗数据} 的映射
迭代: 按顺序处理每个 epicGroup(工作器包含用户交互,无法并行化)。
FOR EACH epicGroup in epicGroupModes:
IF mode == CREATE → Phase 5a (ln-221-story-creator)
IF mode == REPLAN → Phase 5b (ln-222-story-replanner)
IF mode == ADD → Phase 5c (ln-221-story-creator, appendMode)
工作器接收相同的接口:epicData + idealPlan 用于一个史诗。
触发条件: 史诗尚无故事(首次分解)
委托:
通过技能工具调用 ln-221-story-creator:
Skill(
skill: "ln-221-story-creator",
epicData: {id, title, description},
idealPlan: [ /* 5-10 Stories from Phase 3 */ ],
standardsResearch: "Standards Research from Phase 2",
teamId: "team-id",
autoApprove: false // or true for automation
)
工作器处理:
输出: 创建的故事 URL + 来自工作器的摘要
强制阅读: 加载 references/replan_algorithm.md
触发条件: 史诗已有故事(需求变更)
委托:
通过技能工具调用 ln-222-story-replanner:
Skill(
skill: "ln-222-story-replanner",
epicData: {id, title, description},
idealPlan: [ /* 5-10 Stories from Phase 3 */ ],
standardsResearch: "Standards Research from Phase 2",
existingCount: N,
teamId: "team-id",
autoApprove: false // or true for automation
)
工作器处理:
输出: 操作结果 + 警告 + 来自工作器的受影响故事 URL
触发条件: 史诗已有故事,用户希望添加更多(而非重新规划现有故事)
委托:
通过技能工具调用 ln-221-story-creator,使用追加模式:
Skill(
skill: "ln-221-story-creator",
appendMode: true, // ADD to existing, don't replace
epicData: {id, title, description},
newStoryDescription: userRequestedStory, // Single Story from user request
standardsResearch: "Standards Research from Phase 2",
teamId: "team-id",
autoApprove: false
)
appendMode: true — 仅创建用户请求的故事,跳过理想计划比较。
工作器处理:
输出: 创建的故事 URL + 来自工作器的摘要
在所有工作器完成(任何模式:创建/重新规划/添加)后:
git add docs/tasks/kanban_board.md(由工作器更新)git commit 并附带消息:
"ln-220: create Stories US{first}-US{last} for Epic {N}""ln-220: create Stories for Epics {N1}, {N2}, {N3}""ln-220: replan Stories for Epic {N}""ln-220: add Story US{num} to Epic {N}"目标: 验证所有技能阶段已完成,所有计划的故事均已处理。
流程:
阶段完成情况: 验证阶段 0-6 已完成(或已跳过并有记录的原因)。报告任何遗漏的阶段。
故事统计:
史诗路由验证(仅限多史诗):
输出:
SELF-CHECK RESULTS
Phases: 7/7 completed (or K/7 + skipped reasons)
Stories: M/N created
Epics: K epic(s) processed
Status: PASS / FAIL (with details)
如果失败 → 列出哪些故事丢失,建议重新运行以处理遗漏的 epicGroups。
TodoWrite 格式(强制): 在开始前将阶段添加到待办事项中:
- Phase 1: Context Assembly (in_progress)
- Phase 2: Standards Research — inline (pending)
- Phase 3: Build IDEAL Story Plan + Epic Routing (pending)
- Phase 4: Check Existing Stories (pending)
- Phase 5: Delegate to ln-221/ln-222 (pending)
- Wait for worker result (pending)
- Phase 6: Commit kanban changes (pending)
- Phase 7: Self-Check (pending)
开始时标记为进行中,完成时标记为已完成。
调用:
被以下调用:
上游:
下游:
✅ 阶段 1:上下文组装完成:
✅ 阶段 2:标准研究完成:
✅ 阶段 3:规划 + 路由完成:
✅ 阶段 4:检查现有情况完成:
✅ 阶段 5:委托完成:
✅ 阶段 6:提交完成:
✅ 阶段 7:自检完成:
创建模式(首次):
"Create stories for Epic 7: OAuth Authentication"
流程:
重新规划模式(需求变更):
"Replan stories for Epic 7 - removed custom token formats, added scope management"
流程:
多史诗模式(故事跨越多个史诗):
"Create stories for user authentication and payment processing"
流程:
"ln-220: create Stories for Epics 7, 12"强制阅读: 加载 shared/references/meta_analysis_protocol.md
技能类型:planning-coordinator。在所有阶段完成后运行。使用 planning-coordinator 格式输出到聊天。
shared/references/tools_config_guide.mdshared/references/storage_mode_detection.mdshared/references/problem_solving.mdshared/references/orchestrator_pattern.mdshared/references/auto_discovery_pattern.mdshared/references/decompose_first_pattern.mdshared/references/numbering_conventions.md(故事跨史诗顺序编号)版本: 5.0.0 最后更新: 2026-02-03
每周安装次数
149
仓库
GitHub 星标
245
首次出现
2026年1月24日
安全审计
已安装于
claude-code135
gemini-cli134
codex134
opencode134
cursor132
github-copilot129
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Coordinates Story creation (CREATE), replanning (REPLAN), and appending (ADD) for one or more Epics, producing 5-10 User Stories per Epic with standards research, Decompose-First Pattern, multi-epic routing, and delegation to ln-221/ln-222 workers.
Use when:
Key principle: Build IDEAL Story plan FIRST, THEN check existing Stories to determine mode:
Rationale: Ensures consistent Story decomposition based on current Epic requirements, independent of existing Story structure (may be outdated).
MANDATORY READ: Load shared/references/numbering_conventions.md for Story numbering rules (US001 sequential across Epics, no Story 0).
MANDATORY READ: Load shared/references/creation_quality_checklist.md §Story Creation Checklist for validation criteria that ln-310 will enforce.
| Input | Required | Source | Description |
|---|---|---|---|
epicId | Yes | args, kanban, user | Primary Epic to process |
Resolution: Epic Resolution Chain. Status filter: Active (planned/started) Multi-epic: If IDEAL plan (Phase 3) produces Stories that don't fit resolved Epic, Phase 3 Step 8 auto-routes them to correct Epics (or creates stub Epics inline).
MANDATORY READ: Load shared/references/tools_config_guide.md, shared/references/storage_mode_detection.md, shared/references/input_resolution_pattern.md
Extract: task_provider = Task Management → Provider
Objective: Gather context for Story planning (Epic details, planning questions, frontend context, fallback docs, user input)
Step 1: Discovery (Automated)
Auto-discovers from docs/tasks/kanban_board.md:
get_project(query="Epic N") → Fetch full Epic documentRead("docs/tasks/epics/epic-{N}-*/epic.md") → Load file-based EpicStep 2: Load Active Epics Metadata
Load ALL active Epics from docs/tasks/kanban_board.md → Epics Overview section:
allEpics[] for Phase 3 Epic Routing (Step 8)Step 3: Extract Planning Information (Automated)
Parses Epic structure for Story planning questions:
| Question | Extraction Source |
|---|---|
| Q1 - User/Persona | Epic Goal ("Enable [persona]...") + Scope In (user roles) |
| Q2 - What they want | Epic Scope In (capabilities) + functional requirements |
| Q3 - Why it matters | Epic Success Criteria (metrics) + Goal (business value) |
| Q4 - Which Epic | Already from Step 1 |
| Q5 - Main AC | Derive from Epic Scope In features → testable scenarios |
| Q6 - Application type | Epic Technical Notes (UI/API mentioned) → Default: API |
Step 4: Frontend Research (Optional)
Trigger: If Q2 (capabilities) OR Q5 (AC) missing after Step 3
Process:
Glob **/*.html, src/**/*.htmlFallback: If no HTML → Skip to Step 5
Step 5: Fallback Search Chain
Objective: Fill missing Q1-Q6 BEFORE asking user.
For each question with no answer from Step 3-4:
| Question | Fallback Search |
|---|---|
| Q1 (User/Persona) | Search requirements.md for "User personas", "Actors" → Default "User" if not found |
| Q3 (Why it matters) | Search requirements.md for "Business objectives", "Goals" → Infer from Epic Success Criteria |
| Q6 (Application type) | Search tech_stack.md for "Frontend", "Backend", "API" → Default "API" |
Skip: Q2, Q5 (Epic + HTML are sources of truth), Q4 (already known)
Step 6: User Input (Only if Missing)
If still missing after Step 3 + 4 + 5:
If all questions answered from Epic OR HTML OR fallback: Skip user prompts, proceed to Phase 2
Output: Complete context (Epic details, next Story number, Q1-Q6 answers)
MANDATORY READ: Load shared/references/research_methodology.md, shared/references/research_tool_fallback.md, shared/references/documentation_creation.md
Objective: Research industry standards/patterns BEFORE Story generation.
Process:
shared/references/documentation_creation.md stack tableref_search_documentation(query="[prefix] [domain] RFC standard specification")ref_search_documentation(query="[prefix] [domain] architectural patterns best practices")Glob("docs/guides/*.md") → match by domaindocs/research/rsh-{NNN}-{slug}.md per shared/references/documentation_creation.md namingOutput contract: Phase 2 MUST return { standards_research: string, file_path: string } — cached for all Stories in Epic.
Skip conditions: No standards in Technical Notes, trivial CRUD, explicit skip Time-box: 10-15 minutes
Objective: Build IDEAL Story plan, determine execution mode
Story Grouping Guidelines:
Each Story = ONE vertical slice of user capability (end-to-end: UI → API → Service → DB). Size limits per creation_quality_checklist.md #9.
| Pattern | Example | Verdict |
|---|---|---|
| Vertical slice (1 user journey) | "User registration" (form→API→DB→email) | GOOD Story |
| Horizontal slice (1 layer) | "Create user table", "Registration API endpoint" | BAD → Task, not Story |
| Incremental DB (per Story) | "Product search" → creates Products table | GOOD |
| Big-bang DB (all upfront) | "Setup database" → creates 50 tables | BAD → no user value |
Build IDEAL Plan (Automated):
Articulate REAL GOAL: MANDATORY READ: shared/references/goal_articulation_gate.md — State REAL GOAL of this Epic in one sentence (the user capability being enabled, not "create Stories"). Verify: does the decomposition serve THIS goal?
Analyze Epic Scope: Review features in Epic Scope In, identify user capabilities
Scope Minimalism Gate (MANDATORY):
After analyzing Epic Scope, challenge the AGGREGATE design BEFORE generating Stories. Each test is pass/fail.
| Test | Rule | FAIL action |
|---|---|---|
| Cart Test | State the simplest design that delivers the Epic Goal in one sentence. If you cannot — scope too wide, split Epic. | STOP. Return to Epic coordinator for split. |
| AC Count Test | Projected ACs across all Stories: divide total by Story count. If average > 5 per Story — over-scoped. | Reduce: cut speculative ACs until average <= 5. |
| AC Purity Test | Every AC must describe OBSERVABLE USER BEHAVIOR (Given user does X, Then user sees Y). ACs that describe system internals (lookup priority, cache layers, endpoint URLs) are Technical Notes, not ACs. | Move to Technical Notes. |
| Feature Bundling Test | Epic Goal contains "and", "&", "+" joining DISTINCT capabilities? Each distinct capability = separate Story. Title "X and Y" = 2 Stories minimum. | Split into separate Stories. |
| Research Firewall | Standards Research (Phase 2) informs Technical Notes ONLY. Research MUST NOT add ACs, endpoints, or features. ACs come from Epic Scope In alone. | Remove research-driven ACs. |
Anti-pattern (real example):
* Story "Translation Memory AND Response Cache" → FAIL Feature Bundling (2 distinct capabilities bundled)
* 10 ACs with "5-level lookup priority" → FAIL AC Purity (system architecture, not user behavior)
* Research found "industry does segment matching at 75%" → added AC for it → FAIL Research Firewall (not in Epic Scope In)
Pass: All 5 tests pass → proceed to Step 4. Fail ANY: Fix before proceeding. Do NOT generate Stories from an over-scoped plan.
Determine Story Count:
Story Size: Limits per creation_quality_checklist.md #9. Outside range → split or merge.
Build IDEAL Plan "in mind":
Each Story: persona + capability + business value
Each Story: testable AC per checklist #4 (3-5 ACs, user behavior only)
Stories ordered by dependency (no forward deps per checklist #18)
Each Story: Test Strategy section exists but is empty (tests planned later by test planner)
Each Story: Technical Notes (architecture, integrations, Standards Research from Phase 2 , guide links)
Research Firewall (per Step 3): research → Technical Notes only, never ACs
Each Story: orchestratorBrief for ln-1000 pipeline lead:
orchestratorBrief: {
INVEST Score (0-6 per Story): Validate per creation_quality_checklist.md INVEST criteria (loaded above). Gate: Score ≥ 4 → proceed, < 4 → rework.
Objective: Ensure each Story in IDEAL plan is assigned to the correct Epic. Handles multi-epic requests and missing Epics.
Process: Routing always runs (keyword matching is cheap). After tagging, if ALL Stories match resolvedEpicId → SINGLE-EPIC fast path (common case).
Routing (multiple active Epics):
FOR EACH Story in IDEAL plan:
1. Compare Story domain/capability keywords vs resolved Epic Scope In
- IF match → tag Story with resolvedEpicId
2. ELSE compare vs allEpics[] scopes (load Epic descriptions on-demand for ambiguous matches)
- IF matches another Epic → tag with that epicId
- IF matches NO Epic → tag as NEEDS_NEW_EPIC
ANALYZE tags:
- ALL resolvedEpicId → SINGLE-EPIC (proceed as before)
- Mixed tags → MULTI-EPIC:
a. Group: epicGroups = {epicId: Story[]}
b. Show ROUTING PREVIEW (see format below)
c. User confirms or reassigns Stories
d. NEEDS_NEW_EPIC Stories → create stub Epic inline:
1. Read kanban_board.md → Next Epic Number, teamId
2. Create Epic (Linear: save_project, File: mkdir + Write minimal epic.md)
3. Update kanban_board.md: increment Next Epic Number, add Epic Story Counters row, add to Epics Overview → Active
4. Assign returned epicId to tagged Stories
Routing Preview Format:
EPIC ROUTING PREVIEW
Epic 7 (OAuth Authentication): 4 Stories
- US004: Register OAuth client
- US005: Request access token
- US006: Validate token
- US007: Refresh token
Epic 12 (User Management): 2 Stories
- US008: User profile settings
- US009: Account deletion
NEW EPIC NEEDED: 1 Story
- US010: Payment webhook handler
Suggested domain: Payment Processing
Confirm routing? (or reassign Stories between Epics)
Output: epicGroups — map of epicId to Story[] (for single-epic: one group with all Stories)
Objective: Determine execution mode based on existing Stories AND user intent, per each Epic group from Phase 3 routing.
Process: FOR EACH epicGroup in epicGroups, query task provider for existing Stories:
IF task_provider == "linear":
list_issues(project=epicGroup.epicId, label="user-story")
ELSE (file mode):
Glob("docs/tasks/epics/epic-{N}-*/stories/*/story.md")
Mode Detection (per epicGroup):
Analyze user request for keywords:
Decision matrix:
| Condition | Mode | Delegate To |
|---|---|---|
| Count = 0 | CREATE | Phase 5a: ln-221-story-creator |
| Count ≥ 1 AND ADD keywords | ADD | Phase 5c: ln-221-story-creator (appendMode) |
| Count ≥ 1 AND REPLAN keywords | REPLAN | Phase 5b: ln-222-story-replanner |
| Count ≥ 1 AND ambiguous | ASK USER | "Add new Story or revise the plan?" |
Important: Orchestrator loads metadata ONLY (ID, title, status). Workers load FULL descriptions (token efficiency).
Output: epicGroupModes — map of epicId to {mode, existingCount, epicData} for each group
Iteration: Process each epicGroup sequentially (workers include user interaction, cannot parallelize).
FOR EACH epicGroup in epicGroupModes:
IF mode == CREATE → Phase 5a (ln-221-story-creator)
IF mode == REPLAN → Phase 5b (ln-222-story-replanner)
IF mode == ADD → Phase 5c (ln-221-story-creator, appendMode)
Workers receive the same interface: epicData + idealPlan for ONE Epic.
Trigger: Epic has no Stories yet (first decomposition)
Delegation:
Call ln-221-story-creator via Skill tool:
Skill(
skill: "ln-221-story-creator",
epicData: {id, title, description},
idealPlan: [ /* 5-10 Stories from Phase 3 */ ],
standardsResearch: "Standards Research from Phase 2",
teamId: "team-id",
autoApprove: false // or true for automation
)
Worker handles:
Output: Created Story URLs + summary from worker
MANDATORY READ: Load references/replan_algorithm.md
Trigger: Epic already has Stories (requirements changed)
Delegation:
Call ln-222-story-replanner via Skill tool:
Skill(
skill: "ln-222-story-replanner",
epicData: {id, title, description},
idealPlan: [ /* 5-10 Stories from Phase 3 */ ],
standardsResearch: "Standards Research from Phase 2",
existingCount: N,
teamId: "team-id",
autoApprove: false // or true for automation
)
Worker handles:
Output: Operation results + warnings + affected Story URLs from worker
Trigger: Epic has Stories, user wants to ADD more (not replan existing)
Delegation:
Call ln-221-story-creator via Skill tool with appendMode:
Skill(
skill: "ln-221-story-creator",
appendMode: true, // ADD to existing, don't replace
epicData: {id, title, description},
newStoryDescription: userRequestedStory, // Single Story from user request
standardsResearch: "Standards Research from Phase 2",
teamId: "team-id",
autoApprove: false
)
appendMode: true — creates only user-requested Story(s), skips IDEAL plan comparison.
Worker handles:
Output: Created Story URL + summary from worker
After ALL workers complete (any mode: CREATE/REPLAN/ADD):
git add docs/tasks/kanban_board.md (updated by worker)git commit with message:
"ln-220: create Stories US{first}-US{last} for Epic {N}""ln-220: create Stories for Epics {N1}, {N2}, {N3}""ln-220: replan Stories for Epic {N}""ln-220: add Story US{num} to Epic {N}"Objective: Verify all skill phases completed and all planned Stories accounted for.
Process:
Phase Completion: Verify Phases 0-6 completed (or skipped with documented reason). Report any missed phase.
Story Accounting:
Epic Routing Verification (multi-epic only):
Output:
SELF-CHECK RESULTS
Phases: 7/7 completed (or K/7 + skipped reasons)
Stories: M/N created
Epics: K epic(s) processed
Status: PASS / FAIL (with details)
IF FAIL → list which Stories were lost, recommend re-running for missed epicGroups.
TodoWrite format (mandatory): Add phases to todos before starting:
- Phase 1: Context Assembly (in_progress)
- Phase 2: Standards Research — inline (pending)
- Phase 3: Build IDEAL Story Plan + Epic Routing (pending)
- Phase 4: Check Existing Stories (pending)
- Phase 5: Delegate to ln-221/ln-222 (pending)
- Wait for worker result (pending)
- Phase 6: Commit kanban changes (pending)
- Phase 7: Self-Check (pending)
Mark each as in_progress when starting, completed when done.
Calls:
Called by:
Upstream:
Downstream:
✅ Phase 1: Context Assembly Complete:
✅ Phase 2: Standards Research Complete:
✅ Phase 3: Planning + Routing Complete:
✅ Phase 4: Check Existing Complete:
✅ Phase 5: Delegation Complete:
✅ Phase 6: Commit Complete:
✅ Phase 7: Self-Check Complete:
CREATE MODE (First Time):
"Create stories for Epic 7: OAuth Authentication"
Process:
REPLAN MODE (Requirements Changed):
"Replan stories for Epic 7 - removed custom token formats, added scope management"
Process:
MULTI-EPIC MODE (Stories span multiple Epics):
"Create stories for user authentication and payment processing"
Process:
"ln-220: create Stories for Epics 7, 12"MANDATORY READ: Load shared/references/meta_analysis_protocol.md
Skill type: planning-coordinator. Run after all phases complete. Output to chat using the planning-coordinator format.
shared/references/tools_config_guide.mdshared/references/storage_mode_detection.mdshared/references/problem_solving.mdshared/references/orchestrator_pattern.mdshared/references/auto_discovery_pattern.mdshared/references/decompose_first_pattern.mdshared/references/numbering_conventions.md (Story sequential across Epics)Version: 5.0.0 Last Updated: 2026-02-03
Weekly Installs
149
Repository
GitHub Stars
245
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code135
gemini-cli134
codex134
opencode134
cursor132
github-copilot129
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
36,300 周安装
tech: "<languages, frameworks, key libraries from Epic context>", keyFiles: "<2-5 files/dirs most affected>", approach: "<1-line implementation strategy>", complexity: "Low|Medium|High (<reason>)" }
AC Quality Validation: Rules per creation_quality_checklist.md #4. Workers (ln-221, ln-222) must validate.