Commit Graph

72 Commits

Author SHA1 Message Date
starmen1265 50bbaf43b8 docs(03-03): complete orchestrator plan
- Orchestrator class integrates all Phase 3 components
- handle_message() provides complete command routing flow
- Auto-session-creation works per CONTEXT.md decision
- Error handling returns formatted error cards
- Approval workflow integrates with callback handling
- All exports added to __init__.py
- SKILL.md documents orchestrator integration
- 18 tests with full coverage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 31823ba582 feat(03-03): update SKILL.md and exports
- Add Orchestrator to __init__.py exports
- Update SKILL.md with "How It Works" section explaining orchestrator.py entry point
- Document command routing and approval workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 6d9bd902ea feat(03-03): implement Orchestrator class
- Add Orchestrator class with handle_message() and handle_callback() entry points
- Command parsing via regex: /gsd:* pattern extraction
- Auto-session-creation per CONTEXT.md decision
- Error handling with try/except returning format_error() cards
- Approval detection integration with ApprovalHandler
- Output truncation to 2000 chars for Feishu card limits
- 18 tests passing with full coverage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 086be891b9 test(03-03): add failing tests for orchestrator
- Test orchestrator initialization with dependencies
- Test command parsing for /gsd:* pattern extraction
- Test handle_message routing (session creation, command execution, error handling)
- Test handle_callback routing for approval workflow
- Add integration-style tests for full flows

18 tests total covering all orchestrator functionality.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 9cd8ccb2e5 docs(03-02): complete approval handler and progress monitor plan
- Created 03-02-SUMMARY.md with:
  - Approval workflow with confirm/reject card buttons
  - Progress monitoring with 60-second throttled updates
  - 15 tests across approval and progress modules
- Updated STATE.md with decisions and metrics
- Updated ROADMAP.md with plan progress
- Marked BRDG-04, BRDG-05 requirements complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:31 +08:00
starmen1265 48222d28df feat(03-02): export ApprovalHandler and ProgressMonitor from package
Add exports for:
- ApprovalHandler, ApprovalState
- ProgressMonitor, ProgressInfo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:31 +08:00
starmen1265 16ddc3edaa feat(03-02): implement ProgressMonitor class
- Add ProgressInfo dataclass for progress data
- Add ProgressMonitor class with:
  - PROGRESS_PATTERNS for extraction (percentage, fraction, phase, completion)
  - extract_progress() to find progress indicators in output
  - should_send_update() with 60 second throttling
  - create_progress_card() for Feishu card formatting
- Fix fraction pattern to allow content after fraction (e.g., [3/5 tasks])
- Fix should_send_update() to return False on first call
- Fix test assertions to use kwargs instead of positional args

All 7 tests pass for progress monitoring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:31 +08:00
starmen1265 ddd0477498 feat(03-02): implement ApprovalHandler class
- Add ApprovalState dataclass for approval workflow state
- Add ApprovalHandler class with:
  - APPROVAL_PATTERNS for detection (AskUserQuestion, ExitPlanMode, 需要确认, Please confirm)
  - detect_approval_request() to find approval requests in output
  - create_approval_card() with confirm/reject buttons using CardButton
  - handle_callback() to process approval actions
  - In-memory pending_approvals cache
- Fix test assertions to use kwargs instead of positional args

All 8 tests pass for approval handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:31 +08:00
starmen1265 efd4892f2f test(03-02): add failing tests for approval handler and progress monitor
- Add test_approval_handler.py with 8 tests for:
  - Approval request detection (AskUserQuestion, 需要确认)
  - Approval card creation with confirm/reject buttons
  - Callback handling (approved, rejected, error)
- Add test_progress_monitor.py with 7 tests for:
  - Progress extraction (percentage, fraction, phase)
  - Update throttling (60 second interval)
  - Progress card formatting

