Liferayのソースコードを対象に、対応する整形ツールとルールを使って形式をそろえ、生成ファイルを避けながら修正対象を確認できます。
- モジュールのソースを整形したいとき
- コミット済み変更の書式を確認したいとき
- Goやシェルの整形ルールを適用したいとき
ブランチの変更内容から影響しそうな箇所を見極め、マージ前に実行するテストを選んで、20分以内を目安に動かせるシェルスクリプトにまとめます。
Generate a targeted local test plan for branch changes. Use when the user wants to know which tests to run before merging, asks for a test plan, wants to validate changes locally, or mentions running tests for their branch. This skill analyzes commits on top of master. It builds and starts the portal, then writes and runs a shell script of integration, Playwright, and Poshi tests that fits a 20 minute local budget.
実行スコア 未検証
インストール方法を見るブランチと master の差分を読み、変更された振る舞いと影響範囲に合うテストを選びます。関連するテストファイルの存在を確認したうえで、必須テストと優先度の高い候補を整理し、Integration、Playwright、Poshi のテストを実行するシェルスクリプトを作成して実行します。所要時間はポータルの起動を含めて20分以内を目安に調整し、結果を build/test-plan/result.json に記録します。網羅的な全件実行ではなく、変更箇所で起こりやすい回帰を事前に確かめるための計画です。
マージ前にどのテストを実行するか絞りたいときや、ブランチの変更をローカルで検証したいときに使えます。変更が多く、テストをすべて実行すると時間がかかる場合にも、影響するコード経路を調べて候補を優先づけます。
対象は Integration、Playwright、Poshi のテストです。ユニットテストは含めません。ポータルのビルドや起動が必要になる場合があります。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Produce a runnable shell script that executes the tests most likely to regress given the current branch's changes compared to master.
The full test suite takes hours to run, so the team merges aggressively and relies on a daily full-suite run that delivers results within 24 hours of merge. This skill produces a focused premerge script (under 20 minutes) that mitigates risk without attempting full coverage — its goal is to catch the most likely regressions, not every possible one.
Include only integration, Playwright, and Poshi tests. Never add a unit test.
Consult the reference file for detailed test organization patterns:
${CLAUDE_SKILL_DIR}/references/test-organization.md
git diff master...HEAD --name-only
git log master..HEAD --oneline
Read the changed files to understand what the changes actually do — not merely which files were touched, but what behavior changed. This understanding drives the test selection.
Every plan includes these tests:
modules/test/portal-smoke-test.git diff --name-only master...HEAD lists.| Changed Path | Condition | Test |
|---|---|---|
*.batch-engine-data.json | Any change | CompanyLocalServiceTest |
resource-actions/*.xml | Any change | ResourceActionsDefinitionTest |
src/main/java/**/*Configuration.java | Any change | ModuleConfigurationLocalizationTest |
src/main/java/**/*Portlet.java | Added | PortletTitleTest |
src/main/java/**/*ResourceImpl.java | Added, or its implements line changed | JAXRSResourceTest |
src/main/resources/site-initializer/** | Any change | BundleSiteInitializerTest |
Consider the blast radius of each change:
portal-kernel, *-api modules): Anything that depends on the changed API could regress. Search for consumers.The objective is not to "find every test in modules that were touched" — it is to find tests that exercise the code paths that changed.
For each area that could regress, search for test files. Use parallel Agent and Glob calls for speed. Consult ${CLAUDE_SKILL_DIR}/references/test-organization.md for the exact patterns and conventions.
Verify every test file exists before including it in the plan.
Put every required test in the script's # Required block. Write the Script shows where that block goes. Never drop a required test for any reason, including the budget.
The 20 minutes include starting or restarting the portal. They do not include building it. Probe the portal as .claude/rules/tomcat.md describes before estimating the budget. Fill the # Selected block from what is left of the 20 minutes. Add only the tests the change needs, in this priority order:
Integration tests that directly exercise the changed functionality and are not already required.
Representative integration tests from affected downstream modules — choose a few that cover distinct usage patterns rather than running them all.
Playwright tests for affected web modules (approximately 1–3 minutes per spec).
Poshi tests (approximately 2–5 minutes each).
Drop a candidate test only when it does not fit the budget or when reading the test shows that it does not reach the change. Never drop a test on reasoning about the change alone, without reading the test.
When the change affects many modules (for example, a framework change), do not attempt to test every single module. Choose a diverse sample that covers different usage patterns of the changed code.
When <bundles> holds no tomcat-* directory, build the bundle first. From the repository root, run ant -buildfile build-dist.xml unzip-tomcat. Then run ant all -Dgradle.stop.daemon.enabled=false.
Deploy the branch to the bundle unless the step above or the pr-check skill already did. The pr-check skill already deployed the branch when a log under build/pr-check/full-portal-build or build/pr-check/per-module-compile reports BUILD SUCCESSFUL. The log must also be newer than the commit time that git log --format=%ct --max-count=1 HEAD prints. Otherwise, run ant all -Dgradle.stop.daemon.enabled=false from the repository root when the branch changes portal core, and run <gradlew> deploy from each changed module outside portal core whose name does not end in -test. Portal core is portal-impl, portal-kernel, portal-test, portal-web, support-tomcat, and the util-* projects.
Probe the portal as .claude/rules/tomcat.md describes. Bounce it when the branch changes portal core. Otherwise, start it when it is not ready.
Write the script to build/test-plan/test.sh under the repository root. Create the directory if it does not exist. Delete any build/test-plan/result.json from an earlier run and any test.sh left at the repository root. The script must be self-contained and runnable via bash build/test-plan/test.sh. Use this structure:
#!/usr/bin/env bash
#
# Test plan for branch: <branch-name>
# Generated: <date> at <head-SHA>
# Estimated time: <X>m / 20m budget
#
# Changes: <N> commits, <N> files changed
# Affected areas: <list of module groups or components>
#
# Dropped:
# - <test>: <reason>
#
set -o errexit
set -o nounset
set -o pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/../.."
_EXIT_CODE=0
_RESULTS=()
function _run {
if "${@}"
then
_RESULTS+=("{\"command\": \"${*}\", \"result\": \"passed\"}")
else
_EXIT_CODE=1
_RESULTS+=("{\"command\": \"${*}\", \"result\": \"failed\"}")
fi
}
# Required
<test commands — one per line, no blank lines between them>
# Selected
<test commands — one per line, no blank lines between them>
printf '{"head": "%s", "tests": [%s]}\n' "$(git rev-parse HEAD)" "$(IFS=,; echo "${_RESULTS[*]-}")" > build/test-plan/result.json
exit ${_EXIT_CODE}
Critical rules for the script:
<test commands> block with the actual commands. Start every command with _run. The script exits with ${_EXIT_CODE} at the end — 0 when all tests pass, 1 when any fail../gradlew --project-dir ./modules for Gradle tasks (the script's cd puts the repository root as the working directory).npx --prefix ./modules/test/playwright playwright test for Playwright.# Nothing required under the # Required comment. Do not leave the comment out.# Dropped: in the script's header comment.After writing the script, mark it executable with chmod +x build/test-plan/test.sh.
Run build/test-plan/test.sh. Report each test's result from build/test-plan/result.json. Leave the portal running.
0, with a header that explains why.まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
Liferayのソースコードを対象に、対応する整形ツールとルールを使って形式をそろえ、生成ファイルを避けながら修正対象を確認できます。
不具合の説明や修正コミットから必要事項を整理し、再現手順や期待・実際の動作を含むバグチケットをLPDプロジェクトのJiraに登録できます。
説明やコミット内容をもとに、必要な情報を整えてLPDプロジェクトのJiraにタスクを登録し、チケット番号と閲覧URLを受け取れます。
Liferay向けのMarkdown文書を、前付けの順序や見出しの表記、シェル記法、文章の調子まで整え、リポジトリの規約に沿った読みやすい形に仕上げます。
LiferayのPoshi `.testcase` を内容に応じてPlaywright、Jest、JUnit、Java統合テストへ移行し、既存テストとの重複や移行を妨げる条件も整理します。
LiferayコンポーネントのPoshiテストを調べ、重複するテストを統合・整理する計画を立ててから、確認しやすい単位でテスト数を減らします。