Initialize a greenfield project with a comprehensive milestone record system — verifies the repo is empty, plans the architecture and initial milestones with the user, writes everything to `milestones.md`, commits, and optionally starts implementing M0 through MX automatically. Use this whenever the user wants to start a brand new project with structured milestone tracking, including phrases like "start a new project", "greenfield", "init milestones", "let's build X from scratch", "/init-milestone", or any description of a new project idea when the repo is empty or near-empty. This skill is the entry point to the milestone record system — it must be used at project inception because the record is append-only and captures the full design history from day one.
When an AI agent picks up a project for the first time, it faces a cold-start problem: it can read the code, but it can't see the reasoning — why this abstraction exists, what alternatives were rejected, which decisions were later reversed. Scattered docs help, but they rot and fragment.
The milestone record solves this by capturing every substantive decision in a single chronological file (milestones.md) from the project's first commit. Because milestones are append-only, the record includes regressions, reversals, and dead ends — not just the happy path. An agent reading milestones.md top-to-bottom gets the full design history as a narrative.
This only works if the system starts with the project. You can't backfill the reasoning behind existing code — that context is lost. That's why this skill is greenfield-only.
Verify the repo is genuinely new. The heuristic: check git history depth and content size.
git log --oneline — if there are more than 3 commits, or any commit touches substantial implementation code, it's not greenfield.milestones.md or plan.md — if either has milestone content, it's not greenfield.Borderline cases (a flutter create or cargo init the user just ran): lean toward accepting. The scaffolding is generated, not authored — the design history hasn't started yet.
If the repo isn't greenfield:
"This repo already has substantive code or history, so I can't start the milestone record — the system needs to begin with the project to capture the full design history. Use
/next-milestoneto add milestones to an existing project."
The user provides [Initial target] — what they want to build. This might be one sentence or a detailed spec.
If the target is too vague to scope milestones, ask one clarifying question. If it needs more than one, ask the user to write a few more sentences about what they envision. Don't over-interview — the milestones themselves will force specificity.
Use plan mode (EnterPlanMode) if available. If plan mode isn't available in the current environment, design the plan inline in the conversation — the important thing is the content, not the tool.
The plan should include:
Include additional sections (Architecture, State Machine, UI Style, etc.) when the project warrants them — match the complexity of the plan to the complexity of the project.
- **MX — Title**: Dense paragraph describing the goal and approach.
(a) concrete deliverable one
(b) concrete deliverable two
(c) concrete deliverable three
**Out of scope:** things explicitly excluded from this milestone.
Conventions:
(major, minor) numerically: M4 → M4.5 → M4.10 → M5MX.y are for follow-ups, polish, and scoped fixes to a parent MX(a) (b) (c) for scannable handoff to implementer agents**Out of scope:** line when there's ambiguity about what's includedExit plan mode and present the complete plan to the user.
Show the full plan including all milestones. This is the only manual gate in the entire workflow. Wait for explicit approval.
If the user requests changes, revise and re-present. After two revision rounds, ask what's fundamentally off rather than nibbling at wording.
After approval, write the plan to milestones.md at the project root. The file's sections should match what the plan designed — at minimum Context, Key Decisions, and Build Order, plus whatever other sections the project needs.
Commit the milestone record on its own, before any implementation:
git add milestones.md
git commit -m "docs: init milestone records"
This is the one commit that doesn't follow the MX: subject convention — it's the meta-commit that creates the tracking system itself. Every commit after this one uses the milestone prefix.
Ask: "Milestone record is committed. Want me to start implementing from M0?"
references/implementation-pipeline.md for the full implement → verify → commit loop. Queue all milestones (M0 through MX) and work through them automatically — each implementation commit uses the MX: subject format./next-milestone when they're ready.