|
1 | | -# Specifications |
| 1 | +# Specifications Workflow |
2 | 2 |
|
3 | | -This repository provides a template for creating **feature specifications** for Meilisearch. A feature specification is a written description of a feature that serves as a basis for development, design, and inter-team synchronization. |
| 3 | +This repository manages the specifications of the Meilisearch API. Specifications are meant to describe the expected behavior on a high level and point out identified corner cases. |
4 | 4 |
|
5 | | -A **Merged specification** represents a Meilisearch feature that is implemented or ready to be. |
| 5 | +## Draft State: Create a new PR |
6 | 6 |
|
7 | | ---- |
8 | | - |
9 | | -## Specification Workflow |
10 | | - |
11 | | -When a new feature or product is to be developed, a new pull request is created, and contributors are invited to discuss its content and propose suggestions. The goal of a feature specification is to define the expected behavior on a high level and point out corner cases that need to be addressed. |
12 | | - |
13 | | -The person in charge of the PR (the owner) is the person assigned to the PR. This allows for changing ownership. When the PR assignee changes, both new and old assignees should be notified. |
14 | | - |
15 | | -Meilisearch's feature specifications flow is made up of 5 states, described below. |
16 | | - |
17 | | -### Introduction State |
18 | | - |
19 | | -To start a new specification, it is recommended to write the first draft by filling in only the `Summary` and `Motivation` parts. |
20 | | - |
21 | | -The name of the spec file must follow the pattern: `PR_number-feature-name.md`. After the pull request creation, the owner should update the specification filename. For example, if PR number 12 is about facetting, its spec will be named `0012-facetting.md`. |
22 | | - |
23 | | -> Note that a pull request not strictly dealing about a specification conception will be tagged as `Not A Spec`. |
24 | | -
|
25 | | -### Draft State |
26 | | - |
27 | | -Once the file is created with the two parts, `Summary` and `Motivation` filled in. It is time to create a draft PR. The PR should remain in draft state until the content is, according to the author, ready for comments. However, outsiders can make some recommendations, but these are more in the spirit of helping rather than suggesting changes. |
28 | | - |
29 | | -### Open State |
30 | | - |
31 | | -Once the specification is ready for comments in the owner's eyes, the owner can then switch the PR to open. At that time, it can be commented on, modified, challenged by these peers. If there is the slightest friction during this process, a discussion will be recommended offline within Meilisearch. The PR owner will organize this discussion, and at the end of this interview, the owner will make any necessary changes. |
32 | | - |
33 | | -At this step, the PR should be primarily tagged as `In Progress`. |
34 | | - |
35 | | -Note that if the pull request does not satisfy Open State conditions it will go back to the previous step above (***Draft State***). |
| 7 | +To start a new specification, a new branch must start |
| 8 | +- from `release-vX.X.X` if the related changes are already planned for the release `vX.X.X` |
| 9 | +- from `main` if you don't know in which release the changes will be integrated |
36 | 10 |
|
37 | | -### Review State |
| 11 | +If a new specification file needs to be introduced, you must create a new file in [this folder](https://github.com/meilisearch/specifications/tree/main/text) following the pattern: `PR_number-feature-name.md`. e.g. if PR number 12 is about facetting, the newly introduced specification file will be named `0012-facetting.md`. |
38 | 12 |
|
39 | | -The PR should now be tagged as `RFR (Ready For Review)` to enter this stage. |
| 13 | +> Note that a pull request not strictly dealing about a specification conception will be tagged as `Not A Spec`. e.g. A pull-request updating this file will be tagged with the `Not A Spec` label. |
40 | 14 |
|
41 | | -To validate and merge the PR, it must be validated by at least three people. |
| 15 | +The [pull-request template](pull_request_template.md) must be filled in when the pull-request is created. |
42 | 16 |
|
43 | | -- One person from the Integration team (preferably @curquiza). |
44 | | -- One person from the Core team (preferably @Kerollmops). |
45 | | -- One person from the DevRel team (preferably the person in charge of the documentation). |
| 17 | +## Review State |
46 | 18 |
|
47 | | -Note that if the specification does not satisfy the merging conditions, it will go back to the previous step above (***Open State***) since it's lacking some pieces of information in the reviewer's eyes. |
| 19 | +It's up to the maintainers of this repository to decide when the PR is ready to be reviewed and which persons should review it. |
48 | 20 |
|
49 | | -### Merge State |
| 21 | +The PR must be tagged as `Ready For Review` to enter this stage. |
50 | 22 |
|
51 | | -The differents tracking-issues could be created on concerned repositories. |
| 23 | +To be validated, it must be reviewed and approved by peers, ideally: |
52 | 24 |
|
53 | | -Created issues should: |
54 | | -- `Spec Related` label has to be added to the issues. |
55 | | -- Issues have to mention the spec in their description. |
56 | | -- Issues must absolutely link to the PRs that resolve the spec, so that we can easily track them. |
| 25 | +- One person from the Integration team. |
| 26 | +- One person from the Core team. |
| 27 | +- One person from the Product team. |
57 | 28 |
|
58 | | -In order to keep track of technical changes concerning the specification, delivery team should update the `Meilisearch Tracking-issues` part of the specification. |
| 29 | +## Merge State |
59 | 30 |
|
60 | | -Once it's done, the specification is accepted and merged to the main branch. |
| 31 | +To be merged, a specification pull-request should follow the given rules: |
61 | 32 |
|
62 | | -## Specification Revision |
63 | | - |
64 | | -Any Meilisearch's specification can change over time due to diverse factors. Sometimes related to change made on another specification concerning core engine code that could impact it, or simply product enhancement. |
65 | | - |
66 | | -In this precise case, a new PR is created and should follow the specification workflow described above. |
| 33 | +- It must be approved as described in the [Review State](#review-state) section. |
| 34 | +- The PR must point to the right `release-vX.X.X` branch. |
| 35 | +- It must be tagged with: |
| 36 | + - A `vX.X.X` tag indicating in which release the described changes will be introduced. |
| 37 | + - A `QX:YYYY` tag indicating in which quarter and year the described changes will be introduced. |
| 38 | + - The `⚠ Breaking` tag, if breaking changes are introduced. |
| 39 | + - The `Telemetry` tag, if telemetry changes are introduced. |
| 40 | + - The `OpenAPI` tag, if the [open-api](open-api.yaml) specification will see changes introduced. |
67 | 41 |
|
68 | 42 | --- |
69 | 43 |
|
70 | | -## Specification Description and Interaction |
71 | | - |
72 | | -Meilisearch's feature specifications are made up of three sections, described below. |
73 | | - |
74 | | -### 1. Functional Specification |
75 | | - |
76 | | -This first section gives a high level overview of the feature. It should avoid technical language so that it can be understood by a general audience (think user-level). It is broken into five sub-sections, which are as follows: |
77 | | - |
78 | | -#### I. Summary |
79 | | - |
80 | | -One paragraph explaining the feature from the perspective of a user, e.g. "When I do X I want Y to happen because Z". This paragraph describes the problem and solution simply, without going into detail. |
| 44 | +# Release Worfklow |
81 | 45 |
|
82 | | -#### II. Motivation |
| 46 | +The following steps should happen the day a Meilisearch release is shipped: |
83 | 47 |
|
84 | | -Why develop this feature? What use cases does it support? What is the expected outcome? Add links to related issues and discussions. |
| 48 | +- Pull-requests describing changes for a release are squashed and merged into the corresponding `release-vX.X.X` branch. |
| 49 | +- `release-vX.X.X` is squashed and merged into `main`. |
| 50 | +- `open-api.yml` version is deployed on bump.sh. |
85 | 51 |
|
86 | | -#### III. Additional Materials |
87 | | - |
88 | | -Discuss and include links to similar features in other tools or products. Share any concept art or visualizations that demonstrate what this proposal might look like in our search API (can be a screenshot of another tool, or a mockup made w/ dev tools). Consider any lessons that can be learned from outside implementations of the feature. |
89 | | - |
90 | | -This section is intended to provide readers of your pull request with a fuller picture of the proposed feature by comparing it with similar features in other tools and offering visual aids. If you don't have any examples of similar features being implemented elsewhere, that is fine—your ideas are interesting to us, whether they are brand new or adaptations from other tools. |
91 | | - |
92 | | -#### IV. Explanation |
93 | | - |
94 | | -Thoroughly explain your feature as if it was already implemented in Meilisearch and you were teaching another user how to use it. That generally means: |
95 | | - |
96 | | -- Introducing (and naming) any new concepts. |
97 | | -- Explaining the feature largely through examples. |
98 | | -- Noting the API for this feature, HTTP, CLI or config. |
99 | | -- Explaining how the user should _think_ about the feature and how it will impact the way they use Meilisearch (provide concrete examples). |
100 | | -- If applicable, provide sample error messages, deprecation warnings, or migration guidance. |
101 | | - |
102 | | -If the changes modify the HTTP API, provide a description of the method, URL, parameters, body, status code, errors, etc... |
| 52 | +--- |
103 | 53 |
|
104 | | -If it modifies the CLI, provide the env variable name, the argument name, and the description. |
| 54 | +## Specification File Format |
105 | 55 |
|
106 | | -This section serves as a user-level guide and should resemble official documentation. Anything that the user may encounter while interacting with the feature should be presented here. |
| 56 | +Meilisearch's feature specifications are made up of five sections, described below. |
107 | 57 |
|
108 | | -#### V. Impact on Documentation |
| 58 | +### 1. Summary |
109 | 59 |
|
110 | | -If the feature requires additions or updates to the documentation, they should be noted here. It's the role of the documentation team to ensure this section of the feature specification is accurate. |
| 60 | +Summarize the specification with a short paragraph. |
111 | 61 |
|
112 | | -#### VI. Impact on SDKs |
| 62 | +### 2. Motivation |
113 | 63 |
|
114 | | -If the feature requires additions or updates to the SDks, they should be noted here. It's the role of the integration team to ensure this section of the feature specification is accurate. |
| 64 | +Explain which use cases are supported. |
115 | 65 |
|
116 | | -### 2. Technical Aspects |
| 66 | +### 3. Functional Specification |
117 | 67 |
|
118 | | -This section of the feature specification document has a much narrower audience: the developer(s) that will implement the feature. Its goal is to discuss and clarify how the feature will be developed and implemented when its not a trivial concern. |
| 68 | +This section gives a high level overview of the feature. It should avoid technical language so that it can be understood by a general audience (think user-level). |
119 | 69 |
|
120 | | -> Internal technical teams may use this part to keep track of technical brainstorms, related proto code or basecode examples to clear the technical details of the specification. |
| 70 | +- Describe the API resource and endpoints. (Methods, URL, query parameters, body definition, status code). |
| 71 | +- Explain the feature through examples. |
| 72 | +- List error cases. |
121 | 73 |
|
122 | | -At this time, the specification process is not enforcing a way to describe technical aspects. It can change in the future if we think that it is needed to ease the workflow of a specification creation. |
| 74 | +### 4. Technical Details (Optional) |
123 | 75 |
|
124 | | -When writing technical details, we recommend describing practical aspects of implementation, e.g. interfaces, potential code problems, or specific algorithmic choices. |
| 76 | +When needed, we recommend describing practical aspects of implementation, e.g. specific algorithmic choices. If none, fill the section body with "n/a". |
125 | 77 |
|
126 | | -### 3. Future Possibilities |
| 78 | +### 5. Future Possibilities (Optional) |
127 | 79 |
|
128 | | -This last section includes any related topics or features which are not currently in Meilisearch and will not be added at this time, but which may affect the proposed feature in the future. |
| 80 | +This last section includes any related topics or features which are not currently in Meilisearch and will not be added now, but which may be explored in the future. If none, fill the section body with "n/a". |
0 commit comments