Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5878990
✨ feat(chat): 增强工具调用块,支持实时输出和状态指示
whatevertogo Apr 15, 2026
acc3f78
✨ feat(terminal): preserve tool call input and render grouped tool st…
whatevertogo Apr 15, 2026
7894f0e
feat: enhance prompt caching metrics and tool call handling
whatevertogo Apr 15, 2026
e103be8
✨ feat: 优化代码格式,简化导入和函数定义
whatevertogo Apr 15, 2026
d577944
✨ feat(regressions): 更新回归测试,修复已删除依赖并增强测试覆盖
whatevertogo Apr 15, 2026
c891e1b
✨ docs: 更新提交前验证步骤,增加前端代码格式化和检查要求
whatevertogo Apr 15, 2026
138f74f
✨ feat: 添加 Unix 信号发送功能,优化子进程管理
whatevertogo Apr 15, 2026
b35e05e
✨ feat(conversation): 收口工具调用权威读模型
whatevertogo Apr 16, 2026
91f441d
♻️ refactor(runtime): 收口能力语义并移除 debug workbench
whatevertogo Apr 16, 2026
13fa653
✨ feat(audit): 删除过时的 Core Crate 数据类型审查报告文档
whatevertogo Apr 16, 2026
e535422
✨ feat(compact): 升级 compact 流水线与会话可观测性
whatevertogo Apr 16, 2026
fcfacd1
♻️ refactor(protocol): 收口共享摘要 owner 并精简 session-runtime 查询边界
whatevertogo Apr 16, 2026
b3faf20
♻️ refactor(reconnect): 使用任务保护器简化重连任务管理
whatevertogo Apr 16, 2026
32415f5
♻️ refactor(tests): 使用 expect 方法增强错误信息,提升可读性和调试体验
whatevertogo Apr 16, 2026
c88b320
♻️ refactor(mod): 重建 CLI palette TUI 并拆分 anthropic provider
whatevertogo Apr 16, 2026
63ca55a
♻️ refactor(cli): 收敛 CLI 渲染缓存与输入交互
whatevertogo Apr 17, 2026
5c0ad3d
♻️ refactor(theme): 简化 HeroTitle 样式的实现
whatevertogo Apr 17, 2026
57703fb
♻️ refactor(conversation): 修改 apply_stream_envelope 方法以返回状态,优化状态管理
whatevertogo Apr 17, 2026
dced377
♻️ refactor(cli): 优化键盘导航逻辑,简化代码结构
whatevertogo Apr 17, 2026
a691e47
♻️ refactor(test): 提高测试上下文的 readFile 内联阈值至 1MB,优化持久化处理
whatevertogo Apr 17, 2026
6fad3ec
♻️ refactor(tool-results): 收口已持久化工具结果的读取与展示契约
whatevertogo Apr 17, 2026
d5f5093
♻️ refactor(tests): 优化持久化输出的格式,简化路径和字节信息的展示
whatevertogo Apr 17, 2026
6626370
♻️ refactor(transcript): 添加恢复尾部跟随模式的方法,优化手动滚动后的状态管理
whatevertogo Apr 17, 2026
6ad1ccf
cli
whatevertogo Apr 18, 2026
dfdc8df
feat: enhance text rendering and history management in CLI
whatevertogo Apr 18, 2026
89088ef
♻️ refactor(model): 移除事件日志和相关的 reducer 模块,简化模型结构
whatevertogo Apr 18, 2026
ea0b8f0
♻️ refactor(ui): 移除未使用的 palette_visible 函数和 app_background 方法,简化代码结构
whatevertogo Apr 18, 2026
07b1562
refactor: replace mailbox with input queue in session-runtime
whatevertogo Apr 18, 2026
c2c6fed
feat: 添加 Coding Agent 竞品对比与 Astrcode 下一步建议文档
whatevertogo Apr 18, 2026
864a5ac
✨ feat(session): 实现会话 fork 功能与 compact 摘要路由标识符脱敏
whatevertogo Apr 18, 2026
4cb511e
♻️ refactor(frontend): 更新 fork 功能的前端测试覆盖,确保历史对话正确切换到新 session
whatevertogo Apr 18, 2026
cad6b0a
✨ feat(session): 添加会话 fork 功能的详细规范与要求文档
whatevertogo Apr 18, 2026
c42eddf
♻️ refactor: 优化代码格式,调整导入和组件渲染的排版
whatevertogo Apr 18, 2026
031393a
feat: remove obsolete specifications and implement core collaboration…
whatevertogo Apr 18, 2026
20af2e1
feat(governance): implement unified governance surface cleanup
whatevertogo Apr 19, 2026
1da8d7c
✨ feat(governance): 实现声明式治理模式系统,替代硬编码协作指导
whatevertogo Apr 19, 2026
6d5bddf
✨ feat(notes): 添加工作流程草稿到设计文档
whatevertogo Apr 19, 2026
8d2835a
♻️ refactor(application,core): 移除未落地的 ContextStrategy 策略枚举,补充子域模块文档
whatevertogo Apr 19, 2026
65a5556
comments
whatevertogo Apr 19, 2026
d6190c0
✨ feat(tools): 允许工具访问工作区外的文件路径,增强灵活性
whatevertogo Apr 19, 2026
d68c483
✨ feat(plan-mode): 实现 session 计划工件系统,支持审批流程与自动模式切换
whatevertogo Apr 19, 2026
4f060a2
✨ feat(plan-mode): 完善 plan mode 显式切换、canonical plan 工件与审批归档
whatevertogo Apr 19, 2026
615724e
♻️ refactor(core,application,session-runtime): 类型统一上移、模块拆分与 compactio…
whatevertogo Apr 19, 2026
895809c
✨ feat(async-shell-terminal-sessions): 引入持久终端会话工具族,支持基于 process_id 的交…
whatevertogo Apr 19, 2026
9b1a021
docs
whatevertogo Apr 19, 2026
b17c133
✨ feat(execution-tasks): 引入执行期 task 快照系统与 prompt 缓存提示基础设施
whatevertogo Apr 19, 2026
758d021
♻️ refactor(adapter-storage,session-runtime): 提取 batch appender/check…
whatevertogo Apr 19, 2026
3c1109a
✨ feat(notes): 添加待办事项标题以增强文档结构
whatevertogo Apr 19, 2026
9481e24
🗑️ chore(docs): 删除 CompactSystem.md 文档
whatevertogo Apr 19, 2026
22bbd25
feat(eval): Introduce evaluation framework for structured assessment …
whatevertogo Apr 19, 2026
57ed386
feat: Enhance async tool execution and evaluation framework
whatevertogo Apr 19, 2026
2ea34a6
feat: add compact_tool_content_max_chars configuration and update com…
whatevertogo Apr 19, 2026
86a6a6f
fix: 修正 astrcode-adapter-tools 的依赖关系,更新依赖计数
whatevertogo Apr 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
554 changes: 0 additions & 554 deletions .codex/skills/openspec-onboard/SKILL.md

