Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

step-oneshot.md 3.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ---
  2. deferred_work_file: '{implementation_artifacts}/deferred-work.md'
  3. ---
  4. # Step One-Shot: Implement, Review, Present
  5. ## RULES
  6. - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
  7. - NEVER auto-push.
  8. ## INSTRUCTIONS
  9. ### Implement
  10. Follow `./sync-sprint-status.md` with `{target_status}` = `in-progress`.
  11. Implement the clarified intent directly.
  12. ### Review
  13. Invoke the `bmad-review-adversarial-general` skill in a subagent with the changed files. The subagent gets NO conversation context — to avoid anchoring bias. Launch at the same model capability as the current session. If no sub-agents are available, write the changed files to a review prompt file in `{implementation_artifacts}` and HALT. Ask the human to run the review in a separate session and paste back the findings.
  14. ### Classify
  15. Deduplicate all review findings. Three categories only:
  16. - **patch** — trivially fixable. Auto-fix immediately.
  17. - **defer** — pre-existing issue not caused by this change. Append to `{deferred_work_file}`.
  18. - **reject** — noise. Drop silently.
  19. If a finding is caused by this change but too significant for a trivial patch, HALT and present it to the human for decision before proceeding.
  20. ### Generate Spec Trace
  21. Set `{title}` = a concise title derived from the clarified intent.
  22. Write `{spec_file}` using `./spec-template.md`. Fill only these sections — delete all others:
  23. 1. **Frontmatter** — set `title: '{title}'`, `type`, `created`, `status: 'done'`. Add `route: 'one-shot'`.
  24. 2. **Title and Intent** — `# {title}` heading and `## Intent` with **Problem** and **Approach** lines. Reuse the summary you already generated for the terminal.
  25. 3. **Suggested Review Order** — append after Intent. Build using the same convention as `./step-05-present.md` § "Generate Suggested Review Order" (spec-file-relative links, concern-based ordering, ultra-concise framing).
  26. Follow `./sync-sprint-status.md` with `{target_status}` = `review`.
  27. ### Commit
  28. If version control is available and the tree is dirty, create a local commit with a conventional message derived from the intent. If VCS is unavailable, skip.
  29. ### Present
  30. 1. Open the spec in the user's editor so they can click through the Suggested Review Order:
  31. - 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.
  32. - If `code` is not available (command fails), skip gracefully and tell the user the spec file path instead.
  33. 2. Display a summary in conversation output, including:
  34. - The commit hash (if one was created).
  35. - List of files changed with one-line descriptions. 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 — this differs from spec-file links which use spec-file-relative paths.
  36. - Review findings breakdown: patches applied, items deferred, items rejected. If all findings were rejected, say so.
  37. - 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.
  38. - **Navigation tip:** "Ctrl+click (Cmd+click on macOS) the links in the Suggested Review Order to jump to each stop."
  39. 3. Offer to push and/or create a pull request.
  40. HALT and wait for human input.
  41. Workflow complete.
  42. ## On Complete
  43. Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete`
  44. If the resolved `workflow.on_complete` is non-empty, follow it as the final terminal instruction before exiting.