feat(governance): add product manifest standard readiness

This commit is contained in:
Your Name
2026-06-29 12:46:15 +08:00
parent 6ee1b8e499
commit 356cb7a867
9 changed files with 460 additions and 0 deletions

View File

@@ -1,3 +1,21 @@
## 2026-06-29 — 13:05 P0-002 product.awoooi.yaml manifest standard readiness
**完成內容**
- 新增根目錄 `product.awoooi.yaml`,作為 AWOOOI 自身產品 manifest 標準樣板source control authority 固定為 GiteaGitHub 狀態固定 `stopped_retired_do_not_use`
- 新增 `docs/schemas/product_awoooi_manifest_v1.schema.json``docs/operations/product-awoooi-manifest-standard.snapshot.json`
- 新增 `product_awoooi_manifest_standard` loader 與 `/api/v1/agents/product-awoooi-manifest-standard` 只讀 API檢查 manifest、schema、Data / Security / Runtime contract refs 與 operation boundaries。
- Gitea CD controlled-runtime profile 納入 P0-002 manifest/schema/snapshot/service/test避免回退 full API suite`ops/runner/test_cd_controlled_runtime_profile.py` 補測試鎖住此行為。
**驗證結果**
- `python3.11 -m json.tool docs/schemas/product_awoooi_manifest_v1.schema.json docs/operations/product-awoooi-manifest-standard.snapshot.json`:通過。
- `python3.11` 解析 `product.awoooi.yaml`:通過。
- `python3.11 -m py_compile apps/api/src/services/product_awoooi_manifest_standard.py apps/api/src/api/v1/agents.py`:通過。
- `DATABASE_URL=postgresql+asyncpg://ci:ci@localhost/ci PYTHONPATH=apps/api python3.11 -m pytest apps/api/tests/test_product_awoooi_manifest_standard_api.py apps/api/tests/test_p0_cicd_baseline_source_readiness_api.py ops/runner/test_cd_controlled_runtime_profile.py -q``7 passed`
- CD controlled-runtime 同等測試清單:`78 passed`
- `node scripts/ci/check-gitea-step-env-secrets.js``python3.11 ops/runner/guard-gitea-runner-pressure.py --root .``git diff --check`:通過。
**邊界**:未使用 GitHub / `gh` / GitHub API未建立 repo未 sync refs未 workflow_dispatch未讀 token / cookie / session / secret / auth / `.env`;未操作 host / Docker / K8s / DB未 force push。
## 2026-06-29 — 12:06 P0-004 CI/CD baseline source readiness readback
**完成內容**

View File

@@ -0,0 +1,61 @@
{
"schema_version": "product_awoooi_manifest_standard_readiness_v1",
"generated_at": "2026-06-29T13:05:00+08:00",
"status": "ready_for_product_manifest_adoption",
"priority": "P0-002",
"scope": "product_manifest_standard",
"readback": {
"workplan_id": "P0-002",
"workplan_title": "建立 product.awoooi.yaml 產品 manifest 標準",
"scorecard_completion_percent": 55,
"safe_next_step": "adopt_product_manifest_schema_for_remaining_products_without_repo_creation_or_secret_read"
},
"manifest": {
"path": "product.awoooi.yaml",
"schema_ref": "docs/schemas/product_awoooi_manifest_v1.schema.json",
"product_id": "awoooi",
"source_control_authority": "gitea",
"github_status": "stopped_retired_do_not_use"
},
"required_sections": [
"product",
"source_control",
"runtime",
"contracts",
"operation_boundaries"
],
"required_contract_refs": [
"docs/evaluations/backup_dr_readiness_matrix_2026-06-04.json",
"docs/security/SECURITY-SUPPLY-CHAIN-PROGRESS.md",
"docs/evaluations/runtime_surface_inventory_2026-06-05.json"
],
"blockers": [],
"next_actions": [
"add_product_awoooi_manifest_to_remaining_product_repos_after_gitea_inventory_source_is_available",
"keep_github_status_stopped_retired_do_not_use_for_all_manifests",
"project_manifest_fields_to_product_governance_ui_after_schema_adoption"
],
"rollups": {
"required_section_count": 5,
"present_required_section_count": 5,
"missing_required_section_count": 0,
"required_contract_ref_count": 3,
"present_contract_ref_count": 3,
"missing_contract_ref_count": 0,
"source_readiness_percent": 100,
"hard_blocker_count": 0,
"next_action_count": 3
},
"operation_boundaries": {
"read_only_api_allowed": true,
"manifest_write_allowed": true,
"remaining_product_repo_write_allowed": false,
"repo_creation_allowed": false,
"refs_sync_allowed": false,
"workflow_trigger_allowed": false,
"github_api_allowed": false,
"host_or_k8s_write_allowed": false,
"secret_read_allowed": false,
"raw_session_or_sqlite_read_allowed": false
}
}

View File

@@ -0,0 +1,97 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "product_awoooi_manifest_v1",
"title": "AWOOOI product manifest",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"product",
"source_control",
"runtime",
"contracts",
"operation_boundaries"
],
"properties": {
"schema_version": {
"const": "product_awoooi_manifest_v1"
},
"product": {
"type": "object",
"additionalProperties": false,
"required": ["id", "display_name", "owner", "lifecycle", "priority"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"display_name": { "type": "string", "minLength": 1 },
"owner": { "type": "string", "minLength": 1 },
"lifecycle": { "enum": ["production", "development", "retired"] },
"priority": { "enum": ["P0", "P1", "P2", "P3"] }
}
},
"source_control": {
"type": "object",
"additionalProperties": false,
"required": [
"authority",
"repo",
"development_branch",
"production_branch",
"github_status"
],
"properties": {
"authority": { "const": "gitea" },
"repo": { "type": "string", "pattern": "^[^/]+/[^/]+$" },
"development_branch": { "type": "string", "minLength": 1 },
"production_branch": { "type": "string", "minLength": 1 },
"github_status": { "const": "stopped_retired_do_not_use" }
}
},
"runtime": {
"type": "object",
"additionalProperties": false,
"required": ["production_url", "delivery_workbench_api"],
"properties": {
"production_url": { "type": "string", "pattern": "^https://[^\\s]+$" },
"delivery_workbench_api": { "type": "string", "pattern": "^/api/v1/" }
}
},
"contracts": {
"type": "object",
"additionalProperties": false,
"required": [
"data_contract_ref",
"security_contract_ref",
"runtime_inventory_ref"
],
"properties": {
"data_contract_ref": { "type": "string", "minLength": 1 },
"security_contract_ref": { "type": "string", "minLength": 1 },
"runtime_inventory_ref": { "type": "string", "minLength": 1 }
}
},
"operation_boundaries": {
"type": "object",
"additionalProperties": false,
"required": [
"read_only_manifest_allowed",
"github_api_allowed",
"repo_creation_allowed",
"refs_sync_allowed",
"workflow_trigger_allowed",
"host_or_k8s_write_allowed",
"secret_read_allowed",
"raw_session_or_sqlite_read_allowed"
],
"properties": {
"read_only_manifest_allowed": { "const": true },
"github_api_allowed": { "const": false },
"repo_creation_allowed": { "const": false },
"refs_sync_allowed": { "const": false },
"workflow_trigger_allowed": { "const": false },
"host_or_k8s_write_allowed": { "const": false },
"secret_read_allowed": { "const": false },
"raw_session_or_sqlite_read_allowed": { "const": false }
}
}
}
}