@ryuenn3123/agentic-senior-core 6.16.6 → 6.17.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 (70) hide show
  1. package/.agents/plugins/agentic-senior-core/.codex-plugin/plugin.json +1 -1
  2. package/.agents/plugins/agentic-senior-core/commands/asc-develop.md +1 -1
  3. package/.agents/plugins/agentic-senior-core/commands/asc-develop.toml +2 -3
  4. package/.agents/plugins/agentic-senior-core/commands/asc-test.md +1 -2
  5. package/.agents/plugins/agentic-senior-core/commands/asc-test.toml +2 -3
  6. package/.agents/plugins/agentic-senior-core/commands/asc-ui.md +1 -1
  7. package/.agents/plugins/agentic-senior-core/commands/asc-ui.toml +2 -3
  8. package/.agents/plugins/agentic-senior-core/hooks/lib/known-ui-slop-patterns.json +5 -0
  9. package/.agents/plugins/agentic-senior-core/hooks/post-edit-enforce.js +70 -9
  10. package/.agents/plugins/agentic-senior-core/hooks/stop-verify-gate.js +148 -0
  11. package/.agents/plugins/agentic-senior-core/hooks.json +7 -0
  12. package/.agents/plugins/agentic-senior-core/plugin.json +1 -1
  13. package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +7 -6
  14. package/.agents/plugins/agentic-senior-core/skills/asc/references/writing-skills.md +15 -0
  15. package/.agents/plugins/agentic-senior-core/skills/asc-develop/SKILL.md +43 -58
  16. package/.agents/plugins/agentic-senior-core/skills/asc-develop/references/execution-plans.md +43 -0
  17. package/.agents/plugins/agentic-senior-core/skills/asc-develop/references/subagent-orchestration.md +55 -0
  18. package/.agents/plugins/agentic-senior-core/skills/asc-test/SKILL.md +3 -1
  19. package/.agents/plugins/agentic-senior-core/skills/asc-test/references/systematic-debugging.md +32 -0
  20. package/.agents/plugins/agentic-senior-core/skills/asc-ui/SKILL.md +42 -82
  21. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/data-to-structure.md +96 -0
  22. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/responsive-and-copy.md +32 -0
  23. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/states-and-a11y.md +38 -0
  24. package/gemini-extension.json +1 -1
  25. package/package.json +1 -1
  26. package/plugin.yaml +1 -1
  27. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/accessibility.md +0 -102
  28. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/copy-i18n.md +0 -167
  29. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/browser-surfaces.md +0 -69
  30. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/color-surfaces.md +0 -81
  31. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/composition-patterns.md +0 -299
  32. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/motion.md +0 -55
  33. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/themes-catalog.md +0 -199
  34. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/craft/typography.md +0 -54
  35. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/divergence.md +0 -168
  36. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/mobile-responsive.md +0 -115
  37. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/experience.md +0 -31
  38. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/genre-calibration.md +0 -93
  39. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/operate.md +0 -83
  40. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/persuade.md +0 -109
  41. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/modes/read.md +0 -47
  42. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/redesign-audit.md +0 -89
  43. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/reflexes.md +0 -59
  44. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/states-feedback.md +0 -148
  45. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-attio-dom.json +0 -5
  46. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-attio.png +0 -0
  47. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-cal-dom.json +0 -5
  48. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-cal.png +0 -0
  49. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-clerk-dom.json +0 -5
  50. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-clerk.png +0 -0
  51. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-dub-dom.json +0 -5
  52. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-dub.png +0 -0
  53. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-linear-dom.json +0 -5
  54. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-linear.png +0 -0
  55. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-marketplace-dom.json +0 -5
  56. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-marketplace.png +0 -0
  57. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-mintlify-dom.json +0 -5
  58. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-mintlify.png +0 -0
  59. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-raycast-dom.json +0 -5
  60. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-raycast.png +0 -0
  61. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-resend-dom.json +0 -5
  62. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-resend.png +0 -0
  63. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-stripe-dom.json +0 -5
  64. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-stripe.png +0 -0
  65. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-supabase-dom.json +0 -5
  66. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-supabase.png +0 -0
  67. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-tldraw-dom.json +0 -5
  68. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-tldraw.png +0 -0
  69. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-vercel-dom.json +0 -5
  70. package/.agents/plugins/agentic-senior-core/skills/asc-ui/references/visuals/real-vercel.png +0 -0
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: asc-test
3
3
  description: >
4
- Trigger this skill when the user is: writing unit tests, integration tests, E2E tests, UAT checklists, reproducing bugs, fixing flaky tests, or verifying test coverage. Also trigger when the user says: "write a test", "TDD", "add tests", "verify this bug", "flaky test", "test this endpoint", "E2E test", "playwright", "UAT", "regression test", "bikin tes", "cara ngetes", "tes gagal terus". Also trigger when creating or editing files matching: `*.test.*`, `*.spec.*`, `tests/*`, `__tests__/*`, or `e2e/*`.
4
+ Trigger this skill when the user is: debugging errors or crashes, investigating bugs, writing unit/integration/E2E tests, UAT checklists, or fixing flaky tests. Also trigger when the user says: "write a test", "TDD", "fix this bug", "why is this failing", "error 500", "flaky test", "E2E test", "playwright", "UAT", "regression test", "bikin tes", "benerin bug", "kok error", "kenapa gagal", "tes gagal terus". Also trigger on files matching: `*.test.*`, `*.spec.*`, `tests/*`, `__tests__/*`, or `e2e/*`.
5
5
  ---
6
6
 
7
7
  # Testing, TDD, Verification & UAT Router
