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:
@@ -0,0 +1,12 @@
|
||||
All completion criteria verified green. Final report:
|
||||
|
||||
**Phase 23 — final verification pass: all green, no code defects found**
|
||||
- Verified: relative `./header.js` imports in all 4 page scripts; no direct `header.js` script tags in any HTML; Containerfile stage 1 bundles 4 modules + minifies `markdown.js`/`styles.css` + copies all 4 pages; story file + report + logs present
|
||||
- `podman build -f Containerfile .` → green (tag `phase23verify`; layers content-cached from the verified build); log excerpt saved to `.agents/reports/23_containerfile_build/final_verification.log`
|
||||
- Image smoke (throwaway Postgres 17+pgvector, isolated net, torn down): `/`, `/sources.html`, `/document.html`, `/login.html` → 200; all 6 assets → 200, raw `/assets/header.js` → 404 (bundled); `app.js` minified w/ header code; `cdn_violations=0`, `direct_header_script_tags=0` → SMOKE_PASS
|
||||
- `uv run pytest` → 335 passed · `--cov=app` → 335 passed, TOTAL 99% (≥ prior, >90% gate) · `ruff && pyright` → clean
|
||||
- E2E isolated: smoke 3 ✓, shared_header 6 ✓, chat_persistence 4 ✓ · integration isolated: containerfile_assets 6/6 ✓
|
||||
- Commit `d7a4064` exists with the exact phase message, 0 GPG signature lines
|
||||
|
||||
**Notes:** no fixes needed. Two pre-existing unstaged items left untouched by design: task-02 phase-file move (harness-managed) and a new user TODO item in `TODO.md` ("global tuning without a chat") not yet phased.
|
||||
**Next pending phase:** `24_whole_document_context`.
|
||||
@@ -0,0 +1,46 @@
|
||||
........................................................................ [ 21%]
|
||||
........................................................................ [ 42%]
|
||||
........................................................................ [ 64%]
|
||||
........................................................................ [ 85%]
|
||||
............................................... [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 95 0 100%
|
||||
app/api/docs.py 23 0 100%
|
||||
app/api/health.py 10 0 100%
|
||||
app/api/steering.py 33 0 100%
|
||||
app/api/suggestions.py 8 0 100%
|
||||
app/config.py 56 0 100%
|
||||
app/core/__init__.py 0 0 100%
|
||||
app/core/auth.py 20 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 36 0 100%
|
||||
app/models.py 46 0 100%
|
||||
app/rag/__init__.py 0 0 100%
|
||||
app/rag/chunker.py 206 4 98%
|
||||
app/rag/importer.py 150 5 97%
|
||||
app/rag/llm.py 105 0 100%
|
||||
app/rag/prompts.py 44 0 100%
|
||||
app/rag/retriever.py 102 3 97%
|
||||
app/rag/suggestions.py 27 0 100%
|
||||
app/schemas.py 62 0 100%
|
||||
--------------------------------------------
|
||||
TOTAL 1109 14 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
Task 01 complete — all gates green.
|
||||
|
||||
**Implemented**
|
||||
- Root cause fixed: `frontend/assets/{app,sources,document,login}.js` now `import … from "./header.js"` (relative, owner-confirmed)
|
||||
- Removed the four redundant direct `<script src="/assets/header.js">` tags + updated load-order comments in all four HTML pages (single-evaluation design)
|
||||
- `Containerfile` stage 1: global `npm install -g esbuild@0.25.5` (local install left the binary off `RUN`'s PATH — second, previously unrecorded build blocker: `esbuild: not found`) + bundles all 4 page modules, minifies `markdown.js` (no `--bundle`) and `styles.css`, copies all 4 HTML pages
|
||||
- Updated 4 phase-19 unit tests in `tests/unit/test_shared_header.py` that pinned the removed tag-based design; now pin the relative-import/no-tag contract
|
||||
|
||||
**Verification (exact commands)**
|
||||
- `podman build -t brain-of-reese/app:phase23test -f Containerfile .` → exit 0 (before/after logs in `.agents/reports/23_containerfile_build/`)
|
||||
- Image smoke vs throwaway pg17+pgvector: all 4 pages + 6 assets → 200; raw `/assets/header.js` → 404; bundles contain header code; 0 CDN refs → `SMOKE_PASS` (teardown done)
|
||||
- Dev server: 4 pages 200, 0 header.js tags; `uv run pytest tests/e2e/test_smoke.py -v --no-cov` → 3 passed; `test_shared_header.py` → 6 passed; `test_chat_persistence.py` → 4 passed
|
||||
- `uv run pytest --cov=app --cov-report=term-missing` → 329 passed, 99% coverage; `uv run ruff check . && uv run pyright` → clean
|
||||
|
||||
**Decisions**: image tag `brain-of-reese/app:phase23test` kept as build evidence; pre-existing uncommitted TODO.md/phase-22-move changes left untouched (task 02's add-list excludes TODO.md).
|
||||
|
||||
**Next pending task**: `.agents/phases/todo/23_containerfile_build/02_integration_test_commit.md`
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
........................................................................ [ 21%]
|
||||
........................................................................ [ 43%]
|
||||
........................................................................ [ 65%]
|
||||
........................................................................ [ 87%]
|
||||
......................................... [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 95 0 100%
|
||||
app/api/docs.py 23 0 100%
|
||||
app/api/health.py 10 0 100%
|
||||
app/api/steering.py 33 0 100%
|
||||
app/api/suggestions.py 8 0 100%
|
||||
app/config.py 56 0 100%
|
||||
app/core/__init__.py 0 0 100%
|
||||
app/core/auth.py 20 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 36 0 100%
|
||||
app/models.py 46 0 100%
|
||||
app/rag/__init__.py 0 0 100%
|
||||
app/rag/chunker.py 206 4 98%
|
||||
app/rag/importer.py 150 5 97%
|
||||
app/rag/llm.py 105 0 100%
|
||||
app/rag/prompts.py 44 0 100%
|
||||
app/rag/retriever.py 102 3 97%
|
||||
app/rag/suggestions.py 27 0 100%
|
||||
app/schemas.py 62 0 100%
|
||||
--------------------------------------------
|
||||
TOTAL 1109 14 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
Everything is green. Final report:
|
||||
|
||||
**Phase 23 · Task 02 — complete**
|
||||
|
||||
- **`tests/integration/test_containerfile_assets.py`** (new, hermetic — text-only, no podman/network/DB): 6 pins — stage-1 `cp` set == pages on disk; every local `assets/` src/href has a stage-1 producer; HTML module set == esbuild `--bundle` inputs; no direct `header.js` tag + relative `from "./header.js"` in all four page scripts; `markdown.js` minified without `--bundle` and module-syntax-free in source; concrete `esbuild@X.Y.Z` pin. Mutation-checked: 5 induced regressions each fail the right test(s).
|
||||
- **`.agents/user_stories/containerfile-build.md`** (story, repo format, verbatim TODO L6 bug + diagnosis + A4 decisions + test mapping) and **`.agents/reports/23_containerfile_build/phase_report.md`** (build log excerpt, `SMOKE_PASS` evidence, regression/coverage results) written and force-added.
|
||||
- **Results:** `uv run pytest` → 335 passed (329→335); `--cov=app` → TOTAL 99% (≥ today's 99%, >90% gate); E2E isolated: `test_smoke.py` 3 passed, `test_shared_header.py` 6 passed, `test_chat_persistence.py` 4 passed (logs in reports dir); `ruff check .` + `pyright` → clean.
|
||||
- **Commit:** `d7a4064` `fix(build): Containerfile builds again — relative module imports, all four pages and shared assets in the image` (`--no-gpg-sign`; includes task-01's Containerfile/frontend/test changes + story + report + task-01 file moved to `complete/`).
|
||||
- **Notes:** phase-directory move left to the harness (executor rule); `git add -A .agents/` needed `-u` + targeted `-f` (`.agents/` gitignored); pre-existing `TODO.md` mod left uncommitted per task add-list.
|
||||
|
||||
**Next pending task:** `.agents/phases/todo/24_whole_document_context/01_remove_context_cap.md`
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
........................................................................ [ 21%]
|
||||
........................................................................ [ 42%]
|
||||
........................................................................ [ 64%]
|
||||
........................................................................ [ 85%]
|
||||
............................................... [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 95 0 100%
|
||||
app/api/docs.py 23 0 100%
|
||||
app/api/health.py 10 0 100%
|
||||
app/api/steering.py 33 0 100%
|
||||
app/api/suggestions.py 8 0 100%
|
||||
app/config.py 56 0 100%
|
||||
app/core/__init__.py 0 0 100%
|
||||
app/core/auth.py 20 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 36 0 100%
|
||||
app/models.py 46 0 100%
|
||||
app/rag/__init__.py 0 0 100%
|
||||
app/rag/chunker.py 206 4 98%
|
||||
app/rag/importer.py 150 5 97%
|
||||
app/rag/llm.py 105 0 100%
|
||||
app/rag/prompts.py 44 0 100%
|
||||
app/rag/retriever.py 102 3 97%
|
||||
app/rag/suggestions.py 27 0 100%
|
||||
app/schemas.py 62 0 100%
|
||||
--------------------------------------------
|
||||
TOTAL 1109 14 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
Reference in New Issue
Block a user