As noted in T259035#6546455, we're going to operate on a list of phrases (plus some additional metadata) to locate text in VisualEditor's editable surface to present to the user as links.
This task should result in a prototype that is able to use a statically defined list of data (see the proposed structure in T259035#6546455 and T261411#6546055) to apply to a page in VE. I'm thinking we would have a page that we populate with text and a hook that exports the link recommendation metadata to the client-side. It would be nice to be able to easily adjust the fake data to manually verify our assumptions about how well the phrase matching approach will work.
The goal would be to be able to reuse most of the work done in prototyping for the final product as well.
Notes from @MMiller_WMF on 2020-10-29 about rough specifications (these are not solidified yet -- need about two more weeks):
These specifications track with the current interactive prototypes:
Here are the specifications:
- "AI suggestions" is a third "mode" in the editor, in addition to "source" and "visual".
- When the user is in "AI suggestions" mode...
- ...the usual editing toolbar is not there -- it just says "AI suggestions".
- ...the editing surface is disabled. No normal edits can be made.
- ...the only kind of interaction the user can do is with the link suggestions cards and clicking the suggested links in the text to refocus their view.
- ...the user can toggle to the other editing modes with the "pencil" icon in the upper right. "AI suggestions" is listed as a mode with the "bot" icon.
- ...before toggling to another mode, the user gets a dialog asking if they want to discard their changes and switch, or cancel and keep going with the suggestions.