diff --git a/CLAUDE.md b/CLAUDE.md index cec6e5987..cea0d6661 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -249,12 +249,6 @@ Feature flags control which functionality is enabled at runtime. 代码中统一 详见各兼容层的 docs 文档。 -### 穷鬼模式(Budget Mode) - -- 通过 `/poor` 命令切换,持久化到 `settings.json`。 -- 启用后跳过 `extract_memories`、`prompt_suggestion` 和 `verification_agent`,显著减少 token 消耗。 -- 实现在 `src/commands/poor/poorMode.ts`。 - ### Stubbed/Deleted Modules | Module | Status | diff --git a/README_CCB.md b/README_CCB.md index b3c38e6f9..1fdc2d943 100644 --- a/README_CCB.md +++ b/README_CCB.md @@ -23,7 +23,6 @@ | **Remote Control 私有部署** | Docker 自托管远程界面, 可以手机上看 CC | [文档](https://ccb.agent-aura.top/docs/features/remote-control-self-hosting) | | **Langfuse 监控** | 企业级 Agent 监控, 可以清晰看到每次 agent loop 细节, 可以一键转化为数据集 | [文档](https://ccb.agent-aura.top/docs/features/langfuse-monitoring) | | **Web Search** | 内置网页搜索工具, 支持 bing 和 brave 搜索 | [文档](https://ccb.agent-aura.top/docs/features/web-browser-tool) | -| **Poor Mode** | 穷鬼模式,关闭记忆提取和键入建议,大幅度减少并发请求 | /poor 可以开关 | | **Channels 频道通知** | MCP 服务器推送外部消息到会话(飞书/Slack/Discord/微信等),`--channels plugin:name@marketplace` 启用 | [文档](https://ccb.agent-aura.top/docs/features/channels) | | **自定义模型供应商** | OpenAI/Anthropic/Gemini/Grok 兼容 (`/login`) | [文档](https://ccb.agent-aura.top/docs/features/all-features-guide) | | Voice Mode | 语音输入,支持豆包语言输入(`/voice doubao`) | [文档](https://ccb.agent-aura.top/docs/features/voice-mode) | diff --git a/scripts/defines.ts b/scripts/defines.ts index e1c46be38..df38076f0 100644 --- a/scripts/defines.ts +++ b/scripts/defines.ts @@ -88,8 +88,6 @@ export const DEFAULT_BUILD_FEATURES = [ 'EXPERIMENTAL_SKILL_SEARCH', // 技能搜索(bounded caches 已修复 overflow,内存问题已解决) 'EXPERIMENTAL_SEARCH_EXTRA_TOOLS', // 工具搜索预取管道(TF-IDF 索引 + inter-turn 异步预取) // 'SKILL_LEARNING', - // P3: poor mode - 'POOR', // 穷鬼模式,跳过 extract_memories/prompt_suggestion 减少消耗 // Team Memory // 'TEAMMEM', // 已禁用:依赖 COORDINATOR_MODE,邮箱文件无限增长 // SSH Remote diff --git a/src/commands/poor/poorMode.ts b/src/commands/poor/poorMode.ts deleted file mode 100644 index d6ab2e99f..000000000 --- a/src/commands/poor/poorMode.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Poor mode state — when active, skips extract_memories and prompt_suggestion - * to reduce token consumption. - * - * Persisted to settings.json so it survives session restarts. - */ - -import { - getInitialSettings, - updateSettingsForSource, -} from '../../utils/settings/settings.js' - -let poorModeActive: boolean | null = null - -export function isPoorModeActive(): boolean { - if (poorModeActive === null) { - poorModeActive = getInitialSettings().poorMode === true - } - return poorModeActive -} - -export function setPoorMode(active: boolean): void { - poorModeActive = active - updateSettingsForSource('userSettings', { - poorMode: active || undefined, - }) -} diff --git a/src/components/Settings/Config.tsx b/src/components/Settings/Config.tsx index 371b9aed6..079d733dc 100644 --- a/src/components/Settings/Config.tsx +++ b/src/components/Settings/Config.tsx @@ -440,29 +440,6 @@ export function Config({ }, ] : []), - ...(feature('POOR') - ? [ - { - id: 'poorMode', - label: 'Poor mode (save tokens)', - value: (() => { - const PoorMode = - require('../../commands/poor/poorMode.js') as typeof import('../../commands/poor/poorMode.js'); - return PoorMode.isPoorModeActive(); - })(), - type: 'boolean' as const, - onChange(enabled: boolean) { - const PoorMode = - require('../../commands/poor/poorMode.js') as typeof import('../../commands/poor/poorMode.js'); - PoorMode.setPoorMode(enabled); - setAppState(prev => ({ - ...prev, - promptSuggestionEnabled: !enabled, - })); - }, - }, - ] - : []), // Speculation toggle (ant-only) ...(process.env.USER_TYPE === 'ant' ? [ diff --git a/src/constants/promptEngineeringAudit.runner.ts b/src/constants/promptEngineeringAudit.runner.ts index b8f3f787a..a501d39eb 100644 --- a/src/constants/promptEngineeringAudit.runner.ts +++ b/src/constants/promptEngineeringAudit.runner.ts @@ -44,9 +44,6 @@ mock.module('src/constants/common.js', () => ({ mock.module('src/utils/settings/settings.js', () => ({ getInitialSettings: () => ({ language: undefined }), })) -mock.module('src/commands/poor/poorMode.js', () => ({ - isPoorModeActive: () => false, -})) mock.module('src/utils/env.js', () => ({ env: { platform: 'linux' }, })) diff --git a/src/constants/prompts.ts b/src/constants/prompts.ts index 2edd83247..4c51a0c92 100644 --- a/src/constants/prompts.ts +++ b/src/constants/prompts.ts @@ -7,8 +7,6 @@ import { getIsNonInteractiveSession } from '../bootstrap/state.js' import { getCurrentWorktreeSession } from '../utils/worktree.js' import { getSessionStartDate } from './common.js' import { getInitialSettings } from '../utils/settings/settings.js' -// Stub: poor mode removed from CCP -const isPoorModeActive = () => false import { AGENT_TOOL_NAME, VERIFICATION_AGENT_TYPE, @@ -367,9 +365,7 @@ function getSessionSpecificGuidanceSection( hasAgentTool && feature('VERIFICATION_AGENT') && // 3P default: false — verification agent is ant-only A/B - getFeatureValue_CACHED_MAY_BE_STALE('tengu_hive_evidence', false) && - // Poor mode: skip verification agent to save tokens - !isPoorModeActive() + getFeatureValue_CACHED_MAY_BE_STALE('tengu_hive_evidence', false) ? `The contract: when non-trivial implementation happens on your turn, independent adversarial verification must happen before you report completion \u2014 regardless of who did the implementing (you directly, a fork you spawned, or a subagent). You are the one reporting to the user; you own the gate. Non-trivial means: 3+ file edits, backend/API changes, or infrastructure changes. Spawn the ${AGENT_TOOL_NAME} tool with subagent_type="${VERIFICATION_AGENT_TYPE}". Your own checks, caveats, and a fork's self-checks do NOT substitute \u2014 only the verifier assigns a verdict; you cannot self-assign PARTIAL. Pass the original user request, all files changed (by anyone), the approach, and the plan file path if applicable. Flag concerns if you have them but do NOT share test results or claim things work. On FAIL: fix, resume the verifier with its findings plus your fix, repeat until PASS. On PASS: spot-check it \u2014 re-run 2-3 commands from its report, confirm every PASS has a Command run block with output that matches your re-run. If any PASS lacks a command block or diverges, resume the verifier with the specifics. On PARTIAL (from the verifier): report what passed and what could not be verified.` : null, ].filter(item => item !== null) diff --git a/src/query/stopHooks.ts b/src/query/stopHooks.ts index dc2cff71c..337719d33 100644 --- a/src/query/stopHooks.ts +++ b/src/query/stopHooks.ts @@ -82,8 +82,6 @@ export async function* handleStopHooks( StopHookResult > { const hookStartTime = Date.now() - // CCP: poor mode module not present — always false - const poorMode = false const stopHookContext: REPLHookContext = { messages: [...messagesForQuery, ...assistantMessages], @@ -157,7 +155,7 @@ export async function* handleStopHooks( | undefined, ) } - if (!toolUseContext.agentId && !poorMode) { + if (!toolUseContext.agentId) { void executeAutoDream(stopHookContext, toolUseContext.appendSystemMessage) } } diff --git a/src/services/SessionMemory/sessionMemory.ts b/src/services/SessionMemory/sessionMemory.ts index bff85c8c5..11bdfa734 100644 --- a/src/services/SessionMemory/sessionMemory.ts +++ b/src/services/SessionMemory/sessionMemory.ts @@ -281,12 +281,6 @@ const extractSessionMemory = sequential(async function ( return } - // Poor mode: skip to reduce token consumption (stubbed — poor mode removed from CCP) - if (feature('POOR')) { - // isPoorModeActive stub — poor/poorMode.js not present in CCP - return - } - // Check gate lazily when hook runs (cached, non-blocking) if (!isSessionMemoryGateEnabled()) { // Log gate failure once per session (ant-only)