You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ---
  2. ---
  3. # Step 5: Present
  4. ## RULES
  5. - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
  6. - NEVER auto-push.
  7. ## INSTRUCTIONS
  8. ### Generate Suggested Review Order
  9. Read `{baseline_commit}` from `{spec_file}` frontmatter and construct the diff of all changes since that commit.
  10. Append the review order as a `## Suggested Review Order` section to `{spec_file}` **after the last existing section**. Do not modify the Code Map.
  11. Build the trail as an ordered sequence of **stops** — clickable `path:line` references with brief framing — optimized for a human reviewer reading top-down to understand the change:
  12. 1. **Order by concern, not by file.** Group stops by the conceptual concern they address (e.g., "validation logic", "schema change", "UI binding"). A single file may appear under multiple concerns.
  13. 2. **Lead with the entry point** — the single highest-leverage file:line a reviewer should look at first to grasp the design intent.
  14. 3. **Inside each concern**, order stops from most important / architecturally interesting to supporting. Lightly bias toward higher-risk or boundary-crossing stops.
  15. 4. **End with peripherals** — tests, config, types, and other supporting changes come last.
  16. 5. **Every code reference is a clickable spec-file-relative link.** Compute each link target as a relative path from `{spec_file}`'s directory to the changed file. Format each stop as a markdown link: `[short-name:line](../../path/to/file.ts#L42)`. Use a `#L` line anchor. Use the file's basename (or shortest unambiguous suffix) plus line number as the link text. The relative path must be dynamically derived — never hardcode the depth.
  17. 6. **Each stop gets one ultra-concise line of framing** (≤15 words) — why this approach was chosen here and what it achieves in the context of the change. No paragraphs.
  18. Format each stop as framing first, link on the next indented line:
  19. ```markdown
  20. ## Suggested Review Order
  21. **{Concern name}**
  22. - {one-line framing}
  23. [`file.ts:42`](../../src/path/to/file.ts#L42)
  24. - {one-line framing}
  25. [`other.ts:17`](../../src/path/to/other.ts#L17)
  26. **{Next concern}**
  27. - {one-line framing}
  28. [`file.ts:88`](../../src/path/to/file.ts#L88)
  29. ```
  30. > The `../../` prefix above is illustrative — compute the actual relative path from `{spec_file}`'s directory to each target file.
  31. When there is only one concern, omit the bold label — just list the stops directly.
  32. ### Mark Spec Done
  33. Change `{spec_file}` status to `done` in the frontmatter.
  34. Follow `./sync-sprint-status.md` with `{target_status}` = `review`.
  35. ### Commit and Open
  36. 1. If version control is available and the tree is dirty, create a local commit with a conventional message derived from the spec title.
  37. 2. Open the spec in the user's editor so they can click through the Suggested Review Order:
  38. - Resolve two absolute paths: (1) the repository root (`git rev-parse --show-toplevel` — returns the worktree root when in a worktree, project root otherwise; if this fails, fall back to the current working directory), (2) `{spec_file}`. Run `code -r "{absolute-root}" "{absolute-spec-file}"` — the root first so VS Code opens in the right context, then the spec file. Always double-quote paths to handle spaces and special characters.
  39. - If `code` is not available (command fails), skip gracefully and tell the user the spec file path instead.
  40. ### Display Summary
  41. Display summary of your work to the user, including the commit hash if one was created. Any file paths shown in conversation/terminal output must use CWD-relative format (no leading `/`) with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability — the goal is to make paths clickable in terminal emulators. Include:
  42. - A note that the spec is open in their editor (or the file path if it couldn't be opened). Mention that `{spec_file}` now contains a Suggested Review Order.
  43. - **Navigation tip:** "Ctrl+click (Cmd+click on macOS) the links in the Suggested Review Order to jump to each stop."
  44. - Offer to push and/or create a pull request.
  45. Workflow complete.
  46. ## On Complete
  47. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
  48. If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.