AGENT SKILL

iikit-02-plan

Generate a technical design document from a feature spec — selects frameworks, defines data models, produces API contracts, and creates a dependency-ordered implementation strategy. Use when planning how to build a feature, writing a technical design doc, choosing libraries, defining database schemas, or setting up Tessl tiles for runtime library knowledge.

License 许可
MIT
所属仓库
hafidzlvm/opencode
最近更新
2026-10-12
Stars
★ 1
Forks
0

01 前言 Front Matter

name
iikit-02-plan
license
MIT
metadata
{ "version": "2.10.0" }
description
Generate a technical design document from a feature spec — selects frameworks, defines data models, produces API contracts, and creates a dependency-ordered implementation strategy. Use when planning how to build a feature, writing a technical design doc, choosing libraries, defining database schemas, or setting up Tessl tiles for runtime library knowledge.

02 资源文件 35

03 SKILL.md 正文

Intent Integrity Kit Plan

Generate design artifacts from the feature specification using the plan template.

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Constitution Loading

Load constitution per constitution-loading.md (enforcement mode — extract rules, declare hard gate, halt on violations).

Prerequisites Check

  1. Run prerequisites check:

    bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-02-plan/scripts/bash/check-prerequisites.sh --phase 02 --json
    

    Windows: pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-02-plan/scripts/powershell/check-prerequisites.ps1 -Phase 02 -Json

  2. Parse JSON for FEATURE_SPEC, IMPL_PLAN, FEATURE_DIR, BRANCH. If missing spec.md: ERROR.

  3. 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-02-plan/scripts/bash/set-active-feature.sh --json <selection>
    

    Windows: pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-02-plan/scripts/powershell/set-active-feature.ps1 -Json <selection>

    Then re-run the prerequisites check from step 1.

Spec Quality Gate

MANDATORY on every run (including re-runs when plan.md already exists) — you MUST complete this gate and report the results before proceeding to the Execution Flow. Do NOT skip this section.

Validate spec.md and output the results:

  1. Requirements: count FR-XXX patterns (ERROR if 0, WARNING if <3)
  2. Measurable criteria: scan for numeric values, percentages, time measurements (WARNING if none found — report which SC-XXX lack measurable values)
  3. Unresolved clarifications: search for [NEEDS CLARIFICATION] — ask whether to proceed with assumptions
  4. User story coverage: verify each story has acceptance scenarios
  5. Cross-references: check for orphan requirements not linked to stories

Output the quality score using this format (from formatting-guide.md):

Spec Quality: X/10
  Requirements: N FR-XXX found [✓|⚠|✗]
  Measurable criteria: N of M SC-XXX have numeric targets [✓|⚠|✗]
  Clarifications: N unresolved [✓|⚠|✗]
  Story coverage: N of M stories have scenarios [✓|⚠|✗]
  Cross-references: N orphan requirements [✓|⚠|✗]

If score < 6: recommend /iikit-clarify first.

Execution Flow

1. Fill Technical Context

Using the plan template, define: Language/Version, Primary Dependencies, Storage, Testing, Target Platform, Project Type, Performance Goals, Constraints, Scale/Scope. Mark unknowns as "NEEDS CLARIFICATION".

When Tessl eval results are available for candidate technologies, include eval scores in the decision rationale in research.md. Higher eval scores indicate better-validated tiles and should factor into technology selection when choosing between alternatives.

2. Tessl Tile Discovery

If Tessl is installed, discover and install tiles for all technologies. See tessl-tile-discovery.md for the full procedure.

3. Research & Resolve Unknowns

For each NEEDS CLARIFICATION item and dependency: research, document findings in research.md with decision, rationale, and alternatives considered. Include Tessl Tiles section if applicable.

4. Design & Contracts

Prerequisites: research.md complete

  1. Extract entities from spec -> data-model.md (fields, relationships, validation, state transitions)
  2. Generate API contracts from functional requirements -> contracts/
  3. Create quickstart.md with test scenarios
  4. Update agent context:
    bash .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-02-plan/scripts/bash/update-agent-context.sh claude
    
    Windows: pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-02-plan/scripts/powershell/update-agent-context.ps1 -AgentType claude

5. Update context.json with Dashboard Data

MANDATORY — you MUST update .specify/context.json after the plan is complete. Use jq to merge into the existing file (create if missing). Do NOT overwrite existing fields.

