# Coding Agent Delegation Brief

AI Usage Playbook / Studio Nani

Purpose: give Claude Code, Codex, ChatGPT, or another coding agent a bounded task with scope, constraints, acceptance criteria, and verification commands before it touches code.

## How to use it

- Fill this out before delegating a feature slice, bug fix, UI pass, or refactor.
- Keep the task small.
- Name allowed files and forbidden files explicitly.
- Include a real verification command in the acceptance criteria.

## Delegation Brief Template

```text
# Coding Agent Delegation Brief

## Task
[define the task in one sentence]

## Goal
The user/product problem this task should solve:
- [goal]

## Scope
Allowed files or folders:
- [allowed path 1]
- [allowed path 2]

Do not touch:
- [forbidden path/area]
- [sensitive file/config]

## Current problem
Observed behavior:
- [current problem]

Expected behavior:
- [desired behavior]

Reproduction / entry point:
- [URL, command, screen, test, log]

## Constraints
- Keep changes minimal and focused.
- Do not introduce paid services, new cloud resources, secrets, or destructive commands.
- Do not rewrite unrelated architecture.
- Preserve existing public URLs and content unless explicitly required.
- If the task is ambiguous, state assumptions before editing.

## Acceptance criteria
- [acceptance criterion 1]
- [acceptance criterion 2]
- [acceptance criterion 3]

## Verification commands
Run:
```bash
[build/test/lint command]
```

If this is UI work, also verify:
- desktop browser render
- mobile width [example: 390px]
- console errors
- horizontal overflow

## Required final report
Return:
- files changed
- what changed
- exact verification commands and results
- screenshot or URL if UI changed
- remaining risks
```

## Example: UI overflow fix

```text
# Coding Agent Delegation Brief

## Task
Fix mobile horizontal overflow on the Korean home page.

## Goal
Users should be able to read the home page on 390px mobile width without sideways scrolling.

## Scope
Allowed files:
- src/pages/[lang]/index.astro
- src/components/PatternCard.astro

Do not touch:
- data content files
- deployment config
- analytics/ads files

## Current problem
Observed behavior:
- /ko/ has horizontal overflow on mobile.

Expected behavior:
- documentElement.scrollWidth equals clientWidth at 390px.

## Constraints
- Do not remove content.
- Preserve desktop layout.
- Prefer wrapping and width constraints over hiding important text.

## Acceptance criteria
- npm run build passes.
- /ko/ has no horizontal overflow at 390px.
- Browser console has no JS errors.

## Verification commands
Run:
```bash
npm run build
```

UI verify:
- open /ko/
- probe scrollWidth/clientWidth at 390px
- capture screenshot if available
```

## Pre-delegation checklist

- [ ] Is the task small enough to finish in one pass?
- [ ] Are allowed files limited?
- [ ] Is forbidden scope explicit?
- [ ] Are acceptance criteria written from the user/product perspective?
- [ ] Is there a real verification command?
- [ ] Is the final report format specified?

## Limit

Do not delegate secrets, billing, deployment, deletion, public publishing, or product strategy decisions to a coding agent without explicit human approval.
