I will list the files in the repository to locate any test directories and run the existing test suite to see if there are tests covering the summary command or prompts.
### CLAUDE.md
VERDICT: PASS
CORRECTNESS: VALID
SPEC_COMPLIANCE: N/A
ISSUE_COMPLIANCE: N/A
BELIEF_COMPLIANCE: N/A
TEST_COVERAGE: N/A
INTEGRATION: N/A
REASONING: Adds a standard development guide containing setup instructions (`uv sync`) and a clear workflow for resolving/reviewing issues. Extremely helpful addition for developers.
---

### ftl_project_expert/cli.py:summary
VERDICT: CONCERN
CORRECTNESS: QUESTIONABLE
SPEC_COMPLIANCE: N/A
ISSUE_COMPLIANCE: ADDRESSES
BELIEF_COMPLIANCE: N/A
TEST_COVERAGE: UNTESTED
INTEGRATION: WIRED
REASONING:
- **Issue Addressed**: The change successfully limits the summarized beliefs to `max_beliefs = 500` and adds sorting/filtering (`--status IN --by-impact`) when reading from the reasons database. This directly prevents massive prompts from crashing the LLM CLI.
- **Header Splitting Bug**: When parsing `beliefs.md`, `re.split(r"(?=^### \S+)", full_text, flags=re.MULTILINE)` splits the markdown text. If the file contains an introductory header before the first `###` section (such as `# Project Beliefs`), that introduction is returned as the first element in the split. Because `sections = [s for s in sections if s.strip()]` only filters out empty/whitespace strings, the introduction header is counted as a belief and included in `belief_count` and `total_count`. If `max_beliefs` were set to `1`, the summary would analyze only the introduction header instead of any actual beliefs.
  - *Recommendation*: Filter sections to ensure they represent actual belief headers:
    ```python
    sections = [s for s in sections if s.strip().startswith("###")]
    ```
- **Test Coverage**: No unit or integration tests were added to verify the truncation logic, handling of empty/missing database/files, or the new cli flags.
---

### ftl_project_expert/prompts/summary.py:build_summary_prompt
VERDICT: PASS
CORRECTNESS: VALID
SPEC_COMPLIANCE: N/A
ISSUE_COMPLIANCE: ADDRESSES
BELIEF_COMPLIANCE: N/A
TEST_COVERAGE: UNTESTED
INTEGRATION: WIRED
REASONING:
- **Signature & Backward-Compatibility**: The function signature has been cleanly updated with an optional `total_count: int = 0` parameter.
- **Minor Prompt Inaccuracy**: When summarizing from `beliefs.md`, the beliefs are parsed in file order, but the prompt hardcodes `(top by impact out of {total_count} total)`. While minor, this is slightly inaccurate when `sorted_by_impact` is `False`. Passing an extra descriptor or simplifying the prompt line to `(top {belief_count} out of {total_count} total)` would be more precise.
---

### SELF_REVIEW
LIMITATIONS:
- Could not execute the test suite or list workspace files using shell commands due to environment policy constraints, relying strictly on static analysis of the provided code changes and search results.
- No test files were included in the diff, preventing confirmation of whether any existing tests were broken by the change in the prompt builder's signature or behavior.
---

### FEATURE_REQUESTS
- Include existing test files (or a list of matching test cases) in the automated observation results to make it easier to verify if existing test files require updates.
---
