con un clic
initialize-project-from-requirements
// Use only in repos that still include the `init/` bootstrap kit to produce Stage A/B/C artifacts, update skill pack selection, and sync provider skill wrappers.
// Use only in repos that still include the `init/` bootstrap kit to produce Stage A/B/C artifacts, update skill pack selection, and sync provider skill wrappers.
Create a goal-aligned macro-level roadmap artifact (dev-docs/active/<task>/roadmap.md) by asking clarifying questions and recording assumptions; planning only (no code changes).
Build a complete, production-embedded Agent module for a real feature request (API + optional worker/sdk/cron/pipeline), including blueprint, scaffolded runtime, prompt pack, docs, and registry entry. Enforces explicit user approvals, no-secrets-in-repo, fixed API route names (run/health), and conversation/memory strategy decisions.
Entry workflow for LLM engineering tasks (provider integration, calling wrapper, routing profiles, prompt templates, cost/telemetry, credentials/config keys). Routes to one procedure and enforces required verification.
Read-only progress reporter. Produces a structured status snapshot from existing project/task artifacts (project hub + dev-docs) and includes an actionable next command; never modifies repo files.
Define and execute a distinctive visual direction for net-new UI or brand refresh work (art direction, typography, color, motion, composition), then deliver a polished reference implementation. Primary intent: creative design direction and visual differentiation; pairs well with style-frontend-ui and build-react-components for engineering hardening.
GitHub Actions CI skill: integrate automated tests (web/api/mobile/perf) with consistent artifacts.
| name | initialize-project-from-requirements |
| description | Use only in repos that still include the `init/` bootstrap kit to produce Stage A/B/C artifacts, update skill pack selection, and sync provider skill wrappers. |
Turn an early project idea into verifiable, file-based outputs:
init/_work/stage-a-docs/init/_work/project-blueprint.jsonnode .ai/scripts/sync-skills.mjsThe initialize-project-from-requirements skill is designed to be bootstrap-only. After initialization, you may remove the init/ kit.
Use the initialize-project-from-requirements skill when:
init/ directory (bootstrap kit present).Do NOT use the skill when:
init/_work/project-blueprint.json is stable.init/_work/stage-a-docs/ (created from templates in templates/)init/_work/project-blueprint.jsonOptional inputs:
both (default), or codex, claude, codex,claude.init/START-HERE.md (intake doc; LLM-maintained blocks)init/INIT-BOARD.md (LLM-owned; pipeline updates only the MACHINE_SNAPSHOT block)init/_work/stage-a-docs/requirements.mdinit/_work/stage-a-docs/non-functional-requirements.mdinit/_work/stage-a-docs/domain-glossary.mdinit/_work/stage-a-docs/risk-open-questions.mdinit/_work/project-blueprint.jsonsrc/ or (apps/, packages/) depending on repo.layout.ai/skills/_meta/sync-manifest.json updated (based on skills.packs)node .ai/scripts/sync-skills.mjsinit/START-HERE.md is the single intake surface for progressive, user-friendly input capture and organization.
BEGIN LLM / END LLM blocks.init/_work/.init-state.json has language set (free-form string).
node init/_tools/init.mjs start --repo-root .node init/_tools/init.mjs set-language --language "<your language>" --repo-root .init/INIT-BOARD.md is LLM-owned. The pipeline updates ONLY the machine snapshot block:
<!-- INIT-BOARD:MACHINE_SNAPSHOT:START --> ... <!-- INIT-BOARD:MACHINE_SNAPSHOT:END -->update-board --apply as the manual fallback.init/_work/.init-state.jsonnode init/_tools/init.mjs start to create initial statevalidated) are automatically updated by check-docs and validate commandsdocsWritten) are automatically updated when check-docs passesuserApproved) and stage transitions are updated via approve --stage <A|B|C> commandstage-a.mustAsk.*) are auto-marked complete when check-docs passes (Stage A validated).init/_work/.init-state.json (except via the set-language command updating language).
init/START-HERE.md LLM blocks for rolling notes and progress during the interview.cleanup-init is runtemplates/stage-checkpoints.mdtemplates/quality-checklist.mdinit/ kit.cleanup-init:
AGENTS.md, README.md, and any active entry docs).init/, init/AGENTS.md, init/README.md, init/_tools/... as current workflow entry).AGENTS.md and project root docs).docs/project/overview/** unchanged.rg -n "init/" AGENTS.md README.md .ai/AGENTS.md dev-docs/AGENTS.md
node init/_tools/init.mjs cleanup-init --repo-root . --apply --i-understand --archive
Initialize state: Run node init/_tools/init.mjs start to create init/_work/.init-state.json and seed init/_work/stage-a-docs/ + init/_work/project-blueprint.json templates.
Set language (required before entry docs): Ask the user to choose a working language (free-form string), then run:
node init/_tools/init.mjs set-language --language "<your language>" --repo-root .
# Example:
# node init/_tools/init.mjs set-language --language "zh-CN" --repo-root .
This creates (copy-if-missing) init/START-HERE.md and init/INIT-BOARD.md.
Domain terminology alignment (MUST ask, but completion is optional):
domain-glossary.md upfront."init/_work/stage-a-docs/domain-glossary.md with provided termsinit/_work/stage-a-docs/domain-glossary.md (for example: a short note Status: deferred or No special terms yet)Use templates/conversation-prompts.md to run a structured requirements interview.
Confirm whether the heavy agent-builder workflow is needed; if not, plan to run Stage C with --skip-agent-builder --i-understand.
(Optional) If you want progress visibility while interviewing, update init/_work/.init-state.json stage-a.mustAsk.* incrementally.
check-docs will auto-mark MUST-ask as complete when Stage A validates.Draft the four Stage A documents using templates under templates/.
Self-review: Complete Stage A checklist in templates/quality-checklist.md.
Validate Stage A docs:
node init/_tools/init.mjs check-docs --docs-root init/_work/stage-a-docs
Use strict mode when you need a hard gate (CI / regulated workflows):
node init/_tools/init.mjs check-docs --docs-root init/_work/stage-a-docs --strict
templates/stage-checkpoints.md to request user approval.node init/_tools/init.mjs approve --stage A
init/_work/project-blueprint.json based on the Stage A docs.node init/_tools/init.mjs validate --blueprint init/_work/project-blueprint.json
node init/_tools/init.mjs suggest-packs --blueprint init/_work/project-blueprint.json --repo-root .
If you want to add missing recommended packs into the blueprint (safe-add only):
node init/_tools/init.mjs suggest-packs --blueprint init/_work/project-blueprint.json --repo-root . --write
templates/quality-checklist.md.templates/stage-checkpoints.md to request user approval.node init/_tools/init.mjs approve --stage B
node init/_tools/init.mjs scaffold --blueprint init/_work/project-blueprint.json --repo-root .
Handle config template coverage:
repo.language + repo.packageManager combination has a template in templates/scaffold-configs/.apply command will auto-generate base config files (e.g., package.json, tsconfig.json, go.mod).requirements.txt or pyproject.toml, for Java: pom.xml or build.gradle).npm init, poetry init, dotnet new) to generate starter configs.init/_work/stage-a-docs/non-functional-requirements.md or create a brief setup guide.Apply scaffold + manifest update + wrapper sync:
node init/_tools/init.mjs apply --blueprint init/_work/project-blueprint.json --repo-root . --providers codex,claude --require-stage-a
--require-stage-a fails only on Stage A doc errors. For strict gating (treat warnings as errors), use --require-stage-a-strict.
If the user opts out of agent-builder, add:
--skip-agent-builder --i-understand
templates/quality-checklist.md.templates/stage-checkpoints.md to confirm completion. User will choose one of: "regen docs", "cleanup init", or "done".node init/_tools/init.mjs review-skill-retention --repo-root .
README.md + AGENTS.md from the blueprint:node init/_tools/init.mjs update-root-docs --apply
If user chose "cleanup init", run the Post-init LLM Doc Path Hygiene gate (Rule 4) before cleanup. Do NOT use one-shot apply --cleanup-init.
(Optional) Remove the bootstrap kit if user chose "cleanup init" or explicitly requests later:
node init/_tools/init.mjs cleanup-init --repo-root . --apply --i-understand --archive
regen docs and/or cleanup init), run:node init/_tools/init.mjs approve --stage C
init/_work/stage-a-docs/risk-open-questions.md..codex/skills/ or .claude/skills/ directly. Only update SSOT in .ai/skills/ and run node .ai/scripts/sync-skills.mjs --scope current --providers both --mode reset --yes. (The repo's SSOT rule applies.)README.md files.README.md will be replaced with a project-specific version generated from the blueprint. The replacement is intentional - the template README should be replaced with project documentation.AGENTS.md will be updated from the blueprint (project type, tech stack, key directories) during Stage C apply.node init/_tools/init.mjs apply --cleanup-init ... for finalization. Always run cleanup as a separate step after Rule 4 (Post-init LLM Doc Path Hygiene) passes.docs/project/overview/**; only active docs should have init routing removed.Before approving Stage C, you MUST review which skills to keep vs prune.
templates/skill-retention-table.template.md and fill the Skill + Description columns in-chat (translate to the user's preferred language if needed). Do NOT save skill-retention-table.md as a file.node .ai/scripts/delete-skills.mjs --skills "<csv>" --dry-run, then re-run with --yes.Stage C apply (and update-root-docs) updates the root AGENTS.md from the blueprint. If manual edits are needed, follow these rules.
| Section | Reason |
|---|---|
| Key Directories table | Core navigation for LLM |
| Routing table | Task-type dispatch |
| Global Rules | Cross-cutting constraints |
.ai/ reference | SSOT skills location |
dev-docs/ reference | Complex task docs pattern |
## Need More? | Navigation to detailed docs |
| Any other unlisted sections | Default: preserve unchanged |
Modification boundary: You are ONLY allowed to add/update: ## Project Type, ## Tech Stack, and entries in the ## Key Directories table. All other content MUST remain unchanged.
| Section | Source | Format |
|---|---|---|
| Project Type | project.name + project.description | One-line summary |
| Tech Stack | repo.language, repo.packageManager, repo.layout, frameworks | Table |
| Key Directories | repo.layout + enabled capabilities | Update existing table |
Note: Do NOT create a separate ## Capabilities section. Express capability info through Tech Stack rows (e.g., Frontend: React, Backend: Express, Database: PostgreSQL) and Key Directories entries (e.g., apps/frontend/, apps/backend/).
Update logic: If a section already exists (e.g., ## Project Type), update its content. If the section does not exist, insert the section in the appropriate location. Do NOT create duplicate sections.
# AI Assistant Instructions
## Project Type
{{project.name}} - {{project.description}}
## Tech Stack
| Category | Value |
|----------|-------|
| Language | {{repo.language}} |
| Package Manager | {{repo.packageManager}} |
| Layout | {{repo.layout}} |
| Frontend | {{capabilities.frontend.framework}} |
| Backend | {{capabilities.backend.framework}} |
| Database | {{capabilities.database.kind}} |
## Key Directories
| Directory | Purpose |
|-----------|---------|
| `src/` or `apps/` | Application code |
| `apps/frontend/` | Frontend application (if enabled) |
| `apps/backend/` | Backend services (if enabled) |
| `.ai/` | Skills, scripts, LLM governance |
| `dev-docs/` | Working documentation |
## Routing
[preserve original routing table]
## Global Rules
[preserve original global rules]
templates/conversation-prompts.md - Question bank for Stage A interviewtemplates/START-HERE.template.md - Template for the intake doc init/START-HERE.md (LLM blocks)templates/INIT-BOARD.template.md - Template for init/INIT-BOARD.md (LLM-owned; machine snapshot markers)templates/requirements.template.md - Stage A requirements doc templatetemplates/non-functional-requirements.template.md - Stage A NFR doc templatetemplates/domain-glossary.template.md - Stage A glossary templatetemplates/risk-open-questions.template.md - Stage A risks templatetemplates/skill-retention-table.template.md - Post-init skill retention table (NEW)templates/project-blueprint.example.json - Stage B blueprint exampletemplates/project-blueprint.schema.json - Stage B blueprint JSON schematemplates/init-state.schema.json - State tracking schema (NEW)templates/init-state.example.json - Initial state template (NEW)templates/quality-checklist.md - Semantic quality self-review (NEW)templates/stage-checkpoints.md - User approval prompts (NEW)templates/scaffold-configs/ - Base config file templates (NEW)scripts/init-pipeline.mjs - Main pipeline script (start, status, approve, validate, check-docs, scaffold, apply, cleanup)scripts/scaffold-configs.mjs - Standalone config file generator (advanced usage, see note below)Note on config generation:
| Entry Point | Use Case |
|---|---|
apply command (default) | Main workflow: scaffold + configs + manifest + wrapper sync in one step |
scaffold-configs.mjs | Advanced: regenerate config files only, without running the full pipeline |
The apply command generates config files by default. Use --skip-configs to disable config generation. The standalone scaffold-configs.mjs is useful when you only need to update configs (e.g., after editing the blueprint) without re-running the entire scaffold process.
Template coverage and fallback behavior:
templates/scaffold-configs/ (currently: typescript-pnpm/, go/, cpp-xmake/, react-native-typescript/).apply.npm init, poetry init).