Skip to content
35 changes: 35 additions & 0 deletions .github/copilot-instructions.md
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot make this terse, it should only document the AGENTS.md and the tools available as well as instructions for running tests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Made terse in fb2f320. The file now only includes:

  • Reference to AGENTS.md for primary context
  • Available tools table (pytest, ruff, mypy, deepwork)
  • Test running instructions
    Reduced from 128 lines to 35 lines.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# GitHub Copilot Development Environment

**Primary agent instructions**: See [`AGENTS.md`](../AGENTS.md) for complete repository context.

## Environment Setup

GitHub Copilot agents use uv/Python (not Nix) because Nix causes Bash tool calls to hang. Setup is handled by `.github/workflows/copilot-setup-steps.yml`:

```bash
uv sync --extra dev
```

## Available Tools

All tools must be run via `uv run`:

| Tool | Command |
|------|---------|
| **pytest** | `uv run pytest tests/ -v` |
| **ruff** | `uv run ruff check src/` |
| **mypy** | `uv run mypy src/` |
| **deepwork** | `uv run deepwork` |

## Running Tests

```bash
# All tests
uv run pytest tests/ -v

# Specific test file
uv run pytest tests/test_example.py -v

# With coverage
uv run pytest tests/ --cov=deepwork --cov-report=html
```
53 changes: 40 additions & 13 deletions .github/workflows/copilot-setup-steps.yml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot create .github/copilot-instructions.md that indicates how development can be done given these setup steps.

It should only really document this leaving the primary context defined in AGENTS.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Created in ec99005. The .github/copilot-instructions.md file documents:

  • Environment setup steps (uv, Python 3.11, dependencies)
  • Available tools and how to use them via uv run
  • Development workflow (testing, linting, type checking)
  • Why Nix isn't used for Copilot workflows
  • References to AGENTS.md for primary context

Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,49 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# TODO this will cause all of copilot agents Bash tool calls to silently hang (which it won't complain about)
# NOTE: Nix would be the preferred environment, but it causes Copilot agent
# Bash tool calls to silently hang. Using uv/Python setup as a workaround.
# - name: Install Nix
# uses: cachix/install-nix-action@v31
# with:
# nix_path: nixpkgs=channel:nixos-unstable
# - uses: nicknovitski/nix-develop@v1

# - name: Cache UV dependencies
# uses: actions/cache@v4
# with:
# path: |
# ~/.cache/uv
# .venv
# key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
# restore-keys: |
# ${{ runner.os }}-uv-

# - name: Install dependencies
# run: uv sync --extra dev
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Cache UV dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/uv
.venv
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-

- name: Install dependencies
run: uv sync --extra dev

- name: Verify environment setup
run: |
echo "Python version:"
python --version
echo ""
echo "UV version:"
uv --version
echo ""
echo "Pytest available:"
uv run pytest --version
echo ""
echo "Ruff available:"
uv run ruff --version
echo ""
echo "Environment setup complete!"
Loading