@@ -31,6 +31,7 @@ Every feature, bugfix, or refactor must follow the Red-Green-Refactor sequence:
31
31
 
32
32
  Before writing tests, running suites, or claiming verification:
33
33
  1. **Mandatory Ingestion (BLOCKING GATE):** Call `read_file` on the tier reference matching your testing requirement BEFORE taking action:
34
+ - Debugging runtime errors, 500 crashes, or unknown failures ➔ `references/systematic-debugging.md`
34
35
  - Writing unit tests / TDD cycle ➔ `references/tdd-cycle.md`
35
36
  - Behavior testing, boundary isolation, mocks/fakes ➔ `references/test-design.md`
36
37
  - Generative property invariants & fuzzing ➔ `references/property-testing.md`
@@ -105,6 +106,7 @@ Select the lowest testing tier that validates the requirement:
105
106
 
106
107
  | Testing Domain / Trigger | Mandatory Reference Path |
107
108
  |---|---|
109
+ | 4-phase root-cause investigation & circuit breaker | `references/systematic-debugging.md` |
108
110
  | Red-Green-Refactor mechanics & whole-suite checks | `references/tdd-cycle.md` |
109
111
  | Behavior testing, boundary isolation & mocking | `references/test-design.md` |
110
112
  | Generative property invariants & boundary fuzzing | `references/property-testing.md` |
@@ -0,0 +1,32 @@
1
+ # Systematic Root-Cause Debugging
2
+
3
+ > **Core Invariant:** Zero production code edits before root-cause investigation is complete. Patching symptoms without proving the failure mechanism creates cascading regressions.
4
+
5
+ ---
6
+
7
+ ## 1. The Four Mandatory Debugging Phases
8
+
9
+ Complete each phase in strict order for every bug report, runtime crash, 500 error, build break, or failing test:
10
+
11
+ ### Phase 1: Root-Cause Investigation (Read-Only)
12
+ Before modifying any file in `src/` or `app/`:
13
+ 1. **Read Raw Failure Evidence:** Capture the exact error message, HTTP status, stack trace line numbers, and exit code without skimming.
14
+ 2. **Trace Data Flow Backward:** Follow the failing variable or state from the crash site back to its trust boundary (request payload, DB query result, environment variable, async race window). Identify *where* invalid state originated, not merely where it threw.
15
+ 3. **Check Recent Deltas:** Inspect recent modifications (`ascx git status`, `ascx git diff`, `ascx git log -n 5`) touching the module, config, or dependencies.
16
+ 4. **Compare Working Analog:** Locate a working endpoint or handler in the same codebase and compare middleware order, types, and null/error guards.
17
+
18
+ ### Phase 2: Falsifiable Hypothesis & Deterministic Reproduction
19
+ 1. **State One Explicit Hypothesis:** *"Function `X` fails with `Y` when input `Z` occurs because condition `W` is unchecked at line `N`."*
20
+ 2. **Write the Reproduction Test First:** Follow `references/regression-proof.md` to create an automated unit, integration, or CLI reproduction test targeting that exact input.
21
+ 3. **Confirm Expected Failure (`RED`):** Execute the test fresh (`ascx npm test -- ...`, `ascx pytest ...`). It **must fail** with the exact symptom under investigation. If it passes, your hypothesis is incomplete—return to Phase 1.
22
+
23
+ ### Phase 3: Minimal Root-Cause Fix
24
+ 1. **Single-Cause Change:** Fix the root cause at its origin boundary (for example, normalize/validate at input entry rather than sprinkling defensive `?.` checks downstream).
25
+ 2. **Zero Bundled Refactoring:** Do not mix style cleanups, renames, or unrelated feature changes into a bugfix diff.
26
+ 3. **Two-Failure Circuit Breaker:** If two consecutive code edits fail to turn the reproduction test green, **STOP editing**. Revert the speculative edits, re-examine architectural assumptions from Phase 1, and report the exact blocker if an external constraint is involved.
27
+
28
+ ### Phase 4: Regression & Whole-Suite Proof
29
+ 1. Execute the reproduction test fresh and confirm `exit 0` (`GREEN`).
30
+ 2. Perform the revert check in `references/regression-proof.md` when fixing subtle logic guards.
31
+ 3. Run the complete test suite fresh (`ascx npm test` or project runner) to prove zero collateral regressions before claiming the bug is resolved.
32
+
@@ -4,108 +4,68 @@ description: >
4
4
  Trigger this skill when working on: UI components, UX design, layouts, microcopy, typography, design systems, modals, forms, tables, dashboards, empty states, or error UI. Also trigger when the user says: "design this page", "clean up UI", "write UI copy", "fix UI slop", "make it look professional", "too verbose", "improve the design", "broken on mobile", "bikin UI", "rapikan tampilan", "tulisan UI berlebihan", "tampilan di hp rusak", "terlalu kaku", "jangan kayak AI". Also trigger when creating or editing files matching: `*.tsx`, `*.jsx`, `*.vue`, `*.svelte`, `*.html`, `*.blade.php`, `*.css`, or UI component files.
5
5
  ---
6
6
 
7
- # Universal UI/UX Engineering & Anti-Slop Router
7
+ # Deterministic Frontend & UI Engineering Router (`asc-ui`)
8
8
 
9
- Staff-grade design engineering for resilient, scannable, human-grade interfaces. Enforces the visual floor and routes deep craft guidance on demand.
9
+ Enforces structural semantics, token reuse, state completeness, accessibility, and anti-card-soup invariants across frontend codebases. Pure visual art direction belongs to design tools (Figma MCP, Stitch) or pre-built component kits (Shadcn/Radix blocks); this skill governs verifiable UI engineering.
10
10
 
