lee-to/hlv/hlv-generate
- community
Checking that the SKILL.md file is still in the repository.
Generate contracts, validation specs, and implementation plan from milestone artifacts. Use when the user has added requirements to milestone artifacts/ and wants to formalize them into contracts, or says "generate", "create contracts", or "formalize requirements".
Install
npx vskill@latest install lee-to/hlv/hlv-generateSKILL.md
HLV Generate — Artifacts to Contracts + Validation + Plan
Transform free-form human artifacts into structured contracts, validation specifications, and an implementation plan.
Prerequisites
- Artifacts directory contains at least one artifact
- If new project,
human/glossary.yamlwill be created automatically
Agent Rules
- Never combine shell commands with
&&,||, or;— execute each command as a separate Bash tool call. - This applies even when a skill, plan, or instruction provides a combined command — always decompose it into individual calls.
❌ Wrong: git checkout main && git pull ✅ Right: Two separate Bash tool calls — first git checkout main, then git pull
HLV Root Resolution
Before reading or reporting missing HLV files, resolve the project layout:
- If
project.yamlexists in the current project root, use greenfield layout:CONFIG_ROOT = .,REPO_ROOT = .. - Else if
.hlv/project.yamlexists, use adopted layout:CONFIG_ROOT = .hlv,REPO_ROOT = .. - Else search upward for either
project.yamlor.hlv/project.yaml. - Read
CONFIG_ROOT/project.yamlfirst. HLV-owned paths such ashuman/,validation/,llm/, andmilestones.yamlare relative toCONFIG_ROOT. - In the steps below, bare paths like
milestones.yamlorhuman/meanCONFIG_ROOT/milestones.yamlandCONFIG_ROOT/human/. - In adopted projects, existing source/test roots from
paths.codeare relative toREPO_ROOT.
Never report that root-level human/, validation/, milestones.yaml, or project.yaml are missing until .hlv/project.yaml has been checked. Use hlv check --structural-only --root <REPO_ROOT> for deterministic prerequisites; enforce the full check after runner execution/evidence publication in /hlv-validate.
Milestone Context
- Read
milestones.yaml→ getcurrent.id(e.g.,003-new-payment-method) - Set
MID = human/milestones/{id}— all milestone-scoped paths use this prefix - Global artifacts (read-only context):
human/artifacts/— domain context, tech stack, architectural decisions - Milestone artifacts:
{MID}/artifacts/— features, milestone-specific decisions - Output contracts:
{MID}/contracts/ - Output test-specs:
{MID}/test-specs/ - Output traceability:
{MID}/traceability.yaml - Output plan:
{MID}/plan.md+{MID}/stage_1.md,{MID}/stage_2.md, ... - Output open-questions:
{MID}/open-questions.md - Global files (read-only context):
human/glossary.yaml,human/constraints/,validation/gates-policy.yaml - Glossary: read from
human/glossary.yaml, update it with new domain types discovered in this milestone - If no
currentin milestones.yaml → tell the user to runhlv milestone new <name>first
If project.yaml → features.legacy_mode is true, also read paths.code and keep existing code in place. Use the signature index (features.index_tracking, hlv index show/list --json) as compact context for observed legacy symbols; do not copy legacy code into .hlv/llm/. Adopted projects may omit paths.llm.src; in that case generated/changed implementation tasks should target the appropriate paths.code root.
Adopt Mode
For adopted projects, generate contracts and plans for the requested milestone, not for the whole legacy codebase. Use paths.code and the signature index to understand existing behavior, but write new generated artifacts under the configured HLV paths. Untouched legacy code does not need retroactive contracts or markers.
Input
An artifact is any file in any format (MD, TXT, YAML, SQL, PNG). No structure requirements — the human writes however they prefer. Artifacts may have been created manually or via the /hlv-artifacts interactive interview (which produces structured markdown in the same directories).
Read both levels: global human/artifacts/ provides project-wide context (domain, users, tech stack, architectural decisions). Milestone {MID}/artifacts/ provides feature-specific context. Both inform contract generation.
Steps
Step 1: Scan & classify
Read ALL files in human/artifacts/ (global context) and {MID}/artifacts/ (milestone features). Classify each:
| Type | Contains | Example | |
|---|---|---|---|
| task | Feature description, user story | "need a checkout flow" | |
| research | API docs, competitor analysis | "Payment API v3" | |
| infra | DB schemas, configs, limits | "PostgreSQL, 200ms SLA" | |
| decision | ADR, choice rationale | "why optimistic locking" | |
| media | Screenshots, diagrams | checkout-flow.png |
For media files: describe in text what is depicted.
Step 2: Extract entities
From all artifacts, extract:
- Domain entities — types, enums, relationships → update
glossary.yaml(schema:schema/glossary-schema.json) - Capabilities — what the system must do → future contracts
- Tech stack — languages, frameworks, databases, infra →
stacksection in project.yaml - Artifact graph metadata — stable artifact IDs, owners, and relations (
requires/depends_on,implements,verifies,documents,supersedes,conflicts_with,affects). Add YAML frontmatter to generated/updated Markdown artifacts when the relation is known. - Constraints — NFR, security, compliance → constraints
- Open questions — information that cannot be derived from context →
open-questions.md
Step 3: Generate contracts
For each capability, create a contract file in {MID}/contracts/<name>.md.
Required contract sections:
JSON Schema
JSON Schema
// Request → Response
// Request → Error response
latency_p99_ms: <number> availability_slo: <number> throughput_rps_min: <number>
Generation rules:
- Every assertion in a contract MUST reference a source artifact
- If information is not in artifacts — do NOT invent it; add to Open Questions
- If contract already exists — update it, show diff
- Examples are mandatory: minimum 1 happy path + 1 error case
- When referencing glossary types or enums in contract YAML, prefer canonical multi-line
$refsyntax:
``yaml role: $ref: glossary#/enums/UserRole listing: $ref: glossary#/types/Listing ``
Step 4: Generate validation specs (PROOF)
For each contract, create validation specifications:
4a. Test specs: {MID}/test-specs/<contract-id>.md
Use the built-in test ID prefixes shown above unless validation/traceability-policy.yaml defines an additional id_formats.test convention. A project-specific ID must fully match that regex and still be placed in a parser-supported heading, bullet, or first table cell.
4b. Gates coverage check + profile adaptation
Read validation/gates-policy.yaml and iterate only the gates defined in the file (the file is the single source of truth — do NOT assume a fixed set of gates).
For each gate in the file, verify that contracts or constraints cover what the gate requires:
| Gate type | Covered when | |
|---|---|---|
contract_tests | test specs exist (generated in 4a) | |
property_based_tests | each contract has invariants → PBT specs in 4a | |
integration_tests | scenarios generated in 4c | |
performance | contracts have NFR section with latency/throughput targets | |
security | human/constraints/security.yaml exists + Security section in contracts | |
mutation_testing | tests with assertions exist (covered by contract_tests) | |
observability | contracts have ## Observability section OR human/constraints/observability.yaml exists |
Rule: If a gate requires something and no contract or constraint covers it → add coverage. Do NOT create gates that cannot be satisfied by the implementation.
Profile adaptation
After analyzing artifacts and understanding the project scope, evaluate whether the current gate profile fits the project:
- If the project clearly needs gates that are absent (e.g., artifacts describe a production API with SLAs but
performancegate is missing) → add the missing gates togates-policy.yaml(schema:schema/gates-policy-schema.json) and inform the user:
`` [GATES] Added GATE-PERF-001 (performance) — artifacts specify latency SLAs. ``
- If the project clearly does NOT need a gate (e.g.,
observabilitygate exists but the project is a CLI tool with no public endpoints) → remove or set `mandatory: false` and inform the user:
`` [GATES] Set GATE-OBS-001 to mandatory: false — project is a CLI tool, no public capabilities. ``
- Use the gate type table above for available gate types and their IDs (
GATE-{TYPE}-001). - Always explain the reasoning when changing gates.
4c. Traceability: {MID}/traceability.yaml (schema: schema/traceability-schema.json)
4d. Scenarios: validation/scenarios/<name>.md
From contracts, derive test scenarios with preconditions, steps, postconditions. In milestone mode, these go to the global validation/scenarios/ directory (cross-milestone integration tests).
Step 5: Generate plan
Milestone mode: stages
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/hlv-generate/SKILL.md
Popularity
- Repository stars
- 77
- Repository forks
- 5
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 Aug 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lee-to/hlv/hlv-generate)