Documentation
¶
Index ¶
- func CleanAntigravityOutputs(sys System, root string) error
- func CleanCopilotOutputs(sys System, root string) error
- func CleanLegacySkillOutputs(sys System, root string) error
- func CleanSharedAgentSkills(sys System, root string) error
- func EnsureEnabled(name string, enabled *bool) error
- func WriteAgentSkills(sys System, root string, commands []config.Skill) error
- func WriteAntigravityMCPConfig(sys System, root string, project *config.ProjectConfig) error
- func WriteAntigravitySettings(sys System, root string, project *config.ProjectConfig) error
- func WriteClaudeSettings(sys System, root string, project *config.ProjectConfig) error
- func WriteClaudeSkills(sys System, root string, commands []config.Skill) error
- func WriteClaudeStatusline(sys System, root string, project *config.ProjectConfig) error
- func WriteCodexConfig(sys System, root string, project *config.ProjectConfig) error
- func WriteCodexInstructions(sys System, root string, instructions []config.InstructionFile) error
- func WriteCodexRules(sys System, root string, project *config.ProjectConfig) error
- func WriteCopilotMCPConfig(sys System, root string, project *config.ProjectConfig) error
- func WriteInstructionShims(sys System, root string, instructions []config.InstructionFile) error
- func WriteMCPConfig(sys System, root string, project *config.ProjectConfig) error
- func WriteVSCodeMCPConfig(sys System, root string, project *config.ProjectConfig) error
- func WriteVSCodeSettings(sys System, root string, project *config.ProjectConfig) error
- type OrderedMap
- type RealSystem
- func (RealSystem) LookPath(file string) (string, error)
- func (RealSystem) Lstat(name string) (os.FileInfo, error)
- func (RealSystem) MarshalIndent(v any, prefix, indent string) ([]byte, error)
- func (RealSystem) MkdirAll(path string, perm os.FileMode) error
- func (RealSystem) ReadDir(name string) ([]os.DirEntry, error)
- func (RealSystem) ReadFile(name string) ([]byte, error)
- func (RealSystem) Readlink(name string) (string, error)
- func (RealSystem) Remove(name string) error
- func (RealSystem) RemoveAll(path string) error
- func (RealSystem) Stat(name string) (os.FileInfo, error)
- func (RealSystem) WriteFileAtomic(filename string, data []byte, perm os.FileMode) error
- type Result
- type System
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanAntigravityOutputs ¶ added in v0.11.0
CleanAntigravityOutputs removes Agent Layer-managed Antigravity files.
func CleanCopilotOutputs ¶ added in v0.9.2
CleanCopilotOutputs removes Copilot CLI artifacts generated by previous syncs. Call this when agents.copilot_cli is disabled so stale config does not persist.
func CleanLegacySkillOutputs ¶ added in v0.10.0
CleanLegacySkillOutputs removes retired Agent Layer-generated skill projection directories. Agent Layer claims exclusive ownership of these paths (see docs/SKILL-CLIENT-SPEC.md "Ownership of legacy projection paths") and removes them unconditionally. The canonical list lives in config.LegacySkillProjections.
func CleanSharedAgentSkills ¶ added in v0.10.0
CleanSharedAgentSkills removes generated .agents/skills entries when no shared-skill consumer is enabled.
func EnsureEnabled ¶
EnsureEnabled is a helper for command handlers.
func WriteAgentSkills ¶ added in v0.10.0
WriteAgentSkills generates shared Agent Skills in .agents/skills/<name>/SKILL.md.
func WriteAntigravityMCPConfig ¶ added in v0.11.0
func WriteAntigravityMCPConfig(sys System, root string, project *config.ProjectConfig) error
WriteAntigravityMCPConfig generates .agy/antigravity-cli/mcp_config.json.
func WriteAntigravitySettings ¶ added in v0.11.0
func WriteAntigravitySettings(sys System, root string, project *config.ProjectConfig) error
WriteAntigravitySettings generates .agy/antigravity-cli/settings.json.
func WriteClaudeSettings ¶
func WriteClaudeSettings(sys System, root string, project *config.ProjectConfig) error
WriteClaudeSettings generates .claude/settings.json.
func WriteClaudeSkills ¶ added in v0.10.0
WriteClaudeSkills generates Claude Code skill files in .claude/skills/<name>/SKILL.md.
func WriteClaudeStatusline ¶ added in v0.11.0
func WriteClaudeStatusline(sys System, root string, project *config.ProjectConfig) error
WriteClaudeStatusline projects the editable .agent-layer/claude-statusline.sh source into .claude/claude-statusline.sh when the status line is explicitly enabled. When disabled or absent, it removes any previously generated copy so a stale script does not linger.
func WriteCodexConfig ¶
func WriteCodexConfig(sys System, root string, project *config.ProjectConfig) error
WriteCodexConfig generates .codex/config.toml.
func WriteCodexInstructions ¶
func WriteCodexInstructions(sys System, root string, instructions []config.InstructionFile) error
WriteCodexInstructions generates the Codex-specific instruction shim.
func WriteCodexRules ¶
func WriteCodexRules(sys System, root string, project *config.ProjectConfig) error
WriteCodexRules generates .codex/rules/default.rules.
func WriteCopilotMCPConfig ¶ added in v0.9.2
func WriteCopilotMCPConfig(sys System, root string, project *config.ProjectConfig) error
WriteCopilotMCPConfig generates .copilot/mcp-config.json for GitHub Copilot CLI. Contains external MCP servers only.
func WriteInstructionShims ¶
func WriteInstructionShims(sys System, root string, instructions []config.InstructionFile) error
WriteInstructionShims generates instruction shims for supported clients. agy (Antigravity), Claude, Codex, Copilot, and other shared-tier clients all read AGENTS.md (per the agentskills.io standard) or their client- specific shim. GEMINI.md is intentionally NOT written: the Gemini CLI was retired in 0.10.2 and agy reads AGENTS.md. The v0.10.2 migration's `f-delete-orphan-gemini-md` op removes any leftover GEMINI.md from pre-0.10.2 repos.
func WriteMCPConfig ¶
func WriteMCPConfig(sys System, root string, project *config.ProjectConfig) error
WriteMCPConfig generates .mcp.json for Claude Code.
func WriteVSCodeMCPConfig ¶
func WriteVSCodeMCPConfig(sys System, root string, project *config.ProjectConfig) error
WriteVSCodeMCPConfig generates .vscode/mcp.json.
func WriteVSCodeSettings ¶
func WriteVSCodeSettings(sys System, root string, project *config.ProjectConfig) error
WriteVSCodeSettings generates .vscode/settings.json.
Types ¶
type OrderedMap ¶
OrderedMap marshals map keys in a stable order.
func (OrderedMap[T]) MarshalJSON ¶
func (m OrderedMap[T]) MarshalJSON() ([]byte, error)
MarshalJSON encodes a map with sorted keys for deterministic output.
type RealSystem ¶ added in v0.5.4
type RealSystem struct{}
RealSystem implements System using actual system calls.
func (RealSystem) LookPath ¶ added in v0.5.4
func (RealSystem) LookPath(file string) (string, error)
LookPath searches for an executable named file in the directories named by the PATH environment variable.
func (RealSystem) Lstat ¶ added in v0.11.0
func (RealSystem) Lstat(name string) (os.FileInfo, error)
Lstat returns a FileInfo describing the named file without following symlinks.
func (RealSystem) MarshalIndent ¶ added in v0.5.4
func (RealSystem) MarshalIndent(v any, prefix, indent string) ([]byte, error)
MarshalIndent returns the JSON encoding of v with indentation.
func (RealSystem) MkdirAll ¶ added in v0.5.4
func (RealSystem) MkdirAll(path string, perm os.FileMode) error
MkdirAll creates a directory named path, along with any necessary parents.
func (RealSystem) ReadDir ¶ added in v0.8.0
func (RealSystem) ReadDir(name string) ([]os.DirEntry, error)
ReadDir reads the named directory and returns all directory entries.
func (RealSystem) ReadFile ¶ added in v0.5.4
func (RealSystem) ReadFile(name string) ([]byte, error)
ReadFile reads the named file and returns the contents.
func (RealSystem) Readlink ¶ added in v0.11.0
func (RealSystem) Readlink(name string) (string, error)
Readlink returns the destination of a symbolic link.
func (RealSystem) Remove ¶ added in v0.8.0
func (RealSystem) Remove(name string) error
Remove removes the named file or empty directory.
func (RealSystem) RemoveAll ¶ added in v0.8.0
func (RealSystem) RemoveAll(path string) error
RemoveAll removes path and any children it contains.
func (RealSystem) Stat ¶ added in v0.5.4
func (RealSystem) Stat(name string) (os.FileInfo, error)
Stat returns a FileInfo describing the named file.
func (RealSystem) WriteFileAtomic ¶ added in v0.5.4
WriteFileAtomic writes data to a file atomically by writing to a temp file and renaming.
type Result ¶ added in v0.8.1
Result holds the outcome of a sync operation.
func Run ¶
Run regenerates all configured outputs for the repo. Returns any sync-time warnings and an error if sync failed.
func RunWithProject ¶
RunWithProject regenerates outputs using an already loaded project config. Returns any sync-time warnings and an error if sync failed.
type System ¶ added in v0.5.4
type System interface {
LookPath(file string) (string, error)
Stat(name string) (os.FileInfo, error)
Lstat(name string) (os.FileInfo, error)
Readlink(name string) (string, error)
MkdirAll(path string, perm os.FileMode) error
WriteFileAtomic(filename string, data []byte, perm os.FileMode) error
MarshalIndent(v any, prefix, indent string) ([]byte, error)
ReadFile(name string) ([]byte, error)
ReadDir(name string) ([]os.DirEntry, error)
Remove(name string) error
RemoveAll(path string) error
}
System abstracts system-level operations to enable dependency injection in sync logic.