一键导入
fresh-start
Orient to project structure and load context. Use at the start of each new session or after context reset to understand the project state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Orient to project structure and load context. Use at the start of each new session or after context reset to understand the project state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate EXECUTION_PLAN.md and scoped AGENTS.md files for a feature. Use after /feature-technical-spec to create the task breakdown.
Generate the greenfield execution plan plus root and scoped AGENTS.md files. Use after /technical-spec to create the phased task breakdown.
Guide discovery and discussion to determine how an AI coding agent can autonomously run and verify a specific user flow end to end. Use when the user asks what would be needed to test a flow, prove an app works, create an E2E/self-test harness, make agent verification repeatable, or evaluate whether an existing test setup lets the agent verify behavior. This skill is for shaping the verification approach before implementation: read the repo's product docs and existing verification contracts, identify the real user flow and channel under test, uncover missing controllable state or external dependencies, ask focused questions, and produce a concrete agent-runnable verification plan only after the flow is understood.
Exploratory conversation before /product-spec. Asks one question at a time, runs background research for open-source/off-the-shelf alternatives, and writes DISCOVERY_NOTES.md. Use when the user has an idea but hasn't scoped it yet.
Define feature requirements (problem, users, scope, acceptance criteria) through guided Q&A and write FEATURE_SPEC.md. Use when starting a new feature.
Define technical approach (architecture, integration points, data model) for a feature through guided Q&A and write FEATURE_TECHNICAL_SPEC.md. Use after /feature-spec.
| name | fresh-start |
| description | Orient to project structure and load context. Use at the start of each new session or after context reset to understand the project state. |
| argument-hint | ["project-directory"] |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash, Skill, AskUserQuestion |
Orient to a scoped execution directory and load context for execution.
Nested skill rule: When this workflow invokes another skill (e.g.,
/configure-verification, /phase-prep, /phase-start), you MUST return to
this checklist after the nested skill completes and continue with the next
unchecked item. Do not stop or summarize after a nested skill returns.
Copy this checklist and track progress:
Fresh Start Progress:
- [ ] Detect context (greenfield plan vs feature directory)
- [ ] Directory guard (verify AGENTS.md + EXECUTION_PLAN.md exist)
- [ ] Plan status guard (confirm this scoped directory is current)
- [ ] Git initialization (if needed)
- [ ] Feature branch setup (feature mode only)
- [ ] Scoped AGENTS check
- [ ] Read context and summarize
- [ ] Auto-configure verification (first run only)
- [ ] Phase state detection
- [ ] Auto-prep phase (first run only)
- [ ] Branch context detection
Use the current working directory by default.
If $1 is provided, treat $1 as the working directory and read files under $1 instead.
Determine working context before validation.
Convention: Run execution commands from the scoped directory that contains the active EXECUTION_PLAN.md:
plans/greenfield/features/<name>/Let WORKING_DIR = $1 if provided, otherwise current working directory
If WORKING_DIR matches pattern */features/* (contains /features/ followed by a feature name):
/project/features/foo → /project)If WORKING_DIR matches pattern */plans/greenfield*:
/project/plans/greenfield → /project)Otherwise:
Confirm the required files exist:
PROJECT_ROOT/AGENTS.md must exist
EXECUTION_PLAN.md must exist in SCOPE_DIR
If either is missing:
WORKING_DIR = PROJECT_ROOT and PROJECT_ROOT/plans/greenfield/EXECUTION_PLAN.md exists, tell the user:
plans/greenfield/cd plans/greenfield/fresh-start.toolkit-marker exists), instruct them to:
/setup <project-path> from the toolkit repo, then /generate-plan from the project (or /feature-plan for features)cd into the project/feature directory/fresh-start/fresh-start <project-path>Read PROJECT_ROOT/plans/PLAN_STATUS.md if it exists.
Current plan path to SCOPE_DIR relative to
PROJECT_ROOT.Current status is not active, STOP. Report that the current plan is
not implementable and ask the user to choose or reactivate a plan.Current plan points to a different path than SCOPE_DIR, STOP. Tell
the user the current active plan path and instruct them to cd there before
running /fresh-start.SCOPE_DIR is under plans/archive/ or features/archive/, STOP.
Archived plans are historical context only.In PROJECT_ROOT (not the feature directory):
git -C PROJECT_ROOT rev-parse --is-inside-work-tree 2>/dev/null
If this returns "true", it's already a git repo.git init
git branch -M main
git add -A
Verify with git status that files are staged correctly.
git commit -m "chore: initial commit"
Verify with git log --oneline -1 that the commit was created.If MODE = "feature", create an isolated branch for this feature work:
Derive FEATURE_NAME from the feature directory (basename of SCOPE_DIR, e.g., analytics-dashboard)
Check current branch:
git branch --show-current
If already on a feature/FEATURE_NAME branch, skip (already set up)
Otherwise, create and switch to the feature branch:
# Commit any uncommitted changes first (preserves user work)
git add -A && git diff --cached --quiet || git commit -m "wip: uncommitted changes before feature/FEATURE_NAME"
Verify with git status that files are staged correctly.
# Create feature branch from current HEAD
git checkout -b feature/FEATURE_NAME
Verify with git branch that the new branch is active.
Report: "Created branch feature/FEATURE_NAME for isolated feature development"
If SCOPE_DIR/AGENTS.md exists and SCOPE_DIR != PROJECT_ROOT, report:
If it does not exist and MODE is feature or greenfield, report:
Silently auto-detect verification commands if not already configured.
PROJECT_ROOT/.claude/verification-config.json (use Read tool directly).
If the file does not exist (read fails with not found), treat as missing and go to step 4.commands key → SKIP. Do not invoke /configure-verification.
Report "Verification config already exists" and go directly to Phase State Detection.{"skipped": true} → SKIP. Same as above.commands nor
skipped), invoke /configure-verification with SCOPE_DIR. This runs silently
with no prompts. If it fails, report the error and continue.→ CONTINUE to Phase State Detection (do not stop after this step).
Check for existing phase state to determine if this is a resume or first run:
Check if .claude/phase-state.json exists in:
SCOPE_DIR (if feature mode)PROJECT_ROOT (if greenfield mode)If valid phase state exists (file exists, parses correctly, has current_phase):
RESUMING SESSION
================
Current phase: {current_phase}
Completed: {count} tasks
In progress: Task {in_progress_task} (if any)
Last activity: {relative time, e.g., "2 hours ago"}
in_progress_task exists, offer to continue:
If no phase state exists (or file is invalid/stale):
Skip this section entirely if resuming (phase-state.json exists and is valid).
After context reading and verification config, automatically prepare the next phase:
Determine next phase number:
Invoke /phase-prep {next_phase} silently.
/phase-start if
all checks pass (via its existing auto-advance logic)./phase-start manually after resolving.Fallback auto-advance check — After /phase-prep returns, read
.claude/phase-prep-result.json. If the file does NOT exist, phase-prep
dropped its auto-advance step (known issue with nested Skill tool invocations).
In this case:
/phase-start {next_phase} directly
WARNING: phase-prep did not complete auto-advance. Invoking /phase-start directly.
→ CONTINUE to Branch Context Detection (do not stop after this step).
Detect the current git branch and load relevant context:
Get current branch:
git branch --show-current 2>/dev/null
If branch matches feature/* pattern:
feature/analytics-dashboard → analytics-dashboard)PROJECT_ROOT/features/{feature-name}/Summarize recent branch activity:
git log --oneline -5 2>/dev/null
Report: "Recent commits on this branch: {summary}"
Check for uncommitted changes:
git status --porcelain 2>/dev/null
If changes exist, report: "Note: {N} uncommitted changes in working tree"
Read these files first:
SCOPE_DIR != PROJECT_ROOT)Check which of these exist and read them:
From PROJECT_ROOT (always check):
From plans/greenfield/ (if greenfield mode):
From PROJECT_ROOT (if MODE = "greenfield-legacy"):
From SCOPE_DIR (if feature mode):
| Situation | Action |
|---|---|
| Git init or clone failure | Report the error and stop — cannot proceed without a working repository. |
| Scoped AGENTS.md missing or malformed | Report the issue and continue with root AGENTS.md only. |
| /phase-prep failure | Report which pre-flight check failed and stop. Do not proceed to execution. |
Important: If LEARNINGS.md exists, apply those patterns throughout your work. These are project-specific conventions discovered during development that override general defaults.
When invoked by another skill (e.g., /go), return structured data:
{
"status": "<Status>",
"context_loaded": ["AGENTS.md", "EXECUTION_PLAN.md", "FLOW_VERIFICATION_PLAN.md"],
"blockers": [],
"next_action": "Continue with Phase 1, Task 1"
}
Status enum — exactly one of:
| Value | Meaning |
|---|---|
ready | All context loaded, no blockers. Execution can proceed. |
blocked | One or more blockers prevent execution (missing files, failed git init, etc.). |
partial | Context partially loaded; some optional files missing but execution can proceed with caveats. |
Field descriptions:
| Field | Type | Description |
|---|---|---|
status | Status | Overall readiness result (see enum above). |
context_loaded | string[] | List of context files successfully read (e.g., "AGENTS.md", "EXECUTION_PLAN.md"). |
blockers | string[] | Issues preventing execution. Empty array when status is ready or partial. |
next_action | string | Suggested next step (e.g., "Continue with Phase 2, Task 3" or "Run /setup first"). |