11
11
  ---
12
12
 
13
- ## 1. The Quality Floor (Non-Negotiable Bans)
14
-
15
- Every UI edit must satisfy these 15 rules without exception:
16
-
17
- 1. **Token discipline:** All colors, spacing, and typography must resolve through declared design tokens or CSS variables. Zero raw hex codes (`#6366f1`) or arbitrary inline pixel values.
18
- 2. **Animation safety:** Never use `transition: all`. Never animate layout dimensions (`width`, `height`, `top`, `left`). Animate only GPU properties (`transform`, `opacity`).
19
- 3. **Reduced motion:** Every CSS animation or transition must respect `@media (prefers-reduced-motion: reduce)`.
20
- 4. **Focus visibility:** Never strip focus indicators (`outline-none`) without an immediate high-contrast `:focus-visible` replacement.
21
- 5. **No hallucinated material:** Never invent metrics, testimonials, customer quotes, or fake partner logos.
22
- 6. **No eyebrows or kicker tags:** Headings carry their own weight. Never place `text-[11px] uppercase tracking-wider` micro-labels above titles.
23
- 7. **No AI cliché gradients:** Never use purple-to-blue/indigo gradients or text clipping (`bg-clip-text text-transparent`).
24
- 8. **No card-in-card nesting:** Never nest rounded bordered cards inside other rounded cards.
25
- 9. **Single elevation declaration:** Choose either a 1px border OR an elevation shadow, never both (ban the ghost card).
26
- 10. **Mobile viewport unit:** Use `min-h-dvh` or `100dvh` for full-height containers, never `100vh` or `h-screen`.
27
- 11. **Mobile containment:** Set `overflow-x: clip` on root shells. Never leak horizontal scrolling.
28
- 12. **Touch targets:** Minimum 44×44px hit target with $\ge$ 8px clearance for all interactive touch controls.
29
- 13. **Contrast floor:** Meet WCAG 2.2 AA (4.5:1 normal text, 3:1 large text and UI component boundaries).
30
- 14. **Single-language purity:** Never mix languages on one surface; preserve monolingual consistency across headings, labels, errors, and actions.
31
- 15. **Icon semantics:** Never use raw unicode or emojis as icons. Use dedicated SVG icons; mark decorative icons `aria-hidden="true"`.
32
- 16. **Substance over restraint:** Stripping slop is only half the job. Replace removed ornaments with real substance: strong typographic scale contrast, full-field color anchors, and authentic interface fragments. Never leave an empty, sterile wireframe void.
33
- 17. **Product over skill (No geek cosplay):** The real-world domain dictates aesthetics. Never inject terminal windows, ASCII art, or pseudo-telemetry consoles into civic, educational, or commercial products (`references/modes/genre-calibration.md`).
34
- 18. **The Purpose-Gate:** Every component, widget, or scorecard must enable an actual user task. Never invent unearned widgets, sliders, or simulated feeds without real business data.
35
- 19. **Anti-card-soup invariant:** Never wrap structural layout sections (header, nav, rails, tables) into floating rounded card islands. Use a Unified Spatial Canvas with hairline dividers (`divide-y`, `border-r`). Cards are strictly for discrete, interchangeable items (`references/divergence.md`).
13
+ ## 1. The Quality Floor (Non-Negotiable Invariants)
36
14
 
37
- ---
38
-
39
- ## 2. Pre-Flight & Material Inventory (BLOCKING GATE)
40
-
41
- Before declaring markup, drafting redesign plans, or inspecting user code:
42
-
43
- 1. **Step 1 — Workspace Brand Audit (Brownfield vs Greenfield):**
44
- - Check project styling configuration: `app.css`, `globals.css`, `tailwind.config.*`, or `components/ui`.
45
- - **Brownfield Rule:** If the project already defines brand tokens (e.g. custom brand colors, established fonts, existing UI library), **DO NOT OVERRIDE THEM**. Calibrate neutrals to the brand's color temperature (single neutral family law) and respect established naming.
46
- - **Greenfield Fallback:** If the repository is brand new with zero tokens, read `references/modes/genre-calibration.md` and select a starting palette from `references/craft/themes-catalog.md`.
47
- 2. **Step 2 — Silent Discipline & Real Visual Benchmarks:**
48
- - Review `references/craft/composition-patterns.md` and inspect matching `references/visuals/real-*.png` / `*-dom.json` for authentic human-designed spacing and layout hierarchies rather than enclosing sections in repetitive `1px` boxes.
49
- - **Silent Meta-Rules:** Never emit internal framework rules, theme catalog names, or parenthetical foreign translations in user deliverables. Focus purely on technical facts.
50
- 3. **Step 3 — Workspace Material Inventory:**
51
- - **Real:** Concrete numbers, existing endpoints, actual data attributes from controllers/models.
52
- - **Pictures:** Actual screenshots and product visual assets.
53
- - **Absent:** Missing quotes, missing logos, or unverified metrics—these are omitted entirely.
15
+ 1. **Token & primitive reuse:** Resolve all colors, radii, and spacing through project CSS variables/tokens and existing `components/ui/` primitives. Zero raw hex codes (`#6366f1`) and zero mixed neutral families (never mix `slate` with `stone`).
16
+ 2. **Anti-card-soup rule:** Never stack two or more multi-column card grids consecutively on a page, and never render sequential steps (`01`, `02`, `03`), rubrics, or people directories as bordered cards.
17
+ 3. **No card-in-card or ghost elevation:** Never nest a bordered rounded card inside another card. Choose either `border` OR `shadow-sm`, never both.
18
+ 4. **GPU-only motion & reduced motion:** Never use `transition-all` or animate layout geometry (`width`, `height`, `top`, `left`). Respect `@media (prefers-reduced-motion: reduce)`.
19
+ 5. **Focus & WCAG 2.2 AA contrast:** Maintain $\ge$ 4.5:1 text contrast (3:1 large text/controls). Never apply `outline-none` without an immediate `:focus-visible` ring replacement.
20
+ 6. **Mobile containment & touch targets:** Use `min-h-dvh` (never `100vh`/`h-screen`), `overflow-x: clip` on root shells, and minimum **44x44px** hit targets on touch controls.
21
+ 7. **Zero hallucinated proof or ornaments:** Never invent testimonials, partner logos, unbacked KPIs, small-caps eyebrow kickers above headings, purple-to-blue gradients, or terminal cosplay in non-developer apps.
22
+ 8. **Single-language microcopy:** Keep every visible string on a surface in one language with natural domain terms—zero mixed-language neologisms and zero literal translation calques.
54
23
 
