Commit Graph

53 Commits

Author SHA1 Message Date
y574444354
8ea29466ee refactor: replace "Claude's" with "CoStrict's" in user-facing copy
Replace all "Claude's" references with "CoStrict's" across 34 source files
including commands, components, services, tools, and utilities.
2026-04-10 15:35:08 +08:00
y574444354
90908ba929 merge upstream/main: 同步上游更新并解决冲突
冲突解决策略:
- CLAUDE.md: 保留版本号 4.0.1 和品牌化(csc/claude-code-best),
  采纳上游的 CI 信息、Ink 框架位置提醒、Type Safety Guidelines
- configs.ts: 保留 costrict provider,同时采纳上游新增的 grok provider
- ConsoleOAuthFlow.tsx: 保留简洁的 orgResult.message 写法
- contributors.svg: 使用上游版本
2026-04-10 10:57:02 +08:00
yhangf
0d1754614a refactor(agents): 改回2层架构,StrictSpec 直接调 SubCoding
- StrictSpec 精简为~60行,stage 4 直接调 SubCoding(绕过 SpecPlan 中间层)
- 移除 SpecPlan 注册(3层嵌套对外部用户不可用,ALL_AGENT_DISALLOWED_TOOLS 限制)
- SubCoding 自带探索/实施能力,无需上层准备 proposal/task.md
- 支持 teammates 并行调用 SubCoding,自动降级串行

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:32:21 +08:00
yhangf
7ee0b3a6a2 refactor(agents): 清理 StrictSpec 架构,删除 PlanManager
- StrictSpec 精简为纯4阶段分发器(~40行),只负责编排,不含实施细节
- SpecPlan 成为唯一实施协调逻辑来源(探索→提案→验证→实施→收尾)
- 删除 planManager.ts 文件
- builtInAgents.ts 去除重复注册、移除 PLAN_MANAGER_AGENT

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 09:23:19 +08:00
yhangf
bb1e88ea82 Merge branch 'main' of https://github.com/yhangf/csc 2026-04-10 08:56:09 +08:00
claude-code-best
34bbc1d403 fix(types): replace all as any with proper type assertions
Eliminate unsafe `as any` casts across 21 non-test source files,
replacing them with specific type annotations:

- Bridge transport: use StdoutMessage type for write/writeBatch calls
- print.ts: type msg.request as Record<string, unknown> for unknown
  SDK control subtypes; use StdoutMessage for output.enqueue()
- API providers (openai/grok/gemini): import ChatCompletion types,
  type streams as AsyncIterable<ChatCompletionChunk>, type request
  bodies as ChatCompletionCreateParamsStreaming
- Computer use executor: use Partial<ResolvePrepareCaptureResult>
  for cross-platform screenshot result
- Components: replace Ink color string casts with proper typing
- Win32 bridge: type stdin as Writable after null check

All 2453 tests pass with 0 failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 23:51:33 +08:00
claude-code-best
a14d3dc8f0 fix(types): clean type fixes across 92 files
Apply proper TypeScript type corrections without any unsafe casts:
- Fix unknown/never/{} types from decompilation
- Correct function signatures and parameter types
- Add missing type declarations and interfaces
- Fix Ink component prop types
- Update API client/provider type annotations

Test files with mock data casts are included as-is (acceptable pattern).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 23:45:56 +08:00
yhangf
51b88ecb24 refactor(agents): 改为2层架构,StrictSpec 直接调度所有叶子 agent
- StrictSpec 吸收 SpecPlan 的全部实施协调逻辑
- 完整流程:Requirement→DesignAgent→TaskPlan→QuickExplore/TaskCheck/SubCoding
- 移除 SpecPlan 注册(不再是链路中间层)
- 调用深度:StrictSpec → leaf agents(2层)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 21:00:52 +08:00
yhangf
1f768d682a refactor(agents): 3层架构重构 StrictSpec 工作流
- SpecPlan 合并 PlanManager/SpecPlan/PlanApply 为统一 Layer 2 协调者
- StrictSpec Stage 4 直接调用 SpecPlan,移除中间层 PlanManager
- SpecPlan 支持 SubCoding 串行(模式A)和 teammates 并行(模式B),自动降级
- builtInAgents.ts 移除 PLAN_MANAGER_AGENT 注册(不再是 StrictSpec 链路必需)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 20:52:41 +08:00
xixingde
57d0e1feac refactor(agents): consolidate PlanApply functionality into StrictPlan agent
- Remove separate PlanApply agent and integrate task distribution logic directly into StrictPlan agent
- Move PlanApply and TDD agents to backup directory
- Update StrictPlan system prompt to reflect dual role as PlanAgent and CodingAgent
- Update builtInAgents registry to remove PlanApply and update TDD import path
2026-04-09 20:46:18 +08:00
xixingde
12601d3faf Merge branch 'main' of https://github.com/xixingde/csc 2026-04-09 20:45:06 +08:00
yhangf
fe8ad9df69 feat: migrate strictSpec workflow agents into csc built-in agent registry
Register 6 previously-unregistered costrict agents as first-class built-in
agents: StrictSpec (4-stage orchestrator), Requirement, DesignAgent, TaskPlan,
PlanManager, and SpecPlan.

