ソース情報
- リポジトリ
- hpsgd/turtlestack
- ソースの最終更新活動
- 2026年5月23日 12:43
- 検出された SKILL.md の言語
- 英語
- スター
- 0
- フォーク
- 0
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/hpsgd/turtlestack --skill write-feature-specコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
SOC 職業分類に基づく
| name | write-feature-spec |
| description | Write a Behat feature specification in Gherkin with step definitions. |
| argument-hint | [feature or behaviour to specify] |
| user-invocable | true |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
| paths | ["**/*.php","**/*.feature"] |
Write a Behat feature spec for $ARGUMENTS.
Before writing any Gherkin:
Read existing features — match conventions:
find . -name "*.feature" -not -path "*/vendor/*" | head -20
find . -path "*/features/bootstrap/*" -name "*.php" | head -20
Check existing step definitions — reuse where possible:
grep -rn "@Given\|@When\|@Then" --include="*.php" features/ | head -30
Identify the domain language — what terms do product/business use? Use those, not technical terms
Confirm Behat is set up — composer.json should have behat/behat in require-dev, and behat.yml (or behat.yml.dist) should configure the suite path
Every feature file follows this structure:
# features/<feature-name>.feature
Feature: <Feature name in business language>
As a <role>
I want <capability>
So that <business value>
Background:
Given <common precondition shared by all scenarios>
Scenario: <Happy path — most common success case>
Given <specific precondition in business language>
When <user action in business language>
Then <expected outcome in business language>
Scenario: <Edge case — boundary or unusual input>
Given <precondition>
When <action with edge-case input>
Then <expected outcome>
Scenario: <Error case — invalid input or failed precondition>
Given <precondition>
When <action that should fail>
Then a <SpecificError> is reported with <relevant context>
Scenario Outline: <Parameterised scenarios>
Given a crawl with <pages> pages
When the operator completes the crawl
Then <events> events are emitted
Examples:
| pages | events |
| 1 | 2 |
| 3 | 4 |
| 10 | 11 |
Feature rules:
HttpRequest, Repository, getId(). Use crawl, operator, pageAnd for additional conditions)Background: for preconditions shared by every scenario in the fileScenario Outline: only when the variation is genuinely tabularStep definitions go in features/bootstrap/ (typical) as final class implementing Context:
<?php
declare(strict_types=1);
namespace App\Tests\Behat;
use App\Application\Crawl\CompleteCrawl;
use App\Domain\Crawl\CrawlAggregate;
use App\Domain\Crawl\CrawlId;
use Behat\Behat\Context\Context;
use PHPUnit\Framework\Assert;
use Symfony\Component\Messenger\MessageBusInterface;
final class CrawlContext implements Context
{
private ?CrawlId $crawlId = null;
/** @var list<object> */
private array $dispatchedMessages = [];
public function __construct(
private readonly MessageBusInterface ,
InMemoryMessageRepository ,
) {}
{
->crawlId = ::();
}
{
::(->crawlId, );
->commandBus->( (->crawlId));
}
{
= ->messageRepository->(->crawlId);
= ( fn ( ): => ( ())->(), );
::(, );
}
}
Step definition rules:
FeatureContextbehat.yml service config — never service locationvoid and assert directly with PHPUnit\Framework\Assertbehat.yml (or behat.yml.dist):
default:
suites:
default:
paths:
- "%paths.base%/features"
contexts:
- App\Tests\Behat\CrawlContext:
commandBus: '@command.bus'
messageRepository: '@App\Infrastructure\EventStore\InMemoryMessageRepository'
extensions:
FriendsOfBehat\SymfonyExtension:
kernel:
class: App\Tests\Behat\TestKernel
For non-Symfony projects, configure via the Behat container directly or use FriendsOfBehat\ServiceContainerExtension.
Run the scenario before implementing the behaviour. It must fail because the behaviour does not exist yet. This is the spec contract — if it passes on first run, either the behaviour is already implemented (verify it matches) or the step definitions are not asserting anything.
vendor/bin/behat features/<name>.feature
Expected output: scenarios fail with concrete errors pointing at missing classes, methods, or assertions.
Deliver:
features/<name>.featurefeatures/bootstrap/ (or configured location)behat.yml updates if a new context was wiredHttpRequest, Repository, Doctrine — these belong in step defs, not GherkinFeatureContext with 50 steps. Split by bounded context/php-developer:write-aggregate — once a scenario fails on missing aggregate behaviour, this skill writes the event-sourced aggregate/php-developer:write-handler — once a scenario fails on missing handler, this skill writes the command/query handler