-
Notifications
You must be signed in to change notification settings - Fork 6
chore(agent): add AGENTS.md and CLAUDE.md (symlink) #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # AGENTS.md | ||
|
|
||
| This file provides guidance to AI agents when working with code in this repository. | ||
|
|
||
| ## Project Overview | ||
|
|
||
| kortex-cli is a command-line interface for launching and managing AI agents (Claude Code, Goose, Cursor) with custom configurations. It provides a unified way to start different agents with specific settings including skills, MCP server connections, and LLM integrations. | ||
|
|
||
| ## Build and Test Commands | ||
|
|
||
| ### Build | ||
| ```bash | ||
| go build ./cmd/kortex-cli | ||
| ``` | ||
|
|
||
| ### Execute | ||
| After building, the `kortex-cli` binary will be created in the current directory: | ||
|
|
||
| ```bash | ||
| # Display help and available commands | ||
| ./kortex-cli --help | ||
|
|
||
| # Execute a specific command | ||
| ./kortex-cli <command> [flags] | ||
| ``` | ||
|
|
||
| ### Run Tests | ||
| ```bash | ||
| # Run all tests | ||
| go test ./... | ||
|
|
||
| # Run tests in a specific package | ||
| go test ./pkg/cmd | ||
|
|
||
| # Run a specific test | ||
| go test -run TestName ./pkg/cmd | ||
|
|
||
| # Check code coverage | ||
| go test -cover ./... | ||
| ``` | ||
|
|
||
| ### Format Code | ||
| All Go code should be formatted using `go fmt`: | ||
|
|
||
| ```bash | ||
| # Format all Go files in the project | ||
| go fmt ./... | ||
|
|
||
| # Format a specific package | ||
| go fmt ./pkg/cmd | ||
|
|
||
| # Format a specific file | ||
| go fmt ./pkg/cmd/root.go | ||
| ``` | ||
|
|
||
| Code should be formatted before committing. The `go fmt` tool ensures consistent style across the codebase by automatically fixing indentation, spacing, and other formatting issues. | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Command Structure (Cobra-based) | ||
| - Entry point: `cmd/kortex-cli/main.go` → calls `pkg/cmd.Execute()` | ||
| - Root command: `pkg/cmd/root.go` defines the `kortex-cli` command | ||
| - Subcommands: Each command is in `pkg/cmd/<command>.go` and registers itself via `init()` | ||
| - Commands use Cobra's pattern: define a `cobra.Command`, register it with `rootCmd.AddCommand()` in `init()` | ||
|
|
||
| ### Skills System | ||
| Skills are reusable capabilities that can be discovered and executed by AI agents: | ||
| - **Location**: `skills/<skill-name>/SKILL.md` | ||
| - **Claude support**: Skills are symlinked in `.claude/skills/` for Claude Code | ||
| - **Format**: Each SKILL.md contains: | ||
| - YAML frontmatter with `name`, `description`, `argument-hint` | ||
| - Detailed instructions for execution | ||
| - Usage examples | ||
|
|
||
| ### Adding a New Skill | ||
| 1. Create directory: `skills/<skill-name>/` | ||
| 2. Create SKILL.md with frontmatter and instructions | ||
| 3. Symlink in `.claude/skills/`: `ln -s ../../skills/<skill-name> .claude/skills/<skill-name>` | ||
|
|
||
| ### Adding a New Command | ||
| 1. Create `pkg/cmd/<command>.go` | ||
| 2. Define a `cobra.Command` variable | ||
| 3. Register with `rootCmd.AddCommand()` in the `init()` function | ||
| 4. Create corresponding test file `pkg/cmd/<command>_test.go` | ||
|
|
||
| ## Copyright Headers | ||
|
|
||
| All source files must include Apache License 2.0 copyright headers with Red Hat copyright. Use the `/copyright-headers` skill to add or update headers automatically. The current year is 2026. | ||
|
|
||
| ## Dependencies | ||
|
|
||
| - Cobra (github.com/spf13/cobra): CLI framework | ||
| - Go 1.25+ | ||
|
|
||
| ## Testing | ||
|
|
||
| Tests follow Go conventions with `*_test.go` files alongside source files. Tests use the standard `testing` package and should cover command initialization, execution, and error cases. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| AGENTS.md |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something about formatter / go fmt to format ?