Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions agents/skills/grill-me/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: grill-me
description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
---

Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.

Ask the questions one at a time.

If a question can be answered by exploring the codebase, explore the codebase instead.
107 changes: 107 additions & 0 deletions agents/skills/prd-to-plan/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
name: prd-to-plan
description: Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in ./plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".
---

# PRD to Plan

Break a PRD into a phased implementation plan using vertical slices (tracer bullets). Output is a Markdown file in `./plans/`.

## Process

### 1. Confirm the PRD is in context

The PRD should already be in the conversation. If it isn't, ask the user to paste it or point you to the file.

### 2. Explore the codebase

If you have not already explored the codebase, do so to understand the current architecture, existing patterns, and integration layers.

### 3. Identify durable architectural decisions

Before slicing, identify high-level decisions that are unlikely to change throughout implementation:

- Route structures / URL patterns
- Database schema shape
- Key data models
- Authentication / authorization approach
- Third-party service boundaries

These go in the plan header so every phase can reference them.

### 4. Draft vertical slices

Break the PRD into **tracer bullet** phases. Each phase is a thin vertical slice that cuts through ALL integration layers end-to-end, NOT a horizontal slice of one layer.

<vertical-slice-rules>
- Each slice delivers a narrow but COMPLETE path through every layer (schema, API, UI, tests)
- A completed slice is demoable or verifiable on its own
- Prefer many thin slices over few thick ones
- Do NOT include specific file names, function names, or implementation details that are likely to change as later phases are built
- DO include durable decisions: route paths, schema shapes, data model names
</vertical-slice-rules>

### 5. Quiz the user

Present the proposed breakdown as a numbered list. For each phase show:

- **Title**: short descriptive name
- **User stories covered**: which user stories from the PRD this addresses

Ask the user:

- Does the granularity feel right? (too coarse / too fine)
- Should any phases be merged or split further?

Iterate until the user approves the breakdown.

### 6. Write the plan file

Create `./plans/` if it doesn't exist. Write the plan as a Markdown file named after the feature (e.g. `./plans/user-onboarding.md`). Use the template below.

<plan-template>
# Plan: <Feature Name>

> Source PRD: <brief identifier or link>

## Architectural decisions

Durable decisions that apply across all phases:

- **Routes**: ...
- **Schema**: ...
- **Key models**: ...
- (add/remove sections as appropriate)

---

## Phase 1: <Title>

**User stories**: <list from PRD>

### What to build

A concise description of this vertical slice. Describe the end-to-end behavior, not layer-by-layer implementation.

### Acceptance criteria

- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3

---

## Phase 2: <Title>

**User stories**: <list from PRD>

### What to build

...

### Acceptance criteria

- [ ] ...

<!-- Repeat for each phase -->
</plan-template>
114 changes: 114 additions & 0 deletions agents/skills/worldcup-fixtures/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
name: worldcup-fixtures
description: Fetch 2026 FIFA World Cup match fixtures from the official FIFA API, update a local JSON file, and add newly fetched games to the Cal.diy app calendar. Merges new games without duplicating existing ones, then opens a PR with the updated data. Use when asked to update World Cup fixtures, sync FIFA schedule, refresh World Cup game times, add World Cup games to calendar, or fetch match data for a specific country.
---

# World Cup Fixtures Updater

## Quick start

```
/worldcup-fixtures country=BR
```

Fetches all 2026 FIFA World Cup matches for the given country filter, merges them into `data/worldcup-2026-fixtures.json`, and opens a draft PR.

## Workflow

1. **Accept parameters**
- `country` (required) — FIFA country code (e.g. `BR`, `US`, `DE`). Filters to matches involving that country.
- `output` (optional) — path to the local fixtures file (default: `data/worldcup-2026-fixtures.json`).

2. **Fetch from FIFA API**

The tournament spans ~2 months; a single API call may not return all matches. Make **two requests** using date-window splits to ensure complete coverage:

```
# Request 1 — group stage + round of 16
GET https://api.fifa.com/api/v3/calendar/matches
?idCompetition=17
&idSeason=285023
&count=500
&language=en
&from=2026-06-01T00:00:00Z
&to=2026-07-01T00:00:00Z

# Request 2 — quarter-finals through final
GET https://api.fifa.com/api/v3/calendar/matches
?idCompetition=17
&idSeason=285023
&count=500
&language=en
&from=2026-07-01T00:00:00Z
&to=2026-07-20T00:00:00Z
```

Merge results from both requests by `IdMatch` before filtering.

