Files
claw/docs/superpowers/specs/2026-04-20-generated-scene-source-evidence-cross-scan-design.md

4.0 KiB

Generated Scene Source Evidence Cross-Scan Design

Date: 2026-04-20 Status: Draft Parent roadmap:

  • docs/superpowers/plans/2026-04-20-generated-scene-source-first-runtime-semantics-hardening-plan.md

Intent

Execute the first bounded child step of the source-first runtime semantics hardening roadmap:

scan the original 102 source scenes for high-signal runtime-semantics evidence

This design does not change analyzer, generator, manifests, or runtime behavior. It only defines how to scan original source-scene evidence so later rule-hardening routes can be derived from source truth rather than from already-generated skills alone.

Objective

For every scene in the current 102-scene set:

  1. locate the original source directory
  2. perform a bounded source evidence scan
  3. record whether source-side evidence exists for the five anchor gap classes:
    • invocation_alias_gap
    • dictionary_recovery_gap
    • parameter_default_semantics_gap
    • resolver_to_request_mapping_gap
    • runtime_url_semantics_gap

Scope

In scope:

  1. source directories under:
    • D:/desk/智能体资料/全量业务场景/一平台场景
  2. current 102-scene mapping from existing materialization / board assets
  3. bounded file-content scanning over high-signal files
  4. JSON ledger + human-readable report

Out of scope:

  1. any code change in src/
  2. any generated skill change
  3. any rematerialization
  4. any execution board update
  5. any pseudo-production execution

Required Scan Targets

The scan should prioritize only high-signal evidence sources.

1. Invocation alias evidence

Signals:

  1. scene name variants
  2. menu labels
  3. button labels
  4. route names
  5. report titles
  6. user-facing Chinese phrases in HTML / JS

2. Dictionary recovery evidence

Signals:

  1. city.js
  2. dict.js
  3. enum.js
  4. options*.js
  5. tree / option arrays with label, value, code, children

3. Parameter default semantics evidence

Signals:

  1. moment(
  2. dayjs(
  3. default query parameter assignment
  4. implicit month/week/date initialization

4. Resolver-to-request mapping evidence

Signals:

  1. $.ajax
  2. fetch
  3. contentType
  4. request data
  5. request body field names
  6. mode-specific request payloads

5. Runtime URL semantics evidence

Signals:

  1. app entry URLs
  2. module route URLs
  3. API endpoint URLs
  4. host runtime / bootstrap page hints

Scan Strategy

This is not a full source index.

The scan should:

  1. use bounded heuristics and targeted filename/content patterns
  2. avoid exhaustive deep parsing of every file
  3. record evidence flags and representative evidence paths
  4. be sufficient to classify scenes for later hardening routes

Inputs

Primary inputs:

  1. tests/fixtures/generated_scene/scene_skill_102_final_materialization_manifest_2026-04-19.json
  2. tests/fixtures/generated_scene/scene_execution_board_2026-04-18.json
  3. source root:
    • D:/desk/智能体资料/全量业务场景/一平台场景

Anchor validation source:

  1. D:/desk/智能体资料/全量业务场景/一平台场景/台区线损大数据-月_周累计线损率统计分析

Output Artifacts

JSON

  • tests/fixtures/generated_scene/generated_scene_source_evidence_cross_scan_2026-04-20.json

Each scene record should include:

  1. sceneId
  2. sceneName
  3. sourceDir
  4. evidenceFlags
  5. evidenceFiles
  6. riskHints

Report

  • docs/superpowers/reports/2026-04-20-generated-scene-source-evidence-cross-scan-report.md

The report must answer:

  1. how many scenes show dictionary evidence
  2. how many scenes show default parameter semantics
  3. how many scenes show request field aliasing
  4. how many scenes show multi-URL semantics
  5. which scenes look most similar to sweep-030-scene

Acceptance Criteria

This design is complete when:

  1. all 102 scenes are included in the cross-scan
  2. the five evidence families are explicit
  3. the output JSON structure is defined
  4. the scan remains analysis-only

Stop Statement

Stop after publishing the child design and child plan.

Do not execute the scan inside this design.