@ryuenn3123/agentic-senior-core 2.0.9 → 2.0.11

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.
package/.cursorrules CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
2
2
 
3
- Generated by Agentic-Senior-Core CLI v2.0.9
3
+ Generated by Agentic-Senior-Core CLI v2.0.11
4
4
  Timestamp: 2026-04-08T14:58:53.570Z
5
5
  Selected profile: beginner
6
6
  Selected policy file: .agent-context/policies/llm-judge-threshold.json
package/.windsurfrules CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
2
2
 
3
- Generated by Agentic-Senior-Core CLI v2.0.9
3
+ Generated by Agentic-Senior-Core CLI v2.0.11
4
4
  Timestamp: 2026-04-08T14:58:53.570Z
5
5
  Selected profile: beginner
6
6
  Selected policy file: .agent-context/policies/llm-judge-threshold.json
package/README.md CHANGED
@@ -38,54 +38,45 @@ AI: *Creates properly layered modules with Zod validation, typed errors,
38
38
 
39
39
  ## Quick Start
40
40
 
41
- ### Zero-Install: GitHub Template (New user friendly!)
41
+ ### Method 1 (Recommended): npm package
42
42
 
43
- The absolute fastest way to start your next top-tier project is to use this repository as a template.
44
- The **Use this template** button is in the GitHub repository header (top-right area), not inside this README text.
45
- If you prefer a direct link, open: **[Create from template](https://github.com/fatidaprilian/Agentic-Senior-Core/generate)**.
46
- Your new repository will instantly possess all the rules, configurations, and AI context files directly out of the box — zero CLI needed.
47
-
48
- ### Option 0: NPM Install (Local or Global)
49
-
50
- If you already know you want the CLI from npm, use one of these paths:
43
+ The npm package is already published. For most users, this is the default path.
51
44
 
52
45
  ```bash
46
+ npm exec --yes @ryuenn3123/agentic-senior-core launch
53
47
  npm exec --yes @ryuenn3123/agentic-senior-core init
54
- npm install -g @ryuenn3123/agentic-senior-core
55
- agentic-senior-core init
48
+ npx @ryuenn3123/agentic-senior-core init
56
49
  ```
57
50
 
58
- ### Option 1: Interactive via GitHub Source (Pre-publish friendly)
59
-
60
- If npm package publication is not ready yet, run the CLI directly from GitHub and still keep the full interactive experience.
51
+ If you prefer a global install:
61
52
 
62
53
  ```bash
63
- npm exec --yes --package=github:fatidaprilian/Agentic-Senior-Core agentic-senior-core init .
54
+ npm install -g @ryuenn3123/agentic-senior-core
55
+ agentic-senior-core init
64
56
  ```
65
57
 
66
- This gives the same interactive prompts to choose your profile (`beginner`, `balanced`, `strict`), stack, blueprint, and CI guardrails.
67
-
68
- If you want a plug-and-play starter instead of answering every question, use a preset:
58
+ Use team defaults with profile packs:
69
59
 
70
60
  ```bash
71
- npx @ryuenn3123/agentic-senior-core init --preset frontend-web
72
- npx @ryuenn3123/agentic-senior-core init --preset backend-api
73
- npx @ryuenn3123/agentic-senior-core init --preset mobile-react-native
74
- npx @ryuenn3123/agentic-senior-core init --preset java-enterprise-api
75
- npx @ryuenn3123/agentic-senior-core init --preset dotnet-enterprise-api
61
+ npx @ryuenn3123/agentic-senior-core init --profile-pack startup
76
62
  ```
77
63
 
78
- Expanded preset catalog:
64
+ ### Method 2: GitHub template and source execution
79
65
 
80
- - `frontend-web`, `backend-api`, `fullstack-product`, `platform-governance`
81
- - `mobile-react-native`, `mobile-flutter`, `observability-platform`
82
- - `typescript-nestjs-service`, `java-enterprise-api`, `dotnet-enterprise-api`, `php-laravel-api`, `kubernetes-platform`
66
+ Use this method if your team prefers source-based bootstrap or template-first onboarding.
83
67
 
84
- ### Option 2: GitHub Bootstrap Scripts (No npx required)
68
+ GitHub template:
69
+ - **[Create from template](https://github.com/fatidaprilian/Agentic-Senior-Core/generate)**
85
70
 
86
- Run directly from this repository bootstrap script and inject rules into your project root.
71
+ GitHub source execution (interactive):
87
72
 
88
- Bootstrap script paths: `scripts/init-project.ps1` (Windows) and `scripts/init-project.sh` (Linux/macOS).
73
+ ```bash
74
+ npm exec --yes --package=github:fatidaprilian/Agentic-Senior-Core agentic-senior-core init .
75
+ ```
76
+
77
+ GitHub bootstrap scripts:
78
+ - Windows: `scripts/init-project.ps1`
79
+ - Linux/macOS: `scripts/init-project.sh`
89
80
 
90
81
  Windows PowerShell:
91
82
 
@@ -99,30 +90,37 @@ Linux/macOS Bash:
99
90
  bash ./scripts/init-project.sh . --profile balanced --stack typescript --blueprint api-nextjs --ci true
100
91
  ```
101
92
 
102
- Both scripts clone Agentic-Senior-Core into a temporary directory, run the same CLI engine, then clean up automatically.
103
-
104
- If you want interactive selection, omit `-Profile`, `-Stack`, `-Blueprint`, and `-Ci` on the script command.
105
-
106
- ### Option 3: Interactive Auto-Setup via npm/npx (Post-publish)
93
+ ### Preset starters
107
94
 
108
- If you have an existing project and want to infuse it with Staff-level context:
95
+ Use presets when you want faster onboarding with less manual selection.
109
96
 
110
97
  ```bash
111
- npx @ryuenn3123/agentic-senior-core init
98
+ npx @ryuenn3123/agentic-senior-core init --preset frontend-web
99
+ npx @ryuenn3123/agentic-senior-core init --preset backend-api
100
+ npx @ryuenn3123/agentic-senior-core init --preset mobile-react-native
101
+ npx @ryuenn3123/agentic-senior-core init --preset java-enterprise-api
102
+ npx @ryuenn3123/agentic-senior-core init --preset dotnet-enterprise-api
112
103
  ```
113
104
 
114
- Use team defaults (V2.0 track) with profile packs:
105
+ Expanded preset catalog:
106
+
107
+ - `frontend-web`, `backend-api`, `fullstack-product`, `platform-governance`
108
+ - `mobile-react-native`, `mobile-flutter`, `observability-platform`
109
+ - `typescript-nestjs-service`, `java-enterprise-api`, `dotnet-enterprise-api`, `php-laravel-api`, `kubernetes-platform`
110
+
111
+ ### Newbie mode
112
+
113
+ If you are new to stacks, blueprints, and guardrails, run:
115
114
 
116
115
  ```bash
117
- npx @ryuenn3123/agentic-senior-core init --profile-pack startup
116
+ npx @ryuenn3123/agentic-senior-core init --newbie
118
117
  ```
119
118
 
120
- The CLI is smart. It auto-detects your current development stack, helps you build a governance profile (select from `beginner`, `balanced`, or `strict`), and writes the compiled rules straight to your root automatically!
119
+ ### Important behavior
121
120
 
122
- Important behavior:
123
121
  - `init` does not copy repository workflows from this project into your target repository.
124
- - MCP server registration and trust/start are managed manually in IDE settings.
125
- - If you want the MCP workspace scaffold, run `init` with `--mcp-template` (creates `.vscode/mcp.json`).
122
+ - MCP server registration and trust/start are manual in IDE settings.
123
+ - MCP workspace scaffold is opt-in via `--mcp-template` and creates `.vscode/mcp.json`.
126
124
 
127
125
  ### MCP Setup in VS Code (No File Picker)
128
126
 
@@ -136,13 +134,25 @@ npx @ryuenn3123/agentic-senior-core init --mcp-template
136
134
 
137
135
  2. Open Command Palette and run `MCP: Open Workspace Folder Configuration`.
138
136
  3. Confirm the file is `.vscode/mcp.json` with server `agentic-senior-core`.
139
- 4. The generated server command is `npx -y @ryuenn3123/agentic-senior-core mcp`.
137
+ 4. The generated server command is `node ./scripts/mcp-server.mjs` with `cwd` set to `${workspaceFolder}`.
140
138
  5. Open Chat Customizations > MCP Servers, then trust/start the server.
141
139
 
142
- If you are totally new to concepts like blueprints and guardrails, no problem just run:
143
- ```bash
144
- npx @ryuenn3123/agentic-senior-core init --newbie
145
- ```
140
+ If logs repeatedly show `Waiting for server to respond to initialize request`, upgrade to the latest package version, regenerate the workspace config with `--mcp-template`, and restart the MCP server.
141
+
142
+ ### CLI Command Reference
143
+
144
+ All available commands:
145
+
146
+ | Command | Purpose | Example |
147
+ |---------|---------|---------|
148
+ | `launch` | Numbered onboarding launcher | `agentic-senior-core launch` |
149
+ | `init` | Initialize governance in a project | `agentic-senior-core init . --profile balanced` |
150
+ | `upgrade` | Upgrade existing governance safely | `agentic-senior-core upgrade . --dry-run` |
151
+ | `optimize` | Manage token optimization profile | `agentic-senior-core optimize . --show` |
152
+ | `mcp` | Start local MCP stdio server runtime | `agentic-senior-core mcp` |
153
+ | `rollback` | Roll back from backup snapshot | `agentic-senior-core rollback .` |
154
+ | `skill` | Select domain skill pack by tier | `agentic-senior-core skill frontend --tier advance` |
155
+ | `--version` | Print CLI version | `agentic-senior-core --version` |
146
156
 
147
157
  ### Skill Selector
148
158
 
@@ -355,6 +365,19 @@ npm run report:quality-trend
355
365
  npm run report:governance-weekly
356
366
  ```
357
367
 
368
+ ## Release and npm Publish Flow
369
+
370
+ This repository publishes to npm automatically through GitHub Actions on every push to `main`.
371
+
372
+ Release checklist:
373
+ 1. Bump `package.json` version.
374
+ 2. Add matching release notes in `CHANGELOG.md`.
375
+ 3. Push to `main`.
376
+
377
+ Important notes for maintainers and forks:
378
+ - If the npm version already exists, publish will fail.
379
+ - Publish requires valid `NPM_TOKEN` in repository secrets.
380
+
358
381
  ---
359
382
 
360
383
  ## Roadmap
@@ -380,7 +403,7 @@ npm run report:governance-weekly
380
403
 
381
404
  ### Current Forward Plan
382
405
  - V2.0: Skill marketplace trust tiers, transactional installs, rollback safety, and launch-menu onboarding.
383
- - V2.5: Cross-model benchmark harness and anti-regression quality gates.
406
+ - V2.5: Cross-model benchmark harness, anti-regression quality gates, and advanced frontend design quality track (non-template UI direction, stronger UX craft, and frontend parity beyond baseline benchmark repos).
384
407
  - V3.0: Enterprise governance cloud, policy drift detection, and org-level override registry.
385
408
 
386
409
  Detailed timeline and success metrics: [docs/roadmap.md](docs/roadmap.md)
package/lib/cli/utils.mjs CHANGED
@@ -138,8 +138,9 @@ export async function copyGovernanceAssetsToTarget(
138
138
  servers: {
139
139
  'agentic-senior-core': {
140
140
  type: 'stdio',
141
- command: 'npx',
142
- args: ['-y', '@ryuenn3123/agentic-senior-core', 'mcp'],
141
+ command: 'node',
142
+ cwd: '${workspaceFolder}',
143
+ args: ['./scripts/mcp-server.mjs'],
143
144
  },
144
145
  },
145
146
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "2.0.9",
3
+ "version": "2.0.11",
4
4
  "type": "module",
5
5
  "description": "Force your AI Agent to code like a Staff Engineer, not a Junior.",
6
6
  "bin": {
@@ -53,6 +53,6 @@
53
53
  "report:quality-trend": "node ./scripts/quality-trend-report.mjs",
54
54
  "report:governance-weekly": "node ./scripts/governance-weekly-report.mjs",
55
55
  "validate": "node ./scripts/validate.mjs",
56
- "test": "node --test ./tests/cli-smoke.test.mjs ./tests/llm-judge.test.mjs ./tests/enterprise-ops.test.mjs ./tests/skill-tier-gate.test.mjs"
56
+ "test": "node --test ./tests/cli-smoke.test.mjs ./tests/mcp-server.test.mjs ./tests/llm-judge.test.mjs ./tests/enterprise-ops.test.mjs ./tests/skill-tier-gate.test.mjs"
57
57
  }
58
58
  }
@@ -67,6 +67,28 @@ const TOOL_DEFINITIONS = [
67
67
 
68
68
  let incomingBuffer = Buffer.alloc(0);
69
69
 
70
+ function findHeaderTerminator(buffer) {
71
+ const crlfHeaderEndIndex = buffer.indexOf('\r\n\r\n');
72
+ if (crlfHeaderEndIndex !== -1) {
73
+ return {
74
+ headerEndIndex: crlfHeaderEndIndex,
75
+ delimiterLength: 4,
76
+ lineSeparator: '\r\n',
77
+ };
78
+ }
79
+
80
+ const lfHeaderEndIndex = buffer.indexOf('\n\n');
81
+ if (lfHeaderEndIndex !== -1) {
82
+ return {
83
+ headerEndIndex: lfHeaderEndIndex,
84
+ delimiterLength: 2,
85
+ lineSeparator: '\n',
86
+ };
87
+ }
88
+
89
+ return null;
90
+ }
91
+
70
92
  function writeMessage(payload) {
71
93
  const serializedPayload = JSON.stringify(payload);
72
94
  const payloadLength = Buffer.byteLength(serializedPayload, 'utf8');
@@ -270,13 +292,15 @@ async function handleRequest(requestMessage) {
270
292
  }
271
293
 
272
294
  function readNextFramedMessage() {
273
- const headerEndIndex = incomingBuffer.indexOf('\r\n\r\n');
274
- if (headerEndIndex === -1) {
295
+ const headerTerminator = findHeaderTerminator(incomingBuffer);
296
+ if (!headerTerminator) {
275
297
  return null;
276
298
  }
277
299
 
300
+ const { headerEndIndex, delimiterLength, lineSeparator } = headerTerminator;
301
+
278
302
  const rawHeader = incomingBuffer.slice(0, headerEndIndex).toString('utf8');
279
- const headerLines = rawHeader.split('\r\n');
303
+ const headerLines = rawHeader.split(lineSeparator);
280
304
  let contentLength = null;
281
305
 
282
306
  for (const headerLine of headerLines) {
@@ -299,7 +323,7 @@ function readNextFramedMessage() {
299
323
  return null;
300
324
  }
301
325
 
302
- const bodyStartIndex = headerEndIndex + 4;
326
+ const bodyStartIndex = headerEndIndex + delimiterLength;
303
327
  const frameEndIndex = bodyStartIndex + contentLength;
304
328
 
305
329
  if (incomingBuffer.length < frameEndIndex) {
@@ -182,6 +182,7 @@ async function validateRequiredFiles() {
182
182
  '.github/workflows/benchmark-intelligence.yml',
183
183
  '.github/workflows/governance-weekly-report.yml',
184
184
  'tests/cli-smoke.test.mjs',
185
+ 'tests/mcp-server.test.mjs',
185
186
  'tests/llm-judge.test.mjs',
186
187
  'tests/enterprise-ops.test.mjs',
187
188
  'LICENSE',
@@ -729,6 +730,12 @@ async function validateMcpConfiguration() {
729
730
  fail('Workspace MCP server command must use Node');
730
731
  }
731
732
 
733
+ if (workspaceServerConfig?.cwd === '${workspaceFolder}') {
734
+ pass('Workspace MCP server cwd uses ${workspaceFolder}');
735
+ } else {
736
+ fail('Workspace MCP server cwd must be ${workspaceFolder}');
737
+ }
738
+
732
739
  if (Array.isArray(workspaceServerConfig?.args) && workspaceServerConfig.args.includes('./scripts/mcp-server.mjs')) {
733
740
  pass('Workspace MCP server points to scripts/mcp-server.mjs');
734
741
  } else {