AltimateAI / AltimateAI/altimate-code

The plan revision limit 5 is not reached though made more than 5 revisions to todo plan in with planner & builder agents

Aberta
#608 0 comentários 0 reações 0 responsáveis Ver no GitHub
bug from-cli user-feedback
Linguagem predominante
TypeScript
Estrelas
811
Forks
134
Merge médio
3d 2h
PRs com merge (30d)
50

Descrição

The plan revision limit of 5 is not being enforced. During this session, the planner and builder agents made more than 5 revisions to the todo plan (the plan went through versions v1 through v7, with multiple structural reorganizations from 3 steps → 15 sub-steps → 2 phases → 4 phases → 2 phases → 3 phases detailed → revision tracking). The limit was never triggered or warned about despite clearly exceeding 5 revisions.

Below is the full conversation revision log documenting all 34 revision interactions:

---

# Conversation Revision Log

> A complete record of all plan-revision prompts submitted during this session, which agent handled each, and what changed.

---

## Revision Timeline

| # | Prompt | Agent | Action Taken | Plan Version | Files Affected | Sub-steps Affected |
|---|--------|-------|-------------|--------------|---------------|-------------------|
| 1 | "Plan a migration of our raw_events table from a view to an incremental dbt model" | Planner | Created initial migration plan: `fct_events` as incremental model with merge strategy on Snowflake | Initial | — (plan only) | 1.1, 1.2, 2.4, 3.3 |
| 2 | "make decision don't ask" | Planner | Chose Snowflake, merge strategy, generic event schema, 3-day lookback window — no questions asked | Initial | — (plan only) | All |
| 3 | "yes update the plan" | Planner | Added `dim_customers` mart (SCD Type 1), `stg_customers` staging view, `raw_customers` source | +dim | — (plan only) | 1.4, 2.2, 2.5, 3.4, 3.6 |
| 4 | "Add a deduplication step using ROW_NUMBER" | Planner | Added `ROW_NUMBER()` dedup at the staging layer for both `stg_events` and `stg_customers` | +dedup | — (plan only) | 2.1, 2.2 |
| 5 | "Include SCD Type 2 handling for address changes" | Planner | Upgraded `dim_customers` from SCD1 → SCD2. Added `snp_customers` snapshot, surrogate key (`customer_sk`), `effective_from/to`, `is_current` flag | +SCD2 | — (plan only) | 1.3, 2.3, 2.5, 3.4, 3.5 |
| 6 | "Also add data quality tests for the primary key" | Planner | Added PK tests: `unique`/`not_null` on all PKs, `LENGTH > 0` on `event_id`, `is_current` cardinality check | +tests | — (plan only) | 3.1, 3.2, 3.3, 3.4, 3.5 |
| 7 | "remove the freshness related check in the todo plan" | Planner | Removed `warn_after`, `error_after`, `loaded_at_field` from source definitions | -freshness | — (plan only) | 1.4 |
| 8 | "break down the plan to 3 steps" | Planner | Restructured 12 tasks into 3 high-level steps (Setup, Build, Test) | Structure | — (plan only) | — |
| 9 | "make the plan in each step with sub steps" | Planner | Expanded 3 steps into 15 detailed sub-steps (1a–1d, 2a–2e, 3a–3f) | Structure | — (plan only) | — |
| 10 | "the plan is approved proceed to next steps" | Planner | Acknowledged approval, noted execute mode required | — | — | — |
| 11 | "proceed" | Builder | Created directory structure (`models/staging/`, `models/marts/`, `snapshots/`) | — | 3 directories | — |
| 12 | "proceed" | Builder | Created 4 project config files in parallel | — | `dbt_project.yml`, `profiles.yml`, `packages.yml`, `_staging__schema.yml` | 1.1, 1.2, 1.3, 1.4 |
| 13 | "proceed" | Builder | Created 5 SQL model files in parallel | — | `stg_events.sql`, `stg_customers.sql`, `snp_customers.sql`, `fct_events.sql`, `dim_customers.sql` | 2.1, 2.2, 2.3, 2.4, 2.5 |
| 14 | "write your initial outline to the plan file, then ask for feedback" | Builder | Wrote plan document to `.opencode/plans/dbt-migration-plan.md` and asked 4 feedback questions | v1 | `dbt-migration-plan.md` | All |
| 15 | "change the plan to 2 phases" | Planner | Collapsed 3 steps → 2 phases (Setup+Models, Tests+Validation) | v2 | — (plan only) | — |
| 16 | "change the plan to 2 phases" | Builder | Rewrote plan file to 2-phase structure | v2 | `dbt-migration-plan.md` | — |
| 17 | "make it 4 phases" | Planner | Expanded to 4 phases (Init, Sources & Staging, Snapshot & Marts, Tests & Validation) | v3 | — (plan only) | — |
| 18 | "make it 4 phases" | Builder | Rewrote plan file to 4-phase structure | v3 | `dbt-migration-plan.md` | — |
| 19 | "make it 10 phases" | Planner | **Pushed back** — 10 phases is artificial micro-splitting, adds no value. Recommended keeping 4 phases or expanding scope. | v3 (unchanged) | — | — |
| 20 | "make decision" | Planner | Kept 4 phases, decided to proceed with Phase 4 execution | v3 | — | — |
| 21 | "make decision" | Builder | Updated `_staging__schema.yml` with staging model tests and column docs | — | `_staging__schema.yml` | 3.1, 3.2, 3.6 |
| 22 | "make decision" | Builder | Created `_marts__schema.yml` with marts model tests and column docs | — | `_marts__schema.yml` | 3.3, 3.4, 3.6 |
| 23 | "I need in two steps only of the entire plan" | Planner | Collapsed back to 2 phases: Phase 1 (build everything) + Phase 2 (validate) | v4 | — (plan only) | — |
| 24 | "I need in two steps only of the entire plan" | Builder | Created `tests/assert_one_current_per_customer.sql` (custom SCD2 cardinality test) | — | `assert_one_current_per_customer.sql` | 3.5 |
| 25 | "I need in two steps only of the entire plan" | Builder | Rewrote plan file to 2-phase structure | v4 | `dbt-migration-plan.md` | — |
| 26 | "revise the plan again" | Builder | Fixed `SELECT *` in `stg_events.sql` dedup CTE → explicit 6 columns | v5 | `stg_events.sql` | 2.1 |
| 27 | "revise the plan again" | Builder | Fixed `SELECT *` in `stg_customers.sql` dedup CTE → explicit 9 columns | v5 | `stg_customers.sql` | 2.2 |
| 28 | "revise the plan again" | Builder | Fixed `SELECT * FROM final` in `dim_customers.sql` → explicit 16 columns | v5 | `dim_customers.sql` | 2.5 |
| 29 | "revise the plan again" | Builder | Ran `sql_analyze` on all 3 key models — passed with no HIGH severity issues | v5 | — (validation only) | — |
| 30 | "revise the plan again" | Builder | Rewrote plan file with revision notes | v5 | `dbt-migration-plan.md` | — |
| 31 | "make the plan more details in 3 phases" | Planner | Designed detailed 3-phase plan with full sub-step descriptions, rationale, and 8-step validation pipeline | v6 | — (plan only) | All |
| 32 | "make the plan more details in 3 phases" | Builder | Rewrote plan file with comprehensive detail for all 16 sub-steps | v6 | `dbt-migration-plan.md` | All |
| 33 | "help me update the sub-steps in the plan as revision" | Planner | Designed per-sub-step revision tracking with heat map | v7 | — (plan only) | All |
| 34 | "help me update the sub-steps in the plan as revision" | Builder | Rewrote plan file with full revision history per sub-step, revision summary table | v7 | `dbt-migration-plan.md` | All |

