@sun-asterisk/sungen 2.6.15 → 2.7.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/cli/index.js +3 -1
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/exporters/feature-parser.d.ts +9 -2
  4. package/dist/exporters/feature-parser.d.ts.map +1 -1
  5. package/dist/exporters/feature-parser.js +12 -4
  6. package/dist/exporters/feature-parser.js.map +1 -1
  7. package/dist/orchestrator/ai-rules-updater.d.ts.map +1 -1
  8. package/dist/orchestrator/ai-rules-updater.js +10 -0
  9. package/dist/orchestrator/ai-rules-updater.js.map +1 -1
  10. package/dist/orchestrator/templates/ai-instructions/claude-cmd-review.md +13 -12
  11. package/dist/orchestrator/templates/ai-instructions/claude-config.md +1 -1
  12. package/dist/orchestrator/templates/ai-instructions/claude-skill-delivery.md +1 -1
  13. package/dist/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +14 -0
  14. package/dist/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +371 -324
  15. package/dist/orchestrator/templates/ai-instructions/claude-skill-tc-review.md +268 -90
  16. package/dist/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +23 -49
  17. package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-a-data-entry.md +203 -0
  18. package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-b-data-ops.md +179 -0
  19. package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-c-data-explore.md +233 -0
  20. package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-d-display.md +226 -0
  21. package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-e-identity.md +177 -0
  22. package/dist/orchestrator/templates/ai-instructions/claude-skill-viewpoint.md +69 -240
  23. package/dist/orchestrator/templates/ai-instructions/copilot-cmd-review.md +13 -12
  24. package/dist/orchestrator/templates/ai-instructions/copilot-config.md +1 -1
  25. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +1 -1
  26. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +15 -21
  27. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +371 -324
  28. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md +262 -102
  29. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +23 -49
  30. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md +203 -0
  31. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md +179 -0
  32. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md +233 -0
  33. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md +226 -0
  34. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md +177 -0
  35. package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md +69 -240
  36. package/package.json +9 -1
  37. package/src/cli/index.ts +4 -1
  38. package/src/exporters/feature-parser.ts +12 -4
  39. package/src/orchestrator/ai-rules-updater.ts +10 -0
  40. package/src/orchestrator/templates/ai-instructions/claude-cmd-review.md +13 -12
  41. package/src/orchestrator/templates/ai-instructions/claude-config.md +1 -1
  42. package/src/orchestrator/templates/ai-instructions/claude-skill-delivery.md +1 -1
  43. package/src/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +14 -0
  44. package/src/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +371 -324
  45. package/src/orchestrator/templates/ai-instructions/claude-skill-tc-review.md +268 -90
  46. package/src/orchestrator/templates/ai-instructions/claude-skill-test-design-techniques.md +23 -49
  47. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-a-data-entry.md +203 -0
  48. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-b-data-ops.md +179 -0
  49. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-c-data-explore.md +233 -0
  50. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-d-display.md +226 -0
  51. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint-group-e-identity.md +177 -0
  52. package/src/orchestrator/templates/ai-instructions/claude-skill-viewpoint.md +69 -240
  53. package/src/orchestrator/templates/ai-instructions/copilot-cmd-review.md +13 -12
  54. package/src/orchestrator/templates/ai-instructions/copilot-config.md +1 -1
  55. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +1 -1
  56. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +15 -21
  57. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +371 -324
  58. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-review.md +262 -102
  59. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-test-design-techniques.md +23 -49
  60. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-a-data-entry.md +203 -0
  61. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-b-data-ops.md +179 -0
  62. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-c-data-explore.md +233 -0
  63. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-d-display.md +226 -0
  64. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint-group-e-identity.md +177 -0
  65. package/src/orchestrator/templates/ai-instructions/github-skill-sungen-viewpoint.md +69 -240
@@ -1,268 +1,97 @@
1
1
  ---
2
2
  name: sungen-viewpoint
3
- description: '10 UI patterns x 4 viewpoints — structured checklist for test case generation and review. Auto-loaded by create-test and review commands.'
3
+ description: '17 UI patterns x 4 viewpoints — structured checklist for test case
4
+ generation and review. Auto-loaded by create-test and review commands.'
4
5
  user-invocable: false
5
6
  ---
6
7
 
