ln-310-story-validator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Story Verification Skill

Story验证技能

Validate Stories/Tasks with explicit GO/NO-GO verdict, Readiness Score, and Anti-Hallucination verification.
对用户故事(Stories)/任务(Tasks)进行验证,明确给出GO/NO-GO结论、就绪度评分以及反幻觉验证结果。

Purpose & Scope

目标与范围

  • Validate Story plus child Tasks against industry standards and project patterns
  • Calculate Penalty Points for violations, then auto-fix to reach 0 points
  • Delegate to ln-002-best-practices-researcher for creating documentation (guides, manuals, ADRs, research)
  • Support Plan Mode: show audit results, wait for approval, then fix
  • Approve Story after fixes (Backlog -> Todo) with tabular output summary
  • 对照行业标准和项目模式,验证用户故事及其子任务
  • 针对违规项计算扣分项,然后自动修复以将扣分项降至0
  • 委托ln-002-best-practices-researcher创建文档(指南、手册、架构决策记录ADR、研究报告)
  • 支持计划模式:展示审计结果,等待审批后再执行修复
  • 修复完成后批准用户故事(从待办积压Backlog移至待办Todo),并以表格形式输出摘要

When to Use

使用场景

  • Reviewing Stories before approval (Backlog -> Todo)
  • Validating implementation path across Story and Tasks
  • Ensuring standards, architecture, and solution fit
  • Optimizing or correcting proposed approaches
  • 批准前评审用户故事(从Backlog移至Todo)
  • 验证用户故事与任务的实现路径一致性
  • 确保符合标准、架构和解决方案要求
  • 优化或修正拟议的实现方案

Penalty Points System

扣分项系统

Goal: Quantitative assessment of Story/Tasks quality. Target = 0 penalty points after fixes.
SeverityPointsDescription
CRITICAL10RFC/OWASP/security violations
HIGH5Outdated libraries, architecture issues
MEDIUM3Best practices violations
LOW1Structural/cosmetic issues
Workflow:
  1. Audit: Calculate penalty points for all 17 criteria
  2. Fix: Auto-fix and zero out points
  3. Report: Total Before -> 0 After
目标: 量化评估用户故事/任务的质量。修复后的目标扣分项为0。
严重程度扣分描述
CRITICAL(严重)10违反RFC/OWASP/安全标准
HIGH(高)5使用过时库、架构问题
MEDIUM(中)3违反最佳实践
LOW(低)1结构/格式问题
工作流程:
  1. 审计:针对全部17项准则计算扣分项
  2. 修复:自动修复问题,将扣分项清零
  3. 报告:展示修复前总分 → 修复后0分

Mode Detection

模式检测

Detect operating mode at startup:
Plan Mode Active:
  • Phase 1-2: Full audit (discovery + research + penalty calculation)
  • Phase 3: Show results + fix plan -> WAIT for user approval
  • Phase 4-5: After approval -> execute fixes
Normal Mode:
  • Phase 1-5: Standard workflow without stopping
  • Automatically fix and approve
启动时自动检测运行模式:
计划模式激活:
  • 阶段1-2:完整审计(发现+研究+扣分计算)
  • 阶段3:展示结果+修复计划 → 等待用户审批
  • 阶段4-5:获得审批后 → 执行修复
普通模式:
  • 阶段1-5:执行标准工作流程,无需停顿
  • 自动完成修复并批准

Workflow Overview

工作流程概述

Phase 1: Discovery & Loading

阶段1:发现与加载

Step 1: Configuration & Metadata Loading
  • Auto-discover configuration: Team ID (
    docs/tasks/kanban_board.md
    ), project docs (
    CLAUDE.md
    ), epic from Story.project
  • Load metadata only: Story ID/title/status/labels, child Task IDs/titles/status/labels
  • Expect 3-8 implementation tasks; record parentId for filtering
  • Rationale: keep loading light; full descriptions arrive in Phase 2
