# likec4/likec4 — AlpLab Radar Static Code Audit

- Ring: `adopt`
- Category: `dev`
- Overall score: `3.9/5`
- Implementation check: `verified`
- Maturity: `mature`
- Audited commit: `55aec0d75937` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-03T09:54:32Z
- Repository: https://github.com/likec4/likec4
- Radar entry: https://radar.alplab.co/#repo/likec4/likec4
- License: `MIT`
- CI workflows: `.github/workflows`
- Tags: `architecture`, `diagrams`, `dsl`, `typescript`, `mcp`, `language-server`

## Summary

A TypeScript toolchain that parses LikeC4 architecture DSL workspaces, computes and lays out diagrams, and exposes CLI, editor, and MCP interfaces.

## Implementation Check

README.md's architecture-as-code claim is implemented by `LikeC4.fromSource`/`fromWorkspace` and `DefaultLikeC4LanguageServices.layoutedModel`.

## When to Use

Use for versioned software-architecture models, generated diagrams, and editor or MCP-assisted navigation. Review host exposure before running the development server in containers.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.5/5 |
| usability | 4.5/5 |
| reliability | 3.0/5 |
| security | 3.0/5 |
| integration | 4.5/5 |

## Code Evidence

- packages/likec4/src/LikeC4.ts `LikeC4.fromSource` and `fromWorkspace` initialize the language-service implementation.
- packages/language-server/src/LikeC4LanguageServices.ts `layoutedModel` computes models, lays out every view, and returns a render-ready `LikeC4Model`.
- packages/likec4/src/cli/index.ts `main` registers serve, build, export, format, validate, MCP, and LSP commands.
- packages/likec4/src/LikeC4.spec.ts verifies parsing, metadata-filtered views, Graphviz layout, invalid-model handling, and multi-project workspaces.
- packages/mcp/README.md documents stdio MCP tools for model search, graph queries, view rendering, diffs, and removal-impact analysis.
- .github/workflows/checks.yaml defines type, build, package, unit, browser, E2E, macOS, and Windows CI jobs.

## Issues Found

- packages/likec4/src/cli/options.ts allows all Vite hostnames by default; restrict `--allowed-host` when exposing the server.

## Key Risks

- Requires Node >=22.23.3 and pnpm 12.23.0 per package.json.
- Graph layout can use the WebAssembly implementation or a local `dot` binary via `LikeC4Options.graphviz`.
- packages/likec4/src/cli/options.ts defaults container execution to listen on `0.0.0.0`.
- The supplied maturity signals report 83 unpinned GitHub Actions, despite substantial CI coverage.

## Reviewed Files

- `README.md`
- `package.json`
- `packages/likec4/package.json`
- `.github/workflows/checks.yaml`
- `packages/likec4/src/cli/index.ts`
- `packages/likec4/src/LikeC4.ts`
- `packages/likec4/src/LikeC4.spec.ts`
- `packages/core/package.json`
- `packages/language-server/package.json`
- `packages/language-server/src/LikeC4LanguageServices.ts`
- `packages/likec4/src/cli/options.ts`
- `packages/mcp/package.json`
- `packages/mcp/README.md`
