mcpField
A
agile-story-generation

agile-story-generation

github.com/happy-technologies-llc開発4141 回インストール2 日前に更新
リポジトリ

agile-story-generation について

agile-story-generationは、ServiceNowを使うプロダクトオーナー、スクラムマスター、ビジネスアナリスト向けのスキルです。要件をバックログ用のユーザーストーリーに分解し、受け入れ条件や見積もりを加えて、エピックやスプリントに関連付けます。

主な機能

  1. 01要件をユーザーストーリーに分解
  2. 02標準形式でストーリーを作成
  3. 03受け入れ条件の生成
  4. 04相対的なストーリーポイント見積もり
  5. 05エピックへの関連付けとスプリント割り当て
  6. 06優先度と分類の設定

活用シーン

  1. 01機能要件をバックログ用ストーリーに変換
  2. 02テスト可能な受け入れ条件を追加
  3. 03チームのキャパシティに沿ったスプリント計画
  4. 04ストーリーをプロダクトのエピックに関連付け

MCP 対応

SN-Query-Tableでエピック、スプリント、既存ストーリーを検索し、SN-Create-RecordとSN-Update-Recordでストーリーのレコードを作成・更新します。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/happy-technologies-llc/happy-platform-skills --skill agile-story-generation

インストール後、Claude Code で/agile-story-generationを入力して読み込まれたか確認します。

詳細

アジャイルストーリーの作成

概要

このスキルを使用すると、ServiceNow の Agile Development 2.0 モジュールで、概要レベルの要件、機能の説明、またはステークホルダーからの依頼に基づいて、適切に構成されたユーザーストーリーを作成できます。以下を扱います。

  • 機能を適切なサイズのユーザーストーリーに分解する
  • 標準的な「As a / I want / So that」形式でストーリーを記述する
  • 相対的なサイジングを使用してストーリーポイントを見積もる
  • ストーリーをエピックにリンクし、スプリントに割り当てる
  • 各ストーリーの受け入れ条件を作成する
  • 優先度と分類フィールドを設定する

使用する場面: プロダクトオーナー、スクラムマスター、またはビジネスアナリストが、要件を ServiceNow SPM でバックログに登録できるユーザーストーリーに変換する必要がある場合です。

前提条件

  • プラグイン: com.snc.sdlc.agile.2.0(Agile Development 2.0)
  • ロール: scrum_user、scrum_master、または scrum_admin
  • アクセス権: rm_story、rm_epic、rm_sprint テーブルへの読み取り/書き込みアクセス
  • 知識: プロジェクトのエピック、スプリントの周期、チームのベロシティについての理解

手順

ステップ 1:対象のエピックとスプリントを特定する

プロジェクト内の既存のエピックをクエリし、新しいストーリーの紐付け先を特定します。

MCP を使用する場合(Claude Code/Desktop):

Tool: SN-Query-Table
Parameters:
  table_name: rm_epic
  query: product.sys_id=[product_sys_id]^state!=3
  fields: sys_id,number,short_description,state,priority,story_points_total
  limit: 20

REST API を使用する場合:

GET /api/now/table/rm_epic?sysparm_query=product.sys_id=[product_sys_id]^state!=3&sysparm_fields=sys_id,number,short_description,state,priority,story_points_total&sysparm_limit=20

アクティブなスプリントをクエリして、割り当て先のスプリントを特定します。

MCP を使用する場合:

Tool: SN-Query-Table
Parameters:
  table_name: rm_sprint
  query: release.product.sys_id=[product_sys_id]^state=2
  fields: sys_id,number,short_description,start_date,end_date,story_points,capacity
  limit: 5

REST API を使用する場合:

GET /api/now/table/rm_sprint?sysparm_query=release.product.sys_id=[product_sys_id]^state=2&sysparm_fields=sys_id,number,short_description,start_date,end_date,story_points,capacity&sysparm_limit=5
ステップ 2:要件を分析する

機能の説明を、個別に提供できる独立したユーザーストーリーに分解します。INVEST 基準を適用します。

基準説明検証
Independent(独立性)他のストーリーへの依存がない単独で開発できる
Negotiable(交渉可能性)詳細について話し合える過度に詳細化されていない
Valuable(価値)ユーザー/ビジネス価値を提供する明確な「so that」節がある
Estimable(見積もり可能性)チームが規模を見積もれるスコープが十分に理解されている
Small(小ささ)1 つのスプリント内に収まる通常は 1~8 ストーリーポイント
Testable(テスト可能性)合否基準が明確である受け入れ条件がある
ステップ 3:ユーザーストーリーを作成する

