@ryuenn3123/agentic-senior-core 6.13.0 → 6.15.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 (54) 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 -0
  3. package/.agents/plugins/agentic-senior-core/commands/asc-develop.toml +3 -0
  4. package/.agents/plugins/agentic-senior-core/commands/asc-reference.md +1 -0
  5. package/.agents/plugins/agentic-senior-core/commands/asc-reference.toml +3 -0
  6. package/.agents/plugins/agentic-senior-core/commands/asc-review.md +1 -1
  7. package/.agents/plugins/agentic-senior-core/commands/asc-review.toml +2 -2
  8. package/.agents/plugins/agentic-senior-core/commands/asc-ui.md +1 -0
  9. package/.agents/plugins/agentic-senior-core/commands/asc-ui.toml +3 -0
  10. package/.agents/plugins/agentic-senior-core/commands/asc.md +1 -0
  11. package/.agents/plugins/agentic-senior-core/commands/asc.toml +3 -0
  12. package/.agents/plugins/agentic-senior-core/hooks/lib/known-ui-slop-patterns.json +15 -0
  13. package/.agents/plugins/agentic-senior-core/plugin.json +1 -1
  14. package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +6 -7
  15. package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +61 -26
  16. package/.agents/plugins/agentic-senior-core/skills/asc-develop/SKILL.md +85 -0
  17. package/.agents/plugins/agentic-senior-core/skills/asc-reference/SKILL.md +2 -1
  18. package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +55 -51
  19. package/.agents/plugins/agentic-senior-core/skills/asc-ui/SKILL.md +157 -0
  20. package/CONTRIBUTING.md +1 -1
  21. package/README.md +1 -1
  22. package/gemini-extension.json +1 -1
  23. package/lib/cli/commands/adapter.mjs +41 -3
  24. package/lib/cli/commands/global.mjs +60 -3
  25. package/lib/cli/commands/status.mjs +10 -0
  26. package/lib/cli/commands/uninstall.mjs +3 -0
  27. package/lib/kilo-plugin/agentic-senior-core.js +36 -0
  28. package/lib/opencode-plugin/agentic-senior-core.js +80 -0
  29. package/package.json +1 -1
  30. package/plugin.yaml +7 -19
  31. package/.agents/plugins/agentic-senior-core/commands/asc-add-feature.md +0 -1
  32. package/.agents/plugins/agentic-senior-core/commands/asc-add-feature.toml +0 -6
  33. package/.agents/plugins/agentic-senior-core/commands/asc-audit.md +0 -1
  34. package/.agents/plugins/agentic-senior-core/commands/asc-audit.toml +0 -2
  35. package/.agents/plugins/agentic-senior-core/commands/asc-dedup.md +0 -1
  36. package/.agents/plugins/agentic-senior-core/commands/asc-dedup.toml +0 -2
  37. package/.agents/plugins/agentic-senior-core/commands/asc-fingerprint.md +0 -1
  38. package/.agents/plugins/agentic-senior-core/commands/asc-fingerprint.toml +0 -2
  39. package/.agents/plugins/agentic-senior-core/commands/asc-help.md +0 -12
  40. package/.agents/plugins/agentic-senior-core/commands/asc-help.toml +0 -12
  41. package/.agents/plugins/agentic-senior-core/commands/asc-new-project.md +0 -1
  42. package/.agents/plugins/agentic-senior-core/commands/asc-new-project.toml +0 -6
  43. package/.agents/plugins/agentic-senior-core/commands/asc-refactor.md +0 -1
  44. package/.agents/plugins/agentic-senior-core/commands/asc-refactor.toml +0 -2
  45. package/.agents/plugins/agentic-senior-core/skills/asc-adapter/SKILL.md +0 -49
  46. package/.agents/plugins/agentic-senior-core/skills/asc-add-feature/SKILL.md +0 -60
  47. package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +0 -61
  48. package/.agents/plugins/agentic-senior-core/skills/asc-bootstrap/SKILL.md +0 -27
  49. package/.agents/plugins/agentic-senior-core/skills/asc-debt/SKILL.md +0 -82
  50. package/.agents/plugins/agentic-senior-core/skills/asc-dedup/SKILL.md +0 -56
  51. package/.agents/plugins/agentic-senior-core/skills/asc-fingerprint/SKILL.md +0 -49
  52. package/.agents/plugins/agentic-senior-core/skills/asc-learn/SKILL.md +0 -40
  53. package/.agents/plugins/agentic-senior-core/skills/asc-new-project/SKILL.md +0 -62
  54. package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +0 -62
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: asc-ui
3
+ description: >
4
+ Trigger this skill when the user is working on: user interfaces, UI components, UX design, frontend 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 this UI", "write UI copy", "fix UI slop", "make it look professional", "too verbose", "improve the design", "bikin UI", "rapikan tampilan", "tulisan UI berlebihan", "terlalu kaku", "jangan kayak AI", "bahasanya aneh". Also trigger when creating or editing files matching: `*.tsx`, `*.jsx`, `*.vue`, `*.svelte`, `*.html`, `*.blade.php`, `*.css`, or UI component files.
5
+ ---
6
+
7
+ # Universal UI/UX Engineering & Anti-Slop Guidelines
8
+
9
+ Universal engineering and microcopy standards for human-grade, scannable, and robust digital interfaces. Eliminates generic "AI Slop" — verbose text, redundant headings, corporate filler, awkward foreign loanwords, and cookie-cutter layouts.
10
+
11
+ Grounded in: Nielsen Norman Group (Microcopy & Scannability), Refactoring UI (Hierarchy & Spacing), Apple HIG & Google Material Design 3 (Action Semantics & Tone), and W3C Internationalization / Localization Best Practices.
12
+
13
+ ---
14
+
15
+ ## 1. UX Microcopy & Text De-sloppification
16
+
17
+ LLMs naturally gravitate toward corporate marketing fluff and redundant explanations. In functional UI (dashboards, forms, settings, tables, dialogs), text is a tool for orientation and action, not a brochure.
18
+
19
+ ### The Redundancy Elimination Rule (Kill Useless Subtitles)
20
+ - **Zero Echo Subtitles:** If a heading or label is self-explanatory (e.g., *"Payment Methods"*, *"Invoice History"*, *"Team Members"*), **NEVER** add an explanatory subtitle repeating the heading's words (e.g., *"Manage, view, and organize all your payment methods here"*).
21
+ - **Subtitle Criterion:** A subtitle is permitted **ONLY** if it contains an essential technical constraint or irreversible risk:
22
+ - *Allowed:* *"API keys are shown once upon creation and cannot be retrieved later."*
23
+ - *Forbidden:* *"View and manage your API keys to authenticate requests."*
24
+ - **Field Helper Text:** Only describe formatting constraints or privacy rules (e.g., `Max 10MB (PDF, PNG)`). Do not re-explain the field name (`Enter your email address here`).
25
+
26
+ ### The 50% Word Reduction Rule
27
+ - Cut default AI-generated copy by at least 50%. Strip preamble, conversational filler, and passive voice.
28
+ - **Before (AI Slop):** *"In order to successfully proceed with saving your profile changes, please make sure all required fields are accurately filled out."*
29
+ - **After (Clean UI):** *"Fill out all required fields to save."*
30
+
31
+ ### Active, Imperative Action Labels (Buttons & Controls)
32
+ - **Direct Verb + Noun:** Use concise, concrete verbs indicating the immediate outcome: `Save`, `Delete Project`, `Export CSV`, `Send Invite`, `Upgrade Plan`.
33
+ - **Banned Action Phrases:** Never use `Click here to...`, `Press to...`, `Proceed`, or vague single words like `Submit` or `OK` when a descriptive verb exists.
34
+
35
+ ### Banned Marketing Buzzwords in Functional UI
36
+ Never use hyperbolic adjectives in application interfaces:
37
+ - **Forbidden:** `seamless`, `seamlessly`, `effortless`, `effortlessly`, `empower`, `robust`, `revolutionize`, `dynamic`, `all-in-one`, `supercharge`, `elevate`, `unlock the power of`, `at your fingertips`, `cutting-edge`.
38
+ - Treat an admin dashboard or business tool with utilitarian dignity. Describe the system state neutrally.
39
+
40
+ ---
41
+
42
+ ## 2. Language Purity & Localization Discipline
43
+
44
+ AI frequently creates "localization slop" by mixing languages, fabricating awkward hybrid loanwords, or inserting literal dictionary translations that sound unnatural to native speakers.
45
+
46
+ ### Strict Single-Language Consistency
47
+ - **Zero Hybrid Code-Switching:** The UI must maintain 100% language purity for its target locale. Never mix English tech slang into non-English interfaces unless it is an established international symbol (e.g., `ID`, `URL`, `API`).
48
+ - *Forbidden (Gado-gado/Jaksel):* *"Submit formulir Anda untuk meng-empower efisiensi dashboard."*
49
+ - *Correct (Indonesian):* *"Kirim formulir untuk memperbarui data ringkasan."*
50
+ - *Correct (English):* *"Submit the form to update dashboard data."*
51
+
52
+ ### No Artificial Hybrid Neologisms
53
+ - Never create unidiomatic grammatical Frankenstein words by attaching native affixes to English stems:
54
+ - *Forbidden:* `meng-generate`, `di-submit`, `meng-approve`, `di-cancel`, `men-delete`.
55
+ - *Use established native terms:* `membuat / menghasilkan`, `kirim`, `setujui`, `dibatalkan`, `hapus`.
56
+
57
+ ### Deterministic Microcopy Glossary
58
+ - Never exhibit "Thesaurus Syndrome" (swapping words across dialogs to avoid repetition). Control labels must remain mechanically deterministic across every screen:
59
+ - Cancellation must always be `Batal` (ID) or `Cancel` (EN) — never alternate with `Urungkan`, `Tutup`, or `Kembali` for identical actions.
60
+ - Deletion must always be `Hapus` (ID) or `Delete` (EN).
61
+ - Saving must always be `Simpan` (ID) or `Save` (EN).
62
+
63
+ ### Dynamic Text Expansion Budget
64
+ - Non-English translations (Indonesian, German, French, Spanish) are typically 20% to 40% longer than English equivalents.
65
+ - Containers, button labels, table headers, and badges must never have rigid fixed pixel widths (`w-[120px]`) that cause text clipping or awkward multi-line wrapping. Use flexible flex/grid layouts with sensible min-widths and text truncation (`truncate` with title tooltips) where appropriate.
66
+
67
+ ---
68
+
69
+ ## 3. Visual Layout & Anti-Cookie-Cutter Design
70
+
71
+ AI tools default to an easily recognizable, generic layout template ("The AI Starter Pack"). Avoid these homogenized visual tropes:
72
+
73
+ ### The Banned AI Visual Starter Pack
74
+ - **No Purple-to-Cyan/Indigo Gradients:** Avoid cliché violet/teal neon glows on dark backgrounds unless explicitly mandated by existing brand tokens. Use solid, high-contrast semantic surfaces.
75
+ - **No Cardocalypse (Identical 3-Card Feature Grids):** Do not default every page or dashboard to 3 identical rounded cards, each sporting an abstract Lucide/Heroicon icon and 2 lines of generic gray text. Vary layout structure based on data type (tables, summary metrics, compact lists, detail panels).
76
+ - **No Gratuitous Glassmorphism:** Never slap `backdrop-blur-md bg-white/10` onto functional surfaces where it degrades contrast, creates readability issues on scroll, or wastes rendering performance.
77
+ - **No Bouncy/Distracting Hover Animations:** Interactive elements should provide snappy, predictable feedback (`transition-colors duration-150`, subtle border shifts). Avoid unprompted bounce, scale expansions (`hover:scale-105`), or floating wiggles on utilitarian buttons.
78
+
79
+ ### Information Density & Scannability (Refactoring UI)
80
+ - **Scannable Hierarchy:** Use font weight (`font-semibold`) and color contrast (`text-foreground` vs `text-muted-foreground`) to establish visual hierarchy before increasing font size.
81
+ - **Compact Utilitarian Density:** Avoid excessive whitespace bloat (`p-12`, giant empty margins) on functional productivity tools. Deliver compact, legible data tables with sticky headers, clear row borders, and inline status badges.
82
+ - **Single Design Source of Truth:** Reuse existing design tokens, CSS variables, and spacing scales (`spacing`, `radius`, `palette`). Do not invent ad-hoc hex codes (`#6366f1`, `#3b82f6`) or arbitrary inline styles.
83
+
84
+ ---
85
+
86
+ ## 4. State Quad & Feedback Architecture
87
+
88
+ Every asynchronous view or mutation must deterministically handle all states:
89
+
90
+ ### The Data State Quad
91
+ 1. **Loading State:** Render proportional skeleton screens matching the actual layout shape (never a single generic spinner in the middle of a blank canvas).
92
+ 2. **Empty State:**
93
+ - Maximum 1 direct sentence stating reality + 1 primary action button.
94
+ - *Good:* *"No active projects. [Create Project]"*
95
+ - *Forbidden:* Flowery essays (*"Your workspace is a blank canvas awaiting your creative brilliance..."*).
96
+ 3. **Error State:**
97
+ - Factual description of what failed + 1 clear recovery button (`[Retry]`).
98
+ - *Good:* *"Unable to load invoices. [Retry]"*
99
+ - *Forbidden:* Apologetic colloquialisms (*"Oopsie! Something went wrong on our end..."*).
100
+ 4. **Populated State:** High-density, cleanly structured data presentation.
101
+
102
+ ### Action Mutation Feedback
103
+ - Every mutation button (submit, delete, update) **MUST** immediately reflect a pending state:
104
+ - Disable the button (`disabled`).
105
+ - Show an inline spinner or change text to ongoing action (`Saving...`).
106
+ - Display clear, localized toast or banner confirmation upon completion with actionable retry on failure.
107
+ - Never silently swallow mutation errors. Wrap critical route widgets in localized React/Vue Error Boundaries.
108
+
109
+ ---
110
+
111
+ ## 5. Mobile-First Responsive Reflow & Touch Ergonomics
112
+
113
+ Mobile layout is a distinct, intentional reflow — not the desktop layout squeezed into a narrow viewport.
114
+
115
+ ### Intentional Reflow Over Shrunken Desktops
116
+ - **Re-stack and Re-order:** When the viewport narrows, multi-column grids must collapse into a clean, single-column stack. Side-by-side card grids must never squeeze horizontally until text wraps into 2-letter lines.
117
+ - **Content-Driven Breakpoints:** Place breakpoints where content begins to stress or break readability, never based on a rigid list of marketing device specs (e.g., iPhone 14 width). Test by dragging viewports smoothly across the full 320px–1024px range.
118
+ - **Mobile Section Padding:** Desktop padding scales (96px, 128px) create absurd vertical wastelands on phones. Reduce section vertical padding to a mobile register (typically 32px–48px / `py-8` to `py-12`).
119
+
120
+ ### Responsive Units & Viewport Traps
121
+ - **Dynamic Viewport Height (`dvh`):** Never use `100vh` for full-screen hero or drawer elements on mobile. Mobile browser chrome (address and navigation bars) dynamically expands and collapses, causing `100vh` to trigger involuntary page scrolling and button clipping. Use `min-h-dvh` or `h-dvh`.
122
+ - **Fluid Typography:** Avoid rigid fixed-pixel headings (`font-size: 48px`). Use fluid typography (`clamp(1.5rem, 4vw + 1rem, 2.75rem)`) or explicit responsive font classes (`text-2xl sm:text-4xl lg:text-5xl`).
123
+
124
+ ### Touch Targets & Thumb-Zone Ergonomics
125
+ - **44x44px Minimum Touch Target:** Every interactive element (buttons, icon links, checkbox toggles, chips) must have a touch target of at least 44x44px (`min-h-[44px] min-w-[44px]`). If an icon is small (16px), pad its container (`p-3`).
126
+ - **Touch Clearance:** Maintain at least 8px spacing between adjacent touch targets to eliminate accidental mis-taps.
127
+ - **Reachability:** Place primary mobile actions (submit, filters, navigation) within comfortable thumb reach (bottom sheets, sticky action bars) rather than marooning them at the extreme top corners.
128
+
129
+ ### Zero Horizontal Scroll Leaks
130
+ - The entire mobile page must maintain zero horizontal overflow.
131
+ - **Tables & Code Blocks:** Wrap wide tables and code blocks in dedicated horizontal scroll containers (`overflow-x-auto max-w-full`) with visible scroll indications, preventing them from blowing out the body width.
132
+ - **Long Unbroken Strings:** Protect against email addresses, hashes, or URLs overflowing cards using `break-words` or `truncate`.
133
+
134
+ ---
135
+
136
+ ## 6. Human Accessibility & Contrast Engine (WCAG 2.2 AA)
137
+
138
+ An interface that excludes users with diverse vision, motor, or device constraints is structurally broken.
139
+
140
+ ### Mathematical Contrast Minimums
141
+ Always meet WCAG 2.2 AA contrast ratios:
142
+ - **Normal Body Text (< 18px or regular < 14px bold):** Minimum **4.5:1** contrast against adjacent background.
143
+ - **Large Text (>= 18px or bold >= 14px):** Minimum **3.0:1** contrast.
144
+ - **Non-Text Components & States:** Minimum **3.0:1** for input borders, focus indicators, status badges, and active icons against their background (WCAG 1.4.11).
145
+
146
+ ### The Grey-on-Grey Hallucination Trap
147
+ Human eyes consistently overestimate contrast on subtle grey pairs:
148
+ - `#777777` on pure white (`#FFFFFF`) produces **4.48:1** (FAILS normal text AA; minimum safe pure gray is `#767676` which achieves 4.54:1).
149
+ - `#555555` on pure black (`#000000`) produces **2.82:1** (FAILS all text AA).
150
+ - When placing text over gradient backgrounds or images, add a solid scrim or compute contrast at the lightest/darkest coordinate point, not just the center.
151
+
152
+ ### Keyboard Operability & Focus Rings
153
+ - **Zero Stripped Focus Rings:** Never write `outline: none` or `focus:outline-none` without an immediate high-contrast `:focus-visible` replacement (`focus-visible:ring-2 focus-visible:ring-offset-2`). Stripping focus breaks keyboard navigation completely.
154
+ - **No Mouse-Only Patterns:** Never gate critical functionality behind hover (`:hover`) without an equivalent keyboard or touch focus trigger.
155
+ - **Dialog Escape Hatch:** Every modal, drawer, or dropdown must close immediately upon pressing the `Escape` key and restore keyboard focus to the triggering element.
156
+
157
+
package/CONTRIBUTING.md CHANGED
@@ -75,7 +75,7 @@ These hosts support full plugin systems. Create the host's manifest in its stand
75
75
  | Copilot CLI | `.github/plugin/plugin.json` | JSON |
