lee-to/hlv/hlv-implement
- community
Checking that the SKILL.md file is still in the repository.
Execute the implementation plan by assigning agents to tasks, generating code and tests from contracts. Agents work in parallel within stages. Use after /hlv-verify passes, when the user says "implement", "generate code", or "execute plan".
Install
npx vskill@latest install lee-to/hlv/hlv-implementSKILL.md
HLV Implement — Plan to Code + Tests
Execute the implementation plan: agents perform tasks from milestone stage files in parallel, generating code and tests from contracts.
Step 0: Read Configuration
Before proceeding, read project.yaml → features and note the flag values:
features.linear_architecture(default:true)features.hlv_markers(default:true)features.security_markers(default:true)features.legacy_mode(default:false)features.index_tracking(default:ignored)
These flags control which sections below are active. If project.yaml has no features section, use defaults: the first three booleans are true, legacy_mode is false, and index_tracking is ignored. If features.legacy_mode is true, also read paths.code and query the signature index with hlv index show --json <symbol> or hlv index list --json --file <path> before changing observed legacy code. Legacy code stays in place; only new/changed milestone work must follow the full contract and marker flow.
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.
Adopt Mode
When legacy_mode is enabled, treat paths.code as observed brownfield code and .hlv/llm/ as HLV metadata. Do not relocate legacy files into llm/src or .hlv/llm/src. Before editing a legacy file, use the signature index to identify the relevant symbols, then apply the normal contract-driven workflow to the changed files.
CRITICAL: Code Architecture Philosophy
Conditional: `features.linear_architecture: true`Iflinear_architectureisfalsein project.yaml, skip this entire section. Use your preferred architecture style instead.
The human DOES NOT read the generated code. The code is written FOR machines — LLM agents read it, LLM agents modify it, automated gates validate it.
This changes everything about how code is structured:
- Comments are for LLM navigation. The contract IS the documentation. Comments in code are navigation markers for LLM, not explanations for humans. Format:
// @ctx: stock validation for order.create contract. If something needs explaining — the contract is incomplete, go fix it.
- Maximize LLM-readability. No layered architecture. Flat module structure. Explicit types everywhere. No "clever" patterns, no metaprogramming, no implicit behavior. No layered architecture — controller/service/repository is a pattern for humans. LLM writes linearly: input → validation → logic → output → errors. One file, one flow. An LLM agent with a 200K context window must understand any module in isolation.
- One contract = one module boundary. Each contract maps to exactly one directory. All code for
order.createlives in one directory. No cross-contract imports except through domain types.
- Domain types are the shared language.
domain/typesis the ONLY shared code between features. Everything else is self-contained. Duplication across features is PREFERRED over coupling. Duplication is normal until it hurts: copy-paste between features is not refactored until it causes real problems (behavioral divergence, forgotten updates when contracts change).
- Tests live next to code. Tests are in the same file as the code (
#[cfg(test)] mod tests {}in Rust, equivalents in other languages). Every test traces back to a contract invariant, error case, or NFR via@hlvmarker. No "just in case" tests. No test helpers that hide behavior. Test code is as explicit as production code.hlv checkverifies every error code, invariant, and constraint rule has an@hlv <ID>marker in code. A separate configured integration-tests directory, when present, is only for cross-contract scenarios.
- File names are arbitrary. `map.yaml` is the navigator. Files can be named
01.rs,handler.rs,f3a.rs— any name is valid. The file map (paths.llm.mapfromproject.yaml) is the single source of truth about what each file does. LLM finds code by reading descriptions inmap.yaml, not by file names. Descriptions MUST be sufficient to choose a file without reading it. Each file does one thing, <300 lines, fully replaceable by an LLM without understanding neighboring files.
- No abstraction layers "for the future." No base classes, no generic frameworks, no plugin systems unless the contract explicitly requires extensibility. Write the simplest code that satisfies the contract. Three similar lines of code are better than a premature abstraction.
- Error paths are first-class. Every error from the contract's Errors table has an explicit code path. No catch-all error handlers. No
unwrap()/expect()in production code.
- Deterministic PUBLIC API, free internal structure. Given the same contract, two different LLM agents MUST produce code with the same public API (function signatures, error types, inputs/outputs). Internal file structure, naming, and organization are at the agent's discretion.
map.yamldescribes what lives where.
- Machine-verifiable correctness. Every invariant must be testable by property-based tests. Every NFR must be measurable. If it can't be automatically verified — it doesn't belong in code, it belongs in the contract's open questions.
Prerequisites
/hlv-verifypassed without critical issues- Plan contains tasks
- All open questions closed (or deferred with waiver)
milestones.yamlexists with acurrentsection- Current stage status is
pending,verified, orvalidating(remediation) - Stage file (
{MID}/stage_N.md) contains tasks
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
Input
Steps
Step 1: Read project map and load milestone context
- Read
project.yaml(global config: stack, paths)
- Note
validation.strictnesswhen present (relaxed,standard,strict). Default isstandard.
- Bind implementation paths from `project.yaml`:
- Greenfield/generated projects:
LLM_SRC = paths.llm.srcandLLM_TESTS = paths.llm.testswhen configured. - Adopted projects without
paths.llm.src: usepaths.code.src/paths.code.testsas the editable project code roots; do not create.hlv/llm/src. LLM_MAP = paths.llm.map(e.g.llm/map.yaml)
All subsequent steps MUST use these variables. Never assume `llm/src/` — always use the configured project paths.
> HARD CONSTRAINT — Output directory isolation > In greenfield mode, generated code and tests MUST stay inside configured paths.llm roots. > In adopt mode, existing project code roots from paths.code are editable; .hlv/llm/ is metadata, not source code. > hlv check enforces this mechanically with MAP-080 for implementation paths outside LLM_SRC and MAP-081 for test paths outside LLM_TESTS.
- Read
milestones.yaml→ getcurrent.idandcurrent.stage(current stage number) - Set
MID = human/milestones/{current.id} - Find the current stage in
current.stages[]by matching the stage number - STATUS GATE (hard stop):
- Read stage
status - Allowed values to proceed:
pending,verified,implementing,validating pending— implementation without prior /hlv-verifyverified— normal implementation after /hlv-verify passedimplementing— re-run, continue from pending tasksvalidating— remediation: /hlv-validate found gate failures and added FIX tasks to stage_N.md Remediation section. Execute only pending remediation tasks.implementedorvalidated— this stage is done. Check if there's a next stage to advance to, or inform user.
- Update stage status →
implementinginmilestones.yaml(schema:schema/milestones-schema.json) - Read
{MID}/stage_N.md— load tasks for the current stage - Read
project.yaml → stack.components— understand target languages, frameworks - Read
project.yaml → artifact_graph.code_ownershipwhen present. New or changed implementation/test/doc paths must preserve ownership mappings and relation fields (implements,verifies,documents,requires) sohlv artifacts impactcan route downstream review.
code-*ownership andimplementspaths must remain underLLM_SRC.tests-*ownership andverifiespaths must remain underLLM_TESTS.
- For every new or changed file under an artifact ownership path, add file-level evidence markers for the relevant relation, e.g.
@hlv:artifact code-auth implements spec-auth,@hlv:artifact tests-auth verifies spec-auth, or@hlv:artifact docs-auth documents spec-auth. Use the native comment syntax for the file type.
Step 2: Execute tasks
/hlv-implement works on ONE stage at a time. The current stage is determined by milestones.yaml → current.stage.
Tasks within a stage execute based on their dependency graph (topological sort):
- Tasks without unresolved
depends_on→ execute in parallel - Tasks with
depends_on→ wait for predecessors
After completing a stage, inform the user: "Stage N complete. Run /hlv-validate to check gates, or /hlv-implement for the next stage."
Step 3: Agent protocol
Each agent when executing a task:
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-implement/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-implement)