This file was deleted.

110 changes: 110 additions & 0 deletions .codex/skills/openspec-propose/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
name: openspec-propose
description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
license: MIT
compatibility: Requires openspec CLI.
metadata:
author: openspec
version: "1.0"
generatedBy: "1.3.0"
---

Propose a new change - create the change and generate all artifacts in one step.

I'll create a change with artifacts:
- proposal.md (what & why)
- design.md (how)
- tasks.md (implementation steps)

When ready to implement, run /opsx:apply

---

**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.

**Steps**

1. **If no clear input provided, ask what they want to build**

Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
> "What change do you want to work on? Describe what you want to build or fix."

From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).

**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.

2. **Create the change directory**
```bash
openspec new change "<name>"
```
This creates a scaffolded change at `openspec/changes/<name>/` with `.openspec.yaml`.

3. **Get the artifact build order**
```bash
openspec status --change "<name>" --json
```
Parse the JSON to get:
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
- `artifacts`: list of all artifacts with their status and dependencies

4. **Create artifacts in sequence until apply-ready**

Use the **TodoWrite tool** to track progress through the artifacts.

Loop through artifacts in dependency order (artifacts with no pending dependencies first):

a. **For each artifact that is `ready` (dependencies satisfied)**:
- Get instructions:
```bash
openspec instructions <artifact-id> --change "<name>" --json
```
- The instructions JSON includes:
- `context`: Project background (constraints for you - do NOT include in output)
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
- `template`: The structure to use for your output file
- `instruction`: Schema-specific guidance for this artifact type
- `outputPath`: Where to write the artifact
- `dependencies`: Completed artifacts to read for context
- Read any completed dependency files for context
- Create the artifact file using `template` as the structure
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
- Show brief progress: "Created <artifact-id>"

