Commit graph

27 commits

Author SHA1 Message Date
Shunsuke Hayashi
554b2f7f99 feat(core): implement Bash tool with sandboxing
- Add BashTool struct with timeout, working directory, and output truncation
- Implement dangerous command checking (rm -rf /, format, mkfs, etc.)
- Add tokio::select! for timeout handling
- Add create_standard_tool_registry() including BashTool
- Export BashTool and create_standard_tool_registry from lib.rs
- Add 5 tests for bash functionality

Closes #26

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:17:45 +09:00
Shunsuke Hayashi
277d0e4858 feat(core): implement token counting and context window management
Add token.rs with:
- TokenCounter for estimating token usage
- ModelLimits for Claude model configurations
- ContextManager for automatic context pruning
- TokenUsage and ContextUsage statistics
- Support for 200k context window
- Automatic oldest message pruning
- 10 unit tests

Closes #21

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:13:44 +09:00
Shunsuke Hayashi
04f7bc897e feat(tui): implement syntax highlighting for code blocks
Add syntax.rs with syntect integration:
- SyntaxHighlighter with configurable themes
- Support for Rust, Python, JavaScript, TypeScript, etc.
- Language alias normalization (js→JavaScript, py→Python)
- highlight_code() and render_code_block() helpers
- Global syntax/theme sets with lazy loading
- Fallback for unknown languages
- 10 unit tests

Dependencies added: syntect, once_cell

Closes #12

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:10:39 +09:00
Shunsuke Hayashi
29d1335c7e feat(core): implement file operation tools (Read, Write, Edit)
Add tools.rs with:
- ReadTool - Read files with offset/limit, line numbers
- WriteTool - Write files with auto directory creation
- EditTool - Replace text with replace_all option
- Security checks for path traversal
- Base directory configuration
- create_file_tool_registry() helper
- 10 unit tests with tempfile

Closes #25

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:07:51 +09:00
Shunsuke Hayashi
5aae11a0cb feat(core): implement conversation state and message history
Add conversation.rs with:
- Conversation struct with full state management
- ConversationMessage with timestamps and metadata
- ConversationMetadata (title, tags, model, tokens)
- ConversationManager for handling multiple conversations
- System prompt support
- Serialization/deserialization for persistence
- Truncate and clear functionality
- File save/load operations
- 14 unit tests

