# if.story lint rules (v1)

Black/white:
- Verified: this document defines publish-time lint checks for `narrative_log.v1` artifacts.
- Not verified / out of scope: this does not imply any deployed enforcement or runtime exists.

## Publish-blocking lints (fail)

### 1) Missing `trap` (required)
Fail if the narrative or metadata is missing a defensive “trap” that includes:
- risk
- do_not
- safe_path
- evidence_links

### 2) Missing `evidence_links` (required)
Fail if:
- the JSON lacks `evidence_links`, or
- the Markdown lacks an evidence section, or
- evidence links are present but not stable/public.

### 3) Secrets leakage
Fail if published artifacts contain credentials or sensitive material (examples: API tokens, private keys, session cookies).

### 4) URL hygiene (external review safe)
Fail if:
- a single line contains more than one `https://` occurrence,
- canonical links include querystrings (share clean URLs),
- links point to private hostnames or internal-only infrastructure.

### 5) Unknown `product_ids`
Fail if `product_ids` includes any ID not present in `if.registry.json`.

### 6) Forbidden overclaim wording
Fail if the artifact implies guarantees the platform does not verify (examples: claims of factual truth, safety, compliance, or “quantum” security).  
Use **QUANTUM READY** only when a PQ receipt exists, and keep “verified” language scoped to byte integrity.

## Evidence surfaces (for review)
https://infrafabric.io/if/story/
https://infrafabric.io/llm/products/if-story/
https://infrafabric.io/llm/if.registry.json
https://infrafabric.io/if/trace/