CONTEXT_FILE=".specify/context.json"
[[ -f "$CONTEXT_FILE" ]] || echo '{}' > "$CONTEXT_FILE"

Architecture Node Classifications: If plan.md contains an architecture diagram, classify every named component as one of client, server, storage, or external and write the map to planview.nodeClassifications:

jq --argjson nodes '{
  "Browser SPA": "client",
  "API Gateway": "server",
  "PostgreSQL": "storage",
  "Stripe API": "external"
}' '.planview.nodeClassifications = $nodes' "$CONTEXT_FILE" > "$CONTEXT_FILE.tmp" && mv "$CONTEXT_FILE.tmp" "$CONTEXT_FILE"

Classification rules: client = initiates requests | server = processes requests | storage = persists data | external = outside project boundary

Tessl Eval Scores: If Tessl tiles were installed in step 2, write eval scores to planview.evalScores:

jq --argjson evals '{
  "workspace/tile-name": {"score": 85, "pct": 85, "scenarios": 3, "scored_at": "2026-01-15T10:00:00Z"}
}' '.planview.evalScores = $evals' "$CONTEXT_FILE" > "$CONTEXT_FILE.tmp" && mv "$CONTEXT_FILE.tmp" "$CONTEXT_FILE"

6. Constitution Check (Post-Design)

Re-validate all technical decisions against constitutional principles. On violation: STOP, state violation, suggest compliant alternative.

7. Phase Separation Validation

Scan plan for governance content per phase-separation-rules.md (Plan section). Auto-fix by replacing with constitution references, re-validate.

Output Validation

Before writing any artifact: review against each constitutional principle. On violation: STOP with explanation and alternative.

Report

Output: branch name, plan path, generated artifacts (research.md, data-model.md, contracts/*, quickstart.md), agent file update status, Tessl integration status (tiles installed, skills available, technologies without tiles, eval results saved), dashboard pre-computed data status (node classifications written, eval scores written).

Semantic Diff on Re-run

On re-runs (plan.md already exists), after completing the Spec Quality Gate and Execution Flow above, you MUST compare the old and new plan and output a semantic diff. Use this exact format:

+-----------------------------------------------------+
|  SEMANTIC DIFF: plan.md                              |
+-----------------------------------------------------+
|  Tech Stack:                                         |
|    + Added: [new items]                              |
|    ~ Changed: [modified items]                       |
|    - Removed: [deleted items]                        |
|  Architecture:                                       |
|    + Added: [new components]                         |
|    ~ Changed: [modified components]                  |
|  Dependencies:                                       |
|    + Added: [new deps]                               |
|    - Removed: [old deps]                             |
+-----------------------------------------------------+
|  DOWNSTREAM IMPACT                                   |
|    ⚠ tasks.md may need regeneration                  |
|    ⚠ [other affected artifacts]                      |
+-----------------------------------------------------+

Flag breaking changes that would invalidate existing tasks or test specs.

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-02-plan/scripts/bash/post-phase.sh --phase 02 --commit-files "specs/*/plan.md,specs/*/research.md,specs/*/data-model.md,specs/*/quickstart.md,specs/*/contracts/,.specify/context.json" --commit-msg "plan: <feature-short-name> technical design"

Windows: pwsh .tessl/tiles/tessl-labs/intent-integrity-kit/skills/iikit-02-plan/scripts/powershell/post-phase.ps1 -Phase 02 -CommitFiles "specs/*/plan.md,specs/*/research.md,specs/*/data-model.md,specs/*/quickstart.md,specs/*/contracts/,.specify/context.json" -CommitMsg "plan: <feature-short-name> technical design"

Parse next_step from JSON. Present per model-recommendations.md:

Plan complete!
Next: [/clear → ] <next_step> (model: <tier>)
[- <alt_step> — <reason> (model: <tier>)]
- Dashboard: file://$(pwd)/.specify/dashboard.html

04 同仓库更多 Skills

hafidzlvm
hafidzlvm/opencode

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.

★ 1
hafidzlvm
hafidzlvm/opencode

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.

★ 1
hafidzlvm
hafidzlvm/opencode

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.

★ 1
hafidzlvm
hafidzlvm/opencode

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.

★ 1
hafidzlvm
hafidzlvm/opencode

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.

★ 1
hafidzlvm
hafidzlvm/opencode

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.

★ 1