Refactor workflow-lite-planex documentation to standardize phase naming and improve clarity

- Updated phase references in SKILL.md and 01-lite-plan.md to use "LP-Phase" prefix for consistency.
- Added critical context isolation note in 01-lite-plan.md to clarify phase invocation rules.
- Enhanced execution process descriptions to reflect updated phase naming conventions.

Improve error handling in frontend routing

- Introduced ChunkErrorBoundary component to handle lazy-loaded chunk load failures.
- Wrapped lazy-loaded routes with error boundary and suspense for better user experience.
- Created PageSkeleton component for loading states in lazy-loaded routes.

Sanitize header values in notification routes

- Added regex validation for header values to prevent XSS attacks by allowing only printable ASCII characters.

Enhance mobile responsiveness in documentation styles

- Updated CSS breakpoints to use custom properties for better maintainability.
- Improved layout styles across various components to ensure consistent behavior on mobile devices.
This commit is contained in:
catlog22
2026-03-02 16:36:40 +08:00
parent 980be3d87d
commit 57636040d2
22 changed files with 1149 additions and 383 deletions

View File

@@ -15,15 +15,30 @@ Run benchmarks comparing before/after optimization metrics. Validate that improv
| Input | Source | Required |
|-------|--------|----------|
| Baseline metrics | <session>/artifacts/baseline-metrics.json | Yes |
| Optimization plan | <session>/artifacts/optimization-plan.md | Yes |
| Baseline metrics | <session>/artifacts/baseline-metrics.json (shared) | Yes |
| Optimization plan / detail | Varies by mode (see below) | Yes |
| shared-memory.json | <session>/wisdom/shared-memory.json | Yes |
1. Extract session path from task description
2. Read baseline metrics -- extract pre-optimization performance numbers
3. Read optimization plan -- extract success criteria and target thresholds
4. Load shared-memory.json for project type and optimization scope
5. Detect available benchmark tools from project:
2. **Detect branch/pipeline context** from task description:
| Task Description Field | Value | Context |
|----------------------|-------|---------|
| `BranchId: B{NN}` | Present | Fan-out branch -- benchmark only this branch's metrics |
| `PipelineId: {P}` | Present | Independent pipeline -- use pipeline-scoped baseline |
| Neither present | - | Single mode -- full benchmark |
3. **Load baseline metrics**:
- Single / Fan-out: Read `<session>/artifacts/baseline-metrics.json` (shared baseline)
- Independent: Read `<session>/artifacts/pipelines/{P}/baseline-metrics.json`
4. **Load optimization context**:
- Single: Read `<session>/artifacts/optimization-plan.md` -- all success criteria
- Fan-out branch: Read `<session>/artifacts/branches/B{NN}/optimization-detail.md` -- only this branch's criteria
- Independent: Read `<session>/artifacts/pipelines/{P}/optimization-plan.md`
5. Load shared-memory.json for project type and optimization scope
6. Detect available benchmark tools from project:
| Signal | Benchmark Tool | Method |
|--------|---------------|--------|
@@ -34,7 +49,10 @@ Run benchmarks comparing before/after optimization metrics. Validate that improv
| Makefile with bench target | Custom benchmarks | make bench |
| No tooling detected | Manual measurement | Timed execution via Bash |
6. Get changed files scope from shared-memory (optimizer namespace)
7. Get changed files scope from shared-memory:
- Single: `optimizer` namespace
- Fan-out: `optimizer.B{NN}` namespace
- Independent: `optimizer.{P}` namespace
## Phase 3: Benchmark Execution
@@ -60,6 +78,10 @@ Run benchmarks matching detected project type:
- Collect post-optimization metrics matching baseline format
- Calculate improvement percentages per metric
**Branch-scoped benchmarking** (fan-out mode):
- Only benchmark metrics relevant to this branch's optimization (from optimization-detail.md)
- Still check for regressions across all metrics (not just branch-specific ones)
## Phase 4: Result Analysis
Compare against baseline and plan criteria:
@@ -73,13 +95,16 @@ Compare against baseline and plan criteria:
| Regression detected | Any unrelated metric degrades > 5% | FAIL -> fix_required |
| Plan criteria not met | Any criterion not satisfied | FAIL -> fix_required |
1. Write benchmark results to `<session>/artifacts/benchmark-results.json`:
- Per-metric: name, baseline value, current value, improvement %, verdict
- Overall verdict: PASS / WARN / FAIL
- Regression details (if any)
1. Write benchmark results to output path:
- Single: `<session>/artifacts/benchmark-results.json`
- Fan-out: `<session>/artifacts/branches/B{NN}/benchmark-results.json`
- Independent: `<session>/artifacts/pipelines/{P}/benchmark-results.json`
- Content: Per-metric: name, baseline value, current value, improvement %, verdict; Overall verdict: PASS / WARN / FAIL; Regression details (if any)
2. Update `<session>/wisdom/shared-memory.json` under `benchmarker` namespace:
- Read existing -> merge `{ "benchmarker": { verdict, improvements, regressions } }` -> write back
2. Update `<session>/wisdom/shared-memory.json` under scoped namespace:
- Single: merge `{ "benchmarker": { verdict, improvements, regressions } }`
- Fan-out: merge `{ "benchmarker.B{NN}": { verdict, improvements, regressions } }`
- Independent: merge `{ "benchmarker.{P}": { verdict, improvements, regressions } }`
3. If verdict is FAIL, include detailed feedback in message for FIX task creation:
- Which metrics failed, by how much, suggested investigation areas