Investigating Codebase For User Stories logo

Investigating Codebase For User Stories

Community
aaddrick
investigating-codebase-for-user-stories

Use when asked to create user stories from a codebase, document existing features as stories, or reverse-engineer requirements from code

Overview

Publisheraaddrick
Repositoryclaude-pipeline
Skill nameinvestigating-codebase-for-user-stories
Stars
130
Forks
17
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by aaddrick on GitHub. Read the source before you install it.

Installation

Install the Investigating Codebase For User Stories AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/aaddrick/claude-pipeline/tree/main/.claude/skills/investigating-codebase-for-user-stories
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aaddrick/claude-pipeline.git /tmp/claude-pipeline
mkdir -p .claude/skills
cp -r /tmp/claude-pipeline/.claude/skills/investigating-codebase-for-user-stories .claude/skills/investigating-codebase-for-user-stories
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Investigating Codebase For User Stories in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Investigating Codebase For User Stories on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Investigating Codebase For User Stories is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Investigating Codebase for User Stories

Overview

Systematic codebase investigation to produce well-formed user stories with acceptance criteria and traceability. Prevents shallow exploration that misses features or produces untestable stories.

When to Use

  • Asked to "create user stories from this codebase"
  • Need to document existing features as stories
  • Reverse-engineering requirements from implementation
  • Onboarding to understand what a system does

Investigation Phases

dot
digraph investigation {
    rankdir=TB;
    node [shape=box];

    identify [label="1. Identify User Types\n(routes, auth, controllers)"];
    map [label="2. Map Feature Areas\n(by controller/domain)"];
    trace [label="3. Trace User Journeys\n(entry points → outcomes)"];
    write [label="4. Write Stories\nwith Acceptance Criteria"];
    validate [label="5. Validate Coverage\n(cross-check routes/views)"];
    deps [label="6. Map Dependencies\n(blocks/blocked-by)"];
    save [label="7. Save to Files\n(docs/user-stories/)"];

    identify -> map -> trace -> write -> validate -> deps -> save;
}

Phase 1: Identify User Types

Investigate authentication and authorization to find distinct user types:

Look InWhat to Find
MiddlewareAuth guards, role checks, permission gates
RoutesRoute groups with different middleware
User modelRoles, groups, subscription tiers
Views/layoutsDifferent dashboards, nav menus

Output: List of user types (e.g., Guest, Registered User, Admin, Subscriber)

Phase 2: Map Feature Areas

Group functionality by domain, not by file structure:

Feature Area          | Controllers/Services        | User Types
---------------------|-----------------------------|-----------
Authentication       | AuthController, MfaController| All
Product Catalog      | ProductController, SearchController| Registered+
Notifications        | NotificationController      | Subscriber+
Admin Management     | AdminController             | Admin

Key locations to scan:

  • routes/web.php, routes/api.php - all endpoints
  • app/Http/Controllers/ - feature groupings
  • resources/views/ - UI capabilities
  • Database migrations - data model capabilities

Phase 3: Trace User Journeys

For each feature area, trace complete user journeys:

  1. Entry point - How does user reach this feature?
  2. Actions available - What can they do?
  3. State changes - What data changes?
  4. Outcomes - What feedback/result do they see?

Document with code references: NotificationController:45 for traceability.

Phase 4: Write Stories with Acceptance Criteria

Story Format

**As a** [specific user type from Phase 1],
**I want** [action/capability traced in Phase 3],
**so that** [business value/outcome].

**Acceptance Criteria:**
- [ ] Given [precondition], when [action], then [outcome]
- [ ] Given [alternate precondition], when [action], then [different outcome]
- [ ] Edge case: [boundary condition handling]

**Code References:** ControllerName:line, ViewName.blade.php
**Complexity:** S/M/L (based on code paths and integrations)

Sizing Heuristics

SizeIndicators
SSingle controller method, no external integrations
MMultiple methods, 1-2 integrations, some branching
LCross-cutting, multiple services, complex state

Phase 5: Validate Coverage

Cross-check stories against:

  • All routes have corresponding stories
  • All views have corresponding stories
  • All user types have stories
  • No orphan features (code without stories)

Phase 6: Map Dependencies

Identify which stories depend on others:

Story A (Auth) ─────► Story B (Notifications)
                     "User must be authenticated"

Story C (Admin) ────► Story D (User Management)
                     "Admin role required"

Dependency types:

  • Blocks: Story must complete before another can start
  • Relates to: Stories share code/features but are independent
  • Duplicates: Overlapping functionality (merge or clarify scope)

Add to each story file:

