Skip to content

docs(skills): enhance LikeC4 DSL skill reference#2807

Merged
davydkov merged 9 commits into
mainfrom
docs/improve-likec4-dsl-skill-reference
Apr 1, 2026
Merged

docs(skills): enhance LikeC4 DSL skill reference#2807
davydkov merged 9 commits into
mainfrom
docs/improve-likec4-dsl-skill-reference

Conversation

@davydkov

Copy link
Copy Markdown
Member

Summary

  • Enriched model examples with properties (metadata, links, icons, style blocks) for more realistic usage patterns
  • Added custom color specification syntax and clarified extend relationship disambiguation
  • Updated property and style reference tables for accuracy and completeness

Test plan

  • Verify SKILL.md renders correctly on GitHub
  • Validate examples against current LikeC4 DSL grammar

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Mar 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cf0573d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large documentation and evaluation additions for the LikeC4 DSL: major rewrite of SKILL.md for strict DSL/CLI rules and output discipline, CLI examples switched to bunx with version-pin guidance, numerous new reference pages (identifiers, dynamic views, deployment, predicates, styles, troubleshooting), and new evals/grading specs for 32 cases.

Changes

Cohort / File(s) Summary
Top-level skill guide
skills/likec4-dsl/SKILL.md
Complete rewrite: enforces CLI/response discipline, strict identifier/FQN rules (dots reserved for FQNs), canonical likec4 validate/export contracts, relationship-extension matching rules, dynamic-view/parallel/block rules, Generate→Self-check→Finalize workflow, and many guardrail examples. Attention: semantics and required output tokens changed.
CLI docs
skills/likec4-dsl/references/cli.md
Replaced npx examples with bunx (fallbacks pnpxnpx), standardized placeholders, pinned minimum likec4 version (≥1.53.0) examples, corrected common-mistakes and flag usage (e.g., --out-dir).
Reference pages (new)
skills/likec4-dsl/references/...
identifier-validity.md, include-predicates-wildcards.md, model.md, specification.md, deployment.md, dynamic-views.md, relationships-bidirectional.md, style-tokens-colors.md, troubleshooting.md
Added multiple new reference documents covering identifier regex/validity, wildcard/include semantics, model/extend rules and relationship identity, specification vocab, deployment instance syntax, dynamic/sequence view rules (parallel block, return-arrow precision), bidirectional relationships, color tokens usage, and troubleshooting. Focus areas: relationship extend matching, FQN/cross-file rules, dynamic view parallel/arrow constraints.
Evaluation artifacts
skills/likec4-dsl/evals/evals-public.json, skills/likec4-dsl/evals/grading-spec.json
Added 32-case public evals and corresponding grading-spec (schema v2). Tests emphasize CLI invocation/validation flags, file-scoped validation, predicate/matcher correctness, dynamic views, deployment naming, and strict output/snippet contracts. Reviewers should verify spec vs eval alignment and strictness of expected tokens.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • davydkov
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete and does not align with actual changes. It mentions enriched examples and color syntax, but omits the 11 new reference documents, evaluation/grading files, and substantial SKILL.md revisions. Provide a complete description covering all major additions: new reference docs (model.md, deployment.md, dynamic-views.md, etc.), evaluation dataset, grading spec, and SKILL.md improvements with CLI/validation updates.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: comprehensive enrichment and expansion of LikeC4 DSL skill documentation with new references, evaluation datasets, and improved guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/improve-likec4-dsl-skill-reference

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

Improve model examples with properties (metadata, links, icons, style blocks),
clarify extend relationship disambiguation, add custom color specification,
and update property/style reference tables for accuracy.
@davydkov davydkov force-pushed the docs/improve-likec4-dsl-skill-reference branch from 7e110ae to fbd84bc Compare March 27, 2026 03:12
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
coderabbitai[bot]

This comment was marked as resolved.

--outdir and --output are both valid aliases for -o, so the previous
entry incorrectly listed a valid flag as a mistake. Changed to --out-dir
which is a genuinely invalid flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
coderabbitai[bot]

This comment was marked as resolved.

@davydkov davydkov mentioned this pull request Mar 27, 2026
@likec4 likec4 deleted a comment from coderabbitai Bot Mar 27, 2026
@a-scolan a-scolan self-assigned this Mar 28, 2026
- tighten strict response discipline and canonical CLI contracts

- add focused reference docs for specification/model/deployment/dynamic views

- add public eval set + grading spec for high-variance syntax cases

- fix malformed trailing block in dynamic-views reference

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
skills/likec4-dsl/references/include-predicates-wildcards.md (1)

160-163: Fix the self-canceling row in the “Common mistakes” table.

At Line 162, the “Wrong” and “Right” examples are effectively the same, so this row doesn’t demonstrate an actual mistake. Consider removing it or replacing the left side with a genuinely incorrect form.

✏️ Suggested cleanup
 | Wrong | Right | Why |
 |---|---|---|
-| `include * where kind is app` in unscoped view | `include * where kind is app` (same) | Correct as written |
 | `include **` expecting only immediate children | `include *` | `**` is recursive; use `*` for one level |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/likec4-dsl/references/include-predicates-wildcards.md` around lines
160 - 163, The table's "Common mistakes" row showing "`include * where kind is
app`" as both Wrong and Right is self-canceling; update the table by either
removing that row or replacing the "Wrong" cell with a genuinely incorrect
example (e.g., a mis-scoped or syntactically invalid form such as "`include **
where kind is app`" or "`include * where kind = app`") so the pair contrasts
with the correct "`include * where kind is app`" in the "Right" cell and clearly
demonstrates the mistake; locate the row containing the "`include * where kind
is app`" text to make the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/likec4-dsl/references/specification.md`:
- Line 76: The file ends with an unmatched closing code fence (a stray triple
backtick) on the final line; remove that trailing ``` so there are no unmatched
Markdown code fences (verify there is no intended code block content following
the example table/row and delete the lone fence at EOF).

In `@skills/likec4-dsl/references/troubleshooting.md`:
- Around line 54-58: Update the troubleshooting line about `--file` to make
clear that file-level scoping is only applied to the JSON output and not to text
output: change the text to instruct users to run the validator with `--json
--no-layout` and then inspect `filteredErrors`/`filteredFiles` in the JSON to
get per-file scoping; reference the CLI implementation in
packages/likec4/src/cli/validate/index.ts where text mode intentionally prints
all diagnostics and `--file` affects JSON semantics only.

In `@skills/likec4-dsl/SKILL.md`:
- Line 18: Update the identifier examples to fix the typo: replace the incorrect
example string "quque-1" with "queue-1" in the Identifier examples section (the
example list that currently includes `customer`, `payment-service`,
`frontendApp`, `quque-1`), leaving the rest of the sentence and formatting
unchanged.
- Around line 117-120: Update the `--file <path>` bullet to state that the
file-scoping applies to JSON output only (i.e., it limits fields, summaries, and
exit behavior when `--json` is used) and clarify that in text mode the CLI
intentionally still prints all diagnostics; reference the CLI implementation in
packages/likec4/src/cli/validate/index.ts and the `--file` flag usage so readers
know the asymmetry is by design.

---

Nitpick comments:
In `@skills/likec4-dsl/references/include-predicates-wildcards.md`:
- Around line 160-163: The table's "Common mistakes" row showing "`include *
where kind is app`" as both Wrong and Right is self-canceling; update the table
by either removing that row or replacing the "Wrong" cell with a genuinely
incorrect example (e.g., a mis-scoped or syntactically invalid form such as
"`include ** where kind is app`" or "`include * where kind = app`") so the pair
contrasts with the correct "`include * where kind is app`" in the "Right" cell
and clearly demonstrates the mistake; locate the row containing the "`include *
where kind is app`" text to make the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8511015f-493c-44d1-a79a-148405b8b92e

📥 Commits

Reviewing files that changed from the base of the PR and between 2984082 and 471a778.

📒 Files selected for processing (12)
  • skills/likec4-dsl/SKILL.md
  • skills/likec4-dsl/evals/evals-public.json
  • skills/likec4-dsl/evals/grading-spec.json
  • skills/likec4-dsl/references/deployment.md
  • skills/likec4-dsl/references/dynamic-views.md
  • skills/likec4-dsl/references/identifier-validity.md
  • skills/likec4-dsl/references/include-predicates-wildcards.md
  • skills/likec4-dsl/references/model.md
  • skills/likec4-dsl/references/relationships-bidirectional.md
  • skills/likec4-dsl/references/specification.md
  • skills/likec4-dsl/references/style-tokens-colors.md
  • skills/likec4-dsl/references/troubleshooting.md
✅ Files skipped from review due to trivial changes (3)
  • skills/likec4-dsl/references/relationships-bidirectional.md
  • skills/likec4-dsl/evals/grading-spec.json
  • skills/likec4-dsl/references/model.md

| Duplicate tag or kind identifier | Each identifier must be unique within its type category |
| `#tag` in specification argument | Tags are defined without `#`; they are used with `#` elsewhere: `tag critical` → `#critical` |
| Raw hex color in style | Define a named color token first: `color my-blue #003366`, then use `color my-blue` in styles |
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Remove the stray fence marker at EOF.

