Adapt all installed framework primitives (skills, agents, AGENTS.md artifacts, hooks) to project specifics. Standalone adaptation — independent of flowai-update.
Adapt installed flowai framework primitives (skills, agents, AGENTS.md artifacts, hooks) to the current project's tech stack and conventions. Runs independently of flowai-update — use after first install, stack change, or selectively for specific resources.
Adaptation state is tracked through git history — no extra metadata fields needed. The working tree contains the current version; git show HEAD:<path> provides the previous adapted version for 3-way merge.
Two subagents handle the actual adaptation work:
flowai-skill-adapter — adapts a single skill's SKILL.mdflowai-agent-adapter — adapts a single agent's .md body (preserving frontmatter)
</context>
<step_by_step>
Detect IDE config directories
.claude/, .cursor/, .opencode/.Parse arguments
--skills -> only skills.--agents -> only agents.--assets -> only AGENTS.md artifacts.--hooks -> only hooks.Adapt skills (when applicable)
flowai-* directories in {ide}/skills/.flowai-skill-adapter subagent per skill — all in parallel.git show HEAD:<path>/SKILL.md (previous adapted version, if exists)git diff HEAD -- <skill-path>.git checkout HEAD -- <skill-path>.Adapt agents (when applicable)
flowai-* files in {ide}/agents/.flowai-agent-adapter subagent per agent — all in parallel..md (current version)git show HEAD:<path> (previous adapted version, if exists)git diff HEAD -- <agent-path>.git checkout HEAD -- <agent-path>.Verify AGENTS.md artifacts (when applicable)
pack.yaml from installed packs (via .flowai.yaml) to get the assets: mapping (template name -> artifact path).pack.yaml is unavailable, use default mapping:
AGENTS.template.md -> AGENTS.mddocuments/AGENTS.md or scripts/AGENTS.md, defer to flowai-update or flowai-init to run the legacy-collapse procedure — do NOT handle collapse here.{ide}/assets/.
b. Read the project artifact.
c. Compare using git diff --no-index -- <template> <artifact>.
d. Ignore {{PLACEHOLDER}} sections in the diff.
e. Focus on framework-originated sections (rules, TDD flow, doc formats, planning rules).
f. If framework sections are outdated -> propose update with before/after.Adapt hooks (when applicable)
{ide}/scripts/ (installed by flowai).deno lint, npm test).Summary
</step_by_step>