7
- ## 4 Viewpoints
8
-
9
- | VP | Focus | Keyword |
10
- |---|---|---|
11
- | **UI/UX** | Interface states, layout, feedback | VP-UI |
12
- | **Data & Validate** | Input constraints, data integrity, error messages | VP-VAL |
13
- | **Logic** | Business rules, interactions, state changes | VP-LOGIC |
14
- | **Security** | Auth, injection, permissions | VP-SEC |
15
-
16
- ## Shared Checks (apply across all patterns)
17
-
18
- These appear in multiple patterns — test once per screen, not per pattern:
19
-
20
- | Check | ER |
21
- |---|---|
22
- | **Loading State** | Spinner/skeleton shown, UI interaction locked during fetch |
23
- | **Empty State** | Clear message when no data, layout intact |
24
- | **XSS/Injection** | Malicious input sanitized to plain text, never executed |
25
- | **URL Manipulation** | Invalid URL params fallback to defaults, no server crash |
26
-
27
- ---
28
-
29
- ## GROUP 1: DATA ENTRY
30
-
31
- ### 1. Form & Inputs
32
-
33
- **UI/UX**
34
- - Field States: disabled/readonly fields dimmed and locked, no interaction allowed
35
- - Button States: Submit disabled when form invalid, auto-enabled when valid
36
- - Keyboard Nav: Tab order correct, Enter submits form
37
-
38
- **Data & Validate**
39
- - Required/Optional: blank required field shows error; optional allows blank
40
- - Boundaries & Format: min/max length, format (email, number) with error messages
41
- - Whitespace: auto-trim or reject spaces-only input
42
- - Error Recovery: error at correct field, disappears immediately when user corrects data
43
-
44
- **Logic**
45
- - Field Dependencies: Field A value determines Field B status/options
46
- - Double Submit Prevention: button disabled after first click, only 1 request sent
47
- - Success Flow: redirect / success toast / form reset
48
- - Failure Flow: server error retains form data + shows system error
49
-
50
- **Security**
51
- - → Shared: XSS/Injection
52
-
53
- ---
54
-
55
- ## GROUP 2: DATA MANAGEMENT
8
+ ## How to use this skill
56
9
 
57
- ### 2. Data Table
10
+ This skill is a **router**. The detailed checklists live in 5 group files — load only the ones relevant to the screen under test.
58
11
 
59
- **UI/UX**
60
- - Shared: Empty State, Loading State
61
- - Truncation: long content shows `...` with tooltip on hover, column width stable
62
- - Sticky Elements: fixed header on vertical scroll, fixed action column on horizontal scroll
12
+ 1. Read the **4 Viewpoints** and **Shared Checks** below (always).
13
+ 2. Identify which UI patterns the screen contains, resolve any overlap via **Pattern selection** below, then read **only** the matching group file(s) from the routing table.
14
+ 3. Generate Tier 1 (`@high`) scenarios first, then Tier 2 (`@normal` + `@low`). Apply each Shared Check **once per screen**, not once per pattern.
63
15
 
64
- **Data & Validate**
65
- - Record Count: "Total records" on UI matches server data exactly
66
- - Row Limit: displayed rows never exceed configured page size
67
- - Cell Integrity: cell data matches database, correct format (date, currency, status label)
68
-
69
- **Logic**
70
- - Sorting: column sort refreshes table with correct order, updates header icon
71
- - Row Actions: Edit/Delete/View buttons act on correct row ID
72
-
73
- **Security**
74
- - RBAC: hide sensitive columns or privileged action buttons without authority
75
- - → Shared: XSS/Injection (data from DB displayed safely)
76
-
77
- ---
78
-
79
- ### 3. Create / Add
80
-
81
- **UI/UX**
82
- - Blank Slate: all fields empty or BA-specified defaults, NO cache from previous operation
83
- - Required Indicator: required fields marked with visual cue (e.g., red *)
84
- - Unsaved Changes: navigate away with dirty form → browser/system warning popup
85
-
86
- **Data & Validate**
87
- - → Inherited: all Form & Inputs validation rules apply
88
- - Unique Constraint: duplicate unique field (e.g., Employee ID) → reject save, inline error
89
- - Data Dependency: selecting parent field loads correct child options
90
-
91
- **Logic**
92
- - Save & Close: toast notification, redirect to list, new record visible per sort rule
93
- - Save & Add Another: save to DB, form resets to blank for next entry
94
- - Double Submit Prevention: → same as Form & Inputs
95
- - Cancel: form closes, NO garbage record in DB, next open shows blank form
96
-
97
- **Security**
98
- - API Bypass / 403: unauthorized POST → system blocks (403 Forbidden), no record created
99
- - → Shared: XSS/Injection (persisted safely, not executed on display)
100
-
101
- ---
102
-
103
- ### 4. Update / Edit
104
-
105
- **UI/UX**
106
- - Pre-fill / Data Binding: all fields display exact current DB data (text, dropdown, radio, date...)
107
- - Readonly Fields: identity fields (ID, username, employee code) disabled, no interaction
108
- - Cancel: no data changed in DB; if dirty → unsaved changes warning
109
-
110
- **Data & Validate**
111
- - → Inherited: all Form & Inputs validation rules apply
112
- - Unique Self: saving without changing unique field → success, no self-duplicate error
113
- - Unique Conflict: changing unique field to existing value → duplicate error, block save
114
- - Unchanged Submit: Save disabled until dirty, or success without DB UPDATE
115
-
116
- **Logic**
117
- - Update Success: toast "Updated successfully", new data reflects on UI immediately without reload
118
- - Concurrent Edit: another user already edited → conflict warning, require reload
119
-
120
- **Security**
121
- - Authorization / 403: access edit without permission → 403 page
122
- - Not Found / 404: edit deleted object → 404
123
-
124
- ---
16
+ > All checklist items are written in English. Render scenario names, step text, and test IDs in English.
125
17
 
