@ryuenn3123/agentic-senior-core 4.4.0 → 5.2.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 (201) hide show
  1. package/.agents/plugins/agentic-senior-core/plugin.json +3 -0
  2. package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +131 -0
  3. package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +16 -0
  4. package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +28 -0
  5. package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +35 -0
  6. package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +54 -0
  7. package/.agents/rules/agentic-senior-core.md +131 -0
  8. package/.claude-plugin/marketplace.json +17 -0
  9. package/.claude-plugin/plugin.json +17 -0
  10. package/.clinerules/agentic-senior-core.md +94 -0
  11. package/.codex-plugin/plugin.json +24 -0
  12. package/.cursor/rules/agentic-senior-core.mdc +99 -0
  13. package/.devin-plugin/plugin.json +13 -0
  14. package/.github/copilot-instructions.md +94 -0
  15. package/.github/plugin/marketplace.json +20 -0
  16. package/.github/plugin/plugin.json +16 -0
  17. package/.kiro/steering/agentic-senior-core.md +94 -0
  18. package/.openclaw/skills/asc/SKILL.md +23 -0
  19. package/.openclaw/skills/asc-audit/SKILL.md +28 -0
  20. package/.openclaw/skills/asc-review/SKILL.md +54 -0
  21. package/.opencode/plugins/agentic-senior-core.mjs +31 -0
  22. package/.windsurf/rules/agentic-senior-core.md +94 -0
  23. package/AGENTS.md +126 -127
  24. package/CONTRIBUTING.md +93 -63
  25. package/README.md +190 -110
  26. package/__init__.py +61 -0
  27. package/bin/agentic-senior-core.js +42 -41
  28. package/commands/asc-audit.md +1 -0
  29. package/commands/asc-audit.toml +2 -0
  30. package/commands/asc-help.md +9 -0
  31. package/commands/asc-help.toml +2 -0
  32. package/commands/asc-refactor.md +1 -0
  33. package/commands/asc-refactor.toml +2 -0
  34. package/commands/asc-review.md +1 -0
  35. package/commands/asc-review.toml +2 -0
  36. package/gemini-extension.json +10 -0
  37. package/hooks/copilot-hooks.json +21 -0
  38. package/hooks/hooks.json +31 -0
  39. package/hooks/session-start.js +36 -0
  40. package/hooks/subagent-start.js +38 -0
  41. package/lib/cli/commands/adapter.mjs +109 -0
  42. package/lib/cli/commands/clean.mjs +63 -0
  43. package/lib/cli/commands/status.mjs +94 -0
  44. package/package.json +43 -60
  45. package/plugin.yaml +16 -0
  46. package/scripts/uninstall.js +38 -0
  47. package/skills/asc/SKILL.md +16 -0
  48. package/skills/asc-audit/SKILL.md +28 -0
  49. package/skills/asc-refactor/SKILL.md +35 -0
  50. package/skills/asc-review/SKILL.md +54 -0
  51. package/.agent-context/policies/llm-judge-threshold.json +0 -29
  52. package/.agent-context/prompts/bootstrap-design.md +0 -63
  53. package/.agent-context/prompts/compact-natural-mode.md +0 -100
  54. package/.agent-context/prompts/init-project.md +0 -60
  55. package/.agent-context/prompts/refactor.md +0 -38
  56. package/.agent-context/prompts/review-code.md +0 -31
  57. package/.agent-context/review-checklists/architecture-review.md +0 -57
  58. package/.agent-context/review-checklists/pr-checklist.md +0 -134
  59. package/.agent-context/rules/api-docs.md +0 -24
  60. package/.agent-context/rules/api-versioning.md +0 -16
  61. package/.agent-context/rules/architecture.md +0 -38
  62. package/.agent-context/rules/background-jobs.md +0 -17
  63. package/.agent-context/rules/config-and-flags.md +0 -16
  64. package/.agent-context/rules/database-design.md +0 -18
  65. package/.agent-context/rules/docker-runtime.md +0 -17
  66. package/.agent-context/rules/error-handling.md +0 -16
  67. package/.agent-context/rules/event-driven.md +0 -16
  68. package/.agent-context/rules/frontend-architecture.md +0 -54
  69. package/.agent-context/rules/microservices.md +0 -16
  70. package/.agent-context/rules/migrations.md +0 -16
  71. package/.agent-context/rules/observability.md +0 -16
  72. package/.agent-context/rules/performance.md +0 -16
  73. package/.agent-context/rules/realtime.md +0 -16
  74. package/.agent-context/rules/resilience.md +0 -18
  75. package/.agent-context/rules/security.md +0 -18
  76. package/.agent-context/rules/testing.md +0 -16
  77. package/.agent-context/state/README.md +0 -25
  78. package/.agent-context/state/architecture-map.md +0 -40
  79. package/.agent-context/state/benchmark-comparison-schema.json +0 -181
  80. package/.agent-context/state/benchmark-reproducibility.json +0 -87
  81. package/.agent-context/state/benchmark-thresholds.json +0 -10
  82. package/.agent-context/state/benchmark-writer-judge-config.json +0 -58
  83. package/.agent-context/state/dependency-map.md +0 -41
  84. package/.agent-context/state/memory-adapter-contract.json +0 -52
  85. package/.agent-context/state/memory-schema-v1.json +0 -88
  86. package/GEMINI.md +0 -1
  87. package/benchmarks/README.md +0 -60
  88. package/benchmarks/compact-natural-mode/fixtures.mjs +0 -359
  89. package/benchmarks/compact-natural-mode/scorer.mjs +0 -331
  90. package/benchmarks/runtime-token-saver/fixtures.mjs +0 -836
  91. package/lib/cli/adaptive-context/catalog.mjs +0 -394
  92. package/lib/cli/adaptive-context/file-signals.mjs +0 -100
  93. package/lib/cli/adaptive-context/implications.mjs +0 -44
  94. package/lib/cli/adaptive-context.mjs +0 -151
  95. package/lib/cli/audits/typography-palette-anti-repeat/color-utils.mjs +0 -156
  96. package/lib/cli/audits/typography-palette-anti-repeat/file-scanner.mjs +0 -103
  97. package/lib/cli/audits/typography-palette-anti-repeat/typography-utils.mjs +0 -70
  98. package/lib/cli/backup.mjs +0 -210
  99. package/lib/cli/commands/context.mjs +0 -140
  100. package/lib/cli/commands/init/project-context.mjs +0 -60
  101. package/lib/cli/commands/init/runtime-environment.mjs +0 -59
  102. package/lib/cli/commands/init/setup-decisions.mjs +0 -83
  103. package/lib/cli/commands/init.mjs +0 -654
  104. package/lib/cli/commands/launch.mjs +0 -76
  105. package/lib/cli/commands/optimize.mjs +0 -284
  106. package/lib/cli/commands/rollback.mjs +0 -64
  107. package/lib/cli/commands/upgrade/token-optimization-state.mjs +0 -51
  108. package/lib/cli/commands/upgrade.mjs +0 -451
  109. package/lib/cli/compiler.mjs +0 -187
  110. package/lib/cli/constants.mjs +0 -136
  111. package/lib/cli/detector/constants.mjs +0 -135
  112. package/lib/cli/detector/design-evidence/collector.mjs +0 -256
  113. package/lib/cli/detector/design-evidence/constants.mjs +0 -39
  114. package/lib/cli/detector/design-evidence/file-traversal.mjs +0 -83
  115. package/lib/cli/detector/design-evidence/structured-attribute-evidence.mjs +0 -117
  116. package/lib/cli/detector/design-evidence/summary.mjs +0 -109
  117. package/lib/cli/detector/design-evidence/utility-helpers.mjs +0 -122
  118. package/lib/cli/detector/design-evidence.mjs +0 -25
  119. package/lib/cli/detector/stack-detection.mjs +0 -243
  120. package/lib/cli/detector/ui-signals.mjs +0 -150
  121. package/lib/cli/detector/workspace-scan.mjs +0 -177
  122. package/lib/cli/detector.mjs +0 -23
  123. package/lib/cli/init-detection-flow.mjs +0 -48
  124. package/lib/cli/init-options.mjs +0 -237
  125. package/lib/cli/init-selection.mjs +0 -29
  126. package/lib/cli/memory-continuity.mjs +0 -537
  127. package/lib/cli/preflight.mjs +0 -76
  128. package/lib/cli/project-scaffolder/constants.mjs +0 -69
  129. package/lib/cli/project-scaffolder/discovery.mjs +0 -272
  130. package/lib/cli/project-scaffolder/prompt-builders.mjs +0 -171
  131. package/lib/cli/project-scaffolder/storage.mjs +0 -144
  132. package/lib/cli/project-scaffolder/ui-scope-detection.mjs +0 -36
  133. package/lib/cli/project-scaffolder.mjs +0 -29
  134. package/lib/cli/rollback.mjs +0 -66
  135. package/lib/cli/token-optimization.mjs +0 -401
  136. package/lib/cli/utils/filesystem.mjs +0 -81
  137. package/lib/cli/utils/managed-surface.mjs +0 -280
  138. package/lib/cli/utils/prompting.mjs +0 -44
  139. package/lib/cli/utils.mjs +0 -479
  140. package/mcp.json +0 -134
  141. package/scripts/adaptive-context/fixtures.mjs +0 -183
  142. package/scripts/adaptive-context-benchmark.mjs +0 -9
  143. package/scripts/ascx-runtime-token-saver-benchmark.mjs +0 -9
  144. package/scripts/benchmark-evidence-bundle.mjs +0 -645
  145. package/scripts/benchmark-gate.mjs +0 -121
  146. package/scripts/benchmark-intelligence.mjs +0 -33
  147. package/scripts/benchmark-writer-judge-matrix.mjs +0 -379
  148. package/scripts/build-release-benchmark-bundle.mjs +0 -202
  149. package/scripts/bump-version.mjs +0 -103
  150. package/scripts/clean-local-artifacts.mjs +0 -78
  151. package/scripts/compact-natural-mode-benchmark.mjs +0 -9
  152. package/scripts/context-triggered-audit.mjs +0 -391
  153. package/scripts/detection-benchmark.mjs +0 -127
  154. package/scripts/docs-quality-drift-report.mjs +0 -358
  155. package/scripts/documentation-boundary-audit.mjs +0 -305
  156. package/scripts/explain-on-demand-audit.mjs +0 -427
  157. package/scripts/forbidden-content-check.mjs +0 -123
  158. package/scripts/frontend-usability-audit.mjs +0 -243
  159. package/scripts/generate-sbom.mjs +0 -61
  160. package/scripts/governance-weekly-report.mjs +0 -466
  161. package/scripts/llm-judge/checklist-loader.mjs +0 -45
  162. package/scripts/llm-judge/constants.mjs +0 -66
  163. package/scripts/llm-judge/diff-collection.mjs +0 -74
  164. package/scripts/llm-judge/prompting.mjs +0 -78
  165. package/scripts/llm-judge/providers.mjs +0 -111
  166. package/scripts/llm-judge/verdict.mjs +0 -134
  167. package/scripts/llm-judge.mjs +0 -200
  168. package/scripts/memory-continuity-benchmark.mjs +0 -322
  169. package/scripts/quality-trend-report.mjs +0 -289
  170. package/scripts/release-gate/audit-checks.mjs +0 -441
  171. package/scripts/release-gate/constants.mjs +0 -53
  172. package/scripts/release-gate/runtime.mjs +0 -63
  173. package/scripts/release-gate/static-checks.mjs +0 -182
  174. package/scripts/release-gate.mjs +0 -42
  175. package/scripts/rules-guardian-audit.mjs +0 -580
  176. package/scripts/single-source-lazy-loading-audit.mjs +0 -449
  177. package/scripts/sync-thin-adapters.mjs +0 -72
  178. package/scripts/token-optimization-benchmark.mjs +0 -252
  179. package/scripts/ui-design-judge/constants.mjs +0 -13
  180. package/scripts/ui-design-judge/design-execution-summary.mjs +0 -81
  181. package/scripts/ui-design-judge/git-input.mjs +0 -134
  182. package/scripts/ui-design-judge/prompting.mjs +0 -52
  183. package/scripts/ui-design-judge/providers.mjs +0 -102
  184. package/scripts/ui-design-judge/reporting.mjs +0 -183
  185. package/scripts/ui-design-judge/rubric-calibration.mjs +0 -214
  186. package/scripts/ui-design-judge/rubric-goldset.json +0 -188
  187. package/scripts/ui-design-judge.mjs +0 -319
  188. package/scripts/ui-rubric-calibration.mjs +0 -35
  189. package/scripts/validate/audits/cache-layer-contract.mjs +0 -230
  190. package/scripts/validate/audits/caching-scope-hygiene.mjs +0 -235
  191. package/scripts/validate/audits/file-size.mjs +0 -158
  192. package/scripts/validate/audits/reflection-citations.mjs +0 -130
  193. package/scripts/validate/audits/release-bundle.mjs +0 -135
  194. package/scripts/validate/audits/rule-id-uniqueness.mjs +0 -278
  195. package/scripts/validate/config.mjs +0 -501
  196. package/scripts/validate/coverage-checks.mjs +0 -446
  197. package/scripts/validate/file-structure.mjs +0 -158
  198. package/scripts/validate/markdown-content.mjs +0 -109
  199. package/scripts/validate/project-metadata.mjs +0 -166
  200. package/scripts/validate/utils.mjs +0 -52
  201. package/scripts/validate.mjs +0 -267