55
24
  ---
56
25
 
57
- ## 3. Surface Modes & Ambition Scaling
26
+ ## 2. Pre-Flight & Reuse Gate (BLOCKING)
58
27
 
59
- Visual posture is governed by the surface type, not product branding. Every surface maps to an enforced mode reference file:
28
+ Before writing or refactoring any UI file (`*.tsx`, `*.jsx`, `*.vue`, `*.svelte`, `*.html`, `*.blade.php`, `*.css`):
60
29
 
61
- - **Operate (`references/modes/operate.md`):** Dense scannability, master-detail rails, `tabular-nums`, inline progressive disclosure.
62
- - **Persuade (`references/modes/persuade.md`):** 80-word viewport budget, asymmetric posture, single signature element, zero equal-weight 3-card grids.
63
- - **Read (`references/modes/read.md`):** 65–75ch measure (`max-w-prose`), dual-rail navigation, syntax-highlighted code blocks.
64
- - **Experience (`references/modes/experience.md`):** Receding interface chrome, full-bleed visual canvas, tactile exploration.
30
+ 1. **Audit Workspace Primitives:** Inspect `components/ui/`, shared layouts, `app.css`/`globals.css`, and Tailwind config. Reuse existing tables, dialogs, buttons, and form primitives rather than inventing ad-hoc markup.
31
+ 2. **Load Mandatory Reference Branch (1-Hop):**
32
+ - Building a new page, dashboard, or multi-section layout $\rightarrow$ **MUST** `read_file` `references/data-to-structure.md` before writing markup.
33
+ - Implementing async data views, forms, modals, or interactive controls $\rightarrow$ **MUST** `read_file` `references/states-and-a11y.md`.
34
+ - Adjusting responsive behavior, CSS tokens, or localized UI copy $\rightarrow$ **MUST** `read_file` `references/responsive-and-copy.md`.
65
35
 
66
36
  ---
67
37
 
68
- ## 4. Scope Classification: Refine vs. Redesign
38
+ ## 3. Data-to-Structure Mapping
39
+
40
+ Never default to `Card` grids as a generic layout wrapper. Select containers strictly by data shape:
69
41
 
70
- Never split the difference into cosmetic polish on a discarded look:
71
- - **Polish / Refinement:** Preserves layout structure, DOM hierarchy, and design tokens. Resolves contrast, missing state quad, microcopy, and lint issues.
72
- - **Restyle:** Preserves layout geometry. Replaces color tokens, typographic scales, corner radiuses, and elevation shadows.
73
- - **Full Redesign:** Replaces entire spatial geometry and posture. Mandatory decoupled protocol: extract data/contracts first, discard old DOM, establish clear spatial posture and theme tokens, and compile directly to production files with complete layout coherence.
42
+ | Data Shape | Required Semantic Structure |
43
+ | :--- | :--- |
44
+ | Sequential workflow (`Step 1 -> 4`) | Connected `<ol>` stepper or timeline |
45
+ | Criteria, weights, pricing, logs, records | `<table/>` with `sticky top-0` header & `tabular-nums` |
46
+ | Team members, rosters, activity streams | Compact `divide-y divide-border` rows |
47
+ | 3–5 summary counts / KPIs | Flat `<dl>` stat strip with hairline dividers |
48
+ | Independent catalog items / isolated auth form | Single-level `Card` container |
74
49
 
75
50
  ---
76
51
 
77
- ## 5. On-Demand Reference Library
52
+ ## 4. On-Demand Engineering References
78
53
 
79
54
  > [!IMPORTANT]