126
- ### 5. Delete
18
+ ## Routing table
127
19
 
128
- **UI/UX**
129
- - Confirmation: click Delete → MUST show confirmation dialog, delete button in warning color
130
- - Cancel: popup closes, record intact on UI and DB, no API called
131
- - Success Update: toast "Deleted successfully", record disappears immediately without reload
132
- - Pagination Fallback: delete only record on current page auto-navigate to previous page
133
-
134
- **Data & Validate Dependencies**
135
- - Independent: delete succeeds normally
136
- - Referenced (Restrict): delete parent with children blocked, clear error "in use at [Module]"
137
- - Referenced (Cascade): warning first, then deletes parent AND all related children
138
- - Referenced (Set Null): parent deleted, child reference set to Unassigned/Empty
139
-
140
- **Logic Storage**
141
- - Soft Delete: record hidden from UI, DB retains with status flag (is_deleted, deleted_at)
142
- - Hard Delete: record removed from UI AND permanently deleted from DB
143
-
144
- **Security**
145
- - Deleted Access / 404: soft or hard delete direct URL/API returns 404
146
- - API Bypass: API delete on restricted object backend rejects with business error, no 500
147
-
148
- ---
149
-
150
- ### 6. Search
151
-
152
- **UI/UX**
153
- - → Shared: Empty State ("No results found"), Loading State
154
- - Clear Action: search box empties, list reloads default data
155
-
156
- **Data & Validate**
157
- - Whitespace: auto-trim, results match cleaned keyword
158
- - Input Limits: prevent beyond max length or show error
159
- - Normalization: case-insensitive, handles accented characters correctly
160
-
161
- **Logic**
162
- - Matching: partial/exact match returns correct results, no 500
163
- - Multi-keyword: results based on AND/OR logic per spec
164
- - Debounce: ~300ms delay before API call
165
-
166
- **Security**
167
- - → Shared: XSS/Injection
168
- - Wildcards: `%`, `_`, `*` treated as literal text (escaped), not DB commands
169
-
170
- ---
171
-
172
- ### 7. Filter
173
-
174
- **UI/UX**
175
- - Feedback: selected filters displayed as tags/badges
176
- - Persistence: collapse/expand retains selected values
177
- - Conflicts: conflicting conditions show "No data" message, layout intact
178
-
179
- **Data & Validate**
180
- - Range Validation: start > end or min > max → field error, Apply disabled
181
- - Dropdown Integrity: options match 100% of actual data, hide unauthorized values
182
-
183
- **Logic**
184
- - AND/OR Logic: results satisfy correct filter logic, total count updated
185
- - Dependent Filters: selecting Filter A updates Filter B options
186
- - Reset & Navigation: reset returns original data or preserves state per spec
187
-
188
- **Security**
189
- - → Shared: URL Manipulation
190
-
191
- ---
192
-
193
- ### 8. Pagination
194
-
195
- **UI/UX**
196
- - Boundary States: Previous/First disabled on page 1, Next/Last disabled on last page
197
- - Active Page: highlighted, loading effect during page transition
198
- - Hidden: pagination bar hidden when data fits one page
199
-
200
- **Data & Validate**
201
- - Label Consistency: "Viewing X of Y" matches actual data exactly
202
- - Zero Records: pagination hidden, empty state displayed
203
-
204
- **Logic**
205
- - Navigation: loads correct dataset for page (page 2, limit 10 = records 11-20)
206
- - Change Page Size: shows correct quantity, resets to page 1
207
- - Interaction Resets: new search/filter resets to page 1
208
-
209
- **Security**
210
- - → Shared: URL Manipulation
211
-
212
- ---
213
-
214
- ## GROUP 3: NAVIGATION & CONTAINERS
215
-
216
- ### 9. Modal / Dialog
217
-
218
- **UI/UX**
219
- - Overlay: centered modal, backdrop blur, background scroll locked
220
- - Focus Trapping: Tab key cycles only within modal elements
221
- - Responsive: modal resizes, action buttons always visible or scrollable
20
+ | UI element on the screen | Pattern | Read file |
21
+ |---|---|---|
22
+ | Plain input form (settings, profile, contact) | 1. Form & Inputs **(base)** | `group-a-data-entry.md` |
23
+ | File picker / drop zone | 2. File Upload | `group-a-data-entry.md` |
24
+ | Bulk import / export | 3. Import / Export | `group-a-data-entry.md` |
25
+ | "Add" / "Create" / "New" | 4. Create / Add | `group-b-data-ops.md` |
26
+ | "Edit" / pencil icon / inline edit | 5. Update / Edit | `group-b-data-ops.md` |
27
+ | "Delete" / trash icon | 6. Delete | `group-b-data-ops.md` |
28
+ | Rows + columns grid | 7. Data Table | `group-c-data-explore.md` |
29
+ | Search box / search bar | 8. Search | `group-c-data-explore.md` |
30
+ | Filter controls (dropdown, date range, checkboxes) | 9. Filter | `group-c-data-explore.md` |
31
+ | Card / list grid, infinite scroll, "Load More" | 10. List / Card View | `group-c-data-explore.md` |
32
+ | Charts / KPI cards / dashboard | 11. Chart / Analytics | `group-d-display.md` |
33
+ | Overlay panel on top of the page | 12. Modal / Dialog | `group-d-display.md` |
34
+ | Side menu / tabs / breadcrumb / top nav | 13. Navigation | `group-d-display.md` |
35
+ | Toast / snackbar / alert / banner | 14. Notification / Toast / Alert | `group-d-display.md` |
36
+ | Login form / logout button | 15. Login / Logout | `group-e-identity.md` |
37
+ | Sign-up form / SSO | 16. Register | `group-e-identity.md` |
38
+ | Forgot / reset / change password | 17. Password Management | `group-e-identity.md` |
39
+
40
+ ## Pattern selection (precedence & inheritance)
41
+
42
+ A screen often matches several patterns at once — a login screen is *both* a form and an authentication flow. Use these rules so the choice is deterministic and scenarios are never duplicated:
43
+
44
+ 1. **Most specific wins.** Pick the most specialized pattern as the screen's primary section. Auth and CRUD forms route to their specific pattern, NOT to Form & Inputs:
45
+ - Login/logout **15**, sign-up **16**, forgot/reset/change password **17**
46
+ - Create form **4**, edit form **5**
47
+ 2. **Form & Inputs (1) is a BASE pattern, not a sibling.** Generate it as its own section only for a plain form with no more-specific role (settings, profile, contact). When a specialization applies, do NOT also create a separate "Form & Inputs" section.
48
+ 3. **Inheritance.** A specialized form pattern (4, 5, 15, 16, 17) **inherits** Form & Inputs field-level validation (required, format, maxlength, whitespace, real-time error clear) and adds its own rules. Apply the inherited checks inside the specialized section — generate each check once, never twice.
49
+ 4. **Genuinely parallel pairs** these cover different concerns; choose per the table:
50
+
51
+ | If the screen has… | Decision |
52
+ |---|---|
53
+ | A grid of records | Pick **7. Data Table** *or* **10. List/Card** by layout (rows+columns → Table; cards/tiles/infinite-scroll → List/Card) — not both for the same surface |
54
+ | Both a keyword box and filter controls | Apply **8. Search** *and* **9. Filter** (Search = free-text match; Filter = structured narrowing) + one combined AND-logic scenario |
55
+ | A form rendered inside an overlay | Apply the form's pattern (1/4/5/15…) for fields/submit **and** **12. Modal/Dialog** for open/close/focus-trap/backdrop |
222
56
 