Line 76 contains an extra ``` with no matching block content, which can break markdown rendering.

🧹 Minimal fix
-| Raw hex color in style | Define a named color token first: `color my-blue `#003366``, then use `color my-blue` in styles |
-```
+| Raw hex color in style | Define a named color token first: `color my-blue `#003366``, then use `color my-blue` in styles |
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 76-76: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/likec4-dsl/references/specification.md` at line 76, The file ends with
an unmatched closing code fence (a stray triple backtick) on the final line;
remove that trailing ``` so there are no unmatched Markdown code fences (verify
there is no intended code block content following the example table/row and
delete the lone fence at EOF).

Comment on lines +54 to +58
| `validate` reports config not found | Ensure `likec4.config.json` exists in the project root directory |
| Imported file shows "Module not resolved" | Use correct relative path: `import { x } from './path/to/file.c4'` |
| Symbol from import invisible in model | Symbol must be public (defined at top level); nested elements need FQN |
| Large error count in project but your file is clean | Use `--file <edited-file>` to filter; upstream errors are not your responsibility |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify that --file scoping is reliable in JSON output, not plain text output.

Line 57 currently reads as if --file alone filters what is printed. To avoid confusion, point readers to --json --no-layout + filteredErrors/filteredFiles when claiming file-level scoping.

🛠️ Suggested wording update
-| Large error count in project but your file is clean | Use `--file <edited-file>` to filter; upstream errors are not your responsibility |
+| Large error count in project but your file is clean | Use `likec4 validate --json --no-layout --file <edited-file> <project-dir>` and check `filteredErrors`/`filteredFiles`; text mode may still print upstream diagnostics |

Based on learnings, in packages/likec4/src/cli/validate/index.ts, text mode intentionally prints all diagnostics and --file fully scopes JSON output semantics.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/likec4-dsl/references/troubleshooting.md` around lines 54 - 58, Update
the troubleshooting line about `--file` to make clear that file-level scoping is
only applied to the JSON output and not to text output: change the text to
instruct users to run the validator with `--json --no-layout` and then inspect
`filteredErrors`/`filteredFiles` in the JSON to get per-file scoping; reference
the CLI implementation in packages/likec4/src/cli/validate/index.ts where text
mode intentionally prints all diagnostics and `--file` affects JSON semantics
only.

Comment thread skills/likec4-dsl/SKILL.md Outdated
Comment thread skills/likec4-dsl/SKILL.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants