fix(cli): agents init output displays incorrect filenames and claims non-existent directories #3904

Open
opened 2026-04-06 07:19:57 +00:00 by hurui200320 · 0 comments
Member

Metadata

  • Commit Message: fix(cli): agents init output displays incorrect filenames and claims non-existent directories
  • Branch: fix/init-output-mismatch

Background

During manual build-and-exercise testing of CleverAgents 1.0.0, agents init --yes was run in a fresh project directory. The command completed successfully and created the .cleveragents/ directory with a working database, but the output displayed to the user contains several factual inaccuracies about what was actually created on disk.

Current Behavior

Running agents init --yes in /tmp/test-project produces:

╭──────────────────── Initialized ────────────────────╮
│ Data Dir: /tmp/test-project/.cleveragents (created)  │
│ Config: /tmp/test-project/.cleveragents/config.toml  │
│ Database: initialized (schema v3)                    │
│ Directories: logs, cache, sessions, contexts         │
╰──────────────────────────────────────────────────────╯

But the actual files created are:

  • config.yaml (NOT config.toml as stated)
  • db.sqlite (NOT cleveragents.db as the spec implies)
  • project.name (not mentioned in output)
  • current (not mentioned in output)
  • No logs/, cache/, sessions/, or contexts/ directories are created

Expected Behavior

The init output should accurately reflect what was actually created. Either:

  1. Fix the output to match the actual files (show config.yaml, db.sqlite), or
  2. Fix the implementation to create what the output claims (create config.toml, create logs/, cache/, sessions/, contexts/ directories)

Per the specification (line 1246-1269), the expected files are config.toml and cleveragents.db, with directories logs/, cache/, and backups/.

  • #3645 (data_dir default is relative instead of ~/.cleveragents)
  • #3660 (diagnostics defaults to wrong config path)

Subtasks

  • Audit init_command() in src/cleveragents/cli/commands/project.py and project_service.initialize_project() to determine ground truth
  • Align init output messages with actual created files
  • Align file names with specification (config.toml vs config.yaml, cleveragents.db vs db.sqlite)
  • Create the promised directories (logs/, cache/, sessions/, contexts/) or remove them from the output
  • Tests (Behave): Update/add scenarios for init output accuracy
  • Tests (Robot): Add integration test verifying init creates expected files
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
## Metadata - **Commit Message**: `fix(cli): agents init output displays incorrect filenames and claims non-existent directories` - **Branch**: `fix/init-output-mismatch` ## Background During manual build-and-exercise testing of CleverAgents 1.0.0, `agents init --yes` was run in a fresh project directory. The command completed successfully and created the `.cleveragents/` directory with a working database, but the output displayed to the user contains several factual inaccuracies about what was actually created on disk. ## Current Behavior Running `agents init --yes` in `/tmp/test-project` produces: ``` ╭──────────────────── Initialized ────────────────────╮ │ Data Dir: /tmp/test-project/.cleveragents (created) │ │ Config: /tmp/test-project/.cleveragents/config.toml │ │ Database: initialized (schema v3) │ │ Directories: logs, cache, sessions, contexts │ ╰──────────────────────────────────────────────────────╯ ``` But the actual files created are: - `config.yaml` (NOT `config.toml` as stated) - `db.sqlite` (NOT `cleveragents.db` as the spec implies) - `project.name` (not mentioned in output) - `current` (not mentioned in output) - **No** `logs/`, `cache/`, `sessions/`, or `contexts/` directories are created ## Expected Behavior The init output should accurately reflect what was actually created. Either: 1. Fix the output to match the actual files (show `config.yaml`, `db.sqlite`), or 2. Fix the implementation to create what the output claims (create `config.toml`, create `logs/`, `cache/`, `sessions/`, `contexts/` directories) Per the specification (line 1246-1269), the expected files are `config.toml` and `cleveragents.db`, with directories `logs/`, `cache/`, and `backups/`. ## Related Issues - #3645 (data_dir default is relative instead of ~/.cleveragents) - #3660 (diagnostics defaults to wrong config path) ## Subtasks - [ ] Audit `init_command()` in `src/cleveragents/cli/commands/project.py` and `project_service.initialize_project()` to determine ground truth - [ ] Align init output messages with actual created files - [ ] Align file names with specification (config.toml vs config.yaml, cleveragents.db vs db.sqlite) - [ ] Create the promised directories (logs/, cache/, sessions/, contexts/) or remove them from the output - [ ] Tests (Behave): Update/add scenarios for init output accuracy - [ ] Tests (Robot): Add integration test verifying init creates expected files - [ ] Verify coverage >=97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#3904
No description provided.