Documentation Maintenance
This site holds the approved target architecture and recommended workflows. Describe behavior, boundaries, and outcomes directly. Keep design rationale and decision history in ADRs and issues. Label approved behavior that awaits implementation and verify deployment availability separately.
The guides, lessons, walkthroughs, and source links were last reviewed against application source 4376b27f, which follows release v2.9.2 and includes the memory-pack removal, using contract dense-mem.v2.8.0. That review does not establish live deployment or publication status.
Implementation Status
| Subject | Source behavior | Availability boundary |
|---|---|---|
| Remember and tool progress | Synchronous terminal outcomes. Every tool can send optional bounded progress notifications. | Implemented in the reviewed source; client presentation depends on the host. |
| Evidence-only cutover | Migration 20261110010000 resets derived organization and retains Evidence for subsequent maintenance. | Performed by released v2.8.0. The current application requires it on an existing database and refuses to start without it; see cutover and rebuild. |
| Staging deployment | The selected image performs migrations before read-only verification and startup. | Requires the manually installed host helper; live installation and deployment were not inspected in this audit. |
| PostgreSQL load reduction | Statement-scoped space policies, single search-document writes, per-space erasure hold checks with lease renewal, ordered Topic maintenance locks, slow-query summaries, batched operation-log writes, Compose server tuning, and the load diagnostics in Telemetry. | Introduced by application change #882, merged at revision f786f02390fb3c04bbb720187ac4c295932c65ee and released in v2.9.2. Migrations 20261129020000 to 20261129020003 need an offline upgrade; see the Operations Runbook. Check the deployed image revision. |
| Built-in MCP OAuth | Built-in authorization server, named /mcp/c/<name> connections, Connected apps, control OAuth status and connections, and OAuth diagnostics. | Introduced by application change #875, merged at revision 1e626fb8ca0be3eb15f4a3fd032e98816b84d5c2 and released in v2.9.2. Check the deployed image revision. The follow-up fixes in the pending application change #885 at revision f3d1e041cdca04388c6968cd8dc44d4836e84115 narrow base paths, tighten request validation, close grant lifecycle races, and keep grant lists consistent. They are not available in an image until that change merges and a release includes it; see the base path upgrade check. |
| Memory pack removal | The contract defines six tools, and tools/list no longer lists export_memory_pack. The dense-mem.memory-pack.v3.0 artifact is removed; calling the tool returns JSON-RPC -32601. trace_memory reads provenance for one Evidence ID per call. The MCP prompt export_memory_as_agent_skill is removed with it, and the server no longer advertises the prompts capability. | Removed by application change #891, merged at revision 4376b27fa6c2d650645df0caff3fe1b63d7c02b6; not in a release at this review. Released v2.9.2 still exposes the tool. Check the deployed image revision and authenticated tools/list. |
| Portal and Grafana audit | Complete team, credential, and IP-ban lists; lighter portal polling; cached, compressed portal assets and unframeable portal pages; embedding error panels that count every code; and the Topic maintenance batch and lock-wait metrics in Telemetry. | Proposed in the pending application change #894 at revision 1ad5474c2c8b8d023c3d9377e1fe39be8b4b6045. Not available in an image until that change merges and a release includes it. Check the deployed image revision. |
Source implementation does not establish the state of a deployed image or database. ADR 0001 governs terminal MCP outcomes; ADR 0017 defines the Evidence-only boundary. Detailed verification receipts remain with the linked changes: Remember progress, organization reset, and staging deployment.
Repository Documentation And Publication
| Location | Responsibility |
|---|---|
| Root READMEs on main | Short overview, working quickstart and navigation. |
| Directory READMEs on main | File-specific instructions for examples, scripts, packages, and test fixtures. |
| gh-pages branch | Canonical source for guides, interactive steps, and examples. |
| markhuang.ai | Published documentation compiled from the structured source. |
Follow the repository documentation delivery policy for companion PRs and separate worktrees.
Publish And Recover
flowchart LR
Change[Guide change] --> Check[Check source and contracts]
Check --> Merge[Merge to gh-pages]
Merge --> Sync[Content sync pulls the merged commit]
Sync --> Verify[Verify the public routes]After a site PR merges, wait for the 30-minute content.markhuang.ai sync or dispatch it when authorized. Compare commitSha in https://cdn.markhuang.ai/docs/dense-mem/sync-state.json with the merged commit, then open the affected routes and step or heading links at https://markhuang.ai/docs/dense-mem.
If the sync fails, inspect the run and source commit. Make the fix through a documentation PR, then verify the resulting sync. The PR check verifies the candidate source; the sync receipt and public routes establish publication.
Canonical Page Ownership
| Subject | Owner |
|---|---|
| Reader orientation and navigation | Story, system index, and reference guides. |
| Components, dependency direction, runtime composition | Architecture. |
| Exact Evidence, occurrence/revision meaning, ownership, lifecycle, temporal semantics | Evidence Model And Lifecycle. |
| Topics, direct membership, equivalence, freshness, maintenance and manager publication | Topics And Organization. |
| Staging, duplicate/assessment orchestration, stage progression, deadlines, embeddings, atomicity and replay | Memory Write Pipeline. |
| Storage families, durable versus rebuildable state | Data Model And Storage. |
| Tenant keys, constraints, transactions, RLS, generation and topology mechanics | PostgreSQL Cluster-Safe Schema. |
| Recall eligibility, branches, grouping, topic follow-up and degradation | Recall Ranking. |
| Similarity, candidate fusion and typed relevance reranking | Vector Search And Ranking. |
| Physical vector execution, dimensions, HNSW/halfvec and index lifecycle | ANN, HNSW, And Halfvec. |
| Public tools, complete protocol/progress examples, field bounds, result/error shapes | Technical Reference. |
| Recommended host workflow | Using Dense-Mem. |
| Installation, disposable demo and host connection | Quick Start, Hosted Demo, MCP Clients, each for its own procedure. |
| Python, ADK and LangChain adapter use | Framework Integrations. |
| Authentication, principal, authorization, spaces and exposure policy | Request Lifecycle And Security. |
| Credential administration and owner erasure requests | Portals And API Keys. |
| IdP setup, entitlement mapping and directory provisioning | User Portal SSO. |
| Evidence replacement/retraction and conflict inspection/decisions | Conflicts And Corrections. |
| Voluntary observational judgments | Recall Feedback. |
| Setting names, defaults and configuration source | Configuration. |
| Ingress and distributed-coordination deployment | Public HTTPS And Redis. |
| Startup, incidents, maintenance, backup and recovery procedures | Operations Runbook. |
| Metrics, operational diagnostics, cost and export interpretation | Telemetry. |
| Source-change workflow, test layers and release checks | Development And Testing. |
| Evaluation protocol, identity, quality gates and artifacts | Evaluation. |
Single-Source Rules
%%{init: {"flowchart": {"curve": "linear"}}}%%
flowchart TB
Claim["Changed rule"] --> Owner["Edit the owner"]
Owner --> Links["Link from other pages"]
Links --> Examples["Check examples + diagrams"]
Examples --> Validate["Verify source"]
Validate --> Status["Record implementation gaps"]
Status --> Publish["Publish target + status"]Keep complete schemas/examples in Technical Reference, defaults in Configuration, policy in its owning page, and procedures in their workflow/runbook. Framework-native snippets may illustrate their integration without restating the wire schema. Short reader summaries are useful; copied decision tables and full diagrams create competing authority.
Prefer an illustrative diagram for relationships, ordering, boundaries, and failure paths. Use a small table for fields or outcomes. Keep prose for constraints, exceptions, and details the visual cannot express. Preserve distinct subjects rather than merging unrelated responsibilities to reduce page count.
Retired feature URLs retain only short pointers and are absent from active navigation. Delete redundant pages after moving any unique current material. Remove completed plans and obsolete release narratives; preserve exact identifiers still emitted by code, such as artifact formats and retired_contract.
Updating And Verifying
- Record the approved target, inspected source revision/worktree state, and implementation gaps; read relevant accepted ADRs, callers, owners, and tests.
- Update the canonical explanation and all affected links, examples, and diagrams together.
- Test a concrete adverse reading: private-bound access, stale topic/revision, malformed provider response, required failure, or unknown delivery.
- Validate links/anchors, examples, source identifiers, diagrams, and the final diff.
- Publish only through the authorized repository workflow and verify its resulting revision.
| Material | Verification |
|---|---|
| Complete tool JSON | Current registry schemas and semantic input validation; also validate complete protocol envelopes and any explicitly labeled target examples. Substitute only explicit returned-ID/new-key placeholders. |
| Python snippets | Parse/compile and check current client types, methods, options, and constructor signatures. |
| Shell/config snippets | Syntax plus existing scripts, routes, parser settings, and deployment examples. |
| Source/lifecycle claims | Domain policy, adapters, migrations, real PostgreSQL tests and supported consumers. |
| Site links | Resolve generated pages and heading or step anchors, including changed inbound links. |
| Mermaid | Extract backtick and tilde fences; parse with pinned temporary tooling and render/inspect substantial diagrams. |
Flowcharts use %%{init: {"flowchart": {"curve": "linear"}}}%%; sequence diagrams use %%{init: {"sequence": {"rightAngles": true}}}%%.
git diff --check
git diff --stat
git status --shortInspect retired-term matches in context. Microsoft Graph, dependency graphs, and HNSW indexes are not retired factual memory features. Do not erase current historical-read/error identifiers with a blanket text replacement.
Report the source baseline, changed responsibilities, executed validation, publication commit, and remaining uncertainty. Preserve concurrent worktree edits and distinguish static inspection from live service proof.