Scaffolded templates put @ref LLP comments above the frontmatter, silently killing every key (alwaysRun, model, description)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
調査の方向性
src/config/load.ts:386 の parseFrontmatter から始め、templates/ 配下の4つのファイルを調査し、続いて src/config/load.ts:173-175 での利用箇所と src/core/prompts.ts:726 での説明のレンダリングを追跡します。完了条件は、新しく scaffold されたリポジトリで templates の frontmatter キーが保持され、提供されているすべての template が空でないキー集合としてパースされることを確認する regression test があることです。
索引モデルが issue の本文から書いたものです。
説明
Summary
Every markdown template we ship starts with an @ref LLP … HTML comment placed above the opening ---. The frontmatter parser requires --- at byte 0, so in a freshly scaffolded repo the frontmatter of the coordinator and all three agents parses as nothing at all. Every key is silently dropped — no error, no warning, no doctor complaint.
Found while scaffolding expo/expo with 0.10.0.
Root cause
src/config/load.ts:386:
export function parseFrontmatter(md: string): { data: Record<string, string>; body: string } {
if (!md.startsWith("---")) {
return { data: {}, body: md };
}
Any leading byte — including a comment we ourselves put there — returns { data: {} } and hands the whole file back as body.
All four shipped templates trip it:
$ for f in templates/coordinator.md templates/agents/*.md; do printf "%-40s %s\n" "$f" "$(head -c 3 "$f")"; done
templates/coordinator.md <!-
templates/agents/consistency.md <!-
templates/agents/correctness.md <!-
templates/agents/security.md <!-
Impact
Consumed at src/config/load.ts:173-175, so the dropped keys fall back to defaults:
| Template | Key lost | Consequence |
|---|---|---|
agents/security.md |
alwaysRun: true |
The security agent stops being always-run. It is now only included when the router happens to pick it. |
agents/security.md |
model: anthropic/claude-opus-5 |
Security reviews run on the config default instead of Opus. |
coordinator.md |
model: anthropic/claude-opus-5 |
Consolidation and the final decision run on the default model. |
| all three agents | description |
The router prompt renders (no description) for every agent — see src/core/prompts.ts:726. Routing has nothing to discriminate on. |
alwaysRun is the serious one: src/config/load.ts:174 tests the value against "", so it becomes false, and the guarantee that security always reviews every PR is quietly gone.
Reproduction
Scaffold a fresh repo and run any review. Observed on a real run against expo/expo PR #48510:
[coordinator] started claude-sonnet-5
Models used — … coordinator: anthropic/claude-sonnet-5
despite model: anthropic/claude-opus-5 sitting in coordinator.md.
Why it went unnoticed
This repo's own .expo-code-review/ files are correct — they start with ---. So do the hand-tuned configs in expo/eas-cli and brentvatne/euxy. Only a freshly scaffolded repo gets the broken shape, and the failure is silent, so nothing surfaces it.
Suggested fix
- Move the
@ref LLPannotations intemplates/coordinator.mdandtemplates/agents/*.mdto below the closing---, or into the frontmatter as#comment lines (the parser already allows those). - Consider making
parseFrontmattertolerate leading whitespace and HTML comments before the delimiter. It is a small change and stops this whole class of silent misconfiguration for adopters who add a license header or a comment of their own. - Add a
doctorcheck: if a prompt file contains a line matching^(description|alwaysRun|model|temperature):that the parser did not pick up, fail with a pointer to the delimiter. This is the check that would have caught it.
A regression test asserting that every shipped template's frontmatter parses to a non-empty key set would keep it from coming back.
- 主要言語
- TypeScript
- スター
- 4
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
expo/code-review-cli のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
expo/code-review-cli#55 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
expo/code-review-cli#54 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
expo/code-review-cli#53 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
expo/code-review-cli#36 ·
expo/code-review-cli の issue をすべて見る
似ている issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
lingdojo/kana-dojo#32663 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
Admin: Title Separator field can't be cleared (input falls back to "|")対応中かも @emdashbot が今日担当しました。 オープンbot:bug bot:in-review
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
emdash-cms/emdash#4236 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
PHP workflow streaming requests buffer the full SSE response対応中かも @Winoren が今日担当しました。 オープンreview: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
langgenius/dify#44270 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:holodeck review-finding
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
hyperdrive-technology/holodeck#142 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
code-yeongyu/senpi#3573 ·
メンテナーはふだん 1 日以内に返信