--- name: motif-workflow description: For grammar-building work, load the `grammar` skill first. Use Motif to inspect a Known project, draft and measure a Proposal, revise it, and Finalize it for a person to Apply. Use for any change to a FieldWorks project; never edit the project another way. --- # Motif workflow Use Motif for every project change. A Proposal belongs to one project. The person owns project persistence and decides whether to Apply after reviewing a Finalized Proposal in Motif. If the Motif tools are missing, check the MCP connection status first. If the client says the Motif server started and connected successfully but Advanced AI mode is OFF and zero tools are exposed, this is the mode gate: in Motif, turn on Advanced AI mode, or run `motif settings advanced-ai on`. In a sandbox, set `MOTIF_ADVANCED_AI_MODE_PATH` to a writable preference file before changing the setting. If your MCP client supports prompts, open Motif's inert setup prompt for these first-enable steps; it does not read project data or change settings. Then restart the Motif MCP server and reconnect this assistant so the server reads the setting at startup. If the client reports that the server failed to start or connect, inspect its MCP launch log instead. Do not substitute direct FieldWorks, SQL, XML, or file edits. ## Find the project 1. Call `motif_list_projects` and show the Known project names and paths. 2. If the intended project is not Known, call `motif_open` with its exact existing `.fwdata` path; ask for the path only if it was not provided. Never guess from a workspace folder, a recent conversation, or an unlisted project name. 3. Ask which project to use when the choice is unclear. Pass the chosen project's path as `project` to every later project tool call. There is no current project. For a new grammar, use the `motif:linguistic-consultant` skill for its starter morphology interview. ## Read before drafting 1. Call `motif_overview` to understand the project's grammar and saved state. 2. Read only the relevant objects with `motif_grammar`, `motif_lexicon`, or `motif_word`. Use the exact ids returned by Motif; do not infer identity from similar names, forms, or glosses. 3. Call `motif_proposals` if an existing Proposal may already cover the requested change. Do not add the same slot to a second operation in one Proposal. 4. State the intended linguistic change and the evidence it should satisfy before creating a Draft. ## Draft and measure 1. Call `motif_start_proposal` with a short draft name, a reviewer-facing label, and a `rationale`: what the change does and why, in Markdown. Rewrite it with `motif_set_rationale` (the full Proposal id) whenever the Proposal changes, until the person has applied or closed it; the window marks a Rationale out of date once the Proposal moves past it. The person may answer in a Comment. Read the Comments with `motif_proposals` (the Proposal id), especially when a result reports `commentsChanged`, and reply with `motif_add_comment` (give `author`, what you call yourself, such as "Claude (Opus 5.5)") or by writing a new Rationale. You can add Comments but never edit or delete one. 2. Use the semantic composer tool whose description matches the intended operation. For example, `motif_set_gloss` changes a gloss; it does not authorize a raw property write. Keep each operation grounded in ids and current values returned by Motif. For new grammar objects, use `motif_add_part_of_speech`, `motif_add_inflection_feature`, `motif_add_inflection_class`, `motif_add_stem_name`, `motif_add_affix_slot`, `motif_add_affix_template` and `motif_add_lexical_entry` for grammatical objects, and `motif_add_phoneme`, `motif_add_natural_class`, `motif_add_environment` and `motif_add_phonological_rule` for sound patterns. A lexical-entry intent creates one entry, one sense and its structured MSA; choose the morph type and MSA kind together, and give affixes their category and any applicable slots or derivational destination. 3. For related composer calls, `motif_compose_batch` takes an `intents` array of `{verb, intent, citation?}` objects. Each `intent` is structured semantic input. Referenced entity ids must come from earlier completed calls or batches; declare operation ordering and dependencies in the intent data, since array position alone does not establish them. Never supply low-level operations as a batch. 4. Call `motif_dry_run` on the Draft. Read the effects and any refusal before continuing. 5. Call `motif_trial` with representative positive words and, when available, attested negative words. Read its summary, including unfinished searches, without treating an incomplete search as rejection. 6. Read the Trial report's flags, Incomplete evidence and limitations. No red flags means only not bad, never good. Use `motif_difference` with the Proposal and report id to page through failures and all retained cases, including unchanged ones. Read the affected readings and newly accepted negatives; request a case trace explicitly when it would help, and distinguish that diagnostic from batch evidence. ## Revise and Finalize 1. If the evidence is not acceptable, revise the Draft with the appropriate semantic composer. To replace an operation, read its id and remove it with `motif_remove_operations` before adding the replacement. Then repeat Dry Run, Trial, and report review. 2. Call `motif_finalize_proposal` only when the Draft is ready for a person to review. Tell the person the Proposal label and summarize its Dry Run and Trial evidence. 3. Never Apply. The person reviews and Applies the Proposal in Motif if they choose. ## Several projects The same requested change in two projects is two Proposals. For each Known project, make a separate Draft, read that project's objects, run its own Dry Run and Trial, review its report, and Finalize it independently. Name the related project in each Proposal's Rationale so the person can review them together without combining them.