Skip to content

Commit fd1646f

Browse files
committed
docs: custom agent 사이드 작업 지침 반영
1 parent 27890e6 commit fd1646f

3 files changed

Lines changed: 69 additions & 33 deletions

File tree

.agents/roles.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Use these model tiers when assigning work to another LLM.
2727
| Tier | Use | Default model |
2828
| --- | --- | --- |
2929
| `Primary` | Planning, implementation, architecture decisions, final integration, failed-check triage | Strongest available Codex/GPT coding model |
30-
| `Lightweight` | Read-only review, checklist validation, log summarization, documentation draft, first-pass architecture preflight | Best available lightweight coding model that is different from the active `Primary` model |
31-
| `Fast` | Low-risk text cleanup, simple file presence checks, short summaries | Fastest available coding model that is different from the active `Primary` model |
30+
| `Lightweight` | Read-only review, checklist validation, log summarization, documentation draft, first-pass architecture preflight | Pinned non-Primary model from the configured custom agent TOML |
31+
| `Fast` | Low-risk text cleanup, simple file presence checks, short summaries | Pinned fast model from the configured custom agent TOML when a Fast role is defined |
3232

3333
Default role-to-model and execution assignment:
3434

@@ -59,11 +59,32 @@ Do not assign `Lightweight` as the only model for production Swift implementatio
5959
- If the assigned model is available but current tool policy requires explicit user permission before dispatch, missing permission is not fallback. Stop and ask for permission before continuing the required role.
6060
- `Primary` must integrate and verify delegated output, but must not skip the delegated role when the workflow requires it and the assigned model is available.
6161

62+
### Connected side-task dispatch
63+
64+
- Run every `Lightweight` or `Fast` role as a side task connected to the current main task.
65+
- Use `spawn_agent` from tools or `Option-Command-S` from the UI sidebar. Treat both as the same connected dispatch surface.
66+
- Set `spawn_agent.task_name` to the exact `.codex/agents/<name>.toml` filename without the extension and the exact TOML `name` value.
67+
- Do not add arbitrary prefixes or suffixes to `task_name`. Names such as `issue_documentation_writer` and `documentation_writer_issue` do not select the configured custom agent.
68+
- Return each role result to the current main task so `Primary` can review and integrate it.
69+
- Send later work for the same role to the existing agent with `followup_task` instead of creating another agent name.
70+
- Do not use external `codex exec` or a separate user-owned `create_thread` as a repository role dispatch surface.
71+
- Do not count a generic sub-agent that does not select the configured custom agent as a `Lightweight` or `Fast` role execution.
72+
- Do not treat a failure from external `codex exec`, `create_thread`, or an arbitrary `task_name` as proof that the configured custom agent or pinned model is unavailable.
73+
74+
Use these exact role identifiers:
75+
76+
| Role | Exact `task_name` | Configuration |
77+
| --- | --- | --- |
78+
| Architecture Watcher | `architecture_watcher` | `.codex/agents/architecture_watcher.toml` |
79+
| Code Reviewer | `code_reviewer` | `.codex/agents/code_reviewer.toml` |
80+
| Verification Runner | `verification_runner` | `.codex/agents/verification_runner.toml` |
81+
| GitHub/CI Analyst | `github_ci_analyst` | `.codex/agents/github_ci_analyst.toml` |
82+
| Documentation Writer | `documentation_writer` | `.codex/agents/documentation_writer.toml` |
83+
6284
### Fallback policy
6385

64-
- Choose the best available role-capable lightweight coding model without hardcoding a provider or model name.
65-
- If the preferred lightweight model is unavailable, choose another available role-capable model that is still different from the active `Primary` model.
66-
- If no eligible non-Primary model is available, do not fall back to `Primary`; stop and report the unavailable role.
86+
- The configured custom agent TOML is the source of truth for the non-Primary role model and sandbox.
87+
- If a required custom agent or its pinned non-Primary model is unavailable, do not fall back to another model; stop and report the unavailable role.
6788
- If `Primary` is unavailable, do not perform implementation, architecture verdict, final integration, git write actions, or GitHub write actions.
6889
- Do not downgrade `Primary` roles to `Lightweight` or `Fast` only because a cheaper model is available.
6990
- For user-facing summaries, a lower tier may draft text, but `Primary` must check it when the text depends on architecture decisions, release risk, CI root cause, or exact diff behavior.
@@ -125,6 +146,8 @@ Use `Architecture risk: possible` when the task touches module boundaries, impor
125146