package/README.md CHANGED
@@ -2,13 +2,12 @@
2
2
 
3
3
  # Agentic-Senior-Core
4
4
 
5
- ### Change your AI Agent to code like a Staff Engineer, not a Junior.
5
+ ### Universal AI coding rules. Write code like a staff engineer, not a junior.
6
6
 
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
8
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
9
9
 
10
- **Production-grade Rules Engine for AI coding agents.**
11
- Works with Cursor, Windsurf, GitHub Copilot, Claude Code, Gemini, and other LLM-powered IDE workflows.
10
+ **Install once. Works across all projects. Supports 16+ AI coding agents.**
12
11
 
13
12
  </div>
14
13
 
@@ -16,186 +15,267 @@ Works with Cursor, Windsurf, GitHub Copilot, Claude Code, Gemini, and other LLM-
16
15
 
17
16
  ## Install
18
17
 
18
+ ### Step 1: Install the package
19
+
19
20
  ```bash
20
- npx @ryuenn3123/agentic-senior-core init
21
+ npm install -g @ryuenn3123/agentic-senior-core
21
22
  ```
22
23
 
23
- Initializes `AGENTS.md`, native import bridges, checklists, policies, state files, and the lazy `.agent-context/` rule library. Token optimization and Compact Natural Mode are enabled by default.
24
+ ### Step 2: Set up for your AI tool
24
25
 
