dev-docs/lit-labs-lifecycle.md
This document outlines guidelines for advancing "labs" packages through a lifecycle from exploration to production.
During development of Lit 2.0, we consciously chose to add a "labs" designation for packages in the monorepo to designate packages that are not at a production-level of quality or support. Source for labs packages are under the packages/labs folder in the monorepo, and are published to npm under a @lit-labs npm organization.
The impetus for a formal "labs" designation stemmed from a desire to balance a tension between (a) the need to publish exploratory code to npm in order to get real-world feedback on new product ideas, and (b) setting expectations around quality/support for those packages, given that user feedback may drive significant changes or cause reconsideration for the product conception altogether.
However, the aim is that once a labs package has reached a certain level of maturity, it will shed its "labs" status and graduate to a fully supported product (moving out of the labs folder in the monorepo and being published to the @lit npm org). This document is a guideline for advancing a labs package through a series of phases from exploration to production.
This process seeks to ensure we have reasonably positive answers to the following questions before graduating a package from labs to "production".
To this end, a labs package will go through three phases:
Proposal: Labs packages are cheaper to maintain than full production packages, but they are not free. Since introducing the Lit RFC process we encourage all new labs packages to be proposed via an RFC.
Development: Code is starting to be checked in, but is not yet ready for consumption/feedback. We may publish pre-releases to npm where useful for development, but code won't otherwise be promoted or obviously discoverable.
Evaluation: Releases are published to npm under @lit-labs for evaluation purposes. README has sufficient documentation to explain usage suitable for evaluation. The labs page on lit.dev describes the package and solicits for feedback from a specific discussion thread. Feedback via discussions & issues may drive frequent breaking changes.
Production: Release considered stable, published to npm under @lit org, and has dedicated docs page(s) and API documentation on lit.dev. Bugs and feature requests will be triaged and prioritized at the same level as other core packages. Breaking changes may happen, but should be minimized to the extent possible.
packages/labs/{name}
packages/{name}
@lit-labs/{name}
@lit/{name}
Referenced on lit.dev/docs/libraries/labs/
</td> <td>Full docs on lit.dev</td> </tr> <tr> <th> Promotion </th> <td> None </td> <td> Limited promotion with a focus on driving feedback into discussions/issues. </td> <td> Promotion via content/social channels. </td> </tr> <tr> <th> Requirements for next phase </th> <td style="vertical-align: top">Docs: README suitable for evaluation usage. Addition to lit.dev labs page drafted.
Feedback channel: Discussion thread opened for feedback.
</td> <td style="vertical-align: top">Feedback review: confirmed usage and positive feedback
Bug review: major known issues resolved.
API review: API considered stable.
Support commitment: Leads agree on resourcing for production-level support.
Docs: Docs page drafted and ready for publishing.
</td> <td> </td> </tr>To try to ensure that we have good feedback on a package before graduating it, we explicitly solicit feedback via dedicated GitHub discussions threads in the "Labs Feedback" category. The feedback discussions must be linked to from the lit.dev labs page.
Given that most labs packages going forward will be associated with an RFC, and packages that are candidates for graduation will have exposure within the team, we want the graduation process to be lightweight.
To graduate to evaluation or production, add an agenda item to the Lit Eng meeting, or open an issue, with the following information:
Once approved, the GitHub Discussion should be started, and labs page should be published pointing to the README and Discussion links. Social channels can begin soliciting for feedback.
Once approved, a non-labs version can be published, along with merging the docs additions and promoting the release via social channels.
Make a new package in the monorepo at packages/{name}
packages/labs/{name} and update all the places that reference labs1.0.0, regardless of what the version of the labs package is.Update the labs package to re-export the production package
In order to reduce code duplication, we will re-export the production package from the labs package. Labs users will get the production code on their next npm upgrade, and can start updating their imports one-by-one.
@deprecated jsdoc so that tools and IDEs will show the deprecation message and guide users to the production package.package.jsonUpdate lit.dev
Cleanup GitHub
Promotion
Graduation is a big deal, make sure we tell people about it!