@ryuenn3123/agentic-senior-core 2.0.11 → 2.0.13
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 +1 -1
- package/.windsurfrules +1 -1
- package/README.md +35 -4
- package/package.json +1 -1
- package/scripts/mcp-server.mjs +82 -79
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.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v2.0.13
|
|
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.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v2.0.13
|
|
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
|
@@ -42,20 +42,39 @@ AI: *Creates properly layered modules with Zod validation, typed errors,
|
|
|
42
42
|
|
|
43
43
|
The npm package is already published. For most users, this is the default path.
|
|
44
44
|
|
|
45
|
+
**Step 1: Navigate to your project folder**
|
|
46
|
+
```bash
|
|
47
|
+
cd /path/to/your-project
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Step 2: Run initialization (does not require install)**
|
|
51
|
+
|
|
52
|
+
Use `npx` or `npm exec` — both download the package temporarily, run it in your project folder, then clean up automatically.
|
|
53
|
+
|
|
45
54
|
```bash
|
|
46
|
-
npm exec --yes @ryuenn3123/agentic-senior-core launch
|
|
47
|
-
npm exec --yes @ryuenn3123/agentic-senior-core init
|
|
48
55
|
npx @ryuenn3123/agentic-senior-core init
|
|
56
|
+
# or
|
|
57
|
+
npm exec --yes @ryuenn3123/agentic-senior-core init
|
|
49
58
|
```
|
|
50
59
|
|
|
51
|
-
|
|
60
|
+
**Alternative: Global install (optional)**
|
|
61
|
+
|
|
62
|
+
If you want the tool available system-wide without repeating `npx`:
|
|
52
63
|
|
|
53
64
|
```bash
|
|
54
65
|
npm install -g @ryuenn3123/agentic-senior-core
|
|
66
|
+
# Then from any project folder:
|
|
55
67
|
agentic-senior-core init
|
|
56
68
|
```
|
|
57
69
|
|
|
58
|
-
|
|
70
|
+
| Approach | Installation | Where to Run | Use Case |
|
|
71
|
+
|----------|--------------|---|---|
|
|
72
|
+
| **npx (default)** | None — temporary download | Inside your project folder | Clearest workflow; no system pollution |
|
|
73
|
+
| **Global install** | System-wide | From anywhere | Convenience if using frequently across many projects |
|
|
74
|
+
|
|
75
|
+
> Note: Both approaches do the same thing: create `.cursorrules`, `.instructions.md`, `.agent-context/` **in your current project folder**. The only difference is convenience. Use `npx` if unsure — it's clearer and doesn't clutter your system.
|
|
76
|
+
|
|
77
|
+
**Use team defaults with profile packs:**
|
|
59
78
|
|
|
60
79
|
```bash
|
|
61
80
|
npx @ryuenn3123/agentic-senior-core init --profile-pack startup
|
|
@@ -118,10 +137,22 @@ npx @ryuenn3123/agentic-senior-core init --newbie
|
|
|
118
137
|
|
|
119
138
|
### Important behavior
|
|
120
139
|
|
|
140
|
+
- `init` creates governance files **in your project folder** (the folder where you run the command).
|
|
121
141
|
- `init` does not copy repository workflows from this project into your target repository.
|
|
122
142
|
- MCP server registration and trust/start are manual in IDE settings.
|
|
123
143
|
- MCP workspace scaffold is opt-in via `--mcp-template` and creates `.vscode/mcp.json`.
|
|
124
144
|
|
|
145
|
+
**What files are created?**
|
|
146
|
+
```
|
|
147
|
+
your-project/
|
|
148
|
+
├── .cursorrules (agent instructions for Cursor)
|
|
149
|
+
├── .windsurfrules (agent instructions for Windsurf)
|
|
150
|
+
├── .instructions.md (canonical governance and AI behavior policy)
|
|
151
|
+
├── .agent-context/ (blueprints, skills, rules, profiles, state maps)
|
|
152
|
+
└── .vscode/
|
|
153
|
+
└── mcp.json (only if --mcp-template is used)
|
|
154
|
+
```
|
|
155
|
+
|
|
125
156
|
### MCP Setup in VS Code (No File Picker)
|
|
126
157
|
|
|
127
158
|
If you are looking for a file picker in the MCP UI, that is expected because VS Code uses MCP server registration, not generic JSON file import.
|
package/package.json
CHANGED
package/scripts/mcp-server.mjs
CHANGED
|
@@ -67,32 +67,10 @@ 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
|
-
|
|
92
70
|
function writeMessage(payload) {
|
|
93
71
|
const serializedPayload = JSON.stringify(payload);
|
|
94
|
-
|
|
95
|
-
process.stdout.write(
|
|
72
|
+
// MCP standard: line-delimited JSON (no Content-Length header)
|
|
73
|
+
process.stdout.write(serializedPayload + '\n');
|
|
96
74
|
}
|
|
97
75
|
|
|
98
76
|
function sendResponse(id, result) {
|
|
@@ -291,69 +269,94 @@ async function handleRequest(requestMessage) {
|
|
|
291
269
|
}
|
|
292
270
|
}
|
|
293
271
|
|
|
294
|
-
function
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
|
|
272
|
+
function processIncomingBuffer() {
|
|
273
|
+
const fullContent = incomingBuffer.toString('utf8');
|
|
274
|
+
|
|
275
|
+
// Try to parse as line-delimited JSON first (modern MCP standard)
|
|
276
|
+
let parseMode = 'line-delimited';
|
|
277
|
+
let contentToProcess = fullContent;
|
|
278
|
+
|
|
279
|
+
// Check if Content-Length header is present (LSP-style for backward compatibility)
|
|
280
|
+
if (fullContent.includes('Content-Length:')) {
|
|
281
|
+
parseMode = 'content-length';
|
|
298
282
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
continue;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
const headerName = headerLine.slice(0, separatorIndex).trim().toLowerCase();
|
|
313
|
-
const headerValue = headerLine.slice(separatorIndex + 1).trim();
|
|
314
|
-
|
|
315
|
-
if (headerName === 'content-length') {
|
|
316
|
-
contentLength = Number.parseInt(headerValue, 10);
|
|
317
|
-
break;
|
|
283
|
+
|
|
284
|
+
if (parseMode === 'content-length') {
|
|
285
|
+
// LSP-style: Parse Content-Length headers
|
|
286
|
+
const headerTerminatorIndex = Math.max(
|
|
287
|
+
fullContent.indexOf('\r\n\r\n'),
|
|
288
|
+
fullContent.indexOf('\n\n')
|
|
289
|
+
);
|
|
290
|
+
|
|
291
|
+
if (headerTerminatorIndex === -1) {
|
|
292
|
+
return; // Incomplete header, wait for more data
|
|
318
293
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
const bodyStartIndex = headerEndIndex + delimiterLength;
|
|
327
|
-
const frameEndIndex = bodyStartIndex + contentLength;
|
|
328
|
-
|
|
329
|
-
if (incomingBuffer.length < frameEndIndex) {
|
|
330
|
-
return null;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
const rawMessage = incomingBuffer.slice(bodyStartIndex, frameEndIndex).toString('utf8');
|
|
334
|
-
incomingBuffer = incomingBuffer.slice(frameEndIndex);
|
|
335
|
-
return rawMessage;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
function processIncomingBuffer() {
|
|
339
|
-
while (true) {
|
|
340
|
-
const framedMessage = readNextFramedMessage();
|
|
341
|
-
if (framedMessage === null) {
|
|
294
|
+
|
|
295
|
+
const headerText = fullContent.slice(0, headerTerminatorIndex);
|
|
296
|
+
const contentLengthMatch = headerText.match(/Content-Length:\s*(\d+)/i);
|
|
297
|
+
|
|
298
|
+
if (!contentLengthMatch) {
|
|
299
|
+
incomingBuffer = Buffer.alloc(0);
|
|
342
300
|
return;
|
|
343
301
|
}
|
|
344
|
-
|
|
345
|
-
|
|
302
|
+
|
|
303
|
+
const contentLength = parseInt(contentLengthMatch[1], 10);
|
|
304
|
+
const headerEndLength = fullContent[headerTerminatorIndex] === '\r' ? 4 : 2;
|
|
305
|
+
const bodyStartIndex = headerTerminatorIndex + headerEndLength;
|
|
306
|
+
const bodyEndIndex = bodyStartIndex + contentLength;
|
|
307
|
+
|
|
308
|
+
if (fullContent.length < bodyEndIndex) {
|
|
309
|
+
return; // Body not yet complete
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
const messageBody = fullContent.slice(bodyStartIndex, bodyEndIndex);
|
|
313
|
+
incomingBuffer = Buffer.from(fullContent.slice(bodyEndIndex), 'utf8');
|
|
314
|
+
|
|
346
315
|
try {
|
|
347
|
-
parsedRequest = JSON.parse(
|
|
316
|
+
const parsedRequest = JSON.parse(messageBody);
|
|
317
|
+
Promise.resolve(handleRequest(parsedRequest)).catch((error) => {
|
|
318
|
+
if (typeof parsedRequest?.id !== 'undefined') {
|
|
319
|
+
sendError(parsedRequest.id, -32603, 'Internal error', String(error?.message || error));
|
|
320
|
+
}
|
|
321
|
+
});
|
|
348
322
|
} catch {
|
|
349
|
-
|
|
323
|
+
// Ignore parse errors
|
|
350
324
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
325
|
+
|
|
326
|
+
// Recursively process if there's more data
|
|
327
|
+
if (incomingBuffer.length > 0) {
|
|
328
|
+
processIncomingBuffer();
|
|
329
|
+
}
|
|
330
|
+
} else {
|
|
331
|
+
// Line-delimited: parse one JSON per line
|
|
332
|
+
const lines = fullContent.split('\n');
|
|
333
|
+
|
|
334
|
+
// Keep incomplete last line in buffer
|
|
335
|
+
if (fullContent.endsWith('\n')) {
|
|
336
|
+
incomingBuffer = Buffer.alloc(0);
|
|
337
|
+
} else {
|
|
338
|
+
const lastLine = lines.pop() || '';
|
|
339
|
+
incomingBuffer = Buffer.from(lastLine, 'utf8');
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
for (const line of lines) {
|
|
343
|
+
const trimmed = line.trim();
|
|
344
|
+
if (!trimmed) continue;
|
|
345
|
+
|
|
346
|
+
let parsedRequest;
|
|
347
|
+
try {
|
|
348
|
+
parsedRequest = JSON.parse(trimmed);
|
|
349
|
+
} catch {
|
|
350
|
+
// Ignore non-JSON lines
|
|
351
|
+
continue;
|
|
355
352
|
}
|
|
356
|
-
|
|
353
|
+
|
|
354
|
+
Promise.resolve(handleRequest(parsedRequest)).catch((error) => {
|
|
355
|
+
if (typeof parsedRequest?.id !== 'undefined') {
|
|
356
|
+
sendError(parsedRequest.id, -32603, 'Internal error', String(error?.message || error));
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
}
|
|
357
360
|
}
|
|
358
361
|
}
|
|
359
362
|
|