Create deterministic smart initialization for a fresh repository, or verify and safely repair existing Singularity Flow assets without overwriting repository customizations.
Install
npx skillscat add ashokraj2011/singularityflow/sflow-init Install via the SkillsCat registry.
Verify or repair branch initialization
Output contract: Let the CLI validate and mutate state; preserve its exact result, warnings, publication status, artifacts, and next actions. For suggested actions, pair Shell with the returned Copilot command; honor commandGuidance. If absent, say "Copilot: no verified equivalent"; never invent a slash command.
Boundary: no Story required; cwd=opened Git root or verified repositoryPath from singularity-flow workspace current --json; refuse if neither resolves; never search $HOME/parents.
Setup only: do not implement, submit, approve, reset, stash, force-push, or edit customizations.
For explicitly requested smart or zero-manual initialization, require a fresh repository:
- Run
singularity-flow init --smart-detect --dry-run --jsononce. Show stacks, commands, gaps,
suggestions, write set, and proposal SHA-256. Never run a detected command. - Ask explicitly about unresolved candidates and optional protections. Never infer ambiguity or
select unchecked suggestions. - Show
--accept-proposal <file> --confirm <sha256>; use--yesonly after explicit acceptance. - Activate only after exact confirmation. Preserve the receipt, commit, readiness, and next
command. Proposal-only and review-proposal files are not active law. - Run metadata-only
singularity-flow precheck --quick --json. Offer Copilot/sf-readyand
Shellsingularity-flow precheck --run --scope dependency-test --json. Only the readiness flow
(/sf-readyor its shown Shell equivalent)—not init—executes the confirmed repository plan.
On INI_RECOVERY_REQUIRED, run only its exactsingularity-flow init --recover --proposal <SHA256> --json; never edit its journal.
For ordinary init, --check, or --repair, continue with the compatible workflow below.
- Run
singularity-flow init --check --jsonfirst. Show branch, completeness, missing files, and
validation errors. - Validate a supplied Work ID as letters, numbers,
.,_, or-. Ifsetup/<WORK-ID>is current, usesingularity-flow init --repair. Otherwise require a clean tree and runsingularity-flow init --repair --work-id <WORK-ID> --base <BASE> --fetch
to create, reuse, or fast-forward the setup branch. Never initialize the Story branch itself;
leave it available forsingularity-flow start <WORK-ID> --from-branch setup/<WORK-ID>after setup is committed
and published. Default tomainonly for a new setup branch; never modify base. - When no Work ID was supplied and the check reports missing assets, run
singularity-flow init --repairon the current branch. - Restore only missing packaged files; never replace customization. Restore invalid files from Git.
- Rerun
singularity-flow init --check --json, then runsingularity-flow doctor --offline --json. Report every remaining failure
and warning with its exact fix. - Show
git status --shortand added files. Do not commit or push repair automatically. - Before the first Story, offer
/sf-readyandsingularity-flow precheck --run --scope dependency-test --json.
If the initial check is complete, make no changes and say that the branch is
already initialized.