FR-011.3 · 需求索引 · 本頁由 build 掃資料夾生成

SSP 在專案內直接編輯 — Phase C

文件 19 份 handoff 7 份

跨多 phase task arc,含 BE / FE / 測試多 repo 起始日期:2026-05-22 Branch:沿用 feature/ssp-import-export-phase2(Phase 2 A+B 的延伸補強) 主要驅動需求:raymond(測試 Phase 2 A+B 後發現的範圍歸屬問題) 狀態:analysis 完成,準備進入實作

§1

概覽

SSP Excel 匯入匯出 Phase 2(A+B)完成後,user 測試對亞航 CMMC SSP 樣板資料時發現幾個架構問題:

  1. SSP 角色(OSCAL 文件角色)跟專案角色(工作流角色)語意混淆
  2. 受評範圍歸屬錯位 — 目前綁 project 層,實務上應 per-SSP
  3. 專案內無法直接編 SSP 內容(要回 MF 改會污染樣板)
  4. 06_外部利用服務 sheet 已隱藏,缺資料來源支援

完整背景與設計分析:analysis.md


§2

決策快速參考

議題 決策
編 SSP 的範圍 C 路線:per-AP SSP
誰能編 manager 角色
編 SSP 後 sync 回 MF
SSP 角色 vs 專案角色 分開,SSP 用 9 個 OSCAL 角色
OSCAL 角色 master system_menus group='ssp_party_role',value 存英文 key
受評範圍遷移路線 A 路線:全面廢除 project_device_mapping / project_information_systems
第 N+1 個 AP SSP 來源 從 v_n SSP deep clone(已實作)
UI 入口 方案 B:專案規劃頁加 SSP tab(lazy load)

§3

Phase C 子題進度

⚠️ 規範:每完成一階段請更新此表的狀態欄與對應連結欄;ship 後加 commit hash

