tessl install tessl-labs/intent-integrity-kit@1.0.2Closing the intent-to-code chasm - specification-driven development with cryptographic verification
Generate test specifications from requirement artifacts before implementation begins. This skill enables Test-Driven Development (TDD) by creating test specs that serve as acceptance criteria for the implementation phase.
$ARGUMENTSThis skill accepts no user input parameters - it reads artifacts automatically (FR-013).
Before ANY action, load and analyze the project constitution for TDD requirements:
Read constitution:
cat CONSTITUTION.md 2>/dev/null || echo "NO_CONSTITUTION"If file doesn't exist:
ERROR: Project constitution not found at CONSTITUTION.md
Cannot proceed without constitution.
Run: /iikit-00-constitutionTDD Assessment - Analyze constitution for TDD indicators:
Strong indicators (high confidence):
Moderate indicators (medium confidence):
Implicit indicators (low confidence):
Prohibition indicators:
No indicators:
Output TDD Assessment:
╭─────────────────────────────────────────────────────╮
│ TDD ASSESSMENT │
├─────────────────────────────────────────────────────┤
│ Determination: [mandatory | optional | forbidden] │
│ Confidence: [high | medium | low] │
│ Evidence: "[quoted constitutional text]" │
│ Reasoning: [explanation] │
╰─────────────────────────────────────────────────────╯If determination is "forbidden":
ERROR: Constitution prohibits test-first development.
Evidence: "[quoted text]"
Testify cannot proceed. The constitution explicitly requires test-after
or prohibits TDD practices.Run prerequisites check:
bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/check-prerequisites.sh --jsonParse JSON for FEATURE_DIR and AVAILABLE_DOCS.
Verify required artifacts exist:
If plan.md missing:
ERROR: plan.md not found in feature directory.
Testify requires a completed plan.
Run: /iikit-03-planIf spec.md missing:
ERROR: spec.md not found in feature directory.
Testify requires a completed specification.
Run: /iikit-01-specifyBefore generating tests, validate that spec.md has acceptance scenarios:
Search spec.md for acceptance scenario patterns:
If NO acceptance scenarios found:
ERROR: spec.md has no acceptance scenarios.
Test specifications require acceptance scenarios to derive tests from.
Run: /iikit-02-clarify to add acceptance scenarios to the specification.Read from FEATURE_DIR:
spec.md (acceptance scenarios, functional requirements)plan.md (API contracts, technical decisions)data-model.md (entity constraints, validation rules)Create FEATURE_DIR/tests/test-specs.md with the following structure:
For each acceptance scenario in spec.md:
spec.md:[User Story]:[scenario number]acceptanceExample transformation:
Input (from spec.md):
### User Story 1 - Login (Priority: P1)
**Acceptance Scenarios**:
1. **Given** a registered user, **When** they enter valid credentials, **Then** they are logged in.Output (in test-specs.md):
### TS-001: Login with valid credentials
**Source**: spec.md:User Story 1:scenario-1
**Type**: acceptance
**Priority**: P1
**Given**: a registered user
**When**: they enter valid credentials
**Then**: they are logged in
**Traceability**: FR-001, US-001-scenario-1For each API endpoint or interface defined in plan.md:
contractplan.md:[section]:[endpoint]For each entity with validation rules in data-model.md:
validationdata-model.md:[entity]:[constraint]Include clear markers in the generated test-specs.md:
<!--
DO NOT MODIFY TEST ASSERTIONS
These test specifications define the expected behavior derived from requirements.
During implementation:
- Fix code to pass tests, don't modify test assertions
- Structural changes (file organization, naming) are acceptable with justification
- Logic changes to assertions require explicit justification and re-review
If requirements change, re-run /iikit-05-testify to regenerate test specs.
-->If tests/test-specs.md already exists:
Output semantic diff:
╭─────────────────────────────────────────────────────╮
│ TEST SPEC UPDATE │
├─────────────────────────────────────────────────────┤
│ Preserved: X tests (unchanged requirements) │
│ Added: Y tests (new requirements) │
│ Removed: Z tests (requirements removed) │
╰─────────────────────────────────────────────────────╯Create the tests directory if it doesn't exist:
mkdir -p FEATURE_DIR/testsCRITICAL: After writing test-specs.md, store a hash of the assertion content to prevent tampering.
Store hash in BOTH locations for defense in depth:
Unix/macOS/Linux:
# Store in context.json (primary)
bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/testify-tdd.sh store-hash "FEATURE_DIR/tests/test-specs.md" ".specify/context.json"
# Store as git note (tamper-resistant backup)
bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/testify-tdd.sh store-git-note "FEATURE_DIR/tests/test-specs.md"Windows (PowerShell):
# Store in context.json (primary)
pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/testify-tdd.ps1 store-hash "FEATURE_DIR/tests/test-specs.md" ".specify/context.json"
# Store as git note (tamper-resistant backup)
pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/testify-tdd.ps1 store-git-note "FEATURE_DIR/tests/test-specs.md"This stores a SHA256 hash of all Given/When/Then assertion lines in two locations:
The implement skill will verify this hash before proceeding, blocking execution if assertions were tampered with.
Output a clear report showing what was generated:
╭─────────────────────────────────────────────────────╮
│ TESTIFY COMPLETE │
├─────────────────────────────────────────────────────┤
│ TDD Assessment: [mandatory | optional] │
│ │
│ Test Specifications Generated: │
│ From spec.md: X acceptance tests │
│ From plan.md: Y contract tests │
│ From data-model.md: Z validation tests │
│ ───────────────────────────────── │
│ Total: N test specifications │
│ │
│ Output: FEATURE_DIR/tests/test-specs.md │
│ │
│ Assertion Integrity: │
│ Hash: [first 12 chars of hash]... │
│ Status: LOCKED │
╰─────────────────────────────────────────────────────╯Note: The assertion hash ensures test integrity. If test-specs.md assertions are modified without re-running testify, the implement skill will detect the tampering and refuse to proceed.
Read testspec-template.md for the standard structure.
The generated tests/test-specs.md follows this template:
# Test Specifications: [Feature Name]
**Generated**: [timestamp]
**Feature**: [spec.md](./spec.md) | **Plan**: [plan.md](./plan.md)
## TDD Assessment
**Determination**: [mandatory | optional | forbidden]
**Confidence**: [high | medium | low]
**Evidence**: [quoted constitutional statements or "No TDD indicators found"]
**Reasoning**: [explanation of determination]
---
<!--
DO NOT MODIFY TEST ASSERTIONS
[full marker text]
-->
## From spec.md (Acceptance Tests)
### TS-001: [Test Name]
[test spec content]
---
## From plan.md (Contract Tests)
### TS-XXX: [Test Name]
[test spec content]
---
## From data-model.md (Validation Tests)
### TS-XXX: [Test Name]
[test spec content]
---
## Summary
| Source | Count | Types |
|--------|-------|-------|
| spec.md | X | acceptance |
| plan.md | Y | contract |
| data-model.md | Z | validation |
| **Total** | **N** | || Condition | Detection | Response |
|---|---|---|
| No constitution | File not found | ERROR with "Run /iikit-00-constitution" |
| TDD forbidden | Prohibition indicators found | ERROR with quoted evidence |
| No plan.md | File not found | ERROR with "Run /iikit-03-plan" |
| No spec.md | File not found | ERROR with "Run /iikit-01-specify" |
| No acceptance scenarios | Pattern not found in spec.md | ERROR with "Run /iikit-02-clarify" |
After generating test specifications:
Required: Run /iikit-06-tasks to generate tasks that reference the test specs
Suggest to user:
Test specifications generated! Next step:
- /iikit-06-tasks - Generate task breakdown (tasks will reference test specs)Note: /iikit-07-analyze requires tasks.md - run it after /iikit-06-tasks.