feat: Market Environment Intelligence Sprint #6
Merged
wasabi opened 2 weeks ago

Market Environment Intelligence Sprint with 4 new services: PESTEL Analysis, Regional Readiness, Publics and Market Segmentation, Environmental Scanning Workflow. Migrations 203-206. 12 tables, 9 views, 72 tests, 4 report types.

Commits were merged into target branch
  • feat: Market Environment Intelligence Sprint - PESTEL, Regional Readiness, Publics, Env Scanning
    Phase 1: PESTEL Analysis
    - Migration 203: pestel_analysis + pestel_factor tables, v_pestel_summary, v_pestel_high_impact views
    - Service: create_analysis, add_factor, compute_scores, suggest (auto-populate from platform data), render
    - CLI: create, add-factor, list, get, compute, suggest, export
    - 20 tests (72 total across all 4 services)
    
    Phase 2: Regional Readiness (Full Analytical Service)
    - Migration 204: readiness_dimension, readiness_location_weight, regional_assessment,
      regional_dimension_score, regional_benchmark tables (5 tables, 3 views)
    - Seeded 6 dimensions: infrastructure, institutions, market_access, natural_capital,
      policy_environment, human_capital
    - Scoring engine: weighted composite scoring, rating bands (A+/A/B/C/D), confidence levels
    - Evidence gathering: 7 _query_* functions from existing platform tables/views
    - Per-dimension scorers, benchmarking, multi-location comparison
    - CLI: create, compute, list, get, compare, create-benchmark, benchmark, dimensions, export
    - 20 tests
    
    Phase 3: Publics & Market Segmentation
    - Migration 205: stakeholder_public + market_segment tables, v_publics_matrix, v_market_segment_summary
    - Stakeholder classification (9 types) with influence/interest scoring and quadrant mapping
    - Market segments by buyer type (5 types) with demand patterns
    - CLI: add-public, list, update-stance, create-segment, list-segments, map-demand, matrix, suggest
    - 18 tests
    
    Phase 4: Environmental Scanning Workflow
    - Migration 206: env_scan, env_scan_step, env_scan_source tables (5-step governed lifecycle)
    - Steps: identify, gather, analyze, communicate, decide
    - Auto-populate from threatcasting, stakeholder feedback, PESTEL, CRISP, market data, advisories
    - CLI: create, update-step, get, list, complete, auto-populate, export
    - 16 tests
    
    Report Generator: 4 new types (pestel_assessment, regional_readiness, publics_market_landscape, env_scan_report)
    AGENTS.md: 40+ new CLI commands documented
    2 weeks ago
  • fix: broaden test cleanup to fix pre-existing test_market_order_prediction CI failure
    _purge() only deleted lifecycle_transition rows for specific test UUIDs, but
    predict_remaining() and cycle_time_distribution() read ALL rows for the entity
    type. Residual rows from other tests/seed data skewed the median, causing
    assertion failures. Now _purge() deletes all lifecycle_transition rows for the
    entity type before inserting test data.
    
    Also increased ci-check.sh error output from head -30 to head -60 for better
    CI failure visibility.
    2 weeks ago
  • wasabi merged 2 weeks ago
1/1
Submitter wasabi
Target main
Source feat/market-environment-intelligence
Jobs
Merge Strategy
Create Merge Commit
Watchers (1)
Reference
pull request KI-6
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover