Logo van Spec Init

Spec Init

Community
v0lka
spec-init

Initialize a specification system for a project from scratch. Analyzes the codebase to identify architectural layers, domains, boundaries, and key decisions, then generates the initial set of specs (META.md, INDEX.md, domain specs, contracts, architecture docs, ADR template; a WORKFLOW.md only when the host has no documented spec-system entry point). Use when bootstrapping specs for a new project, setting up documentation governance, or creating a spec system for an existing codebase that has none.

Overzicht

Uitgeverv0lka
Repositoryskills
Skillnaamspec-init
Sterren
28
Forks
1
Meegeleverde bestanden
3
LicentieMIT
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • 3 meegeleverde bestanden

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. Bestanden zijn alleen-lezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door v0lka op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill Spec Init in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/v0lka/skills/tree/main/development/sdd/spec-init
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/v0lka/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/development/sdd/spec-init .claude/skills/spec-init
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Spec Init in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt Spec Init automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Spec Init niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Spec System Initialization

Bootstrap a complete specification system for a project by analyzing its codebase and generating an initial set of structured, agent-optimized spec documents.

Context

A spec system gives AI agents deterministic context about intended behavior, interfaces, and architectural decisions — enabling safe changes without full codebase exploration. This skill creates the system from scratch, tailored to the project's actual structure.

Prerequisites

  • The project must have an existing codebase (not an empty repo)
  • No specs/ directory should exist yet (or user confirms overwrite)
  • The agent needs to understand the project's language(s), module system, and directory structure

Procedure

Step 1 — Confirm scope and location

Ask the user:

  1. Where should the specs live? (default: specs/ at repository root)
  2. Is there an existing AGENTS.md or similar file to add a pointer to specs?
  3. Are there specific areas they want prioritized or skipped?

If specs/ already exists, warn the user and ask whether to overwrite or abort.

Step 2 — Analyze the codebase

Perform a systematic analysis to identify:

Layers / Modules:

  • Top-level directories and their responsibilities
  • Import/dependency direction between layers
  • Entry points and initialization flow

Domains:

  • Conceptual areas of functionality (NOT mirroring file structure)
  • Key types, interfaces, and data structures per domain
  • Primary flows (happy paths)

Boundaries:

  • Where layers interact (interfaces, RPC, events, shared types)
  • Dependency direction rules (who imports whom)
  • Data transformation at boundaries

Architectural decisions already made:

  • Technology choices evident from dependencies (DB, frameworks, protocols)
  • Patterns in use (event-driven, layered, hexagonal, etc.)
  • Constraints from the build system or module structure

Configuration:

  • Config file format and location
  • Key parameters and their domains

Document your findings as working notes before proceeding to generation.

Step 3 — Design the spec structure

Based on analysis, design the directory structure:

specs/
├── META.md
├── INDEX.md
├── WORKFLOW.md   (conditional — see Step 10; skipped when the host already
│                  documents its spec-system usage)
│
├── architecture/
│   └── (identified system-level concerns)
│
├── domains/
│   ├── <domain-a>/
│   │   ├── README.md
│   │   └── <component>.md (if domain has multiple components)
│   └── <domain-b>.md (if single-file domain)
│
├── contracts/
│   └── <layer-a>-<layer-b>.md (for each identified boundary)
│
└── decisions/
    └── _template.md

Present the proposed structure to the user for approval before generating files.

Step 4 — Generate META.md

Use the template from assets/meta-template.md as the base. Adapt the "File Organization" section to reflect the actual structure designed in Step 3.

META.md is the foundational document — all other specs reference it for templates and rules. Generate it first.

Step 5 — Generate architecture specs

For each identified system-level concern, create a spec in architecture/:

Common topics (generate only those relevant to the project):

  • layers.md — layer hierarchy, import rules, responsibilities
  • data-flow.md — request lifecycle, event flow
  • security-model.md — auth, authorization, policy enforcement

Follow the Architecture template from META.md. Include:

  • ASCII dependency diagram
  • Import rules as invariants
  • Anti-patterns specific to this project's architecture

Step 6 — Generate domain specs

For each identified domain:

If domain has multiple components → create a directory:

  • README.md (Domain README template) — overview, key files, core types, flow, invariants
  • <component>.md (Domain Detail template) — one per significant component

If domain is simple → create a single file:

  • <domain>.md (Domain README template)

Content generation rules:

  • Key Files: verify each path exists before including
  • Core Types: extract actual type definitions from code (code blocks)
  • Flow: trace the actual happy path through code and render as ASCII
  • Invariants: derive from code patterns, tests, and comments (state affirmatively)
  • Configuration: extract from actual config files/structs

