From aecf3b07d7e4bbf39420eba7c78cb2a4f614d874 Mon Sep 17 00:00:00 2001 From: CodeWhale Bot Date: Sun, 1 Nov 2026 22:46:50 -0800 Subject: [PATCH] docs: align repository guidance with extracted Engine and Next [skip ci] Finish inherited guidance changes: point the existing sole prompt, turn-loop and remember references at the extracted Engine. Preserve the Next.js guidance generated by the installed version rather than leaving its ordinary dev-server write dirty. Verified all three Engine paths exist and the complete generated Next block matches the unescaped template in web/node_modules/next/dist/server/lib/generate-agent-files.js; git diff --check passed. Documentation only; no tests or builds repeated. Root CW operator controls were not copied. --- AGENTS.md | 8 ++++---- web/AGENTS.md | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 584bc6cd0..0badbc46d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -169,11 +169,11 @@ casually it reads as taking the work even when credit is preserved. - The model-facing subagent tool is `agent`; `agent_open`/`agent_eval`/ `agent_close`/`delegate_to_agent` are removed surfaces. If the shape must move, move the code and its existing guard test with it. -- `BASE_PROMPT` in `crates/tui/src/prompts/text.rs` is the sole base prompt +- `BASE_PROMPT` in `crates/engine/src/prompts/text.rs` is the sole base prompt by convention. Same rule: move the code, not the prose, if that changes. - There is exactly one turn loop: `Engine::run_turn` in - `crates/tui/src/core/engine/turn_loop.rs`. Note that `crates/tui/src/core/` - is a module inside the TUI crate — it is not `crates/core`, which owns + `crates/engine/src/core/engine/turn_loop.rs`. Note that `crates/engine/src/core/` + is a module inside the engine crate (`codewhale-engine`) — it is not `crates/core`, which owns request construction, bounded fragments, and thread/session types and runs no turns. A guard test (`crates/core/tests/single_turn_loop.rs`) fails on a second loop; changing the shape means changing the guard @@ -184,7 +184,7 @@ casually it reads as taking the work even when credit is preserved. volatile fact into the prefix; append it as a user-role message. - These active modules are repeatedly misidentified as dead; verify consumers before removal: `runtime/src/context_budget.rs`, - `runtime/src/prompt_zones.rs`, `tui/src/tools/remember.rs`, and + `runtime/src/prompt_zones.rs`, `engine/src/tools/remember.rs`, and `config/src/route/`. Native memory lives in `runtime/src/native_memory.rs`; `tools/remember.rs` is its capture path. - Environment-specific behavior belongs in `docs/ENVIRONMENTS.md`, not here. diff --git a/web/AGENTS.md b/web/AGENTS.md index 715102003..24e1e5d0b 100644 --- a/web/AGENTS.md +++ b/web/AGENTS.md @@ -40,3 +40,13 @@ npm test npm run lint npm run build ``` + + + +## This is NOT the Next.js you know + +This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. + +This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. + +