Lock in agreed decisions from Foundry annotation threads. Updates doc sections to reflect agreed changes, resolves completed threads, and graduates settled decisions to decisions.md. Use after /reply when threads have reached consensus, or when the human says to update the doc, lock in decisions, or apply feedback.
Read annotation threads where agreement has been reached, update the document to reflect those decisions, and resolve the threads. This is the high-stakes counterpart to /reply — it edits the doc and closes discussions.
Determine the target doc. If $ARGUMENTS is provided, use it as the Foundry doc path. Otherwise, check next.md for the active design doc. If neither, ask the human.
Fetch the doc. Call mcp__foundry__get_page for the full document structure and current content.
List annotation threads. Call mcp__foundry__list_annotations with status: "submitted" and status: "replied". For each top-level annotation, call mcp__foundry__get_annotation to load the full thread.
Identify threads with clear agreement. A thread has agreement when:
If uncertain whether agreement exists, skip the thread. Note it in your summary as needing more discussion. Err on the side of not updating — false agreement is worse than delayed agreement.
Update doc sections. For each agreed thread:
mcp__foundry__get_sectionmcp__foundry__update_section — target the deepest heading possible (leaf edits, not H1 rewrites) to preserve annotations on sibling sectionsmcp__foundry__get_section after writingResolve completed threads. For each thread whose decision is now reflected in the doc, call mcp__foundry__resolve_annotation on the top-level annotation. This marks the discussion as done.
Graduate decisions. For each resolved thread, check if the decision belongs in decisions.md:
decisions.mddecisions.md entry needed unless it's cross-cutting.Summarize. Output:
/reply on thesedecisions.md changes madeupdate_section on the most specific heading possible. Updating an H1 replaces everything under it, including sections with their own annotations. Target H2, H3, or deeper.get_section after update_section to confirm the change landed correctly./reply first.