Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d7dbdba
docs(product): establish current product north star
avabbbb Sep 22, 2026
7f21621
docs: make authority and history explicit
avabbbb Sep 22, 2026
ed40c3d
docs(architecture): align with current Career OS model
avabbbb Sep 22, 2026
12bfce8
docs(archive): preserve superseded design history
avabbbb Sep 22, 2026
2753b46
docs(archive): preserve superseded design history
avabbbb Sep 22, 2026
83a73b0
docs(archive): preserve superseded design history
avabbbb Sep 22, 2026
92e42c7
docs(archive): preserve superseded design history
avabbbb Sep 22, 2026
429f20e
docs(archive): preserve superseded design history
avabbbb Sep 22, 2026
77592e7
docs(archive): preserve superseded design history
avabbbb Sep 22, 2026
a3419aa
docs(archive): preserve superseded design history
avabbbb Sep 22, 2026
4c2d2a3
docs: collapse ADR history into current decision summary
avabbbb Sep 22, 2026
4dac9b6
docs: replace historical glossary with current domain context
avabbbb Sep 22, 2026
780750b
docs(agent): align external-first reasoning and skill composition
avabbbb Sep 22, 2026
31e5339
docs(ux): make OfferU guided desktop the primary workspace
avabbbb Sep 22, 2026
585b15c
docs(agent): replace DSH-first plan with host integration contract
avabbbb Sep 22, 2026
25064a3
docs(archive): preserve previous status and handoff
avabbbb Sep 22, 2026
2963eaa
docs(archive): preserve previous status and handoff
avabbbb Sep 22, 2026
ae4c2ea
docs(goal): align release goal with zero-setup guided product
avabbbb Sep 22, 2026
38c6886
docs(status): refresh current phase and product gates
avabbbb Sep 22, 2026
faf7c31
docs(handoff): point agents at current product authority
avabbbb Sep 22, 2026
113eda6
docs(runtime): demote Pi main-agent wording
avabbbb Sep 22, 2026
c8c82c5
docs: move historical design out of current authority
avabbbb Sep 22, 2026
9cd0dc8
docs: move historical design out of current authority
avabbbb Sep 22, 2026
4ae834d
docs: mark dated design as historical snapshot
avabbbb Sep 22, 2026
b1e5cd9
docs: mark dated design as historical snapshot
avabbbb Sep 22, 2026
71325cc
docs: mark dated design as historical snapshot
avabbbb Sep 22, 2026
d07514a
docs(tool-surface): mark merged design current and counts historical
avabbbb Sep 22, 2026
7aa63a3
docs(beta): mark old walkthrough historical
avabbbb Sep 22, 2026
9283f96
docs(archive): preserve old harness control-plane design
avabbbb Sep 22, 2026
839efaf
docs(archive): preserve old harness control-plane design
avabbbb Sep 22, 2026
bdcca64
docs(agent): simplify current control-plane authority
avabbbb Sep 22, 2026
b8442be
docs(agent): demote DSH bridge target to transport detail
avabbbb Sep 22, 2026
e23f265
docs(readme): align product story with guided external-agent model
avabbbb Sep 22, 2026
09a8bcc
docs(readme): align Chinese product story with guided model
avabbbb Sep 22, 2026
ca30da9
docs(conformance): replace removed migration-roadmap reference
avabbbb Sep 22, 2026
d53cc43
docs(eval): mark older real-agent guide historical
avabbbb Sep 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 103 additions & 48 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,125 @@
# OfferU 架构边界

```text
TypeScript React UI / Client Interaction
│ typed HTTP API
▼
Python FastAPI Career Runtime
Profile · Job · Application · Artifact
Event · Candidate · CareerTask
│ Operation Registry
▼
External Agent Runtime
Pi · Replay · Codex · DSH adapter

Tauri / Rust = desktop shell and process lifecycle only
```

# OfferU Architecture

Status: **CURRENT ARCHITECTURE AUTHORITY**
Updated: 2026-09-23

OfferU is a local-first Career OS. The desktop product is the primary user experience; local Agents are replaceable reasoning engines attached to the same deterministic career control plane.

## System boundary

~~~
OfferU Desktop
Today · Pipeline · Job · Profile
│
guided intent / user action
│
┌──────────┴──────────┐
│ │
External local Agent OfferU fallback Agent
(preferred) (optional)
│ │
└──────────┬──────────┘
│
OfferU Skill + optional Career Skills
│
Agent Tool Surface
│
Operation Registry
schema · permission · proposal
idempotency · audit
│
Career Runtime
Profile · Job · Application · Resume
Interview · Evidence · Events · Memory
│
local SQLite / files
~~~

Browser capture, email sync, automation and direct human UI actions join the same control plane; they do not maintain parallel business truth.

## Four authorities

- **Reasoning authority** — exactly one active Agent per Agent Run. Prefer a verified local Agent already owned by the user; OfferU may provide a fallback.
- **Execution authority** — the Operation Registry controls governed capabilities, validation, side effects, proposals, idempotency and audit.
- **Truth authority** — the Python Career Runtime owns persistent career state.
- **High-risk approval authority** — the user or an explicit deterministic product policy. An Agent cannot approve its own protected mutation.

