Constant SPRINT
Source pub const SPRINT: &str = "# SPRINT WORKFLOW - Time-boxed iterations with planning, execution, and review cycles\r\n# Use for: teams working in fixed-length sprints, velocity tracking, iterative delivery\r\n# Coordination: planned work pulled during sprint, unplanned work goes to backlog\r\n\r\nname: sprint\r\ndescription: Time-boxed sprint iterations with planning, execution, review, and velocity tracking\r\n\r\nsettings:\r\n initial_state: backlog\r\n disconnect_state: backlog\r\n blocking_states: [backlog, planned, active, review]\r\n unknown_phase: warn\r\n\r\n# ---------------------------------------------------------------------------\r\n# States (sprint lifecycle)\r\n# ---------------------------------------------------------------------------\r\nstates:\r\n backlog:\r\n exits: [planned, cancelled]\r\n timed: false\r\n prompts:\r\n enter: >\r\n Item is in the product backlog. Refine before sprint planning:\r\n clear description, acceptance criteria, story points estimated.\r\n Items are pulled into a sprint during the planning phase.\r\n\r\n planned:\r\n exits: [active, backlog, cancelled]\r\n timed: false\r\n prompts:\r\n enter: >\r\n **Committed to current sprint.** This item was selected during sprint\r\n planning and counts toward sprint velocity. Pull when ready to start,\r\n respecting priority order.\r\n\r\n active:\r\n exits: [review, planned, blocked, cancelled]\r\n timed: true\r\n prompts:\r\n enter: |\r\n **Sprint: actively working.** Complete within the sprint timebox.\r\n\r\n - `thinking()` regularly for heartbeat + visibility\r\n - `mark_file()` before editing; `list_marks()` first for conflicts\r\n - Never revert unfamiliar changes: check `mark_updates()` / `list_marks()` first\r\n - `mark_updates()` every 30-60s during long ops\r\n - Stale workers (5+ min no heartbeat) get evicted\r\n - **Sprint focus**: finish committed items before picking up extras\r\n - **Git lock**: `claim(task=\"_lock:git-commit\")` -> commit -> release via `update(task=\"_lock:git-commit\", status=\"backlog\")`\r\n\r\n Transitions: {{valid_exits}}\r\n Phase: {{current_phase}} | Valid: {{valid_phases}}\r\n\r\n exit: \"Unmark files, attach results, `log_metrics()`. Move to review when ready.\"\r\n\r\n review:\r\n exits: [done, active, planned]\r\n timed: true\r\n prompts:\r\n enter: |\r\n **Sprint review.** Verify the item meets acceptance criteria and definition of done.\r\n - Approve -> done (counts toward sprint velocity)\r\n - Request changes -> active (fix within sprint if time allows)\r\n - Defer -> planned (carries over to next sprint)\r\n\r\n exit: \"Attach review verdict. Accepted items count toward velocity.\"\r\n\r\n blocked:\r\n exits: [active, planned, backlog, cancelled]\r\n timed: false\r\n prompts:\r\n enter: |\r\n **Blocked.** Document the impediment clearly:\r\n - What is blocking this item?\r\n - Can it be resolved within the sprint?\r\n - `link(type=\"blocks\")` to blocking task if applicable\r\n Flag at daily standup. Unresolved by sprint end -> carry over or return to backlog.\r\n\r\n done:\r\n exits: [backlog]\r\n timed: false\r\n prompts:\r\n enter: >\r\n Sprint item complete. Acceptance criteria met, review passed.\r\n Points count toward sprint velocity. `log_metrics()` with points and time.\r\n\r\n cancelled:\r\n exits: []\r\n timed: false\r\n\r\n# ---------------------------------------------------------------------------\r\n# Phases (sprint ceremonies and work types)\r\n# ---------------------------------------------------------------------------\r\nphases:\r\n planning:\r\n prompts:\r\n enter: |\r\n **Sprint planning.** Select items from backlog for this sprint:\r\n - Review team velocity (previous sprint points completed)\r\n - Pull highest-priority items that fit sprint capacity\r\n - Break down large items into sprint-sized chunks\r\n - Set `points` on each item for velocity tracking\r\n exit: \"Sprint backlog committed. Total points should match team velocity.\"\r\n\r\n standup:\r\n prompts:\r\n enter: |\r\n **Daily standup.** Quick status sync:\r\n - What did you complete since last standup?\r\n - What are you working on next?\r\n - Any blockers or impediments?\r\n Use `list_tasks(status=\"active\")` and `list_tasks(status=\"blocked\")`.\r\n exit: \"Blockers identified. Action items assigned.\"\r\n\r\n explore:\r\n prompts:\r\n enter: \"**Explore.** Investigate unknowns, read code/docs, identify constraints. Time-box within sprint.\"\r\n exit: \"Attach findings. Flag risks to sprint commitment.\"\r\n\r\n design:\r\n prompts:\r\n enter: \"**Design.** Outline approach within sprint scope. Keep it just enough to implement.\"\r\n exit: \"Design note attached. Ready for implementation.\"\r\n\r\n implement:\r\n prompts:\r\n enter: \"**Implement.** `mark_file()` first. Follow patterns. Tests alongside code. Sprint-sized commits.\"\r\n exit: \"Compiles, tests pass, commit attached.\"\r\n\r\n test:\r\n prompts:\r\n enter: \"**Test.** Run existing tests, add new ones, cover edge cases.\"\r\n exit: \"Test results attached, all passing.\"\r\n\r\n review:\r\n prompts:\r\n enter: \"**Review.** Check against acceptance criteria and definition of done.\"\r\n exit: \"Findings documented, approval or rejection clear.\"\r\n\r\n retro:\r\n prompts:\r\n enter: |\r\n **Sprint retrospective.** Reflect on the sprint:\r\n - What went well? (keep doing)\r\n - What could improve? (action items)\r\n - Velocity: planned vs actual points completed\r\n - Carry-over items and reasons\r\n exit: \"Action items documented. Improvements committed for next sprint.\"\r\n\r\n plan:\r\n prompts:\r\n enter: \"**Plan.** Break down sprint items into tasks. Set estimates and dependencies.\"\r\n exit: \"Tasks created, estimates set, dependencies linked.\"\r\n\r\n triage:\r\n prompts:\r\n enter: \"**Triage.** Classify incoming work. Sprint-ready items get pointed. Others go to backlog.\"\r\n exit: \"Items classified, pointed, and prioritized.\"\r\n\r\n diagnose:\r\n prompts:\r\n enter: \"**Diagnose.** Reproduce bug, narrow to root cause. Time-box within sprint.\"\r\n exit: \"Root cause documented, fix approach outlined.\"\r\n\r\n security:\r\n prompts:\r\n enter: \"**Security.** Input validation, auth/authz, no secrets, dependency audit.\"\r\n exit: \"Findings attached, critical issues flagged.\"\r\n\r\n doc:\r\n prompts:\r\n enter: \"**Document.** Update docs as part of definition of done.\"\r\n exit: \"Doc changes committed.\"\r\n\r\n integrate:\r\n prompts:\r\n enter: \"**Integrate.** Full test suite, check conflicts. Sprint items should integrate cleanly.\"\r\n\r\n deliver:\r\n prompts:\r\n enter: \"**Deliver.** Sprint increment ready for release. All items done, tests green.\"\r\n\r\n deploy:\r\n prompts:\r\n enter: \"**Deploy.** Release sprint increment. Tag with sprint number if applicable.\"\r\n\r\n monitor:\r\n prompts:\r\n enter: \"**Monitor.** Watch for issues from sprint deliverables. Attach observations.\"\r\n\r\n optimize:\r\n prompts:\r\n enter: \"**Optimize.** Measure baseline, change one thing, re-measure.\"\r\n\r\n# ---------------------------------------------------------------------------\r\n# State+Phase combos\r\n# ---------------------------------------------------------------------------\r\ncombos:\r\n backlog+triage:\r\n enter: \"Grooming backlog. Classify, point, add acceptance criteria. Sprint-ready items get refined.\"\r\n\r\n backlog+planning:\r\n enter: \"Sprint planning: select from backlog based on priority and team velocity.\"\r\n\r\n planned+planning:\r\n enter: \"Finalizing sprint commitment. Verify points, dependencies, and capacity.\"\r\n\r\n active+implement:\r\n enter: |\r\n Implementing sprint item. Focus on completing within the sprint timebox.\r\n - **3+ files**: search ALL symbols first, mark_file() ALL, plan attachment before coding\r\n - **Git lock**: `claim(task=\"_lock:git-commit\")` -> commit -> release\r\n\r\n active+explore:\r\n enter: \"Exploring within sprint. Time-box strictly -- every hour counts in a sprint.\"\r\n\r\n active+test:\r\n enter: \"Testing sprint item. Attach results before moving to review.\"\r\n\r\n active+diagnose:\r\n enter: \"Diagnosing bug within sprint. Reproduce, narrow root cause, document. Fix in implement.\"\r\n\r\n active+design:\r\n enter: \"Quick design within sprint scope. Just enough to implement. Attach design note.\"\r\n\r\n active+security:\r\n enter: \"Security check on sprint item. Attach findings.\"\r\n\r\n review+review:\r\n enter: \"Reviewing sprint item against acceptance criteria and definition of done.\"\r\n\r\n done+retro:\r\n enter: \"Sprint retro. Review velocity, carry-overs, and improvements for next sprint.\"\r\n\r\n# ---------------------------------------------------------------------------\r\n# Roles\r\n# ---------------------------------------------------------------------------\r\nroles:\r\n sprint_lead:\r\n description: Facilitates sprint ceremonies, manages sprint backlog, tracks velocity\r\n tags: [lead, coordinator, scrum-master]\r\n max_claims: 5\r\n can_assign: true\r\n can_create_subtasks: true\r\n\r\n sprint_member:\r\n description: Pulls and completes sprint items, participates in ceremonies\r\n tags: [worker, implementer, code, sprint]\r\n max_claims: 2\r\n can_assign: false\r\n can_create_subtasks: true\r\n\r\n# ---------------------------------------------------------------------------\r\n# Role prompts\r\n# ---------------------------------------------------------------------------\r\nrole_prompts:\r\n sprint_lead:\r\n planning_guidance: |\r\n **Sprint planning facilitation:**\r\n 1. Review previous sprint velocity: `project_history()` or `get_metrics()`\r\n 2. `list_tasks(status=\"backlog\")` to see refined backlog\r\n 3. Select items by priority, up to team velocity capacity\r\n 4. Move selected items: `update(task=\"id\", status=\"planned\")`\r\n 5. Ensure each item has `points` set for velocity tracking\r\n\r\n standup_guidance: |\r\n **Daily standup facilitation:**\r\n 1. `list_tasks(status=\"active\")` - who is working on what\r\n 2. `list_tasks(status=\"blocked\")` - identify impediments\r\n 3. `list_agents()` - check worker availability\r\n 4. Resolve blockers or escalate. Reassign if needed.\r\n\r\n velocity_tracking: |\r\n **Velocity tracking:**\r\n - Sprint velocity = sum of `points` on items that reached `done`\r\n - Track sprint-over-sprint trend for planning accuracy\r\n - `log_metrics()` at sprint end with velocity data\r\n - Carry-over items signal over-commitment -- reduce next sprint scope\r\n\r\n retro_guidance: |\r\n **Sprint retrospective:**\r\n 1. Calculate: planned points vs completed points\r\n 2. Review carry-over items and blocked items\r\n 3. Identify process improvements\r\n 4. Document action items as backlog tasks\r\n\r\n sprint_member:\r\n pull_guidance: |\r\n **Sprint pull discipline:**\r\n 1. `list_tasks(status=\"planned\")` to see sprint backlog\r\n 2. Pull highest priority: `claim(task=\"id\")`\r\n 3. After claiming, review any prompts returned in the response -- they contain workflow-specific guidance for this task.\r\n 4. Complete within sprint. Flag early if at risk.\r\n 5. Sprint commitments take priority over unplanned work.\r\n\r\n completion_guidance: |\r\n **Definition of done:**\r\n 1. Acceptance criteria met\r\n 2. Tests pass\r\n 3. Code reviewed\r\n 4. Docs updated (if applicable)\r\n 5. `attach(type=\"result\", ...)` with work summary\r\n 6. `log_metrics(cost_usd=..., points=...)` for velocity\r\n\r\n standup_update: |\r\n **Standup update:**\r\n - Report via `thinking()`: what you completed, what you\'re picking up next\r\n - Flag blockers immediately -- don\'t wait for standup\r\n - `update(status=\"blocked\", reason=\"...\")` for impediments\r\n\r\n# ---------------------------------------------------------------------------\r\n# Sprint-specific settings\r\n# ---------------------------------------------------------------------------\r\nsprint:\r\n settings:\r\n # Advisory: typical sprint length in days\r\n sprint_length_days: 14\r\n # Advisory: team velocity for planning (points per sprint)\r\n velocity_guidance: \"Use previous sprint\'s completed points as baseline\"\r\n # Carry-over policy\r\n carry_over_policy: \"Blocked items return to backlog. Partially done items re-estimate.\"\r\n\r\n ceremonies:\r\n planning: \"Start of sprint: select backlog items, commit to sprint scope\"\r\n standup: \"Daily: status sync, blocker identification\"\r\n review: \"End of sprint: demonstrate completed items\"\r\n retro: \"End of sprint: process improvement, velocity analysis\"\r\n\r\n# ---------------------------------------------------------------------------\r\n# Gates (sprint quality and ceremony checks)\r\n# ---------------------------------------------------------------------------\r\ngates:\r\n status:active:\r\n - type: \"gate/sprint-commitment\"\r\n enforcement: warn\r\n description: \"Item should be in planned status (committed to sprint) before starting\"\r\n - type: \"gate/acceptance-criteria\"\r\n enforcement: warn\r\n description: \"Item should have clear acceptance criteria before starting\"\r\n\r\n status:review:\r\n - type: \"gate/tests\"\r\n enforcement: warn\r\n description: \"Tests should pass before sprint review\"\r\n - type: \"gate/commit\"\r\n enforcement: warn\r\n description: \"Changes should be committed before review\"\r\n\r\n status:done:\r\n - type: \"gate/review-approval\"\r\n enforcement: warn\r\n description: \"Sprint review should approve before marking done\"\r\n - type: \"gate/definition-of-done\"\r\n enforcement: warn\r\n description: \"All definition-of-done criteria should be met\"\r\n\r\n# ---------------------------------------------------------------------------\r\n# Task tree templates\r\n# ---------------------------------------------------------------------------\r\ntemplates:\r\n sprint_item:\r\n description: Standard sprint work item with implementation subtasks\r\n tree:\r\n title: \"{{item_name}}\"\r\n children:\r\n - title: \"Implement: {{item_name}}\"\r\n tags: [implement]\r\n - title: \"Test: {{item_name}}\"\r\n tags: [test]\r\n - title: \"Review: {{item_name}}\"\r\n tags: [review]\r\n sibling_type: follows\r\n\r\n bug_fix:\r\n description: Bug fix within sprint\r\n tree:\r\n title: \"Fix: {{bug_description}}\"\r\n children:\r\n - title: \"Diagnose: {{bug_description}}\"\r\n tags: [diagnose]\r\n - title: \"Fix: {{bug_description}}\"\r\n tags: [implement]\r\n - title: \"Verify: {{bug_description}}\"\r\n tags: [test]\r\n sibling_type: follows\r\n\r\n# ---------------------------------------------------------------------------\r\n# Attachment types\r\n# ---------------------------------------------------------------------------\r\nattachments:\r\n sprint_management:\r\n plan: Sprint plan with committed items and capacity (markdown, replaces)\r\n note: Sprint observations, standup updates (appends)\r\n result: Sprint item completion data with points (JSON, replaces)\r\n code_artifacts:\r\n commit: Git commit hash (appends)\r\n diff: Code changes for review (appends)\r\n changelist: Files modified (appends)\r\n velocity:\r\n meta: Sprint metrics -- velocity, carry-over, burndown (JSON, replaces)\r\n output: Test or build output (appends)\r\n quality:\r\n error: Blockers, failures, impediments (appends)\r\n review: Review verdict and findings (replaces)\r\n context: Carry-over context for next sprint (replaces)\r\n";