25
- Options:
26
- - Add `--mcp-template` to generate VS Code MCP workspace config.
27
- - Default init keeps MCP files opt-in.
28
- - Add `--no-token-optimize` only when you do not want ASCX command guidance enabled.
29
- - Add `--local-only` to ignore instructions (AGENTS.md, .agent-context/, and bridges) in .gitignore so they are not pushed to GitHub.
30
- - Local backup snapshots are written under `.agentic-backup/` and excluded from version control.
26
+ <details>
27
+ <summary><b>Claude Code</b> (terminal agent)</summary>
31
28
 
32
- ## Upgrade
29
+ Rules load automatically via plugin hooks. No per-project files needed.
33
30
 
34
31
  ```bash
35
- npx @ryuenn3123/agentic-senior-core upgrade --dry-run
36
- npx @ryuenn3123/agentic-senior-core upgrade --yes
32
+ claude plugin add fatidaprilian/Agentic-Senior-Core
37
33
  ```
38
34
 
39
- Preview changes with `--dry-run`, then apply with `--yes`. Upgrade prunes obsolete managed files by default; use `--no-prune` to keep them. User-owned files without Agentic markers are never overwritten.
35
+ After install, every Claude Code session injects the rules on startup -- including subagents.
40
36
 
41
- ---
37
+ </details>
42
38
 
43
- ## Core Commands
39
+ <details>
40
+ <summary><b>Codex CLI</b> (terminal agent)</summary>
44
41
 
45
- > [!NOTE]
46
- > To run commands directly without `npx` (e.g., `ascx` or `agentic-senior-core`), install the CLI globally: `npm install -g @ryuenn3123/agentic-senior-core`.
42
+ ```bash
43
+ codex plugins install agentic-senior-core
44
+ ```
47
45
 
