Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a foundational Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📥 CommitsReviewing files that changed from the base of the PR and between 1bfa012d08253dcb88f55b22577339f46a2598cf and 453b92d. 📒 Files selected for processing (1)
WalkthroughAdds a comprehensive Markdown guide for mission scoping and orchestration workflows, detailing decomposition of high-level goals into sequential milestones and parallelizable features, mission state management, model routing strategies, lifecycle states, and execution patterns within the autonomous DevOps framework. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Feb 27 23:23:23 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive design document for a new /mission command. The document is well-structured and detailed, covering the entire workflow from scoping to execution. My review focuses on improving the efficiency and adherence to best practices in the provided shell script examples. I've suggested optimizing git command usage to avoid redundant calls and to align with repository conventions for cleaner output.
| if git rev-parse --show-toplevel 2>/dev/null; then | ||
| # Repo-attached mission | ||
| MISSION_HOME="$(git rev-parse --show-toplevel)/todo/missions" | ||
| else | ||
| # Homeless mission (no repo yet) | ||
| MISSION_HOME="$HOME/.aidevops/missions" | ||
| fi |
There was a problem hiding this comment.
This block of code executes git rev-parse --show-toplevel twice: once in the if condition and again to set MISSION_HOME. This is inefficient. You can achieve the same result with a single call by capturing the output in the if condition, which also makes the code more concise.
| if git rev-parse --show-toplevel 2>/dev/null; then | |
| # Repo-attached mission | |
| MISSION_HOME="$(git rev-parse --show-toplevel)/todo/missions" | |
| else | |
| # Homeless mission (no repo yet) | |
| MISSION_HOME="$HOME/.aidevops/missions" | |
| fi | |
| if top_level=$(git rev-parse --show-toplevel 2>/dev/null); then | |
| # Repo-attached mission | |
| MISSION_HOME="$top_level/todo/missions" | |
| else | |
| # Homeless mission (no repo yet) | |
| MISSION_HOME="$HOME/.aidevops/missions" | |
| fi |
| REPO_DIR="$HOME/Git/$REPO_NAME" | ||
|
|
||
| mkdir -p "$REPO_DIR" | ||
| git -C "$REPO_DIR" init |
There was a problem hiding this comment.
The git init command prints an informational message to standard output. To keep the output clean, especially in automated contexts, it's good practice to use the --quiet (or -q) flag. This aligns with the project's general rule to use -q with git commands like init to suppress standard output.
| git -C "$REPO_DIR" init | |
| git -C "$REPO_DIR" init -q |
| # Claim task ID | ||
| output=$(~/.aidevops/agents/scripts/claim-task-id.sh \ | ||
| --title "$feature_title" \ | ||
| --repo-path "$(git rev-parse --show-toplevel)") |
There was a problem hiding this comment.
The git rev-parse --show-toplevel command is executed on every iteration of the loop. This is inefficient as the repository path will not change. You should execute this command once before the loop and store its output in a variable to be reused.
For example:
# Before the loop
repo_path=$(git rev-parse --show-toplevel)
# Inside the loop
... --repo-path "$repo_path"…tration Add scripts/commands/mission.md implementing the /mission command that bridges the gap between a high-level goal and dispatched tasks. Features: - Interactive scoping interview reusing /define probe techniques at project scope - Mission classification (greenfield/migration/research/enhancement/infrastructure) - Mode selection: POC (fast, skip ceremony) vs Full (worktree/PR workflow) - Budget and constraint gathering (time, cost, infrastructure, external deps) - Latent requirement probing with type-specific pre-mortem/user-journey/non-negotiable questions - Opus-tier milestone decomposition with parallel feature groups - Budget feasibility analysis with tiered outcome recommendations - Mission state file creation with full lifecycle tracking - Optional repo creation for homeless greenfield missions - Feature-to-task mapping with claim-task-id.sh integration (Full mode) - Headless mode for supervisor dispatch with sensible defaults - Model routing guidance (opus for decomposition, sonnet for implementation) - Self-organisation support (research/, agents/, scripts/, assets/ directories) Closes #2499
… macOS, md5sum on Linux)
1bfa012 to
453b92d
Compare
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Feb 27 23:26:42 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.agents/scripts/commands/mission.md (1)
279-279: Use portable MD5 hashing for cross-platform macOS/Linux compatibility
md5sumavailability varies across macOS versions—newer releases include it, but older systems only providemd5. For DevOps framework consistency across mixed environments, use a version-agnostic pattern:if command -v md5sum >/dev/null 2>&1; then HASH=$(echo "$MISSION_DESC" | md5sum | awk '{print $1}') else # Fallback for macOS (BSD md5) HASH=$(echo "$MISSION_DESC" | md5 -q) fi MISSION_ID="m-$(date +%Y%m%d)-${HASH:0:6}"This ensures operator workflows work reliably on any DevOps host.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.agents/scripts/commands/mission.md at line 279, The MISSION_ID assignment uses the non-portable md5sum command which may not exist on macOS; update the logic around MISSION_ID and the md5 usage so it detects whether md5sum exists and falls back to the BSD md5 -q invocation, compute HASH from MISSION_DESC accordingly, then build MISSION_ID as "m-$(date +%Y%m%d)-${HASH:0:6}" to ensure cross-platform compatibility (reference MISSION_ID, MISSION_DESC, md5sum).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.agents/scripts/commands/mission.md:
- Around line 390-391: Before moving the mission directory, ensure the
destination parent exists: add a step to create "$REPO_DIR/todo/missions" (use
mkdir -p) prior to calling mv "$MISSION_DIR"
"$REPO_DIR/todo/missions/$MISSION_ID", then update MISSION_DIR to
"$REPO_DIR/todo/missions/$MISSION_ID"; also check the mkdir and mv exit statuses
and fail with a clear error message if either command fails so repo-bootstrap
doesn't silently proceed on first run.
- Around line 404-405: The loop currently uses the literal token "features" (for
feature in features; do) so it never iterates real mission features; update the
loop to iterate over the actual feature list read from mission state (e.g.,
expand the variable or command that produces the features array/list) and ensure
the variable/name used to hold mission features is populated before the loop;
specifically replace the literal "for feature in features; do" with a construct
that iterates the populated features variable/command output (the same name you
use to load mission state) and keep the inner logic that claims task IDs
unchanged.
- Around line 643-650: The "Related" section lists eight documentation files
that are missing; update the references in .agents/scripts/commands/mission.md
by either adding the referenced docs (create scripts/commands/define.md,
scripts/commands/full-loop.md, scripts/commands/pulse.md, workflows/plans.md,
templates/brief-template.md, templates/mission-template.md,
tools/build-agent/build-agent.md, and reference/orchestration.md) with
appropriate content or remove/replace the broken entries with existing file
paths; ensure the filenames used in the list (e.g., scripts/commands/define.md,
workflows/plans.md, templates/mission-template.md,
tools/build-agent/build-agent.md, reference/orchestration.md) match the actual
repo structure and update any links in mission.md accordingly.
---
Nitpick comments:
In @.agents/scripts/commands/mission.md:
- Line 279: The MISSION_ID assignment uses the non-portable md5sum command which
may not exist on macOS; update the logic around MISSION_ID and the md5 usage so
it detects whether md5sum exists and falls back to the BSD md5 -q invocation,
compute HASH from MISSION_DESC accordingly, then build MISSION_ID as "m-$(date
+%Y%m%d)-${HASH:0:6}" to ensure cross-platform compatibility (reference
MISSION_ID, MISSION_DESC, md5sum).
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between a2cd8da and 1bfa012d08253dcb88f55b22577339f46a2598cf.
📒 Files selected for processing (1)
.agents/scripts/commands/mission.md
.agents/scripts/commands/mission.md
Outdated
| mv "$MISSION_DIR" "$REPO_DIR/todo/missions/$MISSION_ID" | ||
| MISSION_DIR="$REPO_DIR/todo/missions/$MISSION_ID" |
There was a problem hiding this comment.
mv can fail because destination parent directory is never created
$REPO_DIR/todo/missions is not guaranteed to exist before move, so repo-bootstrap can fail on first run.
Suggested fix
# Move mission from homeless to repo-attached
+mkdir -p "$REPO_DIR/todo/missions"
mv "$MISSION_DIR" "$REPO_DIR/todo/missions/$MISSION_ID"
MISSION_DIR="$REPO_DIR/todo/missions/$MISSION_ID"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| mv "$MISSION_DIR" "$REPO_DIR/todo/missions/$MISSION_ID" | |
| MISSION_DIR="$REPO_DIR/todo/missions/$MISSION_ID" | |
| # Move mission from homeless to repo-attached | |
| mkdir -p "$REPO_DIR/todo/missions" | |
| mv "$MISSION_DIR" "$REPO_DIR/todo/missions/$MISSION_ID" | |
| MISSION_DIR="$REPO_DIR/todo/missions/$MISSION_ID" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/scripts/commands/mission.md around lines 390 - 391, Before moving
the mission directory, ensure the destination parent exists: add a step to
create "$REPO_DIR/todo/missions" (use mkdir -p) prior to calling mv
"$MISSION_DIR" "$REPO_DIR/todo/missions/$MISSION_ID", then update MISSION_DIR to
"$REPO_DIR/todo/missions/$MISSION_ID"; also check the mkdir and mv exit statuses
and fail with a clear error message if either command fails so repo-bootstrap
doesn't silently proceed on first run.
.agents/scripts/commands/mission.md
Outdated
| for feature in features; do | ||
| # Claim task ID |
There was a problem hiding this comment.
Feature dispatch loop is non-functional as written
for feature in features; do iterates a literal word, so Full-mode task creation won’t map real mission features into TODO entries.
Suggested fix (read from mission state)
-for feature in features; do
+while IFS= read -r feature_title; do
# Claim task ID
output=$(~/.aidevops/agents/scripts/claim-task-id.sh \
--title "$feature_title" \
--repo-path "$(git rev-parse --show-toplevel)")
@@
- # Format: - [ ] {task_id} {feature_title} `#mission`:{mission_id} ~{est} ref:{ref}
-done
+ # Format: - [ ] {task_id} {feature_title} `#mission`:{mission_id} ~{est} ref:{ref}
+done < <(awk '/^- \[ \] F[0-9]+:/{sub(/^- \[ \] F[0-9]+: /,""); print}' "$MISSION_DIR/mission.md")📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| for feature in features; do | |
| # Claim task ID | |
| while IFS= read -r feature_title; do | |
| # Claim task ID | |
| output=$(~/.aidevops/agents/scripts/claim-task-id.sh \ | |
| --title "$feature_title" \ | |
| --repo-path "$(git rev-parse --show-toplevel)") | |
| # Format: - [ ] {task_id} {feature_title} `#mission`:{mission_id} ~{est} ref:{ref} | |
| done < <(awk '/^- \[ \] F[0-9]+:/{sub(/^- \[ \] F[0-9]+: /,""); print}' "$MISSION_DIR/mission.md") |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/scripts/commands/mission.md around lines 404 - 405, The loop
currently uses the literal token "features" (for feature in features; do) so it
never iterates real mission features; update the loop to iterate over the actual
feature list read from mission state (e.g., expand the variable or command that
produces the features array/list) and ensure the variable/name used to hold
mission features is populated before the loop; specifically replace the literal
"for feature in features; do" with a construct that iterates the populated
features variable/command output (the same name you use to load mission state)
and keep the inner logic that claims task IDs unchanged.
.agents/scripts/commands/mission.md
Outdated
| - `scripts/commands/define.md` — Interview technique (reused for scoping) | ||
| - `scripts/commands/full-loop.md` — Worker execution (dispatched per feature) | ||
| - `scripts/commands/pulse.md` — Supervisor dispatch (mission-aware) | ||
| - `workflows/plans.md` — Planning patterns for decomposition | ||
| - `templates/brief-template.md` — Brief format (Full mode features) | ||
| - `templates/mission-template.md` — Mission state file template (t1357.1) | ||
| - `tools/build-agent/build-agent.md` — Agent lifecycle (draft tier for mission agents) | ||
| - `reference/orchestration.md` — Model routing for mission workers |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, check if the mission.md file exists and view the relevant lines
if [ -f ".agents/scripts/commands/mission.md" ]; then
echo "=== File found: .agents/scripts/commands/mission.md ==="
echo "Lines 643-650:"
sed -n '643,650p' ".agents/scripts/commands/mission.md"
else
echo "File not found: .agents/scripts/commands/mission.md"
# Try to find it
echo "Searching for mission.md files..."
fd -t f "mission\.md"
fiRepository: marcusquinn/aidevops
Length of output: 711
🏁 Script executed:
# Verify each referenced path exists
targets=(
"scripts/commands/define.md"
"scripts/commands/full-loop.md"
"scripts/commands/pulse.md"
"workflows/plans.md"
"templates/brief-template.md"
"templates/mission-template.md"
"tools/build-agent/build-agent.md"
"reference/orchestration.md"
)
echo "=== Verifying referenced documentation paths ==="
for t in "${targets[@]}"; do
if [ -f "$t" ]; then
echo "✓ FOUND: $t"
else
echo "✗ MISSING: $t"
fi
doneRepository: marcusquinn/aidevops
Length of output: 420
🏁 Script executed:
# Search for these files anywhere in the repo with various extensions
echo "=== Searching for referenced files with various extensions ==="
for basename in "define" "full-loop" "pulse" "plans" "brief-template" "mission-template" "build-agent" "orchestration"; do
echo "Searching for: $basename"
fd -t f "$basename" --extensions md,txt,json 2>/dev/null | head -5 || echo " (not found)"
doneRepository: marcusquinn/aidevops
Length of output: 333
🏁 Script executed:
# Check if these directories exist at all
echo "=== Checking referenced directories ==="
dirs=(
"scripts/commands"
"workflows"
"templates"
"tools/build-agent"
"reference"
)
for d in "${dirs[@]}"; do
if [ -d "$d" ]; then
echo "✓ Directory exists: $d"
ls -la "$d" | head -10
else
echo "✗ Directory missing: $d"
fi
doneRepository: marcusquinn/aidevops
Length of output: 743
All referenced documentation files are missing from the repository
The 8 files referenced in the "Related" section (lines 643-650) do not exist:
scripts/commands/directory itself is missingworkflows/plans.md— directory missingtemplates/brief-template.mdandtemplates/mission-template.md— files missing from existing templates directorytools/build-agent/build-agent.md— directory missingreference/orchestration.md— directory missing
Either create these documentation files or remove/correct the broken references.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/scripts/commands/mission.md around lines 643 - 650, The "Related"
section lists eight documentation files that are missing; update the references
in .agents/scripts/commands/mission.md by either adding the referenced docs
(create scripts/commands/define.md, scripts/commands/full-loop.md,
scripts/commands/pulse.md, workflows/plans.md, templates/brief-template.md,
templates/mission-template.md, tools/build-agent/build-agent.md, and
reference/orchestration.md) with appropriate content or remove/replace the
broken entries with existing file paths; ensure the filenames used in the list
(e.g., scripts/commands/define.md, workflows/plans.md,
templates/mission-template.md, tools/build-agent/build-agent.md,
reference/orchestration.md) match the actual repo structure and update any links
in mission.md accordingly.
|
|
Pulse supervisor review: CodeRabbit's CHANGES_REQUESTED flags are stale — the current code already addresses all three issues:
All CI checks are green. Merging. |



Summary
scripts/commands/mission.md— the/missioncommand that bridges "I have an idea" to "tasks are dispatched and executing"Details
The
/missioncommand bridges the gap between "I have an idea" and "tasks are dispatched and executing". It takes a high-level goal (e.g., "Build a CRM"), runs a structured interview (reusing/defineprobe techniques at project scope), decomposes it into sequential milestones with parallelisable features, creates a mission state file, and optionally sets up a new repo.Key features:
Closes #2496