TDD RED phase - tests will fail until implementation is complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:31 +08:00
starmen1265 d86d4113a6 docs(03-01): complete command executor plan 2026-03-11 19:11:31 +08:00
starmen1265 ff0846c820 feat(03-01): export CommandExecutor classes from package
Add CommandResult, OutputCapture, and CommandExecutor to __init__.py
exports for public API access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:31 +08:00
starmen1265 40cc92ec6e feat(03-01): implement CommandExecutor and OutputCapture classes
- Add CommandResult dataclass for storing execution results
- Add OutputCapture class with prompt detection and stabilization
- Add CommandExecutor class for command execution and error detection
- Support common shell prompts ($, ❯, ➜, >)
- Detect errors in both English and Chinese
- Use 60s default timeout from CONTEXT.md decision
- Mock-based testing (no real tmux required)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:31 +08:00
starmen1265 6f18550906 test(03-01): add failing tests for command executor
- Test OutputCapture._is_prompt for prompt pattern detection
- Test OutputCapture.capture_until_complete for output capture
- Test CommandExecutor._detect_errors for error keyword detection
- Test CommandExecutor.execute for full command execution flow
- Test CommandResult dataclass for result storage
- Test CommandExecutor.send_command for pane interaction

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:31 +08:00
starmen1265 cb4e1c48a7 docs(03-orchestration): create phase 3 plans 2026-03-11 19:11:31 +08:00
starmen1265 409bfbe5b5 docs(03): add research and validation strategy 2026-03-11 19:11:31 +08:00
starmen1265 7853152ace docs(03): research orchestration phase domain 2026-03-11 19:11:31 +08:00
starmen1265 6086b2cac7 docs(state): record phase 3 context session 2026-03-11 19:11:31 +08:00
starmen1265 c80cc81eb8 docs(03): capture phase context 2026-03-11 19:11:31 +08:00
starmen1265 330215a163 Merge branch 'main' into fix/ci-deploy-reset
PR Test / lint (pull_request) Successful in 1s
2026-03-11 14:32:09 +08:00
starmen1265 2d0964ed98 chore: update project config and gitignore
PR Test / lint (pull_request) Successful in 2s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 e357d81dc8 docs(phase-02): complete Integration Layer phase 2026-03-11 14:30:54 +08:00
starmen1265 bab3ed783c docs(02-02): complete FeishuResponseFormatter plan
- Created 02-02-SUMMARY.md with plan execution details
- Updated STATE.md with Phase 2 decisions
- Updated ROADMAP.md with Phase 2 completion
- All 6 tests pass for FeishuResponseFormatter

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 1b9d0c4c31 docs(02-01): complete SKILL.md definition plan
- Created SUMMARY.md with plan execution results
- Updated STATE.md with 02-01 decision
- Marked OCLW-01, OCLW-04 requirements complete
- ROADMAP.md already reflects Phase 2 completion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 b974540690 docs(02-03): complete prompt templates plan
- SUMMARY.md: Execution summary with 3 tasks completed
- STATE.md: Updated to Phase 2, plan 3/3 complete
- REQUIREMENTS.md: OCLW-02 marked complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 0a6d6277b6 feat(02-01): create SKILL.md with valid frontmatter
- YAML frontmatter with name: gsd-openclaw
- Description contains /gsd:* trigger patterns
- Documents all supported GSD commands
- Explains project context switching

Requirements: OCLW-01, OCLW-02

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 9d738eeec2 feat(02-03): implement PromptLoader class
- PromptLoader loads and renders markdown templates
- get() returns raw template content (cached)
- render() substitutes {{variable}} placeholders
- Missing variables left as-is (safe substitution)
- Default template_dir points to prompts/ directory

All 10 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 662ee48533 feat(02-02): implement FeishuResponseFormatter class
- format_success() creates card with green theme
- format_error() creates card with red theme
- format_info() creates card with blue theme
- format_paginated() adds [N/M] marker
- _build_card() creates three-zone structure (header/elements/actions)
- _build_actions() creates interactive button elements

All 6 tests pass. Card JSON uses schema 2.0 with lark_md content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 72a5ad4441 test(02-01): add failing tests for SKILL.md validation
- Test SKILL.md file exists at skill/SKILL.md
- Test SKILL.md has valid YAML frontmatter
- Test SKILL.md has name field
- Test SKILL.md has description field
- Test description contains /gsd: trigger pattern

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 915e97ffe1 feat(02-03): add prompt template files
- prompts/__init__.py: Package marker
- context_recovery.md: Session context recovery prompt
- command_mapping.md: User input to GSD command mapping
- error_recovery.md: User-friendly error message generation

All templates use {{variable}} syntax for substitution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 a155d93dd8 feat(02-02): add CardTheme enum and CardButton dataclass
- CardTheme enum with SUCCESS (green), ERROR (red), INFO (blue), WARNING (orange)
- CardButton dataclass with text, value dict, and button_type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 65f6f90c11 test(02-02): add failing tests for FeishuResponseFormatter
- Test format_success returns valid card with green theme
- Test format_error returns red theme
- Test format_info returns blue theme
- Test format with buttons includes actions element
- Test format_paginated adds [N/M] marker
- Test card has required structure (schema 2.0, config, elements)