特定した各ストーリーについて、rm_story テーブルにレコードを作成します。

MCP を使用する場合:

Tool: SN-Create-Record
Parameters:
  table_name: rm_story
  fields:
    short_description: "As a [persona], I want to [action] so that [benefit]"
    description: |
      ## User Story
      **As a** customer service representative
      **I want to** search for customers by phone number
      **So that** I can quickly locate their account during inbound calls

      ## Details
      - Search should support partial phone number matching
      - Results should display customer name, account number, and status
      - Search should return results within 2 seconds

      ## Technical Notes
      - Leverage existing customer API endpoint
      - Index phone_number field for performance
    story_points: 5
    epic: [epic_sys_id]
    sprint: [sprint_sys_id]
    state: -6
    priority: 2
    acceptance_criteria: |
      Given I am logged in as a service representative
      When I enter a phone number (full or partial) in the search field
      Then matching customer records are displayed within 2 seconds

      Given no matching records exist
      When I search for a phone number
      Then a "No results found" message is displayed

      Given multiple matches are found
      When results are displayed
      Then they are sorted by relevance with exact matches first
    product: [product_sys_id]
    assigned_to: [user_sys_id]
    classification: Enhancement

REST API を使用する場合:

POST /api/now/table/rm_story
Content-Type: application/json

{
  "short_description": "As a customer service rep, I want to search customers by phone number so I can locate accounts quickly",
  "description": "## User Story\n**As a** customer service representative\n**I want to** search for customers by phone number\n**So that** I can quickly locate their account during inbound calls",
  "story_points": 5,
  "epic": "[epic_sys_id]",
  "sprint": "[sprint_sys_id]",
  "state": "-6",
  "priority": 2,
  "acceptance_criteria": "Given I am logged in as a service representative\nWhen I enter a phone number in the search field\nThen matching customer records are displayed within 2 seconds",
  "product": "[product_sys_id]",
  "classification": "Enhancement"
}
ステップ 4:ストーリーポイントを見積もる

チームのベロシティと複雑さに基づいて、相対的なサイジングを使用します。修正版フィボナッチ尺度を適用します。

ポイント作業量例
1ごくわずかテキストの変更、設定の更新
2簡単バリデーション付きの単一フィールド追加
3小規模基本ロジックを備えた新しい UI コンポーネント
5中規模複数の統合ポイントを持つ機能
8大規模複数のモジュールにまたがる複雑な機能
13非常に大規模より小さなストーリーへの分割を検討する

見積もり後にストーリーポイントを更新します。

MCP を使用する場合:

Tool: SN-Update-Record
Parameters:
  table_name: rm_story
  sys_id: [story_sys_id]
  fields:
    story_points: 5
    blocked: false

REST API を使用する場合:

PATCH /api/now/table/rm_story/[story_sys_id]
Content-Type: application/json

{
  "story_points": 5,
  "blocked": false
}
ステップ 5:スプリントのキャパシティを検証する

ストーリーを割り当てる前に、スプリントに残りのキャパシティがあることを確認します。

MCP を使用する場合:

Tool: SN-Query-Table
Parameters:
  table_name: rm_sprint
  query: sys_id=[sprint_sys_id]
  fields: sys_id,short_description,capacity,story_points,start_date,end_date
  limit: 1

残りのキャパシティを計算します:remaining = capacity - story_points。新しいストーリーの合計ストーリーポイントが残りのキャパシティ内に収まる場合に限り、ストーリーを割り当てます。

ステップ 6:ストーリーをエピックにリンクして確認する

エピックをクエリし、すべてのストーリーが正しくリンクされていることを確認します。

MCP を使用する場合:

Tool: SN-Query-Table
Parameters:
  table_name: rm_story
  query: epic=[epic_sys_id]^ORDERBYpriority
  fields: number,short_description,story_points,state,sprint,assigned_to,priority
  limit: 50

REST API を使用する場合:

GET /api/now/table/rm_story?sysparm_query=epic=[epic_sys_id]^ORDERBYpriority&sysparm_fields=number,short_description,story_points,state,sprint,assigned_to,priority&sysparm_limit=50

ツールの使用方法

MCP ツールのリファレンス
ツール使用する場面
SN-Query-Tableエピック、スプリント、既存のストーリー、製品をクエリする
SN-Create-Recordrm_story に新しいユーザーストーリーを作成する
SN-Update-Recordストーリーポイント、割り当て、状態を更新する
SN-Natural-Language-Search関連するストーリーや要件を自然言語で検索する
REST API リファレンス
エンドポイントメソッド目的
/api/now/table/rm_storyGET既存のストーリーを検索します
/api/now/table/rm_storyPOST新しいストーリーを作成します
/api/now/table/rm_story/{sys_id}PATCHストーリーのフィールドを更新します
/api/now/table/rm_epicGET関連付けるエピックを検索します
/api/now/table/rm_sprintGET割り当てるスプリントを検索します