223
- **Data & Validate**
224
- - Dismiss Actions: close via X, Cancel, Escape, backdrop click → resets data to default on reopen
57
+ ## 4 Viewpoints
225
58
 
226
- **Logic**
227
- - Submit Success: action button shows loading, modal closes, background data updated
228
- - Submit Failure: modal stays open, shows error message, retains entered data
229
- - Stacked Modals: Modal B over A has higher z-index, closing B keeps A intact
59
+ | VP | Focus | Tag |
60
+ |---|---|---|
61
+ | **UI/UX** | Interface state, layout, visual feedback | VP-UI |
62
+ | **Data & Validate** | Input constraints, data integrity, error messages | VP-VAL |
63
+ | **Logic** | Business rules, interactions, state changes | VP-LOGIC |
64
+ | **Security** | Authentication, authorization, injection | VP-SEC |
230
65
 
231
- **Security**
232
- - DOM Cleanup: remove HTML from DOM on close to protect sensitive data
233
- - Reload: handles deep linking if present
66
+ **Classification rules:**
67
+ - VP-UI = state that is always true regardless of what the user does (element present, layout, label)
68
+ - VP-VAL = outcome depends on the input *value* (valid / invalid / boundary)
69
+ - VP-LOGIC = outcome depends on the user's *action* (click, submit, navigate)
70
+ - VP-SEC = checks access control and malicious input
234
71
 
