# GPT Workflow Skill

audience: AI coding agents first.

status: ACTIVE
task IDs: #36
source request: Owner requested global `/gpt-workflow` capturing the completed orchestration contract: main coordinator authors every task, package, implementation prompt, immutable review package, review rubric, correction brief, dependency, and file boundary; GPT-5.6 Luna/max acts only as mechanical ask-gpt Pro dispatcher/babysitter/validator; a separate Luna/max drives a fresh ask-gpt Pro adversarial review; correction resumes the original implementation conversation; GPT-5.6 Terra/medium integrates approved immutable diffs against refreshed main, resolves semantic conflicts, runs gates, invokes guarded landing, deploys/installs, and proves runtime. Skill MUST retain newly learned, generally reusable corrections through evidence-based source updates. Owner requires installation, live verification, guarded landing to main, canonical deployment, and final installed-byte proof.

## Outcome

Ship one tested global skill that converts broad objectives into safely orchestrated ask-gpt Pro implementation→review→correction→integration→landing pipelines without delegating architecture to small driver models or trusting narration.

## Acceptance criteria

1. Source lives at `modules/workstation/claude/skills/gpt-workflow/SKILL.md`; live path resolves through project deployment conventions.
2. Main coordinator MUST pin decomposition, task contracts, file ownership, dependencies, packages, prompts, acceptance, review rubrics, and correction briefs before Luna dispatch.
3. Maximum eight concurrent Luna workers; one global prompt-send queue serializes all new/resumed ask-gpt prompts 55–75 seconds apart.
4. Implementation Luna drives exactly one ask-gpt Pro conversation, reconciles identity after wrapper failure, downloads real attachments, validates hostile artifacts, and never designs/applies/reviews/lands.
5. Review Luna drives a fresh ask-gpt Pro conversation using coordinator-built immutable baseline/candidate/diff package. Package binds baseline commit/tree, candidate tree, binary-safe diff SHA-256, changed-path manifest/hash, implementation conversation/artifact identities, task/rules, and validation receipt.
6. Reviewer identity mismatch, moving-worktree input, narration-only summary, missing bytes, stale base, scope drift, or hash mismatch fails closed.
7. Confirmed findings route through coordinator-authored correction package; fixer Luna resumes original implementation conversation; corrected candidate gets fresh immutable diff and fresh review.
8. Approved output does not auto-land. Terra/medium owns fresh-main application, semantic conflict resolution, deterministic local verification, guarded `ship.sh`, canonical deploy/install, installed-entrypoint proof, and receipt.
9. Any integration delta beyond reviewed artifact requires fresh review. Any conflict, warning, gate failure, baseline drift, or contract change returns to correction/review.
10. Independent disjoint generations/reviews MAY run concurrently; overlapping application/landing serializes against refreshed main.
11. Durable ledger records exact state, package/conversation/account/artifact/hash/verification/integration/runtime receipts. `DONE` means owner-usable deployed result.
12. Skill points to canonical `/gpt-orchestrator` for ask-gpt CLI/package/archive mechanics instead of duplicating drifting doctrine; `/gpt-workflow` owns model-role and immutable-review/landing state machine.
13. Skill includes evidence-based maintenance rule: after a real failure/correction, update source only when lesson generalizes; add deterministic contract test; install and land update through same safety chain. Never self-edit from model opinion alone.
14. Deterministic contract test proves required roles, identity fields, queue, correction resume, Terra landing, and maintenance clauses.
15. Install live before landing, invoke/read installed skill, commit, guarded land, canonical deploy, and prove installed bytes equal landed source.

## Preserved WIP

- Isolated worktree: `/home/user/Projects/overdeck/.worktrees/gpt-workflow-skill`.
- Branch: `wt/gpt-workflow-skill` from `origin/main` `182aadcc6`.
- Existing `/gpt-orchestrator`, active GPT workflows, delivery-security lane, and shared checkout remain untouched.

## Constraints

- Invoke `agent-doc-authoring` before source authoring.
- NEVER create competing ask-gpt dispatcher, daemon, store, or landing authority.
- NEVER let Luna infer architecture or shipment decisions.
- NEVER let Terra bypass review, gates, guarded landing, deployment, or runtime proof.
- Use current `ask-gpt --help`, `Workflow` model routing, project landing/deployment, and installed-skill conventions as sources of truth.
- No secrets, private conversation registries, generated artifacts, or external package content in source.
- No co-authored commits.

## Execution steps

1. Read existing `/gpt-orchestrator`, `/claudex-workflow`, skill deployment/tests, and current ask-gpt help.
2. Author minimal skill and deterministic contract test.
3. Independent adversarial review against this plan; repair blockers.
4. Run focused tests and warning-free checks.
5. Install through project deployment path; invoke/read live skill and byte-verify.
6. Commit; refresh main; guarded land with `.claude/scripts/ship.sh`; canonical deploy; reverify installed bytes and registry.
7. Record exact receipt; mark DONE only after owner-visible invocation.

## Current receipt

- 2026-08-11: Owner approved implementation and end-to-end landing. Worktree created from current `origin/main` `182aadcc6`; task #36 active. No skill source, install, commit, or runtime mutation yet.

- 2026-08-11 owner correction: main session is sole orchestrator. Ordinary subagents MUST execute one bounded task directly and MUST NOT use `cdx`, Codex, ask-gpt, Factory, Workflow, Agent, cursor, or any other work-offload mechanism. `/gpt-workflow` may use Luna only through a main-authored Workflow call whose sole task is mechanical transport for one pinned ask-gpt conversation; Luna MUST NOT orchestrate, spawn, decompose, route, supervise other agents, or own task graphs. Terra integration worker executes one coordinator-pinned integration/landing task directly and MUST NOT dispatch children. Update source/test acceptance accordingly.

- 2026-08-11: Main coordinator directly authored `modules/workstation/claude/skills/gpt-workflow/SKILL.md` after owner prohibited subagent orchestration/offloading. Added deterministic `modules/workstation/claude/tests/gpt-workflow-skill.test.py`. Contract test passed; `git diff --check` passed. Installed live symlink `~/.claude/skills/gpt-workflow` points to this isolated source and installed bytes match. No subagent authored the skill. Commit, independent direct review, guarded landing, canonical deploy, and post-land deploy-clone byte proof remain.

## Next executable action

Commit the scoped skill/test/plans, run direct independent review without worker offloading, then guarded-land, canonical deploy, repoint live symlink through deploy convention, invoke/read installed skill, and verify landed bytes.
