feat: TASK-113 - add CSV/Excel B2B wholesale price list export capability

This commit is contained in:
parsa aghaei committed 2026-07-26 15:24:01 +03:30
1 parent 201aebd2f5
commit 7e17f6840c
8 files changed
+151 -154

No files matched your search

+26 -7
View File
@@ -70,6 +70,17 @@ def get_next_pending_task():
return task
return None
def is_backlog_sufficient():
backlog = load_json(BACKLOG_FILE)
state = load_json(STATE_FILE)
total_tasks = len(backlog.get("tasks", []))
minimum_expected = state.get("context_buffer", {}).get("minimum_expected_tasks", 3)
decomposition_pass = state.get("checkpoint", {}).get("decomposition_pass", 0)
max_passes = state.get("checkpoint", {}).get("max_decomposition_passes", 3)
if decomposition_pass >= max_passes:
return True
return total_tasks >= minimum_expected
def mark_task_complete(ticket_id):
backlog = load_json(BACKLOG_FILE)
for task in backlog.get("tasks", []):
@@ -93,7 +104,9 @@ def main():
"active_agent": "00_auditor" if is_brownfield() else "01_ceo",
"current_ticket_id": None,
"sub_step_index": 0,
"total_sub_steps": 0
"total_sub_steps": 0,
"decomposition_pass": 0,
"max_decomposition_passes": 3
},
"execution_guards": {
"retry_count": 0,
@@ -106,7 +119,8 @@ def main():
"last_healthy_commit": None
},
"context_buffer": {
"last_agent_summary": "System initialized."
"last_agent_summary": "System initialized.",
"minimum_expected_tasks": 3
},
"last_updated": datetime.now().isoformat()
}
@@ -156,12 +170,17 @@ def main():
elif active_agent == "02_product_manager":
next_agent = "03_architect"
elif active_agent == "03_architect":
next_task = get_next_pending_task()
if next_task:
state["checkpoint"]["current_ticket_id"] = next_task["id"]
next_agent = next_task.get("assigned_role", "04_dev_backend")
state["checkpoint"]["decomposition_pass"] += 1
if not is_backlog_sufficient():
print(f"[DECOMPOSITION] Pass {state['checkpoint']['decomposition_pass']}: backlog too sparse. Re-invoking 02_product_manager for deeper decomposition.")
next_agent = "02_product_manager"
else:
next_agent = "09_tech_writer"
next_task = get_next_pending_task()
if next_task:
state["checkpoint"]["current_ticket_id"] = next_task["id"]
next_agent = next_task.get("assigned_role", "04_dev_backend")
else:
next_agent = "09_tech_writer"
elif active_agent in ["04_dev_backend", "05_dev_frontend"]:
handle_git_commit(current_ticket, f"Work in progress by {active_agent}", is_wip=True)