ベストプラクティス

  • ストーリーごとに1つのアクション: 各ストーリーでは、単一のユーザーアクションまたは機能を記述します
  • 受け入れ基準を含める: スプリント計画の前に、すべてのストーリーにテスト可能な受け入れ基準を設定します
  • 適切な規模のストーリーにする: ストーリーポイントは1~8を目安とし、13以上と見積もられるものは分割します
  • ペルソナを使用する: 一般的な「ユーザー」ではなく、実際のユーザーペルソナの視点からストーリーを記述します
  • 技術用語を避ける: ストーリーでは方法ではなく内容を記述し、実装の詳細はタスクに記載します
  • エピックにリンクする: 追跡可能性を確保するため、ストーリーは必ず親エピックに関連付けます
  • キャパシティを確認する: 過剰なコミットメントを避けるため、ストーリーを割り当てる前にスプリントのキャパシティを確認します
  • 分類を設定する: ストーリーの種類を分類するには、Enhancement、Defect、またはSpikeを使用します

トラブルシューティング

ストーリーをリンクすると「Epic not found」と表示される

原因: エピックのsys_idが正しくないか、エピックが別の製品に属しています
解決策: 製品フィルターを使ってrm_epicを検索し、有効なエピックを見つけます:product=[product_sys_id]^state!=3

「Sprint capacity exceeded」という警告が表示される

原因: スプリントに設定されたキャパシティを超えてストーリーを追加しています
解決策: スプリントレコードのcapacityとstory_pointsを確認し、ストーリーを次のスプリントに移すことを検討します

「Story not appearing on sprint board」と表示される

原因: ストーリーにスプリントが割り当てられていないか、Draft状態になっています
解決策: sprintフィールドが設定されており、状態が少なくとも「Ready」(state=-5)であることを確認します

「Cannot assign story to closed sprint」と表示される

原因: スプリントの状態がComplete(3)またはClosedです
解決策: state=2でアクティブなスプリントを検索し、現在または今後のスプリントに割り当てます

例

例1:Eコマース機能の分解

入力要件: 「ユーザーがショッピングカートを管理できるようにする」

生成されたストーリー:

  1. STY0010001 - 「買い物客として、商品をカートに追加したい。後で購入できるようにするためです」(3 pts)
  2. STY0010002 - 「買い物客として、カートから商品を削除したい。気が変わったときに対応できるようにするためです」(2 pts)
  3. STY0010003 - 「買い物客として、カート内の商品の数量を更新したい。複数購入できるようにするためです」(3 pts)
  4. STY0010004 - 「買い物客として、小計を含むカートの概要を確認したい。支出額を把握できるようにするためです」(5 pts)
  5. STY0010005 - 「買い物客として、カートの内容をセッション間で保持したい。選択した商品を失わないようにするためです」(5 pts)

合計: 5つのストーリーで18ストーリーポイント

例2:詳細をすべて含む単一のストーリー

入力: 「モバイルアプリにパスワードリセット機能が必要」

Tool: SN-Create-Record
Parameters:
  table_name: rm_story
  fields:
    short_description: "As a mobile app user, I want to reset my password from the login screen so that I can regain access to my account"
    story_points: 5
    epic: [auth_epic_sys_id]
    sprint: [current_sprint_sys_id]
    priority: 2
    state: -6
    classification: Enhancement
    acceptance_criteria: |
      Given I am on the mobile login screen
      When I tap "Forgot Password"
      Then I am prompted to enter my registered email address

      Given I enter a valid registered email
      When I submit the reset request
      Then I receive a password reset link via email within 60 seconds

      Given I click the reset link from the email
      When I enter a new password meeting complexity requirements
      Then my password is updated and I can log in with the new credentials

      Given I enter an unregistered email
      When I submit the reset request
      Then I see a generic message (no indication whether email exists)

関連スキル

  • spm/acceptance-criteria - 詳細な受け入れ基準の生成
  • spm/project-insights - プロジェクトの健全性とベロシティの追跡
  • spm/planning-summarization - スプリントおよびリリース計画の要約
  • spm/feedback-summarization - 振り返りフィードバックの分析
  • development/automated-testing - ストーリーからテストケースを生成

コメント