48
- | Command | Purpose |
49
- |---------|---------|
50
- | `agentic-senior-core init` | Initialize the compact project guidance pack and native agent entrypoints |
51
- | `agentic-senior-core upgrade --dry-run` | Preview managed-surface upgrades |
52
- | `agentic-senior-core context "<request>" --json --file src/app/page.tsx` | Resolve request labels, rules, prompts, docs, file signals, budget status, and fallback status |
53
- | `ascx <command>` | Run a command through the local evidence-preserving output wrapper (safely falls back to passthrough if unsupported) |
54
- | `asc optimize status` | Check ASCX runtime token saver readiness |
55
- | `asc optimize doctor` | Diagnose ASCX availability, tee write safety, and compression conflicts |
56
- | `agentic-senior-core optimize --show` | Show token optimization state |
57
- | `agentic-senior-core mcp` | Start local MCP stdio runtime |
58
- | `npm run clean:local` | Remove ignored local reports, backups, benchmarks, and active-memory state |
46
+ Rules load automatically via plugin hooks on every session.
59
47
 
60
- `ascx` dynamically compresses supported commands with noisy output (e.g., builds, tests, searches, and git logs). Other commands, pipes, redirects, and unsupported shell shapes safely pass through without compression. Compressed output includes a structured footer with command, exit code, filter name, estimated token reduction, and a raw tee path when safety requires it.
48
+ </details>
61
49
 
62
- `asc` is a short alias for the main `agentic-senior-core` CLI. The doctor does not probe localhost services in this phase; `9router` status remains `not-checked`.
50
+ <details>
51
+ <summary><b>Gemini CLI</b> (terminal agent)</summary>
63
52
 
64
- ---
53
+ Auto-detected. Gemini CLI reads `gemini-extension.json` from the installed package and loads `AGENTS.md` as context. Commands available as `.toml` format (`/asc-refactor`, `/asc-review`, `/asc-audit`).
65
54
 
66
- ## What It Does
55
+ </details>
67
56
 
68
- A coding agent that has read every framework tutorial still ships junior-grade work because nothing in its training tells it which trade-off matters in your codebase. This pack is a small set of plain-language rules an agent loads only when the work scope calls for them. The rules are written as invariants and bad habits to reject, not as opinions about which framework is fashionable. You install it with one command, revert with a backup, and it does not depend on any IDE or LLM provider.
57
+ <details>
58
+ <summary><b>Copilot CLI</b> (terminal agent)</summary>
69
59
 
70
- ### How It Works
60
+ Plugin files ship at `.github/plugin/`. After global npm install, register the plugin per your Copilot CLI version. Rules inject via hooks on every session.
71
61
 
72
- 1. Agent reads `AGENTS.md` at the start of each session.
73
- 2. `AGENTS.md` activates the default triad: Adaptive Context for scoped rule selection, ASCX wrappers for supported noisy commands, and Compact Natural Mode for final replies.
74
- 3. For shell commands, the agent uses `ascx` wrappers that compress noisy output while preserving debugging evidence (exit codes, file paths, line numbers, root errors, truncation markers, and raw tee paths).
75
- 4. For final replies, the agent applies `.agent-context/prompts/compact-natural-mode.md` so answers stay concise without losing commands, paths, errors, assumptions, validation status, risks, or next actions.
76
- 5. Detailed rules live under `.agent-context/rules/` and load by scope: 21 rule files covering architecture, security, performance, testing, database, API, frontend, Docker, observability, resilience, migrations, background jobs, configuration, and versioning.
62
+ </details>
77
63
 
78
- ### Instruction Entrypoints
64
+ <details>
65
+ <summary><b>Cursor</b> (IDE)</summary>
79
66
 
80
- The canonical installed source is `AGENTS.md`.
67
+ Run from your project root:
81
68
 
82
- Default init and upgrade keep the project root compact:
83
- - `AGENTS.md`
84
- - `CLAUDE.md`
85
- - `GEMINI.md`
86
- - `.agent-context/`
69
+ ```bash
70
+ asc adapter --cursor
71
+ ```
87
72
 
88
- `CLAUDE.md` and `GEMINI.md` are native import bridges that load `AGENTS.md`. Detailed rules, prompts, checklists, policies, and state stay under `.agent-context/` and load by task scope.
73
+ This copies one file to `.cursor/rules/agentic-senior-core.mdc`. Cursor reads it automatically on every session. Repeat per project.
89
74
 
90
- Deprecated legacy files (`.instructions.md`, `.agent-instructions.md`, `.cursorrules`, `.windsurfrules`, tool-specific rule directories) are no longer generated. Upgrade prunes Agentic-managed copies while preserving user-owned files.
75
+ </details>
91
76
 
92
- ### Long-Term Stability
77
+ <details>
78
+ <summary><b>Windsurf</b> (IDE)</summary>
93
79
 
94
- Rules are written as invariants, outcomes, and freshness criteria, not as named patterns, library prescriptions, or magic-number thresholds. Where a rule cites a specific tool or threshold, the citation block carries a freshness anchor so the next maintainer knows when the technology references were last validated.
80
+ ```bash
81
+ asc adapter --windsurf
82
+ ```
95
83
 
96
- ---
84
+ Copies one file to `.windsurf/rules/agentic-senior-core.md`. Repeat per project.
97
85
 
98
- ## MCP Quick Setup (VS Code)
86
+ </details>
99
87
 
100
- 1. Generate workspace MCP config:
88
+ <details>
89
+ <summary><b>Cline</b> (VS Code extension)</summary>
101
90
 
102
91
  ```bash
103
- npx @ryuenn3123/agentic-senior-core init --mcp-template
92
+ asc adapter --cline
104
93
  ```
105
94
 
106
- 2. Open `MCP: Open Workspace Folder Configuration`.
107
- 3. Confirm `.vscode/mcp.json` points to `node ./scripts/mcp-server.mjs` with `cwd: ${workspaceFolder}`.
108
- 4. Trust and start the server in Chat Customizations > MCP Servers.
95
+ Copies one file to `.clinerules/agentic-senior-core.md`. Repeat per project.
109
96
 
110
- Optional: enable `chat.mcp.autoStart` (Experimental) for auto-restart when MCP config changes.
97
+ </details>
111
98
 