76
76
  | Devin | `.devin-plugin/plugin.json` | JSON minimal |
77
77
  | Hermes | `plugin.yaml` + `__init__.py` | YAML + Python |
78
- | OpenCode | `.opencode/plugins/agentic-senior-core.mjs` | JS module |
78
+ | OpenCode | `.opencode/plugins/agentic-senior-core.js` | JS module (V2 setup + V1 server) |
79
79
 
80
80
  ### Instruction-tier hosts (single file copy)
81
81
 
package/README.md CHANGED
@@ -108,7 +108,7 @@ If you need to override these defaults (e.g., to whitelist a specific dependency
108
108
 
109
109
  ## Commands & CLI
110
110
 
111
- ASC provides powerful commands to steer your agents (e.g. `/asc-refactor`, `/asc-audit`).
111
+ ASC provides 5 orthogonal meta-commands to steer your agents (`/asc`, `/asc-develop`, `/asc-review`, `/asc-reference`, `/asc-ui`).
112
112
  It also provides a CLI to manage your local setup (e.g. `asc adapter --all`, `asc global --all`).
113
113
 
114
114
  ### Git Pre-Commit Hook
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-senior-core",
3
- "version": "6.13.0",
3
+ "version": "6.15.0",
4
4
  "description": "Universal AI coding rules. Write code like a staff engineer.",
5
5
  "author": "fatidaprilian",
6
6
  "license": "MIT",
@@ -66,6 +66,15 @@ const ADAPTER_TARGETS = {
66
66
  sourcePath: '.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md',
67
67
  pluginSourcePath: 'lib/kilo-plugin/agentic-senior-core.js',
68
68
  },
69
+ opencode: {
70
+ label: 'OpenCode',
71
+ targetPath: 'AGENTS.md',
72
+ sourcePath: '.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md',
73
+ pluginTargetPath: '.opencode/plugins/agentic-senior-core.js',
74
+ pluginSourcePath: 'lib/opencode-plugin/agentic-senior-core.js',
75
+ skillsTargetPath: '.opencode/skills',
76
+ skillsSourcePath: '.agents/plugins/agentic-senior-core/skills',
77
+ },
69
78
  roo: {
70
79
  label: 'Roo Code',
71
80
  targetPath: '.roo/rules/agentic-senior-core.md',
@@ -80,6 +89,7 @@ const ADAPTER_TARGETS = {
80
89
  },
81
90
  };
82
91
 
92
+
83
93
  async function pathExists(filePath) {
84
94
  try {
85
95
  await fs.access(filePath);
@@ -91,8 +101,20 @@ async function pathExists(filePath) {
91
101
 
92
102
  async function copyDirRecursive(src, dest, ignoreNames = []) {
93
103
  await fs.mkdir(dest, { recursive: true });
94
- const entries = await fs.readdir(src, { withFileTypes: true });
95
- for (const entry of entries) {
104
+ const srcEntries = await fs.readdir(src, { withFileTypes: true });
105
+ const srcNames = srcEntries.map(e => e.name);
106
+
107
+ // Prune stale files or directories in dest that no longer exist in src
108
+ const destEntries = await fs.readdir(dest, { withFileTypes: true });
109
+ for (const destEntry of destEntries) {
110
+ if (ignoreNames.includes(destEntry.name)) continue;
111
+ if (!srcNames.includes(destEntry.name)) {
112
+ const destPath = path.join(dest, destEntry.name);
113
+ await fs.rm(destPath, { recursive: true, force: true });
114
+ }
115
+ }
116
+
117
+ for (const entry of srcEntries) {
96
118
  if (ignoreNames.includes(entry.name)) continue;
97
119
  const srcPath = path.join(src, entry.name);
98
120
  const destPath = path.join(dest, entry.name);
@@ -159,6 +181,22 @@ async function generateAdapter(targetDirectory, adapterKey) {
159
181
  }
160
182
  }
161
183
 
184
+ if (adapterKey === 'opencode') {
185
+ if (adapter.pluginSourcePath && adapter.pluginTargetPath) {
186
+ const pluginSource = path.join(REPOSITORY_ROOT, adapter.pluginSourcePath);
187
+ const pluginTarget = path.join(targetDirectory, adapter.pluginTargetPath);
188
+ if (await pathExists(pluginSource)) {
189
+ await fs.mkdir(path.dirname(pluginTarget), { recursive: true });
190
+ await fs.copyFile(pluginSource, pluginTarget);
191
+ }
192
+ }
193
+ const skillsSource = path.join(REPOSITORY_ROOT, adapter.skillsSourcePath || '.agents/plugins/agentic-senior-core/skills');
194
+ const localSkillsTarget = path.join(targetDirectory, adapter.skillsTargetPath || '.opencode/skills');
195
+ if (await pathExists(skillsSource)) {
196
+ await copyDirRecursive(skillsSource, localSkillsTarget);
197
+ }
198
+ }
199
+
162
200
  if (adapterKey === 'roo') {
163
201
  const skillsSource = path.join(REPOSITORY_ROOT, adapter.skillsSourcePath || '.agents/plugins/agentic-senior-core/skills');
164
202
  const localSkillsTarget = path.join(targetDirectory, adapter.skillsTargetPath || '.roo/skills');
@@ -193,7 +231,7 @@ export async function runAdapterCommand(commandArguments) {
193
231
 
194
232
  if (requestedAdapters.length === 0) {
195
233
  console.log('Agentic Senior Core -- Adapter Generator\n');
196
- console.log('Usage: asc adapter [--cursor] [--codex] [--devin] [--cline] [--copilot] [--kiro] [--continue] [--zed] [--aider] [--kilocode] [--roo] [--openhands] [--windsurf] [--all]\n');
234
+ console.log('Usage: asc adapter [--cursor] [--codex] [--devin] [--cline] [--copilot] [--kiro] [--continue] [--zed] [--aider] [--kilocode] [--opencode] [--roo] [--openhands] [--windsurf] [--all]\n');
197
235
  console.log('Generates instruction-tier adapter files for IDEs without plugin support.');
198
236
  console.log('Each adapter is a single file containing the universal coding rules.\n');
199
237
  process.exit(0);
@@ -67,8 +67,20 @@ const GLOBAL_TARGETS = {
67
67
  pluginTargetPath: () => path.join(HOME, '.config', 'kilo', 'plugin', 'agentic-senior-core.js'),
68
68
  note: 'Installs global plugin to ~/.config/kilo/plugin/ and rules to ~/.config/kilo/rules/.',
69
69
  },
70
+ opencode: {
71
+ label: 'OpenCode',
72
+ kind: 'opencode-global',
73
+ rulesSourcePath: '.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md',
74
+ pluginSourcePath: 'lib/opencode-plugin/agentic-senior-core.js',
75
+ skillsSourcePath: '.agents/plugins/agentic-senior-core/skills',
76
+ targetPath: () => path.join(HOME, '.config', 'opencode', 'AGENTS.md'),
77
+ pluginTargetPath: () => path.join(HOME, '.config', 'opencode', 'plugins', 'agentic-senior-core.js'),
78
+ skillsTargetPath: () => path.join(HOME, '.config', 'opencode', 'skills'),
79
+ note: 'Installs global rules to ~/.config/opencode/AGENTS.md, plugin to plugins/, and skills.',
80
+ },
70
81
  kiro: {
71
82
  label: 'Kiro',
83
+
72
84
  kind: 'file',
73
85
  sourcePath: '.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md',
74
86
  targetPath: () => path.join(HOME, '.kiro', 'steering', 'agentic-senior-core.md'),
@@ -116,8 +128,20 @@ async function pathExists(filePath) {
116
128
 
117
129
  async function copyDirRecursive(src, dest, ignoreNames = []) {
118
130
  await fs.mkdir(dest, { recursive: true });
119
- const entries = await fs.readdir(src, { withFileTypes: true });
120
- for (const entry of entries) {
131
+ const srcEntries = await fs.readdir(src, { withFileTypes: true });
132
+ const srcNames = srcEntries.map(e => e.name);
133
+
134
+ // Prune stale files or directories in dest that no longer exist in src
135
+ const destEntries = await fs.readdir(dest, { withFileTypes: true });
136
+ for (const destEntry of destEntries) {
137
+ if (ignoreNames.includes(destEntry.name)) continue;
138
+ if (!srcNames.includes(destEntry.name)) {
139
+ const destPath = path.join(dest, destEntry.name);
140
+ await fs.rm(destPath, { recursive: true, force: true });
141
+ }
142
+ }
143
+
144
+ for (const entry of srcEntries) {
121
145
  if (ignoreNames.includes(entry.name)) continue;
122
146
  const srcPath = path.join(src, entry.name);
123
147
  const destPath = path.join(dest, entry.name);
@@ -281,6 +305,35 @@ async function installRooGlobal(target) {
281
305
  return true;
282
306
  }
283
307
 
308
+ async function installOpenCodeGlobal(target) {
309
+ const rulesSource = path.join(REPOSITORY_ROOT, target.rulesSourcePath);
310
+ const pluginSource = path.join(REPOSITORY_ROOT, target.pluginSourcePath);
311
+ const skillsSource = path.join(REPOSITORY_ROOT, target.skillsSourcePath);
312
+ const rulesTarget = target.targetPath();
313
+ const pluginTarget = target.pluginTargetPath();
314
+ const skillsTarget = target.skillsTargetPath();
315
+
316
+ if (!(await pathExists(rulesSource))) {
317
+ console.error(` ${target.label}: rules source not found ... FAIL`);
318
+ return false;
319
+ }
320
+
321
+ await fs.mkdir(path.dirname(rulesTarget), { recursive: true });
322
+ await fs.copyFile(rulesSource, rulesTarget);
323
+
324
+ if (await pathExists(pluginSource)) {
325
+ await fs.mkdir(path.dirname(pluginTarget), { recursive: true });
326
+ await fs.copyFile(pluginSource, pluginTarget);
327
+ }
328
+
329
+ if (await pathExists(skillsSource)) {
330
+ await copyDirRecursive(skillsSource, skillsTarget);
331
+ }
332
+
333
+ console.log(` ${target.label}: ${rulesTarget}, ${pluginTarget} & ${skillsTarget} ... OK`);
334
+ return true;
335
+ }
336
+
284
337
  async function installAntigravityIde(target) {
285
338
  const pluginSource = path.join(REPOSITORY_ROOT, target.pluginSourcePath);
286
339
  const rulesSource = path.join(REPOSITORY_ROOT, target.rulesSourcePath);
@@ -412,6 +465,10 @@ async function installGlobalTarget(targetKey) {
412
465
  return await installRooGlobal(target);
413
466
  }
414
467
 
468
+ if (target.kind === 'opencode-global') {
469
+ return await installOpenCodeGlobal(target);
470
+ }
471
+
415
472
  const sourcePath = path.join(REPOSITORY_ROOT, target.sourcePath);
416
473
  const targetPath = target.targetPath();
417
474
 
@@ -473,7 +530,7 @@ export async function runGlobalCommand(commandArguments) {
473
530
 
474
531
  if (requestedTargets.length === 0) {
475
532
  console.log('Agentic Senior Core -- Global Rules Installer\n');
476
- console.log('Usage: asc global [--antigravity] [--codex] [--cline] [--roo] [--kilocode] [--kiro] [--openhands] [--windsurf] [--copilot] [--all]\n');
533
+ console.log('Usage: asc global [--antigravity] [--codex] [--cline] [--roo] [--kilocode] [--opencode] [--kiro] [--openhands] [--windsurf] [--copilot] [--all]\n');
477
534
  console.log('Installs user-level global rules that apply to ALL projects.\n');
478
535
  console.log('Supported automatic global targets:');
479
536
  for (const [key, target] of Object.entries(GLOBAL_TARGETS)) {
@@ -42,6 +42,16 @@ const IDE_CHECKS = [
42
42
  checkCommands: ['agy'],
43
43
  installHint: 'agy plugin install https://github.com/fatidaprilian/Agentic-Senior-Core.git',
44
44
  },
45
+ {
46
+ name: 'OpenCode',
47
+ type: 'plugin',
48
+ checkPaths: [
49
+ path.join(HOME, '.config', 'opencode'),
50
+ path.join(HOME, '.opencode'),
51
+ ],
52
+ checkCommands: ['opencode'],
53
+ installHint: 'asc global --opencode (or asc adapter --opencode)',
54
+ },
45
55
  {
46
56
  name: 'Cursor',
47
57
  type: 'adapter',
@@ -17,6 +17,8 @@ const ADAPTER_FILES = [
17
17
  { label: 'Kilo Code (modern rules)', path: '.kilo/rules/agentic-senior-core.md' },
18
18
  { label: 'Kilo Code (modern plugin)', path: '.kilo/plugin/agentic-senior-core.js' },
19
19
  { label: 'Kilo Code (legacy rules)', path: '.kilocode/rules/agentic-senior-core.md' },
20
+ { label: 'OpenCode (plugin)', path: '.opencode/plugins/agentic-senior-core.js' },
21
+ { label: 'OpenCode (rules)', path: 'AGENTS.md' },
20
22
  { label: 'Roo Code', path: '.roo/rules/agentic-senior-core.md' },
21
23
  { label: 'OpenHands', path: '.openhands/microagents/agentic-senior-core.md' },
22
24
  { label: 'ASC Compiled Validator', path: '.asc/hooks/pre-commit-validator.cjs' },
@@ -26,6 +28,7 @@ const ADAPTER_FILES = [
26
28
  const ADAPTER_DIRECTORIES = [
27
29
  { label: 'Roo Code skills', path: '.roo/skills', markerFile: 'asc/SKILL.md' },
28
30
  { label: 'Kilo Code skills', path: '.kilo/skills', markerFile: 'asc/SKILL.md' },
31
+ { label: 'OpenCode skills', path: '.opencode/skills', markerFile: 'asc/SKILL.md' },
29
32
  ];
30
33
 
31
34
  const GIT_HOOK_PATHS = [
@@ -9,6 +9,40 @@ const ASC_GUARDRAILS = `
9
9
  - Early returns over deep nesting. Delete code that carries no value.
10
10
  `;
11
11
 
12
+ const setup = async (ctx) => {
13
+ if (ctx.session?.hook) {
14
+ await ctx.session.hook("context", (event) => {
15
+ if (Array.isArray(event.system)) {
16
+ const hasASC = event.system.some(item =>
17
+ (typeof item === 'string' && item.includes('Agentic Senior Core')) ||
18
+ (item && typeof item === 'object' && item.text && item.text.includes('Agentic Senior Core'))
19
+ );
20
+ if (!hasASC) {
21
+ event.system.push({ type: "text", text: ASC_GUARDRAILS.trim() });
22
+ }
23
+ }
24
+ });
25
+
26
+ await ctx.session.hook("compaction", (event) => {
27
+ if (Array.isArray(event.context)) {
28
+ event.context.push(
29
+ "## Agentic Senior Core (Persisted Context)\n" +
30
+ "- Maintain strict security guardrails and non-breaking API contracts.\n" +
31
+ "- Prefer clean minimal logic over premature abstractions."
32
+ );
33
+ }
34
+ });
35
+ }
36
+
37
+ if (ctx.shell?.hook) {
38
+ await ctx.shell.hook("create.before", (event) => {
39
+ if (event.env) {
40
+ event.env.ASC_ENABLED = "1";
41
+ }
42
+ });
43
+ }
44
+ };
45
+
12
46
  const server = async ({ project, directory, worktree }) => {
13
47
  return {
14
48
  "experimental.chat.system.transform": async (input, output) => {
@@ -38,5 +72,7 @@ const server = async ({ project, directory, worktree }) => {
38
72
 
39
73
  export default {
40
74
  id: "agentic-senior-core",
75
+ setup,
41
76
  server,
42
77
  };
78
+
@@ -0,0 +1,80 @@
1
+ // Native OpenCode Plugin for Agentic Senior Core
2
+ // Supports OpenCode V2 (setup) and legacy OpenCode / Kilo V1 (server)
3
+
4
+ const ASC_GUARDRAILS = `
5
+ # Agentic Senior Core Rules
6
+ - Write code like a staff engineer. Efficient, safe, maintainable.
7
+ - Before writing code: 1) Need built? 2) Codebase reuse? 3) Stdlib? 4) Dependency? 5) One function? 6) Minimum code.
8
+ - Parameterize all queries. Validate inputs at trust boundaries. Never commit secrets.
9
+ - Early returns over deep nesting. Delete code that carries no value.
10
+ `;
11
+
12
+ const setup = async (ctx) => {
13
+ if (ctx.session?.hook) {
14
+ // OpenCode V2 Context hook: inject system guardrails before model request
15
+ await ctx.session.hook("context", (event) => {
16
+ if (Array.isArray(event.system)) {
17
+ const hasASC = event.system.some(item =>
18
+ (typeof item === 'string' && item.includes('Agentic Senior Core')) ||
19
+ (item && typeof item === 'object' && item.text && item.text.includes('Agentic Senior Core'))
20
+ );
21
+ if (!hasASC) {
22
+ event.system.push({ type: "text", text: ASC_GUARDRAILS.trim() });
23
+ }
24
+ }
25
+ });
26
+
27
+ // OpenCode V2 Compaction hook: preserve core principles across session compaction
28
+ await ctx.session.hook("compaction", (event) => {
29
+ if (Array.isArray(event.context)) {
30
+ event.context.push(
31
+ "## Agentic Senior Core (Persisted Context)\n" +
32
+ "- Maintain strict security guardrails and non-breaking API contracts.\n" +
33
+ "- Prefer clean minimal logic over premature abstractions."
34
+ );
35
+ }
36
+ });
37
+ }
38
+
39
+ // OpenCode V2 Shell hook: mark ASC enabled in process environment
40
+ if (ctx.shell?.hook) {
41
+ await ctx.shell.hook("create.before", (event) => {
42
+ if (event.env) {
43
+ event.env.ASC_ENABLED = "1";
44
+ }
45
+ });
46
+ }
47
+ };
48
+
49
+ const server = async ({ project, directory, worktree }) => {
50
+ return {
51
+ "experimental.chat.system.transform": async (input, output) => {
52
+ if (Array.isArray(output.system)) {
53
+ const hasASC = output.system.some(item => typeof item === 'string' && item.includes('Agentic Senior Core'));
54
+ if (!hasASC) {
55
+ output.system.push(ASC_GUARDRAILS.trim());
56
+ }
57
+ }
58
+ },
59
+ "experimental.session.compacting": async (input, output) => {
60
+ if (Array.isArray(output.context)) {
61
+ output.context.push(
62
+ "## Agentic Senior Core (Persisted Context)\n" +
63
+ "- Maintain strict security guardrails and non-breaking API contracts.\n" +
64
+ "- Prefer clean minimal logic over premature abstractions."
65
+ );
66
+ }
67
+ },
68
+ "shell.env": async (input, output) => {
69
+ if (output.env) {
70
+ output.env.ASC_ENABLED = "1";
71
+ }
72
+ },
73
+ };
74
+ };
75
+
76
+ export default {
77
+ id: "agentic-senior-core",
78
+ setup,
79
+ server,
80
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "6.13.0",
3
+ "version": "6.15.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,30 +1,18 @@
1
1
  name: agentic-senior-core
2
- version: 6.13.0
2
+ version: 6.15.0
3
3
  description: Universal AI coding rules. Write code like a staff engineer.
4
4
  author: fatidaprilian
5
5
  provides_hooks:
6
6
  - pre_llm_call
7
7
  provides_commands:
8
- - asc-refactor
8
+ - asc
9
+ - asc-develop
9
10
  - asc-review
10
- - asc-audit
11
- - asc-fingerprint
12
- - asc-new-project
13
- - asc-add-feature
14
- - asc-adapter
15
- - asc-dedup
16
- - asc-help
11
+ - asc-reference
12
+ - asc-ui
17
13
  provides_skills:
18
14
  - asc
19
- - asc-adapter
20
- - asc-add-feature
21
- - asc-audit
22
- - asc-bootstrap
23
- - asc-debt
24
- - asc-dedup
25
- - asc-fingerprint
26
- - asc-learn
27
- - asc-new-project
28
- - asc-refactor
15
+ - asc-develop
29
16
  - asc-reference
30
17
  - asc-review
18
+ - asc-ui
@@ -1 +0,0 @@
1
- Run the brownfield feature workflow from skills/asc-add-feature/SKILL.md. Follow the Research -> Plan -> Implement phases with explicit human gates to prevent context rot.
@@ -1,6 +0,0 @@
1
- name = "asc-add-feature"
2
- description = "Structured brownfield workflow. Research -> Plan -> Implement with human gates."
3
-
4
- [[instructions]]
5
- type = "context"
6
- content = "Run the brownfield feature workflow from skills/asc-add-feature/SKILL.md. Stop and wait for user approval at the end of each phase (Research, Plan) before proceeding. Update the gate state as instructed."
@@ -1 +0,0 @@
1
- Run the security and architecture audit from skills/asc-audit/SKILL.md. Examine trust boundaries, auth, data handling, architecture boundaries, dependency health, and error exposure. Report findings with severity, evidence, and remediation.
@@ -1,2 +0,0 @@
1
- description = "Security and architecture audit"
2
- prompt = "Load and follow the asc-audit skill. Audit trust boundaries, auth/authz, data handling, architecture boundaries, dependency health, and error exposure. For every finding report severity (critical/high/medium/low), vulnerability class, location, impact, evidence, remediation, and validation steps. Findings ordered by severity."
@@ -1 +0,0 @@
1
- Run the duplicate code audit from skills/asc-dedup/SKILL.md. Scan the specified scope (directory, package, or full repo) for near-duplicate code blocks using jscpd token-level clone detection. Report clusters ranked by duplicated lines, and suggest consolidation only for patterns appearing 3+ times (Rule of Three).
@@ -1,2 +0,0 @@
1
- description = "On-demand duplicate code audit using token-level clone detection"
2
- prompt = "Load and follow the asc-dedup skill. Scan the current project (or specified scope) for near-duplicate code blocks using jscpd. Report clusters ranked by duplicated lines. Suggest consolidation only for patterns appearing 3+ times per the Rule of Three."
@@ -1 +0,0 @@
1
- Run the repository fingerprint workflow from skills/asc-fingerprint/SKILL.md. Build a read-only, evidence-backed map of the target repository before proposing conventions. Stop for approval before writing CONVENTIONS.md.
@@ -1,2 +0,0 @@
1
- description = "Read-only repository convention mapping with evidence"
2
- prompt = "Load and follow the asc-fingerprint skill. Map the target repository's real conventions from code and recent Git history. Separate facts from recommendations, cite file or commit evidence, and stop for approval before writing CONVENTIONS.md."
@@ -1,12 +0,0 @@
1
- Show available Agentic Senior Core commands and skills.
2
-
3
- Available commands:
4
- - /asc-new-project -- Greenfield workflow (Define -> Spec -> Implement -> Validate)
5
- - /asc-add-feature -- Brownfield workflow (Research -> Plan -> Implement)
6
- - /asc-refactor -- Structured refactoring workflow
7
- - /asc-review -- Production-risk code review
8
- - /asc-audit -- Security and architecture audit
9
- - /asc-fingerprint -- Read-only repository convention mapping
10
- - /asc-help -- This help
11
-
12
- The canonical plugin rule is always active. Skills provide deeper, on-demand workflows.
@@ -1,12 +0,0 @@
1
- description = "Show available Agentic Senior Core commands"
2
- prompt = '''
3
- Show available Agentic Senior Core commands and skills.
4
-
5
- Available commands:
6
- - /asc-new-project -- Greenfield workflow (Define -> Spec -> Implement -> Validate)
7
- - /asc-add-feature -- Brownfield workflow (Research -> Plan -> Implement)
8
- - /asc-refactor -- Structured refactoring workflow
9
- - /asc-review -- Production-risk code review
10
- - /asc-audit -- Security and architecture audit
11
- - /asc-help -- This help. ASC loads universal engineering rules covering code quality, architecture, security, error handling, testing, API design, database, frontend, infrastructure, resilience, and async patterns.
12
- '''
@@ -1 +0,0 @@
1
- Run the greenfield project workflow from skills/asc-new-project/SKILL.md. Follow the Define -> Spec -> Implement -> Validate phases with explicit human gates before building.