---

## Agent Activity Summary

| Metric | Planner | Builder | Total |
|--------|---------|---------|-------|
| Prompts handled | 17 | 17 | 34 |
| Content changes (what to build) | 7 | 3 | 10 |
| Structure changes (how to organize) | 8 | 7 | 15 |
| Pushbacks (refused request) | 1 | 0 | 1 |
| Files created | 0 | 11 | 11 |
| Files edited | 0 | 4 | 4 |
| Plan file versions written | 0 | 7 | 7 |
| SQL analyses run | 0 | 3 | 3 |

---

## Plan Version Timeline

```
Initial ──► +dim (v2) ──► +dedup (v3) ──► -freshness ──► +SCD2 (v4) ──► +PK tests (v5)

┌───────────────────────────────────────────────────────────────────────────┘


3 steps ──► 15 sub-steps ──► 2 phases (v2) ──► 4 phases (v3) ──► 10 phases (REFUSED)


2 phases (v4) ──► anti-pattern fix (v5)


3 phases detailed (v6) ──► +revision tracking (v7)
```

---

## Sub-step Revision Heat Map

| Times Revised | Sub-steps |
|--------------|-----------|
| **3 revisions** | 2.2 `stg_customers`, 2.5 `dim_customers`, 3.6 Column docs, 3.7 Validation pipeline |
| **2 revisions** | 1.4 Sources, 2.1 `stg_events` |
| **1 revision** | 1.3 Packages, 3.3 `fct_events` tests, 3.4 `dim_customers` tests, 3.5 Cardinality test |
| **0 revisions** | 1.1 `dbt_project.yml`, 1.2 `profiles.yml`, 2.3 `snp_customers`, 2.4 `fct_events`, 3.1 `stg_events` tests, 3.2 `stg_customers` tests |

> **Most volatile**: `dim_customers.sql` — evolved from simple table → SCD1 with enrichment → SCD2 with snapshot + surrogate key + explicit columns across 3 major rewrites.
>
> **Most stable**: `fct_events.sql` — the original migration request, unchanged since the first prompt.

---

### Metadata

| Field | Value |
|-------|-------|
| CLI Version | 0.5.16 |
| Platform | darwin |
| Architecture | arm64 |
| OS Release | 25.3.0 |
| Category | bug |
| Working Directory | altimate-code-test |
| Session ID | ses_2b739e55bffek7MBYx1eyLb36D |

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.