Key response fields per match:
| Field | Description |
|---|---|
| `IdMatch` | Unique match ID — use as deduplication key |
| `Date` | UTC datetime string (`2026-06-11T19:00:00Z`) |
| `LocalDate` | Local kickoff time |
| `StageName[0].Description` | Phase (Group Stage, Round of 16…) |
| `GroupName[0].Description` | Group letter (null for knockout rounds) |
| `Home.IdCountry` | Home team's FIFA country code |
| `Home.TeamName[0].Description` | Home team name |
| `Away.IdCountry` | Away team's FIFA country code |
| `Away.TeamName[0].Description` | Away team name |
| `Stadium.Name[0].Description` | Venue name |
| `Stadium.CityName[0].Description` | Host city |
| `MatchStatus` | `0` = scheduled, `1` = live, `3` = finished |

3. **Filter by country** — keep only matches where either `Home.IdCountry` or `Away.IdCountry` equals the requested country code. Check **both** fields for every match — a country can appear as home or away in any match. If no country filter is requested keep all matches.

4. **Load the existing file** — read `output` path. If the file doesn't exist, treat the existing list as `[]`.

5. **Merge without duplicates** — build a set of existing `IdMatch` values. Append only matches whose `IdMatch` is not already present. Never modify existing entries.

6. **Write the updated file** — output format:

```json
{
"updatedAt": "2026-05-19T14:00:00Z",
"country": "BR",
"matches": [
{
"id": "300438203",
"date": "2026-06-11T19:00:00Z",
"localDate": "2026-06-11T15:00:00Z",
"stage": "Group Stage",
"group": "Group F",
"home": "Brazil",
"away": "Mexico",
"venue": "SoFi Stadium",
"city": "Los Angeles",
"status": "scheduled"
}
]
}
```

Map `MatchStatus` → `status`: `0` → `"scheduled"`, `1` → `"live"`, `3` → `"finished"`.

7. **Matches are shown as busy times in the Cal.diy scheduling calendar** — the fixtures JSON file is read server-side by `packages/features/busyTimes/lib/getWorldCupBusyTimes.ts`, which injects the matches as `EventBusyDetails` into the availability engine in `packages/features/availability/lib/getUserAvailability.ts`. No extra step is needed here — updating the JSON file is sufficient to make the matches appear as busy on the scheduling page.

8. **Report the result** — print a summary:
- How many matches were fetched from the API
- How many were new (added)
- How many were skipped (already existed)
- Total matches now in the file

9. **Open a draft PR** — commit the updated file and open a draft PR with title:
```
chore(fixtures): update 2026 World Cup fixtures for [COUNTRY] ([DATE])
```

## Notes

- The FIFA API returns UTC dates. Always preserve both `Date` (UTC) and `LocalDate` in the output so callers can choose.
- `IdSeason=285023` is the 2026 FIFA World Cup Canada/Mexico/USA season ID.
- `IdCompetition=17` is the FIFA World Cup competition ID (permanent).
- The API supports `from` and `to` query params (ISO datetime) if you need to limit the date window.
- If the API returns no matches, warn the user — the season ID may have changed. Verify at: `https://api.fifa.com/api/v3/calendar/matches?idCompetition=17&count=5&language=en&from=2026-01-01T00:00:00Z`
55 changes: 55 additions & 0 deletions agents/skills/write-a-prd/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
This skill will be invoked when the user wants to create a PRD. You should go through the steps below. You may skip steps if you don't consider them necessary.

1. Ask the user for a long, detailed description of the problem they want to solve and any potential ideas for solutions.

2. Explore the repo to verify their assertions and understand the current state of the codebase.

3. Interview the user relentlessly about every aspect of this plan until you reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one.

4. Once you have a complete understanding of the problem and solution, use the template below to write the PRD. The PRD should be written in the `plans/prd-name.md` file.

<prd-template>

## Problem Statement

The problem that the user is facing, from the user's perspective.

## Solution

The solution to the problem, from the user's perspective.

## User Stories

A LONG, numbered list of user stories. Each user story should be in the format of:

1. As an <actor>, I want a <feature>, so that <benefit>

<user-story-example>
1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
</user-story-example>

This list of user stories should be extremely extensive and cover all aspects of the feature.

## Implementation Decisions

A list of implementation decisions that were made. This can include:

- The modules that will be built/modified
- The interfaces of those modules that will be modified
- Technical clarifications from the developer
- Architectural decisions
- Schema changes
- API contracts
- Specific interactions

Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.

## Out of Scope

A description of the things that are out of scope for this PRD.

## Further Notes

Any further notes about the feature.

</prd-template>
Loading
Loading