Phase Breakdown
Cycle time and cost by phase.
Understand where time and cost accumulate in your SDLC. Phase Breakdown shows cycle time and cost per workflow phase (research, development, QA, acceptance, deploy) to identify bottlenecks and optimize resource allocation.
Overview
The SDLC is divided into phases:
- Research - Problem understanding, feasibility study, requirements gathering
- Development - Code implementation and internal testing
- QA - Quality assurance, security review, performance testing
- Acceptance - User/product acceptance, staging validation
- Deploy - Release to production, monitoring activation
For each phase, the dashboard shows:
- Avg Cycle Time - Mean duration an issue spends in this phase
- Avg Cost - Mean cost (LLM tokens + infrastructure) per issue
- Throughput - # issues completed in this phase per time window
- Cost % of Total - What share of total project cost is this phase?
Key Metrics
Average Cycle Time Per Phase
How long does an issue typically spend in each phase?
- Measurement: Time from phase start (
workflow_instances.phase = 'dev') to phase end (gate approval or next phase entry) - Data source:
factory_eventswith phase transitions +workflow_instancesphase timestamps - Typical benchmarks:
- Research: 2-8h (sometimes skipped for simple fixes)
- Dev: 1-4h (core work)
- QA: 1-3h (depends on test coverage)
- Acceptance: 30m-2h (usually quick if QA passed)
- Deploy: 5-20m (typically automated)
Interpretation:
- If Dev phase is >4h on average → Workflow might be splitting issues too large; consider smaller, more atomic work items
- If QA is >3h on average → Test suite is slow or coverage is incomplete; bottleneck for throughput
- If Acceptance is >2h on average → Stakeholders are slow to respond; consider async acceptance or opt-out gates
Average Cost Per Phase
Cost (in tokens or USD equivalent) spent per issue in each phase.
- Data source:
cost_eventstable, aggregated by phase from session timestamps - Composition: LLM tokens (context + completion), infrastructure (compute, storage, API calls)
- Typical split:
- Research: 10-20% of total (exploratory, often small issues)
- Dev: 40-60% of total (core implementation)
- QA: 10-20% of total (testing, assertions)
- Acceptance: 5-10% of total (sign-off)
- Deploy: <1% of total (usually scripted)
High-cost phase signals:
- Dev is >60% → Agent is over-iterating or token context is bloated
- QA is >20% → Test suite is expensive; consider mock-based testing
- Research is >20% → Problem scope is unclear; improve issue description
Throughput Per Phase
issues that passed through each phase in the time window.
- Formula: COUNT(DISTINCT
issueIdWHEREphase = 'dev'ANDcompleted_atIN [start, end]) - Trend: Week-over-week or month-over-month growth
- Bottleneck: Phase with lowest throughput is your constraint
Cost as % of Total
Stacked bar chart or donut showing cost distribution across phases.
Project Total Cost: $1,234
├─ Research: $140 (11%)
├─ Dev: $680 (55%)
├─ QA: $200 (16%)
├─ Acceptance: $140 (11%)
└─ Deploy: $74 (6%)Use this to direct optimization efforts. If Dev is >55%, focus on agent efficiency there.
Display & Filtering
The Performance → Phase Breakdown panel offers:
- Time window - 7d, 30d, 90d
- Project filter - Restrict to one project
- Workflow filter - Optional; compare standard workflows vs. variants (e.g., sdlc-v2 vs. sdlc-bfsi)
- Work-type filter - Optional; see breakdown for 'dev' work vs. 'qa' work (if tagged differently)
Visualizations:
- Cycle time bar chart - Avg duration per phase, y-axis in hours
- Cost distribution - Stacked bar or donut with absolute $ or tokens
- Throughput trend - Line chart of completed-issues/day by phase
- Cost breakdown table - Detailed row per phase with cost, time, count, % total
Data Sources
Phase transitions:
workflow_instances.phase- Current phase of the issuefactory_eventswithworkflow.phase-enteredandworkflow.phase-exitedeventsagent_sessions- Sessions within each phase; timestamps
Cost:
cost_eventstable - One row per session withcost_usdandtoken_count- Aggregated by session's phase at the time it ran
Aggregation:
- Dashboard query fetches all
workflow_instancesand sessions for time window - For each issue, sum cost/time across all sessions in each phase
- Group by phase; calculate mean, median, percentiles
- Render charts and table
Interpreting Results
Balanced Cost Distribution (Research 10%, Dev 50%, QA 15%, Acceptance 15%, Deploy 10%)
- ✓ Issue scope and quality are well-managed
- ✓ QA is catching issues without excessive re-work
- ✓ Deploy is automated and lightweight
Action: Maintain current workflow; it's optimized.
Dev Phase is >60% of Cost
- ⚠ Implementation is expensive; likely over-iteration or token bloat
- Options:
- Break issues into smaller, atomic units (Issue too complex)
- Improve agent system prompt (Irrelevant context in memory)
- Optimize tool call patterns (Agent is over-calling tools)
Investigation:
# Fetch sessions in dev phase with high token counts
curl -H "Authorization: Bearer $RENSEI_API_KEY" \
'https://api.rensei.ai/api/factory/metrics?phase=dev&sort=-token_count&limit=5'
# Inspect top session for inefficiencies
# → Check Session Inspector for repeated tool calls
# → Check memory context for bloatQA Phase is >20% of Cost
- ⚠ Testing is expensive; either thorough (good) or brittle (bad)
Determine which:
- If QA always passes first time → Thorough, keep it
- If QA frequently finds bugs → Thorough, keep it
- If QA reruns tests without finding bugs → Brittle, optimize
Action:
- Reduce test redundancy (mock external services)
- Use property-based testing (fewer cases, more coverage)
- Skip QA for trivial changes (add auto-pass for 1-line fixes)
Acceptance Phase is >15% of Cost
- ⚠ Stakeholders are slow to respond OR gate is checking expensive things
If acceptance is slow (latency-driven):
- Make gate async (don't block on approval)
- Improve gate UX (one-click approve vs. form-filling)
If acceptance cost is high (compute-driven):
- Pre-run acceptance tests in QA
- Reduce acceptance scope (move expensive checks to QA)
Deploy Phase is >10% of Cost
- ⚠ Rare; deploy should be scripted and fast
- Possible causes:
- Manual deploy steps (automation gap)
- Extensive smoke testing (move to QA or staging)
- Rollback loops (frequent failures; check production logs)
Action: Automate deploy steps; move expensive validation to staging.
Cycle Time Spikes
Research suddenly >8h:
- Issue descriptions are vague; improve issue template
- Agent is stuck researching; improve research workflow or tools
Dev suddenly >4h:
- Workflow just got more complex; acceptable if accompanied by larger issues
- Agent credentials expired; check integration status
Deploy suddenly >20m:
- Deployment automation failed; check CI/CD logs
- Production is degraded; check uptime/monitoring
API & Querying
Endpoint: GET /api/public/phase-metrics?workspaceId=<id>&projectId=<slug>&after=<iso>&before=<iso>
Returns phase breakdown metrics:
{
"phases": [
{
"name": "dev",
"avgCycleTimeMs": 7200000,
"avgCostUsd": 12.50,
"throughput": 24,
"costPercentage": 52.1,
"p50CycleTimeMs": 6500000,
"p95CycleTimeMs": 14400000
}
],
"totalCostUsd": 240.00,
"periodStartAt": "2026-05-03T00:00:00Z",
"periodEndAt": "2026-06-03T00:00:00Z"
}Usage:
curl -H "Authorization: Bearer $RENSEI_API_KEY" \
'https://api.rensei.ai/api/public/phase-metrics?workspaceId=ws_123&projectId=my-project&after=2026-05-03T00:00:00Z&before=2026-06-03T00:00:00Z'Optimization Playbook
- Find your biggest cost phase → Sort phase breakdown by cost %
- Drill into the outlier → Fetch top-cost sessions in that phase
- Inspect 3-5 sessions → Use Session Inspector to understand the pattern
- Hypothesis → What's the inefficiency? (too many tool calls, too much context, wrong model, etc.)
- Implement fix → Update workflow, system prompt, or tool config
- Measure impact → Re-run phase breakdown in 7 days; confirm cost/time dropped
Related Pages
- Factory Overview - Total throughput and cost
- Code Survival - Quality metrics; correlates with rework and phase cost
- Rework & Escalation - Phases where rework happens most
- SDLC Default - Phase definitions and work-type mappings