TDD RED phase - tests will fail until implementation is added.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 4113434c72 test(02-03): add failing tests for prompt templates
- TestPromptTemplatesExist: 4 tests for template file existence
- TestPromptLoader: 6 tests for loading and rendering templates
- Tests fail (RED phase) - no templates or loader implemented yet

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:30:54 +08:00
starmen1265 637240c546 docs(02): create phase 2 integration layer plans 2026-03-11 14:30:54 +08:00
starmen1265 0ab884bc2a docs(02): add research and validation strategy 2026-03-11 14:30:54 +08:00
starmen1265 6c9aa54eda docs(02): research integration layer domain 2026-03-11 14:30:54 +08:00
starmen1265 55dee6ef16 docs(state): record phase 2 context session 2026-03-11 14:30:54 +08:00
starmen1265 86e6eabc1c docs(02): capture phase context 2026-03-11 14:30:54 +08:00
starmen1265 7287f29d03 Merge pull request 'ci: 添加 gsd-openclaw 到 deploy.yml 同步列表' (#5) from fix/ci-deploy-reset into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/5
2026-03-11 11:40:51 +08:00
starmen1265 446dcd21c4 Merge branch 'main' into fix/ci-deploy-reset
PR Test / lint (pull_request) Successful in 1s
2026-03-11 11:40:21 +08:00
starmen1265 407d8d46f0 ci: 添加 gsd-openclaw 到 deploy.yml 同步列表
PR Test / lint (pull_request) Successful in 1s
2026-03-11 11:36:18 +08:00
starmen1265 2362b00b44 Merge pull request 'feat: 添加 gsd-openclaw 技能' (#4) from fix/ci-deploy-reset into main
Deploy kb-skills / deploy (push) Successful in 2s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/4
2026-03-11 11:32:39 +08:00
starmen1265 45434668b9 Merge branch 'main' into fix/ci-deploy-reset
PR Test / lint (pull_request) Successful in 2s
2026-03-11 11:31:58 +08:00
starmen1265 96f06f3751 feat: 添加 gsd-openclaw 技能
PR Test / lint (pull_request) Successful in 2s
2026-03-11 10:41:01 +08:00
starmen1265 302b253ee5 Merge pull request 'fix: 修复知乎专栏文章爬取问题' (#3) from fix/ci-deploy-reset into main
Deploy kb-skills / deploy (push) Successful in 2s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/3
2026-03-09 23:19:13 +08:00
starmen1265 3909bb0321 fix: 修复知乎专栏文章爬取问题
PR Test / lint (pull_request) Successful in 1s
- zhihu_content.py 添加 zhuanlan/article 类型支持
- 内部自动调用 zhihu_article_crawler.py 爬取新数据
- 更新 SKILL.md 文档,明确知乎专栏处理流程
- 解决读取旧数据导致分析错误内容的问题
2026-03-09 23:15:59 +08:00
starmen1265 66cdbfcedb Merge pull request 'fix/ci-deploy-reset' (#2) from fix/ci-deploy-reset into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/2
2026-03-09 23:05:51 +08:00
starmen1265 b36d8575d4 refactor: 部署到全局技能目录 ~/.openclaw/skills
PR Test / lint (pull_request) Successful in 1s
- 改用 rsync 同步技能到全局目录
- 支持多代理共享技能
- 使用 --delete 保持同步干净
2026-03-09 23:03:35 +08:00
starmen1265 c6cf5a6351 fix: 使用 reset --hard 避免 CI 部署时未跟踪文件冲突 2026-03-09 22:56:28 +08:00
starmen1265 fd7d1aafb1 Merge pull request 'feature/cross-stats-test' (#1) from feature/cross-stats-test into main
Deploy to knowledge-base / deploy (push) Failing after 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/1
2026-03-09 22:28:24 +08:00
starmen1265 e3575accc0 feat(dev-workflow): Phase 11 - 集成测试 + v1.0 完成
PR Test / lint (pull_request) Successful in 2s
测试:
- test_dev_workflow.py - 10个单元测试全部通过
- quick_test.sh - 快速验证脚本
- INTEGRATION_TEST.md - 集成测试指南

文档:
- 更新 README.md 添加 dev-workflow 技能
- 更新 ROADMAP.md 标记所有阶段完成
- 更新 STATE.md 标记里程碑完成

v1.0 功能:
- 9阶段多代理协作开发流程
- 状态持久化和跨会话恢复
- 有限自动修复(最多3次)
- 每阶段进度汇报
- 支持通用项目和kb-skills开发
2026-03-09 19:08:38 +08:00