doc: adding user-defined package import example

The imports documentation only focused on core packages. This
change also adds a basic example how to specify non-core packages.

Issue #41

Change-Id: I89e1c775d7743cce8bf2f7f65c400e443b4f65fa
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2601
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/doc/tutorial/basics/instances.md b/doc/tutorial/basics/instances.md
index dda6e8d..861248e 100644
--- a/doc/tutorial/basics/instances.md
+++ b/doc/tutorial/basics/instances.md
@@ -29,9 +29,42 @@
 The root of this directory hierarchy is the _module root_.
 It may be explicitly marked with a `cue.mod` file.
 
-<!-- TODO:
 The module root may contain a `pkg` directory containing packages that are
 importable with import.
+The first package path component needs to be a domain name, else the cue tool
+is unable to import non-core packages.
 The convention is to use the URL from which the package is retrieved.
--->
 
+## Example
+
+For importing a package from the `pkg` directory you can create the directory
+layout as follows:
+
+```sh
+touch cue.mod
+mkdir -p pkg/cuelang.org/example
+```
+
+In our example the package `cuelang.org` contains the following content.
+Note that only identifiers starting with a capital letter may be imported.
+
+_pkg/cuelang.org/example/example.cue:_
+```
+package example
+
+Foo: 100
+```
+
+_a.cue:_
+```
+package a
+
+import "cuelang.org/example"
+
+bar: example.Foo
+```
+
+`$ cue eval a.cue`
+```
+bar: 100
+```