iikit-04-testify
Generate Gherkin .feature files from requirements before implementation — produces executable BDD scenarios with traceability tags, computes assertion integrity hashes, and locks acceptance criteria for test-driven development. Use when writing tests first, doing TDD, creating test cases from a spec, locking acceptance criteria, or setting up red-green-refactor with hash-verified assertions.
- License 许可
- MIT
- 最近更新
- 2026-10-12
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- iikit-04-testify
- license
- MIT
- metadata
- { "version": "1.7.0" }
- description
- Generate Gherkin .feature files from requirements before implementation — produces executable BDD scenarios with traceability tags, computes assertion integrity hashes, and locks acceptance criteria for test-driven development. Use when writing tests first, doing TDD, creating test cases from a spec, locking acceptance criteria, or setting up red-green-refactor with hash-verified assertions.
02 资源文件 34
- 参考文档references/checklist-gate.md737 B
- 参考文档references/constitution-loading.md1.5 KB
- 参考文档references/conversation-guide.md2.2 KB
- 参考文档references/formatting-guide.md3.9 KB
- 参考文档references/gherkin-reference.md3.5 KB
- 参考文档references/model-recommendations.md2.5 KB
- 脚本scripts/bash/check-prerequisites.sh29.2 KB
- 脚本scripts/bash/common.sh25.3 KB
- 脚本scripts/bash/generate-dashboard-safe.sh1.8 KB
- 脚本scripts/bash/next-step.sh14.3 KB
- 脚本scripts/bash/set-active-feature.sh3.2 KB
- 脚本scripts/bash/testify-tdd.sh23.7 KB
- 脚本scripts/dashboard/public/index.html205.7 KB
- 脚本scripts/dashboard/src/analyze.js7.0 KB
- 脚本scripts/dashboard/src/board.js3.2 KB
- 脚本scripts/dashboard/src/bugs.js4.9 KB
- 脚本scripts/dashboard/src/checklist.js2.1 KB
- 脚本scripts/dashboard/src/generate-dashboard.js10.2 KB
- 脚本scripts/dashboard/src/integrity.js1.7 KB
- 脚本scripts/dashboard/src/parser.js43.5 KB
- 脚本scripts/dashboard/src/pipeline.js5.9 KB
- 脚本scripts/dashboard/src/planview.js9.4 KB
- 脚本scripts/dashboard/src/public/index.html205.1 KB
- 脚本scripts/dashboard/src/storymap.js1.4 KB
- 脚本scripts/dashboard/src/testify.js6.2 KB
- 脚本scripts/dashboard/template.js213.0 KB
- 脚本scripts/powershell/check-prerequisites.ps123.3 KB
- 脚本scripts/powershell/common.ps114.3 KB
- 脚本scripts/powershell/generate-dashboard-safe.ps11.8 KB
- 脚本scripts/powershell/next-step.ps110.7 KB
- 脚本scripts/powershell/set-active-feature.ps12.6 KB
- 脚本scripts/powershell/testify-tdd.ps122.1 KB
- 参考文档templates/plan-template.md3.3 KB
- 参考文档templates/testspec-template.md2.1 KB
03 SKILL.md 正文
Intent Integrity Kit Testify
Generate executable Gherkin .feature files from requirement artifacts before implementation. Enables TDD by creating hash-locked BDD scenarios that serve as acceptance criteria.
OS convention: All commands are shown in bash. PowerShell equivalents exist at the same path with a
.ps1extension (e.g.,scripts/powershell/check-prerequisites.ps1) and accept the same flags in PascalCase (e.g.,-Phase 04 -Json).
Constitution Loading
Load constitution per constitution-loading.md (basic mode), then perform TDD assessment:
Scan for TDD indicators:
- Strong (MUST/REQUIRED + "TDD", "test-first", "red-green-refactor") -> mandatory
- Moderate (MUST + "test-driven", "tests before code") -> mandatory
- Implicit (SHOULD + "quality gates", "coverage requirements") -> optional
- Prohibition (MUST + "test-after", "no unit tests") -> forbidden (ERROR, halt)
- None found -> optional
Report per formatting-guide.md (TDD Assessment section).
Prerequisites Check
-
Run:
bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/check-prerequisites.sh --phase 04 --jsonWindows:
pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/check-prerequisites.ps1 -Phase 04 -Json -
Parse for
FEATURE_DIRandAVAILABLE_DOCS. Require plan.md and spec.md (ERROR if missing). -
If JSON contains
needs_selection: true: present thefeaturesarray as a numbered table (name and stage columns). Follow the options presentation pattern in conversation-guide.md. After user selects, run:bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/set-active-feature.sh --json <selection>Windows:
pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/set-active-feature.ps1 -Json <selection>Then re-run the prerequisites check from step 1.
-
Checklist gate per checklist-gate.md.
Acceptance Scenario Validation
Search spec.md for Given/When/Then patterns. If none found: ERROR with Run: /iikit-clarify.
Execution Flow
1. Load Artifacts
- Required:
spec.md(acceptance scenarios),plan.md(API contracts, tech stack) - Optional:
data-model.md(validation rules)
2. Generate Gherkin Feature Files
Create .feature files in FEATURE_DIR/tests/features/:
Output directory: FEATURE_DIR/tests/features/ (create if it does not exist)
File organization: Generate one .feature file per user story or logical grouping. Use descriptive filenames (e.g., login.feature, user-management.feature).
2.1 Gherkin Tag Conventions
Every scenario MUST include traceability tags:
@TS-XXX— test spec ID (sequential, unique across all .feature files)@FR-XXX— functional requirement from spec.md@SC-XXX— success criteria from spec.md@US-XXX— user story reference@P1/@P2/@P3— priority level@acceptance/@contract/@validation— test type
SC-XXX coverage rule: For each SC-XXX in spec.md, ensure at least one scenario carries the corresponding @SC-XXX tag. If an existing FR scenario already covers the criterion, add the tag there rather than creating a duplicate.
Feature-level tags for shared metadata:
@US-XXXon the Feature line for the parent user story
2.2 Transformation Rules
From spec.md — Acceptance Tests: For each Given/When/Then scenario, generate a Gherkin scenario.
Use testspec-template.md as the Gherkin file template. For transformation examples, advanced constructs (Background, Scenario Outline, Rule), and syntax validation rules, see gherkin-reference.md.
3. Add DO NOT MODIFY Markers
Add an HTML comment at the top of each .feature file:
# DO NOT MODIFY SCENARIOS
# Derived from requirements. Fix code to pass tests; re-run /iikit-04-testify if requirements change.
4. Idempotency
If tests/features/ already contains .feature files:
- Preserve existing scenario tags (TS-XXX) where the source scenario is unchanged
- Add new scenarios for new requirements
- Mark removed scenarios as deprecated (comment out with
# DEPRECATED:) - Show diff summary of changes
5. Store Assertion Integrity Hash
CRITICAL: Store SHA256 hash in both context.json and git note in a single call:
bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/testify-tdd.sh store-all "FEATURE_DIR/tests/features"
Returns JSON with hash and git_note status. The implement skill verifies this hash before proceeding.
6. Report
Output: TDD determination, scenario counts by source (acceptance/contract/validation), output directory path, number of .feature files generated, hash status (LOCKED).
Error Handling
| Condition | Response |
|---|---|
| No constitution | ERROR: Run /iikit-00-constitution |
| TDD forbidden | ERROR with evidence |
| No plan.md | ERROR: Run /iikit-02-plan |
| No spec.md | ERROR: Run /iikit-01-specify |
| No acceptance scenarios | ERROR: Run /iikit-clarify |
| .feature syntax error | FIX: Auto-correct and report |
Commit, Dashboard & Next Steps
Run post-phase to commit, refresh dashboard, and compute next step in a single call:
bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/post-phase.sh --phase 04 --commit-files "specs/*/tests/features/,specs/*/context.json,.specify/context.json" --commit-msg "testify: <feature-short-name> BDD scenarios"
Parse next_step from JSON. Present per model-recommendations.md:
Feature files generated!
Next: [/clear → ] <next_step> (model: <tier>)
[- <alt_step> — <reason> (model: <tier>)]
- Dashboard: file://$(pwd)/.specify/dashboard.html
04 同仓库更多 Skills
swiss-design
Apply a Swiss International Style design system using Tailwind CSS. Use when asked to style a webpage, clean up a UI, apply a design system, make something look great, or when the user references Swiss design, grotesque fonts, Helvetica, grid systems, modernist typography, or 1960s/1950s design aesthetics. Implements IBM Plex Sans typography, stone color palette, opacity-based hierarchy, generous whitespace, and structured grid layouts.
karpathy-guidelines
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
iikit-core
Initialize an IIKit (Intent Integrity Kit) project, check IIKit feature progress, select the active IIKit feature, and display the IIKit workflow command reference. Use when starting a new IIKit project, running IIKit init or setup, checking IIKit status, switching between IIKit features, looking up IIKit available commands and phases, or asking for help with the IIKit workflow.
iikit-clarify
Resolve ambiguities in any project artifact — auto-detects the most recent artifact (spec, plan, checklist, testify, tasks, or constitution), asks targeted questions with option tables, and writes answers back into the artifact's Clarifications section. Use when requirements are unclear, a plan has trade-off gaps, checklist thresholds feel wrong, test scenarios are imprecise, task dependencies seem off, or constitution principles are vague.
iikit-bugfix
Report a bug against an existing feature — creates a structured bugs.md record, generates fix tasks in tasks.md, and optionally imports from or creates GitHub issues. Use when fixing a bug, reporting a defect, importing a GitHub issue into the workflow, or triaging an error without running the full specification process.
iikit-08-taskstoissues
Convert tasks from tasks.md into GitHub Issues with labels and dependencies. Use when exporting work items to GitHub, setting up project boards, or assigning tasks to team members.