Commit Graph

115 Commits

Author SHA1 Message Date
starmen1265 2caddd792e feat(01-02): implement core pipeline schemas
- Add StepStatus enum (PENDING, RUNNING, COMPLETED, FAILED, SKIPPED)
- Add StepInput with content_id and platform validation
- Add StepOutput with success and error_message fields
- Add StepResult for step execution results
- Add StepRecord for step execution records
- Add WorkflowState with step management methods
- Add StepDefinition for step configuration
- Add pytest.ini for PYTHONPATH configuration
- TDD GREEN phase: all 28 tests pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 17:07:09 +08:00
starmen1265 85413bc1c6 test(01-02): add failing tests for core pipeline schemas
- Create kb_pipeline package structure
- Add test fixtures in conftest.py
- Add 28 test cases for StepInput, StepOutput, StepStatus, StepRecord, WorkflowState
- Add JSON serialization/deserialization tests
- TDD RED phase: tests fail because schemas.py not yet implemented

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 17:05:37 +08:00
starmen1265 bd40f4965b fix(01): correct depends_on format to use plan number
Change depends_on from [01-02] to ["02"] for consistency
with plan frontmatter format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:58:37 +08:00
starmen1265 4ccb2be1ad fix(01): align validation paths with plans
Update VALIDATION.md test file paths to use tests/test_pipeline/
instead of tests/unit/ to match PLAN.md definitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:54:27 +08:00
starmen1265 a14c429e90 docs(01): create phase 1 plans - State Manager, Schema Registry, Error Handler & Config 2026-03-13 16:50:46 +08:00
starmen1265 ac578bafd0 docs(01): add validation strategy
Add Nyquist validation contract for Phase 1 Foundation.
Covers test infrastructure, sampling rate, and per-task verification map.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:43:55 +08:00
starmen1265 c555b78d9b docs(01): research phase 1 domain - state, schema, error, config 2026-03-13 16:42:16 +08:00
starmen1265 2ee0a9e41d docs(state): record phase 1 context session 2026-03-13 16:35:37 +08:00
starmen1265 0c3f99a0e1 docs(01): capture phase 1 context 2026-03-13 16:35:25 +08:00
starmen1265 2ed555ccc2 docs: create roadmap (4 phases) 2026-03-13 16:06:47 +08:00
starmen1265 ab952f4c69 docs: define v1 requirements 2026-03-13 15:55:57 +08:00
starmen1265 408a02e615 docs: complete project research 2026-03-13 15:45:47 +08:00
starmen1265 431732179c chore: update project config 2026-03-13 15:35:05 +08:00
starmen1265 d8c1356307 docs: initialize project 2026-03-13 15:32:33 +08:00
starmen1265 a8669ec0a3 docs: map existing codebase 2026-03-13 14:55:43 +08:00
starmen1265 1d7957aab4 chore: remove dev-workflow skill and related GSD files
The dev-workflow multi-agent orchestration skill is no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:42:33 +08:00
starmen1265 ca54151b9a chore: add .venv to gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:42:33 +08:00
starmen1265 7711743ba5 Merge branch 'main' into fix/ci-deploy-reset
PR Test / lint (pull_request) Successful in 1s
2026-03-13 11:17:01 +08:00
starmen1265 cf7cbd2ad0 feat: kb-deep-analyzer 支持文章类型分析
PR Test / lint (pull_request) Successful in 2s
- 新增 --type article 参数
- 文章类型生成 300 字摘要 + 完整原文
- 视频类型保持原有时间轴分析逻辑
- 更新相关文档

