ワンクリックで
flow-init
Initialize project with AGENTS.md and rules, handling both Greenfield (new) and Brownfield (existing) projects.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Initialize project with AGENTS.md and rules, handling both Greenfield (new) and Brownfield (existing) projects.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Analyze and answer user questions in Autonomous Mode by reading documentation and inspecting codebase
Automated commit workflow with atomic grouping
Iterative issue investigation with user-controlled hypothesis selection
Perform a comprehensive "Lead Engineer" audit: structure, consistency, code quality, technical debt, documentation coverage, and terminology checks.
Create critiqued plan in whiteboard.md using GODS framework with proactive uncertainty resolution
Analyze agent's process, logic, technical decisions, context usage, and undocumented discoveries to find behavioral errors, poor engineering choices, inefficiencies, and missing knowledge in project instructions.
| name | flow-init |
| description | Initialize project with AGENTS.md and rules, handling both Greenfield (new) and Brownfield (existing) projects. |
| disable-model-invocation | true |
Analyze the project, conduct an interview (for Greenfield projects), and
generate 3 AGENTS.md files (root, documents/, scripts/), a CLAUDE.md symlink
(for Claude Code compatibility), rules, and scaffolding.
The agent uses template files from assets/ as reference and writes files directly.
File Structure: flow-init produces 3 AGENTS.md files:
./AGENTS.md — core agent rules, project metadata, planning rules, TDD flow./documents/AGENTS.md — documentation system rules (SRS/SDS/GODS formats, compressed style)./scripts/AGENTS.md — development commands (standard interface, detected commands)
<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.)../AGENTS.md (if it exists):
./documents/AGENTS.md../scripts/AGENTS.md../AGENTS.md.Component Inventory
inventory section from the analysis output (step 2) to check which components exist.Generate AGENTS.md Files
Read template files from assets/ directory:
AGENTS.template.md — reference for ./AGENTS.mdAGENTS.documents.template.md — fallback for ./documents/AGENTS.mdAGENTS.scripts.template.md — fallback for ./scripts/AGENTS.mdFor Greenfield: Fill templates 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). Remove any sections that were extracted for documents/ or scripts/../documents/AGENTS.md: Use extracted documentation sections from the existing ./AGENTS.md. If no documentation sections were found, use AGENTS.documents.template.md as fallback../scripts/AGENTS.md: Use extracted script/command sections from the existing ./AGENTS.md. If no command sections were found, use AGENTS.scripts.template.md as fallback, filling {{DEVELOPMENT_COMMANDS}} from detected stack and {{COMMAND_SCRIPTS}} from project config.For each file:
Claude Code Compatibility (CLAUDE.md Symlinks)
CLAUDE.md -> AGENTS.md in every directory that has an AGENTS.md:
./CLAUDE.md -> ./AGENTS.md./documents/CLAUDE.md -> ./AGENTS.md./scripts/CLAUDE.md -> ./AGENTS.mdCLAUDE.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.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 has_subdirectory_globs is false: warn user and propose adding documents/AGENTS.md and scripts/AGENTS.md to the instructions array in opencode.json.Generate Documentation
documents/:
documents/requirements.md (SRS): Fill based on interview data (Greenfield) or inferred context (Brownfield). Skip if file exists and has more than 50 lines.documents/design.md (SDS): Create initial structure. Skip if file exists and has more than 50 lines.documents/whiteboard.md:
Configure Development Commands
use_deno_tooling: true, FORCE usage of flow-skill-configure-deno-commands.Deno -> flow-skill-configure-deno-commands).SKILL.md.check, test, dev, prod) in scripts/.package.json) to reference these scripts.scripts/ already exists with standard commands and user chose "create missing" -> skip.check command to ensure it works.use_devcontainer from interview data.flow-skill-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 and their respective subdirectory files.</step_by_step>