80
- > **Resolution Note:** All paths below are relative to this `SKILL.md` file's parent folder (`.../skills/asc-ui/`). When calling `read_file`, prepend this skill's directory path.
81
-
82
- | Target Domain / Task Requirement | Mandatory Reference Path |
83
- |---|---|
84
- | Domain & genre calibration (Anti-geek cosplay) | `references/modes/genre-calibration.md` |
85
- | Concrete structural layouts & anti-1px cage | `references/craft/composition-patterns.md` |
86
- | Real-world visual benchmarks & rendered DOMs | `references/visuals/` (13 live domains) |
87
- | Curated material themes (Greenfield reference) | `references/craft/themes-catalog.md` |
88
- | Waivable defaults & waiver syntax | `references/reflexes.md` |
89
- | Typography, line-height & tabular numbers | `references/craft/typography.md` |
90
- | Color tokens, single neutral family & elevation | `references/craft/color-surfaces.md` |
91
- | Micro-interactions & GPU motion | `references/craft/motion.md` |
92
- | Native surfaces (selection, caret, scrollbars) | `references/craft/browser-surfaces.md` |
93
- | 50% reduction, active verbs & natural i18n | `references/copy-i18n.md` |
94
- | Responsive reflow, dvh & touch targets | `references/mobile-responsive.md` |
95
- | WCAG 2.2 AA contrast & keyboard operability | `references/accessibility.md` |
96
- | The Data State System & mutation feedback | `references/states-feedback.md` |
97
- | Anti-convergence & layout diversity | `references/divergence.md` |
98
- | Structured UI audit matrix | `references/redesign-audit.md` |
55
+ > Paths below are relative to this `SKILL.md` directory (`.../skills/asc-ui/`). Prepend this skill's folder path when calling `read_file`.
56
+
57
+ | Engineering Concern | Reference Path |
58
+ | :--- | :--- |
59
+ | Anti-card-soup structural templates (`<ol>`, `<table>`, `divide-y`, `<dl>`) | `references/data-to-structure.md` |
60
+ | 4-state data contract, pending mutation lock & WCAG 2.2 AA focus/contrast | `references/states-and-a11y.md` |
61
+ | Brownfield token reuse, `100dvh` mobile reflow, GPU transitions & microcopy | `references/responsive-and-copy.md` |
99
62
 
100
63
  ---
101
64
 
102
- ## 6. Verification & Handoff Sweep
65
+ ## 5. Verification & Handoff Sweep
103
66
 