## Agent hosts and Skills

Agent hosts may be Codex, WorkBuddy/CodeBuddy, Claude Code, OpenCode, OMP, Pi, Gemini or future compatible hosts.

OfferU detects host capability from code/probes rather than assuming parity. A host may be a Skill host, a hosted runtime/executor, both, unavailable or only partially compatible.

When the host supports Agent Skills, OfferU projects its Skill and allows composition with installed resume/recruiting/interview/career Skills. Third-party Skills provide methodology; OfferU remains the state and side-effect authority.

## Tool surface

The broad Operation Registry is **not** the model-facing tool list.

~~~
Operation Registry
└─ Agent Tool Surface
└─ Active Skill Surface
~~~

Agents discover compact Skill metadata first and load the relevant operation schemas on demand. Developer/audit paths may expose the full Registry, but beginner Agent flows should not.

See [Tool Surface V2](./docs/architecture/2026-09-22-tool-surface-v2.md).

## Truth flow

```text
~~~
Observe
↓
Event / Candidate
Event / Evidence / Candidate
↓
Career Runtime understands state
Career Runtime validates / associates
↓
CareerTask plans work
Agent or deterministic policy recommends next action
↓
Operation executes or proposes
Operation executes or creates Proposal
↓
verified state / artifact is committed
review / confirmation when required
↓
Today and Pipeline project the same state
```

Agent 负责 reasoning、planning、tool selection 和研究编排;不能直接拥有职业事实。Operation Registry 负责 capability、权限、dry-run、确认和审计。Python Domain Runtime 是 Career Truth 的唯一来源。自然语言“我已更新”不是成功证明,只有成功提交的 Operation 才能改变正式状态。
verified state / artifact
↓
Today / Pipeline / Job / Profile re-project the same truth
~~~

## 领域对象
Natural-language “done” is never the proof of completion.

优先围绕 `Profile`、`Job`、`Application`、`Artifact`、`Event`、`Candidate`、`CareerTask` 表达需求。Today、Pipeline 和 Agent UI 是 projection 或执行界面,不复制同一业务状态。
## Browser and email

## Resume Workspace
Default job acquisition is explicit current-page capture. Smart Fill may assist safe fields after review but never silently submits an application.

岗位简历工作区复用现有 `Resume`、`ResumeSection`、`ResumeOptimizationProposal` 和 `ResumeVersion`,不创建平行的文档状态:
Email and other authorized channels create evidence/signals and reviewable progress candidates. They do not directly overwrite Pipeline state.

```text
Career Evidence / Profile
↓
Master Resume
↓ source_resume_id + target_job_id
Job Tailored Resume
↓
Application Packet projection
```
## Built-in runtime code

编辑器、实时预览和 PDF 都读取同一份结构化 Resume 内容。AI 只生成 Proposal;逐条接受/拒绝、手动编辑、排序、可见性和模板修改都通过 Resume Operation Registry。`workspace_snapshot_hash` 用于阻止过期 Proposal 覆盖用户最新修改,`ResumeVersion` 保存可回看的岗位版本与来源。
Legacy/internal runtime workers may remain for fallback, replay, compatibility or bounded executor use. Their existence does not make them the Career Truth owner or the mandatory product shell.

OfferU 不创建 `ResumeAgent`。岗位简历准备是 `CareerTask`,由现有 Agent Runtime 选择受控 Operation 执行。Job Detail 是进入 Workspace 的主要入口,Today / Pipeline 只投影同一 Application、Event 和 Packet 状态。
## Stable technology boundary

## 自动化
~~~
React / TypeScript = product UI
Python / FastAPI = Career Runtime + Operation Registry + deterministic policy
Tauri / Rust = desktop shell, lifecycle, installer and OS integration
Agent hosts/runtimes = replaceable reasoning/execution engines
SQLite = local career data
~~~

```text
Event → Rule → CareerTask → Agent / deterministic runtime → Operation
```
Do not introduce a second business backend or duplicate Career Truth to match an Agent framework.

低风险读取、研究、计算和候选生成可以自动执行;正式 Career Truth 变更仍经过事实门和用户确认;外部不可逆动作始终需要明确用户操作。
## Safety invariants

## Provider 与数据来源
- Agent output is candidate/draft until accepted through the correct path.
- Important state mutations are reviewable and auditable.
- External irreversible actions remain user-controlled.
- No Agent may self-confirm a protected proposal.
- Credentials do not enter Agent context.
- Provider/host failures are explicit.
- Browser/email integrations cannot create hidden business state.
- Historical eval or fixture success cannot be presented as current live capability.

Replay/Fixture 是显式的合成数据模式,必须在 UI 和产物中标记,不能冒充实时市场数据。Live Provider 失败时保留失败或 blocked 状态,允许用户改用 Fixture 验证本地产品链,但不能静默降级成成功。
Current product interaction authority: [Current Product North Star](./docs/product/current-product.md).
Loading
Loading