112
- If you see `Property $schema is not allowed`, keep `.vscode/mcp.json` without `$schema` and keep only `servers`.
99
+ <details>
100
+ <summary><b>GitHub Copilot</b> (VS Code extension)</summary>
113
101
 
114
- ---
102
+ ```bash
103
+ asc adapter --copilot
104
+ ```
115
105
 
116
- ## Design Direction
106
+ Copies one file to `.github/copilot-instructions.md`. Repeat per project.
117
107
 
118
- For UI, UX, layout, screen, Tailwind, frontend, or redesign work, the pack routes agents through a compact design bootstrap before code changes. The flow asks the agent to reject generic defaults, choose a concrete interaction anchor, record creative commitments, and write the result into `docs/DESIGN.md`. Existing projects read the real repository and docs first; fresh projects ask the agent to recommend the stack from current evidence instead of hardcoding a framework.
108
+ </details>
119
109
 
120
- See [docs/doc-index.md](docs/doc-index.md) for the full doc routing map.
110
+ <details>
111
+ <summary><b>Kiro</b> (IDE)</summary>
121
112
 
122
- ---
113
+ ```bash
114
+ asc adapter --kiro
115
+ ```
123
116
 
124
- ## What's New
117
+ Copies one file to `.kiro/steering/agentic-senior-core.md`. Repeat per project.
125
118
 
126
- ### v4.2
119
+ </details>
127
120
 
128
- Adds `ascx` command wrapper to optimize token usage via high-signal adapters for `git status`, `git diff`, and `npm test` alongside the `Compact Natural Mode` response compression contract to reduce token overhead while retaining high-fidelity reasoning.
121
+ <details>
122
+ <summary><b>Google Antigravity</b> (IDE)</summary>
129
123
 
130
- ### v4.1
124
+ **Option A -- workspace rules (per project):**
131
125
 
132
- Adds six backend rule files (`OBS-*`, `RES-*`, `MIG-*`, `JOB-*`, `CFG-*`, `VER-*`) and targeted refinements to `frontend-architecture.md`, `security.md`, `database-design.md`, and `api-docs.md`. See [CHANGELOG.md](CHANGELOG.md) for the full list.
126
+ Copy `.agents/rules/agentic-senior-core.md` into your project. Antigravity reads it automatically with `trigger: always_on`.
133
127
 
134
- ### v4.0
128
+ **Option B -- global plugin (all projects):**
135
129
 
136
- Numbered Markdown rules with stable section IDs, bounded reflection, provider-free anti-halu benchmark, three-layer prompt caching contract, and per-integration caching scope enforcement. Caching numbers are scoped per integration; IDE wrapper integrations receive prefix stability without a measurable per-pack saving. See [docs/benchmark-reference.md](docs/benchmark-reference.md) for the reporting format and [CHANGELOG.md](CHANGELOG.md) for details.
130
+ ```bash
131
+ # Via Antigravity CLI
132
+ agy plugin install https://github.com/fatidaprilian/Agentic-Senior-Core.git
133
+
134
+ # Or manually copy the plugin bundle to:
135
+ # ~/.gemini/config/plugins/agentic-senior-core/
136
+ ```
137
137
 
138
- Current package version: 4.3.3. Last published version: 4.3.2.
138
+ The plugin bundle includes rules, skills (`/asc-review`, `/asc-audit`, `/asc-refactor`), and `plugin.json`.
139
139
 
140
- ---
140
+ </details>
141
+
142
+ <details>
143
+ <summary><b>Devin / Hermes / OpenCode / OpenClaw</b></summary>
144
+
145
+ Plugin manifests ship in the npm package at their standard paths (`.devin-plugin/`, `plugin.yaml`, `.opencode/plugins/`, `.openclaw/skills/`). After global npm install, each host auto-discovers or manually register per host docs.
146
+
147
+ </details>
148
+
149
+ <details>
150
+ <summary><b>All IDE adapters at once</b></summary>
151
+
152
+ ```bash
153
+ asc adapter --all
154
+ ```
141
155
 
142
- ## Validation
156
+ Generates adapter files for Cursor, Windsurf, Cline, Copilot, and Kiro in one go.
157
+
158
+ </details>
159
+
160
+ **Terminal agents** (Claude Code, Codex, Gemini, Copilot CLI) = install once, always-on, zero per-project files.
161
+ **IDE agents** (Cursor, Windsurf, Cline, Copilot VS Code, Kiro, Antigravity) = one file per project via `asc adapter` or copy.
162
+
163
+ ### Updating
164
+
165
+ Already installed? Just update the global package:
143
166
 
144
167
  ```bash
145
- npm run validate
146
- npm test
147
- npm run gate:release
148
- npm run benchmark:ascx
168
+ npm update -g @ryuenn3123/agentic-senior-core
149
169
  ```
150
170
 
171
+ Terminal agent plugins pick up the new version automatically on next session. For IDE adapters, re-run `asc adapter --all` in each project to refresh the adapter files.
172
+
173
+ ---
174
+
175
+ ## What It Does
176
+
177
+ AI coding agents over-build by default. Ask for a date picker, the agent installs a library, writes a wrapper component, adds a stylesheet, and opens a timezone discussion.
178
+
179
+ This plugin loads universal engineering rules on every session. Before writing any code, the agent runs a decision ladder:
180
+
181
+ 1. Does this need to be built at all?
182
+ 2. Does the codebase already have this?
183
+ 3. Does the stdlib or a native platform feature cover it?
184
+ 4. Does an already-installed dependency solve it?
185
+ 5. Can this be one straightforward function?
186
+ 6. Only then: write the minimum code that works.
187
+
188
+ The rules also cover security, architecture, testing, error handling, API design, database safety, frontend accessibility, infrastructure, resilience, and async patterns. All universal invariants -- no project-specific configuration needed.
189
+
190
+ ### Not lazy about
191
+
192
+ Input validation at trust boundaries, parameterized queries, auth checks, error handling that prevents data loss, accessibility, anything explicitly requested. These are never skipped.
193
+
151
194
  ---
