I just figured this out and it is saving Time, money and nerves and improves the general interaction with claude (and other models) significantly.
Phase 0 – Planning (the foundation)
Create a Markdown project plan that will become your single source of truth. This plan includes:
- Skeleton Generation – a structured prompt that produces an initial
<PROJECT>.mdfile containing:
- Project Overview
- Folder Structure (with brief folder descriptions)
- Core Files List
- Step‑by‑step Development Plan (milestones)
- Prompt Library (reusable prompts for features, bug‑fixes, docs)
- Token‑saving Tips
- Goals & Acceptance Criteria – define what “skeleton ready” looks like and how you’ll verify it.
- Dependencies / Open Questions – note any external APIs, authentication, or design decisions that need clarification later.
Result: A file named
<PROJECT>.mdlives in the repo root. It is the only artifact you will feed to Claude during the entire project lifecycle.
Phase 1+ – Build (iterative feature work)
Follow a test‑first, patch‑small cycle for every new piece of functionality:
| Step | Action | Why it saves tokens & nerves |
|---|---|---|
| 1️⃣ Review | Ask Claude to review the current <PROJECT>.md and list missing sections or inconsistencies. | One short request → minimal context. |
| 2️⃣ Patch | Provide a focused prompt that adds/modifies exactly what’s missing (e.g., “Add a ‘Deployment’ subsection under Project Overview with Docker & CI/CD bullet points”). | Targeted edit → no duplicated content. |
| 3️⃣ Save | Overwrite the changed portion in <PROJECT>.md. Commit the change. | Version‑controlled, single source of truth. |
| 4️⃣ Repeat | Move to the next milestone (core feature → next feature). | Keeps each interaction tiny and inexpensive. |
Example Prompt Flow
User: Review the following markdown and list any missing sections.
[Paste current .md content]
Claude: - Missing “Testing Strategy” section.
User: Add a Testing Strategy subsection under ‘Project Overview’ describing unit, integration and e2e tests, with sample Jest config.
Each exchange touches only the piece that truly needs change.
Ongoing – Documentation (maintain CLAUDE.md)
Treat CLAUDE.md as the project’s architecture log:
- Project Structure & Architecture Decisions – high‑level diagrams or bullet lists.
- API Contracts / Data Models – request/response shapes, field types.
- Dependencies with Versions – e.g.,
"axios": "^1.4.0"; keep this in sync when you bump versions. - Setup & Run Instructions – one‑click commands for local dev, CI pipelines, etc.
- Code Conventions – naming, linting rules, commit message format.
Whenever a code change or configuration shift occurs, immediately update CLAUDE.md. If the documentation no longer matches the implementation, pause and fix it before proceeding.
Token‑Saving & Nerve‑Preserving Shortcuts
- Batch Requests – combine related actions into one concise prompt (e.g., “Add a primary green button labeled ‘Submit’, style it with
#28a745, and bind a click handler that callshandleSubmit()”). - Placeholders – define tokens like
<API_KEY>once; replace them globally when the value changes. - Git‑Friendly Diffs – ask Claude to output a diff rather than full files for bug fixes.
- Browser Bookmarklet – quickly write the updated markdown back to disk without leaving the browser.
End‑to‑End Mini‑Project Walkthrough (Illustrative)
| Phase | Action | Outcome |
|---|---|---|
| Planning | Run the scaffold prompt for weather-dashboard. | Generates weather-dashboard.md with Overview, Structure, Core Files, Plan, Prompt Library. |
| Build – Feature | Add “Real‑time Weather Updates” subsection + sample async/await code. | Markdown now documents the feature and includes executable snippet. |
| Build – Fix | Correct folder name from src → source and add /utils. | Updated structure description; diff is tiny, token cheap. |
| Documentation | Commit changes to weather-dashboard.md and push. | Repo stays in sync with documented design. |
Here my example code for Claude, just use it at the beginning
You are an expert app developer building: [APP DESCRIPTION - include: purpose, target platforms, key features, tech preferences if any]
## WORKFLOW (Follow in order. Never skip phases.)
### Phase 0: PLANNING (Always first)
Create a Markdown project plan with:
- **Phases**: Break into 3-6 incremental milestones (skeleton → core feature → next feature...)
- **Per phase**: Goals, dependencies, tech choices, acceptance criteria
- **Risks/assumptions/open questions**
⏸️ STOP and wait for my approval before coding.
### Phase 1+: BUILD (Per feature/component)
1. **Test first**: Write 2-4 tests covering expected behavior (use [FRAMEWORK, e.g., pytest/Jest/etc.])
2. **Implement**: Minimal code to pass tests
3. **Refactor**: Clean up, tests stay green
4. **Bug fixes**: Failing test first → then fix
### Ongoing: DOCUMENTATION
Maintain `CLAUDE.md` in project root:
- Project structure + architecture decisions
- API contracts / data models
- Dependencies with versions
- Setup/run instructions
- Code conventions
Flag any doc/code mismatches before proceeding.
## RESPONSE FORMAT (Every response)
- Focus on ONE component/phase
- End with:
```
## Status
✅ Done: [what changed]
📋 Next: [proposed next step or question for me]
💾 Commit: `type(scope): message`
```
## CONSTRAINTS
- Real code only (no pseudocode in deliverables)
- Add debug logging for complex logic
- Ask before making architectural decisions
- If blocked or unclear: ask, don't assume
Current phase: PLANNING




