@nomad-e/bluma-cli 0.1.31 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +370 -54
- package/dist/config/native_tools.json +1 -1
- package/dist/main.js +559 -127
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -418,36 +418,109 @@ Here's BluMa in action:
|
|
|
418
418
|
---
|
|
419
419
|
|
|
420
420
|
## <a name="project-structure"></a>Project Structure
|
|
421
|
+
|
|
421
422
|
```
|
|
422
423
|
bluma-cli/
|
|
423
|
-
├── package.json # npm
|
|
424
|
-
├── tsconfig.json # TypeScript
|
|
424
|
+
├── package.json # npm project config & dependencies
|
|
425
|
+
├── tsconfig.json # TypeScript configuration
|
|
426
|
+
├── babel.config.cjs # Babel presets for Jest/ESBuild
|
|
427
|
+
├── jest.config.cjs # Jest test configuration
|
|
425
428
|
├── scripts/
|
|
426
429
|
│ └── build.js # Build script using esbuild
|
|
427
430
|
├── src/
|
|
428
|
-
│ ├── main.
|
|
429
|
-
│
|
|
430
|
-
│
|
|
431
|
-
│
|
|
432
|
-
│
|
|
433
|
-
│
|
|
434
|
-
│
|
|
435
|
-
│
|
|
436
|
-
│
|
|
437
|
-
│
|
|
438
|
-
│
|
|
439
|
-
│
|
|
440
|
-
│ │
|
|
441
|
-
│ │ │
|
|
442
|
-
│ │
|
|
443
|
-
│
|
|
444
|
-
│
|
|
445
|
-
├──
|
|
431
|
+
│ ├── main.ts # Entry point (CLI bootstrap & agent mode)
|
|
432
|
+
│ └── app/
|
|
433
|
+
│ ├── agent/ # Agent core & orchestration
|
|
434
|
+
│ │ ├── agent.ts # Main orchestrator (RouteManager integration)
|
|
435
|
+
│ │ ├── routeManager.ts # Route registration & dispatch
|
|
436
|
+
│ │ ├── bluma/
|
|
437
|
+
│ │ │ └── core/
|
|
438
|
+
│ │ │ └── bluma.ts # Core agent loop & state management
|
|
439
|
+
│ │ ├── config/
|
|
440
|
+
│ │ │ ├── native_tools.json # Native tool definitions
|
|
441
|
+
│ │ │ └── skills/ # Built-in skills (git-commit, git-pr, pdf, xlsx, skill-creator)
|
|
442
|
+
│ │ ├── core/
|
|
443
|
+
│ │ │ ├── context-api/ # Context management & token counting
|
|
444
|
+
│ │ │ │ ├── context_manager.ts
|
|
445
|
+
│ │ │ │ ├── history_anchor.ts
|
|
446
|
+
│ │ │ │ └── token_counter.ts
|
|
447
|
+
│ │ │ ├── llm/ # LLM client (FactorRouter/OpenAI SDK)
|
|
448
|
+
│ │ │ │ ├── llm.ts
|
|
449
|
+
│ │ │ │ └── tool_call_normalizer.ts
|
|
450
|
+
│ │ │ └── prompt/ # System prompt builder
|
|
451
|
+
│ │ │ └── prompt_builder.ts
|
|
452
|
+
│ │ ├── feedback/
|
|
453
|
+
│ │ │ └── feedback_system.ts # Smart feedback & suggestions
|
|
454
|
+
│ │ ├── session_manager/
|
|
455
|
+
│ │ │ └── session_manager.ts # Session persistence & history
|
|
456
|
+
│ │ ├── skills/
|
|
457
|
+
│ │ │ └── skill_loader.ts # Pluggable skill system
|
|
458
|
+
│ │ ├── subagents/ # Sub-agent implementations
|
|
459
|
+
│ │ │ ├── registry.ts # Sub-agent registration & lookup
|
|
460
|
+
│ │ │ ├── types.ts
|
|
461
|
+
│ │ │ ├── base_llm_subagent.ts
|
|
462
|
+
│ │ │ └── init/ # Init subagent (environment setup)
|
|
463
|
+
│ │ │ ├── init_subagent.ts
|
|
464
|
+
│ │ │ ├── init_system_prompt.ts
|
|
465
|
+
│ │ │ └── contracts.ts
|
|
466
|
+
│ │ ├── tools/
|
|
467
|
+
│ │ │ ├── mcp/
|
|
468
|
+
│ │ │ │ └── mcp_client.ts # MCP SDK integration
|
|
469
|
+
│ │ │ └── natives/ # Native tools (20+ tools)
|
|
470
|
+
│ │ │ ├── shell_command.ts
|
|
471
|
+
│ │ │ ├── edit.ts
|
|
472
|
+
│ │ │ ├── readLines.ts
|
|
473
|
+
│ │ │ ├── ls.ts
|
|
474
|
+
│ │ │ ├── grep_search.ts
|
|
475
|
+
│ │ │ ├── find_by_name.ts
|
|
476
|
+
│ │ │ ├── coding_memory.ts
|
|
477
|
+
│ │ │ ├── load_skill.ts
|
|
478
|
+
│ │ │ ├── message.ts
|
|
479
|
+
│ │ │ ├── todo.ts
|
|
480
|
+
│ │ │ ├── task_boundary.ts
|
|
481
|
+
│ │ │ └── ... (10 more)
|
|
482
|
+
│ │ ├── types/
|
|
483
|
+
│ │ │ └── index.ts # TypeScript type definitions
|
|
484
|
+
│ │ └── utils/
|
|
485
|
+
│ │ └── update_check.ts # Version update notifications
|
|
486
|
+
│ └── ui/ # Ink/React CLI interface
|
|
487
|
+
│ ├── App.tsx # Main React component
|
|
488
|
+
│ ├── layout.tsx # UI layout components
|
|
489
|
+
│ ├── components/ # Reusable UI components (20+)
|
|
490
|
+
│ │ ├── MarkdownRenderer.tsx
|
|
491
|
+
│ │ ├── ToolCallDisplay.tsx
|
|
492
|
+
│ │ ├── ToolResultCard.tsx
|
|
493
|
+
│ │ ├── InputPrompt.tsx
|
|
494
|
+
│ │ ├── ConfirmationPrompt.tsx
|
|
495
|
+
│ │ ├── SessionStats.tsx
|
|
496
|
+
│ │ └── ... (15 more)
|
|
497
|
+
│ ├── hooks/
|
|
498
|
+
│ │ └── useAtCompletion.ts # Autocomplete hook
|
|
499
|
+
│ ├── theme/
|
|
500
|
+
│ │ ├── blumaTerminal.ts
|
|
501
|
+
│ │ └── m3Layout.tsx
|
|
502
|
+
│ ├── utils/
|
|
503
|
+
│ │ ├── slashRegistry.ts
|
|
504
|
+
│ │ ├── terminalTitle.ts
|
|
505
|
+
│ │ └── ... (4 more)
|
|
506
|
+
│ └── Asci/
|
|
507
|
+
│ └── AsciiArt.ts
|
|
508
|
+
├── tests/ # Test suite (Jest 30)
|
|
509
|
+
│ ├── *.spec.ts # Unit & integration tests
|
|
510
|
+
│ └── *.spec.tsx # UI component tests
|
|
446
511
|
├── artifacts/ # Generated deliverables (runtime)
|
|
447
|
-
└──
|
|
448
|
-
├──
|
|
449
|
-
|
|
512
|
+
└── docs/ # Documentation
|
|
513
|
+
├── SKILLS.md # Skills system documentation
|
|
514
|
+
├── FACTOR_ROUTER_TURNS.md # FactorRouter integration details
|
|
515
|
+
└── assets/
|
|
516
|
+
└── bluma.png # Project logo
|
|
450
517
|
```
|
|
518
|
+
|
|
519
|
+
**Runtime directories** (created on first run):
|
|
520
|
+
- `~/.bluma/sessions/` — Persistent session history
|
|
521
|
+
- `~/.bluma/coding_memory.json` — Long-term coding notes
|
|
522
|
+
- `~/.bluma/skills/` — User-installed skills
|
|
523
|
+
- `~/.bluma/.env` — Optional local environment overrides
|
|
451
524
|
---
|
|
452
525
|
|
|
453
526
|
## <a name="development-and-build"></a>Development and Build
|
|
@@ -467,24 +540,95 @@ npm run dev # (If configured, hot-reload/TS watch)
|
|
|
467
540
|
|
|
468
541
|
## <a name="extensibility-tools-and-plugins"></a>Extensibility: Tools, Skills and Plugins
|
|
469
542
|
|
|
470
|
-
### Native Tools
|
|
471
|
-
|
|
543
|
+
### Native Tools (20+ Built-in)
|
|
544
|
+
|
|
545
|
+
BluMa ships with a comprehensive set of native tools for software engineering tasks:
|
|
546
|
+
|
|
547
|
+
**File Operations:**
|
|
548
|
+
- `edit_tool` — Precise text replacement with context-aware editing
|
|
549
|
+
- `read_file_lines` — Read specific line ranges from files
|
|
550
|
+
- `ls_tool` — List directory contents with filtering & pagination
|
|
551
|
+
- `count_file_lines` — Count total lines in a file
|
|
552
|
+
- `view_file_outline` — Show code structure (classes, functions, methods)
|
|
553
|
+
- `find_by_name` — Search files by name using glob patterns
|
|
554
|
+
|
|
555
|
+
**Code Intelligence:**
|
|
556
|
+
- `grep_search` — Search text patterns with regex support
|
|
557
|
+
- `coding_memory` — Persistent notes about codebase & decisions
|
|
558
|
+
|
|
559
|
+
**Shell & Process:**
|
|
560
|
+
- `shell_command` — Execute shell commands (background async)
|
|
561
|
+
- `command_status` — Check command progress & retrieve output
|
|
562
|
+
- `send_command_input` — Send stdin to running commands
|
|
563
|
+
- `kill_command` — Terminate running processes
|
|
564
|
+
|
|
565
|
+
**Agent Workflow:**
|
|
566
|
+
- `message` — Send messages to user (info or result)
|
|
567
|
+
- `todo` — Manage task lists with completion tracking
|
|
568
|
+
- `task_boundary` — Mark task phases (PLANNING, EXECUTION, VERIFICATION)
|
|
569
|
+
- `load_skill` — Load specialized knowledge modules
|
|
570
|
+
|
|
571
|
+
**UI & Navigation:**
|
|
572
|
+
- All tools render rich Ink/React components in the terminal
|
|
573
|
+
|
|
574
|
+
To add custom native tools, create a new file in `src/app/agent/tools/natives/` following the existing pattern.
|
|
575
|
+
|
|
576
|
+
### Skills System (Pluggable Expertise)
|
|
472
577
|
|
|
473
|
-
### Skills System
|
|
474
578
|
BluMa features a **pluggable skills system** that loads domain-specific knowledge modules:
|
|
475
579
|
|
|
476
|
-
- Skills
|
|
477
|
-
-
|
|
478
|
-
-
|
|
479
|
-
-
|
|
580
|
+
**Built-in Skills:**
|
|
581
|
+
- `git-commit` — Professional Git commit workflows with Conventional Commits
|
|
582
|
+
- `git-pr` — Pull request creation, commit validation, and merge preparation
|
|
583
|
+
- `pdf` — PDF creation, manipulation, text extraction, merging, OCR
|
|
584
|
+
- `xlsx` — Excel spreadsheet manipulation, formulas, data cleaning
|
|
585
|
+
- `skill-creator` — Template and workflow for creating new skills
|
|
586
|
+
|
|
587
|
+
**Skill Structure:**
|
|
588
|
+
```
|
|
589
|
+
skills/
|
|
590
|
+
└── git-commit/
|
|
591
|
+
├── SKILL.md # Main workflow & instructions
|
|
592
|
+
├── LICENSE.txt # License terms
|
|
593
|
+
├── references/
|
|
594
|
+
│ └── REFERENCE.md # Additional documentation
|
|
595
|
+
└── scripts/
|
|
596
|
+
└── validate_commit_msg.py # Executable helper
|
|
597
|
+
```
|
|
480
598
|
|
|
481
|
-
|
|
599
|
+
**How Skills Work:**
|
|
600
|
+
1. Skills are stored in `src/app/agent/config/skills/` (built-in) or `~/.bluma/skills/` (user)
|
|
601
|
+
2. Each skill includes a `SKILL.md` with YAML frontmatter defining:
|
|
602
|
+
- `name`, `description`, `version`
|
|
603
|
+
- `depends_on` (other skills for delegation)
|
|
604
|
+
- `tools.required` and `tools.recommended`
|
|
605
|
+
3. Load a skill with: `load_skill({ skill_name: "git-commit" })`
|
|
606
|
+
4. Skill body provides workflows, examples, and decision trees
|
|
607
|
+
5. Skills can include `references/` (extra docs) and `scripts/` (Python helpers)
|
|
608
|
+
|
|
609
|
+
**Creating Custom Skills:**
|
|
610
|
+
Use the `skill-creator` skill to generate new skill templates. Skills are ideal for:
|
|
611
|
+
- Encoding domain-specific workflows (testing, deployment, frameworks)
|
|
612
|
+
- Packaging best practices and conventions
|
|
613
|
+
- Providing reusable scripts and reference documentation
|
|
482
614
|
|
|
483
615
|
### MCP Integration
|
|
484
|
-
|
|
616
|
+
|
|
617
|
+
BluMa integrates with the **Model Context Protocol (MCP)** SDK for:
|
|
618
|
+
- Connecting to external MCP servers
|
|
619
|
+
- Discovering and invoking remote tools
|
|
620
|
+
- Streaming tool results in real-time
|
|
621
|
+
|
|
622
|
+
MCP client is located at `src/app/agent/tools/mcp/mcp_client.ts`.
|
|
485
623
|
|
|
486
624
|
### Custom UI Components
|
|
487
|
-
|
|
625
|
+
|
|
626
|
+
Extend the interface by creating custom Ink components in `src/app/ui/components/`. The UI layer supports:
|
|
627
|
+
- React 18 with hooks
|
|
628
|
+
- Custom renderers for tool calls and results
|
|
629
|
+
- Streaming text and typewriter effects
|
|
630
|
+
- Progress bars, spinners, and notifications
|
|
631
|
+
- Markdown rendering with syntax highlighting
|
|
488
632
|
|
|
489
633
|
---
|
|
490
634
|
|
|
@@ -593,19 +737,74 @@ Enjoy, hack, and—if possible—contribute!
|
|
|
593
737
|
---
|
|
594
738
|
|
|
595
739
|
## 🏗 Architecture Diagram
|
|
596
|
-
|
|
740
|
+
|
|
741
|
+
BluMa's architecture is organized in **three layers**: UI, Agent Orchestration, and Core Services.
|
|
742
|
+
|
|
743
|
+
### High-Level Overview
|
|
597
744
|
```
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
745
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
746
|
+
│ UI Layer (Ink/React) │
|
|
747
|
+
│ main.ts → App.tsx → Components (20+) → Layout → Theme │
|
|
748
|
+
└─────────────────────────────────────────────────────────────┘
|
|
749
|
+
↓
|
|
750
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
751
|
+
│ Agent Orchestration Layer │
|
|
752
|
+
│ agent.ts → RouteManager → BluMaAgent (bluma.ts) │
|
|
753
|
+
│ ↓ │
|
|
754
|
+
│ SubAgents Registry | Feedback System | Session Manager │
|
|
755
|
+
└─────────────────────────────────────────────────────────────┘
|
|
756
|
+
↓
|
|
757
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
758
|
+
│ Core Services Layer │
|
|
759
|
+
│ ┌──────────────┬──────────────┬──────────────┐ │
|
|
760
|
+
│ │ Context API │ LLM Client │ Prompt Bld │ │
|
|
761
|
+
│ │ (context │ (Factor │ (system │ │
|
|
762
|
+
│ │ manager) │ Router) │ prompts) │ │
|
|
763
|
+
│ └──────────────┴──────────────┴──────────────┘ │
|
|
764
|
+
│ ┌──────────────┬──────────────┬──────────────┐ │
|
|
765
|
+
│ │ MCP Client │ Native Tools │ Skills │ │
|
|
766
|
+
│ │ (external │ (20+ tools) │ (pluggable) │ │
|
|
767
|
+
│ │ plugins) │ │ │ │
|
|
768
|
+
│ └──────────────┴──────────────┴──────────────┘ │
|
|
769
|
+
└─────────────────────────────────────────────────────────────┘
|
|
770
|
+
↓
|
|
771
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
772
|
+
│ External Integrations │
|
|
773
|
+
│ FactorRouter API | File System | Shell | MCP Servers │
|
|
774
|
+
└─────────────────────────────────────────────────────────────┘
|
|
607
775
|
```
|
|
608
|
-
|
|
776
|
+
|
|
777
|
+
### Key Architectural Concepts
|
|
778
|
+
|
|
779
|
+
**1. RouteManager Pattern**
|
|
780
|
+
- Central dispatch mechanism for command routing
|
|
781
|
+
- Registers custom route handlers (e.g., `/init`, `/status`)
|
|
782
|
+
- Falls back to core agent loop for unregistered commands
|
|
783
|
+
- Enables extensible command architecture
|
|
784
|
+
|
|
785
|
+
**2. SubAgents Registry**
|
|
786
|
+
- Pluggable sub-agent system for specialized tasks
|
|
787
|
+
- Each sub-agent declares capabilities via registry
|
|
788
|
+
- Init subagent handles environment setup
|
|
789
|
+
- Extensible via `registerSubAgent()` API
|
|
790
|
+
|
|
791
|
+
**3. Context Management**
|
|
792
|
+
- `ContextManager` handles conversation history
|
|
793
|
+
- `TokenCounter` tracks token usage (tiktoken)
|
|
794
|
+
- `HistoryAnchor` manages context window compression
|
|
795
|
+
- Automatic pruning to stay within LLM limits
|
|
796
|
+
|
|
797
|
+
**4. Session Persistence**
|
|
798
|
+
- `SessionManager` persists all interactions
|
|
799
|
+
- Stored in `~/.bluma/sessions/<session-id>.json`
|
|
800
|
+
- Survives across CLI restarts
|
|
801
|
+
- Includes full tool call history and results
|
|
802
|
+
|
|
803
|
+
**5. Skills System**
|
|
804
|
+
- Pluggable knowledge modules (`skill_loader.ts`)
|
|
805
|
+
- Built-in skills: `git-commit`, `git-pr`, `pdf`, `xlsx`, `skill-creator`
|
|
806
|
+
- Each skill includes `SKILL.md` with workflows
|
|
807
|
+
- Can include `references/` (docs) and `scripts/` (executables)
|
|
609
808
|
|
|
610
809
|
### Sequence Diagram
|
|
611
810
|
```mermaid
|
|
@@ -730,23 +929,140 @@ flowchart LR
|
|
|
730
929
|
---
|
|
731
930
|
|
|
732
931
|
## 💡 Usage Examples
|
|
733
|
-
|
|
932
|
+
|
|
933
|
+
### Interactive CLI Mode
|
|
934
|
+
|
|
935
|
+
**1. Start a Conversation**
|
|
936
|
+
```bash
|
|
937
|
+
bluma
|
|
938
|
+
```
|
|
939
|
+
Then ask naturally:
|
|
940
|
+
- "Help me refactor this authentication module"
|
|
941
|
+
- "Run tests and fix any failures"
|
|
942
|
+
- "Create a PDF report from this data"
|
|
943
|
+
|
|
944
|
+
**2. Use Slash Commands**
|
|
945
|
+
```bash
|
|
946
|
+
/init # Initialize environment with init subagent
|
|
947
|
+
/todo # View current task list
|
|
948
|
+
/memory list # List all coding memory entries
|
|
949
|
+
/skills # List available skills
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
**3. Load Skills for Specialized Tasks**
|
|
953
|
+
```
|
|
954
|
+
# The agent will automatically load skills when needed
|
|
955
|
+
"Commit these changes with a proper message" → loads git-commit skill
|
|
956
|
+
"Create a pull request" → loads git-pr skill
|
|
957
|
+
"Generate a PDF report" → loads pdf skill
|
|
958
|
+
"Analyze this Excel file" → loads xlsx skill
|
|
959
|
+
```
|
|
960
|
+
|
|
961
|
+
**4. Live Overlays During Processing**
|
|
962
|
+
While the agent is working, type guidance:
|
|
963
|
+
```
|
|
964
|
+
[hint] Focus on the authentication flow first
|
|
965
|
+
[constraint] Don't modify files in tests/ yet
|
|
966
|
+
[override] expected_replacements=2
|
|
967
|
+
[assume] target_database=postgresql
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
**5. Tool Confirmation Flow**
|
|
971
|
+
When the agent requests a sensitive operation:
|
|
972
|
+
```
|
|
973
|
+
┌─────────────────────────────────────────┐
|
|
974
|
+
│ EDIT PREVIEW │
|
|
975
|
+
│ File: src/auth/login.ts │
|
|
976
|
+
│ Lines 45-67 │
|
|
977
|
+
│ │
|
|
978
|
+
│ - old code │
|
|
979
|
+
│ + new code │
|
|
980
|
+
└─────────────────────────────────────────┘
|
|
981
|
+
|
|
982
|
+
[Accept] [Decline] [Accept Always] [Expand]
|
|
983
|
+
```
|
|
984
|
+
|
|
985
|
+
### Agent Mode (Sandbox / API Integration)
|
|
986
|
+
|
|
987
|
+
**6. Call BluMa from Another System**
|
|
988
|
+
```bash
|
|
989
|
+
BLUMA_SANDBOX=true BLUMA_SANDBOX_NAME="agiweb" \
|
|
990
|
+
node dist/main.js agent --input - << 'EOF'
|
|
991
|
+
{
|
|
992
|
+
"session_id": "conv-123",
|
|
993
|
+
"message_id": "job-456",
|
|
994
|
+
"from_agent": "agiweb",
|
|
995
|
+
"to_agent": "bluma",
|
|
996
|
+
"action": "generate_report",
|
|
997
|
+
"context": {
|
|
998
|
+
"user_request": "Create sales report PDF"
|
|
999
|
+
},
|
|
1000
|
+
"user_context": {
|
|
1001
|
+
"userId": "13",
|
|
1002
|
+
"userName": "Alex",
|
|
1003
|
+
"companyId": "4"
|
|
1004
|
+
},
|
|
1005
|
+
"metadata": { "sandbox": true }
|
|
1006
|
+
}
|
|
1007
|
+
EOF
|
|
1008
|
+
```
|
|
1009
|
+
|
|
1010
|
+
**7. Parse JSONL Output**
|
|
1011
|
+
The agent outputs structured events:
|
|
1012
|
+
```json
|
|
1013
|
+
{"event_type":"log","level":"info","message":"Starting..."}
|
|
1014
|
+
{"event_type":"action_status","payload":{"action":"Thinking"}}
|
|
1015
|
+
{"event_type":"backend_message","backend_type":"tool_call",...}
|
|
1016
|
+
{"event_type":"result","status":"success","data":{"attachments":["/app/artifacts/report.pdf"]}}
|
|
1017
|
+
```
|
|
1018
|
+
|
|
1019
|
+
**8. Retrieve Generated Artifacts**
|
|
1020
|
+
Check the `attachments` array in the final `result` event:
|
|
1021
|
+
```json
|
|
1022
|
+
{
|
|
1023
|
+
"event_type": "result",
|
|
1024
|
+
"status": "success",
|
|
1025
|
+
"data": {
|
|
1026
|
+
"message_id": "job-456",
|
|
1027
|
+
"last_assistant_message": "Report generated successfully",
|
|
1028
|
+
"attachments": [
|
|
1029
|
+
"/app/artifacts/sales_report.pdf",
|
|
1030
|
+
"/app/artifacts/sales_data.csv"
|
|
1031
|
+
]
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
```
|
|
1035
|
+
|
|
1036
|
+
### Common Workflows
|
|
1037
|
+
|
|
1038
|
+
**9. Code Refactoring**
|
|
734
1039
|
```
|
|
735
|
-
/
|
|
1040
|
+
User: "Refactor this function to use async/await"
|
|
1041
|
+
→ Agent reads file with read_file_lines
|
|
1042
|
+
→ Plans changes with todo
|
|
1043
|
+
→ Applies edits with edit_tool (shows preview)
|
|
1044
|
+
→ Runs tests with shell_command
|
|
1045
|
+
→ Reports results
|
|
736
1046
|
```
|
|
737
|
-
Executes the `init` subagent to prepare the working environment.
|
|
738
1047
|
|
|
739
|
-
|
|
740
|
-
When the system prompts an `edit_tool` operation, review the preview and choose:
|
|
1048
|
+
**10. Git Workflow**
|
|
741
1049
|
```
|
|
742
|
-
|
|
1050
|
+
User: "Commit my changes"
|
|
1051
|
+
→ Agent loads git-commit skill
|
|
1052
|
+
→ Runs git status --short
|
|
1053
|
+
→ Stages files with git add
|
|
1054
|
+
→ Writes conventional commit message
|
|
1055
|
+
→ Executes git commit
|
|
743
1056
|
```
|
|
744
1057
|
|
|
745
|
-
|
|
746
|
-
During a long-running task, you can send hints:
|
|
1058
|
+
**11. Data Analysis & Reporting**
|
|
747
1059
|
```
|
|
748
|
-
|
|
749
|
-
|
|
1060
|
+
User: "Analyze sales.xlsx and create a summary"
|
|
1061
|
+
→ Agent loads xlsx skill
|
|
1062
|
+
→ Runs Python script to read Excel
|
|
1063
|
+
→ Processes data with pandas
|
|
1064
|
+
→ Generates PDF with charts
|
|
1065
|
+
→ Returns attachments array
|
|
750
1066
|
```
|
|
751
1067
|
|
|
752
1068
|
---
|
|
@@ -560,7 +560,7 @@
|
|
|
560
560
|
"properties": {
|
|
561
561
|
"skill_name": {
|
|
562
562
|
"type": "string",
|
|
563
|
-
"description": "
|
|
563
|
+
"description": "Exact skill name from the <available_skills> list in the system prompt (e.g. git-commit, git-pr, pdf). Do not invent names — use only names listed there."
|
|
564
564
|
}
|
|
565
565
|
},
|
|
566
566
|
"required": [
|