b. **Continue until all `applyRequires` artifacts are complete**
- After creating each artifact, re-run `openspec status --change "<name>" --json`
- Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
- Stop when all `applyRequires` artifacts are done

c. **If an artifact requires user input** (unclear context):
- Use **AskUserQuestion tool** to clarify
- Then continue with creation

5. **Show final status**
```bash
openspec status --change "<name>"
```

**Output**

After completing all artifacts, summarize:
- Change name and location
- List of artifacts created with brief descriptions
- What's ready: "All artifacts created! Ready for implementation."
- Prompt: "Run `/opsx:apply` or ask me to implement to start working on the tasks."

**Artifact Creation Guidelines**

- Follow the `instruction` field from `openspec instructions` for each artifact type
- The schema defines what each artifact should contain - follow it
- Read dependency artifacts for context before creating new ones
- Use `template` as the structure for your output file - fill in its sections
- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
- Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
- These guide what you write, but should never appear in the output

**Guardrails**
- Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
- Always read dependency artifacts before creating a new one
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
- If a change with that name already exists, ask if user wants to continue it or create a new one
- Verify each artifact file exists after writing before proceeding to next
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ coverage/

# AI
.kilo/
.claude/
.claude/
.worktrees/
16 changes: 3 additions & 13 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,18 @@ node scripts/check-crate-boundaries.mjs --strict # 严格模式

- `server` 是唯一组合根,通过 `bootstrap_server_runtime()` 组装所有组件
- `application` 不依赖任何 `adapter-*`,只依赖 `core` + `kernel` + `session-runtime`
- 治理层使用 `AppGovernance`(`astrcode-application`),不使用旧 `RuntimeGovernance`(`astrcode-runtime`)
- 能力语义统一使用 `CapabilitySpec`(`astrcode-core`),传输层使用 `CapabilityDescriptor`(`astrcode-protocol`)
- 治理层使用 `AppGovernance`(`astrcode-application`)
- 能力语义统一使用 `CapabilitySpec`(`astrcode-core`),传输层使用 `CapabilityWireDescriptor`(`astrcode-protocol`)

## 代码规范

- 用中文注释,且注释尽量表明为什么和做了什么
- 不需要向后兼容,优先良好架构,期望最佳实践而不是打补丁
- Git 提交信息使用 emoji + type + scope 风格(如 `✨ feat(module): brief description`)

## 提交前验证

每次提交前按顺序执行:

1. `cargo fmt --all` — 格式化代码
2. `cargo clippy --all-targets --all-features -- -D warnings` — 修复所有警告
3. `cargo test --workspace` — 确保所有测试通过
4. 确认变更内容后写出描述性提交信息

## Gotchas

- 前端css不允许出现webview相关内容这会导致应用端无法下滑窗口
- 文档必须使用中文
- 使用 `node scripts/check-crate-boundaries.mjs` 验证 crate 依赖规则没有被违反
- `src-tauri` 是 Tauri 薄壳,不含业务逻辑
- `server` 组合根在 `crates/server/src/bootstrap/runtime.rs`
- `server` 组合根在 `crates/server/src/bootstrap/runtime.rs`
46 changes: 10 additions & 36 deletions ASTRCODE_EXPLORATION_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
- **配置模型**:稳定的配置结构和解析逻辑
- **事件模型**:`AgentEvent`、`StorageEvent` 等领域事件

与之对应,`CapabilityWireDescriptor` 只存在于 `protocol/plugin` 边界,
用于插件握手和 wire 传输;它不是运行时内部的第二能力模型。

