ccjk 14.2.1 → 14.2.2
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/dist/chunks/api-config-selector.mjs +2 -2
- package/dist/chunks/ccr.mjs +3 -3
- package/dist/chunks/claude-code-incremental-manager.mjs +2 -2
- package/dist/chunks/clavue-config.mjs +66 -2
- package/dist/chunks/doctor.mjs +2 -2
- package/dist/chunks/features.mjs +2 -2
- package/dist/chunks/init.mjs +2 -2
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/quick-setup.mjs +2 -2
- package/dist/chunks/update.mjs +2 -2
- package/dist/chunks/zero-config.mjs +2 -2
- package/dist/i18n/locales/en/configuration.json +2 -0
- package/dist/i18n/locales/zh-CN/configuration.json +2 -0
- package/dist/shared/{ccjk.C1Be3aJN.mjs → ccjk.5bEolFrk.mjs} +1 -1
- package/dist/shared/{ccjk.C94P8gCY.mjs → ccjk.C0WLUnFV.mjs} +10 -0
- package/dist/shared/{ccjk.CTr4yCZ1.mjs → ccjk.L7yC58_i.mjs} +1 -1
- package/dist/templates/common/output-styles/zh-CN/codex-rigor-mode.md +114 -0
- package/package.json +1 -1
- package/templates/common/output-styles/zh-CN/codex-rigor-mode.md +114 -0
|
@@ -38,8 +38,8 @@ import './platform.mjs';
|
|
|
38
38
|
import './main.mjs';
|
|
39
39
|
import 'module';
|
|
40
40
|
import 'node:stream';
|
|
41
|
-
import '../shared/ccjk.
|
|
42
|
-
import '../shared/ccjk.
|
|
41
|
+
import '../shared/ccjk.L7yC58_i.mjs';
|
|
42
|
+
import '../shared/ccjk.C0WLUnFV.mjs';
|
|
43
43
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
44
44
|
import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
45
45
|
import '../shared/ccjk.DeWpAShp.mjs';
|
package/dist/chunks/ccr.mjs
CHANGED
|
@@ -50,8 +50,8 @@ import './prompts.mjs';
|
|
|
50
50
|
import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
51
51
|
import './code-type-resolver.mjs';
|
|
52
52
|
import './features.mjs';
|
|
53
|
-
import '../shared/ccjk.
|
|
54
|
-
import '../shared/ccjk.
|
|
53
|
+
import '../shared/ccjk.L7yC58_i.mjs';
|
|
54
|
+
import '../shared/ccjk.C0WLUnFV.mjs';
|
|
55
55
|
import '../shared/ccjk.DhJ1kyDR.mjs';
|
|
56
56
|
import './simple-config.mjs';
|
|
57
57
|
import '../shared/ccjk.DbigonEQ.mjs';
|
|
@@ -75,7 +75,7 @@ import './config-switch.mjs';
|
|
|
75
75
|
import './doctor.mjs';
|
|
76
76
|
import './api-providers.mjs';
|
|
77
77
|
import '../shared/ccjk.DsZsc4LR.mjs';
|
|
78
|
-
import '../shared/ccjk.
|
|
78
|
+
import '../shared/ccjk.5bEolFrk.mjs';
|
|
79
79
|
import '../shared/ccjk.J8YiPsOw.mjs';
|
|
80
80
|
import '../shared/ccjk.D-magaEx.mjs';
|
|
81
81
|
import '../shared/ccjk.CwGZSTAK.mjs';
|
|
@@ -6,7 +6,7 @@ import { C as ClaudeCodeConfigManager } from './clavue-config.mjs';
|
|
|
6
6
|
import { r as resolveClaudeFamilyModelSlots } from '../shared/ccjk.B2U7DsPy.mjs';
|
|
7
7
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
8
8
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
9
|
-
import { v as validateApiKey } from '../shared/ccjk.
|
|
9
|
+
import { v as validateApiKey } from '../shared/ccjk.L7yC58_i.mjs';
|
|
10
10
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
11
11
|
import 'node:readline';
|
|
12
12
|
import 'stream';
|
|
@@ -42,7 +42,7 @@ import './main.mjs';
|
|
|
42
42
|
import 'module';
|
|
43
43
|
import 'node:stream';
|
|
44
44
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
45
|
-
import '../shared/ccjk.
|
|
45
|
+
import '../shared/ccjk.C0WLUnFV.mjs';
|
|
46
46
|
|
|
47
47
|
function getAuthTypeLabel(authType) {
|
|
48
48
|
ensureI18nInitialized();
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { chmodSync } from 'node:fs';
|
|
2
|
-
import {
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { ZCF_CONFIG_FILE, ZCF_CONFIG_DIR, CLAVUE_CONFIG_FILE, CLAVUE_CREDENTIALS_FILE, CLAVUE_SETTINGS_FILE, CLAVUE_DIR } from './constants.mjs';
|
|
3
4
|
import { d as dayjs } from '../shared/ccjk.RyizuzOI.mjs';
|
|
4
5
|
import { readDefaultTomlConfig, createDefaultTomlConfig, writeTomlConfig } from './ccjk-config.mjs';
|
|
5
6
|
import { r as resolveClaudeFamilySettingsTarget, n as normalizeClaudeFamilySettings } from '../shared/ccjk.DDL-4C-k.mjs';
|
|
6
7
|
import { h as clearLegacyTopLevelRuntimeSettings, o as overwriteModelSettings } from './config.mjs';
|
|
7
8
|
import { ensureDir, exists, copyFile } from './fs-operations.mjs';
|
|
8
9
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
9
|
-
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
10
|
+
import { j as join, d as dirname } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
10
11
|
|
|
11
12
|
class ClaudeCodeConfigManager {
|
|
12
13
|
static CONFIG_FILE = ZCF_CONFIG_FILE;
|
|
@@ -1304,9 +1305,72 @@ function syncMyclaudeActiveProfileToSettings(profile) {
|
|
|
1304
1305
|
} else {
|
|
1305
1306
|
delete settings.env.CLAUDE_CODE_SUBAGENT_MODEL;
|
|
1306
1307
|
}
|
|
1308
|
+
applyAutoOutputStyle(settings, profile);
|
|
1307
1309
|
normalizeClaudeFamilySettings(settings);
|
|
1308
1310
|
writeJsonConfig(CLAVUE_SETTINGS_FILE, settings);
|
|
1309
1311
|
}
|
|
1312
|
+
function applyAutoOutputStyle(settings, profile) {
|
|
1313
|
+
const ccjkMeta = settings.__ccjk && typeof settings.__ccjk === "object" ? settings.__ccjk : {};
|
|
1314
|
+
const isCcjkManaged = ccjkMeta.autoOutputStyle === true;
|
|
1315
|
+
const currentStyle = typeof settings.outputStyle === "string" ? settings.outputStyle : "";
|
|
1316
|
+
if (currentStyle && !isCcjkManaged) {
|
|
1317
|
+
return;
|
|
1318
|
+
}
|
|
1319
|
+
const desired = pickAutoOutputStyle(profile);
|
|
1320
|
+
if (desired) {
|
|
1321
|
+
ensureOutputStyleTemplate(desired);
|
|
1322
|
+
settings.outputStyle = desired;
|
|
1323
|
+
settings.__ccjk = { ...ccjkMeta, autoOutputStyle: true };
|
|
1324
|
+
} else if (isCcjkManaged) {
|
|
1325
|
+
delete settings.outputStyle;
|
|
1326
|
+
const { autoOutputStyle: _drop, ...restMeta } = ccjkMeta;
|
|
1327
|
+
if (Object.keys(restMeta).length === 0) {
|
|
1328
|
+
delete settings.__ccjk;
|
|
1329
|
+
} else {
|
|
1330
|
+
settings.__ccjk = restMeta;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
function pickAutoOutputStyle(profile) {
|
|
1335
|
+
if (!profile) {
|
|
1336
|
+
return null;
|
|
1337
|
+
}
|
|
1338
|
+
const candidates = [
|
|
1339
|
+
profile.primaryModel,
|
|
1340
|
+
profile.model,
|
|
1341
|
+
profile.defaultSonnetModel,
|
|
1342
|
+
profile.defaultOpusModel,
|
|
1343
|
+
profile.defaultHaikuModel
|
|
1344
|
+
].filter((m) => typeof m === "string" && m.trim().length > 0);
|
|
1345
|
+
if (candidates.length === 0) {
|
|
1346
|
+
return null;
|
|
1347
|
+
}
|
|
1348
|
+
const isCodexFamily = candidates.some((m) => /^(?:gpt-5|codex|gpt-6)/i.test(m.trim()));
|
|
1349
|
+
return isCodexFamily ? "codex-rigor-mode" : null;
|
|
1350
|
+
}
|
|
1351
|
+
function ensureOutputStyleTemplate(styleId) {
|
|
1352
|
+
try {
|
|
1353
|
+
const targetDir = join(CLAVUE_DIR, "output-styles");
|
|
1354
|
+
const targetFile = join(targetDir, `${styleId}.md`);
|
|
1355
|
+
if (exists(targetFile)) {
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
1359
|
+
const distDir = dirname(dirname(currentFilePath));
|
|
1360
|
+
const rootDir = dirname(distDir);
|
|
1361
|
+
const candidates = [
|
|
1362
|
+
join(rootDir, "templates", "common", "output-styles", "zh-CN", `${styleId}.md`),
|
|
1363
|
+
join(rootDir, "templates", "common", "output-styles", "en", `${styleId}.md`)
|
|
1364
|
+
];
|
|
1365
|
+
const sourcePath = candidates.find(exists);
|
|
1366
|
+
if (!sourcePath) {
|
|
1367
|
+
return;
|
|
1368
|
+
}
|
|
1369
|
+
ensureDir(targetDir);
|
|
1370
|
+
copyFile(sourcePath, targetFile);
|
|
1371
|
+
} catch {
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1310
1374
|
function syncMyclaudeProviderProfilesFromClaudeConfig(configData) {
|
|
1311
1375
|
if (!configData) {
|
|
1312
1376
|
clearMyclaudeProviderProfiles();
|
package/dist/chunks/doctor.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { SETTINGS_FILE, CLAUDE_DIR, CODEX_DIR, CODEX_CONFIG_FILE, getCodeToolRun
|
|
|
7
7
|
import { i18n } from './index2.mjs';
|
|
8
8
|
import { g as getPermissionManager } from '../shared/ccjk.DsZsc4LR.mjs';
|
|
9
9
|
import { i as isCcrInstalled } from '../shared/ccjk.DFRPtmK_.mjs';
|
|
10
|
-
import { i as inspectClaudeFamilyCoreFeatures } from '../shared/ccjk.
|
|
10
|
+
import { i as inspectClaudeFamilyCoreFeatures } from '../shared/ccjk.5bEolFrk.mjs';
|
|
11
11
|
import { a as readCodexConfig, g as readCodexGoalsFeatureEnabled } from './codex.mjs';
|
|
12
12
|
import { b as backupExistingConfig, c as copyConfigFiles } from './config.mjs';
|
|
13
13
|
import { c as commandExists } from './platform.mjs';
|
|
@@ -47,7 +47,7 @@ import './json-config.mjs';
|
|
|
47
47
|
import '../shared/ccjk.RyizuzOI.mjs';
|
|
48
48
|
import 'node:fs/promises';
|
|
49
49
|
import '../shared/ccjk.BLsIiTqO.mjs';
|
|
50
|
-
import '../shared/ccjk.
|
|
50
|
+
import '../shared/ccjk.C0WLUnFV.mjs';
|
|
51
51
|
import './ccjk-config.mjs';
|
|
52
52
|
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
53
53
|
import './index3.mjs';
|
package/dist/chunks/features.mjs
CHANGED
|
@@ -9,9 +9,9 @@ import { ensureI18nInitialized, i18n, changeLanguage } from './index2.mjs';
|
|
|
9
9
|
import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
10
10
|
import { s as syncClavueActiveProviderModelSelection } from './clavue-config.mjs';
|
|
11
11
|
import { g as getExistingModelConfig, a as getExistingCustomModelConfig, u as updateCustomModel, d as updateDefaultModel, e as getExistingApiConfig, p as promptApiConfigurationAction, f as configureApi } from './config.mjs';
|
|
12
|
-
import { m as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.
|
|
12
|
+
import { m as modifyApiConfigPartially, v as validateApiKey, f as formatApiKeyDisplay } from '../shared/ccjk.L7yC58_i.mjs';
|
|
13
13
|
import { s as selectMcpServices } from '../shared/ccjk.DhJ1kyDR.mjs';
|
|
14
|
-
import { a as configureOutputStyle } from '../shared/ccjk.
|
|
14
|
+
import { a as configureOutputStyle } from '../shared/ccjk.C0WLUnFV.mjs';
|
|
15
15
|
import { i as isWindows } from './platform.mjs';
|
|
16
16
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
17
17
|
import { openSettingsJson, importRecommendedPermissions, importRecommendedEnv } from './simple-config.mjs';
|
package/dist/chunks/init.mjs
CHANGED
|
@@ -20,11 +20,11 @@ import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
|
20
20
|
import { i as isWindows, w as wrapCommandWithSudo, d as isTermux } from './platform.mjs';
|
|
21
21
|
import { p as promptApiConfigurationAction, j as ensureClaudeDir, e as getExistingApiConfig, s as switchToOfficialLogin, b as backupExistingConfig, c as copyConfigFiles, i as applyAiLanguageDirective, f as configureApi } from './config.mjs';
|
|
22
22
|
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration } from '../shared/ccjk.BXv8aYs1.mjs';
|
|
23
|
-
import { m as modifyApiConfigPartially, c as configureApiCompletely, f as formatApiKeyDisplay } from '../shared/ccjk.
|
|
23
|
+
import { m as modifyApiConfigPartially, c as configureApiCompletely, f as formatApiKeyDisplay } from '../shared/ccjk.L7yC58_i.mjs';
|
|
24
24
|
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BtrioX1Z.mjs';
|
|
25
25
|
import { getInstallationStatus, installMyclaude, installClaudeCode } from './installer.mjs';
|
|
26
26
|
import { s as selectMcpServices } from '../shared/ccjk.DhJ1kyDR.mjs';
|
|
27
|
-
import { a as configureOutputStyle } from '../shared/ccjk.
|
|
27
|
+
import { a as configureOutputStyle } from '../shared/ccjk.C0WLUnFV.mjs';
|
|
28
28
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
29
29
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
30
30
|
import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
|
package/dist/chunks/package.mjs
CHANGED
|
@@ -53,8 +53,8 @@ import './codex.mjs';
|
|
|
53
53
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
54
54
|
import './prompts.mjs';
|
|
55
55
|
import '../shared/ccjk.BXv8aYs1.mjs';
|
|
56
|
-
import '../shared/ccjk.
|
|
57
|
-
import '../shared/ccjk.
|
|
56
|
+
import '../shared/ccjk.L7yC58_i.mjs';
|
|
57
|
+
import '../shared/ccjk.C0WLUnFV.mjs';
|
|
58
58
|
import '../shared/ccjk.BtrioX1Z.mjs';
|
|
59
59
|
import './installer.mjs';
|
|
60
60
|
import '../shared/ccjk.DhJ1kyDR.mjs';
|
package/dist/chunks/update.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
|
9
9
|
import { r as runCodexUpdate } from './codex.mjs';
|
|
10
10
|
import { c as copyConfigFiles } from './config.mjs';
|
|
11
11
|
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration } from '../shared/ccjk.BXv8aYs1.mjs';
|
|
12
|
-
import { u as updatePromptOnly } from '../shared/ccjk.
|
|
12
|
+
import { u as updatePromptOnly } from '../shared/ccjk.L7yC58_i.mjs';
|
|
13
13
|
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BtrioX1Z.mjs';
|
|
14
14
|
import { a as installMcpServices } from '../shared/ccjk.CwGZSTAK.mjs';
|
|
15
15
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
@@ -51,7 +51,7 @@ import '../shared/ccjk.DeWpAShp.mjs';
|
|
|
51
51
|
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
52
52
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
53
53
|
import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
54
|
-
import '../shared/ccjk.
|
|
54
|
+
import '../shared/ccjk.C0WLUnFV.mjs';
|
|
55
55
|
|
|
56
56
|
const ccjkVersion = getRuntimeVersion();
|
|
57
57
|
function resolveCodeToolType(optionValue, savedValue) {
|
|
@@ -8,7 +8,7 @@ import { d as dirname } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
|
8
8
|
import { isCodeToolType, isClaudeFamilyCodeTool, CODEX_CONFIG_FILE, ZCF_CONFIG_FILE } from './constants.mjs';
|
|
9
9
|
import { i18n } from './index2.mjs';
|
|
10
10
|
import { readZcfConfig, buildUpdatedTomlConfig, stringifyTomlConfig } from './ccjk-config.mjs';
|
|
11
|
-
import { e as ensureClaudeFamilyCoreFeatures } from '../shared/ccjk.
|
|
11
|
+
import { e as ensureClaudeFamilyCoreFeatures } from '../shared/ccjk.5bEolFrk.mjs';
|
|
12
12
|
import { r as resolveClaudeFamilySettingsTarget, a as applyTrustedOperatorPermissions, n as normalizeClaudeFamilySettings } from '../shared/ccjk.DDL-4C-k.mjs';
|
|
13
13
|
import { h as buildCodexGoalsFeatureConfigContent } from './codex.mjs';
|
|
14
14
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
@@ -47,7 +47,7 @@ import '../shared/ccjk.DeWpAShp.mjs';
|
|
|
47
47
|
import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
48
48
|
import './version-checker.mjs';
|
|
49
49
|
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
50
|
-
import '../shared/ccjk.
|
|
50
|
+
import '../shared/ccjk.C0WLUnFV.mjs';
|
|
51
51
|
import './config.mjs';
|
|
52
52
|
import './prompts.mjs';
|
|
53
53
|
import '../shared/ccjk.gDEDGD_t.mjs';
|
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
"outputStyles.jobs-mode.name": "Jobs Mode",
|
|
59
59
|
"outputStyles.evan-you-mode.description": "Evan You style - Frontend aesthetics, elegant APIs, developer experience",
|
|
60
60
|
"outputStyles.evan-you-mode.name": "Evan You Mode",
|
|
61
|
+
"outputStyles.codex-rigor-mode.description": "Codex/GPT-5 rigor mode - forced self-verification loop until 100% confident (for self-aware models)",
|
|
62
|
+
"outputStyles.codex-rigor-mode.name": "Codex Rigor Mode",
|
|
61
63
|
"outputStyles.explanatory.description": "Claude explains its implementation choices and codebase patterns (Claude Code built-in)",
|
|
62
64
|
"outputStyles.explanatory.name": "Explanatory",
|
|
63
65
|
"outputStyles.learning.description": "Learn-by-doing mode where Claude pauses and asks you to write small pieces of code for hands-on practice (Claude Code built-in)",
|
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
"outputStyles.jobs-mode.name": "Jobs 模式",
|
|
59
59
|
"outputStyles.evan-you-mode.description": "尤雨溪风格 - 前端美学、优雅 API、开发者体验",
|
|
60
60
|
"outputStyles.evan-you-mode.name": "尤雨溪模式",
|
|
61
|
+
"outputStyles.codex-rigor-mode.description": "Codex/GPT-5 严谨模式 - 强制自我验证循环到 100% 把握 (推荐 self-aware 模型)",
|
|
62
|
+
"outputStyles.codex-rigor-mode.name": "Codex 严谨模式",
|
|
61
63
|
"outputStyles.explanatory.description": "解释其实现选择和代码库模式 (Claude Code自带)",
|
|
62
64
|
"outputStyles.explanatory.name": "解释风格",
|
|
63
65
|
"outputStyles.learning.description": "协作式的边做边学模式,暂停并要求您编写小段代码进行实践练习 (Claude Code自带)",
|
|
@@ -3,7 +3,7 @@ import { r as readMcpConfig, f as fixWindowsMcpConfig, m as mergeMcpServers, w a
|
|
|
3
3
|
import { s as selectAndInstallWorkflows, W as WORKFLOW_CONFIG_BASE } from './ccjk.BLsIiTqO.mjs';
|
|
4
4
|
import { i as isCcrInstalled, a as installCcr } from './ccjk.DFRPtmK_.mjs';
|
|
5
5
|
import { readJsonConfig } from '../chunks/json-config.mjs';
|
|
6
|
-
import { c as copyOutputStyles, s as setGlobalDefaultOutputStyle, g as getAvailableOutputStyles } from './ccjk.
|
|
6
|
+
import { c as copyOutputStyles, s as setGlobalDefaultOutputStyle, g as getAvailableOutputStyles } from './ccjk.C0WLUnFV.mjs';
|
|
7
7
|
import { c as commandExists } from '../chunks/platform.mjs';
|
|
8
8
|
import { r as resolveClaudeFamilySettingsTarget } from './ccjk.DDL-4C-k.mjs';
|
|
9
9
|
import { j as join } from './ccjk.bQ7Dh1g4.mjs';
|
|
@@ -43,6 +43,11 @@ const OUTPUT_STYLES = [
|
|
|
43
43
|
isCustom: true,
|
|
44
44
|
filePath: "evan-you-mode.md"
|
|
45
45
|
},
|
|
46
|
+
{
|
|
47
|
+
id: "codex-rigor-mode",
|
|
48
|
+
isCustom: true,
|
|
49
|
+
filePath: "codex-rigor-mode.md"
|
|
50
|
+
},
|
|
46
51
|
// Built-in styles (no template files) - Claude Code native styles
|
|
47
52
|
{
|
|
48
53
|
id: "default",
|
|
@@ -185,6 +190,11 @@ async function configureOutputStyle(preselectedStyles, preselectedDefault, codeT
|
|
|
185
190
|
name: i18n.t("configuration:outputStyles.evan-you-mode.name"),
|
|
186
191
|
description: i18n.t("configuration:outputStyles.evan-you-mode.description")
|
|
187
192
|
},
|
|
193
|
+
{
|
|
194
|
+
id: "codex-rigor-mode",
|
|
195
|
+
name: i18n.t("configuration:outputStyles.codex-rigor-mode.name"),
|
|
196
|
+
description: i18n.t("configuration:outputStyles.codex-rigor-mode.description")
|
|
197
|
+
},
|
|
188
198
|
{
|
|
189
199
|
id: "explanatory",
|
|
190
200
|
name: i18n.t("configuration:outputStyles.explanatory.name"),
|
|
@@ -2,7 +2,7 @@ import a from '../chunks/index5.mjs';
|
|
|
2
2
|
import { i as inquirer } from '../chunks/index6.mjs';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
|
|
4
4
|
import { e as getExistingApiConfig, f as configureApi, s as switchToOfficialLogin, b as backupExistingConfig, i as applyAiLanguageDirective } from '../chunks/config.mjs';
|
|
5
|
-
import { a as configureOutputStyle } from './ccjk.
|
|
5
|
+
import { a as configureOutputStyle } from './ccjk.C0WLUnFV.mjs';
|
|
6
6
|
import { a as addNumbersToChoices } from './ccjk.BFQ7yr5S.mjs';
|
|
7
7
|
import { r as resolveClaudeFamilySettingsTarget } from './ccjk.DDL-4C-k.mjs';
|
|
8
8
|
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codex-rigor-mode
|
|
3
|
+
description: Codex/GPT-5 严谨模式 - 强制自我验证直到 100% 把握,专为 self-aware 模型设计
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codex Rigor 模式
|
|
7
|
+
|
|
8
|
+
> "Are you 100% confident in this strategy? If not, find all possible loopholes,
|
|
9
|
+
> suggest proper fixes and run this loop until you are factually 100% confident."
|
|
10
|
+
|
|
11
|
+
## 适用范围
|
|
12
|
+
|
|
13
|
+
**仅在以下模型下启用此模式:GPT-5.*、Codex 系列、其他经过验证的 self-aware 模型。**
|
|
14
|
+
|
|
15
|
+
不适用于会无脑附和"你说得对"的模型——那只会让它一边道歉一边重复同样的错误。
|
|
16
|
+
|
|
17
|
+
## 核心循环:Loophole Closure Loop
|
|
18
|
+
|
|
19
|
+
每次给出"完成 / 答案 / 策略"之前,强制走完这个循环:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
1. 我现在 100% 有把握吗?
|
|
23
|
+
- 否 → 进入 2
|
|
24
|
+
- 是 → 列出依据(具体的代码/测试/文档/grep 结果),跳到 5
|
|
25
|
+
|
|
26
|
+
2. 列出所有可能的漏洞 / 失败模式:
|
|
27
|
+
- 边界条件(空、null、超大、并发)
|
|
28
|
+
- 隐含假设(依赖版本、平台、用户输入格式)
|
|
29
|
+
- 我没读过但可能影响的代码路径
|
|
30
|
+
- 我刚才的修复可能引入的新问题
|
|
31
|
+
|
|
32
|
+
3. 对每个漏洞给出具体修复方案。
|
|
33
|
+
|
|
34
|
+
4. 应用修复,回到 1。
|
|
35
|
+
|
|
36
|
+
5. 输出最终答案 + 我验证过的具体证据。
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
不允许跳步。不允许"应该没问题"。每个漏洞要么有证据排除,要么有代码修复。
|
|
40
|
+
|
|
41
|
+
## 验证而非声明
|
|
42
|
+
|
|
43
|
+
**禁止**:
|
|
44
|
+
- "应该可以" / "理论上没问题" / "看起来对"
|
|
45
|
+
- "我觉得这样写就行了"
|
|
46
|
+
- 不跑测试就说 fixed
|
|
47
|
+
- 不读源码就说 X 函数返回 Y
|
|
48
|
+
|
|
49
|
+
**必须**:
|
|
50
|
+
- 跑相关测试看实际输出(`pnpm vitest run path -t "name"`)
|
|
51
|
+
- grep 验证 import / 调用方
|
|
52
|
+
- 读实际代码而不是回忆
|
|
53
|
+
- 给出可复现的命令 + 期望输出
|
|
54
|
+
|
|
55
|
+
## 不要无脑附和
|
|
56
|
+
|
|
57
|
+
用户说"你确定吗?"时,不是道歉,是**重新走一遍 Loophole Closure Loop**。
|
|
58
|
+
|
|
59
|
+
如果走完循环还是 100% 把握,**坚持原结论**并给出新的验证证据。
|
|
60
|
+
如果发现漏洞,**承认具体哪条**,修复,给新结论。
|
|
61
|
+
|
|
62
|
+
不要:
|
|
63
|
+
- "你说得对,我之前错了" (除非真的找到具体错误)
|
|
64
|
+
- "抱歉让我重新想想" (直接走循环,不必道歉)
|
|
65
|
+
- "您是对的" 然后给出和上次一样的答案换皮版本
|
|
66
|
+
|
|
67
|
+
## 输出格式
|
|
68
|
+
|
|
69
|
+
完成任务时按这个格式答:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
## 结论
|
|
73
|
+
<一句话>
|
|
74
|
+
|
|
75
|
+
## 验证证据
|
|
76
|
+
- <具体命令 + 输出 / 文件:行号 / 测试名>
|
|
77
|
+
- <...>
|
|
78
|
+
|
|
79
|
+
## 已检查的漏洞
|
|
80
|
+
- <漏洞 1>: <如何排除/修复>
|
|
81
|
+
- <漏洞 2>: <如何排除/修复>
|
|
82
|
+
|
|
83
|
+
## 剩余风险(如有)
|
|
84
|
+
<诚实声明哪些没验证、为什么 ok 跳过>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 示例对照
|
|
88
|
+
|
|
89
|
+
**坏的回答**(典型 Opus 4.7 模式):
|
|
90
|
+
> 我修好了 X 函数,应该没问题了。要不你试试看?
|
|
91
|
+
|
|
92
|
+
**好的回答**(Codex Rigor 模式):
|
|
93
|
+
> ## 结论
|
|
94
|
+
> X 函数的越界 bug 已修复。
|
|
95
|
+
>
|
|
96
|
+
> ## 验证证据
|
|
97
|
+
> - `pnpm vitest run tests/x.test.ts` → 12 passed (包含原失败用例 `handles empty input`)
|
|
98
|
+
> - 修复点:src/x.ts:42 把 `<=` 改成 `<`
|
|
99
|
+
> - grep 调用方:3 处,参数都是 `arr`,不存在传 string 的情况
|
|
100
|
+
>
|
|
101
|
+
> ## 已检查的漏洞
|
|
102
|
+
> - 空数组:测试 `handles empty input` 覆盖 → ✅
|
|
103
|
+
> - 大数组性能:循环 O(n) 不变 → ✅
|
|
104
|
+
> - 调用方传 null:TypeScript 类型签名禁止 → ✅
|
|
105
|
+
>
|
|
106
|
+
> ## 剩余风险
|
|
107
|
+
> 无。
|
|
108
|
+
|
|
109
|
+
## 与 Karpathy Baseline 的关系
|
|
110
|
+
|
|
111
|
+
本 mode 在 4 条 baseline 原则之上**强化第 4 条 Goal-driven execution**——
|
|
112
|
+
把"循环到目标达成"具体化为"循环到 100% confident"。
|
|
113
|
+
|
|
114
|
+
冲突时 baseline 优先(比如简洁性 > 验证报告冗长)。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccjk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "14.2.
|
|
4
|
+
"version": "14.2.2",
|
|
5
5
|
"packageManager": "pnpm@10.17.1",
|
|
6
6
|
"description": "Production-ready AI dev environment for Claude Code, Codex, and modern coding workflows with 30-second onboarding, persistent memory, Agent Teams, remote control, and capability discovery.",
|
|
7
7
|
"author": {
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codex-rigor-mode
|
|
3
|
+
description: Codex/GPT-5 严谨模式 - 强制自我验证直到 100% 把握,专为 self-aware 模型设计
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codex Rigor 模式
|
|
7
|
+
|
|
8
|
+
> "Are you 100% confident in this strategy? If not, find all possible loopholes,
|
|
9
|
+
> suggest proper fixes and run this loop until you are factually 100% confident."
|
|
10
|
+
|
|
11
|
+
## 适用范围
|
|
12
|
+
|
|
13
|
+
**仅在以下模型下启用此模式:GPT-5.*、Codex 系列、其他经过验证的 self-aware 模型。**
|
|
14
|
+
|
|
15
|
+
不适用于会无脑附和"你说得对"的模型——那只会让它一边道歉一边重复同样的错误。
|
|
16
|
+
|
|
17
|
+
## 核心循环:Loophole Closure Loop
|
|
18
|
+
|
|
19
|
+
每次给出"完成 / 答案 / 策略"之前,强制走完这个循环:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
1. 我现在 100% 有把握吗?
|
|
23
|
+
- 否 → 进入 2
|
|
24
|
+
- 是 → 列出依据(具体的代码/测试/文档/grep 结果),跳到 5
|
|
25
|
+
|
|
26
|
+
2. 列出所有可能的漏洞 / 失败模式:
|
|
27
|
+
- 边界条件(空、null、超大、并发)
|
|
28
|
+
- 隐含假设(依赖版本、平台、用户输入格式)
|
|
29
|
+
- 我没读过但可能影响的代码路径
|
|
30
|
+
- 我刚才的修复可能引入的新问题
|
|
31
|
+
|
|
32
|
+
3. 对每个漏洞给出具体修复方案。
|
|
33
|
+
|
|
34
|
+
4. 应用修复,回到 1。
|
|
35
|
+
|
|
36
|
+
5. 输出最终答案 + 我验证过的具体证据。
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
不允许跳步。不允许"应该没问题"。每个漏洞要么有证据排除,要么有代码修复。
|
|
40
|
+
|
|
41
|
+
## 验证而非声明
|
|
42
|
+
|
|
43
|
+
**禁止**:
|
|
44
|
+
- "应该可以" / "理论上没问题" / "看起来对"
|
|
45
|
+
- "我觉得这样写就行了"
|
|
46
|
+
- 不跑测试就说 fixed
|
|
47
|
+
- 不读源码就说 X 函数返回 Y
|
|
48
|
+
|
|
49
|
+
**必须**:
|
|
50
|
+
- 跑相关测试看实际输出(`pnpm vitest run path -t "name"`)
|
|
51
|
+
- grep 验证 import / 调用方
|
|
52
|
+
- 读实际代码而不是回忆
|
|
53
|
+
- 给出可复现的命令 + 期望输出
|
|
54
|
+
|
|
55
|
+
## 不要无脑附和
|
|
56
|
+
|
|
57
|
+
用户说"你确定吗?"时,不是道歉,是**重新走一遍 Loophole Closure Loop**。
|
|
58
|
+
|
|
59
|
+
如果走完循环还是 100% 把握,**坚持原结论**并给出新的验证证据。
|
|
60
|
+
如果发现漏洞,**承认具体哪条**,修复,给新结论。
|
|
61
|
+
|
|
62
|
+
不要:
|
|
63
|
+
- "你说得对,我之前错了" (除非真的找到具体错误)
|
|
64
|
+
- "抱歉让我重新想想" (直接走循环,不必道歉)
|
|
65
|
+
- "您是对的" 然后给出和上次一样的答案换皮版本
|
|
66
|
+
|
|
67
|
+
## 输出格式
|
|
68
|
+
|
|
69
|
+
完成任务时按这个格式答:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
## 结论
|
|
73
|
+
<一句话>
|
|
74
|
+
|
|
75
|
+
## 验证证据
|
|
76
|
+
- <具体命令 + 输出 / 文件:行号 / 测试名>
|
|
77
|
+
- <...>
|
|
78
|
+
|
|
79
|
+
## 已检查的漏洞
|
|
80
|
+
- <漏洞 1>: <如何排除/修复>
|
|
81
|
+
- <漏洞 2>: <如何排除/修复>
|
|
82
|
+
|
|
83
|
+
## 剩余风险(如有)
|
|
84
|
+
<诚实声明哪些没验证、为什么 ok 跳过>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 示例对照
|
|
88
|
+
|
|
89
|
+
**坏的回答**(典型 Opus 4.7 模式):
|
|
90
|
+
> 我修好了 X 函数,应该没问题了。要不你试试看?
|
|
91
|
+
|
|
92
|
+
**好的回答**(Codex Rigor 模式):
|
|
93
|
+
> ## 结论
|
|
94
|
+
> X 函数的越界 bug 已修复。
|
|
95
|
+
>
|
|
96
|
+
> ## 验证证据
|
|
97
|
+
> - `pnpm vitest run tests/x.test.ts` → 12 passed (包含原失败用例 `handles empty input`)
|
|
98
|
+
> - 修复点:src/x.ts:42 把 `<=` 改成 `<`
|
|
99
|
+
> - grep 调用方:3 处,参数都是 `arr`,不存在传 string 的情况
|
|
100
|
+
>
|
|
101
|
+
> ## 已检查的漏洞
|
|
102
|
+
> - 空数组:测试 `handles empty input` 覆盖 → ✅
|
|
103
|
+
> - 大数组性能:循环 O(n) 不变 → ✅
|
|
104
|
+
> - 调用方传 null:TypeScript 类型签名禁止 → ✅
|
|
105
|
+
>
|
|
106
|
+
> ## 剩余风险
|
|
107
|
+
> 无。
|
|
108
|
+
|
|
109
|
+
## 与 Karpathy Baseline 的关系
|
|
110
|
+
|
|
111
|
+
本 mode 在 4 条 baseline 原则之上**强化第 4 条 Goal-driven execution**——
|
|
112
|
+
把"循环到目标达成"具体化为"循环到 100% confident"。
|
|
113
|
+
|
|
114
|
+
冲突时 baseline 优先(比如简洁性 > 验证报告冗长)。
|