步骤1:配置与元数据加载
  • 自动发现配置:团队ID(来自
    docs/tasks/kanban_board.md
    )、项目文档(
    CLAUDE.md
    )、用户故事所属的史诗(epic)
  • 仅加载元数据:用户故事ID/标题/状态/标签、子任务ID/标题/状态/标签
  • 预期包含3-8个实现任务;记录父ID用于筛选
  • 设计思路:轻量加载;完整描述将在阶段2获取

Phase 2: Research & Audit

阶段2:研究与审计

Always execute for every Story - no exceptions.
Step 1: Domain Extraction
  • Extract technical domains from Story title + Technical Notes + Implementation Tasks
  • Load pattern registry from
    references/domain_patterns.md
  • Scan Story content for pattern matches via keyword detection
  • Build list of detected domains requiring documentation
Step 2: Documentation Delegation
  • For EACH detected pattern, delegate to ln-002:
    Skill(skill="ln-002-best-practices-researcher",
          args="doc_type=[guide|manual|adr] topic='[pattern]'")
  • Receive file paths to created documentation (
    docs/guides/
    ,
    docs/manuals/
    ,
    docs/adrs/
    ,
    docs/research/
    )
Step 3: Research via MCP
  • Query MCP Ref for industry standards:
    ref_search_documentation(query="[topic] RFC OWASP best practices 2025")
  • Query Context7 for library versions:
    resolve-library-id
    +
    query-docs
  • Extract: standards (RFC numbers, OWASP rules), library versions, patterns
Step 3.5: Anti-Hallucination Verification
  • Scan Story/Tasks for technical claims (RFC references, library versions, security requirements)
  • Verify each claim has MCP Ref/Context7 evidence
  • Flag unverified claims for correction
  • Status: VERIFIED (all sourced) or FLAGGED (list unverified)
Step 4: Penalty Points Calculation
  • Evaluate all 17 criteria against Story/Tasks
  • Assign penalty points per violation (CRITICAL=10, HIGH=5, MEDIUM=3, LOW=1)
  • Calculate total penalty points
  • Build fix plan for each violation
所有用户故事必须执行此阶段,无例外。
步骤1:领域提取
  • 从用户故事标题+技术说明+实现任务中提取技术领域
  • references/domain_patterns.md
    加载模式注册表
  • 通过关键词检测扫描用户故事内容,匹配模式
  • 构建需要文档支持的已检测领域列表
