# Design documentation

## Reading order

1. Understand the system: [framework overview](https://fzkuji.github.io/OpenProgram/docs/reference/design/framework-overview.html) → [repository structure](https://fzkuji.github.io/OpenProgram/docs/reference/design/repository/structure.html).
2. Trace an execution: [call flow](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/agent/agent-call-flow.html) → [execution control](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/execution/control.html) → [session storage](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/session/storage.html).
3. Change a subsystem: pick a topic below, read its design and implementation-status appendix, then verify source ownership and acceptance requirements.

## By area

| Area | Read in this order |
| --- | --- |
| Architecture | [Framework overview](https://fzkuji.github.io/OpenProgram/docs/reference/design/framework-overview.html) · [Repository structure](https://fzkuji.github.io/OpenProgram/docs/reference/design/repository/structure.html) · [Implementation navigation](https://fzkuji.github.io/OpenProgram/docs/reference/design/plans/implementation-status.html) |
| Execution and sessions | [Execution control](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/execution/control.html) · [Session storage](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/session/storage.html) · [Session DAG](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/dag/overview.html) · [Goals and restart recovery](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/reliability/goal-and-recovery.html) · [Agent configuration](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/agent-configuration/agent-configuration-ui.html) |
| Functions and workflows | [Function calling](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/calling-unification.html) · [Workflows](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/workflows/workflow.html) · [Program model](https://fzkuji.github.io/OpenProgram/docs/reference/design/function/agentic-program.html) · [Application runtime](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/programs/application-runtime.html) · [Report workflows](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/workflows/report-suite.html) |
| Events and scheduling | [Event layer](https://fzkuji.github.io/OpenProgram/docs/reference/design/proactive/event-layer.html) · [Rule execution](https://fzkuji.github.io/OpenProgram/docs/reference/design/proactive/execution-model.html) · [Scheduling and memory](https://fzkuji.github.io/OpenProgram/docs/reference/design/scheduler/memory-integration.html) · [Tasks page](https://fzkuji.github.io/OpenProgram/docs/reference/design/scheduler/tasks-page.html) |
| Context and memory | [Context overview](https://fzkuji.github.io/OpenProgram/docs/reference/design/context/overview.html) · [Context composition](https://fzkuji.github.io/OpenProgram/docs/reference/design/context/composition.html) · [Compaction](https://fzkuji.github.io/OpenProgram/docs/reference/design/context/compaction.html) · [Memory overview](https://fzkuji.github.io/OpenProgram/docs/reference/design/memory/overview.html) · [Entity memory](https://fzkuji.github.io/OpenProgram/docs/reference/design/memory/entity-memory-proposal.html) |
| Interfaces | [UI overview](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/README.html) · [State layer](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/state-layer.html) · [Chat and composer](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/composer/composer-interaction-modes.html) · [Built-in browser](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/browser/built-in-browser.html) · [Project workspace](https://fzkuji.github.io/OpenProgram/docs/reference/design/ui/workspace/project-workspace.html) · [CLI and TUI](https://fzkuji.github.io/OpenProgram/docs/reference/design/cli/README.html) |
| Models | [Model catalog](https://fzkuji.github.io/OpenProgram/docs/reference/design/providers/models/overview.html) · [Request building](https://fzkuji.github.io/OpenProgram/docs/reference/design/providers/requests/request-build.html) · [Account management](https://fzkuji.github.io/OpenProgram/docs/reference/design/providers/auth/unified-account-management.html) · [Retry behavior](https://fzkuji.github.io/OpenProgram/docs/reference/design/providers/reliability/error-retry.html) · [Usage metering](https://fzkuji.github.io/OpenProgram/docs/reference/design/providers/usage-metering.html) |
| Connections | [Harness standard](https://fzkuji.github.io/OpenProgram/docs/reference/design/integrations/harness-standard.html) · [MCP integration](https://fzkuji.github.io/OpenProgram/docs/reference/design/integrations/extensions/mcp-integration.html) · [MCP server](https://fzkuji.github.io/OpenProgram/docs/reference/design/integrations/extensions/mcp-server.html) · [Extension gating](https://fzkuji.github.io/OpenProgram/docs/reference/design/extension-gating/README.html) · [Channels](https://fzkuji.github.io/OpenProgram/docs/reference/design/channels/design.html) |
| Security and distribution | [Authority and sandbox](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/security/sandbox-architecture.html) · [System access](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/security/system-access.html) · [Dependency security](https://fzkuji.github.io/OpenProgram/docs/reference/design/security/dependency-security.html) · [Installation and packaging](https://fzkuji.github.io/OpenProgram/docs/reference/design/distribution/installation-packaging.html) · [Automatic updates](https://fzkuji.github.io/OpenProgram/docs/reference/design/distribution/automatic-updates.html) |
| Engineering | [Test system](https://fzkuji.github.io/OpenProgram/docs/reference/design/testing/test-system.html) · [Error handling](https://fzkuji.github.io/OpenProgram/docs/reference/design/repository/error-handling.html) · [Documentation structure and rendering](https://fzkuji.github.io/OpenProgram/docs/reference/design/docs-site/overview.html) · [Site discoverability](https://fzkuji.github.io/OpenProgram/docs/reference/design/docs-site/discoverability-performance.html) |

The sidebar has seven areas; expand an area, a module, then a page. Navigation expands the current path, and filtering matches page and category names.

## Supporting material

| Kind | Is |
| --- | --- |
| Prototypes | Layout and interaction experiments, not evidence of implemented behaviour. Own sidebar category. |
| Implementation records | Migration steps, plans and discrepancies to verify. Read the current design first; these do not establish implementation status. |
| Research | Exploratory proposals, threat analysis, evaluation notes; not product commitments. |

## Maintenance rules

- Every page has one sidebar category. Register pages and reading order in `scripts/docs_site/nav.py`; unclassified pages stay visible under Uncategorized. Category changes preserve URLs.
- One current design per topic. Diagrams, comparisons and records state their relation to it without copying its body.
- English by default, with synchronized Chinese. See [documentation conventions](https://fzkuji.github.io/OpenProgram/docs/reference/design/docs-site/overview.html).
- Documentation claims, source presence, passing tests, publication and installed-App acceptance are separate states. Categories do not indicate completeness.
