Conversation
… task tracking TUI (Textual User Interface): - Add full Textual-based TUI app (ui/app.py) with task tree, console view, prompt input, and info bar widgets - Add TUIAdapter bridge for sync session I/O to async Textual widgets - Add StageOrchestrator to drive design/build/deploy stages in TUI - Add theme.py with centralized color constants - Add task_model.py for hierarchical task tree state management - Design command now launches TUI by default Discovery: - Replace heuristic _is_section_done() phrase matching with explicit AI "Yes" confirmation gate — sections only advance when the AI unambiguously confirms completion, eliminating false-positive checkmarks from transitional language - "All topics covered" message only shown when every section received AI confirmation; otherwise a softer prompt is displayed - Add "continue" to accepted done-words alongside "done" - Update biz-analyst system prompt to use "Yes" gate instead of [SECTION_COMPLETE] marker Architecture generation: - Thread section_fn/update_task_fn/status_fn into _plan_architecture() and _generate_architecture_sections() so architecture sections appear in the TUI Design task tree with in_progress/completed status - Switch from for-loop to while-loop to support dynamic section discovery via [NEW_SECTION] markers in AI responses - Add per-section elapsed time in console output (e.g. "Done. (35s)") - Start cumulative timer via status_fn for entire architecture pass - Skip Console spinner when TUI status_fn is active (avoids duplicates) Timer format: - Add _format_elapsed() helper in tui_adapter.py — displays "1m04s" instead of "64s" when elapsed time >= 60 seconds - Applied to _tick_timer() and status_fn end event Test fixes: - Remove _is_section_done import and update TestSectionDoneDetection to verify "continue" in _DONE_WORDS - Replace all [SECTION_COMPLETE] mock responses with "Yes" - Fix TestPrototypeDesign tests — mock _get_project_dir and _run_tui instead of stale _prepare_command/_check_guards path
- Run black and isort to auto-fix formatting across 13 files - Fix E501 line-too-long in design_stage.py - Add pytest-asyncio to CI/PR workflow pip install steps - Add asyncio_mode = "strict" to pyproject.toml for Textual widget tests
- deploy_session.py: add assert for stage_num after resolve guard - deploy_state.py: guard parent_idx alongside parent in split check - intent.py: use correct EmbeddedImage attrs (source, mime_type) - app.py: default project_dir to "." when None - prompt_input.py: make _on_key async to match TextArea base class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discovery section gating and architecture task tracking
matching (
_is_section_done()) with an explicit AI confirmationstep. Sections only advance when the AI responds with "Yes",
eliminating false-positive checkmarks from transitional language.
when every section received explicit AI confirmation. Otherwise a
softer prompt is shown.
continue(in additionto
done) to proceed from discovery to architecture generation._generate_architecture_sections()now reports each section to the TUI task tree with
in_progress/completedstatus updates. Dynamically discovered sections(
[NEW_SECTION]markers) are appended in real time.1m04sinstead of
64sin the TUI info bar and per-section consoleoutput.
TUI console color, wrapping, and section pagination
theme.pyas the single source of truth. Duplicate theme dicts in
console.pyand hardcoded hex colors in
task_tree.py,tui_adapter.py, andconsole.pytoolbar functions replaced withCOLORSimports.TUIAdapter.print_fn()no longerstrips Rich markup tags. Messages containing
[success],[info], etc. are routed to the newConsoleView.write_markup()method so status messages retain their colors in the TUI.
ConsoleView(RichLog) now passeswrap=True, eliminating the horizontal scrollbar for long lines.TUIAdapter.response_fn()renders agent responses as colored Markdown via
ConsoleView.write_agent_response(). Wired throughDiscoverySession.run()→DesignStage.execute()→StageOrchestrator._run_design().##headings) are shown one section at a time with an "Enter tocontinue" prompt between them. Single-section responses render all
at once.
PromptInput.enable(allow_empty=True)allows submitting with no text, used by the pagination "Enter to
continue" prompt. Empty submissions are not echoed to the console.
_run_tui()helper incustom.pysuppresses
SIGINTduring the Textual run so Ctrl+C is handledexclusively as a key event. Prevents
KeyboardInterruptfrompropagating to the Azure CLI framework and eliminates the Windows
"Terminate batch job (Y/N)?" prompt from
az.cmd.Build-deploy stage decoupling
idfield (slug derived from name, e.g.
"data-layer"). IDs surviverenumbering, stage insertion/removal, and design iteration. Legacy
state files are backfilled on load.
stages via
build_stage_idinstead of fragile stage numbers.sync_from_build_state()performs smart reconciliation: matchingstages are updated while preserving deploy progress, new build stages
create new deploy stages, and removed build stages are marked
"removed".split_stage(N, substages)replaces onedeploy stage with N substages (
5a,5b,5c) sharing thesame
build_stage_id. Supports code splits (Type A), deploy-onlysplits (Type B), and manual step insertion (Type C).
deploy_mode: "manual"display instructions and pause for user confirmation (Done / Skip /
Need help) instead of executing IaC commands. Manual steps can
originate from the architect during plan derivation or from
remediation.
"removed"(build stage deleted),"destroyed"(resources torn down),"awaiting_manual"(waitingfor user confirmation).
/split N(interactive stage splitting),/destroy N(resource destruction with confirmation),/manual N "instructions"(add/view manual step instructions).(
/deploy,/rollback,/redeploy,/plan,/describe)accept substage labels:
/deploy 5a,/rollback 5(allsubstages in reverse order).
existing deploy state, it syncs with the latest build state and
reports changes (new stages, removed stages, updated code).
(Removed)suffix, manual steps show[Manual]badge, substagesdisplay compound IDs (
2a,2b).Deploy auto-remediation
fails, the system now automatically diagnoses (QA engineer),
determines a fix strategy (cloud architect), regenerates the code
(IaC/app agent), and retries deployment — up to 2 remediation
attempts before falling through to the interactive loop.
architect checks whether downstream stages need regeneration
due to changed outputs or dependencies. Affected stages are
automatically regenerated before their deploy.
/deploy Nand/redeploy Nslash commands now route through the remediation loop on failure,
not just print the error.
remediatingstatus,per-stage
remediation_attemptscounter,add_patch_stages(),and
renumber_stages()methods.Incremental build stage
Design change detection —
BuildStatenow stores a designsnapshot (architecture hash + full text) after each build. On
re-entry, the build session compares the current design against the
snapshot to determine whether regeneration is needed.
Three-branch Phase 2 — the deployment plan derivation phase now
has three paths:
design snapshot.
old and new architectures, classify each stage as unchanged /
modified / removed, identify new services, and apply targeted
updates (
mark_stages_stale,remove_stages,add_stages).When
plan_restructuredis flagged, the user is offered a fullplan re-derive.
directly to the review loop.
Incremental stage operations on
BuildState:set_design_snapshot(),design_has_changed(),get_previous_architecture(),mark_stages_stale(),remove_stages(),add_stages(),renumber_stages().Architecture diff via architect agent —
_diff_architectures()sends old/new architecture + existingstages to the architect, parses JSON classification, and falls back
to marking all stages as modified when the architect is unavailable.
Legacy build compatibility — builds without a design snapshot
(pre-incremental) are treated as "design changed" with all stages
marked for rebuild, preserving conversation history.
TUI dashboard
az prototype launchopens a fullterminal UI with four panels: scrollable console output (RichLog),
collapsible task tree with async status updates, growable multi-line
prompt (Enter to submit, Shift+Enter for newline), and an info bar
showing assist text and token usage.
from
.prototype/state/files and launches the appropriate session.Users can navigate between design, build, and deploy without exiting.
TUIAdapterconnects synchronous sessions tothe async Textual event loop using
call_from_threadandthreading.Event. Sessions run on worker threads withinput_fnand
print_fnrouted through TUI widgets._maybe_spinneron all four sessions(discovery, build, deploy, backlog) now accepts a
status_fncallbackso the TUI can show progress via the info bar instead of Rich spinners.
/open,/status,/why,/summary,/restart,/help) anddesign stage header now route through
_printwheninput_fn/print_fnare injected, preventing Rich output conflicts in TUI mode.textual>=8.0.0.az prototype designnow opens theTUI dashboard and auto-starts the design session, instead of running
synchronously in the terminal.
--statusremains CLI-only.Artifact paths are resolved to absolute before the TUI takes over.
biz-analyst's AI responses are scanned for
##/###headings(e.g. "Project Context & Scope", "Data & Content") which appear as
collapsible sub-nodes under the Design branch in the task tree.
Duplicate headings are deduplicated by slug.
Natural language intent detection
(discovery, build, deploy, backlog) now accept natural language
instead of slash commands. When an AI provider is available, a
lightweight classification call maps user input to the appropriate
command. Falls back to keyword/regex scoring when AI is unavailable.
"read artifacts from <path>"reads files (PDF, DOCX, PPTX, images, text) during any session and
injects the content into the conversation context.
requires slash commands.
"deploy stage 3","rollback all","deploy stages 3 and 4"are interpreted and executed directly./describe Ncommand in bothbuild and deploy sessions. Natural language variants like
"describe stage 3"or"what's being deployed in stage 2"show detailed resource, file, and status information for a stage.
one-line project summary extracted from discovery state or the
design architecture.
Packaging
__init__.pyto data-only directories — 15 data directories(policies, standards, templates, knowledge, agent definitions) lacked
__init__.py, causing setuptools "Package would be ignored" warningsduring wheel builds. The
templates/directory also contained Pythonmodules (
registry.py,validate.py) that were not included in thewheel. All data directories now have
__init__.pysofind_packages()discovers them correctly.
__pycache__from package discovery —setup.pynowfilters
__pycache__directories fromfind_packages()results toprevent spurious build warnings.