aix
Copilot instructions16 starsChanged 10 months agoMITView on GitHub
aix is a unified Go CLI for managing AI coding assistant configurations across multiple platforms (Claude Code, OpenCode, Codex CLI, Gemini CLI). It provides a platform-agnostic way to define and deploy skills, MCP servers, and slash commands. First build downloads dependencies (~30 seconds). Subsequent builds are fast (<5 seconds). Important: - Tests pass with exit code 0 and show "ok" for each package - The "go: no such tool 'covdata'" warning in coverage output is harmless - Always run go…
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this copilot-instructions.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 58
Always run go test ./... before committing code changes
- Distinctive: line 110
ALWAYS: use this order with blank lines between groups:
- Distinctive: line 142
Use table-driven tests (see existing tests for examples):
- Very specific: line 165
Solution: Use go vet ./... for local checks.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions for aix
Repository Overview
aix is a unified Go CLI for managing AI coding assistant configurations across multiple platforms (Claude Code, OpenCode, Codex CLI, Gemini CLI). It provides a platform-agnostic way to define and deploy skills, MCP servers, and slash commands.
- Size: ~1.2MB, 59 Go source files
- Language: Go 1.25.5
- Architecture: CLI tool using Cobra, adapter pattern for platform-specific implementations
- Key Dependencies: spf13/cobra, spf13/viper, adrg/frontmatter, gopkg.in/yaml.v3
Repository Structure
aix/
|-- cmd/aix/ # CLI entry point - main.go and commands/
|-- internal/ # Private packages (NOT importable externally)
| |-- config/ # Configuration management
| |-- errors/ # Error handling utilities
| |-- logging/ # Logging utilities
| |-- paths/ # Path resolution for platform configs
| `--- platform/ # Platform adapters (claude/, opencode/)
|-- pkg/ # Public packages (importable)
| `--- frontmatter/ # YAML frontmatter parser
|-- docs/adr/ # Architecture Decision Records (see ADR-001)
|-- .github/workflows/ # CI/CD pipelines (ci.yml, codeql.yml, release.yml)
|-- .golangci.yml # Linter configuration
|-- .pre-commit-config.yaml # Pre-commit hooks (requires local tools)
`--- .beads/ # Issue tracker (bd CLI)Build, Test, and Lint Commands
Prerequisites
- Go 1.25.5+ (specified in go.mod)
- Dependencies are automatically downloaded on first build
Build
go build ./cmd/aix # Build CLI binary -> ./aix
go build ./... # Build all packages (verification only)
go build -v -o aix cmd/aix/main.go # Verbose build with custom output nameFirst build downloads dependencies (~30 seconds). Subsequent builds are fast (<5 seconds).
Test
go test ./... # Run all tests (ALWAYS use this)
go test -v -race ./... # Verbose with race detection (CI requirement)
go test -cover ./... # With coverage report
go test ./internal/platform/... # Test specific packageImportant:
- Tests pass with exit code 0 and show "ok" for each package
- The "go: no such tool 'covdata'" warning in coverage output is harmless
- Always run
go test ./...before committing code changes
Lint and Format
go fmt ./... # Format code (ALWAYS run before commit)
go vet ./... # Static analysisNote: golangci-lint is NOT available in local dev environments. The CI pipeline builds it from source:
# CI uses golangci-lint v2.7.2 (built from source in CI)
# Local developers: go vet ./... is sufficient for basic checks
# Full linting happens in CI automaticallyRunning the Binary
./aix --help # Show help
./aix version # Show version
./aix init # Initialize configurationCI/CD Pipeline
Workflows (.github/workflows/)
- ci.yml - Runs on push/PR to main
- Lint: Builds golangci-lint v2.7.2 from source, runs with 5m timeout
- Test:
go test -v -race ./...(requires lint to pass first) - Build: Builds binary and runs
./aix --helpverification
- codeql.yml - Security scanning (runs on push/PR and weekly)
- CodeQL analysis for Go code
- release.yml - Release automation (on tag push)
- Re-runs lint and test checks
- Uses GoReleaser to build multi-platform binaries
- Important: Tags must be on main branch, not feature branches
CI Success Criteria
To match CI behavior locally:
go fmt ./... # Format
go vet ./... # Static analysis
go test -v -race ./... # Tests with race detection
go build -v -o aix cmd/aix/main.go # Build
./aix --help # Verify binary worksCode Style and Conventions
Import Grouping
ALWAYS use this order with blank lines between groups:
import (
// Standard library
"context"
"fmt"
// External dependencies
"github.com/spf13/cobra"
// Internal packages
"github.com/thoreinstein/aix/internal/config"
)Naming Conventions
- Packages: lowercase, single word (skill, platform, mcp)
- Interfaces: noun or -er suffix (Platform, Validator, Parser)
- Constructors:
Newprefix (NewValidator, NewConfig) - Errors:
Errprefix (ErrMissingName, ErrNotFound) - Test files:
*_test.gosuffix - Test functions:
Test*prefix, table-driven pattern preferred
Error Handling
ALWAYS wrap errors with context using %w:
if err := doSomething(); err != nil {
return fmt.Errorf("doing something: %w", err)
}Testing Pattern
Use table-driven tests (see existing tests for examples):
tests := []struct {
name string
input string
want bool
wantErr bool
}{
{name: "valid case", input: "test", want: true, wantErr: false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// test implementation
})
}Common Issues and Workarounds
Issue: "go: no such tool 'covdata'" during coverage
Status: Harmless warning, tests still pass. Not a failure.
Issue: golangci-lint not available locally
Solution: Use go vet ./... for local checks. Full linting runs in CI automatically.
Issue: pre-commit hooks reference unavailable tools (bd, golangci-lint)
Solution: These are optional development tools. CI does not use pre-commit hooks. Manual commands work fine.
Issue: Building with -buildvcs=false flag
Context: Used in .pre-commit-config.yaml to support git worktrees. Standard builds don't need this flag.
Development Workflow
- Make Changes: Edit Go files in cmd/, internal/, or pkg/
- Format:
go fmt ./... - Verify:
go vet ./... - Test:
go test ./... - Build:
go build ./cmd/aix - Run:
./aix --helpto verify binary works
Key Configuration Files
- go.mod: Dependencies and Go version
- .golangci.yml: Linter configuration (26 enabled linters, specific exclusions for G102, G115, G306, G402, G404)
- .gitignore: Excludes binaries (aix, .exe), test artifacts (.out, *.test), build artifacts (dist/), debug files
- AGENTS.md: Contains detailed developer instructions (overlaps with this file but more comprehensive)
- docs/adr/001-unified-agent-cli.md: Full architecture rationale (34KB, detailed design decisions)
Additional Resources
- ADR-001: See
docs/adr/001-unified-agent-cli.mdfor complete architecture and design rationale - AGENTS.md: More detailed development guide with code style examples and issue tracking workflow (bd CLI)
- README.md: User-facing documentation for installation and basic usage
Trust These Instructions
These instructions are validated by running actual commands in the repository. If you encounter issues not documented here, search the codebase or workflows for updates. Otherwise, trust these commands - they work.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