235
72
  ---
236
73
 
237
- ## GROUP 4: DISPLAY PATTERNS
238
-
239
- ### 10. List / Card
240
-
241
- **UI/UX**
242
- - → Shared: Empty State, Loading State
243
- - Hover Effect: shadow/scale on card hover
244
- - Content: text truncation without breaking card height, placeholder image on broken image
74
+ ## Shared Checks
245
75
 
246
- **Data & Validate**
247
- - Integrity: data fields (price, status, tag) 100% accurate vs system
248
- - Total Count: matches actual database count after filtering
76
+ Generate **once per screen**, do not repeat for each pattern.
77
+ Each pattern only points back with "Shared checks applied: [name]".
249
78
 
250
- **Logic**
251
- - Navigation: clicking card navigates to correct detail page
252
- - Direct Actions: Like/Add to Cart updates immediately without reloading list
253
- - Infinite Scroll / Load More: appends records, maintains scroll position
254
- - Layout Toggle: Grid/List view switch changes UI but preserves data
79
+ | Check | Condition → Expected | VP | Priority |
80
+ |---|---|---|---|
81
+ | **Loading State** | Data fetch in progress → spinner/skeleton shown, user cannot interact | UI | @normal |
82
+ | **Empty State** | Query returns 0 records → clear message shown, layout does not break | UI | @normal |
83
+ | **XSS** | Script tag entered into a field rendered as literal text, not executed | SEC | @high |
84
+ | **SQL injection** | SQL payload entered into a field → DB unaffected, no data exposed | SEC | @high |
85
+ | **URL Manipulation** | URL params wrong/missing/out-of-range → fallback to default, no 500 crash | SEC | @high |
255
86
 
256
- **Security**
257
- - RBAC: hide sensitive data or privileged buttons from DOM
258
- - Network Resilience: error message + "Retry" button on connection loss
87
+ > **SQL injection — 2 layers for search/LIKE fields**: (1) field-level: UI blocks special chars → `@high` automated; (2) API-level: if the field reaches a LIKE query (search, partial-match), send `1 OR 1=1` straight to the API endpoint (bypassing the UI) → verify a parameterized query is used → `@high @manual`. Missing layer 2 = a real attack vector is overlooked even when field validation is correct.
259
88
 
260
89
  ---
261
90
 
262
91
  ## Security Tag Rules
263
92
 
264
93
  For VP-SEC scenarios testing **unauthorized access** (no login, wrong role, direct URL):
265
- - Use **`@no-auth`** tag — runs without authentication to verify redirect/block.
94
+ - Use the **`@no-auth`** tag — runs without authentication to verify the redirect/block.
266
95
  - Do NOT use `@manual` for these — they are automatable.
267
96
 
