pythia-plsql 0.2.0__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/LICENSE +21 -21
- {pythia_plsql-0.2.0/scripts/pythia_plsql.egg-info → pythia_plsql-0.2.4}/PKG-INFO +200 -184
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/README.md +186 -170
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/pyproject.toml +32 -32
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/compile-errors.sql +17 -17
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/dependencies.sql +30 -30
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/impact.sql +26 -26
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/invalid-objects.sql +11 -11
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/name-occupants.sql +15 -15
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/object-source.sql +13 -13
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/plscope-enabled.sql +9 -9
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/plscope-statements.sql +21 -21
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/plscope-usages.sql +18 -18
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/session-privileges.sql +8 -8
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/similar-candidates.sql +13 -13
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/queries/source.sql +10 -10
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/scripts/pythia.py +1860 -1739
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4/scripts/pythia_plsql.egg-info}/PKG-INFO +200 -184
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/setup.cfg +4 -4
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-setup/SKILL.md +83 -76
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/tests/test_install.py +156 -121
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/tests/test_phase1.py +322 -323
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/tests/test_phase2.py +135 -135
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/tests/test_phase3.py +612 -579
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/scripts/pythia_plsql.egg-info/SOURCES.txt +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/scripts/pythia_plsql.egg-info/dependency_links.txt +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/scripts/pythia_plsql.egg-info/entry_points.txt +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/scripts/pythia_plsql.egg-info/requires.txt +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/scripts/pythia_plsql.egg-info/top_level.txt +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-apply/SKILL.md +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-explore/SKILL.md +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-explore/reference/data-dictionary.md +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-impact/SKILL.md +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-review/SKILL.md +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-review/reference/antipatterns.md +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-skill-author/SKILL.md +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-write/SKILL.md +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/skills/pythia-write/reference/patterns.md +0 -0
- {pythia_plsql-0.2.0 → pythia_plsql-0.2.4}/tests/test_phase5.py +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 thaild
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 thaild
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,184 +1,200 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pythia-plsql
|
|
3
|
-
Version: 0.2.
|
|
4
|
-
Summary: PL/SQL development for AI agents on Oracle Database - expert data-dictionary queries, impact analysis, and a snapshot-verified write path with honest rollback.
|
|
5
|
-
License: MIT
|
|
6
|
-
Project-URL: Homepage, https://github.com/thaildhe172591/pythia
|
|
7
|
-
Project-URL: Repository, https://github.com/thaildhe172591/pythia
|
|
8
|
-
Keywords: oracle,plsql,database,agent-skills,sql
|
|
9
|
-
Requires-Python: >=3.9
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
License-File: LICENSE
|
|
12
|
-
Requires-Dist: oracledb>=2.0
|
|
13
|
-
Dynamic: license-file
|
|
14
|
-
|
|
15
|
-
<p align="center">
|
|
16
|
-
<img src="https://raw.githubusercontent.com/thaildhe172591/pythia/main/assets/logo.png" alt="pythia" width="280" />
|
|
17
|
-
</p>
|
|
18
|
-
|
|
19
|
-
# pythia
|
|
20
|
-
|
|
21
|
-
> Oracle's MCP gives your agent a connection. **pythia gives it the judgment to use it.**
|
|
22
|
-
|
|
23
|
-
**English** · [Tiếng Việt](README.vi.md)
|
|
24
|
-
|
|
25
|
-
[](https://github.com/thaildhe172591/pythia/actions/workflows/ci.yml)
|
|
26
|
-
[](LICENSE)
|
|
27
|
-

|
|
28
|
-
|
|
29
|
-
An Agent Skills + CLI kit for developing PL/SQL on Oracle Database with AI coding
|
|
30
|
-
agents (Claude Code, Codex, Cursor — any of the 76 agents `npx skills` supports).
|
|
31
|
-
Explore schemas too big to dump, measure blast radius **before** touching anything,
|
|
32
|
-
and land changes through a snapshot-verified write path that never lies about rollback.
|
|
33
|
-
|
|
34
|
-
## Why ask the database instead of reading dumps
|
|
35
|
-
|
|
36
|
-
A real mid-size system, repo export vs live database, audited in 2026:
|
|
37
|
-
|
|
38
|
-
| Object type | In the dump | In the database | Verdict |
|
|
39
|
-
|---|---|---|---|
|
|
40
|
-
| Procedures | 3,827 | 3,827 | matched |
|
|
41
|
-
| Tables | 952 | 952 | matched |
|
|
42
|
-
| **Types** | **0** | **115** | **all missing** |
|
|
43
|
-
| **Packages** | **0** | **9** | **all missing** |
|
|
44
|
-
| **Indexes** | **116** | **1,016** | **~89% missing** |
|
|
45
|
-
|
|
46
|
-
Code that "reads fine" against the dump references types and packages the dump never
|
|
47
|
-
heard of. Every pythia command asks the live data dictionary instead — and every
|
|
48
|
-
truncated output says so, so an agent never mistakes a partial answer for a full one.
|
|
49
|
-
|
|
50
|
-
## How it works
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
developer chats with the agent
|
|
54
|
-
│
|
|
55
|
-
skills/ teach the agent when to ask, when to stop, when to ask YOU
|
|
56
|
-
│
|
|
57
|
-
pythia CLI — expert queries, impact analysis, the six-step write path
|
|
58
|
-
│
|
|
59
|
-
Oracle data dictionary: ALL_SOURCE, ALL_DEPENDENCIES, ALL_ERRORS, PL/Scope
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
The write path is the heart: **snapshot → impact → preview → apply → verify → report**.
|
|
63
|
-
DDL self-commits in Oracle — the snapshot is the only real undo, so it always runs
|
|
64
|
-
first and no flag can turn it off. A 6-hex token binds the write to exactly what was
|
|
65
|
-
previewed; exit codes make honesty machine-readable
|
|
66
|
-
(`0` clean · `1` refused · `3` **written but broken — never reported as success**).
|
|
67
|
-
|
|
68
|
-
## Install
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
npx pythia-plsql # everything: pip install + skills picker + config scaffold
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Or the same thing piecewise:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
pip install pythia-plsql # the CLI (thin driver — no Oracle Instant Client needed)
|
|
78
|
-
pythia install # skills into your agent + .pythia/connections.json scaffold
|
|
79
|
-
pythia check # fill in connections.json first, then verify
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
The pip package is the whole kit: with Node.js present, `pythia install`
|
|
83
|
-
runs `npx skills add` (77 agents, symlinked updates; `--source <git-url>`
|
|
84
|
-
for internal mirrors) — without Node it copies the bundled
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
`
|
|
155
|
-
`
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pythia-plsql
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Summary: PL/SQL development for AI agents on Oracle Database - expert data-dictionary queries, impact analysis, and a snapshot-verified write path with honest rollback.
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/thaildhe172591/pythia
|
|
7
|
+
Project-URL: Repository, https://github.com/thaildhe172591/pythia
|
|
8
|
+
Keywords: oracle,plsql,database,agent-skills,sql
|
|
9
|
+
Requires-Python: >=3.9
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: oracledb>=2.0
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<img src="https://raw.githubusercontent.com/thaildhe172591/pythia/main/assets/logo.png" alt="pythia" width="280" />
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
# pythia
|
|
20
|
+
|
|
21
|
+
> Oracle's MCP gives your agent a connection. **pythia gives it the judgment to use it.**
|
|
22
|
+
|
|
23
|
+
**English** · [Tiếng Việt](README.vi.md)
|
|
24
|
+
|
|
25
|
+
[](https://github.com/thaildhe172591/pythia/actions/workflows/ci.yml)
|
|
26
|
+
[](LICENSE)
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
An Agent Skills + CLI kit for developing PL/SQL on Oracle Database with AI coding
|
|
30
|
+
agents (Claude Code, Codex, Cursor — any of the 76 agents `npx skills` supports).
|
|
31
|
+
Explore schemas too big to dump, measure blast radius **before** touching anything,
|
|
32
|
+
and land changes through a snapshot-verified write path that never lies about rollback.
|
|
33
|
+
|
|
34
|
+
## Why ask the database instead of reading dumps
|
|
35
|
+
|
|
36
|
+
A real mid-size system, repo export vs live database, audited in 2026:
|
|
37
|
+
|
|
38
|
+
| Object type | In the dump | In the database | Verdict |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| Procedures | 3,827 | 3,827 | matched |
|
|
41
|
+
| Tables | 952 | 952 | matched |
|
|
42
|
+
| **Types** | **0** | **115** | **all missing** |
|
|
43
|
+
| **Packages** | **0** | **9** | **all missing** |
|
|
44
|
+
| **Indexes** | **116** | **1,016** | **~89% missing** |
|
|
45
|
+
|
|
46
|
+
Code that "reads fine" against the dump references types and packages the dump never
|
|
47
|
+
heard of. Every pythia command asks the live data dictionary instead — and every
|
|
48
|
+
truncated output says so, so an agent never mistakes a partial answer for a full one.
|
|
49
|
+
|
|
50
|
+
## How it works
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
developer chats with the agent
|
|
54
|
+
│
|
|
55
|
+
skills/ teach the agent when to ask, when to stop, when to ask YOU
|
|
56
|
+
│
|
|
57
|
+
pythia CLI — expert queries, impact analysis, the six-step write path
|
|
58
|
+
│
|
|
59
|
+
Oracle data dictionary: ALL_SOURCE, ALL_DEPENDENCIES, ALL_ERRORS, PL/Scope
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The write path is the heart: **snapshot → impact → preview → apply → verify → report**.
|
|
63
|
+
DDL self-commits in Oracle — the snapshot is the only real undo, so it always runs
|
|
64
|
+
first and no flag can turn it off. A 6-hex token binds the write to exactly what was
|
|
65
|
+
previewed; exit codes make honesty machine-readable
|
|
66
|
+
(`0` clean · `1` refused · `3` **written but broken — never reported as success**).
|
|
67
|
+
|
|
68
|
+
## Install
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx pythia-plsql # everything: pip install + skills picker + config scaffold
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Or the same thing piecewise:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install pythia-plsql # the CLI (thin driver — no Oracle Instant Client needed)
|
|
78
|
+
pythia install # skills into your agent + .pythia/connections.json scaffold
|
|
79
|
+
pythia check # fill in connections.json first, then verify
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The pip package is the whole kit: with Node.js present, `pythia install`
|
|
83
|
+
runs `npx skills add` (77 agents, symlinked updates; `--source <git-url>`
|
|
84
|
+
for internal mirrors) — without Node it copies the bundled pack itself.
|
|
85
|
+
Prefer **global skills**: `pythia install -g` once per machine serves every
|
|
86
|
+
project, and per-project installs then skip the skills step automatically —
|
|
87
|
+
one copy anywhere means no skill ever shows up twice in the agent's menu. Skills alone: `npx skills add
|
|
88
|
+
thaildhe172591/pythia`, or `/plugin marketplace add thaildhe172591/pythia`.
|
|
89
|
+
|
|
90
|
+
`pip install` is **once per machine**; `pythia install` is **once per
|
|
91
|
+
project** — run it in each repo's root to drop the skills and a fresh
|
|
92
|
+
`.pythia/connections.json` there. The CLI always reads the config of the
|
|
93
|
+
project you are standing in (searched upward from the current directory,
|
|
94
|
+
no global fallback), so one global CLI never mixes up databases.
|
|
95
|
+
|
|
96
|
+
**Updating** follows the same split:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
pip install --upgrade pythia-plsql # new CLI version (once per machine)
|
|
100
|
+
pythia install # refresh a project's skills; config never touched
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
(`npx skills update` also works for skills installed via npx.)
|
|
104
|
+
|
|
105
|
+
Running from a clone works too — `python scripts/pythia.py <command>`; every
|
|
106
|
+
printed follow-up command matches how you invoked it. Windows, macOS, Linux
|
|
107
|
+
and WSL are all CI-tested.
|
|
108
|
+
|
|
109
|
+
## Commands
|
|
110
|
+
|
|
111
|
+
| Read | Understand | Write |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| `check` connectivity + counts | `deps` what it depends on | `apply` the six-step write |
|
|
114
|
+
| `ls` find objects | `impact` what depends on it | `journal` list · diff · export · restore |
|
|
115
|
+
| `src` source, compiler line numbers | `errors` compile errors, line:col | `policy` show · set |
|
|
116
|
+
| `args` signatures | `invalid` everything broken | `unistr` exact non-ASCII literals |
|
|
117
|
+
| `ddl` via DBMS_METADATA | `plscope` exact identifier usages | `agent-user` least-privilege setup |
|
|
118
|
+
| `cols` columns + types | `similar` programs named like this | |
|
|
119
|
+
| `grep` search all source | | |
|
|
120
|
+
| `sql` free query (SELECT/WITH only) | | |
|
|
121
|
+
|
|
122
|
+
Every command takes `--json` (machine output), `--conn` (pick a connection), and
|
|
123
|
+
caps output with explicit truncation markers so context windows stay intact.
|
|
124
|
+
|
|
125
|
+
**Your house style is config, not folklore**: put naming patterns in
|
|
126
|
+
`.pythia/conventions.json` and apply previews warn when a new object's name
|
|
127
|
+
drifts; put the prose rules in `.pythia/conventions.md` and the skills make
|
|
128
|
+
every agent read them first (`pythia conventions` shows both).
|
|
129
|
+
|
|
130
|
+
## Security & write policy
|
|
131
|
+
|
|
132
|
+
**The account is the real security layer** — the policy file is an application-side
|
|
133
|
+
fence. Give the agent its own revocable credential with proxy authentication
|
|
134
|
+
(`agent_user[schema_owner]`, no `ANY` privileges, no owner password shared):
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
pythia agent-user --save # SQL for the DBA + matching credential saved as <conn>_agent
|
|
138
|
+
pythia check # after the DBA ran it: proxy session, warning gone
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
One run does both — the password is regenerated each run, so the SQL and the
|
|
142
|
+
saved config must come from the same run. Optional convenience: doing it by
|
|
143
|
+
hand with
|
|
144
|
+
[`examples/agent-user-setup.example.sql`](examples/agent-user-setup.example.sql)
|
|
145
|
+
works just as well.
|
|
146
|
+
`pythia check` warns when the session runs with more power than the task needs.
|
|
147
|
+
|
|
148
|
+
Per-group write policy, `.pythia/policy.json` (defaults shown):
|
|
149
|
+
|
|
150
|
+
| Group | Default | Is rollback real? |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| `plsql_source` | `confirm` | **Yes — completely.** Source is recoverable from `ALL_SOURCE`. |
|
|
153
|
+
| `data_dml` | `deny` | **No.** After commit only Flashback Query remains, within undo retention. |
|
|
154
|
+
| `structural` | `deny` | **Almost never.** `DROP COLUMN` is permanent; a dropped table may be in the Recycle Bin. |
|
|
155
|
+
| `grants` | `deny` | Yes, but by hand. |
|
|
156
|
+
| `session` | `allow` | Not needed. |
|
|
157
|
+
|
|
158
|
+
The groups that cannot be snapshotted default to `deny` — and the refusal says that,
|
|
159
|
+
instead of "policy forbids it". Anonymous PL/SQL blocks are refused outright.
|
|
160
|
+
Unrecognized statements are refused, never guessed into a group.
|
|
161
|
+
|
|
162
|
+
Reads may flow through Oracle's official SQLcl MCP server (`sql -mcp`, keep `-R 4`);
|
|
163
|
+
it audits every interaction in `DBTOOLS$MCP_LOG`. **Writes never do** — only
|
|
164
|
+
`pythia apply` has the snapshot, preview, verify and journal.
|
|
165
|
+
|
|
166
|
+
## Skills
|
|
167
|
+
|
|
168
|
+
Seven skills teach the agent the workflow — superpowers-style gates, not suggestions:
|
|
169
|
+
|
|
170
|
+
`pythia-setup` · `pythia-explore` · `pythia-impact` (impact **before** any change) ·
|
|
171
|
+
`pythia-write` (copy the codebase's conventions) · `pythia-apply` (the gate: the
|
|
172
|
+
developer sees the preview and approves in chat before anything is written) ·
|
|
173
|
+
`pythia-review` (seven antipatterns) · `pythia-skill-author` (capture *your team's*
|
|
174
|
+
workflow as a new skill, mined from the live schema).
|
|
175
|
+
|
|
176
|
+
## Compatibility
|
|
177
|
+
|
|
178
|
+
| | |
|
|
179
|
+
|---|---|
|
|
180
|
+
| OS | Windows, macOS, Linux, WSL — full test matrix in CI |
|
|
181
|
+
| Python | 3.9+ · stdlib + `python-oracledb` (thin mode) only |
|
|
182
|
+
| Oracle | core works broadly; PL/Scope statement capture needs 12.2+; license-safe views only |
|
|
183
|
+
| Agents | any `npx skills` agent (76) · native Claude Code plugin |
|
|
184
|
+
|
|
185
|
+
## Star History
|
|
186
|
+
|
|
187
|
+
<a href="https://www.star-history.com/?repos=thaildhe172591%2Fpythia&type=date&legend=top-left">
|
|
188
|
+
<picture>
|
|
189
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=thaildhe172591/pythia&type=date&theme=dark&legend=top-left&sealed_token=OnPCuXPZZEbpQk5_Eor5ZB0fTeMzMN1nmrsDJ8qqahouiJt4-IoDvjONdD05i2D2PhfDC5kwd6CUQeBsWGNV20gt2-4HSD-RygX3h0Ni0lrbQnRh60EN3A" />
|
|
190
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=thaildhe172591/pythia&type=date&legend=top-left&sealed_token=OnPCuXPZZEbpQk5_Eor5ZB0fTeMzMN1nmrsDJ8qqahouiJt4-IoDvjONdD05i2D2PhfDC5kwd6CUQeBsWGNV20gt2-4HSD-RygX3h0Ni0lrbQnRh60EN3A" />
|
|
191
|
+
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=thaildhe172591/pythia&type=date&legend=top-left&sealed_token=OnPCuXPZZEbpQk5_Eor5ZB0fTeMzMN1nmrsDJ8qqahouiJt4-IoDvjONdD05i2D2PhfDC5kwd6CUQeBsWGNV20gt2-4HSD-RygX3h0Ni0lrbQnRh60EN3A" />
|
|
192
|
+
</picture>
|
|
193
|
+
</a>
|
|
194
|
+
|
|
195
|
+
## Contributing
|
|
196
|
+
|
|
197
|
+
Tests need **no database** — the fakes prove the safety properties (snapshot before
|
|
198
|
+
write, deny touches nothing, stale tokens refused). See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
199
|
+
|
|
200
|
+
MIT — see [LICENSE](LICENSE).
|