lens-map-audit

Audits LENS/BMAD knowledge maps and ledgers for topology inconsistencies and projection readiness.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/crisweber2600/Lens.Core.Src --skill lens-map-audit-crisweber2600
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lens-map-audit
Source: https://github.com/crisweber2600/Lens.Core.Src/tree/main/_bmad/lens-work/skills/lens-map-audit
Command: npx skills add https://github.com/crisweber2600/Lens.Core.Src --skill lens-map-audit-crisweber2600

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Governed knowledge bases built on the LENS/BMAD two-tree model accumulate broken references, duplicate stable IDs, orphaned entities, and stale ledgers over time, making generated projections unreliable. This Skill validates feature archives and living ledgers against the topology model and produces a structured audit report that separates blocking issues from advisory cleanup. ## Core Features & Use Cases - Topology Validation: Builds an in-memory parent graph from belongs_to metadata and detects duplicate stable IDs, missing parents, cycles, broken links, and orphaned nodes. - Blocking vs Advisory Classification: Distinguishes issues that make a projection rebuild unsafe from advisory findings like stale updated_at values or incomplete optional metadata. - Structured Report Output: Produces a Markdown report with an executive verdict, findings tables, entity inventory, and a machine-readable JSON summary block for Lens UI ingestion. - Use Case: Before rebuilding a governance map projection, run the audit to confirm no duplicate published stable IDs or broken parent references exist, then review the completed-but-unpromoted feature list to plan knowledge promotion. ## Quick Start Ask the assistant to run a lens map audit on the project to validate the feature archives and living ledgers and generate the audit report.

Frequently Asked Questions about lens-map-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a Lens knowledge map for broken references?

Run the lens map audit, which inventories governed entities by stable ID and builds a parent graph from belongs_to metadata. It reports broken parent references, cycles, orphaned nodes, and invalid local links in a findings table with recommended fixes.

What is the difference between blocking and advisory findings in a map audit?

Blocking findings, such as duplicate published stable IDs or broken belongs_to references, make a projection rebuild unsafe and must be fixed first. Advisory findings cover stale updated_at values, incomplete optional metadata, and draft parent gaps that do not change the map.

Does the lens map audit modify my feature archives or ledgers?

No, the audit is strictly read-only. It never edits feature archives, ledgers, generated projections, or config files; when it finds an obvious fix, it describes the patch in the report instead of applying it.

Can the map audit run in headless mode without user interaction?

Yes, in headless mode it infers paths from config or defaults, writes the report to the reporting output path, and returns compact JSON with status, report_path, blocking_count, advisory_count, and projection_rebuild_ready.

Why are draft artifacts excluded from projection readiness checks?

Drafts are excluded because published projections must reflect only published governed entities. Draft artifacts can still be audited for issues, and a draft-inclusive preview is available only when the user explicitly requests it.