Initial commit: antigravity-ipa-workflow

This commit is contained in:
nvtien
2026-02-16 13:58:02 +09:00
commit c5d9aab580
43 changed files with 4436 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
---
name: ipa-import
description: Import external requirements documents (SRS, PRD, research reports) into the IPA documentation structure with proper IDs and traceability. Use when converting external specs from Gemini Deep Research, Perplexity, or manually written SRS files into IPA format. Trigger phrases: "import external srs", "convert requirements to ipa", "import requirements document".
---
## Overview
Reads external requirements documents (markdown, PDF, plain text) and converts them into IPA-standard documentation with proper traceability IDs (FR-xx, S-xx, E-xx, API-xx, D-xx). Runs ipa-validate automatically after import.
## When to Use
- External SRS or PRD document exists and needs IPA conversion
- Requirements come from an AI research tool or external stakeholder
- Merging external requirements into existing IPA docs
## Don't Use When
- No external document exists (start with lean + ipa-spec instead)
- The document is already in IPA format
## Usage
```
# Import from markdown file
ipa-import @path/to/external-srs.md
# Import from PDF (AI vision extraction)
ipa-import @path/to/requirements.pdf
# Import with specific focus
ipa-import @external.md --focus=api # Only API requirements
ipa-import @external.md --focus=ui # Only UI requirements
# Merge modes
ipa-import @external.md # Merge with existing (default)
ipa-import @external.md --replace # Replace existing (with backup)
ipa-import @external.md --append # Append only new requirements
```
## Workflow
### Step 1: Read External Document
Read external SRS file and analyze structure:
- Business requirements
- Functional requirements
- UI/UX specifications
- API requirements
- Data/Database requirements
- Non-functional requirements
### Step 2: Extract and Categorize
| External Content | IPA Doc |
|------------------|---------|
| Business requirements | `SRD.md` (FR-xx) |
| User stories | `SRD.md` (FR-xx) |
| UI mockup descriptions | `UI_SPEC.md` (S-xx) |
| API endpoints | `API_SPEC.md` (API-xx) |
| Data models | `DB_DESIGN.md` (D-xx) |
### Step 3: Generate IPA IDs
| Type | ID Format | Example |
|------|-----------|---------|
| Functional Requirement | FR-XXX | FR-001 |
| Screen | S-XX | S-01 |
| Entity | E-XX | E-01 |
| API Endpoint | API-XXX | API-001 |
| Database Table | D-XX | D-01 |
### Step 4: Generate IPA Docs
Create or update: SRD.md, UI_SPEC.md, API_SPEC.md, DB_DESIGN.md
### Step 5: Auto-Validate
Run ipa-validate automatically to check ID uniqueness and traceability links.
## Merge Behavior
1. Read existing IPA docs
2. Find max existing ID (e.g., FR-015)
3. Start new IDs from FR-016
4. Preserve existing content
5. Add new content at end
## Important
- Always note original source in generated docs
- Don't overwrite existing IDs in merge mode
- Always run ipa-validate after import
- Import is ~80% accurate — human review recommended
- Does not implement code