268
97
  ```gherkin
@@ -23,23 +23,24 @@ You are a **Senior QA Reviewer**. You evaluate Gherkin test cases using the `sun
23
23
  1. **Enumerate feature files** — glob `<base>/<name>/features/*.feature`. A screen may have one main file (`<name>.feature`) plus sub-features (`<name>-<sub>.feature` like `awards-modal.feature`); a flow has a single `<name>.feature`. If zero `.feature` files found → `/sungen-create-test` first.
24
24
  2. **Review every feature file** — for each `<basename>.feature` discovered in step 1:
25
25
  - Read `<basename>.feature` and the matching `test-data/<basename>.yaml`.
26
- - Apply the `sungen-tc-review` skill — score 3 dimensions: Syntax (30pts), Coverage (40pts), Viewpoint (30pts). **For flows**, also apply the "Flow Review Additions" section. Use `sungen-viewpoint` for pattern checklists.
27
- - Apply the **Unverified Selectors check** — if `<base>/<name>/selectors/<basename>.yaml` exists, count lines matching `@needs-live-verify`. Include in the per-file report as a non-scoring metric. Does NOT affect the 60% threshold.
26
+ - Apply the `sungen-tc-review` skill — score the **7-dimension rubric (100 pts)**: Structure & Format (15), Coverage (30), Assertion Quality (20), Test Data (10), Security & Permission (10), Automation Readiness (10), Maintainability (5). **For flows**, also apply the flow-specific checks (Layer A7 "Tags & Flow"). Use `sungen-viewpoint` for pattern checklists.
27
+ - Apply the **Unverified Selectors check** — if `<base>/<name>/selectors/<basename>.yaml` exists, count lines matching `@needs-live-verify`. Include in the per-file report as a non-scoring metric. Does NOT affect the score or the PASS threshold.
28
28
  3. **Aggregated output** — present scores in a per-feature table, then a screen-level rollup:
29
29
 
30
30
  ```
31
- Feature Syntax Coverage Viewpoint Total Verdict
32
- ──────────────────────────────────────────────────────────────────
33
- home.feature 28/30 36/40 27/30 91% PASS
34
- home-modal.feature 26/30 24/40 22/30 72% PASS
35
- ──────────────────────────────────────────────────────────────────
36
- Screen rollup (mean) 27/30 30/40 24.5/30 81.5% PASS
31
+ Feature Total Verdict Unverified
32
+ ─────────────────────────────────────────────────────
33
+ home.feature 88 PASS 0
34
+ home-modal.feature 64 CONDITIONAL 2
35
+ ─────────────────────────────────────────────────────
36
+ Screen rollup (mean) 76 PASS
37
37
  ```
38
38
 
39
- - **>= 60% per file**: PASS that file.
40
- - **< 60% per file**: FAIL that file with recommendations.
41
- - Show the full per-file report (recommendations, top issues) **only for files that fail**, or when the user asks for the deep report.
42
- 4. If any file is FAIL and user confirms update that file's test cases following `sungen-gherkin-syntax` and `sungen-tc-generation` skills, then re-review **only the failing files** (skip already-passing ones to save time).
39
+ - **>= 70**: PASS that file.
40
+ - **50–69**: CONDITIONAL fix before execution.
41
+ - **< 50**: FAIL revise & re-review.
42
+ - "Unverified" = count of `@needs-live-verify` selectors (non-scoring). Show the full per-file report (dimension breakdown, recommendations, top issues) **only for files that are CONDITIONAL or FAIL**, or when the user asks for the deep report.
43
+ 4. If any file is CONDITIONAL or FAIL and user confirms → update that file's test cases following `sungen-gherkin-syntax` and `sungen-tc-generation` skills, then re-review **only those files** (skip already-passing ones to save time).
43
44
  5. After all files PASS (or user decides to proceed), offer next steps:
44
45
 
45
46
  - **`/sungen-run-test ${input:name}`** — Generate selectors, compile, and run tests for **every feature** in this screen (Recommended)
@@ -12,7 +12,7 @@ You generate 3 files for sungen — a Gherkin compiler that produces Playwright
12
12
  | `sungen-tc-generation` | Test case generation strategy, output format |
13
13
  | `sungen-test-design-techniques` | EP, BVA, Decision Table, State Transition — systematic scenario generation |
14
14
  | `sungen-tc-review` | Review scoring, quality rules, checklist |
