AgentSkillsCN

jeopardy-project

为打造“危险边缘”游戏提供互动式项目指导。根据当前阶段判断下一步行动,在用户陷入困境时,及时提示相关基础知识。当用户说“危险边缘”、“项目求助”、“项目接下来该做什么”、“我之前做到哪一步了”,或需要游戏项目的具体指导时,可使用此技能。

SKILL.md
--- frontmatter
name: jeopardy-project
description: Interactive project guidance for building the Jeopardy game. Checks current phase, suggests next steps, points to relevant fundamentals when stuck. Use when user says "jeopardy", "project help", "what's next for the project", "where was I", or needs guidance on the game project.

Jeopardy Project Guidance

Instructions

When invoked, guide the student through the Jeopardy project with Socratic questioning.

1. Check Current Status

Read progress.json to understand where they are:

python
# Check these fields:
projects.jeopardy_game.status          # not_started, in_progress, completed
projects.jeopardy_game.current_phase   # 1-5 or null
projects.jeopardy_game.milestones      # Which are completed
projects.jeopardy_game.functions_implemented  # Per-function tracking

2. Determine Current Phase

If these milestones are incompleteThey're in
data_explorationPhase 1 (Data)
database_setup, sql_queries_workingPhase 2 (Database)
board_generation, answer_checkingPhase 3 (Game Logic)
cli_playablePhase 4 (CLI)
full_game_workingPhase 5 (Polish)

3. Guide Based on Phase

Phase 1 (Data):

  • Functions: load_sample_data, validate_clue, clean_clues, get_categories
  • Ask: "Have you explored the sample data in pylearn yet?"
  • Ask: "What fields does each clue have? Which are required?"
  • Point to: Notebook 06 cells 10-12 for JSON, Notebook 03 for dicts
  • Suggest starting with load_sample_data() if just beginning

Phase 2 (Database):

  • Functions: create_database, load_clues_to_db, get_random_clue, get_usable_categories
  • Ask: "Why do you think we're using a database instead of just keeping clues in a list?"
  • Ask: "Can you write a SQL query to get a random SCIENCE clue worth $400?"
  • Point to: Notebook 11 for SQL basics
  • Suggest trying queries in pylearn with sqlite3 first

Phase 3 (Game Logic):

  • Functions: normalize_answer, check_answer, calculate_score_change, generate_board
  • Ask: "What are all the ways someone might type 'George Washington'?"
  • Ask: "Why do we want these functions to be 'pure' with no side effects?"
  • Point to: Notebook 05 for functions, Notebook 02 for string methods
  • Emphasize testing each function in pylearn before moving on

Phase 4 (CLI):

  • Functions: display_board, get_category_selection, get_value_selection, play_game
  • Ask: "What's the structure of a game loop?"
  • Ask: "What should happen if someone types 'banana' instead of a category?"
  • Point to: Notebook 04 for loops, input validation
  • This is where it becomes a real game!

Phase 5 (Polish):

  • Extensions: fuzzy matching, statistics, save/load, multiple players
  • Ask: "What would make the game feel more polished?"
  • Suggest specific enhancements based on interest

4. Suggest Next Steps

Based on current status, suggest the specific next function to implement:

code
You're in Phase 1 and have implemented load_sample_data.
Next up: validate_clue()

This function checks if a clue is usable for our game.
Before you start, let me ask: What do you think makes a clue "unusable"
in a text-based game?

5. Connect to Fundamentals

When they're stuck, connect back to what they've learned:

Concept neededReference
Loading JSONNotebook 06, cells 10-12
Dictionary accessNotebook 03
List comprehensionsNotebook 04
SQL queriesNotebook 11
String methodsNotebook 02
Pure functionsNotebook 05
DataclassesNotebook 10
While loopsNotebook 04

6. Update Progress After Work

After helping them complete work:

  1. Update progress.json with completed functions
  2. Mark milestones if achieved
  3. Add notes about wins or struggles
  4. Suggest updating session_log.md

7. Socratic Prompts by Phase

Phase 1:

  • "What makes a clue 'unusable' for our text-based game?"
  • "If you had to pick 6 categories, how would you find them?"

Phase 2:

  • "Why can't we just search through a list of 200K clues?"
  • "What query would get you a random $400 SCIENCE clue?"

Phase 3:

  • "What are all the ways someone might type 'George Washington'?"
  • "Why do we want game logic separate from display code?"

Phase 4:

  • "What should happen if someone types 'banana' for a category?"
  • "How do we know when the game is over?"

Phase 5:

  • "What would make the answer matching smarter?"
  • "What statistics would be interesting to track?"

8. Celebrate Wins

Explicitly acknowledge:

  • First time loading real Jeopardy data
  • First successful SQL query
  • Answer checker working
  • Playing their first complete game!

Example Output

code
## Jeopardy Project Status

**Current Phase:** 2 (Database)
**Milestones:** data_exploration ✓, database_setup (in progress)

### What you've done:
- Loaded and explored the sample data
- Implemented clue validation
- Filtered to clean clues

### Next up: `create_database()`

This function creates the SQLite database with our clues table.

Before we dive in, let me ask: Why do you think we need a database?
We could just keep all the clues in a Python list...

(Hint: Think about what happens when we have 200,000 clues)

When you're ready, check out Notebook 11 for SQL basics, then try
creating a simple table in pylearn first.