Install Workflow Orchestration
Invoke as $provision-agentic-config.
Use this skill when the user wants the repository's CLAUDE.md and AGENTS.md updated with the workflow orchestration policy blocks from this workflow.
Target
- Current repository files:
./CLAUDE.md and ./AGENTS.md
Workflow
- Ensure
./CLAUDE.md and ./AGENTS.md exist.
- Insert the Claude policy block below verbatim into
CLAUDE.md.
- Insert the AGENTS policy block below verbatim into
AGENTS.md.
- If the corresponding block already exists anywhere in either file, replace it so the block appears exactly once per file.
- Preserve any unrelated content already in
CLAUDE.md and AGENTS.md.
- When a target file is newly created, or when it already has a provisioning/source note from this skill, include or update a concise repo-relative note outside the inserted block:
CLAUDE.md: Provisioned artifact: ./CLAUDE.md. Source: workflow.md. Verification: block appears exactly once.
AGENTS.md: Provisioned artifact: ./AGENTS.md. Source: workflow.md. Verification: block appears exactly once.
- If
workflow.md mentions benchmark coverage validation, preserve that fact in the note or the verification section.
- Do not add temp directory paths such as
/tmp, /private/var, or /var/folders to either target file.
- Each block begins with
<!-- provision-agentic-config v0.2 -->. When replacing an existing block, update this comment to the current version. The /sync skill uses this comment to detect stale provisioning.
Required Claude Block
<!-- provision-agentic-config v0.2 -->
## Workflow Orchestration
### 1. Plan Mode Default
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
- If something goes sideways, STOP and re-plan immediately - don't keep pushing
- Verification is mandatory, but routine no-op verification runs inside the active execution/shipping step. Enter plan mode for non-trivial remediation or new work discovered by verification, not for validation that already has clear commands and no expected source changes.
- Write detailed specs upfront to reduce ambiguity
- In Codex: use `update_plan` in Default mode and `request_user_input` only when already in Plan mode
- Do not assume a Claude-style clear-context-on-accept flow or related JSON setting exists
### 2. Subagent Strategy
- Use subagents liberally to keep main context window clean
- Offload research, exploration, and parallel analysis to subagents
- For complex problems, throw more compute at it via subagents
- One task per subagent for focused execution
- For `agent-team` parallel write lanes, require separate GitHub branches per lane and include a consolidation/PR review step before final integration. This is the explicit exception to direct-to-primary work.
### 3. Self-Improvement Loop
- After ANY correction from the user: update `tasks/lessons.md` with the pattern
- Write rules for yourself that prevent the same mistake
- Ruthlessly iterate on these lessons until mistake rate drops
- Review lessons at session start for relevant project
### 4. Verification Before Done
- Never mark a task complete without proving it works
- Diff your behavior between main and your changes when relevant
- Ask yourself: "Would a staff engineer approve this?"
- Run tests, check logs, demonstrate correctness
### 5. Demand Elegance (Balanced)
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple, obvious fixes - don't over-engineer
- Challenge your own work before presenting it
### 6. Autonomous Bug Fixing
- When given a bug report: just fix it. Don't ask for hand-holding
- Point at logs, errors, failing tests - then resolve them
- Zero context switching required from the user
- Go fix failing tests without being told how
## Task Management
1. **Plan First**: Write plan to `tasks/roadmap.md` (full plan) and `tasks/todo.md` (current phase) with checkable items
2. **Verify Plan**: Check in before starting implementation
3. **Track Progress**: Mark items complete as you go
4. **Explain Changes**: High-level summary at each step
5. **Document Results**: Add review section to `tasks/todo.md`
6. **Capture Lessons**: Update `tasks/lessons.md` after corrections
## Core Principles
- **Simplicity First**: Make every change as simple as possible. Impact minimal code.
- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
- **Direct-To-Primary Git Flow**: Default to committing and pushing sequential work on the repository primary branch (`main` when present, otherwise `master`). Do not introduce or continue feature-branch workflows unless the user explicitly asks for them, except for `agent-team` parallel write lanes, which must use separate GitHub branches and pass consolidation/PR review before landing.
- **Always Ship Mutations**: If a task creates or modifies tracked files, finish by committing and pushing all intended changes before stopping unless the user explicitly says not to. Do not leave a dirty tracked tree or unpushed commits behind.
- **No GitHub Actions**: Do not create, modify, or suggest GitHub Actions workflows unless the user explicitly asks for GitHub Actions. This project does not use GitHub Actions for CI/CD by default.
## Windows/WSL File Opening
- On Windows machines running WSL, convert Linux paths before opening files from shell commands:
```bash
WIN_PATH=$(wslpath -w "$FILE_PATH")
cmd.exe /c start "" "$WIN_PATH"
```
- For HTML files that should open in the Windows browser, prefer a WSL file URI through the Windows PowerShell binary when `cmd.exe /c start` or UNC paths fail:
```bash
DISTRO=${WSL_DISTRO_NAME:-Ubuntu}
URI="file://wsl.localhost/${DISTRO}${FILE_PATH}"
/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -Command "Start-Process '$URI'"
```
- Use WSL detection so this path only runs inside WSL:
```bash
if grep -qi microsoft /proc/version 2>/dev/null; then
cmd.exe /c start "" "$(wslpath -w "$FILE_PATH")"
fi
```
- The `cmd.exe` UNC warning (`UNC paths are not supported. Defaulting to Windows directory.`) is cosmetic; the file still opens correctly.
- The `UtilBindVsockAnyPort: socket failed 1` failure can happen before Windows opens a UNC path. For browser-targeted HTML pages, retry with the `file://wsl.localhost/<distro>/...` PowerShell URI before using editor fallbacks.
Required AGENTS Block
<!-- provision-agentic-config v0.2 -->
## Workflow Orchestration
### 1. Plan Mode Default
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
- If something goes sideways, STOP and re-plan immediately - don't keep pushing
- Verification is mandatory, but routine no-op verification runs inside the active execution/shipping step. Enter plan mode for non-trivial remediation or new work discovered by verification, not for validation that already has clear commands and no expected source changes.
- Write detailed specs upfront to reduce ambiguity
- In Codex: use `update_plan` in Default mode and `request_user_input` only when already in Plan mode
- Do not assume a Claude-style clear-context-on-accept flow or related JSON setting exists
### 2. Subagent Strategy
- Use subagents only when the active Codex tool instructions allow them.
- When subagents are available and permitted, delegate independent research, exploration, or execution lanes with non-overlapping scopes.
- One task per subagent for focused execution.
- Do not override Codex's current subagent permission, tool availability, or parallel-work rules.
- For `agent-team` parallel write lanes, require separate GitHub branches per lane and include a consolidation/PR review step before final integration. This is the explicit exception to direct-to-primary work.
### 3. Self-Improvement Loop
- After ANY correction from the user: update `tasks/lessons.md` with the pattern
- Write rules for yourself that prevent the same mistake
- Ruthlessly iterate on these lessons until mistake rate drops
- Review lessons at session start for relevant project
### 4. Verification Before Done
- Never mark a task complete without proving it works
- Diff your behavior between main and your changes when relevant
- Ask yourself: "Would a staff engineer approve this?"
- Run tests, check logs, demonstrate correctness
### 5. Demand Elegance (Balanced)
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple, obvious fixes - don't over-engineer
- Challenge your own work before presenting it
### 6. Autonomous Bug Fixing
- When given a bug report: just fix it. Don't ask for hand-holding
- Point at logs, errors, failing tests - then resolve them
- Zero context switching required from the user
- Go fix failing tests without being told how
## Task Management
1. **Plan First**: Write plan to `tasks/roadmap.md` (full plan) and `tasks/todo.md` (current phase) with checkable items
2. **Verify Plan**: Check in before starting implementation
3. **Track Progress**: Mark items complete as you go
4. **Explain Changes**: High-level summary at each step
5. **Document Results**: Add review section to `tasks/todo.md`
6. **Capture Lessons**: Update `tasks/lessons.md` after corrections
## Core Principles
- **Simplicity First**: Make every change as simple as possible. Impact minimal code.
- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
- **Direct-To-Primary Git Flow**: Default to committing and pushing sequential work on the repository primary branch (`main` when present, otherwise `master`). Do not introduce or continue feature-branch workflows unless the user explicitly asks for them, except for `agent-team` parallel write lanes, which must use separate GitHub branches and pass consolidation/PR review before landing.
- **Always Ship Mutations**: If a task creates or modifies tracked files, finish by committing and pushing all intended changes before stopping unless the user explicitly says not to. Do not leave a dirty tracked tree or unpushed commits behind.
- **No GitHub Actions**: Do not create, modify, or suggest GitHub Actions workflows unless the user explicitly asks for GitHub Actions. This project does not use GitHub Actions for CI/CD by default.
## Windows/WSL File Opening
- On Windows machines running WSL, convert Linux paths before opening files from shell commands:
```bash
WIN_PATH=$(wslpath -w "$FILE_PATH")
cmd.exe /c start "" "$WIN_PATH"
```
- For HTML files that should open in the Windows browser, prefer a WSL file URI through the Windows PowerShell binary when `cmd.exe /c start` or UNC paths fail:
```bash
DISTRO=${WSL_DISTRO_NAME:-Ubuntu}
URI="file://wsl.localhost/${DISTRO}${FILE_PATH}"
/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -Command "Start-Process '$URI'"
```
- Use WSL detection so this path only runs inside WSL:
```bash
if grep -qi microsoft /proc/version 2>/dev/null; then
cmd.exe /c start "" "$(wslpath -w "$FILE_PATH")"
fi
```
- The `cmd.exe` UNC warning (`UNC paths are not supported. Defaulting to Windows directory.`) is cosmetic; the file still opens correctly.
- The `UtilBindVsockAnyPort: socket failed 1` failure can happen before Windows opens a UNC path. For browser-targeted HTML pages, retry with the `file://wsl.localhost/<distro>/...` PowerShell URI before using editor fallbacks.
Conditionally add Monorepo Parallel-Work Safety:
Detect whether the target repo is a monorepo by checking these heuristics (any match = monorepo):
pnpm-workspace.yaml exists at repo root
package.json at repo root has a workspaces field
lerna.json exists at repo root
- A
packages/ or apps/ directory exists at repo root with 2+ subdirectories that each contain a package.json
If monorepo detected: append the following section after ### 6. Autonomous Bug Fixing and before ## Task Management in both target files:
### 7. Monorepo Parallel-Work Safety
- NEVER run `pnpm install`, `pnpm add`, `npm install`, `yarn add`, or any command that modifies a shared lockfile (`pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`) when running as one of multiple parallel agents in a monorepo
- All dependency changes must be pre-staged in a single serial session before parallel work begins
- Parallel agents must only write files within their own package directory (e.g. `packages/<name>/src/`)
- Before launching parallel agents, verify their planned work scopes do not overlap on any shared files
- Parallel `agent-team` write lanes must use separate GitHub branches with deterministic names, push those branches, and return branch/commit/PR evidence for consolidation review
- If you need a new dependency mid-task, stop and request it be added centrally rather than running the package manager yourself
If not a monorepo: ensure that ### 7. Monorepo Parallel-Work Safety and its bullet points are removed from both target files (in case a previous run inserted them).
Output
After updating the files, report:
- Whether
./CLAUDE.md and ./AGENTS.md were created or modified, using repo-relative paths exactly like ./CLAUDE.md and ./AGENTS.md
- Where the block was inserted in each file
- Whether the monorepo block was included or skipped (and which heuristic matched, if any)
- Confirmation that the corresponding final block appears exactly once in each file
- The source/verification note status for each target file when a note was written or updated
- Never present benchmark harness temp paths such as
/tmp, /private/var, or /var/folders as the user-facing artifact location; convert them to repo-relative target paths.
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.
1---
2name: provision-agentic-config-3
3description: Provision workflow orchestration and agent conventions into project CLAUDE.md and AGENTS.md
4type: ops
5version: v0.1
6metadata:
7 source: https://skillmd.com/skills/georgeqle/provision-agentic-config-3
8---
9
10# Install Workflow Orchestration
11
12Invoke as `$provision-agentic-config`.
13
14Use this skill when the user wants the repository's `CLAUDE.md` and `AGENTS.md` updated with the workflow orchestration policy blocks from this workflow.
15
16## Target
17
18- Current repository files: `./CLAUDE.md` and `./AGENTS.md`
19
20## Workflow
21
221. Ensure `./CLAUDE.md` and `./AGENTS.md` exist.
232. Insert the Claude policy block below verbatim into `CLAUDE.md`.
243. Insert the AGENTS policy block below verbatim into `AGENTS.md`.
254. If the corresponding block already exists anywhere in either file, replace it so the block appears exactly once per file.
265. Preserve any unrelated content already in `CLAUDE.md` and `AGENTS.md`.
276. When a target file is newly created, or when it already has a provisioning/source note from this skill, include or update a concise repo-relative note outside the inserted block:
28 - `CLAUDE.md`: `Provisioned artifact: ./CLAUDE.md. Source: workflow.md. Verification: block appears exactly once.`
29 - `AGENTS.md`: `Provisioned artifact: ./AGENTS.md. Source: workflow.md. Verification: block appears exactly once.`
30 - If `workflow.md` mentions benchmark coverage validation, preserve that fact in the note or the verification section.
31 - Do not add temp directory paths such as `/tmp`, `/private/var`, or `/var/folders` to either target file.
327. Each block begins with `<!-- provision-agentic-config v0.2 -->`. When replacing an existing block, update this comment to the current version. The `/sync` skill uses this comment to detect stale provisioning.
33
34## Required Claude Block
35
36````md
37<!-- provision-agentic-config v0.2 -->
38## Workflow Orchestration
39
40### 1. Plan Mode Default
41- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
42- If something goes sideways, STOP and re-plan immediately - don't keep pushing
43- Verification is mandatory, but routine no-op verification runs inside the active execution/shipping step. Enter plan mode for non-trivial remediation or new work discovered by verification, not for validation that already has clear commands and no expected source changes.
44- Write detailed specs upfront to reduce ambiguity
45- In Codex: use `update_plan` in Default mode and `request_user_input` only when already in Plan mode
46- Do not assume a Claude-style clear-context-on-accept flow or related JSON setting exists
47
48### 2. Subagent Strategy
49- Use subagents liberally to keep main context window clean
50- Offload research, exploration, and parallel analysis to subagents
51- For complex problems, throw more compute at it via subagents
52- One task per subagent for focused execution
53- For `agent-team` parallel write lanes, require separate GitHub branches per lane and include a consolidation/PR review step before final integration. This is the explicit exception to direct-to-primary work.
54
55### 3. Self-Improvement Loop
56- After ANY correction from the user: update `tasks/lessons.md` with the pattern
57- Write rules for yourself that prevent the same mistake
58- Ruthlessly iterate on these lessons until mistake rate drops
59- Review lessons at session start for relevant project
60
61### 4. Verification Before Done
62- Never mark a task complete without proving it works
63- Diff your behavior between main and your changes when relevant
64- Ask yourself: "Would a staff engineer approve this?"
65- Run tests, check logs, demonstrate correctness
66
67### 5. Demand Elegance (Balanced)
68- For non-trivial changes: pause and ask "is there a more elegant way?"
69- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
70- Skip this for simple, obvious fixes - don't over-engineer
71- Challenge your own work before presenting it
72
73### 6. Autonomous Bug Fixing
74- When given a bug report: just fix it. Don't ask for hand-holding
75- Point at logs, errors, failing tests - then resolve them
76- Zero context switching required from the user
77- Go fix failing tests without being told how
78
79## Task Management
80
811. **Plan First**: Write plan to `tasks/roadmap.md` (full plan) and `tasks/todo.md` (current phase) with checkable items
822. **Verify Plan**: Check in before starting implementation
833. **Track Progress**: Mark items complete as you go
844. **Explain Changes**: High-level summary at each step
855. **Document Results**: Add review section to `tasks/todo.md`
866. **Capture Lessons**: Update `tasks/lessons.md` after corrections
87
88## Core Principles
89- **Simplicity First**: Make every change as simple as possible. Impact minimal code.
90- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
91- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
92- **Direct-To-Primary Git Flow**: Default to committing and pushing sequential work on the repository primary branch (`main` when present, otherwise `master`). Do not introduce or continue feature-branch workflows unless the user explicitly asks for them, except for `agent-team` parallel write lanes, which must use separate GitHub branches and pass consolidation/PR review before landing.
93- **Always Ship Mutations**: If a task creates or modifies tracked files, finish by committing and pushing all intended changes before stopping unless the user explicitly says not to. Do not leave a dirty tracked tree or unpushed commits behind.
94- **No GitHub Actions**: Do not create, modify, or suggest GitHub Actions workflows unless the user explicitly asks for GitHub Actions. This project does not use GitHub Actions for CI/CD by default.
95
96## Windows/WSL File Opening
97- On Windows machines running WSL, convert Linux paths before opening files from shell commands:
98
99```bash
100WIN_PATH=$(wslpath -w "$FILE_PATH")
101cmd.exe /c start "" "$WIN_PATH"
102```
103
104- For HTML files that should open in the Windows browser, prefer a WSL file URI through the Windows PowerShell binary when `cmd.exe /c start` or UNC paths fail:
105
106```bash
107DISTRO=${WSL_DISTRO_NAME:-Ubuntu}
108URI="file://wsl.localhost/${DISTRO}${FILE_PATH}"
109/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -Command "Start-Process '$URI'"
110```
111
112- Use WSL detection so this path only runs inside WSL:
113
114```bash
115if grep -qi microsoft /proc/version 2>/dev/null; then
116 cmd.exe /c start "" "$(wslpath -w "$FILE_PATH")"
117fi
118```
119
120- The `cmd.exe` UNC warning (`UNC paths are not supported. Defaulting to Windows directory.`) is cosmetic; the file still opens correctly.
121- The `UtilBindVsockAnyPort: socket failed 1` failure can happen before Windows opens a UNC path. For browser-targeted HTML pages, retry with the `file://wsl.localhost/<distro>/...` PowerShell URI before using editor fallbacks.
122````
123
124## Required AGENTS Block
125
126````md
127<!-- provision-agentic-config v0.2 -->
128## Workflow Orchestration
129
130### 1. Plan Mode Default
131- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
132- If something goes sideways, STOP and re-plan immediately - don't keep pushing
133- Verification is mandatory, but routine no-op verification runs inside the active execution/shipping step. Enter plan mode for non-trivial remediation or new work discovered by verification, not for validation that already has clear commands and no expected source changes.
134- Write detailed specs upfront to reduce ambiguity
135- In Codex: use `update_plan` in Default mode and `request_user_input` only when already in Plan mode
136- Do not assume a Claude-style clear-context-on-accept flow or related JSON setting exists
137
138### 2. Subagent Strategy
139- Use subagents only when the active Codex tool instructions allow them.
140- When subagents are available and permitted, delegate independent research, exploration, or execution lanes with non-overlapping scopes.
141- One task per subagent for focused execution.
142- Do not override Codex's current subagent permission, tool availability, or parallel-work rules.
143- For `agent-team` parallel write lanes, require separate GitHub branches per lane and include a consolidation/PR review step before final integration. This is the explicit exception to direct-to-primary work.
144
145### 3. Self-Improvement Loop
146- After ANY correction from the user: update `tasks/lessons.md` with the pattern
147- Write rules for yourself that prevent the same mistake
148- Ruthlessly iterate on these lessons until mistake rate drops
149- Review lessons at session start for relevant project
150
151### 4. Verification Before Done
152- Never mark a task complete without proving it works
153- Diff your behavior between main and your changes when relevant
154- Ask yourself: "Would a staff engineer approve this?"
155- Run tests, check logs, demonstrate correctness
156
157### 5. Demand Elegance (Balanced)
158- For non-trivial changes: pause and ask "is there a more elegant way?"
159- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
160- Skip this for simple, obvious fixes - don't over-engineer
161- Challenge your own work before presenting it
162
163### 6. Autonomous Bug Fixing
164- When given a bug report: just fix it. Don't ask for hand-holding
165- Point at logs, errors, failing tests - then resolve them
166- Zero context switching required from the user
167- Go fix failing tests without being told how
168
169## Task Management
170
1711. **Plan First**: Write plan to `tasks/roadmap.md` (full plan) and `tasks/todo.md` (current phase) with checkable items
1722. **Verify Plan**: Check in before starting implementation
1733. **Track Progress**: Mark items complete as you go
1744. **Explain Changes**: High-level summary at each step
1755. **Document Results**: Add review section to `tasks/todo.md`
1766. **Capture Lessons**: Update `tasks/lessons.md` after corrections
177
178## Core Principles
179- **Simplicity First**: Make every change as simple as possible. Impact minimal code.
180- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
181- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
182- **Direct-To-Primary Git Flow**: Default to committing and pushing sequential work on the repository primary branch (`main` when present, otherwise `master`). Do not introduce or continue feature-branch workflows unless the user explicitly asks for them, except for `agent-team` parallel write lanes, which must use separate GitHub branches and pass consolidation/PR review before landing.
183- **Always Ship Mutations**: If a task creates or modifies tracked files, finish by committing and pushing all intended changes before stopping unless the user explicitly says not to. Do not leave a dirty tracked tree or unpushed commits behind.
184- **No GitHub Actions**: Do not create, modify, or suggest GitHub Actions workflows unless the user explicitly asks for GitHub Actions. This project does not use GitHub Actions for CI/CD by default.
185
186## Windows/WSL File Opening
187- On Windows machines running WSL, convert Linux paths before opening files from shell commands:
188
189```bash
190WIN_PATH=$(wslpath -w "$FILE_PATH")
191cmd.exe /c start "" "$WIN_PATH"
192```
193
194- For HTML files that should open in the Windows browser, prefer a WSL file URI through the Windows PowerShell binary when `cmd.exe /c start` or UNC paths fail:
195
196```bash
197DISTRO=${WSL_DISTRO_NAME:-Ubuntu}
198URI="file://wsl.localhost/${DISTRO}${FILE_PATH}"
199/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -Command "Start-Process '$URI'"
200```
201
202- Use WSL detection so this path only runs inside WSL:
203
204```bash
205if grep -qi microsoft /proc/version 2>/dev/null; then
206 cmd.exe /c start "" "$(wslpath -w "$FILE_PATH")"
207fi
208```
209
210- The `cmd.exe` UNC warning (`UNC paths are not supported. Defaulting to Windows directory.`) is cosmetic; the file still opens correctly.
211- The `UtilBindVsockAnyPort: socket failed 1` failure can happen before Windows opens a UNC path. For browser-targeted HTML pages, retry with the `file://wsl.localhost/<distro>/...` PowerShell URI before using editor fallbacks.
212````
213
2145. **Conditionally add Monorepo Parallel-Work Safety:**
215
216 Detect whether the target repo is a monorepo by checking these heuristics (any match = monorepo):
217 1. `pnpm-workspace.yaml` exists at repo root
218 2. `package.json` at repo root has a `workspaces` field
219 3. `lerna.json` exists at repo root
220 4. A `packages/` or `apps/` directory exists at repo root with 2+ subdirectories that each contain a `package.json`
221
222 **If monorepo detected:** append the following section after `### 6. Autonomous Bug Fixing` and before `## Task Management` in both target files:
223
224 ```markdown
225 ### 7. Monorepo Parallel-Work Safety
226 - NEVER run `pnpm install`, `pnpm add`, `npm install`, `yarn add`, or any command that modifies a shared lockfile (`pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`) when running as one of multiple parallel agents in a monorepo
227 - All dependency changes must be pre-staged in a single serial session before parallel work begins
228 - Parallel agents must only write files within their own package directory (e.g. `packages/<name>/src/`)
229 - Before launching parallel agents, verify their planned work scopes do not overlap on any shared files
230 - Parallel `agent-team` write lanes must use separate GitHub branches with deterministic names, push those branches, and return branch/commit/PR evidence for consolidation review
231 - If you need a new dependency mid-task, stop and request it be added centrally rather than running the package manager yourself
232 ```
233
234 **If not a monorepo:** ensure that `### 7. Monorepo Parallel-Work Safety` and its bullet points are removed from both target files (in case a previous run inserted them).
235
236## Output
237
238After updating the files, report:
239
240- Whether `./CLAUDE.md` and `./AGENTS.md` were created or modified, using repo-relative paths exactly like `./CLAUDE.md` and `./AGENTS.md`
241- Where the block was inserted in each file
242- Whether the monorepo block was included or skipped (and which heuristic matched, if any)
243- Confirmation that the corresponding final block appears exactly once in each file
244- The source/verification note status for each target file when a note was written or updated
245- Never present benchmark harness temp paths such as `/tmp`, `/private/var`, or `/var/folders` as the user-facing artifact location; convert them to repo-relative target paths.
246
247
248## Default Shipping Contract
249
250Follow the shared shipping contract convention in CLAUDE.md.