第三類 · 深度合作夥伴

把這個入口交給 AI Agent,從盤點一路做到升級與維護。

本手冊是 Type 3 合作夥伴的統一控制入口:fork 私有參考系統、選擇模組、加入客製、建立 Docker image、安裝到自行選擇的環境,並持續接收 upstream 更新。閱讀本頁不需要登入。

AI Agent 從這裡開始 →

核准的 private repo:github.com/rwanexus/capital-fork。取得權限並 clone/fork 後先執行 ./caas --format json doctor。Repo 尚未具備的能力必須回報 NOT_READY;公開文件不會賦予 repo、雲端或部署權限。

AI Agent Task Menu

十個任務,涵蓋完整產品生命週期

每次工作都遵循 DISCOVER → PREFLIGHT → PLAN → AUTHORIZE → EXECUTE → VERIFY → EVIDENCE。唯讀盤點可直接進行;寫入 repo、雲端或資料以前必須確認精確目標。

T0

盤點與就緒判斷

檢查 repo、模組、命令、權限、測試與部署能力;輸出 READY 或 NOT_READY。

唯讀
T1

Fork 與開發環境

建立 private fork、驗證 origin/upstream、記錄 baseline,使用 feature branch。

Repo
T2

選擇與組裝模組

驗證 entitlement、dependencies 與 digest,產生精確 composition lock。

Compose
T3

安全客製開發

優先使用 profile、form/workflow definition 與 private extension。

Develop
T4

建置與發布認證

完成角色、頁面、API、表單與隔離測試,固定 image digest 與證據。

Build
T5

安裝或部署

部署到 partner 明確指定的 Linux/GCP/AWS,使用 canary 與 rollback point。

授權
T6

維運、備份與還原

監控服務、建立離機備份,並以隔離還原證明資料與物件可讀。

Operate
T7

升級指定模組

建立 scoped upgrade PR;保留 partner extension,衝突時停止而不覆寫。

Upgrade
T8

回報問題與貢獻

以 synthetic evidence 開 Issue/PR;資安問題使用 private reporting。

Upstream
T9

稽核或回復

驗證 release evidence,或以保留的 image 與 restore point 安全回復。

Evidence

客製化界線

把每一項變更放在正確層級

升級成本取決於合作夥伴程式碼與 upstream 的重疊程度,而不是 Docker。能用設定完成,就不要改共用模組。

設定

partner/profile.json

品牌、網域、語系與安全設定。

組裝

partner/locks/composition.lock.json

由 ./caas compose 產生啟用模組、精確版本、雜湊與相依。

私有擴充

