likec4-project-config-workflow

Guides changes to LikeC4 project ownership, include paths, and exclusion rules in ProjectsManager.

5.6k|377|Updated Mar 24, 2023
One-click install
npx skills add https://github.com/likec4/likec4 --skill likec4-project-config-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: likec4-project-config-workflow
Source: https://github.com/likec4/likec4/tree/main/.agents/skills/likec4-project-config-workflow
Command: npx skills add https://github.com/likec4/likec4 --skill likec4-project-config-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Changing LikeC4 project discovery and config handling is error-prone because document ownership and per-project exclusion are separate concerns, and regressions easily slip into multi-project workspaces, shared include paths, and Windows path matching.

Core Features & Use Cases

  • Ownership vs. exclusion discipline: Preserves the distinction between ownerProjectId(document), isExcluded(projectId, document), and workspace-level exclusion semantics when editing ProjectsManager.ts.
  • Regression matrix: Provides a concrete test matrix covering nested projects, sibling prefix collisions, external include paths, shared includes, reload behavior, workspace excludes, and Windows paths.
  • Focused verification workflow: Supplies targeted commands for running ProjectsManager.spec.ts, typechecking, and formatting checks before submitting changes.
  • Use Case: When fixing a bug where a file excluded by one project is incorrectly dropped from another project that includes it, follow the workflow to reproduce the scenario, add the matching regression test, and verify workspace-startup scanning behavior.

Quick Start

Ask the assistant to fix a LikeC4 project ownership or exclusion bug using this workflow, starting from ProjectsManager.ts and adding the matching regression test.

Frequently Asked Questions about likec4-project-config-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a LikeC4 project ownership bug?

Start in packages/language-server/src/workspace/ProjectsManager.ts and check callers in WorkspaceManager.ts and LangiumDocuments.ts before changing semantics. Add a focused test in ProjectsManager.spec.ts reproducing the ownership scenario, then run the filtered test and typecheck commands.

How does LikeC4 decide which project owns a document?

The nearest config file such as .likec4rc or likec4.config.* normally determines ownership, resolved via ownerProjectId(document). Include paths add source roots relative to the project folder, but ownership and per-project exclusion are evaluated separately.

Why is a file excluded even though my project config includes it?

Workspace-level excludes take precedence over project-level inclusion, and default excludes like node_modules still apply without an explicit override. Check both the workspace exclude configuration and the project-level exclude rules for that specific project.

Does LikeC4 project matching work on Windows paths?

Yes, but drive letters and backslash paths are a known regression risk area. The workflow requires keeping Windows path behavior covered with tests whenever touching path normalization or folder matching logic.

Why does my unit test pass but the file is still dropped at startup?

Manually injecting a document in a test bypasses the real include-path scanning that runs at workspace startup. Always also test the workspace-startup path so include-path documents are loaded before project documents reference them.