Outline test cases

From juicesharp/rpiv-pi · View interactive version

Outline test cases is an AI agent skill from the GitHub repository juicesharp/rpiv-pi. Discover testable features via Frontend-First Discovery and create a folder outline under .rpiv/test-cases/ with per-feature metadata. Incremental runs use existing outlines as context for smarter discovery and diff-based checkpoints. Use before write-test-cases to map project scope.

How to use this skill

Skill file

Outline Test Cases

You are tasked with discovering all testable features in a project and creating a folder outline under .rpiv/test-cases/. Each feature gets its own folder with a _meta.md file containing discovered routes, endpoints, scope decisions, and domain context. A root README.md summarizes the full project outline. No test case content is generated — use write-test-cases per feature to fill the folders.

Two modes: Fresh (no existing outline — full discovery and checkpoint) and Incremental (existing outline found — discovery with prior context, diff-based checkpoint). Discovery always runs in both modes.

Initial Setup

When this command is invoked, respond with:

I'll discover all testable features in this project and create a folder outline
under .rpiv/test-cases/. Let me check for existing outlines and analyze the codebase.

Use the current working directory as the target project by default. If the user provides a specific directory path as an argument, use that instead.

Steps

Step 1: Read files & detect mode

Mode Detection

Check for existing outline data:

  1. Glob for **/_meta.md with path set to .rpiv/test-cases/ in the target directory (dot-prefixed directories must be targeted directly)
  2. If no _meta.md files found → Fresh mode. Proceed to Step 2.
  3. If _meta.md files found → Incremental mode. Read them ALL and extract:

Report detected mode:

[Fresh]: No existing outline found. Will run full discovery.
[Incremental]: Found [N] existing feature outlines from [generated date]. Will re-discover with prior context and highlight changes.

Step 2: Discover features

First, detect the project's technology stack by checking for framework indicators (see Framework Detection Reference below).

Spawn parallel discovery agents using the Agent tool:

Include in your prompts for the three codebase-locator agents:

While agents run, read .gitignore yourself to understand exclusion rules.

Step 3: Determine feature targets

IMPORTANT: Wait for ALL agents from Step 2 to complete before proceeding.

Cross-Reference (both modes)

Cross-reference findings from all 4 agents:

Feature identification — Build the feature list from frontend evidence:

  1. Start with frontend routes (Route Discovery) — each top-level route group is a candidate feature
  2. Validate with navigation menus — features in the sidebar/nav are confirmed active
  3. Enrich with API call mapping (API Mapping) — link each feature's frontend services to backend endpoints
  4. Cross-reference against backend controllers (Backend Discovery) — identify which backend controllers serve each frontend feature

Phantom detection — Flag backend controllers NOT referenced by any frontend route or API call:

Incremental: Diff Against Existing Outline

In Incremental mode, compare the fresh discovery results against existing _meta.md data and classify each feature:

| Category | Condition |

|---|---|

| Unchanged | Feature exists in both existing outline and fresh discovery, routes/endpoints match |

| New | Found by agents but not in any existing _meta.md |

| Removed | In existing _meta.md but not found by agents |

| Changed | Feature exists in both but routes or endpoints differ |

Common Processing (both modes)

Feature grouping — Group confirmed features by portal/application:

Decomposition rules:

Slug and module assignment:

Duplicate check — Cross-reference against existing TCs (TC Locator):

Step 4: Developer checkpoint

Fresh Mode — Full Checkpoint

Ask grounded questions one at a time before presenting the feature list. Use a ❓ Question: prefix so the user knows their input is needed. Each question must reference real findings and pull NEW information — not confirm what you already found. Ask several questions targeting what the code analysis could not detect.

Question focus areas (business/product language first, technical fallback only when necessary):

CRITICAL: Ask ONE question at a time. Wait for the answer before asking the next. Lead with your most significant finding.

Choosing question format:

"❓ Question: Integration scanner found no background job registration for this area. Is that expected, or is there async processing I'm not seeing?"

