A Socratic questioning skill for coding agents (Claude Code, Codex, Copilot), with a one-command installer and an idea-brief validator.
Project description
socratic-method
A Socratic questioning skill for coding agents — Claude Code, OpenAI Codex, and GitHub Copilot — packaged with a one-command installer and a deterministic artifact validator.
Invoke the skill before real work starts (writing software, drafting a plan or document,
making a decision) and the agent becomes a disciplined questioner: it steelmans your idea,
interrogates it one question at a time (classic elenchus — six Socratic question types,
counterexamples, contradiction-surfacing by quoting your own words), and ends with an
honest verdict — sharpened, aporia (a genuinely unresolved hole, treated as a
finding), or refuted (only ever out of your own mouth). The result is written down as
a machine-validatable idea brief (idea-brief-v1) that downstream work can consume:
open questions become a research agenda, unvalidated assumptions become a validation
worklist.
The skill was authored and hardened in
subagent-factory: seven rounds of
grounded review plus a six-cell adversarial behavioral eval (examiner vs. scripted user
simulator, deterministic graders + independent judge), which caught and fixed real
behavior gaps static review missed. The eval harness ships in this repo under evals/.
Install
pip install git+https://github.com/grammy-jiang/socratic-method
# or, without installing:
uvx --from git+https://github.com/grammy-jiang/socratic-method socratic-method --help
Set up the skill for your agents
# auto-detect which agents are installed on this machine and configure those
socratic-method setup
# or name platforms explicitly / force all three
socratic-method setup claude codex
socratic-method setup all
# install into your user home instead of the current project
socratic-method setup claude --scope user
# see what would happen first / check current state / remove
socratic-method setup --dry-run
socratic-method status
socratic-method uninstall claude
With no targets, setup auto-detects installed agents and configures only those,
printing the concrete evidence for each detection (never a bare claim):
| Agent | Detection signals, in order |
|---|---|
| Claude Code | claude CLI on PATH; else ~/.claude/ config directory |
| OpenAI Codex | codex CLI on PATH; else ~/.codex/ config directory |
| GitHub Copilot | copilot CLI on PATH; else gh-copilot extension; else a github.copilot* VS Code extension |
If nothing is detected, setup installs nothing and tells you how to name targets
explicitly. setup all bypasses detection.
setup is idempotent (content-hash comparison; an identical install reports
"up to date"), refuses to overwrite locally modified files without --force, and after
every write reads the files back from disk before reporting success — the skill's own
"verify before claiming" rule, applied to its installer.
Where the skill lands
| Platform | --scope project (default) |
--scope user |
|---|---|---|
| Claude Code | <root>/.claude/skills/socratic-method/ |
~/.claude/skills/socratic-method/ |
| OpenAI Codex | <root>/.agents/skills/socratic-method/ |
~/.agents/skills/socratic-method/ |
| GitHub Copilot | <root>/.github/skills/socratic-method/ |
— |
Copilot also reads a repo's .claude/skills/, so if the Claude project install is already
present, the Copilot step reports "already covered" and skips (a duplicate would trigger
twice); --force installs to .github/skills/ anyway. Paths live in one data-driven
registry (installer.py) — if a platform moves its skills directory, the fix is one line.
Use the skill
In any agent with the skill installed:
stress-test this plan: … help me think through … poke holes in this idea: …
Or invoke directly: /socratic-method <idea> [--mode stress|develop] [--depth quick|standard|deep].
The session ends with the brief saved to notes/idea-briefs/<slug>-YYYYMMDD.md.
Validate a brief
socratic-method validate notes/idea-briefs/my-idea-20260704.md
Checks the YAML frontmatter against the packaged idea-brief-v1 JSON schema plus the
cross-field rules a schema can't express (e.g. verdict: refuted requires the two
colliding claims verbatim in the body; verdict: aporia requires open questions).
Behavioral eval harness (evals/)
The six-cell regression matrix that hardened the skill: normal cells (planted contradiction → refuted; genuine unknowns → aporia; quick-depth cadence), edge cells (mid-session stop; disputed restatement), and an out-of-scope cell (fully specified plan → decline). Each cell runs a live examiner against a scripted user simulator, then grades the transcript with deterministic graders and an independent model judge.
python evals/run_eval.py --dry-run # list cells, no calls
python evals/run_eval.py --cell O1 # one cell
python evals/run_eval.py # full matrix — spawns ~30-60 headless `claude` calls
Requires the claude CLI and real tokens; run cells individually while iterating. A cell
passes only when all deterministic graders pass AND the judge confirms the expected
behavior with no fabrication.
Development
uv sync # or: pip install -e . && pip install pytest
uv run pytest # validator negatives, installer + detection behavior, CLI smoke
uv run pre-commit install # one tool per file type: ruff (py), syntax checks (yaml/json/toml), actionlint
CI (.github/workflows/ci.yml) runs the test suite on Python 3.11–3.13, builds the
sdist/wheel, checks metadata, and smoke-tests the CLI installed from the built wheel.
Releasing to PyPI
Publishing uses PyPI Trusted Publishing (OIDC) — no API token lives in the repo.
One-time setup on pypi.org: Account → Publishing → Add a new pending publisher with
project socratic-method, owner grammy-jiang, repository socratic-method, workflow
release.yml, environment pypi. Then, to release:
- Bump
__version__insrc/socratic_method/__init__.py. - Create a GitHub Release with tag
vX.Y.Z(must match — the workflow verifies). release.ymlbuilds, checks, and publishes; the package appears atpypi.org/project/socratic-method/, after whichpip install socratic-methodworks.
Maintenance rule inherited from the skill's history: a behavioral failure is not fixed
until something durable changes — a grader, a scenario, or a rail in SKILL.md — never a
prose spot-fix alone.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file socratic_method-0.1.0.tar.gz.
File metadata
- Download URL: socratic_method-0.1.0.tar.gz
- Upload date:
- Size: 39.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56f4b926149e001b91f742fb008d6eb90ba0c87d671908bb2631845f871d6926
|
|
| MD5 |
de9631b7b21bd6fe6241c0ee233be304
|
|
| BLAKE2b-256 |
d930867136c710d5cf18083e7524cb0635aa782989da30ae037421864f8b97d3
|
Provenance
The following attestation bundles were made for socratic_method-0.1.0.tar.gz:
Publisher:
release.yml on grammy-jiang/socratic-method
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
socratic_method-0.1.0.tar.gz -
Subject digest:
56f4b926149e001b91f742fb008d6eb90ba0c87d671908bb2631845f871d6926 - Sigstore transparency entry: 2074523280
- Sigstore integration time:
-
Permalink:
grammy-jiang/socratic-method@534b03531bb82ad0d60f6b9591346a0ffdc1e128 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/grammy-jiang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@534b03531bb82ad0d60f6b9591346a0ffdc1e128 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file socratic_method-0.1.0-py3-none-any.whl.
File metadata
- Download URL: socratic_method-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e300e408a17fe22141398e3b73a6cbc203ba2071e733ea80e5dc063aa06208f7
|
|
| MD5 |
163990843b7ca3a48c1caaf54aad9675
|
|
| BLAKE2b-256 |
fd549f75f6f2bffe0db2b78215b1a690385e53542558e7d93e3f85e3e0585178
|
Provenance
The following attestation bundles were made for socratic_method-0.1.0-py3-none-any.whl:
Publisher:
release.yml on grammy-jiang/socratic-method
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
socratic_method-0.1.0-py3-none-any.whl -
Subject digest:
e300e408a17fe22141398e3b73a6cbc203ba2071e733ea80e5dc063aa06208f7 - Sigstore transparency entry: 2074523571
- Sigstore integration time:
-
Permalink:
grammy-jiang/socratic-method@534b03531bb82ad0d60f6b9591346a0ffdc1e128 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/grammy-jiang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@534b03531bb82ad0d60f6b9591346a0ffdc1e128 -
Trigger Event:
workflow_dispatch
-
Statement type: