@ryuenn3123/agentic-senior-core 2.0.2 → 2.0.3

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.2
3
+ Generated by Agentic-Senior-Core CLI v2.0.3
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.2
3
+ Generated by Agentic-Senior-Core CLI v2.0.3
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
@@ -128,10 +128,11 @@ agentic-senior-core skill fullstack --json
128
128
 
129
129
  When you run `init`, the CLI now auto-activates the matching skill packs for the chosen stack and blueprint, so the compiled governance context includes the relevant frontend, backend, fullstack, and CLI guidance by default.
130
130
 
131
- ### Token Optimization Mode (Optional and User-Friendly)
131
+ ### Token Optimization Mode (Enabled by Default on Init)
132
132
 
133
133
  Use this mode when your AI session is shell-heavy and context usage is high.
134
- It is optional by design and works in two modes:
134
+ By default, every `init` flow enables token optimization automatically (npx, npm exec, global CLI, preset, and interactive wizard).
135
+ The optimization engine works in two modes:
135
136
  - Native fallback mode (no external dependency required)
136
137
  - External proxy mode (auto-detected when available)
137
138
 
@@ -144,6 +145,9 @@ agentic-senior-core optimize . --disable
144
145
 
145
146
  # Auto-enable during project initialization
146
147
  npx @ryuenn3123/agentic-senior-core init --token-optimize --token-agent copilot
148
+
149
+ # Opt out when needed
150
+ npx @ryuenn3123/agentic-senior-core init --no-token-optimize
147
151
  ```
148
152
 
149
153
  When enabled, the CLI writes `.agent-context/state/token-optimization.json`, regenerates compiled rules, and adds compact command guidance to `.cursorrules` and `.windsurfrules`.
@@ -55,7 +55,7 @@ export function parseInitArguments(commandArguments) {
55
55
  blueprint: undefined,
56
56
  ci: undefined,
57
57
  newbie: false,
58
- tokenOptimize: false,
58
+ tokenOptimize: true,
59
59
  tokenAgent: 'copilot',
60
60
  };
61
61
 
@@ -146,14 +146,12 @@ export function parseInitArguments(commandArguments) {
146
146
 
147
147
  if (currentArgument === '--token-agent') {
148
148
  parsedInitOptions.tokenAgent = commandArguments[argumentIndex + 1] || 'copilot';
149
- parsedInitOptions.tokenOptimize = true;
150
149
  argumentIndex += 1;
151
150
  continue;
152
151
  }
153
152
 
154
153
  if (currentArgument.startsWith('--token-agent=')) {
155
154
  parsedInitOptions.tokenAgent = currentArgument.split('=')[1] || 'copilot';
156
- parsedInitOptions.tokenOptimize = true;
157
155
  continue;
158
156
  }
159
157
 
@@ -176,6 +174,10 @@ export function parseInitArguments(commandArguments) {
176
174
 
177
175
  export async function runInitCommand(targetDirectoryArgument, initOptions = {}) {
178
176
  const resolvedTargetDirectoryPath = path.resolve(targetDirectoryArgument || '.');
177
+ const isTokenOptimizationEnabled = typeof initOptions.tokenOptimize === 'boolean'
178
+ ? initOptions.tokenOptimize
179
+ : true;
180
+ const selectedTokenAgentName = normalizeAgentName(initOptions.tokenAgent || 'copilot');
179
181
 
180
182
  if (resolvedTargetDirectoryPath.toLowerCase() === 'c:\\windows' || resolvedTargetDirectoryPath.toLowerCase() === 'c:\\windows\\system32') {
181
183
  console.error('\n[FATAL] Target directory resolved to a Windows system folder (C:\\Windows).');
@@ -348,11 +350,11 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
348
350
 
349
351
  await copyGovernanceAssetsToTarget(resolvedTargetDirectoryPath);
350
352
 
351
- if (initOptions.tokenOptimize) {
353
+ if (isTokenOptimizationEnabled) {
352
354
  const detectedExternalProxy = detectRtkBinary();
353
355
  const tokenOptimizationState = createTokenOptimizationState({
354
356
  isEnabled: true,
355
- selectedAgentName: initOptions.tokenAgent,
357
+ selectedAgentName: selectedTokenAgentName,
356
358
  rtkDetection: detectedExternalProxy,
357
359
  });
358
360
 
@@ -417,8 +419,10 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
417
419
  console.log(`- Blocking severities: ${formatBlockingSeverities(selectedProfile.blockingSeverities)}`);
418
420
  console.log(`- Setup time: ${formatDuration(setupDurationMs)}`);
419
421
  console.log('- Generated files: .cursorrules, .windsurfrules, and .agent-context/state/onboarding-report.json');
420
- if (initOptions.tokenOptimize) {
421
- console.log(`- Token optimization policy: enabled for ${initOptions.tokenAgent}`);
422
+ if (isTokenOptimizationEnabled) {
423
+ console.log(`- Token optimization policy: enabled for ${selectedTokenAgentName}`);
424
+ } else {
425
+ console.log('- Token optimization policy: disabled (--no-token-optimize)');
422
426
  }
423
427
  console.log('\nPlain-language summary:');
424
428
  console.log(`I prepared a ${selectedProfile.displayName.toLowerCase()} governance pack for a ${toTitleCase(selectedResolvedStackFileName)} project using the ${toTitleCase(selectedResolvedBlueprintFileName)} blueprint.`);
package/lib/cli/utils.mjs CHANGED
@@ -25,7 +25,7 @@ export function printUsage() {
25
25
  console.log('');
26
26
  console.log('Usage:');
27
27
  console.log(' agentic-senior-core launch');
28
- 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] [--token-agent <name>]');
28
+ 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>]');
29
29
  console.log(' agentic-senior-core upgrade [target-directory] [--dry-run] [--yes]');
30
30
  console.log(' agentic-senior-core optimize [target-directory] [--agent <copilot|claude|cursor|windsurf|gemini|codex|cline>] [--enable|--disable] [--show]');
31
31
  console.log(' agentic-senior-core rollback [target-directory]');
@@ -42,9 +42,9 @@ export function printUsage() {
42
42
  console.log(' --stack Override stack selection');
43
43
  console.log(' --blueprint Override blueprint selection');
44
44
  console.log(' --ci Override CI/CD guardrails (true|false)');
45
- console.log(' --token-optimize Enable token optimization policy during init');
45
+ console.log(' --token-optimize Explicitly enable token optimization policy during init (default behavior)');
46
46
  console.log(' --token-agent Set token optimization agent target (copilot, claude, cursor, windsurf, gemini, codex, cline)');
47
- console.log(' --no-token-optimize Disable token optimization even if token-agent is provided');
47
+ console.log(' --no-token-optimize Disable token optimization policy during init');
48
48
  console.log(' --dry-run Preview upgrade without writing files');
49
49
  console.log(' --yes Skip confirmation prompts for upgrade');
50
50
  console.log(' --agent Target agent integration for token optimization mode');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "type": "module",
5
5
  "description": "Force your AI Agent to code like a Staff Engineer, not a Junior.",
6
6
  "bin": {