Skip to content

Commit b6b48b5

Browse files
authored
Merge pull request #83 from microsoft/copilot_steps
Add Copilot coding agent environment configuration
2 parents 7d4aaa9 + ec03b40 commit b6b48b5

File tree

2 files changed

+109
-0
lines changed

2 files changed

+109
-0
lines changed

.github/copilot-instructions.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copilot Instructions for Jericho
2+
3+
Jericho is a Python library that connects learning agents with interactive
4+
fiction (text adventure) games via a Z-machine interpreter (frotz).
5+
6+
## Building the Project
7+
8+
```bash
9+
pip install -e '.'
10+
```
11+
12+
This compiles the frotz C library and installs jericho in development mode.
13+
Run tests with `pytest -vv tests/`.
14+
15+
## Game ROMs
16+
17+
Game ROM files (`.z3`, `.z5`, `.z8`, etc.) live in the `roms/` directory.
18+
19+
To download games from the canonical game suite:
20+
21+
```bash
22+
# Download a specific game
23+
curl -fsSL "https://raw.githubusercontent.com/BYU-PCCL/z-machine-games/master/jericho-game-suite/<game>.z5" -o roms/<game>.z5
24+
25+
# Browse the full suite at:
26+
# https://github.com/BYU-PCCL/z-machine-games/tree/master/jericho-game-suite
27+
```
28+
29+
## External Resources
30+
31+
### IFDB — Interactive Fiction Database
32+
33+
Use https://ifdb.org/ to look up game metadata, descriptions, ratings, and
34+
details. Useful API patterns:
35+
36+
- Search for a game: `https://ifdb.org/search?searchfor=<game+name>`
37+
- View a game page: `https://ifdb.org/viewgame?ifid=<IFID>`
38+
39+
### Transcripts — allthingsjacq.com
40+
41+
Game transcripts and walkthroughs are available at https://allthingsjacq.com/.
42+
Use these to understand expected game behavior, solutions, and interaction
43+
patterns.
44+
45+
### Walkthroughs (local)
46+
47+
This repository does not ship a `walkthroughs/` directory by default. If you
48+
create one locally, use it to store walkthrough files that map game filenames
49+
to sequences of actions.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "Copilot Setup Steps"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
pull_request:
9+
paths:
10+
- .github/workflows/copilot-setup-steps.yml
11+
12+
jobs:
13+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
14+
copilot-setup-steps:
15+
runs-on: ubuntu-latest
16+
17+
permissions:
18+
contents: read
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: "3.13"
28+
29+
- name: Install build tools
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y build-essential gcc make
33+
34+
- name: Install jericho in development mode
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install -e '.'
38+
pip install pytest pytest-asyncio
39+
40+
- name: Download game ROMs from jericho-game-suite
41+
run: |
42+
GAME_SUITE_BASE_URL="https://raw.githubusercontent.com/BYU-PCCL/z-machine-games/master/jericho-game-suite"
43+
mkdir -p roms
44+
ROMS=(
45+
905.z5 acorncourt.z5 advent.z5 adventureland.z5 afflicted.z8
46+
anchor.z8 awaken.z5 balances.z5 ballyhoo.z3 curses.z5
47+
cutthroat.z3 deephome.z5 detective.z5 dragon.z5 enter.z5
48+
gold.z5 hhgg.z3 hollywood.z3 huntdark.z5 infidel.z3
49+
inhumane.z5 jewel.z5 karn.z5 library.z5 loose.z5
50+
lostpig.z8 ludicorp.z5 lurking.z3 moonlit.z5 murdac.z5
51+
night.z5 omniquest.z5 partyfoul.z8 pentari.z5 planetfall.z3
52+
plundered.z3 reverb.z5 seastalker.z3 sherbet.z5 sherlock.z5
53+
snacktime.z8 sorcerer.z3 spellbrkr.z3 spirit.z5 temple.z5
54+
theatre.z5 trinity.z4 tryst205.z5 weapon.z5 wishbringer.z3
55+
yomomma.z8 zenon.z5 zork1.z5 zork2.z5 zork3.z5 ztuu.z5
56+
)
57+
for filename in "${ROMS[@]}"; do
58+
echo "Downloading $filename..."
59+
curl -fsSL "$GAME_SUITE_BASE_URL/$filename" -o "roms/$filename" || echo "Warning: could not download $filename"
60+
done

0 commit comments

Comments
 (0)