126147
Use this template when assigning a `Lightweight` or `Fast` role through its configured custom agent. `Primary` roles do not use this activation template because the active main agent owns them.
127148

149+
Create the connected side task with `spawn_agent.task_name` set to the exact identifier in the routing table. When using the UI sidebar, create the same connected side task with `Option-Command-S`. After the first dispatch, use `followup_task` for later work assigned to the same role.
150+
128151
```md
129152
You are the `<Role Name>` for the DevLog iOS repository.
130153

.agents/workflows.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@ The main agent must run every workflow with this protocol.
1717
3. Create the task packet.
1818
4. Assign only the roles required by the selected workflow.
1919
5. Assign each role a model tier from `.agents/roles.md`.
20-
6. Keep `Primary` roles with the active main agent, and dispatch every `Lightweight` or `Fast` role through the custom agent mapped in `.agents/roles.md`.
21-
7. Dispatch read-only `Lightweight` or `Fast` roles in parallel only when they do not depend on unfinished edits.
22-
8. Do not complete a required `Lightweight` or `Fast` role directly in `Primary`, including when the dispatch tool would inherit the active `Primary` model.
23-
9. Keep `Primary` editing roles sequential unless the files and ownership boundaries are disjoint.
24-
10. Integrate role outputs.
25-
11. Escalate any `Lightweight` or `Fast` blocker to a `Primary` model before editing.
26-
12. Run completion gates.
27-
13. Report changed files, architecture decision, verification result, delegated roles, model tiers used, and unresolved decisions.
20+
6. Keep `Primary` roles with the active main agent.
21+
7. Find the exact custom agent name in `.agents/roles.md` and its matching `.codex/agents/<name>.toml` before dispatching a `Lightweight` or `Fast` role.
22+
8. Create the role as a side task connected to the current main task with `spawn_agent.task_name` set to that exact name, or use `Option-Command-S` from the UI sidebar for the same connected dispatch surface.
23+
9. Do not use external `codex exec`, a separate user-owned `create_thread`, or an arbitrary `task_name` for repository role dispatch.
24+
10. Reuse the existing role agent with `followup_task` when assigning later work to the same role.
25+
11. Return every delegated role result to the current main task for `Primary` review and integration.
26+
12. Do not complete a required `Lightweight` or `Fast` role directly in `Primary`, and do not substitute a generic sub-agent for the configured custom agent.
27+
13. Dispatch read-only `Lightweight` or `Fast` roles in parallel only when they do not depend on unfinished edits.
28+
14. Keep `Primary` editing roles sequential unless the files and ownership boundaries are disjoint.
29+
15. Integrate role outputs.
30+
16. Escalate any `Lightweight` or `Fast` blocker to a `Primary` model before editing.
31+
17. Run completion gates.
32+
18. Report changed files, architecture decision, verification result, delegated roles, model tiers used, and unresolved decisions.
2833

2934
Do not skip the task packet. The task packet is the contract between models.
3035

@@ -35,12 +40,14 @@ Stop and ask the user before editing when:
3540
- The task packet conflicts with `AGENTS.md`.
3641
- The requested fix requires relaxing a layer boundary.
3742
- A role needs to run, launch, install, boot, or open the app or Simulator.
38-
- A required `Lightweight` or `Fast` custom agent cannot be loaded or selected, its pinned model is unavailable, or current tool policy requires user permission that has not been granted.
43+
- A required `Lightweight` or `Fast` custom agent cannot be loaded or selected through the connected side-task surface with its exact `task_name`, its pinned model is unavailable, or current tool policy requires user permission that has not been granted.
3944
- The current issue or PR scope is unclear after live GitHub inspection.
4045
- Two editing roles would touch the same file.
4146
- A read-only role reports `Block` or `Needs Owner Decision`.
4247
- Verification fails for a reason that suggests a scope or architecture decision.
4348

49+
Do not apply the custom-agent stop condition only because external `codex exec`, a separate `create_thread`, or an arbitrary `task_name` failed. Retry through the connected side-task surface with the exact configured name first.
50+
4451
## Workflow selection
4552

4653
| User request | Workflow |
@@ -289,7 +296,7 @@ Architecture Watcher is required only if the change modifies architecture policy
289296
Verification Runner must run:
290297

291298
```sh
292-
git diff --check -- AGENTS.md .agents .codex/agents
299+
git diff --check -- AGENTS.md .agents .codex/agents README.md
293300
```
294301

295302
If only Markdown workflow files changed, no iOS build is required.
@@ -310,6 +317,8 @@ Report:
310317

311318
## Parallel dispatch guide
312319

320+
Use only side tasks connected to the current main task for parallel role dispatch. Create them with exact configured custom agent names through `spawn_agent` or with `Option-Command-S` in the UI sidebar.
321+
313322
Parallelize only these combinations:
314323

315324
- GitHub/CI Analyst reading live GitHub state while Planner inspects local files.
@@ -353,6 +362,8 @@ Include the selected workflow name in the task packet `Source` or `Goal` field s
353362
- Architecture risk: none
354363
- Required roles: Planner, Implementer, Code Reviewer, Verification Runner
355364
- Model assignment: Planner=Primary, Implementer=Primary, Code Reviewer=code_reviewer (Lightweight), Verification Runner=verification_runner (Lightweight)
365+
- Custom agent `task_name`: Code Reviewer=`code_reviewer`, Verification Runner=`verification_runner`
366+
- Result recipient: `Primary` of the current main task
356367
- Verification: `git diff --check -- AGENTS.md .agents .codex/agents README.md`
357368
- Stop conditions: README `docs/` asset policy changes, Swift/iOS code changes, request to remove architecture rules immediately
358369
```
@@ -371,6 +382,8 @@ Include the selected workflow name in the task packet `Source` or `Goal` field s
371382
- Architecture risk: none / possible / confirmed
372383
- Required roles: GitHub/CI Analyst, Planner, Implementer, Code Reviewer, Verification Runner
373384
- Model assignment: GitHub/CI Analyst=github_ci_analyst (Lightweight), Planner=Primary, Implementer=Primary, Code Reviewer=code_reviewer (Lightweight) -> Primary if blocking, Verification Runner=verification_runner (Lightweight)
385+
- Custom agent `task_name`: GitHub/CI Analyst=`github_ci_analyst`, Code Reviewer=`code_reviewer`, Verification Runner=`verification_runner`
386+
- Result recipient: `Primary` of the current main task
374387
- Verification: changed-file SwiftLint for Swift changes, targeted tests or build-only check when applicable
375388
- Stop conditions: unresolved thread requires owner decision, fix relaxes architecture boundary, two comments conflict, CI failure source is unrelated to review feedback
376389
```

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,12 @@ flowchart LR
264264
Integrator["Final Integration"]
265265
end
266266
267-
subgraph Lightweight["gpt-5.3-codex-spark"]
268-
ArchitectureWatcher["Architecture Watcher"]
269-
CodeReviewer["Code Reviewer"]
270-
VerificationRunner["Verification Runner"]
271-
GitHubCIAnalyst["GitHub/CI Analyst"]
272-
DocumentationWriter["Documentation Writer"]
267+
subgraph ConnectedSideTasks["현재 task 연결형 사이드 작업<br/>사이드바: Option-Command-S<br/>도구: spawn_agent"]
268+
ArchitectureWatcher["Architecture Watcher<br/>architecture_watcher"]
269+
CodeReviewer["Code Reviewer<br/>code_reviewer"]
270+
VerificationRunner["Verification Runner<br/>verification_runner"]
271+
GitHubCIAnalyst["GitHub/CI Analyst<br/>github_ci_analyst"]
272+
DocumentationWriter["Documentation Writer<br/>documentation_writer"]
273273
end
274274
275275
subgraph Gate["Gate"]
@@ -280,24 +280,24 @@ flowchart LR
280280
281281
TaskPacket --> Planner
282282
Planner --> Implementer
283-
Planner --> ArchitectureWatcher
283+
Planner -->|"Architecture risk<br/>task_name 선택"| ArchitectureWatcher
284284
ArchitectureWatcher -->|Pass| Implementer
285285
ArchitectureWatcher -->|Block / Decision| Integrator
286286
Implementer --> CodeReviewer
287287
CodeReviewer --> ReviewGate
288288
ReviewGate --> VerificationRunner
289289
VerificationRunner --> VerificationGate
290-
GitHubCIAnalyst --> Planner
291-
DocumentationWriter --> Integrator
290+
GitHubCIAnalyst -->|"현재 task로 결과 반환"| Planner
291+
DocumentationWriter -->|"현재 task로 결과 반환"| Integrator
292292
VerificationGate --> Integrator
293293
```
294294