markdown
## Dependencies
- **Blocked by:** [guest-signup](../authentication/guest-signup.md)
- **Blocks:** [subscriber-export-data](../account/subscriber-export-data.md)

Phase 7: Save to Files

  1. Create directory structure: mkdir -p docs/user-stories/{feature-areas}
  2. Write each story to its own file using naming convention
  3. Generate README.md index with coverage matrix and links
  4. Include dependency graph in README

Output Structure

Save stories as separate markdown files in docs/user-stories/:

docs/user-stories/
├── README.md                    # Index with coverage matrix
├── authentication/
│   ├── guest-signup.md
│   ├── guest-login.md
│   └── user-logout.md
├── notifications/
│   ├── user-create-notification.md
│   └── user-manage-notifications.md
└── admin/
    └── admin-manage-users.md

File Naming Convention

{user-type}-{action-verb}-{feature}.md

Examples:

  • guest-complete-eligibility.md
  • subscriber-configure-notifications.md
  • admin-reset-user-password.md

Individual Story File Template

markdown
# {Story Title}

**As a** {user type},
**I want** {capability},
**so that** {benefit}.

## Acceptance Criteria

- [ ] Given {precondition}, when {action}, then {outcome}
- [ ] Given {alternate}, when {action}, then {different outcome}
- [ ] Edge case: {boundary condition}

## Dependencies

- **Blocked by:** [story-name](../feature/story-name.md)
- **Blocks:** [other-story](../feature/other-story.md)
- **Relates to:** [related-story](../feature/related-story.md)

## Code References

| Component | Location |
|-----------|----------|
| Controller | `AppController:45` |
| View | `feature.blade.php` |
| Model | `Feature.php` |

## Complexity

**Size:** S/M/L

**Rationale:** {why this size}

README.md (Index File)

markdown
# User Stories: {Project Name}

Generated: {date}

## Coverage Matrix

| Feature Area | Guest | User | Admin | Stories | Routes |
|--------------|-------|------|-------|---------|--------|
| Auth         | 3     | 2    | 1     | 6       | 8/8    |

## Dependency Graph

```mermaid
graph LR
    A[guest-signup] --> B[user-create-notification]
    A --> C[user-view-products]
    B --> D[subscriber-export-data]
    C --> D

Stories by Feature Area

Authentication

Notifications


## GitHub Issue Output

Generate stories as GitHub issues for sprint planning:

### Single Issue Creation

```bash
gh issue create \
  --title "As a guest, I want to sign up" \
  --body "$(cat docs/user-stories/authentication/guest-signup.md)" \
  --label "user-story,feature-area:auth,size:M"

Batch Issue Creation Script

Generate create-issues.sh alongside stories:

bash
#!/bin/bash
# Auto-generated from user stories

gh issue create --title "Guest Signup" \
  --body-file docs/user-stories/authentication/guest-signup.md \
  --label "user-story,auth,size:S"

gh issue create --title "User Create Notification" \
  --body-file docs/user-stories/notifications/user-create-notification.md \
  --label "user-story,notifications,size:M" \
  --milestone "Sprint 2"

Recommended Labels

Create these labels in your repo:

LabelDescription
user-storyAll user stories
size:S / size:M / size:LComplexity
blockedHas unresolved dependencies
feature-area:{name}Feature grouping

Common Mistakes

MistakeFix
Listing code features, not user capabilitiesStart from user types, not controllers
Missing acceptance criteriaEvery story needs Given/When/Then
No traceabilityInclude file:line references
Flat list without groupingGroup by feature area → user type
Assumed user typesVerify from auth/middleware code
Missing edge casesCheck error handlers, validation rules
All stories in one fileSeparate file per story in docs/user-stories/
No index/READMEAlways generate README.md with coverage matrix
Missing dependenciesTrace auth/middleware chains for implicit blocks
Circular dependenciesIndicates stories need to be split or merged
No GitHub labelsCreate labels before running batch issue script

Frequently asked questions

What does the Investigating Codebase For User Stories AI skill do?

Use when asked to create user stories from a codebase, document existing features as stories, or reverse-engineer requirements from code

Why use Investigating Codebase For User Stories on TypingMind?

Because you install it once and use it with any model. Investigating Codebase For User Stories is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Investigating Codebase For User Stories in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aaddrick/claude-pipeline/tree/main/.claude/skills/investigating-codebase-for-user-stories. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Investigating Codebase For User Stories?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Investigating Codebase For User Stories?

As many as you like. As long as a model supports skills, you can use Investigating Codebase For User Stories with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Investigating Codebase For User Stories AI skill free?

Yes. It is published on GitHub by aaddrick under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