Skip to content
2 changes: 1 addition & 1 deletion .agents/skills/add-tasks/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- Source: `https://kenkoooo.com/atcoder/resources/problems.json`
- atcoder.jp is unreachable and WebFetch truncates problems.json, so a miss there is not evidence of absence — ask the user to paste the rows
- Use `id` / `problem_index` / `name` / `title` verbatim; do not derive `id` from contest_id
- ICPC Prelim / ICPC Regional / JAG Prelim: set `problem_index` to the problem letter, not the AOJ problem id — A, B, C... in ascending problem id within the contest, as `assignProblemLetters` does on import. `seed_problem_letters.test.ts` checks this
- AOJ ICPC and every AOJ JAG contest (Prelim, Regional, training camps): set `problem_index` to the problem letter, not the AOJ problem id — A, B, C... in ascending problem id within the contest, as `assignProblemLetters` does on import. When a problem before the last one is missing from AOJ, take the letters from the maintainer's problem list and add the contest to `LETTERS_OF_SHIFTED_CONTESTS`. Keep `title` plain, without a `<problem id>. ` prefix. `seed_problem_letters.test.ts` checks both

## Tests

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 完了分(PR0 / PR1 / PR1.5)— 意思決定の要約

**状態**: PR0 完了(#4212)・PR1 完了(#4217)・PR1.5 実装済み(ブランチ `#4028`、`471ad20c`)。全体像は [plan.md](./plan.md)、根拠データは [investigation.md](./investigation.md)。
**状態**: PR0 完了(#4212)・PR1 完了(#4217)・PR1.5 完了(#4219)。全体像は [plan.md](./plan.md)、根拠データは [investigation.md](./investigation.md)。

コードと git の履歴から読み取れない判断と事実だけを残す。変更したファイルや関数は #4212 / #4217 と `471ad20c` の差分を見る。PR1.5 は [末尾](#pr15--aoj-api-の移転に追従する4028)。

Expand Down Expand Up @@ -41,7 +41,7 @@ PR2 以降の計画には含めていない。
- 2016 年の JAG 模擬国内を API から取り込むと、記号が seed と食い違う(Codex / CodeRabbit)。直すなら、取り込みで 2 回開催を `A` / `B` の `contest_id` に分け、それぞれ A から振る。`getContests` 側もそろえる
- seed 整合テストの期待値を `assignProblemLetters` で作っている(Codex)。testing.md の「期待値は literal」に合わない。PR2 では補正したコンテストだけを literal にする(M18)。全件を literal にするかは未判断
- `src/lib/services/tasks.ts` の `title.replace(task_table_index, …)` は、AOJ の問題に ContestTaskPair を作るとタイトル本文を置換する(Codex)。AOJ の pair は現在 0 件。直すときは先頭の `${index}. ` だけを置換し、`Amidakuji` のような本文と `A. Title` の両方を回帰テストに含める
- コンテスト表のスクリーンショットでの目視確認
- コンテストテーブルのスクリーンショットでの目視確認

---

Expand Down Expand Up @@ -76,4 +76,4 @@ PR2 以降の計画には含めていない。
### 残っている確認

- ~~コンテナを再ビルドした後、ローカルの管理画面で AOJ から取得できること~~ — 2026-10-24 にメンテナが確認した
- staging に入った後の JAG REGIONAL の取り込み(PR2 の前提)が、Vercel 上での実地の確認を兼ねる([plan-pr2.md](./plan-pr2.md#着手前にすること))。念のため、こちらからの取得ツールは新しいホストへの接続を拒否され(`ECONNREFUSED`)、旧ホストには届いて 410 を受けた。新しいホストが一部の送信元を拒んでいる可能性があるので、staging で失敗したら接続元の制限を疑う
- ~~staging(Vercel)での取り込み~~ — 2026-10-24 にメンテナが JAG REGIONAL を取り込み、16 / 158 になった([plan-pr2.md](./plan-pr2.md#範囲))。こちらの取得ツールが新しいホストに `ECONNREFUSED` で拒まれたことから送信元の制限を心配していたが、Vercel からは問題なく取得できた
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PR0 / PR1 だけに関わる調査(出典欄の呼び出し元、テストの

# 1. PR2 の照合(2026-10-24)

メンテナのスプレッドシート(スクリーンショット 16 枚、行 2〜1025。上が新しい)と、本番の問題一覧の JAG 模擬地区(スクリーンショット 10 枚、158 問)を目視で突き合わせた。**目視による暫定の結果**であり、確定は [plan-pr2.md](./plan-pr2.md#2-0-照合) のスクリプトで行う。
メンテナのスプレッドシート(スクリーンショット 16 枚、行 2〜1025。上が新しい)と、本番の問題一覧の JAG 模擬地区(スクリーンショット 10 枚、158 問)を目視で突き合わせた。**目視による暫定の結果**であり、確定は [plan-pr2.md](./plan-pr2.md#2-2-照合) のスクリプトで行う。

スプレッドシートで折りたたまれた行(40–50 ほか 19 か所)は JAG 模擬国内だけで、合宿系・模擬地区は含まない(メンテナに確認済み)。

Expand Down Expand Up @@ -228,17 +228,17 @@ AtCoder 側(`AOJ_*` 以外)で title が `${task_table_index}. ` で始ま

## PR2 の範囲の本番と staging(2026-10-24)

SQL A([plan-pr2.md](./plan-pr2.md#着手前の確認2026-10-24-に回答済み))の結果。
本番と staging で範囲の状態を集計した結果(SQL は [plan-pr2.md](./plan-pr2.md#確かめ方))。

| 範囲 | 本番 | staging | index が問題 ID のまま | title が問題 ID 付き |
| -------- | -------- | ---------- | ---------------------- | -------------------- |
| Regional | 16 / 158 | **2 / 16** | 全行 | 0 行 |
| Spring | 4 / 42 | 4 / 42 | 全行 | 全行 |
| Summer | 36 / 338 | 36 / 338 | 全行 | 全行 |
| Winter | 10 / 87 | 10 / 87 | 全行 | 全行 |
| 範囲 | 本番 | staging | index が問題 ID のまま | title が問題 ID 付き |
| -------- | -------- | ------------------------------- | ---------------------- | -------------------- |
| Regional | 16 / 158 | 16 / 158(取り込み前は 2 / 16) | 全行 | 0 行 |
| Spring | 4 / 42 | 4 / 42 | 全行 | 全行 |
| Summer | 36 / 338 | 36 / 338 | 全行 | 全行 |
| Winter | 10 / 87 | 10 / 87 | 全行 | 全行 |

- staging には模擬地区が 2 コンテストしか無い。PR2 の前に staging で取り込み、本番とそろえる
- 本番の模擬地区 158 問(SQL B)は、AOJ の一覧のスクリーンショットと問題名・問題 ID がすべて一致した。grade が付いているのは 6 問
- staging には当初、模擬地区が 2 コンテスト / 16 問しか無かった。PR1.5(#4219)の後に staging で取り込み、本番と同じ 16 / 158 にそろえた(2026-10-24)
- 本番の模擬地区 158 問([plan-pr2.md](./plan-pr2.md#2-1-seed-に模擬地区を足す) の SQL で取り出したもの)は、AOJ の一覧のスクリーンショットと問題名・問題 ID がすべて一致した。grade が付いているのは 6 問
- 本番の 3355 の title の末尾にタブがある(`Most distant point from the stations\t`)。前後に空白のある title はほかにもある(下記)

## 前後に空白のある title
Expand Down Expand Up @@ -285,7 +285,7 @@ AOJ 問題 ID の連番性を調べると、seed の 129 コンテスト中 128

**プレフィックスは合宿系の 467 件すべてで `task_id` と完全に一致していた(不一致 0 件)。** したがって除去も復元も機械的に安全に行える。

模擬地区は管理画面の取り込みで本番に入っており、取り込みは導入時(2024-10、`7dcc5e4c`)から `problem.name` をそのまま title にしている。SQL A でもプレフィックスは 0 行だった(本番・staging)。
模擬地区は管理画面の取り込みで本番に入っており、取り込みは導入時(2024-10、`7dcc5e4c`)から `problem.name` をそのまま title にしている。範囲の集計でもプレフィックスは 0 行だった(本番・staging)。

退行の機序(title を直さずに index だけ記号にした場合):

Expand All @@ -305,7 +305,7 @@ PR2 後: index='A', title='2389. Asynchronous Exceptions'
| AOJ ICPC/JAG(更新対象) | 1,099 | **無条件に可能**。`task_table_index == task_id` が例外ゼロで成立(seed、PR1 の前) |
| その他(AtCoder 等) | 1,367 | **条件付き**。84.2%(1,151 件)は `task_id` のサフィックスから導出できるが、216 件は例外 |

本番だけにある模擬地区 158 件も、SQL A で全行 `task_table_index == task_id` だった(2026-10-24)。
本番にある模擬地区 158 件も、範囲の集計で全行 `task_table_index == task_id` だった(2026-10-24)。

導出できない 216 件の内訳: `abc` 41(`abc318_h` に対し index は `Ex`)、`typical` 32、 `APG` 27(`APG4bPython_co` に対し index は `EX8`)、`arc` 27、`tdpc` 20、 `math-and-algorithm` 15、ほか(`task_id` にサフィックスが無い AOJ 大学系 29 件を含む)。

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PR2.5 — 合宿系と JAG 模擬地区をコンテスト表に出す
# PR2.5 — 合宿系と JAG 模擬地区のコンテスト別のテーブルを作る

前提と共通の決定は [plan.md](./plan.md)。並び順の一覧は [investigation.md](./investigation.md#表示順76-コンテスト)。

Expand Down
Loading
Loading