Batching: When you have 2-4 independent questions (answers don't depend on each other), you MAY batch them in a single ask_user_question call. Keep dependent questions sequential.

Classify each response and track for persistence:

Confirmations ("looks good", "yes proceed"):

Corrections ("that's deprecated", "wrong grouping"):

Additions ("you missed the refund flow", "add platform API"):

Scope adjustments ("skip admin features", "split settings into two"):

After all questions are answered, present the proposed feature list:

## Proposed Feature Outline

Framework detected: [framework name]
Applications found: [N] ([app names])
Total backend endpoints: ~[N] across [M] controllers

---
### [Portal Name] ([N] features)

1. [Feature Name] — [N] routes, [M] API endpoints
   Slug: [feature-slug] | Module: [MOD]
   Sub-features: [list if decomposed, or "none"]
2. [Feature Name] — [N] routes, [M] API endpoints
   Slug: [feature-slug] | Module: [MOD]
[etc.]

### Already Covered (will skip):
- [Feature] — [N] existing TCs in .rpiv/test-cases/[slug]/

### Backend-Only Endpoints (no frontend exposure):
- [Controller/endpoint group] — [reason: platform API / webhook / deprecated]

---
Create outline for [total] features?

Use the ask_user_question tool with the following question: "Create outline for [total] features across [N] portals?". Options: "Create outline (Recommended)" (Write _meta.md files and folder structure for all features above); "Add or remove features" (Adjust the feature list before creating); "Reclassify" (Move backend-only endpoints into the main feature list or vice versa).

Handle any final additions, removals, reclassifications, or slug/module overrides.

Incremental Mode — Diff-Based Checkpoint

Present the diff results from Step 3 with previous decisions:

## Outline Update ([N] features, last run [generated date])

Unchanged ([N]):
- [Feature Name] — [slug] | [MOD]
[etc.]

New ([N]):
- [Feature Name] — [N] routes, [M] API endpoints (not in previous outline)
[etc.]

Removed ([N]):
- [Feature Name] — was [slug] | [MOD] (no longer found in codebase)
[etc.]

Changed ([N]):
- [Feature Name] — [what changed: "3 new endpoints", "route path changed", etc.]
[etc.]

Previous decisions:
- [Q&A pair 1 rephrased as single-line decision statement]
- [Q&A pair 2 rephrased as single-line decision statement]

Use the ask_user_question tool with the following question: "[N] unchanged, [M] new, [K] removed features. Apply updates?". Options: "Apply updates (Recommended)" (Update _meta.md files and create new feature folders); "Adjust changes" (Modify the proposed new/removed/changed features); "Re-run discovery" (Something looks wrong — re-scan the codebase).

Rephrase each Q&A pair into a concise decision statement (e.g., **Q:** "Is the bulk-import capability tested separately?" **A:** "No, internal only" becomes "Bulk-import — internal only, excluded from scope").

If no changes detected (all features unchanged):

For new/changed/removed features, ask grounded questions ONE at a time (same approach as Fresh mode) targeting only the differences. Unchanged features need only batch confirmation.

Classify each response and track for persistence (same as Fresh mode: Confirmations, Corrections, Additions, Scope adjustments).

After all questions are answered, present the full feature list summary (same format as Fresh mode) and wait for user confirmation before proceeding to Step 5.

Step 5: Write folder outline

Fresh Mode — creating new files
  1. Create directories — for each confirmed feature, create .rpiv/test-cases/{feature-slug}/
  1. Write _meta.md per feature — one file per folder:

Read the full feature metadata template at templates/feature-meta.md. Follow the template exactly, populating fields from agent findings and checkpoint answers:

  1. Write root README.md at .rpiv/test-cases/README.md:

Read the full outline README template at templates/outline-readme.md. Follow the template exactly, populating fields from the confirmed feature list.

  1. Present summary:

```

## Test Case Outline Created

| Folder | Module | Portal | Routes | Endpoints | Status |

|--------|--------|--------|--------|-----------|--------|

| users/ | USR | Admin | 5 | 20 | pending |

| reports/ | RPT | Admin | 2 | 15 | pending |

| [etc.] | | | | | |

Output: .rpiv/test-cases/

Total: [N] feature folders + [N] _meta.md files + 1 README.md

Phantom features skipped: [list or "none"]

Note: this outline is a starting point based on code analysis — re-run or add features manually as the project evolves.

Generate test cases for a feature:

/skill:write-test-cases [feature-name]

```

Incremental Mode — updating existing files
  1. Update existing _meta.md files using the Edit tool:
  1. Add new feature folders for newly discovered features:
  1. Flag removed features — do NOT delete folders (they may contain generated TCs):
  1. Update root README.md — update feature table and Generated: line using Edit
  1. Present summary:

```

## Test Case Outline Updated

Unchanged: [N] features

Updated: [N] _meta.md files (routes/endpoints refreshed)

Added: [N] new feature folders

Removed: [N] features flagged (folders preserved)

Changes:

Output: .rpiv/test-cases/

Note: this outline is a starting point based on code analysis — re-run or add features manually as the project evolves.

Generate test cases for a feature:

/skill:write-test-cases [feature-name]

```

Step 6: Handle follow-ups

Framework Detection Reference

| Indicator | Framework | Detection |

|-----------|-----------|-----------|

| @angular/core | Angular | package.json dependencies |

| react-router-dom / react-router / @react-router | React | package.json dependencies |

| next | Next.js | package.json dependencies |

| vue-router | Vue Router | package.json dependencies |

| nuxt | Nuxt | package.json dependencies |

| .csproj / .sln | .NET | File presence in project root |

| pyproject.toml / requirements.txt with Django/Flask/FastAPI | Python | File presence + dependency check |

| None found | Backend-only | Fallback to backend discovery |

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.