with one click
pge-execute
// Run one bounded PGE execution using a real Claude Code Agent Team (planner, generator, evaluator) with messaging-first coordination and durable phase artifacts.
// Run one bounded PGE execution using a real Claude Code Agent Team (planner, generator, evaluator) with messaging-first coordination and durable phase artifacts.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | pge-execute |
| description | Run one bounded PGE execution using the PGE Agent Team surfaces pge-planner, pge-generator, and pge-evaluator with messaging-first coordination and durable phase artifacts. |
| version | 0.4.0 |
| argument-hint | test | <task prompt> |
| allowed-tools | ["TeamCreate","TeamDelete","Agent","SendMessage","Read","Write","Edit","Bash","Glob","Grep"] |
This skill is the orchestration shell only. It is not a fourth agent.
main is the only control-plane owner for the active lane: initialize run, create exactly one team, dispatch planner / generator / evaluator, gate artifacts and runtime events, reduce route deterministically, record authoritative progress / friction, classify failures, and perform teardown. main must not replace Planner / Generator / Evaluator specialist judgment.
Keep this entrypoint small. Load detail files only when the phase needs them:
runtime/artifacts-and-state.mdhandoffs/planner.mdhandoffs/generator.mdhandoffs/evaluator.mdhandoffs/route-summary-teardown.mdcontracts/runtime-event-contract.mdcontracts/*.md relative to this skill (authoritative for this skill)ORCHESTRATION.md
Design references live outside the skill at docs/design/pge-execute/; consult them when changing the skill, not during every normal run. The archived preflight and runtime-state materials remain on disk for future design work, not for the current executable lane.Supported in the current implementation lane:
generator <-> evaluator repair loop for retryable failuresNot supported yet:
User invokes /pge-execute
-> pge-execute orchestrator skill
-> initialize input/progress artifacts
-> create one per-run resident team
- teammate `planner` runs agent surface `pge-planner`
- teammate `generator` runs agent surface `pge-generator`
- teammate `evaluator` runs agent surface `pge-evaluator`
-> planner writes locked task-shape contract
-> generator reviews then executes the task
-> evaluator independently checks the deliverable
-> if Evaluator returns retryable required fixes under the same fair contract,
main dispatches bounded Generator repair and bounded Evaluator re-check
-> route/summary/teardown phase records outcome and deletes the team
The orchestrator advances from runtime events and then validates any referenced durable side effects.
planner using pge-plannergenerator using pge-generatorevaluator using pge-evaluatorSendMessage.progress_artifact as best-effort execution logging only; it must not gate execution.main is the only authoritative writer of progress / friction / repeated-failure logs.main.main may talk directly to the user; teammates may surface clarification needs, but main owns the actual user-facing question.continue or return_to_planner; retry supports a bounded Generator repair loop in the same resident team when Evaluator says the current contract remains fair.If TeamCreate / Agent with team_name / SendMessage / TeamDelete fails, stop immediately and report that concrete blocker. Do not fail from tool-list inspection or other speculative pre-checks.
Read the final ARGUMENTS: block for this skill invocation.
Supported inputs:
testIf the argument is test, use this fixed smoke task:
Create the run-scoped smoke file .pge-artifacts/<run_id>/deliverables/smoke.txt with content exactly: pge smoke
For test, use the smallest possible Agent Teams path:
idle_notification as completionIf the argument is not test:
For normal non-test runs, read runtime/artifacts-and-state.md, ORCHESTRATION.md, and contracts/runtime-event-contract.md.
For test, use this inline minimal protocol instead of reading extra runtime/handoff docs:
run_id, input_artifact, progress_artifact, and smoke_deliverableplanner, generator, and evaluatortype: planner_contract_readyplanner_artifact by required top-level sectionstype: generator_completiontype: final_verdictevaluator_artifact by required sections plus PASS / convergedplanner_support_request / planner_support_response while waiting for phase completion; they are not completion hintsTaskUpdate(status: completed) as bookkeeping only; it is not a PGE phase-completion eventtest, never redispatch planner, generator, or evaluator after an idle notificationFor all runs:
Initialize
smoke_deliverable = .pge-artifacts/<run_id>/deliverables/smoke.txt for testinput_artifactprogress_artifact as one shared append-only execution logmanifest_artifact as the run-directory indexpge-planner, pge-generator, and pge-evaluator agent surfacesCreate team
TeamCreate(team_name=team_name, description="PGE runtime team")planner using pge-plannergenerator using pge-generatorevaluator using pge-evaluatorrun_started / team_created log entryPlanner
test, use one compact dispatch and a minimal section gatehandoffs/planner.md, send work, wait for the canonical teammate-to-main type: planner_contract_ready message, and if needed send exactly one protocol repair message asking planner to resend only that eventplanner_contract_ready has ready_for_generation: false, record Planner blocker/escalation, do not dispatch Generator, route/status as blocked, then teardownplanner_artifact exists and passes the full gate for this run, record degraded progression with protocol_recovery: missing_team_message_event_artifact_gateprotocol_violation: missing_team_message_event, record blocker/friction, then teardown when a team existsplanner_artifactGenerator
handoffs/generator.mdtest, send implementation task to generator with output_artifact = None and the resolved smoke_deliverablegenerator_artifact; non-test runs must not omit ittype: generator_completion message, and if needed send exactly one protocol repair message asking generator to write any missing required durable generator_artifact and send that event with handoff_status: READY_FOR_EVALUATOR or handoff_status: BLOCKEDplanner_support_request / planner_support_response traffic between Generator and Planner may be logged but must not trigger completion repair or phase advancementgenerator_artifact or generator_completion is missing, treat it as a recoverable Generator handoff gap first; do not route blocked until the repair request fails or returns canonical BLOCKEDself_review.generator_plan_reviewgenerator_completion has handoff_status: BLOCKED and the artifact shows a still-local same-contract issue with a narrow repair_direction, send generator_repair_request to the resident generator instead of tearing down immediatelygenerator_completion has handoff_status: BLOCKED and the artifact does not show a still-local same-contract repair path, record the Generator blocker, do not dispatch Evaluator, route/status as blocked or unsupported, then teardownprotocol_recovery: missing_team_message_event_artifact_gateprotocol_violation: missing_team_message_event, record blocker/friction, then teardown when a team existsEvaluator
handoffs/evaluator.mdtype: final_verdict message, and if needed send exactly one protocol repair message asking evaluator to resend only that event139, as task non-acceptance even if the team later has teardown frictionevaluator_artifact exists and passes the full gate for this run, record degraded progression with protocol_recovery: missing_team_message_event_artifact_gateprotocol_violation: missing_team_message_event, record blocker/friction, then teardown when a team existsevaluator_artifact and final verdictRETRY, or BLOCK with current contract still fair and required fixes are local to Generator, send generator_repair_request to resident Generator, gate the fresh generator_completion, then send evaluator_recheck_request to Evaluator and gate the fresh final_verdictfailure_signature repeated on 3 consecutive evaluations requires a saved repair snapshot and explicit main decision before continuingRoute, summary, teardown
handoffs/route-summary-teardown.mdshutdown_response messages to team-lead, delete team, append best-effort route / teardown log entriesReturn only:
## PGE Execute Result
- status: <SUCCESS | BLOCKED>
- run_id: <run_id>
- verdict: <verdict>
- route: <route>
- task_status: <passed | failed | blocked | unsupported>
- teardown_status: <ok | friction | failed | not_attempted>
- artifacts:
- <input_artifact>
- <planner_artifact>
- <generator_artifact if written>
- <evaluator_artifact>
- <manifest_artifact>
- <progress_artifact if written>
- <repair_snapshot_artifact if written>
- <summary_artifact if written>
- <deliverable if produced>
- blocker: <single concrete blocker or null>
Final response path rule:
Final result mapping:
status = SUCCESS only when verdict = PASS and route = convergedroute = continue | retry | return_to_planner | unsupported_route | blocked must not be reported as SUCCESStask_status is derived from Planner/Generator/Evaluator deliverable evidence and verification, not from teardownteardown_status records shutdown/delete friction separately and must not rewrite a failed task as infrastructure-only failureDo not:
--planmainidle_notification as if it were canonical completiontesttest teammate because of silence or idle notification aloneTaskUpdate(status: completed) as phase completiontest without the evaluator independently reading the run-scoped smoke deliverablestatus: SUCCESS together with any non-terminal route