사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/longcipher/pb-spec --skill pb-plan시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
pb-plan
Transform a natural-language requirement into a build-eligible spec under specs/<spec-dir>/.
Workflow
1. Understand the requirement
- Read the requirement,
AGENTS.md, and the affected code yourself (search, read key files, reuse what exists). - Restate the goal in one sentence, list scope boundaries (in scope / out of scope), and surface assumptions.
- Only proceed when the behavior is pin-downable to testable cases.
2. Design — write design.md
Required sections (schema in docs/contract.md): Summary, Approach, Architecture Decisions, TDD & Mutation Testing Strategy, Verification. Add optional sections only when the aspect changes (topology → Mermaid, data → DBML/Prisma). Decisions use MADR (Context / Decision / Consequences); constraints use RFC 2119 keywords. Prefer the ladder: YAGNI → stdlib → existing dep → minimum code.
TDD & Mutation Testing Strategy must define:
- Type contracts: input/output shapes, invariants, boundary conditions, error codes.
- Test matrix — multi-layer, per the project testing principle. Cover all business scenarios,
all branches, and boundary/exception paths, combining:
- Unit tests for every branch and edge (happy path, error path, boundary values).
- Property tests (hypothesis/proptest) for parsers and pure logic — invariants over randomized inputs.
- Fuzz tests where input is untrusted or complex (malformed input, adversarial payloads).
- Integration tests for cross-module behavior (real filesystem/db/IPC as appropriate).
- E2E tests for user-visible flows through the public entry point.
- Mutation strategy — selective and scope-bounded. Mutation testing is slow: declare WHICH
files/functions get mutated (core logic with subtle correctness risk only), the score target (default ≥ 85%), and the tool (mutmut / cargo-mutants / stryker). Explicitly mark infra/trivial/UI code as mutation-exempt. Never plan whole-repo mutation runs.
3. Tasks — write tasks.md
- 4 fields per task:
Context:,Verification:,Status:,Test Coverage:(schema indocs/contract.md). - Order tasks by dependency (DAG); each
Verification:MUST be a machine-checkable command. - Map every task to its test paths via
Test Coverage:. - Mark tasks needing mutation testing explicitly; leave it out of infra/trivial tasks.
4. Validate
Run uv run pb-spec validate --plan <spec-dir> and fix all errors.
Decision protocol
Modern models resolve most ambiguity themselves. Default: pick the best option, state it as an assumption in design.md (Architecture Decisions), and proceed. Ask the user only when all of these hold — and stop and wait for the answer:
- The choice is irreversible or expensive to undo, or changes user-visible behavior;
- Two or more options have genuinely incomparable trade-offs — there is no best answer from the
code, conventions, or requirement;
- The requirement or codebase cannot resolve it.
Never ask about style details, naming, or anything with a clear convention-based default.
Non-interactive fallback: if the harness cannot ask (headless run, question tool disabled), do not silently proceed either. Flag the decision in the final message as an unresolved, load-bearing assumption, and guard the irreversible step inside the spec itself — a task that emits a Build Blocked packet, or a benchmark/schema-freeze gate — so the choice can still be overturned before it becomes permanent.
Stopping conditions
- Requirement ambiguous after step 1 → ask the user (per decision protocol), wait.
- Behavior cannot be pinned to testable cases → requirement unclear, ask.
- Open architectural question matching the decision protocol → surface, ask, wait.
Constraints
- Only write under
specs/<spec-dir>/. Never modify source code.AGENTS.mdis read-only.




