--- description: Forge workflow conventions — ensures work order alignment, journey discipline, artifact safety, and proper project context usage alwaysApply: true --- forge-conventions: - Call `configure_repo` once per session before work order tools with `ide: cursor` and `hooks_already_present: true` when the marketplace plugin is installed. If `.forge/project-id` exists, pass its first line as `workspace_project_id`. If `.forge/hook-version` exists, pass it as a **number** `hook_version`. Omitting `hook_version` is treated as `0` and typically yields `needs_update` — write all returned files. On `needs_update`, overwrite all returned files. - Prefer workspace project restore via `configure_repo` + `workspace_project_id`; call `set_project` only when restore is unavailable or invalid. - Use `get_journey_progress` for full stage status, blockers, and staleness; use `get_project_state` only for basic journey metadata. - Load project artifacts with `get_artifact` (`intent`, `prd`, `prd_spec`, `architecture`, `ui_design`, `rtm`) or `search_artifacts` before implementing scoped work. - After `get_work_order`, follow `implementation_brief` as the primary implement guide; honor `custom_instructions` and check `dependency_status` before coding. `work_order_id` accepts `WO-NNN` or UUID. - Run `analyze_artifact_update` before `update_artifact`; only call `approve_stage`, `reject_stage`, or `update_artifact` with explicit user intent. - Only commit to and create PRs against repositories linked to the current project (`list_linked_repos`). - Call `get_workflow_stages` before manual `transition_work_order` or filtering `list_work_orders` by status. - Use `prepare_commit` before committing to validate that changes align with the assigned work order scope. - Run an RTM drift check before Forge-tagged commits; include results in `update_work_order` field `rtm_drift_summary`. - Call `update_work_order` with full dev-activity fields after each meaningful commit — not only at completion. - Link all pull requests to work orders using `create_pull_request` for automatic progress tracking. - Sync developer activity with `sync_dev_activity` after push/PR and before `complete_work_order`. - Use `get_work_order_comments` and `comment_on_work_order` (param `wo_id`) for WO discussion; use `ask_question` and `get_clarifications` for team clarifications. - Use `add_section_comment` and `list_section_comments` for artifact section feedback (distinct from work order comments). - Do not make changes outside the scope of the active work order without explicit user approval.