Factory Sync
Update this repository's factory submodule to the latest factory/main commit
through an auditable PR.
Use this skill before a Factory-backed wrapper skill when the user wants the latest shared skill behavior.
Workflow
- Verify the current repo has a clean worktree.
- Sync the default branch:
git fetch origin maingit checkout maingit pull --ff-only origin main
- Reset the dedicated sync branch from current
main:git checkout -B codex/update-factory-submodule main- do not reuse prior
codex/update-factory-submodulehistory
- Update Factory:
git submodule update --init factorygit submodule update --remote factory
- If
git status --short factory .gitmodulesis empty:- report
factory already at latest main - return the current
git -C factory rev-parse HEAD - do not create a PR
- report
- If the submodule pointer changed:
- ensure only
factoryand optionally.gitmoduleschanged git add factory .gitmodulesgit commit -m "chore: update factory submodule"git push --force-with-lease -u origin codex/update-factory-submodule- create a PR against
main - merge the PR immediately without polling, waiting for, or inspecting PR CI
- do not bypass branch protection or unresolved-review requirements
- if branch protection blocks only because required checks are pending, enable auto-merge when available or wait for the protected merge gate to clear without inspecting CI logs
- if GitHub blocks merge for failed checks, unresolved review, permissions, or policy, report the blocker and stop before post-merge steps
- do not delete the branch
- ensure only
- Sync local
mainafter merge and monitor post-merge CI. - If post-merge CI fails and the failure is repo-fixable, run a bounded hotfix
loop from updated
main; stop for external, policy, safety, timeout, or no-progress blockers. - Return the merged Factory commit.
Safety Rules
- Do not edit files inside
factory. - Do not run product implementation work in this skill.
- Do not hide unrelated dirty files; stop and report them.
- Use
--force-with-leaseonly for the dedicated sync branch after resetting it from currentmain; stop if the lease fails. - Do not inspect PR CI for the submodule-pointer-only PR; only wait when branch protection requires pending checks to clear before GitHub allows merge.
- Use machine-readable command output when useful, for example
wrkr scan --json,axym collect --dry-run --json, orgait doctor --jsondepending on the active repo.
Output
- synced Factory commit SHA
- PR URL or
already up to date - merge SHA when a PR was merged
- post-merge CI status and hotfix PRs when used
- next suggested command, such as
Use $adhoc-plan ...