partner/extensions/*

依穩定 contract 建立私有流程、報表與整合。

共用模組

source/modules/*

可重用修正送回 upstream,不永久保留 private patch。

AI Agent 前置檢查

檢查完成以前,不得變更系統

Discovery 只能唯讀。任何失敗都要產生 blocker 報告,不能自行創造替代指令或檔案。

  1. 存在有文件說明的 partner workspace 與受支援 build 指令。
  2. 每個啟用模組都有 ID、版本、相依範圍與 integrity digest。
  3. Profile 與 composition 通過 repo schema 驗證。
  4. Git history、fixture 與 image layer 不含秘密或客戶資料。
  5. Clean install 通過 health、認證、授權與 tenant isolation。
  6. Release 包含 migration、備份還原與 rollback 計畫。

合作夥伴自行託管

雲端中立,不綁定 GCP 或 AWS

合作夥伴可選 GCP、AWS、其他雲端或自有 Linux。以下只是起始建議,正式上線須依啟用模組與負載量測。

POC/試行

2 vCPU · 8 GB RAM · 30 GB boot · 50–100 GB SSD

Linux VM + Docker Compose;例如 GCP Compute Engine 或 AWS EC2。

小型正式環境

4 vCPU · 16 GB RAM · 受監控 SSD

Linux VM,可選 Cloud SQL/RDS 與 GCS/S3。

既有平台團隊

依 CPU、RAM、DB IOPS 與檔案成長量測

只在團隊已有維運能力時使用既有容器平台;Kubernetes 非必要。

最低安全基線:只公開 HTTP/HTTPS;PostgreSQL、Redis 與物件儲存保持私有;使用 IAP、AWS SSM 或核准的 bastion;離機加密備份並驗證還原。

持續開發

保有自行開發能力,同時控制 fork debt

在 partner private fork 開發。品牌、導覽、私有流程與整合留在 partner layer。同步 upstream 時使用 upgrade branch,審閱 release notes 與 diff,跑完受影響測試後再經 PR 合併。

Issue → 修正 → 發行

  1. 搜尋既有 issue 與 release notes,確認模組及版本。
  2. 一般 bug 使用去識別化證據;資安問題只走私密通報。
  3. 建立 module-scoped branch,先加入 failing regression test。
  4. Upstream PR 不得包含 partner 資料、品牌、憑證或專有程式碼。
  5. Upstream 發版後以 upgrade PR 更新並移除 local patch。

每次升級以前

固定目前 image digest,備份資料庫與檔案,並實際驗證還原。

保護合作夥伴所有權

秘密不得進 Git;真正機密的程式碼放在獨立 private extension package。

以證據完成工作

記錄版本、測試、migration、digest、部署、rollback、未解風險與下一步。

Type 3 · Deep partner

Give this entry point to your AI agent—from readiness through upgrades.

This manual is the Type 3 partner control point for forking the private reference system, composing modules, adding extensions, building a Docker image, installing into a partner-selected environment, and maintaining upstream upgrades. No sign-in is required.

AI agent starts here →

Approved private repo: github.com/rwanexus/capital-fork. After access and clone/fork, run ./caas --format json doctor first. Missing repository capabilities must be reported as NOT_READY; public documentation grants no repository, cloud, or deployment authority.

AI Agent Task Menu

Ten tasks cover the complete product lifecycle

Every task follows DISCOVER → PREFLIGHT → PLAN → AUTHORIZE → EXECUTE → VERIFY → EVIDENCE. Read-only discovery can proceed; repository, cloud, or data writes require an exact authorized target.

T0

Inspect & Readiness

Inventory repository, modules, commands, permissions, tests, and delivery capabilities.

Read only
T1

Fork & Bootstrap

Validate origin/upstream, record the baseline, and use a protected feature workflow.

Repo
T2

Compose Modules

Validate entitlement, dependencies, and digests; emit an exact composition lock.

Compose
T3

Customize Safely

Prefer profiles, form/workflow definitions, and private extensions.

Develop
T4

Build & Certify

Run role, page, API, form, and isolation tests; pin image digest and evidence.

Build
T5

Install / Deploy

Use the partner's named Linux/GCP/AWS target, canary, and rollback point.

Authorize
T6

Operate & Recover

Monitor services, keep off-host backups, and prove isolated restoration.

Operate
T7

Upgrade Modules

Open a scoped upgrade PR, preserve extensions, and stop on source conflicts.

Upgrade
T8

Report / Contribute

Use synthetic evidence for issues/PRs and private reporting for security findings.

Upstream
T9

Audit / Rollback

Verify release evidence or restore from the retained image and restore point.

Evidence

Customization contract

Put each change in the right layer

Upgrade effort follows overlap with upstream, not Docker. Prefer configuration over changing shared modules.

Configuration

partner/profile.json

Brand, domain, locale, and safe settings.

Composition

partner/locks/composition.lock.json

./caas compose records exact enabled versions, hashes, and dependencies.

Private extensions

partner/extensions/*

Private workflows, reports, and integrations against stable contracts.

Shared modules

source/modules/*

Contribute reusable fixes upstream instead of carrying permanent patches.

AI agent preflight

No mutation before these checks pass

Discovery is read-only. A failed check produces a blocker report, never an improvised command or look-alike file.

  1. A documented partner workspace and supported build command exist.
  2. Every enabled module has ID, version, dependency range, and integrity digest.
  3. Profile and composition pass repository schema validation.
  4. Git history, fixtures, and image layers contain no secrets or customer data.
  5. Clean install passes health, authentication, authorization, and tenant isolation.
  6. The release includes migration, backup/restore, and rollback plans.

Partner-owned hosting

Cloud-neutral by design

Choose GCP, AWS, another cloud, or owned Linux. These are starting points, not requirements; size production from measured workloads.

Pilot

2 vCPU · 8 GB RAM · 30 GB boot · 50–100 GB SSD

Linux VM + Docker Compose, such as GCP Compute Engine or AWS EC2.

Small production

4 vCPU · 16 GB RAM · monitored SSD

Linux VM, optionally with Cloud SQL/RDS and GCS/S3.

Existing platform team

Size from CPU, RAM, DB IOPS, and file growth

Use an existing container platform only when the team supports it. Kubernetes is optional.

Expose only HTTP/HTTPS; keep PostgreSQL, Redis, and object storage private; prefer IAP, AWS SSM, or an approved bastion; keep encrypted backups off-host and verify restore.

Ongoing development

Own the experience without permanent fork debt

Develop in the partner private fork. Keep branding, navigation, private workflows, and integrations in the partner layer. Sync upstream into an upgrade branch, review release notes and diffs, run affected tests, then merge through PR.

Issue → fix → release

  1. Search existing issues and release notes; confirm module and version.
  2. Use sanitized evidence for normal bugs and private reporting for security findings.
  3. Create a module-scoped branch and a failing regression test first.
  4. Keep partner data, branding, credentials, and proprietary code out of upstream PRs.
  5. Upgrade after upstream release and remove the temporary local patch.

Before every upgrade

Pin the current image digest, back up database and files, and verify restore.

Protect partner ownership

Keep secrets outside Git and confidential code in a separate private extension package.

Close with evidence

Record versions, tests, migrations, digest, deployment, rollback, risks, and next action.