Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 9, 2025

This PR adds a comprehensive .github/copilot-instructions.md file that provides GitHub Copilot coding agents with detailed instructions for working effectively in the g repository.

What's Included

The instructions cover all essential aspects of working with the codebase:

Build & Development Workflow:

  • Validated build commands with exact timing measurements (12s initial build, 1.5s subsequent)
  • Build variants (lite: 7.4MB, full: 8.1MB) with Go build tags for optional features
  • Required tooling setup (gofumpt, golangci-lint) with installation commands
  • Complete development workflow with timeout specifications

Testing & Validation:

  • Test suite execution (11 seconds, all validated)
  • Manual validation scenarios with real file operations
  • End-to-end user scenarios for tree view, table format, JSON output
  • Git integration testing in different environments

CI/CD Requirements:

  • Code formatting requirements (gofumpt mandatory for CI)
  • Linting validation (golangci-lint with 3-minute timeout)
  • Multi-platform build verification matching GitHub workflows

Critical Timing Information:

  • NEVER CANCEL warnings with specific timeout recommendations
  • Complete workflow timing: ~90 seconds total
  • Performance expectations for different operations

Manual Testing Performed

All commands and scenarios in the instructions have been validated:

# Build variants tested
✅ Standard build: go build .
✅ Lite build: CGO_ENABLED=0 go build -ldflags="-s -w" -o g-lite .
✅ Full build: CGO_ENABLED=0 go build -ldflags="-s -w" -tags="fuzzy mounts" -o g-full .

# Functionality validation
✅ Tree view with icons and sizes
✅ Table format with timestamps  
✅ JSON output validation with jq
✅ Git integration behavior
✅ Shell integration (bash/zsh/fish aliases)

# Development tools
✅ Code formatting with gofumpt
✅ Linting with golangci-lint
✅ Complete test suite execution

The instructions follow the imperative tone requirement and include exhaustive validation steps to ensure any GitHub Copilot agent can successfully work in this codebase from a fresh clone.

Fixes #261.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@pull-request-size pull-request-size bot added size/L and removed size/XS labels Sep 9, 2025
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Add comprehensive GitHub Copilot instructions for the g CLI tool Sep 9, 2025
Copilot AI requested a review from equationzhao September 9, 2025 08:13
@equationzhao equationzhao marked this pull request as ready for review September 9, 2025 08:48
Copilot AI review requested due to automatic review settings September 9, 2025 08:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive GitHub Copilot coding agent instructions to enhance developer experience and productivity when working with the g CLI tool repository. The instructions provide detailed guidance on build processes, testing workflows, and development best practices.

  • Adds comprehensive .github/copilot-instructions.md with detailed development workflows
  • Updates multiple Go files to use explicit return statements for better code clarity
  • Includes validated build commands, timing expectations, and CI/CD requirements

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/copilot-instructions.md Comprehensive Copilot instructions covering build, test, and development workflows
internal/theme/color.go Makes return statements explicit in three functions
internal/git/git_status.go Makes return statement explicit in ParseShort function
internal/filter/itemfliter.go Makes return statements explicit in two functions
internal/display/printer.go Makes return statement explicit in prefixAndName function

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@equationzhao equationzhao merged commit c3e9fa1 into master Sep 9, 2025
11 checks passed
@equationzhao equationzhao deleted the copilot/setup-copilot-instructions branch September 9, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

2 participants