Closes #20

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:05:28 +09:00
Shunsuke Hayashi
9f869f93fa feat(tui): implement diff visualization with colors and indicators
Add diff_viewer.rs with enhanced diff display:
- DiffColors with GitHub-inspired color scheme (#2ea043, #f85149)
- DiffViewer widget with configurable options
- Line number columns (old/new)
- Gutter indicators (+/-)
- File headers with path display
- Multiple color schemes (default, minimal, high-contrast)
- Helper functions render_diff() and render_diff_minimal()
- 11 unit tests

Closes #16

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:03:27 +09:00
Shunsuke Hayashi
e24069ca79 feat(tui): implement incremental markdown parser with pulldown-cmark
Add markdown_parser.rs with:
- MarkdownParser with caching for efficient re-rendering
- pulldown-cmark integration with full options
- EventRenderer for converting markdown to styled Ratatui lines
- Support for headings, code blocks, lists, emphasis, links
- Blockquotes, horizontal rules, task lists
- Graceful handling of incomplete/malformed markdown
- 14 unit tests covering all features

Dependencies added: pulldown-cmark

Closes #11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 18:01:43 +09:00
Shunsuke Hayashi
4440302e3b feat(core): implement Tool trait and registry system
Add tool.rs with complete tool abstraction:
- Tool trait with async_trait for tool definitions
- ToolRegistry for managing and executing tools
- ParameterDef for declarative parameter schemas
- Automatic JSON schema generation
- Input validation before execution
- Integration with Anthropic tool format
- ToolOutput for structured results
- Comprehensive error types (NotFound, ValidationError, etc.)
- 12 unit tests covering registration, lookup, execution

Dependencies added: async-trait

Closes #24

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:58:31 +09:00
Shunsuke Hayashi
8d7a7a6099 feat(core): implement Anthropic API client with streaming
Add anthropic.rs with complete Claude API integration:
- AnthropicClient with builder pattern configuration
- Message types (Role, ContentBlock, Tool, etc.)
- Non-streaming message() method with retry logic
- Streaming message_stream() with SSE parsing
- Comprehensive error types (AuthError, RateLimited, ApiError)
- Exponential backoff for transient errors
- 8 unit tests for client and parsing

Dependencies added: reqwest (with stream), futures

Closes #19

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:56:33 +09:00
Shunsuke Hayashi
bed65b23b2 feat(tui): implement DiffRender for git diff parsing
Add diff_render.rs with complete unified diff parsing support:
- DiffLineType enum (Context, Addition, Deletion, HunkHeader, FileHeader)
- DiffLine, DiffHunk, FileDiff structs for structured representation
- DiffRender with parse() and render() methods
- Line number tracking for both old/new files
- Styled Ratatui Line output with syntax highlighting
- 5 comprehensive unit tests

Closes #15

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:53:44 +09:00
Shunsuke Hayashi
e096f5eea8 feat: Implement MarkdownStream core structure (#10)
- Add StreamState enum (Idle, Streaming, Complete)
- Add StreamBuffer for content accumulation
- Add MarkdownStream with state management
- Implement push_str() for streaming chunks
- Implement render() returning Ratatui Lines
- Add basic markdown styling (headers, code, lists)
- Add cursor indicator during streaming
- Add comprehensive unit tests (5 tests)

Closes #10

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:50:30 +09:00
Shunsuke Hayashi
00d5d4d4e9 chore: Initialize Miyabi project with full planning
- Add .claude/ configuration (agents, commands, prompts, templates)
- Add comprehensive documentation:
  - WBS.md - Work Breakdown Structure
  - SPRINT_PLANNING.md - 4-sprint detailed plan
  - OPERATION_PLAN.md - Execution procedures
  - PRODUCT_SPEC.md - Product requirements
  - PREPARATION_OPS.md - Pre-sprint checklist
- Add PlantUML diagrams (wbs-diagram, gantt-chart)
- Configure Miyabi (.miyabi.yml)
- Set up Rust workspace structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:45:08 +09:00
Shunsuke Hayashi
0eb74b7af1 chore: Add workflow weekly-report.yml 2025-11-22 17:07:21 +09:00
Shunsuke Hayashi
30f97a118b chore: Add workflow weekly-kpi-report.yml 2025-11-22 17:07:20 +09:00
Shunsuke Hayashi
4d3c1c4a9d chore: Add workflow webhook-handler.yml 2025-11-22 17:07:19 +09:00
Shunsuke Hayashi
0e3a7a2760 chore: Add workflow webhook-event-router.yml 2025-11-22 17:07:18 +09:00
Shunsuke Hayashi
b3832f3a64 chore: Add workflow update-project-status.yml 2025-11-22 17:07:17 +09:00
Shunsuke Hayashi
dbab13fe6c chore: Add workflow state-machine.yml 2025-11-22 17:07:17 +09:00
Shunsuke Hayashi
91b85e095b chore: Add workflow project-sync.yml 2025-11-22 17:07:16 +09:00
Shunsuke Hayashi
8d69c037d2 chore: Add workflow pr-opened.yml 2025-11-22 17:07:15 +09:00
Shunsuke Hayashi
3bd00f35f7 chore: Add workflow label-sync.yml 2025-11-22 17:07:14 +09:00
Shunsuke Hayashi
40d8824f1e chore: Add workflow issue-opened.yml 2025-11-22 17:07:13 +09:00
Shunsuke Hayashi
31fe696e5a chore: Add workflow economic-circuit-breaker.yml 2025-11-22 17:07:12 +09:00
Shunsuke Hayashi
f6312eb3c4 chore: Add workflow deploy-pages.yml 2025-11-22 17:07:11 +09:00
Shunsuke Hayashi
4b9ff6875a chore: Add workflow autonomous-agent.yml 2025-11-22 17:07:11 +09:00
Shunsuke Hayashi
582ca39084 chore: Add workflow auto-add-to-project.yml 2025-11-22 17:07:10 +09:00
Shunsuke Hayashi
23e56596c6
Initial commit 2025-11-22 17:06:52 +09:00