From lattice
Generates implementation code from an approved design blueprint or verbal requirements, applying clean code, DDD, security, and test quality patterns in an inside-out workflow.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lattice:code-forgeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read, apply:
Read, apply:
framework:knowledge-priming -- Load proj context (stack, arch, conventions) so impl matches real proj (always)framework:context-anchoring -- Load/find context anchor doc; enrich as impl decisions made (always)framework:learning-harvest -- Load prior operational learnings inform impl; harvest new patterns at session end (always)framework:collaborative-judgment -- Surface real judgment calls w/ structured opts vs silent assume (always)framework:architecture -- Layer place, dep direction, struct valid (always)framework:clean-code -- Craft rails: SRP, naming, complexity, err handle (always)framework:domain-driven-design -- Aggregates, entities, VOs, domain svcs (conditional: only when touch domain folder)framework:secure-coding -- Trust bounds, injection prevent, secrets mgmt (conditional: only boundary-cross code)framework:test-quality -- AAA struct, isolation, assert quality, naming (always when write tests)Use framework:learning-harvest Load behavior. Focus hint: "implementation session — focus: implementation craft, quality signals, reliability".
Use framework:context-anchoring Doc Discovery check existing context anchor doc for feature impl.
Design completeness check — STOP gates before Step 2:
Check 1 — status: Read frontmatter status.
approved → pass.status: [value]). Run design-blueprint first. Proceed anyway?" Confirm → log in Decisions Log, continue as "Without approved design."Check 2 — levels present: Scan body for ## Design: Level 3 and ## Design: Level 4.
Both pass → proceed as "With approved design".
With approved design: Extract component list, layer assigns from context anchor doc. Use L2 (Components) decisions for layer place, L3 (Interactions) for dep flow.
Without approved design: Classify req components→arch layers using layer defs from framework:architecture. Each component, determine:
If framework:architecture no loaded layer defs (neither defaults nor custom doc resolved), warn: "No arch rules avail. Run /architecture-refiner define arch standards. Proceed w/o arch guidance." Continue w/ only remaining atom rails.
Present proposed layer assigns→user for approval before proceed.
Both cases, plan inside-out impl order following dep direction from loaded arch doc — start innermost layer (no outward deps), work outward. Each layer's deps should exist when built.
Classify each op per flow patterns in loaded arch doc (e.g., cmd vs query flows, or equiv distinction your arch style).
Present impl plan -- ordered component list, layer assigns, flow classifs -- confirm w/ user before write code.
After plan approved, ask user choose review mode:
"How review impl?"
- Layer-by-layer (rec) -- Impl each layer fully, pause for review before next. One review pt/layer.
- Full autonomy -- Impl everything end-to-end, present complete result. One review pt at end. (If blueprint exists, still pause any deviation from approved design.)
- Component-by-component -- Pause after each individual component for feedback. Max review pts.
Default layer-by-layer if user no preference.
Each component in planned order, gen code+tests together -- tests not afterthought.
Every component:
framework:architecture. Valid dep direction follows loaded arch rules.framework:clean-code self-valid during gen. Run inline checks: SRP comply, meaningful naming, low cyclomatic complexity, proper err handle, no magic vals, clean func sigs, no dead code, appropriate abstract level, clear control flow, minimal comments (code self-doc).framework:test-quality self-valid.Conditional checks per component:
framework:domain-driven-design self-valid.framework:secure-coding self-valid.Post-Gen Verification (applies every component, all review modes):
After gen each component, before present→user:
framework:collaborative-judgment protocol before show code. Don't silent resolve.Pacing -- follow user's chosen review mode:
Step checks arch coherence -- not code quality (verified per-component Step 3). After all components impl:
framework:architecture verif across all components — verify inter-component dep direction follows loaded arch rules. No layer import from layer not permitted depend.framework:secure-coding across component boundaries. Check data flowing between components crosses trust bounds safely.Throughout Steps 3-4, use framework:context-anchoring Enrich behavior keep living doc current:
Use framework:learning-harvest Harvest behavior. Session context: "implementation session — code generation from design contracts". Synthesize and propose cross-cutting patterns from this session — implementation gotchas, design-to-reality gaps, library/framework lessons. User confirms what enters the document.
Close feature lifecycle: Two discrete file edits — do not skip either:
status: complete to context doc frontmatter.requirement_doc is set in context doc frontmatter, write status: complete to that file too.
STOP: Both required.After enrich context doc, recommend review:
"Impl complete. Recommend run
/reviewon gen code before consider feature done -- provides independent quality assess against same atom standards, catches issues generator may blind to, captures learnings future sessions."
npx claudepluginhub techygarg/lattice --plugin latticeOrchestrates iterative code implementation with Object Oriented Design, Clean Architecture, and API Design reviews until all approve or safety valve triggers. Use for enforcing high design standards.
Multi-AI implementation with structured development workflow. Enforces pre-development state checks and detects whether the task is dev or knowledge work to route appropriately.
Generates implementation plans from completed designs with file paths, code examples, tests, verification steps for engineers lacking codebase context.