Revert "Simplify which folders are used"
diff --git a/gpt_engineer/db.py b/gpt_engineer/db.py
index 073771cde1..6664a83c2c 100644
--- a/gpt_engineer/db.py
+++ b/gpt_engineer/db.py
@@ -139,3 +139,8 @@ def archive(dbs: DBs) -> None:
     shutil.move(
         str(dbs.memory.path), str(dbs.archive.path / timestamp / dbs.memory.path.name)
     )
+    shutil.move(
+        str(dbs.workspace.path),
+        str(dbs.archive.path / timestamp / dbs.workspace.path.name),
+    )
+    return []
diff --git a/gpt_engineer/main.py b/gpt_engineer/main.py
index 896b5e617e..68ed8807d1 100644
--- a/gpt_engineer/main.py
+++ b/gpt_engineer/main.py
@@ -48,6 +48,12 @@ def main(
 ):
     logging.basicConfig(level=logging.DEBUG if verbose else logging.INFO)
 
+    # For the improve option take current project as path and add .gpteng folder
+    if improve_option:
+        # The default option for the --improve is the IMPROVE_CODE, not DEFAULT
+        if steps_config == StepsConfig.DEFAULT:
+            steps_config = StepsConfig.IMPROVE_CODE
+
     load_env_if_needed()
 
     ai = AI(
@@ -56,11 +62,10 @@ def main(
         azure_endpoint=azure_endpoint,
     )
 
-    path = Path(project_path).absolute()
-    input_path = path
-    workspace_path = path
-    memory_path = path / ".gpteng" / "memory"
-    archive_path = path / ".gpteng" / "archive"
+    input_path = Path(project_path).absolute()
+    memory_path = input_path / "memory"
+    workspace_path = input_path / "workspace"
+    archive_path = input_path / "archive"
 
     dbs = DBs(
         memory=DB(memory_path),
@@ -73,12 +78,6 @@ def main(
         archive=DB(archive_path),
     )
 
-    # For the improve option take current project as path and add .gpteng folder
-    if improve_option:
-        # The default option for the --improve is the IMPROVE_CODE, not DEFAULT
-        if steps_config == StepsConfig.DEFAULT:
-            steps_config = StepsConfig.IMPROVE_CODE
-
     if steps_config not in [
         StepsConfig.EXECUTE_ONLY,
         StepsConfig.USE_FEEDBACK,
diff --git a/tests/steps/test_archive.py b/tests/steps/test_archive.py
index d74eb2deea..ec01f79678 100644
--- a/tests/steps/test_archive.py
+++ b/tests/steps/test_archive.py
@@ -29,11 +29,15 @@ def test_archive(tmp_path, monkeypatch):
     freeze_at(monkeypatch, datetime.datetime(2020, 12, 25, 17, 5, 55))
     archive(dbs)
     assert not os.path.exists(tmp_path / "memory")
+    assert not os.path.exists(tmp_path / "workspace")
     assert os.path.isdir(tmp_path / "archive" / "20201225_170555")
 
-    dbs = setup_dbs(tmp_path, ["memory", "logs", "preprompts", "input", "archive"])
+    dbs = setup_dbs(
+        tmp_path, ["memory", "logs", "preprompts", "input", "workspace", "archive"]
+    )
     freeze_at(monkeypatch, datetime.datetime(2022, 8, 14, 8, 5, 12))
     archive(dbs)
     assert not os.path.exists(tmp_path / "memory")
-    assert os.path.isdir(dbs.archive.path / "20201225_170555")
-    assert os.path.isdir(dbs.archive.path / "20220814_080512")
+    assert not os.path.exists(tmp_path / "workspace")
+    assert os.path.isdir(tmp_path / "archive" / "20201225_170555")
+    assert os.path.isdir(tmp_path / "archive" / "20220814_080512")

Reverts AntonOsika/gpt-engineer#659