@@ -139,19 +139,40 @@ paths that CI and local checks expect.
139139
140140## Source Boundaries
141141
142- Each skill must be self-contained and independent at runtime: it must not import
143- or depend on code from another skill or from the repository root.
144-
145- Root source directories are canonical. ` viewer/ ` , ` packages/cadjs ` , and
146- ` packages/cadpy ` are the source of truth for CAD Viewer and shared CAD runtime
147- behavior. Generated copies live under paths such as
148- ` skills/cad-viewer/scripts/viewer ` , ` skills/cad-viewer/scripts/packages/ ` ,
149- ` skills/cad/scripts/packages/ ` , and snapshot runtimes. Do not patch those
150- generated copies as the lasting fix.
151-
152- When changing skill behavior that uses ` packages/cadjs ` , ` packages/cadpy ` , or
153- the cad-viewer generated runtime, edit the root source in ` packages/* ` or
154- ` viewer/* ` , then rebuild the generated skill copies.
142+ Each skill must be self-contained and independent when it is installed from a
143+ production branch: it must not import or depend on code from another skill or
144+ from repository-root modules at runtime.
145+
146+ The ` dev ` branch uses symlinks only as a checkout layout convenience. Those
147+ symlinks point generated-output paths back to the canonical sources so
148+ contributors can edit one copy of shared code. They do not relax the runtime
149+ self-containment rule: ` scripts/build.sh --clean ` must be able to replace the
150+ symlinks with real copies that still run without ` skills/ ` , the repository
151+ root, or sibling skill directories on ` sys.path ` , ` PYTHONPATH ` , ` NODE_PATH ` , or
152+ similar lookup paths.
153+
154+ Canonical source directories are:
155+
156+ - ` skills/* ` for skill instructions, references, and skill-owned scripts.
157+ - ` viewer/ ` for CAD Viewer app and server source.
158+ - ` packages/cadjs ` , ` packages/cadpy ` , and ` packages/cadpy_metadata ` for shared
159+ runtime helpers that are copied into consuming skills for production.
160+
161+ On ` dev ` , paths such as ` skills/cad-viewer/scripts/viewer ` ,
162+ ` skills/cad/scripts/packages/cadpy ` , ` skills/{urdf,srdf,sdf}/scripts/packages ` ,
163+ ` viewer/packages/* ` , and ` plugins/cad/skills/* ` should be symlinks. Treat those
164+ paths as generated-output aliases, not separate source roots. Edit the
165+ canonical source path instead.
166+
167+ When you need to verify or create production outputs locally, run:
168+
169+ ``` bash
170+ scripts/build.sh --clean
171+ scripts/build.sh --check
172+ ```
173+
174+ Do not hand-edit production copies as the lasting fix; change the canonical
175+ source, then rebuild.
155176
156177## Branch Layouts
157178
0 commit comments