thaildhe172591/pythia

pythia-deploy

Use when a change spans more than one statement or file - a release or migration script, "chay script DDL", "deploy ban release", "run these .sql files", a table with its comments and indexes, a package spec and body together, a directory of numbered scripts.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/thaildhe172591/pythia --skill pythia-deploy

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Deploying a Release

Announce at start: "Using pythia-deploy — previewing every statement in the release first."

Phase: Ask → Do — the whole ordered set is previewed and approved once, then run step by step

A release script run with sqlplus @release.sql has no snapshot, no preview, no verify and no record of what landed before line 212 failed. pythia deploy runs the same file through the write path, statement by statement, so a failure stops cleanly with an exact list of what landed and how to undo it.

The Iron Law

A RELEASE RUNS IN ORDER, AS PREVIEWED, AND STOPS AT THE FIRST BROKEN STEP

How a script is read

  • One statement per ; for SQL; PL/SQL units (`CREATE ... PROCEDURE /

FUNCTION / PACKAGE / TRIGGER / TYPE) end at a line holding only /. A ; or /` inside a literal or a comment is text.

  • SQL*Plus directives (SET, PROMPT, SPOOL, SHOW ERRORS, WHENEVER,

DEFINE, …) run nothing on the database: they are skipped and listed.

  • @file / @@file includes are refused — list the files instead;

deploy never runs a path nobody looked at.

  • Refused, never skipped: anonymous BEGIN ... END; blocks (as in apply),

EXEC / HOST / CONNECT, and ALTER SESSION — it would silently change how every later statement runs, which no preview can show.

  • Files run in the order given. A directory runs in natural name order when

every file is numbered (1_, 02_, 10_, Flyway's V3__), otherwise by what each file creates — tables, indexes, comments, types, views, specs, procedures, bodies, triggers, grants, data. The preview says which.

The Workflow

  1. Assemble the files in the order they must run; impact

(pythia-impact) for every existing object the release changes.

  1. Lint the set: pythia lint <files> — errors are fixed before the

preview, not after.

  1. Preview: pythia deploy <files>. Nothing is written. Relay it

verbatim: each statement's group, object, lines changed, impact, ! DESTRUCTIVE and lint lines, the diffs. Policy refusals arrive before anything runs — relay them; the developer decides.

  1. Ask once — the preview prints a deploy token (10 hex). The developer

approves it through the first door that works — an AskUserQuestion whose text is pythia approve --card <token> verbatim (Claude Code), the pythia_approve tool (where Codex starts), pythia approve <token> in their terminal — moving to the next unasked when one fails.

  1. Run: pythia deploy <files> --confirm <token> — the same file list.

Each statement goes through snapshot → apply → verify with its own journal entry. Read the exit code, unpiped: 0 all landed · 1 refused (nothing after it ran) · 3 written but broken (stopped there).

  1. Report every statement's result. On a stop: what landed stays landed

(DDL commits itself); the rest of the approval is withdrawn; the output lists the undo commands newest first, which landed statements have no undo, and the --from N to resume with. Fixing forward or restoring is the developer's call.

Under an autopilot lease (pythia-autopilot) that covers every statement, step 3 lands the release directly; if any statement is not covered the whole release falls back to preview, and the output says which one and why.

Re-running after a stop

The statements before the stop are in the database; CREATE TABLE, ALTER TABLE ADD and inserts cannot run twice. Fix the failing statement, then pythia deploy <files> --from <N> — a fresh preview and a fresh approval for the rest. A backfill that needs a column added earlier in the same release cannot be measured before the DDL exists: deploy the DDL, then the data part with --from.

Red Flags — STOP if you catch yourself thinking

ThoughtReality
"Faster to run it in sqlplus"And no snapshot, no verify, no record of where it stopped. The hook denies it anyway.
"Statement 7 failed, skip it and continue"The rest was ordered on top of it. Stop, report, let the developer decide.
"The includes are fine, I wrote them"Deploy runs what was listed and previewed. List them.
"One approval covered the release, so I can edit a file and re-run"The token binds the previewed content. Edited → preview again.
"Exit 3 on the last statement, everything else is fine"Written but broken. Report it as broken, with the undo list.

When NOT to use this skill

  • One statement in one file → pythia-apply.
  • Designing the tables or packages inside the release → pythia-table,

pythia-package; this skill only lands them.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
thaildhe172591
커뮤니티

pythia-apply

Use when a PL/SQL change is ready to reach the database - applying a CREATE OR REPLACE, restoring from the journal, or any other write. Runs the six-step flow through pythia apply and enforces the gate - the developer sees the preview and approves in chat before anything is written, and a broken result is never reported as success.

설치 수
2
GitHub Stars
4
업데이트
10월 16일
thaildhe172591
커뮤니티

pythia-comment

Use when you are about to write or edit a comment in PL/SQL you are changing, or in a .sql deliverable headed for the database. One line, one fixed shape, and anything longer goes where it belongs instead. It fires on the act of commenting rather than on a request - catching yourself opening a second comment line above one statement is the trigger.

설치 수
2
GitHub Stars
4
업데이트
10월 16일
thaildhe172591
커뮤니티

pythia-impact

Use before proposing or writing any change to an Oracle object - a procedure, package, function, trigger, view, or table. Impact analysis comes first, because what depends on an object decides how careful the change must be, and Oracle invalidates dependents in cascade.

설치 수
2
GitHub Stars
4
업데이트
10월 16일
thaildhe172591
커뮤니티

pythia-table

Use when creating or changing a table, column, constraint, index, sequence or comment - "add a column", "create a table for X", "them cot", "tao bang", "sua kieu du lieu", "comment cho cot", a migration script, or a column type change. Designs the DDL to the house standard and Oracle practice, documents every table and column with COMMENT ON, and lands it through pythia deploy with the honest rollback.

설치 수
2
GitHub Stars
4
업데이트
10월 16일