refactor(agents): migrate .agent/ planning tree to .agents/

Standardize on the .agents/ directory (shared with project skills):
phases/, user_stories/, reports/, screenshots/, validate.sh, and
phase-sessions/ + pipeline.log all move to .agents/ (git mv preserves
history; runtime artifacts move alongside).

Updates every reference in AGENTS.md, README.md, .gitignore, app
docstrings, and test story headers. Historical KB content in data/
and the runtime pipeline.log transcript are left untouched.
This commit is contained in:
2026-09-05 10:57:07 -04:00
parent 766702c750
commit dbf2af26c6
1118 changed files with 664 additions and 664 deletions
@@ -0,0 +1,21 @@
All criteria verified — no defects found. Final report:
## Phase 42 — No reply autoscroll: final verification pass — GREEN
- Verified (no code changes needed): `app.js` gate removed — no `NEAR_BOTTOM_PX`/`isNearBottom`; `scrollReveal` is the single unconditional (reduced-motion-aware) scroll call; thinking/tool/delta + typing paths are scroll-free; submit-reveal and one-shot restore landing kept; unit pin rewritten; phase-18 E2E deleted, replaced by `test_no_reply_autoscroll.py`.
- `uv run pytest --cov=app --cov-report=term-missing` → 723 passed; TOTAL 99% (>90%, `app/` untouched by phase commit, so unchanged).
- `uv run ruff check . && uv run pyright` → All checks passed; 0 errors.
- `uv run pytest tests/e2e/test_no_reply_autoscroll.py -v --no-cov` (isolated, DB up) → 5/5 passed (78.9s).
- Regression suites, each isolated: `test_chat_rag` 3/3, `test_thinking_display` 5/5, `test_chat_persistence` 4/4, `test_long_answers` 2/2, `test_smoke` 3/3.
**Completion criteria:**
1. scrollY stable ±1px during streaming (viewport up) — ✅ (E2E tests 1–2)
2. Submit reveals message; reload lands one-shot — ✅ (E2E tests 3–4)
3. pytest green, coverage TOTAL unchanged — ✅ (723 passed, 99%)
4. Phase E2E green in isolation — ✅
5. 5 regression E2E suites green in isolation — ✅
6. ruff + pyright clean — ✅
7. One `--no-gpg-sign` commit, phase in `complete/` — ✅ (`7c67633 fix(chat): …`, no GPG sig, frontend/tests only; task files in `complete/42_no_reply_autoscroll/`)
- **Deviations:** none. Overview stays in `todo/` for the harness to move. Pre-existing untracked `NOTES.md` left as-is (not part of phase 42).
- **Next pending phase:** `43_thinking_scroll_back`
@@ -0,0 +1,60 @@
........................................................................ [ 9%]
........................................................................ [ 19%]
........................................................................ [ 29%]
........................................................................ [ 39%]
........................................................................ [ 49%]
........................................................................ [ 59%]
........................................................................ [ 69%]
........................................................................ [ 79%]
........................................................................ [ 89%]
........................................................................ [ 99%]
... [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 122 0 100%
app/api/config.py 7 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 66 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 81 0 100%
app/config.py 66 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 44 0 100%
app/models.py 60 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 81 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 186 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 65 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 99 0 100%
--------------------------------------------
TOTAL 1767 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK
@@ -0,0 +1,19 @@
Task 01 complete. Report:
**Implemented**
- `frontend/assets/app.js`: deleted `NEAR_BOTTOM_PX` + `isNearBottom()`; `scrollReveal` is now an unconditional `scrollIntoView({behavior, block:"end"})` (single call in file, no `force`); `addMessage(who, html, scroll=false)` — submit passes `true` (reveal kept), restore landing passes `true` (one-shot kept), brain bubbles/typing never scroll; thinking/tool/delta branches dropped their `scrollReveal` calls (thinking block keeps its internal `textEl.scrollTop` pin — phase 17); docstrings updated to the phase-42 contract.
- `tests/unit/test_frontend_scroll.py`: rewritten — 9 pins for the new contract (gate absent, helper unconditional, explicit scroll intent, streaming handlers scroll-free, restore one-shot, reduced-motion `SCROLL` intact, preventScroll focus-back).
- `tests/unit/test_chat_persistence.py`: restore pin updated from old `"auto", true` signature to `true` (direct consequence of the new `addMessage` signature).
**Test / lint / coverage**
- `uv run pytest --cov=app --cov-report=term-missing` → 723 passed, app/ TOTAL **99%** (unchanged; no `app/` code touched)
- `uv run ruff check .` → All checks passed
- `uv run pyright` → 0 errors, 0 warnings
- JS syntax verified via `node --check` (ES module)
**Decisions**
- New `addMessage` has no per-call behavior override, so the restore landing rides default `SCROLL` (smooth) instead of old forced `"auto"` — the task-sanctioned option, noted in the call-site comment.
- Kept `block: "end"` on the single `scrollIntoView` to preserve reveal/landing semantics.
- `tests/e2e/test_follow_bottom_scroll.py` left in place — replaced/deleted by task 02.
**Next pending task:** `42_no_reply_autoscroll/02_no_autoscroll_e2e_and_commit.md`
@@ -0,0 +1,60 @@
........................................................................ [ 9%]
........................................................................ [ 19%]
........................................................................ [ 29%]
........................................................................ [ 39%]
........................................................................ [ 49%]
........................................................................ [ 59%]
........................................................................ [ 69%]
........................................................................ [ 79%]
........................................................................ [ 89%]
........................................................................ [ 99%]
... [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 122 0 100%
app/api/config.py 7 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 66 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 81 0 100%
app/config.py 66 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 44 0 100%
app/models.py 60 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 81 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 186 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 65 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 99 0 100%
--------------------------------------------
TOTAL 1767 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK
@@ -0,0 +1,10 @@
Done. Commit `7c67633` landed; repo is functional (only pending items are the harness-managed `.agents` task-file moves and the owner's untracked `NOTES.md`, both left untouched per protocol).
**Report**
- **Implemented:** `tests/e2e/test_no_reply_autoscroll.py` (5 tests: no autoscroll during long answer with ≥10 samples at 1px tolerance incl. post-`done`; no autoscroll during the ~4.5s thinking stream; submit-from-top reveals the user message via JS send so Playwright's fill auto-scroll can't pre-move the viewport; one-shot restore landing that lands and stays; long answer + sources and collapsed thinking block persist/restore). Deleted `tests/e2e/test_follow_bottom_scroll.py`. Task 01's `app.js` + unit-pin changes (already in working tree) were verified and committed together.
- **E2E (isolation, DB up):** `uv run pytest tests/e2e/test_no_reply_autoscroll.py -v --no-cov` → **5 passed** (79s). Regressions: `test_chat_rag` 3/3, `test_thinking_display` 5/5, `test_chat_persistence` 4/4, `test_long_answers` 2/2, `test_smoke` 3/3.
- **Unit+integration:** `uv run pytest --cov=app --cov-report=term-missing` → **723 passed**, TOTAL **99%** (unchanged, >90%).
- **Lint/types:** `uv run ruff check .` clean; `uv run pyright` → 0 errors.
- **Commit:** one atomic `--no-gpg-sign` Conventional Commit `fix(chat): stop autoscrolling while a reply streams (owner direction)` — 5 code files; `.agents/` moves stay harness-managed (matches phase-41 precedent).
- **Notable:** restore-landing asserts latest bubble in lower viewport half (not exact bottom) because source chips append after the smooth scroll call; "last brain bubble" predicates guard `min_bubbles=2` so a second turn's pre-delta window can't match turn 1's bubble.
- **Next pending task:** none in `todo/42_no_reply_autoscroll/` (task 02 was the last); the harness will move it to `complete/`.
@@ -0,0 +1,60 @@
........................................................................ [ 9%]
........................................................................ [ 19%]
........................................................................ [ 29%]
........................................................................ [ 39%]
........................................................................ [ 49%]
........................................................................ [ 59%]
........................................................................ [ 69%]
........................................................................ [ 79%]
........................................................................ [ 89%]
........................................................................ [ 99%]
... [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 122 0 100%
app/api/config.py 7 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 66 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 81 0 100%
app/config.py 66 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 44 0 100%
app/models.py 60 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 81 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 186 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 65 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 99 0 100%
--------------------------------------------
TOTAL 1767 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK