What this template isما هذا القالب
The unit's agile requirement format: each story as a card (As a / I want / So that) with estimation metadata, categorised Gherkin acceptance criteria (happy path, validation, authorisation, edge cases), field-level data specifications and UI elements — grouped by epic with a story inventory.صيغة المتطلب الرشيق في الوحدة: كل قصة كبطاقة (بصفتي / أريد / حتى) مع بيانات التقدير، ومعايير قبول Gherkin مصنّفة (المسار السعيد، التحقق، الصلاحيات، حالات الحافة)، ومواصفات بيانات على مستوى الحقل وعناصر واجهة — مجمّعة حسب الملحمة مع جرد للقصص.
When to use itمتى تستخدمه
- Sprint-based delivery where the backlog is the specالتسليم القائم على السبرنت حيث قائمة الأعمال هي المواصفة
- Breaking an approved use case into buildable incrementsتفكيك حالة استخدام معتمدة إلى زيادات قابلة للبناء
- When QC automates tests directly from Gherkin scenariosحين تؤتمت الجودة الاختبارات مباشرة من سيناريوهات Gherkin
Document structureهيكل الوثيقة
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
- Give the epic a goal statement and list its stories with ID, title, points and status.أعطِ الملحمة بيان هدف واسرد قصصها بالمعرف والعنوان والنقاط والحالة.
- Keep story IDs stable and traceable to FRs/UCs.أبقِ معرفات القصص ثابتة وقابلة للتتبع إلى المتطلبات وحالات الاستخدام.
- Show the inventory's running total so scope creep is visible.أظهر المجموع الجاري للمخزون ليكون تضخم النطاق مرئياً.
- Don't let the epic become a folder of unrelated stories.لا تدع الملحمة تتحول مجلداً لقصص متفرقة.
- Don't track status in two places — the inventory or the board, pick one master.لا تتابع الحالة في مكانين — المخزون أو اللوحة، اختر مرجعاً واحداً.
- Don't hide dropped stories — mark them Dropped with a reason.لا تُخفِ القصص المستبعدة — علّمها مستبعدة مع السبب.
"Epic E-03 'Receipt allocation' — goal: no receipt stays unallocated >1 business day. 7 stories, 34 points; ST-21 dropped (superseded by auto-match tuning)."«الملحمة E-03 «تخصيص المقبوضات» — الهدف: لا مقبوض يبقى دون تخصيص أكثر من يوم عمل. 7 قصص و34 نقطة؛ واستُبعدت ST-21 (أغنت عنها معايرة المطابقة الآلية).»
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
- Write the card as: As a
, I want اكتب البطاقة: بصفتي <دوراً> أريد <قدرة> لكي <قيمة> — واقصد كل جزء., so that — and mean each part. - Keep the story INVEST: independent, small enough for a sprint, testable.أبقِ القصة وفق INVEST: مستقلة وصغيرة تكفي سبرنتاً وقابلة للاختبار.
- Add context notes the developer needs (links to UC, rules, mock-ups).أضف ملاحظات السياق التي يحتاجها المطور (روابط الحالة والقواعد والنماذج).
- Don't write technical tasks as stories ("create the API") — the user is absent.لا تكتب مهاماً تقنية قصصاً («إنشاء الواجهة البرمجية») — المستخدم غائب فيها.
- Don't fake the 'so that' — if no value fits, question the story.لا تصطنع «لكي» — إن لم تجد قيمة فشكك في القصة.
- Don't pack multiple roles into one card.لا تحشر عدة أدوار في بطاقة واحدة.
"ST-17: As a reconciliation officer, I want candidate invoices ranked by likelihood, so that I clear the unmatched queue before 10:00."«ST-17: بصفتي موظف مطابقة أريد ترتيب الفواتير المرشحة حسب الأرجحية، لكي أُنهي طابور غير المطابق قبل العاشرة صباحاً.»
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
- Link every story to its FR(s) and UC so coverage is provable both ways.اربط كل قصة بمتطلباتها الوظيفية وحالتها ليُثبت الغطاء في الاتجاهين.
- Flag stories with no parent FR — they are new scope needing a CR.علّم القصص بلا متطلب أصل — فهي نطاق جديد يستلزم طلب تغيير.
- Keep the links in the RTM too, not only on the card.أبقِ الروابط في مصفوفة التتبع أيضاً لا على البطاقة فقط.
- Don't link loosely to a whole document — link to numbered items.لا تربط ربطاً فضفاضاً بوثيقة كاملة — اربط ببنود مرقّمة.
- Don't let one story silently cover half an FR while the RTM shows it Covered.لا تدع قصة تغطي نصف متطلب بصمت بينما تُظهره المصفوفة مغطى.
- Don't delete links when stories split — re-map them.لا تحذف الروابط عند تقسيم القصص — أعد توزيعها.
"ST-17 ↔ FR-012, FR-013 (UC-07). RTM shows FR-013 split across ST-17/ST-18 — both must close before FR-013 counts as delivered."«ST-17 ↔ FR-012 وFR-013 (الحالة UC-07). تُظهر المصفوفة FR-013 موزعاً على ST-17/ST-18 — ولا يُعد مُسلَّماً حتى تُغلق كلتاهما.»
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
- Write Given/When/Then with concrete values, one behaviour per scenario.اكتب معطى/عندما/عندئذ بقيم ملموسة، وسلوكاً واحداً لكل سيناريو.
- Cover the unhappy paths: rejection, threshold breach, timeout.غطِّ المسارات غير السعيدة: الرفض وتجاوز الحد وانتهاء المهلة.
- Make criteria executable as-is by QA — no interpretation needed.اجعل المعايير قابلة للتنفيذ كما هي لدى الجودة — بلا حاجة لتأويل.
- Don't write criteria as feature lists ("supports partial allocation").لا تكتب المعايير قوائم خصائص («يدعم التخصيص الجزئي»).
- Don't hide numbers behind adjectives ("large amount").لا تُخفِ الأرقام خلف صفات («مبلغ كبير»).
- Don't exceed ~6 scenarios per story — split the story instead.لا تتجاوز نحو ستة سيناريوهات للقصة — قسّم القصة بدلاً من ذلك.
"Given an unmatched receipt of SAR 60,000, When the officer confirms allocation, Then the system requires supervisor approval and does not post before it."«معطى مقبوض غير مطابق بمبلغ 60,000 ريال، عندما يؤكد الموظف التخصيص، عندئذ يشترط النظام اعتماد المشرف ولا يُقيّد قبله.»
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
- List only the fields this story adds or changes, with validation and defaults.اذكر فقط الحقول التي تضيفها القصة أو تغيّرها، مع التحقق والافتراضات.
- Note migration/backfill needs the story implies.دوّن احتياجات الترحيل أو التعبئة الرجعية التي تستلزمها القصة.
- Keep names aligned with the SRS data dictionary.أبقِ الأسماء متوافقة مع قاموس بيانات وثيقة SRS.
- Don't respecify fields other stories own.لا تعد توصيف حقول تملكها قصص أخرى.
- Don't leave enums open-ended ("etc.").لا تترك قوائم القيم مفتوحة («إلخ»).
- Don't introduce a field without saying who maintains its values.لا تُدخل حقلاً دون بيان من يدير قيمه.
"Adds match_confidence (0–100, computed, read-only) shown on the candidates panel; no backfill — computed on next ingestion run."«تضيف حقل درجة الثقة (0–100، محسوب، للقراءة) في لوحة المرشحات؛ لا تعبئة رجعية — يُحسب في تشغيلة الاستقبال التالية.»
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
- Reference the mock-up and list the elements with their states and permissions.أحِل إلى النموذج واسرد العناصر بحالاتها وصلاحياتها.
- Specify empty/error/loading behaviour for each new component.حدد سلوك الفراغ والخطأ والتحميل لكل مكوّن جديد.
- State AR/EN label pairs for new labels.اذكر أزواج التسميات عربي/إنجليزي للتسميات الجديدة.
- Don't paste screenshots as the only spec — they age silently.لا تلصق لقطات شاشة توصيفاً وحيداً — فهي تشيخ بصمت.
- Don't leave button enable/disable logic to the developer's guess.لا تترك منطق تفعيل الأزرار وتعطيلها لتخمين المطور.
- Don't design new patterns when the design system has one.لا تبتكر أنماطاً جديدة والنظام التصميمي يملك نمطاً قائماً.
"Candidates panel (WF-12): rows sortable by confidence; Confirm disabled until selected total equals receipt amount or a reason code is chosen; error banner on posting failure."«لوحة المرشحات (WF-12): صفوف قابلة للفرز بالثقة؛ وزر التأكيد معطل حتى يساوي مجموع المحدد مبلغ المقبوض أو يُختار رمز سبب؛ وشريط خطأ عند فشل القيد.»
How to write it — do · don’t · exampleكيف تكتبه — افعل · لا تفعل · مثال
- State the story-level NFRs QA will assert (latency, volume, roles).اذكر المتطلبات غير الوظيفية على مستوى القصة التي ستتحقق منها الجودة (الكمون والحجم والأدوار).
- Keep an open-issues list with owner and date; groom it every refinement.احتفظ بقائمة نقاط مفتوحة بمالك وتاريخ؛ ونقّحها في كل جلسة صقل.
- Record decisions made in refinement so they don't re-open.سجّل قرارات جلسات الصقل كي لا يُعاد فتحها.
- Don't accept a story into a sprint with a blocking open issue.لا تقبل قصة في سبرنت وفيها نقطة حاجبة مفتوحة.
- Don't duplicate epic-level NFRs on every card.لا تكرر غير الوظيفي على مستوى الملحمة في كل بطاقة.
- Don't let 'temporary' scope cuts vanish — log them as new stories.لا تدع اقتطاعات النطاق «المؤقتة» تختفي — سجّلها قصصاً جديدة.
"NFR: ranking computed within 2s at 500 open invoices. OI-1 (closed in refinement 12 Jun): ties in confidence sort by value date — decided, oldest first."«غير وظيفي: يُحسب الترتيب خلال ثانيتين عند 500 فاتورة مفتوحة. النقطة OI-1 (أُغلقت في صقل 12 يونيو): تعادل الثقة يُفرز بتاريخ الاستحقاق — تقرر: الأقدم أولاً.»
Practitioner tipsنصائح الممارسين
- A story that cannot be tested from its ACs alone is not done being written.قصة لا يمكن اختبارها من معاييرها وحدها لم تكتمل كتابتها.
- Cover the sad paths: at least one validation and one authorisation scenario per story.غطِّ المسارات الحزينة: سيناريو تحقق وسيناريو صلاحيات واحد على الأقل لكل قصة.
- Keep stories vertical — a thin slice through UI, logic and data beats a 'database story'.أبقِ القصص عمودية — شريحة رقيقة عبر الواجهة والمنطق والبيانات تتفوق على «قصة قاعدة بيانات».