**设计亮点**:
- 完全不依赖其他 crate,保证领域模型的纯粹性
- 使用 `async-trait` 定义异步接口,支持依赖倒置
Expand Down Expand Up @@ -159,6 +162,12 @@ pub struct CapabilitySpec {
- 权限和副作用声明
- 稳定性标记

对应的 `CapabilityWireDescriptor` 只是协议载荷名称:

- 它在当前实现里复用 `CapabilitySpec` 的结构与校验
- 但职责上仍然只是 transport DTO
- 运行时内部的 prompt、router、policy、plugin supervisor 决策都应围绕 `CapabilitySpec`

### 2. 事件驱动架构

采用 **Event Sourcing** 模式:
Expand Down Expand Up @@ -271,41 +280,6 @@ pub enum LlmEvent {
- DeepSeek API
- 运行时模型切换

## 发现的问题和建议

### 1. 架构层面的优势

**优点**:
- ✅ 清晰的分层架构,职责分离明确
- ✅ 严格的依赖管理,防止架构腐烂
- ✅ 类型安全的领域建模
- ✅ 事件驱动架构,支持时间旅行
- ✅ 组合根模式,依赖关系清晰

### 2. 潜在的技术债务

**中等优先级**:
- ⚠️ `upstream_collaboration_context` 中的 parent_turn_id 回退可能使用过期值
- ⚠️ 一些模块仍然较大,可能需要进一步拆分
- ⚠️ 测试覆盖率有待提高

**低优先级**:
- ℹ️ 文档可以更加完善
- ℹ️ 某些错误处理可以更加精细

### 3. 设计决策的观察

**值得学习的设计**:
1. **无兼容层策略**:不维护向后兼容,优先良好架构
2. **组合根模式**:所有依赖在一个地方装配
3. **事件优先架构**:状态变更通过事件流表达
4. **能力统一模型**:所有扩展点通过能力系统表达

**可能的改进空间**:
1. **性能优化**:某些热点路径可以进一步优化
2. **错误恢复**:增强错误恢复和重试机制
3. **可观测性**:增加更详细的指标和追踪

## 项目规模评估

### 代码规模
Expand Down Expand Up @@ -357,4 +331,4 @@ Astrcode 是一个架构设计优秀的 AI 编程助手项目,展现了高水
- `README.md`:项目介绍和快速开始
- `CODE_REVIEW_ISSUES.md`:代码审查示例

这个项目展现了如何在实际项目中应用软件工程的最佳实践,是一个高质量的开源项目参考。
这个项目展现了如何在实际项目中应用软件工程的最佳实践,是一个高质量的开源项目参考。
14 changes: 2 additions & 12 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,17 @@ node scripts/check-crate-boundaries.mjs --strict # 严格模式
- `server` 是唯一组合根,通过 `bootstrap_server_runtime()` 组装所有组件
- `application` 不依赖任何 `adapter-*`,只依赖 `core` + `kernel` + `session-runtime`
- 治理层使用 `AppGovernance`(`astrcode-application`)
- 能力语义统一使用 `CapabilitySpec`(`astrcode-core`),传输层使用 `CapabilityDescriptor`(`astrcode-protocol`)
- 能力语义统一使用 `CapabilitySpec`(`astrcode-core`),传输层使用 `CapabilityWireDescriptor`(`astrcode-protocol`)

## 代码规范

- 用中文注释,且注释尽量表明为什么和做了什么
- 不需要向后兼容,优先良好架构,期望最佳实践而不是打补丁
- Git 提交信息使用 emoji + type + scope 风格(如 `✨ feat(module): brief description`)

## 提交前验证

每次提交前按顺序执行:

1. `cargo fmt --all` — 格式化代码
2. `cargo clippy --all-targets --all-features -- -D warnings` — 修复所有警告
3. `cargo test --workspace` — 确保所有测试通过
4. 确认变更内容后写出描述性提交信息

## Gotchas

- 前端css不允许出现webview相关内容这会导致应用端无法下滑窗口
- 文档必须使用中文
- 使用 `node scripts/check-crate-boundaries.mjs` 验证 crate 依赖规则没有被违反
- `src-tauri` 是 Tauri 薄壳,不含业务逻辑
- `server` 组合根在 `crates/server/src/bootstrap/runtime.rs`
- `server` 组合根在 `crates/server/src/bootstrap/runtime.rs`
Loading
Loading