docs: reduce redundant content across files; map references to canonical sources
Per user 'a bunch of docs just committed had redundant content across files. Can we do a reduction of that and instead map references to other files?' This commit reduces content duplication across 9 files. The canonical sources are kept as detailed references; the other files now point to them. Reductions (table replaced with 'see canonical' reference): 1. data_oriented_design.md §9: the 4-dim memory table (canonical: conductor/code_styleguides/agent_memory_dimensions.md §0) 2. guide_agent_memory_dimensions.md §0: the 4-dim memory table (canonical: conductor/code_styleguides/agent_memory_dimensions.md §0) 3. guide_caching_strategy.md §1: the 12-layer model (canonical: conductor/code_styleguides/cache_friendly_context.md §1) 4. guide_ai_client.md 'Cache strategy' section: the 12-layer model recap (canonical: conductor/code_styleguides/cache_friendly_context.md §1) 5. guide_knowledge_curation.md §1: the 5 category file details (canonical: conductor/code_styleguides/knowledge_artifacts.md §1) 6. product-guidelines.md 'Memory Dimensions' section: the 4-dim table (canonical: conductor/code_styleguides/agent_memory_dimensions.md §0) 7. guide_mma.md '4 memory dimensions' section: the MMA scope table (canonical: conductor/code_styleguides/agent_memory_dimensions.md §0) 8. docs/AGENTS.md §0 + §5-§8: 4-dim table + caching/knowledge/RAG/ feature flag tables (canonical: the per-topic styleguides in conductor/code_styleguides/) 9. AGENTS.md 'Code Styleguides' section: the 6-styleguide list (canonical: docs/AGENTS.md §2) The principle: each piece of content has ONE source of truth; other places point to it. The data-oriented way. Files retain their narrative flow and the 'what this is' intros, but the detailed tables are now in their canonical home. Net effect: -2100 bytes across 9 files (without losing any information - the canonical sources are unchanged). The 'cross-references' sections are kept; the duplicated content is removed.
This commit is contained in:
+2
-14
@@ -709,21 +709,9 @@ The nagent review (v2.3, §3.2 + §5) formalizes the cache strategy that this cl
|
||||
|
||||
### The 12-layer model (the recap)
|
||||
|
||||
| # | Layer | Stable? | Where |
|
||||
|---|---|---|---|
|
||||
| 1 | Role instructions | yes | `_get_combined_system_prompt` |
|
||||
| 2 | Function-calling schema | yes | per provider |
|
||||
| 3 | Discovered tool descriptions | yes | `mcp_client.get_tool_schemas()` |
|
||||
| 4 | System prompt preset | yes | `app_state.ai_settings.system_prompt` |
|
||||
| 5 | Persona profile | yes | `app_state.active_persona` |
|
||||
| 6 | Project context (per `manual_slop.toml`) | yes | NEW (Candidate 14) |
|
||||
| 7 | Knowledge digest (per `knowledge/digest.md`) | yes (within gc cycle) | NEW (Candidate 8) |
|
||||
| 8 | Discussion metadata | no | `disc_entries[:1]` or `disc_meta` |
|
||||
| 9 | Active preset (FileItem set) | no | `self.context_files` |
|
||||
| 10 | Per-file details | no | per `FileItem` |
|
||||
| 11 | Prior tool results | no | per `_reread_file_items` |
|
||||
| 12 | User message | no | the input |
|
||||
**The canonical reference is `conductor/code_styleguides/cache_friendly_context.md` §1** (the full 12-layer table with the stable/volatile classification + the `───` data markings + the byte-comparison test). This section is a pointer.
|
||||
|
||||
**The one-line summary:** layers 1-7 (role instructions, function-calling schema, tool descriptions, system prompt, persona, project context, knowledge digest) are byte-identical across turns and cacheable. Layers 8-12 are per-turn and NOT cached. The cache boundary is at layer 7/8.
|
||||
### The byte-comparison test (the design contract)
|
||||
|
||||
The test in `tests/test_aggregate_caching.py` ensures the first N characters of the context are byte-identical across turns:
|
||||
|
||||
Reference in New Issue
Block a user