skill-align
Audit and fix all Lattice documentation, README, docs/, PROJECT.md, GitHub issue templates, and CLAUDE.md to ensure they are fully aligned with the current skill inventory. Documentation drift is the most common source of user confusion in Lattice — a skill exists in the codebase
Install
npx skills add https://github.com/techygarg/lattice/tree/main/dev-skills/skill-align
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install techygarg-lattice@llmmart
git clone https://github.com/techygarg/lattice.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole techygarg/lattice collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Lattice Sync
Core responsibility: Keep every public-facing document in sync with the actual skill inventory. The skills directory is the source of truth — all documents derive from it.
Input: None required. Reads the live state of skills/ and all documentation on every run. Optionally: a specific skill name or tier to focus the audit.
Output:
- A findings report listing every gap as
[GAP],[STALE], or[WRONG]with file and description - All found gaps fixed in-place across:
README.md,docs/how-it-works.md,docs/configuration.md,docs/practical-guide.md,PROJECT.md,CLAUDE.md,.github/ISSUE_TEMPLATE/bug_report.yml - A final clean confirmation: "No gaps found" or a list of what was changed
How to verify this skill did its job:
grep -rn "requirements atom\|framework:requirements\b" \
docs/ README.md PROJECT.md CLAUDE.md .github/ skills/ \
--include="*.md" --include="*.yml"
Any result from this grep means the sync is incomplete. A clean run returns no output.
Also verify: every skill in skills/ appears in the bug_report.yml dropdown and the how-it-works.md inventory tables.
When to run
- After creating any new atom, molecule, or refiner
- After renaming or removing a skill
- After changing a skill's config key, consumed-by relationships, or output path
- When a user suspects docs are out of date
Phase 1 — Build the live inventory
Read the skills directory tree. STOP: do NOT assume you already know the inventory — always read from files.
find skills/ -name "SKILL.md" | sort
For each SKILL.md found, extract:
name:field (frontmatter)tier:inferred from path (atoms/,molecules/,refiners/)- Config key: grep for
paths\.\w+in the file - Consumes: grep for
framework:references (molecules only) - Produces: grep for
.lattice/standards/path (refiners only) - Output subfolder: grep for
.lattice/\w+/paths (molecules only)
Build a structured inventory:
atoms: [name, config_key, has_refiner, has_defaults_md]
molecules: [name, composes[], output_subfolder]
refiners: [name, config_key, produces_path, consumed_by_atom]
Read references/audit-checklist.md for the complete per-document audit rules before starting Phase 2.
Phase 2 — Audit each document
Work through every document in this order. For each, apply the checks in references/audit-checklist.md. STOP: a document with zero findings gets no entry in the report — do not print a heading or a "no gaps" line for it. Log every finding as:
[GAP] file:line — description of what is missing or wrong
[STALE] file:line — description of what refers to something that no longer exists
[WRONG] file:line — description of a relationship (consumed-by, produces) that is incorrect
Documents to audit:
docs/how-it-works.mddocs/configuration.mddocs/practical-guide.mdREADME.mdPROJECT.md— Skill Conventions, Known subfolders list, and Repository Structure counts all live here.github/ISSUE_TEMPLATE/bug_report.yml.github/ISSUE_TEMPLATE/skill_request.yml(generic — only check if skill-specific examples are present).github/ISSUE_TEMPLATE/documentation.yml(generic — only check if skill names appear)knowledge-base/requirement-forge-requirements.md(if exists — check it matches current skill names)
Present a consolidated findings report before making any changes:
## Lattice Sync — Findings
### docs/how-it-works.md
[GAP] Atoms table missing: requirement-quality
[STALE] Refiners in Depth: requirement-forge-refiner consumed-by says "molecule" but should say "requirement-quality atom"
### .github/ISSUE_TEMPLATE/bug_report.yml
[GAP] Skill dropdown missing: requirement-quality (atom)
Total: N gaps, M stale references, P wrong relationships
Ask: "Ready to apply all fixes? Or are there any findings you want to skip?"
Phase 3 — Fix
Apply every agreed fix. For each document, make all changes in a single edit pass. STOP: do not make multiple passes over the same file.
After all fixes are applied, run one final verification grep to confirm no old references remain:
# Check for stale atom names or wrong consumed-by text
grep -rn "<old-name>\|consumed.*molecule\|consumed.*wrong" \
docs/ README.md PROJECT.md CLAUDE.md .github/ --include="*.md" --include="*.yml"
If the grep returns results, fix them before declaring done.
Phase 4 — Deploy (optional)
If the user wants to push the updated skills to their AI tool's skills directory:
./tools/install.sh /path/to/your/skills/folder
Ask the user for the target path if not provided. Default for Claude Code: ~/.claude/skills/.
Key relationships to always verify
The most error-prone relationship in Lattice documentation is the refiner → atom → molecule chain. Documents frequently drift to say a refiner is "consumed by the molecule" when it's actually consumed by an atom that the molecule composes.
For every refiner in the live inventory, derive the correct relationship dynamically:
- Read the refiner's SKILL.md — find which atom it says consumes it (look for "consumed by" or "reads this document")
- Read that atom's Config Resolution — confirm it reads the same
paths.{key} - Read the molecule that composes that atom — confirm the chain is complete
- If any document says the refiner is consumed by the molecule directly (not the atom), flag
[WRONG]
Exception: review-refiner is consumed by the review molecule directly — it configures the molecule's workflow, not an atom. This is the only correct molecule-direct consumption in the current framework.
Known .lattice/ subfolders
Every molecule that writes living documents must use a named subfolder. If a new molecule is found that writes to .lattice/ and its subfolder is not in this list, flag it for addition to PROJECT.md:
standards/— refiner outputscontext/— feature anchor docs (context-anchoring atom)learnings/— operational learnings (learning-harvest atom)reviews/— review loginsights/— architecture-compass outputrequirements/— epic/feature specs (requirement-forge)
What good looks like
The sync is complete when:
- Every skill in
skills/appears in thedocs/how-it-works.mdinventory tables - Every refiner has a correct entry in
docs/configuration.mdpaths table with the right consumed-by atom - Every molecule appears in
bug_report.ymlskill dropdown - Every atom appears in
bug_report.ymlskill dropdown - Every refiner appears in
bug_report.ymlskill dropdown PROJECT.mdknown subfolders list covers every.lattice/output directory- No document contains a skill name that no longer exists in
source/ - The pipeline descriptions in
README.mdanddocs/how-it-works.mduse current molecule names in the right order - Every molecule that hardcodes its own refiner list (
refiners-update's map table,lattice-init's Step 3 priority list) has one entry per live refiner insource/refiners/— no missing, no stale
See references/audit-checklist.md for the exhaustive per-document rules.
Files (lattice)
-
references
-
audit-checklist.md 8.4 KB
# Lattice Sync — Per-Document Audit Checklist For each document, apply the checks listed. Every `[ ]` item is a potential finding. --- ## 1. `docs/how-it-works.md` ### Atoms table (§ Skill Inventory → Atoms) For every atom in the live inventory: - [ ] Row exists with correct `name` and `/name` command - [ ] `What it enforces` description is accurate and current - [ ] No rows exist for atoms that have been removed ### Molecules table (§ Skill Inventory → Molecules) For every molecule in the live inventory: - [ ] Row exists with correct `name` and `/name` command - [ ] `What it does` description reflects current behavior (especially after workflow changes) - [ ] No rows exist for molecules that have been removed ### Refiners table (§ Skill Inventory → Refiners) For every refiner in the live inventory: - [ ] Row exists with correct `name` and `/name` command - [ ] `Produces` path is correct and matches what the refiner actually writes - [ ] No rows exist for refiners that have been removed ### Always vs Conditional atoms (§ Atoms in Depth) - [ ] Every conditional atom is listed with its condition correctly stated - [ ] No atom is listed that has been removed - [ ] `requirement-quality` listed as conditional (applies during requirement-forge / spec validation) ### Molecules in Depth For every molecule in the live inventory: - [ ] Has a dedicated `### <molecule-name>` section - [ ] `Composes:` list matches the molecule's `Required Skills` section accurately - [ ] `How it works` steps reflect the current workflow (not an outdated version) - [ ] No section exists for a removed molecule ### Refiners in Depth table For every refiner: - [ ] Row exists - [ ] `Consumed by` correctly names the **atom** (not molecule) for refiners that target atoms - [ ] Exception: `review-refiner` → consumed by `review` molecule directly (correct) - [ ] Exception: (none currently — all others go atom → molecule) ### `.lattice/` folder Structure section - [ ] `standards/` lists all current refiner output files - [ ] All known subfolders are listed (`requirements/`, `insights/`, `context/`, `learnings/`, `reviews/`, `standards/`) - [ ] Subfolder Lifecycles table has a row for every subfolder ### Pipeline section - [ ] All pipeline paths use current molecule names - [ ] Full pipeline includes `requirement-forge` as optional upstream step --- ## 2. `docs/configuration.md` ### File structure YAML example - [ ] Every `paths.*` key used by any atom or refiner appears in the YAML block - [ ] No key in the YAML block refers to a removed skill ### `paths` Keys table For every refiner in the live inventory: - [ ] Row exists with correct `Key` (snake_case) - [ ] `Purpose` description is accurate - [ ] `Produced by` names the correct refiner - [ ] `Default path` is correct (`.lattice/standards/<name>.md`) - [ ] `Consumed by` correctly names the atom (not the molecule) — except `review_standards` which names the `review` molecule - [ ] `Mode` is correct (`overlay` vs `override` vs `standalone`) Special case — `requirement_standards`: - [ ] `Consumed by`: "`requirement-quality` atom" (NOT "requirement-forge molecule") - [ ] `Mode`: `overlay (recommended)` --- ## 3. `docs/practical-guide.md` ### Contents list - [ ] Every `## Section` heading in the document appears in the Contents list - [ ] No Contents entry points to a section that doesn't exist ### Requirements section - [ ] Covers: when to use requirement-forge vs design-blueprint - [ ] Covers: output structure (index.md + features/) - [ ] Covers: what a scenario is - [ ] Covers: refiner optional / defaults communicated - [ ] Covers: handling existing PRDs / unstructured material - [ ] Covers: interrupted session / resume behavior - [ ] Covers: single-feature fast path ### Workflow section - [ ] `/design-blueprint` Q&A mentions requirement-forge as an upstream option ### Getting Started section - [ ] `.lattice/` folder description mentions `requirements/` subfolder ### Troubleshooting section - [ ] No references to removed skills or old skill names --- ## 4. `README.md` ### Pipeline description - [ ] Pipeline text names `requirement-forge` as the upstream step - [ ] Pipeline uses current molecule names in correct order ### Getting Started steps - [ ] Step for `/requirement-forge` present (marked optional but recommended) - [ ] Step numbers are sequential and correct after any additions ### The Three Tiers table - [ ] No stale skill names appear in tier descriptions - [ ] Atoms row description is accurate given the current atom inventory --- ## 5. `PROJECT.md` ### Known subfolders list (Key Patterns section) - [ ] `requirements/` listed with description "epic/feature specs produced by requirement-forge" - [ ] `insights/` listed - [ ] All other known subfolders present ### Skill Conventions section - [ ] If a new tier convention was established, it's documented - [ ] No references to skills that no longer exist ### Repository Structure section - [ ] Molecule count is accurate - [ ] Refiner count is accurate - [ ] Atom count is accurate --- ## 6. `.github/ISSUE_TEMPLATE/bug_report.yml` ### Skill dropdown options The dropdown must contain every skill in the live inventory, grouped by tier, in this format: - `<name> (atom)` — for atoms - `<name> (molecule)` — for molecules - `<name> (refiner)` — for refiners Checks — derive expected entries from the live inventory built in Phase 1, not from any hardcoded list: - [ ] For every atom name in the live inventory: `<name> (atom)` entry exists in the dropdown - [ ] For every molecule name in the live inventory: `<name> (molecule)` entry exists in the dropdown - [ ] For every refiner name in the live inventory: `<name> (refiner)` entry exists in the dropdown - [ ] No entries exist in the dropdown for skills not present in the live inventory (stale entries) - [ ] `Other / unsure` option is present as the first option Do NOT compare against a hardcoded list. Compare against the inventory you built in Phase 1 by reading `skills/`. That inventory is always current. --- ## 7. `.github/ISSUE_TEMPLATE/skill_request.yml` This is a generic form. Only check if skill-specific names appear: - [ ] If any specific skill names are referenced as examples, verify they still exist --- ## 8. `.github/ISSUE_TEMPLATE/documentation.yml` This is a generic form. Only check: - [ ] If specific doc file names are listed in dropdowns, verify those files still exist --- ## 9. `knowledge-base/` files For any requirements docs in `knowledge-base/`: - [ ] Skill names referenced match current inventory names (e.g., `requirement-quality` not `requirements`) - [ ] Status fields are current --- ## Cross-cutting checks (run after all individual document checks) ### Name consistency For every skill: - [ ] Folder name == `name:` frontmatter field (e.g., folder `requirement-quality/` → `name: requirement-quality`) - [ ] All documents use the same canonical name (no mix of `requirement-quality` and `requirements`) ### Config key consistency For every refiner: - [ ] The config key used in the refiner SKILL.md matches the key in `docs/configuration.md` - [ ] The key follows snake_case convention ### Required Skills consistency (molecules) For each `Required Skills` entry in a molecule: - [ ] The referenced atom (`framework:<name>`) exists in `source/atoms/<name>/` - [ ] The atom is described accurately (always/conditional) ### Hardcoded refiner list consistency (molecules) Some molecules maintain their own list or table of refiners instead of deriving it dynamically. Currently: `refiners-update`'s "Refiner → standards document map" table, and `lattice-init`'s Step 3 priority list. For each such list: - [ ] Every refiner in the live inventory (from Phase 1) has a corresponding row/entry - [ ] No entry exists for a refiner that no longer exists in `source/refiners/` - [ ] Any config key referenced in the entry matches that refiner's actual `paths.*` key This is distinct from "Required Skills consistency" above — Required Skills lists atoms a molecule always/conditionally composes; this checks a molecule's own hardcoded routing table against the live refiner directory. ### Stale reference scan ```bash # Run this to surface any remaining stale references after fixes grep -rn "requirements atom\|framework:requirements\b\|consumed.*requirement-forge molecule" \ docs/ README.md PROJECT.md CLAUDE.md .github/ skills/ \ --include="*.md" --include="*.yml" 2>/dev/null ``` Any result from this grep is a `[STALE]` finding.
-
-
SKILL.md 7.8 KB
--- name: skill-align description: "Audit and fix all Lattice documentation, README, docs/, PROJECT.md, GitHub issue templates, and CLAUDE.md to ensure they are fully aligned with the current skill inventory. Documentation drift is the most common source of user confusion in Lattice — a skill exists in the codebase but not in the docs, or a renamed skill leaves a stale reference in the bug report template. If you've made any change to skills/ and haven't run this, run it now. Use when the user says 'align docs', 'audit docs', 'update documentation', 'skill align', 'check docs are in sync', 'audit skill inventory', 'ensure docs are aligned', 'are the docs up to date', or 'what needs updating'. Standalone — does not call other skills." --- # Lattice Sync **Core responsibility:** Keep every public-facing document in sync with the actual skill inventory. The skills directory is the source of truth — all documents derive from it. **Input:** None required. Reads the live state of `skills/` and all documentation on every run. Optionally: a specific skill name or tier to focus the audit. **Output:** - A findings report listing every gap as `[GAP]`, `[STALE]`, or `[WRONG]` with file and description - All found gaps fixed in-place across: `README.md`, `docs/how-it-works.md`, `docs/configuration.md`, `docs/practical-guide.md`, `PROJECT.md`, `CLAUDE.md`, `.github/ISSUE_TEMPLATE/bug_report.yml` - A final clean confirmation: "No gaps found" or a list of what was changed **How to verify this skill did its job:** ```bash grep -rn "requirements atom\|framework:requirements\b" \ docs/ README.md PROJECT.md CLAUDE.md .github/ skills/ \ --include="*.md" --include="*.yml" ``` Any result from this grep means the sync is incomplete. A clean run returns no output. Also verify: every skill in `skills/` appears in the bug_report.yml dropdown and the how-it-works.md inventory tables. ## When to run - After creating any new atom, molecule, or refiner - After renaming or removing a skill - After changing a skill's config key, consumed-by relationships, or output path - When a user suspects docs are out of date ## Phase 1 — Build the live inventory Read the skills directory tree. **STOP: do NOT assume you already know the inventory** — always read from files. ```bash find skills/ -name "SKILL.md" | sort ``` For each SKILL.md found, extract: - `name:` field (frontmatter) - `tier:` inferred from path (`atoms/`, `molecules/`, `refiners/`) - Config key: grep for `paths\.\w+` in the file - Consumes: grep for `framework:` references (molecules only) - Produces: grep for `.lattice/standards/` path (refiners only) - Output subfolder: grep for `.lattice/\w+/` paths (molecules only) Build a structured inventory: ``` atoms: [name, config_key, has_refiner, has_defaults_md] molecules: [name, composes[], output_subfolder] refiners: [name, config_key, produces_path, consumed_by_atom] ``` Read `references/audit-checklist.md` for the complete per-document audit rules before starting Phase 2. --- ## Phase 2 — Audit each document Work through every document in this order. For each, apply the checks in `references/audit-checklist.md`. **STOP: a document with zero findings gets no entry in the report** — do not print a heading or a "no gaps" line for it. Log every finding as: ``` [GAP] file:line — description of what is missing or wrong [STALE] file:line — description of what refers to something that no longer exists [WRONG] file:line — description of a relationship (consumed-by, produces) that is incorrect ``` Documents to audit: 1. `docs/how-it-works.md` 2. `docs/configuration.md` 3. `docs/practical-guide.md` 4. `README.md` 5. `PROJECT.md` — Skill Conventions, Known subfolders list, and Repository Structure counts all live here 6. `.github/ISSUE_TEMPLATE/bug_report.yml` 7. `.github/ISSUE_TEMPLATE/skill_request.yml` *(generic — only check if skill-specific examples are present)* 8. `.github/ISSUE_TEMPLATE/documentation.yml` *(generic — only check if skill names appear)* 9. `knowledge-base/requirement-forge-requirements.md` *(if exists — check it matches current skill names)* Present a consolidated findings report before making any changes: ``` ## Lattice Sync — Findings ### docs/how-it-works.md [GAP] Atoms table missing: requirement-quality [STALE] Refiners in Depth: requirement-forge-refiner consumed-by says "molecule" but should say "requirement-quality atom" ### .github/ISSUE_TEMPLATE/bug_report.yml [GAP] Skill dropdown missing: requirement-quality (atom) Total: N gaps, M stale references, P wrong relationships ``` Ask: *"Ready to apply all fixes? Or are there any findings you want to skip?"* --- ## Phase 3 — Fix Apply every agreed fix. For each document, make all changes in a single edit pass. **STOP: do not make multiple passes over the same file.** After all fixes are applied, run one final verification grep to confirm no old references remain: ```bash # Check for stale atom names or wrong consumed-by text grep -rn "<old-name>\|consumed.*molecule\|consumed.*wrong" \ docs/ README.md PROJECT.md CLAUDE.md .github/ --include="*.md" --include="*.yml" ``` If the grep returns results, fix them before declaring done. --- ## Phase 4 — Deploy (optional) If the user wants to push the updated skills to their AI tool's skills directory: ```bash ./tools/install.sh /path/to/your/skills/folder ``` Ask the user for the target path if not provided. Default for Claude Code: `~/.claude/skills/`. --- ## Key relationships to always verify The most error-prone relationship in Lattice documentation is the refiner → atom → molecule chain. Documents frequently drift to say a refiner is "consumed by the molecule" when it's actually consumed by an atom that the molecule composes. For every refiner in the live inventory, derive the correct relationship dynamically: 1. Read the refiner's SKILL.md — find which atom it says consumes it (look for "consumed by" or "reads this document") 2. Read that atom's Config Resolution — confirm it reads the same `paths.{key}` 3. Read the molecule that composes that atom — confirm the chain is complete 4. If any document says the refiner is consumed by the molecule directly (not the atom), flag `[WRONG]` Exception: `review-refiner` is consumed by the `review` molecule directly — it configures the molecule's workflow, not an atom. This is the only correct molecule-direct consumption in the current framework. --- ## Known `.lattice/` subfolders Every molecule that writes living documents must use a named subfolder. If a new molecule is found that writes to `.lattice/` and its subfolder is not in this list, flag it for addition to `PROJECT.md`: - `standards/` — refiner outputs - `context/` — feature anchor docs (context-anchoring atom) - `learnings/` — operational learnings (learning-harvest atom) - `reviews/` — review log - `insights/` — architecture-compass output - `requirements/` — epic/feature specs (requirement-forge) --- ## What good looks like The sync is complete when: - Every skill in `skills/` appears in the `docs/how-it-works.md` inventory tables - Every refiner has a correct entry in `docs/configuration.md` paths table with the right consumed-by atom - Every molecule appears in `bug_report.yml` skill dropdown - Every atom appears in `bug_report.yml` skill dropdown - Every refiner appears in `bug_report.yml` skill dropdown - `PROJECT.md` known subfolders list covers every `.lattice/` output directory - No document contains a skill name that no longer exists in `source/` - The pipeline descriptions in `README.md` and `docs/how-it-works.md` use current molecule names in the right order - Every molecule that hardcodes its own refiner list (`refiners-update`'s map table, `lattice-init`'s Step 3 priority list) has one entry per live refiner in `source/refiners/` — no missing, no stale See `references/audit-checklist.md` for the exhaustive per-document rules.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.