Asynchronous Pair Programming with Agents: Sentinel, Bolt, and Palette in Action
Table of Contents
You already have the theory and you have the configuration. Now let’s see the magic in action. We are going to simulate three real Android development scenarios and see how Sentinel, Bolt, and Palette solve problems that a generalist “chatbot” would likely ignore or solve poorly.
Case 1: Sentinel vs. The Insecure AndroidManifest 🛡️
Scenario: You have an app that uploads photos. You’ve added permissions “just in case” and fast network configurations for development.
Prompt to Agent:
“Sentinel, review my
AndroidManifest.xmland my network configuration for production.”
Sentinel’s Response (based on its System Prompt):
**SECURITY ANALYSIS - SENTINEL**
[CRITICAL] `android:usesCleartextTraffic="true"` detected.
**Risk:** Allows unencrypted HTTP traffic. An attacker on the same network can intercept session tokens.
**Solution:** Remove the attribute or set it to `false` for production. Use `network_security_config.xml` if you need HTTP only in debug.
[HIGH] `READ_EXTERNAL_STORAGE` permission requested on Android 13+.
**Risk:** Excessive privileges.
**Solution:** Use Android Photo Picker or `READ_MEDIA_IMAGES` for proper granularity on SDK 33+.
[MEDIUM] Activity `DeepLinkActivity` exported without permissions.
**Risk:** Any app can launch this activity.
**Solution:** Add `android:exported="false"` if internal, or protect it with a signature-level permission.
The difference? A normal chat would have told you “The XML is well formed”. Sentinel tells you “You are going to get hacked”.
Case 2: Bolt vs. The RecyclerView Jank ⚡
Scenario: You have a complex list of items that stutters (jank) when scrolling.
Prompt to Agent:
“Bolt, here is my
ProductAdapter.ktandonBindViewHolder. Scrolling feels heavy on mid-range devices.”
Bolt’s Response:
**PERFORMANCE ANALYSIS - BOLT**
**Problem Detected:** Object creation in `onBindViewHolder`.
Line 45: `val formatter = SimpleDateFormat("dd/MM/yyyy")`
**Impact:** `SimpleDateFormat` is expensive to instantiate. Doing it inside `onBind` executes dozens of times per second during fast scroll, causing GC (Garbage Collection) churn and frame drops.
**Proposed Optimization:**
Move the formatter to a `companion object` or use `java.time.format.DateTimeFormatter` (thread-safe) as a singleton.
**Optimized Code:**
```kotlin
class ProductAdapter : RecyclerView.Adapter<ProductViewHolder>() {
companion object {
// Single, reusable instance
private val DATE_FORMATTER = DateTimeFormatter.ofPattern("dd/MM/yyyy")
}
override fun onBindViewHolder(holder: ProductViewHolder, position: Int) {
// ...
// Direct usage without memory allocation
holder.dateView.text = item.date.format(DATE_FORMATTER)
}
}
The difference? A normal chat would have suggested using Coroutines (unnecessary here). Bolt detects the micro-memory optimization that kills scrolling.
Case 3: Palette vs. The “Invisible” Button 🎨
Scenario: You created a beautiful custom button in Jetpack Compose, but users complain they “can’t hit it”.
Prompt to Agent:
“Palette, review this
IconButtonComposable. Do you see any usability issues?”
Palette’s Response:
**UX/UI REVIEW - PALETTE**
**Observation:**
Your `Icon` has a size of 24dp and the container `Box` wraps content (`wrapContentSize`).
**Accessibility Issue:**
The resulting touch area is 24x24dp. Material Design and accessibility guidelines require a minimum of **48x48dp**. Users with large fingers or motor impairments will struggle.
**Solution:**
Add `minimumInteractiveComponentSize()` or wrap in a standard `IconButton` which already handles this.
**Improved Code:**
```kotlin
Box(
modifier = Modifier
.clickable { onClick() }
.minimumInteractiveComponentSize() // Palette Magic!
// Now touch area is 48dp even if visually 24dp
) {
Icon(
imageVector = Icons.Default.Add,
contentDescription = "Add new item", // Added for TalkBack
modifier = Modifier.size(24.dp)
)
}
Final Conclusion
Integrating Sentinel, Bolt, and Palette into your workflow isn’t about replacing your judgment as a senior developer. It’s about augmenting it.
These agents act as an extra pair of eyes that never get tired, always remember security rules, are always obsessed with frames per second, and always care about accessibility.
Start today. Create your agents/ folder, define your AGENTS.md, and start programming accompanied.
You might also be interested in
TDD in the Era of AI: Red, Green, Refactor, Prompt
Test Driven Development is not dead. In fact, with AI, it's more powerful than ever. Learn the new workflow: Red, Green, Refactor, Prompt.
Power Up Your AI Agents with Skills: From Gemini to Copilot
Discover how to transform your generalist AI assistant into a team of specialists using Agent Skills. Includes practical examples for Android, Kotlin, and Conventional Commits.
agents.md: The New Standard for AI Development
Discover why agents.md has become the de facto standard for configuring AI agents and how to effectively implement it in Android projects.