152
195
 
153
- ## Reference Docs
196
+ ## Supported Hosts
197
+
198
+ | Host | Type | Install | Per-project files? |
199
+ |------|------|---------|-------------------|
200
+ | Claude Code | Terminal agent | `claude plugin add` | No |
201
+ | Codex CLI | Terminal agent | `codex plugins install` | No |
202
+ | Gemini CLI | Terminal agent | Auto-detected | No |
203
+ | Copilot CLI | Terminal agent | Plugin registration | No |
204
+ | Devin | Terminal agent | Auto-detected | No |
205
+ | Hermes | Terminal agent | Plugin registration | No |
206
+ | OpenCode | Terminal agent | Auto-detected | No |
207
+ | OpenClaw | Terminal agent | Auto-detected | No |
208
+ | Antigravity | IDE | `agy plugin install` or copy rules | No (plugin) / Yes (rules) |
209
+ | Cursor | IDE | `asc adapter --cursor` | Yes (1 file) |
210
+ | Windsurf | IDE | `asc adapter --windsurf` | Yes (1 file) |
211
+ | Cline | VS Code ext | `asc adapter --cline` | Yes (1 file) |
212
+ | GitHub Copilot | VS Code ext | `asc adapter --copilot` | Yes (1 file) |
213
+ | Kiro | IDE | `asc adapter --kiro` | Yes (1 file) |
154
214
 
155
- - FAQ: docs/faq.md
156
- - Deep dive internals: docs/deep-dive.md
157
- - Deep analysis and roadmap: docs/deep-analysis-and-roadmap-backlog.md
158
- - Integration playbook: docs/integration-playbook.md
159
- - Benchmark and stack reference: docs/benchmark-reference.md
160
- - Project history: docs/archive/HISTORY.md
215
+ ---
216
+
217
+ ## Commands
218
+
219
+ Available on plugin hosts (Claude Code, Codex, Gemini CLI):
220
+
221
+ | Command | Purpose |
222
+ |---------|---------|
223
+ | `/asc-refactor` | Structured refactoring workflow |
224
+ | `/asc-review` | Production-risk code review with severity-ordered findings |
225
+ | `/asc-audit` | Security and architecture audit |
226
+ | `/asc-help` | Show available commands |
161
227
 
162
228
  ---
163
229
 
164
- ## Release and npm Publish Flow
230
+ ## CLI
165
231
 
166
- This repository publishes to npm through GitHub Actions on push to `main`.
232
+ ```bash
233
+ asc adapter [--cursor|--windsurf|--cline|--copilot|--kiro|--all]
234
+ asc clean [--dry-run]
235
+ asc status
236
+ asc mcp
237
+ asc --version
238
+ asc --help
239
+ ```
167
240
 
168
- Release checklist:
241
+ `ascx` is a token-saving command wrapper that compresses noisy output while preserving debugging evidence. Install globally and use as: `ascx git status`, `ascx npm test`.
169
242
 
170
- 1. Run `node scripts/bump-version.mjs <version>`.
171
- 2. Fill the matching release notes in `CHANGELOG.md`.
172
- 3. Run `npm run check:adapters`, `npm run validate`, `npm test`, `npm run gate:release`, and `git diff --check`.
173
- 4. Commit with a Conventional Commit message.
174
- 5. Push to `origin/main`.
243
+ ---
244
+
245
+ ## Works With Other Plugins
246
+
247
+ ASC covers universal engineering standards (security, architecture, testing, API design, database safety). It is complementary to:
248
+
249
+ - **ponytail** -- YAGNI minimalism and code reduction
250
+ - **awesome-cursorrules** -- Framework-specific context and stack declarations
175
251
 
176
- Package scope: `@ryuenn3123`. GitHub owner: `fatidaprilian`.
252
+ Use them together. No conflicts.
177
253
 
178
254
  ---
179
255
 
180
- ## Terminology Mapping (Final)
256
+ ## Migration from v4.x
181
257
 
182
- | Canonical Term | Developer-Facing Alias | Usage Rule |
183
- |----------------|------------------------|------------|
184
- | Federated Governance | Federated Rules Operations | Use canonical term in formal policy artifacts. |
185
- | Governance Engine | Rules Engine | Use alias in onboarding and day-to-day developer docs. |
186
- | Guardrails | Quality Checks | Use alias in implementation guidance and quickstart docs. |
258
+ v5.0 is a breaking change. The per-project system (`.agent-context/`, bridge files, project scaffolding) is replaced by the universal plugin system.
187
259
 
188
- Rule: on first mention in developer-facing docs, include canonical term in parentheses.
260
+ Clean up v4 artifacts from any project:
261
+ ```bash
262
+ # Preview what will be removed
263
+ asc clean --dry-run
189
264
 
190
- Examples:
191
- - `Federated Rules Operations (Federated Governance)`
192
- - `Rules Engine (Governance Engine)`
193
- - `quality checks (guardrails)`
265
+ # Remove v4 files (.agent-context/, AGENTS.md, CLAUDE.md, GEMINI.md, etc.)
266
+ asc clean
267
+ ```
194
268
 
