# High-leverage recipes

>  © 2026 Quadropic Pvt Ltd. Proprietary and confidential. [Use restrictions](NOTICE.md).

These recipes are starting points. Replace bracketed text with concrete paths, commands, and acceptance criteria.

## Understand an unfamiliar repository

**Use:** Ask, Standard or Hunter, Code Atlas indexed.

```text
Orient me to this repository without editing.

Explain:
1. how development starts;
2. the runtime entry points;
3. the main architectural layers and their dependency direction;
4. where configuration and persisted state live;
5. the narrowest tests for [feature].

Cite real files and commands. Distinguish verified facts from inference. Finish
with the five files I should read next and why.
```

Follow with a narrower trace instead of asking for “more detail”:

```text
Trace [user action] from its UI event through services and persistence to the
final side effect. Include error and cleanup paths.
```

## Plan a cross-cutting feature

**Use:** Architect + Hunter.

```text
Plan [feature] after inspecting the current implementation.

Outcome:
[observable user behavior]

Constraints:
- preserve [API/data format]
- no new dependency
- support [platform/version]

The plan must identify affected files, data flow, migration/compatibility,
failure handling, focused validation, rollout risk, and open questions. Do not
modify implementation code.
```

Review the plan, answer open questions, then start a new Submit thread that mentions the plan.

## Fix a reproducible bug

**Use:** Debug, preferably in a Virtual Edit.

```text
Debug and fix [symptom].

Reproduction:
1. ...
2. ...

Expected: ...
Actual: ...
First causal error/log: ...

Inspect and reproduce before editing. Identify the root cause, make the smallest
coherent fix, add a regression test, and run [focused command]. Preserve [known
behavior]. If the evidence points outside [scope], stop and explain.
```

## Investigate without changing code

**Use:** Ask or Debug with an explicit no-edit boundary.

```text
Diagnose only; do not edit files or run destructive commands.

Determine why [symptom]. Provide:
- most likely root cause;
- evidence with file/line or command output;
- alternative hypotheses you ruled out;
- smallest safe fix;
- test that would fail before and pass after.
```

## Refactor safely

**Use:** Architect first for broad refactors; Submit in a Virtual Edit.

```text
Refactor [component] to [goal] without changing externally observable behavior.

Invariants:
- public API remains ...
- persisted format remains ...
- performance must not regress on ...

First map callers and existing tests. Make the change in small coherent steps,
add characterization coverage where behavior is implicit, and validate with
[commands]. Do not mix unrelated cleanup into the diff.
```

## Implement from a screenshot

**Use:** Design preset, attach current and target images.

```text
Implement the target UI shown in image 2; image 1 is the current state.

Scope: @path/to/component and its styles/tests.
Preserve responsive behavior, keyboard access, focus visibility, reduced-motion
support, and the existing design tokens. Do not hard-code content from the
screenshot. Validate at [viewport sizes] and summarize any visual difference
you could not remove.
```

## Review a diff

**Use:** Fresh Ask thread, no edits.

```text
Review the current Git diff without editing.

Look for correctness bugs, regression risk, concurrency/lifecycle issues,
security/privacy problems, incompatible API or persistence changes, weak error
handling, and missing tests. Rank only actionable findings by severity. Cite
the exact file and explain the failure scenario. If no material issue exists,
say so and identify residual validation risk.
```

For a security review, use a custom “Security review” preset or Hunter and add the threat boundary.

## Update dependencies conservatively

**Use:** Architect if several major versions; otherwise Submit in a Virtual Edit.

```text
Update [dependency] from [old] to [target].

Before editing, inspect official migration requirements already present in the
repo or available documentation. Change only files required by this upgrade,
preserve lockfile integrity, and do not upgrade adjacent packages unless
compatibility requires it. Run [install], [typecheck], and [focused tests].
Report every transitive or configuration change.
```

Keep package-manager network and install tools on Ask.

## Add regression coverage only

**Use:** Submit.

```text
Add a regression test for [behavior] without changing production code.

The test must reproduce [failure mechanism], use the nearest existing test
style, and fail against the pre-fix behavior for the right reason. Run only the
narrow test target. If the production API is not testable without a change,
stop and explain the smallest seam required.
```

## Prepare a clean commit

**Use:** Git agent handoff or Submit in the active thread.

```text
Review the working tree and prepare one commit for [purpose].

Do not stage unrelated user changes. Show me the intended file set and a concise
commit message before staging. After approval, stage selectively, show
git diff --cached --stat, and commit. Do not push.
```

The direct Git **Add Current Changes** action stages everything, so agent handoff or `git add -p` is safer in a dirty tree.

## Coordinate a multi-workspace change

**Use:** Conductor with all relevant directories selected.

```text
Coordinate [outcome] across the selected workspaces.

Create a named room and define shared compatibility constraints. Assign:
- one owner for [workspace/subsystem A];
- one owner for [workspace/subsystem B];
- one owner for contract/integration tests;
- one final reviewer after both implementations finish.

Start the implementation owners now. Keep ownership disjoint, use one shared
validation owner, and write the approved contract plus integration checklist to
room artifacts. Do not merge room work or push. Stop and ask before breaking
backward compatibility.
```

## Create a recurring read-only audit

**Use:** Scheduled Task → Workspace.

```text
Inspect changes from the last [period] for [risk category]. Do not edit, install,
commit, push, or contact external services. If you find an issue, create a
concise report with severity, evidence, affected behavior, and the smallest next
step. If no issue is found, report the scope examined and checks run.
```

Run it manually once before trusting the schedule.

## Turn a repeated workflow into a Skill

**Use:** Marketplace → Add skill.

Draft the Skill around a trigger and procedure:

```text
Use this Skill when [clear trigger].

1. Inspect [sources].
2. Validate [preconditions].
3. Perform [bounded procedure].
4. Stop and ask if [risk boundary].
5. Verify with [commands].
6. Report [required evidence].
```

Make it User invoked until its trigger and behavior are proven.

## Recover a drifting long thread

**Use:** Context compression or a fresh thread.

If the objective is unchanged:

1. Compress context.
2. Send:

```text
Continue the same objective. Treat these as authoritative:
- outcome: ...
- constraints: ...
- accepted decisions: ...
- current failing check: ...
- next step: ...
Discard earlier hypotheses that conflict with this checkpoint.
```

If the objective changed, start a new thread and mention the durable plan, artifact, or files instead of carrying the whole transcript forward.
