$npx -y skills add techygarg/lattice --skill lattice-initGuided setup and upgrade-check experience for Lattice projects -- scans the repository, detects existing configuration and outdated conventions, suggests refiners and available upgrades in priority order, and creates or reconciles the .lattice/ config. Bridges the gap between ins
| 1 | # Lattice Init |
| 2 | |
| 3 | ## Required Skills |
| 4 | |
| 5 | Read apply skills order: |
| 6 | |
| 7 | 1. `framework:knowledge-priming` -- Load project context understand what project is what already exists |
| 8 | |
| 9 | ## Workflow |
| 10 | |
| 11 | ### Step 1: Scan the Project |
| 12 | |
| 13 | Detect signals about project understand shape existing Lattice state. |
| 14 | |
| 15 | **Language/framework detection** -- check files repo root: |
| 16 | - `package.json` → Node.js / TypeScript |
| 17 | - `go.mod` → Go |
| 18 | - `pom.xml` or `build.gradle` → Java |
| 19 | - `Cargo.toml` → Rust |
| 20 | - `requirements.txt` or `pyproject.toml` → Python |
| 21 | - `Gemfile` → Ruby |
| 22 | - `*.csproj` or `*.sln` → C# / .NET |
| 23 | |
| 24 | If multiple language markers found repo root, note all ask user which primary stack use refiner suggestions before continuing. |
| 25 | |
| 26 | **Directory structure** -- list top-level dirs. Identify common patterns: |
| 27 | - `src/`, `lib/`, `app/` → source code |
| 28 | - `test/`, `tests/`, `spec/` → test suites |
| 29 | - `docs/` → documentation |
| 30 | - `cmd/`, `internal/`, `pkg/` → Go project structure |
| 31 | - `domain/`, `infrastructure/`, `application/` → layered architecture |
| 32 | |
| 33 | **Existing `.lattice/` state** -- check what Lattice artifacts already exist: |
| 34 | - `.lattice/config.yaml` → central config (check for `language` key) |
| 35 | - `.lattice/standards/language-idioms.md` → language idioms refiner output |
| 36 | - `.lattice/standards/knowledge-base.md` → knowledge priming output |
| 37 | - `.lattice/standards/architecture.md` → architecture refiner output (clean architecture, hexagonal, modular monolith, or custom style) |
| 38 | - `.lattice/standards/clean-code.md` → clean code refiner output |
| 39 | - `.lattice/standards/ddd-principles.md` → DDD refiner output |
| 40 | - `.lattice/standards/review-standards.md` → review refiner output |
| 41 | - `.lattice/context/` → feature context documents (count them) |
| 42 | - `.lattice/learnings/operational-learnings.md` → accumulated operational learnings (managed by learning-harvest atom) |
| 43 | - `.lattice/reviews/review-log.md` → review log |
| 44 | - `.lattice/requirements/index.md` → check shape: if epic sections and feature tables are written directly inside it (no `epics/` directory alongside) and `requirements_layout` is absent from config, flag as **legacy layout — upgrade available** |
| 45 | |
| 46 | ### Step 2: Present Findings |
| 47 | |
| 48 | Present: |
| 49 | |
| 50 | ``` |
| 51 | ## Project Scan Results |
| 52 | |
| 53 | **Project**: [detected language/framework] at [repo root] |
| 54 | **Structure**: [key directories found] |
| 55 | |
| 56 | ### Lattice Setup Status |
| 57 | - `.lattice/config.yaml`: [exists / not found] |
| 58 | - Language: [detected language / language key from config / not detected] |
| 59 | - Language idioms: [found at .lattice/standards/language-idioms.md / not found] |
| 60 | - Knowledge base: [found at .lattice/standards/knowledge-base.md / not found] |
| 61 | - Architecture standards: [found at .lattice/standards/architecture.md / not found] |
| 62 | - Clean code standards: [found / not found] |
| 63 | - DDD standards: [found / not found] |
| 64 | - Review standards: [found / not found] |
| 65 | - Context documents: [N found / none] |
| 66 | - Review learnings: [found / none] |
| 67 | - Review log: [found / none] |
| 68 | - Requirements layout: [sharded / legacy — upgrade available / not found] |
| 69 | ``` |
| 70 | |
| 71 | **STOP: If `.lattice/config.yaml` and all core standards docs exist AND no legacy requirements layout was detected:** Tell user "Lattice fully configured." Skip to Step 4. |
| 72 | |
| 73 | **STOP:** if a legacy requirements layout was detected, do not skip on that basis alone — present it as a gap in Step 3 even when everything else is fully configured. |
| 74 | |
| 75 | ### Step 3: Guided Setup |
| 76 | |
| 77 | **Priority order**: |
| 78 | |
| 79 | 1. **Requirements layout upgrade** (if legacy layout detected in Step 1) -- "Your requirements index uses an older layout that hand-edits one shared file per feature, which causes merge conflicts when multiple developers work in parallel. The current layout shards it by epic and generates rollups from feature files instead of hand-editing them. One-time migration; does not touch any feature file's content beyond a link repointing (a rare exception is surfaced and confirmed, never silent). This upgrade only matters if your team keeps requirements in this repo -- teams tracking requirements in an external system (Jira, Linear, etc.) can skip it." |
| 80 | 2. **Knowledge-priming-refiner** (if `.lattice/standards/knowledge-base.md` missing) -- "Captures project identity -- tech stack, architecture, directory layout, conventions. Every other skill uses this context make better decisions." |
| 81 | 3. **Language-idioms-refiner** (if `.lattice/standards/language-idioms.md` missing) -- "Defines how your language expresses engineering |