agentleFS
vincebui1110vincebui1110/ba-agent-flow/skills/user-story/SKILL.md

user-story

Skill0 starsChanged 3 months agoMITView on GitHub

BA Agent — Viết User Stories + UI Flow + Design Description cho tính năng nhỏ (không cần full PRD). Dùng khi user nói 'viết user story', 'US cho [tính năng]'.

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-review and review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 4 projects that use this

The file

Files
SKILL.md

User Story Writing — BA Agent (tính năng nhỏ)

Viết User Stories cho tính năng: $ARGUMENTS

Dùng khi tính năng không cần full PRD — chỉ cần user story + UI flow + design description để dev bắt đầu làm. Ranh giới thực dụng: tính năng đụng ≤2 màn hình, không phát sinh data model mới, không dính compliance → dùng skill này. Ngược lại → /prd.


BƯỚC 1: PRE-WRITING

  1. Đọc research (nếu có) — docs/Research/RESEARCH_*.md hoặc PRD liên quan.
  2. Đọc UI_SNAPSHOT.md (nếu có ở gốc project) — UI pattern, quy ước component.
  3. Đọc knowledge base dự án — kiến trúc, gói giá, quy ước.
  4. Xác định scope — tính năng thuộc sản phẩm nào, màn hình nào, ai dùng.

BƯỚC 2: OUTPUT FILE

Lưu: docs/PRD/US_[FEATURE_NAME].md. Chưa có thư mục thì tạo mới.


BƯỚC 3: TEMPLATE

# User Stories — [Feature Name]

> **Sản phẩm**: [Tên]
> **Scope**: [1 câu tính năng làm gì]
> **Ngày**: [DD/MM/YYYY]
> **Tác giả**: [Tên]

---

## User Stories

### Epic: [Tên nhóm tính năng]

**US-1: [Tiêu đề ngắn]**

Là 1 [role], tôi muốn [action] để [outcome].

**Priority**: Must-have / Should-have / Nice-to-have
**Complexity**: S / M / L

---

**US-2: [Tiêu đề ngắn]**

Là 1 [role], tôi muốn [action] để [outcome].

**Priority**: Must-have / Should-have / Nice-to-have
**Complexity**: S / M / L

---

## UI Flow

Mô tả từng màn hình theo đúng thứ tự trải nghiệm. Mỗi màn hình gồm 4 phần:
tên + điều kiện xuất hiện → mô tả ngắn → ASCII mockup → bảng action/result.

**S1 — [Tên màn hình]**

[Mô tả ngắn — user thấy gì, đang làm gì]

```
┌─────────────────────────────────────────┐
│  [Page Title]                            │
│                                          │
│  [Component 1]          [Button]         │
│  ────────────────────────────────────    │
│  [Row 1]                                 │
│  [Row 2]                                 │
└─────────────────────────────────────────┘
```

| Hành động | Kết quả |
|-----------|---------|
| [Action 1] | [Result] |
| [Action 2] | [Result] |

---

**S2 — [Tên màn hình]**

[Tiếp tục theo flow...]

---

## Design Description

### [Tên màn hình / tab]

> Màn hình mở khi: [điều kiện]

| Item | Data Type | Required | Default | Mô tả | Validate Rule |
|------|-----------|----------|---------|-------|---------------|
| [Component] | Text/DateTime/Number/Badge/Selection/Button | Y/N | [Mặc định] | [Hành vi] | [Validate] |

BƯỚC 4: QUY TẮC VIẾT

  • User Story: bắt buộc đúng format "Là 1 [role], tôi muốn [action] để [outcome]". Thiếu vế để [outcome] là hỏng — đó là chỗ chứa lý do tồn tại của story.
  • Role phải cụ thể: "chủ cửa hàng", "nhân viên CS" — không dùng "user" chung chung khi có thể cụ thể hơn.
  • UI label: sentence case — "Save changes", không phải "Save Changes".
  • UI Flow: ASCII mockup cho từng màn hình — dev/designer nhìn là hình dung được ngay, không cần mở công cụ design. Đây là khác biệt cố ý so với /prd (PRD link ra file design thật).
  • Design Description: bảng 6 cột giống §5 của PRD.
  • Ngôn ngữ: tiếng Việt CÓ DẤU đầy đủ. Tuyệt đối không viết tiếng Việt không dấu.

BƯỚC 5: IMPACT ANALYSIS

Trước khi kết thúc, thêm mục cuối file:

## Impact Analysis

| Phần | Cần update |
|------|-----------|
| [Chỉ ghi mục có ảnh hưởng] | [Mô tả ngắn] |

5 mục cần rà: gói giá · trang cài đặt · tính năng đã có · tài liệu / link hỗ trợ · trang giới thiệu sản phẩm. Bỏ mục "không ảnh hưởng".


BƯỚC 6: CHECKLIST

[ ] File lưu đúng: docs/PRD/US_[FEATURE_NAME].md
[ ] Mỗi US đủ: story + Priority + Complexity
[ ] UI Flow có ASCII mockup cho từng màn hình chính
[ ] Bảng action → result cho mỗi màn hình
[ ] Design Description đủ 6 cột
[ ] Không còn placeholder sót ([Tên], [action]...)

BƯỚC 7: SAU KHI VIẾT

Spawn agent MỚI chạy /review-user-story. Không tự review inline trong context của mình.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.