104
- Before completing any UI task, run this mechanical check:
105
- 1. **Brand & Reference Compliance:** Confirm project tokens were respected (or greenfield constraints followed). Verify zero clumsy literal translations or meta-jargon leaks.
106
- 2. **Finish Gate Sweep:** Verify zero text clipping (+30% expansion buffer), zero awkward text wraps, and 4px/8px spacing grid consistency.
107
- 3. **Visual Verification (`asc preview`):** If a local dev server is running or an HTML prototype exists, run `asc preview <url|file> [--mobile]` to inspect the rendered visual balance before handoff.
108
- 4. **Data States:** Loading skeleton, empty state, error with retry, and populated data are all handled.
109
- 5. **Pending Feedback:** Buttons disable and display feedback during ongoing mutations.
110
- 6. **Contrast & Focus:** Verify keyboard tab flow and high-contrast `:focus-visible` styling.
111
- 7. **Lint Check:** Verify changes against `hooks/lib/known-ui-slop-patterns.json`.
67
+ Before declaring any UI task complete:
68
+ 1. **Structural Rhythm Check:** Confirm the page does not stack consecutive card grids and uses `<table>`, `<ol>`, or `divide-y` lists where required.
69
+ 2. **State & Mutation Check:** Verify loading skeleton, empty state, error state with retry, and `disabled` pending state on submit buttons.
70
+ 3. **Mobile & Overflow Check:** Confirm `min-h-dvh`, wrapped horizontal tables (`overflow-x-auto`), and no fixed-pixel button widths (`w-[120px]`) that clip +30% text expansion.
71
+ 4. **Rendered Preview (`asc preview`):** When a local server or static HTML target is available, run `asc preview <url|file> [--mobile]` to inspect rendered layout balance before handoff.
@@ -0,0 +1,96 @@
1
+ # Deterministic Data-to-Structure Mapping (Anti-Card-Soup)
2
+
3
+ Code-generation models default to wrapping every dataset in an identical bordered card grid (`grid` + `rounded-xl` + `border` + `p-6`). Repeating card grids across three or more sections produces visually monotonous "Card Soup". Map every dataset deterministically to its semantic HTML structure instead.
4
+
5
+ ---
6
+
7
+ ## 1. Mandatory Structural Mapping Matrix
8
+
9
+ | Data Shape | Forbidden Pattern (Card Soup) | Required Semantic Container |
10
+ | :--- | :--- | :--- |
11
+ | **Sequential Steps / Workflow (`1 -> 2 -> 3`)** | 3–4 bordered cards with `01`, `02`, `03` badges | Connected `<ol>` stepper with horizontal/vertical connector lines |
12
+ | **Criteria, Rubrics, Pricing Tiers, Logs, Metrics** | Multi-row card grid with repeated labels/badges | Semantic `<table>` with `sticky top-0` header and `tabular-nums` |
13
+ | **People, Committees, Directories, Activity Feeds** | Profile cards with placeholder avatar circles | Compact `divide-y divide-border` roster list (single-line or two-column rows) |
14
+ | **Summary KPIs / Key Counts (3–5 numbers)** | Individual shadowed boxes per number | Flat typographic strip separated by hairline borders (`sm:divide-x divide-border`) |
15
+ | **FAQs / Reference Details** | Nested bordered boxes inside bordered panels | Native `<details>` / `<summary>` or unboxed `divide-y` accordion |
16
+ | **Independent Catalog Items / Single Isolated Form** | Card-inside-card nesting | Single-level `Card` (`border border-border` OR `shadow-sm`, never both) |
17
+
18
+ ---
19
+
20
+ ## 2. Structural Reference Templates
21
+
22
+ ### 2.1 Sequential Process -> Connected Stepper (`<ol>`)
23
+ ```html
24
+ <ol class="grid grid-cols-1 gap-6 border-t border-border pt-6 md:grid-cols-4">
25
+ <li class="space-y-1.5">
26
+ <span class="text-xs font-mono font-semibold text-muted-foreground">Step 1</span>
27
+ <h3 class="text-sm font-semibold text-foreground">Authenticate Account</h3>
28
+ <p class="text-sm text-muted-foreground">Sign in with your assigned unit credentials.</p>
29
+ </li>
30
+ <li class="space-y-1.5">
31
+ <span class="text-xs font-mono font-semibold text-muted-foreground">Step 2</span>
32
+ <h3 class="text-sm font-semibold text-foreground">Submit Assessment</h3>
33
+ <p class="text-sm text-muted-foreground">Complete indicator scores per evaluation category.</p>
34
+ </li>
35
+ </ol>
36
+ ```
37
+
38
+ ### 2.2 Weighted Criteria / Structured Records -> Matrix `<table>`
39
+ ```html
40
+ <div class="overflow-x-auto border-y border-border">
41
+ <table class="w-full text-left text-sm">
42
+ <thead class="sticky top-0 bg-background border-b border-border text-xs font-medium text-muted-foreground">
43
+ <tr>
44
+ <th scope="col" class="py-3 pr-4">Category</th>
45
+ <th scope="col" class="py-3 px-4">Required Evidence</th>
46
+ <th scope="col" class="py-3 px-4 text-right">Weight</th>
47
+ <th scope="col" class="py-3 pl-4 text-right">Action</th>
48
+ </tr>
49
+ </thead>
50
+ <tbody class="divide-y divide-border">
51
+ <tr class="hover:bg-muted/40 transition-colors">
52
+ <td class="py-3 pr-4 font-medium text-foreground">Governance &amp; Records</td>
53
+ <td class="py-3 px-4 text-muted-foreground">Decree PDF, annual roster</td>
54
+ <td class="py-3 px-4 text-right font-mono tabular-nums">20%</td>
55
+ <td class="py-3 pl-4 text-right"><a href="#details" class="font-medium text-primary hover:underline">Inspect</a></td>
56
+ </tr>
57
+ </tbody>
58
+ </table>
59
+ </div>
60
+ ```
61
+
62
+ ### 2.3 Team / Roster Directory -> Compact `divide-y` List
63
+ ```html
64
+ <ul class="divide-y divide-border border-y border-border">
65
+ <li class="flex flex-col gap-1 py-3.5 sm:flex-row sm:items-baseline sm:justify-between">
66
+ <div>
67
+ <span class="font-medium text-foreground">Dr. Budi Santoso</span>
68
+ <span class="ml-2 text-sm text-muted-foreground">Lead Auditor — Administrative Verification</span>
69
+ </div>
70
+ <span class="text-xs font-mono text-muted-foreground">District I–II</span>
71
+ </li>
72
+ </ul>
73
+ ```
74
+
75
+ ### 2.4 Summary Figures -> Flat Stat Strip
76
+ ```html
77
+ <dl class="grid grid-cols-2 gap-6 border-y border-border py-6 sm:grid-cols-4 sm:gap-0 sm:divide-x sm:divide-border">
78
+ <div class="sm:px-6 first:sm:pl-0">
79
+ <dt class="text-xs text-muted-foreground">Registered Units</dt>
80
+ <dd class="mt-1 text-2xl font-semibold tracking-tight font-mono tabular-nums text-foreground">40</dd>
81
+ </div>
82
+ <div class="sm:px-6">
83
+ <dt class="text-xs text-muted-foreground">Evaluation Domains</dt>
84
+ <dd class="mt-1 text-2xl font-semibold tracking-tight font-mono tabular-nums text-foreground">5</dd>
85
+ </div>
86
+ </dl>
87
+ ```
88
+
89
+ ---
90
+
91
+ ## 3. Page Rhythm Rules
92
+
93
+ 1. **Maximum One Card Grid Per View:** A single page must never stack two or more multi-column card grids consecutively. Alternate dense sections (`<table>`, `divide-y` list, `<dl>` stat strip, split 2-column prose/form).
94
+ 2. **No Placeholder Avatars or Fake Chrome:** Omit empty gray silhouette circles when real user photos do not exist. Omit fake macOS traffic-light window dots (`red/yellow/green`) outside developer CLI documentation.
95
+ 3. **Single Elevation Per Surface:** Use either `border border-border` OR `shadow-sm` on an isolated container—never combine heavy borders with drop shadows, and never nest a bordered card inside another bordered card.
96
+
@@ -0,0 +1,32 @@
1
+ # Token Reuse, Responsive Containment & Microcopy Hygiene
2
+
3
+ ---
4
+
5
+ ## 1. Brownfield Token & Component Reuse
6
+
7
+ 1. **Inspect Existing Primitives First:** Before creating any markup or CSS, inspect `components/ui/`, `components/`, `app.css` / `globals.css`, and `tailwind.config.*`.
8
+ 2. **Never Override Workspace Tokens:** When a repository already defines brand variables (`--primary`, `--background`, `--border`, `--radius`) or installed component primitives (Radix, Shadcn, Headless UI, Blade components), compose directly from them. Never introduce raw hex values (`#6366f1`) or competing neutral gray scales (do not mix `slate` with `stone` or `zinc` on the same surface).
9
+ 3. **External Design Sources:** When Figma frames, design specs, or pre-built component blocks exist, translate those exact token and spacing contracts rather than inventing decorative CSS from scratch.
10
+
11
+ ---
12
+
13
+ ## 2. Responsive Layout & GPU Motion
14
+
15
+ 1. **Dynamic Viewport Height:** Use `min-h-dvh` (`100dvh`) for full-height shells—never `h-screen` or `100vh`, which clip behind mobile browser toolbars.
16
+ 2. **Horizontal Overflow Containment:** Apply `overflow-x: clip` on the root layout shell. Wrap wide data tables in `<div class="overflow-x-auto">` so tables scroll internally without breaking mobile page width.
17
+ 3. **Touch Hit Targets:** Interactive controls on mobile/touch viewports must provide at least a **44x44px** hit area (`min-h-11 min-w-11` or equivalent padding) with $\ge$ 8px gap between adjacent actions.
18
+ 4. **Expansion Buffer (+30% Text Length):** Never hardcode fixed pixel widths on text buttons (`w-[120px]`). Use `px-4 py-2` with `min-w-*` so localized strings (such as Indonesian or German) expand without clipping.
19
+ 5. **GPU-Only Transitions:** Never use `transition-all`. Specify exact properties (`transition-colors`, `transition-opacity`, `transition-transform`) and never animate layout geometry (`width`, `height`, `top`, `left`, `margin`).
20
+
21
+ ---
22
+
23
+ ## 3. Microcopy & Single-Language Purity
24
+
25
+ 1. **50% Word Reduction:** Cut ornamental filler. Write direct operational labels:
26
+ - Button labels use `Verb + Object`: `Save Changes`, `Export CSV`, `Revoke Key` (avoid vague `Submit` or `Click Here`).
27
+ - Omit small-caps kicker tags (`text-[11px] uppercase tracking-wider`) above headings; let headings stand on their own.
28
+ 2. **Strict Single-Language Surface:** Keep every visible string on a page—headings, table headers, placeholders, empty states, validation messages, and buttons—in one language.
29
+ - Never mix English and Indonesian (`meng-generate`, `di-submit`).
30
+ - In Indonesian interfaces, use natural idiomatic terms established in the codebase (*panel samping*, *garis pemisah*, *jendela dialog*, *unggah berkas*) rather than awkward literal calques (*laci sembul*, *garis rambut*, *jendela sembul*).
31
+ 3. **Zero Fabricated Content:** Never invent customer quotes, partner company names, fake user counts (`10,000+ teams`), or unbacked telemetry metrics. Omit absent marketing proof entirely.
32
+
@@ -0,0 +1,38 @@
1
+ # Data States, Mutation Feedback & Accessibility Floor
2
+
3
+ Every interactive interface must enforce deterministic state coverage and WCAG 2.2 AA accessibility invariants before handoff.
4
+
5
+ ---
6
+
7
+ ## 1. The 4-State Data Contract
8
+
9
+ Every asynchronous view, table, or list must explicitly handle all four states:
10
+
11
+ 1. **Loading State:** Render layout-preserving skeletons matching actual row/column heights (`animate-pulse bg-muted`). Avoid full-screen blocking spinners on incremental refetches.
12
+ 2. **Empty State:** State factually what is absent and provide one direct primary action when applicable (for example: *"No API keys created." -> `[Create API Key]`). Never write poetic or motivational empty-state essays.
13
+ 3. **Error State:** Display a safe, specific failure reason (`role="alert"`) paired with an immediate `[Retry]` button that re-triggers the failed query without losing form inputs.
14
+ 4. **Populated State:** Handle text overflow (`truncate` or `line-clamp-2` with accessible full value), missing optional fields (`—`), and pagination/virtualization when rows exceed 100 items.
15
+
16
+ ---
17
+
18
+ ## 2. Mutation & Form Safety
19
+
20
+ 1. **Immediate Pending Lock:** Disable submit/destructive buttons (`disabled={isPending}` + `aria-busy="true"`) on click to prevent duplicate submissions.
21
+ 2. **Preserve User Input on Failure:** Never clear form fields when a server request fails. Surface field-level validation errors adjacent to each input via `aria-describedby` and `aria-invalid="true"`.
22
+ 3. **Explicit Outcome Notification:** Confirm non-obvious background mutations via a concise status banner or toast; never swallow caught errors silently.
23
+ 4. **Destructive Confirmations Only:** Reserve modal dialogs strictly for irreversible destructive actions (delete, revoke) or isolated multi-step imports. Use inline forms or drawers for routine edits.
24
+
25
+ ---
26
+
27
+ ## 3. WCAG 2.2 AA & Keyboard Operability
28
+
29
+ 1. **Contrast Ratios:**
30
+ - Normal text (`< 18pt` / `< 14pt bold`): minimum **4.5:1** against its background.
31
+ - Large text, icons, and input boundaries: minimum **3:1**.
32
+ 2. **Visible Focus Ring:** Never apply `outline-none` or `focus:outline-none` without pairing `focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`.
33
+ 3. **Semantic Landmarks & Controls:**
34
+ - Use `<button type="button">` for actions and `<a href="...">` for navigation. Never attach `onClick` to non-interactive `<div>` or `<span>`.
35
+ - Pair every `<input>`, `<select>`, and `<textarea>` with an explicit `<label htmlFor="...">` or `aria-label`.
36
+ - Icon-only buttons require `aria-label` describing the action (`aria-label="Close panel"`), with inner SVG marked `aria-hidden="true"`.
37
+ 4. **Reduced Motion:** Wrap non-essential CSS transitions and keyframe animations in `@media (prefers-reduced-motion: reduce)` fallbacks (`transition: none; animation: none;`).
38
+
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-senior-core",
3
- "version": "6.16.6",
3
+ "version": "6.17.0",
4
4
  "description": "Universal AI coding rules. Write code like a staff engineer.",
