ASK026: AI Generation of User Stories

Objectives

  • Review the use of AI to generate user stories for Agile Development.

How to Generate User Stories from Data, Docs & Diagrams

Combining the context-heavy power of NotebookLM with the creative, structured output of Gemini is a brilliant way to automate the heavy lifting of product management. Since NotebookLM excels at synthesizing your existing documents and Gemini excels at formatting, you can create a seamless “data-to-story” pipeline.

Here is a step-by-step guide to building your Agile User Story factory.


1. Prepare your Source Material (NotebookLM)

First, upload all your disparate files into a single NotebookLM notebook. This allows the AI to “ground” its logic in your specific business rules rather than generalities.

  • Data Feeds: Upload your JSON/CSV samples.
  • Functional Docs: Upload your Word/PDF requirements.
  • Calculations: Upload your Excel/Sheets files (NotebookLM will parse the logic and formulas).
  • UI Mockups: Export your Draw.io files as PDFs or high-res PNGs and upload them. NotebookLM can “read” the text and layout within these images.

Pro-Tip: Use the “Notebook Guide” feature in NotebookLM to generate a Brief. Copy this brief—it serves as the perfect high-level summary to give Gemini context.


2. The Gemini “Agile Architect” Prompt

Once NotebookLM has synthesized the data, move over to Gemini to generate the formal stories. Use a prompt that forces the AI to cross-reference all four of your data types.

The Prompt:

“I am building [Project Name]. Based on the following context [Paste NotebookLM Brief here], please generate a set of Agile User Stories.

For each story, you must incorporate:

  1. Data: Reference the specific fields from the sample feeds.
  2. Logic: Include the specific calculation requirements from the Sheets data.
  3. UI: Describe the interface elements based on the Draw.io mockups.

Format: > * User Story: As a [role], I want to [action], so that [value].

  • Acceptance Criteria: (Numbered list including technical constraints).
  • Technical Notes: (Data mapping and formula references).”

3. Example Output

Here is how Gemini might synthesize those specific inputs into a single story:

Story: Real-Time Margin Calculator

User Story: As a Portfolio Manager, I want to see a live margin-call estimate on the dashboard, so that I can hedge my positions before market close.

Acceptance Criteria:

  1. The UI must display a “Risk Gauge” as seen in the draw.io mockup (Top Right Quadrant).
  2. The calculation must use the IMPLIED_VOL field from the JSON Data Feed.
  3. The margin result must trigger a “Red” state if the value exceeds the THRESHOLD_VAR defined in the Logic Sheet (Cell B12).
  4. Data must refresh every 30 seconds.

Technical Notes:

  • Source Logic: $Margin = (Price \times Quantity) \times \text{Risk\_Factor}$
  • UI Element: Uses the “Primary Action Button” styling from the wireframe.

4. Best Practices for Accuracy

  • Verify Calculations: NotebookLM is great at explaining formulas, but always double-check the math. If a calculation is $A + B = C$, tell Gemini explicitly: “Use the formula found in the ‘Global Logic’ document.”
  • The “Context Window” Advantage: Because you are using NotebookLM as the “brain,” you don’t need to paste 50 pages of text into Gemini. Just paste the Summary or specific Source Citations provided by NotebookLM.
  • Iterate on UI: If the Draw.io mockup is complex, ask NotebookLM: “List all the buttons and input fields shown in the UI mockup PDF.” Then, paste that list into Gemini to ensure every button gets a user story.

Would you like me to draft a custom system prompt you can save and reuse for these specific data types?