Files
claw/docs/superpowers/plans/2026-04-20-sweep-030-deterministic-keyword-alias-normalization-plan.md

94 lines
2.9 KiB
Markdown

# Sweep-030 Deterministic Keyword / Alias Normalization Plan
## Parent
- Framework phase: post-materialization deterministic invocation hardening
- Parent route: line-loss service-console readiness correction
- Parent design: [2026-04-20-sweep-030-deterministic-keyword-alias-normalization-design.md](/D:/data/ideaSpace/rust/sgClaw/claw-new/docs/superpowers/specs/2026-04-20-sweep-030-deterministic-keyword-alias-normalization-design.md)
## Objective
Make `sweep-030-scene` selectable from the natural service-console phrasing used by operators, without touching sgClaw runtime.
## Fixed Input
- `sweep-030-scene`
- Current failing operator phrasing:
- `兰州公司 台区线损大数据 月累计线损率统计分析。。。`
- Current parameter-complete phrasing:
- `兰州公司 台区线损大数据 月累计线损率统计分析 2026-03。。。`
## Phase 0: Freeze Boundary
### Tasks
1. Confirm the current `scene.toml` deterministic keyword set for `sweep-030-scene`
2. Confirm the natural operator phrasing to support
3. Freeze allowed / forbidden files
### Deliverable
- frozen route-local scope
### Acceptance
- scope stays limited to `sweep-030-scene`
## Phase 1: Normalize Deterministic Aliases
### Tasks
1. Update `include_keywords` in `sweep-030-scene/scene.toml`
2. Preserve current suffix `。。。`
3. Keep aliases specific to line-loss monthly/weekly cumulative phrasing
### Deliverable
- normalized deterministic manifest
### Acceptance
- `台区线损大数据 月累计线损率统计分析` can satisfy at least one `include_keywords` match
- no runtime files are changed
## Phase 2: Route-Local Verification Record
### Tasks
1. Record the normalized alias set
2. Record the operator-ready sample input
3. Record the next-layer note that helper/requesturl validation is still pending
### Deliverables
- `tests/fixtures/generated_scene/sweep_030_deterministic_keyword_alias_normalization_2026-04-20.json`
- `docs/superpowers/reports/2026-04-20-sweep-030-deterministic-keyword-alias-normalization-report.md`
### Acceptance
- verification asset exists
- report states that this plan only fixes dispatch matchability
## Allowed Files
- `examples/scene_skill_102_final_materialization_2026-04-19/skills/sweep-030-scene/scene.toml`
- `tests/fixtures/generated_scene/sweep_030_deterministic_keyword_alias_normalization_2026-04-20.json`
- `docs/superpowers/reports/2026-04-20-sweep-030-deterministic-keyword-alias-normalization-report.md`
## Forbidden Files
- `src/compat/scene_platform/dispatch.rs`
- `src/browser/callback_host.rs`
- `src/service/server.rs`
- `src/generated_scene/*`
- `resources/rules.json`
## Expected Delta
- `sweep-030-scene` becomes dispatch-matchable from the natural operator wording used in the service console
- no claim about helper bootstrap success within this plan
## Stop Statement
Stop after manifest alias normalization and route-local report publication. Do not continue into callback-host or bootstrap-target fixes.