---
allowed-tools: Read, Bash(mantle *)
---

Revise the existing product design in `.mantle/product-design.md` through an
interactive session and automatically log what changed and why.

Think through implications of changes. Challenge revisions that weaken the
design. Reference the existing design to keep the session grounded.

Before starting, use TaskCreate to create a task for each step:

1. "Step 1 — Check prerequisites"
2. "Step 2 — Load context"
3. "Step 3 — Interactive revision session"
4. "Step 4 — Vision section enforcement"
5. "Step 5 — Confirm and save"
6. "Step 6 — Confirmation"

As you start each step, use TaskUpdate to set it to `in_progress`. When
complete, use TaskUpdate to set it to `completed`.

## Step 1 — Check prerequisites

Check whether `.mantle/` and `.mantle/product-design.md` exist by reading them.

- If `.mantle/` does not exist, tell them to run `mantle init` first and stop.
- If `product-design.md` does not exist, tell them to run `/mantle:design-product`
  first and stop.

## Step 2 — Load context

Read `.mantle/product-design.md` in full. Display a summary of the current design:

```
Current product design:
  Vision:          <vision>
  Principles:      <count> defined
  Building blocks: <count> defined
  Target users:    <target_users>
  Success metrics: <count> defined
```

Also read `.mantle/idea.md` and the most recent challenge file (if any) for
grounding context.

## Step 3 — Interactive revision session

Ask the user what they want to change and why. This is a conversation, not a
form fill. Discuss the implications of proposed changes:

- Does this change affect other sections of the design?
- Does it conflict with any stated principles?
- Does it change who the product is for?
- Are success metrics still valid after this change?

Iterate until the user is satisfied with the revisions. You may suggest changes
the user hasn't thought of if they follow logically from the requested revision.

## Step 4 — Vision section enforcement

After finalising the revisions, check whether the Vision statement still
accurately reflects the revised design.

- If the vision still holds, say so and move on.
- If the vision no longer reflects the changes, propose an updated vision and
  get the user's approval before proceeding.

## Step 5 — Confirm and save

Show a concise before/after summary (3-5 bullet points of what changed, not a
full diff). Ask the user to confirm.

Then run the CLI command with ALL fields (not just the changed ones — the command
replaces the entire document):

```bash
mantle save-revised-product-design \
  --vision "<vision>" \
  --principles "<principle 1>" \
  --principles "<principle 2>" \
  --building-blocks "<block 1>" \
  --building-blocks "<block 2>" \
  --prior-art "<prior 1>" \
  --prior-art "<prior 2>" \
  --composition "<composition>" \
  --target-users "<target_users>" \
  --success-metrics "<metric 1>" \
  --success-metrics "<metric 2>" \
  --change-topic "<short-slug>" \
  --change-summary "<1-2 sentences of what changed>" \
  --change-rationale "<1-2 sentences of why>"
```

Guidelines for the change metadata:
- `--change-topic`: short slug like "reframe-vision", "add-building-block",
  "narrow-target-users"
- `--change-summary`: factual description of what changed
- `--change-rationale`: why this change was made

## Step 6 — Confirmation

After a successful save, tell the user:

> Product design revised! A decision log entry has been created to track this
> change. Review the updated design in `.mantle/product-design.md`.

## Session Logging

Before ending this session, write a session log:

    mantle save-session --content "<body>" --command "revise-product"

Keep the log under ~200 words following the session log format (Summary, What Was Done, Decisions Made, What's Next, Open Questions).