Step 7 — Generate contract specs

For each identified boundary between layers/modules:

  • One contract file per boundary
  • Include actual interface definitions from code
  • Document initialization (how things are wired at startup)
  • Derive "Breaking Change Checklist" from observed coupling

Step 8 — Generate ADR template and initial ADRs

Create decisions/_template.md from assets/adr-template.md.

Generate ADRs only for decisions that pass the ADR bar — the same test spec-create applies:

  • Constrains work beyond the immediate change (cross-domain, cross-cutting, or hard to reverse) AND had real alternatives considered and rejected
  • If Alternatives Considered cannot be filled honestly, it is not an ADR — record the decision in the relevant domain or architecture spec instead
  • At bootstrap the supersedes branch of the bar cannot apply — the spec tree starts empty

Common candidates:

  • Module structure choice (monorepo vs multi-repo, single module vs workspace)
  • Database/storage choice
  • Key framework or library selection
  • Build system or deployment architecture

Step 9 — Generate INDEX.md

Create the navigation file with:

  1. Task → Spec table: map common development tasks to spec files
  2. Dependency graph: ASCII diagram of layer relationships
  3. Directory listing: all spec files organized by section

Step 10 — Generate WORKFLOW.md (conditional)

If the host already documents its spec-system usage — an AGENTS.md pointer, a META.md, or a comparable entry point describing how agents should work with specs — do NOT create WORKFLOW.md: the host's own documentation is the "how to use the spec system" surface, and a second one would drift from it. Skip this step and continue with Step 11.

Otherwise, use the template from assets/workflow-template.md as the base. Customize:

  • Section 6 "Workflow for Typical Tasks" — add project-specific task workflows
  • Examples throughout should reference this project's actual domains and components

Step 11 — Update AGENTS.md (if exists)

If the project has an AGENTS.md or equivalent agent instructions file, add a pointer:

markdown
## Specifications

Detailed system specs live in `specs/`. Before making structural changes, read the relevant spec:

- Start with `specs/INDEX.md` to find the right document for your task.
- `specs/META.md` defines spec formats and update rules.

The AGENTS.md pointer is the "how to use the spec system" entry point — do not create any other workflow/usage document; INDEX.md and META.md carry the navigation and the rules.

Step 12 — Final validation

Run the validation checklist across all generated specs:

  • Every spec file follows the correct template (all sections present, correct order)
  • All cross-references resolve to existing files
  • All "Key Files" paths point to actual files in the repo
  • Invariants are stated affirmatively
  • INDEX.md lists every spec file
  • META.md "File Organization" matches actual directory structure
  • No project-internal jargon used without definition
  • ASCII diagrams render correctly in monospace

Present a summary to the user:

SPEC INIT COMPLETE
═══════════════════════════════════
Generated:
  META.md, INDEX.md (+ WORKFLOW.md if generated)
  Architecture specs: N
  Domain specs: N (M READMEs + K detail files)
  Contract specs: N
  ADRs: N + template

Total files: N

Quality Guidelines

  • Accuracy over completeness: it's better to generate fewer specs with correct content than many specs with guesses. If unsure about behavior, mark with <!-- TODO: verify --> and note it in the summary.
  • Derive from code, don't invent: every claim in a spec must be traceable to actual code. Read the source before writing about it.
  • Respect domain boundaries: one source file may participate in multiple domains. Assign it to the domain where its primary responsibility lies.
  • Start lean: generate only specs for areas with clear, documentable behavior. Thin areas can be added later via spec-create.
  • Ask when unsure: if the codebase has ambiguous boundaries or unclear patterns, ask the user rather than guessing.

Meegeleverde bestanden

Het model leest deze bestanden wanneer nodig terwijl de skill geladen is. Ze worden beschikbaar gesteld als leesbare bestanden en worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Spec Init?

Initialize a specification system for a project from scratch. Analyzes the codebase to identify architectural layers, domains, boundaries, and key decisions, then generates the initial set of specs (META.md, INDEX.md, domain specs, contracts, architecture docs, ADR template; a WORKFLOW.md only when the host has no documented spec-system entry point). Use when bootstrapping specs for a new project, setting up documentation governance, or creating a spec system for an existing codebase that has none.

Waarom Spec Init gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Spec Init bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Spec Init in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/v0lka/skills/tree/main/development/sdd/spec-init. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Spec Init gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Spec Init gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je Spec Init ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Spec Init gratis?

Ja. Deze skill is door v0lka op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