195
- Compliance boundary: formal policy and audit artifacts must keep canonical terminology for operational traceability.
269
+ This removes `.agent-context/`, `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, and other v4 bridge files from the current project directory. The global plugin replaces all of them.
196
270
 
197
271
  ---
198
272
 
199
- ## License
273
+ ## Token Budget
274
+
275
+ | Component | Tokens | When loaded |
276
+ |-----------|--------|------------|
277
+ | Rules (`AGENTS.md`) | ~1,200 | Every session + every subagent |
278
+ | Each skill | ~500-800 | On user invocation only |
279
+ | Commands | 0 | Metadata only |
200
280
 
201
- MIT - Use freely, enforce strictly.
281
+ Total always-on cost: ~1,200 tokens per session.
package/__init__.py ADDED
@@ -0,0 +1,61 @@
1
+ """Hermes plugin for Agentic Senior Core."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ from pathlib import Path
7
+ from typing import Any
8
+
9
+ ROOT = Path(__file__).resolve().parent
10
+ SKILLS_DIR = ROOT / "skills"
11
+ AGENTS_MD = ROOT / "AGENTS.md"
12
+
13
+ SKILL_COMMANDS = {
14
+ "asc-refactor": "Structured refactoring workflow with pre-checks and validation.",
15
+ "asc-review": "Production-risk code review with severity-ordered findings.",
16
+ "asc-audit": "Security and architecture audit.",
17
+ "asc-help": "Show available ASC commands.",
18
+ }
19
+
20
+
21
+ def _read_agents_md() -> str:
22
+ try:
23
+ return AGENTS_MD.read_text(encoding="utf-8")
24
+ except OSError:
25
+ return ""
26
+
27
+
28
+ def _pre_llm_call(**_: Any) -> dict[str, str] | None:
29
+ content = _read_agents_md()
30
+ return {"context": content} if content else None
31
+
32
+
33
+ def _make_skill_handler(ctx: Any, command: str):
34
+ def handler(raw_args: str) -> str:
35
+ prompt = f"Load and follow the skill `asc:{command}`. {SKILL_COMMANDS[command]}"
36
+ if raw_args and raw_args.strip():
37
+ prompt += f"\n\nUser arguments: {raw_args.strip()}"
38
+ try:
39
+ if ctx.inject_message(prompt):
40
+ return f"Queued `{command}` for the agent."
41
+ except Exception:
42
+ pass
43
+ return prompt
44
+ return handler
45
+
46
+
47
+ def register(ctx: Any) -> None:
48
+ for child in sorted(SKILLS_DIR.iterdir() if SKILLS_DIR.exists() else []):
49
+ skill_md = child / "SKILL.md"
50
+ if child.is_dir() and skill_md.exists():
51
+ ctx.register_skill(child.name, skill_md)
52
+
53
+ ctx.register_hook("pre_llm_call", _pre_llm_call)
54
+
55
+ for command, description in SKILL_COMMANDS.items():
56
+ ctx.register_command(
57
+ command,
58
+ _make_skill_handler(ctx, command),
59
+ description=description,
60
+ args_hint="[target or notes]",
61
+ )
@@ -1,33 +1,45 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Agentic-Senior-Core CLI Thin entry point.
3
+ * Agentic-Senior-Core CLI v5 -- Universal plugin system.
4
4
  *
5
- * All logic lives in lib/cli/ modules. This file only handles
6
- * argument dispatch and the top-level error boundary.
5
+ * Commands:
6
+ * adapter Generate instruction-tier adapter files for IDEs without plugin support
7
+ * clean Remove v4 per-project artifacts (.agent-context/, bridge files)
8
+ * status Show detected IDEs and install hints
9
+ * mcp Start MCP stdio server
7
10
  */
8
11
  import { exit } from 'node:process';
9
-
10
- import { CLI_VERSION } from '../lib/cli/constants.mjs';
11
- import { printUsage } from '../lib/cli/utils.mjs';
12
- import { runLaunchCommand } from '../lib/cli/commands/launch.mjs';
13
- import { runRollbackCommand } from '../lib/cli/commands/rollback.mjs';
14
- import { runMcpServerCommand } from '../lib/cli/commands/mcp.mjs';
15
- import { runOptimizeCommand, parseOptimizeArguments } from '../lib/cli/commands/optimize.mjs';
16
- import { runInitCommand, parseInitArguments } from '../lib/cli/commands/init.mjs';
17
- import { runUpgradeCommand, parseUpgradeArguments } from '../lib/cli/commands/upgrade.mjs';
18
- import { runContextCommand } from '../lib/cli/commands/context.mjs';
19
-
12
+ import { readFileSync } from 'node:fs';
13
+ import { resolve, dirname } from 'node:path';
14
+ import { fileURLToPath } from 'node:url';
15
+
16
+ const currentFilePath = fileURLToPath(import.meta.url);
17
+ const repositoryRoot = resolve(dirname(currentFilePath), '..');
18
+ const packageJson = JSON.parse(readFileSync(resolve(repositoryRoot, 'package.json'), 'utf8'));
19
+ const CLI_VERSION = packageJson.version;
20
+
21
+ function printUsage() {
22
+ console.log(`Agentic-Senior-Core CLI v${CLI_VERSION}`);
23
+ console.log('Universal AI coding rules. Write code like a staff engineer.\n');
24
+ console.log('Plugin install (always-on, no per-project files):');
25
+ console.log(' Claude Code: /plugin marketplace add fatidaprilian/Agentic-Senior-Core');
26
+ console.log(' Codex CLI: codex plugins install agentic-senior-core\n');
27
+ console.log('Adapter install (one file per project):');
28
+ console.log(' asc adapter --cursor --windsurf --cline --copilot --kiro --all\n');
29
+ console.log('Commands:');
30
+ console.log(' adapter Generate instruction-tier adapter files');
31
+ console.log(' clean Remove v4 per-project artifacts');
32
+ console.log(' status Show detected IDEs and install hints');
33
+ console.log(' mcp Start MCP stdio server');
34
+ console.log(' --version Show version');
35
+ console.log(' --help Show this help');
36
+ }
20
37
 
21
38
  async function main() {
22
39
  const commandArgument = process.argv[2];
23
40
  const commandArguments = process.argv.slice(3);
24
41
 
25
- if (!commandArgument || commandArgument === 'launch') {
26
- await runLaunchCommand();
27
- return;
28
- }
29
-
30
- if (commandArgument === '--help' || commandArgument === '-h') {
42
+ if (!commandArgument || commandArgument === '--help' || commandArgument === '-h') {
31
43
  printUsage();
32
44
  return;
33
45
  }
@@ -37,41 +49,30 @@ async function main() {
37
49
  return;
38
50
  }
39
51
 
40
- if (commandArgument === 'upgrade') {
41
- const upgradeOptions = parseUpgradeArguments(commandArguments);
42
- await runUpgradeCommand(upgradeOptions.targetDirectory, upgradeOptions);
43
- return;
44
- }
45
-
46
- if (commandArgument === 'optimize') {
47
- const optimizeOptions = parseOptimizeArguments(commandArguments);
48
- await runOptimizeCommand(optimizeOptions.targetDirectory, optimizeOptions);
52
+ if (commandArgument === 'adapter') {
53
+ const { runAdapterCommand } = await import('../lib/cli/commands/adapter.mjs');
54
+ await runAdapterCommand(commandArguments);
49
55
  return;
50
56
  }
51
57
 
52
- if (commandArgument === 'context') {
53
- await runContextCommand(commandArguments);
58
+ if (commandArgument === 'clean') {
59
+ const { runCleanCommand } = await import('../lib/cli/commands/clean.mjs');
60
+ await runCleanCommand(commandArguments);
54
61
  return;
55
62
  }
56
63
 
57
- if (commandArgument === 'init') {
58
- const initOptions = parseInitArguments(commandArguments);
59
- await runInitCommand(initOptions.targetDirectory, initOptions);
60
- return;
61
- }
62
-
63
- if (commandArgument === 'rollback') {
64
- await runRollbackCommand(commandArguments);
64
+ if (commandArgument === 'status') {
65
+ const { runStatusCommand } = await import('../lib/cli/commands/status.mjs');
66
+ await runStatusCommand();
65
67
  return;
66
68
  }
67
69
 
68
70
  if (commandArgument === 'mcp') {
71
+ const { runMcpServerCommand } = await import('../lib/cli/commands/mcp.mjs');
69
72
  await runMcpServerCommand();
70
73
  return;
71
74
  }
72
75
 
73
-
74
-
75
76
  console.error(`Unknown command: ${commandArgument}`);
76
77
  printUsage();
77
78
  exit(1);
@@ -0,0 +1 @@
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.
@@ -0,0 +1,2 @@
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."
@@ -0,0 +1,9 @@
1
+ Show available Agentic Senior Core commands and skills.
2
+
3
+ Available commands:
4
+ - /asc-refactor -- Structured refactoring workflow
5
+ - /asc-review -- Production-risk code review
6
+ - /asc-audit -- Security and architecture audit
7
+ - /asc-help -- This help
8
+
9
+ The universal coding rules from AGENTS.md are always active. Skills provide deeper, on-demand workflows.
@@ -0,0 +1,2 @@
1
+ description = "Show available Agentic Senior Core commands"
2
+ prompt = "Show the Agentic Senior Core command reference: /asc-refactor (structured refactoring workflow), /asc-review (production-risk code review with severity-ordered findings), /asc-audit (security and architecture audit), /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."
@@ -0,0 +1 @@
1
+ Run the refactoring workflow from skills/asc-refactor/SKILL.md on the current code changes or specified files. Preserve existing behavior while improving structure, naming, boundaries, and maintainability.
@@ -0,0 +1,2 @@
1
+ description = "Structured refactoring workflow with pre-checks and validation"
2
+ prompt = "Load and follow the asc-refactor skill. Read the target code, identify the smallest scope, apply refactor rules: improve clarity, boundaries, naming, validation, error handling, tests. Prioritize maintainability over compressed one-liners. No premature abstractions. Run a final simplification pass. For every change explain what risk existed, what changed, and why the new shape is safer."
@@ -0,0 +1 @@
1
+ Run the code review workflow from skills/asc-review/SKILL.md on the current diff or specified files. Prioritize findings by severity: correctness and security first, then contracts, tests, architecture, and performance.
@@ -0,0 +1,2 @@
1
+ description = "Production-risk code review with severity-ordered findings"
2
+ prompt = "Load and follow the asc-review skill. Review changed files for production risks. Priority order: correctness/data-loss/security, public contract drift, missing tests, architecture boundary drift, performance/accessibility with concrete impact. For every finding include file/line reference, real risk, and smallest safe fix. Report findings ordered by severity."
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "agentic-senior-core",
3
+ "version": "5.2.0",
4
+ "description": "Universal AI coding rules. Write code like a staff engineer.",
5
+ "author": "fatidaprilian",
6
+ "license": "MIT",
7
+ "contextFileName": "AGENTS.md",
8
+ "commands": ["commands/"],
9
+ "skills": ["skills/"]
10
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "sessionStart": [
5
+ {
6
+ "type": "command",
7
+ "bash": "node \"${PLUGIN_ROOT}/hooks/session-start.js\"",
8
+ "powershell": "node \"${PLUGIN_ROOT}\\hooks\\session-start.js\"",
9
+ "timeoutSec": 5
10
+ }
11
+ ],
12
+ "subagentStart": [
13
+ {
14
+ "type": "command",
15
+ "bash": "node \"${PLUGIN_ROOT}/hooks/subagent-start.js\"",
16
+ "powershell": "node \"${PLUGIN_ROOT}\\hooks\\subagent-start.js\"",
17
+ "timeoutSec": 5
18
+ }
19
+ ]
20
+ }
21
+ }