5
5
  "author": "fatidaprilian",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "6.16.6",
3
+ "version": "6.17.0",
4
4
  "type": "module",
5
5
  "description": "Agentic Senior Core: Universal AI coding rules and workflows. Write code like a staff engineer, not a junior.",
6
6
  "bin": {
package/plugin.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: agentic-senior-core
2
- version: 6.16.6
2
+ version: 6.17.0
3
3
  description: Universal AI coding rules. Write code like a staff engineer.
4
4
  author: fatidaprilian
5
5
  provides_hooks:
@@ -1,102 +0,0 @@
1
- # Accessibility Engineering & WCAG 2.2 Compliance
2
-
3
- Accessibility is not an afterthought or an optional overlay. It is the structural floor of web engineering. Every component must be perceivable, operable, understandable, and robust.
4
-
5
- ---
6
-
7
- ## 1. Contrast Ratios & WCAG Compliance
8
-
9
- All text and critical visual indicators must meet WCAG 2.2 Level AA mathematical contrast floors.
10
-
11
- ### 1.1 Contrast Floors
12
- - **Normal Body Text (< 18pt / 24px regular, < 14pt bold):** Minimum `4.5:1` contrast ratio against its background.
13
- - **Large Text ($\ge$ 18pt / 24px regular, $\ge$ 14pt bold):** Minimum `3:1` contrast ratio.
14
- - **UI Components & Graphical Boundaries:** Active input borders, toggle switches, and focus indicators require minimum `3:1` against adjacent background colors.
15
-
16
- ### 1.2 Avoiding Low-Contrast Surfaces
17
- A frequent aesthetic failure is using low-contrast grey text for "subtle elegance":
18
- - **Failing example:** `text-zinc-500` (`#71717a`) on `bg-zinc-900` (`#18181b`) = **3.8:1** (Fails 4.5:1 AA for body copy).
19
- - **Compliant fix:** `text-zinc-400` (`#a1a1aa`) on `bg-zinc-900` = **6.2:1** (Passes AA).
20
- - **Light mode equivalent:** `text-zinc-400` (`#a1a1aa`) on `bg-white` = **2.6:1** (Fails). Must use `text-zinc-600` (`#52525b`, 5.7:1) or darker for readable secondary copy.
21
-
22
- ---
23
-
24
- ## 2. Focus Management & Keyboard Operability
25
-
26
- Every capability available via pointer must be fully operable via keyboard alone.
27
-
28
- ### 2.1 The Focus-Visible Rule
29
- Never remove browser focus indicators without providing an immediate high-contrast replacement:
30
-
31
- ```html
32
- <!-- BANNED: Strips focus visibility entirely -->
33
- <button class="outline-none">Action</button>
34
-
35
- <!-- ENFORCED: High-contrast focus ring on keyboard interaction -->
36
- <button class="focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background">
37
- Action
38
- </button>
39
- ```
40
-
41
- ### 2.2 Dialog Focus Traps & Escape Key Contract
42
- Any modal, drawer, or sheet must obey the modal contract:
43
- 1. **Focus Trap:** When opened, focus moves to the first focusable element inside the modal. Keyboard `Tab` cycles strictly inside the dialog.
44
- 2. **Escape Key Dismissal:** Pressing `Escape` must immediately close the dialog.
45
- 3. **Return Focus:** Upon closing, focus must return to the element that triggered the dialog open event.
46
- 4. **ARIA Metadata:** Outer container must declare `role="dialog"`, `aria-modal="true"`, and `aria-labelledby="dialog-title-id"`.
47
-
48
- ---
49
-
50
- ## 3. Accessible Form Controls
51
-
52
- Forms must convey intent, association, and error states programmatically.
53
-
54
- ```html
55
- <div class="space-y-1.5">
56
- <label for="user-email" class="text-sm font-medium text-foreground">
57
- Work email
58
- </label>
59
- <input
60
- id="user-email"
61
- name="email"
62
- type="email"
63
- aria-invalid="true"
64
- aria-describedby="email-error-msg"
65
- class="w-full px-3 py-2 rounded-md border border-destructive bg-background text-foreground focus-visible:ring-2 focus-visible:ring-destructive"
66
- />
67
- <p id="email-error-msg" class="text-xs text-destructive flex items-center gap-1" role="alert">
68
- <svg class="w-3.5 h-3.5" aria-hidden="true">...</svg>
69
- <span>Enter a valid corporate email address (e.g. name@company.com).</span>
70
- </p>
71
- </div>
72
- ```
73
-
74
- - Every `<input>` must be explicitly linked via `for` and `id` to a `<label>`. Do not rely solely on `placeholder`.
75
- - Errors must use `role="alert"` and link via `aria-describedby`.
76
- - When invalid, set `aria-invalid="true"`.
77
-
78
- ---
79
-
80
- ## 4. Icon & Image Semantics
81
-
82
- 1. **Decorative Icons:**
83
- All decorative SVG icons alongside visible text must be hidden from screen readers:
84
- ```html
85
- <button>
86
- <svg aria-hidden="true" class="w-4 h-4">...</svg>
87
- <span>Download receipt</span>
88
- </button>
89
- ```
90
-
91
- 2. **Standalone Icon Buttons:**
92
- Buttons containing only an icon must supply an accessible name via `aria-label`:
93
- ```html
94
- <button type="button" aria-label="Delete document" class="p-2">
95
- <svg aria-hidden="true" class="w-4 h-4">...</svg>
96
- </button>
97
- ```
98
-
99
- 3. **Images:**
100
- - Informative graphics, charts, and photos: descriptive `alt="Graph showing 42% revenue increase in Q3"`.
101
- - Purely aesthetic background patterns or decorative dividers: empty `alt=""` so screen readers ignore them.
102
-