Adapt system prompts in strictSpec.ts, planManager.ts, specPlan.ts to use the
csc Agent tool (subagent_type parameter) instead of the legacy costrict-specific
`task` tool. Also fix a broken relative import in taskPlan.ts.

Agent call chain for StrictSpec workflow:
  StrictSpec → Requirement / DesignAgent / TaskPlan / PlanManager
  PlanManager → SpecPlan
  SpecPlan → QuickExplore / TaskCheck / PlanApply
  PlanApply → SubCoding

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 20:44:50 +08:00
geroge
260a8140e3
Merge pull request #10 from y574444354/feat/rebrand-claude-code-to-costrict
rebrand: 将 Claude Code 品牌改为 CoStrict
2026-04-09 17:23:27 +08:00
y574444354
1c3e495c03 rebrand: 将 Claude Code 品牌改为 CoStrict 2026-04-09 17:14:39 +08:00
xixingde
6962816be7 feat(agents): add TDD agent and integrate into strict plan workflow 2026-04-09 17:12:36 +08:00
xixingde
d5daf372a0 feat(AgentTool): add new built-in agents to registry 2026-04-09 16:57:14 +08:00
yhangf
cc326e5b3b refactor: rename costrict/agent directory to costrict/agents 2026-04-09 15:28:02 +08:00
yhangf
26beb6fd36 Merge branch 'feature/tdd' 2026-04-09 15:17:12 +08:00
yhangf
1d70f31fef feat(tdd): add TDD workflow with test design, prepare, execute, and run-and-fix agents 2026-04-09 15:14:27 +08:00
xixingde
817fe6d42e Merge branch 'main' of https://github.com/xixingde/csc 2026-04-09 14:23:45 +08:00
yhangf
2c97a0f7d9 feat(skills): add project-wiki skill for automated technical documentation generation
Introduce `/project-wiki` bundled skill that orchestrates a multi-stage pipeline to
analyze a codebase and generate a complete technical documentation wiki. Adds four
specialized sub-agents:
- WikiProjectAnalyze: deep repository analysis and classification
- WikiCatalogueDesign: dynamic document structure design based on project traits
- WikiDocumentGenerate: code-driven technical document authoring
- WikiIndexGeneration: structured index and navigation creation
Also updates .gitignore to exclude `.costrict`, `.claude`, and `/costrict` directories.
2026-04-09 14:10:24 +08:00
xixingde
9cef68a360 refactor(strictPlan): update agent references from Explore to QuickExplore 2026-04-09 14:06:48 +08:00
xixingde
02d046a61e feat(agents): add QuickExploreAgent and enable planning agents by default 2026-04-09 12:42:11 +08:00
xixingde
c15c952659 refactor(costrict): archive QuickExplore agent and update agent tool references 2026-04-09 11:19:03 +08:00
xixingde
ab0ffd5c59 refactor(costrict): migrate agents to dedicated module and add new agent types 2026-04-09 10:10:20 +08:00
geroge
19a362571b
Merge branch 'claude-code-best:main' into main 2026-04-08 11:31:49 +08:00
claude-code-best
91b9366f64 refactor: 大规模迁移原有组件到 ink 包内 2026-04-07 22:26:45 +08:00
geroge
66be9ca401
Merge branch 'claude-code-best:main' into main 2026-04-07 20:52:38 +08:00
xixingde
47b535af47 fix(costrict): enable file edit and write tools for built-in agents 2026-04-07 20:40:17 +08:00
xixingde
884e0208b8 feat(agents): add costrict agent suite for structured workflows 2026-04-07 17:50:42 +08:00
claude-code-best
e5782e732c Revert "Revert "feat: 第一个可以用的 ink 组件抽象 (#158)" (#175)"
This reverts commit 88d4c3ba24.
2026-04-07 16:17:48 +08:00
claude-code-best
a7d9a220bf fix: 修复 main 文件及 "production" 的问题 2026-04-07 16:13:15 +08:00
claude-code-best
88d4c3ba24
Revert "feat: 第一个可以用的 ink 组件抽象 (#158)" (#175)
This reverts commit c445f43f8d.
2026-04-07 15:05:03 +08:00
claude-code-best
c445f43f8d
feat: 第一个可以用的 ink 组件抽象 (#158) 2026-04-06 23:56:45 +08:00
claude-code-best
5b1a52b8e0
更新大量 tsx 原始文件; 已经迁移 login panel; 部分 (#121)
* style(B1-1): 格式化 ink/buddy/cli/context/screens/tasks/services/keybindings/state (43 files)

纯格式化:移除分号、React Compiler import、import 多行展开。
修复了 Box.tsx 和 ScrollBox.tsx 中无效的 global.d.ts import。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-2): 格式化 commands (79 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-3): 格式化 components/messages,permissions,mcp,sandbox,shell (104 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-4): 格式化 components/PromptInput,FeedbackSurvey,tasks,agents,skills,design-system,wizard (73 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-5): 格式化 components其余 + hooks + tools (232 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-6): 格式化 main/entrypoints/utils/moreright (21 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: 更新 README,新增 Run.ps1/TODO.md,删除 V6.md

- README.md: 大幅重写,更详细版本历史和配置示例
- Run.ps1: 新增 Windows 启动脚本
- TODO.md: 新增包完成清单
- V6.md: 删除(架构重构规划已不适用)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: 修复以前的问题

* fix: 修复 login 面板的问题

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 23:24:27 +08:00
claude-code-best
2cc626c1c3 fix: 修复测试文件 2026-04-03 20:11:09 +08:00
claude-code-best
e48da3956c feat: 修正 web search 工具 2026-04-03 00:47:37 +08:00
claude-code-best
ce29527a67 test: 添加一大堆测试文件 2026-04-02 20:28:08 +08:00
claude-code-best
ac1f02958c fix: 批量修正 external 字面量 2026-04-02 17:01:39 +08:00
claude-code-best
799dacc407 test: 新增一波测试文件 2026-04-02 16:21:24 +08:00
claude-code-best
8697c91668 feat: 完成测试 16-17 2026-04-02 16:03:20 +08:00
claude-code-best
006ad97fbb test: 新增测试代码文件 2026-04-02 14:44:56 +08:00
claude-code-best
21ac9e441f test: Phase 2-4 — 添加 12 个测试文件 (+321 tests, 968 total)
Phase 2 (轻 Mock): envUtils, sleep/sequential, memoize, groupToolUses, dangerousPatterns, outputLimits
Phase 3 (补全): zodToJsonSchema, PermissionMode, envValidation
Phase 4 (工具模块): mcpStringUtils, destructiveCommandWarning, commandSemantics

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 09:29:01 +08:00
claude-code-best
a28a44f9f7 test: 添加 FileEditTool/permissions/filterToolsByDenyRules 测试
- FileEditTool/utils.test.ts: 24 tests (normalizeQuotes, stripTrailingWhitespace, findActualString, preserveQuoteStyle, applyEditToFile)
- permissions/permissions.test.ts: 13 tests (getDenyRuleForTool, getAskRuleForTool, getDenyRuleForAgent, filterDeniedAgents)
- tools.test.ts: 扩展 5 tests (filterToolsByDenyRules 过滤逻辑)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 07:36:50 +08:00
claude-code-best
67baea3c7f test: 添加 Tool 系统单元测试 (测试计划 01)
覆盖 buildTool、toolMatchesName、findToolByName、getEmptyToolPermissionContext、
filterToolProgressMessages、parseToolPreset、parseGitCommitId、detectGitOperation
共 46 个测试用例全部通过。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 21:32:45 +08:00
claude-code-best
33fe4940e1 fix: 启用 /loop 命令,移除 feature('AGENT_TRIGGERS') gate
isKairosCronEnabled() 依赖 feature('AGENT_TRIGGERS'),在反编译版本中
feature() 始终返回 false,导致 /loop skill 被禁用。简化为仅检查
CLAUDE_CODE_DISABLE_CRON 环境变量。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 11:53:32 +08:00
claude-code-best
7e15974be9 feat: 实现 4 个 NAPI 包 — modifiers/image-processor/audio-capture/url-handler
- modifiers-napi: 使用 Bun FFI 调用 macOS CGEventSourceFlagsState 检测修饰键
- image-processor-napi: 集成 sharp 库,macOS 剪贴板图像读取 (osascript)
- audio-capture-napi: 基于 SoX/arecord 的跨平台音频录制
- url-handler-napi: 完善函数签名(保持 null fallback)
- 修复 image-processor 类型兼容性问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 01:07:42 +08:00
claude-code-best
fac9341e73 feat: 全面清理类型错误 — tsc 零错误,any 标注全部消除
- 修复所有 33 个原始 tsc 编译错误(ink JSX 声明、类型不匹配、null check 等)
- 清理 176 处 `: any` 类型标注,全部替换为具体推断类型
- 修复清理过程中引入的 41 个回归错误
- 最终结果:0 tsc 错误,0 个非注释 any 标注
- Build 验证通过(25.75MB bundle)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 01:00:10 +08:00
claude-code-best
dd9cd782a7 feat: 问就是封包 2026-03-31 23:32:58 +08:00
claude-code-best
d7a729ca68 feat: 完成第二版类型清理 2026-03-31 23:03:47 +08:00