步骤2:文档委托
  • 针对每个已检测到的模式,委托给ln-002:
    Skill(skill="ln-002-best-practices-researcher",
          args="doc_type=[guide|manual|adr] topic='[pattern]'")
  • 接收生成的文档路径(存储在
    docs/guides/
    docs/manuals/
    docs/adrs/
    docs/research/
步骤3:通过MCP进行研究
  • 查询MCP Ref获取行业标准:
    ref_search_documentation(query="[topic] RFC OWASP best practices 2025")
  • 查询Context7获取库版本:
    resolve-library-id
    +
    query-docs
  • 提取内容:标准(RFC编号、OWASP规则)、库版本、模式
步骤3.5:反幻觉验证
  • 扫描用户故事/任务中的技术声明(RFC引用、库版本、安全要求)
  • 验证每个声明都有MCP Ref/Context7的证据支持
  • 标记未经验证的声明以便修正
  • 状态:VERIFIED(所有声明均有来源)或FLAGGED(列出未验证项)
步骤4:扣分项计算
  • 对照用户故事/任务评估全部17项准则
  • 根据违规严重程度分配扣分项(严重=10,高=5,中=3,低=1)
  • 计算总扣分项
  • 针对每个违规项制定修复计划

Phase 3: Audit Results & Fix Plan

阶段3:审计结果与修复计划

Display audit results:
  • Penalty Points table (criterion, severity, points, description)
  • Total: X penalty points
  • Fix Plan: list of fixes for each criterion
Mode handling:
  • IF Plan Mode: Show results + "After your approval, changes will be applied" -> WAIT
  • ELSE (Normal Mode): Proceed to Phase 4 immediately
展示审计结果:
  • 扣分项表格(准则、严重程度、扣分、描述)
  • 总分:X扣分项
  • 修复计划:列出每个准则对应的修复项
模式处理:
  • 若为计划模式: 展示结果并提示“获得您的批准后,将应用变更” → 等待
  • 否则(普通模式): 直接进入阶段4

Phase 4: Auto-Fix

阶段4:自动修复

Execute fixes for ALL 19 criteria on the spot.
  • Execution order (7 groups):
    1. Structural (#1-#4) — Story/Tasks template compliance + AC completeness/specificity
    2. Standards (#5) — RFC/OWASP compliance FIRST (before YAGNI/KISS!)
    3. Solution (#6) — Library versions
    4. Workflow (#7-#13) — Test strategy, docs integration, size, cleanup, YAGNI, KISS, task order, Database Creation
    5. Quality (#14-#15) — Documentation complete, hardcoded values
    6. Dependencies (#18-#19) — Story/Task independence (no forward dependencies)
    7. Traceability (#16-#17) — Story-Task alignment, AC coverage quality (LAST, after all fixes)
  • Use Auto-Fix Actions table below as authoritative checklist
  • Zero out penalty points as fixes applied
  • Test Strategy section must exist but remain empty (testing handled separately)
立即针对全部19项准则执行修复。
  • 执行顺序(7组):
    1. 结构类(#1-#4) — 用户故事/任务模板合规性+验收标准(AC)完整性与明确性
    2. 标准类(#5) — 优先确保RFC/OWASP合规(先于YAGNI/KISS原则!)
    3. 解决方案类(#6) — 库版本
    4. 工作流类(#7-#13) — 测试策略、文档集成、规模、清理、YAGNI、KISS、任务顺序、数据库创建
    5. 质量类(#14-#15) — 文档完整性、硬编码值
    6. 依赖类(#18-#19) — 用户故事/任务独立性(无前置依赖)
    7. 可追溯性类(#16-#17) — 用户故事-任务对齐、验收标准覆盖质量(最后执行,在所有修复完成后)
  • 以下方的自动修复操作表作为权威检查清单
  • 修复完成后将扣分项清零
  • 测试策略部分必须存在但保持为空(测试由其他模块单独处理)

Phase 5: Approve & Notify

阶段5:批准与通知

  • Set Story + all Tasks to Todo (Linear); update
    kanban_board.md
    with APPROVED marker
  • Add Linear comment with full validation summary:
    • Penalty Points table (Before -> After = 0)
    • Auto-Fixes Applied table
    • Documentation Created table (docs created via ln-002)
    • Standards Compliance Evidence table
  • Display tabular output (Unicode box-drawing) to terminal
  • Final: Total Penalty Points = 0
  • Optional: If
    --execute
    flag provided, delegate to ln-400-story-executor to start execution immediately after approval
  • 将用户故事及所有任务设置为Todo状态(在Linear中);更新
    kanban_board.md
    并添加APPROVED标记
  • 添加Linear评论,包含完整的验证摘要:
    • 扣分项表格(修复前 → 修复后=0)
    • 已应用的自动修复表格
    • 已创建的文档表格(通过ln-002生成的文档)
    • 标准合规性证据表格
  • 在终端以表格形式输出(使用Unicode框线绘制)
  • 最终状态:总扣分项=0
  • 可选: 若提供
    --execute
    参数,修复批准后立即委托ln-400-story-executor启动执行

Auto-Fix Actions Reference

自动修复操作参考

Structural (#1-#4)

结构类(#1-#4)

#CriterionWhat it checksPenaltyAuto-fix actions
1Story Structure8 sections per templateLOW (1)Add/reorder sections with TODO placeholders; update Linear
2Tasks StructureEach Task has 7 sectionsLOW (1)Load each Task; add/reorder sections; update Linear
3Story StatementAs a/I want/So that clarityLOW (1)Rewrite using persona/capability/value; update Linear
4Acceptance CriteriaGiven/When/Then, 3-5 itemsMEDIUM (3)Normalize to G/W/T; add edge cases; update Linear
#准则检查内容扣分自动修复操作
1用户故事结构符合8个章节的模板要求LOW(1)添加/调整章节顺序并插入TODO占位符;更新Linear
2任务结构每个任务包含7个章节LOW(1)加载每个任务;添加/调整章节顺序;更新Linear
3用户故事声明符合“As a/I want/So that”的清晰表述LOW(1)重写为角色/能力/价值的结构;更新Linear
4验收标准符合Given/When/Then格式,包含3-5项内容MEDIUM(3)标准化为G/W/T格式;添加边缘场景;更新Linear

Standards (#5)

标准类(#5)

#CriterionWhat it checksPenaltyAuto-fix actions
5Standards ComplianceRFC, OWASP, REST, SecurityCRITICAL (10)Query MCP Ref; update Technical Notes with compliant approach
#准则检查内容扣分自动修复操作
5标准合规性符合RFC、OWASP、REST、安全标准CRITICAL(10)查询MCP Ref;更新技术说明为合规方案

Solution (#6)

解决方案类(#6)

#CriterionWhat it checksPenaltyAuto-fix actions
6Library & VersionLibraries are latest stableHIGH (5)Query Context7; update to recommended versions
#准则检查内容扣分自动修复操作
6库与版本使用最新稳定版库HIGH(5)查询Context7;更新为推荐版本

Workflow (#7-#13)

工作流类(#7-#13)

#CriterionWhat it checksPenaltyAuto-fix actions
7Test StrategySection exists but emptyLOW (1)Ensure section present; leave empty (testing handled separately)
8Documentation IntegrationNo standalone doc tasksMEDIUM (3)Remove doc-only tasks; fold into implementation DoD
9Story Size3-8 tasks; 3-5h eachMEDIUM (3)If <3 or >8, add TODO; flag task size issues
10Test Task CleanupNo premature test tasksMEDIUM (3)Remove test tasks before final; testing appears later
11YAGNINo premature featuresMEDIUM (3)Move speculative items to Out of Scope unless standards require
12KISSSimplest solutionMEDIUM (3)Simplify unless standards require complexity
13Task OrderDB→Service→API→UIMEDIUM (3)Reorder Tasks foundation-first
#准则检查内容扣分自动修复操作
7测试策略存在该章节但内容为空LOW(1)确保章节存在;保持为空(测试由其他模块单独处理)
8文档集成无独立的文档任务MEDIUM(3)删除仅含文档的任务;将文档要求纳入实现任务的完成定义(DoD)
9用户故事规模包含3-8个任务;每个任务耗时3-5小时MEDIUM(3)若任务数<3或>8,添加TODO;标记任务规模问题
10测试任务清理无提前创建的测试任务MEDIUM(3)删除最终阶段前的测试任务;测试任务将在后续阶段添加
11YAGNI原则无提前实现的功能MEDIUM(3)将推测性功能移至“超出范围”,除非标准要求必须实现
12KISS原则使用最简解决方案MEDIUM(3)简化方案,除非标准要求必须复杂实现
13任务顺序遵循DB→Service→API→UI的顺序MEDIUM(3)重新排序任务,优先实现基础组件

Quality (#14-#15)

质量类(#14-#15)

#CriterionWhat it checksPenaltyAuto-fix actions
14Documentation CompletePattern docs exist + referencedHIGH (5)Delegate to ln-002; add all doc links to Technical Notes
15Code Quality BasicsNo hardcoded valuesMEDIUM (3)Add TODOs for constants/config/env
#准则检查内容扣分自动修复操作
14文档完整性存在模式文档并已引用HIGH(5)委托ln-002生成文档;在技术说明中添加所有文档链接
15代码质量基础无硬编码值MEDIUM(3)添加TODO标记,提示替换为常量/配置/环境变量

Traceability (#16-#17)

可追溯性类(#16-#17)

#CriterionWhat it checksPenaltyAuto-fix actions
16Story-Task AlignmentTasks implement Story statementMEDIUM (3)Add TODO to misaligned Tasks; warn user
17AC-Task CoverageEach AC has implementing TaskMEDIUM (3)Add TODO for uncovered ACs; suggest missing Tasks
#准则检查内容扣分自动修复操作
16用户故事-任务对齐任务实现用户故事声明MEDIUM(3)对未对齐的任务添加TODO标记;向用户发出警告
17验收标准-任务覆盖每个验收标准都有对应的实现任务MEDIUM(3)对未覆盖的验收标准添加TODO标记;建议补充缺失的任务

Dependencies (#18-#19)

依赖类(#18-#19)

#CriterionWhat it checksPenaltyAuto-fix actions
18Story DependenciesNo forward Story dependenciesCRITICAL (10)Flag forward dependencies; suggest reorder
19Task DependenciesNo forward Task dependenciesMEDIUM (3)Flag forward dependencies; reorder Tasks
Maximum Penalty: 60 points
#准则检查内容扣分自动修复操作
18用户故事依赖无前置用户故事依赖CRITICAL(10)标记前置依赖;建议重新排序
19任务依赖无前置任务依赖MEDIUM(3)标记前置依赖;重新排序任务
最高扣分项: 60分

Final Assessment Model

最终评估模型

Outputs after all fixes applied:
MetricValueMeaning
GateGO / NO-GOFinal verdict for execution readiness
Readiness Score1-10Quality confidence level
Penalty Points0 (after fixes)Validation completeness
Anti-HallucinationVERIFIED / FLAGGEDTechnical claims verified
AC Coverage100% (N/N)All ACs mapped to Tasks
所有修复完成后的输出:
指标取值含义
Gate(准入)GO / NO-GO执行就绪度的最终结论
就绪度评分1-10质量置信度等级
扣分项0(修复后)验证完成度
反幻觉验证VERIFIED / FLAGGED技术声明是否已验证
验收标准覆盖率100%(N/N)所有验收标准均映射到任务

Readiness Score Calculation

就绪度评分计算

Readiness Score = 10 - (Penalty Points / 5)
ScoreStatusGate
9-10ExcellentGO
7-8GoodGO
5-6AcceptableGO (with notes)
3-4ConcernsNO-GO (requires review)
1-2CriticalNO-GO (major issues)
Readiness Score = 10 - (Penalty Points / 5)
评分状态准入结论
9-10优秀GO
7-8良好GO
5-6可接受GO(附带说明)
3-4存在问题NO-GO(需评审)
1-2严重问题NO-GO(重大问题)

Anti-Hallucination Verification

反幻觉验证

Verify technical claims have evidence:
Claim TypeVerification
RFC/Standard referenceMCP Ref search confirms existence
Library versionContext7 query confirms version
Security requirementOWASP/CWE reference exists
Performance claimBenchmark/doc reference
Status: VERIFIED (all claims sourced) or FLAGGED (unverified claims listed)
验证技术声明是否有证据支持:
声明类型验证方式
RFC/标准引用通过MCP Ref搜索确认存在
库版本通过Context7查询确认版本有效性
安全要求存在OWASP/CWE引用
性能声明存在基准测试/文档引用
状态: VERIFIED(所有声明均有来源)或FLAGGED(列出未验证声明)

Task-AC Coverage Matrix

任务-验收标准覆盖矩阵

Output explicit mapping:
| AC | Task(s) | Coverage |
|----|---------|----------|
| AC1: Given/When/Then | T-001, T-002 | ✅ |
| AC2: Given/When/Then | T-003 | ✅ |
| AC3: Given/When/Then | — | ❌ UNCOVERED |
Coverage:
{covered}/{total} ACs
(target: 100%)
输出明确的映射关系:
| AC | Task(s) | Coverage |
|----|---------|----------|
| AC1: Given/When/Then | T-001, T-002 | ✅ |
| AC2: Given/When/Then | T-003 | ✅ |
| AC3: Given/When/Then | — | ❌ UNCOVERED |
覆盖率:
{已覆盖数}/{总数}
验收标准(目标:100%)

Self-Audit Protocol (Mandatory)

自审计协议(强制要求)

Before marking any criterion as complete, provide concrete evidence (doc path, MCP result, Linear update).
#Self-Audit QuestionRequired Evidence
1Validated all 8 Story sections?Section list
2Loaded full description for each Task?Task validation count
3Statement in As a/I want/So that?Quoted statement
4AC are G/W/T and testable?AC count and format
5Verified RFC/OWASP/REST compliance?Standards list + MCP result
6Checked library versions via Context7?Context7 result
7Test Strategy kept empty?Note that testing deferred
8Docs integrated, no standalone tasks?Integration evidence
9Task count 3-8 and 3-5h?Task count/sizes
10No premature test tasks?Search result
11Only current-scope features (YAGNI)?Scope review
12Simplest approach within standards (KISS)?Simplicity justification
13Tasks ordered Foundation-First?Task order list
14All pattern docs exist and referenced?Doc paths from ln-002
15Hardcoded values handled?TODO/config evidence
16Each Task aligns with Story statement?Alignment check result
17Each AC has implementing Task?Coverage matrix
在标记任何准则为完成前,需提供具体证据(文档路径、MCP结果、Linear更新记录)。
#自审计问题所需证据
1是否已验证全部8个用户故事章节?章节列表
2是否已加载每个任务的完整描述?任务验证计数
3用户故事声明是否符合As a/I want/So that格式?引用声明内容
4验收标准是否为G/W/T格式且可测试?验收标准数量与格式说明
5是否已验证RFC/OWASP/REST合规性?标准列表+MCP结果
6是否已通过Context7检查库版本?Context7查询结果
7测试策略是否保持为空?测试延迟处理的说明
8是否已集成文档,无独立文档任务?集成证据
9任务数是否为3-8个且每个任务耗时3-5小时?任务数量/规模说明
10是否无提前创建的测试任务?搜索结果
11是否仅包含当前范围内的功能(符合YAGNI原则)?范围评审结果
12是否在标准允许范围内使用最简方案(符合KISS原则)?简化方案的合理性说明
13任务是否按基础优先的顺序排列?任务顺序列表
14所有模式文档是否已存在并被引用?ln-002返回的文档路径
15硬编码值是否已处理?TODO/配置证据
16每个任务是否与用户故事声明对齐?对齐检查结果
17每个验收标准是否有对应的实现任务?覆盖矩阵

Definition of Done

完成定义

  • Phase 1: Auto-discovery done; Story + Tasks metadata loaded; task count checked
  • Phase 2: Domain extraction complete; ln-002 delegated for docs; MCP research done; Anti-Hallucination verification done; Penalty Points calculated
  • Phase 3: Audit results shown; IF Plan Mode: user approved
  • Phase 4: All 17 criteria auto-fixed; Penalty Points = 0; Test Strategy empty; test tasks removed
  • Phase 5: Final Assessment output:
    yaml
    gate: GO | NO-GO
    readiness_score: {1-10}
    penalty_points: 0 (was {N})
    anti_hallucination: VERIFIED | FLAGGED
    ac_coverage: "{N}/{M} (100%)"
    ac_matrix:
      - ac: "AC1"
        tasks: ["T-001", "T-002"]
        status: covered
  • Story/Tasks set to Todo;
    kanban_board.md
    updated; Linear comment with Final Assessment added
  • Optional: If
    --execute
    flag, ln-400-story-executor invoked after approval
  • 阶段1: 自动发现完成;已加载用户故事+任务元数据;已检查任务数量
  • 阶段2: 领域提取完成;已委托ln-002生成文档;MCP研究完成;反幻觉验证完成;扣分项计算完成
  • 阶段3: 已展示审计结果;若为计划模式:已获得用户批准
  • 阶段4: 全部17项准则已自动修复;扣分项=0;测试策略为空;已移除测试任务
  • 阶段5: 输出最终评估结果:
    yaml
    gate: GO | NO-GO
    readiness_score: {1-10}
    penalty_points: 0 (was {N})
    anti_hallucination: VERIFIED | FLAGGED
    ac_coverage: "{N}/{M} (100%)"
    ac_matrix:
      - ac: "AC1"
        tasks: ["T-001", "T-002"]
        status: covered
  • 用户故事/任务已设置为Todo状态;已更新
    kanban_board.md
    ;已在Linear中添加包含最终评估的评论
  • 可选: 若提供
    --execute
    参数,批准后已调用ln-400-story-executor

Example Workflow

示例工作流程

Story: "Create user management API with rate limiting"
  1. Phase 1: Load metadata (5 Tasks, status Backlog)
  2. Phase 2:
    • Domain extraction: REST API, Rate Limiting
    • Delegate ln-002: creates Guide-05 (REST patterns), Guide-06 (Rate Limiting)
    • MCP Ref: RFC 7231 compliance, OWASP API Security
    • Context7: Express v4.19 (current v4.17)
    • Penalty Points: 18 total (version=5, missing docs=5, structure=3, standards=5)
  3. Phase 3:
    • Show Penalty Points table
    • IF Plan Mode: "18 penalty points found. Fix plan ready. Approve?"
  4. Phase 4:
    • Fix #6: Update Express v4.17 -> v4.19
    • Fix #5: Add RFC 7231 compliance notes
    • Fix #13: Add Guide-05, Guide-06 references
    • Fix #17: Docs already created by ln-002
    • All fixes applied, Penalty Points = 0
  5. Phase 5: Story -> Todo, tabular report
用户故事: "创建带速率限制的用户管理API"
  1. 阶段1: 加载元数据(5个任务,状态为Backlog)
  2. 阶段2:
    • 领域提取:REST API、速率限制
    • 委托ln-002:生成指南Guide-05(REST模式)、Guide-06(速率限制)
    • MCP Ref:确认符合RFC 7231、OWASP API安全标准
    • Context7:当前使用Express v4.17(最新稳定版为v4.19)
    • 扣分项:总计18分(版本问题=5分,缺失文档=5分,结构问题=3分,标准合规=5分)
  3. 阶段3:
    • 展示扣分项表格
    • 若为计划模式:提示“发现18个扣分项。修复计划已就绪。是否批准?”
  4. 阶段4:
    • 修复#6:将Express v4.17更新为v4.19
    • 修复#5:添加RFC 7231合规说明
    • 修复#13:添加Guide-05、Guide-06的引用
    • 修复#17:文档已由ln-002生成
    • 所有修复完成,扣分项=0
  5. 阶段5: 用户故事状态改为Todo,输出表格报告

Template Loading

模板加载

Templates:
story_template.md
,
task_template_implementation.md
Loading Logic:
  1. Check if
    docs/templates/{template}.md
    exists in target project
  2. IF NOT EXISTS: a. Create
    docs/templates/
    directory if missing b. Copy
    shared/templates/{template}.md
    docs/templates/{template}.md
    c. Replace placeholders in the LOCAL copy:
    • {{TEAM_ID}}
      → from
      docs/tasks/kanban_board.md
    • {{DOCS_PATH}}
      → "docs" (standard)
  3. Use LOCAL copy (
    docs/templates/{template}.md
    ) for all validation operations
Rationale: Templates are copied to target project on first use, ensuring:
  • Project independence (no dependency on skills repository)
  • Customization possible (project can modify local templates)
  • Placeholder replacement happens once at copy time
模板文件:
story_template.md
task_template_implementation.md
加载逻辑:
  1. 检查目标项目中是否存在
    docs/templates/{template}.md
  2. 若不存在: a. 若
    docs/templates/
    目录不存在则创建 b. 将
    shared/templates/{template}.md
    复制到
    docs/templates/{template}.md
    c. 替换本地副本中的占位符:
    • {{TEAM_ID}}
      → 来自
      docs/tasks/kanban_board.md
      的团队ID
    • {{DOCS_PATH}}
      → 标准值“docs”
  3. 使用本地副本(
    docs/templates/{template}.md
    )进行所有验证操作
设计思路: 首次使用时将模板复制到目标项目,确保:
  • 项目独立性(不依赖技能仓库)
  • 支持自定义(项目可修改本地模板)
  • 占位符仅在复制时替换一次

Reference Files

参考文件

  • AC validation rules:
    shared/references/ac_validation_rules.md
  • Plan mode behavior:
    shared/references/plan_mode_pattern.md
  • Final Assessment:
    references/readiness_scoring.md
    (GO/NO-GO rules, Readiness Score calculation)
  • Templates (centralized):
    shared/templates/story_template.md
    ,
    shared/templates/task_template_implementation.md
  • Local copies:
    docs/templates/
    (in target project)
  • Validation Checklists (Progressive Disclosure):
    • references/verification_checklist_template.md
      (overview of 7 categories)
    • references/structural_validation.md
      (criteria #1-#4)
    • references/standards_validation.md
      (criterion #5)
    • references/solution_validation.md
      (criterion #6)
    • references/workflow_validation.md
      (criteria #7-#13)
    • references/quality_validation.md
      (criteria #14-#15)
    • references/dependency_validation.md
      (criteria #18-#19)
    • references/traceability_validation.md
      (criteria #16-#17)
    • references/domain_patterns.md
      (pattern registry for ln-002 delegation)
    • references/penalty_points.md
      (penalty system details)
  • Linear integration:
    ../shared/templates/linear_integration.md

Version: 7.0.0 (BREAKING: Added 2 new criteria #18-#19 for Story/Task dependencies per BMAD Method. Expanded criterion #4 with AC completeness/specificity, #9 with Database Creation Principle, #13 with forward dependency checks, #17 with STRONG/WEAK/MISSING coverage quality. Total 19 criteria, max 60 penalty points.) Last Updated: 2026-02-03
  • 验收标准验证规则:
    shared/references/ac_validation_rules.md
  • 计划模式行为:
    shared/references/plan_mode_pattern.md
  • 最终评估:
    references/readiness_scoring.md
    (GO/NO-GO规则、就绪度评分计算方法)
  • 集中式模板:
    shared/templates/story_template.md
    shared/templates/task_template_implementation.md
  • 本地副本:
    docs/templates/
    (目标项目中)
  • 验证检查清单(渐进式披露):
    • references/verification_checklist_template.md
      (7类准则概述)
    • references/structural_validation.md
      (准则#1-#4)
    • references/standards_validation.md
      (准则#5)
    • references/solution_validation.md
      (准则#6)
    • references/workflow_validation.md
      (准则#7-#13)
    • references/quality_validation.md
      (准则#14-#15)
    • references/dependency_validation.md
      (准则#18-#19)
    • references/traceability_validation.md
      (准则#16-#17)
    • references/domain_patterns.md
      (用于委托ln-002的模式注册表)
    • references/penalty_points.md
      (扣分项系统细节)
  • Linear集成:
    ../shared/templates/linear_integration.md

版本: 7.0.0(重大更新:根据BMAD方法新增2项准则#18-#19,用于检查用户故事/任务依赖。扩展了准则#4(验收标准完整性与明确性)、#9(数据库创建原则)、#13(前置依赖检查)、#17(覆盖质量分为STRONG/WEAK/MISSING)。总计19项准则,最高扣分项60分。) 最后更新日期: 2026-02-03