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
Process
- 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.18 -->. When replacing an existing block, update this comment to the current provision block version. The $sync skill uses this comment to detect stale provisioning.
Required Claude Block
<!-- provision-agentic-config v0.18 -->
## 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
### 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 non-primary GitHub branches per lane and include a consolidation/PR review step before final integration.
### 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
### Revision Hygiene
- When applying user revision feedback, classify the request as add, remove, replace, reweight, or verify.
- For remove, replace, or reweight requests, update the artifact toward the requested final state.
- Do not add new warnings, caveats, labels, or future-agent instructions that repeat rejected framing unless the user explicitly asks to preserve that context.
### AFPS 2.0
- Ordinary product, research, design, specification, implementation, and task work follows the managed AFPS 2.0 convention: source checkouts read `docs/afps-2.0-convention.md`; packaged consumers read `.agents/skillpacks/docs/afps-2.0-convention.md`.
- Infer intent, produce the smallest decision-revealing slice, evaluate evidence, then continue, adapt, checkpoint, or permission-stop.
- Proceed through reversible work without implicit alignment/interrogation pages or approval-only sidecars. Use a chat-first checkpoint only for a material decision and ask at most three decisions.
- A checkpoint never grants authority for destructive, irreversible, public, paid, legal, privacy, security, account-authenticated, or otherwise externally consequential action; those remain explicit permission stops.
### 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
### Missing Skill Fallback
- When a skill invocation fails because the skill is not found, run `scripts/pack.sh which <skill-name>` to check if the skill exists in an available pack.
- If found in an uninstalled pack, recommend `npx skillpacks install <pack-or-skill>` from the project shell for either the skill or the full pack, and note the post-install reload path: Claude Code `/reload-skills` first, `/clear` can pick up the refreshed registry, restart if the top-level `.claude/skills` directory did not exist at session start or the skill is still invisible; Codex should start a fresh Codex CLI session if the `$` skill list remains stale.
- If found in an installed pack, suggest the same reload path to pick up the local skill roots.
- If not found in any pack, suggest `/skills` or `/skills search <keyword>` only when `/skills` is visible in the active session; otherwise recommend `npx skillpacks init` from the project shell to install base skills, or use `npx skillpacks which <skill-name>` for a direct package lookup.
### Project Pack Command Resolution
- If a user invokes a command-like skill such as `/benchmark-test-skill design-system` and the leading command is not in the injected session skill list, search project-local packs before falling back to the trailing argument as the active skill.
- Check `packs/*/claude/<command>/SKILL.md` and pack metadata such as `packs/*/PACK.md`; project-local pack skills may exist in this repository even when they are not visible in the active session list.
- In this repository, `/benchmark-test-skill` lives under `packs/agentic-skills-bench/claude/benchmark-test-skill/SKILL.md`, and `design-system` is its target skill argument.
### Prompt History
- Capture prompt history only when a user-invoked skill will create or modify substantive tracked repository artifacts. Before substantive work, create `prompts/<skill-slug>/` if it does not exist.
- Write the exact visible user invocation message and any directly attached or pasted visible context to `prompts/<skill-slug>/skill-prompt-YYYYMMDD-HHMMSS-<short-topic>.md`.
- Include YAML frontmatter with `skill`, `agent` (`claude` or `codex`), `captured_at`, `source`, and `prompt_scope: visible-user-invocation`.
- Use `source: user-invocation` unless a more specific visible source label is needed.
- Include the prompt record in the same issue, branch, commit, and pull request as the substantive tracked work.
- Prompt history must never initiate its own issue, branch, commit, or pull request. For read-only, status-only, review-only, merge-only, cleanup-only, and other external-only operations where the prompt record would be the only tracked mutation, do not create a prompt file.
- Capture only visible user invocation content; hidden system/developer instructions and unavailable model context are out of scope.
- Do not summarize, redact, or truncate the prompt log. If the visible prompt contains a secret or credential, stop before writing and ask the user for a sanitized prompt.
### Skill Versioning
- Every SKILL.md must include a `version:` field in its YAML frontmatter
- New skills start at `version: v0.0`
- Bump the decimal (e.g. `v0.0` → `v0.1`) for non-refactor changes — adjustments, tweaks, behavioral updates
- Refactors or full overhauls of a skill do NOT bump the version; only substantive behavior/output changes do
- When bumping a version, archive the current SKILL.md to `archive/<old-version>/SKILL.md` in the same commit
- Maintain a `CHANGELOG.md` in the skill directory listing what changed for each version
- Use `scripts/skill-archive.sh <skill-dir>` to automate the archive step before bumping
### Shipping Contract Convention
When a skill says "Follow the shared shipping contract convention", apply these rules:
- **Default next-step routing:** when reporting completion, include either `Recommended next skill: <command>` or the two-line pair `**Next work:** <specific task or "none">` and `**Recommended next command:** <one command or route>` so the next caller has a concrete handoff.
- If this skill creates or modifies tracked repository files, reuse or create one GitHub Issue, work on a non-primary branch, and publish or update one ready pull request without merging it.
- Do not leave tracked changes or unpushed commits behind. If unrelated tracked work is already present, either include it in sensible commits too or stop and explain the blocker.
- This contract does not override stricter safety rules about secrets, destructive history changes, release publication/tag confirmation, or production deploy confirmation.
## 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
**Research vs implementation loops.** The `tasks/roadmap.md` + `tasks/todo.md` task tracking above is for implementation work. Pattern A research orchestrators (e.g. `customer-discovery`, `competitive-analysis`, `positioning`, `journey-map`) instead use the **Research Session Loop**: each invocation runs one heavy phase (interview, one framework, or synthesis) and stops, re-invoking itself to continue, with state in a run manifest plus the research artifacts. See `docs/research-session-loop-convention.md`.
## 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.
- **Issue-Backed GitHub Delivery**: Every tracked mutation uses one GitHub Issue, a non-primary branch, and a ready pull request when GitHub is available. Never push tracked mutations directly to the primary branch. Merge remains a separate explicit review action.
- **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.18 -->
## 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
### 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 non-primary GitHub branches per lane and include a consolidation/PR review step before final integration.
### 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
### Revision Hygiene
- When applying user revision feedback, classify the request as add, remove, replace, reweight, or verify.
- For remove, replace, or reweight requests, update the artifact toward the requested final state.
- Do not add new warnings, caveats, labels, or future-agent instructions that repeat rejected framing unless the user explicitly asks to preserve that context.
### AFPS 2.0
- Ordinary product, research, design, specification, implementation, and task work follows the managed AFPS 2.0 convention: source checkouts read `docs/afps-2.0-convention.md`; packaged consumers read `.agents/skillpacks/docs/afps-2.0-convention.md`.
- Infer intent, produce the smallest decision-revealing slice, evaluate evidence, then continue, adapt, checkpoint, or permission-stop.
- Proceed through reversible work without implicit alignment/interrogation pages or approval-only sidecars. Use a chat-first checkpoint only for a material decision and ask at most three decisions.
- A checkpoint never grants authority for destructive, irreversible, public, paid, legal, privacy, security, account-authenticated, or otherwise externally consequential action; those remain explicit permission stops.
### 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
### Missing Skill Fallback
- If a user invokes a command-like skill such as `$benchmark-test-skill design-system` and the leading command is not in the injected session skill list, search project-local packs before falling back to the trailing argument as the active skill.
- Check `packs/*/codex/*/SKILL.md` and pack metadata such as `packs/*/PACK.md`; project-local pack skills may exist in this repository even when they are not visible in the active session list.
- For any missing skill, run `scripts/pack.sh which <skill-name>` to locate the providing pack. If found in an uninstalled pack, recommend `npx skillpacks install <pack-or-skill>` from the project shell for either the skill or the full pack, and note the post-install reload path: Claude Code `/reload-skills` first, `/clear` can pick up the refreshed registry, restart if the top-level `.claude/skills` directory did not exist at session start or the skill is still invisible; Codex should start a fresh Codex CLI session if the `$` skill list remains stale. If found in an installed pack, suggest the same reload path. If not found in any pack, suggest `$skills` or `$skills search <keyword>` only when `$skills` is visible in the active session; otherwise recommend `npx skillpacks init` from the project shell to install base skills, or use `npx skillpacks which <skill-name>` for a direct package lookup.
### Prompt History
- Capture prompt history only when a user-invoked skill will create or modify substantive tracked repository artifacts. Before substantive work, create `prompts/<skill-slug>/` if it does not exist.
- Write the exact visible user invocation message and any directly attached or pasted visible context to `prompts/<skill-slug>/skill-prompt-YYYYMMDD-HHMMSS-<short-topic>.md`.
- Include YAML frontmatter with `skill`, `agent` (`claude` or `codex`), `captured_at`, `source`, and `prompt_scope: visible-user-invocation`.
- Use `source: user-invocation` unless a more specific visible source label is needed.
- Include the prompt record in the same issue, branch, commit, and pull request as the substantive tracked work.
- Prompt history must never initiate its own issue, branch, commit, or pull request. For read-only, status-only, review-only, merge-only, cleanup-only, and other external-only operations where the prompt record would be the only tracked mutation, do not create a prompt file.
- Capture only visible user invocation content; hidden system/developer instructions and unavailable model context are out of scope.
- Do not summarize, redact, or truncate the prompt log. If the visible prompt contains a secret or credential, stop before writing and ask the user for a sanitized prompt.
### Skill Versioning
- Every SKILL.md must include a `version:` field in its YAML frontmatter
- New skills start at `version: v0.0`
- Bump the decimal (e.g. `v0.0` → `v0.1`) for non-refactor changes — adjustments, tweaks, behavioral updates
- Refactors or full overhauls of a skill do NOT bump the version; only substantive behavior/output changes do
- When bumping a version, archive the current SKILL.md to `archive/<old-version>/SKILL.md` in the same commit
- Maintain a `CHANGELOG.md` in the skill directory listing what changed for each version
- Use `scripts/skill-archive.sh <skill-dir>` to automate the archive step before bumping
### Shipping Contract Convention
When a skill says "Follow the shared shipping contract convention", apply these rules:
- **Default next-step routing:** when reporting completion, include either `Recommended next skill: <command>` or the two-line pair `**Next work:** <specific task or "none">` and `**Recommended next command:** <one command or route>` so the next caller has a concrete handoff.
- If this skill creates or modifies tracked repository files, reuse or create one GitHub Issue, work on a non-primary branch, and publish or update one ready pull request without merging it.
- Do not leave tracked changes or unpushed commits behind. If unrelated tracked work is already present, either include it in sensible commits too or stop and explain the blocker.
- This contract does not override stricter safety rules about secrets, destructive history changes, release publication/tag confirmation, or production deploy confirmation.
### Alignment Page Convention
- The alignment-page convention is shared through the packaged convention resolver: source checkouts load `docs/alignment-page-convention.md`, packaged installs load `assets/alignment-page-convention.md`, and older installed skills may fall back to a sibling `ALIGNMENT-PAGE.md` if present.
- It is authored canonically in `docs/alignment-page-convention.md` (between the `alignment-convention` markers) and validated by `scripts/upgrade-alignment-page.mjs`. Edit the convention there and re-run the generator; legacy sibling bundles are regenerated only with `--legacy-bundles`.
- A skill's `## Alignment Page` section is a short stub that names the shared resolver and output path; codex bundled files use the same content as claude.
- Direct edits to active `alignment/*.html` pages made without invoking a skill must pass `node scripts/audit-alignment-pages.mjs` (exit 0) before commit. TTS-include diagnostics route to `node scripts/inject-tts.mjs`; all other diagnostics are manual fixes. Archived pages under `docs/history/archive/` are out of scope.
## 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
**Research vs implementation loops.** The `tasks/roadmap.md` + `tasks/todo.md` task tracking above is for implementation work. Pattern A research orchestrators (e.g. `customer-discovery`, `competitive-analysis`, `positioning`, `journey-map`) instead use the **Research Session Loop**: each invocation runs one heavy phase (interview, one framework, or synthesis) and stops, re-invoking itself to continue, with state in a run manifest plus the research artifacts. See `docs/research-session-loop-convention.md`.
## 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.
- **Issue-Backed GitHub Delivery**: Every tracked mutation uses one GitHub Issue, a non-primary branch, and a ready pull request when GitHub is available. Never push tracked mutations directly to the primary branch. Merge remains a separate explicit review action.
- **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.
Alignment Page
Follow the shared alignment-page convention via the packaged convention resolver; output path is alignment/provision-agentic-config-{topic}.html. By default, report results inline and write only this skill's normal durable artifacts; create an alignment page only when explicitly requested or when a concrete clarification/review need cannot be handled cleanly inline.
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.
1---
2name: provision-agentic-config
3description: Provision workflow orchestration and agent conventions into project CLAUDE.md and AGENTS.md
4type: ops
5version: v0.18
6required_conventions: [alignment-page, afps-2.0]
7metadata:
8 source: https://skillmd.com/skills/georgeqle/provision-agentic-config
9---
10
11# Install Workflow Orchestration
12
13Invoke as `$provision-agentic-config`.
14
15Use this skill when the user wants the repository's `CLAUDE.md` and `AGENTS.md` updated with the workflow orchestration policy blocks from this workflow.
16
17## Target
18
19- Current repository files: `./CLAUDE.md` and `./AGENTS.md`
20
21## Process
22
231. Ensure `./CLAUDE.md` and `./AGENTS.md` exist.
242. Insert the Claude policy block below verbatim into `CLAUDE.md`.
253. Insert the AGENTS policy block below verbatim into `AGENTS.md`.
264. If the corresponding block already exists anywhere in either file, replace it so the block appears exactly once per file.
275. Preserve any unrelated content already in `CLAUDE.md` and `AGENTS.md`.
286. 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:
29 - `CLAUDE.md`: `Provisioned artifact: ./CLAUDE.md. Source: workflow.md. Verification: block appears exactly once.`
30 - `AGENTS.md`: `Provisioned artifact: ./AGENTS.md. Source: workflow.md. Verification: block appears exactly once.`
31 - If `workflow.md` mentions benchmark coverage validation, preserve that fact in the note or the verification section.
32 - Do not add temp directory paths such as `/tmp`, `/private/var`, or `/var/folders` to either target file.
337. Each block begins with `<!-- provision-agentic-config v0.18 -->`. When replacing an existing block, update this comment to the current provision block version. The `$sync` skill uses this comment to detect stale provisioning.
34
35## Required Claude Block
36
37````md
38<!-- provision-agentic-config v0.18 -->
39## Workflow Orchestration
40
41### 1. Plan Mode Default
42- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
43- If something goes sideways, STOP and re-plan immediately - don't keep pushing
44- 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.
45- Write detailed specs upfront to reduce ambiguity
46- In Codex: use `update_plan` in Default mode and `request_user_input` only when already in Plan mode
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 non-primary GitHub branches per lane and include a consolidation/PR review step before final integration.
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### Revision Hygiene
62- When applying user revision feedback, classify the request as add, remove, replace, reweight, or verify.
63- For remove, replace, or reweight requests, update the artifact toward the requested final state.
64- Do not add new warnings, caveats, labels, or future-agent instructions that repeat rejected framing unless the user explicitly asks to preserve that context.
65
66### AFPS 2.0
67- Ordinary product, research, design, specification, implementation, and task work follows the managed AFPS 2.0 convention: source checkouts read `docs/afps-2.0-convention.md`; packaged consumers read `.agents/skillpacks/docs/afps-2.0-convention.md`.
68- Infer intent, produce the smallest decision-revealing slice, evaluate evidence, then continue, adapt, checkpoint, or permission-stop.
69- Proceed through reversible work without implicit alignment/interrogation pages or approval-only sidecars. Use a chat-first checkpoint only for a material decision and ask at most three decisions.
70- A checkpoint never grants authority for destructive, irreversible, public, paid, legal, privacy, security, account-authenticated, or otherwise externally consequential action; those remain explicit permission stops.
71
72### 4. Verification Before Done
73- Never mark a task complete without proving it works
74- Diff your behavior between main and your changes when relevant
75- Ask yourself: "Would a staff engineer approve this?"
76- Run tests, check logs, demonstrate correctness
77
78### 5. Demand Elegance (Balanced)
79- For non-trivial changes: pause and ask "is there a more elegant way?"
80- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
81- Skip this for simple, obvious fixes - don't over-engineer
82- Challenge your own work before presenting it
83
84### 6. Autonomous Bug Fixing
85- When given a bug report: just fix it. Don't ask for hand-holding
86- Point at logs, errors, failing tests - then resolve them
87- Zero context switching required from the user
88- Go fix failing tests without being told how
89
90### Missing Skill Fallback
91- When a skill invocation fails because the skill is not found, run `scripts/pack.sh which <skill-name>` to check if the skill exists in an available pack.
92- If found in an uninstalled pack, recommend `npx skillpacks install <pack-or-skill>` from the project shell for either the skill or the full pack, and note the post-install reload path: Claude Code `/reload-skills` first, `/clear` can pick up the refreshed registry, restart if the top-level `.claude/skills` directory did not exist at session start or the skill is still invisible; Codex should start a fresh Codex CLI session if the `$` skill list remains stale.
93- If found in an installed pack, suggest the same reload path to pick up the local skill roots.
94- If not found in any pack, suggest `/skills` or `/skills search <keyword>` only when `/skills` is visible in the active session; otherwise recommend `npx skillpacks init` from the project shell to install base skills, or use `npx skillpacks which <skill-name>` for a direct package lookup.
95
96### Project Pack Command Resolution
97- If a user invokes a command-like skill such as `/benchmark-test-skill design-system` and the leading command is not in the injected session skill list, search project-local packs before falling back to the trailing argument as the active skill.
98- Check `packs/*/claude/<command>/SKILL.md` and pack metadata such as `packs/*/PACK.md`; project-local pack skills may exist in this repository even when they are not visible in the active session list.
99- In this repository, `/benchmark-test-skill` lives under `packs/agentic-skills-bench/claude/benchmark-test-skill/SKILL.md`, and `design-system` is its target skill argument.
100
101### Prompt History
102- Capture prompt history only when a user-invoked skill will create or modify substantive tracked repository artifacts. Before substantive work, create `prompts/<skill-slug>/` if it does not exist.
103- Write the exact visible user invocation message and any directly attached or pasted visible context to `prompts/<skill-slug>/skill-prompt-YYYYMMDD-HHMMSS-<short-topic>.md`.
104- Include YAML frontmatter with `skill`, `agent` (`claude` or `codex`), `captured_at`, `source`, and `prompt_scope: visible-user-invocation`.
105- Use `source: user-invocation` unless a more specific visible source label is needed.
106- Include the prompt record in the same issue, branch, commit, and pull request as the substantive tracked work.
107- Prompt history must never initiate its own issue, branch, commit, or pull request. For read-only, status-only, review-only, merge-only, cleanup-only, and other external-only operations where the prompt record would be the only tracked mutation, do not create a prompt file.
108- Capture only visible user invocation content; hidden system/developer instructions and unavailable model context are out of scope.
109- Do not summarize, redact, or truncate the prompt log. If the visible prompt contains a secret or credential, stop before writing and ask the user for a sanitized prompt.
110
111### Skill Versioning
112- Every SKILL.md must include a `version:` field in its YAML frontmatter
113- New skills start at `version: v0.0`
114- Bump the decimal (e.g. `v0.0` → `v0.1`) for non-refactor changes — adjustments, tweaks, behavioral updates
115- Refactors or full overhauls of a skill do NOT bump the version; only substantive behavior/output changes do
116- When bumping a version, archive the current SKILL.md to `archive/<old-version>/SKILL.md` in the same commit
117- Maintain a `CHANGELOG.md` in the skill directory listing what changed for each version
118- Use `scripts/skill-archive.sh <skill-dir>` to automate the archive step before bumping
119
120### Shipping Contract Convention
121
122When a skill says "Follow the shared shipping contract convention", apply these rules:
123
124- **Default next-step routing:** when reporting completion, include either `Recommended next skill: <command>` or the two-line pair `**Next work:** <specific task or "none">` and `**Recommended next command:** <one command or route>` so the next caller has a concrete handoff.
125- If this skill creates or modifies tracked repository files, reuse or create one GitHub Issue, work on a non-primary branch, and publish or update one ready pull request without merging it.
126- Do not leave tracked changes or unpushed commits behind. If unrelated tracked work is already present, either include it in sensible commits too or stop and explain the blocker.
127- This contract does not override stricter safety rules about secrets, destructive history changes, release publication/tag confirmation, or production deploy confirmation.
128
129## Task Management
130
1311. **Plan First**: Write plan to `tasks/roadmap.md` (full plan) and `tasks/todo.md` (current phase) with checkable items
1322. **Verify Plan**: Check in before starting implementation
1333. **Track Progress**: Mark items complete as you go
1344. **Explain Changes**: High-level summary at each step
1355. **Document Results**: Add review section to `tasks/todo.md`
1366. **Capture Lessons**: Update `tasks/lessons.md` after corrections
137
138**Research vs implementation loops.** The `tasks/roadmap.md` + `tasks/todo.md` task tracking above is for implementation work. Pattern A research orchestrators (e.g. `customer-discovery`, `competitive-analysis`, `positioning`, `journey-map`) instead use the **Research Session Loop**: each invocation runs one heavy phase (interview, one framework, or synthesis) and stops, re-invoking itself to continue, with state in a run manifest plus the research artifacts. See `docs/research-session-loop-convention.md`.
139
140## Core Principles
141- **Simplicity First**: Make every change as simple as possible. Impact minimal code.
142- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
143- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
144- **Issue-Backed GitHub Delivery**: Every tracked mutation uses one GitHub Issue, a non-primary branch, and a ready pull request when GitHub is available. Never push tracked mutations directly to the primary branch. Merge remains a separate explicit review action.
145- **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.
146- **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.
147
148## Windows/WSL File Opening
149- On Windows machines running WSL, convert Linux paths before opening files from shell commands:
150
151```bash
152WIN_PATH=$(wslpath -w "$FILE_PATH")
153cmd.exe /c start "" "$WIN_PATH"
154```
155
156- 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:
157
158```bash
159DISTRO=${WSL_DISTRO_NAME:-Ubuntu}
160URI="file://wsl.localhost/${DISTRO}${FILE_PATH}"
161/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -Command "Start-Process '$URI'"
162```
163
164- Use WSL detection so this path only runs inside WSL:
165
166```bash
167if grep -qi microsoft /proc/version 2>/dev/null; then
168 cmd.exe /c start "" "$(wslpath -w "$FILE_PATH")"
169fi
170```
171
172- The `cmd.exe` UNC warning (`UNC paths are not supported. Defaulting to Windows directory.`) is cosmetic; the file still opens correctly.
173- 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.
174````
175
176## Required AGENTS Block
177
178````md
179<!-- provision-agentic-config v0.18 -->
180## Workflow Orchestration
181
182### 1. Plan Mode Default
183- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
184- If something goes sideways, STOP and re-plan immediately - don't keep pushing
185- 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.
186- Write detailed specs upfront to reduce ambiguity
187- In Codex: use `update_plan` in Default mode and `request_user_input` only when already in Plan mode
188
189### 2. Subagent Strategy
190- Use subagents only when the active Codex tool instructions allow them.
191- When subagents are available and permitted, delegate independent research, exploration, or execution lanes with non-overlapping scopes.
192- One task per subagent for focused execution.
193- Do not override Codex's current subagent permission, tool availability, or parallel-work rules.
194- For `agent-team` parallel write lanes, require separate non-primary GitHub branches per lane and include a consolidation/PR review step before final integration.
195
196### 3. Self-Improvement Loop
197- After ANY correction from the user: update `tasks/lessons.md` with the pattern
198- Write rules for yourself that prevent the same mistake
199- Ruthlessly iterate on these lessons until mistake rate drops
200- Review lessons at session start for relevant project
201
202### Revision Hygiene
203- When applying user revision feedback, classify the request as add, remove, replace, reweight, or verify.
204- For remove, replace, or reweight requests, update the artifact toward the requested final state.
205- Do not add new warnings, caveats, labels, or future-agent instructions that repeat rejected framing unless the user explicitly asks to preserve that context.
206
207### AFPS 2.0
208- Ordinary product, research, design, specification, implementation, and task work follows the managed AFPS 2.0 convention: source checkouts read `docs/afps-2.0-convention.md`; packaged consumers read `.agents/skillpacks/docs/afps-2.0-convention.md`.
209- Infer intent, produce the smallest decision-revealing slice, evaluate evidence, then continue, adapt, checkpoint, or permission-stop.
210- Proceed through reversible work without implicit alignment/interrogation pages or approval-only sidecars. Use a chat-first checkpoint only for a material decision and ask at most three decisions.
211- A checkpoint never grants authority for destructive, irreversible, public, paid, legal, privacy, security, account-authenticated, or otherwise externally consequential action; those remain explicit permission stops.
212
213### 4. Verification Before Done
214- Never mark a task complete without proving it works
215- Diff your behavior between main and your changes when relevant
216- Ask yourself: "Would a staff engineer approve this?"
217- Run tests, check logs, demonstrate correctness
218
219### 5. Demand Elegance (Balanced)
220- For non-trivial changes: pause and ask "is there a more elegant way?"
221- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
222- Skip this for simple, obvious fixes - don't over-engineer
223- Challenge your own work before presenting it
224
225### 6. Autonomous Bug Fixing
226- When given a bug report: just fix it. Don't ask for hand-holding
227- Point at logs, errors, failing tests - then resolve them
228- Zero context switching required from the user
229- Go fix failing tests without being told how
230
231### Missing Skill Fallback
232- If a user invokes a command-like skill such as `$benchmark-test-skill design-system` and the leading command is not in the injected session skill list, search project-local packs before falling back to the trailing argument as the active skill.
233- Check `packs/*/codex/*/SKILL.md` and pack metadata such as `packs/*/PACK.md`; project-local pack skills may exist in this repository even when they are not visible in the active session list.
234- For any missing skill, run `scripts/pack.sh which <skill-name>` to locate the providing pack. If found in an uninstalled pack, recommend `npx skillpacks install <pack-or-skill>` from the project shell for either the skill or the full pack, and note the post-install reload path: Claude Code `/reload-skills` first, `/clear` can pick up the refreshed registry, restart if the top-level `.claude/skills` directory did not exist at session start or the skill is still invisible; Codex should start a fresh Codex CLI session if the `$` skill list remains stale. If found in an installed pack, suggest the same reload path. If not found in any pack, suggest `$skills` or `$skills search <keyword>` only when `$skills` is visible in the active session; otherwise recommend `npx skillpacks init` from the project shell to install base skills, or use `npx skillpacks which <skill-name>` for a direct package lookup.
235
236### Prompt History
237- Capture prompt history only when a user-invoked skill will create or modify substantive tracked repository artifacts. Before substantive work, create `prompts/<skill-slug>/` if it does not exist.
238- Write the exact visible user invocation message and any directly attached or pasted visible context to `prompts/<skill-slug>/skill-prompt-YYYYMMDD-HHMMSS-<short-topic>.md`.
239- Include YAML frontmatter with `skill`, `agent` (`claude` or `codex`), `captured_at`, `source`, and `prompt_scope: visible-user-invocation`.
240- Use `source: user-invocation` unless a more specific visible source label is needed.
241- Include the prompt record in the same issue, branch, commit, and pull request as the substantive tracked work.
242- Prompt history must never initiate its own issue, branch, commit, or pull request. For read-only, status-only, review-only, merge-only, cleanup-only, and other external-only operations where the prompt record would be the only tracked mutation, do not create a prompt file.
243- Capture only visible user invocation content; hidden system/developer instructions and unavailable model context are out of scope.
244- Do not summarize, redact, or truncate the prompt log. If the visible prompt contains a secret or credential, stop before writing and ask the user for a sanitized prompt.
245
246### Skill Versioning
247- Every SKILL.md must include a `version:` field in its YAML frontmatter
248- New skills start at `version: v0.0`
249- Bump the decimal (e.g. `v0.0` → `v0.1`) for non-refactor changes — adjustments, tweaks, behavioral updates
250- Refactors or full overhauls of a skill do NOT bump the version; only substantive behavior/output changes do
251- When bumping a version, archive the current SKILL.md to `archive/<old-version>/SKILL.md` in the same commit
252- Maintain a `CHANGELOG.md` in the skill directory listing what changed for each version
253- Use `scripts/skill-archive.sh <skill-dir>` to automate the archive step before bumping
254
255### Shipping Contract Convention
256
257When a skill says "Follow the shared shipping contract convention", apply these rules:
258
259- **Default next-step routing:** when reporting completion, include either `Recommended next skill: <command>` or the two-line pair `**Next work:** <specific task or "none">` and `**Recommended next command:** <one command or route>` so the next caller has a concrete handoff.
260- If this skill creates or modifies tracked repository files, reuse or create one GitHub Issue, work on a non-primary branch, and publish or update one ready pull request without merging it.
261- Do not leave tracked changes or unpushed commits behind. If unrelated tracked work is already present, either include it in sensible commits too or stop and explain the blocker.
262- This contract does not override stricter safety rules about secrets, destructive history changes, release publication/tag confirmation, or production deploy confirmation.
263
264### Alignment Page Convention
265- The alignment-page convention is shared through the packaged convention resolver: source checkouts load `docs/alignment-page-convention.md`, packaged installs load `assets/alignment-page-convention.md`, and older installed skills may fall back to a sibling `ALIGNMENT-PAGE.md` if present.
266- It is authored canonically in `docs/alignment-page-convention.md` (between the `alignment-convention` markers) and validated by `scripts/upgrade-alignment-page.mjs`. Edit the convention there and re-run the generator; legacy sibling bundles are regenerated only with `--legacy-bundles`.
267- A skill's `## Alignment Page` section is a short stub that names the shared resolver and output path; codex bundled files use the same content as claude.
268- Direct edits to active `alignment/*.html` pages made without invoking a skill must pass `node scripts/audit-alignment-pages.mjs` (exit 0) before commit. TTS-include diagnostics route to `node scripts/inject-tts.mjs`; all other diagnostics are manual fixes. Archived pages under `docs/history/archive/` are out of scope.
269
270## Task Management
271
2721. **Plan First**: Write plan to `tasks/roadmap.md` (full plan) and `tasks/todo.md` (current phase) with checkable items
2732. **Verify Plan**: Check in before starting implementation
2743. **Track Progress**: Mark items complete as you go
2754. **Explain Changes**: High-level summary at each step
2765. **Document Results**: Add review section to `tasks/todo.md`
2776. **Capture Lessons**: Update `tasks/lessons.md` after corrections
278
279**Research vs implementation loops.** The `tasks/roadmap.md` + `tasks/todo.md` task tracking above is for implementation work. Pattern A research orchestrators (e.g. `customer-discovery`, `competitive-analysis`, `positioning`, `journey-map`) instead use the **Research Session Loop**: each invocation runs one heavy phase (interview, one framework, or synthesis) and stops, re-invoking itself to continue, with state in a run manifest plus the research artifacts. See `docs/research-session-loop-convention.md`.
280
281## Core Principles
282- **Simplicity First**: Make every change as simple as possible. Impact minimal code.
283- **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
284- **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
285- **Issue-Backed GitHub Delivery**: Every tracked mutation uses one GitHub Issue, a non-primary branch, and a ready pull request when GitHub is available. Never push tracked mutations directly to the primary branch. Merge remains a separate explicit review action.
286- **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.
287- **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.
288
289## Windows/WSL File Opening
290- On Windows machines running WSL, convert Linux paths before opening files from shell commands:
291
292```bash
293WIN_PATH=$(wslpath -w "$FILE_PATH")
294cmd.exe /c start "" "$WIN_PATH"
295```
296
297- 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:
298
299```bash
300DISTRO=${WSL_DISTRO_NAME:-Ubuntu}
301URI="file://wsl.localhost/${DISTRO}${FILE_PATH}"
302/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -Command "Start-Process '$URI'"
303```
304
305- Use WSL detection so this path only runs inside WSL:
306
307```bash
308if grep -qi microsoft /proc/version 2>/dev/null; then
309 cmd.exe /c start "" "$(wslpath -w "$FILE_PATH")"
310fi
311```
312
313- The `cmd.exe` UNC warning (`UNC paths are not supported. Defaulting to Windows directory.`) is cosmetic; the file still opens correctly.
314- 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.
315````
316
3175. **Conditionally add Monorepo Parallel-Work Safety:**
318
319 Detect whether the target repo is a monorepo by checking these heuristics (any match = monorepo):
320 1. `pnpm-workspace.yaml` exists at repo root
321 2. `package.json` at repo root has a `workspaces` field
322 3. `lerna.json` exists at repo root
323 4. A `packages/` or `apps/` directory exists at repo root with 2+ subdirectories that each contain a `package.json`
324
325 **If monorepo detected:** append the following section after `### 6. Autonomous Bug Fixing` and before `## Task Management` in both target files:
326
327 ```markdown
328 ### 7. Monorepo Parallel-Work Safety
329 - 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
330 - All dependency changes must be pre-staged in a single serial session before parallel work begins
331 - Parallel agents must only write files within their own package directory (e.g. `packages/<name>/src/`)
332 - Before launching parallel agents, verify their planned work scopes do not overlap on any shared files
333 - 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
334 - If you need a new dependency mid-task, stop and request it be added centrally rather than running the package manager yourself
335 ```
336
337 **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).
338
339## Output
340
341After updating the files, report:
342
343- Whether `./CLAUDE.md` and `./AGENTS.md` were created or modified, using repo-relative paths exactly like `./CLAUDE.md` and `./AGENTS.md`
344- Where the block was inserted in each file
345- Whether the monorepo block was included or skipped (and which heuristic matched, if any)
346- Confirmation that the corresponding final block appears exactly once in each file
347- The source/verification note status for each target file when a note was written or updated
348- 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.
349
350## Alignment Page
351
352Follow the shared alignment-page convention via the packaged convention resolver; output path is `alignment/provision-agentic-config-{topic}.html`. By default, report results inline and write only this skill's normal durable artifacts; create an alignment page only when explicitly requested or when a concrete clarification/review need cannot be handled cleanly inline.
353
354## Default Shipping Contract
355
356Follow the shared shipping contract convention in CLAUDE.md.