ln-221-story-creator by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-221-story-creatorPaths: 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}.
在 Linear 中根据 IDEAL 计划创建故事文档(创建模式)或将用户请求的故事追加到现有史诗中(添加模式)。由 ln-220-story-coordinator 调用。
通用的故事创建工厂工作者。支持两种模式:
由 ln-220-story-coordinator 调用(创建模式为第 5a 阶段,添加模式为第 5c 阶段)。
1. ln-220-story-coordinator 创建模式(第 5a 阶段):
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
epicData, idealPlan, standardsResearch, teamId, autoApprove2. ln-220-story-coordinator 添加模式(第 5c 阶段):
epicData, appendMode: true, newStoryDescription, standardsResearch, teamId对于创建模式(来自 ln-220-story-coordinator 第 5a 阶段):
{
epicData: {id, title, description},
idealPlan: [
{
number: "US004",
title: "Register OAuth client",
statement: {persona, capability, value},
ac: [GWT scenarios],
technicalNotes: {architecture, integrations, performance},
orchestratorBrief: {tech, keyFiles, approach, complexity},
estimatedHours: 12,
testCounts: {e2e: 2, integration: 5, unit: 11}
}
],
standardsResearch: "OAuth 2.0 (RFC 6749)...",
teamId: "team-id",
autoApprove: true
}
对于添加模式(来自 ln-220-story-coordinator 第 5c 阶段,带有 appendMode):
{
epicData: {id, title, description},
appendMode: true, // 表示添加模式 - 追加到现有故事
newStoryDescription: "用户请求的新故事",
standardsResearch: "仅针对新故事的聚焦研究",
teamId: "team-id",
autoApprove: false // 建议用户确认
}
true 表示添加模式 - 追加到现有故事| 输入 | 必需 | 来源 | 描述 |
|---|---|---|---|
epicId | 是 | args, kanban, user | 要处理的史诗 |
解析: 史诗解析链。状态过滤器: 活跃(已规划/已开始)
必读: 加载 shared/references/tools_config_guide.md, shared/references/storage_mode_detection.md, shared/references/input_resolution_pattern.md
提取:task_provider = 任务管理 → 提供者
必读: 加载 shared/references/creation_quality_checklist.md §故事创建清单,了解 ln-310 将强制执行的标准。
[!NOTE] 添加模式(appendMode: true):当向现有史诗添加故事时,工作流程被简化:
- 第 1 阶段:仅从
newStoryDescription生成请求的故事- 跳过完整的 IDEAL 计划比较
- 标准研究仅聚焦于新故事主题
- 其他阶段正常进行(INVEST、预览、创建)
步骤 0:解析 epicId(仅独立运行时使用 — 如果 ln-220 协调器提供了 epicData 则跳过):根据指南运行史诗解析链。
步骤 1:生成文档
加载故事模板(参见“模板加载”部分)并使用 9 个部分。
模板纪律(强制): 故事文档必须包含模板中 恰好 9 个部分:故事、上下文、验收标准、实施任务、测试策略、技术说明、完成定义、依赖关系、假设。不要添加额外部分(例如,“用户场景”、“行业基准”、“API 设计”)。不适合这 9 个部分的内容要么属于技术说明材料,要么超出范围。
对于 IDEAL 计划中的 每个 故事:
| 部分 | 内容 |
|---|---|
| 1. 故事 | 作为 [角色] / 我想要 [能力] / 以便 [价值] |
| 2. 上下文 | 当前状况(来自史诗范围界定)/ 期望结果(来自史诗成功标准) |
| 3. 验收标准 | 从 idealPlan 复制验收标准(3-5 个 GWT 场景) |
| 4. 实施任务 | 占位符:“任务将在 ln-310-multi-agent-validator 之后通过 ln-300-task-coordinator 创建” |
| 5. 测试策略 | 从 idealPlan 复制测试计数,基于风险的测试说明 |
| 6. 技术说明 | 插入协调者简报,来自 idealPlan[i].orchestratorBrief(标记 <!-- ORCHESTRATOR_BRIEF_START/END -->)。插入标准研究到库研究子部分 |
| 7. 完成定义 | 模板中的标准清单 |
| 8. 依赖关系 | 空 或 “依赖于:US00X”(如果排序暗示依赖关系) |
| 9. 假设 | 从技术说明 + 验收标准中提取:可行性(基础设施)、依赖关系(API)、数据(格式)、范围(排除项)。默认置信度:中等 |
输出: 包含 N 个完整故事文档(5-10 个)的数组,其中已插入标准研究。
对于 每个 故事,检查:
| 标准 | 检查 | 通过 | 失败 |
|---|---|---|---|
| 独立的 | 无循环依赖 | ✅ | ❌ 停止 |
| 可协商的 | 验收标准关注用户观察到的 什么,而非系统 如何 工作。涉及系统内部(查找优先级、缓存层、端点 URL、架构)的验收标准 → 移至技术说明 | ✅ | ❌ 停止 |
| 有价值的 | 清晰的“以便”价值 | ✅ | ❌ 停止 |
| 可估算的 | 大小在清单 #9 范围内 | ✅ | ❌ 停止 |
| 小的 | 验收标准/小时数/测试数符合清单 #9 | ✅ | ❌ 停止 |
| 可测试的 | 可衡量的验收标准(GWT 格式) | ✅ | ❌ 停止 |
如果任何故事失败则报错 → 报告给协调器,停止执行。
验收标准数量门控: 如果任何故事的验收标准数量 >5 → 停止。报告给协调器:“故事 USXXX 有 N 个验收标准(限制:5)。需要拆分。” 不要继续创建。
史诗 7 的故事创建预览:OAuth 认证
将创建 5 个故事:
1. US004: 注册 OAuth 客户端
角色:第三方开发者 | 能力:注册应用,获取凭证
价值:可以与 API 集成 | 验收标准:4 | 估算:12h | 测试:18
2. US005: 请求访问令牌
角色:API 客户端 | 能力:交换凭证以获取令牌
价值:向 API 认证 | 验收标准:5 | 估算:18h | 测试:24
... (还有 3 个)
总计:5 个故事,62h,90 个测试
标准研究:OAuth 2.0 (RFC 6749), RFC 7636 (PKCE), RFC 7009 (撤销)
故事排序:依赖感知(US004 → US005 → US006)
INVEST 验证:✓
输入 "confirm" 以创建。
如果 autoApprove=true: 跳过确认 → 第 5 阶段 否则: 等待“confirm”
创建故事(取决于提供者):
如果 task_provider == "linear":
for each Story:
save_issue({
title: Story.number + ": " + Story.title,
description: Story.generated_document,
project: epicData.id,
team: teamId,
labels: ["user-story"],
state: "Backlog"
})
否则(文件模式):
for each Story:
mkdir -p docs/tasks/epics/epic-{N}-{slug}/stories/us{NNN}-{story-slug}/tasks/
Write("docs/tasks/epics/epic-{N}-{slug}/stories/us{NNN}-{story-slug}/story.md")
// 包含文件头:**Status:** Backlog, **Epic:** Epic {N}, **Labels:** user-story, **Created:** {date}
更新 kanban_board.md:
史诗分组算法:
### Backlog**Epic {epicNumber}: {epicTitle}**
**Epic N: Epic Title**格式:
**Epic 7: OAuth Authentication**
📖 [ID: US004 Register OAuth client](url)
_(tasks not created yet)_
📖 [ID: US005 Request access token](url)
_(tasks not created yet)_
更新史诗故事计数器表:
返回:
为史诗 7 创建的故事:OAuth Authentication
✓ 在 Linear 中创建了 5 个故事:
1. [ID: US004 Register OAuth client](url)
2. [ID: US005 Request access token](url)
3. [ID: US006 Validate access token](url)
4. [ID: US007 Refresh expired token](url)
5. [ID: US008 Revoke token](url)
✓ 更新了 kanban_board.md(待办事项 + 史诗故事计数器)
✓ 包含标准研究:OAuth 2.0, RFC 7636 PKCE, RFC 7009 Revocation
总计:5 个故事,62h,90 个测试
后续步骤:
1. 运行 ln-310-multi-agent-validator 以验证故事(待办事项 → 待处理)
2. 使用 ln-300-task-coordinator 创建任务
| 规则 | 描述 |
|---|---|
| 标准研究插入 | 必须在 每个 故事的技术说明 → 库研究部分插入(防止过时的库选择导致 ln-400 返工) |
| INVEST 验证 | 所有故事在创建前必须通过(如果 任何 失败则停止) |
| 模板所有权 | 此技能拥有 references/ 中的 story_template_universal.md |
| 史诗分组 | 如果存在则重用史诗标题(按史诗编号搜索),不要重复 |
| 故事编号 | 跨 所有 史诗顺序编号(从 kanban_board.md 读取下一个故事) |
| 无代码 | 描述仅包含方法,不包含代码 |
| 模板纪律 | 故事文档包含 恰好 9 个 模板部分。无额外部分(用户场景、行业基准等)。非模板内容 → 技术说明或丢弃 |
| 验收标准纯净性 | 验收标准仅描述可观察的用户行为。系统内部(架构、端点设计、缓存层) → 技术说明 |
✅ 第 1 阶段:
✅ 第 2 阶段:
✅ 第 3 阶段:
✅ 第 4 阶段:
✅ 第 5 阶段:
必读: 加载 shared/references/template_loading_pattern.md 以了解模板复制工作流程。
模板: story_template.md 本地副本: docs/templates/story_template.md(在目标项目中)
shared/references/tools_config_guide.mdshared/references/storage_mode_detection.mdshared/references/kanban_update_algorithm.mdshared/references/template_loading_pattern.mdshared/references/linear_creation_workflow.md位置: shared/templates/story_template.md(集中式) 本地副本: docs/templates/story_template.md(在目标项目中) 目的: 通用故事模板(9 个部分) 模板版本: 9.0.0
调用者: ln-220-story-coordinator
返回:
此工作者不负责:
版本: 3.0.0 最后更新: 2025-12-23
每周安装次数
145
仓库
GitHub 星标
245
首次出现
2026年1月24日
安全审计
安装于
claude-code132
opencode130
codex130
gemini-cli129
cursor128
github-copilot124
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}.
Creates Story documents in Linear from IDEAL plan (CREATE mode) or appends user-requested Stories to existing Epic (ADD mode). Invoked by ln-220-story-coordinator.
Universal factory worker for creating Stories. Supports two modes:
Invoked by ln-220-story-coordinator (Phase 5a for CREATE, Phase 5c for ADD).
1. ln-220-story-coordinator CREATE MODE (Phase 5a):
epicData, idealPlan, standardsResearch, teamId, autoApprove2. ln-220-story-coordinator ADD MODE (Phase 5c):
epicData, appendMode: true, newStoryDescription, standardsResearch, teamIdFor CREATE MODE (from ln-220-story-coordinator Phase 5a):
{
epicData: {id, title, description},
idealPlan: [
{
number: "US004",
title: "Register OAuth client",
statement: {persona, capability, value},
ac: [GWT scenarios],
technicalNotes: {architecture, integrations, performance},
orchestratorBrief: {tech, keyFiles, approach, complexity},
estimatedHours: 12,
testCounts: {e2e: 2, integration: 5, unit: 11}
}
],
standardsResearch: "OAuth 2.0 (RFC 6749)...",
teamId: "team-id",
autoApprove: true
}
For ADD MODE (from ln-220-story-coordinator Phase 5c with appendMode):
{
epicData: {id, title, description},
appendMode: true, // Signals ADD MODE - append to existing
newStoryDescription: "User's request for new Story",
standardsResearch: "Focused research for new Story only",
teamId: "team-id",
autoApprove: false // User confirmation recommended
}
true signals ADD MODE - append to existing Stories| Input | Required | Source | Description |
|---|---|---|---|
epicId | Yes | args, kanban, user | Epic to process |
Resolution: Epic Resolution Chain. Status filter: Active (planned/started)
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
MANDATORY READ: Load shared/references/creation_quality_checklist.md §Story Creation Checklist for validation criteria that ln-310 will enforce.
[!NOTE] ADD MODE (appendMode: true) : When adding Stories to existing Epic, workflow is simplified:
- Phase 1: Generate only requested Story(s) from
newStoryDescription- Skip full IDEAL plan comparison
- Standards Research is focused only on new Story topics
- Other phases proceed normally (INVEST, Preview, Create)
Step 0: Resolve epicId (standalone only — skip if epicData provided by ln-220 orchestrator): Run Epic Resolution Chain per guide.
Step 1: Generate Documents
Load story template (see "Template Loading" section) and use 9 sections.
Template Discipline (MANDATORY): Story documents contain EXACTLY 9 sections from the template: Story, Context, Acceptance Criteria, Implementation Tasks, Test Strategy, Technical Notes, Definition of Done, Dependencies, Assumptions. Do NOT add extra sections (e.g., "User Scenarios", "Industry Benchmark", "API Design"). Content that does not fit the 9 sections is either Technical Notes material or out of scope.
For EACH Story in IDEAL plan:
| Section | Content |
|---|---|
| 1. Story | As a [persona] / I want [capability] / So that [value] |
| 2. Context | Current Situation (from Epic Scope Out) / Desired Outcome (from Epic Success Criteria) |
| 3. Acceptance Criteria | Copy AC from idealPlan (3-5 GWT scenarios) |
| 4. Implementation Tasks | Placeholder: "Tasks created via ln-300-task-coordinator after ln-310-multi-agent-validator" |
| 5. Test Strategy | Copy test counts from idealPlan, Risk-Based Testing note |
| 6. Technical Notes | INSERT Orchestrator Brief from idealPlan[i].orchestratorBrief (markers <!-- ORCHESTRATOR_BRIEF_START/END -->). INSERT Standards Research in Library Research subsection |
Output: Array of N complete Story documents (5-10) with Standards Research inserted.
For EACH Story, check:
| Criterion | Check | Pass | Fail |
|---|---|---|---|
| Independent | No circular dependencies | ✅ | ❌ STOP |
| Negotiable | AC focus on WHAT user observes, not HOW system works. ACs with system internals (lookup priority, cache layers, endpoint URLs, architecture) → move to Technical Notes | ✅ | ❌ STOP |
| Valuable | Clear "So that" value | ✅ | ❌ STOP |
| Estimable | Size within checklist #9 range | ✅ | ❌ STOP |
| Small | AC/hours/tests per checklist #9 | ✅ | ❌ STOP |
| Testable | Measurable AC (GWT format) | ✅ |
Error if ANY Story fails → Report to orchestrator, stop execution.
AC Count Gate: If any Story has >5 ACs → STOP. Report to orchestrator: "Story USXXX has N ACs (limit: 5). Split required." Do not proceed with creation.
STORY CREATION PREVIEW for Epic 7: OAuth Authentication
Will create 5 Stories:
1. US004: Register OAuth client
Persona: Third-party developer | Capability: Register app, get credentials
Value: Can integrate with API | AC: 4 | Estimate: 12h | Tests: 18
2. US005: Request access token
Persona: API client | Capability: Exchange credentials for token
Value: Authenticate to API | AC: 5 | Estimate: 18h | Tests: 24
... (3 more)
Total: 5 Stories, 62h, 90 tests
Standards Research: OAuth 2.0 (RFC 6749), RFC 7636 (PKCE), RFC 7009 (Revocation)
Story ordering: Dependency-aware (US004 → US005 → US006)
INVEST validation: ✓
Type "confirm" to create.
If autoApprove=true: Skip confirmation → Phase 5 Otherwise: Wait for "confirm"
Create Stories (provider-dependent):
IF task_provider == "linear":
for each Story:
save_issue({
title: Story.number + ": " + Story.title,
description: Story.generated_document,
project: epicData.id,
team: teamId,
labels: ["user-story"],
state: "Backlog"
})
ELSE (file mode):
for each Story:
mkdir -p docs/tasks/epics/epic-{N}-{slug}/stories/us{NNN}-{story-slug}/tasks/
Write("docs/tasks/epics/epic-{N}-{slug}/stories/us{NNN}-{story-slug}/story.md")
// Include file headers: **Status:** Backlog, **Epic:** Epic {N}, **Labels:** user-story, **Created:** {date}
Update kanban_board.md:
Epic Grouping Algorithm:
### Backlog**Epic {epicNumber}: {epicTitle}**
**Epic N: Epic Title**Format:
**Epic 7: OAuth Authentication**
📖 [ID: US004 Register OAuth client](url)
_(tasks not created yet)_
📖 [ID: US005 Request access token](url)
_(tasks not created yet)_
Update Epic Story Counters table:
Return:
STORIES CREATED for Epic 7: OAuth Authentication
✓ Created 5 Stories in Linear:
1. [ID: US004 Register OAuth client](url)
2. [ID: US005 Request access token](url)
3. [ID: US006 Validate access token](url)
4. [ID: US007 Refresh expired token](url)
5. [ID: US008 Revoke token](url)
✓ kanban_board.md updated (Backlog + Epic Story Counters)
✓ Standards Research included: OAuth 2.0, RFC 7636 PKCE, RFC 7009 Revocation
Total: 5 Stories, 62h, 90 tests
NEXT STEPS:
1. Run ln-310-multi-agent-validator to validate Stories (Backlog → Todo)
2. Use ln-300-task-coordinator to create tasks
| Rule | Description |
|---|---|
| Standards Research Insertion | MUST insert in EVERY Story Technical Notes → Library Research (prevents outdated library choices causing rework in ln-400) |
| INVEST Validation | All Stories must pass before creation (stop if ANY fails) |
| Template Ownership | This skill owns story_template_universal.md in references/ |
| Epic Grouping | Reuse Epic header if exists (search by Epic number), don't duplicate |
| Story Numbering | Sequential across ALL Epics (read Next Story from kanban_board.md) |
| No Code | Descriptions contain approach ONLY, not code |
| Template Discipline | Story documents contain EXACTLY 9 template sections. No extra sections (User Scenarios, Industry Benchmark, etc.). Non-template content → Technical Notes or discard |
| AC Purity | ACs describe observable user behavior only. System internals (architecture, endpoint design, cache layers) → Technical Notes |
✅ Phase 1:
✅ Phase 2:
✅ Phase 3:
✅ Phase 4:
✅ Phase 5:
MANDATORY READ: Load shared/references/template_loading_pattern.md for template copy workflow.
Template: story_template.md Local copy: docs/templates/story_template.md (in target project)
shared/references/tools_config_guide.mdshared/references/storage_mode_detection.mdshared/references/kanban_update_algorithm.mdshared/references/template_loading_pattern.mdshared/references/linear_creation_workflow.mdLocation: shared/templates/story_template.md (centralized) Local Copy: docs/templates/story_template.md (in target project) Purpose: Universal Story template (9 sections) Template Version: 9.0.0
Called by: ln-220-story-coordinator
Returns:
Worker does NOT:
Version: 3.0.0 Last Updated: 2025-12-23
Weekly Installs
145
Repository
GitHub Stars
245
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code132
opencode130
codex130
gemini-cli129
cursor128
github-copilot124
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
40,000 周安装
| Standard checklist from template |
| 8. Dependencies | Empty OR "Depends On: US00X" if ordering implies dependency |
| 9. Assumptions | Extract from Technical Notes + AC: FEASIBILITY (infra), DEPENDENCY (APIs), DATA (format), SCOPE (exclusions). Default confidence: MEDIUM |
| ❌ STOP |