@ryuenn3123/agentic-senior-core 2.0.27 → 2.5.4
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/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.cursorrules +1 -1
- package/.windsurfrules +1 -1
- package/README.md +34 -4
- package/lib/cli/commands/init.mjs +47 -1
- package/lib/cli/compiler.mjs +22 -0
- package/lib/cli/memory-continuity.mjs +129 -0
- package/lib/cli/utils.mjs +3 -2
- package/package.json +1 -1
- package/scripts/validate.mjs +4 -2
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.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v2.5.4
|
|
4
4
|
Timestamp: 2026-04-15T00:14:51.184Z
|
|
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.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v2.5.4
|
|
4
4
|
Timestamp: 2026-04-15T00:14:51.184Z
|
|
5
5
|
Selected profile: beginner
|
|
6
6
|
Selected policy file: .agent-context/policies/llm-judge-threshold.json
|
package/README.md
CHANGED
|
@@ -152,7 +152,8 @@ npx @ryuenn3123/agentic-senior-core init --newbie
|
|
|
152
152
|
- `init` project discovery accepts answers in any language; prompts stay in English, but non-English answers are supported.
|
|
153
153
|
- Generated docs default to English for consistency; use `--docs-lang` only when you explicitly need a different output language.
|
|
154
154
|
- After docs scaffolding, CLI prints prompt starter examples so users can iterate by prompt without rewriting full project context.
|
|
155
|
-
- MCP server
|
|
155
|
+
- MCP server trust approval is manual in IDE settings (initial start).
|
|
156
|
+
- Optional MCP auto-restart on config changes is available via `chat.mcp.autoStart` (Experimental setting in VS Code).
|
|
156
157
|
- MCP workspace scaffold is opt-in via `--mcp-template` and creates `.vscode/mcp.json`.
|
|
157
158
|
|
|
158
159
|
**What files are created?**
|
|
@@ -180,6 +181,9 @@ npx @ryuenn3123/agentic-senior-core init --mcp-template
|
|
|
180
181
|
3. Confirm the file is `.vscode/mcp.json` with server `agentic-senior-core`.
|
|
181
182
|
4. The generated server command is `node ./scripts/mcp-server.mjs` with `cwd` set to `${workspaceFolder}`.
|
|
182
183
|
5. Open Chat Customizations > MCP Servers, then trust/start the server.
|
|
184
|
+
6. Optional: enable `chat.mcp.autoStart` in VS Code Settings to auto-restart MCP servers when config changes are detected.
|
|
185
|
+
|
|
186
|
+
If VS Code shows `Property $schema is not allowed` for `.vscode/mcp.json`, remove the `$schema` field. Newer MCP configuration schema versions infer this automatically.
|
|
183
187
|
|
|
184
188
|
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.
|
|
185
189
|
|
|
@@ -235,6 +239,27 @@ npx @ryuenn3123/agentic-senior-core init --no-token-optimize
|
|
|
235
239
|
When enabled, the CLI writes `.agent-context/state/token-optimization.json`, regenerates compiled rules, and adds compact command guidance to `.cursorrules` and `.windsurfrules`.
|
|
236
240
|
If an external token proxy is available, the CLI prints setup hints. If not, native fallback guidance stays active, so outside users are not forced to install extra tooling.
|
|
237
241
|
|
|
242
|
+
### Memory Continuity Mode (Enabled by Default on Init)
|
|
243
|
+
|
|
244
|
+
By default, every `init` flow also enables memory continuity automatically.
|
|
245
|
+
This allows cross-session context carryover through compact index-first retrieval plus selective hydration.
|
|
246
|
+
|
|
247
|
+
Quick start:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
# Default behavior (explicit flag optional)
|
|
251
|
+
npx @ryuenn3123/agentic-senior-core init --memory-continuity
|
|
252
|
+
|
|
253
|
+
# Opt out when needed
|
|
254
|
+
npx @ryuenn3123/agentic-senior-core init --no-memory-continuity
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
When enabled, the CLI writes `.agent-context/state/memory-continuity.json`, regenerates compiled rules, and injects `MEMORY CONTINUITY PROFILE` guidance into `.cursorrules` and `.windsurfrules`.
|
|
258
|
+
|
|
259
|
+
Compatibility note:
|
|
260
|
+
- Works for local IDE, CLI, and cloud IDE chat runtimes that support the adapter contract or MCP retrieval path.
|
|
261
|
+
- Generic web chat runtimes without repository tool hooks cannot auto-hydrate memory at runtime and should use manual summary handoff.
|
|
262
|
+
|
|
238
263
|
### Token Efficiency Benchmark Snapshot
|
|
239
264
|
|
|
240
265
|
Latest local benchmark (2026-04-11) from `.agent-context/state/token-optimization-benchmark.json`:
|
|
@@ -532,9 +557,14 @@ Important notes for maintainers and forks:
|
|
|
532
557
|
- Operations playbook and release-operations checklist shipped.
|
|
533
558
|
|
|
534
559
|
### Current Forward Plan
|
|
535
|
-
- V2.0: Skill marketplace trust tiers, transactional installs, rollback safety, and launch-menu onboarding.
|
|
536
|
-
- V2.5:
|
|
537
|
-
- V3.0:
|
|
560
|
+
- V2.0: Delivered baseline maintained. Skill marketplace trust tiers, transactional installs, rollback safety, and launch-menu onboarding are active foundations.
|
|
561
|
+
- V2.5: Released. Benchmark anti-regression track, frontend excellence enforcement, and memory continuity pilot are complete.
|
|
562
|
+
- V3.0: Planning and intake phase for enterprise governance cloud, policy drift detection, and org-level override registry.
|
|
563
|
+
|
|
564
|
+
Roadmap-first execution policy for V3.0:
|
|
565
|
+
1. Record ideas (optimization, refactor, reliability, security, DX) in roadmap top goals first.
|
|
566
|
+
2. Define measurable success metrics and explicit exit criteria before execution.
|
|
567
|
+
3. Bump to `3.0.0` only after V3.0 exit criteria are fully satisfied.
|
|
538
568
|
|
|
539
569
|
Detailed timeline and success metrics: [docs/roadmap.md](docs/roadmap.md)
|
|
540
570
|
|
|
@@ -56,6 +56,10 @@ import {
|
|
|
56
56
|
normalizeAgentName,
|
|
57
57
|
writeTokenOptimizationState,
|
|
58
58
|
} from '../token-optimization.mjs';
|
|
59
|
+
import {
|
|
60
|
+
createMemoryContinuityState,
|
|
61
|
+
writeMemoryContinuityState,
|
|
62
|
+
} from '../memory-continuity.mjs';
|
|
59
63
|
import { evaluateSkillDomainCompatibility } from '../compatibility.mjs';
|
|
60
64
|
|
|
61
65
|
export { REPO_ROOT } from '../constants.mjs';
|
|
@@ -71,6 +75,7 @@ export function parseInitArguments(commandArguments) {
|
|
|
71
75
|
ci: undefined,
|
|
72
76
|
newbie: false,
|
|
73
77
|
tokenOptimize: true,
|
|
78
|
+
memoryContinuity: true,
|
|
74
79
|
tokenAgent: 'copilot',
|
|
75
80
|
includeMcpTemplate: false,
|
|
76
81
|
scaffoldDocs: undefined,
|
|
@@ -166,6 +171,11 @@ export function parseInitArguments(commandArguments) {
|
|
|
166
171
|
continue;
|
|
167
172
|
}
|
|
168
173
|
|
|
174
|
+
if (currentArgument === '--memory-continuity') {
|
|
175
|
+
parsedInitOptions.memoryContinuity = true;
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
|
|
169
179
|
if (currentArgument === '--token-agent') {
|
|
170
180
|
parsedInitOptions.tokenAgent = commandArguments[argumentIndex + 1] || 'copilot';
|
|
171
181
|
argumentIndex += 1;
|
|
@@ -182,6 +192,11 @@ export function parseInitArguments(commandArguments) {
|
|
|
182
192
|
continue;
|
|
183
193
|
}
|
|
184
194
|
|
|
195
|
+
if (currentArgument === '--no-memory-continuity') {
|
|
196
|
+
parsedInitOptions.memoryContinuity = false;
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
|
|
185
200
|
if (currentArgument === '--mcp-template') {
|
|
186
201
|
parsedInitOptions.includeMcpTemplate = true;
|
|
187
202
|
continue;
|
|
@@ -408,6 +423,9 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
|
|
|
408
423
|
const isTokenOptimizationEnabled = typeof initOptions.tokenOptimize === 'boolean'
|
|
409
424
|
? initOptions.tokenOptimize
|
|
410
425
|
: true;
|
|
426
|
+
const isMemoryContinuityEnabled = typeof initOptions.memoryContinuity === 'boolean'
|
|
427
|
+
? initOptions.memoryContinuity
|
|
428
|
+
: true;
|
|
411
429
|
const shouldIncludeMcpTemplate = initOptions.includeMcpTemplate === true;
|
|
412
430
|
const selectedTokenAgentName = normalizeAgentName(initOptions.tokenAgent || 'copilot');
|
|
413
431
|
const isInteractiveSession = Boolean(stdin.isTTY && stdout.isTTY);
|
|
@@ -729,9 +747,20 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
|
|
|
729
747
|
includeMcpTemplate: shouldIncludeMcpTemplate,
|
|
730
748
|
});
|
|
731
749
|
|
|
750
|
+
let memoryContinuityState = null;
|
|
751
|
+
if (isMemoryContinuityEnabled) {
|
|
752
|
+
memoryContinuityState = createMemoryContinuityState({
|
|
753
|
+
isEnabled: true,
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
await writeMemoryContinuityState(resolvedTargetDirectoryPath, memoryContinuityState);
|
|
757
|
+
console.log(`Memory continuity policy enabled (${memoryContinuityState.hydrationMode}).`);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
let tokenOptimizationState = null;
|
|
732
761
|
if (isTokenOptimizationEnabled) {
|
|
733
762
|
const detectedExternalProxy = detectRtkBinary();
|
|
734
|
-
|
|
763
|
+
tokenOptimizationState = createTokenOptimizationState({
|
|
735
764
|
isEnabled: true,
|
|
736
765
|
selectedAgentName: selectedTokenAgentName,
|
|
737
766
|
rtkDetection: detectedExternalProxy,
|
|
@@ -862,6 +891,18 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
|
|
|
862
891
|
detectionSource: detectedRuntimeEnvironment.source,
|
|
863
892
|
},
|
|
864
893
|
operationMode: 'init',
|
|
894
|
+
tokenOptimization: {
|
|
895
|
+
enabled: isTokenOptimizationEnabled,
|
|
896
|
+
selectedAgent: selectedTokenAgentName,
|
|
897
|
+
preferredShellProxy: tokenOptimizationState?.preferredShellProxy || null,
|
|
898
|
+
stateFile: isTokenOptimizationEnabled ? '.agent-context/state/token-optimization.json' : null,
|
|
899
|
+
},
|
|
900
|
+
memoryContinuity: {
|
|
901
|
+
enabled: isMemoryContinuityEnabled,
|
|
902
|
+
hydrationMode: memoryContinuityState?.hydrationMode || null,
|
|
903
|
+
adapters: memoryContinuityState?.adapters || [],
|
|
904
|
+
stateFile: isMemoryContinuityEnabled ? '.agent-context/state/memory-continuity.json' : null,
|
|
905
|
+
},
|
|
865
906
|
});
|
|
866
907
|
|
|
867
908
|
console.log('\nInitialization complete.');
|
|
@@ -892,6 +933,11 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
|
|
|
892
933
|
}
|
|
893
934
|
console.log(`- Repository workflows copied: no (workflows remain source-repo assets)`);
|
|
894
935
|
console.log(`- MCP template file: ${shouldIncludeMcpTemplate ? 'created (.vscode/mcp.json)' : 'not created by default (use --mcp-template)'}`);
|
|
936
|
+
if (isMemoryContinuityEnabled) {
|
|
937
|
+
console.log('- Memory continuity policy: enabled (index + selective hydration)');
|
|
938
|
+
} else {
|
|
939
|
+
console.log('- Memory continuity policy: disabled (--no-memory-continuity)');
|
|
940
|
+
}
|
|
895
941
|
if (isTokenOptimizationEnabled) {
|
|
896
942
|
console.log(`- Token optimization policy: enabled for ${selectedTokenAgentName}`);
|
|
897
943
|
} else {
|
package/lib/cli/compiler.mjs
CHANGED
|
@@ -25,6 +25,10 @@ import {
|
|
|
25
25
|
readTokenOptimizationState,
|
|
26
26
|
buildTokenOptimizationGuidanceBlock,
|
|
27
27
|
} from './token-optimization.mjs';
|
|
28
|
+
import {
|
|
29
|
+
readMemoryContinuityState,
|
|
30
|
+
buildMemoryContinuityGuidanceBlock,
|
|
31
|
+
} from './memory-continuity.mjs';
|
|
28
32
|
|
|
29
33
|
export async function writeSelectedPolicy(targetDirectoryPath, selectedProfileName) {
|
|
30
34
|
const policyFilePath = path.join(targetDirectoryPath, '.agent-context', 'policies', POLICY_FILE_NAME);
|
|
@@ -49,8 +53,16 @@ export async function writeOnboardingReport({
|
|
|
49
53
|
compatibilityWarnings = [],
|
|
50
54
|
runtimeEnvironment = null,
|
|
51
55
|
operationMode = 'init',
|
|
56
|
+
tokenOptimization = undefined,
|
|
57
|
+
memoryContinuity = undefined,
|
|
52
58
|
}) {
|
|
53
59
|
const onboardingReportPath = path.join(targetDirectoryPath, '.agent-context', 'state', 'onboarding-report.json');
|
|
60
|
+
const resolvedTokenOptimization = typeof tokenOptimization === 'undefined'
|
|
61
|
+
? await readTokenOptimizationState(targetDirectoryPath)
|
|
62
|
+
: tokenOptimization;
|
|
63
|
+
const resolvedMemoryContinuity = typeof memoryContinuity === 'undefined'
|
|
64
|
+
? await readMemoryContinuityState(targetDirectoryPath)
|
|
65
|
+
: memoryContinuity;
|
|
54
66
|
const onboardingReport = {
|
|
55
67
|
cliVersion: CLI_VERSION,
|
|
56
68
|
generatedAt: new Date().toISOString(),
|
|
@@ -72,6 +84,8 @@ export async function writeOnboardingReport({
|
|
|
72
84
|
selectedSkillDomains,
|
|
73
85
|
compatibilityWarnings,
|
|
74
86
|
runtimeEnvironment,
|
|
87
|
+
tokenOptimization: resolvedTokenOptimization,
|
|
88
|
+
memoryContinuity: resolvedMemoryContinuity,
|
|
75
89
|
autoDetection: {
|
|
76
90
|
recommendedStack: projectDetection.recommendedStackFileName,
|
|
77
91
|
recommendedAdditionalStacks: projectDetection.secondaryStackFileNames || [],
|
|
@@ -267,6 +281,14 @@ export async function buildCompiledRulesContent({
|
|
|
267
281
|
`## TOKEN OPTIMIZATION PROFILE\nSource: .agent-context/state/token-optimization.json\n\n${buildTokenOptimizationGuidanceBlock(tokenOptimizationState).trim()}`
|
|
268
282
|
);
|
|
269
283
|
}
|
|
284
|
+
|
|
285
|
+
const memoryContinuityState = await readMemoryContinuityState(resolvedTargetDirectoryPath);
|
|
286
|
+
if (memoryContinuityState?.enabled) {
|
|
287
|
+
contextBlocks.push(
|
|
288
|
+
`## MEMORY CONTINUITY PROFILE\nSource: .agent-context/state/memory-continuity.json\n\n${buildMemoryContinuityGuidanceBlock(memoryContinuityState).trim()}`
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
270
292
|
contextBlocks.push(
|
|
271
293
|
[
|
|
272
294
|
'## LAYER 7: STATE AWARENESS (MANDATORY)',
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* lightweight indexing, and selective hydration helpers.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import fs from 'node:fs/promises';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
|
|
10
|
+
import { pathExists } from './utils.mjs';
|
|
11
|
+
|
|
7
12
|
const PRIVATE_BLOCK_PATTERN = /<private>[\s\S]*?<\/private>/gi;
|
|
8
13
|
|
|
9
14
|
const INLINE_SENSITIVE_PATTERNS = [
|
|
@@ -30,6 +35,9 @@ const INLINE_SENSITIVE_PATTERNS = [
|
|
|
30
35
|
];
|
|
31
36
|
|
|
32
37
|
export const MEMORY_SCHEMA_VERSION = '1.0.0';
|
|
38
|
+
export const MEMORY_CONTINUITY_STATE_FILE_NAME = 'memory-continuity.json';
|
|
39
|
+
|
|
40
|
+
const MEMORY_CONTINUITY_STATE_SCHEMA_VERSION = 'memory-continuity-v1';
|
|
33
41
|
|
|
34
42
|
export const SUPPORTED_MEMORY_ADAPTER_IDS = Object.freeze([
|
|
35
43
|
'claude-code',
|
|
@@ -84,6 +92,32 @@ function normalizeTags(rawTags) {
|
|
|
84
92
|
return Array.from(tagSet);
|
|
85
93
|
}
|
|
86
94
|
|
|
95
|
+
function normalizeMemoryAdapterIds(rawAdapterIds) {
|
|
96
|
+
if (!Array.isArray(rawAdapterIds) || rawAdapterIds.length === 0) {
|
|
97
|
+
return [...SUPPORTED_MEMORY_ADAPTER_IDS];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const normalizedAdapterIdSet = new Set();
|
|
101
|
+
for (const rawAdapterId of rawAdapterIds) {
|
|
102
|
+
const normalizedAdapterId = toNonEmptyString(String(rawAdapterId || '')).toLowerCase();
|
|
103
|
+
if (!normalizedAdapterId) {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!SUPPORTED_MEMORY_ADAPTER_IDS.includes(normalizedAdapterId)) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
normalizedAdapterIdSet.add(normalizedAdapterId);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (normalizedAdapterIdSet.size === 0) {
|
|
115
|
+
return [...SUPPORTED_MEMORY_ADAPTER_IDS];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return Array.from(normalizedAdapterIdSet);
|
|
119
|
+
}
|
|
120
|
+
|
|
87
121
|
export function estimateTokenUsage(rawText = '') {
|
|
88
122
|
const normalizedText = String(rawText || '');
|
|
89
123
|
return Math.max(1, Math.ceil(normalizedText.length / 4));
|
|
@@ -264,3 +298,98 @@ export function hydrateIndexedObservations(indexEntries, normalizedObservations,
|
|
|
264
298
|
hydrationTokenEstimate,
|
|
265
299
|
};
|
|
266
300
|
}
|
|
301
|
+
|
|
302
|
+
export function createMemoryContinuityState(options = {}) {
|
|
303
|
+
const isEnabled = options.isEnabled !== false;
|
|
304
|
+
const sessionStartIndexLimit = Number.isFinite(Number(options.sessionStartIndexLimit))
|
|
305
|
+
? Math.max(1, Number(options.sessionStartIndexLimit))
|
|
306
|
+
: 8;
|
|
307
|
+
const fullHydrationLimit = Number.isFinite(Number(options.fullHydrationLimit))
|
|
308
|
+
? Math.max(1, Number(options.fullHydrationLimit))
|
|
309
|
+
: 2;
|
|
310
|
+
|
|
311
|
+
return {
|
|
312
|
+
schemaVersion: MEMORY_CONTINUITY_STATE_SCHEMA_VERSION,
|
|
313
|
+
enabled: isEnabled,
|
|
314
|
+
hydrationMode: 'progressive-disclosure',
|
|
315
|
+
adapters: normalizeMemoryAdapterIds(options.adapterIds),
|
|
316
|
+
retrieval: {
|
|
317
|
+
sessionStartIndexLimit,
|
|
318
|
+
fullHydrationLimit,
|
|
319
|
+
},
|
|
320
|
+
privacy: {
|
|
321
|
+
redactPrivateTags: true,
|
|
322
|
+
redactInlineSensitivePatterns: true,
|
|
323
|
+
},
|
|
324
|
+
generatedAt: new Date().toISOString(),
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export async function readMemoryContinuityState(targetDirectoryPath) {
|
|
329
|
+
const stateFilePath = path.join(
|
|
330
|
+
targetDirectoryPath,
|
|
331
|
+
'.agent-context',
|
|
332
|
+
'state',
|
|
333
|
+
MEMORY_CONTINUITY_STATE_FILE_NAME
|
|
334
|
+
);
|
|
335
|
+
|
|
336
|
+
if (!(await pathExists(stateFilePath))) {
|
|
337
|
+
return null;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
try {
|
|
341
|
+
const stateContent = await fs.readFile(stateFilePath, 'utf8');
|
|
342
|
+
const parsedState = JSON.parse(stateContent);
|
|
343
|
+
if (typeof parsedState.enabled !== 'boolean') {
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
parsedState.adapters = normalizeMemoryAdapterIds(parsedState.adapters);
|
|
348
|
+
return parsedState;
|
|
349
|
+
} catch {
|
|
350
|
+
return null;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export async function writeMemoryContinuityState(targetDirectoryPath, memoryContinuityState) {
|
|
355
|
+
const stateDirectoryPath = path.join(targetDirectoryPath, '.agent-context', 'state');
|
|
356
|
+
const stateFilePath = path.join(stateDirectoryPath, MEMORY_CONTINUITY_STATE_FILE_NAME);
|
|
357
|
+
|
|
358
|
+
await fs.mkdir(stateDirectoryPath, { recursive: true });
|
|
359
|
+
await fs.writeFile(stateFilePath, JSON.stringify(memoryContinuityState, null, 2) + '\n', 'utf8');
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export function buildMemoryContinuityGuidanceBlock(memoryContinuityState) {
|
|
363
|
+
if (!memoryContinuityState?.enabled) {
|
|
364
|
+
return [
|
|
365
|
+
'Memory continuity mode is disabled for this repository.',
|
|
366
|
+
'Use explicit session summaries when handing off context across tools.',
|
|
367
|
+
].join('\n');
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const adapterGuidanceLine = memoryContinuityState.adapters?.length
|
|
371
|
+
? `Supported adapters: ${memoryContinuityState.adapters.join(', ')}.`
|
|
372
|
+
: `Supported adapters: ${SUPPORTED_MEMORY_ADAPTER_IDS.join(', ')}.`;
|
|
373
|
+
|
|
374
|
+
const sessionStartIndexLimit = Number.isFinite(Number(memoryContinuityState.retrieval?.sessionStartIndexLimit))
|
|
375
|
+
? Number(memoryContinuityState.retrieval.sessionStartIndexLimit)
|
|
376
|
+
: 8;
|
|
377
|
+
const fullHydrationLimit = Number.isFinite(Number(memoryContinuityState.retrieval?.fullHydrationLimit))
|
|
378
|
+
? Number(memoryContinuityState.retrieval.fullHydrationLimit)
|
|
379
|
+
: 2;
|
|
380
|
+
|
|
381
|
+
return [
|
|
382
|
+
'Memory continuity mode is enabled.',
|
|
383
|
+
'Hydration mode: progressive-disclosure.',
|
|
384
|
+
adapterGuidanceLine,
|
|
385
|
+
'',
|
|
386
|
+
'Session-start retrieval policy:',
|
|
387
|
+
`- Load compact index first (limit: ${sessionStartIndexLimit} entries).`,
|
|
388
|
+
`- Hydrate full detail only for highest-value entries (limit: ${fullHydrationLimit}).`,
|
|
389
|
+
'- Always redact sensitive text before persistence (<private> blocks and inline secret-like fields).',
|
|
390
|
+
'',
|
|
391
|
+
'Host compatibility scope:',
|
|
392
|
+
'- Works for local IDE, CLI, and cloud IDE chat hosts that implement the memory adapter contract or MCP retrieval path.',
|
|
393
|
+
'- Generic web chat sessions without repository tools cannot auto-hydrate runtime memory and should rely on manual summary export/import.',
|
|
394
|
+
].join('\n');
|
|
395
|
+
}
|
package/lib/cli/utils.mjs
CHANGED
|
@@ -28,7 +28,7 @@ export function printUsage() {
|
|
|
28
28
|
console.log('');
|
|
29
29
|
console.log('Usage:');
|
|
30
30
|
console.log(' agentic-senior-core launch');
|
|
31
|
-
console.log(' agentic-senior-core init [target-directory] [--preset <name>] [--profile <beginner|balanced|strict>] [--profile-pack <name>] [--stack <name>] [--blueprint <name>] [--ci <true|false>] [--newbie] [--token-optimize] [--no-token-optimize] [--token-agent <name>] [--scaffold-docs] [--no-scaffold-docs] [--docs-lang <en|id>] [--project-config <path>] [--runtime-env <auto|linux-wsl|linux|windows|macos>]');
|
|
31
|
+
console.log(' agentic-senior-core init [target-directory] [--preset <name>] [--profile <beginner|balanced|strict>] [--profile-pack <name>] [--stack <name>] [--blueprint <name>] [--ci <true|false>] [--newbie] [--token-optimize] [--no-token-optimize] [--token-agent <name>] [--memory-continuity] [--no-memory-continuity] [--scaffold-docs] [--no-scaffold-docs] [--docs-lang <en|id>] [--project-config <path>] [--runtime-env <auto|linux-wsl|linux|windows|macos>]');
|
|
32
32
|
console.log(' agentic-senior-core upgrade [target-directory] [--dry-run] [--yes] [--mcp-template]');
|
|
33
33
|
console.log(' agentic-senior-core optimize [target-directory] [--agent <copilot|claude|cursor|windsurf|gemini|codex|cline>] [--enable|--disable] [--show]');
|
|
34
34
|
console.log(' agentic-senior-core mcp');
|
|
@@ -49,6 +49,8 @@ export function printUsage() {
|
|
|
49
49
|
console.log(' --token-optimize Explicitly enable token optimization policy during init (default behavior)');
|
|
50
50
|
console.log(' --token-agent Set token optimization agent target (copilot, claude, cursor, windsurf, gemini, codex, cline)');
|
|
51
51
|
console.log(' --no-token-optimize Disable token optimization policy during init');
|
|
52
|
+
console.log(' --memory-continuity Explicitly enable cross-session memory continuity policy during init (default behavior)');
|
|
53
|
+
console.log(' --no-memory-continuity Disable memory continuity policy during init');
|
|
52
54
|
console.log(' --mcp-template Create .vscode/mcp.json workspace template (MCP trust/start remains manual in IDE)');
|
|
53
55
|
console.log(' --scaffold-docs Force project documentation scaffolding (architecture, database, API, flow)');
|
|
54
56
|
console.log(' --no-scaffold-docs Skip project documentation scaffolding');
|
|
@@ -139,7 +141,6 @@ export async function copyGovernanceAssetsToTarget(
|
|
|
139
141
|
const workspaceMcpConfigurationPath = path.join(vscodeDirectoryPath, 'mcp.json');
|
|
140
142
|
|
|
141
143
|
const workspaceMcpConfiguration = {
|
|
142
|
-
$schema: 'vscode://schemas/mcp',
|
|
143
144
|
servers: {
|
|
144
145
|
'agentic-senior-core': {
|
|
145
146
|
type: 'stdio',
|
package/package.json
CHANGED
package/scripts/validate.mjs
CHANGED
|
@@ -743,10 +743,12 @@ async function validateMcpConfiguration() {
|
|
|
743
743
|
fail('MCP test server must use Node');
|
|
744
744
|
}
|
|
745
745
|
|
|
746
|
-
if (workspaceMcpConfiguration.$schema === '
|
|
746
|
+
if (typeof workspaceMcpConfiguration.$schema === 'undefined') {
|
|
747
|
+
pass('Workspace MCP config omits $schema (supported by current VS Code MCP schema inference)');
|
|
748
|
+
} else if (workspaceMcpConfiguration.$schema === 'vscode://schemas/mcp') {
|
|
747
749
|
pass('Workspace MCP config uses trusted VS Code schema');
|
|
748
750
|
} else {
|
|
749
|
-
fail('Workspace MCP config must
|
|
751
|
+
fail('Workspace MCP config $schema must be omitted or set to vscode://schemas/mcp');
|
|
750
752
|
}
|
|
751
753
|
|
|
752
754
|
if (workspaceServerConfig?.command === 'node') {
|