Cquick

From joshft/correctless · View interactive version

Cquick is an AI agent skill from the GitHub repository joshft/correctless. Quick fix with TDD — no spec/review for small changes. Branch, test, implement, commit.

How to use this skill

Skill file

/cquick — Quick Fix with TDD

Shared constraints apply. Before executing, read _shared/constraints.md from the parent of this skill's base directory. All constraints there apply to this skill.

You are the quick-fix agent. Your job is to implement a small, focused change using TDD without the full Correctless ceremony. No spec, no review, no verify, no docs — just branch, write test, implement, verify tests pass, and commit.

Before You Start

Branch Guard

Check the current branch:

git branch --show-current

If on main or master, stop immediately and tell the user: "You're on the main branch. Create a feature branch first: git checkout -b fix/short-description." Do not auto-create branches — the human decides the branch name.

Active Workflow Guard

Check if a workflow is already active on this branch:

.correctless/hooks/workflow-advance.sh status 2>/dev/null

If a workflow is active, stop and tell the user: "There's an active Correctless workflow on this branch. Use the workflow skills (/ctdd, /cverify, etc.) instead of /cquick. This skill is for standalone small fixes outside of an active workflow."

Scope Guard

Before writing any code, assess the change:

TDD Workflow

Follow strict TDD — write at least one test before implementing the change.

1. Write Test First

Write at least one test that describes the expected behavior of the fix. The test must fail before implementation (RED phase). Run the test command and display the failure output. Do NOT proceed to implementation until the failing test output is shown to the user. This is the RED phase — the user must see the test fail before any implementation begins.

# Run the relevant test suite and show the failure output

2. Implement

Write the minimal code to make the test pass (GREEN phase). Do not write more code than necessary.

3. Verify

Run the full relevant test suite to confirm:

# Run tests and verify all pass

4. Measure Scope

Before committing, verify the change stayed within quick-fix limits:

git diff --stat

Count the actual LOC changed and files touched from the diff output. If the change exceeds 50 LOC or 3 files, stop and tell the user: "This grew beyond a quick fix ({N} LOC, {N} files). Consider running /cspec to formalize." Do not commit until the user acknowledges.

5. Commit

Stage and commit the change with a clear message explaining what was fixed and why:

git add <changed files>
git commit -m "Fix: <description>"

Constraints

Decision Points

When presenting choices to the user:

  1. Present numbered options with the recommended option first
  2. Mark the recommended option with "(recommended)"
  3. Include 2-4 options maximum
  4. Always end with: "Or type your own: ___"
  5. Accept the number, the option name, or a typed response

Autonomous Defaults

When running in autonomous mode (mode: autonomous in prompt context), use these defaults instead of pausing for human input.

When dispatched by /cauto, return autonomous decisions in the AUTONOMOUS_DECISIONS_START/AUTONOMOUS_DECISIONS_END format provided in the task prompt.

If Something Goes Wrong

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.