295-
| 역할 | 모델 | 담당 | 다음 흐름 |
296-
| --- | --- | --- | --- |
297-
| Planner | Primary | 이슈, 요청, 변경 범위, role routing 정리 | Implementer / Architecture Watcher |
298-
| Implementer | Primary | task packet 기준 코드 또는 문서 수정 | Code Reviewer |
299-
| Architecture Watcher | Lightweight -> Primary | layer, target, dependency, SDK placement, Widget/StorePattern 경계 감시 | Implementer / Final Integration |
300-
| Code Reviewer | Lightweight -> Primary | diff 기준 버그, 회귀, 테스트 누락, scope drift 검토 | Verification Runner |
301-
| Verification Runner | gpt-5.3-codex-spark | SwiftLint, test, build-only, docs check 결과 기록 | Final Integration |
302-
| GitHub/CI Analyst | gpt-5.3-codex-spark | issue, PR thread, review comment, workflow run, CI log 분석 | Planner |
303-
| Documentation Writer | gpt-5.3-codex-spark | PR 본문, release note, README, issue/comment 문안 작성 | Final Integration |
295+
| 역할 | 정확한 `task_name` / Custom Agent | 모델 | 담당 | 다음 흐름 |
296+
| --- | --- | --- | --- | --- |
297+
| Planner | active main agent | Primary | 이슈, 요청, 변경 범위, role routing 정리 | Implementer / Architecture Watcher |
298+
| Implementer | active main agent | Primary | task packet 기준 코드 또는 문서 수정 | Code Reviewer |
299+
| Architecture Watcher | `architecture_watcher` | `gpt-5.3-codex-spark` (`Lightweight`) -> Primary | layer, target, dependency, SDK placement, Widget/StorePattern 경계 감시 | Implementer / Final Integration |
300+
| Code Reviewer | `code_reviewer` | `gpt-5.3-codex-spark` (`Lightweight`) -> Primary | diff 기준 버그, 회귀, 테스트 누락, scope drift 검토 | Verification Runner |
301+
| Verification Runner | `verification_runner` | `gpt-5.3-codex-spark` (`Lightweight`) | SwiftLint, test, build-only, docs check 결과 기록 | Final Integration |
302+
| GitHub/CI Analyst | `github_ci_analyst` | `gpt-5.3-codex-spark` (`Lightweight`) | issue, PR thread, review comment, workflow run, CI log 분석 | Planner |
303+
| Documentation Writer | `documentation_writer` | `gpt-5.3-codex-spark` (`Lightweight`) | PR 본문, release note, README, issue/comment 문안 작성 | Final Integration |

0 commit comments

Comments
 (0)