Skip to content

Commit 0525804

Browse files
committed
docs: update documentation and workspace schema for agents and tools
- revise codecompanion-workspace.json schema to clarify extension structure, group descriptions, and tool integration - update codecompanion.txt with expanded documentation for Agent Client Protocol, agent adapters, tool usage, security, super diff, and configuration options - reorganize and enhance sections on adapters, agents, tools, completion, folding, and system prompts for improved clarity and usability - add new examples and notes for ACP adapters, agent workflows, and YOLO mode - fix outdated references and improve consistency across documentation
1 parent e237b99 commit 0525804

File tree

2 files changed

+911
-466
lines changed

2 files changed

+911
-466
lines changed

codecompanion-workspace.json

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,140 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"name": "CodeCompanion GitCommit Extension",
3+
"name": "codecompanion-gitcommit",
44
"version": "1.0.0",
5-
"system_prompt": "You are helping with a Neovim plugin that extends CodeCompanion to provide AI-powered Git commit message generation following Conventional Commits specification. The plugin integrates deeply with Git workflows and provides comprehensive tooling for repository management through LLM-powered chat interfaces.",
5+
"description": "What functionality would you like to understand in the codecompanion-gitcommit extension?",
6+
"system_prompt": "You are an expert in the codecompanion-gitcommit.nvim plugin, which is a Neovim extension for CodeCompanion that generates AI-powered Git commit messages following the Conventional Commits specification. You have deep knowledge of its architecture, Git integration, tool system, and AI generation capabilities.",
67
"vars": {
7-
"project_name": "codecompanion-gitcommit.nvim",
8-
"main_module": "codecompanion._extensions.gitcommit"
8+
"project_root": "lua/codecompanion/_extensions/gitcommit",
9+
"tool_path": "${project_root}/tools"
910
},
1011
"groups": [
1112
{
12-
"name": "core_extension",
13-
"system_prompt": "This group contains the core extension entry point and configuration. Focus on the main initialization logic, extension setup, command registration, and overall architecture of how the plugin integrates with CodeCompanion.",
14-
"data": [
15-
"main_init",
16-
"extension_config",
17-
"type_definitions"
18-
]
13+
"name": "Core System",
14+
"description": "I need help understanding the core initialization and configuration system of the gitcommit extension",
15+
"system_prompt": "Focus on the main entry points, extension setup, configuration management, and how the extension integrates with CodeCompanion's ecosystem.",
16+
"data": ["init", "config", "types"]
1917
},
2018
{
21-
"name": "git_operations",
22-
"system_prompt": "This group handles all Git repository operations including diff analysis, commit execution, repository validation, and file filtering. Focus on Git command execution, repository state management, and the core Git integration logic.",
23-
"data": [
24-
"git_core",
25-
"git_buffer_integration"
26-
]
19+
"name": "Git Operations",
20+
"description": "I need help with Git repository operations and version control functionality",
21+
"system_prompt": "Focus on Git repository detection, diff analysis, commit operations, branch management, and how the extension interacts with Git commands.",
22+
"data": ["git-core", "git-read-tool", "git-edit-tool", "git-bot-tool"]
2723
},
2824
{
29-
"name": "ai_generation",
30-
"system_prompt": "This group manages the AI-powered commit message generation using LLM adapters. Focus on prompt engineering, LLM communication, response handling, and the generation workflow for creating Conventional Commits compliant messages.",
31-
"data": [
32-
"message_generator",
33-
"language_selection"
34-
]
25+
"name": "AI Generation",
26+
"description": "I need help with the AI-powered commit message generation system",
27+
"system_prompt": "Focus on prompt construction, LLM integration, Conventional Commits formatting, multi-language support, and commit history context usage.",
28+
"data": ["generator", "langs", "init"]
3529
},
3630
{
37-
"name": "user_interface",
38-
"system_prompt": "This group handles user interaction components including buffer integration for gitcommit buffers, floating window displays, and user interface elements. Focus on user experience, interactive elements, and visual presentation.",
39-
"data": [
40-
"buffer_management",
41-
"ui_components"
42-
]
31+
"name": "User Interface",
32+
"description": "I need help with the UI components and buffer integration",
33+
"system_prompt": "Focus on gitcommit buffer handling, keymaps, auto-generation behavior, user interactions, and the commit message preview interface.",
34+
"data": ["ui", "buffer", "init"]
4335
},
4436
{
45-
"name": "git_tools",
46-
"system_prompt": "This group provides comprehensive Git tooling for CodeCompanion chat integration, including read-only operations, write operations, and the Git bot assistant. Focus on tool schemas, command execution, safety mechanisms, and chat integration.",
47-
"data": [
48-
"git_tools_core",
49-
"git_read_tool",
50-
"git_edit_tool"
51-
]
37+
"name": "Tools System",
38+
"description": "I need help understanding the Git tools (@{git_read}, @{git_edit}, @{git_bot}) for chat interactions",
39+
"system_prompt": "Focus on tool schemas, parameter validation, operation execution, async handling, and how tools integrate with CodeCompanion's chat buffer.",
40+
"data": ["git-read-tool", "git-edit-tool", "git-bot-tool", "tool-integration"]
5241
},
5342
{
54-
"name": "documentation_and_examples",
55-
"system_prompt": "This group contains project documentation, usage examples, and configuration templates. Focus on user guidance, feature documentation, and setup instructions.",
56-
"data": [
57-
"readme_docs",
58-
"config_examples",
59-
"help_documentation"
60-
]
43+
"name": "Documentation",
44+
"description": "I need help with the documentation, usage examples, and API reference",
45+
"system_prompt": "Focus on installation instructions, configuration options, usage examples, API documentation, and best practices.",
46+
"data": ["readme", "readme-zh", "help-doc", "config-examples"]
47+
},
48+
{
49+
"name": "Complete Extension",
50+
"description": "I need a comprehensive understanding of the entire gitcommit extension",
51+
"system_prompt": "You have complete knowledge of all aspects of the codecompanion-gitcommit extension, including its architecture, features, configuration, and implementation details.",
52+
"opts": {
53+
"remove_config_system_prompt": false
54+
},
55+
"data": ["init", "config", "types", "git-core", "generator", "ui", "buffer", "langs", "git-read-tool", "git-edit-tool", "git-bot-tool", "readme", "help-doc"]
6156
}
6257
],
6358
"data": {
64-
"main_init": {
59+
"init": {
6560
"type": "file",
66-
"path": "lua/codecompanion/_extensions/gitcommit/init.lua",
67-
"description": "Main extension entry point with setup function, command registration, tool integration, and programmatic API exports"
61+
"path": "${project_root}/init.lua",
62+
"description": "The main entry point for the gitcommit extension. Contains setup logic, command registration, tool initialization, and public API methods."
6863
},
69-
"extension_config": {
70-
"type": "file",
71-
"path": "lua/codecompanion/_extensions/gitcommit/config.lua",
72-
"description": "Extension configuration management with default options and validation"
64+
"config": {
65+
"type": "symbols",
66+
"path": "${project_root}/config.lua",
67+
"description": "Configuration module defining default options for the extension including adapter settings, language support, buffer behavior, and feature toggles."
7368
},
74-
"type_definitions": {
69+
"types": {
7570
"type": "file",
76-
"path": "lua/codecompanion/_extensions/gitcommit/types.lua",
77-
"description": "TypeScript-style type annotations and interface definitions for the extension"
71+
"path": "${project_root}/types.lua",
72+
"description": "Type definitions and annotations for the extension's data structures and function signatures."
7873
},
79-
"git_core": {
74+
"git-core": {
8075
"type": "file",
81-
"path": "lua/codecompanion/_extensions/gitcommit/git.lua",
82-
"description": "Core Git operations including repository validation, diff analysis, commit execution, and file filtering logic"
76+
"path": "${project_root}/git.lua",
77+
"description": "Core Git operations module handling repository detection, diff generation, commit operations, and Git command execution."
8378
},
84-
"git_buffer_integration": {
79+
"generator": {
8580
"type": "file",
86-
"path": "lua/codecompanion/_extensions/gitcommit/buffer.lua",
87-
"description": "Git commit buffer integration with automatic message generation and keymap setup"
81+
"path": "${project_root}/generator.lua",
82+
"description": "AI-powered commit message generation module that constructs prompts, interacts with LLMs, and formats commit messages following Conventional Commits."
8883
},
89-
"message_generator": {
84+
"ui": {
9085
"type": "file",
91-
"path": "lua/codecompanion/_extensions/gitcommit/generator.lua",
92-
"description": "AI-powered commit message generation using CodeCompanion's LLM adapters with prompt engineering and response handling"
86+
"path": "${project_root}/ui.lua",
87+
"description": "User interface module for displaying commit messages, handling user input, and managing the commit preview window."
9388
},
94-
"language_selection": {
89+
"buffer": {
9590
"type": "file",
96-
"path": "lua/codecompanion/_extensions/gitcommit/langs.lua",
97-
"description": "Multi-language support for commit message generation with language selection UI"
91+
"path": "${project_root}/buffer.lua",
92+
"description": "GitCommit buffer integration module handling keymaps, auto-generation triggers, and buffer-specific behaviors."
9893
},
99-
"buffer_management": {
100-
"type": "file",
101-
"path": "lua/codecompanion/_extensions/gitcommit/buffer.lua",
102-
"description": "Git commit buffer integration and automatic commit message insertion"
94+
"langs": {
95+
"type": "symbols",
96+
"path": "${project_root}/langs.lua",
97+
"description": "Language selection module supporting multi-language commit message generation."
10398
},
104-
"ui_components": {
99+
"git-read-tool": {
105100
"type": "file",
106-
"path": "lua/codecompanion/_extensions/gitcommit/ui.lua",
107-
"description": "Floating window UI for displaying commit messages with interactive options (copy, commit, edit)"
101+
"path": "${tool_path}/git_read.lua",
102+
"description": "Read-only Git operations tool providing 16 operations like status, log, diff, blame, and branch listing for use in CodeCompanion chat."
108103
},
109-
"git_tools_core": {
104+
"git-edit-tool": {
110105
"type": "file",
111-
"path": "lua/codecompanion/_extensions/gitcommit/tools/git.lua",
112-
"description": "Core Git tool utilities and shared functionality for read/write operations"
106+
"path": "${tool_path}/git_edit.lua",
107+
"description": "Write-access Git operations tool providing 17 operations like stage, commit, push, and branch management with safety confirmations."
113108
},
114-
"git_read_tool": {
115-
"type": "file",
116-
"path": "lua/codecompanion/_extensions/gitcommit/tools/git_read.lua",
117-
"description": "Read-only Git operations tool for CodeCompanion chat (status, log, diff, blame, etc.)"
118-
},
119-
"git_edit_tool": {
109+
"git-bot-tool": {
120110
"type": "file",
121-
"path": "lua/codecompanion/_extensions/gitcommit/tools/git_edit.lua",
122-
"description": "Write-access Git operations tool for CodeCompanion chat (stage, commit, branch management, etc.)"
111+
"path": "${tool_path}/git.lua",
112+
"description": "Comprehensive Git assistant tool combining all read and write operations for natural language Git workflow control."
113+
},
114+
"tool-integration": {
115+
"type": "symbols",
116+
"path": "${project_root}/init.lua",
117+
"description": "Tool setup and registration logic showing how Git tools are integrated into CodeCompanion's chat strategy."
123118
},
124-
"readme_docs": {
119+
"readme": {
125120
"type": "file",
126121
"path": "README.md",
127-
"description": "Main project documentation with features, installation, usage, and API reference"
122+
"description": "Main documentation file with installation instructions, feature overview, usage examples, and configuration options."
128123
},
129-
"config_examples": {
124+
"readme-zh": {
130125
"type": "file",
131-
"path": "config_example.lua",
132-
"description": "Basic configuration example for the extension setup"
126+
"path": "README_zh.md",
127+
"description": "Chinese language documentation providing localized installation and usage instructions."
133128
},
134-
"help_documentation": {
129+
"help-doc": {
135130
"type": "file",
136131
"path": "doc/codecompanion-gitcommit.txt",
137-
"description": "Vim help documentation for the extension"
132+
"description": "Vim help documentation with detailed API reference, configuration options, and usage guidelines."
133+
},
134+
"config-examples": {
135+
"type": "symbols",
136+
"path": "config_example.lua",
137+
"description": "Example configuration file demonstrating various setup options and customization possibilities."
138138
}
139139
}
140140
}

0 commit comments

Comments
 (0)