本文へ移動
cccskills
無料GitHub で公開

e2e-parity

Use after the backend follows the model — derive E2E flow scripts from Lean golden traces, replay them against the Lean-backed dev screens and the real REST backend with Playwright, and compare observations. Also use to add a flow when a new command or screen appeared.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md3.5 KB
  • scripts/flows-from-golden.mjs5.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

E2E(Lean × REST の一致)

人間が Lean CLI 相手の画面で確かめた挙動と、追随させた backend(REST)が同じ観測を返すことを、画面を実際に辿って突き合わせる。

手順

  1. 台本を起こす: このスキルの scripts/flows-from-golden.mjs --out e2e/scenarios/from-golden.json。 golden の trace から人物・手・通った / 断られた・そのとき見えた口を機械で列挙する。手で台本を書かない。 外部能力を使う流れでは、内部入力(通知・worker)の手が kind: "observation" として、環境(environment: { name, script }。script は CLI の応答のもので、途中で止めた流れの「期待したのに呼ばれなかった」尾はここから読む)と外部能力の往復(interactions)とともに台本に付く。 既に手書きの台本を持つプロジェクトは、台本を from-golden.json と同じ steps の形(command / actor / outcome)に寄せ、置き場を cradle.json の e2e.scenarios に書いて scripts/flows-from-golden.mjs --check を回す(受け入れの条件は e2e 規則)。
  2. 画面への写し: 各手を「どの画面で・どの要素を・どう操作するか」に写す(ここだけが手書き)。ID に頼らず、ラベル + 当事者で紙面を特定する。日付は相対指定。 内部入力(kind: "observation")と外部能力の答えは画面の操作に写さない。テスト構成だけのドライバーが、流れの environment.script を生成された Port のモックに積み(消費した往復は手ごとの interactions、途中で止めた流れの「期待したのに呼ばれなかった」尾は script の残り)、内部入力を検証済みの受信経路へ届ける。DB を直接書き換えない。注入口は本番の構成に無い。障害の指名(fault)の手は実装の注入手段で再現し、contract が言う観測と突き合わせる(e2e 規則)。
  3. 前提: local スタック(infra-implement フェーズの成果物。infra.up で立て、cradle doctor --local が fresh)と Lean CLI サーバ、dev の画面。テスト用 DB は開発ループと分ける。
  4. 播種: REST 側の初期盤面は golden の init state から REST 経由で作る(DB への直接 INSERT は最小限、test-harness 専用と明記)。
  5. 実行: 両方をその場で走らせて突き合わせる。workers: 1。固定スリープでなく DOM の変化を待つ。
  6. 差分: 「backend の追随漏れ」か「モデルの見直し」かを切り分ける。後者は Lean に戻る(frontend 改修からやり直し)。

網羅

golden にある流れはすべて台本にする。拒否の手・自動で起きる帰結(番回しなど)・日付で変わる見え方(時計固定)・外部能力の答えと通知の順序(遅延・順序逆転・答えの喪失からの再開)を落とさない。実アプリでの通過はこのフェーズの成果で、Cradle 側では確かめない。 画面に出ない操作(管理専用など)は対象外と明記し、API 直叩きのテストに回す。

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when adding or changing REST endpoints or the OpenAPI contract — deriving endpoints from the Lean commands and views, writing documents/codebase/openapi.yaml first, then regenerating the backend controller interfaces and the frontend client.

日本語の概要は準備中です。原文の説明を表示しています。

asuka1975/cradle42026年10月1日 更新

Use after a backend build succeeds or whenever authentication, authorization, actor/identity handling, external service calls (IdP, JWKS, DB, clock), logging, observability, configuration or error contracts are in play — delegates to the backend-design-reviewer agent for a design-quality review of the current branch.

日本語の概要は準備中です。原文の説明を表示しています。

asuka1975/cradle42026年10月1日 更新

Use when it is time to make the backend follow the Lean model — regenerate Kotlin from Lean, implement the generated interfaces (UseCase, QueryService, Repository, Entity), wire every generated contract test, make the build green, then run the design and SQL reviews. Backend comes after the human confirmed the screens.

日本語の概要は準備中です。原文の説明を表示しています。

asuka1975/cradle42026年10月1日 更新

cradle

無料

Use when you need the current position in the Lean spec-driven pipeline, or any deterministic check of a Cradle project — status, golden regression, Lean layer walls, regeneration impact, unslop lint, ddd cleanup. Runs the scripts under scripts/ and reports their output verbatim.

日本語の概要は準備中です。原文の説明を表示しています。

asuka1975/cradle42026年10月1日 更新

Use to start a new product on Cradle or to add the Cradle skeleton to an existing repository — writes cradle.json, the project-facts instruction (.apm/instructions/project.instructions.md), documents/{ddd,ai-notes,infra-design,codebase} templates, CI, and a compiling Lean executable-spec scaffold with a minimal example domain, mockup and CLI.

日本語の概要は準備中です。原文の説明を表示しています。

asuka1975/cradle42026年10月1日 更新

Use when the product owner asks where the project stands, what to do next, or which phase of the Lean spec-driven pipeline is current — runs cradle status and proposes exactly one next step.

日本語の概要は準備中です。原文の説明を表示しています。

asuka1975/cradle42026年10月1日 更新

asuka1975 のスキルをすべて見る

このスキルの問題を報告する