15
- | `sungen-viewpoint` | 10 UI patterns x 4 viewpoints — coverage checklists |
15
+ | `sungen-viewpoint` | 17 UI patterns x 4 viewpoints — coverage checklists |
16
16
  | `sungen-selector-keys` | YAML key generation from `[Reference]` names, suffixes, lookup priority |
17
17
  | `sungen-selector-fix` | Selector generation from live page, auto-fix strategy |
18
18
  | `sungen-delivery` | Export Gherkin + Playwright results → CSV test case deliverable |
@@ -59,7 +59,7 @@ The CLI reads the **per-target result file first** (co-located with `.spec.ts`),
59
59
 
60
60
  | CSV Column | Source |
61
61
  |------------|--------|
62
- | TC ID | Generated: `<SCREEN_UPPER>-<VP>-<NNN>` |
62
+ | TC ID | Generated, namespaced per screen/flow: `<SCREEN_UPPER>-<CAT>-<NNN>` (e.g. `VP-SEC-001` on screen `login` → `LOGIN-SEC-001`). The namespace makes it globally unique — the stable key the dashboard tracks each test case by. |
63
63
  | Category 1 | Scenario name with VP prefix stripped |
64
64
  | Category 2 | VP group: `VP-SEC`→Accessing, `VP-UI`→GUI, `VP-VAL`/`VP-LOGIC`→Function |
65
65
  | Category 3 | Feature name (first line of `.feature`) |
@@ -198,6 +198,20 @@ Any tag not listed above passes through to Playwright `{ tag: [...] }`. Feature-
198
198
  | `@auto` | Standard scenario, ready for automation |
199
199
  | Any custom | e.g., `@sprint-42`, `@team-payment` — any tag works |
200
200
 
201
+ **Assign priority by user impact** (canonical mapping — override only when context differs):
202
+
203
+ | Scenario type | Tag |
204
+ |---|---|
205
+ | Auth redirect / unauthenticated access | `@high` |
206
+ | CRUD happy path (create / update / delete — success) | `@high` |
207
+ | Core business rule, state transition | `@high` |
208
+ | XSS, SQL injection, permission blocked | `@high` |
209
+ | Required field error, unique/duplicate constraint | `@high` |
210
+ | Format validation (email, phone, date…) | `@normal` |
211
+ | Boundary value — inclusive (`<=`, `>=`) → `@high`; standard range → `@normal` | `@normal` |
212
+ | Secondary features (search, filter, sort, pagination) | `@normal` |
213
+ | Element presence, label, placeholder, tooltip | `@low` |
214
+
201
215
  **Run filtered:**
202
216
  ```bash
203
217
  npx playwright test --grep "@smoke" # only smoke tests
@@ -352,12 +366,10 @@ Feature: User Management
352
366
  Scenario: Create user shows form
353
367
  When User click [Add User] button
354
368
  Then User see [Create User] dialog
355
- # After test: overlay auto-dismissed, forms auto-cleared by base.ts
356
369
 
357
370
  Scenario: Search user by name
358
371
  When User fill [Search] field with {{search_name}}
359
372
  Then User see [User Row] row
360
- # After test: search field auto-cleared by base.ts
361
373
  ```
362
374
 
363
375
  | Tag | What base.ts does after each test |
@@ -371,27 +383,9 @@ Feature: User Management
371
383
 
372
384
  Only when `@cleanup:*` tags aren't enough — feature-specific logic.
373
385
 
374
- ```gherkin
375
- @auth:admin
376
- @cleanup:overlay
377
- Feature: Dashboard
378
- Path: /dashboard
379
-
380
- Background:
381
- Given User is on [Dashboard] page
382
-
383
- @afterEach
384
- Scenario: Reset dashboard filters
385
- When User select [Date Filter] dropdown with {{default_period}}
386
-
387
- Scenario: Filter by last week
388
- When User select [Date Filter] dropdown with {{last_week}}
389
- Then User see [Revenue Chart] section
390
- ```
391
-
392
386
  ### Layer 3: `@beforeAll` / `@afterAll` (optional)
393
387
 
394
- For one-time setup/teardown. Low priority — most e2e tests don't need these.
388
+ For one-time setup/teardown.
395
389
 
396
390
  **Rendering order in `.spec.ts`:**
397
391
  `test.describe` → `test.use(storageState)` → `test.use(autoCleanup)` → `test.beforeAll` → `test.beforeEach` → `test.afterEach` → `test.afterAll` → `test()` blocks