Phase 主題 級別 狀態 design plan ship commit changelog
C1 OSCAL SSP 角色 master data 化 ✅ shipped ✅ design-C1.md ✅ implementation-plan-C1.md 381d3ec changelog
C2 SSP-scoped endpoints 補齊(17 → 實際 ship 19,分 C2.1 / C2.2 兩批) ✅ shipped ✅ design-C2.md ✅ implementation-plan-C2.md C2.1: 603eabe..b0047cf / C2.2: fa8f8dc..df87826 C2.1 / C2.2
C3 受評範圍歸屬遷移到 SSP(兩階段 PR1 + PR2) ✅ PR1 + PR2 全 shipped (2026-05-23, 跳過觀察期 user 確認 DB 有備份) ✅ design-C3.md ✅ implementation-plan-C3.md C3.PR1: d2c3df2..1253a92 (合 C4) / C3.PR2: 0960070..143f354 C3.PR1 / C3.PR2
C4 專案建立/編輯流程改造(拿掉 audit_systems / devices) ✅ shipped (2026-05-23, 合 C3 PR1 同 PR) ✅ design-C4.md ✅ implementation-plan-C4.md d2c3df2..1253a92 (合 C3 PR1 同 PR) C4 changelog
C5 專案規劃頁加 SSP tab ✅ shipped (2026-05-23) — 後續 Phase D 大改 ✅ design-C5.md ✅ implementation-plan-C5.md FE 57caca2 + dd28658 FE changelog
C6 移除專案設定 UI 的「受評範圍」 ✅ shipped (2026-05-23) ✅ design-C6.md ✅ implementation-plan-C6.md FE e910fc6..c92c140 (4 commits) FE changelog
C7 06_外部利用服務恢復(可選) ✅ shipped + Phase C 加結構化欄位(provider + category) ✅ design-C7.md ✅ implementation-plan-C7.md e7f29e3 / leveraged 結構化:18a1110 + jedi-oscal 8de7991 changelog / Phase C/D
C8 _ROLE_LABEL_MAP 清理 + role id 修正 ✅ shipped ✅ design-C8.md ✅ implementation-plan-C8.md be1d286 changelog
D SSP tab UX 重做(Accordion → TabView, 6 sub-tabs, 受評標的 + intro) ✅ shipped (2026-05-23) (ad-hoc, design 寫進 C5 reconciliation 段) FE: SspTabPanel rewrite + 受評標的 UX Phase C/D changelog
B (generalize) Generalize 4 個 MF panel 為 apiBase prop(MF + SSP 共用) ✅ shipped (2026-05-23) 沿用 design-C5 第 §2.3 共用 panel 段 FE: ModuleFrame{Parties,SspDevices,SspInfoSystems,DocumentPool}Panel (同 Phase C/D changelog)
Project Settings 整合 專案設定 3 panel 整進專案規劃頁(5 flat tab) ✅ shipped (2026-05-23) (ad-hoc, 對齊 user UX 反饋) FE: ProjectBasicInfoPanel / ProjectParticipantsPanel / ProjectCloudIntegrationsPanel (同 Phase C/D changelog)
Issue 1 BE 啟動專案時建 ssp_system_implementation main row + clone items from template SSP ✅ shipped (2026-05-23) (ad-hoc) BE 2f69db0 (同 Phase C/D changelog)
Bug fix collection CORS / SC 404 / Resolver str cast / ODT preview / FIPS default ✅ shipped (2026-05-23) BE 638cc00 + a84de39 + aa98c15 + 61b71bf + FE 7ada044 (同 Phase C/D changelog)
E (cleanup) 刪 5 個死 component + 102 個死 i18n key ✅ shipped (2026-05-23) FE f1c60a0 (同 Phase C/D changelog)
Auto-create main row 既有 SSP 寫入時 auto-create system_implementation main row(補 PR1 拿掉 SC snapshot 後的缺漏) ✅ shipped (2026-05-23) BE 4595dae changelog
MF parties picker cache ModuleFramePartiesPanel user/orgUnit picker 改吃 menuStore cache(盤點 follow-up 後發現的不一致) ✅ shipped (2026-05-23) FE 4fe8595 changelog
Track B SSP Excel SC 端到端 + leveraged 結構化欄位 (v2.2.0→v2.4.0) ✅ shipped (2026-05-23) 沿用 design-C7 §10 reconciliation handoff §3 BE 474ae0e + FE 7b4abf2 (+ 10 iteration commits) changelog
Track A MF / SSP 結構對齊:受評標的 + 外部利用服務 endpoint + 啟動專案 clone SC ✅ shipped (2026-05-23) 沿用 design-C5 §10 reconciliation handoff §4 BE 447fb40 + FE 0b87884 changelog
Track C 專案 SSP tab Excel 匯出匯入 round-trip ✅ shipped (2026-05-23) 沿用 design-C5 §10 reconciliation handoff §5 BE c86f71c + FE e997ac4 (+ session_scope + control upsert fix) changelog
Testing iteration Track B/A/C ship 後 user 測試挖出的 bug 修補 collection ✅ shipped (2026-05-23) BE deb2fa5..1baba65 (8 commits) + FE 多 commit changelog

小決策待答:見 open-decisions.md(26 題收集表) Sonnet 交接:見 handoff-to-sonnet.md


§4

依賴關係

C1 (角色 master)  ─┐
                   ├──→ C2 (SSP endpoints) ──→ C3 (範圍遷移) ──→ C4 (專案 CRUD)
                   │                                              │
C8 (role 清理)  ───┘                                              ↓
                                                            C5 (UI tab) ─┐
                                                            C6 (移除 UI)─┤
                                                            C7 (可選) ───┤
                                                                         ↓
                                                                       Phase C done
  • C1 + C8 可平行(同類修角色相關)
  • C2 依賴 C1(角色 dropdown 要 master data)
  • C3 為核心 refactor(最大塊),依賴 C2 endpoint 完整
  • C4 依賴 C3(schema 改了才能改 request body)
  • C5 / C6 / C7 為 UI / Polish,依賴 C4

§5

級別說明

級別 標準 流程
重型 跨層 refactor / 廢表 + migration / 影響多 caller 完整 brainstorm → design → plan
中型 新 service / endpoint 但模式已知 design 段落 + plan
輕型 UI 對齊既有 pattern / 單純調整 直接 plan + 實作

重型 phase:C3(受評範圍遷移) — 需單獨 brainstorm 收斂


§6

跨 repo 工作範圍

