(_ *cobra.Command, _ []string)
| 24 | } |
| 25 | |
| 26 | func runSetup(_ *cobra.Command, _ []string) error { |
| 27 | repoRoot, err := git.GetRepositoryRoot(".") |
| 28 | if err != nil { |
| 29 | return fmt.Errorf("not a git repository (use 'git init' to initialize)") |
| 30 | } |
| 31 | |
| 32 | // Create/update AGENTS.md |
| 33 | created, updated, err := writeAgentsFile(filepath.Join(repoRoot, "AGENTS.md")) |
| 34 | if err != nil { |
| 35 | return err |
| 36 | } |
| 37 | |
| 38 | if created { |
| 39 | fmt.Println("✓ Created AGENTS.md with clarity usage instructions") |
| 40 | } else if updated { |
| 41 | fmt.Println("✓ Updated AGENTS.md with clarity usage instructions") |
| 42 | } else { |
| 43 | fmt.Println("✓ AGENTS.md already contains clarity usage instructions") |
| 44 | } |
| 45 | |
| 46 | return nil |
| 47 | } |
| 48 | |
| 49 | func writeAgentsFile(filename string) (bool, bool, error) { |
| 50 | _, err := filepath.Abs(filename) |
nothing calls this directly
no test coverage detected