skills/scafforge-pivot/SKILL.md
Route a midstream feature, design, architecture, or workflow change through Scafforge's host-side pivot flow. Use when an existing repo needs a controlled contract update that changes canonical truth, ticket lineage, or managed workflow surfaces without collapsing into improvised repair or ad hoc backlog edits.
npx skillsauth add merceralex397-collab/scafforge scafforge-pivotInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when an existing repo needs a midstream change that is larger than routine ticket refinement but is not just workflow repair.
This is the host-side pivot surface. It classifies the requested change, updates canonical truth first, records which surfaces are now stale, routes the required downstream refresh work, and requires a post-pivot verification pass before handoff. Use ../../references/competence-contract.md as the bar for whether the repo still exposes one clear legal next move after the pivot.
Pivot orchestration command:
python3 scripts/plan_pivot.py <repo-root> --pivot-class <class> --requested-change "<summary>" --format both
Use this to write the canonical Pivot History entry, emit .opencode/meta/pivot-state.json, record bounded downstream refresh routing, and run the post-pivot verification pass. Keep it thin: this command plans and records the pivot, then routes follow-on work to the right downstream skills.
Downstream stage recording command:
python3 scripts/record_pivot_stage_completion.py <repo-root> --stage <stage> --completed-by <owner> --summary "<summary>" --evidence <repo-relative-path>
Use this to record evidence-backed completion of a routed pivot downstream stage inside .opencode/meta/pivot-state.json.
Pivot lineage execution command:
python3 scripts/apply_pivot_lineage.py <repo-root>
Use this when the pivot state already contains explicit runtime-ready reopen, reconcile, or supersede actions backed by canonical evidence. This command must execute the generated repo's own ticket tools; it must not mutate tickets/manifest.json directly from package-side Python.
Pivot restart publication command:
python3 scripts/publish_pivot_surfaces.py <repo-root>
Use this to republish START-HERE.md, .opencode/state/latest-handoff.md, and .opencode/state/context-snapshot.md directly from pivot state when the pivot planner or later pivot execution changes repo truth.
Explicit lineage-routing flags:
--supersede-ticket <id>--reopen-ticket <id>--reconcile-ticket <id>--lineage-evidence <ticket-id>=<repo-relative-artifact-path>--replacement-source <ticket-id>=<replacement-source-ticket-id>--replacement-source-mode <ticket-id>=<mode>Use these when the pivot already proves specific ticket lineage actions that must be routed explicitly into the downstream ticket follow-up stage.
scaffold-kickoff classifies the request as a pivotIf the repo only needs diagnosis, route to ../scafforge-audit/SKILL.md.
If the repo only needs managed workflow repair with no project-truth change, route to ../scafforge-repair/SKILL.md.
feature-addfeature-expanddesign-changearchitecture-changeworkflow-changeRead the current repo truth first:
docs/spec/CANONICAL-BRIEF.mdtickets/manifest.json.opencode/state/workflow-state.json.opencode/meta/bootstrap-provenance.jsonSTART-HERE.mdClassify the pivot before editing anything. Record which class applies, what changed, and which current surfaces are now stale.
Do not treat a true design or architecture pivot as ordinary backlog refinement. Do not treat a pure managed-surface repair as a pivot when canonical project truth did not change.
Before refreshing any derived or managed surfaces:
docs/spec/CANONICAL-BRIEF.mdPivot History entry that records:
Do not regenerate tickets, prompts, local skills, or restart surfaces against stale brief truth.
Produce a machine-readable stale-surface map that classifies affected surfaces as:
stablereplaceregenerateticket_follow_uphuman_decisionPersist the resulting pivot state at .opencode/meta/pivot-state.json so later handoff and review work can inspect the exact pivot classification, stale-surface map, downstream refresh routing, downstream execution-state progress, and post-pivot verification result.
At minimum, classify these families:
If workflow surfaces drifted, route the managed refresh through ../scafforge-repair/SKILL.md instead of open-coding the same repair logic here.
The pivot state should also carry a machine-readable ticket_lineage_plan whenever the pivot already proves specific ticket supersede, reopen, reconcile, or follow-up actions.
When the pivot already includes runtime-ready lineage metadata, the plan should capture that too so apply_pivot_lineage.py can execute those actions through the generated repo's own ticket_reopen, ticket_reconcile, or ticket_create tools instead of leaving them as prose.
The pivot state must also expose machine-readable restart-surface inputs:
pivot_in_progresspivot_classpivot_changed_surfacespending_downstream_stagescompleted_downstream_stagespost_pivot_verification_passedThe pivot state must also record restart-surface publication truthfully:
Use the stale-surface map to route the smallest coherent follow-on set:
../project-skill-bootstrap/SKILL.md when repo-local skills need regeneration../opencode-team-bootstrap/SKILL.md when the agent team, tools, or allowlists need redesign../agent-prompt-engineering/SKILL.md when prompt behavior or delegation rules changed../ticket-pack-builder/SKILL.md when tickets must be refined, reopened, superseded, or reconciled../scafforge-repair/SKILL.md only when managed workflow surfaces drifted and need safe managed refreshDo not let scafforge-pivot become a second scaffold engine or a second repair engine.
When the pivot invalidates existing ticket assumptions:
Do not leave pre-pivot tickets pretending to satisfy the new design. If the specific ticket actions are already known at pivot time, record them explicitly in the pivot state's ticket_lineage_plan instead of burying them only in prose.
Before handoff, verify that the pivot left the repo continuable:
If the pivot included transcript-backed workflow defects, reuse the normal verification basis instead of dropping the original causal evidence.
After pivot work and verification are complete, continue to ../handoff-brief/SKILL.md.
The handoff must state that a pivot occurred, which surfaces changed, and what follow-up still remains. Do not depend on a later generic handoff step to make pivot state visible; the pivot lifecycle must be able to republish restart surfaces immediately after planning or explicit lineage execution changes the repo truth.
docs/spec/CANONICAL-BRIEF.md with Pivot History.opencode/meta/pivot-state.jsonBefore leaving this skill, confirm all of these are true:
testing
Use when validating Android feature flows in an emulator with adb-driven launch, input, UI-tree inspection, screenshots, and logcat capture.
development
Best practices for Remotion - Video creation in React
development
Set browser-game architecture before implementation. Use when the user needs engine choice, simulation and render boundaries, input model, asset organization, or save/debug/performance strategy.
development
Prepare and optimize browser-game 3D assets. Use when the user asks for GLB or glTF shipping work, including Blender cleanup and export, collision or LOD setup, compression, texture packaging, and runtime validation.