Skip to content

alarcritty/qore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qore

Wrap lazy prompts in a structured rubric, automatically, inside your coding agent.

qore takes short, under-specified prompts like "fix the login bug" and turns them into a structured planning brief (Goal, Why, Context, Constraints, Acceptance, First step) before your coding agent acts on them.

It runs as a Claude Code UserPromptSubmit hook. You type a lazy prompt, qore wraps it with the rubric and project context, and Claude executes the task using that structure as a planning aid. No LLM calls happen inside qore. No API keys. No paid credits.

Install

Prerequisites: Node 20 or newer, pnpm, and (optionally) Claude Code.

git clone <repo-url> qore
cd qore
pnpm install
pnpm build
pnpm link --global

After this, the qore command is on your PATH for every shell session, forever, until you uninstall.

Quick start (3 commands)

Run these once, in any terminal:

qore init              # pick your harness (claude-code, cursor, codex, generic)
qore install-hook      # register the hook in ~/.claude/settings.json
qore verbose on        # show the full wrapped prompt inline in Claude Code

Then exit and re-launch your Claude Code session. Done.

From that point on, every prompt you type into Claude Code is wrapped automatically. Short replies (yes, ok thanks) and slash commands (/clear, /init) pass through untouched.

Daily usage

You do not need to type qore ever again after the quick start. Just use Claude Code normally.

When you submit a lazy prompt like:

fix the login bug

qore intercepts it, gathers project context, wraps it with the rubric, and Claude receives the structured version. Claude plans internally and executes the task, without printing the rubric as a response.

If verbose mode is on, you see the full wrapped prompt inline in the chat so you know exactly what Claude got.

Subcommands

Command What it does
qore init Interactive harness selection. Saved to ~/.config/qore/config.json.
qore install-hook Register qore hook in ~/.claude/settings.json.
qore uninstall-hook Remove the hook.
qore verbose on|off|toggle Toggle whether the full wrapped prompt shows inline in Claude Code.
qore last Print the most recently wrapped prompt from disk.
qore hook Hook handler. Invoked by Claude Code, not by you.
qore "lazy prompt" Manual wrap. Prints to stdout. Useful for piping or testing.

Manual mode flags

For the qore "..." form:

qore "fix the login bug"                  # print wrapped prompt to stdout
qore -f prompt.txt                        # read prompt from a file
echo "add dark mode" | qore               # read prompt from stdin
qore "..." --copy                         # also copy to clipboard
qore "..." --harness=cursor               # one-off harness override
qore "..." --format=xml                   # markdown (default) | xml | json
qore "..." --verbose                      # print decisions to stderr

Default --format=markdown puts qore in plan-and-act mode: the rubric becomes private planning guidance for the receiving agent. Use --format=xml or --format=json if you want the receiving tool to literally print the structured expansion (the old behavior).

How it works

  1. You type a lazy prompt in Claude Code.
  2. Claude Code fires the UserPromptSubmit hook, which calls qore hook with a JSON payload containing your prompt and cwd.
  3. qore hook extracts keywords, runs git grep -l for matching files, reads project markers like CLAUDE.md and package.json, and builds a wrapped prompt.
  4. The wrapped prompt is returned to Claude Code as hookSpecificOutput.additionalContext. The model receives it before responding to your prompt.
  5. Claude plans against the rubric internally and executes the task.

qore is fully deterministic. No LLM calls. No telemetry. Everything happens locally on your machine.

Configuration

Stored at ~/.config/qore/config.json:

{
  "harness": "claude-code",
  "verbose": true
}

Supported harnesses: claude-code, cursor, codex, generic.

Re-run qore init any time to change the harness. Toggle verbose with qore verbose on|off.

Visibility

There are three ways to see the wrapped prompt:

Method When to use
qore verbose on Default. Full wrapped prompt is shown inline in Claude Code on every submit.
qore last Read the most recent wrapped prompt from disk, any time.
QORE_DEBUG=1 claude One-off env-var override without saving to config.

The most recent wrapped prompt is always cached at ~/.config/qore/last-wrapped.md.

Uninstall

qore uninstall-hook            # removes the hook from ~/.claude/settings.json
pnpm uninstall --global qore   # removes the `qore` binary
rm -rf ~/.config/qore          # removes config and the wrapped-prompt cache

Restart Claude Code after the first command to clear the hook from any active session.

Development

pnpm dev          # tsc --watch
pnpm typecheck    # tsc --noEmit
pnpm build        # compile to dist/

Source layout:

src/
  index.ts          CLI entry, subcommand routing
  meta-prompt.ts    The rubric and prompt builder
  hook.ts           UserPromptSubmit handler
  install-hook.ts   Settings.json wiring
  init.ts           Interactive harness selection
  config.ts         Read/write ~/.config/qore/config.json
  context.ts        git grep keyword extraction and project markers
  detect-harness.ts Env-var fingerprinting
  clipboard.ts      pbcopy / clip / xclip
  last.ts, verbose.ts   Small subcommand handlers

License

MIT, copyright Alarcritty.

About

Plan-and-act prompt wrapper for Claude Code, Cursor, and Codex. 62 curated techniques, zero LLM calls in the hot path.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors