LENS.MD — Native ConectLens lens/task unit
LENS.MD is the canonical, file-first representation of a lens: a reusable prompt/task unit with a structured body and optional parameter contract. It is the native ConectLens form, validated by lenserfight validate, exported by lenserfight export lens, and consumed by lenserfight workflow run.
Filename
- Canonical:
LENS.MD(upper-case.MD) - Container directory:
lenses/<slug>/LENS.MD(or any path on disk; folder containment matters for progressive disclosure) - Lookup: case-insensitive — discovery normalises file names through
PRIMARY_FILE_KIND_BY_NAMEin automation-objects.ts.
Required frontmatter
Native ConectLens lenses can use the compact Agent-Skills-style frontmatter with just two keys:
| Key | Type | Notes |
|---|---|---|
name | string | Display name |
description | string | One-line purpose used by discovery and UIs |
Optionally, when the lens body uses [[parameter]] placeholders, the frontmatter must declare each parameter:
parameters:
- label: topic # required, normalised to snake_case for matching
tool_id: <uuid> # required, must be a UUID — mirrors lenses.version_parameters.tool_idIf the lens body declares [[topic]] but parameters is missing or empty, validation fails. Declared labels not used in the body emit a warning.
Required sections (legacy strict mode)
When kind: and schema_version: are present (the legacy portable form), the lens body must contain these # headings:
# Purpose# Prompt# Inputs# Outputs
Native compact lenses (only name and description) skip section checks.
Validation rules
- Frontmatter present and parsable as YAML.
- Required keys (
name,description). - Parameter contract: every
[[placeholder]]in the body must be declared, and every declaredparameters[i]must havelabeland a UUIDtool_id. - Progressive disclosure paths (
references[],scripts[],assets[],evals[]) must live underreferences/,scripts/,assets/,evals/relative to the lens directory and resolve to existing files. - Disclaimer markers: lenses tagged
legalmust say "not legal advice"; lenses taggedfinancemust say "not financial advice".
Canonical template
lenserfight export lens --template --out .lenserfight/lenses/example/LENS.MD---
kind: lens
schema_version: 1
id: lens_<uuid>
slug: market-brief
name: Market Brief Lens
description: Structured task unit for a reusable market brief prompt.
owner:
workspace_id: ws_<uuid>
visibility: workspace
status: draft
version: 0.1.0
tags: [research]
input_schema: { type: object }
output_schema: { type: object }
evaluation_refs: []
---
# Purpose
Explain what this lens is meant to do.
# Prompt
Write the structured prompt body here.
# Inputs
Describe runtime inputs and validation.
# Outputs
Describe the expected output shape and quality bar.