### ftl_code_expert/cli.py:analyze
VERDICT: CONCERN
CORRECTNESS: QUESTIONABLE
SPEC_COMPLIANCE: N/A
ISSUE_COMPLIANCE: N/A
BELIEF_COMPLIANCE: N/A
TEST_COVERAGE: UNTESTED
INTEGRATION: WIRED
REASONING:
The new `analyze` command is a convenient pipeline wrapper that automates the entire bootstrap, exploration, belief extraction, derivation, and summary generation flow from scratch. It is clean and well-structured, mirroring the existing `update` command's robust error-handling style and sequential step execution. However, several correctness and integration concerns exist:

1. **Path Resolution & Directory Mismatch**:
   - The command sets `ctx.obj["repo"] = os.path.abspath(repo_path)` and resolves `project_dir` using `_get_project_dir(ctx)`, which points to `{repo_path}/.code-expert`.
   - However, the `init` command bootstraps the project directory and `config.json` relative to `Path.cwd()` (i.e., `./.code-expert`), and `propose_beliefs` searches for `Path("entries")` relative to `Path.cwd()`.
   - If `code-expert analyze ~/git/my-project` is run from any directory other than `~/git/my-project`, the metadata will be fragmented: `config.json` and the `entries/` directory will be created in the current working directory, whereas `topics.json` will be saved under the target repository's `.code-expert` directory. This will cause subsequent steps to look in the wrong folders or fail to find expected inputs.

2. **Exploration Limit Calculation (`--limit 0`)**:
   - The command calculates `explore_limit = limit if limit > 0 else pending_count(project_dir)`.
   - When `--limit 0` ("no cap") is passed, this snapshots the pending topics queue count right after `scan`. However, during file exploration in Step 3, the model can dynamically discover and enqueue new sub-topics (e.g., functions, nested files). Since `explore_limit` is passed as a static number to `explore` (`loop_max=explore_limit`), the command will stop exploring once the initial queue is exhausted, rather than truly exploring "without cap" until the queue is fully depleted.

3. **Untested Execution**:
   - There are no automated unit or integration tests for the `analyze` command, and there is no active test framework/suite currently configured in the workspace to cover CLI integration flows.

---

### SELF_REVIEW
LIMITATIONS:
- Could not run or verify the CLI command directly as no mock repository or test harness was available in the workspace to perform end-to-end testing.
- The external commands/CLIs (`entry`, `reasons`, and `beliefs`) are assumed to behave as described, but their implementation details or path expectations (such as how they handle relative versus absolute paths) were not fully visible.

---

### FEATURE_REQUESTS
- Include mock git repository setups or a standard test workspace to allow running and dry-running end-to-end integration tests of CLI commands.
- Provide a tool to inspect the behavior of external CLI tools (like `entry` or `reasons`) to verify directory/file-handling consistency across boundaries.
