[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73GY6Z5D4EKHTFG9RT5GASQ":3,"skill-same:01M73GY6Z5D4EKHTFG9RT5GASQ":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":56},"01M73GY6Z5D4EKHTFG9RT5GASQ","sync",null,"Runs the full project sync pipeline — lifecycle update, audit, L0→L1 publish, commit, push, and PR creation.","5throck\u002Fai-workspace-standards","5throck","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10958964?v=4","01M73BFEH0V0VS483TW4JD49JW","01M73BFEJ5VQZJHJSFTVPAZGDM",25,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002F5throck\u002Fai-workspace-standards\u002Fblob\u002Fmain\u002Ftemplates\u002Fcommon\u002F.codex\u002Fskills\u002Fsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: sync\ndescription: Runs the full project sync pipeline — lifecycle update, audit, L0→L1 publish, commit, push, and PR creation.\nversion: 1.9.1\nlast_reviewed: 2026-11-12\nstatus: active\nscope: common\nl2_propagate: true\nowner: automation-engineer\nprerequisites: Bun runtime\nmetadata:\n  type: process\n  triggers:\n    - sync\n    - \u002Fsync\n    - commit and push\n    - create PR\n---\n\n# Skill: sync\n\n## Context\n\nRuns the full project sync pipeline (`scripts\u002Fdev-sync.ts`). This is the single mandatory pathway for all workspace commits — it handles lifecycle finalization, audit gating, L0→L1 template propagation, git branch creation, commit, push, and PR creation in one orchestrated flow.\n\n## When to Use\n\n- After completing any set of file changes that should be committed, pushed, and PR'd\n- When the user says \"commit\", \"push\", \"create PR\", \"\u002Fsync\", or \"finish this branch\"\n- At the end of any execution plan row or multi-agent task\n- As the final step in any workspace governance workflow (Phase 5\u002F6 of the Harness Engineering Workflow)\n\n## Output Format\n\n- A git branch `pr\u002F\u003Ctimestamp>-\u003Cslug>` created (or reused) from `main`\n- A commit with the task-staged files plus pipeline-generated files and a conventional commit message\n- An open GitHub PR with the agent-written body (Why \u002F What Changed \u002F Test Plan \u002F Security Checklist \u002F Notes)\n- Console output listing each pipeline step and its result\n\n## Execution Steps\n\n0. **Stage the task files** (BEFORE invoking the pipeline): `git add \u003Ctask files>`. Only explicitly task-staged files plus files the pipeline itself generates (memory log, VERSION_MANIFEST, propagation output, ...) are committable. Dev-sync snapshots the working tree at start and at commit time. Any working-tree change that is neither task-staged nor pipeline-generated is EXCLUDED from the commit by default (scoped staging, T-20261001-015 soak exit; design: `docs\u002Fdesigns\u002F2026-09-12-dev-sync-scoped-staging-design.md`) — stage everything the commit needs explicitly. To restore the legacy WARN-soak sweep, set `SYNC_SCOPED_STAGING=0` or pass `--warn-staging`. Never rely on `git add -A` to pick up your edits. Never leave unrelated dirt in the tree when syncing.\n\n1. **Write the PR body** (the agent writes it — never shell out to an LLM CLI):\n   - Inspect the change: `git diff HEAD~1 --stat` and `git diff HEAD~1 --name-only` (first 30 files).\n   - Write the body in English using EXACTLY this structure (keep all section headers, fill placeholders):\n\n     ## Why\n     [1-3 sentences: what problem does this solve and why now?]\n\n     ## What Changed\n     [concise bullet list of actual changes — be specific, not generic]\n\n     ## Test Plan\n     - [ ] `bun scripts\u002Faudit.ts` passes\n     - [ ] [add relevant manual or automated test steps]\n\n     ## Security Checklist\n     - [ ] No secrets, credentials, or API keys committed\n     - [ ] No `.env` files staged (use `.env.sample` for templates)\n     - [ ] Dependencies unchanged or reviewed for new CVEs\n\n     ## Notes\n     [Breaking changes, deployment steps, or reviewer guidance. Write 'None' if not applicable.]\n\n     ---\n\n   - Save it to `\u003Cgit-dir>\u002Fsync-pr-body.md`, where `\u003Cgit-dir>` is `git rev-parse --git-dir` (e.g. `.git\u002Fsync-pr-body.md`) — outside the working tree so it is never committed.\n\n2. Run the sync script with the provided arguments, passing the body file:\n   ```bash\n   bun scripts\u002Fdev-sync.ts --body-file \"$(git rev-parse --git-dir)\u002Fsync-pr-body.md\" \"$ARGUMENTS\"\n   ```\n\n   Branch behavior (dev-sync 1.27.0+; T-20261012-011 \u002F T-20261013-005):\n   - On `main`\u002F`master` the pipeline creates a fresh `pr\u002F\u003Ctimestamp>-\u003Cslug>` branch from the staged set — the PR title derives from the **full branch-vs-main diff** (`origin\u002Fmain...HEAD`), never the message alone, so the review surface stays represented.\n   - On an existing branch it commits there — **unless that branch's PR is CLOSED (unmerged)**, which is refused: a dead branch under-represents the review surface (#1509's 45 files re-landed as a 1-file #1510). Re-branch from main and re-run.\n   - **Prefer fresh branches for superseding deliveries**: a reused branch can hit GitHub-server-side merge conflicts that a local 3-way merge reports clean (#1526 case). When `gh pr update-branch` refuses, re-branch the identical diff from current main, open a new PR, close the old one as superseded.\n   - When `gh pr view` fails with 403\u002FGraphQL (cloud sessions), dev-sync resolves the open PR via the REST API (1.28.0).\n\n3. The pipeline executes the following steps in order:\n\n| Step | Name | Fatal? | Description |\n|------|------|:------:|-------------|\n| 0 | CWD Guard | **FATAL** | Verifies script runs from workspace root; exits if CWD mismatches `import.meta.dir\u002F..` |\n| 1 | Language Gate | **FATAL** | Commit message \u002F PR title must be English (context.md S3); blocks non-English via `language-guard.ts` |\n| 2 | Memory Session Entry | **FATAL** | Appends session summary (changes, decisions, open issues) to `memory\u002FYYYY-MM-DD.md` |\n| 2 | MEMORY.md Index Sync | **FATAL** | Updates `memory\u002FMEMORY.md` index via `sync-md.ts` |\n| 2.5 | scripts\u002FREADME.md Generation | **FATAL** | Regenerates `scripts\u002FREADME.md` via `generate-scripts-readme.ts` if the script exists |\n| 3 | CHANGELOG.md Check | **FATAL** | Checks `CHANGELOG.md [Unreleased]` — **blocks and exits** if empty (agent must add entries first via `\u002Fchangelog` or manual edit) |\n| 3.6 | Deprecated Script Warnings | non-fatal | Scans `SCRIPTS.md` for deprecated scripts and prints warnings |\n| 3.7 | L0\u002FL1 Script Drift Check | non-fatal | Runs `verify-scripts.ts --check-drift` to detect drift between L0 and L1 script copies |\n| 3.8 | Memory File Archival | non-fatal | Runs `archive-memory.ts` to archive old memory files |\n| 3.9 | Spec Registry Check | **FATAL** (L0) | Runs `audit.ts --spec-check --lifecycle-only` — blocks on the spec-relevance Fail (code diff with no spec activity; ADR-0055 Stage 2) and any always-on audit Fail; stale\u002Fmissing-spec stay WARN; escape hatch `--spec-exempt=E1-E5` (AGENTS.md §5.1.1); substantive LLM-assisted work must reach this gate through the PM routing path (ADR-0078); a missing `docs\u002Fspecs\u002Fregistry.json` is a loud WARN (gate INACTIVE — Universal Design Gate, ADR-0074; activate via `spec-register.ts`; the registry seed ships to projects add-if-missing) |\n| 3.95 | QA Pre-checks | non-fatal | Runs project tests (if `package.json` has `test` script) and warns if `README_ko.md` is missing |\n| 3.95b | Typecheck Gate | **FATAL** (L0) | Runs `scripts\u002Ftypecheck.ts` — `tsc --noEmit` over `scripts\u002F` against the zero-error baseline (`scripts\u002Fhelpers\u002Ftypecheck-baseline.json`; T-20260910-012). Root context only; L1+ contexts skip cleanly via the missing-baseline guard. Never raise the error count — fix the error instead |\n| 3.96c | Session-Evidence Skill Review | non-fatal | Runs `skill-session-review.ts` — accumulates Observed Symptom + Evidence from the day's `## Skills Used` section into `memory\u002Fskill-review\u002F` (diagnosis\u002Fcandidate left empty for human triage); plus a non-fatal full `skill-dependency-analysis.ts --report` pass (SkillHone-inspired loop; design doc `docs\u002Fdesigns\u002F2026-09-06-skill-session-review-design.md`) |\n| 3.97 | Governance Reflection Gate | **FATAL** (L0) | Runs `verify-adr-governance.ts --strict` — blocks sync when post-cutoff Accepted ADRs lack governance-doc references (ADR-0059 Stages 2+2b: unlinked-ADR and marker-drift findings block); skipped in scaffolded projects (L0-only validator) |\n| 4.5 | L0 to L1 Publish | **FATAL** (L0) \u002F non-fatal (L1) | Propagates scripts, skills, commands, docs via `propagate-to-templates.ts --apply`; fatal only in L0 context (context.md present) |\n| 4.52 | Template Dependency Sync | **FATAL** (L0) | Runs `sync-template-deps.ts --apply` — aligns shared dependency versions from root `package.json` into `templates\u002Fcommon\u002Fpackage.json` and regenerates `bun.lock` (shared keys only; root-only deps never added, template-only deps never removed); workspace-root gated |\n| 4.62 | Cascade Re-publish | **FATAL** (L0) \u002F non-fatal (L1) | Re-runs propagate-to-templates.ts --apply after skill sync — heals template platform skill copies (templates\u002Fcommon\u002F.claude\u002F.gemini\u002F.agents\u002Fskills) changed by step 4.6 within the same sync; same gating and fatality as step 4.5 |\n| 4.6 | Skill Sync to Platforms | non-fatal | Runs `sync-skills.ts` to distribute skills to `.claude\u002Fskills\u002F`, `.gemini\u002Fskills\u002F`, `.agents\u002Fskills\u002F`; warnings only |\n| 4.7 | VERSION_MANIFEST.md Generation | **FATAL** | Generates `VERSION_MANIFEST.md` via `generate-version-manifest.ts` |\n| 4.85 | Version-Bump Test Gate | **FATAL** | When the task-staged change set bumps a version (a `SKILL.md` frontmatter `version:` line or a script `@version` header line changed), runs `bun run test:unit` BEFORE the audit gate; a failing suite blocks the sync. Skipped cleanly when `package.json` has no `test:unit` script (L1+ projects) and when nothing staged bumps a version. No escape env var — fix the tests or unstage the bump (detection: `scripts\u002Fhelpers\u002Fversion-bump.ts`; user directive 2026-10-08) |\n| 4.9 | AUDIT GATE | **FATAL** | Runs `audit.ts` — must exit 0 before proceeding. Includes the auto-activating gates: skill-graph drift (ADR-0060) and upgrade coverage (`check-upgrade-coverage.ts --strict`, ADR-0073) |\n| 5 | Branch Creation | **FATAL** | Creates `pr\u002F\u003Ctimestamp>-\u003Cslug>` branch if on main\u002Fmaster; reuses existing branch otherwise |\n| 6 | Sensitive File Guard + Scoped Staging + Commit\u002FPush | **FATAL** | Guards against `.pem`, `.key`, `.env`, `credentials.json`, etc.; scoped-staging check (S0\u002FS1 tree snapshots — WARN-lists files that are neither task-staged nor pipeline-generated; excluded by default; `SYNC_SCOPED_STAGING=0`\u002F`--warn-staging` restore the legacy sweep), then `git add`, `git commit`, `git push` |\n| 7 | PR Creation | **FATAL** | If `--body-file` was passed, validates it (English) and opens the PR via `gh pr create --body-file`; otherwise falls back to `gen-pr-body.ts` template, `.github\u002Fpull_request_template.md`, then `gh pr create --fill`; idempotent — updates existing PR if one already exists for the branch |\n\n4. If audit fails, fix the reported issue before re-running.\n\n## Worktree Landing Variant\n\nWhen concurrency evidence exists (shared tree dirty, shared checkout off `main`, or any open PR), land multi-file write batches from an isolated worktree instead of the shared checkout. Full rule set and rationale: `docs\u002Fdesigns\u002F2026-11-07-session-worktree-convention-design.md` (T-20261106-010). PM bookkeeping (ticket moves, memory-log-only, CHANGELOG entries) and trivial single-file changes stay on the shared checkout.\n\n1. **Concurrency check**: run `git status --porcelain`, `git branch --show-current`, and `gh pr list --state open`. Any hit selects this variant.\n2. **Create the worktree**: `git fetch origin && git worktree add ..\u002F\u003Crepo-name>-worktrees\u002F\u003Cslug> -b pr\u002F\u003CYYYYMMDD>-\u003Cslug> origin\u002Fmain`. Keep the path outside the repository tree: no `.gitignore` change is needed and worktrees never appear in the repo's own untracked-file surface.\n3. **Install**: `cd \u003Cworktree-path> && bun install`. A fresh worktree has no `node_modules`.\n4. **Work**: perform all writes inside the worktree. Never edit shared-checkout paths from the worktree session.\n5. **Stage + PR body**: stage task files explicitly (step 0 scoped-staging rules unchanged). Write the PR body to `$(git rev-parse --git-dir)\u002Fsync-pr-body.md`. Inside a worktree, `git rev-parse --git-dir` resolves to the worktree's private git dir (`\u003Crepo>\u002F.git\u002Fworktrees\u002F\u003Cname>`), so the body file is per-worktree and never collides with a concurrent session's file.\n6. **Sync**: run `bun scripts\u002Fdev-sync.ts --body-file \"$(git rev-parse --git-dir)\u002Fsync-pr-body.md\" \"$ARGUMENTS\"` **from the worktree root**. The CWD guard (step 0 of the pipeline) compares CWD against the script's own copy's parent directory (`import.meta.dir` anchor), and each worktree owns a full checkout including `scripts\u002Fdev-sync.ts`, so the guard passes by construction. This supersedes the 2026-11-03 \"in-worktree dev-sync is impossible\" observation, which was a CWD\u002Fscript-root mismatch, not a fundamental incompatibility. On the pre-created branch, the pipeline commits there (step 2 branch behavior applies unchanged).\n7. **PR**: the pipeline pushes and opens or updates the PR as usual. CI runs against the branch - identical to a shared-checkout landing.\n8. **Cleanup**: after the PR opens (or merges, per the finishing-branch discipline), run `git worktree remove \u003Cworktree-path>` from the shared checkout. The shared tree is never touched during the session.\n9. **Report**: state the worktree path, the branch, and the concurrency evidence observed at start in the task report.\n\n## Session Evidence Duty (`## Skills Used`)\n\nWhile the session is still open — BEFORE invoking `\u002Fsync` — record the skills\nactually loaded this session into `memory\u002FYYYY-MM-DD.md` under `## Skills Used`\n(one block per skill; schema in the skill-lifecycle standards, §6.6\nSession-Evidence Skill Review Loop, and `docs\u002Fdesigns\u002F2026-09-06-skill-session-review-design.md`). If the section was not filled before\nsync, the dev-sync step 2 skeleton is appended as a comment for later editing.\nStep 3.96c consumes this evidence automatically; it never modifies skills.\n\n## Related Skills\n\n- `scripts\u002Fdev-sync.ts` — Core sync pipeline implementation\n- `skills\u002Fgateguard\u002FSKILL.md` — Pre-edit quality gate (run before edits that lead to sync)\n- `context.md §3` — PR workflow and branch rules\n\n## PR Language Rule\n\nAll PR titles and bodies generated by this command **must be written in English**, regardless of the active session language. This applies to the agent-written body in step 1 and to any `gh pr create` \u002F `gh pr edit` calls — `dev-sync.ts` blocks non-English bodies at the same `language-guard` gate used for commit messages.\n","# Skill: sync\n\n## Context\n\nRuns the full project sync pipeline (`scripts\u002Fdev-sync.ts`). This is the single mandatory pathway for all workspace commits — it handles lifecycle finalization, audit gating, L0→L1 template propagation, git branch creation, commit, push, and PR creation in one orchestrated flow.\n\n## When to Use\n\n- After completing any set of file changes that should be committed, pushed, and PR'd\n- When the user says \"commit\", \"push\", \"create PR\", \"\u002Fsync\", or \"finish this branch\"\n- At the end of any execution plan row or multi-agent task\n- As the final step in any workspace governance workflow (Phase 5\u002F6 of the Harness Engineering Workflow)\n\n## Output Format\n\n- A git branch `pr\u002F\u003Ctimestamp>-\u003Cslug>` created (or reused) from `main`\n- A commit with the task-staged files plus pipeline-generated files and a conventional commit message\n- An open GitHub PR with the agent-written body (Why \u002F What Changed \u002F Test Plan \u002F Security Checklist \u002F Notes)\n- Console output listing each pipeline step and its result\n\n## Execution Steps\n\n0. **Stage the task files** (BEFORE invoking the pipeline): `git add \u003Ctask files>`. Only explicitly task-staged files plus files the pipeline itself generates (memory log, VERSION_MANIFEST, propagation output, ...) are committable. Dev-sync snapshots the working tree at start and at commit time. Any working-tree change that is neither task-staged nor pipeline-generated is EXCLUDED from the commit by default (scoped staging, T-20261001-015 soak exit; design: `docs\u002Fdesigns\u002F2026-09-12-dev-sync-scoped-staging-design.md`) — stage everything the commit needs explicitly. To restore the legacy WARN-soak sweep, set `SYNC_SCOPED_STAGING=0` or pass `--warn-staging`. Never rely on `git add -A` to pick up your edits. Never leave unrelated dirt in the tree when syncing.\n\n1. **Write the PR body** (the agent writes it — never shell out to an LLM CLI):\n   - Inspect the change: `git diff HEAD~1 --stat` and `git diff HEAD~1 --name-only` (first 30 files).\n   - Write the body in English using EXACTLY this structure (keep all section headers, fill placeholders):\n\n     ## Why\n     [1-3 sentences: what problem does this solve and why now?]\n\n     ## What Changed\n     [concise bullet list of actual changes — be specific, not generic]\n\n     ## Test Plan\n     - [ ] `bun scripts\u002Faudit.ts` passes\n     - [ ] [add relevant manual or automated test steps]\n\n     ## Security Checklist\n     - [ ] No secrets, credentials, or API keys committed\n     - [ ] No `.env` files staged (use `.env.sample` for templates)\n     - [ ] Dependencies unchanged or reviewed for new CVEs\n\n     ## Notes\n     [Breaking changes, deployment steps, or reviewer guidance. Write 'None' if not applicable.]\n\n     ---\n\n   - Save it to `\u003Cgit-dir>\u002Fsync-pr-body.md`, where `\u003Cgit-dir>` is `git rev-parse --git-dir` (e.g. `.git\u002Fsync-pr-body.md`) — outside the working tree so it is never committed.\n\n2. Run the sync script with the provided arguments, passing the body file:\n   ```bash\n   bun scripts\u002Fdev-sync.ts --body-file \"$(git rev-parse --git-dir)\u002Fsync-pr-body.md\" \"$ARGUMENTS\"\n   ```\n\n   Branch behavior (dev-sync 1.27.0+; T-20261012-011 \u002F T-20261013-005):\n   - On `main`\u002F`master` the pipeline creates a fresh `pr\u002F\u003Ctimestamp>-\u003Cslug>` branch from the staged set — the PR title derives from the **full branch-vs-main diff** (`origin\u002Fmain...HEAD`), never the message alone, so the review surface stays represented.\n   - On an existing branch it commits there — **unless that branch's PR is CLOSED (unmerged)**, which is refused: a dead branch under-represents the review surface (#1509's 45 files re-landed as a 1-file #1510). Re-branch from main and re-run.\n   - **Prefer fresh branches for superseding deliveries**: a reused branch can hit GitHub-server-side merge conflicts that a local 3-way merge reports clean (#1526 case). When `gh pr update-branch` refuses, re-branch the identical diff from current main, open a new PR, close the old one as superseded.\n   - When `gh pr view` fails with 403\u002FGraphQL (cloud sessions), dev-sync resolves the open PR via the REST API (1.28.0).\n\n3. The pipeline executes the following steps in order:\n\n| Step | Name | Fatal? | Description |\n|------|------|:------:|-------------|\n| 0 | CWD Guard | **FATAL** | Verifies script runs from workspace root; exits if CWD mismatches `import.meta.dir\u002F..` |\n| 1 | Language Gate | **FATAL** | Commit message \u002F PR title must be English (context.md S3); blocks non-English via `language-guard.ts` |\n| 2 | Memory Session Entry | **FATAL** | Appends session summary (changes, decisions, open issues) to `memory\u002FYYYY-MM-DD.md` |\n| 2 | MEMORY.md Index Sync | **FATAL** | Updates `memory\u002FMEMORY.md` index via `sync-md.ts` |\n| 2.5 | scripts\u002FREADME.md Generation | **FATAL** | Regenerates `scripts\u002FREADME.md` via `generate-scripts-readme.ts` if the script exists |\n| 3 | CHANGELOG.md Check | **FATAL** | Checks `CHANGELOG.md [Unreleased]` — **blocks and exits** if empty (agent must add entries first via `\u002Fchangelog` or manual edit) |\n| 3.6 | Deprecated Script Warnings | non-fatal | Scans `SCRIPTS.md` for deprecated scripts and prints warnings |\n| 3.7 | L0\u002FL1 Script Drift Check | non-fatal | Runs `verify-scripts.ts --check-drift` to detect drift between L0 and L1 script copies |\n| 3.8 | Memory File Archival | non-fatal | Runs `archive-memory.ts` to archive old memory files |\n| 3.9 | Spec Registry Check | **FATAL** (L0) | Runs `audit.ts --spec-check --lifecycle-only` — blocks on the spec-relevance Fail (code diff with no spec activity; ADR-0055 Stage 2) and any always-on audit Fail; stale\u002Fmissing-spec stay WARN; escape hatch `--spec-exempt=E1-E5` (AGENTS.md §5.1.1); substantive LLM-assisted work must reach this gate through the PM routing path (ADR-0078); a missing `docs\u002Fspecs\u002Fregistry.json` is a loud WARN (gate INACTIVE — Universal Design Gate, ADR-0074; activate via `spec-register.ts`; the registry seed ships to projects add-if-missing) |\n| 3.95 | QA Pre-checks | non-fatal | Runs project tests (if `package.json` has `test` script) and warns if `README_ko.md` is missing |\n| 3.95b | Typecheck Gate | **FATAL** (L0) | Runs `scripts\u002Ftypecheck.ts` — `tsc --noEmit` over `scripts\u002F` against the zero-error baseline (`scripts\u002Fhelpers\u002Ftypecheck-baseline.json`; T-20260910-012). Root context only; L1+ contexts skip cleanly via the missing-baseline guard. Never raise the error count — fix the error instead |\n| 3.96c | Session-Evidence Skill Review | non-fatal | Runs `skill-session-review.ts` — accumulates Observed Symptom + Evidence from the day's `## Skills Used` section into `memory\u002Fskill-review\u002F` (diagnosis\u002Fcandidate left empty for human triage); plus a non-fatal full `skill-dependency-analysis.ts --report` pass (SkillHone-inspired loop; design doc `docs\u002Fdesigns\u002F2026-09-06-skill-session-review-design.md`) |\n| 3.97 | Governance Reflection Gate | **FATAL** (L0) | Runs `verify-adr-governance.ts --strict` — blocks sync when post-cutoff Accepted ADRs lack governance-doc references (ADR-0059 Stages 2+2b: unlinked-ADR and marker-drift findings block); skipped in scaffolded projects (L0-only validator) |\n| 4.5 | L0 to L1 Publish | **FATAL** (L0) \u002F non-fatal (L1) | Propagates scripts, skills, commands, docs via `propagate-to-templates.ts --apply`; fatal only in L0 context (context.md present) |\n| 4.52 | Template Dependency Sync | **FATAL** (L0) | Runs `sync-template-deps.ts --apply` — aligns shared dependency versions from root `package.json` into `templates\u002Fcommon\u002Fpackage.json` and regenerates `bun.lock` (shared keys only; root-only deps never added, template-only deps never removed); workspace-root gated |\n| 4.62 | Cascade Re-publish | **FATAL** (L0) \u002F non-fatal (L1) | Re-runs propagate-to-templates.ts --apply after skill sync — heals template platform skill copies (templates\u002Fcommon\u002F.claude\u002F.gemini\u002F.agents\u002Fskills) changed by step 4.6 within the same sync; same gating and fatality as step 4.5 |\n| 4.6 | Skill Sync to Platforms | non-fatal | Runs `sync-skills.ts` to distribute skills to `.claude\u002Fskills\u002F`, `.gemini\u002Fskills\u002F`, `.agents\u002Fskills\u002F`; warnings only |\n| 4.7 | VERSION_MANIFEST.md Generation | **FATAL** | Generates `VERSION_MANIFEST.md` via `generate-version-manifest.ts` |\n| 4.85 | Version-Bump Test Gate | **FATAL** | When the task-staged change set bumps a version (a `SKILL.md` frontmatter `version:` line or a script `@version` header line changed), runs `bun run test:unit` BEFORE the audit gate; a failing suite blocks the sync. Skipped cleanly when `package.json` has no `test:unit` script (L1+ projects) and when nothing staged bumps a version. No escape env var — fix the tests or unstage the bump (detection: `scripts\u002Fhelpers\u002Fversion-bump.ts`; user directive 2026-10-08) |\n| 4.9 | AUDIT GATE | **FATAL** | Runs `audit.ts` — must exit 0 before proceeding. Includes the auto-activating gates: skill-graph drift (ADR-0060) and upgrade coverage (`check-upgrade-coverage.ts --strict`, ADR-0073) |\n| 5 | Branch Creation | **FATAL** | Creates `pr\u002F\u003Ctimestamp>-\u003Cslug>` branch if on main\u002Fmaster; reuses existing branch otherwise |\n| 6 | Sensitive File Guard + Scoped Staging + Commit\u002FPush | **FATAL** | Guards against `.pem`, `.key`, `.env`, `credentials.json`, etc.; scoped-staging check (S0\u002FS1 tree snapshots — WARN-lists files that are neither task-staged nor pipeline-generated; excluded by default; `SYNC_SCOPED_STAGING=0`\u002F`--warn-staging` restore the legacy sweep), then `git add`, `git commit`, `git push` |\n| 7 | PR Creation | **FATAL** | If `--body-file` was passed, validates it (English) and opens the PR via `gh pr create --body-file`; otherwise falls back to `gen-pr-body.ts` template, `.github\u002Fpull_request_template.md`, then `gh pr create --fill`; idempotent — updates existing PR if one already exists for the branch |\n\n4. If audit fails, fix the reported issue before re-running.\n\n## Worktree Landing Variant\n\nWhen concurrency evidence exists (shared tree dirty, shared checkout off `main`, or any open PR), land multi-file write batches from an isolated worktree instead of the shared checkout. Full rule set and rationale: `docs\u002Fdesigns\u002F2026-11-07-session-worktree-convention-design.md` (T-20261106-010). PM bookkeeping (ticket moves, memory-log-only, CHANGELOG entries) and trivial single-file changes stay on the shared checkout.\n\n1. **Concurrency check**: run `git status --porcelain`, `git branch --show-current`, and `gh pr list --state open`. Any hit selects this variant.\n2. **Create the worktree**: `git fetch origin && git worktree add ..\u002F\u003Crepo-name>-worktrees\u002F\u003Cslug> -b pr\u002F\u003CYYYYMMDD>-\u003Cslug> origin\u002Fmain`. Keep the path outside the repository tree: no `.gitignore` change is needed and worktrees never appear in the repo's own untracked-file surface.\n3. **Install**: `cd \u003Cworktree-path> && bun install`. A fresh worktree has no `node_modules`.\n4. **Work**: perform all writes inside the worktree. Never edit shared-checkout paths from the worktree session.\n5. **Stage + PR body**: stage task files explicitly (step 0 scoped-staging rules unchanged). Write the PR body to `$(git rev-parse --git-dir)\u002Fsync-pr-body.md`. Inside a worktree, `git rev-parse --git-dir` resolves to the worktree's private git dir (`\u003Crepo>\u002F.git\u002Fworktrees\u002F\u003Cname>`), so the body file is per-worktree and never collides with a concurrent session's file.\n6. **Sync**: run `bun scripts\u002Fdev-sync.ts --body-file \"$(git rev-parse --git-dir)\u002Fsync-pr-body.md\" \"$ARGUMENTS\"` **from the worktree root**. The CWD guard (step 0 of the pipeline) compares CWD against the script's own copy's parent directory (`import.meta.dir` anchor), and each worktree owns a full checkout including `scripts\u002Fdev-sync.ts`, so the guard passes by construction. This supersedes the 2026-11-03 \"in-worktree dev-sync is impossible\" observation, which was a CWD\u002Fscript-root mismatch, not a fundamental incompatibility. On the pre-created branch, the pipeline commits there (step 2 branch behavior applies unchanged).\n7. **PR**: the pipeline pushes and opens or updates the PR as usual. CI runs against the branch - identical to a shared-checkout landing.\n8. **Cleanup**: after the PR opens (or merges, per the finishing-branch discipline), run `git worktree remove \u003Cworktree-path>` from the shared checkout. The shared tree is never touched during the session.\n9. **Report**: state the worktree path, the branch, and the concurrency evidence observed at start in the task report.\n\n## Session Evidence Duty (`## Skills Used`)\n\nWhile the session is still open — BEFORE invoking `\u002Fsync` — record the skills\nactually loaded this session into `memory\u002FYYYY-MM-DD.md` under `## Skills Used`\n(one block per skill; schema in the skill-lifecycle standards, §6.6\nSession-Evidence Skill Review Loop, and `docs\u002Fdesigns\u002F2026-09-06-skill-session-review-design.md`). If the section was not filled before\nsync, the dev-sync step 2 skeleton is appended as a comment for later editing.\nStep 3.96c consumes this evidence automatically; it never modifies skills.\n\n## Related Skills\n\n- `scripts\u002Fdev-sync.ts` — Core sync pipeline implementation\n- `skills\u002Fgateguard\u002FSKILL.md` — Pre-edit quality gate (run before edits that lead to sync)\n- `context.md §3` — PR workflow and branch rules\n\n## PR Language Rule\n\nAll PR titles and bodies generated by this command **must be written in English**, regardless of the active session language. This applies to the agent-written body in step 1 and to any `gh pr create` \u002F `gh pr edit` calls — `dev-sync.ts` blocks non-English bodies at the same `language-guard` gate used for commit messages.\n",{"name":5,"owner":23,"scope":24,"status":25,"version":26,"metadata":27,"description":7,"l2_propagate":33,"last_reviewed":34,"prerequisites":35},"automation-engineer","common","active","1.9.1",{"type":28,"triggers":29},"process",[5,30,31,32],"\u002Fsync","commit and push","create PR",true,1794441600000,"Bun runtime","main","b57e612781a79b0e3e60878294ce59c86cc68e5d","templates\u002Fcommon\u002F.codex\u002Fskills\u002Fsync",9,"https:\u002F\u002Fgithub.com\u002F5throck\u002Fai-workspace-standards","https:\u002F\u002Fgithub.com\u002F5throck","Experienced in digital transformation, enterprise IT, startup acceleration, and business strategy. Focused on building practical systems that connect technolo","2026-11-14 21:22:34",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":33},[46,49,52],{"tool":47,"command":48},"npx","npx skills add 5throck\u002Fai-workspace-standards --skill sync",{"tool":50,"command":51},"bunx","bunx skills add 5throck\u002Fai-workspace-standards --skill sync",{"tool":53,"command":54},"pnpm","pnpm dlx skills add 5throck\u002Fai-workspace-standards --skill sync","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F5throck\u002Fai-workspace-standards\u002Fblob\u002Fmain\u002Ftemplates\u002Fcommon\u002F.codex\u002Fskills\u002Fsync\u002FSKILL.md",[],[58,66,71,76,81,86],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":65},"01M7BBJDYHJMGTJYSC37JVWY8S","i18n-layout","Text layout and encoding guidance: character encoding (UTF-8, legacy Korean code pages, BOM hazards), line endings, RTL\u002Fbidi handling, and script-specific font selection (Hangul focus). Use when: encoding is corrupted or mojibake appears, an RTL locale must render correctly, fonts must be chosen for a script, or CRLF\u002FBOM issues surface.","https:\u002F\u002Fgithub.com\u002F5throck\u002Fai-workspace-standards\u002Fblob\u002Fmain\u002Ftemplates\u002Fco-work\u002Fskills\u002Fi18n-layout\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":67,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":65},"01M7BBJ9XHAAS1AVGKZZ841VBZ","https:\u002F\u002Fgithub.com\u002F5throck\u002Fai-workspace-standards\u002Fblob\u002Fmain\u002Ftemplates\u002Fco-work\u002F.hermes\u002Fskills\u002Fi18n-layout\u002FSKILL.md",[],[],{"skillNo":72,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":65},"01M7BBJ5C3X8TKFKG5R9P9P49W","https:\u002F\u002Fgithub.com\u002F5throck\u002Fai-workspace-standards\u002Fblob\u002Fmain\u002Ftemplates\u002Fco-work\u002F.gemini\u002Fskills\u002Fi18n-layout\u002FSKILL.md",[],[],{"skillNo":77,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":65},"01M7BBJ1B52X0QMJ2QVBMPJB37","https:\u002F\u002Fgithub.com\u002F5throck\u002Fai-workspace-standards\u002Fblob\u002Fmain\u002Ftemplates\u002Fco-work\u002F.codex\u002Fskills\u002Fi18n-layout\u002FSKILL.md",[],[],{"skillNo":82,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":65},"01M7BBHX91BW2Q2R276MRX5AW3","https:\u002F\u002Fgithub.com\u002F5throck\u002Fai-workspace-standards\u002Fblob\u002Fmain\u002Ftemplates\u002Fco-work\u002F.claude\u002Fskills\u002Fi18n-layout\u002FSKILL.md",[],[],{"skillNo":87,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":65},"01M7BBHQWGXPSFRWN1PRC2NMMV","https:\u002F\u002Fgithub.com\u002F5throck\u002Fai-workspace-standards\u002Fblob\u002Fmain\u002Ftemplates\u002Fco-work\u002F.agents\u002Fskills\u002Fi18n-layout\u002FSKILL.md",[],[]]