framework/core/commands/init/SKILL.md
Initialize project with AGENTS.md and rules, handling both Greenfield (new) and Brownfield (existing) projects.
npx skillsauth add korchasa/flowai initInstall 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.
Analyze the project, conduct an interview (for Greenfield projects), and
generate a single AGENTS.md file (root) with all project rules, a CLAUDE.md symlink
(for Claude Code compatibility), rules, and scaffolding.
Legacy three-file layouts (documents/AGENTS.md, scripts/AGENTS.md) are detected and collapsed into the single root file.
The agent uses template files from assets/ as reference and writes files directly.
File Structure: init produces a single ./AGENTS.md file containing all sections:
<step_by_step>
Initialize
Analyze Project
deno run --allow-read scripts/generate_agents.ts .
{ "ok": bool, "result": {...} }. The result field contains: project metadata (is_new, stack, file_tree, readme_content), component inventory, and verification checks.Greenfield Workflow (Interview)
interviewer subagent (or conduct Q&A inline if subagent unavailable).
Prompt: "You are helping initialize a new (Greenfield) project. Conduct a brief interview to gather:
Return a SINGLE JSON object: { "project_name": "...", "vision_statement": "...", "target_audience": "...", "problem_statement": "...", "solution_differentiators": "...", "risks_assumptions": "...", "stack": ["..."], "architecture": "...", "key_decisions": "...", "preferences": ["tdd", "strict-mode", ...], "use_deno_tooling": boolean, "use_devcontainer": boolean }"
Brownfield Workflow (Discovery & Extraction)
package.json, deno.json, README.md, etc.).legacy_layout_detected from the analyzer output.documents/AGENTS.md and/or scripts/AGENTS.md exist):
./AGENTS.md, ./documents/AGENTS.md, ./scripts/AGENTS.md.## Documentation Rules section, scripts content → ## Development Commands section, everything else stays in its existing root section../AGENTS.md with the merged result.git rm the two sub-files (documents/AGENTS.md, scripts/AGENTS.md) and their CLAUDE.md symlinks (documents/CLAUDE.md, scripts/CLAUDE.md) if they exist../AGENTS.md.Component Inventory
inventory section from the analysis output (step 2) to check which components exist.Generate AGENTS.md File
Read the pack-level template at ../../assets/AGENTS.template.md (reference for ./AGENTS.md, single file containing all sections).
For Greenfield: Fill template with interview data. Replace {{PLACEHOLDERS}} with actual values.
For Brownfield:
./AGENTS.md: Use the template structure. Fill with data inferred from the project. Preserve user's custom PROJECT_RULES (content between --- and the next ## heading). If legacy layout was collapsed in step 4, the merged content is already prepared — use it.Output: a single ./AGENTS.md file.
Claude Code Compatibility (CLAUDE.md Symlink)
./CLAUDE.md -> ./AGENTS.md.CLAUDE.md does not exist: create the symlink, report to user.CLAUDE.md exists and is already a correct symlink to AGENTS.md: skip silently.CLAUDE.md exists as a regular file or wrong symlink: warn the user, show the current content/target, and ask for confirmation before replacing with the symlink.CLAUDE.md symlinks exist (documents/CLAUDE.md, scripts/CLAUDE.md), they should already be deleted during the legacy-collapse step (step 4). If they still exist at this point, delete them now.OpenCode Compatibility Check
inventory section from the analysis output (step 2) includes opencode_json.exists and opencode_json.has_subdirectory_globs.opencode_json.exists is true and the instructions array contains references to documents/AGENTS.md or scripts/AGENTS.md: propose removing only those stale entries. Do NOT add an AGENTS.md replacement entry — OpenCode auto-loads the root file.Generate Documentation
AGENTS.md: SRS, SDS, tasks, and index. If a role is missing, add it to AGENTS.md before generating docs.SRS: Fill based on interview data (Greenfield) or inferred context (Brownfield). Skip if file exists and has more than 50 lines.SDS: Create initial structure. Skip if file exists and has more than 50 lines.tasks directory:
Configure Development Commands
use_deno_tooling: true, FORCE usage of configure-deno-commands.Deno -> configure-deno-commands).SKILL.md.check, test, dev, prod) using the project's native command runner. For example, for Node.js projects add scripts to package.json; for Make-based projects add targets to Makefile. Do NOT create a scripts/ directory with wrapper scripts if the project's command runner can handle commands directly.check command to ensure it works.use_devcontainer from interview data.setup-ai-ide-devcontainer skill. Read and follow its SKILL.md.project_info.json, interview_data.json (if created).deno run --allow-read scripts/generate_agents.ts .
verification section. If passed is false (exit code 1), fix the issues before proceeding.check command runs successfully../AGENTS.md exists and no legacy documents/AGENTS.md or scripts/AGENTS.md remain.</step_by_step>
development
Use when the user asks to add TypeScript strict-mode code-style rules to AGENTS.md for a TypeScript project using strict mode. Do NOT trigger for Deno projects (use setup-agent-code-style-deno) or non-strict TS configurations.
development
Use when the user asks to add Deno/TypeScript code-style rules to AGENTS.md, or during initial Deno project setup when code-style guidelines need to be established. Do NOT trigger for non-Deno TypeScript projects (use setup-agent-code-style-strict), or for runtime-agnostic style advice.
testing
Use when the user provides a source (URL, file path, or free text) to save into the project's memex — a long-term knowledge bank for AI agents. Stores the raw source, extracts entities into cross-linked pages, runs a backlink audit, and updates the index and activity log. Do NOT trigger on casual reads; only when the intent is to persist a source into the memex.
development
Use when the user asks to audit a memex (long-term knowledge bank for AI agents) for orphans, dead SALP REFs, missing sections, contradictions, or index drift. Runs a deterministic structural check, layers LLM-judgement findings, optionally auto-fixes trivial issues with `--fix`. Do NOT trigger on general code linting.