{
  "schema_version": "stockplatform_v2_dev_baseline_owner_decision_v1",
  "generated_at": "2026-06-24T14:02:36+08:00",
  "product_id": "stockplatform-v2",
  "local_path": "/Users/ogt/stockplatform-v2",
  "gitea_repo": "wooo/stockplatform-v2",
  "remote_refs": {
    "main": "1ef097e148ff6645e608fe5823aff9f038314512",
    "dev": ""
  },
  "local_readback": {
    "branch": "main",
    "head": "1ef097e148ff6645e608fe5823aff9f038314512",
    "tracked_modified_count": 60,
    "tracked_deleted_count": 0,
    "untracked_count": 3800,
    "diff_shortstat": "60 files changed, 8355 insertions(+), 3173 deletions(-)",
    "diff_check": "failed_trailing_whitespace_in_two_frontend_files",
    "status": "high_risk_generated_output_split_required"
  },
  "untracked_classification": {
    "tmp_generated_output_count": 3742,
    "source_candidate_count": 58,
    "apps_count": 31,
    "docs_count": 8,
    "scripts_count": 19,
    "assets_count": 0,
    "other_count": 0,
    "largest_generated_buckets": [
      {
        "path": "tmp/admin-mobile-layout-audit",
        "count": 1985
      },
      {
        "path": "tmp/mobile-layout-audit",
        "count": 1687
      },
      {
        "path": "tmp/mobile-layout-smoke",
        "count": 23
      },
      {
        "path": "tmp/desktop-layout-smoke",
        "count": 23
      },
      {
        "path": "tmp/public-layout-audit",
        "count": 17
      }
    ]
  },
  "tracked_modified_groups": {
    "admin_app": [
      "apps/admin/src/app/admin-dashboard.tsx",
      "apps/admin/src/app/components/DataGatePanel.tsx",
      "apps/admin/src/app/components/DataSourcesPanel.tsx",
      "apps/admin/src/app/components/EvidencePanel.tsx",
      "apps/admin/src/app/components/IntelligencePanel.tsx",
      "apps/admin/src/app/components/NotificationsPanel.tsx",
      "apps/admin/src/app/components/OverviewCards.tsx",
      "apps/admin/src/app/components/ReviewsPanel.tsx",
      "apps/admin/src/app/components/SourceDiagnosticsPanel.tsx",
      "apps/admin/src/app/components/TasksPanel.tsx",
      "apps/admin/src/app/components/TradingPanel.tsx",
      "apps/admin/src/app/components/WatchlistPanel.tsx"
    ],
    "api_routes_and_services": [
      "apps/api/app/api/routes/backtest.py",
      "apps/api/app/api/routes/copilot.py",
      "apps/api/app/api/routes/etf.py",
      "apps/api/app/api/routes/intelligence.py",
      "apps/api/app/api/routes/mcp.py",
      "apps/api/app/api/routes/rag.py",
      "apps/api/app/api/routes/recommendations.py",
      "apps/api/app/api/routes/stocks.py",
      "apps/api/app/api/routes/subscriptions.py",
      "apps/api/app/api/routes/system.py",
      "apps/api/app/api/routes/trading.py",
      "apps/api/app/api/routes/watchlists.py",
      "apps/api/app/main.py",
      "apps/api/app/services/notification_charts.py",
      "apps/api/app/services/notification_delivery.py"
    ],
    "web_app": [
      "apps/web/public/manifest.json",
      "apps/web/src/app/components/AiCopilot.tsx",
      "apps/web/src/app/components/AnalyticsProvider.tsx",
      "apps/web/src/app/components/GlobalRiskAssetPanel.tsx",
      "apps/web/src/app/components/HomeDecisionTerminal.tsx",
      "apps/web/src/app/components/IntelligenceImpactTerminal.tsx",
      "apps/web/src/app/components/MarketTrendDashboard.tsx",
      "apps/web/src/app/components/RecommendationTerminalDashboard.tsx",
      "apps/web/src/app/components/ShareReportButton.tsx",
      "apps/web/src/app/components/StockResearchTerminal.tsx",
      "apps/web/src/app/components/charts/CandidateScoreChart.tsx",
      "apps/web/src/app/components/charts/OpportunityMatrix.tsx",
      "apps/web/src/app/components/ui/HistoricalTimeline.tsx",
      "apps/web/src/app/components/ui/ProMarketSnapshot.tsx"
    ],
    "docs_and_runtime": [
      "docs/v2/crawler-accuracy-and-ingestion-plan.md",
      "docs/v2/product-ia-and-design.md",
      "infra/docker/docker-compose.production.yml",
      "infra/nginx/stockplatform-v2-edge.admin-auth.conf"
    ],
    "ingestion_and_ops": [
      "scripts/ingestion/README.md",
      "scripts/ingestion/fetch_intelligence_feeds.py",
      "scripts/ingestion/link_intelligence_securities.py",
      "scripts/ingestion/sync_official_market_index_daily.py",
      "scripts/ops/deploy-production-services.sh",
      "scripts/ops/install-production-cron.sh",
      "scripts/ops/run-cron-health-monitor.sh",
      "scripts/ops/run-intelligence-sync.sh",
      "scripts/ops/run-margin-short-ingestion.sh",
      "scripts/ops/run-with-cron-lock.sh",
      "scripts/ops/stockplatform-admin-route-smoke.sh",
      "scripts/ops/stockplatform-notification-format-smoke.sh",
      "scripts/ops/stockplatform-production-smoke.sh",
      "scripts/ops/stockplatform-trade-validation-smoke.sh",
      "scripts/ops/stockplatform-web-route-smoke.sh"
    ]
  },
  "untracked_source_candidates": {
    "admin_app": [
      "apps/admin/src/app/agents/page.tsx",
      "apps/admin/src/app/audit/page.tsx",
      "apps/admin/src/app/components/DataCenterPanel.tsx",
      "apps/admin/src/app/data-sources/page.tsx",
      "apps/admin/src/app/evidence/page.tsx",
      "apps/admin/src/app/intelligence/page.tsx",
      "apps/admin/src/app/notifications/page.tsx",
      "apps/admin/src/app/publishing/page.tsx",
      "apps/admin/src/app/reviews/bulk-decision/route.ts",
      "apps/admin/src/app/reviews/page.tsx",
      "apps/admin/src/app/source-diagnostics/page.tsx",
      "apps/admin/src/app/tasks/page.tsx",
      "apps/admin/src/app/trading/page.tsx",
      "apps/admin/src/app/watchlist/page.tsx"
    ],
    "api_and_migrations": [
      "apps/api/app/api/routes/agents.py",
      "apps/api/app/services/data_source_sla.py",
      "apps/api/app/services/official_source_registry.json",
      "apps/api/migrations/versions/20260601_0031_nemotron_pilot_runs.py",
      "apps/api/migrations/versions/20260613_0032_notification_report_snapshots.py",
      "apps/api/migrations/versions/20260613_0033_notification_snapshot_exports.py",
      "apps/api/migrations/versions/20260613_0034_notification_lifecycle_events.py",
      "apps/api/migrations/versions/20260613_0035_notification_action_audit_trail.py"
    ],
    "web_app": [
      "apps/web/public/assets/design/logo.png",
      "apps/web/public/assets/design/ui_mockup.png",
      "apps/web/src/app/components/Phase6PublicPageShell.tsx",
      "apps/web/src/app/intelligence/page.tsx",
      "apps/web/src/app/recommendations/page.tsx",
      "apps/web/src/app/stocks/page.tsx",
      "apps/web/src/app/template.tsx",
      "apps/web/src/app/transparency/page.tsx",
      "apps/web/src/app/watchlist/page.tsx"
    ],
    "docs": [
      "docs/GEMINI_OUTPUT_INTAKE.md",
      "docs/UI_DESIGN_GOVERNANCE.md",
      "docs/operations/legacy-stockplatform-deprecation.md",
      "docs/operations/production-entrypoints.md",
      "docs/v2/data-governance-risk-register.md",
      "docs/v2/historical-data-ux-and-navigation-todo.md",
      "docs/v2/modularization-and-optimization-todo.md",
      "docs/v2/production-governance-ux-acceptance-checklist.md"
    ],
    "ingestion_and_ops": [
      "scripts/ingestion/official_source_registry.json",
      "scripts/ops/check-no-legacy-prod-entrypoints.sh",
      "scripts/ops/run-data-freshness-monitor.sh",
      "scripts/ops/run-intelligence-freshness-monitor.sh",
      "scripts/ops/run-market-index-ingestion.sh",
      "scripts/ops/run-official-eod-bulk-ingestion.sh",
      "scripts/ops/run-official-ytd-backfill.sh",
      "scripts/ops/run-price-ingestion.sh",
      "scripts/ops/run-source-remediation-task.sh",
      "scripts/ops/stockplatform-admin-content-action-smoke.mjs",
      "scripts/ops/stockplatform-content-governance-smoke.mjs",
      "scripts/ops/stockplatform-content-governance.mjs",
      "scripts/ops/stockplatform-layout-smoke.sh",
      "scripts/ops/stockplatform-mobile-layout-smoke.mjs",
      "scripts/ops/stockplatform-production-route-guard.sh",
      "scripts/ops/stockplatform-public-content-action-smoke.mjs",
      "scripts/ops/stockplatform-release-checklist-artifact.sh",
      "scripts/ops/stockplatform-smoke-route-registry-cli.mjs",
      "scripts/ops/stockplatform-visual-regression-smoke.mjs"
    ]
  },
  "generated_outputs_excluded_by_default": [
    "tmp/admin-mobile-layout-audit/**",
    "tmp/mobile-layout-audit/**",
    "tmp/mobile-layout-smoke/**",
    "tmp/desktop-layout-smoke/**",
    "tmp/public-layout-audit/**",
    "tmp/*.png",
    "tmp/*-smoke/**"
  ],
  "secret_or_env_paths_seen_but_not_read": [
    ".env.example",
    ".env.production.local"
  ],
  "risk_assessment": {
    "secret_value_collected": false,
    "env_file_read": false,
    "runtime_write_performed": false,
    "product_repo_write_performed": false,
    "remote_write_performed": false,
    "risk_level": "high_generated_output_split_required",
    "reason": "Local HEAD equals Gitea main, but the working tree mixes 60 tracked product changes, 58 untracked source candidates, and 3742 tmp generated outputs. Direct dev branch creation would preserve generated Chrome audit artifacts and unreviewed production route / data ingestion changes."
  },
  "owner_decision_required": [
    "Approve excluding tmp generated outputs by default.",
    "Approve or reject the 58 source candidates grouped by admin app, API / migrations, web app, docs, ingestion, and ops.",
    "Approve or reject the 60 tracked modified files grouped by admin, API, web, docs/runtime, and ingestion/ops.",
    "Confirm .env.example and .env.production.local handling remains metadata-only with no secret value collection.",
    "Fix or explicitly defer trailing whitespace in apps/web/src/app/components/AiCopilot.tsx and apps/web/src/app/components/charts/OpportunityMatrix.tsx.",
    "Confirm whether production Nginx, Docker compose, ingestion cron, official source registry, and market data freshness monitors are in the same dev baseline scope.",
    "Approve remote dev branch only after source candidates and generated-output exclusions are accepted."
  ],
  "recommended_next_step": "Prepare a source-only owner response that excludes tmp generated outputs, then create a review branch before any remote dev branch creation."
}