Repo 路徑 本期範圍
compliance-manager-be(主) ~/Projects/Billows/Audit-Manager/compliance-manager-be/ system_menus seed / SSP-scoped endpoints / project service 改造 / migration SQL / 拆 associations stack
jedi-oscal(套件) ~/Projects/Jedicogy/module/jedi-python-package/jedi-oscal/ 不預期改動(既有 SSP scope 已備齊)
compliance-manager-fe ~/Projects/Billows/Audit-Manager/compliance-manager-fe/ 專案表單拿掉受評範圍 / 新增 SSP tab / role picker 改 API / i18n role 檔案
compliance-manager-test ~/Projects/Billows/Audit-Manager/compliance-manager-test/ BDD scenario for SSP tab 編輯流程

§7

反斷層機制

  1. 此 tracker 為單一事實來源 — 任何 session 開工前先讀
  2. 每 phase ship 後三件事:更新本表狀態 + commit hash + changelog 連結
  3. 重型 phase 開工前必先 brainstorm(C3)
  4. C3 不可獨立 ship — 必須跟 C4 同 PR / 同 release,否則前端會撞空 schema

§8

連到母 phase tracker

← 回 SSP 匯入匯出 Phase 2 README

§9

文件

以下全部由 build 掃資料夾產生,新增檔案重 build 即自動出現。標題連結指向渲染後的 HTML,md 連向源檔。

設計

文件 類型 標題 最後更新
design-C1md 設計 C1 — OSCAL SSP 角色 Master Data 化 2026-05-29
design-C2md 設計 C2 — SSP-scoped Endpoints 補齊 2026-05-29
design-C3md 設計 C3 — 受評範圍歸屬遷移到 SSP(廢除 project_device_mapping / project_information_systems) 2026-05-29
design-C4md 設計 C4 — 專案建立/編輯流程改造 2026-05-29
design-C5md 設計 C5 — 專案規劃頁加 SSP tab(FE) 2026-05-29
design-C6md 設計 C6 — 移除專案設定 UI 的「受評範圍」section 2026-05-29
design-C7md 設計 C7 — 06_外部利用服務 sheet 恢復(可選) 2026-05-29
design-C8md 設計 C8 — _ROLE_LABEL_MAP 清理 + Role ID 修正 2026-05-29

實作與測試

文件 類型 標題 最後更新
implementation-plan-C1md 實作計畫 C1 — Implementation Plan 2026-05-29
implementation-plan-C2md 實作計畫 C2 — Implementation Plan 2026-05-29
implementation-plan-C3md 實作計畫 C3 — Implementation Plan 2026-05-29
implementation-plan-C4md 實作計畫 C4 — Implementation Plan 2026-05-29
implementation-plan-C5md 實作計畫 C5 — Implementation Plan 2026-05-29
implementation-plan-C6md 實作計畫 C6 — Implementation Plan 2026-05-29
implementation-plan-C7md 實作計畫 C7 — Implementation Plan 2026-05-29
implementation-plan-C8md 實作計畫 C8 — Implementation Plan 2026-05-29

其他文件

文件 類型 標題 最後更新
analysismd 文件 SSP 在專案內直接編輯 — 設計分析 2026-05-29
handoff-to-sonnetmd 文件 Phase C 開工交接 Prompt(給 Sonnet) 2026-05-29
open-decisionsmd 文件 Phase C — 決策表(已 finalized) 2026-05-29

交接與收口時間軸(handoff/,7 份)

由新到舊。每份是某一棒次交接當下的完整現況快照,看某個時間點「當時知道什麼」請從這裡進。

日期 文件 標題
2026-05-29 2026-05-23-track-bac-excel-roundtripmd Track B → A → C — SSP Excel round-trip + MF / SSP 結構對齊 — 交接 prompt
2026-05-29 2026-05-23-track-bac-SUMMARYmd Track B → A → C 收尾 SUMMARY
2026-05-29 2026-05-23-phase2-phase3-sql-applymd Phase 2 + Phase 3 SQL Apply 交接(下個 session)
2026-05-29 2026-05-23-phase-c-d-SUMMARYmd Phase C + D 收口 SUMMARY — 2026-05-23
2026-05-29 2026-05-23-c3-c4-c5-shipped-next-phasemd Session 4 交接 Prompt — C3 PR1 + C4 + C5 完工,接續 C6 / C3 PR2 觀察 / follow-ups
2026-05-29 2026-05-22-session2-C2.1md Session 2 交接 Prompt — C2.1(SSP-scoped endpoints 基礎批)
2026-05-29 2026-05-22-c2-shipped-next-phasemd Session 3 交接 Prompt — C2 完工,接續 C3 / C5