Quick Ref / Command

Engineer Kit

/ak:fix

Root-cause bug fixing

Root-cause bug fixing for errors, tests, lint, CI/CD, UI bugs, and code issues with scout, diagnosis, verification, and prevention gates.

01

Frame Intent

02

Select Mode

03

Scout First

04

Diagnose

Rule 01

Scout and diagnose before any fix proposal.

Rule 02

Symptoms are not root causes; probably is not evidence.

Rule 03

Fix the smallest cause-aligned surface that preserves stated non-goals.

Rule 04

Verification must prove the original symptom is gone and the blast radius is safe.

Rule 05

Failed attempts change the framing; they do not justify more guessing.

Execution Map

Core lanes from input to output, aligned with the command's real execution path.

01

Start

Input, scope, route

  1. 1 Frame Intent Capture outcome, constraints, non-goals, and acceptance criteria before choosing a mode or diagnosis path.
  2. 2 Select Mode Use auto by default, review for critical production work, quick for trivial lint/type issues, parallel for independent issues, or ultra for five read-only fix plans.
  3. 3 Scout First Map project type, affected files, callers, tests, recent commits, and matching code conventions before hypotheses.
02

Work

Agent / skill execution

  1. 4 Diagnose Capture pre-fix state, exact error, reproduction, expected versus actual, cause evidence, why now, and blast radius.
  2. 5 Assess Complexity Classify simple, moderate, complex, or parallel and select the corresponding workflow and orchestration depth.
  3. 6 Select Cause-Aligned Fix For a direct safe repair, proceed; for multiple options or architecture impact, brainstorm and plan after diagnosis.
03

Verify

Gate, review, validation

  1. 7 Implement Minimally Fix the root cause using existing patterns while preserving non-goals and avoiding adjacent symptoms.
  2. 8 Verify + Prevent Re-run exact repro, affected tests, blast-radius checks, lint/type/build where required, public contract checks, and add regression/prevention guards.
  3. 9 Finalize Report confidence, root cause, changed files, prevention, side-effect sweep, docs impact, project status, and journal unless skipped.

Syntax, arguments, subcommands

How to invoke the skill: syntax, positional arguments, shared options, then each subcommand with its own syntax and outcome.

Syntax

/ak:fix [issue] [--auto|--review|--quick|--parallel|--ultra] [--advice]

Arguments

[issue] Required

Failure to repair

Concrete bug, error, failing test, CI failure, or UI defect. Include the exact symptom, minimal reproduction, expected and actual behavior, environment, constraints, non-goals, acceptance criteria, and authority boundary for Git, external systems, production data, and publication.

/ak:fix "POST /api/sessions returns 500 when expiresAt is absent. Reproduce with the focused API test, preserve the response contract, and do not commit or deploy." --review

Shared options

--auto

Autonomous

Default mode for simple or moderate issues. It removes routine pauses but still escalates unresolved blockers, regressions, authority decisions, and reviews below 9.5 or with any Critical finding.

/ak:fix login redirects to the wrong page after SSO --auto
--review

Human review

Pause for human review at each major step. Best for production, security-sensitive, or public-contract work.

/ak:fix production checkout timeout --review
--quick

Quick

Use the short scout, diagnosis, repair, verification, and review cycle for trivial type, lint, syntax, or direct single-file defects. Root-cause evidence remains mandatory.

/ak:fix TypeScript error in UserTable --quick
--parallel

Parallel

Route independent failures into separate owned workstreams. Issues must be independent, file ownership must not overlap, and runtime delegation must be available and permitted.

/ak:fix three unrelated CI failures --parallel
--ultra

Ultra verifier

After Steps 0-2 run once, sends the confirmed diagnosis to exactly five read-only fix-plan candidates; a verifier selects one unchanged or rejects all. Conflicts with --quick and --parallel.

/ak:fix flaky payment reconciliation bug --ultra
--advice

Advisory supervision

Ask kongming for counsel after phases, when stuck, and before high-stakes decisions. Advice cannot edit, approve gates, bypass verification, or widen authority.

/ak:fix intermittent production incident --advice

Output / publish flags

Only flags that change the artifact or publish it. Not the full option set.

--skip-journal

Skip journal

Skip the automatic /ak:journal finalization step while keeping the rest of finalize mandatory.

Example

/ak:fix --skip-journal typo in validation message

Modes / Routes

--auto

Autonomous default

Research:
Scout + Diagnose
Review:
Auto-approve if score >= 9.5 and 0 critical
Validate:
Full Step 5
--review

Human-in-loop

Research:
Scout + Diagnose
Review:
Pause at each step
Validate:
Full Step 5
--quick

Trivial issues

Research:
Minimal scout
Review:
No deep orchestration
Validate:
Exact repro + affected checks
--parallel

Independent issues

Research:
Per-issue scout
Review:
Separate dependency trees
Validate:
Per-issue blast radius
--ultra

Best-of-5 plan

Research:
Steps 0-2 once
Review:
Five read-only candidates + verifier
Validate:
Winner only executes

Don't skip the required step

Each item contrasts a tempting shortcut with the required approach.

Tempting shortcut

I can see the problem, let me fix it.

Do this instead

Seeing symptoms is not root cause analysis. Scout first.

Tempting shortcut

Quick fix now, investigate later.

Do this instead

Later never comes. Diagnose properly now.

Tempting shortcut

Tests pass, so done.

Do this instead

Without prevention and side-effect sweep, the same class can recur or regress elsewhere.

Sample Prompt

Concrete invocations for each flag, subcommand, mode, or route available in the live workflow.

Autonomous bug fix Recommended
/ak:fix --auto login redirects to the wrong page after SSO
Use when:
There is a concrete bug, error, or CI failure that is simple or moderate enough for autonomous routing.
Expected:
Frames outcome, constraints, non-goals, and acceptance; scouts affected files, tests, recent commits, and patterns; diagnoses exact root cause; implements the minimal cause-aligned fix; reruns the repro plus blast-radius checks; then finalizes and journals unless disabled.
Quick compile fix
/ak:fix --quick TypeScript error in UserTable
Use when:
A trivial type or lint issue needs the shorter scout-diagnose-fix loop.
Expected:
Performs minimal scout, captures exact error, fixes the cause, and reruns the targeted repro.
Critical review mode
/ak:fix --review production payment timeout
Use when:
Production or critical paths require approval checkpoints.
Expected:
Pauses at each step, never bypasses root-cause gates, and proves blast-radius safety.
Ultra plan selection
/ak:fix --ultra race condition in websocket reconnect
Use when:
The diagnosis is known but fix selection is risky or subtle.
Expected:
Runs one diagnosis packet, five read-only candidate plans, verifier selection, then one implementation path.
Parallel independent fixes
/ak:fix --parallel three unrelated CI failures
Use when:
Two or more independent failures can be owned by separate workstreams.
Expected:
Splits independent issues with non-overlapping file ownership, fixes each stream, then reruns the combined repro and blast-radius checks.

Handled Scope

  • Bug, error, lint, type, test, CI/CD, and UI issue repair
  • Codebase scout, recent-change analysis, and affected-test mapping
  • Structured diagnosis with debug and sequential-thinking techniques
  • Complexity routing across quick, standard, deep, parallel, and ultra workflows
  • Regression prevention, blast-radius side-effect sweeps, and final reporting

Related skills

Next