architecture-compass
Architectural thinking partner for an existing repository — scans the codebase, conducts a structured interview, agrees on…
Generate implementation code from an approved design blueprint or verbal requirements. Composes context anchoring, architecture, clean code, DDD, security, and test quality into an inside-out implementation workflow. Use when moving from design to code, implementing approved
Claude Code
$ npx -y skills add techygarg/lattice --skill code-forge --agent claude-code
Codex
$ npx skills add techygarg/lattice --skill code-forge -a codex -y
Cursor
$ npx skills add techygarg/lattice --skill code-forge -a cursor -y
Gemini CLI
$ npx skills add techygarg/lattice --skill code-forge -a gemini-cli -y
GitHub Copilot
$ npx skills add techygarg/lattice --skill code-forge -a github-copilot -y
OpenCode
$ npx skills add techygarg/lattice --skill code-forge -a opencode -y
Windsurf
$ npx skills add techygarg/lattice --skill code-forge -a windsurf -y
name: code-forge description: "Generate implementation code from an approved design blueprint or verbal requirements. Composes context anchoring, architecture, clean code, DDD, security, and test quality into an inside-out implementation workflow. Use when moving from design to code, implementing approved contracts, or when the user says 'implement', 'code this', 'build it', 'forge the code', or 'generate the code'."
Read and apply:
1. `framework:knowledge-priming` -- Load project context (stack, architecture, conventions) so implementation matches the real project. (always) 2. `framework:context-anchoring` -- Find and load the feature's context anchor doc; enrich it as implementation decisions are made (Create / Load / Enrich behaviors). (always) 3. `framework:learning-harvest` -- Load prior operational learnings to inform implementation at session start; harvest new ones at session end. (always) 4. `framework:collaborative-judgment` -- Surface genuine judgment calls as structured options instead of silently assuming. (always) 5. `framework:architecture` -- Layer placement, dependency direction, structural validation. (always) 6. `framework:clean-code` -- Craft guardrails: SRP, naming, complexity, error handling. (always) 7. `framework:domain-driven-design` -- Aggregates, entities, value objects, domain services. (conditional: domain-layer components only) 8. `framework:secure-coding` -- Trust bounds, injection prevention, secrets handling. (conditional: trust-boundary code only) 9. `framework:test-quality` -- AAA structure, isolation, assertion quality, naming. (always when writing tests)
**STOP: Before Step 1, read `additional_instructions.code_forge` (one line or a list) from `.lattice/config.yaml`.** No file or no key → skip silently.
When lines are found:
1. Show them verbatim under "Additional instructions (from config):". 2. **Highest priority — apply them for the whole session, including on resume.** On any conflict with anything else in this skill — steps, gates, STOP rules — or with its Required Skills, standards documents, or operational learnings, the config line wins.
1. Run `framework:learning-harvest` Load behavior. Focus hint: "implementation session — focus: implementation craft, quality signals, reliability". 2. Run `framework:context-anchoring` Document Discovery: scan the context base directory (per the atom's Config Resolution) for an existing anchor doc covering this feature's implementation.
**Design completeness check** — run both gates before Step 2 (no context doc exists → skip both, proceed as **"Without approved design"**):
**Check 1 — status:** Read the context doc frontmatter `status`.
**Check 2 — levels present:** Scan the body for `## Design: Level 3` and `## Design: Level 4`.
Both pass → proceed as **"With approved design"**.
**With approved design**: extract the component list and layer assignments from the context anchor doc. Use the Level 2 (Components) decisions for layer placement and Level 3 (Interactions) for dependency flow.
**Without approved design**: classify the required components into architecture layers using the layer definitions from `framework:architecture`. For each component determine:
If `framework:architecture` resolved no layer definitions (neither defaults nor a custom doc), surface it: "No architecture rules available. Run `/architecture-refiner` to define your architecture standards. Proceeding without architecture guidance." Continue with the remaining atom rails.
Present the proposed layer assignments to the user for approval before proceeding.
In both cases, plan an **inside-out implementation order** following the dependency direction from the loaded architecture doc — start at the innermost layer (no outward dependencies) and work outward, so each layer's dependencies already exist when it is built.
Classify each operation per the flow patterns in the loaded architecture doc (e.g., command vs query flows, or the equivalent distinction in your architecture style).
Present the implementation plan — ordered component list, layer assignments, flow classifications — and confirm with the user before writing code. If the user rejects or corrects the plan, revise and re-present it. **STOP:** Never start coding
Composable AI skills that teach assistants structured thinking — design-first, context-aware, and architecture-guided.
Architectural thinking partner for an existing repository — scans the codebase, conducts a structured interview, agrees on…
Facilitate a structured conversation to define architecture principles for a repository. Supports multiple architecture styles:…
Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode).…
Investigate, reproduce, and safely fix a bug with regression protection. Composes context, diagnosis, architecture, code quality,…
Facilitate a structured conversation to define clean code principles for a repository. Produces a formal clean-code.md document…
Apply clean code principles when generating or modifying implementation code. Enforces function focus, naming clarity, complexity…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.