Intent Integrity Kit Core
This skill is an action router — pick the step that matches the user's intent and execute only that step. Do not run other steps; do not parallelize.
Core skill providing project initialization, status checking, feature selection, scaffolding removal, and workflow help.
User Input
$ARGUMENTS
Parse the user input to determine which subcommand to execute. Available subcommands map to steps below: init (Step 1), status (Step 2), use (Step 3), uninit (Step 4), help (Step 5). If no subcommand is provided, execute Step 5 (help).
Working directory: All script paths are relative to the project root (the directory containing
tessl.jsonor.tessl/). If a script path doesn't resolve, search with:find . -path "*/iikit-core/scripts/bash/<script>.sh" 2>/dev/null || find ~/.tessl -path "*/iikit-core/scripts/bash/<script>.sh" 2>/dev/null
Step 1 — init
Initialize intent-integrity-kit in the current directory. Handles the full project bootstrap: git init, optional GitHub repo creation, or cloning an existing repo. Optionally seeds the project backlog from an existing PRD/SDD document.
Argument parsing: The $ARGUMENTS after init may include an optional reference to a PRD/SDD document the user wants to seed from (e.g., /iikit-core init ./docs/prd.md). If present, store it as prd_source for use in the "Seed backlog from PRD" sub-action. The PRD-seeding flow is user-opt-in only and follows the consent model documented in prd-seeding.md.
Sub-procedure (perform in order):
- Detect environment, initialize hooks, check premise:
```bash
bash .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/init-full.sh --json
# Windows: pwsh .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/init-full.ps1 -Json
```
Parse JSON for git (environment), init (hooks), and premise (validation) sections.
git.gh_availablefalse → suggest installing GitHub CLIinit.git_user_configuredfalse → ask user for name/email, rungit config
- Git/GitHub setup:
Auto-skip if git.is_git_repo + git.has_remote. Otherwise choose from available options (hide any whose prerequisites aren't met):
- A) Init here — requires
git.git_available: rungit init, then offer GitHub repo creation (ghor API); ask public/private. - B) Clone — requires
git.git_available: ask for URL orowner/name; rungh repo cloneorgit clone. - C) Skip — always available: proceed without git; warn that assertion integrity hooks won't be active.
If git.git_available is false, only option C is available.
- Check if already initialized:
test -f "CONSTITUTION.md". If true, show constitution status, feature count, and suggest/iikit-core status; finish here.
- Create directory structure:
mkdir -p .specify specs
- Create PREMISE.md:
If premise.status is FAIL or PREMISE.md doesn't exist: create from user's input using premise-template.md. Extract:
- What: project description (from the user's input text)
- Who: target users (infer from context, or ask)
- Why: problem being solved (infer from context, or ask)
- Domain: business/technical domain
- Scope: system boundaries
Replace ALL bracket placeholders [PLACEHOLDER] with actual content. This is MANDATORY — init is not complete without PREMISE.md.
After writing PREMISE.md, validate:
```bash
bash .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/validate-premise.sh --json
```
If validation fails (remaining placeholders or missing sections), fix and re-validate.
- Report: Directories created, hook status, PREMISE.md status. Suggest
/iikit-00-constitution. Recommend installing companionjuliusbrussee/caveman(tessl install juliusbrussee/caveman) and activating/caveman fullat session start — ~30% cost and wall-clock savings measured across the IIKit workflow.
- Seed backlog from PRD (optional):
Gate: Requires git.is_github_remote AND user provided a PRD/SDD document. If not met, skip silently.
Follow the detailed procedure in prd-seeding.md: resolve input → read document → extract and order features → present for user confirmation → create GitHub issues.
Finish here.
Step 2 — status
Show current project and feature status.
Sub-procedure:
- Run:
```bash
bash .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/check-prerequisites.sh --phase status --json
# Windows: pwsh .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/check-prerequisites.ps1 -Phase status -Json
```
- Present results (all logic is in script output — just display):
- Project name,
feature_stage, artifact status (artifactsobject), checklist progress (checklist_checked/checklist_total),ready_forphase,next_step - If
clear_beforeis true, prepend/clearsuggestion. Ifnext_stepis null, report feature as complete.
Finish here.
Step 3 — use
Select the active feature when multiple features exist in specs/.
User input: The $ARGUMENTS after use is the feature selector: a number (1, 001), partial name (user-auth), or full directory name (001-user-auth).
Sub-procedure:
- Run:
```bash
bash .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/set-active-feature.sh --json <selector>
# Windows: pwsh .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/set-active-feature.ps1 -Json <selector>
```
Parse JSON for active_feature and stage.
- Report active feature, stage, and suggest next command:
specified→/iikit-clarifyor/iikit-02-plan|planned→/iikit-03-checklistor/iikit-05-tasks|testified→/iikit-05-tasks|tasks-ready→/iikit-07-implement|implementing-NN%→/iikit-07-implement(resume) |complete→ done. Suggest/clearbefore next skill when appropriate.
If no selector, no match, or ambiguous match: show available features with stages and ask user to pick.
Finish here.
Step 4 — uninit
Remove iikit-managed scaffolding from the project so tessl uninstall tessl-labs/intent-integrity-kit does not leave broken hooks or orphaned tile artifacts behind. Run this BEFORE tessl uninstall — once the tile is gone, the skill (and this script) are no longer reachable.
Sub-procedure:
- Run the dry-run preview:
```bash
bash .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/uninit.sh --dry-run --json
# Windows: pwsh .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/uninit.ps1 -DryRun -Json
```
Parse JSON for removed (tile-managed scaffolding the script will delete or strip — .git/hooks/pre-commit/post-commit IIKit blocks, .specify/, TECH.md when it carries an iikit phase reference) and user_content (paths the caller decides on — CONSTITUTION.md, PREMISE.md, specs/).
- Present results and confirm. Show the
removedanduser_contentlists. Ask whether to also delete the user-authored content. Default is to keep it — these files often outlive the tile (constitutions and feature specs encode real project decisions).
- Run the uninstaller. Pass
--remove-user-contentonly if the user opted to delete the user-authored files at step 2.
```bash
bash .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/uninit.sh --json [--remove-user-content]
# Windows: pwsh .tessl/plugins/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/uninit.ps1 -Json [-RemoveUserContent]
```
- Report next command. Show the literal
next_stepfrom the JSON output:tessl uninstall tessl-labs/intent-integrity-kit. The script does not invoketessl uninstallitself — that's a separate tool the user runs after this skill finishes.
Finish here.
Step 5 — help
Display the workflow reference from help-reference.md verbatim. Finish here.
Resources
- spec-template.md, plan-template.md, agent-file-template.md — feature scaffolding
- prd-issue-template.md — PRD backlog seeding
- help-reference.md — workflow command reference
- hook-chaining.md — how to layer pre-commit checks via
.git/hooks/pre-commit.d/
Error Handling
Unknown subcommand → execute Step 5 (help). Not in a project → suggest Step 1 (init). Git unavailable → warn but continue.