‹ 首页

lattice-init

@techygarg · 收录于 1 周前

Guided setup experience for new Lattice projects -- scans the repository, detects existing configuration, suggests refiners in priority order, and creates the .lattice/ config. Bridges the gap between installing skills and getting first value. Use when the user says 'lattice init', 'set up lattice', 'initialize lattice', 'get started with lattice', or 'configure lattice for this project'.

适合你,如果刚安装 Lattice 技能,需要快速完成项目配置并开始使用

/ 下载安装
lattice-init.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add techygarg/lattice/lattice-init
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- techygarg/lattice/lattice-init
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify techygarg/lattice/lattice-init
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
159GitHub stars
待重算上下文体积
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · e5a5a73

Lattice Init

Required Skills

Read apply skills order:

  1. framework:knowledge-priming -- Load project context understand what project is what already exists
Workflow
Step 1: Scan the Project

Detect signals about project understand shape existing Lattice state.

Language/framework detection -- check files repo root:

  • package.json → Node.js / TypeScript
  • go.mod → Go
  • pom.xml or build.gradle → Java
  • Cargo.toml → Rust
  • requirements.txt or pyproject.toml → Python
  • Gemfile → Ruby
  • *.csproj or *.sln → C# / .NET

If multiple language markers found repo root, note all ask user which primary stack use refiner suggestions before continuing.

Directory structure -- list top-level dirs. Identify common patterns:

  • src/, lib/, app/ → source code
  • test/, tests/, spec/ → test suites
  • docs/ → documentation
  • cmd/, internal/, pkg/ → Go project structure
  • domain/, infrastructure/, application/ → layered architecture

Existing .lattice/ state -- check what Lattice artifacts already exist:

  • .lattice/config.yaml → central config (check for language key)
  • .lattice/standards/language-idioms.md → language idioms refiner output
  • .lattice/standards/knowledge-base.md → knowledge priming output
  • .lattice/standards/architecture.md → architecture refiner output (clean architecture, hexagonal, modular monolith, or custom style)
  • .lattice/standards/clean-code.md → clean code refiner output
  • .lattice/standards/ddd-principles.md → DDD refiner output
  • .lattice/standards/review-standards.md → review refiner output
  • .lattice/context/ → feature context documents (count them)
  • .lattice/learnings/operational-learnings.md → accumulated operational learnings (managed by learning-harvest atom)
  • .lattice/reviews/review-log.md → review log
Step 2: Present Findings

Present:

## Project Scan Results

**Project**: [detected language/framework] at [repo root]
**Structure**: [key directories found]

### Lattice Setup Status
- `.lattice/config.yaml`: [exists / not found]
- Language: [detected language / language key from config / not detected]
- Language idioms: [found at .lattice/standards/language-idioms.md / not found]
- Knowledge base: [found at .lattice/standards/knowledge-base.md / not found]
- Architecture standards: [found at .lattice/standards/architecture.md / not found]
- Clean code standards: [found / not found]
- DDD standards: [found / not found]
- Review standards: [found / not found]
- Context documents: [N found / none]
- Review learnings: [found / none]
- Review log: [found / none]

STOP: If .lattice/config.yaml and all core standards docs exist: Tell user "Lattice fully configured." Skip to Step 4.

Step 3: Guided Setup

Priority order:

  1. 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."
  2. Language-idioms-refiner (if .lattice/standards/language-idioms.md missing) -- "Defines how your language expresses engineering patterns -- error handling, type system, naming, testing, DI. Multiple atoms use this to adapt pseudocode defaults to your language. Fast interview: proposes language-idiomatic defaults, you confirm or adjust."
  3. Architecture-refiner (if .lattice/standards/architecture.md missing AND project has source code dir) -- "Defines project architecture standards — layer structure, dependency rules, validation checklist. Supports multiple styles: clean architecture (default), hexagonal / ports & adapters, modular monolith, or custom."
  4. DDD-refiner (if .lattice/standards/ddd-principles.md missing AND project has domain folder or domain-like structure) -- "Captures aggregate design rules, entity patterns, domain event conventions so DDD atom enforces domain modeling style."
  5. Clean-code-refiner (if .lattice/standards/clean-code.md missing) -- "Tailors coding standards -- function size limits, complexity thresholds, naming conventions. Defaults work well most projects, so optional."
  6. Review-refiner (if .lattice/standards/review-standards.md missing) -- "Customizes how review molecule works -- atom loading rules, severity levels, report format, scope rules. Defaults work well most projects, so optional."

For each gap, present user:

  • What refiner does (one sentence, from descriptions above)
  • Three choices: Run now, Skip for later, or Skip all remaining

If user says "run" → Tell user invoke refiner: "Run /[refiner-name] now start guided interview."

If user says "skip" → Move next refiner priority order.

If user says "skip all" → Jump Step 4.

Config creation: If .lattice/config.yaml not exist and user not run any refiners (skipped all), create minimal config file:

# .lattice/config.yaml -- Lattice Framework Configuration
# All paths are relative to the repository root.
# Run refiners to populate: /knowledge-priming-refiner, /language-idioms-refiner, /architecture-refiner, /ddd-refiner, /clean-code-refiner, /review-refiner

version: 1
language: {detected-language}
paths: {}

If user runs at least one refiner, refiner itself create or update config file -- no need create here. Set language key from detected language even if no refiners run.

Step 4: Next Steps
## You're Ready

Lattice is set up. Here's the workflow:

1. **Design a feature**: `/design-blueprint` -- walks through 5 progressive design levels
2. **Implement**: `/code-forge` -- generates code from the blueprint with built-in quality checks
3. **Refactor safely**: `/refactor-safely` -- agrees the target structure first, adds characterization protection, and improves code without changing behavior
4. **Fix a bug**: `/bug-fix` -- reproduces the failure, adds a regression test, and applies the minimal safe repair
5. **Review**: `/review` -- audits generated code against atom standards

Atoms (architecture, clean-code, DDD, secure-coding, etc.) activate automatically during these workflows.
You can also use atoms standalone -- they apply checks based on what you're working on.

If any refiners skipped Step 3, add reminder:

### Skipped refiners
You can run these anytime to further customize Lattice for your project:
- [list skipped refiners with their slash commands]
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。