Finish Tutti trust and activation sprint - #130
Conversation
📝 WalkthroughWalkthroughThis PR adds an activation status CLI command for Tutti workspaces, refactors prompt-activity detection into reusable helpers, and reshapes product positioning via README and strategic planning documents. The activation command queries control events to report whether a workspace has completed its first successful workflow run. ChangesDocumentation & Product Direction
Activation CLI Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
src/cli/runs.rs (1)
50-55: ⚡ Quick winExtract workspace-root resolution into a helper to avoid drift.
The same
current_dir + TuttiConfig::load + project_rootblock is repeated inlist,activation, andshow. A small helper keeps error behavior consistent as this module grows.♻️ Suggested refactor
+fn resolve_project_root() -> Result<std::path::PathBuf> { + let cwd = std::env::current_dir()?; + let (_config, config_path) = crate::config::TuttiConfig::load(&cwd)?; + config_path.parent().map(|p| p.to_path_buf()).ok_or_else(|| { + TuttiError::ConfigValidation("could not determine workspace root".to_string()) + }) +} + pub fn activation() -> Result<()> { - let cwd = std::env::current_dir()?; - let (_config, config_path) = crate::config::TuttiConfig::load(&cwd)?; - let project_root = config_path.parent().ok_or_else(|| { - TuttiError::ConfigValidation("could not determine workspace root".to_string()) - })?; + let project_root = resolve_project_root()?; - let events = load_control_events(project_root)?; + let events = load_control_events(&project_root)?;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/cli/runs.rs` around lines 50 - 55, Extract the repeated "current_dir + TuttiConfig::load + project_root" logic into a small helper (e.g., fn resolve_workspace_root() -> Result<PathBuf>) that performs std::env::current_dir(), calls TuttiConfig::load(&cwd), and returns the config_path.parent() or the same TuttiError::ConfigValidation("could not determine workspace root".to_string()) on failure; then replace the duplicated blocks in activation, list, and show to call this helper so all three functions use the same error behavior and centralized resolution logic.docs/tutti-gstack-review-2026-05-05.md (2)
75-78: 💤 Low valueOptional: Consider varying sentence structure.
Three consecutive sentences begin with "Not," which static analysis flagged. The parallel structure is rhetorically effective here—it emphasizes what Tutti isn't—so changing it is purely optional. If you prefer variety:
✨ Optional style alternative
-Not another agent. -Not a general AI platform. -Not an LLM wrapper. +Not another agent, not a general AI platform, not an LLM wrapper.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/tutti-gstack-review-2026-05-05.md` around lines 75 - 78, The three short lines "Not another agent.", "Not a general AI platform.", "Not an LLM wrapper." all start with "Not" and static analysis flagged the repeated sentence-start; optionally rephrase one or two of these lines to vary sentence openings while preserving the negative emphasis — for example change one to "It's not another agent." or "This is not a general AI platform." or combine two into a single sentence like "Not an LLM wrapper — not a general AI platform either." — update the three lines accordingly (the exact strings to edit are "Not another agent.", "Not a general AI platform.", and "Not an LLM wrapper.").
13-13: 💤 Low valueOptional: Consider rephrasing to avoid word repetition.
Static analysis flagged the repetition of "right" in close proximity. While this doesn't impact comprehension, you could rephrase for polish:
✨ Optional style refinement
-The right move is **not** to broaden the roadmap. The right move is to make Tutti feel undeniably reliable for the operator managing multi-agent coding work. +The right move is **not** to broaden the roadmap—it's to make Tutti feel undeniably reliable for the operator managing multi-agent coding work.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/tutti-gstack-review-2026-05-05.md` at line 13, Rephrase the sentence "The right move is **not** to broaden the roadmap. The right move is to make Tutti feel undeniably reliable for the operator managing multi-agent coding work." to avoid repeating "The right move" twice — e.g., change the second clause to a synonym or restructure the sentence so it reads smoothly (search for the exact sentence text in the document and replace with a single revised version that uses a different phrasing such as "Instead, focus on making Tutti feel undeniably reliable for the operator managing multi-agent coding work" or similar).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/tutti-activation-telemetry-plan-2026-05-05.md`:
- Around line 14-18: The current workflow.completed handler in src/cli/runs.rs
(around the code handling the event at lines ~275-290) only checks for event
existence and must be tightened: update the handler that processes
workflow.completed events to (1) verify the run result by checking
event.data.success == true, (2) filter by origin by requiring event.data.origin
== ExecutionOrigin::Run (use the ExecutionOrigin enum), (3) exclude
test/workspace runs by checking the workspace record (e.g., workspace.is_test or
workspace.metadata indicating a real workspace) and (4) add a way to capture
"first-run guided" (either by adding a first_run_guided boolean to the
Run/Workflow metadata and persisting it when the guided flow triggers, or defer
and flag it as out-of-scope and only count user-triggered runs for now). Modify
the workflow.completed processing function to return early if any of these
checks fail and ensure logs reflect which check caused the drop so telemetry
only records the exact activation signal.
---
Nitpick comments:
In `@docs/tutti-gstack-review-2026-05-05.md`:
- Around line 75-78: The three short lines "Not another agent.", "Not a general
AI platform.", "Not an LLM wrapper." all start with "Not" and static analysis
flagged the repeated sentence-start; optionally rephrase one or two of these
lines to vary sentence openings while preserving the negative emphasis — for
example change one to "It's not another agent." or "This is not a general AI
platform." or combine two into a single sentence like "Not an LLM wrapper — not
a general AI platform either." — update the three lines accordingly (the exact
strings to edit are "Not another agent.", "Not a general AI platform.", and "Not
an LLM wrapper.").
- Line 13: Rephrase the sentence "The right move is **not** to broaden the
roadmap. The right move is to make Tutti feel undeniably reliable for the
operator managing multi-agent coding work." to avoid repeating "The right move"
twice — e.g., change the second clause to a synonym or restructure the sentence
so it reads smoothly (search for the exact sentence text in the document and
replace with a single revised version that uses a different phrasing such as
"Instead, focus on making Tutti feel undeniably reliable for the operator
managing multi-agent coding work" or similar).
In `@src/cli/runs.rs`:
- Around line 50-55: Extract the repeated "current_dir + TuttiConfig::load +
project_root" logic into a small helper (e.g., fn resolve_workspace_root() ->
Result<PathBuf>) that performs std::env::current_dir(), calls
TuttiConfig::load(&cwd), and returns the config_path.parent() or the same
TuttiError::ConfigValidation("could not determine workspace root".to_string())
on failure; then replace the duplicated blocks in activation, list, and show to
call this helper so all three functions use the same error behavior and
centralized resolution logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 218fa338-cbcf-45df-8166-bf76c2f60fd1
📒 Files selected for processing (9)
README.mddocs/tutti-activation-telemetry-plan-2026-05-05.mddocs/tutti-gstack-review-2026-05-05.mddocs/tutti-issue-triage-2026-05-05.mddocs/tutti-local-audit-2026-05-05.mdsrc/automation/mod.rssrc/cli/mod.rssrc/cli/runs.rssrc/main.rs
| Recommended exact signal: | ||
| - first `workflow.completed` event where: | ||
| - the run belongs to a real workspace | ||
| - the workflow is user-triggered or first-run guided | ||
| - the run result is successful |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if workflow events contain trigger/source metadata
# Look for workflow.completed event structure in the codebase
rg -n "workflow\.completed" -A 5 -B 5 --type=rust
# Check ControlEvent enum definition for available fields
ast-grep --pattern 'enum ControlEvent {
$$$
}'Repository: nutthouse/tutti
Length of output: 3294
🏁 Script executed:
#!/bin/bash
# Find ControlEvent struct/enum definition
rg -n "struct ControlEvent|enum ControlEvent" -A 10 --type=rust
# Look for where workflow trigger type might be stored
rg -n "trigger|first-run|guided" --type=rust -i | head -30
# Check the workflow completion logic for trigger info
rg -n "fn.*workflow.*complete|workflow_trigger|trigger_type" --type=rust -iRepository: nutthouse/tutti
Length of output: 3161
🏁 Script executed:
#!/bin/bash
# Find WorkflowCompletePayload struct definition
rg -n "struct WorkflowCompletePayload|WorkflowCompletePayload" -A 10 --type=rust | head -40
# Check how workflow.completed events are created and what data is included
rg -n "append_control_event.*workflow.completed" -B 5 -A 5 --type=rust
# Look at the activation logic in runs.rs more closely
sed -n '280,310p' src/cli/runs.rs
# Check if trigger source is captured anywhere in workflow complete
rg -n "success.*trigger|trigger.*source|user.triggered|first.run" --type=rust -i | head -20Repository: nutthouse/tutti
Length of output: 3523
🏁 Script executed:
#!/bin/bash
# Find HookWorkflowSource enum definition
rg -n "enum HookWorkflowSource" -A 10 --type=rust
# Check how workflow_source from WorkflowCompletePayload flows into event data
rg -n "append_control_event" -B 10 -A 3 --type=rust | grep -A 13 "workflow.completed"
# Look for where workflow.completed event is created with data
rg -n "workflow.completed.*data|workflow.completed.*json|append_control_event.*success" -B 5 -A 5 --type=rust
# Check for workspace validation or real workspace determination
rg -n "real.workspace|test.workspace|workspace.*validation" --type=rust -iRepository: nutthouse/tutti
Length of output: 1206
🏁 Script executed:
#!/bin/bash
# Get the complete workflow.completed event creation
sed -n '4160,4195p' src/automation/mod.rs
# Also check what data is included - look for the complete append_control_event call
sed -n '4172,4190p' src/automation/mod.rsRepository: nutthouse/tutti
Length of output: 1855
🏁 Script executed:
#!/bin/bash
# Check the plan document itself
cat docs/tutti-activation-telemetry-plan-2026-05-05.md | head -50
# Find ExecutionOrigin enum
rg -n "enum ExecutionOrigin" -A 15 --type=rust
# Search for first-run or guided setup
rg -n "first.run|guided|onboarding" --type=rust -i | head -20Repository: nutthouse/tutti
Length of output: 2615
🏁 Script executed:
#!/bin/bash
# Check for TODOs or FIXMEs around activation logic
rg -n "TODO|FIXME|XXX" src/cli/runs.rs
# Check if there's any filtering logic planned or mentioned in comments
rg -n "real.workspace|first.run|activation.*filter|first.*successful" --type=rust -i
# Verify the full activation logic once more
sed -n '275,310p' src/cli/runs.rsRepository: nutthouse/tutti
Length of output: 1475
Activation criteria are not currently enforced; "first-run guided" tracking is missing.
The plan specifies three criteria for the activation signal, but the current implementation (src/cli/runs.rs:275-290) only checks for workflow.completed event existence without validating:
- success status (event data has "success" field but it's not filtered)
- user-triggered vs automated runs (event data has "origin" field that could distinguish ExecutionOrigin::Run from system-triggered workflows, but filtering is not implemented)
- "first-run guided" status (this metadata is not tracked anywhere in the codebase)
- real workspace vs test workspace (no validation exists)
The critical gap is that "first-run guided" has no mechanism to be captured or identified. Before this sprint, clarify whether:
- All completed workflows should count as activation (ignore the criteria for now)
- Only ExecutionOrigin::Run workflows count as "user-triggered" (feasible with current origin field)
- "First-run guided" should be added as a tracked field or deferred to a future sprint
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/tutti-activation-telemetry-plan-2026-05-05.md` around lines 14 - 18, The
current workflow.completed handler in src/cli/runs.rs (around the code handling
the event at lines ~275-290) only checks for event existence and must be
tightened: update the handler that processes workflow.completed events to (1)
verify the run result by checking event.data.success == true, (2) filter by
origin by requiring event.data.origin == ExecutionOrigin::Run (use the
ExecutionOrigin enum), (3) exclude test/workspace runs by checking the workspace
record (e.g., workspace.is_test or workspace.metadata indicating a real
workspace) and (4) add a way to capture "first-run guided" (either by adding a
first_run_guided boolean to the Run/Workflow metadata and persisting it when the
guided flow triggers, or defer and flag it as out-of-scope and only count
user-triggered runs for now). Modify the workflow.completed processing function
to return early if any of these checks fail and ensure logs reflect which check
caused the drop so telemetry only records the exact activation signal.
Hermes PR review trackerStatus
Findings
Evidence checked
Recommended next actionOwner: Tutti activation lane. Mine useful pieces into smaller PRs or get an explicit human decision to carry the broad sprint as-is; resolve conflicts before any merge path. NotesNo merge/deploy/close action taken. GitHub status max-status noise is non-blocking because this tracker comment is durable PR-visible state. Managed by Hermes. Last updated: Managed by Hermes. Last updated: |
Summary
tt runs activationto report first successful workflow activation from existing event dataVerification
cargo run -- runs activationreturned the expected activation summary from repo event historyNotes
Summary by CodeRabbit
Documentation
New Features
activationcommand to check workspace activation status and first successful workflow run timestamp.