🤖 Generated by AI
2026-03-13 11:12:34 +08:00
starmen1265 b8107b1d61 Merge pull request 'fix/ci-deploy-reset' (#7) 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/7
2026-03-11 19:15:44 +08:00
starmen1265 1824e5b1e8 Merge branch 'main' into fix/ci-deploy-reset
PR Test / lint (pull_request) Successful in 2s
2026-03-11 19:15:21 +08:00
starmen1265 faca5c9559 docs(phase-04): complete GSD integration phase execution
PR Test / lint (pull_request) Successful in 1s
2026-03-11 19:11:32 +08:00
starmen1265 a95f63fe93 docs(04-03): add self-check result to summary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 c42f85f3eb docs(04-03): complete long command support plan
- Create SUMMARY.md with execution results
- Update STATE.md with decisions and metrics
- Mark BRDG-06 requirement as complete
- Update ROADMAP.md with phase 4 completion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 b026096bfa feat(04-03): add new-project callback support to handle_callback
- Add new-project action handling in handle_callback
- Supports Create New Project button from error cards
- Updates user context when project is created via callback
- Add 4 new tests in TestHandleCallback for new-project action

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 774e450ee3 feat(04-03): add adaptive timeout to Orchestrator
- Add _is_long_command method to detect long-running commands
- Update handle_message to use adaptive timeout based on command type
- Long commands (execute-phase, plan-phase, etc.) use timeout=None
- Regular commands use DEFAULT_TIMEOUT (60 seconds)
- Add TestAdaptiveTimeout test class with 6 test cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 b817b457e9 feat(04-03): add long command detection to CommandExecutor
- Add LONG_COMMANDS set with execute-phase, plan-phase, discuss-phase, new-project
- Add _is_long_command method to detect long-running commands
- Add TestLongCommands test class with 5 test cases
- Long commands will use no timeout in execute()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 bc3984e6ee docs(04-02): complete special command handling plan
- Created 04-02-SUMMARY.md with TDD execution details
- Updated STATE.md with new decisions and position
- Updated ROADMAP.md with 04-02 completion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 d085752d36 docs(04-01): add self-check result to summary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 fb627f5ed7 docs(04-01): complete UserContextManager plan
- Add 04-01-SUMMARY.md with execution details and deviations
- Update STATE.md to reflect Phase 4 progress (1/3 plans complete)
- Update ROADMAP.md to mark 04-01 as complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 87068339df feat(04-02): use user context for project selection in generic commands
- Generic commands now use project from user context first
- Fall back to context param or default if no user context
- Add users_root parameter to Orchestrator for test isolation
- Update integration tests to use tmp_users_root fixture

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 3047605d14 feat(04-02): implement _handle_use_project with context tracking
- Add _handle_use_project method
- Update user context when switching projects
- Return error card with Create button for non-existent projects
- Route use command in handle_message

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 c61296a24e test(04-01): add comprehensive tests for UserContextManager
- Add TestUserContext: tests for UserContext dataclass (creation, to_dict, from_dict)
- Add TestUserContextManager: tests for manager initialization and load
- Add TestAtomicWrites: tests for atomic save with backup rotation
- Add TestMultiUser: tests for multi-user isolation and convenience methods
- Add tmp_users_root and user_context_manager fixtures to conftest.py
- Export UserContext and UserContextManager from __init__.py

Note: Implementation was already done in commit 9bd29a2 as part of 04-02 plan.
This commit adds the tests that should have been part of 04-01 TDD workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 e19b7e95f4 test(04-02): add failing tests for /gsd:use command handling
- Test _handle_use_project updates user context
- Test success card when project exists
- Test error card with Create button when project doesn't exist
- Test handle_message routes use command
- Test empty project name returns error
- Test subsequent commands use project from user context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 9e8fc81469 feat(04-02): implement _handle_new_project with UserContextManager
- Add UserContextManager for per-user project tracking
- Add _handle_new_project method that pre-creates sessions
- Update user context after new-project creation
- Route new-project command in handle_message
- Add LONG_COMMANDS class attribute for timeout control

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 acc52fbd8c test(04-02): add failing tests for special command handling
- Test Orchestrator initializes with UserContextManager
- Test _handle_new_project creates session before executing
- Test _handle_new_project updates user context
- Test _handle_new_project executes command in session
- Test _handle_new_project returns success card
- Test handle_message routes new-project command
- Test empty project name returns error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:11:32 +08:00
starmen1265 25ab3315da docs(04-gsd-integration): create phase 4 plans for GSD command bridging 2026-03-11 19:11:32 +08:00
starmen1265 caf205819f docs(04): add validation strategy 2026-03-11 19:11:32 +08:00
starmen1265 e001f5b04a docs(phase-04): research GSD integration phase domain 2026-03-11 19:11:32 +08:00
starmen1265 d7696a3742 docs(state): record phase 4 context session 2026-03-11 19:11:32 +08:00
starmen1265 52a78cfb98 docs(04): capture phase context 2026-03-11 19:11:32 +08:00
starmen1265 bbeae78b59 docs(phase-03): complete phase execution 2026-03-11 19:11:32 +08:00
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