소스 정보
- 저장소
- 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명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? 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