5.0 KiB
Generated Scene Rule Hardening Route Design
Date: 2026-04-20 Status: Draft Parent roadmap:
docs/superpowers/plans/2026-04-20-generated-scene-source-first-runtime-semantics-hardening-plan.mdUpstream ledger:docs/superpowers/plans/2026-04-20-generated-scene-source-first-runtime-semantics-ledger-plan.md
Intent
Define the bounded route-design stage that converts the completed source-first runtime-semantics ledger into reusable hardening routes.
This design does not implement analyzer/generator changes. It only decides:
- which reusable hardening routes exist
- how large each route is
- which routes should be executed first
- how downstream implementation slices should be decomposed
Why This Stage Exists
The ledger proved that the current 102-scene set contains reusable generator-level gaps, not just isolated scene-specific defects.
The project now needs a route map that:
- groups scenes by reusable rule fixes
- avoids scene-by-scene patching
- defines a strict implementation order
- makes full rematerialization and validation refresh possible after hardening
Fixed Inputs
tests/fixtures/generated_scene/generated_scene_source_first_runtime_semantics_ledger_2026-04-20.jsondocs/superpowers/reports/2026-04-20-generated-scene-source-first-runtime-semantics-ledger-report.md
Scope
In scope:
- route clustering from the completed ledger
- route prioritization by coverage and reuse
- bounded child-plan sequencing for implementation
- rematerialization dependency declaration
- validation refresh dependency declaration
Out of scope:
- any
src/change - any skill manifest edit
- any rematerialization
- any validation rerun
- any inner-network execution
Route Candidates
The ledger already establishes five generator-level hardening routes.
Route 1: Resolver-to-Request Mapping Hardening
Goal:
Recover reusable mapping metadata between resolver outputs and request payload fields.
Examples:
org_code -> orgnoperiod_payload.fdate -> fdateperiod_payload.weekSfdate -> weekSfdateperiod_payload.weekEfdate -> weekEfdate
Reason for high priority:
This route spans the full 102-scene set and directly blocks runtime equivalence.
Route 2: Runtime URL Classification Hardening
Goal:
Separate URL roles during generation:
- runtime context URL
- module route URL
- API endpoint URL
- entry URL hints
Reason for high priority:
This route also spans the full set and is required to stop callers from guessing page_url semantics at execution time.
Route 3: Embedded Dictionary Extraction Hardening
Goal:
Recover richer dictionaries and trees from source-side JS/HTML assets instead of shipping starter subsets only.
Reason for high priority:
This route also spans the full set and is the only scalable answer to sweep-030-style organization coverage failures.
Route 4: Parameter Default Semantics Recovery Hardening
Goal:
Recover page-native default period/date/mode behavior from source evidence into generated parameter metadata.
Reason for priority:
This route is slightly narrower than the first three but still affects the majority of scenes and is highly visible in runtime invocation.
Route 5: Invocation Alias Generation Hardening
Goal:
Broaden deterministic invocation coverage so user wording is not forced to match canonical scene names exactly.
Reason for priority:
This route is selective rather than universal, so it should follow structural hardening routes unless a route-local blocker proves otherwise.
Prioritization Rules
Route order must be based on:
- breadth of scene coverage
- generator-level reuse
- ability to reduce repeat inner-network rediscovery
- dependency order between routes
It must not be based on:
- anecdotal scene debugging order
- whichever single scene was most recently tested
Fixed Route Order
The current route order should be:
resolver_request_mapping_hardeningruntime_url_classification_hardeningembedded_dictionary_extraction_hardeningparameter_default_semantics_recovery_hardeningalias_generation_hardening
Implementation-Slice Policy
No route should be implemented as one unbounded giant patch.
Each route must later be split into bounded child plans with:
- a fixed scene bucket
- explicit allowed files
- explicit forbidden files
- an expected coverage delta
- a stop statement
Required Downstream Outputs
This route-design stage must yield:
- one route-sequencing plan
- one bounded implementation plan per top route
- one full rematerialization refresh plan after route execution
- one validation refresh plan after rematerialization
Acceptance Criteria
This design is complete when:
- all five reusable routes are explicit
- route order is fixed
- route ordering is justified by ledger evidence, not anecdotes
- downstream implementation decomposition rules are explicit
- this stage remains design-only
Stop Statement
Stop after publishing the route design and its child sequencing plan.
Do not implement any hardening route inside this design.