flow-init
Initialize, inspect, resume, or migrate portable PWDEV Flow project state. Use when the user asks to set up PWDEV Flow, adopt an existing repository or legacy PWDEV Code workspace, resume its workflow
SKILL.mdplugins/pwdev-flow/skills/flow-init/SKILL.md
GitHubInitialize PWDEV Flow
Read workflow, artifacts, migration, and safety before changing project state.
Procedure
- Inspect the repository without reading secrets:
- locate
AGENTS.mdand read applicable instructions; - treat
CLAUDE.mdas optional compatibility context when present; - inspect manifests, source layout, tests, and recent Git history;
- never open
.env, credentials, tokens, private keys, or certificates.
- locate
- Check for
.planning/flow/config.json,.planning/flow/state.md, and the legacy.planning/config.json. - Route the request as
inspect,initialize, ormigrate:- if Flow state exists, do not overwrite it; summarize the active workflow, last gate, artifacts, and next valid action;
- if legacy config exists and Flow config does not, report a migration candidate instead of initializing over it;
- use
migrateonly when the user asks to adopt the legacy workspace.
- For
migrate:- resolve migrate_legacy.py from this installed plugin and run
planwith the active repository root and--runtime <your adapter>; - present mappings, excluded field names, and conflicts without exposing excluded values;
- stop for explicit approval before
apply; - after approval, run
apply, create missing Flow state/directories without overwriting existing paths, and inventory legacy artifacts in.planning/flow/migration.md; - do not copy or move legacy artifacts without a second approval for exact paths;
- record
migratedthrough the audit helper only when the migrated config enables audit.
- resolve migrate_legacy.py from this installed plugin and run
- If state does not exist and the user requested fresh initialization:
- classify the repository as
greenfieldorbrownfieldfrom existing source and history; - create
.planning/flow/quick/and.planning/flow/reports/; - create configuration and state using the exact schemas in artifacts;
- set the artifact language from the user's current language unless explicitly configured otherwise;
- record
runtimeas the adapter you are running as,claudeorcodex; it is metadata about who initialized the workspace and never makes the artifacts unreadable from the other runtime; - set
auto_committofalse.
- classify the repository as
- Report created, migrated, or discovered paths and recommend one next action.
Constraints
- Preserve existing configuration fields that this version does not recognize.
- Preserve
.planning/config.jsonbyte-for-byte during migration. - Do not add project dependencies, hooks, branches, commits, or remote configuration.
- Do not create or rewrite
AGENTS.mdunless the user separately requests it. - Keep all initialization writes under
.planning/flow/.
Output
Return MODE, STATUS, repository classification, state path, configuration path, MIGRATION when applicable, and NEXT. Link every real local artifact with an absolute path in the final response.