Loading...
Loading...
Validates optimization plan via parallel multi-agent review (Codex + Gemini) before execution. GO/NO-GO verdict.
npx skill4agent add levnikolaevich/claude-code-skills ln-813-optimization-plan-validatorPaths: File paths (,shared/,references/) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.../ln-*
| Aspect | Details |
|---|---|
| Input | |
| Output | Verdict (GO / GO_WITH_CONCERNS / NO_GO), corrected context.md, agent feedback summary |
| Pattern | Parallel agent review (Codex + Gemini) + own feasibility check → merge → verdict |
shared/references/agent_review_workflow.mdshared/references/agent_delegation_pattern.mdslug.optimization/.optimization/{slug}/context.md| Section | Required | Verify |
|---|---|---|
| Performance Map | Yes | |
| Hypotheses | Yes | At least 1 hypothesis with |
| Suspicion Stack | Yes | At least 1 confirmed suspicion |
| Test Command | Yes | Non-empty |
python shared/agents/agent_runner.py --health-checkagents_launched = SKIPPED.optimization/.agent-review/.gitignore*.optimization/{slug}/context.md.agent-review/context/{id}_optimization_plan.mdagent_review_workflow.mdreview_base.mdmodes/plan_review.md{focus_areas}.agent-review/{agent}/{id}_optimization_review_prompt.mdpython shared/agents/agent_runner.py \
--agent codex-review \
--prompt-file .agent-review/codex/{id}_optimization_review_prompt.md \
--output-file .agent-review/codex/{id}_optimization_review.md \
--cwd {project_root}
python shared/agents/agent_runner.py \
--agent gemini-review \
--prompt-file .agent-review/gemini/{id}_optimization_review_prompt.md \
--output-file .agent-review/gemini/{id}_optimization_review.md \
--cwd {project_root}run_in_background=true| Check | How | Fail Action |
|---|---|---|
| Files exist | For each hypothesis: verify every file in | Flag hypothesis as INVALID |
| No file conflicts | Check uncontested hypotheses don't modify same file lines | Flag overlap as CONCERN |
| Suspicion coverage | Cross-reference | Flag uncovered suspicions as MISSING_HYPOTHESIS |
| Evidence backing | Each hypothesis should trace to a profiler finding or research source | Flag unsupported as WEAK_EVIDENCE |
| Conflicts correct | Verify | Flag incorrect as BAD_CONFLICT |
| Fix Hierarchy | Verify hypotheses ordered Configuration→...→Removal. Flag if top hypothesis is level 4-5 | CONCERN: "config-level fix may be available" |
| Removal guard | Any "remove feature" hypothesis MUST have paired "optimize feature" alternative | CONCERN: "removal without optimization alternative" |
| Assumption verification | Each hypothesis's premises — verified by profiler data or just assumed? | Flag: "assumption not verified: {premise}" |
| Depth check | Did profiler go inside all accessible slow services? Check performance_map for surface-level entries | CONCERN: "service X profiled at surface level only" |
feasibility_result:
valid_hypotheses: [H1, H2, H4]
invalid_hypotheses: [{id: H3, reason: "file not found: src/cache.py"}]
concerns: [{type: "file_overlap", detail: "H1 and H2 both modify src/api.py"}]
missing: [{suspicion: "N+1 in loop at handler.py:45", note: "no hypothesis addresses this"}]shared/references/agent_review_workflow.md.optimization/{slug}/context.mdconflicts_with.agent-review/review_history.md"Agent Review: codex ({accepted}/{total}), gemini ({accepted}/{total}), {N} corrections applied"| Verdict | Condition |
|---|---|
| GO | All hypotheses valid, no critical issues, agents agree plan is feasible |
| GO_WITH_CONCERNS | Minor issues found and documented as warnings in context.md. Safe to proceed |
| NO_GO | Critical feasibility issue (files missing, fundamental approach flaw, both agents reject) |
validation_result:
verdict: "GO" | "GO_WITH_CONCERNS" | "NO_GO"
corrections_applied: <number>
hypotheses_removed: [<ids>]
hypotheses_added: [<ids>]
concerns: [<list>]
agent_summary: "codex: PLAN_ACCEPTABLE, gemini: SUGGESTIONS (2 accepted)"| Error | Recovery |
|---|---|
| Context file missing | Block: "run profiler and researcher first" |
| Both agents unavailable | Proceed with own feasibility check only (reduced confidence) |
| Agent timeout | Use results from available agent + own check |
| Context file malformed | Block: "context.md missing required sections" |
shared/references/agent_review_workflow.mdshared/references/agent_delegation_pattern.mdshared/agents/prompt_templates/modes/plan_review.md.agent-review/.agent-review/review_history.md