For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Build an auditable device relationship graph that connects assets, operational events, and quality issues, then returns root-cause candidates only when persisted evidence paths support them.
Architecture: PostgreSQL remains the canonical source for operational events and typed evidence relations. Graph and root-cause responses are bounded projections calculated from canonical rows; Neo4j is not required for correctness. Root-cause analysis is deterministic and evidence-bound: it returns candidate paths and limitations, never an automatic causal verdict, repair, maintenance plan, or prediction.
Tech Stack: Flask, SQLAlchemy/PostgreSQL, Alembic, Vue 2/Vuetify, ECharts, pytest, Node test runner.
CAT-16, DQA-13, the device-only portion of DQA-14, OBS-09, and OBS-10. DQA-15 remains planned because WP09 does not generate repair actions.asset, event, and quality_issue.alarm, fault, maintenance, and downtime.part_of, occurred_on, indicates, triggered, addresses, impacts, evidences, and related_to.indicates, triggered, and evidences. Root-cause traversal follows those edges upstream and includes other relations only as context.Files:
app/core/data_research/device_observability.pyapp/core/data_research/errors.pyCreate: tests/data_research/test_device_observability.py
[x] Write failing tests for event normalization, secret rejection, immutable source identity, node existence, graph bounds, upstream cause traversal, supported candidates, and insufficient_evidence.
[x] Run PYTHONPATH=. .venv/bin/pytest -q tests/data_research/test_device_observability.py and confirm failures are caused by the missing WP09 service.
[x] Implement OperationalEventRecord, EvidenceRelationRecord, GraphProjection, RootCauseAnalysis, and DeviceObservabilityService.
[x] Return analysis_status="supported_candidates" only when at least one persisted upstream causal path exists; otherwise return analysis_status="insufficient_evidence" and the fixed conclusion 证据不足,无法确认根因.
[x] Re-run the domain test until it passes.
Files:
app/core/data_research/device_observability_repository.pyapp/models/data_research.pymigrations/versions/20260729_350_device_observability.pyCreate: tests/integration/test_device_observability_postgres.py
[x] Write a failing PostgreSQL integration test for idempotent event import, conflicting identity rejection, validated polymorphic relations, bounded graph traversal, quality-issue anchors, and deterministic root-cause paths.
[x] Add device_operational_events with source identity, event type, asset/component references, severity, status, occurrence window, safe evidence, and content hash.
[x] Add device_evidence_relations with typed endpoints, relation type, safe evidence, source, and a unique edge identity.
[x] Implement repository lookups, bulk inserts, paginated event search, bounded adjacency reads, and node summaries.
[x] Apply migration 20260729_350 to the local PostgreSQL test database and run only the WP09 integration test.
Files:
app/api/data_development/routes.pyapp/core/system/permissions.pytests/test_permission_matrix.pyCreate: tests/data_research/test_device_observability_api.py
[x] Write failing tests for the following contract:
GET /api/development/v1/device-observability/eventsPOST /api/development/v1/device-observability/importGET /api/development/v1/device-observability/graphGET /api/development/v1/device-observability/root-cause[x] Add device-observability:edit to editor and admin roles. All reads require governance:read; import requires the new edit permission.
[x] Add serializers that expose bounded event, relation, graph, candidate, evidence-reference, and limitation fields.
[x] Keep root-cause analysis read-only and deterministic; do not persist a generated conclusion.
[x] Run only WP09 API and permission tests.
Files:
frontend/src/api/dataDevelopment.jsfrontend/src/router/routes.jsfrontend/src/views/dataGovernance/development/index.vuefrontend/src/views/dataGovernance/development/deviceObservabilityModel.jsfrontend/src/views/dataGovernance/development/deviceObservability.vuefrontend/tests/device-observability-model.test.mjsCreate: tests/data_research/test_device_observability_frontend_contract.py
[x] Write failing model tests for event labels, node categories, graph conversion, analysis status, candidate path labels, and permission visibility.
[x] Add a viewer-safe page with event filters, anchor selection, bounded relationship graph, evidence table, root-cause candidate cards, and an explicit insufficient-evidence state.
[x] Add an editor-only import dialog for bounded event and relation evidence; present source identity and evidence fields without exposing credentials.
[x] Render the relationship graph with the existing ECharts graph component and show directed edge labels.
[x] Add the hidden route and the data-research-center entry.
[x] Run the Node model test and frontend contract test.
Files:
deployment/app/deployment/migrations/versions/docs/architecture/DATA_MODEL.mddocs/architecture/OPENAPI.yamldocs/FUNCTION_MODULE_CENSUS_20260726.mddocs/DATAOPS_PHASE1_3_MONTH_WORK_PLAN_20260729.mdModify: tests/test_architecture_artifacts.py
[x] Document PostgreSQL authority, graph projection bounds, evidence-path semantics, and the prohibition on deterministic causal claims without evidence.
[x] Mark WP09 engineering status separately from enterprise operating-event and expert validation.
[x] Update DQA-13, device-only DQA-14, DQA-15, OBS-09, and OBS-10 without overstating cross-product impact or AI completion.
[x] Regenerate OpenAPI and assert the WP09 endpoints and migration are represented.
[x] Verify each changed app/ file is identical to its deployment/app/ copy.
20260729_350 (head).证据不足,无法确认根因.codex/dataops-phase1-equipment-governance; do not push or deploy.