Validate cross-artifact consistency — checks that every spec requirement traces to tasks, plan tech stack matches task file paths, and constitution principles are satisfied across all artifacts. Use when running a consistency check, verifying requirements traceability, detecting conflicts between design docs, or auditing alignment before implementation begins.
Non-destructive cross-artifact consistency analysis across spec.md, plan.md, and tasks.md.
analysis.md and .specify/score-history.json). Never modify spec, plan, or task files.$ARGUMENTSYou MUST consider the user input before proceeding (if not empty).
Load constitution per constitution-loading.md (basic mode — ERROR if missing). Extract principle names and normative statements.
Run: bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/check-prerequisites.sh --phase 06 --json
Windows: pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/check-prerequisites.ps1 -Phase 06 -Json
Derive paths: SPEC, PLAN, TASKS from FEATURE_DIR. ERROR if any missing.
If JSON contains needs_selection: true: present the features array 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.
Before analysis, regenerate the QA Plan to ensure cross-feature quality data is current:
node "$CLAUDE_PLUGIN_ROOT/scripts/sdd-qa-plan.js" .This updates QA-PLAN.md and .specify/qa-plan.json with latest DoD status, AC coverage, and gate state. The analysis then uses this data for cross-artifact validation.
From spec.md: overview, requirements, user stories, edge cases. From plan.md: architecture, data model refs, phases, constraints. From tasks.md: task IDs, descriptions, phases, [P] markers, file paths. From qa/acceptance-criteria.md: SC-XXX checkable items (if exists). From qa/test-coverage.md: FR→TS traceability matrix (if exists).
A. Duplication: near-duplicate requirements -> consolidate B. Ambiguity: vague terms (fast, scalable, secure) without measurable criteria; unresolved placeholders C. Underspecification: requirements missing objects/outcomes; stories without acceptance criteria; tasks referencing undefined components D. Constitution Alignment: conflicts with MUST principles; missing mandated sections. For each principle, report status using these exact values:
ALIGNED — principle satisfied across all artifactsVIOLATION — principle violated (auto-CRITICAL severity)
E. Phase Separation Violations: per phase-separation-rules.md — tech in constitution, implementation in spec, governance in plan
F. Coverage Gaps: requirements with zero tasks; tasks with no mapped requirement; non-functional requirements not in tasks; requirements not referenced in plan.mdPlan coverage detection: Scan plan.md for each requirement ID (FR-xxx, SC-xxx). A requirement is "covered by plan" if its ID appears anywhere in plan.md. Collect contextual refs (KDD-x, section headers) where found.
G. Inconsistency: terminology drift; entities in plan but not spec; conflicting requirements
G2. Prose Range Detection: Scan tasks.md for patterns like "TS-XXX through TS-XXX" or "TS-XXX to TS-XXX". Flag as MEDIUM finding: "Prose range detected — intermediate IDs not traceable. Use explicit comma-separated list."
H. Feature File Traceability (when FEATURE_DIR/tests/features/ exists):
Parse all .feature files in tests/features/ and extract Gherkin tags:
@FR-XXX — functional requirement references@SC-XXX — success criteria references@US-XXX — user story references@TS-XXX — test specification IDsH1. Untested requirements: For each FR-XXX and SC-XXX in spec.md, check if at least one .feature file has a corresponding @FR-XXX or @SC-XXX tag. Flag any FR-XXX or SC-XXX without a matching tag as "untested requirement" (severity: HIGH).
H2. Orphaned tags: For each @FR-XXX or @SC-XXX tag found in .feature files, verify the referenced ID exists in spec.md. Flag tags referencing non-existent IDs as "orphaned traceability tag" (severity: MEDIUM).
H3. Step definition coverage (optional): If tests/step_definitions/ exists alongside tests/features/, run verify-steps.sh to check for undefined steps:
bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/verify-steps.sh --json "FEATURE_DIR/tests/features" "FEATURE_DIR/plan.md"If status is BLOCKED, report undefined steps as findings (severity: HIGH). If DEGRADED, note in report but do not flag as finding.
Output to console AND write to FEATURE_DIR/analysis.md:
## Specification Analysis Report
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|----|----------|----------|-------------|---------|----------------|
**Constitution Alignment**: principle name -> status (ALIGNED | VIOLATION) -> notes
**Coverage Summary**: requirement key -> has task? -> task IDs -> has plan? -> plan refs
**Phase Separation Violations**: artifact, line, violation, severity
**Metrics**: total requirements, total tasks, coverage %, ambiguity count, critical issues
**Health Score**: <score>/100 (<trend>)
## Score History
| Run | Score | Coverage | Critical | High | Medium | Low | Total |
|-----|-------|----------|----------|------|--------|-----|-------|
| <timestamp> | <score> | <coverage>% | <critical> | <high> | <medium> | <low> | <total_findings> |After computing Metrics in step 5, persist the health score:
score = 100 - (critical*20 + high*5 + medium*2 + low*0.5), floored at 0, rounded to nearest integer..specify/score-history.json. If the file does not exist, initialize with {}.001-user-auth):
{ "timestamp": "<ISO-8601 UTC>", "score": <n>, "coverage_pct": <n>, "critical": <n>, "high": <n>, "medium": <n>, "low": <n>, "total_findings": <n> }.specify/score-history.json.↑ improving↓ declining→ stableHealth Score: <score>/100 (<trend>)score_history array for the current feature in analysis.md under the Health Score line and Score History table added in step 5./iikit-07-implementAsk: "Suggest concrete remediation edits for the top N issues?" Do NOT apply automatically.
git add specs/*/analysis.md .specify/score-history.json
git commit -m "analyze: <feature-short-name> consistency report"Regenerate the dashboard so the pipeline reflects the analysis results:
bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/generate-dashboard-safe.shWindows: pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/generate-dashboard-safe.ps1
Run: bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/bash/next-step.sh --phase 06 --json
Windows: pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-core/scripts/powershell/next-step.ps1 -Phase 06 -Json
Parse the JSON and present:
clear_after is true: suggest /clear before proceeding/iikit-06-analyzenext_step as the primary recommendationalt_steps non-empty: list as alternativesnext_step and each alt_step, include the model_tier from the JSON so the user knows which model is best for each option. Look up tiers in model-recommendations.md for agent-specific switch commands.Format:
Analysis complete!
[- CRITICAL issues found: resolve, then re-run /iikit-06-analyze]
Next: [/clear → ] <next_step> (model: <tier>)
[- <alt_step> — <reason> (model: <tier>)]
- Dashboard: file://$(pwd)/.specify/dashboard.html (resolve the path)b56591e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.